From c4d12377774c4c41e2260e4e93428badde50c4fe Mon Sep 17 00:00:00 2001 From: elsehow Date: Sun, 11 Dec 2016 10:53:30 -0800 Subject: [PATCH 1/2] Added test instructions, removed unused dev dep Added instructions for setting up tests with Sauce Labs credentials. Removed unnecessary dep on grunt-sass --- README.md | 8 ++++++++ package.json | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7bce52d..e6f8631 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,14 @@ To compile curve25519 from C souce files in `/native`, install grunt compile ``` +To test, you will need an account with [Sauce Labs](https://saucelabs.com). Get your username and API key, +then set the appropriate envirionment variables to run the tests. + +```sh +SAUCE_USERNAME="your-sauce-username" SAUCE_ACCESS_KEY="your-sauce-key" grunt test +``` + + ## License Copyright 2015-2016 Open Whisper Systems diff --git a/package.json b/package.json index c48e600..c4d53c1 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "grunt-contrib-concat": "^0.5.0", "grunt-contrib-connect": "^0.9.0", "grunt-contrib-jshint": "^0.10.0", - "grunt-contrib-sass": "^0.8.1", "grunt-contrib-watch": "^0.6.1", "grunt-jscs": "^1.1.0", "grunt-preen": "^1.0.0", From e4debbf0b16788235ff9dd2148c329da500d175f Mon Sep 17 00:00:00 2001 From: elsehow Date: Sun, 11 Dec 2016 15:29:04 -0800 Subject: [PATCH 2/2] Compatibility with JS module system. This PR makes libsignal-protocol-javascript compatible with JS's module system. The test suite now requires the library, bundling it into a single dependency. We also add an integration test. For backward compatibility, we still build dist/libsignal.js, and attach the library to window.libsignal. A few points remain, for the contributor's consideration: - This package will not work in node due to a dependency on WebCrypto API. We could look into polyfills, or allow the caller pass in their own primatives (though I do NOT think this is a good idea). - A few things are listed as dependencies in package.json. However, we are bundling those into a file anyway, so they are really dev dependencies (npm will not need to install them). This is a combination of 21 commits. Each commit's comments listed below. browserifying some test bundle Starting to bundle the tests. There is now a file test/main.js that requires and executes all the tests. Each test file is now responsible for requiring its own dependencies. test/index.html will eventually do nothing more than require chai/mocha/etc test lib bundle (test/test.js, which is built in the gruntfile concat task), and the test suite bundle (build/test_main.js). Perhaps we should move this bundle to test to be like build. Crypto.js tested + module-ified Curve.js still relies on some stuff in Internal that we will have to track down eventually. Continuing bundle-ifiabilty Stopping me now is the way protos/WhsiperTextProtocol.proto is built I assume this is an emscripten setting in grunt. What I intend to do is remove all Internal = Internal | {} garbage and replace with a single module.exports at the end. This way, the native stuff with expose itself as a function/object. SessionCipherTest passing This one required fiddling with the way protos are built I simplified stuff I think without breaking anything - just a one line change after some thinking. It seems that Whisper devs intended to add more protobufs eventually. I'm not sure if that's still in the plans, but they should be able to with some hacks. However, a more module-friendly dynamic loading solution may be easier to reason aout. Not bothering to write that for now. KeyHelper and NumericFingerprint pass Nothing fancy here, just requiring. SessionBuilderTest passing Also added a few untracked files. After all tests pass, I'm realizing I'll need to go back and make the build workflow sane again for testing. The browserify step is really *only* for the tests. Passing store tests The store tests come in a set of 5. Each gets initialized as a function, and SignalProtocolStore_test.js ties them all together. Where before the methods were being called from out of scope, here we require each store test in test/main.js, then pass all of these functions into test/SiganlProtocolStore_test.js, which now exposes a higher-order function. Passing all tests! Woohoo! Now it's time to deal with those final places where I'm "cheating." In test/index.html, there are three things from ../build/ (and one from ../src/, a worker) that are still being added to the HTML the old fashioned way, through script tags. The first order of business is that stuff in build/. Figuring out how it's written to JS, and how to module-ify it (and where to include it later) will surely take some time. Moving toward modular emscripten + worker I finally figured out how to require emscripten code from browserify! http://insertafter.com/en/blog/native-node-module.html? Now that I can require curve stuff instead of appending, i'ts time to get the webworkers into browserify too. Of course, substack has written something for this: https://github.com/substack/webworkify and it looks like that'll do what I need ....but, I'll need to get it working with the existing manager, first That's a mindfuck in itself because of all the zig-zagging references, even within the small file. What I'll need to do first is make sure 1 worker can get launched and do its job. After that, we can tidy up the references in that file, then make sure all references to startWorker fall in line. Fixed typo The crypto all seems to work now. Not sure what the webworker is for - will return to it once I figure that out. Amazingly, the only thing left is a regular old npm module. Why the unexpected behavior? Is Long the issue? How can I force Long in browserify, if so? Fixed webworkers WebWorkers now seem to work with browserify. Bundled tests lib in build/ They were getting written to test/ before - confusing, no computer-generated stuff in test/ That should be human-written source only. Now everything in test/index.html points to something in build/ Working! All bundled up! The trick was just requiring the bundled file apparently (?) Only things left to do are: - Make sure blanket runs at end-of-tests - Turn linting back on - Write up changes in README Added blanket; tests fail After adding blanket back, tests are suddenly failing! Not sure why. Removing blanket again Indeed, removing blanket fixes the failures. Oh well, will leave it out for now. All tests running Preserving legacy builds We still have a prebundled JS file for people who want to include in HTML. Passing grunt jscs Updated jshint Linting back on --- .jshintrc | 7 +- Gruntfile.js | 73 +- README.md | 24 +- build/components_concat.js | 135 +- build/curve25519_compiled.js | 32849 +++++---- build/curve25519_concat.js | 17591 +++-- build/protobufs_concat.js | 27 +- dist/libsignal-protocol-worker.js | 25298 ------- dist/{libsignal-protocol.js => libsignal.js} | 59214 ++++++++++++----- package.json | 9 +- src/BaseKeyType.js | 6 + src/ChainType.js | 6 + src/Curve.js | 221 +- src/KeyHelper.js | 14 +- src/NumericFingerprint.js | 124 +- src/SessionBuilder.js | 43 +- src/SessionCipher.js | 68 +- src/SessionLock.js | 7 +- src/SessionRecord.js | 18 +- src/SignalProtocolAddress.js | 8 +- src/crypto.js | 242 +- src/curve25519_worker.js | 13 +- src/curve25519_worker_manager.js | 108 +- src/curve25519_wrapper.js | 289 +- src/helpers.js | 90 +- src/main.js | 10 + src/main_window.js | 4 + src/protobufs.js | 27 +- test/IdentityKeyStore_test.js | 114 +- test/InMemorySignalProtocolStore.js | 4 + test/IntegrationTest.js | 109 + test/KeyHelperTest.js | 16 +- test/NumericFingerprintTest.js | 14 +- test/PreKeyStore_test.js | 99 +- test/SessionBuilderTest.js | 27 +- test/SessionCipherTest.js | 53 +- test/SessionStore_test.js | 142 +- test/SignalProtocolAddressTest.js | 6 +- test/SignalProtocolStore_test.js | 21 +- test/SignedPreKeyStore_test.js | 92 +- test/crypto_test.js | 295 +- test/helpers_test.js | 4 +- test/index.html | 45 +- test/main.js | 22 + test/temp_helpers.js | 5 +- test/test.js | 34455 ---------- test/testvectors.js | 978 +- 47 files changed, 69375 insertions(+), 103651 deletions(-) delete mode 100644 dist/libsignal-protocol-worker.js rename dist/{libsignal-protocol.js => libsignal.js} (51%) create mode 100644 src/BaseKeyType.js create mode 100644 src/ChainType.js create mode 100644 src/main.js create mode 100644 src/main_window.js create mode 100644 test/IntegrationTest.js create mode 100644 test/main.js delete mode 100644 test/test.js diff --git a/.jshintrc b/.jshintrc index 41a3f88..d6711f9 100644 --- a/.jshintrc +++ b/.jshintrc @@ -49,7 +49,7 @@ "sub" : false, "supernew" : false, "validthis" : false, - "browser" : false, + "browser" : true, "browserify" : false, "couch" : false, "devel" : false, @@ -67,5 +67,8 @@ "worker" : false, "wsh" : false, "yui" : false, - "globals" : {} + "node" : true, + "globals" : { + "Promise" : true + } } \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index e328d94..77d7a7f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,6 +6,16 @@ module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), + browserify: { + legacy: { + src: 'src/main_window.js', + dest: 'dist/libsignal.js' + }, + test: { + src: 'test/main.js', + dest: 'build/test_main.js' + } + }, concat: { components: { src: [ @@ -13,14 +23,18 @@ module.exports = function(grunt) { 'node_modules/bytebuffer/dist/ByteBufferAB.js', 'node_modules/protobufjs/dist/protobuf.js' ], - dest: 'build/components_concat.js', + dest: 'build/dcodeIO.js' }, curve25519: { src: [ 'build/curve25519_compiled.js', - 'src/curve25519_wrapper.js', ], - dest: 'build/curve25519_concat.js' + dest: 'build/curve25519_concat.js', + // Append this to the build for browser require compatibility + // via https://github.com/nfroidure/ttf2woff2/blob/master/jssrc/post.js + options: { + footer: "module.exports = Module;\nModule.inspect = function() { return '[Module]'; };" + } }, protos: { src: [ @@ -48,43 +62,6 @@ module.exports = function(grunt) { dest: 'build/protobufs_concat.js' }, - worker: { - src: [ - 'build/curve25519_concat.js', - 'src/curve25519_worker.js', - ], - dest: 'dist/libsignal-protocol-worker.js', - options: { - banner: ';(function(){\nvar Internal = {};\nvar libsignal = {};\n', - footer: '\n})();' - } - - }, - libsignalprotocol: { - src: [ - 'build/curve25519_concat.js', - 'src/curve25519_worker_manager.js', - 'build/components_concat.js', - - 'src/Curve.js', - 'src/crypto.js', - 'src/helpers.js', - 'src/KeyHelper.js', - 'build/protobufs_concat.js', - 'src/SessionRecord.js', - 'src/SignalProtocolAddress.js', - 'src/SessionBuilder.js', - 'src/SessionCipher.js', - 'src/SessionLock.js', - 'src/NumericFingerprint.js' - ], - dest: 'dist/libsignal-protocol.js', - options: { - banner: ';(function(){\nvar Internal = {};\nwindow.libsignal = {};\n', - footer: '\n})();' - } - - }, test: { src: [ 'node_modules/mocha/mocha.js', @@ -93,10 +70,7 @@ module.exports = function(grunt) { 'node_modules/blanket/dist/mocha/blanket_mocha.js', 'test/_test.js' ], - dest: 'test/test.js', - options: { - banner: 'var Internal = {};\nwindow.libsignal = {};\n' - } + dest: 'build/test_lib.js' } }, compile: { @@ -138,10 +112,10 @@ module.exports = function(grunt) { files: ['<%= jshint.files %>', '.jshintrc'], tasks: ['jshint'] }, - worker: { - files: ['<%= concat.worker.src %>'], - tasks: ['concat:worker'] - }, + // worker: { + // files: ['<%= concat.worker.src %>'], + // tasks: ['concat:worker'] + // }, libsignalprotocol: { files: ['<%= concat.libsignalprotocol.src %>'], tasks: ['concat:libsignalprotocol'] @@ -224,6 +198,5 @@ module.exports = function(grunt) { grunt.registerTask('dev', ['connect', 'watch']); grunt.registerTask('test', ['jshint', 'jscs', 'connect', 'saucelabs-mocha']); grunt.registerTask('default', ['concat']); - grunt.registerTask('build', ['compile', 'concat']); - + grunt.registerTask('build', ['compile', 'concat', 'browserify']); }; diff --git a/README.md b/README.md index e6f8631..c6e516f 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,15 @@ types/interfaces, which are available in most modern browsers. ## Usage -Include `dist/libsignal-protocol.js` in your webpage. +There are two ways to use this package. + +You can require with your front-end bundler of choice (e.g. browserify, webpack): + +```js +var libsignal = require('libsignal-protocol') +``` + +Or, you can include the prebundled `dist/libsignal.js` in your HTML file. ### Install time @@ -78,6 +86,7 @@ At install time, a libsignal client needs to generate its identity keys, registration id, and prekeys. ```js +var libsignal = require('libsignal-protocol') var KeyHelper = libsignal.KeyHelper; var registrationId = KeyHelper.generateRegistrationId(); @@ -112,7 +121,7 @@ var store = new MySignalProtocolStore(); var address = new libsignal.SignalProtocolAddress(recipientId, deviceId); // Instantiate a SessionBuilder for a remote recipientId + deviceId tuple. -SessionBuilder sessionBuilder = new libsignal.SessionBuilder(store, address); +var sessionBuilder = new libsignal.SessionBuilder(store, address); // Process a prekey fetched from the server. Returns a promise that resolves // once a session is created and saved in the store, or rejects if the @@ -179,23 +188,24 @@ sessionCipher.decryptWhisperMessage(ciphertext).then(function(plaintext) { }); ``` -## Building +## Contributing To compile curve25519 from C souce files in `/native`, install [emscripten](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html). +Theen, build all the assets with ``` -grunt compile +grunt build ``` -To test, you will need an account with [Sauce Labs](https://saucelabs.com). Get your username and API key, -then set the appropriate envirionment variables to run the tests. +To test, you can serve the project root and navigate to localhost:[port]/test to see the Mocha tests run. +For the full CI experience, you will need an account with [Sauce Labs](https://saucelabs.com). +Get your username and API key, then set the appropriate envirionment variables to run the tests: ```sh SAUCE_USERNAME="your-sauce-username" SAUCE_ACCESS_KEY="your-sauce-key" grunt test ``` - ## License Copyright 2015-2016 Open Whisper Systems diff --git a/build/components_concat.js b/build/components_concat.js index 0a2506a..d60447f 100644 --- a/build/components_concat.js +++ b/build/components_concat.js @@ -47,21 +47,18 @@ /** * The low 32 bits as a signed value. * @type {number} - * @expose */ this.low = low | 0; /** * The high 32 bits as a signed value. * @type {number} - * @expose */ this.high = high | 0; /** * Whether unsigned or not. * @type {boolean} - * @expose */ this.unsigned = !!unsigned; } @@ -87,10 +84,9 @@ * An indicator used to reliably determine if an object is a Long or not. * @type {boolean} * @const - * @expose * @private */ - Long.__isLong__; + Long.prototype.__isLong__; Object.defineProperty(Long.prototype, "__isLong__", { value: true, @@ -113,7 +109,6 @@ * @function * @param {*} obj Object * @returns {boolean} - * @expose */ Long.isLong = isLong; @@ -170,7 +165,6 @@ * @param {number} value The 32 bit integer in question * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed * @returns {!Long} The corresponding Long value - * @expose */ Long.fromInt = fromInt; @@ -205,7 +199,6 @@ * @param {number} value The number in question * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed * @returns {!Long} The corresponding Long value - * @expose */ Long.fromNumber = fromNumber; @@ -228,7 +221,6 @@ * @param {number} highBits The high 32 bits * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed * @returns {!Long} The corresponding Long value - * @expose */ Long.fromBits = fromBits; @@ -298,7 +290,6 @@ * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 * @returns {!Long} The corresponding Long value - * @expose */ Long.fromString = fromString; @@ -324,7 +315,6 @@ * @function * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value * @returns {!Long} - * @expose */ Long.fromValue = fromValue; @@ -382,7 +372,6 @@ /** * Signed zero. * @type {!Long} - * @expose */ Long.ZERO = ZERO; @@ -395,7 +384,6 @@ /** * Unsigned zero. * @type {!Long} - * @expose */ Long.UZERO = UZERO; @@ -408,7 +396,6 @@ /** * Signed one. * @type {!Long} - * @expose */ Long.ONE = ONE; @@ -421,7 +408,6 @@ /** * Unsigned one. * @type {!Long} - * @expose */ Long.UONE = UONE; @@ -434,7 +420,6 @@ /** * Signed negative one. * @type {!Long} - * @expose */ Long.NEG_ONE = NEG_ONE; @@ -447,7 +432,6 @@ /** * Maximum signed value. * @type {!Long} - * @expose */ Long.MAX_VALUE = MAX_VALUE; @@ -460,7 +444,6 @@ /** * Maximum unsigned value. * @type {!Long} - * @expose */ Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; @@ -473,7 +456,6 @@ /** * Minimum signed value. * @type {!Long} - * @expose */ Long.MIN_VALUE = MIN_VALUE; @@ -486,7 +468,6 @@ /** * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. * @returns {number} - * @expose */ LongPrototype.toInt = function toInt() { return this.unsigned ? this.low >>> 0 : this.low; @@ -495,7 +476,6 @@ /** * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). * @returns {number} - * @expose */ LongPrototype.toNumber = function toNumber() { if (this.unsigned) @@ -509,7 +489,6 @@ * @returns {string} * @override * @throws {RangeError} If `radix` is out of range - * @expose */ LongPrototype.toString = function toString(radix) { radix = radix || 10; @@ -552,7 +531,6 @@ /** * Gets the high 32 bits as a signed integer. * @returns {number} Signed high bits - * @expose */ LongPrototype.getHighBits = function getHighBits() { return this.high; @@ -561,7 +539,6 @@ /** * Gets the high 32 bits as an unsigned integer. * @returns {number} Unsigned high bits - * @expose */ LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { return this.high >>> 0; @@ -570,7 +547,6 @@ /** * Gets the low 32 bits as a signed integer. * @returns {number} Signed low bits - * @expose */ LongPrototype.getLowBits = function getLowBits() { return this.low; @@ -579,7 +555,6 @@ /** * Gets the low 32 bits as an unsigned integer. * @returns {number} Unsigned low bits - * @expose */ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { return this.low >>> 0; @@ -588,7 +563,6 @@ /** * Gets the number of bits needed to represent the absolute value of this Long. * @returns {number} - * @expose */ LongPrototype.getNumBitsAbs = function getNumBitsAbs() { if (this.isNegative()) // Unsigned Longs are never negative @@ -603,7 +577,6 @@ /** * Tests if this Long's value equals zero. * @returns {boolean} - * @expose */ LongPrototype.isZero = function isZero() { return this.high === 0 && this.low === 0; @@ -612,7 +585,6 @@ /** * Tests if this Long's value is negative. * @returns {boolean} - * @expose */ LongPrototype.isNegative = function isNegative() { return !this.unsigned && this.high < 0; @@ -621,7 +593,6 @@ /** * Tests if this Long's value is positive. * @returns {boolean} - * @expose */ LongPrototype.isPositive = function isPositive() { return this.unsigned || this.high >= 0; @@ -630,7 +601,6 @@ /** * Tests if this Long's value is odd. * @returns {boolean} - * @expose */ LongPrototype.isOdd = function isOdd() { return (this.low & 1) === 1; @@ -639,7 +609,6 @@ /** * Tests if this Long's value is even. * @returns {boolean} - * @expose */ LongPrototype.isEven = function isEven() { return (this.low & 1) === 0; @@ -649,7 +618,6 @@ * Tests if this Long's value equals the specified's. * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.equals = function equals(other) { if (!isLong(other)) @@ -664,7 +632,6 @@ * @function * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.eq = LongPrototype.equals; @@ -672,7 +639,6 @@ * Tests if this Long's value differs from the specified's. * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.notEquals = function notEquals(other) { return !this.eq(/* validates */ other); @@ -683,7 +649,6 @@ * @function * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.neq = LongPrototype.notEquals; @@ -691,7 +656,6 @@ * Tests if this Long's value is less than the specified's. * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.lessThan = function lessThan(other) { return this.comp(/* validates */ other) < 0; @@ -702,7 +666,6 @@ * @function * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.lt = LongPrototype.lessThan; @@ -710,7 +673,6 @@ * Tests if this Long's value is less than or equal the specified's. * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { return this.comp(/* validates */ other) <= 0; @@ -721,7 +683,6 @@ * @function * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.lte = LongPrototype.lessThanOrEqual; @@ -729,7 +690,6 @@ * Tests if this Long's value is greater than the specified's. * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.greaterThan = function greaterThan(other) { return this.comp(/* validates */ other) > 0; @@ -740,7 +700,6 @@ * @function * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.gt = LongPrototype.greaterThan; @@ -748,7 +707,6 @@ * Tests if this Long's value is greater than or equal the specified's. * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { return this.comp(/* validates */ other) >= 0; @@ -759,7 +717,6 @@ * @function * @param {!Long|number|string} other Other value * @returns {boolean} - * @expose */ LongPrototype.gte = LongPrototype.greaterThanOrEqual; @@ -768,7 +725,6 @@ * @param {!Long|number|string} other Other value * @returns {number} 0 if they are the same, 1 if the this is greater and -1 * if the given one is greater - * @expose */ LongPrototype.compare = function compare(other) { if (!isLong(other)) @@ -794,14 +750,12 @@ * @param {!Long|number|string} other Other value * @returns {number} 0 if they are the same, 1 if the this is greater and -1 * if the given one is greater - * @expose */ LongPrototype.comp = LongPrototype.compare; /** * Negates this Long's value. * @returns {!Long} Negated Long - * @expose */ LongPrototype.negate = function negate() { if (!this.unsigned && this.eq(MIN_VALUE)) @@ -813,7 +767,6 @@ * Negates this Long's value. This is an alias of {@link Long#negate}. * @function * @returns {!Long} Negated Long - * @expose */ LongPrototype.neg = LongPrototype.negate; @@ -821,7 +774,6 @@ * Returns the sum of this and the specified Long. * @param {!Long|number|string} addend Addend * @returns {!Long} Sum - * @expose */ LongPrototype.add = function add(addend) { if (!isLong(addend)) @@ -858,7 +810,6 @@ * Returns the difference of this and the specified Long. * @param {!Long|number|string} subtrahend Subtrahend * @returns {!Long} Difference - * @expose */ LongPrototype.subtract = function subtract(subtrahend) { if (!isLong(subtrahend)) @@ -871,7 +822,6 @@ * @function * @param {!Long|number|string} subtrahend Subtrahend * @returns {!Long} Difference - * @expose */ LongPrototype.sub = LongPrototype.subtract; @@ -879,7 +829,6 @@ * Returns the product of this and the specified Long. * @param {!Long|number|string} multiplier Multiplier * @returns {!Long} Product - * @expose */ LongPrototype.multiply = function multiply(multiplier) { if (this.isZero()) @@ -947,7 +896,6 @@ * @function * @param {!Long|number|string} multiplier Multiplier * @returns {!Long} Product - * @expose */ LongPrototype.mul = LongPrototype.multiply; @@ -956,7 +904,6 @@ * unsigned if this Long is unsigned. * @param {!Long|number|string} divisor Divisor * @returns {!Long} Quotient - * @expose */ LongPrototype.divide = function divide(divisor) { if (!isLong(divisor)) @@ -967,6 +914,8 @@ return this.unsigned ? UZERO : ZERO; var approx, rem, res; if (!this.unsigned) { + // This section is only relevant for signed longs and is derived from the + // closure library as a whole. if (this.eq(MIN_VALUE)) { if (divisor.eq(ONE) || divisor.eq(NEG_ONE)) return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE @@ -992,19 +941,18 @@ return this.neg().div(divisor).neg(); } else if (divisor.isNegative()) return this.div(divisor.neg()).neg(); - } else if (!divisor.unsigned) - divisor = divisor.toUnsigned(); - - // The algorithm below has not been made for unsigned longs. It's therefore - // required to take special care of the MSB prior to running it. - if (this.unsigned) { + res = ZERO; + } else { + // The algorithm below has not been made for unsigned longs. It's therefore + // required to take special care of the MSB prior to running it. + if (!divisor.unsigned) + divisor = divisor.toUnsigned(); if (divisor.gt(this)) return UZERO; if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true return UONE; res = UZERO; - } else - res = ZERO; + } // Repeat the following until the remainder is less than other: find a // floating-point that approximates remainder / other *from below*, add this @@ -1048,7 +996,6 @@ * @function * @param {!Long|number|string} divisor Divisor * @returns {!Long} Quotient - * @expose */ LongPrototype.div = LongPrototype.divide; @@ -1056,7 +1003,6 @@ * Returns this Long modulo the specified. * @param {!Long|number|string} divisor Divisor * @returns {!Long} Remainder - * @expose */ LongPrototype.modulo = function modulo(divisor) { if (!isLong(divisor)) @@ -1069,14 +1015,12 @@ * @function * @param {!Long|number|string} divisor Divisor * @returns {!Long} Remainder - * @expose */ LongPrototype.mod = LongPrototype.modulo; /** * Returns the bitwise NOT of this Long. * @returns {!Long} - * @expose */ LongPrototype.not = function not() { return fromBits(~this.low, ~this.high, this.unsigned); @@ -1086,7 +1030,6 @@ * Returns the bitwise AND of this Long and the specified. * @param {!Long|number|string} other Other Long * @returns {!Long} - * @expose */ LongPrototype.and = function and(other) { if (!isLong(other)) @@ -1098,7 +1041,6 @@ * Returns the bitwise OR of this Long and the specified. * @param {!Long|number|string} other Other Long * @returns {!Long} - * @expose */ LongPrototype.or = function or(other) { if (!isLong(other)) @@ -1110,7 +1052,6 @@ * Returns the bitwise XOR of this Long and the given one. * @param {!Long|number|string} other Other Long * @returns {!Long} - * @expose */ LongPrototype.xor = function xor(other) { if (!isLong(other)) @@ -1122,7 +1063,6 @@ * Returns this Long with bits shifted to the left by the given amount. * @param {number|!Long} numBits Number of bits * @returns {!Long} Shifted Long - * @expose */ LongPrototype.shiftLeft = function shiftLeft(numBits) { if (isLong(numBits)) @@ -1140,7 +1080,6 @@ * @function * @param {number|!Long} numBits Number of bits * @returns {!Long} Shifted Long - * @expose */ LongPrototype.shl = LongPrototype.shiftLeft; @@ -1148,7 +1087,6 @@ * Returns this Long with bits arithmetically shifted to the right by the given amount. * @param {number|!Long} numBits Number of bits * @returns {!Long} Shifted Long - * @expose */ LongPrototype.shiftRight = function shiftRight(numBits) { if (isLong(numBits)) @@ -1166,7 +1104,6 @@ * @function * @param {number|!Long} numBits Number of bits * @returns {!Long} Shifted Long - * @expose */ LongPrototype.shr = LongPrototype.shiftRight; @@ -1174,7 +1111,6 @@ * Returns this Long with bits logically shifted to the right by the given amount. * @param {number|!Long} numBits Number of bits * @returns {!Long} Shifted Long - * @expose */ LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { if (isLong(numBits)) @@ -1199,14 +1135,12 @@ * @function * @param {number|!Long} numBits Number of bits * @returns {!Long} Shifted Long - * @expose */ LongPrototype.shru = LongPrototype.shiftRightUnsigned; /** * Converts this Long to signed. * @returns {!Long} Signed long - * @expose */ LongPrototype.toSigned = function toSigned() { if (!this.unsigned) @@ -1217,7 +1151,6 @@ /** * Converts this Long to unsigned. * @returns {!Long} Unsigned long - * @expose */ LongPrototype.toUnsigned = function toUnsigned() { if (this.unsigned) @@ -1225,6 +1158,53 @@ return fromBits(this.low, this.high, true); }; + /** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation + */ + LongPrototype.toBytes = function(le) { + return le ? this.toBytesLE() : this.toBytesBE(); + } + + /** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation + */ + LongPrototype.toBytesLE = function() { + var hi = this.high, + lo = this.low; + return [ + lo & 0xff, + (lo >>> 8) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 24) & 0xff, + hi & 0xff, + (hi >>> 8) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 24) & 0xff + ]; + } + + /** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation + */ + LongPrototype.toBytesBE = function() { + var hi = this.high, + lo = this.low; + return [ + (hi >>> 24) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 8) & 0xff, + hi & 0xff, + (lo >>> 24) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 8) & 0xff, + lo & 0xff + ]; + } + return Long; }); @@ -9745,3 +9725,4 @@ return ProtoBuf; }); +module.exports = dcodeIO; \ No newline at end of file diff --git a/build/curve25519_compiled.js b/build/curve25519_compiled.js index 3e4cbd0..13a7a4c 100644 --- a/build/curve25519_compiled.js +++ b/build/curve25519_compiled.js @@ -30,9 +30,13 @@ for (var key in Module) { // The environment setup code below is customized to use Module. // *** Environment setup code *** -var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; var ENVIRONMENT_IS_WEB = typeof window === 'object'; +// Three configurations we can be running in: +// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) +// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) +// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function' && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; if (ENVIRONMENT_IS_NODE) { @@ -60,16 +64,25 @@ if (ENVIRONMENT_IS_NODE) { return ret; }; - Module['readBinary'] = function readBinary(filename) { return Module['read'](filename, true) }; + Module['readBinary'] = function readBinary(filename) { + var ret = Module['read'](filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; Module['load'] = function load(f) { globalEval(read(f)); }; - if (process['argv'].length > 1) { - Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); - } else { - Module['thisProgram'] = 'unknown-program'; + if (!Module['thisProgram']) { + if (process['argv'].length > 1) { + Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); + } else { + Module['thisProgram'] = 'unknown-program'; + } } Module['arguments'] = process['argv'].slice(2); @@ -84,6 +97,8 @@ if (ENVIRONMENT_IS_NODE) { throw ex; } }); + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; } else if (ENVIRONMENT_IS_SHELL) { if (!Module['print']) Module['print'] = print; @@ -110,8 +125,6 @@ else if (ENVIRONMENT_IS_SHELL) { Module['arguments'] = arguments; } - this['Module'] = Module; - } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { Module['read'] = function read(url) { @@ -142,11 +155,13 @@ else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { })); } - if (ENVIRONMENT_IS_WEB) { - window['Module'] = Module; - } else { + if (ENVIRONMENT_IS_WORKER) { Module['load'] = importScripts; } + + if (typeof Module['setWindowTitle'] === 'undefined') { + Module['setWindowTitle'] = function(title) { document.title = title }; + } } else { // Unreachable because SHELL is dependant on the others @@ -245,6 +260,18 @@ var Runtime = { return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE); }, STACK_ALIGN: 16, + prepVararg: function (ptr, type) { + if (type === 'double' || type === 'i64') { + // move so the load is aligned + if (ptr & 7) { + assert((ptr & 7) === 4); + ptr += 4; + } + } else { + assert((ptr & 3) === 0); + } + return ptr; + }, getAlignSize: function (type, size, vararg) { // we align i64s and doubles on 64-bit boundaries, unlike x86 if (!vararg && (type == 'i64' || type == 'double')) return 8; @@ -273,34 +300,6 @@ var Runtime = { removeFunction: function (index) { Runtime.functionPointers[(index-2)/2] = null; }, - getAsmConst: function (code, numArgs) { - // code is a constant string on the heap, so we can cache these - if (!Runtime.asmConstCache) Runtime.asmConstCache = {}; - var func = Runtime.asmConstCache[code]; - if (func) return func; - var args = []; - for (var i = 0; i < numArgs; i++) { - args.push(String.fromCharCode(36) + i); // $0, $1 etc - } - var source = Pointer_stringify(code); - if (source[0] === '"') { - // tolerate EM_ASM("..code..") even though EM_ASM(..code..) is correct - if (source.indexOf('"', 1) === source.length-1) { - source = source.substr(1, source.length-2); - } else { - // something invalid happened, e.g. EM_ASM("..code($0)..", input) - abort('invalid EM_ASM input |' + source + '|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)'); - } - } - try { - // Module is the only 'upvar', which we provide directly. We also provide FS for legacy support. - var evalled = eval('(function(Module, FS) { return function(' + args.join(',') + '){ ' + source + ' } })')(Module, typeof FS !== 'undefined' ? FS : null); - } catch(e) { - Module.printErr('error in executing inline EM_ASM code: ' + e + ' on: \n\n' + source + '\n\nwith args |' + args + '| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)'); - throw e; - } - return Runtime.asmConstCache[code] = evalled; - }, warnOnce: function (text) { if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {}; if (!Runtime.warnOnce.shown[text]) { @@ -322,73 +321,12 @@ var Runtime = { } return sigCache[func]; }, - UTF8Processor: function () { - var buffer = []; - var needed = 0; - this.processCChar = function (code) { - code = code & 0xFF; - - if (buffer.length == 0) { - if ((code & 0x80) == 0x00) { // 0xxxxxxx - return String.fromCharCode(code); - } - buffer.push(code); - if ((code & 0xE0) == 0xC0) { // 110xxxxx - needed = 1; - } else if ((code & 0xF0) == 0xE0) { // 1110xxxx - needed = 2; - } else { // 11110xxx - needed = 3; - } - return ''; - } - - if (needed) { - buffer.push(code); - needed--; - if (needed > 0) return ''; - } - - var c1 = buffer[0]; - var c2 = buffer[1]; - var c3 = buffer[2]; - var c4 = buffer[3]; - var ret; - if (buffer.length == 2) { - ret = String.fromCharCode(((c1 & 0x1F) << 6) | (c2 & 0x3F)); - } else if (buffer.length == 3) { - ret = String.fromCharCode(((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F)); - } else { - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var codePoint = ((c1 & 0x07) << 18) | ((c2 & 0x3F) << 12) | - ((c3 & 0x3F) << 6) | (c4 & 0x3F); - ret = String.fromCharCode( - (((codePoint - 0x10000) / 0x400)|0) + 0xD800, - (codePoint - 0x10000) % 0x400 + 0xDC00); - } - buffer.length = 0; - return ret; - } - this.processJSString = function processJSString(string) { - /* TODO: use TextEncoder when present, - var encoder = new TextEncoder(); - encoder['encoding'] = "utf-8"; - var utf8Array = encoder['encode'](aMsg.data); - */ - string = unescape(encodeURIComponent(string)); - var ret = []; - for (var i = 0; i < string.length; i++) { - ret.push(string.charCodeAt(i)); - } - return ret; - } - }, getCompilerSetting: function (name) { throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work'; }, stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+15)&-16); return ret; }, staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = (((STATICTOP)+15)&-16); return ret; }, - dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; }, + dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) { var success = enlargeMemory(); if (!success) { DYNAMICTOP = ret; return 0; } }; return ret; }, alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 16))*(quantum ? quantum : 16); return ret; }, makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0))); return ret; }, GLOBAL_BASE: 8, @@ -397,13 +335,8 @@ var Runtime = { } -Module['Runtime'] = Runtime; - - - - - +Module["Runtime"] = Runtime; @@ -475,7 +408,7 @@ var cwrap, ccall; var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']}; // C calling interface. - ccall = function ccallFunc(ident, returnType, argTypes, args) { + ccall = function ccallFunc(ident, returnType, argTypes, args, opts) { var func = getCFunc(ident); var cArgs = []; var stack = 0; @@ -492,7 +425,15 @@ var cwrap, ccall; } var ret = func.apply(null, cArgs); if (returnType === 'string') ret = Pointer_stringify(ret); - if (stack !== 0) Runtime.stackRestore(stack); + if (stack !== 0) { + if (opts && opts.async) { + EmterpreterAsync.asyncFinalizers.push(function() { + Runtime.stackRestore(stack); + }); + return; + } + Runtime.stackRestore(stack); + } return ret; } @@ -557,9 +498,8 @@ var cwrap, ccall; return eval(funcstr); }; })(); -Module["cwrap"] = cwrap; Module["ccall"] = ccall; - +Module["cwrap"] = cwrap; function setValue(ptr, value, type, noSafe) { type = type || 'i8'; @@ -575,7 +515,7 @@ function setValue(ptr, value, type, noSafe) { default: abort('invalid type for setValue: ' + type); } } -Module['setValue'] = setValue; +Module["setValue"] = setValue; function getValue(ptr, type, noSafe) { @@ -593,18 +533,18 @@ function getValue(ptr, type, noSafe) { } return null; } -Module['getValue'] = getValue; +Module["getValue"] = getValue; var ALLOC_NORMAL = 0; // Tries to use _malloc() var ALLOC_STACK = 1; // Lives for the duration of the current function call var ALLOC_STATIC = 2; // Cannot be freed var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk var ALLOC_NONE = 4; // Do not allocate -Module['ALLOC_NORMAL'] = ALLOC_NORMAL; -Module['ALLOC_STACK'] = ALLOC_STACK; -Module['ALLOC_STATIC'] = ALLOC_STATIC; -Module['ALLOC_DYNAMIC'] = ALLOC_DYNAMIC; -Module['ALLOC_NONE'] = ALLOC_NONE; +Module["ALLOC_NORMAL"] = ALLOC_NORMAL; +Module["ALLOC_STACK"] = ALLOC_STACK; +Module["ALLOC_STATIC"] = ALLOC_STATIC; +Module["ALLOC_DYNAMIC"] = ALLOC_DYNAMIC; +Module["ALLOC_NONE"] = ALLOC_NONE; // allocate(): This is for internal use. You can use it yourself as well, but the interface // is a little tricky (see docs right below). The reason is that it is optimized @@ -689,19 +629,27 @@ function allocate(slab, types, allocator, ptr) { return ret; } -Module['allocate'] = allocate; +Module["allocate"] = allocate; + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!staticSealed) return Runtime.staticAlloc(size); + if ((typeof _sbrk !== 'undefined' && !_sbrk.called) || !runtimeInitialized) return Runtime.dynamicAlloc(size); + return _malloc(size); +} +Module["getMemory"] = getMemory; function Pointer_stringify(ptr, /* optional */ length) { if (length === 0 || !ptr) return ''; // TODO: use TextDecoder // Find the length, and check for UTF while doing so - var hasUtf = false; + var hasUtf = 0; var t; var i = 0; while (1) { t = HEAPU8[(((ptr)+(i))>>0)]; - if (t >= 128) hasUtf = true; - else if (t == 0 && !length) break; + hasUtf |= t; + if (t == 0 && !length) break; i++; if (length && i == length) break; } @@ -709,7 +657,7 @@ function Pointer_stringify(ptr, /* optional */ length) { var ret = ''; - if (!hasUtf) { + if (hasUtf < 128) { var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack var curr; while (length > 0) { @@ -720,15 +668,184 @@ function Pointer_stringify(ptr, /* optional */ length) { } return ret; } + return Module['UTF8ToString'](ptr); +} +Module["Pointer_stringify"] = Pointer_stringify; - var utf8 = new Runtime.UTF8Processor(); - for (i = 0; i < length; i++) { - t = HEAPU8[(((ptr)+(i))>>0)]; - ret += utf8.processCChar(t); +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAP8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); } - return ret; } -Module['Pointer_stringify'] = Pointer_stringify; +Module["AsciiToString"] = AsciiToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} +Module["stringToAscii"] = stringToAscii; + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +function UTF8ArrayToString(u8Array, idx) { + var u0, u1, u2, u3, u4, u5; + + var str = ''; + while (1) { + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + u0 = u8Array[idx++]; + if (!u0) return str; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + u3 = u8Array[idx++] & 63; + if ((u0 & 0xF8) == 0xF0) { + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3; + } else { + u4 = u8Array[idx++] & 63; + if ((u0 & 0xFC) == 0xF8) { + u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4; + } else { + u5 = u8Array[idx++] & 63; + u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5; + } + } + } + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } +} +Module["UTF8ArrayToString"] = UTF8ArrayToString; + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function UTF8ToString(ptr) { + return UTF8ArrayToString(HEAPU8,ptr); +} +Module["UTF8ToString"] = UTF8ToString; + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x1FFFFF) { + if (outIdx + 3 >= endIdx) break; + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x3FFFFFF) { + if (outIdx + 4 >= endIdx) break; + outU8Array[outIdx++] = 0xF8 | (u >> 24); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 5 >= endIdx) break; + outU8Array[outIdx++] = 0xFC | (u >> 30); + outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} +Module["stringToUTF8Array"] = stringToUTF8Array; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} +Module["stringToUTF8"] = stringToUTF8; + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + ++len; + } else if (u <= 0x7FF) { + len += 2; + } else if (u <= 0xFFFF) { + len += 3; + } else if (u <= 0x1FFFFF) { + len += 4; + } else if (u <= 0x3FFFFFF) { + len += 5; + } else { + len += 6; + } + } + return len; +} +Module["lengthBytesUTF8"] = lengthBytesUTF8; + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. function UTF16ToString(ptr) { var i = 0; @@ -743,20 +860,46 @@ function UTF16ToString(ptr) { str += String.fromCharCode(codeUnit); } } -Module['UTF16ToString'] = UTF16ToString; - - -function stringToUTF16(str, outPtr) { - for(var i = 0; i < str.length; ++i) { +Module["UTF16ToString"] = UTF16ToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. var codeUnit = str.charCodeAt(i); // possibly a lead surrogate - HEAP16[(((outPtr)+(i*2))>>1)]=codeUnit; + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; } // Null-terminate the pointer to the HEAP. - HEAP16[(((outPtr)+(str.length*2))>>1)]=0; + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; } -Module['stringToUTF16'] = stringToUTF16; +Module["stringToUTF16"] = stringToUTF16; +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} +Module["lengthBytesUTF16"] = lengthBytesUTF16; function UTF32ToString(ptr) { var i = 0; @@ -768,6 +911,7 @@ function UTF32ToString(ptr) { return str; ++i; // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 if (utf32 >= 0x10000) { var ch = utf32 - 0x10000; str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); @@ -776,25 +920,60 @@ function UTF32ToString(ptr) { } } } -Module['UTF32ToString'] = UTF32ToString; - - -function stringToUTF32(str, outPtr) { - var iChar = 0; - for(var iCodeUnit = 0; iCodeUnit < str.length; ++iCodeUnit) { +Module["UTF32ToString"] = UTF32ToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. - var codeUnit = str.charCodeAt(iCodeUnit); // possibly a lead surrogate + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { - var trailSurrogate = str.charCodeAt(++iCodeUnit); + var trailSurrogate = str.charCodeAt(++i); codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); } - HEAP32[(((outPtr)+(iChar*4))>>2)]=codeUnit; - ++iChar; + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; } // Null-terminate the pointer to the HEAP. - HEAP32[(((outPtr)+(iChar*4))>>2)]=0; + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} +Module["stringToUTF32"] = stringToUTF32; + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; } -Module['stringToUTF32'] = stringToUTF32; +Module["lengthBytesUTF32"] = lengthBytesUTF32; function demangle(func) { var hasLibcxxabi = !!Module['___cxa_demangle']; @@ -995,13 +1174,17 @@ function jsStackTrace() { function stackTrace() { return demangleAll(jsStackTrace()); } -Module['stackTrace'] = stackTrace; +Module["stackTrace"] = stackTrace; // Memory management var PAGE_SIZE = 4096; + function alignMemoryPage(x) { - return (x+4095)&-4096; + if (x % 4096 > 0) { + x += (4096 - (x % 4096)); + } + return x; } var HEAP; @@ -1011,14 +1194,18 @@ var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk + +function abortOnCannotGrowMemory() { + abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); +} + function enlargeMemory() { - abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.'); + abortOnCannotGrowMemory(); } var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; -var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152; var totalMemory = 64*1024; while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) { @@ -1029,7 +1216,6 @@ while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) { } } if (totalMemory !== TOTAL_MEMORY) { - Module.printErr('increasing TOTAL_MEMORY to ' + totalMemory + ' to be compliant with the asm.js spec'); TOTAL_MEMORY = totalMemory; } @@ -1038,7 +1224,11 @@ if (totalMemory !== TOTAL_MEMORY) { assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']), 'JS engine does not provide full typed array support'); -var buffer = new ArrayBuffer(TOTAL_MEMORY); +var buffer; + + + +buffer = new ArrayBuffer(TOTAL_MEMORY); HEAP8 = new Int8Array(buffer); HEAP16 = new Int16Array(buffer); HEAP32 = new Int32Array(buffer); @@ -1048,6 +1238,7 @@ HEAPU32 = new Uint32Array(buffer); HEAPF32 = new Float32Array(buffer); HEAPF64 = new Float64Array(buffer); + // Endianness check (note: assumes compiler arch was little-endian) HEAP32[0] = 255; assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system'); @@ -1092,6 +1283,7 @@ var __ATPOSTRUN__ = []; // functions called after the runtime has exited var runtimeInitialized = false; var runtimeExited = false; + function preRun() { // compatibility - merge in anything from Module['preRun'] at this time if (Module['preRun']) { @@ -1132,42 +1324,39 @@ function postRun() { function addOnPreRun(cb) { __ATPRERUN__.unshift(cb); } -Module['addOnPreRun'] = Module.addOnPreRun = addOnPreRun; +Module["addOnPreRun"] = addOnPreRun; function addOnInit(cb) { __ATINIT__.unshift(cb); } -Module['addOnInit'] = Module.addOnInit = addOnInit; +Module["addOnInit"] = addOnInit; function addOnPreMain(cb) { __ATMAIN__.unshift(cb); } -Module['addOnPreMain'] = Module.addOnPreMain = addOnPreMain; +Module["addOnPreMain"] = addOnPreMain; function addOnExit(cb) { __ATEXIT__.unshift(cb); } -Module['addOnExit'] = Module.addOnExit = addOnExit; +Module["addOnExit"] = addOnExit; function addOnPostRun(cb) { __ATPOSTRUN__.unshift(cb); } -Module['addOnPostRun'] = Module.addOnPostRun = addOnPostRun; +Module["addOnPostRun"] = addOnPostRun; // Tools function intArrayFromString(stringy, dontAddNull, length /* optional */) { - var ret = (new Runtime.UTF8Processor()).processJSString(stringy); - if (length) { - ret.length = length; - } - if (!dontAddNull) { - ret.push(0); - } - return ret; + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; } -Module['intArrayFromString'] = intArrayFromString; +Module["intArrayFromString"] = intArrayFromString; function intArrayToString(array) { var ret = []; @@ -1180,7 +1369,7 @@ function intArrayToString(array) { } return ret.join(''); } -Module['intArrayToString'] = intArrayToString; +Module["intArrayToString"] = intArrayToString; function writeStringToMemory(string, buffer, dontAddNull) { var array = intArrayFromString(string, dontAddNull); @@ -1191,22 +1380,23 @@ function writeStringToMemory(string, buffer, dontAddNull) { i = i + 1; } } -Module['writeStringToMemory'] = writeStringToMemory; +Module["writeStringToMemory"] = writeStringToMemory; function writeArrayToMemory(array, buffer) { for (var i = 0; i < array.length; i++) { - HEAP8[(((buffer)+(i))>>0)]=array[i]; + HEAP8[((buffer++)>>0)]=array[i]; } } -Module['writeArrayToMemory'] = writeArrayToMemory; +Module["writeArrayToMemory"] = writeArrayToMemory; function writeAsciiToMemory(str, buffer, dontAddNull) { - for (var i = 0; i < str.length; i++) { - HEAP8[(((buffer)+(i))>>0)]=str.charCodeAt(i); + for (var i = 0; i < str.length; ++i) { + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); } - if (!dontAddNull) HEAP8[(((buffer)+(str.length))>>0)]=0; + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; } -Module['writeAsciiToMemory'] = writeAsciiToMemory; +Module["writeAsciiToMemory"] = writeAsciiToMemory; function unSign(value, bits, ignore) { if (value >= 0) { @@ -1229,6 +1419,7 @@ function reSign(value, bits, ignore) { return value; } + // check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 ) if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function imul(a, b) { var ah = a >>> 16; @@ -1240,6 +1431,15 @@ if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function Math.imul = Math['imul']; +if (!Math['clz32']) Math['clz32'] = function(x) { + x = x >>> 0; + for (var i = 0; i < 32; i++) { + if (x & (1 << (31 - i))) return i; + } + return 32; +}; +Math.clz32 = Math['clz32'] + var Math_abs = Math.abs; var Math_cos = Math.cos; var Math_sin = Math.sin; @@ -1257,6 +1457,7 @@ var Math_pow = Math.pow; var Math_imul = Math.imul; var Math_fround = Math.fround; var Math_min = Math.min; +var Math_clz32 = Math.clz32; // A counter of dependencies for calling run(). If we need to // do asynchronous work before running, increment this and @@ -1269,13 +1470,18 @@ var runDependencies = 0; var runDependencyWatcher = null; var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +function getUniqueRunDependency(id) { + return id; +} + function addRunDependency(id) { runDependencies++; if (Module['monitorRunDependencies']) { Module['monitorRunDependencies'](runDependencies); } } -Module['addRunDependency'] = addRunDependency; +Module["addRunDependency"] = addRunDependency; + function removeRunDependency(id) { runDependencies--; if (Module['monitorRunDependencies']) { @@ -1293,34 +1499,40 @@ function removeRunDependency(id) { } } } -Module['removeRunDependency'] = removeRunDependency; +Module["removeRunDependency"] = removeRunDependency; Module["preloadedImages"] = {}; // maps url to image data Module["preloadedAudios"] = {}; // maps url to audio data + var memoryInitializer = null; + + // === Body === +var ASM_CONSTS = []; STATIC_BASE = 8; -STATICTOP = STATIC_BASE + 33040; - /* global initializers */ __ATINIT__.push(); +STATICTOP = STATIC_BASE + 34240; + /* global initializers */ __ATINIT__.push(); -/* memory initializer */ allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,47,99,168,254,170,226,153,255,102,179,216,0,226,141,122,255,122,66,153,254,182,245,134,0,227,228,25,1,214,57,235,255,216,173,56,255,181,231,210,0,119,128,157,255,129,95,136,255,110,126,51,0,2,169,183,255,7,130,98,254,69,176,94,255,116,4,227,1,217,242,145,255,202,173,31,1,105,1,39,255,46,175,69,0,228,47,58,255,215,224,69,254,207,56,69,255,16,254,139,255,23,207,212,255,202,20,126,255,95,213,96,255,9,176,33,0,200,5,207,255,241,42,128,254,35,33,192,255,248,229,196,1,129,17,120,0,251,103,151,255,7,52,112,255,140,56,66,255,40,226,245,255,217,70,37,254,172,214,9,255,72,67,134,1,146,192,214,255,44,38,112,0,68,184,75,255,206,90,251,0,149,235,141,0,181,170,58,0,116,244,239,0,92,157,2,0,102,173,98,0,233,137,96,1,127,49,203,0,5,155,148,0,23,148,9,255,211,122,12,0,34,134,26,255,219,204,136,0,134,8,41,255,224,83,43,254,85,25,247,0,109,127,0,254,169,136,48,0,238,119,219,255,231,173,213,0,206,18,254,254,8,186,7,255,126,9,7,1,111,42,72,0,111,52,236,254,96,63,141,0,147,191,127,254,205,78,192,255,14,106,237,1,187,219,76,0,175,243,187,254,105,89,173,0,85,25,89,1,162,243,148,0,2,118,209,254,33,158,9,0,139,163,46,255,93,70,40,0,108,42,142,254,111,252,142,255,155,223,144,0,51,229,167,255,73,252,155,255,94,116,12,255,152,160,218,255,156,238,37,255,179,234,207,255,197,0,179,255,154,164,141,0,225,196,104,0,10,35,25,254,209,212,242,255,97,253,222,254,184,101,229,0,222,18,127,1,164,136,135,255,30,207,140,254,146,97,243,0,129,192,26,254,201,84,33,255,111,10,78,255,147,81,178,255,4,4,24,0,161,238,215,255,6,141,33,0,53,215,14,255,41,181,208,255,231,139,157,0,179,203,221,255,255,185,113,0,189,226,172,255,113,66,214,255,202,62,45,255,102,64,8,255,78,174,16,254,133,117,68,255,182,120,89,255,133,114,211,0,189,110,21,255,15,10,106,0,41,192,1,0,152,232,121,255,188,60,160,255,153,113,206,255,0,183,226,254,180,13,72,255,176,160,14,254,211,201,134,255,158,24,143,0,127,105,53,0,96,12,189,0,167,215,251,255,159,76,128,254,106,101,225,255,30,252,4,0,146,12,174,0,89,241,178,254,10,229,166,255,123,221,42,254,30,20,212,0,82,128,3,0,48,209,243,0,119,121,64,255,50,227,156,255,0,110,197,1,103,27,144,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,234,113,60,255,37,255,57,255,69,178,182,254,128,208,179,0,118,26,125,254,3,7,214,255,241,50,77,255,85,203,197,255,211,135,250,255,25,48,100,255,187,213,180,254,17,88,105,0,83,209,158,1,5,115,98,0,4,174,60,254,171,55,110,255,217,181,17,255,20,188,170,0,146,156,102,254,87,214,174,255,114,122,155,1,233,44,170,0,127,8,239,1,214,236,234,0,175,5,219,0,49,106,61,255,6,66,208,255,2,106,110,255,81,234,19,255,215,107,192,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,178,9,252,254,100,110,212,0,14,5,167,0,233,239,163,255,28,151,157,1,101,146,10,255,254,158,70,254,71,249,228,0,88,30,50,0,68,58,160,255,191,24,104,1,129,66,129,255,192,50,85,255,8,179,138,255,38,250,201,0,115,80,160,0,131,230,113,0,125,88,147,0,90,68,199,0,253,76,158,0,28,255,118,0,113,250,254,0,66,75,46,0,230,218,43,0,229,120,186,1,148,68,43,0,136,124,238,1,187,107,197,255,84,53,246,255,51,116,254,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,68,113,21,255,222,186,59,255,66,7,241,1,69,6,72,0,86,156,108,254,55,167,89,0,109,52,219,254,13,176,23,255,196,44,106,255,239,149,71,255,164,140,125,255,159,173,1,0,51,41,231,0,145,62,33,0,138,111,93,1,185,83,69,0,144,115,46,0,97,151,16,255,24,228,26,0,49,217,226,0,113,75,234,254,193,153,12,255,182,48,96,255,14,13,26,0,128,195,249,254,69,193,59,0,132,37,81,254,125,106,60,0,214,240,169,1,164,227,66,0,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,143,62,221,0,129,89,214,255,55,139,5,254,68,20,191,255,14,204,178,1,35,195,217,0,47,51,206,1,38,246,165,0,206,27,6,254,158,87,36,0,217,52,146,255,125,123,215,255,85,60,31,255,171,13,7,0,218,245,88,254,252,35,60,0,55,214,160,255,133,101,56,0,224,32,19,254,147,64,234,0,26,145,162,1,114,118,125,0,248,252,250,0,101,94,196,255,198,141,226,254,51,42,182,0,135,12,9,254,109,172,210,255,197,236,194,1,241,65,154,0,48,156,47,255,153,67,55,255,218,165,34,254,74,180,179,0,218,66,71,1,88,122,99,0,212,181,219,255,92,42,231,255,239,0,154,0,245,77,183,255,94,81,170,1,18,213,216,0,171,93,71,0,52,94,248,0,18,151,161,254,197,209,66,255,174,244,15,254,162,48,183,0,49,61,240,254,182,93,195,0,199,228,6,1,200,5,17,255,137,45,237,255,108,148,4,0,90,79,237,255,39,63,77,255,53,82,207,1,142,22,118,255,101,232,18,1,92,26,67,0,5,200,88,255,33,168,138,255,149,225,72,0,2,209,27,255,44,245,168,1,220,237,17,255,30,211,105,254,141,238,221,0,128,80,245,254,111,254,14,0,222,95,190,1,223,9,241,0,146,76,212,255,108,205,104,255,63,117,153,0,144,69,48,0,35,228,111,0,192,33,193,255,112,214,190,254,115,152,151,0,23,102,88,0,51,74,248,0,226,199,143,254,204,162,101,255,208,97,189,1,245,104,18,0,230,246,30,255,23,148,69,0,110,88,52,254,226,181,89,255,208,47,90,254,114,161,80,255,33,116,248,0,179,152,87,255,69,144,177,1,88,238,26,255,58,32,113,1,1,77,69,0,59,121,52,255,152,238,83,0,52,8,193,0,231,39,233,255,199,34,138,0,222,68,173,0,91,57,242,254,220,210,127,255,192,7,246,254,151,35,187,0,195,236,165,0,111,93,206,0,212,247,133,1,154,133,209,255,155,231,10,0,64,78,38,0,122,249,100,1,30,19,97,255,62,91,249,1,248,133,77,0,197,63,168,254,116,10,82,0,184,236,113,254,212,203,194,255,61,100,252,254,36,5,202,255,119,91,153,255,129,79,29,0,103,103,171,254,237,215,111,255,216,53,69,0,239,240,23,0,194,149,221,255,38,225,222,0,232,255,180,254,118,82,133,255,57,209,177,1,139,232,133,0,158,176,46,254,194,115,46,0,88,247,229,1,28,103,191,0,221,222,175,254,149,235,44,0,151,228,25,254,218,105,103,0,142,85,210,0,149,129,190,255,213,65,94,254,117,134,224,255,82,198,117,0,157,221,220,0,163,101,36,0,197,114,37,0,104,172,166,254,11,182,0,0,81,72,188,255,97,188,16,255,69,6,10,0,199,147,145,255,8,9,115,1,65,214,175,255,217,173,209,0,80,127,166,0,247,229,4,254,167,183,124,255,90,28,204,254,175,59,240,255,11,41,248,1,108,40,51,255,144,177,195,254,150,250,126,0,138,91,65,1,120,60,222,255,245,193,239,0,29,214,189,255,128,2,25,0,80,154,162,0,77,220,107,1,234,205,74,255,54,166,103,255,116,72,9,0,228,94,47,255,30,200,25,255,35,214,89,255,61,176,140,255,83,226,163,255,75,130,172,0,128,38,17,0,95,137,152,255,215,124,159,1,79,93,0,0,148,82,157,254,195,130,251,255,40,202,76,255,251,126,224,0,157,99,62,254,207,7,225,255,96,68,195,0,140,186,157,255,131,19,231,255,42,128,254,0,52,219,61,254,102,203,72,0,141,7,11,255,186,164,213,0,31,122,119,0,133,242,145,0,208,252,232,255,91,213,182,255,143,4,250,254,249,215,74,0,165,30,111,1,171,9,223,0,229,123,34,1,92,130,26,255,77,155,45,1,195,139,28,255,59,224,78,0,136,17,247,0,108,121,32,0,79,250,189,255,96,227,252,254,38,241,62,0,62,174,125,255,155,111,93,255,10,230,206,1,97,197,40,255,0,49,57,254,65,250,13,0,18,251,150,255,220,109,210,255,5,174,166,254,44,129,189,0,235,35,147,255,37,247,141,255,72,141,4,255,103,107,255,0,247,90,4,0,53,44,42,0,2,30,240,0,4,59,63,0,88,78,36,0,113,167,180,0,190,71,193,255,199,158,164,255,58,8,172,0,77,33,12,0,65,63,3,0,153,77,33,255,172,254,102,1,228,221,4,255,87,30,254,1,146,41,86,255,138,204,239,254,108,141,17,255,187,242,135,0,210,208,127,0,68,45,14,254,73,96,62,0,81,60,24,255,170,6,36,255,3,249,26,0,35,213,109,0,22,129,54,255,21,35,225,255,234,61,56,255,58,217,6,0,143,124,88,0,236,126,66,0,209,38,183,255,34,238,6,255,174,145,102,0,95,22,211,0,196,15,153,254,46,84,232,255,117,34,146,1,231,250,74,255,27,134,100,1,92,187,195,255,170,198,112,0,120,28,42,0,209,70,67,0,29,81,31,0,29,168,100,1,169,173,160,0,107,35,117,0,62,96,59,255,81,12,69,1,135,239,190,255,220,252,18,0,163,220,58,255,137,137,188,255,83,102,109,0,96,6,76,0,234,222,210,255,185,174,205,1,60,158,213,255,13,241,214,0,172,129,140,0,93,104,242,0,192,156,251,0,43,117,30,0,225,81,158,0,127,232,218,0,226,28,203,0,233,27,151,255,117,43,5,255,242,14,47,255,33,20,6,0,137,251,44,254,27,31,245,255,183,214,125,254,40,121,149,0,186,158,213,255,89,8,227,0,69,88,0,254,203,135,225,0,201,174,203,0,147,71,184,0,18,121,41,254,94,5,78,0,224,214,240,254,36,5,180,0,251,135,231,1,163,138,212,0,210,249,116,254,88,129,187,0,19,8,49,254,62,14,144,255,159,76,211,0,214,51,82,0,109,117,228,254,103,223,203,255,75,252,15,1,154,71,220,255,23,13,91,1,141,168,96,255,181,182,133,0,250,51,55,0,234,234,212,254,175,63,158,0,39,240,52,1,158,189,36,255,213,40,85,1,32,180,247,255,19,102,26,1,84,24,97,255,69,21,222,0,148,139,122,255,220,213,235,1,232,203,255,0,121,57,147,0,227,7,154,0,53,22,147,1,72,1,225,0,82,134,48,254,83,60,157,255,145,72,169,0,34,103,239,0,198,233,47,0,116,19,4,255,184,106,9,255,183,129,83,0,36,176,230,1,34,103,72,0,219,162,134,0,245,42,158,0,32,149,96,254,165,44,144,0,202,239,72,254,215,150,5,0,42,66,36,1,132,215,175,0,86,174,86,255,26,197,156,255,49,232,135,254,103,182,82,0,253,128,176,1,153,178,122,0,245,250,10,0,236,24,178,0,137,106,132,0,40,29,41,0,50,30,152,255,124,105,38,0,230,191,75,0,143,43,170,0,44,131,20,255,44,13,23,255,237,255,155,1,159,109,100,255,112,181,24,255,104,220,108,0,55,211,131,0,99,12,213,255,152,151,145,255,238,5,159,0,97,155,8,0,33,108,81,0,1,3,103,0,62,109,34,255,250,155,180,0,32,71,195,255,38,70,145,1,159,95,245,0,69,229,101,1,136,28,240,0,79,224,25,0,78,110,121,255,248,168,124,0,187,128,247,0,2,147,235,254,79,11,132,0,70,58,12,1,181,8,163,255,79,137,133,255,37,170,11,255,141,243,85,255,176,231,215,255,204,150,164,255,239,215,39,255,46,87,156,254,8,163,88,255,172,34,232,0,66,44,102,255,27,54,41,254,236,99,87,255,41,123,169,1,52,114,43,0,117,134,40,0,155,134,26,0,231,207,91,254,35,132,38,255,19,102,125,254,36,227,133,255,118,3,113,255,29,13,124,0,152,96,74,1,88,146,206,255,167,191,220,254,162,18,88,255,182,100,23,0,31,117,52,0,81,46,106,1,12,2,7,0,69,80,201,1,209,246,172,0,12,48,141,1,224,211,88,0,116,226,159,0,122,98,130,0,65,236,234,1,225,226,9,255,207,226,123,1,89,214,59,0,112,135,88,1,90,244,203,255,49,11,38,1,129,108,186,0,89,112,15,1,101,46,204,255,127,204,45,254,79,255,221,255,51,73,18,255,127,42,101,255,241,21,202,0,160,227,7,0,105,50,236,0,79,52,197,255,104,202,208,1,180,15,16,0,101,197,78,255,98,77,203,0,41,185,241,1,35,193,124,0,35,155,23,255,207,53,192,0,11,125,163,1,249,158,185,255,4,131,48,0,21,93,111,255,61,121,231,1,69,200,36,255,185,48,185,255,111,238,21,255,39,50,25,255,99,215,163,255,87,212,30,255,164,147,5,255,128,6,35,1,108,223,110,255,194,76,178,0,74,101,180,0,243,47,48,0,174,25,43,255,82,173,253,1,54,114,192,255,40,55,91,0,215,108,176,255,11,56,7,0,224,233,76,0,209,98,202,254,242,25,125,0,44,193,93,254,203,8,177,0,135,176,19,0,112,71,213,255,206,59,176,1,4,67,26,0,14,143,213,254,42,55,208,255,60,67,120,0,193,21,163,0,99,164,115,0,10,20,118,0,156,212,222,254,160,7,217,255,114,245,76,1,117,59,123,0,176,194,86,254,213,15,176,0,78,206,207,254,213,129,59,0,233,251,22,1,96,55,152,255,236,255,15,255,197,89,84,255,93,149,133,0,174,160,113,0,234,99,169,255,152,116,88,0,144,164,83,255,95,29,198,255,34,47,15,255,99,120,134,255,5,236,193,0,249,247,126,255,147,187,30,0,50,230,117,255,108,217,219,255,163,81,166,255,72,25,169,254,155,121,79,255,28,155,89,254,7,126,17,0,147,65,33,1,47,234,253,0,26,51,18,0,105,83,199,255,163,196,230,0,113,248,164,0,226,254,218,0,189,209,203,255,164,247,222,254,255,35,165,0,4,188,243,1,127,179,71,0,37,237,254,255,100,186,240,0,5,57,71,254,103,72,73,255,244,18,81,254,229,210,132,255,238,6,180,255,11,229,174,255,227,221,192,1,17,49,28,0,163,215,196,254,9,118,4,255,51,240,71,0,113,129,109,255,76,240,231,0,188,177,127,0,125,71,44,1,26,175,243,0,94,169,25,254,27,230,29,0,15,139,119,1,168,170,186,255,172,197,76,255,252,75,188,0,137,124,196,0,72,22,96,255,45,151,249,1,220,145,100,0,64,192,159,255,120,239,226,0,129,178,146,0,0,192,125,0,235,138,234,0,183,157,146,0,83,199,192,255,184,172,72,255,73,225,128,0,77,6,250,255,186,65,67,0,104,246,207,0,188,32,138,255,218,24,242,0,67,138,81,254,237,129,121,255,20,207,150,1,41,199,16,255,6,20,128,0,159,118,5,0,181,16,143,255,220,38,15,0,23,64,147,254,73,26,13,0,87,228,57,1,204,124,128,0,43,24,223,0,219,99,199,0,22,75,20,255,19,27,126,0,157,62,215,0,110,29,230,0,179,167,255,1,54,252,190,0,221,204,182,254,179,158,65,255,81,157,3,0,194,218,159,0,170,223,0,0,224,11,32,255,38,197,98,0,168,164,37,0,23,88,7,1,164,186,110,0,96,36,134,0,234,242,229,0,250,121,19,0,242,254,112,255,3,47,94,1,9,239,6,255,81,134,153,254,214,253,168,255,67,124,224,0,245,95,74,0,28,30,44,254,1,109,220,255,178,89,89,0,252,36,76,0,24,198,46,255,76,77,111,0,134,234,136,255,39,94,29,0,185,72,234,255,70,68,135,255,231,102,7,254,77,231,140,0,167,47,58,1,148,97,118,255,16,27,225,1,166,206,143,255,110,178,214,255,180,131,162,0,143,141,225,1,13,218,78,255,114,153,33,1,98,104,204,0,175,114,117,1,167,206,75,0,202,196,83,1,58,64,67,0,138,47,111,1,196,247,128,255,137,224,224,254,158,112,207,0,154,100,255,1,134,37,107,0,198,128,79,255,127,209,155,255,163,254,185,254,60,14,243,0,31,219,112,254,29,217,65,0,200,13,116,254,123,60,196,255,224,59,184,254,242,89,196,0,123,16,75,254,149,16,206,0,69,254,48,1,231,116,223,255,209,160,65,1,200,80,98,0,37,194,184,254,148,63,34,0,139,240,65,255,217,144,132,255,56,38,45,254,199,120,210,0,108,177,166,255,160,222,4,0,220,126,119,254,165,107,160,255,82,220,248,1,241,175,136,0,144,141,23,255,169,138,84,0,160,137,78,255,226,118,80,255,52,27,132,255,63,96,139,255,152,250,39,0,188,155,15,0,232,51,150,254,40,15,232,255,240,229,9,255,137,175,27,255,75,73,97,1,218,212,11,0,135,5,162,1,107,185,213,0,2,249,107,255,40,242,70,0,219,200,25,0,25,157,13,0,67,82,80,255,196,249,23,255,145,20,149,0,50,72,146,0,94,76,148,1,24,251,65,0,31,192,23,0,184,212,201,255,123,233,162,1,247,173,72,0,162,87,219,254,126,134,89,0,159,11,12,254,166,105,29,0,73,27,228,1,113,120,183,255,66,163,109,1,212,143,11,255,159,231,168,1,255,128,90,0,57,14,58,254,89,52,10,255,253,8,163,1,0,145,210,255,10,129,85,1,46,181,27,0,103,136,160,254,126,188,209,255,34,35,111,0,215,219,24,255,212,11,214,254,101,5,118,0,232,197,133,255,223,167,109,255,237,80,86,255,70,139,94,0,158,193,191,1,155,15,51,255,15,190,115,0,78,135,207,255,249,10,27,1,181,125,233,0,95,172,13,254,170,213,161,255,39,236,138,255,95,93,87,255,190,128,95,0,125,15,206,0,166,150,159,0,227,15,158,255,206,158,120,255,42,141,128,0,101,178,120,1,156,109,131,0,218,14,44,254,247,168,206,255,212,112,28,0,112,17,228,255,90,16,37,1,197,222,108,0,254,207,83,255,9,90,243,255,243,244,172,0,26,88,115,255,205,116,122,0,191,230,193,0,180,100,11,1,217,37,96,255,154,78,156,0,235,234,31,255,206,178,178,255,149,192,251,0,182,250,135,0,246,22,105,0,124,193,109,255,2,210,149,255,169,17,170,0,0,96,110,255,117,9,8,1,50,123,40,255,193,189,99,0,34,227,160,0,48,80,70,254,211,51,236,0,45,122,245,254,44,174,8,0,173,37,233,255,158,65,171,0,122,69,215,255,90,80,2,255,131,106,96,254,227,114,135,0,205,49,119,254,176,62,64,255,82,51,17,255,241,20,243,255,130,13,8,254,128,217,243,255,162,27,1,254,90,118,241,0,246,198,246,255,55,16,118,255,200,159,157,0,163,17,1,0,140,107,121,0,85,161,118,255,38,0,149,0,156,47,238,0,9,166,166,1,75,98,181,255,50,74,25,0,66,15,47,0,139,225,159,0,76,3,142,255,14,238,184,0,11,207,53,255,183,192,186,1,171,32,174,255,191,76,221,1,247,170,219,0,25,172,50,254,217,9,233,0,203,126,68,255,183,92,48,0,127,167,183,1,65,49,254,0,16,63,127,1,254,21,170,255,59,224,127,254,22,48,63,255,27,78,130,254,40,195,29,0,250,132,112,254,35,203,144,0,104,169,168,0,207,253,30,255,104,40,38,254,94,228,88,0,206,16,128,255,212,55,122,255,223,22,234,0,223,197,127,0,253,181,181,1,145,102,118,0,236,153,36,255,212,217,72,255,20,38,24,254,138,62,62,0,152,140,4,0,230,220,99,255,1,21,212,255,148,201,231,0,244,123,9,254,0,171,210,0,51,58,37,255,1,255,14,255,244,183,145,254,0,242,166,0,22,74,132,0,121,216,41,0,95,195,114,254,133,24,151,255,156,226,231,255,247,5,77,255,246,148,115,254,225,92,81,255,222,80,246,254,170,123,89,255,74,199,141,0,29,20,8,255,138,136,70,255,93,75,92,0,221,147,49,254,52,126,226,0,229,124,23,0,46,9,181,0,205,64,52,1,131,254,28,0,151,158,212,0,131,64,78,0,206,25,171,0,0,230,139,0,191,253,110,254,103,247,167,0,64,40,40,1,42,165,241,255,59,75,228,254,124,243,189,255,196,92,178,255,130,140,86,255,141,89,56,1,147,198,5,255,203,248,158,254,144,162,141,0,11,172,226,0,130,42,21,255,1,167,143,255,144,36,36,255,48,88,164,254,168,170,220,0,98,71,214,0,91,208,79,0,159,76,201,1,166,42,214,255,69,255,0,255,6,128,125,255,190,1,140,0,146,83,218,255,215,238,72,1,122,127,53,0,189,116,165,255,84,8,66,255,214,3,208,255,213,110,133,0,195,168,44,1,158,231,69,0,162,64,200,254,91,58,104,0,182,58,187,254,249,228,136,0,203,134,76,254,99,221,233,0,75,254,214,254,80,69,154,0,64,152,248,254,236,136,202,255,157,105,153,254,149,175,20,0,22,35,19,255,124,121,233,0,186,250,198,254,132,229,139,0,137,80,174,255,165,125,68,0,144,202,148,254,235,239,248,0,135,184,118,0,101,94,17,255,122,72,70,254,69,130,146,0,127,222,248,1,69,127,118,255,30,82,215,254,188,74,19,255,229,167,194,254,117,25,66,255,65,234,56,254,213,22,156,0,151,59,93,254,45,28,27,255,186,126,164,255,32,6,239,0,127,114,99,1,219,52,2,255,99,96,166,254,62,190,126,255,108,222,168,1,75,226,174,0,230,226,199,0,60,117,218,255,252,248,20,1,214,188,204,0,31,194,134,254,123,69,192,255,169,173,36,254,55,98,91,0,223,42,102,254,137,1,102,0,157,90,25,0,239,122,64,255,252,6,233,0,7,54,20,255,82,116,174,0,135,37,54,255,15,186,125,0,227,112,175,255,100,180,225,255,42,237,244,255,244,173,226,254,248,18,33,0,171,99,150,255,74,235,50,255,117,82,32,254,106,168,237,0,207,109,208,1,228,9,186,0,135,60,169,254,179,92,143,0,244,170,104,255,235,45,124,255,70,99,186,0,117,137,183,0,224,31,215,0,40,9,100,0,26,16,95,1,68,217,87,0,8,151,20,255,26,100,58,255,176,165,203,1,52,118,70,0,7,32,254,254,244,254,245,255,167,144,194,255,125,113,23,255,176,121,181,0,136,84,209,0,138,6,30,255,89,48,28,0,33,155,14,255,25,240,154,0,141,205,109,1,70,115,62,255,20,40,107,254,138,154,199,255,94,223,226,255,157,171,38,0,163,177,25,254,45,118,3,255,14,222,23,1,209,190,81,255,118,123,232,1,13,213,101,255,123,55,123,254,27,246,165,0,50,99,76,255,140,214,32,255,97,65,67,255,24,12,28,0,174,86,78,1,64,247,96,0,160,135,67,0,66,55,243,255,147,204,96,255,26,6,33,255,98,51,83,1,153,213,208,255,2,184,54,255,25,218,11,0,49,67,246,254,18,149,72,255,13,25,72,0,42,79,214,0,42,4,38,1,27,139,144,255,149,187,23,0,18,164,132,0,245,84,184,254,120,198,104,255,126,218,96,0,56,117,234,255,13,29,214,254,68,47,10,255,167,154,132,254,152,38,198,0,66,178,89,255,200,46,171,255,13,99,83,255,210,187,253,255,170,45,42,1,138,209,124,0,214,162,141,0,12,230,156,0,102,36,112,254,3,147,67,0,52,215,123,255,233,171,54,255,98,137,62,0,247,218,39,255,231,218,236,0,247,191,127,0,195,146,84,0,165,176,92,255,19,212,94,255,17,74,227,0,88,40,153,1,198,147,1,255,206,67,245,254,240,3,218,255,61,141,213,255,97,183,106,0,195,232,235,254,95,86,154,0,209,48,205,254,118,209,241,255,240,120,223,1,213,29,159,0,163,127,147,255,13,218,93,0,85,24,68,254,70,20,80,255,189,5,140,1,82,97,254,255,99,99,191,255,132,84,133,255,107,218,116,255,112,122,46,0,105,17,32,0,194,160,63,255,68,222,39,1,216,253,92,0,177,105,205,255,149,201,195,0,42,225,11,255,40,162,115,0,9,7,81,0,165,218,219,0,180,22,0,254,29,146,252,255,146,207,225,1,180,135,96,0,31,163,112,0,177,11,219,255,133,12,193,254,43,78,50,0,65,113,121,1,59,217,6,255,110,94,24,1,112,172,111,0,7,15,96,0,36,85,123,0,71,150,21,255,208,73,188,0,192,11,167,1,213,245,34,0,9,230,92,0,162,142,39,255,215,90,27,0,98,97,89,0,94,79,211,0,90,157,240,0,95,220,126,1,102,176,226,0,36,30,224,254,35,31,127,0,231,232,115,1,85,83,130,0,210,73,245,255,47,143,114,255,68,65,197,0,59,72,62,255,183,133,173,254,93,121,118,255,59,177,81,255,234,69,173,255,205,128,177,0,220,244,51,0,26,244,209,1,73,222,77,255,163,8,96,254,150,149,211,0,158,254,203,1,54,127,139,0,161,224,59,0,4,109,22,255,222,42,45,255,208,146,102,255,236,142,187,0,50,205,245,255,10,74,89,254,48,79,142,0,222,76,130,255,30,166,63,0,236,12,13,255,49,184,244,0,187,113,102,0,218,101,253,0,153,57,182,254,32,150,42,0,25,198,146,1,237,241,56,0,140,68,5,0,91,164,172,255,78,145,186,254,67,52,205,0,219,207,129,1,109,115,17,0,54,143,58,1,21,248,120,255,179,255,30,0,193,236,66,255,1,255,7,255,253,192,48,255,19,69,217,1,3,214,0,255,64,101,146,1,223,125,35,255,235,73,179,255,249,167,226,0,225,175,10,1,97,162,58,0,106,112,171,1,84,172,5,255,133,140,178,255,134,245,142,0,97,90,125,255,186,203,185,255,223,77,23,255,192,92,106,0,15,198,115,255,217,152,248,0,171,178,120,255,228,134,53,0,176,54,193,1,250,251,53,0,213,10,100,1,34,199,106,0,151,31,244,254,172,224,87,255,14,237,23,255,253,85,26,255,127,39,116,255,172,104,100,0,251,14,70,255,212,208,138,255,253,211,250,0,176,49,165,0,15,76,123,255,37,218,160,255,92,135,16,1,10,126,114,255,70,5,224,255,247,249,141,0,68,20,60,1,241,210,189,255,195,217,187,1,151,3,113,0,151,92,174,0,231,62,178,255,219,183,225,0,23,23,33,255,205,181,80,0,57,184,248,255,67,180,1,255,90,123,93,255,39,0,162,255,96,248,52,255,84,66,140,0,34,127,228,255,194,138,7,1,166,110,188,0,21,17,155,1,154,190,198,255,214,80,59,255,18,7,143,0,72,29,226,1,199,217,249,0,232,161,71,1,149,190,201,0,217,175,95,254,113,147,67,255,138,143,199,255,127,204,1,0,29,182,83,1,206,230,155,255,186,204,60,0,10,125,85,255,232,96,25,255,255,89,247,255,213,254,175,1,232,193,81,0,28,43,156,254,12,69,8,0,147,24,248,0,18,198,49,0,134,60,35,0,118,246,18,255,49,88,254,254,228,21,186,255,182,65,112,1,219,22,1,255,22,126,52,255,189,53,49,255,112,25,143,0,38,127,55,255,226,101,163,254,208,133,61,255,137,69,174,1,190,118,145,255,60,98,219,255,217,13,245,255,250,136,10,0,84,254,226,0,201,31,125,1,240,51,251,255,31,131,130,255,2,138,50,255,215,215,177,1,223,12,238,255,252,149,56,255,124,91,68,255,72,126,170,254,119,255,100,0,130,135,232,255,14,79,178,0,250,131,197,0,138,198,208,0,121,216,139,254,119,18,36,255,29,193,122,0,16,42,45,255,213,240,235,1,230,190,169,255,198,35,228,254,110,173,72,0,214,221,241,255,56,148,135,0,192,117,78,254,141,93,207,255,143,65,149,0,21,18,98,255,95,44,244,1,106,191,77,0,254,85,8,254,214,110,176,255,73,173,19,254,160,196,199,255,237,90,144,0,193,172,113,255,200,155,136,254,228,90,221,0,137,49,74,1,164,221,215,255,209,189,5,255,105,236,55,255,42,31,129,1,193,255,236,0,46,217,60,0,138,88,187,255,226,82,236,255,81,69,151,255,142,190,16,1,13,134,8,0,127,122,48,255,81,64,156,0,171,243,139,0,237,35,246,0,122,143,193,254,212,122,146,0,95,41,255,1,87,132,77,0,4,212,31,0,17,31,78,0,39,45,173,254,24,142,217,255,95,9,6,255,227,83,6,0,98,59,130,254,62,30,33,0,8,115,211,1,162,97,128,255,7,184,23,254,116,28,168,255,248,138,151,255,98,244,240,0,186,118,130,0,114,248,235,255,105,173,200,1,160,124,71,255,94,36,164,1,175,65,146,255,238,241,170,254,202,198,197,0,228,71,138,254,45,246,109,255,194,52,158,0,133,187,176,0,83,252,154,254,89,189,221,255,170,73,252,0,148,58,125,0,36,68,51,254,42,69,177,255,168,76,86,255,38,100,204,255,38,53,35,0,175,19,97,0,225,238,253,255,81,81,135,0,210,27,255,254,235,73,107,0,8,207,115,0,82,127,136,0,84,99,21,254,207,19,136,0,100,164,101,0,80,208,77,255,132,207,237,255,15,3,15,255,33,166,110,0,156,95,85,255,37,185,111,1,150,106,35,255,166,151,76,0,114,87,135,255,159,194,64,0,12,122,31,255,232,7,101,254,173,119,98,0,154,71,220,254,191,57,53,255,168,232,160,255,224,32,99,255,218,156,165,0,151,153,163,0,217,13,148,1,197,113,89,0,149,28,161,254,207,23,30,0,105,132,227,255,54,230,94,255,133,173,204,255,92,183,157,255,88,144,252,254,102,33,90,0,159,97,3,0,181,218,155,255,240,114,119,0,106,214,53,255,165,190,115,1,152,91,225,255,88,106,44,255,208,61,113,0,151,52,124,0,191,27,156,255,110,54,236,1,14,30,166,255,39,127,207,1,229,199,28,0,188,228,188,254,100,157,235,0,246,218,183,1,107,22,193,255,206,160,95,0,76,239,147,0,207,161,117,0,51,166,2,255,52,117,10,254,73,56,227,255,152,193,225,0,132,94,136,255,101,191,209,0,32,107,229,255,198,43,180,1,100,210,118,0,114,67,153,255,23,88,26,255,89,154,92,1,220,120,140,255,144,114,207,255,252,115,250,255,34,206,72,0,138,133,127,255,8,178,124,1,87,75,97,0,15,229,92,254,240,67,131,255,118,123,227,254,146,120,104,255,145,213,255,1,129,187,70,255,219,119,54,0,1,19,173,0,45,150,148,1,248,83,72,0,203,233,169,1,142,107,56,0,247,249,38,1,45,242,80,255,30,233,103,0,96,82,70,0,23,201,111,0,81,39,30,255,161,183,78,255,194,234,33,255,68,227,140,254,216,206,116,0,70,27,235,255,104,144,79,0,164,230,93,254,214,135,156,0,154,187,242,254,188,20,131,255,36,109,174,0,159,112,241,0,5,110,149,1,36,165,218,0,166,29,19,1,178,46,73,0,93,43,32,254,248,189,237,0,102,155,141,0,201,93,195,255,241,139,253,255,15,111,98,255,108,65,163,254,155,79,190,255,73,174,193,254,246,40,48,255,107,88,11,254,202,97,85,255,253,204,18,255,113,242,66,0,110,160,194,254,208,18,186,0,81,21,60,0,188,104,167,255,124,166,97,254,210,133,142,0,56,242,137,254,41,111,130,0,111,151,58,1,111,213,141,255,183,172,241,255,38,6,196,255,185,7,123,255,46,11,246,0,245,105,119,1,15,2,161,255,8,206,45,255,18,202,74,255,83,124,115,1,212,141,157,0,83,8,209,254,139,15,232,255,172,54,173,254,50,247,132,0,214,189,213,0,144,184,105,0,223,254,248,0,255,147,240,255,23,188,72,0,7,51,54,0,188,25,180,254,220,180,0,255,83,160,20,0,163,189,243,255,58,209,194,255,87,73,60,0,106,24,49,0,245,249,220,0,22,173,167,0,118,11,195,255,19,126,237,0,110,159,37,255,59,82,47,0,180,187,86,0,188,148,208,1,100,37,133,255,7,112,193,0,129,188,156,255,84,106,129,255,133,225,202,0,14,236,111,255,40,20,101,0,172,172,49,254,51,54,74,255,251,185,184,255,93,155,224,255,180,249,224,1,230,178,146,0,72,57,54,254,178,62,184,0,119,205,72,0,185,239,253,255,61,15,218,0,196,67,56,255,234,32,171,1,46,219,228,0,208,108,234,255,20,63,232,255,165,53,199,1,133,228,5,255,52,205,107,0,74,238,140,255,150,156,219,254,239,172,178,255,251,189,223,254,32,142,211,255,218,15,138,1,241,196,80,0,28,36,98,254,22,234,199,0,61,237,220,255,246,57,37,0,142,17,142,255,157,62,26,0,43,238,95,254,3,217,6,255,213,25,240,1,39,220,174,255,154,205,48,254,19,13,192,255,244,34,54,254,140,16,155,0,240,181,5,254,155,193,60,0,166,128,4,255,36,145,56,255,150,240,219,0,120,51,145,0,82,153,42,1,140,236,146,0,107,92,248,1,189,10,3,0,63,136,242,0,211,39,24,0,19,202,161,1,173,27,186,255,210,204,239,254,41,209,162,255,182,254,159,255,172,116,52,0,195,103,222,254,205,69,59,0,53,22,41,1,218,48,194,0,80,210,242,0,210,188,207,0,187,161,161,254,216,17,1,0,136,225,113,0,250,184,63,0,223,30,98,254,77,168,162,0,59,53,175,0,19,201,10,255,139,224,194,0,147,193,154,255,212,189,12,254,1,200,174,255,50,133,113,1,94,179,90,0,173,182,135,0,94,177,113,0,43,89,215,255,136,252,106,255,123,134,83,254,5,245,66,255,82,49,39,1,220,2,224,0,97,129,177,0,77,59,89,0,61,29,155,1,203,171,220,255,92,78,139,0,145,33,181,255,169,24,141,1,55,150,179,0,139,60,80,255,218,39,97,0,2,147,107,255,60,248,72,0,173,230,47,1,6,83,182,255,16,105,162,254,137,212,81,255,180,184,134,1,39,222,164,255,221,105,251,1,239,112,125,0,63,7,97,0,63,104,227,255,148,58,12,0,90,60,224,255,84,212,252,0,79,215,168,0,248,221,199,1,115,121,1,0,36,172,120,0,32,162,187,255,57,107,49,255,147,42,21,0,106,198,43,1,57,74,87,0,126,203,81,255,129,135,195,0,140,31,177,0,221,139,194,0,3,222,215,0,131,68,231,0,177,86,178,254,124,151,180,0,184,124,38,1,70,163,17,0,249,251,181,1,42,55,227,0,226,161,44,0,23,236,110,0,51,149,142,1,93,5,236,0,218,183,106,254,67,24,77,0,40,245,209,255,222,121,153,0,165,57,30,0,83,125,60,0,70,38,82,1,229,6,188,0,109,222,157,255,55,118,63,255,205,151,186,0,227,33,149,255,254,176,246,1,227,177,227,0,34,106,163,254,176,43,79,0,106,95,78,1,185,241,122,255,185,14,61,0,36,1,202,0,13,178,162,255,247,11,132,0,161,230,92,1,65,1,185,255,212,50,165,1,141,146,64,255,158,242,218,0,21,164,125,0,213,139,122,1,67,71,87,0,203,158,178,1,151,92,43,0,152,111,5,255,39,3,239,255,217,255,250,255,176,63,71,255,74,245,77,1,250,174,18,255,34,49,227,255,246,46,251,255,154,35,48,1,125,157,61,255,106,36,78,255,97,236,153,0,136,187,120,255,113,134,171,255,19,213,217,254,216,94,209,255,252,5,61,0,94,3,202,0,3,26,183,255,64,191,43,255,30,23,21,0,129,141,77,255,102,120,7,1,194,76,140,0,188,175,52,255,17,81,148,0,232,86,55,1,225,48,172,0,134,42,42,255,238,50,47,0,169,18,254,0,20,147,87,255,14,195,239,255,69,247,23,0,238,229,128,255,177,49,112,0,168,98,251,255,121,71,248,0,243,8,145,254,246,227,153,255,219,169,177,254,251,139,165,255,12,163,185,255,164,40,171,255,153,159,27,254,243,109,91,255,222,24,112,1,18,214,231,0,107,157,181,254,195,147,0,255,194,99,104,255,89,140,190,255,177,66,126,254,106,185,66,0,49,218,31,0,252,174,158,0,188,79,230,1,238,41,224,0,212,234,8,1,136,11,181,0,166,117,83,255,68,195,94,0,46,132,201,0,240,152,88,0,164,57,69,254,160,224,42,255,59,215,67,255,119,195,141,255,36,180,121,254,207,47,8,255,174,210,223,0,101,197,68,255,255,82,141,1,250,137,233,0,97,86,133,1,16,80,69,0,132,131,159,0,116,93,100,0,45,141,139,0,152,172,157,255,90,43,91,0,71,153,46,0,39,16,112,255,217,136,97,255,220,198,25,254,177,53,49,0,222,88,134,255,128,15,60,0,207,192,169,255,192,116,209,255,106,78,211,1,200,213,183,255,7,12,122,254,222,203,60,255,33,110,199,254,251,106,117,0,228,225,4,1,120,58,7,255,221,193,84,254,112,133,27,0,189,200,201,255,139,135,150,0,234,55,176,255,61,50,65,0,152,108,169,255,220,85,1,255,112,135,227,0,162,26,186,0,207,96,185,254,244,136,107,0,93,153,50,1,198,97,151,0,110,11,86,255,143,117,174,255,115,212,200,0,5,202,183,0,237,164,10,254,185,239,62,0,236,120,18,254,98,123,99,255,168,201,194,254,46,234,214,0,191,133,49,255,99,169,119,0,190,187,35,1,115,21,45,255,249,131,72,0,112,6,123,255,214,49,181,254,166,233,34,0,92,197,102,254,253,228,205,255,3,59,201,1,42,98,46,0,219,37,35,255,169,195,38,0,94,124,193,1,156,43,223,0,95,72,133,254,120,206,191,0,122,197,239,255,177,187,79,255,254,46,2,1,250,167,190,0,84,129,19,0,203,113,166,255,249,31,189,254,72,157,202,255,208,71,73,255,207,24,72,0,10,16,18,1,210,81,76,255,88,208,192,255,126,243,107,255,238,141,120,255,199,121,234,255,137,12,59,255,36,220,123,255,148,179,60,254,240,12,29,0,66,0,97,1,36,30,38,255,115,1,93,255,96,103,231,255,197,158,59,1,192,164,240,0,202,202,57,255,24,174,48,0,89,77,155,1,42,76,215,0,244,151,233,0,23,48,81,0,239,127,52,254,227,130,37,255,248,116,93,1,124,132,118,0,173,254,192,1,6,235,83,255,110,175,231,1,251,28,182,0,129,249,93,254,84,184,128,0,76,181,62,0,175,128,186,0,100,53,136,254,109,29,226,0,221,233,58,1,20,99,74,0,0,22,160,0,134,13,21,0,9,52,55,255,17,89,140,0,175,34,59,0,84,165,119,255,224,226,234,255,7,72,166,255,123,115,255,1,18,214,246,0,250,7,71,1,217,220,185,0,212,35,76,255,38,125,175,0,189,97,210,0,114,238,44,255,41,188,169,254,45,186,154,0,81,92,22,0,132,160,193,0,121,208,98,255,13,81,44,255,203,156,82,0,71,58,21,255,208,114,191,254,50,38,147,0,154,216,195,0,101,25,18,0,60,250,215,255,233,132,235,255,103,175,142,1,16,14,92,0,141,31,110,254,238,241,45,255,153,217,239,1,97,168,47,255,249,85,16,1,28,175,62,255,57,254,54,0,222,231,126,0,166,45,117,254,18,189,96,255,228,76,50,0,200,244,94,0,198,152,120,1,68,34,69,255,12,65,160,254,101,19,90,0,167,197,120,255,68,54,185,255,41,218,188,0,113,168,48,0,88,105,189,1,26,82,32,255,185,93,164,1,228,240,237,255,66,182,53,0,171,197,92,255,107,9,233,1,199,120,144,255,78,49,10,255,109,170,105,255,90,4,31,255,28,244,113,255,74,58,11,0,62,220,246,255,121,154,200,254,144,210,178,255,126,57,129,1,43,250,14,255,101,111,28,1,47,86,241,255,61,70,150,255,53,73,5,255,30,26,158,0,209,26,86,0,138,237,74,0,164,95,188,0,142,60,29,254,162,116,248,255,187,175,160,0,151,18,16,0,209,111,65,254,203,134,39,255,88,108,49,255,131,26,71,255,221,27,215,254,104,105,93,255,31,236,31,254,135,0,211,255,143,127,110,1,212,73,229,0,233,67,167,254,195,1,208,255,132,17,221,255,51,217,90,0,67,235,50,255,223,210,143,0,179,53,130,1,233,106,198,0,217,173,220,255,112,229,24,255,175,154,93,254,71,203,246,255,48,66,133,255,3,136,230,255,23,221,113,254,235,111,213,0,170,120,95,254,251,221,2,0,45,130,158,254,105,94,217,255,242,52,180,254,213,68,45,255,104,38,28,0,244,158,76,0,161,200,96,255,207,53,13,255,187,67,148,0,170,54,248,0,119,162,178,255,83,20,11,0,42,42,192,1,146,159,163,255,183,232,111,0,77,229,21,255,71,53,143,0,27,76,34,0,246,136,47,255,219,39,182,255,92,224,201,1,19,142,14,255,69,182,241,255,163,118,245,0,9,109,106,1,170,181,247,255,78,47,238,255,84,210,176,255,213,107,139,0,39,38,11,0,72,21,150,0,72,130,69,0,205,77,155,254,142,133,21], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); -/* memory initializer */ allocate([71,111,172,254,226,42,59,255,179,0,215,1,33,128,241,0,234,252,13,1,184,79,8,0,110,30,73,255,246,141,189,0,170,207,218,1,74,154,69,255,138,246,49,255,155,32,100,0,125,74,105,255,90,85,61,255,35,229,177,255,62,125,193,255,153,86,188,1,73,120,212,0,209,123,246,254,135,209,38,255,151,58,44,1,92,69,214,255,14,12,88,255,252,153,166,255,253,207,112,255,60,78,83,255,227,124,110,0,180,96,252,255,53,117,33,254,164,220,82,255,41,1,27,255,38,164,166,255,164,99,169,254,61,144,70,255,192,166,18,0,107,250,66,0,197,65,50,0,1,179,18,255,255,104,1,255,43,153,35,255,80,111,168,0,110,175,168,0,41,105,45,255,219,14,205,255,164,233,140,254,43,1,118,0,233,67,195,0,178,82,159,255,138,87,122,255,212,238,90,255,144,35,124,254,25,140,164,0,251,215,44,254,133,70,107,255,101,227,80,254,92,169,55,0,215,42,49,0,114,180,85,255,33,232,27,1,172,213,25,0,62,176,123,254,32,133,24,255,225,191,62,0,93,70,153,0,181,42,104,1,22,191,224,255,200,200,140,255,249,234,37,0,149,57,141,0,195,56,208,255,254,130,70,255,32,173,240,255,29,220,199,0,110,100,115,255,132,229,249,0,228,233,223,255,37,216,209,254,178,177,209,255,183,45,165,254,224,97,114,0,137,97,168,255,225,222,172,0,165,13,49,1,210,235,204,255,252,4,28,254,70,160,151,0,232,190,52,254,83,248,93,255,62,215,77,1,175,175,179,255,160,50,66,0,121,48,208,0,63,169,209,255,0,210,200,0,224,187,44,1,73,162,82,0,9,176,143,255,19,76,193,255,29,59,167,1,24,43,154,0,28,190,190,0,141,188,129,0,232,235,203,255,234,0,109,255,54,65,159,0,60,88,232,255,121,253,150,254,252,233,131,255,198,110,41,1,83,77,71,255,200,22,59,254,106,253,242,255,21,12,207,255,237,66,189,0,90,198,202,1,225,172,127,0,53,22,202,0,56,230,132,0,1,86,183,0,109,190,42,0,243,68,174,1,109,228,154,0,200,177,122,1,35,160,183,255,177,48,85,255,90,218,169,255,248,152,78,0,202,254,110,0,6,52,43,0,142,98,65,255,63,145,22,0,70,106,93,0,232,138,107,1,110,179,61,255,211,129,218,1,242,209,92,0,35,90,217,1,182,143,106,255,116,101,217,255,114,250,221,255,173,204,6,0,60,150,163,0,73,172,44,255,239,110,80,255,237,76,153,254,161,140,249,0,149,232,229,0,133,31,40,255,174,164,119,0,113,51,214,0,129,228,2,254,64,34,243,0,107,227,244,255,174,106,200,255,84,153,70,1,50,35,16,0,250,74,216,254,236,189,66,255,153,249,13,0,230,178,4,255,221,41,238,0,118,227,121,255,94,87,140,254,254,119,92,0,73,239,246,254,117,87,128,0,19,211,145,255,177,46,252,0,229,91,246,1,69,128,247,255,202,77,54,1,8,11,9,255,153,96,166,0,217,214,173,255,134,192,2,1,0,207,0,0,189,174,107,1,140,134,100,0,158,193,243,1,182,102,171,0,235,154,51,0,142,5,123,255,60,168,89,1,217,14,92,255,19,214,5,1,211,167,254,0,44,6,202,254,120,18,236,255,15,113,184,255,184,223,139,0,40,177,119,254,182,123,90,255,176,165,176,0,247,77,194,0,27,234,120,0,231,0,214,255,59,39,30,0,125,99,145,255,150,68,68,1,141,222,248,0,153,123,210,255,110,127,152,255,229,33,214,1,135,221,197,0,137,97,2,0,12,143,204,255,81,41,188,0,115,79,130,255,94,3,132,0,152,175,187,255,124,141,10,255,126,192,179,255,11,103,198,0,149,6,45,0,219,85,187,1,230,18,178,255,72,182,152,0,3,198,184,255,128,112,224,1,97,161,230,0,254,99,38,255,58,159,197,0,151,66,219,0,59,69,143,255,185,112,249,0,119,136,47,255,123,130,132,0,168,71,95,255,113,176,40,1,232,185,173,0,207,93,117,1,68,157,108,255,102,5,147,254,49,97,33,0,89,65,111,254,247,30,163,255,124,217,221,1,102,250,216,0,198,174,75,254,57,55,18,0,227,5,236,1,229,213,173,0,201,109,218,1,49,233,239,0,30,55,158,1,25,178,106,0,155,111,188,1,94,126,140,0,215,31,238,1,77,240,16,0,213,242,25,1,38,71,168,0,205,186,93,254,49,211,140,255,219,0,180,255,134,118,165,0,160,147,134,255,110,186,35,255,198,243,42,0,243,146,119,0,134,235,163,1,4,241,135,255,193,46,193,254,103,180,79,255,225,4,184,254,242,118,130,0,146,135,176,1,234,111,30,0,69,66,213,254,41,96,123,0,121,94,42,255,178,191,195,255,46,130,42,0,117,84,8,255,233,49,214,254,238,122,109,0,6,71,89,1,236,211,123,0,244,13,48,254,119,148,14,0,114,28,86,255,75,237,25,255,145,229,16,254,129,100,53,255,134,150,120,254,168,157,50,0,23,72,104,255,224,49,14,0,255,123,22,255,151,185,151,255,170,80,184,1,134,182,20,0,41,100,101,1,153,33,16,0,76,154,111,1,86,206,234,255,192,160,164,254,165,123,93,255,1,216,164,254,67,17,175,255,169,11,59,255,158,41,61,255,73,188,14,255,195,6,137,255,22,147,29,255,20,103,3,255,246,130,227,255,122,40,128,0,226,47,24,254,35,36,32,0,152,186,183,255,69,202,20,0,195,133,195,0,222,51,247,0,169,171,94,1,183,0,160,255,64,205,18,1,156,83,15,255,197,58,249,254,251,89,110,255,50,10,88,254,51,43,216,0,98,242,198,1,245,151,113,0,171,236,194,1,197,31,199,255,229,81,38,1,41,59,20,0,253,104,230,0,152,93,14,255,246,242,146,254,214,169,240,255,240,102,108,254,160,167,236,0,154,218,188,0,150,233,202,255,27,19,250,1,2,71,133,255,175,12,63,1,145,183,198,0,104,120,115,255,130,251,247,0,17,212,167,255,62,123,132,255,247,100,189,0,155,223,152,0,143,197,33,0,155,59,44,255,150,93,240,1,127,3,87,255,95,71,207,1,167,85,1,255,188,152,116,255,10,23,23,0,137,195,93,1,54,98,97,0,240,0,168,255,148,188,127,0,134,107,151,0,76,253,171,0,90,132,192,0,146,22,54,0,224,66,54,254,230,186,229,255,39,182,196,0,148,251,130,255,65,131,108,254,128,1,160,0,169,49,167,254,199,254,148,255,251,6,131,0,187,254,129,255,85,82,62,0,178,23,58,255,254,132,5,0,164,213,39,0,134,252,146,254,37,53,81,255,155,134,82,0,205,167,238,255,94,45,180,255,132,40,161,0,254,111,112,1,54,75,217,0,179,230,221,1,235,94,191,255,23,243,48,1,202,145,203,255,39,118,42,255,117,141,253,0,254,0,222,0,43,251,50,0,54,169,234,1,80,68,208,0,148,203,243,254,145,7,135,0,6,254,0,0,252,185,127,0,98,8,129,255,38,35,72,255,211,36,220,1,40,26,89,0,168,64,197,254,3,222,239,255,2,83,215,254,180,159,105,0,58,115,194,0,186,116,106,255,229,247,219,255,129,118,193,0,202,174,183,1,166,161,72,0,201,107,147,254,237,136,74,0,233,230,106,1,105,111,168,0,64,224,30,1,1,229,3,0,102,151,175,255,194,238,228,255,254,250,212,0,187,237,121,0,67,251,96,1,197,30,11,0,183,95,204,0,205,89,138,0,64,221,37,1,255,223,30,255,178,48,211,255,241,200,90,255,167,209,96,255,57,130,221,0,46,114,200,255,61,184,66,0,55,182,24,254,110,182,33,0,171,190,232,255,114,94,31,0,18,221,8,0,47,231,254,0,255,112,83,0,118,15,215,255,173,25,40,254,192,193,31,255,238,21,146,255,171,193,118,255,101,234,53,254,131,212,112,0,89,192,107,1,8,208,27,0,181,217,15,255,231,149,232,0,140,236,126,0,144,9,199,255,12,79,181,254,147,182,202,255,19,109,182,255,49,212,225,0,74,163,203,0,175,233,148,0,26,112,51,0,193,193,9,255,15,135,249,0,150,227,130,0,204,0,219,1,24,242,205,0,238,208,117,255,22,244,112,0,26,229,34,0,37,80,188,255,38,45,206,254,240,90,225,255,29,3,47,255,42,224,76,0,186,243,167,0,32,132,15,255,5,51,125,0,139,135,24,0,6,241,219,0,172,229,133,255,246,214,50,0,231,11,207,255,191,126,83,1,180,163,170,255,245,56,24,1,178,164,211,255,3,16,202,1,98,57,118,255,141,131,89,254,33,51,24,0,243,149,91,255,253,52,14,0,35,169,67,254,49,30,88,255,179,27,36,255,165,140,183,0,58,189,151,0,88,31,0,0,75,169,66,0,66,101,199,255,24,216,199,1,121,196,26,255,14,79,203,254,240,226,81,255,94,28,10,255,83,193,240,255,204,193,131,255,94,15,86,0,218,40,157,0,51,193,209,0,0,242,177,0,102,185,247,0,158,109,116,0,38,135,91,0,223,175,149,0,220,66,1,255,86,60,232,0,25,96,37,255,225,122,162,1,215,187,168,255,158,157,46,0,56,171,162,0,232,240,101,1,122,22,9,0,51,9,21,255,53,25,238,255,217,30,232,254,125,169,148,0,13,232,102,0,148,9,37,0,165,97,141,1,228,131,41,0,222,15,243,255,254,18,17,0,6,60,237,1,106,3,113,0,59,132,189,0,92,112,30,0,105,208,213,0,48,84,179,255,187,121,231,254,27,216,109,255,162,221,107,254,73,239,195,255,250,31,57,255,149,135,89,255,185,23,115,1,3,163,157,255,18,112,250,0,25,57,187,255,161,96,164,0,47,16,243,0,12,141,251,254,67,234,184,255,41,18,161,0,175,6,96,255,160,172,52,254,24,176,183,255,198,193,85,1,124,121,137,255,151,50,114,255,220,203,60,255,207,239,5,1,0,38,107,255,55,238,94,254,70,152,94,0,213,220,77,1,120,17,69,255,85,164,190,255,203,234,81,0,38,49,37,254,61,144,124,0,137,78,49,254,168,247,48,0,95,164,252,0,105,169,135,0,253,228,134,0,64,166,75,0,81,73,20,255,207,210,10,0,234,106,150,255,94,34,90,255,254,159,57,254,220,133,99,0,139,147,180,254,24,23,185,0,41,57,30,255,189,97,76,0,65,187,223,255,224,172,37,255,34,62,95,1,231,144,240,0,77,106,126,254,64,152,91,0,29,98,155,0,226,251,53,255,234,211,5,255,144,203,222,255,164,176,221,254,5,231,24,0,179,122,205,0,36,1,134,255,125,70,151,254,97,228,252,0,172,129,23,254,48,90,209,255,150,224,82,1,84,134,30,0,241,196,46,0,103,113,234,255,46,101,121,254,40,124,250,255,135,45,242,254,9,249,168,255,140,108,131,255,143,163,171,0,50,173,199,255,88,222,142,255,200,95,158,0,142,192,163,255,7,117,135,0,111,124,22,0,236,12,65,254,68,38,65,255,227,174,254,0,244,245,38,0,240,50,208,255,161,63,250,0,60,209,239,0,122,35,19,0,14,33,230,254,2,159,113,0,106,20,127,255,228,205,96,0,137,210,174,254,180,212,144,255,89,98,154,1,34,88,139,0,167,162,112,1,65,110,197,0,241,37,169,0,66,56,131,255,10,201,83,254,133,253,187,255,177,112,45,254,196,251,0,0,196,250,151,255,238,232,214,255,150,209,205,0,28,240,118,0,71,76,83,1,236,99,91,0,42,250,131,1,96,18,64,255,118,222,35,0,113,214,203,255,122,119,184,255,66,19,36,0,204,64,249,0,146,89,139,0,134,62,135,1,104,233,101,0,188,84,26,0,49,249,129,0,208,214,75,255,207,130,77,255,115,175,235,0,171,2,137,255,175,145,186,1,55,245,135,255,154,86,181,1,100,58,246,255,109,199,60,255,82,204,134,255,215,49,230,1,140,229,192,255,222,193,251,255,81,136,15,255,179,149,162,255,23,39,29,255,7,95,75,254,191,81,222,0,241,81,90,255,107,49,201,255,244,211,157,0,222,140,149,255,65,219,56,254,189,246,90,255,178,59,157,1,48,219,52,0,98,34,215,0,28,17,187,255,175,169,24,0,92,79,161,255,236,200,194,1,147,143,234,0,229,225,7,1,197,168,14,0,235,51,53,1,253,120,174,0,197,6,168,255,202,117,171,0,163,21,206,0,114,85,90,255,15,41,10,255,194,19,99,0,65,55,216,254,162,146,116,0,50,206,212,255,64,146,29,255,158,158,131,1,100,165,130,255,172,23,129,255,125,53,9,255,15,193,18,1,26,49,11,255,181,174,201,1,135,201,14,255,100,19,149,0,219,98,79,0,42,99,143,254,96,0,48,255,197,249,83,254,104,149,79,255,235,110,136,254,82,128,44,255,65,41,36,254,88,211,10,0,187,121,187,0,98,134,199,0,171,188,179,254,210,11,238,255,66,123,130,254,52,234,61,0,48,113,23,254,6,86,120,255,119,178,245,0,87,129,201,0,242,141,209,0,202,114,85,0,148,22,161,0,103,195,48,0,25,49,171,255,138,67,130,0,182,73,122,254,148,24,130,0,211,229,154,0,32,155,158,0,84,105,61,0,177,194,9,255,166,89,86,1,54,83,187,0,249,40,117,255,109,3,215,255,53,146,44,1,63,47,179,0,194,216,3,254,14,84,136,0,136,177,13,255,72,243,186,255,117,17,125,255,211,58,211,255,93,79,223,0,90,88,245,255,139,209,111,255,70,222,47,0,10,246,79,255,198,217,178,0,227,225,11,1,78,126,179,255,62,43,126,0,103,148,35,0,129,8,165,254,245,240,148,0,61,51,142,0,81,208,134,0,15,137,115,255,211,119,236,255,159,245,248,255,2,134,136,255,230,139,58,1,160,164,254,0,114,85,141,255,49,166,182,255,144,70,84,1,85,182,7,0,46,53,93,0,9,166,161,255,55,162,178,255,45,184,188,0,146,28,44,254,169,90,49,0,120,178,241,1,14,123,127,255,7,241,199,1,189,66,50,255,198,143,101,254,189,243,135,255,141,24,24,254,75,97,87,0,118,251,154,1,237,54,156,0,171,146,207,255,131,196,246,255,136,64,113,1,151,232,57,0,240,218,115,0,49,61,27,255,64,129,73,1,252,169,27,255,40,132,10,1,90,201,193,255,252,121,240,1,186,206,41,0,43,198,97,0,145,100,183,0,204,216,80,254,172,150,65,0,249,229,196,254,104,123,73,255,77,104,96,254,130,180,8,0,104,123,57,0,220,202,229,255,102,249,211,0,86,14,232,255,182,78,209,0,239,225,164,0,106,13,32,255,120,73,17,255,134,67,233,0,83,254,181,0,183,236,112,1,48,64,131,255,241,216,243,255,65,193,226,0,206,241,100,254,100,134,166,255,237,202,197,0,55,13,81,0,32,124,102,255,40,228,177,0,118,181,31,1,231,160,134,255,119,187,202,0,0,142,60,255,128,38,189,255,166,201,150,0,207,120,26,1,54,184,172,0,12,242,204,254,133,66,230,0,34,38,31,1,184,112,80,0,32,51,165,254,191,243,55,0,58,73,146,254,155,167,205,255,100,104,152,255,197,254,207,255,173,19,247,0,238,10,202,0,239,151,242,0,94,59,39,255,240,29,102,255,10,92,154,255,229,84,219,255,161,129,80,0,208,90,204,1,240,219,174,255,158,102,145,1,53,178,76,255,52,108,168,1,83,222,107,0,211,36,109,0,118,58,56,0,8,29,22,0,237,160,199,0,170,209,157,0,137,71,47,0,143,86,32,0,198,242,2,0,212,48,136,1,92,172,186,0,230,151,105,1,96,191,229,0,138,80,191,254,240,216,130,255,98,43,6,254,168,196,49,0,253,18,91,1,144,73,121,0,61,146,39,1,63,104,24,255,184,165,112,254,126,235,98,0,80,213,98,255,123,60,87,255,82,140,245,1,223,120,173,255,15,198,134,1,206,60,239,0,231,234,92,255,33,238,19,255,165,113,142,1,176,119,38,0,160,43,166,254,239,91,105,0,107,61,194,1,25,4,68,0,15,139,51,0,164,132,106,255,34,116,46,254,168,95,197,0,137,212,23,0,72,156,58,0,137,112,69,254,150,105,154,255,236,201,157,0,23,212,154,255,136,82,227,254,226,59,221,255,95,149,192,0,81,118,52,255,33,43,215,1,14,147,75,255,89,156,121,254,14,18,79,0,147,208,139,1,151,218,62,255,156,88,8,1,210,184,98,255,20,175,123,255,102,83,229,0,220,65,116,1,150,250,4,255,92,142,220,255,34,247,66,255,204,225,179,254,151,81,151,0,71,40,236,255,138,63,62,0,6,79,240,255,183,185,181,0,118,50,27,0,63,227,192,0,123,99,58,1,50,224,155,255,17,225,223,254,220,224,77,255,14,44,123,1,141,128,175,0,248,212,200,0,150,59,183,255,147,97,29,0,150,204,181,0,253,37,71,0,145,85,119,0,154,200,186,0,2,128,249,255,83,24,124,0,14,87,143,0,168,51,245,1,124,151,231,255,208,240,197,1,124,190,185,0,48,58,246,0,20,233,232,0,125,18,98,255,13,254,31,255,245,177,130,255,108,142,35,0,171,125,242,254,140,12,34,255,165,161,162,0,206,205,101,0,247,25,34,1,100,145,57,0,39,70,57,0,118,204,203,255,242,0,162,0,165,244,30,0,198,116,226,0,128,111,153,255,140,54,182,1,60,122,15,255,155,58,57,1,54,50,198,0,171,211,29,255,107,138,167,255,173,107,199,255,109,161,193,0,89,72,242,255,206,115,89,255,250,254,142,254,177,202,94,255,81,89,50,0,7,105,66,255,25,254,255,254,203,64,23,255,79,222,108,255,39,249,75,0,241,124,50,0,239,152,133,0,221,241,105,0,147,151,98,0,213,161,121,254,242,49,137,0,233,37,249,254,42,183,27,0,184,119,230,255,217,32,163,255,208,251,228,1,137,62,131,255,79,64,9,254,94,48,113,0,17,138,50,254,193,255,22,0,247,18,197,1,67,55,104,0,16,205,95,255,48,37,66,0,55,156,63,1,64,82,74,255,200,53,71,254,239,67,125,0,26,224,222,0,223,137,93,255,30,224,202,255,9,220,132,0,198,38,235,1,102,141,86,0,60,43,81,1,136,28,26,0,233,36,8,254,207,242,148,0,164,162,63,0,51,46,224,255,114,48,79,255,9,175,226,0,222,3,193,255,47,160,232,255,255,93,105,254,14,42,230,0,26,138,82,1,208,43,244,0,27,39,38,255,98,208,127,255,64,149,182,255,5,250,209,0,187,60,28,254,49,25,218,255,169,116,205,255,119,18,120,0,156,116,147,255,132,53,109,255,13,10,202,0,110,83,167,0,157,219,137,255,6,3,130,255,50,167,30,255,60,159,47,255,129,128,157,254,94,3,189,0,3,166,68,0,83,223,215,0,150,90,194,1,15,168,65,0,227,83,51,255,205,171,66,255,54,187,60,1,152,102,45,255,119,154,225,0,240,247,136,0,100,197,178,255,139,71,223,255,204,82,16,1,41,206,42,255,156,192,221,255,216,123,244,255,218,218,185,255,187,186,239,255,252,172,160,255,195,52,22,0,144,174,181,254,187,100,115,255,211,78,176,255,27,7,193,0,147,213,104,255,90,201,10,255,80,123,66,1,22,33,186,0,1,7,99,254,30,206,10,0,229,234,5,0,53,30,210,0,138,8,220,254,71,55,167,0,72,225,86,1,118,190,188,0,254,193,101,1,171,249,172,255,94,158,183,254,93,2,108,255,176,93,76,255,73,99,79,255,74,64,129,254,246,46,65,0,99,241,127,254,246,151,102,255,44,53,208,254,59,102,234,0,154,175,164,255,88,242,32,0,111,38,1,0,255,182,190,255,115,176,15,254,169,60,129,0,122,237,241,0,90,76,63,0,62,74,120,255,122,195,110,0,119,4,178,0,222,242,210,0,130,33,46,254,156,40,41,0,167,146,112,1,49,163,111,255,121,176,235,0,76,207,14,255,3,25,198,1,41,235,213,0,85,36,214,1,49,92,109,255,200,24,30,254,168,236,195,0,145,39,124,1,236,195,149,0,90,36,184,255,67,85,170,255,38,35,26,254,131,124,68,255,239,155,35,255,54,201,164,0,196,22,117,255,49,15,205,0,24,224,29,1,126,113,144,0,117,21,182,0,203,159,141,0,223,135,77,0,176,230,176,255,190,229,215,255,99,37,181,255,51,21,138,255,25,189,89,255,49,48,165,254,152,45,247,0,170,108,222,0,80,202,5,0,27,69,103,254,204,22,129,255,180,252,62,254,210,1,91,255,146,110,254,255,219,162,28,0,223,252,213,1,59,8,33,0,206,16,244,0,129,211,48,0,107,160,208,0,112,59,209,0,109,77,216,254,34,21,185,255,246,99,56,255,179,139,19,255,185,29,50,255,84,89,19,0,74,250,98,255,225,42,200,255,192,217,205,255,210,16,167,0,99,132,95,1,43,230,57,0,254,11,203,255,99,188,63,255,119,193,251,254,80,105,54,0,232,181,189,1,183,69,112,255,208,171,165,255,47,109,180,255,123,83,165,0,146,162,52,255,154,11,4,255,151,227,90,255,146,137,97,254,61,233,41,255,94,42,55,255,108,164,236,0,152,68,254,0,10,140,131,255,10,106,79,254,243,158,137,0,67,178,66,254,177,123,198,255,15,62,34,0,197,88,42,255,149,95,177,255,152,0,198,255,149,254,113,255,225,90,163,255,125,217,247,0,18,17,224,0,128,66,120,254,192,25,9,255,50,221,205,0,49,212,70,0,233,255,164,0,2,209,9,0,221,52,219,254,172,224,244,255,94,56,206,1,242,179,2,255,31,91,164,1,230,46,138,255,189,230,220,0,57,47,61,255,111,11,157,0,177,91,152,0,28,230,98,0,97,87,126,0,198,89,145,255,167,79,107,0,249,77,160,1,29,233,230,255,150,21,86,254,60,11,193,0,151,37,36,254,185,150,243,255,228,212,83,1,172,151,180,0,201,169,155,0,244,60,234,0,142,235,4,1,67,218,60,0,192,113,75,1,116,243,207,255,65,172,155,0,81,30,156,255,80,72,33,254,18,231,109,255,142,107,21,254,125,26,132,255,176,16,59,255,150,201,58,0,206,169,201,0,208,121,226,0,40,172,14,255,150,61,94,255,56,57,156,255,141,60,145,255,45,108,149,255,238,145,155,255,209,85,31,254,192,12,210,0,99,98,93,254,152,16,151,0,225,185,220,0,141,235,44,255,160,172,21,254,71,26,31,255,13,64,93,254,28,56,198,0,177,62,248,1,182,8,241,0,166,101,148,255,78,81,133,255,129,222,215,1,188,169,129,255,232,7,97,0,49,112,60,255,217,229,251,0,119,108,138,0,39,19,123,254,131,49,235,0,132,84,145,0,130,230,148,255,25,74,187,0,5,245,54,255,185,219,241,1,18,194,228,255,241,202,102,0,105,113,202,0,155,235,79,0,21,9,178,255,156,1,239,0,200,148,61,0,115,247,210,255,49,221,135,0,58,189,8,1,35,46,9,0,81,65,5,255,52,158,185,255,125,116,46,255,74,140,13,255,210,92,172,254,147,23,71,0,217,224,253,254,115,108,180,255,145,58,48,254,219,177,24,255,156,255,60,1,154,147,242,0,253,134,87,0,53,75,229,0,48,195,222,255,31,175,50,255,156,210,120,255,208,35,222,255,18,248,179,1,2,10,101,255,157,194,248,255,158,204,101,255,104,254,197,255,79,62,4,0,178,172,101,1,96,146,251,255,65,10,156,0,2,137,165,255,116,4,231,0,242,215,1,0,19,35,29,255,43,161,79,0,59,149,246,1,251,66,176,0,200,33,3,255,80,110,142,255,195,161,17,1,228,56,66,255,123,47,145,254,132,4,164,0,67,174,172,0,25,253,114,0,87,97,87,1,250,220,84,0,96,91,200,255,37,125,59,0,19,65,118,0,161,52,241,255,237,172,6,255,176,191,255,255,1,65,130,254,223,190,230,0,101,253,231,255,146,35,109,0,250,29,77,1,49,0,19,0,123,90,155,1,22,86,32,255,218,213,65,0,111,93,127,0,60,93,169,255,8,127,182,0,17,186,14,254,253,137,246,255,213,25,48,254,76,238,0,255,248,92,70,255,99,224,139,0,184,9,255,1,7,164,208,0,205,131,198,1,87,214,199,0,130,214,95,0,221,149,222,0,23,38,171,254,197,110,213,0,43,115,140,254,215,177,118,0,96,52,66,1,117,158,237,0,14,64,182,255,46,63,174,255,158,95,190,255,225,205,177,255,43,5,142,255,172,99,212,255,244,187,147,0,29,51,153,255,228,116,24,254,30,101,207,0,19,246,150,255,134,231,5,0,125,134,226,1,77,65,98,0,236,130,33,255,5,110,62,0,69,108,127,255,7,113,22,0,145,20,83,254,194,161,231,255,131,181,60,0,217,209,177,255,229,148,212,254,3,131,184,0,117,177,187,1,28,14,31,255,176,102,80,0,50,84,151,255,125,31,54,255,21,157,133,255,19,179,139,1,224,232,26,0,34,117,170,255,167,252,171,255,73,141,206,254,129,250,35,0,72,79,236,1,220,229,20,255,41,202,173,255,99,76,238,255,198,22,224,255,108,198,195,255,36,141,96,1,236,158,59,255,106,100,87,0,110,226,2,0,227,234,222,0,154,93,119,255,74,112,164,255,67,91,2,255,21,145,33,255,102,214,137,255,175,230,103,254,163,246,166,0,93,247,116,254,167,224,28,255,220,2,57,1,171,206,84,0,123,228,17,255,27,120,119,0,119,11,147,1,180,47,225,255,104,200,185,254,165,2,114,0,77,78,212,0,45,154,177,255,24,196,121,254,82,157,182,0,90,16,190,1,12,147,197,0,95,239,152,255,11,235,71,0,86,146,119,255,172,134,214,0,60,131,196,0,161,225,129,0,31,130,120,254,95,200,51,0,105,231,210,255,58,9,148,255,43,168,221,255,124,237,142,0,198,211,50,254,46,245,103,0,164,248,84,0,152,70,208,255,180,117,177,0,70,79,185,0,243,74,32,0,149,156,207,0,197,196,161,1,245,53,239,0,15,93,246,254,139,240,49,255,196,88,36,255,162,38,123,0,128,200,157,1,174,76,103,255,173,169,34,254,216,1,171,255,114,51,17,0,136,228,194,0,110,150,56,254,106,246,159,0,19,184,79,255,150,77,240,255,155,80,162,0,0,53,169,255,29,151,86,0,68,94,16,0,92,7,110,254,98,117,149,255,249,77,230,255,253,10,140,0,214,124,92,254,35,118,235,0,89,48,57,1,22,53,166,0,184,144,61,255,179,255,194,0,214,248,61,254,59,110,246,0,121,21,81,254,166,3,228,0,106,64,26,255,69,232,134,255,242,220,53,254,46,220,85,0,113,149,247,255,97,179,103,255,190,127,11,0,135,209,182,0,95,52,129,1,170,144,206,255,122,200,204,255,168,100,146,0,60,144,149,254,70,60,40,0,122,52,177,255,246,211,101,255,174,237,8,0,7,51,120,0,19,31,173,0,126,239,156,255,143,189,203,0,196,128,88,255,233,133,226,255,30,125,173,255,201,108,50,0,123,100,59,255,254,163,3,1,221,148,181,255,214,136,57,254,222,180,137,255,207,88,54,255,28,33,251,255,67,214,52,1,210,208,100,0,81,170,94,0,145,40,53,0,224,111,231,254,35,28,244,255,226,199,195,254,238,17,230,0,217,217,164,254,169,157,221,0,218,46,162,1,199,207,163,255,108,115,162,1,14,96,187,255,118,60,76,0,184,159,152,0,209,231,71,254,42,164,186,255,186,153,51,254,221,171,182,255,162,142,173,0,235,47,193,0,7,139,16,1,95,164,64,255,16,221,166,0,219,197,16,0,132,29,44,255,100,69,117,255,60,235,88,254,40,81,173,0,71,190,61,255,187,88,157,0,231,11,23,0,237,117,164,0,225,168,223,255,154,114,116,255,163,152,242,1,24,32,170,0,125,98,113,254,168,19,76,0,17,157,220,254,155,52,5,0,19,111,161,255,71,90,252,255,173,110,240,0,10,198,121,255,253,255,240,255,66,123,210,0,221,194,215,254,121,163,17,255,225,7,99,0,190,49,182,0,115,9,133,1,232,26,138,255,213,68,132,0,44,119,122,255,179,98,51,0,149,90,106,0,71,50,230,255,10,153,118,255,177,70,25,0,165,87,205,0,55,138,234,0,238,30,97,0,113,155,207,0,98,153,127,0,34,107,219,254,117,114,172,255,76,180,255,254,242,57,179,255,221,34,172,254,56,162,49,255,83,3,255,255,113,221,189,255,188,25,228,254,16,88,89,255,71,28,198,254,22,17,149,255,243,121,254,255,107,202,99,255,9,206,14,1,220,47,153,0,107,137,39,1,97,49,194,255,149,51,197,254,186,58,11,255,107,43,232,1,200,6,14,255,181,133,65,254,221,228,171,255,123,62,231,1,227,234,179,255,34,189,212,254,244,187,249,0,190,13,80,1,130,89,1,0,223,133,173,0,9,222,198,255,66,127,74,0,167,216,93,255,155,168,198,1,66,145,0,0,68,102,46,1,172,90,154,0,216,128,75,255,160,40,51,0,158,17,27,1,124,240,49,0,236,202,176,255,151,124,192,255,38,193,190,0,95,182,61,0,163,147,124,255,255,165,51,255,28,40,17,254,215,96,78,0,86,145,218,254,31,36,202,255,86,9,5,0,111,41,200,255,237,108,97,0,57,62,44,0,117,184,15,1,45,241,116,0,152,1,220,255,157,165,188,0,250,15,131,1,60,44,125,255,65,220,251,255,75,50,184,0,53,90,128,255,231,80,194,255,136,129,127,1,21,18,187,255,45,58,161,255,71,147,34,0,174,249,11,254,35,141,29,0,239,68,177,255,115,110,58,0,238,190,177,1,87,245,166,255,190,49,247,255,146,83,184,255,173,14,39,255,146,215,104,0,142,223,120,0,149,200,155,255,212,207,145,1,16,181,217,0,173,32,87,255,255,35,181,0,119,223,161,1,200,223,94,255,70,6,186,255,192,67,85,255,50,169,152,0,144,26,123,255,56,243,179,254,20,68,136,0,39,140,188,254,253,208,5,255,200,115,135,1,43,172,229,255,156,104,187,0,151,251,167,0,52,135,23,0,151,153,72,0,147,197,107,254,148,158,5,255,238,143,206,0,126,153,137,255,88,152,197,254,7,68,167,0,252,159,165,255,239,78,54,255,24,63,55,255,38,222,94,0,237,183,12,255,206,204,210,0,19,39,246,254,30,74,231,0,135,108,29,1,179,115,0,0,117,118,116,1,132,6,252,255,145,129,161,1,105,67,141,0,82,37,226,255,238,226,228,255,204,214,129,254,162,123,100,255,185,121,234,0,45,108,231,0,66,8,56,255,132,136,128,0,172,224,66,254,175,157,188,0,230,223,226,254,242,219,69,0,184,14,119,1,82,162,56,0,114,123,20,0,162,103,85,255,49,239,99,254,156,135,215,0,111,255,167,254,39,196,214,0,144,38,79,1,249,168,125,0,155,97,156,255,23,52,219,255,150,22,144,0,44,149,165,255,40,127,183,0,196,77,233,255,118,129,210,255,170,135,230,255,214,119,198,0,233,240,35,0,253,52,7,255,117,102,48,255,21,204,154,255,179,136,177,255,23,2,3,1,149,130,89,255,252,17,159,1,70,60,26,0,144,107,17,0,180,190,60,255,56,182,59,255,110,71,54,255,198,18,129,255,149,224,87,255,223,21,152,255,138,22,182,255,250,156,205,0,236,45,208,255,79,148,242,1,101,70,209,0,103,78,174,0,101,144,172,255,152,136,237,1,191,194,136,0,113,80,125,1,152,4,141,0,155,150,53,255,196,116,245,0,239,114,73,254,19,82,17,255,124,125,234,255,40,52,191,0,42,210,158,255,155,132,165,0,178,5,42,1,64,92,40,255,36,85,77,255,178,228,118,0,137,66,96,254,115,226,66,0,110,240,69,254,151,111,80,0,167,174,236,255,227,108,107,255,188,242,65,255,183,81,255,0,57,206,181,255,47,34,181,255,213,240,158,1,71,75,95,0,156,40,24,255,102,210,81,0,171,199,228,255,154,34,41,0,227,175,75,0,21,239,195,0,138,229,95,1,76,192,49,0,117,123,87,1,227,225,130,0,125,62,63,255,2,198,171,0,254,36,13,254,145,186,206,0,148,255,244,255,35,0,166,0,30,150,219,1,92,228,212,0,92,198,60,254,62,133,200,255,201,41,59,0,125,238,109,255,180,163,238,1,140,122,82,0,9,22,88,255,197,157,47,255,153,94,57,0,88,30,182,0,84,161,85,0,178,146,124,0,166,166,7,255,21,208,223,0,156,182,242,0,155,121,185,0,83,156,174,254,154,16,118,255,186,83,232,1,223,58,121,255,29,23,88,0,35,125,127,255,170,5,149,254,164,12,130,255,155,196,29,0,161,96,136,0,7,35,29,1,162,37,251,0,3,46,242,255,0,217,188,0,57,174,226,1,206,233,2,0,57,187,136,254,123,189,9,255,201,117,127,255,186,36,204,0,231,25,216,0,80,78,105,0,19,134,129,255,148,203,68,0,141,81,125,254,248,165,200,255,214,144,135,0,151,55,166,255,38,235,91,0,21,46,154,0,223,254,150,255,35,153,180,255,125,176,29,1,43,98,30,255,216,122,230,255,233,160,12,0,57,185,12,254,240,113,7,255,5,9,16,254,26,91,108,0,109,198,203,0,8,147,40,0,129,134,228,255,124,186,40,255,114,98,132,254,166,132,23,0,99,69,44,0,9,242,238,255,184,53,59,0,132,129,102,255,52,32,243,254,147,223,200,255,123,83,179,254,135,144,201,255,141,37,56,1,151,60,227,255,90,73,156,1,203,172,187,0,80,151,47,255,94,137,231,255,36,191,59,255,225,209,181,255,74,215,213,254,6,118,179,255,153,54,193,1,50,0,231,0,104,157,72,1,140,227,154,255,182,226,16,254,96,225,92,255,115,20,170,254,6,250,78,0,248,75,173,255,53,89,6,255,0,180,118,0,72,173,1,0,64,8,206,1,174,133,223,0,185,62,133,255,214,11,98,0,197,31,208,0,171,167,244,255,22,231,181,1,150,218,185,0,247,169,97,1,165,139,247,255,47,120,149,1,103,248,51,0,60,69,28,254,25,179,196,0,124,7,218,254,58,107,81,0,184,233,156,255,252,74,36,0,118,188,67,0,141,95,53,255,222,94,165,254,46,61,53,0,206,59,115,255,47,236,250,255,74,5,32,1,129,154,238,255,106,32,226,0,121,187,61,255,3,166,241,254,67,170,172,255,29,216,178,255,23,201,252,0,253,110,243,0,200,125,57,0,109,192,96,255,52,115,238,0,38,121,243,255,201,56,33,0,194,118,130,0,75,96,25,255,170,30,230,254,39,63,253,0,36,45,250,255,251,1,239,0,160,212,92,1,45,209,237,0,243,33,87,254,237,84,201,255,212,18,157,254,212,99,127,255,217,98,16,254,139,172,239,0,168,201,130,255,143,193,169,255,238,151,193,1,215,104,41,0,239,61,165,254,2,3,242,0,22,203,177,254,177,204,22,0,149,129,213,254,31,11,41,255,0,159,121,254,160,25,114,255,162,80,200,0,157,151,11,0,154,134,78,1,216,54,252,0,48,103,133,0,105,220,197,0,253,168,77,254,53,179,23,0,24,121,240,1,255,46,96,255,107,60,135,254,98,205,249,255,63,249,119,255,120,59,211,255,114,180,55,254,91,85,237,0,149,212,77,1,56,73,49,0,86,198,150,0,93,209,160,0,69,205,182,255,244,90,43,0,20,36,176,0,122,116,221,0,51,167,39,1,231,1,63,255,13,197,134,0,3,209,34,255,135,59,202,0,167,100,78,0,47,223,76,0,185,60,62,0,178,166,123,1,132,12,161,255,61,174,43,0,195,69,144,0,127,47,191,1,34,44,78,0,57,234,52,1,255,22,40,255,246,94,146,0,83,228,128,0,60,78,224,255,0,96,210,255,153,175,236,0,159,21,73,0,180,115,196,254,131,225,106,0,255,167,134,0,159,8,112,255,120,68,194,255,176,196,198,255,118,48,168,255,93,169,1,0,112,200,102,1,74,24,254,0,19,141,4,254,142,62,63,0,131,179,187,255,77,156,155,255,119,86,164,0,170,208,146,255,208,133,154,255,148,155,58,255,162,120,232,254,252,213,155,0,241,13,42,0,94,50,131,0,179,170,112,0,140,83,151,255,55,119,84,1,140,35,239,255,153,45,67,1,236,175,39,0,54,151,103,255,158,42,65,255,196,239,135,254,86,53,203,0,149,97,47,254,216,35,17,255,70,3,70,1,103,36,90,255,40,26,173,0,184,48,13,0,163,219,217,255,81,6,1,255,221,170,108,254,233,208,93,0,100,201,249,254,86,36,35,255,209,154,30,1,227,201,251,255,2,189,167,254,100,57,3,0,13,128,41,0,197,100,75,0,150,204,235,255,145,174,59,0,120,248,149,255,85,55,225,0,114,210,53,254,199,204,119,0,14,247,74,1,63,251,129,0,67,104,151,1,135,130,80,0,79,89,55,255,117,230,157,255,25,96,143,0,213,145,5,0,69,241,120,1,149,243,95,255,114,42,20,0,131,72,2,0,154,53,20,255,73,62,109,0,196,102,152,0,41,12,204,255,122,38,11,1,250,10,145,0,207,125,148,0,246,244,222,255,41,32,85,1,112,213,126,0,162,249,86,1,71,198,127,255,81,9,21,1,98,39,4,255,204,71,45,1,75,111,137,0,234,59,231,0,32,48,95,255,204,31,114,1,29,196,181,255,51,241,167,254,93,109,142,0,104,144,45,0,235,12,181,255,52,112,164,0,76,254,202,255,174,14,162,0,61,235,147,255,43,64,185,254,233,125,217,0,243,88,167,254,74,49,8,0,156,204,66,0,124,214,123,0,38,221,118,1,146,112,236,0,114,98,177,0,151,89,199,0,87,197,112,0,185,149,161,0,44,96,165,0,248,179,20,255,188,219,216,254,40,62,13,0,243,142,141,0,229,227,206,255,172,202,35,255,117,176,225,255,82,110,38,1,42,245,14,255,20,83,97,0,49,171,10,0,242,119,120,0,25,232,61,0,212,240,147,255,4,115,56,255,145,17,239,254,202,17,251,255,249,18,245,255,99,117,239,0,184,4,179,255,246,237,51,255,37,239,137,255,166,112,166,255,81,188,33,255,185,250,142,255,54,187,173,0,208,112,201,0,246,43,228,1,104,184,88,255,212,52,196,255,51,117,108,255,254,117,155,0,46,91,15,255,87,14,144,255,87,227,204,0,83,26,83,1,159,76,227,0,159,27,213,1,24,151,108,0,117,144,179,254,137,209,82,0,38,159,10,0,115,133,201,0,223,182,156,1,110,196,93,255,57,60,233,0,5,167,105,255,154,197,164,0,96,34,186,255,147,133,37,1,220,99,190,0,1,167,84,255,20,145,171,0,194,197,251,254,95,78,133,255,252,248,243,255,225,93,131,255,187,134,196,255,216,153,170,0,20,118,158,254,140,1,118,0,86,158,15,1,45,211,41,255,147,1,100,254,113,116,76,255,211,127,108,1,103,15,48,0,193,16,102,1,69,51,95,255,107,128,157,0,137,171,233,0,90,124,144,1,106,161,182,0,175,76,236,1,200,141,172,255,163,58,104,0,233,180,52,255,240,253,14,255,162,113,254,255,38,239,138,254,52,46,166,0,241,101,33,254,131,186,156,0,111,208,62,255,124,94,160,255,31,172,254,0,112,174,56,255,188,99,27,255,67,138,251,0,125,58,128,1,156,152,174,255,178,12,247,255,252,84,158,0,82,197,14,254,172,200,83,255,37,39,46,1,106,207,167,0,24,189,34,0,131,178,144,0,206,213,4,0,161,226,210,0,72,51,105,255,97,45,187,255,78,184,223,255,176,29,251,0,79,160,86,255,116,37,178,0,82,77,213,1,82,84,141,255,226,101,212,1,175,88,199,255,245,94,247,1,172,118,109,255,166,185,190,0,131,181,120,0,87,254,93,255,134,240,73,255,32,245,143,255,139,162,103,255,179,98,18,254,217,204,112,0,147,223,120,255,53,10,243,0,166,140,150,0,125,80,200,255,14,109,219,255,91,218,1,255,252,252,47,254,109,156,116,255,115,49,127,1,204,87,211,255,148,202,217,255,26,85,249,255,14,245,134,1,76,89,169,255,242,45,230,0,59,98,172,255,114,73,132,254,78,155,49,255,158,126,84,0,49,175,43,255,16,182,84,255,157,103,35,0,104,193,109,255,67,221,154,0,201,172,1,254,8,162,88,0,165,1,29,255,125,155,229,255,30,154,220,1,103,239,92,0,220,1,109,255,202,198,1,0,94,2,142,1,36,54,44,0,235,226,158,255,170,251,214,255,185,77,9,0,97,74,242,0,219,163,149,255,240,35,118,255,223,114,88,254,192,199,3,0,106,37,24,255,201,161,118,255,97,89,99,1,224,58,103,255,101,199,147,254,222,60,99,0,234,25,59,1,52,135,27,0,102,3,91,254,168,216,235,0,229,232,136,0,104,60,129,0,46,168,238,0,39,191,67,0,75,163,47,0,143,97,98,255,56,216,168,1,168,233,252,255,35,111,22,255,92,84,43,0,26,200,87,1,91,253,152,0,202,56,70,0,142,8,77,0,80,10,175,1,252,199,76,0,22,110,82,255,129,1,194,0,11,128,61,1,87,14,145,255,253,222,190,1,15,72,174,0,85,163,86,254,58,99,44,255,45,24,188,254,26,205,15,0,19,229,210,254,248,67,195,0,99,71,184,0,154,199,37,255,151,243,121,255,38,51,75,255,201,85,130,254,44,65,250,0,57,147,243,254,146,43,59,255,89,28,53,0,33,84,24,255,179,51,18,254,189,70,83,0,11,156,179,1,98,134,119,0,158,111,111,0,119,154,73,255,200,63,140,254,45,13,13,255,154,192,2,254,81,72,42,0,46,160,185,254,44,112,6,0,146,215,149,1,26,176,104,0,68,28,87,1,236,50,153,255,179,128,250,254,206,193,191,255,166,92,137,254,53,40,239,0,210,1,204,254,168,173,35,0,141,243,45,1,36,50,109,255,15,242,194,255,227,159,122,255,176,175,202,254,70,57,72,0,40,223,56,0,208,162,58,255,183,98,93,0,15,111,12,0,30,8,76,255,132,127,246,255,45,242,103,0,69,181,15,255,10,209,30,0,3,179,121,0,241,232,218,1,123,199,88,255,2,210,202,1,188,130,81,255,94,101,208,1,103,36,45,0,76,193,24,1,95,26,241,255,165,162,187,0,36,114,140,0,202,66,5,255,37,56,147,0,152,11,243,1,127,85,232,255,250,135,212,1,185,177,113,0,90,220,75,255,69,248,146,0,50,111,50,0,92,22,80,0,244,36,115,254,163,100,82,255,25,193,6,1,127,61,36,0,253,67,30,254,65,236,170,255,161,17,215,254,63,175,140,0,55,127,4,0,79,112,233,0,109,160,40,0,143,83,7,255,65,26,238,255,217,169,140,255,78,94,189,255,0,147,190,255,147,71,186,254,106,77,127,255,233,157,233,1,135,87,237,255,208,13,236,1,155,109,36,255,180,100,218,0,180,163,18,0,190,110,9,1,17,63,123,255,179,136,180,255,165,123,123,255,144,188,81,254,71,240,108,255,25,112,11,255,227,218,51,255,167,50,234,255,114,79,108,255,31,19,115,255,183,240,99,0,227,87,143,255,72,217,248,255,102,169,95,1,129,149,149,0,238,133,12,1,227,204,35,0,208,115,26,1,102,8,234,0,112,88,143,1,144,249,14,0,240,158,172,254,100,112,119,0,194,141,153,254,40,56,83,255,121,176,46,0,42,53,76,255,158,191,154,0,91,209,92,0,173,13,16,1,5,72,226,255,204,254,149,0,80,184,207,0,100,9,122,254,118,101,171,255,252,203,0,254,160,207,54,0,56,72,249,1,56,140,13,255,10,64,107,254,91,101,52,255,225,181,248,1,139,255,132,0,230,145,17,0,233,56,23,0,119,1,241,255,213,169,151,255,99,99,9,254,185,15,191,255,173,103,109,1,174,13,251,255,178,88,7,254,27,59,68,255,10,33,2,255,248,97,59,0,26,30,146,1,176,147,10,0,95,121,207,1,188,88,24,0,185,94,254,254,115,55,201,0,24,50,70,0,120,53,6,0,142,66,146,0,228,226,249,255,104,192,222,1,173,68,219,0,162,184,36,255,143,102,137,255,157,11,23,0,125,45,98,0,235,93,225,254,56,112,160,255,70,116,243,1,153,249,55,255,129,39,17,1,241,80,244,0,87,69,21,1,94,228,73,255,78,66,65,255,194,227,231,0,61,146,87,255,173,155,23,255,112,116,219,254,216,38,11,255,131,186,133,0,94,212,187,0,100,47,91,0,204,254,175,255,222,18,215,254,173,68,108,255,227,228,79,255,38,221,213,0,163,227,150,254,31,190,18,0,160,179,11,1,10,90,94,255,220,174,88,0,163,211,229,255,199,136,52,0,130,95,221,255,140,188,231,254,139,113,128,255,117,171,236,254,49,220,20,255,59,20,171,255,228,109,188,0,20,225,32,254,195,16,174,0,227,254,136,1,135,39,105,0,150,77,206,255,210,238,226,0,55,212,132,254,239,57,124,0,170,194,93,255,249,16,247,255,24,151,62,255,10,151,10,0,79,139,178,255,120,242,202,0,26,219,213,0,62,125,35,255,144,2,108,255,230,33,83,255,81,45,216,1,224,62,17,0,214,217,125,0,98,153,153,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); -/* memory initializer */ allocate([179,176,106,254,131,93,138,255,109,62,36,255,178,121,32,255,120,252,70,0,220,248,37,0,204,88,103,1,128,220,251,255,236,227,7,1,106,49,198,255,60,56,107,0,99,114,238,0,220,204,94,1,73,187,1,0,89,154,34,0,78,217,165,255,14,195,249,255,9,230,253,255,205,135,245,0,26,252,7,255,84,205,27,1,134,2,112,0,37,158,32,0,231,91,237,255,191,170,204,255,152,7,222,0,109,192,49,0,193,166,146,255,232,19,181,255,105,142,52,255,103,16,27,1,253,200,165,0,195,217,4,255,52,189,144,255,123,155,160,254,87,130,54,255,78,120,61,255,14,56,41,0,25,41,125,255,87,168,245,0,214,165,70,0,212,169,6,255,219,211,194,254,72,93,164,255,197,33,103,255,43,142,141,0,131,225,172,0,244,105,28,0,68,68,225,0,136,84,13,255,130,57,40,254,139,77,56,0,84,150,53,0,54,95,157,0,144,13,177,254,95,115,186,0,117,23,118,255,244,166,241,255,11,186,135,0,178,106,203,255,97,218,93,0,43,253,45,0,164,152,4,0,139,118,239,0,96,1,24,254,235,153,211,255,168,110,20,255,50,239,176,0,114,41,232,0,193,250,53,0,254,160,111,254,136,122,41,255,97,108,67,0,215,152,23,255,140,209,212,0,42,189,163,0,202,42,50,255,106,106,189,255,190,68,217,255,233,58,117,0,229,220,243,1,197,3,4,0,37,120,54,254,4,156,134,255,36,61,171,254,165,136,100,255,212,232,14,0,90,174,10,0,216,198,65,255,12,3,64,0,116,113,115,255,248,103,8,0,231,125,18,255,160,28,197,0,30,184,35,1,223,73,249,255,123,20,46,254,135,56,37,255,173,13,229,1,119,161,34,255,245,61,73,0,205,125,112,0,137,104,134,0,217,246,30,255,237,142,143,0,65,159,102,255,108,164,190,0,219,117,173,255,34,37,120,254,200,69,80,0,31,124,218,254,74,27,160,255,186,154,199,255,71,199,252,0,104,81,159,1,17,200,39,0,211,61,192,1,26,238,91,0,148,217,12,0,59,91,213,255,11,81,183,255,129,230,122,255,114,203,145,1,119,180,66,255,72,138,180,0,224,149,106,0,119,82,104,255,208,140,43,0,98,9,182,255,205,101,134,255,18,101,38,0,95,197,166,255,203,241,147,0,62,208,145,255,133,246,251,0,2,169,14,0,13,247,184,0,142,7,254,0,36,200,23,255,88,205,223,0,91,129,52,255,21,186,30,0,143,228,210,1,247,234,248,255,230,69,31,254,176,186,135,255,238,205,52,1,139,79,43,0,17,176,217,254,32,243,67,0,242,111,233,0,44,35,9,255,227,114,81,1,4,71,12,255,38,105,191,0,7,117,50,255,81,79,16,0,63,68,65,255,157,36,110,255,77,241,3,255,226,45,251,1,142,25,206,0,120,123,209,1,28,254,238,255,5,128,126,255,91,222,215,255,162,15,191,0,86,240,73,0,135,185,81,254,44,241,163,0,212,219,210,255,112,162,155,0,207,101,118,0,168,72,56,255,196,5,52,0,72,172,242,255,126,22,157,255,146,96,59,255,162,121,152,254,140,16,95,0,195,254,200,254,82,150,162,0,119,43,145,254,204,172,78,255,166,224,159,0,104,19,237,255,245,126,208,255,226,59,213,0,117,217,197,0,152,72,237,0,220,31,23,254,14,90,231,255,188,212,64,1,60,101,246,255,85,24,86,0,1,177,109,0,146,83,32,1,75,182,192,0,119,241,224,0,185,237,27,255,184,101,82,1,235,37,77,255,253,134,19,0,232,246,122,0,60,106,179,0,195,11,12,0,109,66,235,1,125,113,59,0,61,40,164,0,175,104,240,0,2,47,187,255,50,12,141,0,194,139,181,255,135,250,104,0,97,92,222,255,217,149,201,255,203,241,118,255,79,151,67,0,122,142,218,255,149,245,239,0,138,42,200,254,80,37,97,255,124,112,167,255,36,138,87,255,130,29,147,255,241,87,78,255,204,97,19,1,177,209,22,255,247,227,127,254,99,119,83,255,212,25,198,1,16,179,179,0,145,77,172,254,89,153,14,255,218,189,167,0,107,233,59,255,35,33,243,254,44,112,112,255,161,127,79,1,204,175,10,0,40,21,138,254,104,116,228,0,199,95,137,255,133,190,168,255,146,165,234,1,183,99,39,0,183,220,54,254,255,222,133,0,162,219,121,254,63,239,6,0,225,102,54,255,251,18,246,0,4,34,129,1,135,36,131,0,206,50,59,1,15,97,183,0,171,216,135,255,101,152,43,255,150,251,91,0,38,145,95,0,34,204,38,254,178,140,83,255,25,129,243,255,76,144,37,0,106,36,26,254,118,144,172,255,68,186,229,255,107,161,213,255,46,163,68,255,149,170,253,0,187,17,15,0,218,160,165,255,171,35,246,1,96,13,19,0,165,203,117,0,214,107,192,255,244,123,177,1,100,3,104,0,178,242,97,255,251,76,130,255,211,77,42,1,250,79,70,255,63,244,80,1,105,101,246,0,61,136,58,1,238,91,213,0,14,59,98,255,167,84,77,0,17,132,46,254,57,175,197,255,185,62,184,0,76,64,207,0,172,175,208,254,175,74,37,0,138,27,211,254,148,125,194,0,10,89,81,0,168,203,101,255,43,213,209,1,235,245,54,0,30,35,226,255,9,126,70,0,226,125,94,254,156,117,20,255,57,248,112,1,230,48,64,255,164,92,166,1,224,214,230,255,36,120,143,0,55,8,43,255,251,1,245,1,106,98,165,0,74,107,106,254,53,4,54,255,90,178,150,1,3,120,123,255,244,5,89,1,114,250,61,255,254,153,82,1,77,15,17,0,57,238,90,1,95,223,230,0,236,52,47,254,103,148,164,255,121,207,36,1,18,16,185,255,75,20,74,0,187,11,101,0,46,48,129,255,22,239,210,255,77,236,129,255,111,77,204,255,61,72,97,255,199,217,251,255,42,215,204,0,133,145,201,255,57,230,146,1,235,100,198,0,146,73,35,254,108,198,20,255,182,79,210,255,82,103,136,0,246,108,176,0,34,17,60,255,19,74,114,254,168,170,78,255,157,239,20,255,149,41,168,0,58,121,28,0,79,179,134,255,231,121,135,255,174,209,98,255,243,122,190,0,171,166,205,0,212,116,48,0,29,108,66,255,162,222,182,1,14,119,21,0,213,39,249,255,254,223,228,255,183,165,198,0,133,190,48,0,124,208,109,255,119,175,85,255,9,209,121,1,48,171,189,255,195,71,134,1,136,219,51,255,182,91,141,254,49,159,72,0,35,118,245,255,112,186,227,255,59,137,31,0,137,44,163,0,114,103,60,254,8,213,150,0,162,10,113,255,194,104,72,0,220,131,116,255,178,79,92,0,203,250,213,254,93,193,189,255,130,255,34,254,212,188,151,0,136,17,20,255,20,101,83,255,212,206,166,0,229,238,73,255,151,74,3,255,168,87,215,0,155,188,133,255,166,129,73,0,240,79,133,255,178,211,81,255,203,72,163,254,193,168,165,0,14,164,199,254,30,255,204,0,65,72,91,1,166,74,102,255,200,42,0,255,194,113,227,255,66,23,208,0,229,216,100,255,24,239,26,0,10,233,62,255,123,10,178,1,26,36,174,255,119,219,199,1,45,163,190,0,16,168,42,0,166,57,198,255,28,26,26,0,126,165,231,0,251,108,100,255,61,229,121,255,58,118,138,0,76,207,17,0,13,34,112,254,89,16,168,0,37,208,105,255,35,201,215,255,40,106,101,254,6,239,114,0,40,103,226,254,246,127,110,255,63,167,58,0,132,240,142,0,5,158,88,255,129,73,158,255,94,89,146,0,230,54,146,0,8,45,173,0,79,169,1,0,115,186,247,0,84,64,131,0,67,224,253,255,207,189,64,0,154,28,81,1,45,184,54,255,87,212,224,255,0,96,73,255,129,33,235,1,52,66,80,255,251,174,155,255,4,179,37,0,234,164,93,254,93,175,253,0,198,69,87,255,224,106,46,0,99,29,210,0,62,188,114,255,44,234,8,0,169,175,247,255,23,109,137,255,229,182,39,0,192,165,94,254,245,101,217,0,191,88,96,0,196,94,99,255,106,238,11,254,53,126,243,0,94,1,101,255,46,147,2,0,201,124,124,255,141,12,218,0,13,166,157,1,48,251,237,255,155,250,124,255,106,148,146,255,182,13,202,0,28,61,167,0,217,152,8,254,220,130,45,255,200,230,255,1,55,65,87,255,93,191,97,254,114,251,14,0,32,105,92,1,26,207,141,0,24,207,13,254,21,50,48,255,186,148,116,255,211,43,225,0,37,34,162,254,164,210,42,255,68,23,96,255,182,214,8,255,245,117,137,255,66,195,50,0,75,12,83,254,80,140,164,0,9,165,36,1,228,110,227,0,241,17,90,1,25,52,212,0,6,223,12,255,139,243,57,0,12,113,75,1,246,183,191,255,213,191,69,255,230,15,142,0,1,195,196,255,138,171,47,255,64,63,106,1,16,169,214,255,207,174,56,1,88,73,133,255,182,133,140,0,177,14,25,255,147,184,53,255,10,227,161,255,120,216,244,255,73,77,233,0,157,238,139,1,59,65,233,0,70,251,216,1,41,184,153,255,32,203,112,0,146,147,253,0,87,101,109,1,44,82,133,255,244,150,53,255,94,152,232,255,59,93,39,255,88,147,220,255,78,81,13,1,32,47,252,255,160,19,114,255,93,107,39,255,118,16,211,1,185,119,209,255,227,219,127,254,88,105,236,255,162,110,23,255,36,166,110,255,91,236,221,255,66,234,116,0,111,19,244,254,10,233,26,0,32,183,6,254,2,191,242,0,218,156,53,254,41,60,70,255,168,236,111,0,121,185,126,255,238,142,207,255,55,126,52,0,220,129,208,254,80,204,164,255,67,23,144,254,218,40,108,255,127,202,164,0,203,33,3,255,2,158,0,0,37,96,188,255,192,49,74,0,109,4,0,0,111,167,10,254,91,218,135,255,203,66,173,255,150,194,226,0,201,253,6,255,174,102,121,0,205,191,110,0,53,194,4,0,81,40,45,254,35,102,143,255,12,108,198,255,16,27,232,255,252,71,186,1,176,110,114,0,142,3,117,1,113,77,142,0,19,156,197,1,92,47,252,0,53,232,22,1,54,18,235,0,46,35,189,255,236,212,129,0,2,96,208,254,200,238,199,255,59,175,164,255,146,43,231,0,194,217,52,255,3,223,12,0,138,54,178,254,85,235,207,0,232,207,34,0,49,52,50,255,166,113,89,255,10,45,216,255,62,173,28,0,111,165,246,0,118,115,91,255,128,84,60,0,167,144,203,0,87,13,243,0,22,30,228,1,177,113,146,255,129,170,230,254,252,153,129,255,145,225,43,0,70,231,5,255,122,105,126,254,86,246,148,255,110,37,154,254,209,3,91,0,68,145,62,0,228,16,165,255,55,221,249,254,178,210,91,0,83,146,226,254,69,146,186,0,93,210,104,254,16,25,173,0,231,186,38,0,189,122,140,255,251,13,112,255,105,110,93,0,251,72,170,0,192,23,223,255,24,3,202,1,225,93,228,0,153,147,199,254,109,170,22,0,248,101,246,255,178,124,12,255,178,254,102,254,55,4,65,0,125,214,180,0,183,96,147,0,45,117,23,254,132,191,249,0,143,176,203,254,136,183,54,255,146,234,177,0,146,101,86,255,44,123,143,1,33,209,152,0,192,90,41,254,83,15,125,255,213,172,82,0,215,169,144,0,16,13,34,0,32,209,100,255,84,18,249,1,197,17,236,255,217,186,230,0,49,160,176,255,111,118,97,255,237,104,235,0,79,59,92,254,69,249,11,255,35,172,74,1,19,118,68,0,222,124,165,255,180,66,35,255,86,174,246,0,43,74,111,255,126,144,86,255,228,234,91,0,242,213,24,254,69,44,235,255,220,180,35,0,8,248,7,255,102,47,92,255,240,205,102,255,113,230,171,1,31,185,201,255,194,246,70,255,122,17,187,0,134,70,199,255,149,3,150,255,117,63,103,0,65,104,123,255,212,54,19,1,6,141,88,0,83,134,243,255,136,53,103,0,169,27,180,0,177,49,24,0,111,54,167,0,195,61,215,255,31,1,108,1,60,42,70,0,185,3,162,255,194,149,40,255,246,127,38,254,190,119,38,255,61,119,8,1,96,161,219,255,42,203,221,1,177,242,164,255,245,159,10,0,116,196,0,0,5,93,205,254,128,127,179,0,125,237,246,255,149,162,217,255,87,37,20,254,140,238,192,0,9,9,193,0,97,1,226,0,29,38,10,0,0,136,63,255,229,72,210,254,38,134,92,255,78,218,208,1,104,36,84,255,12,5,193,255,242,175,61,255,191,169,46,1,179,147,147,255,113,190,139,254,125,172,31,0,3,75,252,254,215,36,15,0,193,27,24,1,255,69,149,255,110,129,118,0,203,93,249,0,138,137,64,254,38,70,6,0,153,116,222,0,161,74,123,0,193,99,79,255,118,59,94,255,61,12,43,1,146,177,157,0,46,147,191,0,16,255,38,0,11,51,31,1,60,58,98,255,111,194,77,1,154,91,244,0,140,40,144,1,173,10,251,0,203,209,50,254,108,130,78,0,228,180,90,0,174,7,250,0,31,174,60,0,41,171,30,0,116,99,82,255,118,193,139,255,187,173,198,254,218,111,56,0,185,123,216,0,249,158,52,0,52,180,93,255,201,9,91,255,56,45,166,254,132,155,203,255,58,232,110,0,52,211,89,255,253,0,162,1,9,87,183,0,145,136,44,1,94,122,245,0,85,188,171,1,147,92,198,0,0,8,104,0,30,95,174,0,221,230,52,1,247,247,235,255,137,174,53,255,35,21,204,255,71,227,214,1,232,82,194,0,11,48,227,255,170,73,184,255,198,251,252,254,44,112,34,0,131,101,131,255,72,168,187,0,132,135,125,255,138,104,97,255,238,184,168,255,243,104,84,255,135,216,226,255,139,144,237,0,188,137,150,1,80,56,140,255,86,169,167,255,194,78,25,255,220,17,180,255,17,13,193,0,117,137,212,255,141,224,151,0,49,244,175,0,193,99,175,255,19,99,154,1,255,65,62,255,156,210,55,255,242,244,3,255,250,14,149,0,158,88,217,255,157,207,134,254,251,232,28,0,46,156,251,255,171,56,184,255,239,51,234,0,142,138,131,255,25,254,243,1,10,201,194,0,63,97,75,0,210,239,162,0,192,200,31,1,117,214,243,0,24,71,222,254,54,40,232,255,76,183,111,254,144,14,87,255,214,79,136,255,216,196,212,0,132,27,140,254,131,5,253,0,124,108,19,255,28,215,75,0,76,222,55,254,233,182,63,0,68,171,191,254,52,111,222,255,10,105,77,255,80,170,235,0,143,24,88,255,45,231,121,0,148,129,224,1,61,246,84,0,253,46,219,255,239,76,33,0,49,148,18,254,230,37,69,0,67,134,22,254,142,155,94,0,31,157,211,254,213,42,30,255,4,228,247,254,252,176,13,255,39,0,31,254,241,244,255,255,170,45,10,254,253,222,249,0,222,114,132,0,255,47,6,255,180,163,179,1,84,94,151,255,89,209,82,254,229,52,169,255,213,236,0,1,214,56,228,255,135,119,151,255,112,201,193,0,83,160,53,254,6,151,66,0,18,162,17,0,233,97,91,0,131,5,78,1,181,120,53,255,117,95,63,255,237,117,185,0,191,126,136,255,144,119,233,0,183,57,97,1,47,201,187,255,167,165,119,1,45,100,126,0,21,98,6,254,145,150,95,255,120,54,152,0,209,98,104,0,143,111,30,254,184,148,249,0,235,216,46,0,248,202,148,255,57,95,22,0,242,225,163,0,233,247,232,255,71,171,19,255,103,244,49,255,84,103,93,255,68,121,244,1,82,224,13,0,41,79,43,255,249,206,167,255,215,52,21,254,192,32,22,255,247,111,60,0,101,74,38,255,22,91,84,254,29,28,13,255,198,231,215,254,244,154,200,0,223,137,237,0,211,132,14,0,95,64,206,255,17,62,247,255,233,131,121,1,93,23,77,0,205,204,52,254,81,189,136,0,180,219,138,1,143,18,94,0,204,43,140,254,188,175,219,0,111,98,143,255,151,63,162,255,211,50,71,254,19,146,53,0,146,45,83,254,178,82,238,255,16,133,84,255,226,198,93,255,201,97,20,255,120,118,35,255,114,50,231,255,162,229,156,255,211,26,12,0,114,39,115,255,206,212,134,0,197,217,160,255,116,129,94,254,199,215,219,255,75,223,249,1,253,116,181,255,232,215,104,255,228,130,246,255,185,117,86,0,14,5,8,0,239,29,61,1,237,87,133,255,125,146,137,254,204,168,223,0,46,168,245,0,154,105,22,0,220,212,161,255,107,69,24,255,137,218,181,255,241,84,198,255,130,122,211,255,141,8,153,255,190,177,118,0,96,89,178,0,255,16,48,254,122,96,105,255,117,54,232,255,34,126,105,255,204,67,166,0,232,52,138,255,211,147,12,0,25,54,7,0,44,15,215,254,51,236,45,0,190,68,129,1,106,147,225,0,28,93,45,254,236,141,15,255,17,61,161,0,220,115,192,0,236,145,24,254,111,168,169,0,224,58,63,255,127,164,188,0,82,234,75,1,224,158,134,0,209,68,110,1,217,166,217,0,70,225,166,1,187,193,143,255,16,7,88,255,10,205,140,0,117,192,156,1,17,56,38,0,27,124,108,1,171,215,55,255,95,253,212,0,155,135,168,255,246,178,153,254,154,68,74,0,232,61,96,254,105,132,59,0,33,76,199,1,189,176,130,255,9,104,25,254,75,198,102,255,233,1,112,0,108,220,20,255,114,230,70,0,140,194,133,255,57,158,164,254,146,6,80,255,169,196,97,1,85,183,130,0,70,158,222,1,59,237,234,255,96,25,26,255,232,175,97,255,11,121,248,254,88,35,194,0,219,180,252,254,74,8,227,0,195,227,73,1,184,110,161,255,49,233,164,1,128,53,47,0,82,14,121,255,193,190,58,0,48,174,117,255,132,23,32,0,40,10,134,1,22,51,25,255,240,11,176,255,110,57,146,0,117,143,239,1,157,101,118,255,54,84,76,0,205,184,18,255,47,4,72,255,78,112,85,255,193,50,66,1,93,16,52,255,8,105,134,0,12,109,72,255,58,156,251,0,144,35,204,0,44,160,117,254,50,107,194,0,1,68,165,255,111,110,162,0,158,83,40,254,76,214,234,0,58,216,205,255,171,96,147,255,40,227,114,1,176,227,241,0,70,249,183,1,136,84,139,255,60,122,247,254,143,9,117,255,177,174,137,254,73,247,143,0,236,185,126,255,62,25,247,255,45,64,56,255,161,244,6,0,34,57,56,1,105,202,83,0,128,147,208,0,6,103,10,255,74,138,65,255,97,80,100,255,214,174,33,255,50,134,74,255,110,151,130,254,111,84,172,0,84,199,75,254,248,59,112,255,8,216,178,1,9,183,95,0,238,27,8,254,170,205,220,0,195,229,135,0,98,76,237,255,226,91,26,1,82,219,39,255,225,190,199,1,217,200,121,255,81,179,8,255,140,65,206,0,178,207,87,254,250,252,46,255,104,89,110,1,253,189,158,255,144,214,158,255,160,245,54,255,53,183,92,1,21,200,194,255,146,33,113,1,209,1,255,0,235,106,43,255,167,52,232,0,157,229,221,0,51,30,25,0,250,221,27,1,65,147,87,255,79,123,196,0,65,196,223,255,76,44,17,1,85,241,68,0,202,183,249,255,65,212,212,255,9,33,154,1,71,59,80,0,175,194,59,255,141,72,9,0,100,160,244,0,230,208,56,0,59,25,75,254,80,194,194,0,18,3,200,254,160,159,115,0,132,143,247,1,111,93,57,255,58,237,11,1,134,222,135,255,122,163,108,1,123,43,190,255,251,189,206,254,80,182,72,255,208,246,224,1,17,60,9,0,161,207,38,0,141,109,91,0,216,15,211,255,136,78,110,0,98,163,104,255,21,80,121,255,173,178,183,1,127,143,4,0,104,60,82,254,214,16,13,255,96,238,33,1,158,148,230,255,127,129,62,255,51,255,210,255,62,141,236,254,157,55,224,255,114,39,244,0,192,188,250,255,228,76,53,0,98,84,81,255,173,203,61,254,147,50,55,255,204,235,191,0,52,197,244,0,88,43,211,254,27,191,119,0,188,231,154,0,66,81,161,0,92,193,160,1,250,227,120,0,123,55,226,0,184,17,72,0,133,168,10,254,22,135,156,255,41,25,103,255,48,202,58,0,186,149,81,255,188,134,239,0,235,181,189,254,217,139,188,255,74,48,82,0,46,218,229,0,189,253,251,0,50,229,12,255,211,141,191,1,128,244,25,255,169,231,122,254,86,47,189,255,132,183,23,255,37,178,150,255,51,137,253,0,200,78,31,0,22,105,50,0,130,60,0,0,132,163,91,254,23,231,187,0,192,79,239,0,157,102,164,255,192,82,20,1,24,181,103,255,240,9,234,0,1,123,164,255,133,233,0,255,202,242,242,0,60,186,245,0,241,16,199,255,224,116,158,254,191,125,91,255,224,86,207,0,121,37,231,255,227,9,198,255,15,153,239,255,121,232,217,254,75,112,82,0,95,12,57,254,51,214,105,255,148,220,97,1,199,98,36,0,156,209,12,254,10,212,52,0,217,180,55,254,212,170,232,255,216,20,84,255,157,250,135,0,157,99,127,254,1,206,41,0,149,36,70,1,54,196,201,255,87,116,0,254,235,171,150,0,27,163,234,0,202,135,180,0,208,95,0,254,123,156,93,0,183,62,75,0,137,235,182,0,204,225,255,255,214,139,210,255,2,115,8,255,29,12,111,0,52,156,1,0,253,21,251,255,37,165,31,254,12,130,211,0,106,18,53,254,42,99,154,0,14,217,61,254,216,11,92,255,200,197,112,254,147,38,199,0,36,252,120,254,107,169,77,0,1,123,159,255,207,75,102,0,163,175,196,0,44,1,240,0,120,186,176,254,13,98,76,255,237,124,241,255,232,146,188,255,200,96,224,0,204,31,41,0,208,200,13,0,21,225,96,255,175,156,196,0,247,208,126,0,62,184,244,254,2,171,81,0,85,115,158,0,54,64,45,255,19,138,114,0,135,71,205,0,227,47,147,1,218,231,66,0,253,209,28,0,244,15,173,255,6,15,118,254,16,150,208,255,185,22,50,255,86,112,207,255,75,113,215,1,63,146,43,255,4,225,19,254,227,23,62,255,14,255,214,254,45,8,205,255,87,197,151,254,210,82,215,255,245,248,247,255,128,248,70,0,225,247,87,0,90,120,70,0,213,245,92,0,13,133,226,0,47,181,5,1,92,163,105,255,6,30,133,254,232,178,61,255,230,149,24,255,18,49,158,0,228,100,61,254,116,243,251,255,77,75,92,1,81,219,147,255,76,163,254,254,141,213,246,0,232,37,152,254,97,44,100,0,201,37,50,1,212,244,57,0,174,171,183,255,249,74,112,0,166,156,30,0,222,221,97,255,243,93,73,254,251,101,100,255,216,217,93,255,254,138,187,255,142,190,52,255,59,203,177,255,200,94,52,0,115,114,158,255,165,152,104,1,126,99,226,255,118,157,244,1,107,200,16,0,193,90,229,0,121,6,88,0,156,32,93,254,125,241,211,255,14,237,157,255,165,154,21,255,184,224,22,255,250,24,152,255,113,77,31,0,247,171,23,255,237,177,204,255,52,137,145,255,194,182,114,0,224,234,149,0,10,111,103,1,201,129,4,0,238,142,78,0,52,6,40,255,110,213,165,254,60,207,253,0,62,215,69,0,96,97,0,255,49,45,202,0,120,121,22,255,235,139,48,1,198,45,34,255,182,50,27,1,131,210,91,255,46,54,128,0,175,123,105,255,198,141,78,254,67,244,239,255,245,54,103,254,78,38,242,255,2,92,249,254,251,174,87,255,139,63,144,0,24,108,27,255,34,102,18,1,34,22,152,0,66,229,118,254,50,143,99,0,144,169,149,1,118,30,152,0,178,8,121,1,8,159,18,0,90,101,230,255,129,29,119,0,68,36,11,1,232,183,55,0,23,255,96,255,161,41,193,255,63,139,222,0,15,179,243,0,255,100,15,255,82,53,135,0,137,57,149,1,99,240,170,255,22,230,228,254,49,180,82,255,61,82,43,0,110,245,217,0,199,125,61,0,46,253,52,0,141,197,219,0,211,159,193,0,55,121,105,254,183,20,129,0,169,119,170,255,203,178,139,255,135,40,182,255,172,13,202,255,65,178,148,0,8,207,43,0,122,53,127,1,74,161,48,0,227,214,128,254,86,11,243,255,100,86,7,1,245,68,134,255,61,43,21,1,152,84,94,255,190,60,250,254,239,118,232,255,214,136,37,1,113,76,107,255,93,104,100,1,144,206,23,255,110,150,154,1,228,103,185,0,218,49,50,254,135,77,139,255,185,1,78,0,0,161,148,255,97,29,233,255,207,148,149,255,160,168,0,0,91,128,171,255,6,28,19,254,11,111,247,0,39,187,150,255,138,232,149,0,117,62,68,255,63,216,188,255,235,234,32,254,29,57,160,255,25,12,241,1,169,60,191,0,32,131,141,255,237,159,123,255,94,197,94,254,116,254,3,255,92,179,97,254,121,97,92,255,170,112,14,0,21,149,248,0,248,227,3,0,80,96,109,0,75,192,74,1,12,90,226,255,161,106,68,1,208,114,127,255,114,42,255,254,74,26,74,255,247,179,150,254,121,140,60,0,147,70,200,255,214,40,161,255,161,188,201,255,141,65,135,255,242,115,252,0,62,47,202,0,180,149,255,254,130,55,237,0,165,17,186,255,10,169,194,0,156,109,218,255,112,140,123,255,104,128,223,254,177,142,108,255,121,37,219,255,128,77,18,255,111,108,23,1,91,192,75,0,174,245,22,255,4,236,62,255,43,64,153,1,227,173,254,0,237,122,132,1,127,89,186,255,142,82,128,254,252,84,174,0,90,179,177,1,243,214,87,255,103,60,162,255,208,130,14,255,11,130,139,0,206,129,219,255,94,217,157,255,239,230,230,255,116,115,159,254,164,107,95,0,51,218,2,1,216,125,198,255,140,202,128,254,11,95,68,255,55,9,93,254,174,153,6,255,204,172,96,0,69,160,110,0,213,38,49,254,27,80,213,0,118,125,114,0,70,70,67,255,15,142,73,255,131,122,185,255,243,20,50,254,130,237,40,0,210,159,140,1,197,151,65,255,84,153,66,0,195,126,90,0,16,238,236,1,118,187,102,255,3,24,133,255,187,69,230,0,56,197,92,1,213,69,94,255,80,138,229,1,206,7,230,0,222,111,230,1,91,233,119,255,9,89,7,1,2,98,1,0,148,74,133,255,51,246,180,255,228,177,112,1,58,189,108,255,194,203,237,254,21,209,195,0,147,10,35,1,86,157,226,0,31,163,139,254,56,7,75,255,62,90,116,0,181,60,169,0,138,162,212,254,81,167,31,0,205,90,112,255,33,112,227,0,83,151,117,1,177,224,73,255,174,144,217,255,230,204,79,255,22,77,232,255,114,78,234,0,224,57,126,254,9,49,141,0,242,147,165,1,104,182,140,255,167,132,12,1,123,68,127,0,225,87,39,1,251,108,8,0,198,193,143,1,121,135,207,255,172,22,70,0,50,68,116,255,101,175,40,255,248,105,233,0,166,203,7,0,110,197,218,0,215,254,26,254,168,226,253,0,31,143,96,0,11,103,41,0,183,129,203,254,100,247,74,255,213,126,132,0,210,147,44,0,199,234,27,1,148,47,181,0,155,91,158,1,54,105,175,255,2,78,145,254,102,154,95,0,128,207,127,254,52,124,236,255,130,84,71,0,221,243,211,0,152,170,207,0,222,106,199,0,183,84,94,254,92,200,56,255,138,182,115,1,142,96,146,0,133,136,228,0,97,18,150,0,55,251,66,0,140,102,4,0,202,103,151,0,30,19,248,255,51,184,207,0,202,198,89,0,55,197,225,254,169,95,249,255,66,65,68,255,188,234,126,0,166,223,100,1,112,239,244,0,144,23,194,0,58,39,182,0,244,44,24,254,175,68,179,255,152,118,154,1,176,162,130,0,217,114,204,254,173,126,78,255,33,222,30,255,36,2,91,255,2,143,243,0,9,235,215,0,3,171,151,1,24,215,245,255,168,47,164,254,241,146,207,0,69,129,180,0,68,243,113,0,144,53,72,254,251,45,14,0,23,110,168,0,68,68,79,255,110,70,95,254,174,91,144,255,33,206,95,255,137,41,7,255,19,187,153,254,35,255,112,255,9,145,185,254,50,157,37,0,11,112,49,1,102,8,190,255,234,243,169,1,60,85,23,0,74,39,189,0,116,49,239,0,173,213,210,0,46,161,108,255,159,150,37,0,196,120,185,255,34,98,6,255,153,195,62,255,97,230,71,255,102,61,76,0,26,212,236,255,164,97,16,0,198,59,146,0,163,23,196,0,56,24,61,0,181,98,193,0,251,147,229,255,98,189,24,255,46,54,206,255,234,82,246,0,183,103,38,1,109,62,204,0,10,240,224,0,146,22,117,255,142,154,120,0,69,212,35,0,208,99,118,1,121,255,3,255,72,6,194,0,117,17,197,255,125,15,23,0,154,79,153,0,214,94,197,255,185,55,147,255,62,254,78,254,127,82,153,0,110,102,63,255,108,82,161,255,105,187,212,1,80,138,39,0,60,255,93,255,72,12,186,0,210,251,31,1,190,167,144,255,228,44,19,254,128,67,232,0,214,249,107,254,136,145,86,255,132,46,176,0,189,187,227,255,208,22,140,0,217,211,116,0,50,81,186,254,139,250,31,0,30,64,198,1,135,155,100,0,160,206,23,254,187,162,211,255,16,188,63,0,254,208,49,0,85,84,191,0,241,192,242,255,153,126,145,1,234,162,162,255,230,97,216,1,64,135,126,0,190,148,223,1,52,0,43,255,28,39,189,1,64,136,238,0,175,196,185,0,98,226,213,255,127,159,244,1,226,175,60,0,160,233,142,1,180,243,207,255,69,152,89,1,31,101,21,0,144,25,164,254,139,191,209,0,91,25,121,0,32,147,5,0,39,186,123,255,63,115,230,255,93,167,198,255,143,213,220,255,179,156,19,255,25,66,122,0,214,160,217,255,2,45,62,255,106,79,146,254,51,137,99,255,87,100,231,255,175,145,232,255,101,184,1,255,174,9,125,0,82,37,161,1,36,114,141,255,48,222,142,255,245,186,154,0,5,174,221,254,63,114,155,255,135,55,160,1,80,31,135,0,126,250,179,1,236,218,45,0,20,28,145,1,16,147,73,0,249,189,132,1,17,189,192,255,223,142,198,255,72,20,15,255,250,53,237,254,15,11,18,0,27,211,113,254,213,107,56,255,174,147,146,255,96,126,48,0,23,193,109,1,37,162,94,0,199,157,249,254,24,128,187,255,205,49,178,254,93,164,42,255,43,119,235,1,88,183,237,255,218,210,1,255,107,254,42,0,230,10,99,255,162,0,226,0,219,237,91,0,129,178,203,0,208,50,95,254,206,208,95,255,247,191,89,254,110,234,79,255,165,61,243,0,20,122,112,255,246,246,185,254,103,4,123,0,233,99,230,1,219,91,252,255,199,222,22,255,179,245,233,255,211,241,234,0,111,250,192,255,85,84,136,0,101,58,50,255,131,173,156,254,119,45,51,255,118,233,16,254,242,90,214,0,94,159,219,1,3,3,234,255,98,76,92,254,80,54,230,0,5,228,231,254,53,24,223,255,113,56,118,1,20,132,1,255,171,210,236,0,56,241,158,255,186,115,19,255,8,229,174,0,48,44,0,1,114,114,166,255,6,73,226,255,205,89,244,0,137,227,75,1,248,173,56,0,74,120,246,254,119,3,11,255,81,120,198,255,136,122,98,255,146,241,221,1,109,194,78,255,223,241,70,1,214,200,169,255,97,190,47,255,47,103,174,255,99,92,72,254,118,233,180,255,193,35,233,254,26,229,32,255,222,252,198,0,204,43,71,255,199,84,172,0,134,102,190,0,111,238,97,254,230,40,230,0,227,205,64,254,200,12,225,0,166,25,222,0,113,69,51,255,143,159,24,0,167,184,74,0,29,224,116,254,158,208,233,0,193,116,126,255,212,11,133,255,22,58,140,1,204,36,51,255,232,30,43,0,235,70,181,255,64,56,146,254,169,18,84,255,226,1,13,255,200,50,176,255,52,213,245,254,168,209,97,0,191,71,55,0,34,78,156,0,232,144,58,1,185,74,189,0,186,142,149,254,64,69,127,255,161,203,147,255,176,151,191,0,136,231,203,254,163,182,137,0,161,126,251,254,233,32,66,0,68,207,66,0,30,28,37,0,93,114,96,1,254,92,247,255,44,171,69,0,202,119,11,255,188,118,50,1,255,83,136,255,71,82,26,0,70,227,2,0,32,235,121,1,181,41,154,0,71,134,229,254,202,255,36,0,41,152,5,0,154,63,73,255,34,182,124,0,121,221,150,255,26,204,213,1,41,172,87,0,90,157,146,255,109,130,20,0,71,107,200,255,243,102,189,0,1,195,145,254,46,88,117,0,8,206,227,0,191,110,253,255,109,128,20,254,134,85,51,255,137,177,112,1,216,34,22,255,131,16,208,255,121,149,170,0,114,19,23,1,166,80,31,255,113,240,122,0,232,179,250,0,68,110,180,254,210,170,119,0,223,108,164,255,207,79,233,255,27,229,226,254,209,98,81,255,79,68,7,0,131,185,100,0,170,29,162,255,17,162,107,255,57,21,11,1,100,200,181,255,127,65,166,1,165,134,204,0,104,167,168,0,1,164,79,0,146,135,59,1,70,50,128,255,102,119,13,254,227,6,135,0,162,142,179,255,160,100,222,0,27,224,219,1,158,93,195,255,234,141,137,0,16,24,125,255,238,206,47,255,97,17,98,255,116,110,12,255,96,115,77,0,91,227,232,255,248,254,79,255,92,229,6,254,88,198,139,0,206,75,129,0,250,77,206,255,141,244,123,1,138,69,220,0,32,151,6,1,131,167,22,255,237,68,167,254,199,189,150,0,163,171,138,255,51,188,6,255,95,29,137,254,148,226,179,0,181,107,208,255,134,31,82,255,151,101,45,255,129,202,225,0,224,72,147,0,48,138,151,255,195,64,206,254,237,218,158,0,106,29,137,254,253,189,233,255,103,15,17,255,194,97,255,0,178,45,169,254,198,225,155,0,39,48,117,255,135,106,115,0,97,38,181,0,150,47,65,255,83,130,229,254,246,38,129,0,92,239,154,254,91,99,127,0,161,111,33,255,238,217,242,255,131,185,195,255,213,191,158,255,41,150,218,0,132,169,131,0,89,84,252,1,171,70,128,255,163,248,203,254,1,50,180,255,124,76,85,1,251,111,80,0,99,66,239,255,154,237,182,255,221,126,133,254,74,204,99,255,65,147,119,255,99,56,167,255,79,248,149,255,116,155,228,255,237,43,14,254,69,137,11,255,22,250,241,1,91,122,143,255,205,249,243,0,212,26,60,255,48,182,176,1,48,23,191,255,203,121,152,254,45,74,213,255,62,90,18,254,245,163,230,255,185,106,116,255,83,35,159,0,12,33,2,255,80,34,62,0,16,87,174,255,173,101,85,0,202,36,81,254,160,69,204,255,64,225,187,0,58,206,94,0,86,144,47,0,229,86,245,0,63,145,190,1,37,5,39,0,109,251,26,0,137,147,234,0,162,121,145,255,144,116,206,255,197,232,185,255,183,190,140,255,73,12,254,255,139,20,242,255,170,90,239,255,97,66,187,255,245,181,135,254,222,136,52,0,245,5,51,254,203,47,78,0,152,101,216,0,73,23,125,0,254,96,33,1,235,210,73,255,43,209,88,1,7,129,109,0,122,104,228,254,170,242,203,0,242,204,135,255,202,28,233,255,65,6,127,0,159,144,71,0,100,140,95,0,78,150,13,0,251,107,118,1,182,58,125,255,1,38,108,255,141,189,209,255,8,155,125,1,113,163,91,255,121,79,190,255,134,239,108,255,76,47,248,0,163,228,239,0,17,111,10,0,88,149,75,255,215,235,239,0,167,159,24,255,47,151,108,255,107,209,188,0,233,231,99,254,28,202,148,255,174,35,138,255,110,24,68,255,2,69,181,0,107,102,82,0,102,237,7,0,92,36,237,255,221,162,83,1,55,202,6,255,135,234,135,255,24,250,222,0,65,94,168,254,245,248,210,255,167,108,201,254,255,161,111,0,205,8,254,0,136,13,116,0,100,176,132,255,43,215,126,255,177,133,130,255,158,79,148,0,67,224,37,1,12,206,21,255,62,34,110,1,237,104,175,255,80,132,111,255,142,174,72,0,84,229,180,254,105,179,140,0,64,248,15,255,233,138,16,0,245,67,123,254,218,121,212,255,63,95,218,1,213,133,137,255,143,182,82,255,48,28,11,0,244,114,141,1,209,175,76,255,157,181,150,255,186,229,3,255,164,157,111,1,231,189,139,0,119,202,190,255,218,106,64,255,68,235,63,254,96,26,172,255,187,47,11,1,215,18,251,255,81,84,89,0,68,58,128,0,94,113,5,1,92,129,208,255,97,15,83,254,9,28,188,0,239,9,164,0,60,205,152,0,192,163,98,255,184,18,60,0,217,182,139,0,109,59,120,255,4,192,251,0,169,210,240,255,37,172,92,254,148,211,245,255,179,65,52,0,253,13,115,0,185,174,206,1,114,188,149,255,237,90,173,0,43,199,192,255,88,108,113,0,52,35,76,0,66,25,148,255,221,4,7,255,151,241,114,255,190,209,232,0,98,50,199,0,151,150,213,255,18,74,36,1,53,40,7,0,19,135,65,255,26,172,69,0,174,237,85,0,99,95,41,0,3,56,16,0,39,160,177,255,200,106,218,254,185,68,84,255,91,186,61,254,67,143,141,255,13,244,166,255,99,114,198,0,199,110,163,255,193,18,186,0,124,239,246,1,110,68,22,0,2,235,46,1,212,60,107,0,105,42,105,1,14,230,152,0,7,5,131,0,141,104,154,255,213,3,6,0,131,228,162,255,179,100,28,1,231,123,85,255,206,14,223,1,253,96,230,0,38,152,149,1,98,137,122,0,214,205,3,255,226,152,179,255,6,133,137,0,158,69,140,255,113,162,154,255,180,243,172,255,27,189,115,255,143,46,220,255,213,134,225,255,126,29,69,0,188,43,137,1,242,70,9,0,90,204,255,255,231,170,147,0,23,56,19,254,56,125,157,255,48,179,218,255,79,182,253,255,38,212,191,1,41,235,124,0,96,151,28,0,135,148,190,0,205,249,39,254,52,96,136,255,212,44,136,255,67,209,131,255,252,130,23,255,219,128,20,255,198,129,118,0,108,101,11,0,178,5,146,1,62,7,100,255,181,236,94,254,28,26,164,0,76,22,112,255,120,102,79,0,202,192,229,1,200,176,215,0,41,64,244,255,206,184,78,0,167,45,63,1,160,35,0,255,59,12,142,255,204,9,144,255,219,94,229,1,122,27,112,0,189,105,109,255,64,208,74,255,251,127,55,1,2,226,198,0,44,76,209,0,151,152,77,255,210,23,46,1,201,171,69,255,44,211,231,0,190,37,224,255,245,196,62,255,169,181,222,255,34,211,17,0,119,241,197,255,229,35,152,1,21,69,40,255,178,226,161,0,148,179,193,0,219,194,254,1,40,206,51,255,231,92,250,1,67,153,170,0,21,148,241,0,170,69,82,255,121,18,231,255,92,114,3,0,184,62,230,0,225,201,87,255,146,96,162,255,181,242,220,0,173,187,221,1,226,62,170,255,56,126,217,1,117,13,227,255,179,44,239,0,157,141,155,255,144,221,83,0,235,209,208,0,42,17,165,1,251,81,133,0,124,245,201,254,97,211,24,255,83,214,166,0,154,36,9,255,248,47,127,0,90,219,140,255,161,217,38,254,212,147,63,255,66,84,148,1,207,3,1,0,230,134,89,1,127,78,122,255,224,155,1,255,82,136,74,0,178,156,208,255,186,25,49,255,222,3,210,1,229,150,190,255,85,162,52,255,41,84,141,255,73,123,84,254,93,17,150,0,119,19,28,1,32,22,215,255,28,23,204,255,142,241,52,255,228,52,125,0,29,76,207,0,215,167,250,254,175,164,230,0,55,207,105,1,109,187,245,255,161,44,220,1,41,101,128,255,167,16,94,0,93,214,107,255,118,72,0,254,80,61,234,255,121,175,125,0,139,169,251,0,97,39,147,254,250,196,49,255,165,179,110,254,223,70,187,255,22,142,125,1,154,179,138,255,118,176,42,1,10,174,153,0,156,92,102,0,168,13,161,255,143,16,32,0,250,197,180,255,203,163,44,1,87,32,36,0,161,153,20,255,123,252,15,0,25,227,80,0,60,88,142,0,17,22,201,1,154,205,77,255,39,63,47,0,8,122,141,0,128,23,182,254,204,39,19,255,4,112,29,255,23,36,140,255,210,234,116,254,53,50,63,255,121,171,104,255,160,219,94,0,87,82,14,254,231,42,5,0,165,139,127,254,86,78,38,0,130,60,66,254,203,30,45,255,46,196,122,1,249,53,162,255,136,143,103,254,215,210,114,0,231,7,160,254,169,152,42,255,111,45,246,0,142,131,135,255,131,71,204,255,36,226,11,0,0,28,242,255,225,138,213,255,247,46,216,254,245,3,183,0,108,252,74,1,206,26,48,255,205,54,246,255,211,198,36,255,121,35,50,0,52,216,202,255,38,139,129,254,242,73,148,0,67,231,141,255,42,47,204,0,78,116,25,1,4,225,191,255,6,147,228,0,58,88,177,0,122,165,229,255,252,83,201,255,224,167,96,1,177,184,158,255,242,105,179,1,248,198,240,0,133,66,203,1,254,36,47,0,45,24,115,255,119,62,254,0,196,225,186,254,123,141,172,0,26,85,41,255,226,111,183,0,213,231,151,0,4,59,7,255,238,138,148,0,66,147,33,255,31,246,141,255,209,141,116,255,104,112,31,0,88,161,172,0,83,215,230,254,47,111,151,0,45,38,52,1,132,45,204,0,138,128,109,254,233,117,134,255,243,190,173,254,241,236,240,0,82,127,236,254,40,223,161,255,110,182,225,255,123,174,239,0,135,242,145,1,51,209,154,0,150,3,115,254,217,164,252,255,55,156,69,1,84,94,255,255,232,73,45,1,20,19,212,255,96,197,59,254,96,251,33,0,38,199,73,1,64,172,247,255,117,116,56,255,228,17,18,0,62,138,103,1,246,229,164,255,244,118,201,254,86,32,159,255,109,34,137,1,85,211,186,0,10,193,193,254,122,194,177,0,122,238,102,255,162,218,171,0,108,217,161,1,158,170,34,0,176,47,155,1,181,228,11,255,8,156,0,0,16,75,93,0,206,98,255,1,58,154,35,0,12,243,184,254,67,117,66,255,230,229,123,0,201,42,110,0,134,228,178,254,186,108,118,255,58,19,154,255,82,169,62,255,114,143,115,1,239,196,50,255,173,48,193,255,147,2,84,255,150,134,147,254,95,232,73,0,109,227,52,254,191,137,10,0,40,204,30,254,76,52,97,255,164,235,126,0,254,124,188,0,74,182,21,1,121,29,35,255,241,30,7,254,85,218,214,255,7,84,150,254,81,27,117,255,160,159,152,254,66,24,221,255,227,10,60,1,141,135,102,0,208,189,150,1,117,179,92,0,132,22,136,255,120,199,28,0,21,129,79,254,182,9,65,0,218,163,169,0,246,147,198,255,107,38,144,1,78,175,205,255,214,5,250,254,47,88,29,255,164,47,204,255,43,55,6,255,131,134,207,254,116,100,214,0,96,140,75,1,106,220,144,0,195,32,28,1,172,81,5,255,199,179,52,255,37,84,203,0,170,112,174,0,11,4,91,0,69,244,27,1,117,131,92,0,33,152,175,255,140,153,107,255,251,135,43,254,87,138,4,255,198,234,147,254,121,152,84,255,205,101,155,1,157,9,25,0,72,106,17,254,108,153,0,255,189,229,186,0,193,8,176,255,174,149,209,0,238,130,29,0,233,214,126,1,61,226,102,0,57,163,4,1,198,111,51,255,45,79,78,1,115,210,10,255,218,9,25,255,158,139,198,255,211,82,187,254,80,133,83,0,157,129,230,1,243,133,134,255,40,136,16,0,77,107,79,255,183,85,92,1,177,204,202,0,163,71,147,255,152,69,190,0,172,51,188,1,250,210,172,255,211,242,113,1,89,89,26,255,64,66,111,254,116,152,42,0,161,39,27,255,54,80,254,0,106,209,115,1,103,124,97,0,221,230,98,255,31,231,6,0,178,192,120,254,15,217,203,255,124,158,79,0,112,145,247,0,92,250,48,1,163,181,193,255,37,47,142,254,144,189,165,255,46,146,240,0,6,75,128,0,41,157,200,254,87,121,213,0,1,113,236,0,5,45,250,0,144,12,82,0,31,108,231,0,225,239,119,255,167,7,189,255,187,228,132,255,110,189,34,0,94,44,204,1,162,52,197,0,78,188,241,254,57,20,141,0,244,146,47,1,206,100,51,0,125,107,148,254,27,195,77,0,152,253,90,1,7,143,144,255,51,37,31,0,34,119,38,255,7,197,118,0,153,188,211,0,151,20,116,254,245,65,52,255,180,253,110,1,47,177,209,0,161,99,17,255,118,222,202,0,125,179,252,1,123,54,126,255,145,57,191,0,55,186,121,0,10,243,138,0,205,211,229,255,125,156,241,254,148,156,185,255,227,19,188,255,124,41,32,255,31,34,206,254,17,57,83,0,204,22,37,255,42,96,98,0,119,102,184,1,3,190,28,0,110,82,218,255,200,204,192,255,201,145,118,0,117,204,146,0,132,32,98,1,192,194,121,0,106,161,248,1,237,88,124,0,23,212,26,0,205,171,90,255,248,48,216,1,141,37,230,255,124,203,0,254,158,168,30,255,214,248,21,0,112,187,7,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+20480); -/* memory initializer */ allocate([75,133,239,255,74,227,243,255,250,147,70,0,214,120,162,0,167,9,179,255,22,158,18,0,218,77,209,1,97,109,81,255,244,33,179,255,57,52,57,255,65,172,210,255,249,71,209,255,142,169,238,0,158,189,153,255,174,254,103,254,98,33,14,0,141,76,230,255,113,139,52,255,15,58,212,0,168,215,201,255,248,204,215,1,223,68,160,255,57,154,183,254,47,231,121,0,106,166,137,0,81,136,138,0,165,43,51,0,231,139,61,0,57,95,59,254,118,98,25,255,151,63,236,1,94,190,250,255,169,185,114,1,5,250,58,255,75,105,97,1,215,223,134,0,113,99,163,1,128,62,112,0,99,106,147,0,163,195,10,0,33,205,182,0,214,14,174,255,129,38,231,255,53,182,223,0,98,42,159,255,247,13,40,0,188,210,177,1,6,21,0,255,255,61,148,254,137,45,129,255,89,26,116,254,126,38,114,0,251,50,242,254,121,134,128,255,204,249,167,254,165,235,215,0,202,177,243,0,133,141,62,0,240,130,190,1,110,175,255,0,0,20,146,1,37,210,121,255,7,39,130,0,142,250,84,255,141,200,207,0,9,95,104,255,11,244,174,0,134,232,126,0,167,1,123,254,16,193,149,255,232,233,239,1,213,70,112,255,252,116,160,254,242,222,220,255,205,85,227,0,7,185,58,0,118,247,63,1,116,77,177,255,62,245,200,254,63,18,37,255,107,53,232,254,50,221,211,0,162,219,7,254,2,94,43,0,182,62,182,254,160,78,200,255,135,140,170,0,235,184,228,0,175,53,138,254,80,58,77,255,152,201,2,1,63,196,34,0,5,30,184,0,171,176,154,0,121,59,206,0,38,99,39,0,172,80,77,254,0,134,151,0,186,33,241,254,94,253,223,255,44,114,252,0,108,126,57,255,201,40,13,255,39,229,27,255,39,239,23,1,151,121,51,255,153,150,248,0,10,234,174,255,118,246,4,254,200,245,38,0,69,161,242,1,16,178,150,0,113,56,130,0,171,31,105,0,26,88,108,255,49,42,106,0,251,169,66,0,69,93,149,0,20,57,254,0,164,25,111,0,90,188,90,255,204,4,197,0,40,213,50,1,212,96,132,255,88,138,180,254,228,146,124,255,184,246,247,0,65,117,86,255,253,102,210,254,254,121,36,0,137,115,3,255,60,24,216,0,134,18,29,0,59,226,97,0,176,142,71,0,7,209,161,0,189,84,51,254,155,250,72,0,213,84,235,255,45,222,224,0,238,148,143,255,170,42,53,255,78,167,117,0,186,0,40,255,125,177,103,255,69,225,66,0,227,7,88,1,75,172,6,0,169,45,227,1,16,36,70,255,50,2,9,255,139,193,22,0,143,183,231,254,218,69,50,0,236,56,161,1,213,131,42,0,138,145,44,254,136,229,40,255,49,63,35,255,61,145,245,255,101,192,2,254,232,167,113,0,152,104,38,1,121,185,218,0,121,139,211,254,119,240,35,0,65,189,217,254,187,179,162,255,160,187,230,0,62,248,14,255,60,78,97,0,255,247,163,255,225,59,91,255,107,71,58,255,241,47,33,1,50,117,236,0,219,177,63,254,244,90,179,0,35,194,215,255,189,67,50,255,23,135,129,0,104,189,37,255,185,57,194,0,35,62,231,255,220,248,108,0,12,231,178,0,143,80,91,1,131,93,101,255,144,39,2,1,255,250,178,0,5,17,236,254,139,32,46,0,204,188,38,254,245,115,52,255,191,113,73,254,191,108,69,255,22,69,245,1,23,203,178,0,170,99,170,0,65,248,111,0,37,108,153,255,64,37,69,0,0,88,62,254,89,148,144,255,191,68,224,1,241,39,53,0,41,203,237,255,145,126,194,255,221,42,253,255,25,99,151,0,97,253,223,1,74,115,49,255,6,175,72,255,59,176,203,0,124,183,249,1,228,228,99,0,129,12,207,254,168,192,195,255,204,176,16,254,152,234,171,0,77,37,85,255,33,120,135,255,142,194,227,1,31,214,58,0,213,187,125,255,232,46,60,255,190,116,42,254,151,178,19,255,51,62,237,254,204,236,193,0,194,232,60,0,172,34,157,255,189,16,184,254,103,3,95,255,141,233,36,254,41,25,11,255,21,195,166,0,118,245,45,0,67,213,149,255,159,12,18,255,187,164,227,1,160,25,5,0,12,78,195,1,43,197,225,0,48,142,41,254,196,155,60,255,223,199,18,1,145,136,156,0,252,117,169,254,145,226,238,0,239,23,107,0,109,181,188,255,230,112,49,254,73,170,237,255,231,183,227,255,80,220,20,0,194,107,127,1,127,205,101,0,46,52,197,1,210,171,36,255,88,3,90,255,56,151,141,0,96,187,255,255,42,78,200,0,254,70,70,1,244,125,168,0,204,68,138,1,124,215,70,0,102,66,200,254,17,52,228,0,117,220,143,254,203,248,123,0,56,18,174,255,186,151,164,255,51,232,208,1,160,228,43,255,249,29,25,1,68,190,63,0,8,201,188,243,103,230,9,106,59,167,202,132,133,174,103,187,43,248,148,254,114,243,110,60,241,54,29,95,58,245,79,165,209,130,230,173,127,82,14,81,31,108,62,43,140,104,5,155,107,189,65,251,171,217,131,31,121,33,126,19,25,205,224,91,34,174,40,215,152,47,138,66,205,101,239,35,145,68,55,113,47,59,77,236,207,251,192,181,188,219,137,129,165,219,181,233,56,181,72,243,91,194,86,57,25,208,5,182,241,17,241,89,155,79,25,175,164,130,63,146,24,129,109,218,213,94,28,171,66,2,3,163,152,170,7,216,190,111,112,69,1,91,131,18,140,178,228,78,190,133,49,36,226,180,255,213,195,125,12,85,111,137,123,242,116,93,190,114,177,150,22,59,254,177,222,128,53,18,199,37,167,6,220,155,148,38,105,207,116,241,155,193,210,74,241,158,193,105,155,228,227,37,79,56,134,71,190,239,181,213,140,139,198,157,193,15,101,156,172,119,204,161,12,36,117,2,43,89,111,44,233,45,131,228,166,110,170,132,116,74,212,251,65,189,220,169,176,92,181,83,17,131,218,136,249,118,171,223,102,238,82,81,62,152,16,50,180,45,109,198,49,168,63,33,251,152,200,39,3,176,228,14,239,190,199,127,89,191,194,143,168,61,243,11,224,198,37,167,10,147,71,145,167,213,111,130,3,224,81,99,202,6,112,110,14,10,103,41,41,20,252,47,210,70,133,10,183,39,38,201,38,92,56,33,27,46,237,42,196,90,252,109,44,77,223,179,149,157,19,13,56,83,222,99,175,139,84,115,10,101,168,178,119,60,187,10,106,118,230,174,237,71,46,201,194,129,59,53,130,20,133,44,114,146,100,3,241,76,161,232,191,162,1,48,66,188,75,102,26,168,145,151,248,208,112,139,75,194,48,190,84,6,163,81,108,199,24,82,239,214,25,232,146,209,16,169,101,85,36,6,153,214,42,32,113,87,133,53,14,244,184,209,187,50,112,160,106,16,200,208,210,184,22,193,164,25,83,171,65,81,8,108,55,30,153,235,142,223,76,119,72,39,168,72,155,225,181,188,176,52,99,90,201,197,179,12,28,57,203,138,65,227,74,170,216,78,115,227,99,119,79,202,156,91,163,184,178,214,243,111,46,104,252,178,239,93,238,130,143,116,96,47,23,67,111,99,165,120,114,171,240,161,20,120,200,132,236,57,100,26,8,2,199,140,40,30,99,35,250,255,190,144,233,189,130,222,235,108,80,164,21,121,198,178,247,163,249,190,43,83,114,227,242,120,113,198,156,97,38,234,206,62,39,202,7,194,192,33,199,184,134,209,30,235,224,205,214,125,218,234,120,209,110,238,127,79,125,245,186,111,23,114,170,103,240,6,166,152,200,162,197,125,99,10,174,13,249,190,4,152,63,17,27,71,28,19,53,11,113,27,132,125,4,35,245,119,219,40,147,36,199,64,123,171,202,50,188,190,201,21,10,190,158,60,76,13,16,156,196,103,29,67,182,66,62,203,190,212,197,76,42,126,101,252,156,41,127,89,236,250,214,58,171,111,203,95,23,88,71,74,140,25,68,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+30720); +/* memory initializer */ allocate([8,201,188,243,103,230,9,106,59,167,202,132,133,174,103,187,43,248,148,254,114,243,110,60,241,54,29,95,58,245,79,165,209,130,230,173,127,82,14,81,31,108,62,43,140,104,5,155,107,189,65,251,171,217,131,31,121,33,126,19,25,205,224,91,34,174,40,215,152,47,138,66,205,101,239,35,145,68,55,113,47,59,77,236,207,251,192,181,188,219,137,129,165,219,181,233,56,181,72,243,91,194,86,57,25,208,5,182,241,17,241,89,155,79,25,175,164,130,63,146,24,129,109,218,213,94,28,171,66,2,3,163,152,170,7,216,190,111,112,69,1,91,131,18,140,178,228,78,190,133,49,36,226,180,255,213,195,125,12,85,111,137,123,242,116,93,190,114,177,150,22,59,254,177,222,128,53,18,199,37,167,6,220,155,148,38,105,207,116,241,155,193,210,74,241,158,193,105,155,228,227,37,79,56,134,71,190,239,181,213,140,139,198,157,193,15,101,156,172,119,204,161,12,36,117,2,43,89,111,44,233,45,131,228,166,110,170,132,116,74,212,251,65,189,220,169,176,92,181,83,17,131,218,136,249,118,171,223,102,238,82,81,62,152,16,50,180,45,109,198,49,168,63,33,251,152,200,39,3,176,228,14,239,190,199,127,89,191,194,143,168,61,243,11,224,198,37,167,10,147,71,145,167,213,111,130,3,224,81,99,202,6,112,110,14,10,103,41,41,20,252,47,210,70,133,10,183,39,38,201,38,92,56,33,27,46,237,42,196,90,252,109,44,77,223,179,149,157,19,13,56,83,222,99,175,139,84,115,10,101,168,178,119,60,187,10,106,118,230,174,237,71,46,201,194,129,59,53,130,20,133,44,114,146,100,3,241,76,161,232,191,162,1,48,66,188,75,102,26,168,145,151,248,208,112,139,75,194,48,190,84,6,163,81,108,199,24,82,239,214,25,232,146,209,16,169,101,85,36,6,153,214,42,32,113,87,133,53,14,244,184,209,187,50,112,160,106,16,200,208,210,184,22,193,164,25,83,171,65,81,8,108,55,30,153,235,142,223,76,119,72,39,168,72,155,225,181,188,176,52,99,90,201,197,179,12,28,57,203,138,65,227,74,170,216,78,115,227,99,119,79,202,156,91,163,184,178,214,243,111,46,104,252,178,239,93,238,130,143,116,96,47,23,67,111,99,165,120,114,171,240,161,20,120,200,132,236,57,100,26,8,2,199,140,40,30,99,35,250,255,190,144,233,189,130,222,235,108,80,164,21,121,198,178,247,163,249,190,43,83,114,227,242,120,113,198,156,97,38,234,206,62,39,202,7,194,192,33,199,184,134,209,30,235,224,205,214,125,218,234,120,209,110,238,127,79,125,245,186,111,23,114,170,103,240,6,166,152,200,162,197,125,99,10,174,13,249,190,4,152,63,17,27,71,28,19,53,11,113,27,132,125,4,35,245,119,219,40,147,36,199,64,123,171,202,50,188,190,201,21,10,190,158,60,76,13,16,156,196,103,29,67,182,66,62,203,190,212,197,76,42,126,101,252,156,41,127,89,236,250,214,58,171,111,203,95,23,88,71,74,140,25,68,108,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,47,99,168,254,170,226,153,255,102,179,216,0,226,141,122,255,122,66,153,254,182,245,134,0,227,228,25,1,214,57,235,255,216,173,56,255,181,231,210,0,119,128,157,255,129,95,136,255,110,126,51,0,2,169,183,255,7,130,98,254,69,176,94,255,116,4,227,1,217,242,145,255,202,173,31,1,105,1,39,255,46,175,69,0,228,47,58,255,215,224,69,254,207,56,69,255,16,254,139,255,23,207,212,255,202,20,126,255,95,213,96,255,9,176,33,0,200,5,207,255,241,42,128,254,35,33,192,255,248,229,196,1,129,17,120,0,251,103,151,255,7,52,112,255,140,56,66,255,40,226,245,255,217,70,37,254,172,214,9,255,72,67,134,1,146,192,214,255,44,38,112,0,68,184,75,255,206,90,251,0,149,235,141,0,181,170,58,0,116,244,239,0,92,157,2,0,102,173,98,0,233,137,96,1,127,49,203,0,5,155,148,0,23,148,9,255,211,122,12,0,34,134,26,255,219,204,136,0,134,8,41,255,224,83,43,254,85,25,247,0,109,127,0,254,169,136,48,0,238,119,219,255,231,173,213,0,206,18,254,254,8,186,7,255,126,9,7,1,111,42,72,0,111,52,236,254,96,63,141,0,147,191,127,254,205,78,192,255,14,106,237,1,187,219,76,0,175,243,187,254,105,89,173,0,85,25,89,1,162,243,148,0,2,118,209,254,33,158,9,0,139,163,46,255,93,70,40,0,108,42,142,254,111,252,142,255,155,223,144,0,51,229,167,255,73,252,155,255,94,116,12,255,152,160,218,255,156,238,37,255,179,234,207,255,197,0,179,255,154,164,141,0,225,196,104,0,10,35,25,254,209,212,242,255,97,253,222,254,184,101,229,0,222,18,127,1,164,136,135,255,30,207,140,254,146,97,243,0,129,192,26,254,201,84,33,255,111,10,78,255,147,81,178,255,4,4,24,0,161,238,215,255,6,141,33,0,53,215,14,255,41,181,208,255,231,139,157,0,179,203,221,255,255,185,113,0,189,226,172,255,113,66,214,255,202,62,45,255,102,64,8,255,78,174,16,254,133,117,68,255,182,120,89,255,133,114,211,0,189,110,21,255,15,10,106,0,41,192,1,0,152,232,121,255,188,60,160,255,153,113,206,255,0,183,226,254,180,13,72,255,176,160,14,254,211,201,134,255,158,24,143,0,127,105,53,0,96,12,189,0,167,215,251,255,159,76,128,254,106,101,225,255,30,252,4,0,146,12,174,0,89,241,178,254,10,229,166,255,123,221,42,254,30,20,212,0,82,128,3,0,48,209,243,0,119,121,64,255,50,227,156,255,0,110,197,1,103,27,144,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,234,113,60,255,37,255,57,255,69,178,182,254,128,208,179,0,118,26,125,254,3,7,214,255,241,50,77,255,85,203,197,255,211,135,250,255,25,48,100,255,187,213,180,254,17,88,105,0,83,209,158,1,5,115,98,0,4,174,60,254,171,55,110,255,217,181,17,255,20,188,170,0,146,156,102,254,87,214,174,255,114,122,155,1,233,44,170,0,127,8,239,1,214,236,234,0,175,5,219,0,49,106,61,255,6,66,208,255,2,106,110,255,81,234,19,255,215,107,192,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,178,9,252,254,100,110,212,0,14,5,167,0,233,239,163,255,28,151,157,1,101,146,10,255,254,158,70,254,71,249,228,0,88,30,50,0,68,58,160,255,191,24,104,1,129,66,129,255,192,50,85,255,8,179,138,255,38,250,201,0,115,80,160,0,131,230,113,0,125,88,147,0,90,68,199,0,253,76,158,0,28,255,118,0,113,250,254,0,66,75,46,0,230,218,43,0,229,120,186,1,148,68,43,0,136,124,238,1,187,107,197,255,84,53,246,255,51,116,254,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,68,113,21,255,222,186,59,255,66,7,241,1,69,6,72,0,86,156,108,254,55,167,89,0,109,52,219,254,13,176,23,255,196,44,106,255,239,149,71,255,164,140,125,255,159,173,1,0,51,41,231,0,145,62,33,0,138,111,93,1,185,83,69,0,144,115,46,0,97,151,16,255,24,228,26,0,49,217,226,0,113,75,234,254,193,153,12,255,182,48,96,255,14,13,26,0,128,195,249,254,69,193,59,0,132,37,81,254,125,106,60,0,214,240,169,1,164,227,66,0,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,143,62,221,0,129,89,214,255,55,139,5,254,68,20,191,255,14,204,178,1,35,195,217,0,47,51,206,1,38,246,165,0,206,27,6,254,158,87,36,0,217,52,146,255,125,123,215,255,85,60,31,255,171,13,7,0,218,245,88,254,252,35,60,0,55,214,160,255,133,101,56,0,224,32,19,254,147,64,234,0,26,145,162,1,114,118,125,0,248,252,250,0,101,94,196,255,198,141,226,254,51,42,182,0,135,12,9,254,109,172,210,255,197,236,194,1,241,65,154,0,48,156,47,255,153,67,55,255,218,165,34,254,74,180,179,0,218,66,71,1,88,122,99,0,212,181,219,255,92,42,231,255,239,0,154,0,245,77,183,255,94,81,170,1,18,213,216,0,171,93,71,0,52,94,248,0,18,151,161,254,197,209,66,255,174,244,15,254,162,48,183,0,49,61,240,254,182,93,195,0,199,228,6,1,200,5,17,255,137,45,237,255,108,148,4,0,90,79,237,255,39,63,77,255,53,82,207,1,142,22,118,255,101,232,18,1,92,26,67,0,5,200,88,255,33,168,138,255,149,225,72,0,2,209,27,255,44,245,168,1,220,237,17,255,30,211,105,254,141,238,221,0,128,80,245,254,111,254,14,0,222,95,190,1,223,9,241,0,146,76,212,255,108,205,104,255,63,117,153,0,144,69,48,0,35,228,111,0,192,33,193,255,112,214,190,254,115,152,151,0,23,102,88,0,51,74,248,0,226,199,143,254,204,162,101,255,208,97,189,1,245,104,18,0,230,246,30,255,23,148,69,0,110,88,52,254,226,181,89,255,208,47,90,254,114,161,80,255,33,116,248,0,179,152,87,255,69,144,177,1,88,238,26,255,58,32,113,1,1,77,69,0,59,121,52,255,152,238,83,0,52,8,193,0,231,39,233,255,199,34,138,0,222,68,173,0,91,57,242,254,220,210,127,255,192,7,246,254,151,35,187,0,195,236,165,0,111,93,206,0,212,247,133,1,154,133,209,255,155,231,10,0,64,78,38,0,122,249,100,1,30,19,97,255,62,91,249,1,248,133,77,0,197,63,168,254,116,10,82,0,184,236,113,254,212,203,194,255,61,100,252,254,36,5,202,255,119,91,153,255,129,79,29,0,103,103,171,254,237,215,111,255,216,53,69,0,239,240,23,0,194,149,221,255,38,225,222,0,232,255,180,254,118,82,133,255,57,209,177,1,139,232,133,0,158,176,46,254,194,115,46,0,88,247,229,1,28,103,191,0,221,222,175,254,149,235,44,0,151,228,25,254,218,105,103,0,142,85,210,0,149,129,190,255,213,65,94,254,117,134,224,255,82,198,117,0,157,221,220,0,163,101,36,0,197,114,37,0,104,172,166,254,11,182,0,0,81,72,188,255,97,188,16,255,69,6,10,0,199,147,145,255,8,9,115,1,65,214,175,255,217,173,209,0,80,127,166,0,247,229,4,254,167,183,124,255,90,28,204,254,175,59,240,255,11,41,248,1,108,40,51,255,144,177,195,254,150,250,126,0,138,91,65,1,120,60,222,255,245,193,239,0,29,214,189,255,128,2,25,0,80,154,162,0,77,220,107,1,234,205,74,255,54,166,103,255,116,72,9,0,228,94,47,255,30,200,25,255,35,214,89,255,61,176,140,255,83,226,163,255,75,130,172,0,128,38,17,0,95,137,152,255,215,124,159,1,79,93,0,0,148,82,157,254,195,130,251,255,40,202,76,255,251,126,224,0,157,99,62,254,207,7,225,255,96,68,195,0,140,186,157,255,131,19,231,255,42,128,254,0,52,219,61,254,102,203,72,0,141,7,11,255,186,164,213,0,31,122,119,0,133,242,145,0,208,252,232,255,91,213,182,255,143,4,250,254,249,215,74,0,165,30,111,1,171,9,223,0,229,123,34,1,92,130,26,255,77,155,45,1,195,139,28,255,59,224,78,0,136,17,247,0,108,121,32,0,79,250,189,255,96,227,252,254,38,241,62,0,62,174,125,255,155,111,93,255,10,230,206,1,97,197,40,255,0,49,57,254,65,250,13,0,18,251,150,255,220,109,210,255,5,174,166,254,44,129,189,0,235,35,147,255,37,247,141,255,72,141,4,255,103,107,255,0,247,90,4,0,53,44,42,0,2,30,240,0,4,59,63,0,88,78,36,0,113,167,180,0,190,71,193,255,199,158,164,255,58,8,172,0,77,33,12,0,65,63,3,0,153,77,33,255,172,254,102,1,228,221,4,255,87,30,254,1,146,41,86,255,138,204,239,254,108,141,17,255,187,242,135,0,210,208,127,0,68,45,14,254,73,96,62,0,81,60,24,255,170,6,36,255,3,249,26,0,35,213,109,0,22,129,54,255,21,35,225,255,234,61,56,255,58,217,6,0,143,124,88,0,236,126,66,0,209,38,183,255,34,238,6,255,174,145,102,0,95,22,211,0,196,15,153,254,46,84,232,255,117,34,146,1,231,250,74,255,27,134,100,1,92,187,195,255,170,198,112,0,120,28,42,0,209,70,67,0,29,81,31,0,29,168,100,1,169,173,160,0,107,35,117,0,62,96,59,255,81,12,69,1,135,239,190,255,220,252,18,0,163,220,58,255,137,137,188,255,83,102,109,0,96,6,76,0,234,222,210,255,185,174,205,1,60,158,213,255,13,241,214,0,172,129,140,0,93,104,242,0,192,156,251,0,43,117,30,0,225,81,158,0,127,232,218,0,226,28,203,0,233,27,151,255,117,43,5,255,242,14,47,255,33,20,6,0,137,251,44,254,27,31,245,255,183,214,125,254,40,121,149,0,186,158,213,255,89,8,227,0,69,88,0,254,203,135,225,0,201,174,203,0,147,71,184,0,18,121,41,254,94,5,78,0,224,214,240,254,36,5,180,0,251,135,231,1,163,138,212,0,210,249,116,254,88,129,187,0,19,8,49,254,62,14,144,255,159,76,211,0,214,51,82,0,109,117,228,254,103,223,203,255,75,252,15,1,154,71,220,255,23,13,91,1,141,168,96,255,181,182,133,0,250,51,55,0,234,234,212,254,175,63,158,0,39,240,52,1,158,189,36,255,213,40,85,1,32,180,247,255,19,102,26,1,84,24,97,255,69,21,222,0,148,139,122,255,220,213,235,1,232,203,255,0,121,57,147,0,227,7,154,0,53,22,147,1,72,1,225,0,82,134,48,254,83,60,157,255,145,72,169,0,34,103,239,0,198,233,47,0,116,19,4,255,184,106,9,255,183,129,83,0,36,176,230,1,34,103,72,0,219,162,134,0,245,42,158,0,32,149,96,254,165,44,144,0,202,239,72,254,215,150,5,0,42,66,36,1,132,215,175,0,86,174,86,255,26,197,156,255,49,232,135,254,103,182,82,0,253,128,176,1,153,178,122,0,245,250,10,0,236,24,178,0,137,106,132,0,40,29,41,0,50,30,152,255,124,105,38,0,230,191,75,0,143,43,170,0,44,131,20,255,44,13,23,255,237,255,155,1,159,109,100,255,112,181,24,255,104,220,108,0,55,211,131,0,99,12,213,255,152,151,145,255,238,5,159,0,97,155,8,0,33,108,81,0,1,3,103,0,62,109,34,255,250,155,180,0,32,71,195,255,38,70,145,1,159,95,245,0,69,229,101,1,136,28,240,0,79,224,25,0,78,110,121,255,248,168,124,0,187,128,247,0,2,147,235,254,79,11,132,0,70,58,12,1,181,8,163,255,79,137,133,255,37,170,11,255,141,243,85,255,176,231,215,255,204,150,164,255,239,215,39,255,46,87,156,254,8,163,88,255,172,34,232,0,66,44,102,255,27,54,41,254,236,99,87,255,41,123,169,1,52,114,43,0,117,134,40,0,155,134,26,0,231,207,91,254,35,132,38,255,19,102,125,254,36,227,133,255,118,3,113,255,29,13,124,0,152,96,74,1,88,146,206,255,167,191,220,254,162,18,88,255,182,100,23,0,31,117,52,0,81,46,106,1,12,2,7,0,69,80,201,1,209,246,172,0,12,48,141,1,224,211,88,0,116,226,159,0,122,98,130,0,65,236,234,1,225,226,9,255,207,226,123,1,89,214,59,0,112,135,88,1,90,244,203,255,49,11,38,1,129,108,186,0,89,112,15,1,101,46,204,255,127,204,45,254,79,255,221,255,51,73,18,255,127,42,101,255,241,21,202,0,160,227,7,0,105,50,236,0,79,52,197,255,104,202,208,1,180,15,16,0,101,197,78,255,98,77,203,0,41,185,241,1,35,193,124,0,35,155,23,255,207,53,192,0,11,125,163,1,249,158,185,255,4,131,48,0,21,93,111,255,61,121,231,1,69,200,36,255,185,48,185,255,111,238,21,255,39,50,25,255,99,215,163,255,87,212,30,255,164,147,5,255,128,6,35,1,108,223,110,255,194,76,178,0,74,101,180,0,243,47,48,0,174,25,43,255,82,173,253,1,54,114,192,255,40,55,91,0,215,108,176,255,11,56,7,0,224,233,76,0,209,98,202,254,242,25,125,0,44,193,93,254,203,8,177,0,135,176,19,0,112,71,213,255,206,59,176,1,4,67,26,0,14,143,213,254,42,55,208,255,60,67,120,0,193,21,163,0,99,164,115,0,10,20,118,0,156,212,222,254,160,7,217,255,114,245,76,1,117,59,123,0,176,194,86,254,213,15,176,0,78,206,207,254,213,129,59,0,233,251,22,1,96,55,152,255,236,255,15,255,197,89,84,255,93,149,133,0,174,160,113,0,234,99,169,255,152,116,88,0,144,164,83,255,95,29,198,255,34,47,15,255,99,120,134,255,5,236,193,0,249,247,126,255,147,187,30,0,50,230,117,255,108,217,219,255,163,81,166,255,72,25,169,254,155,121,79,255,28,155,89,254,7,126,17,0,147,65,33,1,47,234,253,0,26,51,18,0,105,83,199,255,163,196,230,0,113,248,164,0,226,254,218,0,189,209,203,255,164,247,222,254,255,35,165,0,4,188,243,1,127,179,71,0,37,237,254,255,100,186,240,0,5,57,71,254,103,72,73,255,244,18,81,254,229,210,132,255,238,6,180,255,11,229,174,255,227,221,192,1,17,49,28,0,163,215,196,254,9,118,4,255,51,240,71,0,113,129,109,255,76,240,231,0,188,177,127,0,125,71,44,1,26,175,243,0,94,169,25,254,27,230,29,0,15,139,119,1,168,170,186,255,172,197,76,255,252,75,188,0,137,124,196,0,72,22,96,255,45,151,249,1,220,145,100,0,64,192,159,255,120,239,226,0,129,178,146,0,0,192,125,0,235,138,234,0,183,157,146,0,83,199,192,255,184,172,72,255,73,225,128,0,77,6,250,255,186,65,67,0,104,246,207,0,188,32,138,255,218,24,242,0,67,138,81,254,237,129,121,255,20,207,150,1,41,199,16,255,6,20,128,0,159,118,5,0,181,16,143,255,220,38,15,0,23,64,147,254,73,26,13,0,87,228,57,1,204,124,128,0,43,24,223,0,219,99,199,0,22,75,20,255,19,27,126,0,157,62,215,0,110,29,230,0,179,167,255,1,54,252,190,0,221,204,182,254,179,158,65,255,81,157,3,0,194,218,159,0,170,223,0,0,224,11,32,255,38,197,98,0,168,164,37,0,23,88,7,1,164,186,110,0,96,36,134,0,234,242,229,0,250,121,19,0,242,254,112,255,3,47,94,1,9,239,6,255,81,134,153,254,214,253,168,255,67,124,224,0,245,95,74,0,28,30,44,254,1,109,220,255,178,89,89,0,252,36,76,0,24,198,46,255,76,77,111,0,134,234,136,255,39,94,29,0,185,72,234,255,70,68,135,255,231,102,7,254,77,231,140,0,167,47,58,1,148,97,118,255,16,27,225,1,166,206,143,255,110,178,214,255,180,131,162,0,143,141,225,1,13,218,78,255,114,153,33,1,98,104,204,0,175,114,117,1,167,206,75,0,202,196,83,1,58,64,67,0,138,47,111,1,196,247,128,255,137,224,224,254,158,112,207,0,154,100,255,1,134,37,107,0,198,128,79,255,127,209,155,255,163,254,185,254,60,14,243,0,31,219,112,254,29,217,65,0,200,13,116,254,123,60,196,255,224,59,184,254,242,89,196,0,123,16,75,254,149,16,206,0,69,254,48,1,231,116,223,255,209,160,65,1,200,80,98,0,37,194,184,254,148,63,34,0,139,240,65,255,217,144,132,255,56,38,45,254,199,120,210,0,108,177,166,255,160,222,4,0,220,126,119,254,165,107,160,255,82,220,248,1,241,175,136,0,144,141,23,255,169,138,84,0,160,137,78,255,226,118,80,255,52,27,132,255,63,96,139,255,152,250,39,0,188,155,15,0,232,51,150,254,40,15,232,255,240,229,9,255,137,175,27,255,75,73,97,1,218,212,11,0,135,5,162,1,107,185,213,0,2,249,107,255,40,242,70,0,219,200,25,0,25,157,13,0,67,82,80,255,196,249,23,255,145,20,149,0,50,72,146,0,94,76,148,1,24,251,65,0,31,192,23,0,184,212,201,255,123,233,162,1,247,173,72,0,162,87,219,254,126,134,89,0,159,11,12,254,166,105,29,0,73,27,228,1,113,120,183,255,66,163,109,1,212,143,11,255,159,231,168,1,255,128,90,0,57,14,58,254,89,52,10,255,253,8,163,1,0,145,210,255,10,129,85,1,46,181,27,0,103,136,160,254,126,188,209,255,34,35,111,0,215,219,24,255,212,11,214,254,101,5,118,0,232,197,133,255,223,167,109,255,237,80,86,255,70,139,94,0,158,193,191,1,155,15,51,255,15,190,115,0,78,135,207,255,249,10,27,1,181,125,233,0,95,172,13,254,170,213,161,255,39,236,138,255,95,93,87,255,190,128,95,0,125,15,206,0,166,150,159,0,227,15,158,255,206,158,120,255,42,141,128,0,101,178,120,1,156,109,131,0,218,14,44,254,247,168,206,255,212,112,28,0,112,17,228,255,90,16,37,1,197,222,108,0,254,207,83,255,9,90,243,255,243,244,172,0,26,88,115,255,205,116,122,0,191,230,193,0,180,100,11,1,217,37,96,255,154,78,156,0,235,234,31,255,206,178,178,255,149,192,251,0,182,250,135,0,246,22,105,0,124,193,109,255,2,210,149,255,169,17,170,0,0,96,110,255,117,9,8,1,50,123,40,255,193,189,99,0,34,227,160,0,48,80,70,254,211,51,236,0,45,122,245,254,44,174,8,0,173,37,233,255,158,65,171,0,122,69,215,255,90,80,2,255,131,106,96,254,227,114,135,0,205,49,119,254,176,62,64,255,82,51,17,255,241,20,243,255,130,13,8,254,128,217,243,255,162,27,1,254,90,118,241,0,246,198,246,255,55,16,118,255,200,159,157,0,163,17,1,0,140,107,121,0,85,161,118,255,38,0,149,0,156,47,238,0,9,166,166,1,75,98,181,255,50,74,25,0,66,15,47,0,139,225,159,0,76,3,142,255,14,238,184,0,11,207,53,255,183,192,186,1,171,32,174,255,191,76,221,1,247,170,219,0,25,172,50,254,217,9,233,0,203,126,68,255,183,92,48,0,127,167,183,1,65,49,254,0,16,63,127,1,254,21,170,255,59,224,127,254,22,48,63,255,27,78,130,254,40,195,29,0,250,132,112,254,35,203,144,0,104,169,168,0,207,253,30,255,104,40,38,254,94,228,88,0,206,16,128,255,212,55,122,255,223,22,234,0,223,197,127,0,253,181,181,1,145,102,118,0,236,153,36,255,212,217,72,255,20,38,24,254,138,62,62,0,152,140,4,0,230,220,99,255,1,21,212,255,148,201,231,0,244,123,9,254,0,171,210,0,51,58,37,255,1,255,14,255,244,183,145,254,0,242,166,0,22,74,132,0,121,216,41,0,95,195,114,254,133,24,151,255,156,226,231,255,247,5,77,255,246,148,115,254,225,92,81,255,222,80,246,254,170,123,89,255,74,199,141,0,29,20,8,255,138,136,70,255,93,75,92,0,221,147,49,254,52,126,226,0,229,124,23,0,46,9,181,0,205,64,52,1,131,254,28,0,151,158,212,0,131,64,78,0,206,25,171,0,0,230,139,0,191,253,110,254,103,247,167,0,64,40,40,1,42,165,241,255,59,75,228,254,124,243,189,255,196,92,178,255,130,140,86,255,141,89,56,1,147,198,5,255,203,248,158,254,144,162,141,0,11,172,226,0,130,42,21,255,1,167,143,255,144,36,36,255,48,88,164,254,168,170,220,0,98,71,214,0,91,208,79,0,159,76,201,1,166,42,214,255,69,255,0,255,6,128,125,255,190,1,140,0,146,83,218,255,215,238,72,1,122,127,53,0,189,116,165,255,84,8,66,255,214,3,208,255,213,110,133,0,195,168,44,1,158,231,69,0,162,64,200,254,91,58,104,0,182,58,187,254,249,228,136,0,203,134,76,254,99,221,233,0,75,254,214,254,80,69,154,0,64,152,248,254,236,136,202,255,157,105,153,254,149,175,20,0,22,35,19,255,124,121,233,0,186,250,198,254,132,229,139,0,137,80,174,255,165,125,68,0,144,202,148,254,235,239,248,0,135,184,118,0,101,94,17,255,122,72,70,254,69,130,146,0,127,222,248,1,69,127,118,255,30,82,215,254,188,74,19,255,229,167,194,254,117,25,66,255,65,234,56,254,213,22,156,0,151,59,93,254,45,28,27,255,186,126,164,255,32,6,239,0,127,114,99,1,219,52,2,255,99,96,166,254,62,190,126,255,108,222,168,1,75,226,174,0,230,226,199,0,60,117,218,255,252,248,20,1,214,188,204,0,31,194,134,254,123,69,192,255,169,173,36,254,55,98,91,0,223,42,102,254,137,1,102,0,157,90,25,0,239,122,64,255,252,6,233,0,7,54,20,255,82,116,174,0,135,37,54,255,15,186,125,0,227,112,175,255,100,180,225,255,42,237,244,255,244,173,226,254,248,18,33,0,171,99,150,255,74,235,50,255,117,82,32,254,106,168,237,0,207,109,208,1,228,9,186,0,135,60,169,254,179,92,143,0,244,170,104,255,235,45,124,255,70,99,186,0,117,137,183,0,224,31,215,0,40,9,100,0,26,16,95,1,68,217,87,0,8,151,20,255,26,100,58,255,176,165,203,1,52,118,70,0,7,32,254,254,244,254,245,255,167,144,194,255,125,113,23,255,176,121,181,0,136,84,209,0,138,6,30,255,89,48,28,0,33,155,14,255,25,240,154,0,141,205,109,1,70,115,62,255,20,40,107,254,138,154,199,255,94,223,226,255,157,171,38,0,163,177,25,254,45,118,3,255,14,222,23,1,209,190,81,255,118,123,232,1,13,213,101,255,123,55,123,254,27,246,165,0,50,99,76,255,140,214,32,255,97,65,67,255,24,12,28,0,174,86,78,1,64,247,96,0,160,135,67,0,66,55,243,255,147,204,96,255,26,6,33,255,98,51,83,1,153,213,208,255,2,184,54,255,25,218,11,0,49,67,246,254,18,149,72,255,13,25,72,0,42,79,214,0,42,4,38,1,27,139,144,255,149,187,23,0,18,164,132,0,245,84,184,254,120,198,104,255,126,218,96,0,56,117,234,255,13,29,214,254,68,47,10,255,167,154,132,254,152,38,198,0,66,178,89,255,200,46,171,255,13,99,83,255,210,187,253,255,170,45,42,1,138,209,124,0,214,162,141,0,12,230,156,0,102,36,112,254,3,147,67,0,52,215,123,255,233,171,54,255,98,137,62,0,247,218,39,255,231,218,236,0,247,191,127,0,195,146,84,0,165,176,92,255,19,212,94,255,17,74,227,0,88,40,153,1,198,147,1,255,206,67,245,254,240,3,218,255,61,141,213,255,97,183,106,0,195,232,235,254,95,86,154,0,209,48,205,254,118,209,241,255,240,120,223,1,213,29,159,0,163,127,147,255,13,218,93,0,85,24,68,254,70,20,80,255,189,5,140,1,82,97,254,255,99,99,191,255,132,84,133,255,107,218,116,255,112,122,46,0,105,17,32,0,194,160,63,255,68,222,39,1,216,253,92,0,177,105,205,255,149,201,195,0,42,225,11,255,40,162,115,0,9,7,81,0,165,218,219,0,180,22,0,254,29,146,252,255,146,207,225,1,180,135,96,0,31,163,112,0,177,11,219,255,133,12,193,254,43,78,50,0,65,113,121,1,59,217,6,255,110,94,24,1,112,172,111,0,7,15,96,0,36,85,123,0,71,150,21,255,208,73,188,0,192,11,167,1,213,245,34,0,9,230,92,0,162,142,39,255,215,90,27,0,98,97,89,0,94,79,211,0,90,157,240,0,95,220,126,1,102,176,226,0,36,30,224,254,35,31,127,0,231,232,115,1,85,83,130,0,210,73,245,255,47,143,114,255,68,65,197,0,59,72,62,255,183,133,173,254,93,121,118,255,59,177,81,255,234,69,173,255,205,128,177,0,220,244,51,0,26,244,209,1,73,222,77,255,163,8,96,254,150,149,211,0,158,254,203,1,54,127,139,0,161,224,59,0,4,109,22,255,222,42,45,255,208,146,102,255,236,142,187,0,50,205,245,255,10,74,89,254,48,79,142,0,222,76,130,255,30,166,63,0,236,12,13,255,49,184,244,0,187,113,102,0,218,101,253,0,153,57,182,254,32,150,42,0,25,198,146,1,237,241,56,0,140,68,5,0,91,164,172,255,78,145,186,254,67,52,205,0,219,207,129,1,109,115,17,0,54,143,58,1,21,248,120,255,179,255,30,0,193,236,66,255,1,255,7,255,253,192,48,255,19,69,217,1,3,214,0,255,64,101,146,1,223,125,35,255,235,73,179,255,249,167,226,0,225,175,10,1,97,162,58,0,106,112,171,1,84,172,5,255,133,140,178,255,134,245,142,0,97,90,125,255,186,203,185,255,223,77,23,255,192,92,106,0,15,198,115,255,217,152,248,0,171,178,120,255,228,134,53,0,176,54,193,1,250,251,53,0,213,10,100,1,34,199,106,0,151,31,244,254,172,224,87,255,14,237,23,255,253,85,26,255,127,39,116,255,172,104,100,0,251,14,70,255,212,208,138,255,253,211,250,0,176,49,165,0,15,76,123,255,37,218,160,255,92,135,16,1,10,126,114,255,70,5,224,255,247,249,141,0,68,20,60,1,241,210,189,255,195,217,187,1,151,3,113,0,151,92,174,0,231,62,178,255,219,183,225,0,23,23,33,255,205,181,80,0,57,184,248,255,67,180,1,255,90,123,93,255,39,0,162,255,96,248,52,255,84,66,140,0,34,127,228,255,194,138,7,1,166,110,188,0,21,17,155,1,154,190,198,255,214,80,59,255,18,7,143,0,72,29,226,1,199,217,249,0,232,161,71,1,149,190,201,0,217,175,95,254,113,147,67,255,138,143,199,255,127,204,1,0,29,182,83,1,206,230,155,255,186,204,60,0,10,125,85,255,232,96,25,255,255,89,247,255,213,254,175,1,232,193,81,0,28,43,156,254,12,69,8,0,147,24,248,0,18,198,49,0,134,60,35,0,118,246,18,255,49,88,254,254,228,21,186,255,182,65,112,1,219,22,1,255,22,126,52,255,189,53,49,255,112,25,143,0,38,127,55,255,226,101,163,254,208,133,61,255,137,69,174,1,190,118,145,255,60,98,219,255,217,13,245,255,250,136,10,0,84,254,226,0,201,31,125,1,240,51,251,255,31,131,130,255,2,138,50,255,215,215,177,1,223,12,238,255,252,149,56,255,124,91,68,255,72,126,170,254,119,255,100,0,130,135,232,255,14,79,178,0,250,131,197,0,138,198,208,0,121,216,139,254,119,18,36,255,29,193,122,0,16,42,45,255,213,240,235,1,230,190,169,255,198,35,228,254,110,173,72,0,214,221,241,255,56,148,135,0,192,117,78,254,141,93,207,255,143,65,149,0,21,18,98,255,95,44,244,1,106,191,77,0,254,85,8,254,214,110,176,255,73,173,19,254,160,196,199,255,237,90,144,0,193,172,113,255,200,155,136,254,228,90,221,0,137,49,74,1,164,221,215,255,209,189,5,255,105,236,55,255,42,31,129,1,193,255,236,0,46,217,60,0,138,88,187,255,226,82,236,255,81,69,151,255,142,190,16,1,13,134,8,0,127,122,48,255,81,64,156,0,171,243,139,0,237,35,246,0,122,143,193,254,212,122,146,0,95,41,255,1,87,132,77,0,4,212,31,0,17,31,78,0,39,45,173,254,24,142,217,255,95,9,6,255,227,83,6,0,98,59,130,254,62,30,33,0,8,115,211,1,162,97,128,255,7,184,23,254,116,28,168,255,248,138,151,255,98,244,240,0,186,118,130,0,114,248,235,255,105,173,200,1,160,124,71,255,94,36,164,1,175,65,146,255,238,241,170,254,202,198,197,0,228,71,138,254,45,246,109,255,194,52,158,0,133,187,176,0,83,252,154,254,89,189,221,255,170,73,252,0,148,58,125,0,36,68,51,254,42,69,177,255,168,76,86,255,38,100,204,255,38,53,35,0,175,19,97,0,225,238,253,255,81,81,135,0,210,27,255,254,235,73,107,0,8,207,115,0,82,127,136,0,84,99,21,254,207,19,136,0,100,164,101,0,80,208,77,255,132,207,237,255,15,3,15,255,33,166,110,0,156,95,85,255,37,185,111,1,150,106,35,255,166,151,76,0,114,87,135,255,159,194,64,0,12,122,31,255,232,7,101,254,173,119,98,0,154,71,220,254,191,57,53,255,168,232,160,255,224,32,99,255,218,156,165,0,151,153,163,0,217,13,148,1,197,113,89,0,149,28,161,254,207,23,30,0,105,132,227,255,54,230,94,255,133,173,204,255,92,183,157,255,88,144,252,254,102,33,90,0,159,97,3,0,181,218,155,255,240,114,119,0,106,214,53,255,165,190,115,1,152,91,225,255,88,106,44,255,208,61,113,0,151,52,124,0,191,27,156,255,110,54,236,1,14,30,166,255,39,127,207,1,229,199,28,0,188,228,188,254,100,157,235,0,246,218,183,1,107,22,193,255,206,160,95,0,76,239,147,0,207,161,117,0,51,166,2,255,52,117,10,254,73,56,227,255,152,193,225,0,132,94,136,255,101,191,209,0,32,107,229,255,198,43,180,1,100,210,118,0,114,67,153,255,23,88,26,255,89,154,92,1,220,120,140,255,144,114,207,255,252,115,250,255,34,206,72,0,138,133,127,255,8,178,124,1,87,75,97,0,15,229,92,254,240,67,131,255,118,123,227,254,146,120,104,255,145,213,255,1,129,187,70,255,219,119,54,0,1,19,173,0,45,150,148,1,248,83,72,0,203,233,169,1,142,107,56,0,247,249,38,1,45,242,80,255,30,233,103,0,96,82,70,0,23,201,111,0,81,39,30,255,161,183,78,255,194,234,33,255,68,227,140,254,216,206,116,0,70,27,235,255,104,144,79,0,164,230,93,254,214,135,156,0,154,187,242,254,188,20,131,255,36,109,174,0,159,112,241,0,5,110,149,1,36,165,218,0,166,29,19,1,178,46,73,0,93,43,32,254,248,189,237,0,102,155,141,0,201,93,195,255,241,139,253,255,15,111,98,255,108,65,163,254,155,79,190,255,73,174,193,254,246,40,48,255,107,88,11,254,202,97,85,255,253,204,18,255,113,242,66,0,110,160,194,254,208,18,186,0,81,21,60,0,188,104,167,255,124,166,97,254,210,133,142,0,56,242,137,254,41,111,130,0,111,151,58,1,111,213,141,255,183,172,241,255,38,6,196,255,185,7,123,255,46,11,246,0,245,105,119,1,15,2,161,255,8,206,45,255,18,202,74,255,83,124,115,1,212,141,157,0,83,8,209,254,139,15,232,255,172,54,173,254,50,247,132,0,214,189,213,0,144,184,105,0,223,254,248,0,255,147,240,255,23,188,72,0,7,51,54,0,188,25,180,254,220,180,0,255,83,160,20,0,163,189,243,255,58,209,194,255,87,73,60,0,106,24,49,0,245,249,220,0,22,173,167,0,118,11,195,255,19,126,237,0,110,159,37,255,59,82,47,0,180,187,86,0,188,148,208,1,100,37,133,255,7,112,193,0,129,188,156,255,84,106,129,255,133,225,202,0,14,236,111,255,40,20,101,0,172,172,49,254,51,54,74,255,251,185,184,255,93,155,224,255,180,249,224,1,230,178,146,0,72,57,54,254,178,62,184,0,119,205,72,0,185,239,253,255,61,15,218,0,196,67,56,255,234,32,171,1,46,219,228,0,208,108,234,255,20,63,232,255,165,53,199,1,133,228,5,255,52,205,107,0,74,238,140,255,150,156,219,254,239,172,178,255,251,189,223,254,32,142,211,255,218,15,138,1,241,196,80,0,28,36,98,254,22,234,199,0,61,237,220,255,246,57,37,0,142,17,142,255,157,62,26,0,43,238,95,254,3,217,6,255,213,25,240,1,39,220,174,255,154,205,48,254,19,13,192,255,244,34,54,254,140,16,155,0,240,181,5,254,155,193,60,0,166,128,4,255,36,145,56,255,150,240,219,0,120,51,145,0,82,153,42,1,140,236,146,0,107,92,248,1,189,10,3,0,63,136,242,0,211,39,24,0,19,202,161,1,173,27,186,255,210,204,239,254,41,209,162,255,182,254,159,255,172,116,52,0,195,103,222,254,205,69,59,0,53,22,41,1,218,48,194,0,80,210,242,0,210,188,207,0,187,161,161,254,216,17,1,0,136,225,113,0,250,184,63,0,223,30,98,254,77,168,162,0,59,53,175,0,19,201,10,255,139,224,194,0,147,193,154,255,212,189,12,254,1,200,174,255,50,133,113,1,94,179,90,0,173,182,135,0,94,177,113,0,43,89,215,255,136,252,106,255,123,134,83,254,5,245,66,255,82,49,39,1,220,2,224,0,97,129,177,0,77,59,89,0,61,29,155,1,203,171,220,255,92,78,139,0,145,33,181,255,169,24,141,1,55,150,179,0,139,60,80,255,218,39,97,0,2,147,107,255,60,248,72,0,173,230,47,1,6,83,182,255,16,105,162,254,137,212,81,255,180,184,134,1,39,222,164,255,221,105,251,1,239,112,125,0,63,7,97,0,63,104,227,255,148,58,12,0,90,60,224,255,84,212,252,0,79,215,168,0,248,221,199,1,115,121,1,0,36,172,120,0,32,162,187,255,57,107,49,255,147,42,21,0,106,198,43,1,57,74,87,0,126,203,81,255,129,135,195,0,140,31,177,0,221,139,194,0,3,222,215,0,131,68,231,0,177,86,178,254,124,151,180,0,184,124,38,1,70,163,17,0,249,251,181,1,42,55,227,0,226,161,44,0,23,236,110,0,51,149,142,1,93,5,236,0,218,183,106,254,67,24,77,0,40,245,209,255,222,121,153,0,165,57,30,0,83,125,60,0,70,38,82,1,229,6,188,0,109,222,157,255,55,118,63,255,205,151,186,0,227,33,149,255,254,176,246,1,227,177,227,0,34,106,163,254,176,43,79,0,106,95,78,1,185,241,122,255,185,14,61,0,36,1,202,0,13,178,162,255,247,11,132,0,161,230,92,1,65,1,185,255,212,50,165,1,141,146,64,255,158,242,218,0,21,164,125,0,213,139,122,1,67,71,87,0,203,158,178,1,151,92,43,0,152,111,5,255,39,3,239,255,217,255,250,255,176,63,71,255,74,245,77,1,250,174,18,255,34,49,227,255,246,46,251,255,154,35,48,1,125,157,61,255,106,36,78,255,97,236,153,0,136,187,120,255,113,134,171,255,19,213,217,254,216,94,209,255,252,5,61,0,94,3,202,0,3,26,183,255,64,191,43,255,30,23,21,0,129,141,77,255,102,120,7,1,194,76,140,0,188,175,52,255,17,81,148,0,232,86,55,1,225,48,172,0,134,42,42,255,238,50,47,0,169,18,254,0,20,147,87,255,14,195,239,255,69,247,23,0,238,229,128,255,177,49,112,0,168,98,251,255,121,71,248,0,243,8,145,254,246,227,153,255,219,169,177,254,251,139,165,255,12,163,185,255,164,40,171,255,153,159,27,254,243,109,91,255,222,24,112,1,18,214,231,0,107,157,181,254,195,147,0,255,194,99,104,255,89,140,190,255,177,66,126,254,106,185,66,0,49,218,31,0,252,174,158,0,188,79,230,1,238,41,224,0,212,234,8,1,136,11,181,0,166,117,83,255,68,195,94,0,46,132,201,0,240,152,88,0,164,57,69,254,160,224,42,255,59,215,67,255,119,195,141,255,36,180,121,254,207,47,8,255,174,210,223,0,101,197,68,255,255,82,141,1,250,137,233,0,97,86,133,1,16,80,69,0,132,131,159,0,116,93,100,0,45,141,139,0,152,172,157,255,90,43,91,0,71,153,46,0,39,16,112,255,217,136,97,255,220,198,25,254,177,53,49,0,222,88,134,255,128,15,60,0,207,192,169,255,192,116,209,255,106,78,211,1,200,213,183,255,7,12,122,254,222,203,60,255,33,110,199,254,251,106,117,0,228,225,4,1,120,58,7,255,221,193,84,254,112,133,27,0,189,200,201,255,139,135,150,0,234,55,176,255,61,50,65,0,152,108,169,255,220,85,1,255,112,135,227,0,162,26,186,0,207,96,185,254,244,136,107,0,93,153,50,1,198,97,151,0,110,11,86,255,143,117,174,255,115,212,200,0,5,202,183,0,237,164,10,254,185,239,62,0,236,120,18,254,98,123,99,255,168,201,194,254,46,234,214,0,191,133,49,255,99,169,119,0,190,187,35,1,115,21,45,255,249,131,72,0,112,6,123,255,214,49,181,254,166,233,34,0,92,197,102,254,253,228,205,255,3,59,201,1,42,98,46,0,219,37,35,255,169,195,38,0,94,124,193,1,156,43,223,0,95,72,133,254,120,206,191,0,122,197,239,255,177,187,79,255,254,46,2,1,250,167,190,0,84,129,19,0,203,113,166,255,249,31,189,254,72,157,202,255,208,71,73,255,207,24,72,0,10,16,18,1,210,81,76,255,88,208,192,255,126,243,107,255,238,141,120,255,199,121,234,255,137,12,59,255,36,220,123,255,148,179,60,254,240,12,29,0,66,0,97,1,36,30,38,255,115,1,93,255,96,103,231,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); +/* memory initializer */ allocate([197,158,59,1,192,164,240,0,202,202,57,255,24,174,48,0,89,77,155,1,42,76,215,0,244,151,233,0,23,48,81,0,239,127,52,254,227,130,37,255,248,116,93,1,124,132,118,0,173,254,192,1,6,235,83,255,110,175,231,1,251,28,182,0,129,249,93,254,84,184,128,0,76,181,62,0,175,128,186,0,100,53,136,254,109,29,226,0,221,233,58,1,20,99,74,0,0,22,160,0,134,13,21,0,9,52,55,255,17,89,140,0,175,34,59,0,84,165,119,255,224,226,234,255,7,72,166,255,123,115,255,1,18,214,246,0,250,7,71,1,217,220,185,0,212,35,76,255,38,125,175,0,189,97,210,0,114,238,44,255,41,188,169,254,45,186,154,0,81,92,22,0,132,160,193,0,121,208,98,255,13,81,44,255,203,156,82,0,71,58,21,255,208,114,191,254,50,38,147,0,154,216,195,0,101,25,18,0,60,250,215,255,233,132,235,255,103,175,142,1,16,14,92,0,141,31,110,254,238,241,45,255,153,217,239,1,97,168,47,255,249,85,16,1,28,175,62,255,57,254,54,0,222,231,126,0,166,45,117,254,18,189,96,255,228,76,50,0,200,244,94,0,198,152,120,1,68,34,69,255,12,65,160,254,101,19,90,0,167,197,120,255,68,54,185,255,41,218,188,0,113,168,48,0,88,105,189,1,26,82,32,255,185,93,164,1,228,240,237,255,66,182,53,0,171,197,92,255,107,9,233,1,199,120,144,255,78,49,10,255,109,170,105,255,90,4,31,255,28,244,113,255,74,58,11,0,62,220,246,255,121,154,200,254,144,210,178,255,126,57,129,1,43,250,14,255,101,111,28,1,47,86,241,255,61,70,150,255,53,73,5,255,30,26,158,0,209,26,86,0,138,237,74,0,164,95,188,0,142,60,29,254,162,116,248,255,187,175,160,0,151,18,16,0,209,111,65,254,203,134,39,255,88,108,49,255,131,26,71,255,221,27,215,254,104,105,93,255,31,236,31,254,135,0,211,255,143,127,110,1,212,73,229,0,233,67,167,254,195,1,208,255,132,17,221,255,51,217,90,0,67,235,50,255,223,210,143,0,179,53,130,1,233,106,198,0,217,173,220,255,112,229,24,255,175,154,93,254,71,203,246,255,48,66,133,255,3,136,230,255,23,221,113,254,235,111,213,0,170,120,95,254,251,221,2,0,45,130,158,254,105,94,217,255,242,52,180,254,213,68,45,255,104,38,28,0,244,158,76,0,161,200,96,255,207,53,13,255,187,67,148,0,170,54,248,0,119,162,178,255,83,20,11,0,42,42,192,1,146,159,163,255,183,232,111,0,77,229,21,255,71,53,143,0,27,76,34,0,246,136,47,255,219,39,182,255,92,224,201,1,19,142,14,255,69,182,241,255,163,118,245,0,9,109,106,1,170,181,247,255,78,47,238,255,84,210,176,255,213,107,139,0,39,38,11,0,72,21,150,0,72,130,69,0,205,77,155,254,142,133,21,0,71,111,172,254,226,42,59,255,179,0,215,1,33,128,241,0,234,252,13,1,184,79,8,0,110,30,73,255,246,141,189,0,170,207,218,1,74,154,69,255,138,246,49,255,155,32,100,0,125,74,105,255,90,85,61,255,35,229,177,255,62,125,193,255,153,86,188,1,73,120,212,0,209,123,246,254,135,209,38,255,151,58,44,1,92,69,214,255,14,12,88,255,252,153,166,255,253,207,112,255,60,78,83,255,227,124,110,0,180,96,252,255,53,117,33,254,164,220,82,255,41,1,27,255,38,164,166,255,164,99,169,254,61,144,70,255,192,166,18,0,107,250,66,0,197,65,50,0,1,179,18,255,255,104,1,255,43,153,35,255,80,111,168,0,110,175,168,0,41,105,45,255,219,14,205,255,164,233,140,254,43,1,118,0,233,67,195,0,178,82,159,255,138,87,122,255,212,238,90,255,144,35,124,254,25,140,164,0,251,215,44,254,133,70,107,255,101,227,80,254,92,169,55,0,215,42,49,0,114,180,85,255,33,232,27,1,172,213,25,0,62,176,123,254,32,133,24,255,225,191,62,0,93,70,153,0,181,42,104,1,22,191,224,255,200,200,140,255,249,234,37,0,149,57,141,0,195,56,208,255,254,130,70,255,32,173,240,255,29,220,199,0,110,100,115,255,132,229,249,0,228,233,223,255,37,216,209,254,178,177,209,255,183,45,165,254,224,97,114,0,137,97,168,255,225,222,172,0,165,13,49,1,210,235,204,255,252,4,28,254,70,160,151,0,232,190,52,254,83,248,93,255,62,215,77,1,175,175,179,255,160,50,66,0,121,48,208,0,63,169,209,255,0,210,200,0,224,187,44,1,73,162,82,0,9,176,143,255,19,76,193,255,29,59,167,1,24,43,154,0,28,190,190,0,141,188,129,0,232,235,203,255,234,0,109,255,54,65,159,0,60,88,232,255,121,253,150,254,252,233,131,255,198,110,41,1,83,77,71,255,200,22,59,254,106,253,242,255,21,12,207,255,237,66,189,0,90,198,202,1,225,172,127,0,53,22,202,0,56,230,132,0,1,86,183,0,109,190,42,0,243,68,174,1,109,228,154,0,200,177,122,1,35,160,183,255,177,48,85,255,90,218,169,255,248,152,78,0,202,254,110,0,6,52,43,0,142,98,65,255,63,145,22,0,70,106,93,0,232,138,107,1,110,179,61,255,211,129,218,1,242,209,92,0,35,90,217,1,182,143,106,255,116,101,217,255,114,250,221,255,173,204,6,0,60,150,163,0,73,172,44,255,239,110,80,255,237,76,153,254,161,140,249,0,149,232,229,0,133,31,40,255,174,164,119,0,113,51,214,0,129,228,2,254,64,34,243,0,107,227,244,255,174,106,200,255,84,153,70,1,50,35,16,0,250,74,216,254,236,189,66,255,153,249,13,0,230,178,4,255,221,41,238,0,118,227,121,255,94,87,140,254,254,119,92,0,73,239,246,254,117,87,128,0,19,211,145,255,177,46,252,0,229,91,246,1,69,128,247,255,202,77,54,1,8,11,9,255,153,96,166,0,217,214,173,255,134,192,2,1,0,207,0,0,189,174,107,1,140,134,100,0,158,193,243,1,182,102,171,0,235,154,51,0,142,5,123,255,60,168,89,1,217,14,92,255,19,214,5,1,211,167,254,0,44,6,202,254,120,18,236,255,15,113,184,255,184,223,139,0,40,177,119,254,182,123,90,255,176,165,176,0,247,77,194,0,27,234,120,0,231,0,214,255,59,39,30,0,125,99,145,255,150,68,68,1,141,222,248,0,153,123,210,255,110,127,152,255,229,33,214,1,135,221,197,0,137,97,2,0,12,143,204,255,81,41,188,0,115,79,130,255,94,3,132,0,152,175,187,255,124,141,10,255,126,192,179,255,11,103,198,0,149,6,45,0,219,85,187,1,230,18,178,255,72,182,152,0,3,198,184,255,128,112,224,1,97,161,230,0,254,99,38,255,58,159,197,0,151,66,219,0,59,69,143,255,185,112,249,0,119,136,47,255,123,130,132,0,168,71,95,255,113,176,40,1,232,185,173,0,207,93,117,1,68,157,108,255,102,5,147,254,49,97,33,0,89,65,111,254,247,30,163,255,124,217,221,1,102,250,216,0,198,174,75,254,57,55,18,0,227,5,236,1,229,213,173,0,201,109,218,1,49,233,239,0,30,55,158,1,25,178,106,0,155,111,188,1,94,126,140,0,215,31,238,1,77,240,16,0,213,242,25,1,38,71,168,0,205,186,93,254,49,211,140,255,219,0,180,255,134,118,165,0,160,147,134,255,110,186,35,255,198,243,42,0,243,146,119,0,134,235,163,1,4,241,135,255,193,46,193,254,103,180,79,255,225,4,184,254,242,118,130,0,146,135,176,1,234,111,30,0,69,66,213,254,41,96,123,0,121,94,42,255,178,191,195,255,46,130,42,0,117,84,8,255,233,49,214,254,238,122,109,0,6,71,89,1,236,211,123,0,244,13,48,254,119,148,14,0,114,28,86,255,75,237,25,255,145,229,16,254,129,100,53,255,134,150,120,254,168,157,50,0,23,72,104,255,224,49,14,0,255,123,22,255,151,185,151,255,170,80,184,1,134,182,20,0,41,100,101,1,153,33,16,0,76,154,111,1,86,206,234,255,192,160,164,254,165,123,93,255,1,216,164,254,67,17,175,255,169,11,59,255,158,41,61,255,73,188,14,255,195,6,137,255,22,147,29,255,20,103,3,255,246,130,227,255,122,40,128,0,226,47,24,254,35,36,32,0,152,186,183,255,69,202,20,0,195,133,195,0,222,51,247,0,169,171,94,1,183,0,160,255,64,205,18,1,156,83,15,255,197,58,249,254,251,89,110,255,50,10,88,254,51,43,216,0,98,242,198,1,245,151,113,0,171,236,194,1,197,31,199,255,229,81,38,1,41,59,20,0,253,104,230,0,152,93,14,255,246,242,146,254,214,169,240,255,240,102,108,254,160,167,236,0,154,218,188,0,150,233,202,255,27,19,250,1,2,71,133,255,175,12,63,1,145,183,198,0,104,120,115,255,130,251,247,0,17,212,167,255,62,123,132,255,247,100,189,0,155,223,152,0,143,197,33,0,155,59,44,255,150,93,240,1,127,3,87,255,95,71,207,1,167,85,1,255,188,152,116,255,10,23,23,0,137,195,93,1,54,98,97,0,240,0,168,255,148,188,127,0,134,107,151,0,76,253,171,0,90,132,192,0,146,22,54,0,224,66,54,254,230,186,229,255,39,182,196,0,148,251,130,255,65,131,108,254,128,1,160,0,169,49,167,254,199,254,148,255,251,6,131,0,187,254,129,255,85,82,62,0,178,23,58,255,254,132,5,0,164,213,39,0,134,252,146,254,37,53,81,255,155,134,82,0,205,167,238,255,94,45,180,255,132,40,161,0,254,111,112,1,54,75,217,0,179,230,221,1,235,94,191,255,23,243,48,1,202,145,203,255,39,118,42,255,117,141,253,0,254,0,222,0,43,251,50,0,54,169,234,1,80,68,208,0,148,203,243,254,145,7,135,0,6,254,0,0,252,185,127,0,98,8,129,255,38,35,72,255,211,36,220,1,40,26,89,0,168,64,197,254,3,222,239,255,2,83,215,254,180,159,105,0,58,115,194,0,186,116,106,255,229,247,219,255,129,118,193,0,202,174,183,1,166,161,72,0,201,107,147,254,237,136,74,0,233,230,106,1,105,111,168,0,64,224,30,1,1,229,3,0,102,151,175,255,194,238,228,255,254,250,212,0,187,237,121,0,67,251,96,1,197,30,11,0,183,95,204,0,205,89,138,0,64,221,37,1,255,223,30,255,178,48,211,255,241,200,90,255,167,209,96,255,57,130,221,0,46,114,200,255,61,184,66,0,55,182,24,254,110,182,33,0,171,190,232,255,114,94,31,0,18,221,8,0,47,231,254,0,255,112,83,0,118,15,215,255,173,25,40,254,192,193,31,255,238,21,146,255,171,193,118,255,101,234,53,254,131,212,112,0,89,192,107,1,8,208,27,0,181,217,15,255,231,149,232,0,140,236,126,0,144,9,199,255,12,79,181,254,147,182,202,255,19,109,182,255,49,212,225,0,74,163,203,0,175,233,148,0,26,112,51,0,193,193,9,255,15,135,249,0,150,227,130,0,204,0,219,1,24,242,205,0,238,208,117,255,22,244,112,0,26,229,34,0,37,80,188,255,38,45,206,254,240,90,225,255,29,3,47,255,42,224,76,0,186,243,167,0,32,132,15,255,5,51,125,0,139,135,24,0,6,241,219,0,172,229,133,255,246,214,50,0,231,11,207,255,191,126,83,1,180,163,170,255,245,56,24,1,178,164,211,255,3,16,202,1,98,57,118,255,141,131,89,254,33,51,24,0,243,149,91,255,253,52,14,0,35,169,67,254,49,30,88,255,179,27,36,255,165,140,183,0,58,189,151,0,88,31,0,0,75,169,66,0,66,101,199,255,24,216,199,1,121,196,26,255,14,79,203,254,240,226,81,255,94,28,10,255,83,193,240,255,204,193,131,255,94,15,86,0,218,40,157,0,51,193,209,0,0,242,177,0,102,185,247,0,158,109,116,0,38,135,91,0,223,175,149,0,220,66,1,255,86,60,232,0,25,96,37,255,225,122,162,1,215,187,168,255,158,157,46,0,56,171,162,0,232,240,101,1,122,22,9,0,51,9,21,255,53,25,238,255,217,30,232,254,125,169,148,0,13,232,102,0,148,9,37,0,165,97,141,1,228,131,41,0,222,15,243,255,254,18,17,0,6,60,237,1,106,3,113,0,59,132,189,0,92,112,30,0,105,208,213,0,48,84,179,255,187,121,231,254,27,216,109,255,162,221,107,254,73,239,195,255,250,31,57,255,149,135,89,255,185,23,115,1,3,163,157,255,18,112,250,0,25,57,187,255,161,96,164,0,47,16,243,0,12,141,251,254,67,234,184,255,41,18,161,0,175,6,96,255,160,172,52,254,24,176,183,255,198,193,85,1,124,121,137,255,151,50,114,255,220,203,60,255,207,239,5,1,0,38,107,255,55,238,94,254,70,152,94,0,213,220,77,1,120,17,69,255,85,164,190,255,203,234,81,0,38,49,37,254,61,144,124,0,137,78,49,254,168,247,48,0,95,164,252,0,105,169,135,0,253,228,134,0,64,166,75,0,81,73,20,255,207,210,10,0,234,106,150,255,94,34,90,255,254,159,57,254,220,133,99,0,139,147,180,254,24,23,185,0,41,57,30,255,189,97,76,0,65,187,223,255,224,172,37,255,34,62,95,1,231,144,240,0,77,106,126,254,64,152,91,0,29,98,155,0,226,251,53,255,234,211,5,255,144,203,222,255,164,176,221,254,5,231,24,0,179,122,205,0,36,1,134,255,125,70,151,254,97,228,252,0,172,129,23,254,48,90,209,255,150,224,82,1,84,134,30,0,241,196,46,0,103,113,234,255,46,101,121,254,40,124,250,255,135,45,242,254,9,249,168,255,140,108,131,255,143,163,171,0,50,173,199,255,88,222,142,255,200,95,158,0,142,192,163,255,7,117,135,0,111,124,22,0,236,12,65,254,68,38,65,255,227,174,254,0,244,245,38,0,240,50,208,255,161,63,250,0,60,209,239,0,122,35,19,0,14,33,230,254,2,159,113,0,106,20,127,255,228,205,96,0,137,210,174,254,180,212,144,255,89,98,154,1,34,88,139,0,167,162,112,1,65,110,197,0,241,37,169,0,66,56,131,255,10,201,83,254,133,253,187,255,177,112,45,254,196,251,0,0,196,250,151,255,238,232,214,255,150,209,205,0,28,240,118,0,71,76,83,1,236,99,91,0,42,250,131,1,96,18,64,255,118,222,35,0,113,214,203,255,122,119,184,255,66,19,36,0,204,64,249,0,146,89,139,0,134,62,135,1,104,233,101,0,188,84,26,0,49,249,129,0,208,214,75,255,207,130,77,255,115,175,235,0,171,2,137,255,175,145,186,1,55,245,135,255,154,86,181,1,100,58,246,255,109,199,60,255,82,204,134,255,215,49,230,1,140,229,192,255,222,193,251,255,81,136,15,255,179,149,162,255,23,39,29,255,7,95,75,254,191,81,222,0,241,81,90,255,107,49,201,255,244,211,157,0,222,140,149,255,65,219,56,254,189,246,90,255,178,59,157,1,48,219,52,0,98,34,215,0,28,17,187,255,175,169,24,0,92,79,161,255,236,200,194,1,147,143,234,0,229,225,7,1,197,168,14,0,235,51,53,1,253,120,174,0,197,6,168,255,202,117,171,0,163,21,206,0,114,85,90,255,15,41,10,255,194,19,99,0,65,55,216,254,162,146,116,0,50,206,212,255,64,146,29,255,158,158,131,1,100,165,130,255,172,23,129,255,125,53,9,255,15,193,18,1,26,49,11,255,181,174,201,1,135,201,14,255,100,19,149,0,219,98,79,0,42,99,143,254,96,0,48,255,197,249,83,254,104,149,79,255,235,110,136,254,82,128,44,255,65,41,36,254,88,211,10,0,187,121,187,0,98,134,199,0,171,188,179,254,210,11,238,255,66,123,130,254,52,234,61,0,48,113,23,254,6,86,120,255,119,178,245,0,87,129,201,0,242,141,209,0,202,114,85,0,148,22,161,0,103,195,48,0,25,49,171,255,138,67,130,0,182,73,122,254,148,24,130,0,211,229,154,0,32,155,158,0,84,105,61,0,177,194,9,255,166,89,86,1,54,83,187,0,249,40,117,255,109,3,215,255,53,146,44,1,63,47,179,0,194,216,3,254,14,84,136,0,136,177,13,255,72,243,186,255,117,17,125,255,211,58,211,255,93,79,223,0,90,88,245,255,139,209,111,255,70,222,47,0,10,246,79,255,198,217,178,0,227,225,11,1,78,126,179,255,62,43,126,0,103,148,35,0,129,8,165,254,245,240,148,0,61,51,142,0,81,208,134,0,15,137,115,255,211,119,236,255,159,245,248,255,2,134,136,255,230,139,58,1,160,164,254,0,114,85,141,255,49,166,182,255,144,70,84,1,85,182,7,0,46,53,93,0,9,166,161,255,55,162,178,255,45,184,188,0,146,28,44,254,169,90,49,0,120,178,241,1,14,123,127,255,7,241,199,1,189,66,50,255,198,143,101,254,189,243,135,255,141,24,24,254,75,97,87,0,118,251,154,1,237,54,156,0,171,146,207,255,131,196,246,255,136,64,113,1,151,232,57,0,240,218,115,0,49,61,27,255,64,129,73,1,252,169,27,255,40,132,10,1,90,201,193,255,252,121,240,1,186,206,41,0,43,198,97,0,145,100,183,0,204,216,80,254,172,150,65,0,249,229,196,254,104,123,73,255,77,104,96,254,130,180,8,0,104,123,57,0,220,202,229,255,102,249,211,0,86,14,232,255,182,78,209,0,239,225,164,0,106,13,32,255,120,73,17,255,134,67,233,0,83,254,181,0,183,236,112,1,48,64,131,255,241,216,243,255,65,193,226,0,206,241,100,254,100,134,166,255,237,202,197,0,55,13,81,0,32,124,102,255,40,228,177,0,118,181,31,1,231,160,134,255,119,187,202,0,0,142,60,255,128,38,189,255,166,201,150,0,207,120,26,1,54,184,172,0,12,242,204,254,133,66,230,0,34,38,31,1,184,112,80,0,32,51,165,254,191,243,55,0,58,73,146,254,155,167,205,255,100,104,152,255,197,254,207,255,173,19,247,0,238,10,202,0,239,151,242,0,94,59,39,255,240,29,102,255,10,92,154,255,229,84,219,255,161,129,80,0,208,90,204,1,240,219,174,255,158,102,145,1,53,178,76,255,52,108,168,1,83,222,107,0,211,36,109,0,118,58,56,0,8,29,22,0,237,160,199,0,170,209,157,0,137,71,47,0,143,86,32,0,198,242,2,0,212,48,136,1,92,172,186,0,230,151,105,1,96,191,229,0,138,80,191,254,240,216,130,255,98,43,6,254,168,196,49,0,253,18,91,1,144,73,121,0,61,146,39,1,63,104,24,255,184,165,112,254,126,235,98,0,80,213,98,255,123,60,87,255,82,140,245,1,223,120,173,255,15,198,134,1,206,60,239,0,231,234,92,255,33,238,19,255,165,113,142,1,176,119,38,0,160,43,166,254,239,91,105,0,107,61,194,1,25,4,68,0,15,139,51,0,164,132,106,255,34,116,46,254,168,95,197,0,137,212,23,0,72,156,58,0,137,112,69,254,150,105,154,255,236,201,157,0,23,212,154,255,136,82,227,254,226,59,221,255,95,149,192,0,81,118,52,255,33,43,215,1,14,147,75,255,89,156,121,254,14,18,79,0,147,208,139,1,151,218,62,255,156,88,8,1,210,184,98,255,20,175,123,255,102,83,229,0,220,65,116,1,150,250,4,255,92,142,220,255,34,247,66,255,204,225,179,254,151,81,151,0,71,40,236,255,138,63,62,0,6,79,240,255,183,185,181,0,118,50,27,0,63,227,192,0,123,99,58,1,50,224,155,255,17,225,223,254,220,224,77,255,14,44,123,1,141,128,175,0,248,212,200,0,150,59,183,255,147,97,29,0,150,204,181,0,253,37,71,0,145,85,119,0,154,200,186,0,2,128,249,255,83,24,124,0,14,87,143,0,168,51,245,1,124,151,231,255,208,240,197,1,124,190,185,0,48,58,246,0,20,233,232,0,125,18,98,255,13,254,31,255,245,177,130,255,108,142,35,0,171,125,242,254,140,12,34,255,165,161,162,0,206,205,101,0,247,25,34,1,100,145,57,0,39,70,57,0,118,204,203,255,242,0,162,0,165,244,30,0,198,116,226,0,128,111,153,255,140,54,182,1,60,122,15,255,155,58,57,1,54,50,198,0,171,211,29,255,107,138,167,255,173,107,199,255,109,161,193,0,89,72,242,255,206,115,89,255,250,254,142,254,177,202,94,255,81,89,50,0,7,105,66,255,25,254,255,254,203,64,23,255,79,222,108,255,39,249,75,0,241,124,50,0,239,152,133,0,221,241,105,0,147,151,98,0,213,161,121,254,242,49,137,0,233,37,249,254,42,183,27,0,184,119,230,255,217,32,163,255,208,251,228,1,137,62,131,255,79,64,9,254,94,48,113,0,17,138,50,254,193,255,22,0,247,18,197,1,67,55,104,0,16,205,95,255,48,37,66,0,55,156,63,1,64,82,74,255,200,53,71,254,239,67,125,0,26,224,222,0,223,137,93,255,30,224,202,255,9,220,132,0,198,38,235,1,102,141,86,0,60,43,81,1,136,28,26,0,233,36,8,254,207,242,148,0,164,162,63,0,51,46,224,255,114,48,79,255,9,175,226,0,222,3,193,255,47,160,232,255,255,93,105,254,14,42,230,0,26,138,82,1,208,43,244,0,27,39,38,255,98,208,127,255,64,149,182,255,5,250,209,0,187,60,28,254,49,25,218,255,169,116,205,255,119,18,120,0,156,116,147,255,132,53,109,255,13,10,202,0,110,83,167,0,157,219,137,255,6,3,130,255,50,167,30,255,60,159,47,255,129,128,157,254,94,3,189,0,3,166,68,0,83,223,215,0,150,90,194,1,15,168,65,0,227,83,51,255,205,171,66,255,54,187,60,1,152,102,45,255,119,154,225,0,240,247,136,0,100,197,178,255,139,71,223,255,204,82,16,1,41,206,42,255,156,192,221,255,216,123,244,255,218,218,185,255,187,186,239,255,252,172,160,255,195,52,22,0,144,174,181,254,187,100,115,255,211,78,176,255,27,7,193,0,147,213,104,255,90,201,10,255,80,123,66,1,22,33,186,0,1,7,99,254,30,206,10,0,229,234,5,0,53,30,210,0,138,8,220,254,71,55,167,0,72,225,86,1,118,190,188,0,254,193,101,1,171,249,172,255,94,158,183,254,93,2,108,255,176,93,76,255,73,99,79,255,74,64,129,254,246,46,65,0,99,241,127,254,246,151,102,255,44,53,208,254,59,102,234,0,154,175,164,255,88,242,32,0,111,38,1,0,255,182,190,255,115,176,15,254,169,60,129,0,122,237,241,0,90,76,63,0,62,74,120,255,122,195,110,0,119,4,178,0,222,242,210,0,130,33,46,254,156,40,41,0,167,146,112,1,49,163,111,255,121,176,235,0,76,207,14,255,3,25,198,1,41,235,213,0,85,36,214,1,49,92,109,255,200,24,30,254,168,236,195,0,145,39,124,1,236,195,149,0,90,36,184,255,67,85,170,255,38,35,26,254,131,124,68,255,239,155,35,255,54,201,164,0,196,22,117,255,49,15,205,0,24,224,29,1,126,113,144,0,117,21,182,0,203,159,141,0,223,135,77,0,176,230,176,255,190,229,215,255,99,37,181,255,51,21,138,255,25,189,89,255,49,48,165,254,152,45,247,0,170,108,222,0,80,202,5,0,27,69,103,254,204,22,129,255,180,252,62,254,210,1,91,255,146,110,254,255,219,162,28,0,223,252,213,1,59,8,33,0,206,16,244,0,129,211,48,0,107,160,208,0,112,59,209,0,109,77,216,254,34,21,185,255,246,99,56,255,179,139,19,255,185,29,50,255,84,89,19,0,74,250,98,255,225,42,200,255,192,217,205,255,210,16,167,0,99,132,95,1,43,230,57,0,254,11,203,255,99,188,63,255,119,193,251,254,80,105,54,0,232,181,189,1,183,69,112,255,208,171,165,255,47,109,180,255,123,83,165,0,146,162,52,255,154,11,4,255,151,227,90,255,146,137,97,254,61,233,41,255,94,42,55,255,108,164,236,0,152,68,254,0,10,140,131,255,10,106,79,254,243,158,137,0,67,178,66,254,177,123,198,255,15,62,34,0,197,88,42,255,149,95,177,255,152,0,198,255,149,254,113,255,225,90,163,255,125,217,247,0,18,17,224,0,128,66,120,254,192,25,9,255,50,221,205,0,49,212,70,0,233,255,164,0,2,209,9,0,221,52,219,254,172,224,244,255,94,56,206,1,242,179,2,255,31,91,164,1,230,46,138,255,189,230,220,0,57,47,61,255,111,11,157,0,177,91,152,0,28,230,98,0,97,87,126,0,198,89,145,255,167,79,107,0,249,77,160,1,29,233,230,255,150,21,86,254,60,11,193,0,151,37,36,254,185,150,243,255,228,212,83,1,172,151,180,0,201,169,155,0,244,60,234,0,142,235,4,1,67,218,60,0,192,113,75,1,116,243,207,255,65,172,155,0,81,30,156,255,80,72,33,254,18,231,109,255,142,107,21,254,125,26,132,255,176,16,59,255,150,201,58,0,206,169,201,0,208,121,226,0,40,172,14,255,150,61,94,255,56,57,156,255,141,60,145,255,45,108,149,255,238,145,155,255,209,85,31,254,192,12,210,0,99,98,93,254,152,16,151,0,225,185,220,0,141,235,44,255,160,172,21,254,71,26,31,255,13,64,93,254,28,56,198,0,177,62,248,1,182,8,241,0,166,101,148,255,78,81,133,255,129,222,215,1,188,169,129,255,232,7,97,0,49,112,60,255,217,229,251,0,119,108,138,0,39,19,123,254,131,49,235,0,132,84,145,0,130,230,148,255,25,74,187,0,5,245,54,255,185,219,241,1,18,194,228,255,241,202,102,0,105,113,202,0,155,235,79,0,21,9,178,255,156,1,239,0,200,148,61,0,115,247,210,255,49,221,135,0,58,189,8,1,35,46,9,0,81,65,5,255,52,158,185,255,125,116,46,255,74,140,13,255,210,92,172,254,147,23,71,0,217,224,253,254,115,108,180,255,145,58,48,254,219,177,24,255,156,255,60,1,154,147,242,0,253,134,87,0,53,75,229,0,48,195,222,255,31,175,50,255,156,210,120,255,208,35,222,255,18,248,179,1,2,10,101,255,157,194,248,255,158,204,101,255,104,254,197,255,79,62,4,0,178,172,101,1,96,146,251,255,65,10,156,0,2,137,165,255,116,4,231,0,242,215,1,0,19,35,29,255,43,161,79,0,59,149,246,1,251,66,176,0,200,33,3,255,80,110,142,255,195,161,17,1,228,56,66,255,123,47,145,254,132,4,164,0,67,174,172,0,25,253,114,0,87,97,87,1,250,220,84,0,96,91,200,255,37,125,59,0,19,65,118,0,161,52,241,255,237,172,6,255,176,191,255,255,1,65,130,254,223,190,230,0,101,253,231,255,146,35,109,0,250,29,77,1,49,0,19,0,123,90,155,1,22,86,32,255,218,213,65,0,111,93,127,0,60,93,169,255,8,127,182,0,17,186,14,254,253,137,246,255,213,25,48,254,76,238,0,255,248,92,70,255,99,224,139,0,184,9,255,1,7,164,208,0,205,131,198,1,87,214,199,0,130,214,95,0,221,149,222,0,23,38,171,254,197,110,213,0,43,115,140,254,215,177,118,0,96,52,66,1,117,158,237,0,14,64,182,255,46,63,174,255,158,95,190,255,225,205,177,255,43,5,142,255,172,99,212,255,244,187,147,0,29,51,153,255,228,116,24,254,30,101,207,0,19,246,150,255,134,231,5,0,125,134,226,1,77,65,98,0,236,130,33,255,5,110,62,0,69,108,127,255,7,113,22,0,145,20,83,254,194,161,231,255,131,181,60,0,217,209,177,255,229,148,212,254,3,131,184,0,117,177,187,1,28,14,31,255,176,102,80,0,50,84,151,255,125,31,54,255,21,157,133,255,19,179,139,1,224,232,26,0,34,117,170,255,167,252,171,255,73,141,206,254,129,250,35,0,72,79,236,1,220,229,20,255,41,202,173,255,99,76,238,255,198,22,224,255,108,198,195,255,36,141,96,1,236,158,59,255,106,100,87,0,110,226,2,0,227,234,222,0,154,93,119,255,74,112,164,255,67,91,2,255,21,145,33,255,102,214,137,255,175,230,103,254,163,246,166,0,93,247,116,254,167,224,28,255,220,2,57,1,171,206,84,0,123,228,17,255,27,120,119,0,119,11,147,1,180,47,225,255,104,200,185,254,165,2,114,0,77,78,212,0,45,154,177,255,24,196,121,254,82,157,182,0,90,16,190,1,12,147,197,0,95,239,152,255,11,235,71,0,86,146,119,255,172,134,214,0,60,131,196,0,161,225,129,0,31,130,120,254,95,200,51,0,105,231,210,255,58,9,148,255,43,168,221,255,124,237,142,0,198,211,50,254,46,245,103,0,164,248,84,0,152,70,208,255,180,117,177,0,70,79,185,0,243,74,32,0,149,156,207,0,197,196,161,1,245,53,239,0,15,93,246,254,139,240,49,255,196,88,36,255,162,38,123,0,128,200,157,1,174,76,103,255,173,169,34,254,216,1,171,255,114,51,17,0,136,228,194,0,110,150,56,254,106,246,159,0,19,184,79,255,150,77,240,255,155,80,162,0,0,53,169,255,29,151,86,0,68,94,16,0,92,7,110,254,98,117,149,255,249,77,230,255,253,10,140,0,214,124,92,254,35,118,235,0,89,48,57,1,22,53,166,0,184,144,61,255,179,255,194,0,214,248,61,254,59,110,246,0,121,21,81,254,166,3,228,0,106,64,26,255,69,232,134,255,242,220,53,254,46,220,85,0,113,149,247,255,97,179,103,255,190,127,11,0,135,209,182,0,95,52,129,1,170,144,206,255,122,200,204,255,168,100,146,0,60,144,149,254,70,60,40,0,122,52,177,255,246,211,101,255,174,237,8,0,7,51,120,0,19,31,173,0,126,239,156,255,143,189,203,0,196,128,88,255,233,133,226,255,30,125,173,255,201,108,50,0,123,100,59,255,254,163,3,1,221,148,181,255,214,136,57,254,222,180,137,255,207,88,54,255,28,33,251,255,67,214,52,1,210,208,100,0,81,170,94,0,145,40,53,0,224,111,231,254,35,28,244,255,226,199,195,254,238,17,230,0,217,217,164,254,169,157,221,0,218,46,162,1,199,207,163,255,108,115,162,1,14,96,187,255,118,60,76,0,184,159,152,0,209,231,71,254,42,164,186,255,186,153,51,254,221,171,182,255,162,142,173,0,235,47,193,0,7,139,16,1,95,164,64,255,16,221,166,0,219,197,16,0,132,29,44,255,100,69,117,255,60,235,88,254,40,81,173,0,71,190,61,255,187,88,157,0,231,11,23,0,237,117,164,0,225,168,223,255,154,114,116,255,163,152,242,1,24,32,170,0,125,98,113,254,168,19,76,0,17,157,220,254,155,52,5,0,19,111,161,255,71,90,252,255,173,110,240,0,10,198,121,255,253,255,240,255,66,123,210,0,221,194,215,254,121,163,17,255,225,7,99,0,190,49,182,0,115,9,133,1,232,26,138,255,213,68,132,0,44,119,122,255,179,98,51,0,149,90,106,0,71,50,230,255,10,153,118,255,177,70,25,0,165,87,205,0,55,138,234,0,238,30,97,0,113,155,207,0,98,153,127,0,34,107,219,254,117,114,172,255,76,180,255,254,242,57,179,255,221,34,172,254,56,162,49,255,83,3,255,255,113,221,189,255,188,25,228,254,16,88,89,255,71,28,198,254,22,17,149,255,243,121,254,255,107,202,99,255,9,206,14,1,220,47,153,0,107,137,39,1,97,49,194,255,149,51,197,254,186,58,11,255,107,43,232,1,200,6,14,255,181,133,65,254,221,228,171,255,123,62,231,1,227,234,179,255,34,189,212,254,244,187,249,0,190,13,80,1,130,89,1,0,223,133,173,0,9,222,198,255,66,127,74,0,167,216,93,255,155,168,198,1,66,145,0,0,68,102,46,1,172,90,154,0,216,128,75,255,160,40,51,0,158,17,27,1,124,240,49,0,236,202,176,255,151,124,192,255,38,193,190,0,95,182,61,0,163,147,124,255,255,165,51,255,28,40,17,254,215,96,78,0,86,145,218,254,31,36,202,255,86,9,5,0,111,41,200,255,237,108,97,0,57,62,44,0,117,184,15,1,45,241,116,0,152,1,220,255,157,165,188,0,250,15,131,1,60,44,125,255,65,220,251,255,75,50,184,0,53,90,128,255,231,80,194,255,136,129,127,1,21,18,187,255,45,58,161,255,71,147,34,0,174,249,11,254,35,141,29,0,239,68,177,255,115,110,58,0,238,190,177,1,87,245,166,255,190,49,247,255,146,83,184,255,173,14,39,255,146,215,104,0,142,223,120,0,149,200,155,255,212,207,145,1,16,181,217,0,173,32,87,255,255,35,181,0,119,223,161,1,200,223,94,255,70,6,186,255,192,67,85,255,50,169,152,0,144,26,123,255,56,243,179,254,20,68,136,0,39,140,188,254,253,208,5,255,200,115,135,1,43,172,229,255,156,104,187,0,151,251,167,0,52,135,23,0,151,153,72,0,147,197,107,254,148,158,5,255,238,143,206,0,126,153,137,255,88,152,197,254,7,68,167,0,252,159,165,255,239,78,54,255,24,63,55,255,38,222,94,0,237,183,12,255,206,204,210,0,19,39,246,254,30,74,231,0,135,108,29,1,179,115,0,0,117,118,116,1,132,6,252,255,145,129,161,1,105,67,141,0,82,37,226,255,238,226,228,255,204,214,129,254,162,123,100,255,185,121,234,0,45,108,231,0,66,8,56,255,132,136,128,0,172,224,66,254,175,157,188,0,230,223,226,254,242,219,69,0,184,14,119,1,82,162,56,0,114,123,20,0,162,103,85,255,49,239,99,254,156,135,215,0,111,255,167,254,39,196,214,0,144,38,79,1,249,168,125,0,155,97,156,255,23,52,219,255,150,22,144,0,44,149,165,255,40,127,183,0,196,77,233,255,118,129,210,255,170,135,230,255,214,119,198,0,233,240,35,0,253,52,7,255,117,102,48,255,21,204,154,255,179,136,177,255,23,2,3,1,149,130,89,255,252,17,159,1,70,60,26,0,144,107,17,0,180,190,60,255,56,182,59,255,110,71,54,255,198,18,129,255,149,224,87,255,223,21,152,255,138,22,182,255,250,156,205,0,236,45,208,255,79,148,242,1,101,70,209,0,103,78,174,0,101,144,172,255,152,136,237,1,191,194,136,0,113,80,125,1,152,4,141,0,155,150,53,255,196,116,245,0,239,114,73,254,19,82,17,255,124,125,234,255,40,52,191,0,42,210,158,255,155,132,165,0,178,5,42,1,64,92,40,255,36,85,77,255,178,228,118,0,137,66,96,254,115,226,66,0,110,240,69,254,151,111,80,0,167,174,236,255,227,108,107,255,188,242,65,255,183,81,255,0,57,206,181,255,47,34,181,255,213,240,158,1,71,75,95,0,156,40,24,255,102,210,81,0,171,199,228,255,154,34,41,0,227,175,75,0,21,239,195,0,138,229,95,1,76,192,49,0,117,123,87,1,227,225,130,0,125,62,63,255,2,198,171,0,254,36,13,254,145,186,206,0,148,255,244,255,35,0,166,0,30,150,219,1,92,228,212,0,92,198,60,254,62,133,200,255,201,41,59,0,125,238,109,255,180,163,238,1,140,122,82,0,9,22,88,255,197,157,47,255,153,94,57,0,88,30,182,0,84,161,85,0,178,146,124,0,166,166,7,255,21,208,223,0,156,182,242,0,155,121,185,0,83,156,174,254,154,16,118,255,186,83,232,1,223,58,121,255,29,23,88,0,35,125,127,255,170,5,149,254,164,12,130,255,155,196,29,0,161,96,136,0,7,35,29,1,162,37,251,0,3,46,242,255,0,217,188,0,57,174,226,1,206,233,2,0,57,187,136,254,123,189,9,255,201,117,127,255,186,36,204,0,231,25,216,0,80,78,105,0,19,134,129,255,148,203,68,0,141,81,125,254,248,165,200,255,214,144,135,0,151,55,166,255,38,235,91,0,21,46,154,0,223,254,150,255,35,153,180,255,125,176,29,1,43,98,30,255,216,122,230,255,233,160,12,0,57,185,12,254,240,113,7,255,5,9,16,254,26,91,108,0,109,198,203,0,8,147,40,0,129,134,228,255,124,186,40,255,114,98,132,254,166,132,23,0,99,69,44,0,9,242,238,255,184,53,59,0,132,129,102,255,52,32,243,254,147,223,200,255,123,83,179,254,135,144,201,255,141,37,56,1,151,60,227,255,90,73,156,1,203,172,187,0,80,151,47,255,94,137,231,255,36,191,59,255,225,209,181,255,74,215,213,254,6,118,179,255,153,54,193,1,50,0,231,0,104,157,72,1,140,227,154,255,182,226,16,254,96,225,92,255,115,20,170,254,6,250,78,0,248,75,173,255,53,89,6,255,0,180,118,0,72,173,1,0,64,8,206,1,174,133,223,0,185,62,133,255,214,11,98,0,197,31,208,0,171,167,244,255,22,231,181,1,150,218,185,0,247,169,97,1,165,139,247,255,47,120,149,1,103,248,51,0,60,69,28,254,25,179,196,0,124,7,218,254,58,107,81,0,184,233,156,255,252,74,36,0,118,188,67,0,141,95,53,255,222,94,165,254,46,61,53,0,206,59,115,255,47,236,250,255,74,5,32,1,129,154,238,255,106,32,226,0,121,187,61,255,3,166,241,254,67,170,172,255,29,216,178,255,23,201,252,0,253,110,243,0,200,125,57,0,109,192,96,255,52,115,238,0,38,121,243,255,201,56,33,0,194,118,130,0,75,96,25,255,170,30,230,254,39,63,253,0,36,45,250,255,251,1,239,0,160,212,92,1,45,209,237,0,243,33,87,254,237,84,201,255,212,18,157,254,212,99,127,255,217,98,16,254,139,172,239,0,168,201,130,255,143,193,169,255,238,151,193,1,215,104,41,0,239,61,165,254,2,3,242,0,22,203,177,254,177,204,22,0,149,129,213,254,31,11,41,255,0,159,121,254,160,25,114,255,162,80,200,0,157,151,11,0,154,134,78,1,216,54,252,0,48,103,133,0,105,220,197,0,253,168,77,254,53,179,23,0,24,121,240,1,255,46,96,255,107,60,135,254,98,205,249,255,63,249,119,255,120,59,211,255,114,180,55,254,91,85,237,0,149,212,77,1,56,73,49,0,86,198,150,0,93,209,160,0,69,205,182,255,244,90,43,0,20,36,176,0,122,116,221,0,51,167,39,1,231,1,63,255,13,197,134,0,3,209,34,255,135,59,202,0,167,100,78,0,47,223,76,0,185,60,62,0,178,166,123,1,132,12,161,255,61,174,43,0,195,69,144,0,127,47,191,1,34,44,78,0,57,234,52,1,255,22,40,255,246,94,146,0,83,228,128,0,60,78,224,255,0,96,210,255,153,175,236,0,159,21,73,0,180,115,196,254,131,225,106,0,255,167,134,0,159,8,112,255,120,68,194,255,176,196,198,255,118,48,168,255,93,169,1,0,112,200,102,1,74,24,254,0,19,141,4,254,142,62,63,0,131,179,187,255,77,156,155,255,119,86,164,0,170,208,146,255,208,133,154,255,148,155,58,255,162,120,232,254,252,213,155,0,241,13,42,0,94,50,131,0,179,170,112,0,140,83,151,255,55,119,84,1,140,35,239,255,153,45,67,1,236,175,39,0,54,151,103,255,158,42,65,255,196,239,135,254,86,53,203,0,149,97,47,254,216,35,17,255,70,3,70,1,103,36,90,255,40,26,173,0,184,48,13,0,163,219,217,255,81,6,1,255,221,170,108,254,233,208,93,0,100,201,249,254,86,36,35,255,209,154,30,1,227,201,251,255,2,189,167,254,100,57,3,0,13,128,41,0,197,100,75,0,150,204,235,255,145,174,59,0,120,248,149,255,85,55,225,0,114,210,53,254,199,204,119,0,14,247,74,1,63,251,129,0,67,104,151,1,135,130,80,0,79,89,55,255,117,230,157,255,25,96,143,0,213,145,5,0,69,241,120,1,149,243,95,255,114,42,20,0,131,72,2,0,154,53,20,255,73,62,109,0,196,102,152,0,41,12,204,255,122,38,11,1,250,10,145,0,207,125,148,0,246,244,222,255,41,32,85,1,112,213,126,0,162,249,86,1,71,198,127,255,81,9,21,1,98,39,4,255,204,71,45,1,75,111,137,0,234,59,231,0,32,48,95,255,204,31,114,1,29,196,181,255,51,241,167,254,93,109,142,0,104,144,45,0,235,12,181,255,52,112,164,0,76,254,202,255,174,14,162,0,61,235,147,255,43,64,185,254,233,125,217,0,243,88,167,254,74,49,8,0,156,204,66,0,124,214,123,0,38,221,118,1,146,112,236,0,114,98,177,0,151,89,199,0,87,197,112,0,185,149,161,0,44,96,165,0,248,179,20,255,188,219,216,254,40,62,13,0,243,142,141,0,229,227,206,255,172,202,35,255,117,176,225,255,82,110,38,1,42,245,14,255,20,83,97,0,49,171,10,0,242,119,120,0,25,232,61,0,212,240,147,255,4,115,56,255,145,17,239,254,202,17,251,255,249,18,245,255,99,117,239,0,184,4,179,255,246,237,51,255,37,239,137,255,166,112,166,255,81,188,33,255,185,250,142,255,54,187,173,0,208,112,201,0,246,43,228,1,104,184,88,255,212,52,196,255,51,117,108,255,254,117,155,0,46,91,15,255,87,14,144,255,87,227,204,0,83,26,83,1,159,76,227,0,159,27,213,1,24,151,108,0,117,144,179,254,137,209,82,0,38,159,10,0,115,133,201,0,223,182,156,1,110,196,93,255,57,60,233,0,5,167,105,255,154,197,164,0,96,34,186,255,147,133,37,1,220,99,190,0,1,167,84,255,20,145,171,0,194,197,251,254,95,78,133,255,252,248,243,255,225,93,131,255,187,134,196,255,216,153,170,0,20,118,158,254,140,1,118,0,86,158,15,1,45,211,41,255,147,1,100,254,113,116,76,255,211,127,108,1,103,15,48,0,193,16,102,1,69,51,95,255,107,128,157,0,137,171,233,0,90,124,144,1,106,161,182,0,175,76,236,1,200,141,172,255,163,58,104,0,233,180,52,255,240,253,14,255,162,113,254,255,38,239,138,254,52,46,166,0,241,101,33,254,131,186,156,0,111,208,62,255,124,94,160,255,31,172,254,0,112,174,56,255,188,99,27,255,67,138,251,0,125,58,128,1,156,152,174,255,178,12,247,255,252,84,158,0,82,197,14,254,172,200,83,255,37,39,46,1,106,207,167,0,24,189,34,0,131,178,144,0,206,213,4,0,161,226,210,0,72,51,105,255,97,45,187,255,78,184,223,255,176,29,251,0,79,160,86,255,116,37,178,0,82,77,213,1,82,84,141,255,226,101,212,1,175,88,199,255,245,94,247,1,172,118,109,255,166,185,190,0,131,181,120,0,87,254,93,255,134,240,73,255,32,245,143,255,139,162,103,255,179,98,18,254,217,204,112,0,147,223,120,255,53,10,243,0,166,140,150,0,125,80,200,255,14,109,219,255,91,218,1,255,252,252,47,254,109,156,116,255,115,49,127,1,204,87,211,255,148,202,217,255,26,85,249,255,14,245,134,1,76,89,169,255,242,45,230,0,59,98,172,255,114,73,132,254,78,155,49,255,158,126,84,0,49,175,43,255,16,182,84,255,157,103,35,0,104,193,109,255,67,221,154,0,201,172,1,254,8,162,88,0,165,1,29,255,125,155,229,255,30,154,220,1,103,239,92,0,220,1,109,255,202,198,1,0,94,2,142,1,36,54,44,0,235,226,158,255,170,251,214,255,185,77,9,0,97,74,242,0,219,163,149,255,240,35,118,255,223,114,88,254,192,199,3,0,106,37,24,255,201,161,118,255,97,89,99,1,224,58,103,255,101,199,147,254,222,60,99,0,234,25,59,1,52,135,27,0,102,3,91,254,168,216,235,0,229,232,136,0,104,60,129,0,46,168,238,0,39,191,67,0,75,163,47,0,143,97,98,255,56,216,168,1,168,233,252,255,35,111,22,255,92,84,43,0,26,200,87,1,91,253,152,0,202,56,70,0,142,8,77,0,80,10,175,1,252,199,76,0,22,110,82,255,129,1,194,0,11,128,61,1,87,14,145,255,253,222,190,1,15,72,174,0,85,163,86,254,58,99,44,255,45,24,188,254,26,205,15,0,19,229,210,254,248,67,195,0,99,71,184,0,154,199,37,255,151,243,121,255,38,51,75,255,201,85,130,254,44,65,250,0,57,147,243,254,146,43,59,255,89,28,53,0,33,84,24,255,179,51,18,254,189,70,83,0,11,156,179,1,98,134,119,0,158,111,111,0,119,154,73,255,200,63,140,254,45,13,13,255,154,192,2,254,81,72,42,0,46,160,185,254,44,112,6,0,146,215,149,1,26,176,104,0,68,28,87,1,236,50,153,255,179,128,250,254,206,193,191,255,166,92,137,254,53,40,239,0,210,1,204,254,168,173,35,0,141,243,45,1,36,50,109,255,15,242,194,255,227,159,122,255,176,175,202,254,70,57,72,0,40,223,56,0,208,162,58,255,183,98,93,0,15,111,12,0,30,8,76,255,132,127,246,255,45,242,103,0,69,181,15,255,10,209,30,0,3,179,121,0,241,232,218,1,123,199,88,255,2,210,202,1,188,130,81,255,94,101,208,1,103,36,45], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); +/* memory initializer */ allocate([76,193,24,1,95,26,241,255,165,162,187,0,36,114,140,0,202,66,5,255,37,56,147,0,152,11,243,1,127,85,232,255,250,135,212,1,185,177,113,0,90,220,75,255,69,248,146,0,50,111,50,0,92,22,80,0,244,36,115,254,163,100,82,255,25,193,6,1,127,61,36,0,253,67,30,254,65,236,170,255,161,17,215,254,63,175,140,0,55,127,4,0,79,112,233,0,109,160,40,0,143,83,7,255,65,26,238,255,217,169,140,255,78,94,189,255,0,147,190,255,147,71,186,254,106,77,127,255,233,157,233,1,135,87,237,255,208,13,236,1,155,109,36,255,180,100,218,0,180,163,18,0,190,110,9,1,17,63,123,255,179,136,180,255,165,123,123,255,144,188,81,254,71,240,108,255,25,112,11,255,227,218,51,255,167,50,234,255,114,79,108,255,31,19,115,255,183,240,99,0,227,87,143,255,72,217,248,255,102,169,95,1,129,149,149,0,238,133,12,1,227,204,35,0,208,115,26,1,102,8,234,0,112,88,143,1,144,249,14,0,240,158,172,254,100,112,119,0,194,141,153,254,40,56,83,255,121,176,46,0,42,53,76,255,158,191,154,0,91,209,92,0,173,13,16,1,5,72,226,255,204,254,149,0,80,184,207,0,100,9,122,254,118,101,171,255,252,203,0,254,160,207,54,0,56,72,249,1,56,140,13,255,10,64,107,254,91,101,52,255,225,181,248,1,139,255,132,0,230,145,17,0,233,56,23,0,119,1,241,255,213,169,151,255,99,99,9,254,185,15,191,255,173,103,109,1,174,13,251,255,178,88,7,254,27,59,68,255,10,33,2,255,248,97,59,0,26,30,146,1,176,147,10,0,95,121,207,1,188,88,24,0,185,94,254,254,115,55,201,0,24,50,70,0,120,53,6,0,142,66,146,0,228,226,249,255,104,192,222,1,173,68,219,0,162,184,36,255,143,102,137,255,157,11,23,0,125,45,98,0,235,93,225,254,56,112,160,255,70,116,243,1,153,249,55,255,129,39,17,1,241,80,244,0,87,69,21,1,94,228,73,255,78,66,65,255,194,227,231,0,61,146,87,255,173,155,23,255,112,116,219,254,216,38,11,255,131,186,133,0,94,212,187,0,100,47,91,0,204,254,175,255,222,18,215,254,173,68,108,255,227,228,79,255,38,221,213,0,163,227,150,254,31,190,18,0,160,179,11,1,10,90,94,255,220,174,88,0,163,211,229,255,199,136,52,0,130,95,221,255,140,188,231,254,139,113,128,255,117,171,236,254,49,220,20,255,59,20,171,255,228,109,188,0,20,225,32,254,195,16,174,0,227,254,136,1,135,39,105,0,150,77,206,255,210,238,226,0,55,212,132,254,239,57,124,0,170,194,93,255,249,16,247,255,24,151,62,255,10,151,10,0,79,139,178,255,120,242,202,0,26,219,213,0,62,125,35,255,144,2,108,255,230,33,83,255,81,45,216,1,224,62,17,0,214,217,125,0,98,153,153,255,179,176,106,254,131,93,138,255,109,62,36,255,178,121,32,255,120,252,70,0,220,248,37,0,204,88,103,1,128,220,251,255,236,227,7,1,106,49,198,255,60,56,107,0,99,114,238,0,220,204,94,1,73,187,1,0,89,154,34,0,78,217,165,255,14,195,249,255,9,230,253,255,205,135,245,0,26,252,7,255,84,205,27,1,134,2,112,0,37,158,32,0,231,91,237,255,191,170,204,255,152,7,222,0,109,192,49,0,193,166,146,255,232,19,181,255,105,142,52,255,103,16,27,1,253,200,165,0,195,217,4,255,52,189,144,255,123,155,160,254,87,130,54,255,78,120,61,255,14,56,41,0,25,41,125,255,87,168,245,0,214,165,70,0,212,169,6,255,219,211,194,254,72,93,164,255,197,33,103,255,43,142,141,0,131,225,172,0,244,105,28,0,68,68,225,0,136,84,13,255,130,57,40,254,139,77,56,0,84,150,53,0,54,95,157,0,144,13,177,254,95,115,186,0,117,23,118,255,244,166,241,255,11,186,135,0,178,106,203,255,97,218,93,0,43,253,45,0,164,152,4,0,139,118,239,0,96,1,24,254,235,153,211,255,168,110,20,255,50,239,176,0,114,41,232,0,193,250,53,0,254,160,111,254,136,122,41,255,97,108,67,0,215,152,23,255,140,209,212,0,42,189,163,0,202,42,50,255,106,106,189,255,190,68,217,255,233,58,117,0,229,220,243,1,197,3,4,0,37,120,54,254,4,156,134,255,36,61,171,254,165,136,100,255,212,232,14,0,90,174,10,0,216,198,65,255,12,3,64,0,116,113,115,255,248,103,8,0,231,125,18,255,160,28,197,0,30,184,35,1,223,73,249,255,123,20,46,254,135,56,37,255,173,13,229,1,119,161,34,255,245,61,73,0,205,125,112,0,137,104,134,0,217,246,30,255,237,142,143,0,65,159,102,255,108,164,190,0,219,117,173,255,34,37,120,254,200,69,80,0,31,124,218,254,74,27,160,255,186,154,199,255,71,199,252,0,104,81,159,1,17,200,39,0,211,61,192,1,26,238,91,0,148,217,12,0,59,91,213,255,11,81,183,255,129,230,122,255,114,203,145,1,119,180,66,255,72,138,180,0,224,149,106,0,119,82,104,255,208,140,43,0,98,9,182,255,205,101,134,255,18,101,38,0,95,197,166,255,203,241,147,0,62,208,145,255,133,246,251,0,2,169,14,0,13,247,184,0,142,7,254,0,36,200,23,255,88,205,223,0,91,129,52,255,21,186,30,0,143,228,210,1,247,234,248,255,230,69,31,254,176,186,135,255,238,205,52,1,139,79,43,0,17,176,217,254,32,243,67,0,242,111,233,0,44,35,9,255,227,114,81,1,4,71,12,255,38,105,191,0,7,117,50,255,81,79,16,0,63,68,65,255,157,36,110,255,77,241,3,255,226,45,251,1,142,25,206,0,120,123,209,1,28,254,238,255,5,128,126,255,91,222,215,255,162,15,191,0,86,240,73,0,135,185,81,254,44,241,163,0,212,219,210,255,112,162,155,0,207,101,118,0,168,72,56,255,196,5,52,0,72,172,242,255,126,22,157,255,146,96,59,255,162,121,152,254,140,16,95,0,195,254,200,254,82,150,162,0,119,43,145,254,204,172,78,255,166,224,159,0,104,19,237,255,245,126,208,255,226,59,213,0,117,217,197,0,152,72,237,0,220,31,23,254,14,90,231,255,188,212,64,1,60,101,246,255,85,24,86,0,1,177,109,0,146,83,32,1,75,182,192,0,119,241,224,0,185,237,27,255,184,101,82,1,235,37,77,255,253,134,19,0,232,246,122,0,60,106,179,0,195,11,12,0,109,66,235,1,125,113,59,0,61,40,164,0,175,104,240,0,2,47,187,255,50,12,141,0,194,139,181,255,135,250,104,0,97,92,222,255,217,149,201,255,203,241,118,255,79,151,67,0,122,142,218,255,149,245,239,0,138,42,200,254,80,37,97,255,124,112,167,255,36,138,87,255,130,29,147,255,241,87,78,255,204,97,19,1,177,209,22,255,247,227,127,254,99,119,83,255,212,25,198,1,16,179,179,0,145,77,172,254,89,153,14,255,218,189,167,0,107,233,59,255,35,33,243,254,44,112,112,255,161,127,79,1,204,175,10,0,40,21,138,254,104,116,228,0,199,95,137,255,133,190,168,255,146,165,234,1,183,99,39,0,183,220,54,254,255,222,133,0,162,219,121,254,63,239,6,0,225,102,54,255,251,18,246,0,4,34,129,1,135,36,131,0,206,50,59,1,15,97,183,0,171,216,135,255,101,152,43,255,150,251,91,0,38,145,95,0,34,204,38,254,178,140,83,255,25,129,243,255,76,144,37,0,106,36,26,254,118,144,172,255,68,186,229,255,107,161,213,255,46,163,68,255,149,170,253,0,187,17,15,0,218,160,165,255,171,35,246,1,96,13,19,0,165,203,117,0,214,107,192,255,244,123,177,1,100,3,104,0,178,242,97,255,251,76,130,255,211,77,42,1,250,79,70,255,63,244,80,1,105,101,246,0,61,136,58,1,238,91,213,0,14,59,98,255,167,84,77,0,17,132,46,254,57,175,197,255,185,62,184,0,76,64,207,0,172,175,208,254,175,74,37,0,138,27,211,254,148,125,194,0,10,89,81,0,168,203,101,255,43,213,209,1,235,245,54,0,30,35,226,255,9,126,70,0,226,125,94,254,156,117,20,255,57,248,112,1,230,48,64,255,164,92,166,1,224,214,230,255,36,120,143,0,55,8,43,255,251,1,245,1,106,98,165,0,74,107,106,254,53,4,54,255,90,178,150,1,3,120,123,255,244,5,89,1,114,250,61,255,254,153,82,1,77,15,17,0,57,238,90,1,95,223,230,0,236,52,47,254,103,148,164,255,121,207,36,1,18,16,185,255,75,20,74,0,187,11,101,0,46,48,129,255,22,239,210,255,77,236,129,255,111,77,204,255,61,72,97,255,199,217,251,255,42,215,204,0,133,145,201,255,57,230,146,1,235,100,198,0,146,73,35,254,108,198,20,255,182,79,210,255,82,103,136,0,246,108,176,0,34,17,60,255,19,74,114,254,168,170,78,255,157,239,20,255,149,41,168,0,58,121,28,0,79,179,134,255,231,121,135,255,174,209,98,255,243,122,190,0,171,166,205,0,212,116,48,0,29,108,66,255,162,222,182,1,14,119,21,0,213,39,249,255,254,223,228,255,183,165,198,0,133,190,48,0,124,208,109,255,119,175,85,255,9,209,121,1,48,171,189,255,195,71,134,1,136,219,51,255,182,91,141,254,49,159,72,0,35,118,245,255,112,186,227,255,59,137,31,0,137,44,163,0,114,103,60,254,8,213,150,0,162,10,113,255,194,104,72,0,220,131,116,255,178,79,92,0,203,250,213,254,93,193,189,255,130,255,34,254,212,188,151,0,136,17,20,255,20,101,83,255,212,206,166,0,229,238,73,255,151,74,3,255,168,87,215,0,155,188,133,255,166,129,73,0,240,79,133,255,178,211,81,255,203,72,163,254,193,168,165,0,14,164,199,254,30,255,204,0,65,72,91,1,166,74,102,255,200,42,0,255,194,113,227,255,66,23,208,0,229,216,100,255,24,239,26,0,10,233,62,255,123,10,178,1,26,36,174,255,119,219,199,1,45,163,190,0,16,168,42,0,166,57,198,255,28,26,26,0,126,165,231,0,251,108,100,255,61,229,121,255,58,118,138,0,76,207,17,0,13,34,112,254,89,16,168,0,37,208,105,255,35,201,215,255,40,106,101,254,6,239,114,0,40,103,226,254,246,127,110,255,63,167,58,0,132,240,142,0,5,158,88,255,129,73,158,255,94,89,146,0,230,54,146,0,8,45,173,0,79,169,1,0,115,186,247,0,84,64,131,0,67,224,253,255,207,189,64,0,154,28,81,1,45,184,54,255,87,212,224,255,0,96,73,255,129,33,235,1,52,66,80,255,251,174,155,255,4,179,37,0,234,164,93,254,93,175,253,0,198,69,87,255,224,106,46,0,99,29,210,0,62,188,114,255,44,234,8,0,169,175,247,255,23,109,137,255,229,182,39,0,192,165,94,254,245,101,217,0,191,88,96,0,196,94,99,255,106,238,11,254,53,126,243,0,94,1,101,255,46,147,2,0,201,124,124,255,141,12,218,0,13,166,157,1,48,251,237,255,155,250,124,255,106,148,146,255,182,13,202,0,28,61,167,0,217,152,8,254,220,130,45,255,200,230,255,1,55,65,87,255,93,191,97,254,114,251,14,0,32,105,92,1,26,207,141,0,24,207,13,254,21,50,48,255,186,148,116,255,211,43,225,0,37,34,162,254,164,210,42,255,68,23,96,255,182,214,8,255,245,117,137,255,66,195,50,0,75,12,83,254,80,140,164,0,9,165,36,1,228,110,227,0,241,17,90,1,25,52,212,0,6,223,12,255,139,243,57,0,12,113,75,1,246,183,191,255,213,191,69,255,230,15,142,0,1,195,196,255,138,171,47,255,64,63,106,1,16,169,214,255,207,174,56,1,88,73,133,255,182,133,140,0,177,14,25,255,147,184,53,255,10,227,161,255,120,216,244,255,73,77,233,0,157,238,139,1,59,65,233,0,70,251,216,1,41,184,153,255,32,203,112,0,146,147,253,0,87,101,109,1,44,82,133,255,244,150,53,255,94,152,232,255,59,93,39,255,88,147,220,255,78,81,13,1,32,47,252,255,160,19,114,255,93,107,39,255,118,16,211,1,185,119,209,255,227,219,127,254,88,105,236,255,162,110,23,255,36,166,110,255,91,236,221,255,66,234,116,0,111,19,244,254,10,233,26,0,32,183,6,254,2,191,242,0,218,156,53,254,41,60,70,255,168,236,111,0,121,185,126,255,238,142,207,255,55,126,52,0,220,129,208,254,80,204,164,255,67,23,144,254,218,40,108,255,127,202,164,0,203,33,3,255,2,158,0,0,37,96,188,255,192,49,74,0,109,4,0,0,111,167,10,254,91,218,135,255,203,66,173,255,150,194,226,0,201,253,6,255,174,102,121,0,205,191,110,0,53,194,4,0,81,40,45,254,35,102,143,255,12,108,198,255,16,27,232,255,252,71,186,1,176,110,114,0,142,3,117,1,113,77,142,0,19,156,197,1,92,47,252,0,53,232,22,1,54,18,235,0,46,35,189,255,236,212,129,0,2,96,208,254,200,238,199,255,59,175,164,255,146,43,231,0,194,217,52,255,3,223,12,0,138,54,178,254,85,235,207,0,232,207,34,0,49,52,50,255,166,113,89,255,10,45,216,255,62,173,28,0,111,165,246,0,118,115,91,255,128,84,60,0,167,144,203,0,87,13,243,0,22,30,228,1,177,113,146,255,129,170,230,254,252,153,129,255,145,225,43,0,70,231,5,255,122,105,126,254,86,246,148,255,110,37,154,254,209,3,91,0,68,145,62,0,228,16,165,255,55,221,249,254,178,210,91,0,83,146,226,254,69,146,186,0,93,210,104,254,16,25,173,0,231,186,38,0,189,122,140,255,251,13,112,255,105,110,93,0,251,72,170,0,192,23,223,255,24,3,202,1,225,93,228,0,153,147,199,254,109,170,22,0,248,101,246,255,178,124,12,255,178,254,102,254,55,4,65,0,125,214,180,0,183,96,147,0,45,117,23,254,132,191,249,0,143,176,203,254,136,183,54,255,146,234,177,0,146,101,86,255,44,123,143,1,33,209,152,0,192,90,41,254,83,15,125,255,213,172,82,0,215,169,144,0,16,13,34,0,32,209,100,255,84,18,249,1,197,17,236,255,217,186,230,0,49,160,176,255,111,118,97,255,237,104,235,0,79,59,92,254,69,249,11,255,35,172,74,1,19,118,68,0,222,124,165,255,180,66,35,255,86,174,246,0,43,74,111,255,126,144,86,255,228,234,91,0,242,213,24,254,69,44,235,255,220,180,35,0,8,248,7,255,102,47,92,255,240,205,102,255,113,230,171,1,31,185,201,255,194,246,70,255,122,17,187,0,134,70,199,255,149,3,150,255,117,63,103,0,65,104,123,255,212,54,19,1,6,141,88,0,83,134,243,255,136,53,103,0,169,27,180,0,177,49,24,0,111,54,167,0,195,61,215,255,31,1,108,1,60,42,70,0,185,3,162,255,194,149,40,255,246,127,38,254,190,119,38,255,61,119,8,1,96,161,219,255,42,203,221,1,177,242,164,255,245,159,10,0,116,196,0,0,5,93,205,254,128,127,179,0,125,237,246,255,149,162,217,255,87,37,20,254,140,238,192,0,9,9,193,0,97,1,226,0,29,38,10,0,0,136,63,255,229,72,210,254,38,134,92,255,78,218,208,1,104,36,84,255,12,5,193,255,242,175,61,255,191,169,46,1,179,147,147,255,113,190,139,254,125,172,31,0,3,75,252,254,215,36,15,0,193,27,24,1,255,69,149,255,110,129,118,0,203,93,249,0,138,137,64,254,38,70,6,0,153,116,222,0,161,74,123,0,193,99,79,255,118,59,94,255,61,12,43,1,146,177,157,0,46,147,191,0,16,255,38,0,11,51,31,1,60,58,98,255,111,194,77,1,154,91,244,0,140,40,144,1,173,10,251,0,203,209,50,254,108,130,78,0,228,180,90,0,174,7,250,0,31,174,60,0,41,171,30,0,116,99,82,255,118,193,139,255,187,173,198,254,218,111,56,0,185,123,216,0,249,158,52,0,52,180,93,255,201,9,91,255,56,45,166,254,132,155,203,255,58,232,110,0,52,211,89,255,253,0,162,1,9,87,183,0,145,136,44,1,94,122,245,0,85,188,171,1,147,92,198,0,0,8,104,0,30,95,174,0,221,230,52,1,247,247,235,255,137,174,53,255,35,21,204,255,71,227,214,1,232,82,194,0,11,48,227,255,170,73,184,255,198,251,252,254,44,112,34,0,131,101,131,255,72,168,187,0,132,135,125,255,138,104,97,255,238,184,168,255,243,104,84,255,135,216,226,255,139,144,237,0,188,137,150,1,80,56,140,255,86,169,167,255,194,78,25,255,220,17,180,255,17,13,193,0,117,137,212,255,141,224,151,0,49,244,175,0,193,99,175,255,19,99,154,1,255,65,62,255,156,210,55,255,242,244,3,255,250,14,149,0,158,88,217,255,157,207,134,254,251,232,28,0,46,156,251,255,171,56,184,255,239,51,234,0,142,138,131,255,25,254,243,1,10,201,194,0,63,97,75,0,210,239,162,0,192,200,31,1,117,214,243,0,24,71,222,254,54,40,232,255,76,183,111,254,144,14,87,255,214,79,136,255,216,196,212,0,132,27,140,254,131,5,253,0,124,108,19,255,28,215,75,0,76,222,55,254,233,182,63,0,68,171,191,254,52,111,222,255,10,105,77,255,80,170,235,0,143,24,88,255,45,231,121,0,148,129,224,1,61,246,84,0,253,46,219,255,239,76,33,0,49,148,18,254,230,37,69,0,67,134,22,254,142,155,94,0,31,157,211,254,213,42,30,255,4,228,247,254,252,176,13,255,39,0,31,254,241,244,255,255,170,45,10,254,253,222,249,0,222,114,132,0,255,47,6,255,180,163,179,1,84,94,151,255,89,209,82,254,229,52,169,255,213,236,0,1,214,56,228,255,135,119,151,255,112,201,193,0,83,160,53,254,6,151,66,0,18,162,17,0,233,97,91,0,131,5,78,1,181,120,53,255,117,95,63,255,237,117,185,0,191,126,136,255,144,119,233,0,183,57,97,1,47,201,187,255,167,165,119,1,45,100,126,0,21,98,6,254,145,150,95,255,120,54,152,0,209,98,104,0,143,111,30,254,184,148,249,0,235,216,46,0,248,202,148,255,57,95,22,0,242,225,163,0,233,247,232,255,71,171,19,255,103,244,49,255,84,103,93,255,68,121,244,1,82,224,13,0,41,79,43,255,249,206,167,255,215,52,21,254,192,32,22,255,247,111,60,0,101,74,38,255,22,91,84,254,29,28,13,255,198,231,215,254,244,154,200,0,223,137,237,0,211,132,14,0,95,64,206,255,17,62,247,255,233,131,121,1,93,23,77,0,205,204,52,254,81,189,136,0,180,219,138,1,143,18,94,0,204,43,140,254,188,175,219,0,111,98,143,255,151,63,162,255,211,50,71,254,19,146,53,0,146,45,83,254,178,82,238,255,16,133,84,255,226,198,93,255,201,97,20,255,120,118,35,255,114,50,231,255,162,229,156,255,211,26,12,0,114,39,115,255,206,212,134,0,197,217,160,255,116,129,94,254,199,215,219,255,75,223,249,1,253,116,181,255,232,215,104,255,228,130,246,255,185,117,86,0,14,5,8,0,239,29,61,1,237,87,133,255,125,146,137,254,204,168,223,0,46,168,245,0,154,105,22,0,220,212,161,255,107,69,24,255,137,218,181,255,241,84,198,255,130,122,211,255,141,8,153,255,190,177,118,0,96,89,178,0,255,16,48,254,122,96,105,255,117,54,232,255,34,126,105,255,204,67,166,0,232,52,138,255,211,147,12,0,25,54,7,0,44,15,215,254,51,236,45,0,190,68,129,1,106,147,225,0,28,93,45,254,236,141,15,255,17,61,161,0,220,115,192,0,236,145,24,254,111,168,169,0,224,58,63,255,127,164,188,0,82,234,75,1,224,158,134,0,209,68,110,1,217,166,217,0,70,225,166,1,187,193,143,255,16,7,88,255,10,205,140,0,117,192,156,1,17,56,38,0,27,124,108,1,171,215,55,255,95,253,212,0,155,135,168,255,246,178,153,254,154,68,74,0,232,61,96,254,105,132,59,0,33,76,199,1,189,176,130,255,9,104,25,254,75,198,102,255,233,1,112,0,108,220,20,255,114,230,70,0,140,194,133,255,57,158,164,254,146,6,80,255,169,196,97,1,85,183,130,0,70,158,222,1,59,237,234,255,96,25,26,255,232,175,97,255,11,121,248,254,88,35,194,0,219,180,252,254,74,8,227,0,195,227,73,1,184,110,161,255,49,233,164,1,128,53,47,0,82,14,121,255,193,190,58,0,48,174,117,255,132,23,32,0,40,10,134,1,22,51,25,255,240,11,176,255,110,57,146,0,117,143,239,1,157,101,118,255,54,84,76,0,205,184,18,255,47,4,72,255,78,112,85,255,193,50,66,1,93,16,52,255,8,105,134,0,12,109,72,255,58,156,251,0,144,35,204,0,44,160,117,254,50,107,194,0,1,68,165,255,111,110,162,0,158,83,40,254,76,214,234,0,58,216,205,255,171,96,147,255,40,227,114,1,176,227,241,0,70,249,183,1,136,84,139,255,60,122,247,254,143,9,117,255,177,174,137,254,73,247,143,0,236,185,126,255,62,25,247,255,45,64,56,255,161,244,6,0,34,57,56,1,105,202,83,0,128,147,208,0,6,103,10,255,74,138,65,255,97,80,100,255,214,174,33,255,50,134,74,255,110,151,130,254,111,84,172,0,84,199,75,254,248,59,112,255,8,216,178,1,9,183,95,0,238,27,8,254,170,205,220,0,195,229,135,0,98,76,237,255,226,91,26,1,82,219,39,255,225,190,199,1,217,200,121,255,81,179,8,255,140,65,206,0,178,207,87,254,250,252,46,255,104,89,110,1,253,189,158,255,144,214,158,255,160,245,54,255,53,183,92,1,21,200,194,255,146,33,113,1,209,1,255,0,235,106,43,255,167,52,232,0,157,229,221,0,51,30,25,0,250,221,27,1,65,147,87,255,79,123,196,0,65,196,223,255,76,44,17,1,85,241,68,0,202,183,249,255,65,212,212,255,9,33,154,1,71,59,80,0,175,194,59,255,141,72,9,0,100,160,244,0,230,208,56,0,59,25,75,254,80,194,194,0,18,3,200,254,160,159,115,0,132,143,247,1,111,93,57,255,58,237,11,1,134,222,135,255,122,163,108,1,123,43,190,255,251,189,206,254,80,182,72,255,208,246,224,1,17,60,9,0,161,207,38,0,141,109,91,0,216,15,211,255,136,78,110,0,98,163,104,255,21,80,121,255,173,178,183,1,127,143,4,0,104,60,82,254,214,16,13,255,96,238,33,1,158,148,230,255,127,129,62,255,51,255,210,255,62,141,236,254,157,55,224,255,114,39,244,0,192,188,250,255,228,76,53,0,98,84,81,255,173,203,61,254,147,50,55,255,204,235,191,0,52,197,244,0,88,43,211,254,27,191,119,0,188,231,154,0,66,81,161,0,92,193,160,1,250,227,120,0,123,55,226,0,184,17,72,0,133,168,10,254,22,135,156,255,41,25,103,255,48,202,58,0,186,149,81,255,188,134,239,0,235,181,189,254,217,139,188,255,74,48,82,0,46,218,229,0,189,253,251,0,50,229,12,255,211,141,191,1,128,244,25,255,169,231,122,254,86,47,189,255,132,183,23,255,37,178,150,255,51,137,253,0,200,78,31,0,22,105,50,0,130,60,0,0,132,163,91,254,23,231,187,0,192,79,239,0,157,102,164,255,192,82,20,1,24,181,103,255,240,9,234,0,1,123,164,255,133,233,0,255,202,242,242,0,60,186,245,0,241,16,199,255,224,116,158,254,191,125,91,255,224,86,207,0,121,37,231,255,227,9,198,255,15,153,239,255,121,232,217,254,75,112,82,0,95,12,57,254,51,214,105,255,148,220,97,1,199,98,36,0,156,209,12,254,10,212,52,0,217,180,55,254,212,170,232,255,216,20,84,255,157,250,135,0,157,99,127,254,1,206,41,0,149,36,70,1,54,196,201,255,87,116,0,254,235,171,150,0,27,163,234,0,202,135,180,0,208,95,0,254,123,156,93,0,183,62,75,0,137,235,182,0,204,225,255,255,214,139,210,255,2,115,8,255,29,12,111,0,52,156,1,0,253,21,251,255,37,165,31,254,12,130,211,0,106,18,53,254,42,99,154,0,14,217,61,254,216,11,92,255,200,197,112,254,147,38,199,0,36,252,120,254,107,169,77,0,1,123,159,255,207,75,102,0,163,175,196,0,44,1,240,0,120,186,176,254,13,98,76,255,237,124,241,255,232,146,188,255,200,96,224,0,204,31,41,0,208,200,13,0,21,225,96,255,175,156,196,0,247,208,126,0,62,184,244,254,2,171,81,0,85,115,158,0,54,64,45,255,19,138,114,0,135,71,205,0,227,47,147,1,218,231,66,0,253,209,28,0,244,15,173,255,6,15,118,254,16,150,208,255,185,22,50,255,86,112,207,255,75,113,215,1,63,146,43,255,4,225,19,254,227,23,62,255,14,255,214,254,45,8,205,255,87,197,151,254,210,82,215,255,245,248,247,255,128,248,70,0,225,247,87,0,90,120,70,0,213,245,92,0,13,133,226,0,47,181,5,1,92,163,105,255,6,30,133,254,232,178,61,255,230,149,24,255,18,49,158,0,228,100,61,254,116,243,251,255,77,75,92,1,81,219,147,255,76,163,254,254,141,213,246,0,232,37,152,254,97,44,100,0,201,37,50,1,212,244,57,0,174,171,183,255,249,74,112,0,166,156,30,0,222,221,97,255,243,93,73,254,251,101,100,255,216,217,93,255,254,138,187,255,142,190,52,255,59,203,177,255,200,94,52,0,115,114,158,255,165,152,104,1,126,99,226,255,118,157,244,1,107,200,16,0,193,90,229,0,121,6,88,0,156,32,93,254,125,241,211,255,14,237,157,255,165,154,21,255,184,224,22,255,250,24,152,255,113,77,31,0,247,171,23,255,237,177,204,255,52,137,145,255,194,182,114,0,224,234,149,0,10,111,103,1,201,129,4,0,238,142,78,0,52,6,40,255,110,213,165,254,60,207,253,0,62,215,69,0,96,97,0,255,49,45,202,0,120,121,22,255,235,139,48,1,198,45,34,255,182,50,27,1,131,210,91,255,46,54,128,0,175,123,105,255,198,141,78,254,67,244,239,255,245,54,103,254,78,38,242,255,2,92,249,254,251,174,87,255,139,63,144,0,24,108,27,255,34,102,18,1,34,22,152,0,66,229,118,254,50,143,99,0,144,169,149,1,118,30,152,0,178,8,121,1,8,159,18,0,90,101,230,255,129,29,119,0,68,36,11,1,232,183,55,0,23,255,96,255,161,41,193,255,63,139,222,0,15,179,243,0,255,100,15,255,82,53,135,0,137,57,149,1,99,240,170,255,22,230,228,254,49,180,82,255,61,82,43,0,110,245,217,0,199,125,61,0,46,253,52,0,141,197,219,0,211,159,193,0,55,121,105,254,183,20,129,0,169,119,170,255,203,178,139,255,135,40,182,255,172,13,202,255,65,178,148,0,8,207,43,0,122,53,127,1,74,161,48,0,227,214,128,254,86,11,243,255,100,86,7,1,245,68,134,255,61,43,21,1,152,84,94,255,190,60,250,254,239,118,232,255,214,136,37,1,113,76,107,255,93,104,100,1,144,206,23,255,110,150,154,1,228,103,185,0,218,49,50,254,135,77,139,255,185,1,78,0,0,161,148,255,97,29,233,255,207,148,149,255,160,168,0,0,91,128,171,255,6,28,19,254,11,111,247,0,39,187,150,255,138,232,149,0,117,62,68,255,63,216,188,255,235,234,32,254,29,57,160,255,25,12,241,1,169,60,191,0,32,131,141,255,237,159,123,255,94,197,94,254,116,254,3,255,92,179,97,254,121,97,92,255,170,112,14,0,21,149,248,0,248,227,3,0,80,96,109,0,75,192,74,1,12,90,226,255,161,106,68,1,208,114,127,255,114,42,255,254,74,26,74,255,247,179,150,254,121,140,60,0,147,70,200,255,214,40,161,255,161,188,201,255,141,65,135,255,242,115,252,0,62,47,202,0,180,149,255,254,130,55,237,0,165,17,186,255,10,169,194,0,156,109,218,255,112,140,123,255,104,128,223,254,177,142,108,255,121,37,219,255,128,77,18,255,111,108,23,1,91,192,75,0,174,245,22,255,4,236,62,255,43,64,153,1,227,173,254,0,237,122,132,1,127,89,186,255,142,82,128,254,252,84,174,0,90,179,177,1,243,214,87,255,103,60,162,255,208,130,14,255,11,130,139,0,206,129,219,255,94,217,157,255,239,230,230,255,116,115,159,254,164,107,95,0,51,218,2,1,216,125,198,255,140,202,128,254,11,95,68,255,55,9,93,254,174,153,6,255,204,172,96,0,69,160,110,0,213,38,49,254,27,80,213,0,118,125,114,0,70,70,67,255,15,142,73,255,131,122,185,255,243,20,50,254,130,237,40,0,210,159,140,1,197,151,65,255,84,153,66,0,195,126,90,0,16,238,236,1,118,187,102,255,3,24,133,255,187,69,230,0,56,197,92,1,213,69,94,255,80,138,229,1,206,7,230,0,222,111,230,1,91,233,119,255,9,89,7,1,2,98,1,0,148,74,133,255,51,246,180,255,228,177,112,1,58,189,108,255,194,203,237,254,21,209,195,0,147,10,35,1,86,157,226,0,31,163,139,254,56,7,75,255,62,90,116,0,181,60,169,0,138,162,212,254,81,167,31,0,205,90,112,255,33,112,227,0,83,151,117,1,177,224,73,255,174,144,217,255,230,204,79,255,22,77,232,255,114,78,234,0,224,57,126,254,9,49,141,0,242,147,165,1,104,182,140,255,167,132,12,1,123,68,127,0,225,87,39,1,251,108,8,0,198,193,143,1,121,135,207,255,172,22,70,0,50,68,116,255,101,175,40,255,248,105,233,0,166,203,7,0,110,197,218,0,215,254,26,254,168,226,253,0,31,143,96,0,11,103,41,0,183,129,203,254,100,247,74,255,213,126,132,0,210,147,44,0,199,234,27,1,148,47,181,0,155,91,158,1,54,105,175,255,2,78,145,254,102,154,95,0,128,207,127,254,52,124,236,255,130,84,71,0,221,243,211,0,152,170,207,0,222,106,199,0,183,84,94,254,92,200,56,255,138,182,115,1,142,96,146,0,133,136,228,0,97,18,150,0,55,251,66,0,140,102,4,0,202,103,151,0,30,19,248,255,51,184,207,0,202,198,89,0,55,197,225,254,169,95,249,255,66,65,68,255,188,234,126,0,166,223,100,1,112,239,244,0,144,23,194,0,58,39,182,0,244,44,24,254,175,68,179,255,152,118,154,1,176,162,130,0,217,114,204,254,173,126,78,255,33,222,30,255,36,2,91,255,2,143,243,0,9,235,215,0,3,171,151,1,24,215,245,255,168,47,164,254,241,146,207,0,69,129,180,0,68,243,113,0,144,53,72,254,251,45,14,0,23,110,168,0,68,68,79,255,110,70,95,254,174,91,144,255,33,206,95,255,137,41,7,255,19,187,153,254,35,255,112,255,9,145,185,254,50,157,37,0,11,112,49,1,102,8,190,255,234,243,169,1,60,85,23,0,74,39,189,0,116,49,239,0,173,213,210,0,46,161,108,255,159,150,37,0,196,120,185,255,34,98,6,255,153,195,62,255,97,230,71,255,102,61,76,0,26,212,236,255,164,97,16,0,198,59,146,0,163,23,196,0,56,24,61,0,181,98,193,0,251,147,229,255,98,189,24,255,46,54,206,255,234,82,246,0,183,103,38,1,109,62,204,0,10,240,224,0,146,22,117,255,142,154,120,0,69,212,35,0,208,99,118,1,121,255,3,255,72,6,194,0,117,17,197,255,125,15,23,0,154,79,153,0,214,94,197,255,185,55,147,255,62,254,78,254,127,82,153,0,110,102,63,255,108,82,161,255,105,187,212,1,80,138,39,0,60,255,93,255,72,12,186,0,210,251,31,1,190,167,144,255,228,44,19,254,128,67,232,0,214,249,107,254,136,145,86,255,132,46,176,0,189,187,227,255,208,22,140,0,217,211,116,0,50,81,186,254,139,250,31,0,30,64,198,1,135,155,100,0,160,206,23,254,187,162,211,255,16,188,63,0,254,208,49,0,85,84,191,0,241,192,242,255,153,126,145,1,234,162,162,255,230,97,216,1,64,135,126,0,190,148,223,1,52,0,43,255,28,39,189,1,64,136,238,0,175,196,185,0,98,226,213,255,127,159,244,1,226,175,60,0,160,233,142,1,180,243,207,255,69,152,89,1,31,101,21,0,144,25,164,254,139,191,209,0,91,25,121,0,32,147,5,0,39,186,123,255,63,115,230,255,93,167,198,255,143,213,220,255,179,156,19,255,25,66,122,0,214,160,217,255,2,45,62,255,106,79,146,254,51,137,99,255,87,100,231,255,175,145,232,255,101,184,1,255,174,9,125,0,82,37,161,1,36,114,141,255,48,222,142,255,245,186,154,0,5,174,221,254,63,114,155,255,135,55,160,1,80,31,135,0,126,250,179,1,236,218,45,0,20,28,145,1,16,147,73,0,249,189,132,1,17,189,192,255,223,142,198,255,72,20,15,255,250,53,237,254,15,11,18,0,27,211,113,254,213,107,56,255,174,147,146,255,96,126,48,0,23,193,109,1,37,162,94,0,199,157,249,254,24,128,187,255,205,49,178,254,93,164,42,255,43,119,235,1,88,183,237,255,218,210,1,255,107,254,42,0,230,10,99,255,162,0,226,0,219,237,91,0,129,178,203,0,208,50,95,254,206,208,95,255,247,191,89,254,110,234,79,255,165,61,243,0,20,122,112,255,246,246,185,254,103,4,123,0,233,99,230,1,219,91,252,255,199,222,22,255,179,245,233,255,211,241,234,0,111,250,192,255,85,84,136,0,101,58,50,255,131,173,156,254,119,45,51,255,118,233,16,254,242,90,214,0,94,159,219,1,3,3,234,255,98,76,92,254,80,54,230,0,5,228,231,254,53,24,223,255,113,56,118,1,20,132,1,255,171,210,236,0,56,241,158,255,186,115,19,255,8,229,174,0,48,44,0,1,114,114,166,255,6,73,226,255,205,89,244,0,137,227,75,1,248,173,56,0,74,120,246,254,119,3,11,255,81,120,198,255,136,122,98,255,146,241,221,1,109,194,78,255,223,241,70,1,214,200,169,255,97,190,47,255,47,103,174,255,99,92,72,254,118,233,180,255,193,35,233,254,26,229,32,255,222,252,198,0,204,43,71,255,199,84,172,0,134,102,190,0,111,238,97,254,230,40,230,0,227,205,64,254,200,12,225,0,166,25,222,0,113,69,51,255,143,159,24,0,167,184,74,0,29,224,116,254,158,208,233,0,193,116,126,255,212,11,133,255,22,58,140,1,204,36,51,255,232,30,43,0,235,70,181,255,64,56,146,254,169,18,84,255,226,1,13,255,200,50,176,255,52,213,245,254,168,209,97,0,191,71,55,0,34,78,156,0,232,144,58,1,185,74,189,0,186,142,149,254,64,69,127,255,161,203,147,255,176,151,191,0,136,231,203,254,163,182,137,0,161,126,251,254,233,32,66,0,68,207,66,0,30,28,37,0,93,114,96,1,254,92,247,255,44,171,69,0,202,119,11,255,188,118,50,1,255,83,136,255,71,82,26,0,70,227,2,0,32,235,121,1,181,41,154,0,71,134,229,254,202,255,36,0,41,152,5,0,154,63,73,255,34,182,124,0,121,221,150,255,26,204,213,1,41,172,87,0,90,157,146,255,109,130,20,0,71,107,200,255,243,102,189,0,1,195,145,254,46,88,117,0,8,206,227,0,191,110,253,255,109,128,20,254,134,85,51,255,137,177,112,1,216,34,22,255,131,16,208,255,121,149,170,0,114,19,23,1,166,80,31,255,113,240,122,0,232,179,250,0,68,110,180,254,210,170,119,0,223,108,164,255,207,79,233,255,27,229,226,254,209,98,81,255,79,68,7,0,131,185,100,0,170,29,162,255,17,162,107,255,57,21,11,1,100,200,181,255,127,65,166,1,165,134,204,0,104,167,168,0,1,164,79,0,146,135,59,1,70,50,128,255,102,119,13,254,227,6,135,0,162,142,179,255,160,100,222,0,27,224,219,1,158,93,195,255,234,141,137,0,16,24,125,255,238,206,47,255,97,17,98,255,116,110,12,255,96,115,77,0,91,227,232,255,248,254,79,255,92,229,6,254,88,198,139,0,206,75,129,0,250,77,206,255,141,244,123,1,138,69,220,0,32,151,6,1,131,167,22,255,237,68,167,254,199,189,150,0,163,171,138,255,51,188,6,255,95,29,137,254,148,226,179,0,181,107,208,255,134,31,82,255,151,101,45,255,129,202,225,0,224,72,147,0,48,138,151,255,195,64,206,254,237,218,158,0,106,29,137,254,253,189,233,255,103,15,17,255,194,97,255,0,178,45,169,254,198,225,155,0,39,48,117,255,135,106,115,0,97,38,181,0,150,47,65,255,83,130,229,254,246,38,129,0,92,239,154,254,91,99,127,0,161,111,33,255,238,217,242,255,131,185,195,255,213,191,158,255,41,150,218,0,132,169,131,0,89,84,252,1,171,70,128,255,163,248,203,254,1,50,180,255,124,76,85,1,251,111,80,0,99,66,239,255,154,237,182,255,221,126,133,254,74,204,99,255,65,147,119,255,99,56,167,255,79,248,149,255,116,155,228,255,237,43,14,254,69,137,11,255,22,250,241,1,91,122,143,255,205,249,243,0,212,26,60,255,48,182,176,1,48,23,191,255,203,121,152,254,45,74,213,255,62,90,18,254,245,163,230,255,185,106,116,255,83,35,159,0,12,33,2,255,80,34,62,0,16,87,174,255,173,101,85,0,202,36,81,254,160,69,204,255,64,225,187,0,58,206,94,0,86,144,47,0,229,86,245,0,63,145,190,1,37,5,39,0,109,251,26,0,137,147,234,0,162,121,145,255,144,116,206,255,197,232,185,255,183,190,140,255,73,12,254,255,139,20,242,255,170,90,239,255,97,66,187,255,245,181,135,254,222,136,52,0,245,5,51,254,203,47,78,0,152,101,216,0,73,23,125,0,254,96,33,1,235,210,73,255,43,209,88,1,7,129,109,0,122,104,228,254,170,242,203,0,242,204,135,255,202,28,233,255,65,6,127,0,159,144,71,0,100,140,95,0,78,150,13,0,251,107,118,1,182,58,125,255,1,38,108,255,141,189,209,255,8,155,125,1,113,163,91,255,121,79,190,255,134,239,108,255,76,47,248,0,163,228,239,0,17,111,10,0,88,149,75,255,215,235,239,0,167,159,24,255,47,151,108,255,107,209,188,0,233,231,99,254,28,202,148,255,174,35,138,255,110,24,68,255,2,69,181,0,107,102,82,0,102,237,7,0,92,36,237,255,221,162,83,1,55,202,6,255,135,234,135,255,24,250,222,0,65,94,168,254,245,248,210,255,167,108,201,254,255,161,111,0,205,8,254,0,136,13,116,0,100,176,132,255,43,215,126,255,177,133,130,255,158,79,148,0,67,224,37,1,12,206,21,255,62,34,110,1,237,104,175,255,80,132,111,255,142,174,72,0,84,229,180,254,105,179,140,0,64,248,15,255,233,138,16,0,245,67,123,254,218,121,212,255,63,95,218,1,213,133,137,255,143,182,82,255,48,28,11,0,244,114,141,1,209,175,76,255,157,181,150,255,186,229,3,255,164,157,111,1,231,189,139,0,119,202,190,255,218,106,64,255,68,235,63,254,96,26,172,255,187,47,11,1,215,18,251,255,81,84,89,0,68,58,128,0,94,113,5,1,92,129,208,255,97,15,83,254,9,28,188,0,239,9,164,0,60,205,152,0,192,163,98,255,184,18,60,0,217,182,139,0,109,59,120,255,4,192,251,0,169,210,240,255,37,172,92,254,148,211,245,255,179,65,52,0,253,13,115,0,185,174,206,1,114,188,149,255,237,90,173,0,43,199,192,255,88,108,113,0,52,35,76,0,66,25,148,255,221,4,7,255,151,241,114,255,190,209,232,0,98,50,199,0,151,150,213,255,18,74,36,1,53,40,7,0,19,135,65,255,26,172,69,0,174,237,85,0,99,95,41,0,3,56,16,0,39,160,177,255,200,106,218,254,185,68,84,255,91,186,61,254,67,143,141,255,13,244,166,255,99,114,198,0,199,110,163,255,193,18,186,0,124,239,246,1,110,68,22,0,2,235,46,1,212,60,107,0,105,42,105,1,14,230,152,0,7,5,131,0,141,104,154,255,213,3,6,0,131,228,162,255,179,100,28,1,231,123,85,255,206,14,223,1,253,96,230,0,38,152,149,1,98,137,122,0,214,205,3,255,226,152,179,255,6,133,137,0,158,69,140,255,113,162,154,255,180,243,172,255,27,189,115,255,143,46,220,255,213,134,225,255,126,29,69,0,188,43,137,1,242,70,9,0,90,204,255,255,231,170,147,0,23,56,19,254,56,125,157,255,48,179,218,255,79,182,253,255,38,212,191,1,41,235,124,0,96,151,28,0,135,148,190,0,205,249,39,254,52,96,136,255,212,44,136,255,67,209,131,255,252,130,23,255,219,128,20,255,198,129,118,0,108,101,11,0,178,5,146,1,62,7,100,255,181,236,94,254,28,26,164,0,76,22,112,255,120,102,79,0,202,192,229,1,200,176,215,0,41,64,244,255,206,184,78,0,167,45,63,1,160,35,0,255,59,12,142,255,204,9,144,255,219,94,229,1,122,27,112,0,189,105,109,255,64,208,74,255,251,127,55,1,2,226,198,0,44,76,209,0,151,152,77,255,210,23,46,1,201,171,69,255,44,211,231,0,190,37,224,255,245,196,62,255,169,181,222,255,34,211,17,0,119,241,197,255,229,35,152,1,21,69,40,255,178,226,161,0,148,179,193,0,219,194,254,1,40,206,51,255,231,92,250,1,67,153,170,0,21,148,241,0,170,69,82,255,121,18,231,255,92,114,3,0,184,62,230,0,225,201,87,255,146,96,162,255,181,242,220,0,173,187,221,1,226,62,170,255,56,126,217,1,117,13,227,255,179,44,239,0,157,141,155,255,144,221,83,0,235,209,208,0,42,17,165,1,251,81,133,0,124,245,201,254,97,211,24,255,83,214,166,0,154,36,9,255,248,47,127,0,90,219,140,255,161,217,38,254,212,147,63,255,66,84,148,1,207,3,1,0,230,134,89,1,127,78,122,255,224,155,1,255,82,136,74,0,178,156,208,255,186,25,49,255,222,3,210,1,229,150,190,255,85,162,52,255,41,84,141,255,73,123,84,254,93,17,150,0,119,19,28,1,32,22,215,255,28,23,204,255,142,241,52,255,228,52,125,0,29,76,207,0,215,167,250,254,175,164,230,0,55,207,105,1,109,187,245,255,161,44,220,1,41,101,128,255,167,16,94,0,93,214,107,255,118,72,0,254,80,61,234,255,121,175,125,0,139,169,251,0,97,39,147,254,250,196,49,255,165,179,110,254,223,70,187,255,22,142,125,1,154,179,138,255,118,176,42,1,10,174,153,0,156,92,102,0,168,13,161,255,143,16,32,0,250,197,180,255,203,163,44,1,87,32,36,0,161,153,20,255,123,252,15,0,25,227,80,0,60,88,142,0,17,22,201,1,154,205,77,255,39,63,47,0,8,122,141,0,128,23,182,254,204,39,19,255,4,112,29,255,23,36,140,255,210,234,116,254,53,50,63,255,121,171,104,255,160,219,94,0,87,82,14,254,231,42,5,0,165,139,127,254,86,78,38,0,130,60,66,254,203,30,45,255,46,196,122,1,249,53,162,255,136,143,103,254,215,210,114,0,231,7,160,254,169,152,42,255,111,45,246,0,142,131,135,255,131,71,204,255,36,226,11,0,0,28,242,255,225,138,213,255,247,46,216,254,245,3,183,0,108,252,74,1,206,26,48,255,205,54,246,255,211,198,36,255,121,35,50,0,52,216,202,255,38,139,129,254,242,73,148,0,67,231,141,255,42,47,204,0,78,116,25,1,4,225,191,255,6,147,228,0,58,88,177,0,122,165,229,255,252,83,201,255,224,167,96,1,177,184,158,255,242,105,179,1,248,198,240,0,133,66,203,1,254,36,47,0,45,24,115,255,119,62,254,0,196,225,186,254,123,141,172,0,26,85,41,255,226,111,183,0,213,231,151,0,4,59,7,255,238,138,148,0,66,147,33,255,31,246,141,255,209,141,116,255,104,112,31,0,88,161,172,0,83,215,230,254,47,111,151,0,45,38,52,1,132,45,204,0,138,128,109,254,233,117,134,255,243,190,173,254,241,236,240,0,82,127,236,254,40,223,161,255,110,182,225,255,123,174,239,0,135,242,145,1,51,209,154,0,150,3,115,254,217,164,252,255,55,156,69,1,84,94,255,255,232,73,45,1,20,19,212,255,96,197,59,254,96,251,33,0,38,199,73,1,64,172,247,255,117,116,56,255,228,17,18,0,62,138,103,1,246,229,164,255,244,118,201,254,86,32,159,255,109,34,137,1,85,211,186,0,10,193,193,254,122,194,177,0,122,238,102,255,162,218,171,0,108,217,161,1,158,170,34,0,176,47,155,1,181,228,11,255,8,156,0,0,16,75,93,0,206,98,255,1,58,154,35,0,12,243,184,254,67,117,66,255,230,229,123,0,201,42,110], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+20480); +/* memory initializer */ allocate([134,228,178,254,186,108,118,255,58,19,154,255,82,169,62,255,114,143,115,1,239,196,50,255,173,48,193,255,147,2,84,255,150,134,147,254,95,232,73,0,109,227,52,254,191,137,10,0,40,204,30,254,76,52,97,255,164,235,126,0,254,124,188,0,74,182,21,1,121,29,35,255,241,30,7,254,85,218,214,255,7,84,150,254,81,27,117,255,160,159,152,254,66,24,221,255,227,10,60,1,141,135,102,0,208,189,150,1,117,179,92,0,132,22,136,255,120,199,28,0,21,129,79,254,182,9,65,0,218,163,169,0,246,147,198,255,107,38,144,1,78,175,205,255,214,5,250,254,47,88,29,255,164,47,204,255,43,55,6,255,131,134,207,254,116,100,214,0,96,140,75,1,106,220,144,0,195,32,28,1,172,81,5,255,199,179,52,255,37,84,203,0,170,112,174,0,11,4,91,0,69,244,27,1,117,131,92,0,33,152,175,255,140,153,107,255,251,135,43,254,87,138,4,255,198,234,147,254,121,152,84,255,205,101,155,1,157,9,25,0,72,106,17,254,108,153,0,255,189,229,186,0,193,8,176,255,174,149,209,0,238,130,29,0,233,214,126,1,61,226,102,0,57,163,4,1,198,111,51,255,45,79,78,1,115,210,10,255,218,9,25,255,158,139,198,255,211,82,187,254,80,133,83,0,157,129,230,1,243,133,134,255,40,136,16,0,77,107,79,255,183,85,92,1,177,204,202,0,163,71,147,255,152,69,190,0,172,51,188,1,250,210,172,255,211,242,113,1,89,89,26,255,64,66,111,254,116,152,42,0,161,39,27,255,54,80,254,0,106,209,115,1,103,124,97,0,221,230,98,255,31,231,6,0,178,192,120,254,15,217,203,255,124,158,79,0,112,145,247,0,92,250,48,1,163,181,193,255,37,47,142,254,144,189,165,255,46,146,240,0,6,75,128,0,41,157,200,254,87,121,213,0,1,113,236,0,5,45,250,0,144,12,82,0,31,108,231,0,225,239,119,255,167,7,189,255,187,228,132,255,110,189,34,0,94,44,204,1,162,52,197,0,78,188,241,254,57,20,141,0,244,146,47,1,206,100,51,0,125,107,148,254,27,195,77,0,152,253,90,1,7,143,144,255,51,37,31,0,34,119,38,255,7,197,118,0,153,188,211,0,151,20,116,254,245,65,52,255,180,253,110,1,47,177,209,0,161,99,17,255,118,222,202,0,125,179,252,1,123,54,126,255,145,57,191,0,55,186,121,0,10,243,138,0,205,211,229,255,125,156,241,254,148,156,185,255,227,19,188,255,124,41,32,255,31,34,206,254,17,57,83,0,204,22,37,255,42,96,98,0,119,102,184,1,3,190,28,0,110,82,218,255,200,204,192,255,201,145,118,0,117,204,146,0,132,32,98,1,192,194,121,0,106,161,248,1,237,88,124,0,23,212,26,0,205,171,90,255,248,48,216,1,141,37,230,255,124,203,0,254,158,168,30,255,214,248,21,0,112,187,7,255,75,133,239,255,74,227,243,255,250,147,70,0,214,120,162,0,167,9,179,255,22,158,18,0,218,77,209,1,97,109,81,255,244,33,179,255,57,52,57,255,65,172,210,255,249,71,209,255,142,169,238,0,158,189,153,255,174,254,103,254,98,33,14,0,141,76,230,255,113,139,52,255,15,58,212,0,168,215,201,255,248,204,215,1,223,68,160,255,57,154,183,254,47,231,121,0,106,166,137,0,81,136,138,0,165,43,51,0,231,139,61,0,57,95,59,254,118,98,25,255,151,63,236,1,94,190,250,255,169,185,114,1,5,250,58,255,75,105,97,1,215,223,134,0,113,99,163,1,128,62,112,0,99,106,147,0,163,195,10,0,33,205,182,0,214,14,174,255,129,38,231,255,53,182,223,0,98,42,159,255,247,13,40,0,188,210,177,1,6,21,0,255,255,61,148,254,137,45,129,255,89,26,116,254,126,38,114,0,251,50,242,254,121,134,128,255,204,249,167,254,165,235,215,0,202,177,243,0,133,141,62,0,240,130,190,1,110,175,255,0,0,20,146,1,37,210,121,255,7,39,130,0,142,250,84,255,141,200,207,0,9,95,104,255,11,244,174,0,134,232,126,0,167,1,123,254,16,193,149,255,232,233,239,1,213,70,112,255,252,116,160,254,242,222,220,255,205,85,227,0,7,185,58,0,118,247,63,1,116,77,177,255,62,245,200,254,63,18,37,255,107,53,232,254,50,221,211,0,162,219,7,254,2,94,43,0,182,62,182,254,160,78,200,255,135,140,170,0,235,184,228,0,175,53,138,254,80,58,77,255,152,201,2,1,63,196,34,0,5,30,184,0,171,176,154,0,121,59,206,0,38,99,39,0,172,80,77,254,0,134,151,0,186,33,241,254,94,253,223,255,44,114,252,0,108,126,57,255,201,40,13,255,39,229,27,255,39,239,23,1,151,121,51,255,153,150,248,0,10,234,174,255,118,246,4,254,200,245,38,0,69,161,242,1,16,178,150,0,113,56,130,0,171,31,105,0,26,88,108,255,49,42,106,0,251,169,66,0,69,93,149,0,20,57,254,0,164,25,111,0,90,188,90,255,204,4,197,0,40,213,50,1,212,96,132,255,88,138,180,254,228,146,124,255,184,246,247,0,65,117,86,255,253,102,210,254,254,121,36,0,137,115,3,255,60,24,216,0,134,18,29,0,59,226,97,0,176,142,71,0,7,209,161,0,189,84,51,254,155,250,72,0,213,84,235,255,45,222,224,0,238,148,143,255,170,42,53,255,78,167,117,0,186,0,40,255,125,177,103,255,69,225,66,0,227,7,88,1,75,172,6,0,169,45,227,1,16,36,70,255,50,2,9,255,139,193,22,0,143,183,231,254,218,69,50,0,236,56,161,1,213,131,42,0,138,145,44,254,136,229,40,255,49,63,35,255,61,145,245,255,101,192,2,254,232,167,113,0,152,104,38,1,121,185,218,0,121,139,211,254,119,240,35,0,65,189,217,254,187,179,162,255,160,187,230,0,62,248,14,255,60,78,97,0,255,247,163,255,225,59,91,255,107,71,58,255,241,47,33,1,50,117,236,0,219,177,63,254,244,90,179,0,35,194,215,255,189,67,50,255,23,135,129,0,104,189,37,255,185,57,194,0,35,62,231,255,220,248,108,0,12,231,178,0,143,80,91,1,131,93,101,255,144,39,2,1,255,250,178,0,5,17,236,254,139,32,46,0,204,188,38,254,245,115,52,255,191,113,73,254,191,108,69,255,22,69,245,1,23,203,178,0,170,99,170,0,65,248,111,0,37,108,153,255,64,37,69,0,0,88,62,254,89,148,144,255,191,68,224,1,241,39,53,0,41,203,237,255,145,126,194,255,221,42,253,255,25,99,151,0,97,253,223,1,74,115,49,255,6,175,72,255,59,176,203,0,124,183,249,1,228,228,99,0,129,12,207,254,168,192,195,255,204,176,16,254,152,234,171,0,77,37,85,255,33,120,135,255,142,194,227,1,31,214,58,0,213,187,125,255,232,46,60,255,190,116,42,254,151,178,19,255,51,62,237,254,204,236,193,0,194,232,60,0,172,34,157,255,189,16,184,254,103,3,95,255,141,233,36,254,41,25,11,255,21,195,166,0,118,245,45,0,67,213,149,255,159,12,18,255,187,164,227,1,160,25,5,0,12,78,195,1,43,197,225,0,48,142,41,254,196,155,60,255,223,199,18,1,145,136,156,0,252,117,169,254,145,226,238,0,239,23,107,0,109,181,188,255,230,112,49,254,73,170,237,255,231,183,227,255,80,220,20,0,194,107,127,1,127,205,101,0,46,52,197,1,210,171,36,255,88,3,90,255,56,151,141,0,96,187,255,255,42,78,200,0,254,70,70,1,244,125,168,0,204,68,138,1,124,215,70,0,102,66,200,254,17,52,228,0,117,220,143,254,203,248,123,0,56,18,174,255,186,151,164,255,51,232,208,1,160,228,43,255,249,29,25,1,68,190,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,127,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,188,129,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+30720); + +/* no memory initializer */ var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8); assert(tempDoublePtr % 8 == 0); @@ -1357,6 +1569,8 @@ function copyTempDouble(ptr) { } +// {{PRE_LIBRARY}} + Module["_bitshift64Ashr"] = _bitshift64Ashr; @@ -1370,206 +1584,160 @@ function copyTempDouble(ptr) { Module["_memset"] = _memset; + function _pthread_cleanup_push(routine, arg) { + __ATEXIT__.push(function() { Runtime.dynCall('vi', routine, [arg]) }) + _pthread_cleanup_push.level = __ATEXIT__.length; + } + Module["_bitshift64Lshr"] = _bitshift64Lshr; Module["_bitshift64Shl"] = _bitshift64Shl; + function _pthread_cleanup_pop() { + assert(_pthread_cleanup_push.level == __ATEXIT__.length, 'cannot pop if something else added meanwhile!'); + __ATEXIT__.pop(); + _pthread_cleanup_push.level = __ATEXIT__.length; + } + function _abort() { Module['abort'](); } - - Module["_strlen"] = _strlen; + function ___lock() {} - - function _emscripten_memcpy_big(dest, src, num) { - HEAPU8.set(HEAPU8.subarray(src, src+num), dest); - return dest; - } - Module["_memcpy"] = _memcpy; + function ___unlock() {} - var ___errno_state=0;function ___setErrNo(value) { - // For convenient setting and returning of errno. - HEAP32[((___errno_state)>>2)]=value; + + var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86}; + + var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; return value; } - var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(name) { - // long sysconf(int name); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html - switch(name) { - case 30: return PAGE_SIZE; - case 132: - case 133: - case 12: - case 137: - case 138: - case 15: - case 235: - case 16: - case 17: - case 18: - case 19: - case 20: - case 149: - case 13: - case 10: - case 236: - case 153: - case 9: - case 21: - case 22: - case 159: - case 154: - case 14: - case 77: - case 78: - case 139: - case 80: - case 81: - case 79: - case 82: - case 68: - case 67: - case 164: - case 11: - case 29: - case 47: - case 48: - case 95: - case 52: - case 51: - case 46: - return 200809; - case 27: - case 246: - case 127: - case 128: - case 23: - case 24: - case 160: - case 161: - case 181: - case 182: - case 242: - case 183: - case 184: - case 243: - case 244: - case 245: - case 165: - case 178: - case 179: - case 49: - case 50: - case 168: - case 169: - case 175: - case 170: - case 171: - case 172: - case 97: - case 76: - case 32: - case 173: - case 35: - return -1; - case 176: - case 177: - case 7: - case 155: - case 8: - case 157: - case 125: - case 126: - case 92: - case 93: - case 129: - case 130: - case 131: - case 94: - case 91: - return 1; - case 74: - case 60: - case 69: - case 70: - case 4: - return 1024; - case 31: - case 42: - case 72: - return 32; - case 87: - case 26: - case 33: - return 2147483647; - case 34: - case 1: - return 47839; - case 38: - case 36: - return 99; - case 43: - case 37: - return 2048; - case 0: return 2097152; - case 3: return 65536; - case 28: return 32768; - case 44: return 32767; - case 75: return 16384; - case 39: return 1000; - case 89: return 700; - case 71: return 256; - case 40: return 255; - case 2: return 100; - case 180: return 64; - case 25: return 20; - case 5: return 16; - case 6: return 6; - case 73: return 4; - case 84: { - if (typeof navigator === 'object') return navigator['hardwareConcurrency'] || 1; - return 1; + var PATH={splitPath:function (filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + },normalizeArray:function (parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } } - } - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } - - function _sbrk(bytes) { - // Implement a Linux-like 'memory area' for our 'process'. - // Changes the size of the memory area by |bytes|; returns the - // address of the previous top ('break') of the memory area - // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP - var self = _sbrk; - if (!self.called) { - DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned - self.called = true; - assert(Runtime.dynamicAlloc); - self.alloc = Runtime.dynamicAlloc; - Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; - } - var ret = DYNAMICTOP; - if (bytes != 0) self.alloc(bytes); - return ret; // Previous break location. - } - - - Module["_memmove"] = _memmove; - - function ___errno_location() { - return ___errno_state; - } - - - - - var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + return parts; + },normalize:function (path) { + var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.substr(-1) === '/'; + // Normalize the path + path = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + return (isAbsolute ? '/' : '') + path; + },dirname:function (path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + },basename:function (path) { + // EMSCRIPTEN return '/'' for '/', not an empty string + if (path === '/') return '/'; + var lastSlash = path.lastIndexOf('/'); + if (lastSlash === -1) return path; + return path.substr(lastSlash+1); + },extname:function (path) { + return PATH.splitPath(path)[3]; + },join:function () { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join('/')); + },join2:function (l, r) { + return PATH.normalize(l + '/' + r); + },resolve:function () { + var resolvedPath = '', + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : FS.cwd(); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + return ''; // an invalid portion invalidates the whole thing + } + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; + },relative:function (from, to) { + from = PATH.resolve(from).substr(1); + to = PATH.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); + }}; var TTY={ttys:[],init:function () { // https://github.com/kripken/emscripten/pull/1555 @@ -1647,13 +1815,28 @@ function copyTempDouble(ptr) { if (!tty.input.length) { var result = null; if (ENVIRONMENT_IS_NODE) { - result = process['stdin']['read'](); - if (!result) { - if (process['stdin']['_readableState'] && process['stdin']['_readableState']['ended']) { - return null; // EOF - } - return undefined; // no data available + // we will read data by chunks of BUFSIZE + var BUFSIZE = 256; + var buf = new Buffer(BUFSIZE); + var bytesRead = 0; + + var fd = process.stdin.fd; + // Linux and Mac cannot use process.stdin.fd (which isn't set up as sync) + var usingDevice = false; + try { + fd = fs.openSync('/dev/stdin', 'r'); + usingDevice = true; + } catch (e) {} + + bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null); + + if (usingDevice) { fs.closeSync(fd); } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString('utf-8'); + } else { + result = null; } + } else if (typeof window != 'undefined' && typeof window.prompt == 'function') { // Browser. @@ -1674,28 +1857,28 @@ function copyTempDouble(ptr) { tty.input = intArrayFromString(result, true); } return tty.input.shift(); - },flush:function (tty) { - if (tty.output && tty.output.length > 0) { - Module['print'](tty.output.join('')); - tty.output = []; - } },put_char:function (tty, val) { if (val === null || val === 10) { - Module['print'](tty.output.join('')); + Module['print'](UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { - tty.output.push(TTY.utf8.processCChar(val)); + if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. + } + },flush:function (tty) { + if (tty.output && tty.output.length > 0) { + Module['print'](UTF8ArrayToString(tty.output, 0)); + tty.output = []; } }},default_tty1_ops:{put_char:function (tty, val) { if (val === null || val === 10) { - Module['printErr'](tty.output.join('')); + Module['printErr'](UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { - tty.output.push(TTY.utf8.processCChar(val)); + if (val != 0) tty.output.push(val); } },flush:function (tty) { if (tty.output && tty.output.length > 0) { - Module['printErr'](tty.output.join('')); + Module['printErr'](UTF8ArrayToString(tty.output, 0)); tty.output = []; } }}}; @@ -1735,7 +1918,8 @@ function copyTempDouble(ptr) { read: MEMFS.stream_ops.read, write: MEMFS.stream_ops.write, allocate: MEMFS.stream_ops.allocate, - mmap: MEMFS.stream_ops.mmap + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync } }, link: { @@ -1793,7 +1977,6 @@ function copyTempDouble(ptr) { if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. return new Uint8Array(node.contents); },expandFileStorage:function (node, newCapacity) { - // If we are asked to expand the size of a file that already exists, revert to using a standard JS array to store the file // instead of a typed array. This makes resizing the array more flexible because we can just .push() elements at the back to // increase the size. @@ -1826,7 +2009,6 @@ function copyTempDouble(ptr) { node.usedBytes = 0; return; } - if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. var oldContents = node.contents; node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. @@ -1934,8 +2116,7 @@ function copyTempDouble(ptr) { assert(size >= 0); if (size > 8 && contents.subarray) { // non-trivial, and typed array buffer.set(contents.subarray(position, position + size), offset); - } else - { + } else { for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; } return size; @@ -1958,13 +2139,15 @@ function copyTempDouble(ptr) { return length; } } + // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. MEMFS.expandFileStorage(node, position+length); if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. - else + else { for (var i = 0; i < length; i++) { node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. } + } node.usedBytes = Math.max(node.usedBytes, position+length); return length; },llseek:function (stream, offset, whence) { @@ -2014,6 +2197,18 @@ function copyTempDouble(ptr) { buffer.set(contents, ptr); } return { ptr: ptr, allocated: allocated }; + },msync:function (stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(ERRNO_CODES.ENODEV); + } + if (mmapFlags & 2) { + // MAP_PRIVATE calls need not to be synced back to underlying fs + return 0; + } + + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + // should we check if bytesWritten and length are the same? + return 0; }}}; var IDBFS={dbs:{},indexedDB:function () { @@ -2063,7 +2258,9 @@ function copyTempDouble(ptr) { fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); } - fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + if (!fileStore.indexNames.contains('timestamp')) { + fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + } }; req.onsuccess = function() { db = req.result; @@ -2072,8 +2269,9 @@ function copyTempDouble(ptr) { IDBFS.dbs[name] = db; callback(null, db); }; - req.onerror = function() { + req.onerror = function(e) { callback(this.error); + e.preventDefault(); }; },getLocalSet:function (mount, callback) { var entries = {}; @@ -2114,7 +2312,10 @@ function copyTempDouble(ptr) { if (err) return callback(err); var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); - transaction.onerror = function() { callback(this.error); }; + transaction.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; var store = transaction.objectStore(IDBFS.DB_STORE_NAME); var index = store.index('timestamp'); @@ -2187,15 +2388,24 @@ function copyTempDouble(ptr) { },loadRemoteEntry:function (store, path, callback) { var req = store.get(path); req.onsuccess = function(event) { callback(null, event.target.result); }; - req.onerror = function() { callback(this.error); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; },storeRemoteEntry:function (store, path, entry, callback) { var req = store.put(entry, path); req.onsuccess = function() { callback(null); }; - req.onerror = function() { callback(this.error); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; },removeRemoteEntry:function (store, path, callback) { var req = store.delete(path); req.onsuccess = function() { callback(null); }; - req.onerror = function() { callback(this.error); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; },reconcile:function (src, dst, callback) { var total = 0; @@ -2242,7 +2452,10 @@ function copyTempDouble(ptr) { } }; - transaction.onerror = function() { done(this.error); }; + transaction.onerror = function(e) { + done(this.error); + e.preventDefault(); + }; // sort paths in ascending order so directory entries are created // before the files inside them @@ -2289,7 +2502,7 @@ function copyTempDouble(ptr) { try { stat = fs.lstatSync(path); if (NODEFS.isWindows) { - // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so + // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so // propagate write bits to execute bits. stat.mode = stat.mode | ((stat.mode & 146) >> 1); } @@ -2308,10 +2521,11 @@ function copyTempDouble(ptr) { parts.reverse(); return PATH.join.apply(null, parts); },flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function (flags) { + flags &= ~0100000 /*O_LARGEFILE*/; // Ignore this flag from musl, otherwise node.js fails to open the file. if (flags in NODEFS.flagsToPermissionStringMap) { return NODEFS.flagsToPermissionStringMap[flags]; } else { - return flags; + throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } },node_ops:{getattr:function (node) { var path = NODEFS.realPath(node); @@ -2427,7 +2641,9 @@ function copyTempDouble(ptr) { },readlink:function (node) { var path = NODEFS.realPath(node); try { - return fs.readlinkSync(path); + path = fs.readlinkSync(path); + path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); + return path; } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(ERRNO_CODES[e.code]); @@ -2499,64 +2715,167 @@ function copyTempDouble(ptr) { return position; }}}; - var _stdin=allocate(1, "i32*", ALLOC_STATIC); - - var _stdout=allocate(1, "i32*", ALLOC_STATIC); - - var _stderr=allocate(1, "i32*", ALLOC_STATIC); - - function _fflush(stream) { - // int fflush(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fflush.html - - /* - // Disabled, see https://github.com/kripken/emscripten/issues/2770 - stream = FS.getStreamFromPtr(stream); - if (stream.stream_ops.flush) { - stream.stream_ops.flush(stream); - } - */ - }var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},handleFSError:function (e) { - if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); - return ___setErrNo(e.errno); - },lookupPath:function (path, opts) { - path = PATH.resolve(FS.cwd(), path); - opts = opts || {}; - - if (!path) return { path: '', node: null }; - - var defaults = { - follow_mount: true, - recurse_count: 0 - }; - for (var key in defaults) { - if (opts[key] === undefined) { - opts[key] = defaults[key]; + var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function (mount) { + assert(ENVIRONMENT_IS_WORKER); + if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync(); + var root = WORKERFS.createNode(null, '/', WORKERFS.DIR_MODE, 0); + var createdParents = {}; + function ensureParent(path) { + // return the parent node, creating subdirs as necessary + var parts = path.split('/'); + var parent = root; + for (var i = 0; i < parts.length-1; i++) { + var curr = parts.slice(0, i+1).join('/'); + if (!createdParents[curr]) { + createdParents[curr] = WORKERFS.createNode(parent, curr, WORKERFS.DIR_MODE, 0); + } + parent = createdParents[curr]; } + return parent; } - - if (opts.recurse_count > 8) { // max recursive lookup of 8 - throw new FS.ErrnoError(ERRNO_CODES.ELOOP); + function base(path) { + var parts = path.split('/'); + return parts[parts.length-1]; } - - // split the path - var parts = PATH.normalizeArray(path.split('/').filter(function(p) { - return !!p; - }), false); - - // start at the root - var current = FS.root; - var current_path = '/'; - - for (var i = 0; i < parts.length; i++) { - var islast = (i === parts.length-1); - if (islast && opts.parent) { - // stop resolving - break; - } - - current = FS.lookupNode(current, parts[i]); - current_path = PATH.join2(current_path, parts[i]); + // We also accept FileList here, by using Array.prototype + Array.prototype.forEach.call(mount.opts["files"] || [], function(file) { + WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate); + }); + (mount.opts["blobs"] || []).forEach(function(obj) { + WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"]); + }); + (mount.opts["packages"] || []).forEach(function(pack) { + pack['metadata'].files.forEach(function(file) { + var name = file.filename.substr(1); // remove initial slash + WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack['blob'].slice(file.start, file.end)); + }); + }); + return root; + },createNode:function (parent, name, mode, dev, contents, mtime) { + var node = FS.createNode(parent, name, mode); + node.mode = mode; + node.node_ops = WORKERFS.node_ops; + node.stream_ops = WORKERFS.stream_ops; + node.timestamp = (mtime || new Date).getTime(); + assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE); + if (mode === WORKERFS.FILE_MODE) { + node.size = contents.size; + node.contents = contents; + } else { + node.size = 4096; + node.contents = {}; + } + if (parent) { + parent.contents[name] = node; + } + return node; + },node_ops:{getattr:function (node) { + return { + dev: 1, + ino: undefined, + mode: node.mode, + nlink: 1, + uid: 0, + gid: 0, + rdev: undefined, + size: node.size, + atime: new Date(node.timestamp), + mtime: new Date(node.timestamp), + ctime: new Date(node.timestamp), + blksize: 4096, + blocks: Math.ceil(node.size / 4096), + }; + },setattr:function (node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + },lookup:function (parent, name) { + throw new FS.ErrnoError(ERRNO_CODES.ENOENT); + },mknod:function (parent, name, mode, dev) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },rename:function (oldNode, newDir, newName) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },unlink:function (parent, name) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },rmdir:function (parent, name) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },readdir:function (node) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },symlink:function (parent, newName, oldPath) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },readlink:function (node) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + }},stream_ops:{read:function (stream, buffer, offset, length, position) { + if (position >= stream.node.size) return 0; + var chunk = stream.node.contents.slice(position, position + length); + var ab = WORKERFS.reader.readAsArrayBuffer(chunk); + buffer.set(new Uint8Array(ab), offset); + return chunk.size; + },write:function (stream, buffer, offset, length, position) { + throw new FS.ErrnoError(ERRNO_CODES.EIO); + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.size; + } + } + if (position < 0) { + throw new FS.ErrnoError(ERRNO_CODES.EINVAL); + } + return position; + }}}; + + var _stdin=allocate(1, "i32*", ALLOC_STATIC); + + var _stdout=allocate(1, "i32*", ALLOC_STATIC); + + var _stderr=allocate(1, "i32*", ALLOC_STATIC);var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,handleFSError:function (e) { + if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); + return ___setErrNo(e.errno); + },lookupPath:function (path, opts) { + path = PATH.resolve(FS.cwd(), path); + opts = opts || {}; + + if (!path) return { path: '', node: null }; + + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + for (var key in defaults) { + if (opts[key] === undefined) { + opts[key] = defaults[key]; + } + } + + if (opts.recurse_count > 8) { // max recursive lookup of 8 + throw new FS.ErrnoError(ERRNO_CODES.ELOOP); + } + + // split the path + var parts = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), false); + + // start at the root + var current = FS.root; + var current_path = '/'; + + for (var i = 0; i < parts.length; i++) { + var islast = (i === parts.length-1); + if (islast && opts.parent) { + // stop resolving + break; + } + + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); // jump to the mount's root node if this is a mountpoint if (FS.isMountpoint(current)) { @@ -2572,7 +2891,7 @@ function copyTempDouble(ptr) { while (FS.isLink(current.mode)) { var link = FS.readlink(current_path); current_path = PATH.resolve(PATH.dirname(current_path), link); - + var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); current = lookup.node; @@ -2710,8 +3029,7 @@ function copyTempDouble(ptr) { } return flags; },flagsToPermissionString:function (flag) { - var accmode = flag & 2097155; - var perms = ['r', 'w', 'rw'][accmode]; + var perms = ['r', 'w', 'rw'][flag & 3]; if ((flag & 512)) { perms += 'w'; } @@ -2822,10 +3140,6 @@ function copyTempDouble(ptr) { return stream; },closeStream:function (fd) { FS.streams[fd] = null; - },getStreamFromPtr:function (ptr) { - return FS.streams[ptr - 1]; - },getPtrForStream:function (stream) { - return stream ? stream.fd + 1 : 0; },chrdev_stream_ops:{open:function (stream) { var device = FS.getDevice(stream.node.rdev); // override node's stream ops with the device's @@ -3190,7 +3504,7 @@ function copyTempDouble(ptr) { if (!link.node_ops.readlink) { throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } - return link.node_ops.readlink(link); + return PATH.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); },stat:function (path, dontFollow) { var lookup = FS.lookupPath(path, { follow: !dontFollow }); var node = lookup.node; @@ -3338,6 +3652,10 @@ function copyTempDouble(ptr) { if (FS.isChrdev(node.mode)) { flags &= ~512; } + // if asked only for a directory, then this must be one + if ((flags & 65536) && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); + } // check permissions, if this is not a file we just created now (it is ok to // create and write to a file with read-only permissions; it is read-only // for later use) @@ -3393,6 +3711,7 @@ function copyTempDouble(ptr) { } return stream; },close:function (stream) { + if (stream.getdents) stream.getdents = null; // free readdir state try { if (stream.stream_ops.close) { stream.stream_ops.close(stream); @@ -3487,6 +3806,13 @@ function copyTempDouble(ptr) { throw new FS.ErrnoError(ERRNO_CODES.ENODEV); } return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); + },msync:function (stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + },munmap:function (stream) { + return 0; },ioctl:function (stream, cmd, arg) { if (!stream.stream_ops.ioctl) { throw new FS.ErrnoError(ERRNO_CODES.ENOTTY); @@ -3506,11 +3832,7 @@ function copyTempDouble(ptr) { var buf = new Uint8Array(length); FS.read(stream, buf, 0, length, 0); if (opts.encoding === 'utf8') { - ret = ''; - var utf8 = new Runtime.UTF8Processor(); - for (var i = 0; i < length; i++) { - ret += utf8.processCChar(buf[i]); - } + ret = UTF8ArrayToString(buf, 0); } else if (opts.encoding === 'binary') { ret = buf; } @@ -3525,9 +3847,9 @@ function copyTempDouble(ptr) { } var stream = FS.open(path, opts.flags, opts.mode); if (opts.encoding === 'utf8') { - var utf8 = new Runtime.UTF8Processor(); - var buf = new Uint8Array(utf8.processJSString(data)); - FS.write(stream, buf, 0, buf.length, 0, opts.canOwn); + var buf = new Uint8Array(lengthBytesUTF8(data)+1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, 0, opts.canOwn); } else if (opts.encoding === 'binary') { FS.write(stream, data, 0, data.length, 0, opts.canOwn); } @@ -3554,7 +3876,7 @@ function copyTempDouble(ptr) { // setup /dev/null FS.registerDevice(FS.makedev(1, 3), { read: function() { return 0; }, - write: function() { return 0; } + write: function(stream, buffer, offset, length, pos) { return length; } }); FS.mkdev('/dev/null', FS.makedev(1, 3)); // setup /dev/tty and /dev/tty1 @@ -3583,6 +3905,31 @@ function copyTempDouble(ptr) { // just create the tmp dirs that reside in it commonly FS.mkdir('/dev/shm'); FS.mkdir('/dev/shm/tmp'); + },createSpecialDirectories:function () { + // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) + FS.mkdir('/proc'); + FS.mkdir('/proc/self'); + FS.mkdir('/proc/self/fd'); + FS.mount({ + mount: function() { + var node = FS.createNode('/proc/self', 'fd', 16384 | 0777, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + var ret = { + parent: null, + mount: { mountpoint: 'fake' }, + node_ops: { readlink: function() { return stream.path } } + }; + ret.parent = ret; // make it look like a simple root node + return ret; + } + }; + return node; + } + }, {}, '/proc/self/fd'); },createStandardStreams:function () { // TODO deprecate the old functionality of a single // input / output callback and that utilizes FS.createDevice @@ -3610,19 +3957,17 @@ function copyTempDouble(ptr) { // open default streams for the stdin, stdout and stderr devices var stdin = FS.open('/dev/stdin', 'r'); - HEAP32[((_stdin)>>2)]=FS.getPtrForStream(stdin); assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); var stdout = FS.open('/dev/stdout', 'w'); - HEAP32[((_stdout)>>2)]=FS.getPtrForStream(stdout); assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); var stderr = FS.open('/dev/stderr', 'w'); - HEAP32[((_stderr)>>2)]=FS.getPtrForStream(stderr); assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); },ensureErrnoError:function () { if (FS.ErrnoError) return; FS.ErrnoError = function ErrnoError(errno, node) { + //Module.printErr(stackTrace()); // useful for debugging this.node = node; this.setErrno = function(errno) { this.errno = errno; @@ -3652,6 +3997,14 @@ function copyTempDouble(ptr) { FS.createDefaultDirectories(); FS.createDefaultDevices(); + FS.createSpecialDirectories(); + + FS.filesystems = { + 'MEMFS': MEMFS, + 'IDBFS': IDBFS, + 'NODEFS': NODEFS, + 'WORKERFS': WORKERFS, + }; },init:function (input, output, error) { assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); FS.init.initialized = true; @@ -3666,6 +4019,10 @@ function copyTempDouble(ptr) { FS.createStandardStreams(); },quit:function () { FS.init.initialized = false; + // force-flush all streams, so we get musl std streams printed out + var fflush = Module['_fflush']; + if (fflush) fflush(0); + // close all of our streams for (var i = 0; i < FS.streams.length; i++) { var stream = FS.streams[i]; if (!stream) { @@ -3982,18 +4339,20 @@ function copyTempDouble(ptr) { }; node.stream_ops = stream_ops; return node; - },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn) { + },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { Browser.init(); // TODO we should allow people to just pass in a complete filename instead // of parent and name being that we just join them anyways var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname function processData(byteArray) { function finish(byteArray) { + if (preFinish) preFinish(); if (!dontCreateFile) { FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); } if (onload) onload(); - removeRunDependency('cp ' + fullname); + removeRunDependency(dep); } var handled = false; Module['preloadPlugins'].forEach(function(plugin) { @@ -4001,14 +4360,14 @@ function copyTempDouble(ptr) { if (plugin['canHandle'](fullname)) { plugin['handle'](byteArray, fullname, finish, function() { if (onerror) onerror(); - removeRunDependency('cp ' + fullname); + removeRunDependency(dep); }); handled = true; } }); if (!handled) finish(byteArray); } - addRunDependency('cp ' + fullname); + addRunDependency(dep); if (typeof url == 'string') { Browser.asyncLoad(url, function(byteArray) { processData(byteArray); @@ -4088,149 +4447,384 @@ function copyTempDouble(ptr) { transaction.onerror = onerror; }; openRequest.onerror = onerror; - }};var PATH={splitPath:function (filename) { - var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; - return splitPathRe.exec(filename).slice(1); - },normalizeArray:function (parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; + }};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function (dirfd, path) { + if (path[0] !== '/') { + // relative path + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + dir = dirstream.path; } + path = PATH.join2(dir, path); } - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); + return path; + },doStat:function (func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + // an error occurred while trying to look up the path; we should just report ENOTDIR + return -ERRNO_CODES.ENOTDIR; } + throw e; } - return parts; - },normalize:function (path) { - var isAbsolute = path.charAt(0) === '/', - trailingSlash = path.substr(-1) === '/'; - // Normalize the path - path = PATH.normalizeArray(path.split('/').filter(function(p) { - return !!p; - }), !isAbsolute).join('/'); - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - return (isAbsolute ? '/' : '') + path; - },dirname:function (path) { - var result = PATH.splitPath(path), - root = result[0], - dir = result[1]; - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); + HEAP32[((buf)>>2)]=stat.dev; + HEAP32[(((buf)+(4))>>2)]=0; + HEAP32[(((buf)+(8))>>2)]=stat.ino; + HEAP32[(((buf)+(12))>>2)]=stat.mode; + HEAP32[(((buf)+(16))>>2)]=stat.nlink; + HEAP32[(((buf)+(20))>>2)]=stat.uid; + HEAP32[(((buf)+(24))>>2)]=stat.gid; + HEAP32[(((buf)+(28))>>2)]=stat.rdev; + HEAP32[(((buf)+(32))>>2)]=0; + HEAP32[(((buf)+(36))>>2)]=stat.size; + HEAP32[(((buf)+(40))>>2)]=4096; + HEAP32[(((buf)+(44))>>2)]=stat.blocks; + HEAP32[(((buf)+(48))>>2)]=(stat.atime.getTime() / 1000)|0; + HEAP32[(((buf)+(52))>>2)]=0; + HEAP32[(((buf)+(56))>>2)]=(stat.mtime.getTime() / 1000)|0; + HEAP32[(((buf)+(60))>>2)]=0; + HEAP32[(((buf)+(64))>>2)]=(stat.ctime.getTime() / 1000)|0; + HEAP32[(((buf)+(68))>>2)]=0; + HEAP32[(((buf)+(72))>>2)]=stat.ino; + return 0; + },doMsync:function (addr, stream, len, flags) { + var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len)); + FS.msync(stream, buffer, 0, len, flags); + },doMkdir:function (path, mode) { + // remove a trailing slash, if one - /a/b/ has basename of '', but + // we want to create b in the context of this function + path = PATH.normalize(path); + if (path[path.length-1] === '/') path = path.substr(0, path.length-1); + FS.mkdir(path, mode, 0); + return 0; + },doMknod:function (path, mode, dev) { + // we don't want this in the JS API as it uses mknod to create all nodes. + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + default: return -ERRNO_CODES.EINVAL; } - return root + dir; - },basename:function (path) { - // EMSCRIPTEN return '/'' for '/', not an empty string - if (path === '/') return '/'; - var lastSlash = path.lastIndexOf('/'); - if (lastSlash === -1) return path; - return path.substr(lastSlash+1); - },extname:function (path) { - return PATH.splitPath(path)[3]; - },join:function () { - var paths = Array.prototype.slice.call(arguments, 0); - return PATH.normalize(paths.join('/')); - },join2:function (l, r) { - return PATH.normalize(l + '/' + r); - },resolve:function () { - var resolvedPath = '', - resolvedAbsolute = false; - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : FS.cwd(); - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - return ''; // an invalid portion invalidates the whole thing - } - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; + FS.mknod(path, mode, dev); + return 0; + },doReadlink:function (path, buf, bufsize) { + if (bufsize <= 0) return -ERRNO_CODES.EINVAL; + var ret = FS.readlink(path); + ret = ret.slice(0, Math.max(0, bufsize)); + writeStringToMemory(ret, buf, true); + return ret.length; + },doAccess:function (path, amode) { + if (amode & ~7) { + // need a valid mode + return -ERRNO_CODES.EINVAL; } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; - },relative:function (from, to) { - from = PATH.resolve(from).substr(1); - to = PATH.resolve(to).substr(1); - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - if (start > end) return []; - return arr.slice(start, end - start + 1); + var node; + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + var perms = ''; + if (amode & 4) perms += 'r'; + if (amode & 2) perms += 'w'; + if (amode & 1) perms += 'x'; + if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { + return -ERRNO_CODES.EACCES; } - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } + return 0; + },doDup:function (path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + },doReadv:function (stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.read(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; // nothing more to read } - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); + return ret; + },doWritev:function (stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.write(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - return outputParts.join('/'); - }}; - - - function _emscripten_set_main_loop_timing(mode, value) { - Browser.mainLoop.timingMode = mode; - Browser.mainLoop.timingValue = value; - - if (!Browser.mainLoop.func) { - return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. - } - - if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { - setTimeout(Browser.mainLoop.runner, value); // doing this each time means that on exception, we stop - }; - Browser.mainLoop.method = 'timeout'; - } else if (mode == 1 /*EM_TIMING_RAF*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { - Browser.requestAnimationFrame(Browser.mainLoop.runner); - }; - Browser.mainLoop.method = 'rAF'; - } - return 0; - }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg) { - Module['noExitRuntime'] = true; - - assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); + return ret; + },varargs:0,get:function (varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function () { + var ret = Pointer_stringify(SYSCALLS.get()); + return ret; + },getStreamFromFD:function () { + var stream = FS.getStream(SYSCALLS.get()); + if (!stream) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + return stream; + },getSocketFromFD:function () { + var socket = SOCKFS.getSocket(SYSCALLS.get()); + if (!socket) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + return socket; + },getSocketAddress:function (allowNull) { + var addrp = SYSCALLS.get(), addrlen = SYSCALLS.get(); + if (allowNull && addrp === 0) return null; + var info = __read_sockaddr(addrp, addrlen); + if (info.errno) throw new FS.ErrnoError(info.errno); + info.addr = DNS.lookup_addr(info.addr) || info.addr; + return info; + },get64:function () { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function () { + assert(SYSCALLS.get() === 0); + }};function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function _sysconf(name) { + // long sysconf(int name); + // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html + switch(name) { + case 30: return PAGE_SIZE; + case 85: return totalMemory / PAGE_SIZE; + case 132: + case 133: + case 12: + case 137: + case 138: + case 15: + case 235: + case 16: + case 17: + case 18: + case 19: + case 20: + case 149: + case 13: + case 10: + case 236: + case 153: + case 9: + case 21: + case 22: + case 159: + case 154: + case 14: + case 77: + case 78: + case 139: + case 80: + case 81: + case 82: + case 68: + case 67: + case 164: + case 11: + case 29: + case 47: + case 48: + case 95: + case 52: + case 51: + case 46: + return 200809; + case 79: + return 0; + case 27: + case 246: + case 127: + case 128: + case 23: + case 24: + case 160: + case 161: + case 181: + case 182: + case 242: + case 183: + case 184: + case 243: + case 244: + case 245: + case 165: + case 178: + case 179: + case 49: + case 50: + case 168: + case 169: + case 175: + case 170: + case 171: + case 172: + case 97: + case 76: + case 32: + case 173: + case 35: + return -1; + case 176: + case 177: + case 7: + case 155: + case 8: + case 157: + case 125: + case 126: + case 92: + case 93: + case 129: + case 130: + case 131: + case 94: + case 91: + return 1; + case 74: + case 60: + case 69: + case 70: + case 4: + return 1024; + case 31: + case 42: + case 72: + return 32; + case 87: + case 26: + case 33: + return 2147483647; + case 34: + case 1: + return 47839; + case 38: + case 36: + return 99; + case 43: + case 37: + return 2048; + case 0: return 2097152; + case 3: return 65536; + case 28: return 32768; + case 44: return 32767; + case 75: return 16384; + case 39: return 1000; + case 89: return 700; + case 71: return 256; + case 40: return 255; + case 2: return 100; + case 180: return 64; + case 25: return 20; + case 5: return 16; + case 6: return 6; + case 73: return 4; + case 84: { + if (typeof navigator === 'object') return navigator['hardwareConcurrency'] || 1; + return 1; + } + } + ___setErrNo(ERRNO_CODES.EINVAL); + return -1; + } + + function _sbrk(bytes) { + // Implement a Linux-like 'memory area' for our 'process'. + // Changes the size of the memory area by |bytes|; returns the + // address of the previous top ('break') of the memory area + // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP + var self = _sbrk; + if (!self.called) { + DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned + self.called = true; + assert(Runtime.dynamicAlloc); + self.alloc = Runtime.dynamicAlloc; + Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; + } + var ret = DYNAMICTOP; + if (bytes != 0) { + var success = self.alloc(bytes); + if (!success) return -1 >>> 0; // sbrk failure code + } + return ret; // Previous break location. + } + + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + return dest; + } + Module["_memcpy"] = _memcpy; + Module["_memmove"] = _memmove; + + + + + function _emscripten_set_main_loop_timing(mode, value) { + Browser.mainLoop.timingMode = mode; + Browser.mainLoop.timingValue = value; + + if (!Browser.mainLoop.func) { + return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. + } + + if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { + setTimeout(Browser.mainLoop.runner, value); // doing this each time means that on exception, we stop + }; + Browser.mainLoop.method = 'timeout'; + } else if (mode == 1 /*EM_TIMING_RAF*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { + Browser.requestAnimationFrame(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'rAF'; + } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { + if (!window['setImmediate']) { + // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) + var setImmediates = []; + var emscriptenMainLoopMessageId = '__emcc'; + function Browser_setImmediate_messageHandler(event) { + if (event.source === window && event.data === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()(); + } + } + window.addEventListener("message", Browser_setImmediate_messageHandler, true); + window['setImmediate'] = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + window.postMessage(emscriptenMainLoopMessageId, "*"); + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + window['setImmediate'](Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'immediate'; + } + return 0; + }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { + Module['noExitRuntime'] = true; + + assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); Browser.mainLoop.func = func; Browser.mainLoop.arg = arg; @@ -4299,10 +4893,12 @@ function copyTempDouble(ptr) { Browser.mainLoop.scheduler(); } - if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); - else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) + if (!noSetTiming) { + if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) - Browser.mainLoop.scheduler(); + Browser.mainLoop.scheduler(); + } if (simulateInfiniteLoop) { throw 'SimulateInfiniteLoop'; @@ -4316,8 +4912,9 @@ function copyTempDouble(ptr) { var timingValue = Browser.mainLoop.timingValue; var func = Browser.mainLoop.func; Browser.mainLoop.func = null; - _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg); + _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler(); },updateStatus:function () { if (Module['setStatus']) { var message = Module['statusMessage'] || 'Please wait...'; @@ -4571,11 +5168,13 @@ function copyTempDouble(ptr) { Browser.init(); } return ctx; - },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas) { + },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas, vrDevice) { Browser.lockPointer = lockPointer; Browser.resizeCanvas = resizeCanvas; + Browser.vrDevice = vrDevice; if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; + if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; var canvas = Module['canvas']; function fullScreenChange() { @@ -4620,13 +5219,18 @@ function copyTempDouble(ptr) { var canvasContainer = document.createElement("div"); canvas.parentNode.insertBefore(canvasContainer, canvas); canvasContainer.appendChild(canvas); - + // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) canvasContainer.requestFullScreen = canvasContainer['requestFullScreen'] || canvasContainer['mozRequestFullScreen'] || canvasContainer['msRequestFullscreen'] || (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); - canvasContainer.requestFullScreen(); + + if (vrDevice) { + canvasContainer.requestFullScreen({ vrDisplay: vrDevice }); + } else { + canvasContainer.requestFullScreen(); + } },nextRAF:0,fakeRequestAnimationFrame:function (func) { // try to keep 60fps between calls to here var now = Date.now(); @@ -4657,19 +5261,43 @@ function copyTempDouble(ptr) { return function() { if (!ABORT) return func.apply(null, arguments); }; + },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function () { + Browser.allowAsyncCallbacks = false; + },resumeAsyncCallbacks:function () { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now + Browser.allowAsyncCallbacks = true; + if (Browser.queuedAsyncCallbacks.length > 0) { + var callbacks = Browser.queuedAsyncCallbacks; + Browser.queuedAsyncCallbacks = []; + callbacks.forEach(function(func) { + func(); + }); + } },safeRequestAnimationFrame:function (func) { return Browser.requestAnimationFrame(function() { - if (!ABORT) func(); + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } }); },safeSetTimeout:function (func, timeout) { Module['noExitRuntime'] = true; return setTimeout(function() { - if (!ABORT) func(); + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } }, timeout); },safeSetInterval:function (func, timeout) { Module['noExitRuntime'] = true; return setInterval(function() { - if (!ABORT) func(); + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } // drop it on the floor otherwise, next interval will kick in }, timeout); },getMimetype:function (name) { return { @@ -4767,8 +5395,10 @@ function copyTempDouble(ptr) { Browser.lastTouches[touch.identifier] = coords; Browser.touches[touch.identifier] = coords; } else if (event.type === 'touchend' || event.type === 'touchmove') { - Browser.lastTouches[touch.identifier] = Browser.touches[touch.identifier]; - Browser.touches[touch.identifier] = { x: adjustedX, y: adjustedY }; + var last = Browser.touches[touch.identifier]; + if (!last) last = coords; + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords; } return; } @@ -4897,16 +5527,83 @@ function copyTempDouble(ptr) { } return ret; } -___errno_state = Runtime.staticAlloc(4); HEAP32[((___errno_state)>>2)]=0; -Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas) { Browser.requestFullScreen(lockPointer, resizeCanvas) }; + + function _pthread_self() { + //FIXME: assumes only a single thread + return 0; + } + + function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + var offset = offset_low; + assert(offset_high === 0); + FS.llseek(stream, offset, whence); + HEAP32[((result)>>2)]=stream.position; + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall146(which, varargs) {SYSCALLS.varargs = varargs; + try { + // writev + var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + return SYSCALLS.doWritev(stream, iov, iovcnt); + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get(); + switch (op) { + case 21505: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + return 0; + } + case 21506: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + return 0; // no-op, not actually adjusting terminal settings + } + case 21519: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + var argp = SYSCALLS.get(); + HEAP32[((argp)>>2)]=0; + return 0; + } + case 21520: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + return -ERRNO_CODES.EINVAL; // not supported + } + case 21531: { + var argp = SYSCALLS.get(); + return FS.ioctl(stream, op, argp); + } + default: abort('bad ioctl syscall ' + op); + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } +FS.staticInit();__ATINIT__.unshift(function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() });__ATMAIN__.push(function() { FS.ignorePermissions = false });__ATEXIT__.push(function() { FS.quit() });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice;Module["FS_unlink"] = FS.unlink; +__ATINIT__.unshift(function() { TTY.init() });__ATEXIT__.push(function() { TTY.shutdown() }); +if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); } +Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } -FS.staticInit();__ATINIT__.unshift({ func: function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() } });__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });__ATEXIT__.push({ func: function() { FS.quit() } });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice; -__ATINIT__.unshift({ func: function() { TTY.init() } });__ATEXIT__.push({ func: function() { TTY.shutdown() } });TTY.utf8 = new Runtime.UTF8Processor(); -if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); NODEFS.staticInit(); } + Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) } STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP); staticSealed = true; // seal the static portion of memory @@ -4917,16 +5614,44 @@ DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX); assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack"); - var ctlz_i8 = allocate([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_DYNAMIC); var cttz_i8 = allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0], "i8", ALLOC_DYNAMIC); -Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }; -Module.asmLibraryArg = { "abort": abort, "assert": assert, "min": Math_min, "_fflush": _fflush, "_sysconf": _sysconf, "_abort": _abort, "___setErrNo": ___setErrNo, "_sbrk": _sbrk, "_time": _time, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_emscripten_set_main_loop": _emscripten_set_main_loop, "___errno_location": ___errno_location, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8, "ctlz_i8": ctlz_i8, "NaN": NaN, "Infinity": Infinity }; -// EMSCRIPTEN_START_ASM -var asm = (function(global, env, buffer) { - 'use asm'; - +function invoke_ii(index,a1) { + try { + return Module["dynCall_ii"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + asm["setThrew"](1, 0); + } +} + +function invoke_iiii(index,a1,a2,a3) { + try { + return Module["dynCall_iiii"](index,a1,a2,a3); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + asm["setThrew"](1, 0); + } +} + +function invoke_vi(index,a1) { + try { + Module["dynCall_vi"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + asm["setThrew"](1, 0); + } +} + +Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; + +Module.asmLibraryArg = { "abort": abort, "assert": assert, "invoke_ii": invoke_ii, "invoke_iiii": invoke_iiii, "invoke_vi": invoke_vi, "_pthread_cleanup_pop": _pthread_cleanup_pop, "___lock": ___lock, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_pthread_self": _pthread_self, "___syscall6": ___syscall6, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_abort": _abort, "_sbrk": _sbrk, "_time": _time, "___setErrNo": ___setErrNo, "_emscripten_memcpy_big": _emscripten_memcpy_big, "___syscall54": ___syscall54, "___unlock": ___unlock, "___syscall140": ___syscall140, "_pthread_cleanup_push": _pthread_cleanup_push, "_sysconf": _sysconf, "___syscall146": ___syscall146, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8 }; +// EMSCRIPTEN_START_ASM +var asm = (function(global, env, buffer) { + 'use asm'; + + var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); var HEAP32 = new global.Int32Array(buffer); @@ -4942,13 +5667,12 @@ var asm = (function(global, env, buffer) { var tempDoublePtr=env.tempDoublePtr|0; var ABORT=env.ABORT|0; var cttz_i8=env.cttz_i8|0; - var ctlz_i8=env.ctlz_i8|0; var __THREW__ = 0; var threwValue = 0; var setjmpId = 0; var undef = 0; - var nan = +env.NaN, inf = +env.Infinity; + var nan = global.NaN, inf = global.Infinity; var tempInt = 0, tempBigInt = 0, tempBigIntP = 0, tempBigIntS = 0, tempBigIntR = 0.0, tempBigIntI = 0, tempBigIntD = 0, tempValue = 0, tempDouble = 0.0; var tempRet0 = 0; @@ -4976,19 +5700,30 @@ var asm = (function(global, env, buffer) { var Math_log=global.Math.log; var Math_ceil=global.Math.ceil; var Math_imul=global.Math.imul; + var Math_min=global.Math.min; + var Math_clz32=global.Math.clz32; var abort=env.abort; var assert=env.assert; - var Math_min=env.min; - var _fflush=env._fflush; - var _sysconf=env._sysconf; + var invoke_ii=env.invoke_ii; + var invoke_iiii=env.invoke_iiii; + var invoke_vi=env.invoke_vi; + var _pthread_cleanup_pop=env._pthread_cleanup_pop; + var ___lock=env.___lock; + var _emscripten_set_main_loop=env._emscripten_set_main_loop; + var _pthread_self=env._pthread_self; + var ___syscall6=env.___syscall6; + var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing; var _abort=env._abort; - var ___setErrNo=env.___setErrNo; var _sbrk=env._sbrk; var _time=env._time; - var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing; + var ___setErrNo=env.___setErrNo; var _emscripten_memcpy_big=env._emscripten_memcpy_big; - var _emscripten_set_main_loop=env._emscripten_set_main_loop; - var ___errno_location=env.___errno_location; + var ___syscall54=env.___syscall54; + var ___unlock=env.___unlock; + var ___syscall140=env.___syscall140; + var _pthread_cleanup_push=env._pthread_cleanup_push; + var _sysconf=env._sysconf; + var ___syscall146=env.___syscall146; var tempFloat = 0.0; // EMSCRIPTEN_START_FUNCS @@ -4997,7 +5732,7 @@ function stackAlloc(size) { var ret = 0; ret = STACKTOP; STACKTOP = (STACKTOP + size)|0; -STACKTOP = (STACKTOP + 15)&-16; + STACKTOP = (STACKTOP + 15)&-16; return ret|0; } @@ -5008,6 +5743,12 @@ function stackRestore(top) { top = top|0; STACKTOP = top; } +function establishStackSpace(stackBase, stackMax) { + stackBase = stackBase|0; + stackMax = stackMax|0; + STACKTOP = stackBase; + STACK_MAX = stackMax; +} function setThrew(threw, value) { threw = threw|0; @@ -5035,6 +5776,7 @@ function copyTempDouble(ptr) { HEAP8[tempDoublePtr+6>>0] = HEAP8[ptr+6>>0]; HEAP8[tempDoublePtr+7>>0] = HEAP8[ptr+7>>0]; } + function setTempRet0(value) { value = value|0; tempRet0 = value; @@ -5060,189 +5802,189 @@ function _crypto_verify_32_ref($x,$y) { $0 = HEAP8[$x>>0]|0; $1 = HEAP8[$y>>0]|0; $2 = $1 ^ $0; - $3 = (($x) + 1|0); + $3 = ((($x)) + 1|0); $4 = HEAP8[$3>>0]|0; - $5 = (($y) + 1|0); + $5 = ((($y)) + 1|0); $6 = HEAP8[$5>>0]|0; $7 = $6 ^ $4; $8 = $7 | $2; - $9 = (($x) + 2|0); + $9 = ((($x)) + 2|0); $10 = HEAP8[$9>>0]|0; - $11 = (($y) + 2|0); + $11 = ((($y)) + 2|0); $12 = HEAP8[$11>>0]|0; $13 = $12 ^ $10; $14 = $8 | $13; - $15 = (($x) + 3|0); + $15 = ((($x)) + 3|0); $16 = HEAP8[$15>>0]|0; - $17 = (($y) + 3|0); + $17 = ((($y)) + 3|0); $18 = HEAP8[$17>>0]|0; $19 = $18 ^ $16; $20 = $14 | $19; - $21 = (($x) + 4|0); + $21 = ((($x)) + 4|0); $22 = HEAP8[$21>>0]|0; - $23 = (($y) + 4|0); + $23 = ((($y)) + 4|0); $24 = HEAP8[$23>>0]|0; $25 = $24 ^ $22; $26 = $20 | $25; - $27 = (($x) + 5|0); + $27 = ((($x)) + 5|0); $28 = HEAP8[$27>>0]|0; - $29 = (($y) + 5|0); + $29 = ((($y)) + 5|0); $30 = HEAP8[$29>>0]|0; $31 = $30 ^ $28; $32 = $26 | $31; - $33 = (($x) + 6|0); + $33 = ((($x)) + 6|0); $34 = HEAP8[$33>>0]|0; - $35 = (($y) + 6|0); + $35 = ((($y)) + 6|0); $36 = HEAP8[$35>>0]|0; $37 = $36 ^ $34; $38 = $32 | $37; - $39 = (($x) + 7|0); + $39 = ((($x)) + 7|0); $40 = HEAP8[$39>>0]|0; - $41 = (($y) + 7|0); + $41 = ((($y)) + 7|0); $42 = HEAP8[$41>>0]|0; $43 = $42 ^ $40; $44 = $38 | $43; - $45 = (($x) + 8|0); + $45 = ((($x)) + 8|0); $46 = HEAP8[$45>>0]|0; - $47 = (($y) + 8|0); + $47 = ((($y)) + 8|0); $48 = HEAP8[$47>>0]|0; $49 = $48 ^ $46; $50 = $44 | $49; - $51 = (($x) + 9|0); + $51 = ((($x)) + 9|0); $52 = HEAP8[$51>>0]|0; - $53 = (($y) + 9|0); + $53 = ((($y)) + 9|0); $54 = HEAP8[$53>>0]|0; $55 = $54 ^ $52; $56 = $50 | $55; - $57 = (($x) + 10|0); + $57 = ((($x)) + 10|0); $58 = HEAP8[$57>>0]|0; - $59 = (($y) + 10|0); + $59 = ((($y)) + 10|0); $60 = HEAP8[$59>>0]|0; $61 = $60 ^ $58; $62 = $56 | $61; - $63 = (($x) + 11|0); + $63 = ((($x)) + 11|0); $64 = HEAP8[$63>>0]|0; - $65 = (($y) + 11|0); + $65 = ((($y)) + 11|0); $66 = HEAP8[$65>>0]|0; $67 = $66 ^ $64; $68 = $62 | $67; - $69 = (($x) + 12|0); + $69 = ((($x)) + 12|0); $70 = HEAP8[$69>>0]|0; - $71 = (($y) + 12|0); + $71 = ((($y)) + 12|0); $72 = HEAP8[$71>>0]|0; $73 = $72 ^ $70; $74 = $68 | $73; - $75 = (($x) + 13|0); + $75 = ((($x)) + 13|0); $76 = HEAP8[$75>>0]|0; - $77 = (($y) + 13|0); + $77 = ((($y)) + 13|0); $78 = HEAP8[$77>>0]|0; $79 = $78 ^ $76; $80 = $74 | $79; - $81 = (($x) + 14|0); + $81 = ((($x)) + 14|0); $82 = HEAP8[$81>>0]|0; - $83 = (($y) + 14|0); + $83 = ((($y)) + 14|0); $84 = HEAP8[$83>>0]|0; $85 = $84 ^ $82; $86 = $80 | $85; - $87 = (($x) + 15|0); + $87 = ((($x)) + 15|0); $88 = HEAP8[$87>>0]|0; - $89 = (($y) + 15|0); + $89 = ((($y)) + 15|0); $90 = HEAP8[$89>>0]|0; $91 = $90 ^ $88; $92 = $86 | $91; - $93 = (($x) + 16|0); + $93 = ((($x)) + 16|0); $94 = HEAP8[$93>>0]|0; - $95 = (($y) + 16|0); + $95 = ((($y)) + 16|0); $96 = HEAP8[$95>>0]|0; $97 = $96 ^ $94; $98 = $92 | $97; - $99 = (($x) + 17|0); + $99 = ((($x)) + 17|0); $100 = HEAP8[$99>>0]|0; - $101 = (($y) + 17|0); + $101 = ((($y)) + 17|0); $102 = HEAP8[$101>>0]|0; $103 = $102 ^ $100; $104 = $98 | $103; - $105 = (($x) + 18|0); + $105 = ((($x)) + 18|0); $106 = HEAP8[$105>>0]|0; - $107 = (($y) + 18|0); + $107 = ((($y)) + 18|0); $108 = HEAP8[$107>>0]|0; $109 = $108 ^ $106; $110 = $104 | $109; - $111 = (($x) + 19|0); + $111 = ((($x)) + 19|0); $112 = HEAP8[$111>>0]|0; - $113 = (($y) + 19|0); + $113 = ((($y)) + 19|0); $114 = HEAP8[$113>>0]|0; $115 = $114 ^ $112; $116 = $110 | $115; - $117 = (($x) + 20|0); + $117 = ((($x)) + 20|0); $118 = HEAP8[$117>>0]|0; - $119 = (($y) + 20|0); + $119 = ((($y)) + 20|0); $120 = HEAP8[$119>>0]|0; $121 = $120 ^ $118; $122 = $116 | $121; - $123 = (($x) + 21|0); + $123 = ((($x)) + 21|0); $124 = HEAP8[$123>>0]|0; - $125 = (($y) + 21|0); + $125 = ((($y)) + 21|0); $126 = HEAP8[$125>>0]|0; $127 = $126 ^ $124; $128 = $122 | $127; - $129 = (($x) + 22|0); + $129 = ((($x)) + 22|0); $130 = HEAP8[$129>>0]|0; - $131 = (($y) + 22|0); + $131 = ((($y)) + 22|0); $132 = HEAP8[$131>>0]|0; $133 = $132 ^ $130; $134 = $128 | $133; - $135 = (($x) + 23|0); + $135 = ((($x)) + 23|0); $136 = HEAP8[$135>>0]|0; - $137 = (($y) + 23|0); + $137 = ((($y)) + 23|0); $138 = HEAP8[$137>>0]|0; $139 = $138 ^ $136; $140 = $134 | $139; - $141 = (($x) + 24|0); + $141 = ((($x)) + 24|0); $142 = HEAP8[$141>>0]|0; - $143 = (($y) + 24|0); + $143 = ((($y)) + 24|0); $144 = HEAP8[$143>>0]|0; $145 = $144 ^ $142; $146 = $140 | $145; - $147 = (($x) + 25|0); + $147 = ((($x)) + 25|0); $148 = HEAP8[$147>>0]|0; - $149 = (($y) + 25|0); + $149 = ((($y)) + 25|0); $150 = HEAP8[$149>>0]|0; $151 = $150 ^ $148; $152 = $146 | $151; - $153 = (($x) + 26|0); + $153 = ((($x)) + 26|0); $154 = HEAP8[$153>>0]|0; - $155 = (($y) + 26|0); + $155 = ((($y)) + 26|0); $156 = HEAP8[$155>>0]|0; $157 = $156 ^ $154; $158 = $152 | $157; - $159 = (($x) + 27|0); + $159 = ((($x)) + 27|0); $160 = HEAP8[$159>>0]|0; - $161 = (($y) + 27|0); + $161 = ((($y)) + 27|0); $162 = HEAP8[$161>>0]|0; $163 = $162 ^ $160; $164 = $158 | $163; - $165 = (($x) + 28|0); + $165 = ((($x)) + 28|0); $166 = HEAP8[$165>>0]|0; - $167 = (($y) + 28|0); + $167 = ((($y)) + 28|0); $168 = HEAP8[$167>>0]|0; $169 = $168 ^ $166; $170 = $164 | $169; - $171 = (($x) + 29|0); + $171 = ((($x)) + 29|0); $172 = HEAP8[$171>>0]|0; - $173 = (($y) + 29|0); + $173 = ((($y)) + 29|0); $174 = HEAP8[$173>>0]|0; $175 = $174 ^ $172; $176 = $170 | $175; - $177 = (($x) + 30|0); + $177 = ((($x)) + 30|0); $178 = HEAP8[$177>>0]|0; - $179 = (($y) + 30|0); + $179 = ((($y)) + 30|0); $180 = HEAP8[$179>>0]|0; $181 = $180 ^ $178; $182 = $176 | $181; - $183 = (($x) + 31|0); + $183 = ((($x)) + 31|0); $184 = HEAP8[$183>>0]|0; - $185 = (($y) + 31|0); + $185 = ((($y)) + 31|0); $186 = HEAP8[$185>>0]|0; $187 = $186 ^ $184; $188 = $182 | $187; @@ -5251,39 +5993,40 @@ function _crypto_verify_32_ref($x,$y) { $191 = $190 >>> 8; $192 = $191 & 1; $193 = (($192) + -1)|0; - STACKTOP = sp;return ($193|0); + return ($193|0); } function _curve25519_sign($signature_out,$curve25519_privkey,$msg,$msg_len) { $signature_out = $signature_out|0; $curve25519_privkey = $curve25519_privkey|0; $msg = $msg|0; $msg_len = $msg_len|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_keypair = 0, $ed_pubkey_point = 0, $sigbuf_out_len = 0, dest = 0; - var label = 0, sp = 0, src = 0, stop = 0; + var $$alloca_mul = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_keypair = 0, $ed_pubkey_point = 0, $sigbuf_out_len = 0; + var dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 240|0; $ed_pubkey_point = sp + 8|0; $ed_keypair = sp + 168|0; $sigbuf_out_len = sp; $0 = (($msg_len) + 64)|0; - $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; + $$alloca_mul = $0; + $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0;; $2 = $sigbuf_out_len; $3 = $2; HEAP32[$3>>2] = 0; $4 = (($2) + 4)|0; $5 = $4; HEAP32[$5>>2] = 0; - dest=$ed_keypair+0|0; src=$curve25519_privkey+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$ed_keypair; src=$curve25519_privkey; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _crypto_sign_ed25519_ref10_ge_scalarmult_base($ed_pubkey_point,$curve25519_privkey); - $6 = (($ed_keypair) + 32|0); + $6 = ((($ed_keypair)) + 32|0); _crypto_sign_ed25519_ref10_ge_p3_tobytes($6,$ed_pubkey_point); - $7 = (($ed_keypair) + 63|0); + $7 = ((($ed_keypair)) + 63|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = $9 & 128; (_crypto_sign_modified($1,$sigbuf_out_len,$msg,$msg_len,0,$ed_keypair)|0); - dest=$signature_out+0|0; src=$1+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $11 = (($signature_out) + 63|0); + dest=$signature_out; src=$1; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $11 = ((($signature_out)) + 63|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = $13 | $10; @@ -5296,8 +6039,8 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { $curve25519_pubkey = $curve25519_pubkey|0; $msg = $msg|0; $msg_len = $msg_len|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_pubkey = 0, $ed_y = 0; - var $inv_mont_x_plus_one = 0, $mont_x = 0, $mont_x_minus_one = 0, $mont_x_plus_one = 0, $one = 0, $some_retval = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $$alloca_mul = 0, $$alloca_mul1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + var $ed_pubkey = 0, $ed_y = 0, $inv_mont_x_plus_one = 0, $mont_x = 0, $mont_x_minus_one = 0, $mont_x_plus_one = 0, $one = 0, $some_retval = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 288|0; $mont_x = sp + 208|0; @@ -5309,8 +6052,10 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { $ed_pubkey = sp + 248|0; $some_retval = sp; $0 = (($msg_len) + 64)|0; - $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; - $2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; + $$alloca_mul = $0; + $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0;; + $$alloca_mul1 = $0; + $2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul1)|0)+15)&-16)|0;; _crypto_sign_ed25519_ref10_fe_frombytes($mont_x,$curve25519_pubkey); _crypto_sign_ed25519_ref10_fe_1($one); _crypto_sign_ed25519_ref10_fe_sub($mont_x_minus_one,$mont_x,$one); @@ -5318,11 +6063,11 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { _crypto_sign_ed25519_ref10_fe_invert($inv_mont_x_plus_one,$mont_x_plus_one); _crypto_sign_ed25519_ref10_fe_mul($ed_y,$mont_x_minus_one,$inv_mont_x_plus_one); _crypto_sign_ed25519_ref10_fe_tobytes($ed_pubkey,$ed_y); - $3 = (($signature) + 63|0); + $3 = ((($signature)) + 63|0); $4 = HEAP8[$3>>0]|0; $5 = $4&255; $6 = $5 & 128; - $7 = (($ed_pubkey) + 31|0); + $7 = ((($ed_pubkey)) + 31|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = $9 | $6; @@ -5333,8 +6078,8 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { $14 = $13 & 127; $15 = $14&255; HEAP8[$3>>0] = $15; - dest=$1+0|0; src=$signature+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $16 = (($1) + 64|0); + dest=$1; src=$signature; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $16 = ((($1)) + 64|0); _memcpy(($16|0),($msg|0),($msg_len|0))|0; $17 = (_crypto_sign_edwards25519sha512batch_ref10_open($2,$some_retval,$1,$0,0,$ed_pubkey)|0); STACKTOP = sp;return ($17|0); @@ -5363,12 +6108,12 @@ function _crypto_sign_modified($sm,$smlen,$m,$0,$1,$sk) { var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $R = 0, $hram = 0, $nonce = 0, $pk1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 320|0; - $pk1 = sp + 288|0; - $nonce = sp + 224|0; + $pk1 = sp + 224|0; + $nonce = sp + 256|0; $hram = sp + 160|0; $R = sp; - $2 = (($sk) + 32|0); - dest=$pk1+0|0; src=$2+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $2 = ((($sk)) + 32|0); + dest=$pk1; src=$2; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); $3 = (_i64Add(($0|0),($1|0),64,0)|0); $4 = tempRet0; $5 = $smlen; @@ -5377,14 +6122,14 @@ function _crypto_sign_modified($sm,$smlen,$m,$0,$1,$sk) { $7 = (($5) + 4)|0; $8 = $7; HEAP32[$8>>2] = $4; - $9 = (($sm) + 64|0); + $9 = ((($sm)) + 64|0); _memmove(($9|0),($m|0),($0|0))|0; - $10 = (($sm) + 32|0); + $10 = ((($sm)) + 32|0); _memmove(($10|0),($sk|0),32)|0; $11 = (_i64Add(($0|0),($1|0),32,0)|0); $12 = tempRet0; (_crypto_hash_sha512_ref($nonce,$10,$11,$12)|0); - dest=$10+0|0; src=$pk1+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$10; src=$pk1; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _crypto_sign_ed25519_ref10_sc_reduce($nonce); _crypto_sign_ed25519_ref10_ge_scalarmult_base($R,$nonce); _crypto_sign_ed25519_ref10_ge_p3_tobytes($sm,$R); @@ -5405,7 +6150,7 @@ function _curve25519_donna($mypublic,$secret,$basepoint) { $z = sp + 80|0; $zmone = sp; $e = sp + 328|0; - dest=$e+0|0; src=$secret+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$e; src=$secret; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _fexpand($bp,$basepoint); _cmult($x,$z,$e,$bp); _crecip($zmone,$z); @@ -5434,20 +6179,20 @@ function _fexpand($output,$input) { sp = STACKTOP; $0 = HEAP8[$input>>0]|0; $1 = $0&255; - $2 = (($input) + 1|0); + $2 = ((($input)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($input) + 2|0); + $8 = ((($input)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - $15 = (($input) + 3|0); + $15 = ((($input)) + 3|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (_bitshift64Shl(($17|0),0,24)|0); @@ -5462,20 +6207,20 @@ function _fexpand($output,$input) { HEAP32[$25>>2] = $14; $26 = HEAP8[$15>>0]|0; $27 = $26&255; - $28 = (($input) + 4|0); + $28 = ((($input)) + 4|0); $29 = HEAP8[$28>>0]|0; $30 = $29&255; $31 = (_bitshift64Shl(($30|0),0,8)|0); $32 = tempRet0; $33 = $31 | $27; - $34 = (($input) + 5|0); + $34 = ((($input)) + 5|0); $35 = HEAP8[$34>>0]|0; $36 = $35&255; $37 = (_bitshift64Shl(($36|0),0,16)|0); $38 = tempRet0; $39 = $33 | $37; $40 = $32 | $38; - $41 = (($input) + 6|0); + $41 = ((($input)) + 6|0); $42 = HEAP8[$41>>0]|0; $43 = $42&255; $44 = (_bitshift64Shl(($43|0),0,24)|0); @@ -5485,7 +6230,7 @@ function _fexpand($output,$input) { $48 = (_bitshift64Lshr(($46|0),($47|0),2)|0); $49 = tempRet0; $50 = $48 & 33554431; - $51 = (($output) + 8|0); + $51 = ((($output)) + 8|0); $52 = $51; $53 = $52; HEAP32[$53>>2] = $50; @@ -5494,20 +6239,20 @@ function _fexpand($output,$input) { HEAP32[$55>>2] = 0; $56 = HEAP8[$41>>0]|0; $57 = $56&255; - $58 = (($input) + 7|0); + $58 = ((($input)) + 7|0); $59 = HEAP8[$58>>0]|0; $60 = $59&255; $61 = (_bitshift64Shl(($60|0),0,8)|0); $62 = tempRet0; $63 = $61 | $57; - $64 = (($input) + 8|0); + $64 = ((($input)) + 8|0); $65 = HEAP8[$64>>0]|0; $66 = $65&255; $67 = (_bitshift64Shl(($66|0),0,16)|0); $68 = tempRet0; $69 = $63 | $67; $70 = $62 | $68; - $71 = (($input) + 9|0); + $71 = ((($input)) + 9|0); $72 = HEAP8[$71>>0]|0; $73 = $72&255; $74 = (_bitshift64Shl(($73|0),0,24)|0); @@ -5517,7 +6262,7 @@ function _fexpand($output,$input) { $78 = (_bitshift64Lshr(($76|0),($77|0),3)|0); $79 = tempRet0; $80 = $78 & 67108863; - $81 = (($output) + 16|0); + $81 = ((($output)) + 16|0); $82 = $81; $83 = $82; HEAP32[$83>>2] = $80; @@ -5526,20 +6271,20 @@ function _fexpand($output,$input) { HEAP32[$85>>2] = 0; $86 = HEAP8[$71>>0]|0; $87 = $86&255; - $88 = (($input) + 10|0); + $88 = ((($input)) + 10|0); $89 = HEAP8[$88>>0]|0; $90 = $89&255; $91 = (_bitshift64Shl(($90|0),0,8)|0); $92 = tempRet0; $93 = $91 | $87; - $94 = (($input) + 11|0); + $94 = ((($input)) + 11|0); $95 = HEAP8[$94>>0]|0; $96 = $95&255; $97 = (_bitshift64Shl(($96|0),0,16)|0); $98 = tempRet0; $99 = $93 | $97; $100 = $92 | $98; - $101 = (($input) + 12|0); + $101 = ((($input)) + 12|0); $102 = HEAP8[$101>>0]|0; $103 = $102&255; $104 = (_bitshift64Shl(($103|0),0,24)|0); @@ -5549,7 +6294,7 @@ function _fexpand($output,$input) { $108 = (_bitshift64Lshr(($106|0),($107|0),5)|0); $109 = tempRet0; $110 = $108 & 33554431; - $111 = (($output) + 24|0); + $111 = ((($output)) + 24|0); $112 = $111; $113 = $112; HEAP32[$113>>2] = $110; @@ -5558,20 +6303,20 @@ function _fexpand($output,$input) { HEAP32[$115>>2] = 0; $116 = HEAP8[$101>>0]|0; $117 = $116&255; - $118 = (($input) + 13|0); + $118 = ((($input)) + 13|0); $119 = HEAP8[$118>>0]|0; $120 = $119&255; $121 = (_bitshift64Shl(($120|0),0,8)|0); $122 = tempRet0; $123 = $121 | $117; - $124 = (($input) + 14|0); + $124 = ((($input)) + 14|0); $125 = HEAP8[$124>>0]|0; $126 = $125&255; $127 = (_bitshift64Shl(($126|0),0,16)|0); $128 = tempRet0; $129 = $123 | $127; $130 = $122 | $128; - $131 = (($input) + 15|0); + $131 = ((($input)) + 15|0); $132 = HEAP8[$131>>0]|0; $133 = $132&255; $134 = (_bitshift64Shl(($133|0),0,24)|0); @@ -5581,37 +6326,37 @@ function _fexpand($output,$input) { $138 = (_bitshift64Lshr(($136|0),($137|0),6)|0); $139 = tempRet0; $140 = $138 & 67108863; - $141 = (($output) + 32|0); + $141 = ((($output)) + 32|0); $142 = $141; $143 = $142; HEAP32[$143>>2] = $140; $144 = (($142) + 4)|0; $145 = $144; HEAP32[$145>>2] = 0; - $146 = (($input) + 16|0); + $146 = ((($input)) + 16|0); $147 = HEAP8[$146>>0]|0; $148 = $147&255; - $149 = (($input) + 17|0); + $149 = ((($input)) + 17|0); $150 = HEAP8[$149>>0]|0; $151 = $150&255; $152 = (_bitshift64Shl(($151|0),0,8)|0); $153 = tempRet0; $154 = $152 | $148; - $155 = (($input) + 18|0); + $155 = ((($input)) + 18|0); $156 = HEAP8[$155>>0]|0; $157 = $156&255; $158 = (_bitshift64Shl(($157|0),0,16)|0); $159 = tempRet0; $160 = $154 | $158; $161 = $153 | $159; - $162 = (($input) + 19|0); + $162 = ((($input)) + 19|0); $163 = HEAP8[$162>>0]|0; $164 = $163&255; $165 = (_bitshift64Shl(($164|0),0,24)|0); $166 = tempRet0; $167 = $165 & 16777216; $168 = $160 | $167; - $169 = (($output) + 40|0); + $169 = ((($output)) + 40|0); $170 = $169; $171 = $170; HEAP32[$171>>2] = $168; @@ -5620,20 +6365,20 @@ function _fexpand($output,$input) { HEAP32[$173>>2] = $161; $174 = HEAP8[$162>>0]|0; $175 = $174&255; - $176 = (($input) + 20|0); + $176 = ((($input)) + 20|0); $177 = HEAP8[$176>>0]|0; $178 = $177&255; $179 = (_bitshift64Shl(($178|0),0,8)|0); $180 = tempRet0; $181 = $179 | $175; - $182 = (($input) + 21|0); + $182 = ((($input)) + 21|0); $183 = HEAP8[$182>>0]|0; $184 = $183&255; $185 = (_bitshift64Shl(($184|0),0,16)|0); $186 = tempRet0; $187 = $181 | $185; $188 = $180 | $186; - $189 = (($input) + 22|0); + $189 = ((($input)) + 22|0); $190 = HEAP8[$189>>0]|0; $191 = $190&255; $192 = (_bitshift64Shl(($191|0),0,24)|0); @@ -5643,7 +6388,7 @@ function _fexpand($output,$input) { $196 = (_bitshift64Lshr(($194|0),($195|0),1)|0); $197 = tempRet0; $198 = $196 & 67108863; - $199 = (($output) + 48|0); + $199 = ((($output)) + 48|0); $200 = $199; $201 = $200; HEAP32[$201>>2] = $198; @@ -5652,20 +6397,20 @@ function _fexpand($output,$input) { HEAP32[$203>>2] = 0; $204 = HEAP8[$189>>0]|0; $205 = $204&255; - $206 = (($input) + 23|0); + $206 = ((($input)) + 23|0); $207 = HEAP8[$206>>0]|0; $208 = $207&255; $209 = (_bitshift64Shl(($208|0),0,8)|0); $210 = tempRet0; $211 = $209 | $205; - $212 = (($input) + 24|0); + $212 = ((($input)) + 24|0); $213 = HEAP8[$212>>0]|0; $214 = $213&255; $215 = (_bitshift64Shl(($214|0),0,16)|0); $216 = tempRet0; $217 = $211 | $215; $218 = $210 | $216; - $219 = (($input) + 25|0); + $219 = ((($input)) + 25|0); $220 = HEAP8[$219>>0]|0; $221 = $220&255; $222 = (_bitshift64Shl(($221|0),0,24)|0); @@ -5675,7 +6420,7 @@ function _fexpand($output,$input) { $226 = (_bitshift64Lshr(($224|0),($225|0),3)|0); $227 = tempRet0; $228 = $226 & 33554431; - $229 = (($output) + 56|0); + $229 = ((($output)) + 56|0); $230 = $229; $231 = $230; HEAP32[$231>>2] = $228; @@ -5684,20 +6429,20 @@ function _fexpand($output,$input) { HEAP32[$233>>2] = 0; $234 = HEAP8[$219>>0]|0; $235 = $234&255; - $236 = (($input) + 26|0); + $236 = ((($input)) + 26|0); $237 = HEAP8[$236>>0]|0; $238 = $237&255; $239 = (_bitshift64Shl(($238|0),0,8)|0); $240 = tempRet0; $241 = $239 | $235; - $242 = (($input) + 27|0); + $242 = ((($input)) + 27|0); $243 = HEAP8[$242>>0]|0; $244 = $243&255; $245 = (_bitshift64Shl(($244|0),0,16)|0); $246 = tempRet0; $247 = $241 | $245; $248 = $240 | $246; - $249 = (($input) + 28|0); + $249 = ((($input)) + 28|0); $250 = HEAP8[$249>>0]|0; $251 = $250&255; $252 = (_bitshift64Shl(($251|0),0,24)|0); @@ -5707,7 +6452,7 @@ function _fexpand($output,$input) { $256 = (_bitshift64Lshr(($254|0),($255|0),4)|0); $257 = tempRet0; $258 = $256 & 67108863; - $259 = (($output) + 64|0); + $259 = ((($output)) + 64|0); $260 = $259; $261 = $260; HEAP32[$261>>2] = $258; @@ -5716,20 +6461,20 @@ function _fexpand($output,$input) { HEAP32[$263>>2] = 0; $264 = HEAP8[$249>>0]|0; $265 = $264&255; - $266 = (($input) + 29|0); + $266 = ((($input)) + 29|0); $267 = HEAP8[$266>>0]|0; $268 = $267&255; $269 = (_bitshift64Shl(($268|0),0,8)|0); $270 = tempRet0; $271 = $269 | $265; - $272 = (($input) + 30|0); + $272 = ((($input)) + 30|0); $273 = HEAP8[$272>>0]|0; $274 = $273&255; $275 = (_bitshift64Shl(($274|0),0,16)|0); $276 = tempRet0; $277 = $271 | $275; $278 = $270 | $276; - $279 = (($input) + 31|0); + $279 = ((($input)) + 31|0); $280 = HEAP8[$279>>0]|0; $281 = $280&255; $282 = (_bitshift64Shl(($281|0),0,24)|0); @@ -5739,14 +6484,14 @@ function _fexpand($output,$input) { $286 = (_bitshift64Lshr(($284|0),($285|0),6)|0); $287 = tempRet0; $288 = $286 & 33554431; - $289 = (($output) + 72|0); + $289 = ((($output)) + 72|0); $290 = $289; $291 = $290; HEAP32[$291>>2] = $288; $292 = (($290) + 4)|0; $293 = $292; HEAP32[$293>>2] = 0; - STACKTOP = sp;return; + return; } function _cmult($resultx,$resultz,$n,$q) { $resultx = $resultx|0; @@ -5755,8 +6500,8 @@ function _cmult($resultx,$resultz,$n,$q) { $q = $q|0; var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $b = 0, $byte$09 = 0, $c = 0, $d = 0, $e = 0, $exitcond = 0, $exitcond20 = 0, $f = 0, $g = 0, $h = 0, $i$018 = 0, $j$08 = 0, $nqpqx$019 = 0, $nqpqx$110 = 0; - var $nqpqx$110$phi = 0, $nqpqx2$014 = 0, $nqpqx2$14 = 0, $nqpqx2$14$phi = 0, $nqpqz$013 = 0, $nqpqz$13 = 0, $nqpqz$13$phi = 0, $nqpqz2$015 = 0, $nqpqz2$15 = 0, $nqpqz2$15$phi = 0, $nqx$011 = 0, $nqx$11 = 0, $nqx$11$phi = 0, $nqx2$016 = 0, $nqx2$16 = 0, $nqx2$16$phi = 0, $nqz$012 = 0, $nqz$12 = 0, $nqz$12$phi = 0, $nqz2$017 = 0; - var $nqz2$17 = 0, $nqz2$17$phi = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $nqpqx$110$lcssa = 0, $nqpqx$110$phi = 0, $nqpqx2$014 = 0, $nqpqx2$14 = 0, $nqpqx2$14$lcssa = 0, $nqpqx2$14$phi = 0, $nqpqz$013 = 0, $nqpqz$13 = 0, $nqpqz$13$lcssa = 0, $nqpqz$13$phi = 0, $nqpqz2$015 = 0, $nqpqz2$15 = 0, $nqpqz2$15$lcssa = 0, $nqpqz2$15$phi = 0, $nqx$011 = 0, $nqx$11 = 0, $nqx$11$lcssa = 0, $nqx$11$phi = 0, $nqx2$016 = 0, $nqx2$16 = 0; + var $nqx2$16$lcssa = 0, $nqx2$16$lcssa$lcssa = 0, $nqx2$16$phi = 0, $nqz$012 = 0, $nqz$12 = 0, $nqz$12$lcssa = 0, $nqz$12$phi = 0, $nqz2$017 = 0, $nqz2$17 = 0, $nqz2$17$lcssa = 0, $nqz2$17$lcssa$lcssa = 0, $nqz2$17$phi = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1216|0; $a = sp + 1064|0; @@ -5799,7 +6544,7 @@ function _cmult($resultx,$resultz,$n,$q) { $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = 0; - dest=$a+0|0; src=$q+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$a; src=$q; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $i$018 = 0;$nqpqx$019 = $a;$nqpqx2$014 = $e;$nqpqz$013 = $b;$nqpqz2$015 = $f;$nqx$011 = $c;$nqx2$016 = $g;$nqz$012 = $d;$nqz2$017 = $h; while(1) { $16 = (31 - ($i$018))|0; @@ -5819,6 +6564,7 @@ function _cmult($resultx,$resultz,$n,$q) { $23 = (($j$08) + 1)|0; $exitcond = ($23|0)==(8); if ($exitcond) { + $nqpqx$110$lcssa = $nqpqx$110;$nqpqx2$14$lcssa = $nqpqx2$14;$nqpqz$13$lcssa = $nqpqz$13;$nqpqz2$15$lcssa = $nqpqz2$15;$nqx$11$lcssa = $nqx$11;$nqx2$16$lcssa = $nqx2$16;$nqz$12$lcssa = $nqz$12;$nqz2$17$lcssa = $nqz2$17; break; } else { $nqz2$17$phi = $nqz$12;$nqz$12$phi = $nqz2$17;$nqx2$16$phi = $nqx$11;$nqx$11$phi = $nqx2$16;$nqpqz2$15$phi = $nqpqz$13;$nqpqz$13$phi = $nqpqz2$15;$nqpqx2$14$phi = $nqpqx$110;$nqpqx$110$phi = $nqpqx2$14;$byte$09 = $22;$j$08 = $23;$nqz2$17 = $nqz2$17$phi;$nqz$12 = $nqz$12$phi;$nqx2$16 = $nqx2$16$phi;$nqx$11 = $nqx$11$phi;$nqpqz2$15 = $nqpqz2$15$phi;$nqpqz$13 = $nqpqz$13$phi;$nqpqx2$14 = $nqpqx2$14$phi;$nqpqx$110 = $nqpqx$110$phi; @@ -5827,13 +6573,14 @@ function _cmult($resultx,$resultz,$n,$q) { $24 = (($i$018) + 1)|0; $exitcond20 = ($24|0)==(32); if ($exitcond20) { + $nqx2$16$lcssa$lcssa = $nqx2$16$lcssa;$nqz2$17$lcssa$lcssa = $nqz2$17$lcssa; break; } else { - $i$018 = $24;$nqpqx$019 = $nqpqx2$14;$nqpqx2$014 = $nqpqx$110;$nqpqz$013 = $nqpqz2$15;$nqpqz2$015 = $nqpqz$13;$nqx$011 = $nqx2$16;$nqx2$016 = $nqx$11;$nqz$012 = $nqz2$17;$nqz2$017 = $nqz$12; + $i$018 = $24;$nqpqx$019 = $nqpqx2$14$lcssa;$nqpqx2$014 = $nqpqx$110$lcssa;$nqpqz$013 = $nqpqz2$15$lcssa;$nqpqz2$015 = $nqpqz$13$lcssa;$nqx$011 = $nqx2$16$lcssa;$nqx2$016 = $nqx$11$lcssa;$nqz$012 = $nqz2$17$lcssa;$nqz2$017 = $nqz$12$lcssa; } } - dest=$resultx+0|0; src=$nqx2$16+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$resultz+0|0; src=$nqz2$17+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$resultx; src=$nqx2$16$lcssa$lcssa; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$resultz; src=$nqz2$17$lcssa$lcssa; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); STACKTOP = sp;return; } function _crecip($out,$z) { @@ -5973,34 +6720,35 @@ function _fmul($output,$in,$in2) { _fproduct($t,$in,$in2); _freduce_degree($t); _freduce_coefficients($t); - dest=$output+0|0; src=$t+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$output; src=$t; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); STACKTOP = sp;return; } function _fcontract($output,$input_limbs) { $output = $output|0; $input_limbs = $input_limbs|0; - var $$pn = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; - var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; - var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; - var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0; - var $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0; - var $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0; - var $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0; - var $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0; - var $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0; - var $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0; - var $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0; - var $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0; - var $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0; - var $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0; - var $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0; - var $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0; - var $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0; - var $403 = 0, $404 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; - var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; - var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0; - var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond11 = 0, $exitcond11$1 = 0, $exitcond14 = 0, $exitcond14$1 = 0, $i$17 = 0, $i$17$1 = 0, $i$24 = 0, $i$24$1 = 0, $i$33 = 0, $input = 0, $mask$02 = 0, $mask$1 = 0, label = 0; - var sp = 0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; + var $422 = 0, $423 = 0, $424 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; + var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; + var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0; + var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond$1 = 0, $exitcond13 = 0, $exitcond13$1 = 0, $i$18 = 0, $i$18$1 = 0, $i$26 = 0, $i$26$1 = 0, $input = 0, $mask$1 = 0, $mask$1$1 = 0, $mask$1$2 = 0, $mask$1$3 = 0, $mask$1$4 = 0, $mask$1$5 = 0; + var $mask$1$6 = 0, $mask$1$7 = 0, $mask$1$8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $input = sp; @@ -6011,93 +6759,93 @@ function _fcontract($output,$input_limbs) { $4 = $3; $5 = HEAP32[$4>>2]|0; HEAP32[$input>>2] = $2; - $6 = (($input_limbs) + 8|0); + $6 = ((($input_limbs)) + 8|0); $7 = $6; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; - $13 = (($input) + 4|0); + $13 = ((($input)) + 4|0); HEAP32[$13>>2] = $9; - $14 = (($input_limbs) + 16|0); + $14 = ((($input_limbs)) + 16|0); $15 = $14; $16 = $15; $17 = HEAP32[$16>>2]|0; $18 = (($15) + 4)|0; $19 = $18; $20 = HEAP32[$19>>2]|0; - $21 = (($input) + 8|0); + $21 = ((($input)) + 8|0); HEAP32[$21>>2] = $17; - $22 = (($input_limbs) + 24|0); + $22 = ((($input_limbs)) + 24|0); $23 = $22; $24 = $23; $25 = HEAP32[$24>>2]|0; $26 = (($23) + 4)|0; $27 = $26; $28 = HEAP32[$27>>2]|0; - $29 = (($input) + 12|0); + $29 = ((($input)) + 12|0); HEAP32[$29>>2] = $25; - $30 = (($input_limbs) + 32|0); + $30 = ((($input_limbs)) + 32|0); $31 = $30; $32 = $31; $33 = HEAP32[$32>>2]|0; $34 = (($31) + 4)|0; $35 = $34; $36 = HEAP32[$35>>2]|0; - $37 = (($input) + 16|0); + $37 = ((($input)) + 16|0); HEAP32[$37>>2] = $33; - $38 = (($input_limbs) + 40|0); + $38 = ((($input_limbs)) + 40|0); $39 = $38; $40 = $39; $41 = HEAP32[$40>>2]|0; $42 = (($39) + 4)|0; $43 = $42; $44 = HEAP32[$43>>2]|0; - $45 = (($input) + 20|0); + $45 = ((($input)) + 20|0); HEAP32[$45>>2] = $41; - $46 = (($input_limbs) + 48|0); + $46 = ((($input_limbs)) + 48|0); $47 = $46; $48 = $47; $49 = HEAP32[$48>>2]|0; $50 = (($47) + 4)|0; $51 = $50; $52 = HEAP32[$51>>2]|0; - $53 = (($input) + 24|0); + $53 = ((($input)) + 24|0); HEAP32[$53>>2] = $49; - $54 = (($input_limbs) + 56|0); + $54 = ((($input_limbs)) + 56|0); $55 = $54; $56 = $55; $57 = HEAP32[$56>>2]|0; $58 = (($55) + 4)|0; $59 = $58; $60 = HEAP32[$59>>2]|0; - $61 = (($input) + 28|0); + $61 = ((($input)) + 28|0); HEAP32[$61>>2] = $57; - $62 = (($input_limbs) + 64|0); + $62 = ((($input_limbs)) + 64|0); $63 = $62; $64 = $63; $65 = HEAP32[$64>>2]|0; $66 = (($63) + 4)|0; $67 = $66; $68 = HEAP32[$67>>2]|0; - $69 = (($input) + 32|0); + $69 = ((($input)) + 32|0); HEAP32[$69>>2] = $65; - $70 = (($input_limbs) + 72|0); + $70 = ((($input_limbs)) + 72|0); $71 = $70; $72 = $71; $73 = HEAP32[$72>>2]|0; $74 = (($71) + 4)|0; $75 = $74; $76 = HEAP32[$75>>2]|0; - $77 = (($input) + 36|0); + $77 = ((($input)) + 36|0); HEAP32[$77>>2] = $73; - $78 = (($input) + 36|0); - $i$17 = 0; + $78 = ((($input)) + 36|0); + $i$18 = 0; while(1) { - $79 = $i$17 & 1; + $79 = $i$18 & 1; $80 = ($79|0)==(0); - $81 = (($input) + ($i$17<<2)|0); + $81 = (($input) + ($i$18<<2)|0); $82 = HEAP32[$81>>2]|0; $83 = $82 >> 31; $84 = $83 & $82; @@ -6106,7 +6854,7 @@ function _fcontract($output,$input_limbs) { $93 = Math_imul($92, -67108864)|0; $94 = (($93) + ($82))|0; HEAP32[$81>>2] = $94; - $95 = (($i$17) + 1)|0; + $95 = (($i$18) + 1)|0; $96 = (($input) + ($95<<2)|0); $97 = HEAP32[$96>>2]|0; $98 = (($97) + ($92))|0; @@ -6116,18 +6864,18 @@ function _fcontract($output,$input_limbs) { $86 = Math_imul($85, -33554432)|0; $87 = (($86) + ($82))|0; HEAP32[$81>>2] = $87; - $88 = (($i$17) + 1)|0; + $88 = (($i$18) + 1)|0; $89 = (($input) + ($88<<2)|0); $90 = HEAP32[$89>>2]|0; $91 = (($90) + ($85))|0; HEAP32[$89>>2] = $91; } - $99 = (($i$17) + 1)|0; - $exitcond14 = ($99|0)==(9); - if ($exitcond14) { + $99 = (($i$18) + 1)|0; + $exitcond13 = ($99|0)==(9); + if ($exitcond13) { break; } else { - $i$17 = $99; + $i$18 = $99; } } $100 = HEAP32[$78>>2]|0; @@ -6141,41 +6889,41 @@ function _fcontract($output,$input_limbs) { $107 = ($103*19)|0; $108 = (($107) + ($106))|0; HEAP32[$input>>2] = $108; - $i$17$1 = 0; + $i$18$1 = 0; while(1) { - $384 = $i$17$1 & 1; - $385 = ($384|0)==(0); - $386 = (($input) + ($i$17$1<<2)|0); - $387 = HEAP32[$386>>2]|0; - $388 = $387 >> 31; - $389 = $388 & $387; - if ($385) { - $397 = $389 >> 26; - $398 = Math_imul($397, -67108864)|0; - $399 = (($398) + ($387))|0; - HEAP32[$386>>2] = $399; - $400 = (($i$17$1) + 1)|0; - $401 = (($input) + ($400<<2)|0); - $402 = HEAP32[$401>>2]|0; - $403 = (($402) + ($397))|0; - HEAP32[$401>>2] = $403; + $404 = $i$18$1 & 1; + $405 = ($404|0)==(0); + $406 = (($input) + ($i$18$1<<2)|0); + $407 = HEAP32[$406>>2]|0; + $408 = $407 >> 31; + $409 = $408 & $407; + if ($405) { + $417 = $409 >> 26; + $418 = Math_imul($417, -67108864)|0; + $419 = (($418) + ($407))|0; + HEAP32[$406>>2] = $419; + $420 = (($i$18$1) + 1)|0; + $421 = (($input) + ($420<<2)|0); + $422 = HEAP32[$421>>2]|0; + $423 = (($422) + ($417))|0; + HEAP32[$421>>2] = $423; } else { - $390 = $389 >> 25; - $391 = Math_imul($390, -33554432)|0; - $392 = (($391) + ($387))|0; - HEAP32[$386>>2] = $392; - $393 = (($i$17$1) + 1)|0; - $394 = (($input) + ($393<<2)|0); - $395 = HEAP32[$394>>2]|0; - $396 = (($395) + ($390))|0; - HEAP32[$394>>2] = $396; + $410 = $409 >> 25; + $411 = Math_imul($410, -33554432)|0; + $412 = (($411) + ($407))|0; + HEAP32[$406>>2] = $412; + $413 = (($i$18$1) + 1)|0; + $414 = (($input) + ($413<<2)|0); + $415 = HEAP32[$414>>2]|0; + $416 = (($415) + ($410))|0; + HEAP32[$414>>2] = $416; } - $404 = (($i$17$1) + 1)|0; - $exitcond14$1 = ($404|0)==(9); - if ($exitcond14$1) { + $424 = (($i$18$1) + 1)|0; + $exitcond13$1 = ($424|0)==(9); + if ($exitcond13$1) { break; } else { - $i$17$1 = $404; + $i$18$1 = $424; } } $109 = HEAP32[$78>>2]|0; @@ -6194,22 +6942,22 @@ function _fcontract($output,$input_limbs) { $121 = Math_imul($120, -67108864)|0; $122 = (($121) + ($117))|0; HEAP32[$input>>2] = $122; - $123 = (($input) + 4|0); + $123 = ((($input)) + 4|0); $124 = HEAP32[$123>>2]|0; $125 = (($120) + ($124))|0; HEAP32[$123>>2] = $125; - $126 = (($input) + 36|0); - $i$24 = 0; + $126 = ((($input)) + 36|0); + $i$26 = 0; while(1) { - $127 = $i$24 & 1; + $127 = $i$26 & 1; $128 = ($127|0)==(0); - $129 = (($input) + ($i$24<<2)|0); + $129 = (($input) + ($i$26<<2)|0); $130 = HEAP32[$129>>2]|0; if ($128) { $137 = $130 >> 26; $138 = $130 & 67108863; HEAP32[$129>>2] = $138; - $139 = (($i$24) + 1)|0; + $139 = (($i$26) + 1)|0; $140 = (($input) + ($139<<2)|0); $141 = HEAP32[$140>>2]|0; $142 = (($141) + ($137))|0; @@ -6218,18 +6966,18 @@ function _fcontract($output,$input_limbs) { $131 = $130 >> 25; $132 = $130 & 33554431; HEAP32[$129>>2] = $132; - $133 = (($i$24) + 1)|0; + $133 = (($i$26) + 1)|0; $134 = (($input) + ($133<<2)|0); $135 = HEAP32[$134>>2]|0; $136 = (($135) + ($131))|0; HEAP32[$134>>2] = $136; } - $143 = (($i$24) + 1)|0; - $exitcond11 = ($143|0)==(9); - if ($exitcond11) { + $143 = (($i$26) + 1)|0; + $exitcond = ($143|0)==(9); + if ($exitcond) { break; } else { - $i$24 = $143; + $i$26 = $143; } } $144 = HEAP32[$126>>2]|0; @@ -6240,466 +6988,369 @@ function _fcontract($output,$input_limbs) { $148 = HEAP32[$input>>2]|0; $149 = (($147) + ($148))|0; HEAP32[$input>>2] = $149; - $i$24$1 = 0; + $i$26$1 = 0; while(1) { - $360 = $i$24$1 & 1; - $361 = ($360|0)==(0); - $362 = (($input) + ($i$24$1<<2)|0); - $363 = HEAP32[$362>>2]|0; - if ($361) { - $370 = $363 >> 26; - $371 = $363 & 67108863; - HEAP32[$362>>2] = $371; - $372 = (($i$24$1) + 1)|0; - $373 = (($input) + ($372<<2)|0); - $374 = HEAP32[$373>>2]|0; - $375 = (($374) + ($370))|0; - HEAP32[$373>>2] = $375; + $387 = $i$26$1 & 1; + $388 = ($387|0)==(0); + $389 = (($input) + ($i$26$1<<2)|0); + $390 = HEAP32[$389>>2]|0; + if ($388) { + $397 = $390 >> 26; + $398 = $390 & 67108863; + HEAP32[$389>>2] = $398; + $399 = (($i$26$1) + 1)|0; + $400 = (($input) + ($399<<2)|0); + $401 = HEAP32[$400>>2]|0; + $402 = (($401) + ($397))|0; + HEAP32[$400>>2] = $402; } else { - $364 = $363 >> 25; - $365 = $363 & 33554431; - HEAP32[$362>>2] = $365; - $366 = (($i$24$1) + 1)|0; - $367 = (($input) + ($366<<2)|0); - $368 = HEAP32[$367>>2]|0; - $369 = (($368) + ($364))|0; - HEAP32[$367>>2] = $369; - } - $376 = (($i$24$1) + 1)|0; - $exitcond11$1 = ($376|0)==(9); - if ($exitcond11$1) { - break; - } else { - $i$24$1 = $376; - } - } - $377 = HEAP32[$126>>2]|0; - $378 = $377 >> 25; - $379 = $377 & 33554431; - HEAP32[$126>>2] = $379; - $380 = ($378*19)|0; - $381 = HEAP32[$input>>2]|0; - $382 = (($380) + ($381))|0; - HEAP32[$input>>2] = $382; - $383 = (_s32_gte($382)|0); - $i$33 = 1;$mask$02 = $383; - while(1) { - $150 = $i$33 & 1; - $151 = ($150|0)==(0); - $152 = (($input) + ($i$33<<2)|0); - $153 = HEAP32[$152>>2]|0; - if ($151) { - $155 = (_s32_eq($153,67108863)|0); - $$pn = $155; - } else { - $154 = (_s32_eq($153,33554431)|0); - $$pn = $154; + $391 = $390 >> 25; + $392 = $390 & 33554431; + HEAP32[$389>>2] = $392; + $393 = (($i$26$1) + 1)|0; + $394 = (($input) + ($393<<2)|0); + $395 = HEAP32[$394>>2]|0; + $396 = (($395) + ($391))|0; + HEAP32[$394>>2] = $396; } - $mask$1 = $$pn & $mask$02; - $156 = (($i$33) + 1)|0; - $exitcond = ($156|0)==(10); - if ($exitcond) { + $403 = (($i$26$1) + 1)|0; + $exitcond$1 = ($403|0)==(9); + if ($exitcond$1) { break; } else { - $i$33 = $156;$mask$02 = $mask$1; + $i$26$1 = $403; } } - $157 = $mask$1 & 67108845; - $158 = HEAP32[$input>>2]|0; - $159 = (($158) - ($157))|0; - HEAP32[$input>>2] = $159; - $160 = $mask$1 & 67108863; - $161 = $mask$1 & 33554431; - $162 = (($input) + 4|0); - $163 = HEAP32[$162>>2]|0; - $164 = (($163) - ($161))|0; - HEAP32[$162>>2] = $164; - $165 = (($input) + 8|0); - $166 = HEAP32[$165>>2]|0; - $167 = (($166) - ($160))|0; - HEAP32[$165>>2] = $167; - $168 = (($input) + 12|0); - $169 = HEAP32[$168>>2]|0; - $170 = (($169) - ($161))|0; - HEAP32[$168>>2] = $170; - $171 = (($input) + 16|0); - $172 = HEAP32[$171>>2]|0; - $173 = (($172) - ($160))|0; - HEAP32[$171>>2] = $173; - $174 = (($input) + 20|0); - $175 = HEAP32[$174>>2]|0; - $176 = (($175) - ($161))|0; - HEAP32[$174>>2] = $176; - $177 = (($input) + 24|0); - $178 = HEAP32[$177>>2]|0; - $179 = (($178) - ($160))|0; - HEAP32[$177>>2] = $179; - $180 = (($input) + 28|0); - $181 = HEAP32[$180>>2]|0; - $182 = (($181) - ($161))|0; - HEAP32[$180>>2] = $182; - $183 = (($input) + 32|0); - $184 = HEAP32[$183>>2]|0; - $185 = (($184) - ($160))|0; - HEAP32[$183>>2] = $185; - $186 = (($input) + 36|0); - $187 = HEAP32[$186>>2]|0; - $188 = (($187) - ($161))|0; - HEAP32[$186>>2] = $188; - $189 = HEAP32[$123>>2]|0; - $190 = $189 << 2; - HEAP32[$123>>2] = $190; - $191 = (($input) + 8|0); - $192 = HEAP32[$191>>2]|0; - $193 = $192 << 3; - HEAP32[$191>>2] = $193; - $194 = (($input) + 12|0); - $195 = HEAP32[$194>>2]|0; - $196 = $195 << 5; - HEAP32[$194>>2] = $196; - $197 = (($input) + 16|0); - $198 = HEAP32[$197>>2]|0; - $199 = $198 << 6; - HEAP32[$197>>2] = $199; - $200 = (($input) + 24|0); - $201 = HEAP32[$200>>2]|0; - $202 = $201 << 1; - HEAP32[$200>>2] = $202; - $203 = (($input) + 28|0); - $204 = HEAP32[$203>>2]|0; - $205 = $204 << 3; - HEAP32[$203>>2] = $205; - $206 = (($input) + 32|0); - $207 = HEAP32[$206>>2]|0; - $208 = $207 << 4; - HEAP32[$206>>2] = $208; - $209 = (($input) + 36|0); - $210 = HEAP32[$209>>2]|0; - $211 = $210 << 6; - HEAP32[$209>>2] = $211; + $150 = HEAP32[$126>>2]|0; + $151 = $150 >> 25; + $152 = $150 & 33554431; + HEAP32[$126>>2] = $152; + $153 = ($151*19)|0; + $154 = HEAP32[$input>>2]|0; + $155 = (($153) + ($154))|0; + HEAP32[$input>>2] = $155; + $156 = (_s32_gte($155)|0); + $157 = ((($input)) + 4|0); + $158 = HEAP32[$157>>2]|0; + $159 = (_s32_eq($158,33554431)|0); + $mask$1 = $159 & $156; + $160 = ((($input)) + 8|0); + $161 = HEAP32[$160>>2]|0; + $162 = (_s32_eq($161,67108863)|0); + $mask$1$1 = $162 & $mask$1; + $163 = ((($input)) + 12|0); + $164 = HEAP32[$163>>2]|0; + $165 = (_s32_eq($164,33554431)|0); + $mask$1$2 = $165 & $mask$1$1; + $166 = ((($input)) + 16|0); + $167 = HEAP32[$166>>2]|0; + $168 = (_s32_eq($167,67108863)|0); + $mask$1$3 = $168 & $mask$1$2; + $169 = ((($input)) + 20|0); + $170 = HEAP32[$169>>2]|0; + $171 = (_s32_eq($170,33554431)|0); + $mask$1$4 = $171 & $mask$1$3; + $172 = ((($input)) + 24|0); + $173 = HEAP32[$172>>2]|0; + $174 = (_s32_eq($173,67108863)|0); + $mask$1$5 = $174 & $mask$1$4; + $175 = ((($input)) + 28|0); + $176 = HEAP32[$175>>2]|0; + $177 = (_s32_eq($176,33554431)|0); + $mask$1$6 = $177 & $mask$1$5; + $178 = ((($input)) + 32|0); + $179 = HEAP32[$178>>2]|0; + $180 = (_s32_eq($179,67108863)|0); + $mask$1$7 = $180 & $mask$1$6; + $181 = ((($input)) + 36|0); + $182 = HEAP32[$181>>2]|0; + $183 = (_s32_eq($182,33554431)|0); + $mask$1$8 = $183 & $mask$1$7; + $184 = $mask$1$8 & 67108845; + $185 = HEAP32[$input>>2]|0; + $186 = (($185) - ($184))|0; + HEAP32[$input>>2] = $186; + $187 = $mask$1$8 & 67108863; + $188 = $mask$1$8 & 33554431; + $189 = ((($input)) + 4|0); + $190 = HEAP32[$189>>2]|0; + $191 = (($190) - ($188))|0; + HEAP32[$189>>2] = $191; + $192 = ((($input)) + 8|0); + $193 = HEAP32[$192>>2]|0; + $194 = (($193) - ($187))|0; + HEAP32[$192>>2] = $194; + $195 = ((($input)) + 12|0); + $196 = HEAP32[$195>>2]|0; + $197 = (($196) - ($188))|0; + HEAP32[$195>>2] = $197; + $198 = ((($input)) + 16|0); + $199 = HEAP32[$198>>2]|0; + $200 = (($199) - ($187))|0; + HEAP32[$198>>2] = $200; + $201 = ((($input)) + 20|0); + $202 = HEAP32[$201>>2]|0; + $203 = (($202) - ($188))|0; + HEAP32[$201>>2] = $203; + $204 = ((($input)) + 24|0); + $205 = HEAP32[$204>>2]|0; + $206 = (($205) - ($187))|0; + HEAP32[$204>>2] = $206; + $207 = ((($input)) + 28|0); + $208 = HEAP32[$207>>2]|0; + $209 = (($208) - ($188))|0; + HEAP32[$207>>2] = $209; + $210 = ((($input)) + 32|0); + $211 = HEAP32[$210>>2]|0; + $212 = (($211) - ($187))|0; + HEAP32[$210>>2] = $212; + $213 = ((($input)) + 36|0); + $214 = HEAP32[$213>>2]|0; + $215 = (($214) - ($188))|0; + HEAP32[$213>>2] = $215; + $216 = HEAP32[$123>>2]|0; + $217 = $216 << 2; + HEAP32[$123>>2] = $217; + $218 = ((($input)) + 8|0); + $219 = HEAP32[$218>>2]|0; + $220 = $219 << 3; + HEAP32[$218>>2] = $220; + $221 = ((($input)) + 12|0); + $222 = HEAP32[$221>>2]|0; + $223 = $222 << 5; + HEAP32[$221>>2] = $223; + $224 = ((($input)) + 16|0); + $225 = HEAP32[$224>>2]|0; + $226 = $225 << 6; + HEAP32[$224>>2] = $226; + $227 = ((($input)) + 24|0); + $228 = HEAP32[$227>>2]|0; + $229 = $228 << 1; + HEAP32[$227>>2] = $229; + $230 = ((($input)) + 28|0); + $231 = HEAP32[$230>>2]|0; + $232 = $231 << 3; + HEAP32[$230>>2] = $232; + $233 = ((($input)) + 32|0); + $234 = HEAP32[$233>>2]|0; + $235 = $234 << 4; + HEAP32[$233>>2] = $235; + $236 = ((($input)) + 36|0); + $237 = HEAP32[$236>>2]|0; + $238 = $237 << 6; + HEAP32[$236>>2] = $238; HEAP8[$output>>0] = 0; - $212 = (($output) + 16|0); - HEAP8[$212>>0] = 0; - $213 = HEAP32[$input>>2]|0; - $214 = HEAP8[$output>>0]|0; - $215 = $214&255; - $216 = $215 | $213; - $217 = $216&255; - HEAP8[$output>>0] = $217; - $218 = HEAP32[$input>>2]|0; - $219 = $218 >>> 8; - $220 = $219&255; - $221 = (($output) + 1|0); - HEAP8[$221>>0] = $220; - $222 = HEAP32[$input>>2]|0; - $223 = $222 >>> 16; - $224 = $223&255; - $225 = (($output) + 2|0); - HEAP8[$225>>0] = $224; - $226 = HEAP32[$input>>2]|0; - $227 = $226 >>> 24; - $228 = (($output) + 3|0); - $229 = HEAP32[$123>>2]|0; - $230 = $227 | $229; - $231 = $230&255; - HEAP8[$228>>0] = $231; - $232 = HEAP32[$123>>2]|0; - $233 = $232 >>> 8; - $234 = $233&255; - $235 = (($output) + 4|0); - HEAP8[$235>>0] = $234; - $236 = HEAP32[$123>>2]|0; - $237 = $236 >>> 16; - $238 = $237&255; - $239 = (($output) + 5|0); - HEAP8[$239>>0] = $238; - $240 = HEAP32[$123>>2]|0; - $241 = $240 >>> 24; - $242 = (($output) + 6|0); - $243 = HEAP32[$191>>2]|0; - $244 = $241 | $243; - $245 = $244&255; - HEAP8[$242>>0] = $245; - $246 = HEAP32[$191>>2]|0; - $247 = $246 >>> 8; - $248 = $247&255; - $249 = (($output) + 7|0); - HEAP8[$249>>0] = $248; - $250 = HEAP32[$191>>2]|0; - $251 = $250 >>> 16; - $252 = $251&255; - $253 = (($output) + 8|0); - HEAP8[$253>>0] = $252; - $254 = HEAP32[$191>>2]|0; - $255 = $254 >>> 24; - $256 = (($output) + 9|0); - $257 = HEAP32[$194>>2]|0; - $258 = $255 | $257; - $259 = $258&255; - HEAP8[$256>>0] = $259; - $260 = HEAP32[$194>>2]|0; - $261 = $260 >>> 8; - $262 = $261&255; - $263 = (($output) + 10|0); - HEAP8[$263>>0] = $262; - $264 = HEAP32[$194>>2]|0; - $265 = $264 >>> 16; - $266 = $265&255; - $267 = (($output) + 11|0); - HEAP8[$267>>0] = $266; - $268 = HEAP32[$194>>2]|0; - $269 = $268 >>> 24; - $270 = (($output) + 12|0); - $271 = HEAP32[$197>>2]|0; - $272 = $269 | $271; - $273 = $272&255; - HEAP8[$270>>0] = $273; - $274 = HEAP32[$197>>2]|0; - $275 = $274 >>> 8; - $276 = $275&255; - $277 = (($output) + 13|0); - HEAP8[$277>>0] = $276; - $278 = HEAP32[$197>>2]|0; - $279 = $278 >>> 16; - $280 = $279&255; - $281 = (($output) + 14|0); - HEAP8[$281>>0] = $280; - $282 = HEAP32[$197>>2]|0; - $283 = $282 >>> 24; - $284 = $283&255; - $285 = (($output) + 15|0); - HEAP8[$285>>0] = $284; - $286 = (($input) + 20|0); - $287 = HEAP32[$286>>2]|0; - $288 = HEAP8[$212>>0]|0; + $239 = ((($output)) + 16|0); + HEAP8[$239>>0] = 0; + $240 = HEAP32[$input>>2]|0; + $241 = HEAP8[$output>>0]|0; + $242 = $241&255; + $243 = $242 | $240; + $244 = $243&255; + HEAP8[$output>>0] = $244; + $245 = HEAP32[$input>>2]|0; + $246 = $245 >>> 8; + $247 = $246&255; + $248 = ((($output)) + 1|0); + HEAP8[$248>>0] = $247; + $249 = HEAP32[$input>>2]|0; + $250 = $249 >>> 16; + $251 = $250&255; + $252 = ((($output)) + 2|0); + HEAP8[$252>>0] = $251; + $253 = HEAP32[$input>>2]|0; + $254 = $253 >>> 24; + $255 = ((($output)) + 3|0); + $256 = HEAP32[$123>>2]|0; + $257 = $254 | $256; + $258 = $257&255; + HEAP8[$255>>0] = $258; + $259 = HEAP32[$123>>2]|0; + $260 = $259 >>> 8; + $261 = $260&255; + $262 = ((($output)) + 4|0); + HEAP8[$262>>0] = $261; + $263 = HEAP32[$123>>2]|0; + $264 = $263 >>> 16; + $265 = $264&255; + $266 = ((($output)) + 5|0); + HEAP8[$266>>0] = $265; + $267 = HEAP32[$123>>2]|0; + $268 = $267 >>> 24; + $269 = ((($output)) + 6|0); + $270 = HEAP32[$218>>2]|0; + $271 = $268 | $270; + $272 = $271&255; + HEAP8[$269>>0] = $272; + $273 = HEAP32[$218>>2]|0; + $274 = $273 >>> 8; + $275 = $274&255; + $276 = ((($output)) + 7|0); + HEAP8[$276>>0] = $275; + $277 = HEAP32[$218>>2]|0; + $278 = $277 >>> 16; + $279 = $278&255; + $280 = ((($output)) + 8|0); + HEAP8[$280>>0] = $279; + $281 = HEAP32[$218>>2]|0; + $282 = $281 >>> 24; + $283 = ((($output)) + 9|0); + $284 = HEAP32[$221>>2]|0; + $285 = $282 | $284; + $286 = $285&255; + HEAP8[$283>>0] = $286; + $287 = HEAP32[$221>>2]|0; + $288 = $287 >>> 8; $289 = $288&255; - $290 = $289 | $287; - $291 = $290&255; - HEAP8[$212>>0] = $291; - $292 = HEAP32[$286>>2]|0; - $293 = $292 >>> 8; - $294 = $293&255; - $295 = (($output) + 17|0); - HEAP8[$295>>0] = $294; - $296 = HEAP32[$286>>2]|0; - $297 = $296 >>> 16; - $298 = $297&255; - $299 = (($output) + 18|0); - HEAP8[$299>>0] = $298; - $300 = HEAP32[$286>>2]|0; - $301 = $300 >>> 24; - $302 = (($output) + 19|0); - $303 = HEAP32[$200>>2]|0; - $304 = $301 | $303; - $305 = $304&255; - HEAP8[$302>>0] = $305; - $306 = HEAP32[$200>>2]|0; - $307 = $306 >>> 8; - $308 = $307&255; - $309 = (($output) + 20|0); - HEAP8[$309>>0] = $308; - $310 = HEAP32[$200>>2]|0; - $311 = $310 >>> 16; - $312 = $311&255; - $313 = (($output) + 21|0); - HEAP8[$313>>0] = $312; - $314 = HEAP32[$200>>2]|0; - $315 = $314 >>> 24; - $316 = (($output) + 22|0); - $317 = HEAP32[$203>>2]|0; - $318 = $315 | $317; - $319 = $318&255; - HEAP8[$316>>0] = $319; - $320 = HEAP32[$203>>2]|0; - $321 = $320 >>> 8; - $322 = $321&255; - $323 = (($output) + 23|0); - HEAP8[$323>>0] = $322; - $324 = HEAP32[$203>>2]|0; - $325 = $324 >>> 16; - $326 = $325&255; - $327 = (($output) + 24|0); - HEAP8[$327>>0] = $326; - $328 = HEAP32[$203>>2]|0; - $329 = $328 >>> 24; - $330 = (($output) + 25|0); - $331 = HEAP32[$206>>2]|0; - $332 = $329 | $331; - $333 = $332&255; - HEAP8[$330>>0] = $333; - $334 = HEAP32[$206>>2]|0; - $335 = $334 >>> 8; - $336 = $335&255; - $337 = (($output) + 26|0); - HEAP8[$337>>0] = $336; - $338 = HEAP32[$206>>2]|0; - $339 = $338 >>> 16; - $340 = $339&255; - $341 = (($output) + 27|0); - HEAP8[$341>>0] = $340; - $342 = HEAP32[$206>>2]|0; - $343 = $342 >>> 24; - $344 = (($output) + 28|0); - $345 = HEAP32[$209>>2]|0; - $346 = $343 | $345; - $347 = $346&255; - HEAP8[$344>>0] = $347; - $348 = HEAP32[$209>>2]|0; - $349 = $348 >>> 8; - $350 = $349&255; - $351 = (($output) + 29|0); - HEAP8[$351>>0] = $350; - $352 = HEAP32[$209>>2]|0; - $353 = $352 >>> 16; - $354 = $353&255; - $355 = (($output) + 30|0); - HEAP8[$355>>0] = $354; - $356 = HEAP32[$209>>2]|0; - $357 = $356 >>> 24; - $358 = $357&255; - $359 = (($output) + 31|0); - HEAP8[$359>>0] = $358; + $290 = ((($output)) + 10|0); + HEAP8[$290>>0] = $289; + $291 = HEAP32[$221>>2]|0; + $292 = $291 >>> 16; + $293 = $292&255; + $294 = ((($output)) + 11|0); + HEAP8[$294>>0] = $293; + $295 = HEAP32[$221>>2]|0; + $296 = $295 >>> 24; + $297 = ((($output)) + 12|0); + $298 = HEAP32[$224>>2]|0; + $299 = $296 | $298; + $300 = $299&255; + HEAP8[$297>>0] = $300; + $301 = HEAP32[$224>>2]|0; + $302 = $301 >>> 8; + $303 = $302&255; + $304 = ((($output)) + 13|0); + HEAP8[$304>>0] = $303; + $305 = HEAP32[$224>>2]|0; + $306 = $305 >>> 16; + $307 = $306&255; + $308 = ((($output)) + 14|0); + HEAP8[$308>>0] = $307; + $309 = HEAP32[$224>>2]|0; + $310 = $309 >>> 24; + $311 = $310&255; + $312 = ((($output)) + 15|0); + HEAP8[$312>>0] = $311; + $313 = ((($input)) + 20|0); + $314 = HEAP32[$313>>2]|0; + $315 = HEAP8[$239>>0]|0; + $316 = $315&255; + $317 = $316 | $314; + $318 = $317&255; + HEAP8[$239>>0] = $318; + $319 = HEAP32[$313>>2]|0; + $320 = $319 >>> 8; + $321 = $320&255; + $322 = ((($output)) + 17|0); + HEAP8[$322>>0] = $321; + $323 = HEAP32[$313>>2]|0; + $324 = $323 >>> 16; + $325 = $324&255; + $326 = ((($output)) + 18|0); + HEAP8[$326>>0] = $325; + $327 = HEAP32[$313>>2]|0; + $328 = $327 >>> 24; + $329 = ((($output)) + 19|0); + $330 = HEAP32[$227>>2]|0; + $331 = $328 | $330; + $332 = $331&255; + HEAP8[$329>>0] = $332; + $333 = HEAP32[$227>>2]|0; + $334 = $333 >>> 8; + $335 = $334&255; + $336 = ((($output)) + 20|0); + HEAP8[$336>>0] = $335; + $337 = HEAP32[$227>>2]|0; + $338 = $337 >>> 16; + $339 = $338&255; + $340 = ((($output)) + 21|0); + HEAP8[$340>>0] = $339; + $341 = HEAP32[$227>>2]|0; + $342 = $341 >>> 24; + $343 = ((($output)) + 22|0); + $344 = HEAP32[$230>>2]|0; + $345 = $342 | $344; + $346 = $345&255; + HEAP8[$343>>0] = $346; + $347 = HEAP32[$230>>2]|0; + $348 = $347 >>> 8; + $349 = $348&255; + $350 = ((($output)) + 23|0); + HEAP8[$350>>0] = $349; + $351 = HEAP32[$230>>2]|0; + $352 = $351 >>> 16; + $353 = $352&255; + $354 = ((($output)) + 24|0); + HEAP8[$354>>0] = $353; + $355 = HEAP32[$230>>2]|0; + $356 = $355 >>> 24; + $357 = ((($output)) + 25|0); + $358 = HEAP32[$233>>2]|0; + $359 = $356 | $358; + $360 = $359&255; + HEAP8[$357>>0] = $360; + $361 = HEAP32[$233>>2]|0; + $362 = $361 >>> 8; + $363 = $362&255; + $364 = ((($output)) + 26|0); + HEAP8[$364>>0] = $363; + $365 = HEAP32[$233>>2]|0; + $366 = $365 >>> 16; + $367 = $366&255; + $368 = ((($output)) + 27|0); + HEAP8[$368>>0] = $367; + $369 = HEAP32[$233>>2]|0; + $370 = $369 >>> 24; + $371 = ((($output)) + 28|0); + $372 = HEAP32[$236>>2]|0; + $373 = $370 | $372; + $374 = $373&255; + HEAP8[$371>>0] = $374; + $375 = HEAP32[$236>>2]|0; + $376 = $375 >>> 8; + $377 = $376&255; + $378 = ((($output)) + 29|0); + HEAP8[$378>>0] = $377; + $379 = HEAP32[$236>>2]|0; + $380 = $379 >>> 16; + $381 = $380&255; + $382 = ((($output)) + 30|0); + HEAP8[$382>>0] = $381; + $383 = HEAP32[$236>>2]|0; + $384 = $383 >>> 24; + $385 = $384&255; + $386 = ((($output)) + 31|0); + HEAP8[$386>>0] = $385; STACKTOP = sp;return; } -function _swap_conditional($a,$b,$0,$1) { +function _s32_gte($a) { $a = $a|0; - $b = $b|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; - var $9 = 0, $exitcond = 0, $i$02 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_i64Subtract(0,0,($0|0),($1|0))|0); - $3 = tempRet0; - $i$02 = 0; - while(1) { - $4 = (($a) + ($i$02<<3)|0); - $5 = $4; - $6 = $5; - $7 = HEAP32[$6>>2]|0; - $8 = (($5) + 4)|0; - $9 = $8; - $10 = HEAP32[$9>>2]|0; - $11 = (($b) + ($i$02<<3)|0); - $12 = $11; - $13 = $12; - $14 = HEAP32[$13>>2]|0; - $15 = (($12) + 4)|0; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = $14 ^ $7; - $19 = $17 ^ $10; - $20 = $18 & $2; - $21 = $19 & $3; - $22 = $20 ^ $7; - $21 ^ $10; - $23 = (_bitshift64Ashr(0,($22|0),32)|0); - $24 = tempRet0; - $25 = $4; - $26 = $25; - HEAP32[$26>>2] = $23; - $27 = (($25) + 4)|0; - $28 = $27; - HEAP32[$28>>2] = $24; - $29 = $11; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (($29) + 4)|0; - $33 = $32; - $34 = HEAP32[$33>>2]|0; - $35 = $20 ^ $31; - $21 ^ $34; - $36 = (_bitshift64Ashr(0,($35|0),32)|0); - $37 = tempRet0; - $38 = $11; - $39 = $38; - HEAP32[$39>>2] = $36; - $40 = (($38) + 4)|0; - $41 = $40; - HEAP32[$41>>2] = $37; - $42 = (($i$02) + 1)|0; - $exitcond = ($42|0)==(10); - if ($exitcond) { - break; - } else { - $i$02 = $42; - } - } - STACKTOP = sp;return; -} -function _fmonty($x2,$z2,$x3,$z3,$x,$z,$xprime,$zprime,$qmqp) { - $x2 = $x2|0; - $z2 = $z2|0; - $x3 = $x3|0; - $z3 = $z3|0; - $x = $x|0; - $z = $z|0; - $xprime = $xprime|0; - $zprime = $zprime|0; - $qmqp = $qmqp|0; - var $0 = 0, $origx = 0, $origxprime = 0, $xx = 0, $xxprime = 0, $xxxprime = 0, $zz = 0, $zzprime = 0, $zzz = 0, $zzzprime = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 1232|0; - $origx = sp + 1144|0; - $origxprime = sp + 1064|0; - $zzz = sp + 912|0; - $xx = sp + 760|0; - $zz = sp + 608|0; - $xxprime = sp + 456|0; - $zzprime = sp + 304|0; - $zzzprime = sp + 152|0; - $xxxprime = sp; - dest=$origx+0|0; src=$x+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($x,$z); - _fdifference($z,$origx); - dest=$origxprime+0|0; src=$xprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($xprime,$zprime); - _fdifference($zprime,$origxprime); - _fproduct($xxprime,$xprime,$z); - _fproduct($zzprime,$x,$zprime); - _freduce_degree($xxprime); - _freduce_coefficients($xxprime); - _freduce_degree($zzprime); - _freduce_coefficients($zzprime); - dest=$origxprime+0|0; src=$xxprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($xxprime,$zzprime); - _fdifference($zzprime,$origxprime); - _fsquare($xxxprime,$xxprime); - _fsquare($zzzprime,$zzprime); - _fproduct($zzprime,$zzzprime,$qmqp); - _freduce_degree($zzprime); - _freduce_coefficients($zzprime); - dest=$x3+0|0; src=$xxxprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$z3+0|0; src=$zzprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsquare($xx,$x); - _fsquare($zz,$z); - _fproduct($x2,$xx,$zz); - _freduce_degree($x2); - _freduce_coefficients($x2); - _fdifference($zz,$xx); - $0 = (($zzz) + 80|0); - dest=$0+0|0; stop=dest+72|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - _fscalar_product($zzz,$zz); - _freduce_coefficients($zzz); - _fsum($zzz,$xx); - _fproduct($z2,$zz,$zzz); - _freduce_degree($z2); - _freduce_coefficients($z2); - STACKTOP = sp;return; + $0 = (($a) + -67108845)|0; + $1 = $0 >> 31; + $2 = $1 ^ -1; + return ($2|0); } -function _fsquare($output,$in) { - $output = $output|0; - $in = $in|0; - var $t = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; +function _s32_eq($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 160|0; - $t = sp; - _fsquare_inner($t,$in); - _freduce_degree($t); - _freduce_coefficients($t); - dest=$output+0|0; src=$t+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; + $0 = $a ^ -1; + $1 = $0 ^ $b; + $2 = $1 << 16; + $3 = $2 & $1; + $4 = $3 << 8; + $5 = $4 & $3; + $6 = $5 << 4; + $7 = $6 & $5; + $8 = $7 << 2; + $9 = $8 & $7; + $10 = $9 << 1; + $11 = $10 & $9; + $12 = $11 >> 31; + return ($12|0); } function _fproduct($output,$in2,$in) { $output = $output|0; @@ -6843,7 +7494,7 @@ function _fproduct($output,$in2,$in) { $27 = HEAP32[$26>>2]|0; $28 = (_bitshift64Ashr(0,($24|0),32)|0); $29 = tempRet0; - $30 = (($in) + 8|0); + $30 = ((($in)) + 8|0); $31 = $30; $32 = $31; $33 = HEAP32[$32>>2]|0; @@ -6854,7 +7505,7 @@ function _fproduct($output,$in2,$in) { $38 = tempRet0; $39 = (___muldi3(($37|0),($38|0),($28|0),($29|0))|0); $40 = tempRet0; - $41 = (($in2) + 8|0); + $41 = ((($in2)) + 8|0); $42 = $41; $43 = $42; $44 = HEAP32[$43>>2]|0; @@ -6875,7 +7526,7 @@ function _fproduct($output,$in2,$in) { $59 = tempRet0; $60 = (_i64Add(($58|0),($59|0),($39|0),($40|0))|0); $61 = tempRet0; - $62 = (($output) + 8|0); + $62 = ((($output)) + 8|0); $63 = $62; $64 = $63; HEAP32[$64>>2] = $60; @@ -6908,7 +7559,7 @@ function _fproduct($output,$in2,$in) { $90 = HEAP32[$89>>2]|0; $91 = (_bitshift64Ashr(0,($87|0),32)|0); $92 = tempRet0; - $93 = (($in) + 16|0); + $93 = ((($in)) + 16|0); $94 = $93; $95 = $94; $96 = HEAP32[$95>>2]|0; @@ -6921,7 +7572,7 @@ function _fproduct($output,$in2,$in) { $103 = tempRet0; $104 = (_i64Add(($102|0),($103|0),($83|0),($84|0))|0); $105 = tempRet0; - $106 = (($in2) + 16|0); + $106 = ((($in2)) + 16|0); $107 = $106; $108 = $107; $109 = HEAP32[$108>>2]|0; @@ -6942,7 +7593,7 @@ function _fproduct($output,$in2,$in) { $124 = tempRet0; $125 = (_i64Add(($104|0),($105|0),($123|0),($124|0))|0); $126 = tempRet0; - $127 = (($output) + 16|0); + $127 = ((($output)) + 16|0); $128 = $127; $129 = $128; HEAP32[$129>>2] = $125; @@ -6995,7 +7646,7 @@ function _fproduct($output,$in2,$in) { $175 = HEAP32[$174>>2]|0; $176 = (_bitshift64Ashr(0,($172|0),32)|0); $177 = tempRet0; - $178 = (($in) + 24|0); + $178 = ((($in)) + 24|0); $179 = $178; $180 = $179; $181 = HEAP32[$180>>2]|0; @@ -7008,7 +7659,7 @@ function _fproduct($output,$in2,$in) { $188 = tempRet0; $189 = (_i64Add(($168|0),($169|0),($187|0),($188|0))|0); $190 = tempRet0; - $191 = (($in2) + 24|0); + $191 = ((($in2)) + 24|0); $192 = $191; $193 = $192; $194 = HEAP32[$193>>2]|0; @@ -7029,7 +7680,7 @@ function _fproduct($output,$in2,$in) { $209 = tempRet0; $210 = (_i64Add(($189|0),($190|0),($208|0),($209|0))|0); $211 = tempRet0; - $212 = (($output) + 24|0); + $212 = ((($output)) + 24|0); $213 = $212; $214 = $213; HEAP32[$214>>2] = $210; @@ -7104,7 +7755,7 @@ function _fproduct($output,$in2,$in) { $282 = HEAP32[$281>>2]|0; $283 = (_bitshift64Ashr(0,($279|0),32)|0); $284 = tempRet0; - $285 = (($in) + 32|0); + $285 = ((($in)) + 32|0); $286 = $285; $287 = $286; $288 = HEAP32[$287>>2]|0; @@ -7117,7 +7768,7 @@ function _fproduct($output,$in2,$in) { $295 = tempRet0; $296 = (_i64Add(($275|0),($276|0),($294|0),($295|0))|0); $297 = tempRet0; - $298 = (($in2) + 32|0); + $298 = ((($in2)) + 32|0); $299 = $298; $300 = $299; $301 = HEAP32[$300>>2]|0; @@ -7138,7 +7789,7 @@ function _fproduct($output,$in2,$in) { $316 = tempRet0; $317 = (_i64Add(($296|0),($297|0),($315|0),($316|0))|0); $318 = tempRet0; - $319 = (($output) + 32|0); + $319 = ((($output)) + 32|0); $320 = $319; $321 = $320; HEAP32[$321>>2] = $317; @@ -7231,7 +7882,7 @@ function _fproduct($output,$in2,$in) { $407 = HEAP32[$406>>2]|0; $408 = (_bitshift64Ashr(0,($404|0),32)|0); $409 = tempRet0; - $410 = (($in) + 40|0); + $410 = ((($in)) + 40|0); $411 = $410; $412 = $411; $413 = HEAP32[$412>>2]|0; @@ -7244,7 +7895,7 @@ function _fproduct($output,$in2,$in) { $420 = tempRet0; $421 = (_i64Add(($400|0),($401|0),($419|0),($420|0))|0); $422 = tempRet0; - $423 = (($in2) + 40|0); + $423 = ((($in2)) + 40|0); $424 = $423; $425 = $424; $426 = HEAP32[$425>>2]|0; @@ -7265,7 +7916,7 @@ function _fproduct($output,$in2,$in) { $441 = tempRet0; $442 = (_i64Add(($421|0),($422|0),($440|0),($441|0))|0); $443 = tempRet0; - $444 = (($output) + 40|0); + $444 = ((($output)) + 40|0); $445 = $444; $446 = $445; HEAP32[$446>>2] = $442; @@ -7380,7 +8031,7 @@ function _fproduct($output,$in2,$in) { $554 = HEAP32[$553>>2]|0; $555 = (_bitshift64Ashr(0,($551|0),32)|0); $556 = tempRet0; - $557 = (($in) + 48|0); + $557 = ((($in)) + 48|0); $558 = $557; $559 = $558; $560 = HEAP32[$559>>2]|0; @@ -7393,7 +8044,7 @@ function _fproduct($output,$in2,$in) { $567 = tempRet0; $568 = (_i64Add(($547|0),($548|0),($566|0),($567|0))|0); $569 = tempRet0; - $570 = (($in2) + 48|0); + $570 = ((($in2)) + 48|0); $571 = $570; $572 = $571; $573 = HEAP32[$572>>2]|0; @@ -7414,7 +8065,7 @@ function _fproduct($output,$in2,$in) { $588 = tempRet0; $589 = (_i64Add(($568|0),($569|0),($587|0),($588|0))|0); $590 = tempRet0; - $591 = (($output) + 48|0); + $591 = ((($output)) + 48|0); $592 = $591; $593 = $592; HEAP32[$593>>2] = $589; @@ -7547,7 +8198,7 @@ function _fproduct($output,$in2,$in) { $719 = HEAP32[$718>>2]|0; $720 = (_bitshift64Ashr(0,($716|0),32)|0); $721 = tempRet0; - $722 = (($in) + 56|0); + $722 = ((($in)) + 56|0); $723 = $722; $724 = $723; $725 = HEAP32[$724>>2]|0; @@ -7560,7 +8211,7 @@ function _fproduct($output,$in2,$in) { $732 = tempRet0; $733 = (_i64Add(($712|0),($713|0),($731|0),($732|0))|0); $734 = tempRet0; - $735 = (($in2) + 56|0); + $735 = ((($in2)) + 56|0); $736 = $735; $737 = $736; $738 = HEAP32[$737>>2]|0; @@ -7581,7 +8232,7 @@ function _fproduct($output,$in2,$in) { $753 = tempRet0; $754 = (_i64Add(($733|0),($734|0),($752|0),($753|0))|0); $755 = tempRet0; - $756 = (($output) + 56|0); + $756 = ((($output)) + 56|0); $757 = $756; $758 = $757; HEAP32[$758>>2] = $754; @@ -7736,7 +8387,7 @@ function _fproduct($output,$in2,$in) { $906 = HEAP32[$905>>2]|0; $907 = (_bitshift64Ashr(0,($903|0),32)|0); $908 = tempRet0; - $909 = (($in) + 64|0); + $909 = ((($in)) + 64|0); $910 = $909; $911 = $910; $912 = HEAP32[$911>>2]|0; @@ -7749,7 +8400,7 @@ function _fproduct($output,$in2,$in) { $919 = tempRet0; $920 = (_i64Add(($899|0),($900|0),($918|0),($919|0))|0); $921 = tempRet0; - $922 = (($in2) + 64|0); + $922 = ((($in2)) + 64|0); $923 = $922; $924 = $923; $925 = HEAP32[$924>>2]|0; @@ -7770,7 +8421,7 @@ function _fproduct($output,$in2,$in) { $940 = tempRet0; $941 = (_i64Add(($920|0),($921|0),($939|0),($940|0))|0); $942 = tempRet0; - $943 = (($output) + 64|0); + $943 = ((($output)) + 64|0); $944 = $943; $945 = $944; HEAP32[$945>>2] = $941; @@ -7943,7 +8594,7 @@ function _fproduct($output,$in2,$in) { $1111 = HEAP32[$1110>>2]|0; $1112 = (_bitshift64Ashr(0,($1108|0),32)|0); $1113 = tempRet0; - $1114 = (($in) + 72|0); + $1114 = ((($in)) + 72|0); $1115 = $1114; $1116 = $1115; $1117 = HEAP32[$1116>>2]|0; @@ -7956,7 +8607,7 @@ function _fproduct($output,$in2,$in) { $1124 = tempRet0; $1125 = (_i64Add(($1104|0),($1105|0),($1123|0),($1124|0))|0); $1126 = tempRet0; - $1127 = (($in2) + 72|0); + $1127 = ((($in2)) + 72|0); $1128 = $1127; $1129 = $1128; $1130 = HEAP32[$1129>>2]|0; @@ -7977,7 +8628,7 @@ function _fproduct($output,$in2,$in) { $1145 = tempRet0; $1146 = (_i64Add(($1125|0),($1126|0),($1144|0),($1145|0))|0); $1147 = tempRet0; - $1148 = (($output) + 72|0); + $1148 = ((($output)) + 72|0); $1149 = $1148; $1150 = $1149; HEAP32[$1150>>2] = $1146; @@ -8164,7 +8815,7 @@ function _fproduct($output,$in2,$in) { $1330 = tempRet0; $1331 = (_i64Add(($1311|0),($1312|0),($1329|0),($1330|0))|0); $1332 = tempRet0; - $1333 = (($output) + 80|0); + $1333 = ((($output)) + 80|0); $1334 = $1333; $1335 = $1334; HEAP32[$1335>>2] = $1331; @@ -8329,7 +8980,7 @@ function _fproduct($output,$in2,$in) { $1493 = tempRet0; $1494 = (_i64Add(($1474|0),($1475|0),($1492|0),($1493|0))|0); $1495 = tempRet0; - $1496 = (($output) + 88|0); + $1496 = ((($output)) + 88|0); $1497 = $1496; $1498 = $1497; HEAP32[$1498>>2] = $1494; @@ -8476,7 +9127,7 @@ function _fproduct($output,$in2,$in) { $1638 = tempRet0; $1639 = (_i64Add(($1619|0),($1620|0),($1637|0),($1638|0))|0); $1640 = tempRet0; - $1641 = (($output) + 96|0); + $1641 = ((($output)) + 96|0); $1642 = $1641; $1643 = $1642; HEAP32[$1643>>2] = $1639; @@ -8601,7 +9252,7 @@ function _fproduct($output,$in2,$in) { $1761 = tempRet0; $1762 = (_i64Add(($1742|0),($1743|0),($1760|0),($1761|0))|0); $1763 = tempRet0; - $1764 = (($output) + 104|0); + $1764 = ((($output)) + 104|0); $1765 = $1764; $1766 = $1765; HEAP32[$1766>>2] = $1762; @@ -8708,7 +9359,7 @@ function _fproduct($output,$in2,$in) { $1866 = tempRet0; $1867 = (_i64Add(($1847|0),($1848|0),($1865|0),($1866|0))|0); $1868 = tempRet0; - $1869 = (($output) + 112|0); + $1869 = ((($output)) + 112|0); $1870 = $1869; $1871 = $1870; HEAP32[$1871>>2] = $1867; @@ -8793,7 +9444,7 @@ function _fproduct($output,$in2,$in) { $1949 = tempRet0; $1950 = (_i64Add(($1930|0),($1931|0),($1948|0),($1949|0))|0); $1951 = tempRet0; - $1952 = (($output) + 120|0); + $1952 = ((($output)) + 120|0); $1953 = $1952; $1954 = $1953; HEAP32[$1954>>2] = $1950; @@ -8860,7 +9511,7 @@ function _fproduct($output,$in2,$in) { $2014 = tempRet0; $2015 = (_i64Add(($2013|0),($2014|0),($1973|0),($1974|0))|0); $2016 = tempRet0; - $2017 = (($output) + 128|0); + $2017 = ((($output)) + 128|0); $2018 = $2017; $2019 = $2018; HEAP32[$2019>>2] = $2015; @@ -8905,7 +9556,7 @@ function _fproduct($output,$in2,$in) { $2057 = tempRet0; $2058 = (_i64Add(($2056|0),($2057|0),($2038|0),($2039|0))|0); $2059 = tempRet0; - $2060 = (($output) + 136|0); + $2060 = ((($output)) + 136|0); $2061 = $2060; $2062 = $2061; HEAP32[$2062>>2] = $2058; @@ -8930,14 +9581,14 @@ function _fproduct($output,$in2,$in) { $2080 = tempRet0; $2081 = (___muldi3(($2079|0),($2080|0),($2071|0),($2072|0))|0); $2082 = tempRet0; - $2083 = (($output) + 144|0); + $2083 = ((($output)) + 144|0); $2084 = $2083; $2085 = $2084; HEAP32[$2085>>2] = $2081; $2086 = (($2084) + 4)|0; $2087 = $2086; HEAP32[$2087>>2] = $2082; - STACKTOP = sp;return; + return; } function _freduce_degree($output) { $output = $output|0; @@ -8958,7 +9609,7 @@ function _freduce_degree($output) { var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0; var sp = 0; sp = STACKTOP; - $0 = (($output) + 144|0); + $0 = ((($output)) + 144|0); $1 = $0; $2 = $1; $3 = HEAP32[$2>>2]|0; @@ -8967,7 +9618,7 @@ function _freduce_degree($output) { $6 = HEAP32[$5>>2]|0; $7 = (_bitshift64Shl(($3|0),($6|0),4)|0); $8 = tempRet0; - $9 = (($output) + 64|0); + $9 = ((($output)) + 64|0); $10 = $9; $11 = $10; $12 = HEAP32[$11>>2]|0; @@ -8994,7 +9645,7 @@ function _freduce_degree($output) { $32 = (($30) + 4)|0; $33 = $32; HEAP32[$33>>2] = $29; - $34 = (($output) + 136|0); + $34 = ((($output)) + 136|0); $35 = $34; $36 = $35; $37 = HEAP32[$36>>2]|0; @@ -9003,7 +9654,7 @@ function _freduce_degree($output) { $40 = HEAP32[$39>>2]|0; $41 = (_bitshift64Shl(($37|0),($40|0),4)|0); $42 = tempRet0; - $43 = (($output) + 56|0); + $43 = ((($output)) + 56|0); $44 = $43; $45 = $44; $46 = HEAP32[$45>>2]|0; @@ -9030,7 +9681,7 @@ function _freduce_degree($output) { $66 = (($64) + 4)|0; $67 = $66; HEAP32[$67>>2] = $63; - $68 = (($output) + 128|0); + $68 = ((($output)) + 128|0); $69 = $68; $70 = $69; $71 = HEAP32[$70>>2]|0; @@ -9039,7 +9690,7 @@ function _freduce_degree($output) { $74 = HEAP32[$73>>2]|0; $75 = (_bitshift64Shl(($71|0),($74|0),4)|0); $76 = tempRet0; - $77 = (($output) + 48|0); + $77 = ((($output)) + 48|0); $78 = $77; $79 = $78; $80 = HEAP32[$79>>2]|0; @@ -9066,7 +9717,7 @@ function _freduce_degree($output) { $100 = (($98) + 4)|0; $101 = $100; HEAP32[$101>>2] = $97; - $102 = (($output) + 120|0); + $102 = ((($output)) + 120|0); $103 = $102; $104 = $103; $105 = HEAP32[$104>>2]|0; @@ -9075,7 +9726,7 @@ function _freduce_degree($output) { $108 = HEAP32[$107>>2]|0; $109 = (_bitshift64Shl(($105|0),($108|0),4)|0); $110 = tempRet0; - $111 = (($output) + 40|0); + $111 = ((($output)) + 40|0); $112 = $111; $113 = $112; $114 = HEAP32[$113>>2]|0; @@ -9102,7 +9753,7 @@ function _freduce_degree($output) { $134 = (($132) + 4)|0; $135 = $134; HEAP32[$135>>2] = $131; - $136 = (($output) + 112|0); + $136 = ((($output)) + 112|0); $137 = $136; $138 = $137; $139 = HEAP32[$138>>2]|0; @@ -9111,7 +9762,7 @@ function _freduce_degree($output) { $142 = HEAP32[$141>>2]|0; $143 = (_bitshift64Shl(($139|0),($142|0),4)|0); $144 = tempRet0; - $145 = (($output) + 32|0); + $145 = ((($output)) + 32|0); $146 = $145; $147 = $146; $148 = HEAP32[$147>>2]|0; @@ -9138,7 +9789,7 @@ function _freduce_degree($output) { $168 = (($166) + 4)|0; $169 = $168; HEAP32[$169>>2] = $165; - $170 = (($output) + 104|0); + $170 = ((($output)) + 104|0); $171 = $170; $172 = $171; $173 = HEAP32[$172>>2]|0; @@ -9147,7 +9798,7 @@ function _freduce_degree($output) { $176 = HEAP32[$175>>2]|0; $177 = (_bitshift64Shl(($173|0),($176|0),4)|0); $178 = tempRet0; - $179 = (($output) + 24|0); + $179 = ((($output)) + 24|0); $180 = $179; $181 = $180; $182 = HEAP32[$181>>2]|0; @@ -9174,7 +9825,7 @@ function _freduce_degree($output) { $202 = (($200) + 4)|0; $203 = $202; HEAP32[$203>>2] = $199; - $204 = (($output) + 96|0); + $204 = ((($output)) + 96|0); $205 = $204; $206 = $205; $207 = HEAP32[$206>>2]|0; @@ -9183,7 +9834,7 @@ function _freduce_degree($output) { $210 = HEAP32[$209>>2]|0; $211 = (_bitshift64Shl(($207|0),($210|0),4)|0); $212 = tempRet0; - $213 = (($output) + 16|0); + $213 = ((($output)) + 16|0); $214 = $213; $215 = $214; $216 = HEAP32[$215>>2]|0; @@ -9210,7 +9861,7 @@ function _freduce_degree($output) { $236 = (($234) + 4)|0; $237 = $236; HEAP32[$237>>2] = $233; - $238 = (($output) + 88|0); + $238 = ((($output)) + 88|0); $239 = $238; $240 = $239; $241 = HEAP32[$240>>2]|0; @@ -9219,7 +9870,7 @@ function _freduce_degree($output) { $244 = HEAP32[$243>>2]|0; $245 = (_bitshift64Shl(($241|0),($244|0),4)|0); $246 = tempRet0; - $247 = (($output) + 8|0); + $247 = ((($output)) + 8|0); $248 = $247; $249 = $248; $250 = HEAP32[$249>>2]|0; @@ -9246,7 +9897,7 @@ function _freduce_degree($output) { $270 = (($268) + 4)|0; $271 = $270; HEAP32[$271>>2] = $267; - $272 = (($output) + 80|0); + $272 = ((($output)) + 80|0); $273 = $272; $274 = $273; $275 = HEAP32[$274>>2]|0; @@ -9275,7 +9926,7 @@ function _freduce_degree($output) { $297 = (($295) + 4)|0; $298 = $297; HEAP32[$298>>2] = $294; - STACKTOP = sp;return; + return; } function _freduce_coefficients($output) { $output = $output|0; @@ -9286,7 +9937,7 @@ function _freduce_coefficients($output) { var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0; var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i$01 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($output) + 80|0); + $0 = ((($output)) + 80|0); $1 = $0; $2 = $1; HEAP32[$2>>2] = 0; @@ -9411,7 +10062,7 @@ function _freduce_coefficients($output) { $101 = (($99) + 4)|0; $102 = $101; HEAP32[$102>>2] = $98; - $103 = (($output) + 8|0); + $103 = ((($output)) + 8|0); $104 = $103; $105 = $104; $106 = HEAP32[$105>>2]|0; @@ -9426,15508 +10077,14364 @@ function _freduce_coefficients($output) { $114 = (($112) + 4)|0; $115 = $114; HEAP32[$115>>2] = $111; - STACKTOP = sp;return; + return; } -function _s32_eq($a,$b) { - $a = $a|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; +function _div_by_2_26($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = $a ^ -1; - $1 = $0 ^ $b; - $2 = $1 << 16; - $3 = $2 & $1; - $4 = $3 << 8; - $5 = $4 & $3; - $6 = $5 << 4; - $7 = $6 & $5; - $8 = $7 << 2; - $9 = $8 & $7; - $10 = $9 << 1; - $11 = $10 & $9; - $12 = $11 >> 31; - STACKTOP = sp;return ($12|0); + $2 = $1 >> 31; + $3 = $2 >>> 6; + $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); + $5 = tempRet0; + $6 = (_bitshift64Ashr(($4|0),($5|0),26)|0); + $7 = tempRet0; + tempRet0 = ($7); + return ($6|0); } -function _s32_gte($a) { - $a = $a|0; - var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; +function _div_by_2_25($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($a) + -67108845)|0; - $1 = $0 >> 31; - $2 = $1 ^ -1; - STACKTOP = sp;return ($2|0); + $2 = $1 >> 31; + $3 = $2 >>> 7; + $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); + $5 = tempRet0; + $6 = (_bitshift64Ashr(($4|0),($5|0),25)|0); + $7 = tempRet0; + tempRet0 = ($7); + return ($6|0); } -function _fsum($output,$in) { +function _fsquare($output,$in) { $output = $output|0; $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + var $t = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; - $0 = $output; + STACKTOP = STACKTOP + 160|0; + $t = sp; + _fsquare_inner($t,$in); + _freduce_degree($t); + _freduce_coefficients($t); + dest=$output; src=$t; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _fsquare_inner($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; + var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; + var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; + var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; + var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; + var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; + var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; + var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; + var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; + var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; + var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; + var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; + var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; + var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; + var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; + var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; + var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; + var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; + var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; + var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; + var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; + var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; + var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; + var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; + var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; + var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; + var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; + var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; + var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; + var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; + var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; + var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; + var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; + var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; + var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; + var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; + var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; + var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; + var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; + var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; + var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; + var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; + var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; + var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; + var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; + var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; + var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; + var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; + var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; + var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; + var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; + var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; + var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; + var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; + var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; + var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $0 = $in; $1 = $0; $2 = HEAP32[$1>>2]|0; $3 = (($0) + 4)|0; $4 = $3; $5 = HEAP32[$4>>2]|0; - $6 = $in; - $7 = $6; - $8 = HEAP32[$7>>2]|0; - $9 = (($6) + 4)|0; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (_i64Add(($8|0),($11|0),($2|0),($5|0))|0); - $13 = tempRet0; - $14 = $output; + $6 = (_bitshift64Ashr(0,($2|0),32)|0); + $7 = tempRet0; + $8 = (___muldi3(($6|0),($7|0),($6|0),($7|0))|0); + $9 = tempRet0; + $10 = $output; + $11 = $10; + HEAP32[$11>>2] = $8; + $12 = (($10) + 4)|0; + $13 = $12; + HEAP32[$13>>2] = $9; + $14 = $in; $15 = $14; - HEAP32[$15>>2] = $12; - $16 = (($14) + 4)|0; - $17 = $16; - HEAP32[$17>>2] = $13; - $18 = (($output) + 8|0); - $19 = $18; - $20 = $19; - $21 = HEAP32[$20>>2]|0; - $22 = (($19) + 4)|0; + $16 = HEAP32[$15>>2]|0; + $17 = (($14) + 4)|0; + $18 = $17; + $19 = HEAP32[$18>>2]|0; + $20 = (_bitshift64Ashr(0,($16|0),31)|0); + $21 = tempRet0; + $22 = ((($in)) + 8|0); $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($in) + 8|0); - $26 = $25; + $24 = $23; + $25 = HEAP32[$24>>2]|0; + $26 = (($23) + 4)|0; $27 = $26; $28 = HEAP32[$27>>2]|0; - $29 = (($26) + 4)|0; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (_i64Add(($28|0),($31|0),($21|0),($24|0))|0); - $33 = tempRet0; - $34 = $18; + $29 = (_bitshift64Ashr(0,($25|0),32)|0); + $30 = tempRet0; + $31 = (___muldi3(($29|0),($30|0),($20|0),($21|0))|0); + $32 = tempRet0; + $33 = ((($output)) + 8|0); + $34 = $33; $35 = $34; - HEAP32[$35>>2] = $32; + HEAP32[$35>>2] = $31; $36 = (($34) + 4)|0; $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($output) + 16|0); + HEAP32[$37>>2] = $32; + $38 = $22; $39 = $38; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (($39) + 4)|0; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($in) + 16|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_i64Add(($48|0),($51|0),($41|0),($44|0))|0); - $53 = tempRet0; - $54 = $38; - $55 = $54; - HEAP32[$55>>2] = $52; - $56 = (($54) + 4)|0; + $40 = HEAP32[$39>>2]|0; + $41 = (($38) + 4)|0; + $42 = $41; + $43 = HEAP32[$42>>2]|0; + $44 = (_bitshift64Ashr(0,($40|0),32)|0); + $45 = tempRet0; + $46 = (___muldi3(($44|0),($45|0),($44|0),($45|0))|0); + $47 = tempRet0; + $48 = $in; + $49 = $48; + $50 = HEAP32[$49>>2]|0; + $51 = (($48) + 4)|0; + $52 = $51; + $53 = HEAP32[$52>>2]|0; + $54 = (_bitshift64Ashr(0,($50|0),32)|0); + $55 = tempRet0; + $56 = ((($in)) + 16|0); $57 = $56; - HEAP32[$57>>2] = $53; - $58 = (($output) + 24|0); - $59 = $58; - $60 = $59; - $61 = HEAP32[$60>>2]|0; - $62 = (($59) + 4)|0; - $63 = $62; - $64 = HEAP32[$63>>2]|0; - $65 = (($in) + 24|0); - $66 = $65; - $67 = $66; - $68 = HEAP32[$67>>2]|0; - $69 = (($66) + 4)|0; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (_i64Add(($68|0),($71|0),($61|0),($64|0))|0); - $73 = tempRet0; - $74 = $58; + $58 = $57; + $59 = HEAP32[$58>>2]|0; + $60 = (($57) + 4)|0; + $61 = $60; + $62 = HEAP32[$61>>2]|0; + $63 = (_bitshift64Ashr(0,($59|0),32)|0); + $64 = tempRet0; + $65 = (___muldi3(($63|0),($64|0),($54|0),($55|0))|0); + $66 = tempRet0; + $67 = (_i64Add(($65|0),($66|0),($46|0),($47|0))|0); + $68 = tempRet0; + $69 = (_bitshift64Shl(($67|0),($68|0),1)|0); + $70 = tempRet0; + $71 = ((($output)) + 16|0); + $72 = $71; + $73 = $72; + HEAP32[$73>>2] = $69; + $74 = (($72) + 4)|0; $75 = $74; - HEAP32[$75>>2] = $72; - $76 = (($74) + 4)|0; + HEAP32[$75>>2] = $70; + $76 = $22; $77 = $76; - HEAP32[$77>>2] = $73; - $78 = (($output) + 32|0); - $79 = $78; + $78 = HEAP32[$77>>2]|0; + $79 = (($76) + 4)|0; $80 = $79; $81 = HEAP32[$80>>2]|0; - $82 = (($79) + 4)|0; - $83 = $82; - $84 = HEAP32[$83>>2]|0; - $85 = (($in) + 32|0); - $86 = $85; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (($86) + 4)|0; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (_i64Add(($88|0),($91|0),($81|0),($84|0))|0); - $93 = tempRet0; - $94 = $78; + $82 = (_bitshift64Ashr(0,($78|0),32)|0); + $83 = tempRet0; + $84 = $56; + $85 = $84; + $86 = HEAP32[$85>>2]|0; + $87 = (($84) + 4)|0; + $88 = $87; + $89 = HEAP32[$88>>2]|0; + $90 = (_bitshift64Ashr(0,($86|0),32)|0); + $91 = tempRet0; + $92 = (___muldi3(($90|0),($91|0),($82|0),($83|0))|0); + $93 = tempRet0; + $94 = $in; $95 = $94; - HEAP32[$95>>2] = $92; - $96 = (($94) + 4)|0; - $97 = $96; - HEAP32[$97>>2] = $93; - $98 = (($output) + 40|0); - $99 = $98; - $100 = $99; - $101 = HEAP32[$100>>2]|0; - $102 = (($99) + 4)|0; + $96 = HEAP32[$95>>2]|0; + $97 = (($94) + 4)|0; + $98 = $97; + $99 = HEAP32[$98>>2]|0; + $100 = (_bitshift64Ashr(0,($96|0),32)|0); + $101 = tempRet0; + $102 = ((($in)) + 24|0); $103 = $102; - $104 = HEAP32[$103>>2]|0; - $105 = (($in) + 40|0); - $106 = $105; + $104 = $103; + $105 = HEAP32[$104>>2]|0; + $106 = (($103) + 4)|0; $107 = $106; $108 = HEAP32[$107>>2]|0; - $109 = (($106) + 4)|0; - $110 = $109; - $111 = HEAP32[$110>>2]|0; - $112 = (_i64Add(($108|0),($111|0),($101|0),($104|0))|0); - $113 = tempRet0; - $114 = $98; - $115 = $114; - HEAP32[$115>>2] = $112; - $116 = (($114) + 4)|0; - $117 = $116; - HEAP32[$117>>2] = $113; - $118 = (($output) + 48|0); + $109 = (_bitshift64Ashr(0,($105|0),32)|0); + $110 = tempRet0; + $111 = (___muldi3(($109|0),($110|0),($100|0),($101|0))|0); + $112 = tempRet0; + $113 = (_i64Add(($111|0),($112|0),($92|0),($93|0))|0); + $114 = tempRet0; + $115 = (_bitshift64Shl(($113|0),($114|0),1)|0); + $116 = tempRet0; + $117 = ((($output)) + 24|0); + $118 = $117; $119 = $118; - $120 = $119; - $121 = HEAP32[$120>>2]|0; - $122 = (($119) + 4)|0; + HEAP32[$119>>2] = $115; + $120 = (($118) + 4)|0; + $121 = $120; + HEAP32[$121>>2] = $116; + $122 = $56; $123 = $122; $124 = HEAP32[$123>>2]|0; - $125 = (($in) + 48|0); + $125 = (($122) + 4)|0; $126 = $125; - $127 = $126; - $128 = HEAP32[$127>>2]|0; - $129 = (($126) + 4)|0; - $130 = $129; - $131 = HEAP32[$130>>2]|0; - $132 = (_i64Add(($128|0),($131|0),($121|0),($124|0))|0); - $133 = tempRet0; - $134 = $118; - $135 = $134; - HEAP32[$135>>2] = $132; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $133; - $138 = (($output) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = (($in) + 56|0); - $146 = $145; - $147 = $146; - $148 = HEAP32[$147>>2]|0; - $149 = (($146) + 4)|0; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (_i64Add(($148|0),($151|0),($141|0),($144|0))|0); - $153 = tempRet0; - $154 = $138; - $155 = $154; - HEAP32[$155>>2] = $152; - $156 = (($154) + 4)|0; - $157 = $156; - HEAP32[$157>>2] = $153; - $158 = (($output) + 64|0); - $159 = $158; - $160 = $159; - $161 = HEAP32[$160>>2]|0; - $162 = (($159) + 4)|0; - $163 = $162; - $164 = HEAP32[$163>>2]|0; - $165 = (($in) + 64|0); - $166 = $165; - $167 = $166; - $168 = HEAP32[$167>>2]|0; - $169 = (($166) + 4)|0; - $170 = $169; - $171 = HEAP32[$170>>2]|0; - $172 = (_i64Add(($168|0),($171|0),($161|0),($164|0))|0); - $173 = tempRet0; - $174 = $158; + $127 = HEAP32[$126>>2]|0; + $128 = (_bitshift64Ashr(0,($124|0),32)|0); + $129 = tempRet0; + $130 = (___muldi3(($128|0),($129|0),($128|0),($129|0))|0); + $131 = tempRet0; + $132 = $22; + $133 = $132; + $134 = HEAP32[$133>>2]|0; + $135 = (($132) + 4)|0; + $136 = $135; + $137 = HEAP32[$136>>2]|0; + $138 = (_bitshift64Ashr(0,($134|0),30)|0); + $139 = tempRet0; + $140 = $102; + $141 = $140; + $142 = HEAP32[$141>>2]|0; + $143 = (($140) + 4)|0; + $144 = $143; + $145 = HEAP32[$144>>2]|0; + $146 = (_bitshift64Ashr(0,($142|0),32)|0); + $147 = tempRet0; + $148 = (___muldi3(($146|0),($147|0),($138|0),($139|0))|0); + $149 = tempRet0; + $150 = (_i64Add(($148|0),($149|0),($130|0),($131|0))|0); + $151 = tempRet0; + $152 = $in; + $153 = $152; + $154 = HEAP32[$153>>2]|0; + $155 = (($152) + 4)|0; + $156 = $155; + $157 = HEAP32[$156>>2]|0; + $158 = (_bitshift64Ashr(0,($154|0),31)|0); + $159 = tempRet0; + $160 = ((($in)) + 32|0); + $161 = $160; + $162 = $161; + $163 = HEAP32[$162>>2]|0; + $164 = (($161) + 4)|0; + $165 = $164; + $166 = HEAP32[$165>>2]|0; + $167 = (_bitshift64Ashr(0,($163|0),32)|0); + $168 = tempRet0; + $169 = (___muldi3(($167|0),($168|0),($158|0),($159|0))|0); + $170 = tempRet0; + $171 = (_i64Add(($150|0),($151|0),($169|0),($170|0))|0); + $172 = tempRet0; + $173 = ((($output)) + 32|0); + $174 = $173; $175 = $174; - HEAP32[$175>>2] = $172; + HEAP32[$175>>2] = $171; $176 = (($174) + 4)|0; $177 = $176; - HEAP32[$177>>2] = $173; - $178 = (($output) + 72|0); + HEAP32[$177>>2] = $172; + $178 = $56; $179 = $178; - $180 = $179; - $181 = HEAP32[$180>>2]|0; - $182 = (($179) + 4)|0; - $183 = $182; - $184 = HEAP32[$183>>2]|0; - $185 = (($in) + 72|0); - $186 = $185; + $180 = HEAP32[$179>>2]|0; + $181 = (($178) + 4)|0; + $182 = $181; + $183 = HEAP32[$182>>2]|0; + $184 = (_bitshift64Ashr(0,($180|0),32)|0); + $185 = tempRet0; + $186 = $102; $187 = $186; $188 = HEAP32[$187>>2]|0; $189 = (($186) + 4)|0; $190 = $189; $191 = HEAP32[$190>>2]|0; - $192 = (_i64Add(($188|0),($191|0),($181|0),($184|0))|0); + $192 = (_bitshift64Ashr(0,($188|0),32)|0); $193 = tempRet0; - $194 = $178; - $195 = $194; - HEAP32[$195>>2] = $192; - $196 = (($194) + 4)|0; + $194 = (___muldi3(($192|0),($193|0),($184|0),($185|0))|0); + $195 = tempRet0; + $196 = $22; $197 = $196; - HEAP32[$197>>2] = $193; - STACKTOP = sp;return; -} -function _fdifference($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = $output; - $7 = $6; - $8 = HEAP32[$7>>2]|0; - $9 = (($6) + 4)|0; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (_i64Subtract(($2|0),($5|0),($8|0),($11|0))|0); - $13 = tempRet0; - $14 = $output; - $15 = $14; - HEAP32[$15>>2] = $12; - $16 = (($14) + 4)|0; - $17 = $16; - HEAP32[$17>>2] = $13; - $18 = (($in) + 8|0); - $19 = $18; - $20 = $19; - $21 = HEAP32[$20>>2]|0; - $22 = (($19) + 4)|0; - $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($output) + 8|0); - $26 = $25; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (($26) + 4)|0; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (_i64Subtract(($21|0),($24|0),($28|0),($31|0))|0); - $33 = tempRet0; - $34 = $25; - $35 = $34; - HEAP32[$35>>2] = $32; - $36 = (($34) + 4)|0; - $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($in) + 16|0); - $39 = $38; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (($39) + 4)|0; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($output) + 16|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_i64Subtract(($41|0),($44|0),($48|0),($51|0))|0); - $53 = tempRet0; - $54 = $45; - $55 = $54; - HEAP32[$55>>2] = $52; - $56 = (($54) + 4)|0; - $57 = $56; - HEAP32[$57>>2] = $53; - $58 = (($in) + 24|0); - $59 = $58; - $60 = $59; - $61 = HEAP32[$60>>2]|0; - $62 = (($59) + 4)|0; - $63 = $62; - $64 = HEAP32[$63>>2]|0; - $65 = (($output) + 24|0); - $66 = $65; - $67 = $66; - $68 = HEAP32[$67>>2]|0; - $69 = (($66) + 4)|0; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (_i64Subtract(($61|0),($64|0),($68|0),($71|0))|0); - $73 = tempRet0; - $74 = $65; - $75 = $74; - HEAP32[$75>>2] = $72; - $76 = (($74) + 4)|0; - $77 = $76; - HEAP32[$77>>2] = $73; - $78 = (($in) + 32|0); - $79 = $78; - $80 = $79; - $81 = HEAP32[$80>>2]|0; - $82 = (($79) + 4)|0; - $83 = $82; - $84 = HEAP32[$83>>2]|0; - $85 = (($output) + 32|0); - $86 = $85; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (($86) + 4)|0; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (_i64Subtract(($81|0),($84|0),($88|0),($91|0))|0); - $93 = tempRet0; - $94 = $85; - $95 = $94; - HEAP32[$95>>2] = $92; - $96 = (($94) + 4)|0; - $97 = $96; - HEAP32[$97>>2] = $93; - $98 = (($in) + 40|0); - $99 = $98; - $100 = $99; - $101 = HEAP32[$100>>2]|0; - $102 = (($99) + 4)|0; - $103 = $102; - $104 = HEAP32[$103>>2]|0; - $105 = (($output) + 40|0); - $106 = $105; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (($106) + 4)|0; - $110 = $109; - $111 = HEAP32[$110>>2]|0; - $112 = (_i64Subtract(($101|0),($104|0),($108|0),($111|0))|0); - $113 = tempRet0; - $114 = $105; - $115 = $114; - HEAP32[$115>>2] = $112; - $116 = (($114) + 4)|0; - $117 = $116; - HEAP32[$117>>2] = $113; - $118 = (($in) + 48|0); - $119 = $118; - $120 = $119; - $121 = HEAP32[$120>>2]|0; - $122 = (($119) + 4)|0; - $123 = $122; - $124 = HEAP32[$123>>2]|0; - $125 = (($output) + 48|0); - $126 = $125; - $127 = $126; - $128 = HEAP32[$127>>2]|0; - $129 = (($126) + 4)|0; - $130 = $129; - $131 = HEAP32[$130>>2]|0; - $132 = (_i64Subtract(($121|0),($124|0),($128|0),($131|0))|0); - $133 = tempRet0; - $134 = $125; - $135 = $134; - HEAP32[$135>>2] = $132; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $133; - $138 = (($in) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = (($output) + 56|0); - $146 = $145; - $147 = $146; - $148 = HEAP32[$147>>2]|0; - $149 = (($146) + 4)|0; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (_i64Subtract(($141|0),($144|0),($148|0),($151|0))|0); - $153 = tempRet0; - $154 = $145; - $155 = $154; - HEAP32[$155>>2] = $152; - $156 = (($154) + 4)|0; - $157 = $156; - HEAP32[$157>>2] = $153; - $158 = (($in) + 64|0); - $159 = $158; - $160 = $159; - $161 = HEAP32[$160>>2]|0; - $162 = (($159) + 4)|0; - $163 = $162; - $164 = HEAP32[$163>>2]|0; - $165 = (($output) + 64|0); - $166 = $165; - $167 = $166; - $168 = HEAP32[$167>>2]|0; - $169 = (($166) + 4)|0; - $170 = $169; - $171 = HEAP32[$170>>2]|0; - $172 = (_i64Subtract(($161|0),($164|0),($168|0),($171|0))|0); - $173 = tempRet0; - $174 = $165; - $175 = $174; - HEAP32[$175>>2] = $172; - $176 = (($174) + 4)|0; - $177 = $176; - HEAP32[$177>>2] = $173; - $178 = (($in) + 72|0); - $179 = $178; - $180 = $179; - $181 = HEAP32[$180>>2]|0; - $182 = (($179) + 4)|0; - $183 = $182; - $184 = HEAP32[$183>>2]|0; - $185 = (($output) + 72|0); - $186 = $185; - $187 = $186; - $188 = HEAP32[$187>>2]|0; - $189 = (($186) + 4)|0; - $190 = $189; - $191 = HEAP32[$190>>2]|0; - $192 = (_i64Subtract(($181|0),($184|0),($188|0),($191|0))|0); - $193 = tempRet0; - $194 = $185; - $195 = $194; - HEAP32[$195>>2] = $192; - $196 = (($194) + 4)|0; - $197 = $196; - HEAP32[$197>>2] = $193; - STACKTOP = sp;return; -} -function _fscalar_product($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = (___muldi3(($2|0),($5|0),121665,0)|0); - $7 = tempRet0; - $8 = $output; - $9 = $8; - HEAP32[$9>>2] = $6; - $10 = (($8) + 4)|0; - $11 = $10; - HEAP32[$11>>2] = $7; - $12 = (($in) + 8|0); - $13 = $12; - $14 = $13; - $15 = HEAP32[$14>>2]|0; - $16 = (($13) + 4)|0; - $17 = $16; - $18 = HEAP32[$17>>2]|0; - $19 = (___muldi3(($15|0),($18|0),121665,0)|0); - $20 = tempRet0; - $21 = (($output) + 8|0); - $22 = $21; - $23 = $22; - HEAP32[$23>>2] = $19; - $24 = (($22) + 4)|0; - $25 = $24; - HEAP32[$25>>2] = $20; - $26 = (($in) + 16|0); - $27 = $26; - $28 = $27; - $29 = HEAP32[$28>>2]|0; - $30 = (($27) + 4)|0; - $31 = $30; - $32 = HEAP32[$31>>2]|0; - $33 = (___muldi3(($29|0),($32|0),121665,0)|0); - $34 = tempRet0; - $35 = (($output) + 16|0); - $36 = $35; - $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($36) + 4)|0; - $39 = $38; - HEAP32[$39>>2] = $34; - $40 = (($in) + 24|0); - $41 = $40; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (($41) + 4)|0; - $45 = $44; - $46 = HEAP32[$45>>2]|0; - $47 = (___muldi3(($43|0),($46|0),121665,0)|0); - $48 = tempRet0; - $49 = (($output) + 24|0); - $50 = $49; - $51 = $50; - HEAP32[$51>>2] = $47; - $52 = (($50) + 4)|0; - $53 = $52; - HEAP32[$53>>2] = $48; - $54 = (($in) + 32|0); - $55 = $54; - $56 = $55; - $57 = HEAP32[$56>>2]|0; - $58 = (($55) + 4)|0; - $59 = $58; - $60 = HEAP32[$59>>2]|0; - $61 = (___muldi3(($57|0),($60|0),121665,0)|0); - $62 = tempRet0; - $63 = (($output) + 32|0); - $64 = $63; - $65 = $64; - HEAP32[$65>>2] = $61; - $66 = (($64) + 4)|0; - $67 = $66; - HEAP32[$67>>2] = $62; - $68 = (($in) + 40|0); - $69 = $68; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (($69) + 4)|0; - $73 = $72; - $74 = HEAP32[$73>>2]|0; - $75 = (___muldi3(($71|0),($74|0),121665,0)|0); - $76 = tempRet0; - $77 = (($output) + 40|0); - $78 = $77; - $79 = $78; - HEAP32[$79>>2] = $75; - $80 = (($78) + 4)|0; - $81 = $80; - HEAP32[$81>>2] = $76; - $82 = (($in) + 48|0); - $83 = $82; - $84 = $83; - $85 = HEAP32[$84>>2]|0; - $86 = (($83) + 4)|0; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (___muldi3(($85|0),($88|0),121665,0)|0); - $90 = tempRet0; - $91 = (($output) + 48|0); - $92 = $91; - $93 = $92; - HEAP32[$93>>2] = $89; - $94 = (($92) + 4)|0; - $95 = $94; - HEAP32[$95>>2] = $90; - $96 = (($in) + 56|0); - $97 = $96; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (($97) + 4)|0; - $101 = $100; - $102 = HEAP32[$101>>2]|0; - $103 = (___muldi3(($99|0),($102|0),121665,0)|0); - $104 = tempRet0; - $105 = (($output) + 56|0); - $106 = $105; - $107 = $106; - HEAP32[$107>>2] = $103; - $108 = (($106) + 4)|0; - $109 = $108; - HEAP32[$109>>2] = $104; - $110 = (($in) + 64|0); - $111 = $110; - $112 = $111; - $113 = HEAP32[$112>>2]|0; - $114 = (($111) + 4)|0; - $115 = $114; - $116 = HEAP32[$115>>2]|0; - $117 = (___muldi3(($113|0),($116|0),121665,0)|0); - $118 = tempRet0; - $119 = (($output) + 64|0); - $120 = $119; - $121 = $120; - HEAP32[$121>>2] = $117; - $122 = (($120) + 4)|0; - $123 = $122; - HEAP32[$123>>2] = $118; - $124 = (($in) + 72|0); - $125 = $124; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (($125) + 4)|0; - $129 = $128; - $130 = HEAP32[$129>>2]|0; - $131 = (___muldi3(($127|0),($130|0),121665,0)|0); - $132 = tempRet0; - $133 = (($output) + 72|0); - $134 = $133; - $135 = $134; - HEAP32[$135>>2] = $131; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $132; - STACKTOP = sp;return; -} -function _fsquare_inner($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; - var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; - var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; - var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; - var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; - var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; - var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; - var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; - var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; - var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; - var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; - var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; - var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; - var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; - var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; - var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; - var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; - var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; - var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; - var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; - var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; - var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; - var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; - var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; - var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; - var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; - var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; - var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; - var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; - var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; - var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; - var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; - var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; - var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; - var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; - var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; - var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; - var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; - var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; - var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; - var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; - var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; - var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; - var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; - var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; - var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; - var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; - var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; - var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; - var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; - var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; - var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; - var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; - var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; - var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; - var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = (_bitshift64Ashr(0,($2|0),32)|0); - $7 = tempRet0; - $8 = (___muldi3(($6|0),($7|0),($6|0),($7|0))|0); - $9 = tempRet0; - $10 = $output; - $11 = $10; - HEAP32[$11>>2] = $8; - $12 = (($10) + 4)|0; - $13 = $12; - HEAP32[$13>>2] = $9; - $14 = $in; - $15 = $14; - $16 = HEAP32[$15>>2]|0; - $17 = (($14) + 4)|0; - $18 = $17; - $19 = HEAP32[$18>>2]|0; - $20 = (_bitshift64Ashr(0,($16|0),31)|0); - $21 = tempRet0; - $22 = (($in) + 8|0); - $23 = $22; - $24 = $23; - $25 = HEAP32[$24>>2]|0; - $26 = (($23) + 4)|0; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (_bitshift64Ashr(0,($25|0),32)|0); - $30 = tempRet0; - $31 = (___muldi3(($29|0),($30|0),($20|0),($21|0))|0); - $32 = tempRet0; - $33 = (($output) + 8|0); - $34 = $33; - $35 = $34; - HEAP32[$35>>2] = $31; - $36 = (($34) + 4)|0; - $37 = $36; - HEAP32[$37>>2] = $32; - $38 = $22; - $39 = $38; - $40 = HEAP32[$39>>2]|0; - $41 = (($38) + 4)|0; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (_bitshift64Ashr(0,($40|0),32)|0); - $45 = tempRet0; - $46 = (___muldi3(($44|0),($45|0),($44|0),($45|0))|0); - $47 = tempRet0; - $48 = $in; - $49 = $48; - $50 = HEAP32[$49>>2]|0; - $51 = (($48) + 4)|0; - $52 = $51; - $53 = HEAP32[$52>>2]|0; - $54 = (_bitshift64Ashr(0,($50|0),32)|0); - $55 = tempRet0; - $56 = (($in) + 16|0); - $57 = $56; - $58 = $57; - $59 = HEAP32[$58>>2]|0; - $60 = (($57) + 4)|0; - $61 = $60; - $62 = HEAP32[$61>>2]|0; - $63 = (_bitshift64Ashr(0,($59|0),32)|0); - $64 = tempRet0; - $65 = (___muldi3(($63|0),($64|0),($54|0),($55|0))|0); - $66 = tempRet0; - $67 = (_i64Add(($65|0),($66|0),($46|0),($47|0))|0); - $68 = tempRet0; - $69 = (_bitshift64Shl(($67|0),($68|0),1)|0); - $70 = tempRet0; - $71 = (($output) + 16|0); - $72 = $71; - $73 = $72; - HEAP32[$73>>2] = $69; - $74 = (($72) + 4)|0; - $75 = $74; - HEAP32[$75>>2] = $70; - $76 = $22; - $77 = $76; - $78 = HEAP32[$77>>2]|0; - $79 = (($76) + 4)|0; - $80 = $79; - $81 = HEAP32[$80>>2]|0; - $82 = (_bitshift64Ashr(0,($78|0),32)|0); - $83 = tempRet0; - $84 = $56; - $85 = $84; - $86 = HEAP32[$85>>2]|0; - $87 = (($84) + 4)|0; - $88 = $87; - $89 = HEAP32[$88>>2]|0; - $90 = (_bitshift64Ashr(0,($86|0),32)|0); - $91 = tempRet0; - $92 = (___muldi3(($90|0),($91|0),($82|0),($83|0))|0); - $93 = tempRet0; - $94 = $in; - $95 = $94; - $96 = HEAP32[$95>>2]|0; - $97 = (($94) + 4)|0; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (_bitshift64Ashr(0,($96|0),32)|0); - $101 = tempRet0; - $102 = (($in) + 24|0); - $103 = $102; - $104 = $103; - $105 = HEAP32[$104>>2]|0; - $106 = (($103) + 4)|0; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (_bitshift64Ashr(0,($105|0),32)|0); - $110 = tempRet0; - $111 = (___muldi3(($109|0),($110|0),($100|0),($101|0))|0); - $112 = tempRet0; - $113 = (_i64Add(($111|0),($112|0),($92|0),($93|0))|0); - $114 = tempRet0; - $115 = (_bitshift64Shl(($113|0),($114|0),1)|0); - $116 = tempRet0; - $117 = (($output) + 24|0); - $118 = $117; - $119 = $118; - HEAP32[$119>>2] = $115; - $120 = (($118) + 4)|0; - $121 = $120; - HEAP32[$121>>2] = $116; - $122 = $56; - $123 = $122; - $124 = HEAP32[$123>>2]|0; - $125 = (($122) + 4)|0; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (_bitshift64Ashr(0,($124|0),32)|0); - $129 = tempRet0; - $130 = (___muldi3(($128|0),($129|0),($128|0),($129|0))|0); - $131 = tempRet0; - $132 = $22; - $133 = $132; - $134 = HEAP32[$133>>2]|0; - $135 = (($132) + 4)|0; - $136 = $135; - $137 = HEAP32[$136>>2]|0; - $138 = (_bitshift64Ashr(0,($134|0),30)|0); - $139 = tempRet0; - $140 = $102; - $141 = $140; - $142 = HEAP32[$141>>2]|0; - $143 = (($140) + 4)|0; - $144 = $143; - $145 = HEAP32[$144>>2]|0; - $146 = (_bitshift64Ashr(0,($142|0),32)|0); - $147 = tempRet0; - $148 = (___muldi3(($146|0),($147|0),($138|0),($139|0))|0); - $149 = tempRet0; - $150 = (_i64Add(($148|0),($149|0),($130|0),($131|0))|0); - $151 = tempRet0; - $152 = $in; - $153 = $152; - $154 = HEAP32[$153>>2]|0; - $155 = (($152) + 4)|0; - $156 = $155; - $157 = HEAP32[$156>>2]|0; - $158 = (_bitshift64Ashr(0,($154|0),31)|0); - $159 = tempRet0; - $160 = (($in) + 32|0); - $161 = $160; - $162 = $161; - $163 = HEAP32[$162>>2]|0; - $164 = (($161) + 4)|0; - $165 = $164; - $166 = HEAP32[$165>>2]|0; - $167 = (_bitshift64Ashr(0,($163|0),32)|0); - $168 = tempRet0; - $169 = (___muldi3(($167|0),($168|0),($158|0),($159|0))|0); - $170 = tempRet0; - $171 = (_i64Add(($150|0),($151|0),($169|0),($170|0))|0); - $172 = tempRet0; - $173 = (($output) + 32|0); - $174 = $173; - $175 = $174; - HEAP32[$175>>2] = $171; - $176 = (($174) + 4)|0; - $177 = $176; - HEAP32[$177>>2] = $172; - $178 = $56; - $179 = $178; - $180 = HEAP32[$179>>2]|0; - $181 = (($178) + 4)|0; - $182 = $181; - $183 = HEAP32[$182>>2]|0; - $184 = (_bitshift64Ashr(0,($180|0),32)|0); - $185 = tempRet0; - $186 = $102; - $187 = $186; - $188 = HEAP32[$187>>2]|0; - $189 = (($186) + 4)|0; - $190 = $189; - $191 = HEAP32[$190>>2]|0; - $192 = (_bitshift64Ashr(0,($188|0),32)|0); - $193 = tempRet0; - $194 = (___muldi3(($192|0),($193|0),($184|0),($185|0))|0); - $195 = tempRet0; - $196 = $22; - $197 = $196; - $198 = HEAP32[$197>>2]|0; - $199 = (($196) + 4)|0; - $200 = $199; - $201 = HEAP32[$200>>2]|0; - $202 = (_bitshift64Ashr(0,($198|0),32)|0); - $203 = tempRet0; - $204 = $160; - $205 = $204; - $206 = HEAP32[$205>>2]|0; - $207 = (($204) + 4)|0; - $208 = $207; - $209 = HEAP32[$208>>2]|0; - $210 = (_bitshift64Ashr(0,($206|0),32)|0); - $211 = tempRet0; - $212 = (___muldi3(($210|0),($211|0),($202|0),($203|0))|0); - $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($194|0),($195|0))|0); - $215 = tempRet0; - $216 = $in; - $217 = $216; - $218 = HEAP32[$217>>2]|0; - $219 = (($216) + 4)|0; - $220 = $219; - $221 = HEAP32[$220>>2]|0; - $222 = (_bitshift64Ashr(0,($218|0),32)|0); - $223 = tempRet0; - $224 = (($in) + 40|0); - $225 = $224; - $226 = $225; - $227 = HEAP32[$226>>2]|0; - $228 = (($225) + 4)|0; - $229 = $228; - $230 = HEAP32[$229>>2]|0; - $231 = (_bitshift64Ashr(0,($227|0),32)|0); - $232 = tempRet0; - $233 = (___muldi3(($231|0),($232|0),($222|0),($223|0))|0); - $234 = tempRet0; - $235 = (_i64Add(($214|0),($215|0),($233|0),($234|0))|0); - $236 = tempRet0; - $237 = (_bitshift64Shl(($235|0),($236|0),1)|0); - $238 = tempRet0; - $239 = (($output) + 40|0); - $240 = $239; - $241 = $240; - HEAP32[$241>>2] = $237; - $242 = (($240) + 4)|0; - $243 = $242; - HEAP32[$243>>2] = $238; - $244 = $102; - $245 = $244; - $246 = HEAP32[$245>>2]|0; - $247 = (($244) + 4)|0; - $248 = $247; - $249 = HEAP32[$248>>2]|0; - $250 = (_bitshift64Ashr(0,($246|0),32)|0); - $251 = tempRet0; - $252 = (___muldi3(($250|0),($251|0),($250|0),($251|0))|0); - $253 = tempRet0; - $254 = $56; - $255 = $254; - $256 = HEAP32[$255>>2]|0; - $257 = (($254) + 4)|0; - $258 = $257; - $259 = HEAP32[$258>>2]|0; - $260 = (_bitshift64Ashr(0,($256|0),32)|0); - $261 = tempRet0; - $262 = $160; - $263 = $262; - $264 = HEAP32[$263>>2]|0; - $265 = (($262) + 4)|0; - $266 = $265; - $267 = HEAP32[$266>>2]|0; - $268 = (_bitshift64Ashr(0,($264|0),32)|0); - $269 = tempRet0; - $270 = (___muldi3(($268|0),($269|0),($260|0),($261|0))|0); - $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($252|0),($253|0))|0); - $273 = tempRet0; - $274 = $in; - $275 = $274; - $276 = HEAP32[$275>>2]|0; - $277 = (($274) + 4)|0; - $278 = $277; - $279 = HEAP32[$278>>2]|0; - $280 = (_bitshift64Ashr(0,($276|0),32)|0); - $281 = tempRet0; - $282 = (($in) + 48|0); - $283 = $282; - $284 = $283; - $285 = HEAP32[$284>>2]|0; - $286 = (($283) + 4)|0; - $287 = $286; - $288 = HEAP32[$287>>2]|0; - $289 = (_bitshift64Ashr(0,($285|0),32)|0); - $290 = tempRet0; - $291 = (___muldi3(($289|0),($290|0),($280|0),($281|0))|0); - $292 = tempRet0; - $293 = (_i64Add(($272|0),($273|0),($291|0),($292|0))|0); - $294 = tempRet0; - $295 = $22; - $296 = $295; - $297 = HEAP32[$296>>2]|0; - $298 = (($295) + 4)|0; - $299 = $298; - $300 = HEAP32[$299>>2]|0; - $301 = (_bitshift64Ashr(0,($297|0),31)|0); - $302 = tempRet0; - $303 = $224; - $304 = $303; - $305 = HEAP32[$304>>2]|0; - $306 = (($303) + 4)|0; - $307 = $306; - $308 = HEAP32[$307>>2]|0; - $309 = (_bitshift64Ashr(0,($305|0),32)|0); - $310 = tempRet0; - $311 = (___muldi3(($309|0),($310|0),($301|0),($302|0))|0); - $312 = tempRet0; - $313 = (_i64Add(($293|0),($294|0),($311|0),($312|0))|0); - $314 = tempRet0; - $315 = (_bitshift64Shl(($313|0),($314|0),1)|0); - $316 = tempRet0; - $317 = (($output) + 48|0); - $318 = $317; - $319 = $318; - HEAP32[$319>>2] = $315; - $320 = (($318) + 4)|0; - $321 = $320; - HEAP32[$321>>2] = $316; - $322 = $102; - $323 = $322; - $324 = HEAP32[$323>>2]|0; - $325 = (($322) + 4)|0; - $326 = $325; - $327 = HEAP32[$326>>2]|0; - $328 = (_bitshift64Ashr(0,($324|0),32)|0); - $329 = tempRet0; - $330 = $160; - $331 = $330; - $332 = HEAP32[$331>>2]|0; - $333 = (($330) + 4)|0; - $334 = $333; - $335 = HEAP32[$334>>2]|0; - $336 = (_bitshift64Ashr(0,($332|0),32)|0); - $337 = tempRet0; - $338 = (___muldi3(($336|0),($337|0),($328|0),($329|0))|0); - $339 = tempRet0; - $340 = $56; - $341 = $340; - $342 = HEAP32[$341>>2]|0; - $343 = (($340) + 4)|0; - $344 = $343; - $345 = HEAP32[$344>>2]|0; - $346 = (_bitshift64Ashr(0,($342|0),32)|0); - $347 = tempRet0; - $348 = $224; - $349 = $348; - $350 = HEAP32[$349>>2]|0; - $351 = (($348) + 4)|0; - $352 = $351; - $353 = HEAP32[$352>>2]|0; - $354 = (_bitshift64Ashr(0,($350|0),32)|0); - $355 = tempRet0; - $356 = (___muldi3(($354|0),($355|0),($346|0),($347|0))|0); - $357 = tempRet0; - $358 = (_i64Add(($356|0),($357|0),($338|0),($339|0))|0); - $359 = tempRet0; - $360 = $22; - $361 = $360; - $362 = HEAP32[$361>>2]|0; - $363 = (($360) + 4)|0; - $364 = $363; - $365 = HEAP32[$364>>2]|0; - $366 = (_bitshift64Ashr(0,($362|0),32)|0); - $367 = tempRet0; - $368 = $282; - $369 = $368; - $370 = HEAP32[$369>>2]|0; - $371 = (($368) + 4)|0; - $372 = $371; - $373 = HEAP32[$372>>2]|0; - $374 = (_bitshift64Ashr(0,($370|0),32)|0); - $375 = tempRet0; - $376 = (___muldi3(($374|0),($375|0),($366|0),($367|0))|0); - $377 = tempRet0; - $378 = (_i64Add(($358|0),($359|0),($376|0),($377|0))|0); - $379 = tempRet0; - $380 = $in; - $381 = $380; - $382 = HEAP32[$381>>2]|0; - $383 = (($380) + 4)|0; - $384 = $383; - $385 = HEAP32[$384>>2]|0; - $386 = (_bitshift64Ashr(0,($382|0),32)|0); - $387 = tempRet0; - $388 = (($in) + 56|0); - $389 = $388; - $390 = $389; - $391 = HEAP32[$390>>2]|0; - $392 = (($389) + 4)|0; - $393 = $392; - $394 = HEAP32[$393>>2]|0; - $395 = (_bitshift64Ashr(0,($391|0),32)|0); - $396 = tempRet0; - $397 = (___muldi3(($395|0),($396|0),($386|0),($387|0))|0); - $398 = tempRet0; - $399 = (_i64Add(($378|0),($379|0),($397|0),($398|0))|0); - $400 = tempRet0; - $401 = (_bitshift64Shl(($399|0),($400|0),1)|0); - $402 = tempRet0; - $403 = (($output) + 56|0); - $404 = $403; - $405 = $404; - HEAP32[$405>>2] = $401; - $406 = (($404) + 4)|0; - $407 = $406; - HEAP32[$407>>2] = $402; - $408 = $160; - $409 = $408; - $410 = HEAP32[$409>>2]|0; - $411 = (($408) + 4)|0; - $412 = $411; - $413 = HEAP32[$412>>2]|0; - $414 = (_bitshift64Ashr(0,($410|0),32)|0); - $415 = tempRet0; - $416 = (___muldi3(($414|0),($415|0),($414|0),($415|0))|0); - $417 = tempRet0; - $418 = $56; - $419 = $418; - $420 = HEAP32[$419>>2]|0; - $421 = (($418) + 4)|0; - $422 = $421; - $423 = HEAP32[$422>>2]|0; - $424 = (_bitshift64Ashr(0,($420|0),32)|0); - $425 = tempRet0; - $426 = $282; - $427 = $426; - $428 = HEAP32[$427>>2]|0; - $429 = (($426) + 4)|0; - $430 = $429; - $431 = HEAP32[$430>>2]|0; - $432 = (_bitshift64Ashr(0,($428|0),32)|0); - $433 = tempRet0; - $434 = (___muldi3(($432|0),($433|0),($424|0),($425|0))|0); - $435 = tempRet0; - $436 = $in; - $437 = $436; - $438 = HEAP32[$437>>2]|0; - $439 = (($436) + 4)|0; - $440 = $439; - $441 = HEAP32[$440>>2]|0; - $442 = (_bitshift64Ashr(0,($438|0),32)|0); - $443 = tempRet0; - $444 = (($in) + 64|0); - $445 = $444; - $446 = $445; - $447 = HEAP32[$446>>2]|0; - $448 = (($445) + 4)|0; - $449 = $448; - $450 = HEAP32[$449>>2]|0; - $451 = (_bitshift64Ashr(0,($447|0),32)|0); - $452 = tempRet0; - $453 = (___muldi3(($451|0),($452|0),($442|0),($443|0))|0); - $454 = tempRet0; - $455 = (_i64Add(($453|0),($454|0),($434|0),($435|0))|0); - $456 = tempRet0; - $457 = $22; - $458 = $457; - $459 = HEAP32[$458>>2]|0; - $460 = (($457) + 4)|0; - $461 = $460; - $462 = HEAP32[$461>>2]|0; - $463 = (_bitshift64Ashr(0,($459|0),32)|0); - $464 = tempRet0; - $465 = $388; - $466 = $465; - $467 = HEAP32[$466>>2]|0; - $468 = (($465) + 4)|0; - $469 = $468; - $470 = HEAP32[$469>>2]|0; - $471 = (_bitshift64Ashr(0,($467|0),32)|0); - $472 = tempRet0; - $473 = (___muldi3(($471|0),($472|0),($463|0),($464|0))|0); - $474 = tempRet0; - $475 = $102; - $476 = $475; - $477 = HEAP32[$476>>2]|0; - $478 = (($475) + 4)|0; - $479 = $478; - $480 = HEAP32[$479>>2]|0; - $481 = (_bitshift64Ashr(0,($477|0),32)|0); - $482 = tempRet0; - $483 = $224; - $484 = $483; - $485 = HEAP32[$484>>2]|0; - $486 = (($483) + 4)|0; - $487 = $486; - $488 = HEAP32[$487>>2]|0; - $489 = (_bitshift64Ashr(0,($485|0),32)|0); - $490 = tempRet0; - $491 = (___muldi3(($489|0),($490|0),($481|0),($482|0))|0); - $492 = tempRet0; - $493 = (_i64Add(($491|0),($492|0),($473|0),($474|0))|0); - $494 = tempRet0; - $495 = (_bitshift64Shl(($493|0),($494|0),1)|0); - $496 = tempRet0; - $497 = (_i64Add(($455|0),($456|0),($495|0),($496|0))|0); - $498 = tempRet0; - $499 = (_bitshift64Shl(($497|0),($498|0),1)|0); - $500 = tempRet0; - $501 = (_i64Add(($499|0),($500|0),($416|0),($417|0))|0); - $502 = tempRet0; - $503 = (($output) + 64|0); - $504 = $503; - $505 = $504; - HEAP32[$505>>2] = $501; - $506 = (($504) + 4)|0; - $507 = $506; - HEAP32[$507>>2] = $502; - $508 = $160; - $509 = $508; - $510 = HEAP32[$509>>2]|0; - $511 = (($508) + 4)|0; - $512 = $511; - $513 = HEAP32[$512>>2]|0; - $514 = (_bitshift64Ashr(0,($510|0),32)|0); - $515 = tempRet0; - $516 = $224; - $517 = $516; - $518 = HEAP32[$517>>2]|0; - $519 = (($516) + 4)|0; - $520 = $519; - $521 = HEAP32[$520>>2]|0; - $522 = (_bitshift64Ashr(0,($518|0),32)|0); - $523 = tempRet0; - $524 = (___muldi3(($522|0),($523|0),($514|0),($515|0))|0); - $525 = tempRet0; - $526 = $102; - $527 = $526; - $528 = HEAP32[$527>>2]|0; - $529 = (($526) + 4)|0; - $530 = $529; - $531 = HEAP32[$530>>2]|0; - $532 = (_bitshift64Ashr(0,($528|0),32)|0); - $533 = tempRet0; - $534 = $282; - $535 = $534; - $536 = HEAP32[$535>>2]|0; - $537 = (($534) + 4)|0; - $538 = $537; - $539 = HEAP32[$538>>2]|0; - $540 = (_bitshift64Ashr(0,($536|0),32)|0); - $541 = tempRet0; - $542 = (___muldi3(($540|0),($541|0),($532|0),($533|0))|0); - $543 = tempRet0; - $544 = (_i64Add(($542|0),($543|0),($524|0),($525|0))|0); - $545 = tempRet0; - $546 = $56; - $547 = $546; - $548 = HEAP32[$547>>2]|0; - $549 = (($546) + 4)|0; - $550 = $549; - $551 = HEAP32[$550>>2]|0; - $552 = (_bitshift64Ashr(0,($548|0),32)|0); - $553 = tempRet0; - $554 = $388; - $555 = $554; - $556 = HEAP32[$555>>2]|0; - $557 = (($554) + 4)|0; - $558 = $557; - $559 = HEAP32[$558>>2]|0; - $560 = (_bitshift64Ashr(0,($556|0),32)|0); - $561 = tempRet0; - $562 = (___muldi3(($560|0),($561|0),($552|0),($553|0))|0); - $563 = tempRet0; - $564 = (_i64Add(($544|0),($545|0),($562|0),($563|0))|0); - $565 = tempRet0; - $566 = $22; - $567 = $566; - $568 = HEAP32[$567>>2]|0; - $569 = (($566) + 4)|0; - $570 = $569; - $571 = HEAP32[$570>>2]|0; - $572 = (_bitshift64Ashr(0,($568|0),32)|0); - $573 = tempRet0; - $574 = $444; - $575 = $574; - $576 = HEAP32[$575>>2]|0; - $577 = (($574) + 4)|0; - $578 = $577; - $579 = HEAP32[$578>>2]|0; - $580 = (_bitshift64Ashr(0,($576|0),32)|0); - $581 = tempRet0; - $582 = (___muldi3(($580|0),($581|0),($572|0),($573|0))|0); - $583 = tempRet0; - $584 = (_i64Add(($564|0),($565|0),($582|0),($583|0))|0); - $585 = tempRet0; - $586 = $in; - $587 = $586; - $588 = HEAP32[$587>>2]|0; - $589 = (($586) + 4)|0; - $590 = $589; - $591 = HEAP32[$590>>2]|0; - $592 = (_bitshift64Ashr(0,($588|0),32)|0); - $593 = tempRet0; - $594 = (($in) + 72|0); - $595 = $594; - $596 = $595; - $597 = HEAP32[$596>>2]|0; - $598 = (($595) + 4)|0; - $599 = $598; - $600 = HEAP32[$599>>2]|0; - $601 = (_bitshift64Ashr(0,($597|0),32)|0); - $602 = tempRet0; - $603 = (___muldi3(($601|0),($602|0),($592|0),($593|0))|0); - $604 = tempRet0; - $605 = (_i64Add(($584|0),($585|0),($603|0),($604|0))|0); - $606 = tempRet0; - $607 = (_bitshift64Shl(($605|0),($606|0),1)|0); - $608 = tempRet0; - $609 = (($output) + 72|0); - $610 = $609; - $611 = $610; - HEAP32[$611>>2] = $607; - $612 = (($610) + 4)|0; - $613 = $612; - HEAP32[$613>>2] = $608; - $614 = $224; - $615 = $614; - $616 = HEAP32[$615>>2]|0; - $617 = (($614) + 4)|0; - $618 = $617; - $619 = HEAP32[$618>>2]|0; - $620 = (_bitshift64Ashr(0,($616|0),32)|0); - $621 = tempRet0; - $622 = (___muldi3(($620|0),($621|0),($620|0),($621|0))|0); - $623 = tempRet0; - $624 = $160; - $625 = $624; - $626 = HEAP32[$625>>2]|0; - $627 = (($624) + 4)|0; - $628 = $627; - $629 = HEAP32[$628>>2]|0; - $630 = (_bitshift64Ashr(0,($626|0),32)|0); - $631 = tempRet0; - $632 = $282; - $633 = $632; - $634 = HEAP32[$633>>2]|0; - $635 = (($632) + 4)|0; - $636 = $635; - $637 = HEAP32[$636>>2]|0; - $638 = (_bitshift64Ashr(0,($634|0),32)|0); - $639 = tempRet0; - $640 = (___muldi3(($638|0),($639|0),($630|0),($631|0))|0); - $641 = tempRet0; - $642 = (_i64Add(($640|0),($641|0),($622|0),($623|0))|0); - $643 = tempRet0; - $644 = $56; - $645 = $644; - $646 = HEAP32[$645>>2]|0; - $647 = (($644) + 4)|0; - $648 = $647; - $649 = HEAP32[$648>>2]|0; - $650 = (_bitshift64Ashr(0,($646|0),32)|0); - $651 = tempRet0; - $652 = $444; - $653 = $652; - $654 = HEAP32[$653>>2]|0; - $655 = (($652) + 4)|0; - $656 = $655; - $657 = HEAP32[$656>>2]|0; - $658 = (_bitshift64Ashr(0,($654|0),32)|0); - $659 = tempRet0; - $660 = (___muldi3(($658|0),($659|0),($650|0),($651|0))|0); - $661 = tempRet0; - $662 = (_i64Add(($642|0),($643|0),($660|0),($661|0))|0); - $663 = tempRet0; - $664 = $102; - $665 = $664; - $666 = HEAP32[$665>>2]|0; - $667 = (($664) + 4)|0; - $668 = $667; - $669 = HEAP32[$668>>2]|0; - $670 = (_bitshift64Ashr(0,($666|0),32)|0); - $671 = tempRet0; - $672 = $388; - $673 = $672; - $674 = HEAP32[$673>>2]|0; - $675 = (($672) + 4)|0; - $676 = $675; - $677 = HEAP32[$676>>2]|0; - $678 = (_bitshift64Ashr(0,($674|0),32)|0); - $679 = tempRet0; - $680 = (___muldi3(($678|0),($679|0),($670|0),($671|0))|0); - $681 = tempRet0; - $682 = $22; - $683 = $682; - $684 = HEAP32[$683>>2]|0; - $685 = (($682) + 4)|0; - $686 = $685; - $687 = HEAP32[$686>>2]|0; - $688 = (_bitshift64Ashr(0,($684|0),32)|0); - $689 = tempRet0; - $690 = $594; - $691 = $690; - $692 = HEAP32[$691>>2]|0; - $693 = (($690) + 4)|0; - $694 = $693; - $695 = HEAP32[$694>>2]|0; - $696 = (_bitshift64Ashr(0,($692|0),32)|0); - $697 = tempRet0; - $698 = (___muldi3(($696|0),($697|0),($688|0),($689|0))|0); - $699 = tempRet0; - $700 = (_i64Add(($698|0),($699|0),($680|0),($681|0))|0); - $701 = tempRet0; - $702 = (_bitshift64Shl(($700|0),($701|0),1)|0); - $703 = tempRet0; - $704 = (_i64Add(($662|0),($663|0),($702|0),($703|0))|0); - $705 = tempRet0; - $706 = (_bitshift64Shl(($704|0),($705|0),1)|0); - $707 = tempRet0; - $708 = (($output) + 80|0); - $709 = $708; - $710 = $709; - HEAP32[$710>>2] = $706; - $711 = (($709) + 4)|0; - $712 = $711; - HEAP32[$712>>2] = $707; - $713 = $224; - $714 = $713; - $715 = HEAP32[$714>>2]|0; - $716 = (($713) + 4)|0; - $717 = $716; - $718 = HEAP32[$717>>2]|0; - $719 = (_bitshift64Ashr(0,($715|0),32)|0); - $720 = tempRet0; - $721 = $282; - $722 = $721; - $723 = HEAP32[$722>>2]|0; - $724 = (($721) + 4)|0; - $725 = $724; - $726 = HEAP32[$725>>2]|0; - $727 = (_bitshift64Ashr(0,($723|0),32)|0); - $728 = tempRet0; - $729 = (___muldi3(($727|0),($728|0),($719|0),($720|0))|0); - $730 = tempRet0; - $731 = $160; - $732 = $731; - $733 = HEAP32[$732>>2]|0; - $734 = (($731) + 4)|0; - $735 = $734; - $736 = HEAP32[$735>>2]|0; - $737 = (_bitshift64Ashr(0,($733|0),32)|0); - $738 = tempRet0; - $739 = $388; - $740 = $739; - $741 = HEAP32[$740>>2]|0; - $742 = (($739) + 4)|0; - $743 = $742; - $744 = HEAP32[$743>>2]|0; - $745 = (_bitshift64Ashr(0,($741|0),32)|0); - $746 = tempRet0; - $747 = (___muldi3(($745|0),($746|0),($737|0),($738|0))|0); - $748 = tempRet0; - $749 = (_i64Add(($747|0),($748|0),($729|0),($730|0))|0); - $750 = tempRet0; - $751 = $102; - $752 = $751; - $753 = HEAP32[$752>>2]|0; - $754 = (($751) + 4)|0; - $755 = $754; - $756 = HEAP32[$755>>2]|0; - $757 = (_bitshift64Ashr(0,($753|0),32)|0); - $758 = tempRet0; - $759 = $444; - $760 = $759; - $761 = HEAP32[$760>>2]|0; - $762 = (($759) + 4)|0; - $763 = $762; - $764 = HEAP32[$763>>2]|0; - $765 = (_bitshift64Ashr(0,($761|0),32)|0); - $766 = tempRet0; - $767 = (___muldi3(($765|0),($766|0),($757|0),($758|0))|0); - $768 = tempRet0; - $769 = (_i64Add(($749|0),($750|0),($767|0),($768|0))|0); - $770 = tempRet0; - $771 = $56; - $772 = $771; - $773 = HEAP32[$772>>2]|0; - $774 = (($771) + 4)|0; - $775 = $774; - $776 = HEAP32[$775>>2]|0; - $777 = (_bitshift64Ashr(0,($773|0),32)|0); - $778 = tempRet0; - $779 = $594; - $780 = $779; - $781 = HEAP32[$780>>2]|0; - $782 = (($779) + 4)|0; - $783 = $782; - $784 = HEAP32[$783>>2]|0; - $785 = (_bitshift64Ashr(0,($781|0),32)|0); - $786 = tempRet0; - $787 = (___muldi3(($785|0),($786|0),($777|0),($778|0))|0); - $788 = tempRet0; - $789 = (_i64Add(($769|0),($770|0),($787|0),($788|0))|0); - $790 = tempRet0; - $791 = (_bitshift64Shl(($789|0),($790|0),1)|0); - $792 = tempRet0; - $793 = (($output) + 88|0); - $794 = $793; - $795 = $794; - HEAP32[$795>>2] = $791; - $796 = (($794) + 4)|0; - $797 = $796; - HEAP32[$797>>2] = $792; - $798 = $282; - $799 = $798; - $800 = HEAP32[$799>>2]|0; - $801 = (($798) + 4)|0; - $802 = $801; - $803 = HEAP32[$802>>2]|0; - $804 = (_bitshift64Ashr(0,($800|0),32)|0); - $805 = tempRet0; - $806 = (___muldi3(($804|0),($805|0),($804|0),($805|0))|0); - $807 = tempRet0; - $808 = $160; - $809 = $808; - $810 = HEAP32[$809>>2]|0; - $811 = (($808) + 4)|0; - $812 = $811; - $813 = HEAP32[$812>>2]|0; - $814 = (_bitshift64Ashr(0,($810|0),32)|0); - $815 = tempRet0; - $816 = $444; - $817 = $816; - $818 = HEAP32[$817>>2]|0; - $819 = (($816) + 4)|0; - $820 = $819; - $821 = HEAP32[$820>>2]|0; - $822 = (_bitshift64Ashr(0,($818|0),32)|0); - $823 = tempRet0; - $824 = (___muldi3(($822|0),($823|0),($814|0),($815|0))|0); - $825 = tempRet0; - $826 = $224; - $827 = $826; - $828 = HEAP32[$827>>2]|0; - $829 = (($826) + 4)|0; - $830 = $829; - $831 = HEAP32[$830>>2]|0; - $832 = (_bitshift64Ashr(0,($828|0),32)|0); - $833 = tempRet0; - $834 = $388; - $835 = $834; - $836 = HEAP32[$835>>2]|0; - $837 = (($834) + 4)|0; - $838 = $837; - $839 = HEAP32[$838>>2]|0; - $840 = (_bitshift64Ashr(0,($836|0),32)|0); - $841 = tempRet0; - $842 = (___muldi3(($840|0),($841|0),($832|0),($833|0))|0); - $843 = tempRet0; - $844 = $102; - $845 = $844; - $846 = HEAP32[$845>>2]|0; - $847 = (($844) + 4)|0; - $848 = $847; - $849 = HEAP32[$848>>2]|0; - $850 = (_bitshift64Ashr(0,($846|0),32)|0); - $851 = tempRet0; - $852 = $594; - $853 = $852; - $854 = HEAP32[$853>>2]|0; - $855 = (($852) + 4)|0; - $856 = $855; - $857 = HEAP32[$856>>2]|0; - $858 = (_bitshift64Ashr(0,($854|0),32)|0); - $859 = tempRet0; - $860 = (___muldi3(($858|0),($859|0),($850|0),($851|0))|0); - $861 = tempRet0; - $862 = (_i64Add(($860|0),($861|0),($842|0),($843|0))|0); - $863 = tempRet0; - $864 = (_bitshift64Shl(($862|0),($863|0),1)|0); - $865 = tempRet0; - $866 = (_i64Add(($864|0),($865|0),($824|0),($825|0))|0); - $867 = tempRet0; - $868 = (_bitshift64Shl(($866|0),($867|0),1)|0); - $869 = tempRet0; - $870 = (_i64Add(($868|0),($869|0),($806|0),($807|0))|0); - $871 = tempRet0; - $872 = (($output) + 96|0); - $873 = $872; - $874 = $873; - HEAP32[$874>>2] = $870; - $875 = (($873) + 4)|0; - $876 = $875; - HEAP32[$876>>2] = $871; - $877 = $282; - $878 = $877; - $879 = HEAP32[$878>>2]|0; - $880 = (($877) + 4)|0; - $881 = $880; - $882 = HEAP32[$881>>2]|0; - $883 = (_bitshift64Ashr(0,($879|0),32)|0); - $884 = tempRet0; - $885 = $388; - $886 = $885; - $887 = HEAP32[$886>>2]|0; - $888 = (($885) + 4)|0; - $889 = $888; - $890 = HEAP32[$889>>2]|0; - $891 = (_bitshift64Ashr(0,($887|0),32)|0); - $892 = tempRet0; - $893 = (___muldi3(($891|0),($892|0),($883|0),($884|0))|0); - $894 = tempRet0; - $895 = $224; - $896 = $895; - $897 = HEAP32[$896>>2]|0; - $898 = (($895) + 4)|0; - $899 = $898; - $900 = HEAP32[$899>>2]|0; - $901 = (_bitshift64Ashr(0,($897|0),32)|0); - $902 = tempRet0; - $903 = $444; - $904 = $903; - $905 = HEAP32[$904>>2]|0; - $906 = (($903) + 4)|0; - $907 = $906; - $908 = HEAP32[$907>>2]|0; - $909 = (_bitshift64Ashr(0,($905|0),32)|0); - $910 = tempRet0; - $911 = (___muldi3(($909|0),($910|0),($901|0),($902|0))|0); - $912 = tempRet0; - $913 = (_i64Add(($911|0),($912|0),($893|0),($894|0))|0); - $914 = tempRet0; - $915 = $160; - $916 = $915; - $917 = HEAP32[$916>>2]|0; - $918 = (($915) + 4)|0; - $919 = $918; - $920 = HEAP32[$919>>2]|0; - $921 = (_bitshift64Ashr(0,($917|0),32)|0); - $922 = tempRet0; - $923 = $594; - $924 = $923; - $925 = HEAP32[$924>>2]|0; - $926 = (($923) + 4)|0; - $927 = $926; - $928 = HEAP32[$927>>2]|0; - $929 = (_bitshift64Ashr(0,($925|0),32)|0); - $930 = tempRet0; - $931 = (___muldi3(($929|0),($930|0),($921|0),($922|0))|0); - $932 = tempRet0; - $933 = (_i64Add(($913|0),($914|0),($931|0),($932|0))|0); - $934 = tempRet0; - $935 = (_bitshift64Shl(($933|0),($934|0),1)|0); - $936 = tempRet0; - $937 = (($output) + 104|0); - $938 = $937; - $939 = $938; - HEAP32[$939>>2] = $935; - $940 = (($938) + 4)|0; - $941 = $940; - HEAP32[$941>>2] = $936; - $942 = $388; - $943 = $942; - $944 = HEAP32[$943>>2]|0; - $945 = (($942) + 4)|0; - $946 = $945; - $947 = HEAP32[$946>>2]|0; - $948 = (_bitshift64Ashr(0,($944|0),32)|0); - $949 = tempRet0; - $950 = (___muldi3(($948|0),($949|0),($948|0),($949|0))|0); - $951 = tempRet0; - $952 = $282; - $953 = $952; - $954 = HEAP32[$953>>2]|0; - $955 = (($952) + 4)|0; - $956 = $955; - $957 = HEAP32[$956>>2]|0; - $958 = (_bitshift64Ashr(0,($954|0),32)|0); - $959 = tempRet0; - $960 = $444; - $961 = $960; - $962 = HEAP32[$961>>2]|0; - $963 = (($960) + 4)|0; - $964 = $963; - $965 = HEAP32[$964>>2]|0; - $966 = (_bitshift64Ashr(0,($962|0),32)|0); - $967 = tempRet0; - $968 = (___muldi3(($966|0),($967|0),($958|0),($959|0))|0); - $969 = tempRet0; - $970 = (_i64Add(($968|0),($969|0),($950|0),($951|0))|0); - $971 = tempRet0; - $972 = $224; - $973 = $972; - $974 = HEAP32[$973>>2]|0; - $975 = (($972) + 4)|0; - $976 = $975; - $977 = HEAP32[$976>>2]|0; - $978 = (_bitshift64Ashr(0,($974|0),31)|0); - $979 = tempRet0; - $980 = $594; - $981 = $980; - $982 = HEAP32[$981>>2]|0; - $983 = (($980) + 4)|0; - $984 = $983; - $985 = HEAP32[$984>>2]|0; - $986 = (_bitshift64Ashr(0,($982|0),32)|0); - $987 = tempRet0; - $988 = (___muldi3(($986|0),($987|0),($978|0),($979|0))|0); - $989 = tempRet0; - $990 = (_i64Add(($970|0),($971|0),($988|0),($989|0))|0); - $991 = tempRet0; - $992 = (_bitshift64Shl(($990|0),($991|0),1)|0); - $993 = tempRet0; - $994 = (($output) + 112|0); - $995 = $994; - $996 = $995; - HEAP32[$996>>2] = $992; - $997 = (($995) + 4)|0; - $998 = $997; - HEAP32[$998>>2] = $993; - $999 = $388; - $1000 = $999; - $1001 = HEAP32[$1000>>2]|0; - $1002 = (($999) + 4)|0; - $1003 = $1002; - $1004 = HEAP32[$1003>>2]|0; - $1005 = (_bitshift64Ashr(0,($1001|0),32)|0); - $1006 = tempRet0; - $1007 = $444; - $1008 = $1007; - $1009 = HEAP32[$1008>>2]|0; - $1010 = (($1007) + 4)|0; - $1011 = $1010; - $1012 = HEAP32[$1011>>2]|0; - $1013 = (_bitshift64Ashr(0,($1009|0),32)|0); - $1014 = tempRet0; - $1015 = (___muldi3(($1013|0),($1014|0),($1005|0),($1006|0))|0); - $1016 = tempRet0; - $1017 = $282; - $1018 = $1017; - $1019 = HEAP32[$1018>>2]|0; - $1020 = (($1017) + 4)|0; - $1021 = $1020; - $1022 = HEAP32[$1021>>2]|0; - $1023 = (_bitshift64Ashr(0,($1019|0),32)|0); - $1024 = tempRet0; - $1025 = $594; - $1026 = $1025; - $1027 = HEAP32[$1026>>2]|0; - $1028 = (($1025) + 4)|0; - $1029 = $1028; - $1030 = HEAP32[$1029>>2]|0; - $1031 = (_bitshift64Ashr(0,($1027|0),32)|0); - $1032 = tempRet0; - $1033 = (___muldi3(($1031|0),($1032|0),($1023|0),($1024|0))|0); - $1034 = tempRet0; - $1035 = (_i64Add(($1033|0),($1034|0),($1015|0),($1016|0))|0); - $1036 = tempRet0; - $1037 = (_bitshift64Shl(($1035|0),($1036|0),1)|0); - $1038 = tempRet0; - $1039 = (($output) + 120|0); - $1040 = $1039; - $1041 = $1040; - HEAP32[$1041>>2] = $1037; - $1042 = (($1040) + 4)|0; - $1043 = $1042; - HEAP32[$1043>>2] = $1038; - $1044 = $444; - $1045 = $1044; - $1046 = HEAP32[$1045>>2]|0; - $1047 = (($1044) + 4)|0; - $1048 = $1047; - $1049 = HEAP32[$1048>>2]|0; - $1050 = (_bitshift64Ashr(0,($1046|0),32)|0); - $1051 = tempRet0; - $1052 = (___muldi3(($1050|0),($1051|0),($1050|0),($1051|0))|0); - $1053 = tempRet0; - $1054 = $388; - $1055 = $1054; - $1056 = HEAP32[$1055>>2]|0; - $1057 = (($1054) + 4)|0; - $1058 = $1057; - $1059 = HEAP32[$1058>>2]|0; - $1060 = (_bitshift64Ashr(0,($1056|0),30)|0); - $1061 = tempRet0; - $1062 = $594; - $1063 = $1062; - $1064 = HEAP32[$1063>>2]|0; - $1065 = (($1062) + 4)|0; - $1066 = $1065; - $1067 = HEAP32[$1066>>2]|0; - $1068 = (_bitshift64Ashr(0,($1064|0),32)|0); - $1069 = tempRet0; - $1070 = (___muldi3(($1068|0),($1069|0),($1060|0),($1061|0))|0); - $1071 = tempRet0; - $1072 = (_i64Add(($1070|0),($1071|0),($1052|0),($1053|0))|0); - $1073 = tempRet0; - $1074 = (($output) + 128|0); - $1075 = $1074; - $1076 = $1075; - HEAP32[$1076>>2] = $1072; - $1077 = (($1075) + 4)|0; - $1078 = $1077; - HEAP32[$1078>>2] = $1073; - $1079 = $444; - $1080 = $1079; - $1081 = HEAP32[$1080>>2]|0; - $1082 = (($1079) + 4)|0; - $1083 = $1082; - $1084 = HEAP32[$1083>>2]|0; - $1085 = (_bitshift64Ashr(0,($1081|0),31)|0); - $1086 = tempRet0; - $1087 = $594; - $1088 = $1087; - $1089 = HEAP32[$1088>>2]|0; - $1090 = (($1087) + 4)|0; - $1091 = $1090; - $1092 = HEAP32[$1091>>2]|0; - $1093 = (_bitshift64Ashr(0,($1089|0),32)|0); - $1094 = tempRet0; - $1095 = (___muldi3(($1093|0),($1094|0),($1085|0),($1086|0))|0); - $1096 = tempRet0; - $1097 = (($output) + 136|0); - $1098 = $1097; - $1099 = $1098; - HEAP32[$1099>>2] = $1095; - $1100 = (($1098) + 4)|0; - $1101 = $1100; - HEAP32[$1101>>2] = $1096; - $1102 = $594; - $1103 = $1102; - $1104 = HEAP32[$1103>>2]|0; - $1105 = (($1102) + 4)|0; - $1106 = $1105; - $1107 = HEAP32[$1106>>2]|0; - $1108 = (_bitshift64Ashr(0,($1104|0),32)|0); - $1109 = tempRet0; - $1110 = (_bitshift64Ashr(0,($1104|0),31)|0); - $1111 = tempRet0; - $1112 = (___muldi3(($1110|0),($1111|0),($1108|0),($1109|0))|0); - $1113 = tempRet0; - $1114 = (($output) + 144|0); - $1115 = $1114; - $1116 = $1115; - HEAP32[$1116>>2] = $1112; - $1117 = (($1115) + 4)|0; - $1118 = $1117; - HEAP32[$1118>>2] = $1113; - STACKTOP = sp;return; -} -function _div_by_2_26($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = $1 >> 31; - $3 = $2 >>> 6; - $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); - $5 = tempRet0; - $6 = (_bitshift64Ashr(($4|0),($5|0),26)|0); - $7 = tempRet0; - tempRet0 = $7; - STACKTOP = sp;return ($6|0); -} -function _div_by_2_25($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = $1 >> 31; - $3 = $2 >>> 7; - $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); - $5 = tempRet0; - $6 = (_bitshift64Ashr(($4|0),($5|0),25)|0); - $7 = tempRet0; - tempRet0 = $7; - STACKTOP = sp;return ($6|0); -} -function _crypto_sign_ed25519_ref10_fe_0($h) { - $h = $h|0; - var dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - dest=$h+0|0; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_1($h) { - $h = $h|0; - var $0 = 0, dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - HEAP32[$h>>2] = 1; - $0 = (($h) + 4|0); - dest=$0+0|0; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_add($h,$f,$g) { - $h = $h|0; - $f = $f|0; - $g = $g|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); - $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); - $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); - $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); - $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); - $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); - $37 = HEAP32[$36>>2]|0; - $38 = (($19) + ($0))|0; - $39 = (($21) + ($2))|0; - $40 = (($23) + ($4))|0; - $41 = (($25) + ($6))|0; - $42 = (($27) + ($8))|0; - $43 = (($29) + ($10))|0; - $44 = (($31) + ($12))|0; - $45 = (($33) + ($14))|0; - $46 = (($35) + ($16))|0; - $47 = (($37) + ($18))|0; - HEAP32[$h>>2] = $38; - $48 = (($h) + 4|0); - HEAP32[$48>>2] = $39; - $49 = (($h) + 8|0); - HEAP32[$49>>2] = $40; - $50 = (($h) + 12|0); - HEAP32[$50>>2] = $41; - $51 = (($h) + 16|0); - HEAP32[$51>>2] = $42; - $52 = (($h) + 20|0); - HEAP32[$52>>2] = $43; - $53 = (($h) + 24|0); - HEAP32[$53>>2] = $44; - $54 = (($h) + 28|0); - HEAP32[$54>>2] = $45; - $55 = (($h) + 32|0); - HEAP32[$55>>2] = $46; - $56 = (($h) + 36|0); - HEAP32[$56>>2] = $47; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_cmov($f,$g,$b) { - $f = $f|0; - $g = $g|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; - var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); - $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); - $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); - $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); - $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); - $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); - $37 = HEAP32[$36>>2]|0; - $38 = $19 ^ $0; - $39 = $21 ^ $2; - $40 = $23 ^ $4; - $41 = $25 ^ $6; - $42 = $27 ^ $8; - $43 = $29 ^ $10; - $44 = $31 ^ $12; - $45 = $33 ^ $14; - $46 = $35 ^ $16; - $47 = $37 ^ $18; - $48 = (0 - ($b))|0; - $49 = $38 & $48; - $50 = $39 & $48; - $51 = $40 & $48; - $52 = $41 & $48; - $53 = $42 & $48; - $54 = $43 & $48; - $55 = $44 & $48; - $56 = $45 & $48; - $57 = $46 & $48; - $58 = $47 & $48; - $59 = $49 ^ $0; - HEAP32[$f>>2] = $59; - $60 = $50 ^ $2; - HEAP32[$1>>2] = $60; - $61 = $51 ^ $4; - HEAP32[$3>>2] = $61; - $62 = $52 ^ $6; - HEAP32[$5>>2] = $62; - $63 = $53 ^ $8; - HEAP32[$7>>2] = $63; - $64 = $54 ^ $10; - HEAP32[$9>>2] = $64; - $65 = $55 ^ $12; - HEAP32[$11>>2] = $65; - $66 = $56 ^ $14; - HEAP32[$13>>2] = $66; - $67 = $57 ^ $16; - HEAP32[$15>>2] = $67; - $68 = $58 ^ $18; - HEAP32[$17>>2] = $68; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_copy($h,$f) { - $h = $h|0; - $f = $f|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - HEAP32[$h>>2] = $0; - $19 = (($h) + 4|0); - HEAP32[$19>>2] = $2; - $20 = (($h) + 8|0); - HEAP32[$20>>2] = $4; - $21 = (($h) + 12|0); - HEAP32[$21>>2] = $6; - $22 = (($h) + 16|0); - HEAP32[$22>>2] = $8; - $23 = (($h) + 20|0); - HEAP32[$23>>2] = $10; - $24 = (($h) + 24|0); - HEAP32[$24>>2] = $12; - $25 = (($h) + 28|0); - HEAP32[$25>>2] = $14; - $26 = (($h) + 32|0); - HEAP32[$26>>2] = $16; - $27 = (($h) + 36|0); - HEAP32[$27>>2] = $18; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_frombytes($h,$s) { - $h = $h|0; - $s = $s|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; - var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; - var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; - var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; - var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_load_4($s)|0); - $1 = tempRet0; - $2 = (($s) + 4|0); - $3 = (_load_3($2)|0); - $4 = tempRet0; - $5 = (_bitshift64Shl(($3|0),($4|0),6)|0); - $6 = tempRet0; - $7 = (($s) + 7|0); - $8 = (_load_3($7)|0); - $9 = tempRet0; - $10 = (_bitshift64Shl(($8|0),($9|0),5)|0); - $11 = tempRet0; - $12 = (($s) + 10|0); - $13 = (_load_3($12)|0); - $14 = tempRet0; - $15 = (_bitshift64Shl(($13|0),($14|0),3)|0); - $16 = tempRet0; - $17 = (($s) + 13|0); - $18 = (_load_3($17)|0); - $19 = tempRet0; - $20 = (_bitshift64Shl(($18|0),($19|0),2)|0); - $21 = tempRet0; - $22 = (($s) + 16|0); - $23 = (_load_4($22)|0); - $24 = tempRet0; - $25 = (($s) + 20|0); - $26 = (_load_3($25)|0); - $27 = tempRet0; - $28 = (_bitshift64Shl(($26|0),($27|0),7)|0); - $29 = tempRet0; - $30 = (($s) + 23|0); - $31 = (_load_3($30)|0); - $32 = tempRet0; - $33 = (_bitshift64Shl(($31|0),($32|0),5)|0); - $34 = tempRet0; - $35 = (($s) + 26|0); - $36 = (_load_3($35)|0); - $37 = tempRet0; - $38 = (_bitshift64Shl(($36|0),($37|0),4)|0); - $39 = tempRet0; - $40 = (($s) + 29|0); - $41 = (_load_3($40)|0); - $42 = tempRet0; - $43 = (_bitshift64Shl(($41|0),($42|0),2)|0); - $44 = tempRet0; - $45 = $43 & 33554428; - $46 = (_i64Add(($45|0),0,16777216,0)|0); - $47 = tempRet0; - $48 = (_bitshift64Lshr(($46|0),($47|0),25)|0); - $49 = tempRet0; - $50 = (___muldi3(($48|0),($49|0),19,0)|0); - $51 = tempRet0; - $52 = (_i64Add(($50|0),($51|0),($0|0),($1|0))|0); - $53 = tempRet0; - $54 = (_bitshift64Shl(($48|0),($49|0),25)|0); - $55 = tempRet0; - $56 = (_i64Add(($5|0),($6|0),16777216,0)|0); - $57 = tempRet0; - $58 = (_bitshift64Ashr(($56|0),($57|0),25)|0); - $59 = tempRet0; - $60 = (_i64Add(($58|0),($59|0),($10|0),($11|0))|0); - $61 = tempRet0; - $62 = (_bitshift64Shl(($58|0),($59|0),25)|0); - $63 = tempRet0; - $64 = (_i64Subtract(($5|0),($6|0),($62|0),($63|0))|0); - $65 = tempRet0; - $66 = (_i64Add(($15|0),($16|0),16777216,0)|0); - $67 = tempRet0; - $68 = (_bitshift64Ashr(($66|0),($67|0),25)|0); - $69 = tempRet0; - $70 = (_i64Add(($68|0),($69|0),($20|0),($21|0))|0); - $71 = tempRet0; - $72 = (_bitshift64Shl(($68|0),($69|0),25)|0); - $73 = tempRet0; - $74 = (_i64Subtract(($15|0),($16|0),($72|0),($73|0))|0); - $75 = tempRet0; - $76 = (_i64Add(($23|0),($24|0),16777216,0)|0); - $77 = tempRet0; - $78 = (_bitshift64Ashr(($76|0),($77|0),25)|0); - $79 = tempRet0; - $80 = (_i64Add(($28|0),($29|0),($78|0),($79|0))|0); - $81 = tempRet0; - $82 = (_bitshift64Shl(($78|0),($79|0),25)|0); - $83 = tempRet0; - $84 = (_i64Subtract(($23|0),($24|0),($82|0),($83|0))|0); - $85 = tempRet0; - $86 = (_i64Add(($33|0),($34|0),16777216,0)|0); - $87 = tempRet0; - $88 = (_bitshift64Ashr(($86|0),($87|0),25)|0); - $89 = tempRet0; - $90 = (_i64Add(($88|0),($89|0),($38|0),($39|0))|0); - $91 = tempRet0; - $92 = (_bitshift64Shl(($88|0),($89|0),25)|0); - $93 = tempRet0; - $94 = (_i64Add(($52|0),($53|0),33554432,0)|0); - $95 = tempRet0; - $96 = (_bitshift64Ashr(($94|0),($95|0),26)|0); - $97 = tempRet0; - $98 = (_i64Add(($64|0),($65|0),($96|0),($97|0))|0); - $99 = tempRet0; - $100 = (_bitshift64Shl(($96|0),($97|0),26)|0); - $101 = tempRet0; - $102 = (_i64Subtract(($52|0),($53|0),($100|0),($101|0))|0); - $103 = tempRet0; - $104 = (_i64Add(($60|0),($61|0),33554432,0)|0); - $105 = tempRet0; - $106 = (_bitshift64Ashr(($104|0),($105|0),26)|0); - $107 = tempRet0; - $108 = (_i64Add(($74|0),($75|0),($106|0),($107|0))|0); - $109 = tempRet0; - $110 = (_bitshift64Shl(($106|0),($107|0),26)|0); - $111 = tempRet0; - $112 = (_i64Subtract(($60|0),($61|0),($110|0),($111|0))|0); - $113 = tempRet0; - $114 = (_i64Add(($70|0),($71|0),33554432,0)|0); - $115 = tempRet0; - $116 = (_bitshift64Ashr(($114|0),($115|0),26)|0); - $117 = tempRet0; - $118 = (_i64Add(($84|0),($85|0),($116|0),($117|0))|0); - $119 = tempRet0; - $120 = (_bitshift64Shl(($116|0),($117|0),26)|0); - $121 = tempRet0; - $122 = (_i64Subtract(($70|0),($71|0),($120|0),($121|0))|0); - $123 = tempRet0; - $124 = (_i64Add(($80|0),($81|0),33554432,0)|0); - $125 = tempRet0; - $126 = (_bitshift64Ashr(($124|0),($125|0),26)|0); - $127 = tempRet0; - $128 = (_i64Add(($126|0),($127|0),($33|0),($34|0))|0); - $129 = tempRet0; - $130 = (_i64Subtract(($128|0),($129|0),($92|0),($93|0))|0); - $131 = tempRet0; - $132 = (_bitshift64Shl(($126|0),($127|0),26)|0); - $133 = tempRet0; - $134 = (_i64Subtract(($80|0),($81|0),($132|0),($133|0))|0); - $135 = tempRet0; - $136 = (_i64Add(($90|0),($91|0),33554432,0)|0); - $137 = tempRet0; - $138 = (_bitshift64Ashr(($136|0),($137|0),26)|0); - $139 = tempRet0; - $140 = (_i64Add(($138|0),($139|0),($45|0),0)|0); - $141 = tempRet0; - $142 = (_i64Subtract(($140|0),($141|0),($54|0),($55|0))|0); - $143 = tempRet0; - $144 = (_bitshift64Shl(($138|0),($139|0),26)|0); - $145 = tempRet0; - $146 = (_i64Subtract(($90|0),($91|0),($144|0),($145|0))|0); - $147 = tempRet0; - HEAP32[$h>>2] = $102; - $148 = (($h) + 4|0); - HEAP32[$148>>2] = $98; - $149 = (($h) + 8|0); - HEAP32[$149>>2] = $112; - $150 = (($h) + 12|0); - HEAP32[$150>>2] = $108; - $151 = (($h) + 16|0); - HEAP32[$151>>2] = $122; - $152 = (($h) + 20|0); - HEAP32[$152>>2] = $118; - $153 = (($h) + 24|0); - HEAP32[$153>>2] = $134; - $154 = (($h) + 28|0); - HEAP32[$154>>2] = $130; - $155 = (($h) + 32|0); - HEAP32[$155>>2] = $146; - $156 = (($h) + 36|0); - HEAP32[$156>>2] = $142; - STACKTOP = sp;return; -} -function _load_4($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - $15 = (($in) + 3|0); - $16 = HEAP8[$15>>0]|0; - $17 = $16&255; - $18 = (_bitshift64Shl(($17|0),0,24)|0); - $19 = tempRet0; - $20 = $13 | $18; - $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); -} -function _load_3($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); -} -function _crypto_sign_ed25519_ref10_fe_invert($out,$z) { - $out = $out|0; - $z = $z|0; - var $0 = 0, $1 = 0, $2 = 0, $exitcond = 0, $exitcond10 = 0, $exitcond11 = 0, $i$74 = 0, $i$83 = 0, $i$92 = 0, $t0 = 0, $t1 = 0, $t2 = 0, $t3 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 160|0; - $t0 = sp + 120|0; - $t1 = sp + 80|0; - $t2 = sp + 40|0; - $t3 = sp; - _crypto_sign_ed25519_ref10_fe_sq($t0,$z); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t1,$z,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t0,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t0); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t1,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_mul($t2,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_mul($t2,$t3,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - $i$74 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - $0 = (($i$74) + 1)|0; - $exitcond11 = ($0|0)==(50); - if ($exitcond11) { - break; - } else { - $i$74 = $0; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t2,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t2); - $i$83 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - $1 = (($i$83) + 1)|0; - $exitcond10 = ($1|0)==(100); - if ($exitcond10) { - break; - } else { - $i$83 = $1; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t2,$t3,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - $i$92 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - $2 = (($i$92) + 1)|0; - $exitcond = ($2|0)==(50); - if ($exitcond) { - break; - } else { - $i$92 = $2; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($out,$t1,$t0); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_isnegative($f) { - $f = $f|0; - var $0 = 0, $1 = 0, $2 = 0, $s = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; - $s = sp; - _crypto_sign_ed25519_ref10_fe_tobytes($s,$f); - $0 = HEAP8[$s>>0]|0; - $1 = $0&255; - $2 = $1 & 1; - STACKTOP = sp;return ($2|0); -} -function _crypto_sign_ed25519_ref10_fe_isnonzero($f) { - $f = $f|0; - var $0 = 0, $s = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; - $s = sp; - _crypto_sign_ed25519_ref10_fe_tobytes($s,$f); - $0 = (_crypto_verify_32_ref($s,8)|0); - STACKTOP = sp;return ($0|0); -} -function _crypto_sign_ed25519_ref10_fe_mul($h,$f,$g) { - $h = $h|0; - $f = $f|0; - $g = $g|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; - var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; - var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; - var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; - var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; - var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; - var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; - var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; - var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0; - var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0; - var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0; - var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0; - var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0; - var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0; - var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0; - var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0; - var $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0; - var $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0; - var $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0; - var $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; - var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; - var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); - $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); - $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); - $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); - $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); - $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); - $37 = HEAP32[$36>>2]|0; - $38 = ($21*19)|0; - $39 = ($23*19)|0; - $40 = ($25*19)|0; - $41 = ($27*19)|0; - $42 = ($29*19)|0; - $43 = ($31*19)|0; - $44 = ($33*19)|0; - $45 = ($35*19)|0; - $46 = ($37*19)|0; - $47 = $2 << 1; - $48 = $6 << 1; - $49 = $10 << 1; - $50 = $14 << 1; - $51 = $18 << 1; - $52 = ($0|0)<(0); - $53 = $52 << 31 >> 31; - $54 = ($19|0)<(0); - $55 = $54 << 31 >> 31; - $56 = (___muldi3(($19|0),($55|0),($0|0),($53|0))|0); - $57 = tempRet0; - $58 = ($21|0)<(0); - $59 = $58 << 31 >> 31; - $60 = (___muldi3(($21|0),($59|0),($0|0),($53|0))|0); - $61 = tempRet0; - $62 = ($23|0)<(0); - $63 = $62 << 31 >> 31; - $64 = (___muldi3(($23|0),($63|0),($0|0),($53|0))|0); - $65 = tempRet0; - $66 = ($25|0)<(0); - $67 = $66 << 31 >> 31; - $68 = (___muldi3(($25|0),($67|0),($0|0),($53|0))|0); - $69 = tempRet0; - $70 = ($27|0)<(0); - $71 = $70 << 31 >> 31; - $72 = (___muldi3(($27|0),($71|0),($0|0),($53|0))|0); - $73 = tempRet0; - $74 = ($29|0)<(0); - $75 = $74 << 31 >> 31; - $76 = (___muldi3(($29|0),($75|0),($0|0),($53|0))|0); - $77 = tempRet0; - $78 = ($31|0)<(0); - $79 = $78 << 31 >> 31; - $80 = (___muldi3(($31|0),($79|0),($0|0),($53|0))|0); - $81 = tempRet0; - $82 = ($33|0)<(0); - $83 = $82 << 31 >> 31; - $84 = (___muldi3(($33|0),($83|0),($0|0),($53|0))|0); - $85 = tempRet0; - $86 = ($35|0)<(0); - $87 = $86 << 31 >> 31; - $88 = (___muldi3(($35|0),($87|0),($0|0),($53|0))|0); - $89 = tempRet0; - $90 = ($37|0)<(0); - $91 = $90 << 31 >> 31; - $92 = (___muldi3(($37|0),($91|0),($0|0),($53|0))|0); - $93 = tempRet0; - $94 = ($2|0)<(0); - $95 = $94 << 31 >> 31; - $96 = (___muldi3(($19|0),($55|0),($2|0),($95|0))|0); - $97 = tempRet0; - $98 = ($47|0)<(0); - $99 = $98 << 31 >> 31; - $100 = (___muldi3(($21|0),($59|0),($47|0),($99|0))|0); - $101 = tempRet0; - $102 = (___muldi3(($23|0),($63|0),($2|0),($95|0))|0); - $103 = tempRet0; - $104 = (___muldi3(($25|0),($67|0),($47|0),($99|0))|0); - $105 = tempRet0; - $106 = (___muldi3(($27|0),($71|0),($2|0),($95|0))|0); - $107 = tempRet0; - $108 = (___muldi3(($29|0),($75|0),($47|0),($99|0))|0); - $109 = tempRet0; - $110 = (___muldi3(($31|0),($79|0),($2|0),($95|0))|0); - $111 = tempRet0; - $112 = (___muldi3(($33|0),($83|0),($47|0),($99|0))|0); - $113 = tempRet0; - $114 = (___muldi3(($35|0),($87|0),($2|0),($95|0))|0); - $115 = tempRet0; - $116 = ($46|0)<(0); - $117 = $116 << 31 >> 31; - $118 = (___muldi3(($46|0),($117|0),($47|0),($99|0))|0); - $119 = tempRet0; - $120 = ($4|0)<(0); - $121 = $120 << 31 >> 31; - $122 = (___muldi3(($19|0),($55|0),($4|0),($121|0))|0); - $123 = tempRet0; - $124 = (___muldi3(($21|0),($59|0),($4|0),($121|0))|0); - $125 = tempRet0; - $126 = (___muldi3(($23|0),($63|0),($4|0),($121|0))|0); - $127 = tempRet0; - $128 = (___muldi3(($25|0),($67|0),($4|0),($121|0))|0); - $129 = tempRet0; - $130 = (___muldi3(($27|0),($71|0),($4|0),($121|0))|0); - $131 = tempRet0; - $132 = (___muldi3(($29|0),($75|0),($4|0),($121|0))|0); - $133 = tempRet0; - $134 = (___muldi3(($31|0),($79|0),($4|0),($121|0))|0); - $135 = tempRet0; - $136 = (___muldi3(($33|0),($83|0),($4|0),($121|0))|0); - $137 = tempRet0; - $138 = ($45|0)<(0); - $139 = $138 << 31 >> 31; - $140 = (___muldi3(($45|0),($139|0),($4|0),($121|0))|0); - $141 = tempRet0; - $142 = (___muldi3(($46|0),($117|0),($4|0),($121|0))|0); - $143 = tempRet0; - $144 = ($6|0)<(0); - $145 = $144 << 31 >> 31; - $146 = (___muldi3(($19|0),($55|0),($6|0),($145|0))|0); - $147 = tempRet0; - $148 = ($48|0)<(0); - $149 = $148 << 31 >> 31; - $150 = (___muldi3(($21|0),($59|0),($48|0),($149|0))|0); - $151 = tempRet0; - $152 = (___muldi3(($23|0),($63|0),($6|0),($145|0))|0); - $153 = tempRet0; - $154 = (___muldi3(($25|0),($67|0),($48|0),($149|0))|0); - $155 = tempRet0; - $156 = (___muldi3(($27|0),($71|0),($6|0),($145|0))|0); - $157 = tempRet0; - $158 = (___muldi3(($29|0),($75|0),($48|0),($149|0))|0); - $159 = tempRet0; - $160 = (___muldi3(($31|0),($79|0),($6|0),($145|0))|0); - $161 = tempRet0; - $162 = ($44|0)<(0); - $163 = $162 << 31 >> 31; - $164 = (___muldi3(($44|0),($163|0),($48|0),($149|0))|0); - $165 = tempRet0; - $166 = (___muldi3(($45|0),($139|0),($6|0),($145|0))|0); - $167 = tempRet0; - $168 = (___muldi3(($46|0),($117|0),($48|0),($149|0))|0); - $169 = tempRet0; - $170 = ($8|0)<(0); - $171 = $170 << 31 >> 31; - $172 = (___muldi3(($19|0),($55|0),($8|0),($171|0))|0); - $173 = tempRet0; - $174 = (___muldi3(($21|0),($59|0),($8|0),($171|0))|0); - $175 = tempRet0; - $176 = (___muldi3(($23|0),($63|0),($8|0),($171|0))|0); - $177 = tempRet0; - $178 = (___muldi3(($25|0),($67|0),($8|0),($171|0))|0); - $179 = tempRet0; - $180 = (___muldi3(($27|0),($71|0),($8|0),($171|0))|0); - $181 = tempRet0; - $182 = (___muldi3(($29|0),($75|0),($8|0),($171|0))|0); - $183 = tempRet0; - $184 = ($43|0)<(0); - $185 = $184 << 31 >> 31; - $186 = (___muldi3(($43|0),($185|0),($8|0),($171|0))|0); - $187 = tempRet0; - $188 = (___muldi3(($44|0),($163|0),($8|0),($171|0))|0); - $189 = tempRet0; - $190 = (___muldi3(($45|0),($139|0),($8|0),($171|0))|0); - $191 = tempRet0; - $192 = (___muldi3(($46|0),($117|0),($8|0),($171|0))|0); - $193 = tempRet0; - $194 = ($10|0)<(0); - $195 = $194 << 31 >> 31; - $196 = (___muldi3(($19|0),($55|0),($10|0),($195|0))|0); - $197 = tempRet0; - $198 = ($49|0)<(0); - $199 = $198 << 31 >> 31; - $200 = (___muldi3(($21|0),($59|0),($49|0),($199|0))|0); - $201 = tempRet0; - $202 = (___muldi3(($23|0),($63|0),($10|0),($195|0))|0); - $203 = tempRet0; - $204 = (___muldi3(($25|0),($67|0),($49|0),($199|0))|0); - $205 = tempRet0; - $206 = (___muldi3(($27|0),($71|0),($10|0),($195|0))|0); - $207 = tempRet0; - $208 = ($42|0)<(0); - $209 = $208 << 31 >> 31; - $210 = (___muldi3(($42|0),($209|0),($49|0),($199|0))|0); - $211 = tempRet0; - $212 = (___muldi3(($43|0),($185|0),($10|0),($195|0))|0); - $213 = tempRet0; - $214 = (___muldi3(($44|0),($163|0),($49|0),($199|0))|0); - $215 = tempRet0; - $216 = (___muldi3(($45|0),($139|0),($10|0),($195|0))|0); - $217 = tempRet0; - $218 = (___muldi3(($46|0),($117|0),($49|0),($199|0))|0); - $219 = tempRet0; - $220 = ($12|0)<(0); - $221 = $220 << 31 >> 31; - $222 = (___muldi3(($19|0),($55|0),($12|0),($221|0))|0); - $223 = tempRet0; - $224 = (___muldi3(($21|0),($59|0),($12|0),($221|0))|0); - $225 = tempRet0; - $226 = (___muldi3(($23|0),($63|0),($12|0),($221|0))|0); - $227 = tempRet0; - $228 = (___muldi3(($25|0),($67|0),($12|0),($221|0))|0); - $229 = tempRet0; - $230 = ($41|0)<(0); - $231 = $230 << 31 >> 31; - $232 = (___muldi3(($41|0),($231|0),($12|0),($221|0))|0); - $233 = tempRet0; - $234 = (___muldi3(($42|0),($209|0),($12|0),($221|0))|0); - $235 = tempRet0; - $236 = (___muldi3(($43|0),($185|0),($12|0),($221|0))|0); - $237 = tempRet0; - $238 = (___muldi3(($44|0),($163|0),($12|0),($221|0))|0); - $239 = tempRet0; - $240 = (___muldi3(($45|0),($139|0),($12|0),($221|0))|0); - $241 = tempRet0; - $242 = (___muldi3(($46|0),($117|0),($12|0),($221|0))|0); - $243 = tempRet0; - $244 = ($14|0)<(0); - $245 = $244 << 31 >> 31; - $246 = (___muldi3(($19|0),($55|0),($14|0),($245|0))|0); - $247 = tempRet0; - $248 = ($50|0)<(0); - $249 = $248 << 31 >> 31; - $250 = (___muldi3(($21|0),($59|0),($50|0),($249|0))|0); - $251 = tempRet0; - $252 = (___muldi3(($23|0),($63|0),($14|0),($245|0))|0); - $253 = tempRet0; - $254 = ($40|0)<(0); - $255 = $254 << 31 >> 31; - $256 = (___muldi3(($40|0),($255|0),($50|0),($249|0))|0); - $257 = tempRet0; - $258 = (___muldi3(($41|0),($231|0),($14|0),($245|0))|0); - $259 = tempRet0; - $260 = (___muldi3(($42|0),($209|0),($50|0),($249|0))|0); - $261 = tempRet0; - $262 = (___muldi3(($43|0),($185|0),($14|0),($245|0))|0); - $263 = tempRet0; - $264 = (___muldi3(($44|0),($163|0),($50|0),($249|0))|0); - $265 = tempRet0; - $266 = (___muldi3(($45|0),($139|0),($14|0),($245|0))|0); - $267 = tempRet0; - $268 = (___muldi3(($46|0),($117|0),($50|0),($249|0))|0); - $269 = tempRet0; - $270 = ($16|0)<(0); - $271 = $270 << 31 >> 31; - $272 = (___muldi3(($19|0),($55|0),($16|0),($271|0))|0); - $273 = tempRet0; - $274 = (___muldi3(($21|0),($59|0),($16|0),($271|0))|0); - $275 = tempRet0; - $276 = ($39|0)<(0); - $277 = $276 << 31 >> 31; - $278 = (___muldi3(($39|0),($277|0),($16|0),($271|0))|0); - $279 = tempRet0; - $280 = (___muldi3(($40|0),($255|0),($16|0),($271|0))|0); - $281 = tempRet0; - $282 = (___muldi3(($41|0),($231|0),($16|0),($271|0))|0); - $283 = tempRet0; - $284 = (___muldi3(($42|0),($209|0),($16|0),($271|0))|0); - $285 = tempRet0; - $286 = (___muldi3(($43|0),($185|0),($16|0),($271|0))|0); - $287 = tempRet0; - $288 = (___muldi3(($44|0),($163|0),($16|0),($271|0))|0); - $289 = tempRet0; - $290 = (___muldi3(($45|0),($139|0),($16|0),($271|0))|0); - $291 = tempRet0; - $292 = (___muldi3(($46|0),($117|0),($16|0),($271|0))|0); - $293 = tempRet0; - $294 = ($18|0)<(0); - $295 = $294 << 31 >> 31; - $296 = (___muldi3(($19|0),($55|0),($18|0),($295|0))|0); - $297 = tempRet0; - $298 = ($51|0)<(0); - $299 = $298 << 31 >> 31; - $300 = ($38|0)<(0); - $301 = $300 << 31 >> 31; - $302 = (___muldi3(($38|0),($301|0),($51|0),($299|0))|0); - $303 = tempRet0; - $304 = (___muldi3(($39|0),($277|0),($18|0),($295|0))|0); - $305 = tempRet0; - $306 = (___muldi3(($40|0),($255|0),($51|0),($299|0))|0); - $307 = tempRet0; - $308 = (___muldi3(($41|0),($231|0),($18|0),($295|0))|0); - $309 = tempRet0; - $310 = (___muldi3(($42|0),($209|0),($51|0),($299|0))|0); - $311 = tempRet0; - $312 = (___muldi3(($43|0),($185|0),($18|0),($295|0))|0); - $313 = tempRet0; - $314 = (___muldi3(($44|0),($163|0),($51|0),($299|0))|0); - $315 = tempRet0; - $316 = (___muldi3(($45|0),($139|0),($18|0),($295|0))|0); - $317 = tempRet0; - $318 = (___muldi3(($46|0),($117|0),($51|0),($299|0))|0); - $319 = tempRet0; - $320 = (_i64Add(($302|0),($303|0),($56|0),($57|0))|0); - $321 = tempRet0; - $322 = (_i64Add(($320|0),($321|0),($278|0),($279|0))|0); - $323 = tempRet0; - $324 = (_i64Add(($322|0),($323|0),($256|0),($257|0))|0); - $325 = tempRet0; - $326 = (_i64Add(($324|0),($325|0),($232|0),($233|0))|0); - $327 = tempRet0; - $328 = (_i64Add(($326|0),($327|0),($210|0),($211|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($328|0),($329|0),($186|0),($187|0))|0); - $331 = tempRet0; - $332 = (_i64Add(($330|0),($331|0),($164|0),($165|0))|0); - $333 = tempRet0; - $334 = (_i64Add(($332|0),($333|0),($140|0),($141|0))|0); - $335 = tempRet0; - $336 = (_i64Add(($334|0),($335|0),($118|0),($119|0))|0); - $337 = tempRet0; - $338 = (_i64Add(($60|0),($61|0),($96|0),($97|0))|0); - $339 = tempRet0; - $340 = (_i64Add(($150|0),($151|0),($172|0),($173|0))|0); - $341 = tempRet0; - $342 = (_i64Add(($340|0),($341|0),($126|0),($127|0))|0); - $343 = tempRet0; - $344 = (_i64Add(($342|0),($343|0),($104|0),($105|0))|0); - $345 = tempRet0; - $346 = (_i64Add(($344|0),($345|0),($72|0),($73|0))|0); - $347 = tempRet0; - $348 = (_i64Add(($346|0),($347|0),($310|0),($311|0))|0); - $349 = tempRet0; - $350 = (_i64Add(($348|0),($349|0),($286|0),($287|0))|0); - $351 = tempRet0; - $352 = (_i64Add(($350|0),($351|0),($264|0),($265|0))|0); - $353 = tempRet0; - $354 = (_i64Add(($352|0),($353|0),($240|0),($241|0))|0); - $355 = tempRet0; - $356 = (_i64Add(($354|0),($355|0),($218|0),($219|0))|0); - $357 = tempRet0; - $358 = (_i64Add(($336|0),($337|0),33554432,0)|0); - $359 = tempRet0; - $360 = (_bitshift64Ashr(($358|0),($359|0),26)|0); - $361 = tempRet0; - $362 = (_i64Add(($338|0),($339|0),($304|0),($305|0))|0); - $363 = tempRet0; - $364 = (_i64Add(($362|0),($363|0),($280|0),($281|0))|0); - $365 = tempRet0; - $366 = (_i64Add(($364|0),($365|0),($258|0),($259|0))|0); - $367 = tempRet0; - $368 = (_i64Add(($366|0),($367|0),($234|0),($235|0))|0); - $369 = tempRet0; - $370 = (_i64Add(($368|0),($369|0),($212|0),($213|0))|0); - $371 = tempRet0; - $372 = (_i64Add(($370|0),($371|0),($188|0),($189|0))|0); - $373 = tempRet0; - $374 = (_i64Add(($372|0),($373|0),($166|0),($167|0))|0); - $375 = tempRet0; - $376 = (_i64Add(($374|0),($375|0),($142|0),($143|0))|0); - $377 = tempRet0; - $378 = (_i64Add(($376|0),($377|0),($360|0),($361|0))|0); - $379 = tempRet0; - $380 = (_bitshift64Shl(($360|0),($361|0),26)|0); - $381 = tempRet0; - $382 = (_i64Subtract(($336|0),($337|0),($380|0),($381|0))|0); - $383 = tempRet0; - $384 = (_i64Add(($356|0),($357|0),33554432,0)|0); - $385 = tempRet0; - $386 = (_bitshift64Ashr(($384|0),($385|0),26)|0); - $387 = tempRet0; - $388 = (_i64Add(($174|0),($175|0),($196|0),($197|0))|0); - $389 = tempRet0; - $390 = (_i64Add(($388|0),($389|0),($152|0),($153|0))|0); - $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($128|0),($129|0))|0); - $393 = tempRet0; - $394 = (_i64Add(($392|0),($393|0),($106|0),($107|0))|0); - $395 = tempRet0; - $396 = (_i64Add(($394|0),($395|0),($76|0),($77|0))|0); - $397 = tempRet0; - $398 = (_i64Add(($396|0),($397|0),($312|0),($313|0))|0); - $399 = tempRet0; - $400 = (_i64Add(($398|0),($399|0),($288|0),($289|0))|0); - $401 = tempRet0; - $402 = (_i64Add(($400|0),($401|0),($266|0),($267|0))|0); - $403 = tempRet0; - $404 = (_i64Add(($402|0),($403|0),($242|0),($243|0))|0); - $405 = tempRet0; - $406 = (_i64Add(($404|0),($405|0),($386|0),($387|0))|0); - $407 = tempRet0; - $408 = (_bitshift64Shl(($386|0),($387|0),26)|0); - $409 = tempRet0; - $410 = (_i64Subtract(($356|0),($357|0),($408|0),($409|0))|0); - $411 = tempRet0; - $412 = (_i64Add(($378|0),($379|0),16777216,0)|0); - $413 = tempRet0; - $414 = (_bitshift64Ashr(($412|0),($413|0),25)|0); - $415 = tempRet0; - $416 = (_i64Add(($100|0),($101|0),($122|0),($123|0))|0); - $417 = tempRet0; - $418 = (_i64Add(($416|0),($417|0),($64|0),($65|0))|0); - $419 = tempRet0; - $420 = (_i64Add(($418|0),($419|0),($306|0),($307|0))|0); - $421 = tempRet0; - $422 = (_i64Add(($420|0),($421|0),($282|0),($283|0))|0); - $423 = tempRet0; - $424 = (_i64Add(($422|0),($423|0),($260|0),($261|0))|0); - $425 = tempRet0; - $426 = (_i64Add(($424|0),($425|0),($236|0),($237|0))|0); - $427 = tempRet0; - $428 = (_i64Add(($426|0),($427|0),($214|0),($215|0))|0); - $429 = tempRet0; - $430 = (_i64Add(($428|0),($429|0),($190|0),($191|0))|0); - $431 = tempRet0; - $432 = (_i64Add(($430|0),($431|0),($168|0),($169|0))|0); - $433 = tempRet0; - $434 = (_i64Add(($432|0),($433|0),($414|0),($415|0))|0); - $435 = tempRet0; - $436 = (_bitshift64Shl(($414|0),($415|0),25)|0); - $437 = tempRet0; - $438 = (_i64Subtract(($378|0),($379|0),($436|0),($437|0))|0); - $439 = tempRet0; - $440 = (_i64Add(($406|0),($407|0),16777216,0)|0); - $441 = tempRet0; - $442 = (_bitshift64Ashr(($440|0),($441|0),25)|0); - $443 = tempRet0; - $444 = (_i64Add(($200|0),($201|0),($222|0),($223|0))|0); - $445 = tempRet0; - $446 = (_i64Add(($444|0),($445|0),($176|0),($177|0))|0); - $447 = tempRet0; - $448 = (_i64Add(($446|0),($447|0),($154|0),($155|0))|0); - $449 = tempRet0; - $450 = (_i64Add(($448|0),($449|0),($130|0),($131|0))|0); - $451 = tempRet0; - $452 = (_i64Add(($450|0),($451|0),($108|0),($109|0))|0); - $453 = tempRet0; - $454 = (_i64Add(($452|0),($453|0),($80|0),($81|0))|0); - $455 = tempRet0; - $456 = (_i64Add(($454|0),($455|0),($314|0),($315|0))|0); - $457 = tempRet0; - $458 = (_i64Add(($456|0),($457|0),($290|0),($291|0))|0); - $459 = tempRet0; - $460 = (_i64Add(($458|0),($459|0),($268|0),($269|0))|0); - $461 = tempRet0; - $462 = (_i64Add(($460|0),($461|0),($442|0),($443|0))|0); - $463 = tempRet0; - $464 = (_bitshift64Shl(($442|0),($443|0),25)|0); - $465 = tempRet0; - $466 = (_i64Subtract(($406|0),($407|0),($464|0),($465|0))|0); - $467 = tempRet0; - $468 = (_i64Add(($434|0),($435|0),33554432,0)|0); - $469 = tempRet0; - $470 = (_bitshift64Ashr(($468|0),($469|0),26)|0); - $471 = tempRet0; - $472 = (_i64Add(($124|0),($125|0),($146|0),($147|0))|0); - $473 = tempRet0; - $474 = (_i64Add(($472|0),($473|0),($102|0),($103|0))|0); - $475 = tempRet0; - $476 = (_i64Add(($474|0),($475|0),($68|0),($69|0))|0); - $477 = tempRet0; - $478 = (_i64Add(($476|0),($477|0),($308|0),($309|0))|0); - $479 = tempRet0; - $480 = (_i64Add(($478|0),($479|0),($284|0),($285|0))|0); - $481 = tempRet0; - $482 = (_i64Add(($480|0),($481|0),($262|0),($263|0))|0); - $483 = tempRet0; - $484 = (_i64Add(($482|0),($483|0),($238|0),($239|0))|0); - $485 = tempRet0; - $486 = (_i64Add(($484|0),($485|0),($216|0),($217|0))|0); - $487 = tempRet0; - $488 = (_i64Add(($486|0),($487|0),($192|0),($193|0))|0); - $489 = tempRet0; - $490 = (_i64Add(($488|0),($489|0),($470|0),($471|0))|0); - $491 = tempRet0; - $492 = (_bitshift64Shl(($470|0),($471|0),26)|0); - $493 = tempRet0; - $494 = (_i64Subtract(($434|0),($435|0),($492|0),($493|0))|0); - $495 = tempRet0; - $496 = (_i64Add(($462|0),($463|0),33554432,0)|0); - $497 = tempRet0; - $498 = (_bitshift64Ashr(($496|0),($497|0),26)|0); - $499 = tempRet0; - $500 = (_i64Add(($224|0),($225|0),($246|0),($247|0))|0); - $501 = tempRet0; - $502 = (_i64Add(($500|0),($501|0),($202|0),($203|0))|0); - $503 = tempRet0; - $504 = (_i64Add(($502|0),($503|0),($178|0),($179|0))|0); - $505 = tempRet0; - $506 = (_i64Add(($504|0),($505|0),($156|0),($157|0))|0); - $507 = tempRet0; - $508 = (_i64Add(($506|0),($507|0),($132|0),($133|0))|0); - $509 = tempRet0; - $510 = (_i64Add(($508|0),($509|0),($110|0),($111|0))|0); - $511 = tempRet0; - $512 = (_i64Add(($510|0),($511|0),($84|0),($85|0))|0); - $513 = tempRet0; - $514 = (_i64Add(($512|0),($513|0),($316|0),($317|0))|0); - $515 = tempRet0; - $516 = (_i64Add(($514|0),($515|0),($292|0),($293|0))|0); - $517 = tempRet0; - $518 = (_i64Add(($516|0),($517|0),($498|0),($499|0))|0); - $519 = tempRet0; - $520 = (_bitshift64Shl(($498|0),($499|0),26)|0); - $521 = tempRet0; - $522 = (_i64Subtract(($462|0),($463|0),($520|0),($521|0))|0); - $523 = tempRet0; - $524 = (_i64Add(($490|0),($491|0),16777216,0)|0); - $525 = tempRet0; - $526 = (_bitshift64Ashr(($524|0),($525|0),25)|0); - $527 = tempRet0; - $528 = (_i64Add(($526|0),($527|0),($410|0),($411|0))|0); - $529 = tempRet0; - $530 = (_bitshift64Shl(($526|0),($527|0),25)|0); - $531 = tempRet0; - $532 = (_i64Subtract(($490|0),($491|0),($530|0),($531|0))|0); - $533 = tempRet0; - $534 = (_i64Add(($518|0),($519|0),16777216,0)|0); - $535 = tempRet0; - $536 = (_bitshift64Ashr(($534|0),($535|0),25)|0); - $537 = tempRet0; - $538 = (_i64Add(($250|0),($251|0),($272|0),($273|0))|0); - $539 = tempRet0; - $540 = (_i64Add(($538|0),($539|0),($226|0),($227|0))|0); - $541 = tempRet0; - $542 = (_i64Add(($540|0),($541|0),($204|0),($205|0))|0); - $543 = tempRet0; - $544 = (_i64Add(($542|0),($543|0),($180|0),($181|0))|0); - $545 = tempRet0; - $546 = (_i64Add(($544|0),($545|0),($158|0),($159|0))|0); - $547 = tempRet0; - $548 = (_i64Add(($546|0),($547|0),($134|0),($135|0))|0); - $549 = tempRet0; - $550 = (_i64Add(($548|0),($549|0),($112|0),($113|0))|0); - $551 = tempRet0; - $552 = (_i64Add(($550|0),($551|0),($88|0),($89|0))|0); - $553 = tempRet0; - $554 = (_i64Add(($552|0),($553|0),($318|0),($319|0))|0); - $555 = tempRet0; - $556 = (_i64Add(($554|0),($555|0),($536|0),($537|0))|0); - $557 = tempRet0; - $558 = (_bitshift64Shl(($536|0),($537|0),25)|0); - $559 = tempRet0; - $560 = (_i64Subtract(($518|0),($519|0),($558|0),($559|0))|0); - $561 = tempRet0; - $562 = (_i64Add(($528|0),($529|0),33554432,0)|0); - $563 = tempRet0; - $564 = (_bitshift64Ashr(($562|0),($563|0),26)|0); - $565 = tempRet0; - $566 = (_i64Add(($466|0),($467|0),($564|0),($565|0))|0); - $567 = tempRet0; - $568 = (_bitshift64Shl(($564|0),($565|0),26)|0); - $569 = tempRet0; - $570 = (_i64Subtract(($528|0),($529|0),($568|0),($569|0))|0); - $571 = tempRet0; - $572 = (_i64Add(($556|0),($557|0),33554432,0)|0); - $573 = tempRet0; - $574 = (_bitshift64Ashr(($572|0),($573|0),26)|0); - $575 = tempRet0; - $576 = (_i64Add(($274|0),($275|0),($296|0),($297|0))|0); - $577 = tempRet0; - $578 = (_i64Add(($576|0),($577|0),($252|0),($253|0))|0); - $579 = tempRet0; - $580 = (_i64Add(($578|0),($579|0),($228|0),($229|0))|0); - $581 = tempRet0; - $582 = (_i64Add(($580|0),($581|0),($206|0),($207|0))|0); - $583 = tempRet0; - $584 = (_i64Add(($582|0),($583|0),($182|0),($183|0))|0); - $585 = tempRet0; - $586 = (_i64Add(($584|0),($585|0),($160|0),($161|0))|0); - $587 = tempRet0; - $588 = (_i64Add(($586|0),($587|0),($136|0),($137|0))|0); - $589 = tempRet0; - $590 = (_i64Add(($588|0),($589|0),($114|0),($115|0))|0); - $591 = tempRet0; - $592 = (_i64Add(($590|0),($591|0),($92|0),($93|0))|0); - $593 = tempRet0; - $594 = (_i64Add(($592|0),($593|0),($574|0),($575|0))|0); - $595 = tempRet0; - $596 = (_bitshift64Shl(($574|0),($575|0),26)|0); - $597 = tempRet0; - $598 = (_i64Subtract(($556|0),($557|0),($596|0),($597|0))|0); - $599 = tempRet0; - $600 = (_i64Add(($594|0),($595|0),16777216,0)|0); - $601 = tempRet0; - $602 = (_bitshift64Ashr(($600|0),($601|0),25)|0); - $603 = tempRet0; - $604 = (___muldi3(($602|0),($603|0),19,0)|0); - $605 = tempRet0; - $606 = (_i64Add(($604|0),($605|0),($382|0),($383|0))|0); - $607 = tempRet0; - $608 = (_bitshift64Shl(($602|0),($603|0),25)|0); - $609 = tempRet0; - $610 = (_i64Subtract(($594|0),($595|0),($608|0),($609|0))|0); - $611 = tempRet0; - $612 = (_i64Add(($606|0),($607|0),33554432,0)|0); - $613 = tempRet0; - $614 = (_bitshift64Ashr(($612|0),($613|0),26)|0); - $615 = tempRet0; - $616 = (_i64Add(($438|0),($439|0),($614|0),($615|0))|0); - $617 = tempRet0; - $618 = (_bitshift64Shl(($614|0),($615|0),26)|0); - $619 = tempRet0; - $620 = (_i64Subtract(($606|0),($607|0),($618|0),($619|0))|0); - $621 = tempRet0; - HEAP32[$h>>2] = $620; - $622 = (($h) + 4|0); - HEAP32[$622>>2] = $616; - $623 = (($h) + 8|0); - HEAP32[$623>>2] = $494; - $624 = (($h) + 12|0); - HEAP32[$624>>2] = $532; - $625 = (($h) + 16|0); - HEAP32[$625>>2] = $570; - $626 = (($h) + 20|0); - HEAP32[$626>>2] = $566; - $627 = (($h) + 24|0); - HEAP32[$627>>2] = $522; - $628 = (($h) + 28|0); - HEAP32[$628>>2] = $560; - $629 = (($h) + 32|0); - HEAP32[$629>>2] = $598; - $630 = (($h) + 36|0); - HEAP32[$630>>2] = $610; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_neg($h,$f) { - $h = $h|0; - $f = $f|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = (0 - ($0))|0; - $20 = (0 - ($2))|0; - $21 = (0 - ($4))|0; - $22 = (0 - ($6))|0; - $23 = (0 - ($8))|0; - $24 = (0 - ($10))|0; - $25 = (0 - ($12))|0; - $26 = (0 - ($14))|0; - $27 = (0 - ($16))|0; - $28 = (0 - ($18))|0; - HEAP32[$h>>2] = $19; - $29 = (($h) + 4|0); - HEAP32[$29>>2] = $20; - $30 = (($h) + 8|0); - HEAP32[$30>>2] = $21; - $31 = (($h) + 12|0); - HEAP32[$31>>2] = $22; - $32 = (($h) + 16|0); - HEAP32[$32>>2] = $23; - $33 = (($h) + 20|0); - HEAP32[$33>>2] = $24; - $34 = (($h) + 24|0); - HEAP32[$34>>2] = $25; - $35 = (($h) + 28|0); - HEAP32[$35>>2] = $26; - $36 = (($h) + 32|0); - HEAP32[$36>>2] = $27; - $37 = (($h) + 36|0); - HEAP32[$37>>2] = $28; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_pow22523($out,$z) { - $out = $out|0; - $z = $z|0; - var $0 = 0, $1 = 0, $2 = 0, $exitcond = 0, $exitcond10 = 0, $exitcond11 = 0, $i$74 = 0, $i$83 = 0, $i$92 = 0, $t0 = 0, $t1 = 0, $t2 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $t0 = sp + 80|0; - $t1 = sp + 40|0; - $t2 = sp; - _crypto_sign_ed25519_ref10_fe_sq($t0,$z); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t1,$z,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t0,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t0,$t0); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - $i$74 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - $0 = (($i$74) + 1)|0; - $exitcond11 = ($0|0)==(50); - if ($exitcond11) { - break; - } else { - $i$74 = $0; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t1,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - $i$83 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - $1 = (($i$83) + 1)|0; - $exitcond10 = ($1|0)==(100); - if ($exitcond10) { - break; - } else { - $i$83 = $1; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - $i$92 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - $2 = (($i$92) + 1)|0; - $exitcond = ($2|0)==(50); - if ($exitcond) { - break; - } else { - $i$92 = $2; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t0,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t0,$t0); - _crypto_sign_ed25519_ref10_fe_mul($out,$t0,$z); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_sq($h,$f) { - $h = $h|0; - $f = $f|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; - var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; - var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; - var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; - var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; - var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; - var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; - var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; - var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; - var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; - var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = $0 << 1; - $20 = $2 << 1; - $21 = $4 << 1; - $22 = $6 << 1; - $23 = $8 << 1; - $24 = $10 << 1; - $25 = $12 << 1; - $26 = $14 << 1; - $27 = ($10*38)|0; - $28 = ($12*19)|0; - $29 = ($14*38)|0; - $30 = ($16*19)|0; - $31 = ($18*38)|0; - $32 = ($0|0)<(0); - $33 = $32 << 31 >> 31; - $34 = (___muldi3(($0|0),($33|0),($0|0),($33|0))|0); - $35 = tempRet0; - $36 = ($19|0)<(0); - $37 = $36 << 31 >> 31; - $38 = ($2|0)<(0); - $39 = $38 << 31 >> 31; - $40 = (___muldi3(($19|0),($37|0),($2|0),($39|0))|0); - $41 = tempRet0; - $42 = ($4|0)<(0); - $43 = $42 << 31 >> 31; - $44 = (___muldi3(($4|0),($43|0),($19|0),($37|0))|0); - $45 = tempRet0; - $46 = ($6|0)<(0); - $47 = $46 << 31 >> 31; - $48 = (___muldi3(($6|0),($47|0),($19|0),($37|0))|0); - $49 = tempRet0; - $50 = ($8|0)<(0); - $51 = $50 << 31 >> 31; - $52 = (___muldi3(($8|0),($51|0),($19|0),($37|0))|0); - $53 = tempRet0; - $54 = ($10|0)<(0); - $55 = $54 << 31 >> 31; - $56 = (___muldi3(($10|0),($55|0),($19|0),($37|0))|0); - $57 = tempRet0; - $58 = ($12|0)<(0); - $59 = $58 << 31 >> 31; - $60 = (___muldi3(($12|0),($59|0),($19|0),($37|0))|0); - $61 = tempRet0; - $62 = ($14|0)<(0); - $63 = $62 << 31 >> 31; - $64 = (___muldi3(($14|0),($63|0),($19|0),($37|0))|0); - $65 = tempRet0; - $66 = ($16|0)<(0); - $67 = $66 << 31 >> 31; - $68 = (___muldi3(($16|0),($67|0),($19|0),($37|0))|0); - $69 = tempRet0; - $70 = ($18|0)<(0); - $71 = $70 << 31 >> 31; - $72 = (___muldi3(($18|0),($71|0),($19|0),($37|0))|0); - $73 = tempRet0; - $74 = ($20|0)<(0); - $75 = $74 << 31 >> 31; - $76 = (___muldi3(($20|0),($75|0),($2|0),($39|0))|0); - $77 = tempRet0; - $78 = (___muldi3(($20|0),($75|0),($4|0),($43|0))|0); - $79 = tempRet0; - $80 = ($22|0)<(0); - $81 = $80 << 31 >> 31; - $82 = (___muldi3(($22|0),($81|0),($20|0),($75|0))|0); - $83 = tempRet0; - $84 = (___muldi3(($8|0),($51|0),($20|0),($75|0))|0); - $85 = tempRet0; - $86 = ($24|0)<(0); - $87 = $86 << 31 >> 31; - $88 = (___muldi3(($24|0),($87|0),($20|0),($75|0))|0); - $89 = tempRet0; - $90 = (___muldi3(($12|0),($59|0),($20|0),($75|0))|0); - $91 = tempRet0; - $92 = ($26|0)<(0); - $93 = $92 << 31 >> 31; - $94 = (___muldi3(($26|0),($93|0),($20|0),($75|0))|0); - $95 = tempRet0; - $96 = (___muldi3(($16|0),($67|0),($20|0),($75|0))|0); - $97 = tempRet0; - $98 = ($31|0)<(0); - $99 = $98 << 31 >> 31; - $100 = (___muldi3(($31|0),($99|0),($20|0),($75|0))|0); - $101 = tempRet0; - $102 = (___muldi3(($4|0),($43|0),($4|0),($43|0))|0); - $103 = tempRet0; - $104 = ($21|0)<(0); - $105 = $104 << 31 >> 31; - $106 = (___muldi3(($21|0),($105|0),($6|0),($47|0))|0); - $107 = tempRet0; - $108 = (___muldi3(($8|0),($51|0),($21|0),($105|0))|0); - $109 = tempRet0; - $110 = (___muldi3(($10|0),($55|0),($21|0),($105|0))|0); - $111 = tempRet0; - $112 = (___muldi3(($12|0),($59|0),($21|0),($105|0))|0); - $113 = tempRet0; - $114 = (___muldi3(($14|0),($63|0),($21|0),($105|0))|0); - $115 = tempRet0; - $116 = ($30|0)<(0); - $117 = $116 << 31 >> 31; - $118 = (___muldi3(($30|0),($117|0),($21|0),($105|0))|0); - $119 = tempRet0; - $120 = (___muldi3(($31|0),($99|0),($4|0),($43|0))|0); - $121 = tempRet0; - $122 = (___muldi3(($22|0),($81|0),($6|0),($47|0))|0); - $123 = tempRet0; - $124 = (___muldi3(($22|0),($81|0),($8|0),($51|0))|0); - $125 = tempRet0; - $126 = (___muldi3(($24|0),($87|0),($22|0),($81|0))|0); - $127 = tempRet0; - $128 = (___muldi3(($12|0),($59|0),($22|0),($81|0))|0); - $129 = tempRet0; - $130 = ($29|0)<(0); - $131 = $130 << 31 >> 31; - $132 = (___muldi3(($29|0),($131|0),($22|0),($81|0))|0); - $133 = tempRet0; - $134 = (___muldi3(($30|0),($117|0),($22|0),($81|0))|0); - $135 = tempRet0; - $136 = (___muldi3(($31|0),($99|0),($22|0),($81|0))|0); - $137 = tempRet0; - $138 = (___muldi3(($8|0),($51|0),($8|0),($51|0))|0); - $139 = tempRet0; - $140 = ($23|0)<(0); - $141 = $140 << 31 >> 31; - $142 = (___muldi3(($23|0),($141|0),($10|0),($55|0))|0); - $143 = tempRet0; - $144 = ($28|0)<(0); - $145 = $144 << 31 >> 31; - $146 = (___muldi3(($28|0),($145|0),($23|0),($141|0))|0); - $147 = tempRet0; - $148 = (___muldi3(($29|0),($131|0),($8|0),($51|0))|0); - $149 = tempRet0; - $150 = (___muldi3(($30|0),($117|0),($23|0),($141|0))|0); - $151 = tempRet0; - $152 = (___muldi3(($31|0),($99|0),($8|0),($51|0))|0); - $153 = tempRet0; - $154 = ($27|0)<(0); - $155 = $154 << 31 >> 31; - $156 = (___muldi3(($27|0),($155|0),($10|0),($55|0))|0); - $157 = tempRet0; - $158 = (___muldi3(($28|0),($145|0),($24|0),($87|0))|0); - $159 = tempRet0; - $160 = (___muldi3(($29|0),($131|0),($24|0),($87|0))|0); - $161 = tempRet0; - $162 = (___muldi3(($30|0),($117|0),($24|0),($87|0))|0); - $163 = tempRet0; - $164 = (___muldi3(($31|0),($99|0),($24|0),($87|0))|0); - $165 = tempRet0; - $166 = (___muldi3(($28|0),($145|0),($12|0),($59|0))|0); - $167 = tempRet0; - $168 = (___muldi3(($29|0),($131|0),($12|0),($59|0))|0); - $169 = tempRet0; - $170 = ($25|0)<(0); - $171 = $170 << 31 >> 31; - $172 = (___muldi3(($30|0),($117|0),($25|0),($171|0))|0); - $173 = tempRet0; - $174 = (___muldi3(($31|0),($99|0),($12|0),($59|0))|0); - $175 = tempRet0; - $176 = (___muldi3(($29|0),($131|0),($14|0),($63|0))|0); - $177 = tempRet0; - $178 = (___muldi3(($30|0),($117|0),($26|0),($93|0))|0); - $179 = tempRet0; - $180 = (___muldi3(($31|0),($99|0),($26|0),($93|0))|0); - $181 = tempRet0; - $182 = (___muldi3(($30|0),($117|0),($16|0),($67|0))|0); - $183 = tempRet0; - $184 = (___muldi3(($31|0),($99|0),($16|0),($67|0))|0); - $185 = tempRet0; - $186 = (___muldi3(($31|0),($99|0),($18|0),($71|0))|0); - $187 = tempRet0; - $188 = (_i64Add(($156|0),($157|0),($34|0),($35|0))|0); - $189 = tempRet0; - $190 = (_i64Add(($188|0),($189|0),($146|0),($147|0))|0); - $191 = tempRet0; - $192 = (_i64Add(($190|0),($191|0),($132|0),($133|0))|0); - $193 = tempRet0; - $194 = (_i64Add(($192|0),($193|0),($118|0),($119|0))|0); - $195 = tempRet0; - $196 = (_i64Add(($194|0),($195|0),($100|0),($101|0))|0); - $197 = tempRet0; - $198 = (_i64Add(($44|0),($45|0),($76|0),($77|0))|0); - $199 = tempRet0; - $200 = (_i64Add(($48|0),($49|0),($78|0),($79|0))|0); - $201 = tempRet0; - $202 = (_i64Add(($82|0),($83|0),($102|0),($103|0))|0); - $203 = tempRet0; - $204 = (_i64Add(($202|0),($203|0),($52|0),($53|0))|0); - $205 = tempRet0; - $206 = (_i64Add(($204|0),($205|0),($176|0),($177|0))|0); - $207 = tempRet0; - $208 = (_i64Add(($206|0),($207|0),($172|0),($173|0))|0); - $209 = tempRet0; - $210 = (_i64Add(($208|0),($209|0),($164|0),($165|0))|0); - $211 = tempRet0; - $212 = (_i64Add(($196|0),($197|0),33554432,0)|0); - $213 = tempRet0; - $214 = (_bitshift64Ashr(($212|0),($213|0),26)|0); - $215 = tempRet0; - $216 = (_i64Add(($158|0),($159|0),($40|0),($41|0))|0); - $217 = tempRet0; - $218 = (_i64Add(($216|0),($217|0),($148|0),($149|0))|0); - $219 = tempRet0; - $220 = (_i64Add(($218|0),($219|0),($134|0),($135|0))|0); - $221 = tempRet0; - $222 = (_i64Add(($220|0),($221|0),($120|0),($121|0))|0); - $223 = tempRet0; - $224 = (_i64Add(($222|0),($223|0),($214|0),($215|0))|0); - $225 = tempRet0; - $226 = (_bitshift64Shl(($214|0),($215|0),26)|0); - $227 = tempRet0; - $228 = (_i64Subtract(($196|0),($197|0),($226|0),($227|0))|0); - $229 = tempRet0; - $230 = (_i64Add(($210|0),($211|0),33554432,0)|0); - $231 = tempRet0; - $232 = (_bitshift64Ashr(($230|0),($231|0),26)|0); - $233 = tempRet0; - $234 = (_i64Add(($84|0),($85|0),($106|0),($107|0))|0); - $235 = tempRet0; - $236 = (_i64Add(($234|0),($235|0),($56|0),($57|0))|0); - $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($178|0),($179|0))|0); - $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($174|0),($175|0))|0); - $241 = tempRet0; - $242 = (_i64Add(($240|0),($241|0),($232|0),($233|0))|0); - $243 = tempRet0; - $244 = (_bitshift64Shl(($232|0),($233|0),26)|0); - $245 = tempRet0; - $246 = (_i64Subtract(($210|0),($211|0),($244|0),($245|0))|0); - $247 = tempRet0; - $248 = (_i64Add(($224|0),($225|0),16777216,0)|0); - $249 = tempRet0; - $250 = (_bitshift64Ashr(($248|0),($249|0),25)|0); - $251 = tempRet0; - $252 = (_i64Add(($198|0),($199|0),($166|0),($167|0))|0); - $253 = tempRet0; - $254 = (_i64Add(($252|0),($253|0),($160|0),($161|0))|0); - $255 = tempRet0; - $256 = (_i64Add(($254|0),($255|0),($150|0),($151|0))|0); - $257 = tempRet0; - $258 = (_i64Add(($256|0),($257|0),($136|0),($137|0))|0); - $259 = tempRet0; - $260 = (_i64Add(($258|0),($259|0),($250|0),($251|0))|0); - $261 = tempRet0; - $262 = (_bitshift64Shl(($250|0),($251|0),25)|0); - $263 = tempRet0; - $264 = (_i64Subtract(($224|0),($225|0),($262|0),($263|0))|0); - $265 = tempRet0; - $266 = (_i64Add(($242|0),($243|0),16777216,0)|0); - $267 = tempRet0; - $268 = (_bitshift64Ashr(($266|0),($267|0),25)|0); - $269 = tempRet0; - $270 = (_i64Add(($122|0),($123|0),($108|0),($109|0))|0); - $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($88|0),($89|0))|0); - $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($60|0),($61|0))|0); - $275 = tempRet0; - $276 = (_i64Add(($274|0),($275|0),($182|0),($183|0))|0); - $277 = tempRet0; - $278 = (_i64Add(($276|0),($277|0),($180|0),($181|0))|0); - $279 = tempRet0; - $280 = (_i64Add(($278|0),($279|0),($268|0),($269|0))|0); - $281 = tempRet0; - $282 = (_bitshift64Shl(($268|0),($269|0),25)|0); - $283 = tempRet0; - $284 = (_i64Subtract(($242|0),($243|0),($282|0),($283|0))|0); - $285 = tempRet0; - $286 = (_i64Add(($260|0),($261|0),33554432,0)|0); - $287 = tempRet0; - $288 = (_bitshift64Ashr(($286|0),($287|0),26)|0); - $289 = tempRet0; - $290 = (_i64Add(($200|0),($201|0),($168|0),($169|0))|0); - $291 = tempRet0; - $292 = (_i64Add(($290|0),($291|0),($162|0),($163|0))|0); - $293 = tempRet0; - $294 = (_i64Add(($292|0),($293|0),($152|0),($153|0))|0); - $295 = tempRet0; - $296 = (_i64Add(($294|0),($295|0),($288|0),($289|0))|0); - $297 = tempRet0; - $298 = (_bitshift64Shl(($288|0),($289|0),26)|0); - $299 = tempRet0; - $300 = (_i64Subtract(($260|0),($261|0),($298|0),($299|0))|0); - $301 = tempRet0; - $302 = (_i64Add(($280|0),($281|0),33554432,0)|0); - $303 = tempRet0; - $304 = (_bitshift64Ashr(($302|0),($303|0),26)|0); - $305 = tempRet0; - $306 = (_i64Add(($110|0),($111|0),($124|0),($125|0))|0); - $307 = tempRet0; - $308 = (_i64Add(($306|0),($307|0),($90|0),($91|0))|0); - $309 = tempRet0; - $310 = (_i64Add(($308|0),($309|0),($64|0),($65|0))|0); - $311 = tempRet0; - $312 = (_i64Add(($310|0),($311|0),($184|0),($185|0))|0); - $313 = tempRet0; - $314 = (_i64Add(($312|0),($313|0),($304|0),($305|0))|0); - $315 = tempRet0; - $316 = (_bitshift64Shl(($304|0),($305|0),26)|0); - $317 = tempRet0; - $318 = (_i64Subtract(($280|0),($281|0),($316|0),($317|0))|0); - $319 = tempRet0; - $320 = (_i64Add(($296|0),($297|0),16777216,0)|0); - $321 = tempRet0; - $322 = (_bitshift64Ashr(($320|0),($321|0),25)|0); - $323 = tempRet0; - $324 = (_i64Add(($322|0),($323|0),($246|0),($247|0))|0); - $325 = tempRet0; - $326 = (_bitshift64Shl(($322|0),($323|0),25)|0); - $327 = tempRet0; - $328 = (_i64Subtract(($296|0),($297|0),($326|0),($327|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($314|0),($315|0),16777216,0)|0); - $331 = tempRet0; - $332 = (_bitshift64Ashr(($330|0),($331|0),25)|0); - $333 = tempRet0; - $334 = (_i64Add(($112|0),($113|0),($138|0),($139|0))|0); - $335 = tempRet0; - $336 = (_i64Add(($334|0),($335|0),($126|0),($127|0))|0); - $337 = tempRet0; - $338 = (_i64Add(($336|0),($337|0),($94|0),($95|0))|0); - $339 = tempRet0; - $340 = (_i64Add(($338|0),($339|0),($68|0),($69|0))|0); - $341 = tempRet0; - $342 = (_i64Add(($340|0),($341|0),($186|0),($187|0))|0); - $343 = tempRet0; - $344 = (_i64Add(($342|0),($343|0),($332|0),($333|0))|0); - $345 = tempRet0; - $346 = (_bitshift64Shl(($332|0),($333|0),25)|0); - $347 = tempRet0; - $348 = (_i64Subtract(($314|0),($315|0),($346|0),($347|0))|0); - $349 = tempRet0; - $350 = (_i64Add(($324|0),($325|0),33554432,0)|0); - $351 = tempRet0; - $352 = (_bitshift64Ashr(($350|0),($351|0),26)|0); - $353 = tempRet0; - $354 = (_i64Add(($284|0),($285|0),($352|0),($353|0))|0); - $355 = tempRet0; - $356 = (_bitshift64Shl(($352|0),($353|0),26)|0); - $357 = tempRet0; - $358 = (_i64Subtract(($324|0),($325|0),($356|0),($357|0))|0); - $359 = tempRet0; - $360 = (_i64Add(($344|0),($345|0),33554432,0)|0); - $361 = tempRet0; - $362 = (_bitshift64Ashr(($360|0),($361|0),26)|0); - $363 = tempRet0; - $364 = (_i64Add(($128|0),($129|0),($142|0),($143|0))|0); - $365 = tempRet0; - $366 = (_i64Add(($364|0),($365|0),($114|0),($115|0))|0); - $367 = tempRet0; - $368 = (_i64Add(($366|0),($367|0),($96|0),($97|0))|0); - $369 = tempRet0; - $370 = (_i64Add(($368|0),($369|0),($72|0),($73|0))|0); - $371 = tempRet0; - $372 = (_i64Add(($370|0),($371|0),($362|0),($363|0))|0); - $373 = tempRet0; - $374 = (_bitshift64Shl(($362|0),($363|0),26)|0); - $375 = tempRet0; - $376 = (_i64Subtract(($344|0),($345|0),($374|0),($375|0))|0); - $377 = tempRet0; - $378 = (_i64Add(($372|0),($373|0),16777216,0)|0); - $379 = tempRet0; - $380 = (_bitshift64Ashr(($378|0),($379|0),25)|0); - $381 = tempRet0; - $382 = (___muldi3(($380|0),($381|0),19,0)|0); - $383 = tempRet0; - $384 = (_i64Add(($382|0),($383|0),($228|0),($229|0))|0); - $385 = tempRet0; - $386 = (_bitshift64Shl(($380|0),($381|0),25)|0); - $387 = tempRet0; - $388 = (_i64Subtract(($372|0),($373|0),($386|0),($387|0))|0); - $389 = tempRet0; - $390 = (_i64Add(($384|0),($385|0),33554432,0)|0); - $391 = tempRet0; - $392 = (_bitshift64Ashr(($390|0),($391|0),26)|0); - $393 = tempRet0; - $394 = (_i64Add(($264|0),($265|0),($392|0),($393|0))|0); - $395 = tempRet0; - $396 = (_bitshift64Shl(($392|0),($393|0),26)|0); - $397 = tempRet0; - $398 = (_i64Subtract(($384|0),($385|0),($396|0),($397|0))|0); - $399 = tempRet0; - HEAP32[$h>>2] = $398; - $400 = (($h) + 4|0); - HEAP32[$400>>2] = $394; - $401 = (($h) + 8|0); - HEAP32[$401>>2] = $300; - $402 = (($h) + 12|0); - HEAP32[$402>>2] = $328; - $403 = (($h) + 16|0); - HEAP32[$403>>2] = $358; - $404 = (($h) + 20|0); - HEAP32[$404>>2] = $354; - $405 = (($h) + 24|0); - HEAP32[$405>>2] = $318; - $406 = (($h) + 28|0); - HEAP32[$406>>2] = $348; - $407 = (($h) + 32|0); - HEAP32[$407>>2] = $376; - $408 = (($h) + 36|0); - HEAP32[$408>>2] = $388; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_sq2($h,$f) { - $h = $h|0; - $f = $f|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; - var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; - var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; - var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; - var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; - var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; - var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; - var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; - var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; - var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; - var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; - var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = $0 << 1; - $20 = $2 << 1; - $21 = $4 << 1; - $22 = $6 << 1; - $23 = $8 << 1; - $24 = $10 << 1; - $25 = $12 << 1; - $26 = $14 << 1; - $27 = ($10*38)|0; - $28 = ($12*19)|0; - $29 = ($14*38)|0; - $30 = ($16*19)|0; - $31 = ($18*38)|0; - $32 = ($0|0)<(0); - $33 = $32 << 31 >> 31; - $34 = (___muldi3(($0|0),($33|0),($0|0),($33|0))|0); - $35 = tempRet0; - $36 = ($19|0)<(0); - $37 = $36 << 31 >> 31; - $38 = ($2|0)<(0); - $39 = $38 << 31 >> 31; - $40 = (___muldi3(($19|0),($37|0),($2|0),($39|0))|0); - $41 = tempRet0; - $42 = ($4|0)<(0); - $43 = $42 << 31 >> 31; - $44 = (___muldi3(($4|0),($43|0),($19|0),($37|0))|0); - $45 = tempRet0; - $46 = ($6|0)<(0); - $47 = $46 << 31 >> 31; - $48 = (___muldi3(($6|0),($47|0),($19|0),($37|0))|0); - $49 = tempRet0; - $50 = ($8|0)<(0); - $51 = $50 << 31 >> 31; - $52 = (___muldi3(($8|0),($51|0),($19|0),($37|0))|0); - $53 = tempRet0; - $54 = ($10|0)<(0); - $55 = $54 << 31 >> 31; - $56 = (___muldi3(($10|0),($55|0),($19|0),($37|0))|0); - $57 = tempRet0; - $58 = ($12|0)<(0); - $59 = $58 << 31 >> 31; - $60 = (___muldi3(($12|0),($59|0),($19|0),($37|0))|0); - $61 = tempRet0; - $62 = ($14|0)<(0); - $63 = $62 << 31 >> 31; - $64 = (___muldi3(($14|0),($63|0),($19|0),($37|0))|0); - $65 = tempRet0; - $66 = ($16|0)<(0); - $67 = $66 << 31 >> 31; - $68 = (___muldi3(($16|0),($67|0),($19|0),($37|0))|0); - $69 = tempRet0; - $70 = ($18|0)<(0); - $71 = $70 << 31 >> 31; - $72 = (___muldi3(($18|0),($71|0),($19|0),($37|0))|0); - $73 = tempRet0; - $74 = ($20|0)<(0); - $75 = $74 << 31 >> 31; - $76 = (___muldi3(($20|0),($75|0),($2|0),($39|0))|0); - $77 = tempRet0; - $78 = (___muldi3(($20|0),($75|0),($4|0),($43|0))|0); - $79 = tempRet0; - $80 = ($22|0)<(0); - $81 = $80 << 31 >> 31; - $82 = (___muldi3(($22|0),($81|0),($20|0),($75|0))|0); - $83 = tempRet0; - $84 = (___muldi3(($8|0),($51|0),($20|0),($75|0))|0); - $85 = tempRet0; - $86 = ($24|0)<(0); - $87 = $86 << 31 >> 31; - $88 = (___muldi3(($24|0),($87|0),($20|0),($75|0))|0); - $89 = tempRet0; - $90 = (___muldi3(($12|0),($59|0),($20|0),($75|0))|0); - $91 = tempRet0; - $92 = ($26|0)<(0); - $93 = $92 << 31 >> 31; - $94 = (___muldi3(($26|0),($93|0),($20|0),($75|0))|0); - $95 = tempRet0; - $96 = (___muldi3(($16|0),($67|0),($20|0),($75|0))|0); - $97 = tempRet0; - $98 = ($31|0)<(0); - $99 = $98 << 31 >> 31; - $100 = (___muldi3(($31|0),($99|0),($20|0),($75|0))|0); - $101 = tempRet0; - $102 = (___muldi3(($4|0),($43|0),($4|0),($43|0))|0); - $103 = tempRet0; - $104 = ($21|0)<(0); - $105 = $104 << 31 >> 31; - $106 = (___muldi3(($21|0),($105|0),($6|0),($47|0))|0); - $107 = tempRet0; - $108 = (___muldi3(($8|0),($51|0),($21|0),($105|0))|0); - $109 = tempRet0; - $110 = (___muldi3(($10|0),($55|0),($21|0),($105|0))|0); - $111 = tempRet0; - $112 = (___muldi3(($12|0),($59|0),($21|0),($105|0))|0); - $113 = tempRet0; - $114 = (___muldi3(($14|0),($63|0),($21|0),($105|0))|0); - $115 = tempRet0; - $116 = ($30|0)<(0); - $117 = $116 << 31 >> 31; - $118 = (___muldi3(($30|0),($117|0),($21|0),($105|0))|0); - $119 = tempRet0; - $120 = (___muldi3(($31|0),($99|0),($4|0),($43|0))|0); - $121 = tempRet0; - $122 = (___muldi3(($22|0),($81|0),($6|0),($47|0))|0); - $123 = tempRet0; - $124 = (___muldi3(($22|0),($81|0),($8|0),($51|0))|0); - $125 = tempRet0; - $126 = (___muldi3(($24|0),($87|0),($22|0),($81|0))|0); - $127 = tempRet0; - $128 = (___muldi3(($12|0),($59|0),($22|0),($81|0))|0); - $129 = tempRet0; - $130 = ($29|0)<(0); - $131 = $130 << 31 >> 31; - $132 = (___muldi3(($29|0),($131|0),($22|0),($81|0))|0); - $133 = tempRet0; - $134 = (___muldi3(($30|0),($117|0),($22|0),($81|0))|0); - $135 = tempRet0; - $136 = (___muldi3(($31|0),($99|0),($22|0),($81|0))|0); - $137 = tempRet0; - $138 = (___muldi3(($8|0),($51|0),($8|0),($51|0))|0); - $139 = tempRet0; - $140 = ($23|0)<(0); - $141 = $140 << 31 >> 31; - $142 = (___muldi3(($23|0),($141|0),($10|0),($55|0))|0); - $143 = tempRet0; - $144 = ($28|0)<(0); - $145 = $144 << 31 >> 31; - $146 = (___muldi3(($28|0),($145|0),($23|0),($141|0))|0); - $147 = tempRet0; - $148 = (___muldi3(($29|0),($131|0),($8|0),($51|0))|0); - $149 = tempRet0; - $150 = (___muldi3(($30|0),($117|0),($23|0),($141|0))|0); - $151 = tempRet0; - $152 = (___muldi3(($31|0),($99|0),($8|0),($51|0))|0); - $153 = tempRet0; - $154 = ($27|0)<(0); - $155 = $154 << 31 >> 31; - $156 = (___muldi3(($27|0),($155|0),($10|0),($55|0))|0); - $157 = tempRet0; - $158 = (___muldi3(($28|0),($145|0),($24|0),($87|0))|0); - $159 = tempRet0; - $160 = (___muldi3(($29|0),($131|0),($24|0),($87|0))|0); - $161 = tempRet0; - $162 = (___muldi3(($30|0),($117|0),($24|0),($87|0))|0); - $163 = tempRet0; - $164 = (___muldi3(($31|0),($99|0),($24|0),($87|0))|0); - $165 = tempRet0; - $166 = (___muldi3(($28|0),($145|0),($12|0),($59|0))|0); - $167 = tempRet0; - $168 = (___muldi3(($29|0),($131|0),($12|0),($59|0))|0); - $169 = tempRet0; - $170 = ($25|0)<(0); - $171 = $170 << 31 >> 31; - $172 = (___muldi3(($30|0),($117|0),($25|0),($171|0))|0); - $173 = tempRet0; - $174 = (___muldi3(($31|0),($99|0),($12|0),($59|0))|0); - $175 = tempRet0; - $176 = (___muldi3(($29|0),($131|0),($14|0),($63|0))|0); - $177 = tempRet0; - $178 = (___muldi3(($30|0),($117|0),($26|0),($93|0))|0); - $179 = tempRet0; - $180 = (___muldi3(($31|0),($99|0),($26|0),($93|0))|0); - $181 = tempRet0; - $182 = (___muldi3(($30|0),($117|0),($16|0),($67|0))|0); - $183 = tempRet0; - $184 = (___muldi3(($31|0),($99|0),($16|0),($67|0))|0); - $185 = tempRet0; - $186 = (___muldi3(($31|0),($99|0),($18|0),($71|0))|0); - $187 = tempRet0; - $188 = (_i64Add(($156|0),($157|0),($34|0),($35|0))|0); - $189 = tempRet0; - $190 = (_i64Add(($188|0),($189|0),($146|0),($147|0))|0); - $191 = tempRet0; - $192 = (_i64Add(($190|0),($191|0),($132|0),($133|0))|0); - $193 = tempRet0; - $194 = (_i64Add(($192|0),($193|0),($118|0),($119|0))|0); - $195 = tempRet0; - $196 = (_i64Add(($194|0),($195|0),($100|0),($101|0))|0); - $197 = tempRet0; - $198 = (_i64Add(($158|0),($159|0),($40|0),($41|0))|0); - $199 = tempRet0; - $200 = (_i64Add(($198|0),($199|0),($148|0),($149|0))|0); - $201 = tempRet0; - $202 = (_i64Add(($200|0),($201|0),($134|0),($135|0))|0); - $203 = tempRet0; - $204 = (_i64Add(($202|0),($203|0),($120|0),($121|0))|0); - $205 = tempRet0; - $206 = (_i64Add(($44|0),($45|0),($76|0),($77|0))|0); - $207 = tempRet0; - $208 = (_i64Add(($206|0),($207|0),($166|0),($167|0))|0); - $209 = tempRet0; - $210 = (_i64Add(($208|0),($209|0),($160|0),($161|0))|0); - $211 = tempRet0; - $212 = (_i64Add(($210|0),($211|0),($150|0),($151|0))|0); - $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($136|0),($137|0))|0); - $215 = tempRet0; - $216 = (_i64Add(($48|0),($49|0),($78|0),($79|0))|0); - $217 = tempRet0; - $218 = (_i64Add(($216|0),($217|0),($168|0),($169|0))|0); - $219 = tempRet0; - $220 = (_i64Add(($218|0),($219|0),($162|0),($163|0))|0); - $221 = tempRet0; - $222 = (_i64Add(($220|0),($221|0),($152|0),($153|0))|0); - $223 = tempRet0; - $224 = (_i64Add(($82|0),($83|0),($102|0),($103|0))|0); - $225 = tempRet0; - $226 = (_i64Add(($224|0),($225|0),($52|0),($53|0))|0); - $227 = tempRet0; - $228 = (_i64Add(($226|0),($227|0),($176|0),($177|0))|0); - $229 = tempRet0; - $230 = (_i64Add(($228|0),($229|0),($172|0),($173|0))|0); - $231 = tempRet0; - $232 = (_i64Add(($230|0),($231|0),($164|0),($165|0))|0); - $233 = tempRet0; - $234 = (_i64Add(($84|0),($85|0),($106|0),($107|0))|0); - $235 = tempRet0; - $236 = (_i64Add(($234|0),($235|0),($56|0),($57|0))|0); - $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($178|0),($179|0))|0); - $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($174|0),($175|0))|0); - $241 = tempRet0; - $242 = (_i64Add(($122|0),($123|0),($108|0),($109|0))|0); - $243 = tempRet0; - $244 = (_i64Add(($242|0),($243|0),($88|0),($89|0))|0); - $245 = tempRet0; - $246 = (_i64Add(($244|0),($245|0),($60|0),($61|0))|0); - $247 = tempRet0; - $248 = (_i64Add(($246|0),($247|0),($182|0),($183|0))|0); - $249 = tempRet0; - $250 = (_i64Add(($248|0),($249|0),($180|0),($181|0))|0); - $251 = tempRet0; - $252 = (_i64Add(($110|0),($111|0),($124|0),($125|0))|0); - $253 = tempRet0; - $254 = (_i64Add(($252|0),($253|0),($90|0),($91|0))|0); - $255 = tempRet0; - $256 = (_i64Add(($254|0),($255|0),($64|0),($65|0))|0); - $257 = tempRet0; - $258 = (_i64Add(($256|0),($257|0),($184|0),($185|0))|0); - $259 = tempRet0; - $260 = (_i64Add(($112|0),($113|0),($138|0),($139|0))|0); - $261 = tempRet0; - $262 = (_i64Add(($260|0),($261|0),($126|0),($127|0))|0); - $263 = tempRet0; - $264 = (_i64Add(($262|0),($263|0),($94|0),($95|0))|0); - $265 = tempRet0; - $266 = (_i64Add(($264|0),($265|0),($68|0),($69|0))|0); - $267 = tempRet0; - $268 = (_i64Add(($266|0),($267|0),($186|0),($187|0))|0); - $269 = tempRet0; - $270 = (_i64Add(($128|0),($129|0),($142|0),($143|0))|0); - $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($114|0),($115|0))|0); - $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($96|0),($97|0))|0); - $275 = tempRet0; - $276 = (_i64Add(($274|0),($275|0),($72|0),($73|0))|0); - $277 = tempRet0; - $278 = (_bitshift64Shl(($196|0),($197|0),1)|0); - $279 = tempRet0; - $280 = (_bitshift64Shl(($204|0),($205|0),1)|0); - $281 = tempRet0; - $282 = (_bitshift64Shl(($214|0),($215|0),1)|0); - $283 = tempRet0; - $284 = (_bitshift64Shl(($222|0),($223|0),1)|0); - $285 = tempRet0; - $286 = (_bitshift64Shl(($232|0),($233|0),1)|0); - $287 = tempRet0; - $288 = (_bitshift64Shl(($240|0),($241|0),1)|0); - $289 = tempRet0; - $290 = (_bitshift64Shl(($250|0),($251|0),1)|0); - $291 = tempRet0; - $292 = (_bitshift64Shl(($258|0),($259|0),1)|0); - $293 = tempRet0; - $294 = (_bitshift64Shl(($268|0),($269|0),1)|0); - $295 = tempRet0; - $296 = (_bitshift64Shl(($276|0),($277|0),1)|0); - $297 = tempRet0; - $298 = (_i64Add(($278|0),($279|0),33554432,0)|0); - $299 = tempRet0; - $300 = (_bitshift64Ashr(($298|0),($299|0),26)|0); - $301 = tempRet0; - $302 = (_i64Add(($300|0),($301|0),($280|0),($281|0))|0); - $303 = tempRet0; - $304 = (_bitshift64Shl(($300|0),($301|0),26)|0); - $305 = tempRet0; - $306 = (_i64Subtract(($278|0),($279|0),($304|0),($305|0))|0); - $307 = tempRet0; - $308 = (_i64Add(($286|0),($287|0),33554432,0)|0); - $309 = tempRet0; - $310 = (_bitshift64Ashr(($308|0),($309|0),26)|0); - $311 = tempRet0; - $312 = (_i64Add(($310|0),($311|0),($288|0),($289|0))|0); - $313 = tempRet0; - $314 = (_bitshift64Shl(($310|0),($311|0),26)|0); - $315 = tempRet0; - $316 = (_i64Subtract(($286|0),($287|0),($314|0),($315|0))|0); - $317 = tempRet0; - $318 = (_i64Add(($302|0),($303|0),16777216,0)|0); - $319 = tempRet0; - $320 = (_bitshift64Ashr(($318|0),($319|0),25)|0); - $321 = tempRet0; - $322 = (_i64Add(($320|0),($321|0),($282|0),($283|0))|0); - $323 = tempRet0; - $324 = (_bitshift64Shl(($320|0),($321|0),25)|0); - $325 = tempRet0; - $326 = (_i64Subtract(($302|0),($303|0),($324|0),($325|0))|0); - $327 = tempRet0; - $328 = (_i64Add(($312|0),($313|0),16777216,0)|0); - $329 = tempRet0; - $330 = (_bitshift64Ashr(($328|0),($329|0),25)|0); - $331 = tempRet0; - $332 = (_i64Add(($330|0),($331|0),($290|0),($291|0))|0); - $333 = tempRet0; - $334 = (_bitshift64Shl(($330|0),($331|0),25)|0); - $335 = tempRet0; - $336 = (_i64Subtract(($312|0),($313|0),($334|0),($335|0))|0); - $337 = tempRet0; - $338 = (_i64Add(($322|0),($323|0),33554432,0)|0); - $339 = tempRet0; - $340 = (_bitshift64Ashr(($338|0),($339|0),26)|0); - $341 = tempRet0; - $342 = (_i64Add(($340|0),($341|0),($284|0),($285|0))|0); - $343 = tempRet0; - $344 = (_bitshift64Shl(($340|0),($341|0),26)|0); - $345 = tempRet0; - $346 = (_i64Subtract(($322|0),($323|0),($344|0),($345|0))|0); - $347 = tempRet0; - $348 = (_i64Add(($332|0),($333|0),33554432,0)|0); - $349 = tempRet0; - $350 = (_bitshift64Ashr(($348|0),($349|0),26)|0); - $351 = tempRet0; - $352 = (_i64Add(($350|0),($351|0),($292|0),($293|0))|0); - $353 = tempRet0; - $354 = (_bitshift64Shl(($350|0),($351|0),26)|0); - $355 = tempRet0; - $356 = (_i64Subtract(($332|0),($333|0),($354|0),($355|0))|0); - $357 = tempRet0; - $358 = (_i64Add(($342|0),($343|0),16777216,0)|0); - $359 = tempRet0; - $360 = (_bitshift64Ashr(($358|0),($359|0),25)|0); - $361 = tempRet0; - $362 = (_i64Add(($360|0),($361|0),($316|0),($317|0))|0); - $363 = tempRet0; - $364 = (_bitshift64Shl(($360|0),($361|0),25)|0); - $365 = tempRet0; - $366 = (_i64Subtract(($342|0),($343|0),($364|0),($365|0))|0); - $367 = tempRet0; - $368 = (_i64Add(($352|0),($353|0),16777216,0)|0); - $369 = tempRet0; - $370 = (_bitshift64Ashr(($368|0),($369|0),25)|0); - $371 = tempRet0; - $372 = (_i64Add(($370|0),($371|0),($294|0),($295|0))|0); - $373 = tempRet0; - $374 = (_bitshift64Shl(($370|0),($371|0),25)|0); - $375 = tempRet0; - $376 = (_i64Subtract(($352|0),($353|0),($374|0),($375|0))|0); - $377 = tempRet0; - $378 = (_i64Add(($362|0),($363|0),33554432,0)|0); - $379 = tempRet0; - $380 = (_bitshift64Ashr(($378|0),($379|0),26)|0); - $381 = tempRet0; - $382 = (_i64Add(($336|0),($337|0),($380|0),($381|0))|0); - $383 = tempRet0; - $384 = (_bitshift64Shl(($380|0),($381|0),26)|0); - $385 = tempRet0; - $386 = (_i64Subtract(($362|0),($363|0),($384|0),($385|0))|0); - $387 = tempRet0; - $388 = (_i64Add(($372|0),($373|0),33554432,0)|0); - $389 = tempRet0; - $390 = (_bitshift64Ashr(($388|0),($389|0),26)|0); - $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($296|0),($297|0))|0); - $393 = tempRet0; - $394 = (_bitshift64Shl(($390|0),($391|0),26)|0); - $395 = tempRet0; - $396 = (_i64Subtract(($372|0),($373|0),($394|0),($395|0))|0); - $397 = tempRet0; - $398 = (_i64Add(($392|0),($393|0),16777216,0)|0); - $399 = tempRet0; - $400 = (_bitshift64Ashr(($398|0),($399|0),25)|0); - $401 = tempRet0; - $402 = (___muldi3(($400|0),($401|0),19,0)|0); - $403 = tempRet0; - $404 = (_i64Add(($402|0),($403|0),($306|0),($307|0))|0); - $405 = tempRet0; - $406 = (_bitshift64Shl(($400|0),($401|0),25)|0); - $407 = tempRet0; - $408 = (_i64Subtract(($392|0),($393|0),($406|0),($407|0))|0); - $409 = tempRet0; - $410 = (_i64Add(($404|0),($405|0),33554432,0)|0); - $411 = tempRet0; - $412 = (_bitshift64Ashr(($410|0),($411|0),26)|0); - $413 = tempRet0; - $414 = (_i64Add(($326|0),($327|0),($412|0),($413|0))|0); - $415 = tempRet0; - $416 = (_bitshift64Shl(($412|0),($413|0),26)|0); - $417 = tempRet0; - $418 = (_i64Subtract(($404|0),($405|0),($416|0),($417|0))|0); - $419 = tempRet0; - HEAP32[$h>>2] = $418; - $420 = (($h) + 4|0); - HEAP32[$420>>2] = $414; - $421 = (($h) + 8|0); - HEAP32[$421>>2] = $346; - $422 = (($h) + 12|0); - HEAP32[$422>>2] = $366; - $423 = (($h) + 16|0); - HEAP32[$423>>2] = $386; - $424 = (($h) + 20|0); - HEAP32[$424>>2] = $382; - $425 = (($h) + 24|0); - HEAP32[$425>>2] = $356; - $426 = (($h) + 28|0); - HEAP32[$426>>2] = $376; - $427 = (($h) + 32|0); - HEAP32[$427>>2] = $396; - $428 = (($h) + 36|0); - HEAP32[$428>>2] = $408; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_sub($h,$f,$g) { - $h = $h|0; - $f = $f|0; - $g = $g|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); - $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); - $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); - $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); - $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); - $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); - $37 = HEAP32[$36>>2]|0; - $38 = (($0) - ($19))|0; - $39 = (($2) - ($21))|0; - $40 = (($4) - ($23))|0; - $41 = (($6) - ($25))|0; - $42 = (($8) - ($27))|0; - $43 = (($10) - ($29))|0; - $44 = (($12) - ($31))|0; - $45 = (($14) - ($33))|0; - $46 = (($16) - ($35))|0; - $47 = (($18) - ($37))|0; - HEAP32[$h>>2] = $38; - $48 = (($h) + 4|0); - HEAP32[$48>>2] = $39; - $49 = (($h) + 8|0); - HEAP32[$49>>2] = $40; - $50 = (($h) + 12|0); - HEAP32[$50>>2] = $41; - $51 = (($h) + 16|0); - HEAP32[$51>>2] = $42; - $52 = (($h) + 20|0); - HEAP32[$52>>2] = $43; - $53 = (($h) + 24|0); - HEAP32[$53>>2] = $44; - $54 = (($h) + 28|0); - HEAP32[$54>>2] = $45; - $55 = (($h) + 32|0); - HEAP32[$55>>2] = $46; - $56 = (($h) + 36|0); - HEAP32[$56>>2] = $47; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_tobytes($s,$h) { - $s = $s|0; - $h = $h|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; - var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; - var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; - var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; - var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$h>>2]|0; - $1 = (($h) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($h) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($h) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($h) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($h) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($h) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($h) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($h) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($h) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($18*19)|0; - $20 = (($19) + 16777216)|0; - $21 = $20 >> 25; - $22 = (($21) + ($0))|0; - $23 = $22 >> 26; - $24 = (($23) + ($2))|0; - $25 = $24 >> 25; - $26 = (($25) + ($4))|0; - $27 = $26 >> 26; - $28 = (($27) + ($6))|0; - $29 = $28 >> 25; - $30 = (($29) + ($8))|0; - $31 = $30 >> 26; - $32 = (($31) + ($10))|0; - $33 = $32 >> 25; - $34 = (($33) + ($12))|0; - $35 = $34 >> 26; - $36 = (($35) + ($14))|0; - $37 = $36 >> 25; - $38 = (($37) + ($16))|0; - $39 = $38 >> 26; - $40 = (($39) + ($18))|0; - $41 = $40 >> 25; - $42 = ($41*19)|0; - $43 = (($42) + ($0))|0; - $44 = $43 >> 26; - $45 = (($44) + ($2))|0; - $46 = $44 << 26; - $47 = (($43) - ($46))|0; - $48 = $45 >> 25; - $49 = (($48) + ($4))|0; - $50 = $48 << 25; - $51 = (($45) - ($50))|0; - $52 = $49 >> 26; - $53 = (($52) + ($6))|0; - $54 = $52 << 26; - $55 = (($49) - ($54))|0; - $56 = $53 >> 25; - $57 = (($56) + ($8))|0; - $58 = $56 << 25; - $59 = (($53) - ($58))|0; - $60 = $57 >> 26; - $61 = (($60) + ($10))|0; - $62 = $60 << 26; - $63 = (($57) - ($62))|0; - $64 = $61 >> 25; - $65 = (($64) + ($12))|0; - $66 = $64 << 25; - $67 = (($61) - ($66))|0; - $68 = $65 >> 26; - $69 = (($68) + ($14))|0; - $70 = $68 << 26; - $71 = (($65) - ($70))|0; - $72 = $69 >> 25; - $73 = (($72) + ($16))|0; - $74 = $72 << 25; - $75 = (($69) - ($74))|0; - $76 = $73 >> 26; - $77 = (($76) + ($18))|0; - $78 = $76 << 26; - $79 = (($73) - ($78))|0; - $80 = $77 & 33554431; - $81 = $47&255; - HEAP8[$s>>0] = $81; - $82 = $47 >>> 8; - $83 = $82&255; - $84 = (($s) + 1|0); - HEAP8[$84>>0] = $83; - $85 = $47 >>> 16; - $86 = $85&255; - $87 = (($s) + 2|0); - HEAP8[$87>>0] = $86; - $88 = $47 >>> 24; - $89 = $51 << 2; - $90 = $89 | $88; - $91 = $90&255; - $92 = (($s) + 3|0); - HEAP8[$92>>0] = $91; - $93 = $51 >>> 6; - $94 = $93&255; - $95 = (($s) + 4|0); - HEAP8[$95>>0] = $94; - $96 = $51 >>> 14; - $97 = $96&255; - $98 = (($s) + 5|0); - HEAP8[$98>>0] = $97; - $99 = $51 >>> 22; - $100 = $55 << 3; - $101 = $100 | $99; - $102 = $101&255; - $103 = (($s) + 6|0); - HEAP8[$103>>0] = $102; - $104 = $55 >>> 5; - $105 = $104&255; - $106 = (($s) + 7|0); - HEAP8[$106>>0] = $105; - $107 = $55 >>> 13; - $108 = $107&255; - $109 = (($s) + 8|0); - HEAP8[$109>>0] = $108; - $110 = $55 >>> 21; - $111 = $59 << 5; - $112 = $111 | $110; - $113 = $112&255; - $114 = (($s) + 9|0); - HEAP8[$114>>0] = $113; - $115 = $59 >>> 3; - $116 = $115&255; - $117 = (($s) + 10|0); - HEAP8[$117>>0] = $116; - $118 = $59 >>> 11; - $119 = $118&255; - $120 = (($s) + 11|0); - HEAP8[$120>>0] = $119; - $121 = $59 >>> 19; - $122 = $63 << 6; - $123 = $122 | $121; - $124 = $123&255; - $125 = (($s) + 12|0); - HEAP8[$125>>0] = $124; - $126 = $63 >>> 2; - $127 = $126&255; - $128 = (($s) + 13|0); - HEAP8[$128>>0] = $127; - $129 = $63 >>> 10; - $130 = $129&255; - $131 = (($s) + 14|0); - HEAP8[$131>>0] = $130; - $132 = $63 >>> 18; - $133 = $132&255; - $134 = (($s) + 15|0); - HEAP8[$134>>0] = $133; - $135 = $67&255; - $136 = (($s) + 16|0); - HEAP8[$136>>0] = $135; - $137 = $67 >>> 8; - $138 = $137&255; - $139 = (($s) + 17|0); - HEAP8[$139>>0] = $138; - $140 = $67 >>> 16; - $141 = $140&255; - $142 = (($s) + 18|0); - HEAP8[$142>>0] = $141; - $143 = $67 >>> 24; - $144 = $71 << 1; - $145 = $144 | $143; - $146 = $145&255; - $147 = (($s) + 19|0); - HEAP8[$147>>0] = $146; - $148 = $71 >>> 7; - $149 = $148&255; - $150 = (($s) + 20|0); - HEAP8[$150>>0] = $149; - $151 = $71 >>> 15; - $152 = $151&255; - $153 = (($s) + 21|0); - HEAP8[$153>>0] = $152; - $154 = $71 >>> 23; - $155 = $75 << 3; - $156 = $155 | $154; - $157 = $156&255; - $158 = (($s) + 22|0); - HEAP8[$158>>0] = $157; - $159 = $75 >>> 5; - $160 = $159&255; - $161 = (($s) + 23|0); - HEAP8[$161>>0] = $160; - $162 = $75 >>> 13; - $163 = $162&255; - $164 = (($s) + 24|0); - HEAP8[$164>>0] = $163; - $165 = $75 >>> 21; - $166 = $79 << 4; - $167 = $166 | $165; - $168 = $167&255; - $169 = (($s) + 25|0); - HEAP8[$169>>0] = $168; - $170 = $79 >>> 4; - $171 = $170&255; - $172 = (($s) + 26|0); - HEAP8[$172>>0] = $171; - $173 = $79 >>> 12; - $174 = $173&255; - $175 = (($s) + 27|0); - HEAP8[$175>>0] = $174; - $176 = $79 >>> 20; - $177 = $80 << 6; - $178 = $176 | $177; - $179 = $178&255; - $180 = (($s) + 28|0); - HEAP8[$180>>0] = $179; - $181 = $77 >>> 2; - $182 = $181&255; - $183 = (($s) + 29|0); - HEAP8[$183>>0] = $182; - $184 = $77 >>> 10; - $185 = $184&255; - $186 = (($s) + 30|0); - HEAP8[$186>>0] = $185; - $187 = $80 >>> 18; - $188 = $187&255; - $189 = (($s) + 31|0); - HEAP8[$189>>0] = $188; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_add($r,$p,$q) { - $r = $r|0; - $p = $p|0; - $q = $q|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); - $3 = (($q) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); - $4 = (($r) + 120|0); - $5 = (($q) + 120|0); - $6 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - $8 = (($q) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); - _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); - _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($2,$t0,$4); - _crypto_sign_ed25519_ref10_fe_sub($4,$t0,$4); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { - $r = $r|0; - $a = $a|0; - $A = $A|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, $A2 = 0, $Ai = 0, $aslide = 0, $bslide = 0, $i$0$lcssa = 0, $i$02 = 0, $i$11 = 0, $t = 0, $u = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2272|0; - $aslide = sp + 2016|0; - $bslide = sp + 1760|0; - $Ai = sp + 480|0; - $t = sp + 320|0; - $u = sp + 160|0; - $A2 = sp; - _slide($aslide,$a); - _slide($bslide,$b); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($Ai,$A); - _crypto_sign_ed25519_ref10_ge_p3_dbl($t,$A); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($A2,$t); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$Ai); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $0 = (($Ai) + 160|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($0,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$0); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $1 = (($Ai) + 320|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($1,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$1); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $2 = (($Ai) + 480|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($2,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$2); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $3 = (($Ai) + 640|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($3,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$3); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $4 = (($Ai) + 800|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($4,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$4); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $5 = (($Ai) + 960|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($5,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$5); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $6 = (($Ai) + 1120|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($6,$u); - _crypto_sign_ed25519_ref10_ge_p2_0($r); - $i$02 = 255; - while(1) { - $8 = (($aslide) + ($i$02)|0); - $9 = HEAP8[$8>>0]|0; - $10 = ($9<<24>>24)==(0); - if (!($10)) { - $i$0$lcssa = $i$02; - break; - } - $11 = (($bslide) + ($i$02)|0); - $12 = HEAP8[$11>>0]|0; - $13 = ($12<<24>>24)==(0); - $14 = (($i$02) + -1)|0; - if (!($13)) { - $i$0$lcssa = $i$02; - break; - } - $7 = ($i$02|0)>(0); - if ($7) { - $i$02 = $14; - } else { - $i$0$lcssa = $14; - break; - } - } - $15 = ($i$0$lcssa|0)>(-1); - if ($15) { - $i$11 = $i$0$lcssa; - } else { - STACKTOP = sp;return; - } - while(1) { - _crypto_sign_ed25519_ref10_ge_p2_dbl($t,$r); - $16 = (($aslide) + ($i$11)|0); - $17 = HEAP8[$16>>0]|0; - $18 = ($17<<24>>24)>(0); - if ($18) { - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $19 = HEAP8[$16>>0]|0; - $20 = $19 << 24 >> 24; - $21 = (($20|0) / 2)&-1; - $22 = (($Ai) + (($21*160)|0)|0); - _crypto_sign_ed25519_ref10_ge_add($t,$u,$22); - } else { - $23 = ($17<<24>>24)<(0); - if ($23) { - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $24 = HEAP8[$16>>0]|0; - $25 = $24 << 24 >> 24; - $26 = (($25|0) / -2)&-1; - $27 = (($Ai) + (($26*160)|0)|0); - _crypto_sign_ed25519_ref10_ge_sub($t,$u,$27); - } - } - $28 = (($bslide) + ($i$11)|0); - $29 = HEAP8[$28>>0]|0; - $30 = ($29<<24>>24)>(0); - if ($30) { - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $31 = HEAP8[$28>>0]|0; - $32 = $31 << 24 >> 24; - $33 = (($32|0) / 2)&-1; - $34 = (40 + (($33*120)|0)|0); - _crypto_sign_ed25519_ref10_ge_madd($t,$u,$34); - } else { - $35 = ($29<<24>>24)<(0); - if ($35) { - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $36 = HEAP8[$28>>0]|0; - $37 = $36 << 24 >> 24; - $38 = (($37|0) / -2)&-1; - $39 = (40 + (($38*120)|0)|0); - _crypto_sign_ed25519_ref10_ge_msub($t,$u,$39); - } - } - _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($r,$t); - $40 = (($i$11) + -1)|0; - $41 = ($i$11|0)>(0); - if ($41) { - $i$11 = $40; - } else { - break; - } - } - STACKTOP = sp;return; -} -function _slide($r,$a) { - $r = $r|0; - $a = $a|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$03 = 0, $exitcond = 0, $exitcond10 = 0; - var $i$08 = 0, $i$15 = 0, $k$01 = 0, label = 0, sp = 0; - sp = STACKTOP; - $i$08 = 0; - while(1) { - $0 = $i$08 >> 3; - $1 = (($a) + ($0)|0); - $2 = HEAP8[$1>>0]|0; - $3 = $2&255; - $4 = $i$08 & 7; - $5 = $3 >>> $4; - $6 = $5 & 1; - $7 = $6&255; - $8 = (($r) + ($i$08)|0); - HEAP8[$8>>0] = $7; - $9 = (($i$08) + 1)|0; - $exitcond10 = ($9|0)==(256); - if ($exitcond10) { - $i$15 = 0; - break; - } else { - $i$08 = $9; - } - } - while(1) { - $10 = (($r) + ($i$15)|0); - $11 = HEAP8[$10>>0]|0; - $12 = ($11<<24>>24)==(0); - L5: do { - if (!($12)) { - $b$03 = 1; - while(1) { - $13 = (($b$03) + ($i$15))|0; - $14 = ($13|0)<(256); - if (!($14)) { - break L5; - } - $15 = (($r) + ($13)|0); - $16 = HEAP8[$15>>0]|0; - $17 = ($16<<24>>24)==(0); - L9: do { - if (!($17)) { - $18 = HEAP8[$10>>0]|0; - $19 = $18 << 24 >> 24; - $20 = $16 << 24 >> 24; - $21 = $20 << $b$03; - $22 = (($19) + ($21))|0; - $23 = ($22|0)<(16); - if ($23) { - $24 = $22&255; - HEAP8[$10>>0] = $24; - HEAP8[$15>>0] = 0; - break; - } - $25 = (($19) - ($21))|0; - $26 = ($25|0)>(-16); - if (!($26)) { - break L5; - } - $27 = $25&255; - HEAP8[$10>>0] = $27; - $28 = ($13|0)<(256); - if ($28) { - $k$01 = $13; - while(1) { - $29 = (($r) + ($k$01)|0); - $30 = HEAP8[$29>>0]|0; - $31 = ($30<<24>>24)==(0); - if ($31) { - break; - } - HEAP8[$29>>0] = 0; - $32 = (($k$01) + 1)|0; - $33 = ($32|0)<(256); - if ($33) { - $k$01 = $32; - } else { - break L9; - } - } - HEAP8[$29>>0] = 1; - } - } - } while(0); - $34 = (($b$03) + 1)|0; - $35 = ($34|0)<(7); - if ($35) { - $b$03 = $34; - } else { - break; - } - } - } - } while(0); - $36 = (($i$15) + 1)|0; - $exitcond = ($36|0)==(256); - if ($exitcond) { - break; - } else { - $i$15 = $36; - } - } - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { - $h = $h|0; - $s = $s|0; - var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $check = 0, $u = 0, $v = 0, $v3 = 0, $vxx = 0, label = 0; - var sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 208|0; - $u = sp + 160|0; - $v = sp + 120|0; - $v3 = sp + 80|0; - $vxx = sp + 40|0; - $check = sp; - $0 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_frombytes($0,$s); - $1 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_1($1); - _crypto_sign_ed25519_ref10_fe_sq($u,$0); - _crypto_sign_ed25519_ref10_fe_mul($v,$u,1000); - _crypto_sign_ed25519_ref10_fe_sub($u,$u,$1); - _crypto_sign_ed25519_ref10_fe_add($v,$v,$1); - _crypto_sign_ed25519_ref10_fe_sq($v3,$v); - _crypto_sign_ed25519_ref10_fe_mul($v3,$v3,$v); - _crypto_sign_ed25519_ref10_fe_sq($h,$v3); - _crypto_sign_ed25519_ref10_fe_mul($h,$h,$v); - _crypto_sign_ed25519_ref10_fe_mul($h,$h,$u); - _crypto_sign_ed25519_ref10_fe_pow22523($h,$h); - _crypto_sign_ed25519_ref10_fe_mul($h,$h,$v3); - _crypto_sign_ed25519_ref10_fe_mul($h,$h,$u); - _crypto_sign_ed25519_ref10_fe_sq($vxx,$h); - _crypto_sign_ed25519_ref10_fe_mul($vxx,$vxx,$v); - _crypto_sign_ed25519_ref10_fe_sub($check,$vxx,$u); - $2 = (_crypto_sign_ed25519_ref10_fe_isnonzero($check)|0); - $3 = ($2|0)==(0); - do { - if (!($3)) { - _crypto_sign_ed25519_ref10_fe_add($check,$vxx,$u); - $4 = (_crypto_sign_ed25519_ref10_fe_isnonzero($check)|0); - $5 = ($4|0)==(0); - if ($5) { - _crypto_sign_ed25519_ref10_fe_mul($h,$h,1040); - break; - } else { - $$0 = -1; - STACKTOP = sp;return ($$0|0); - } - } - } while(0); - $6 = (_crypto_sign_ed25519_ref10_fe_isnegative($h)|0); - $7 = (($s) + 31|0); - $8 = HEAP8[$7>>0]|0; - $9 = $8&255; - $10 = $9 >>> 7; - $11 = ($6|0)==($10|0); - if ($11) { - _crypto_sign_ed25519_ref10_fe_neg($h,$h); - } - $12 = (($h) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($12,$h,$0); - $$0 = 0; - STACKTOP = sp;return ($$0|0); -} -function _crypto_sign_ed25519_ref10_ge_madd($r,$p,$q) { - $r = $r|0; - $p = $p|0; - $q = $q|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); - $3 = (($q) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); - $4 = (($r) + 120|0); - $5 = (($q) + 80|0); - $6 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); - _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($2,$t0,$4); - _crypto_sign_ed25519_ref10_fe_sub($4,$t0,$4); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_msub($r,$p,$q) { - $r = $r|0; - $p = $p|0; - $q = $q|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($q) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); - _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); - $4 = (($r) + 120|0); - $5 = (($q) + 80|0); - $6 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); - _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); - _crypto_sign_ed25519_ref10_fe_sub($2,$t0,$4); - _crypto_sign_ed25519_ref10_fe_add($4,$t0,$4); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); - $1 = (($r) + 40|0); - $2 = (($p) + 40|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); - $4 = (($r) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); - $1 = (($r) + 40|0); - $2 = (($p) + 40|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); - $4 = (($r) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); - $5 = (($r) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($5,$p,$2); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p2_0($h) { - $h = $h|0; - var $0 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - _crypto_sign_ed25519_ref10_fe_0($h); - $0 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_1($1); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - _crypto_sign_ed25519_ref10_fe_sq($r,$p); - $0 = (($r) + 80|0); - $1 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_sq($0,$1); - $2 = (($r) + 120|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_sq2($2,$3); - $4 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($4,$p,$1); - _crypto_sign_ed25519_ref10_fe_sq($t0,$4); - _crypto_sign_ed25519_ref10_fe_add($4,$0,$r); - _crypto_sign_ed25519_ref10_fe_sub($0,$0,$r); - _crypto_sign_ed25519_ref10_fe_sub($r,$t0,$4); - _crypto_sign_ed25519_ref10_fe_sub($2,$2,$0); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_0($h) { - $h = $h|0; - var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - _crypto_sign_ed25519_ref10_fe_0($h); - $0 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_1($1); - $2 = (($h) + 120|0); - _crypto_sign_ed25519_ref10_fe_0($2); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_dbl($r,$p) { - $r = $r|0; - $p = $p|0; - var $q = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $q = sp; - _crypto_sign_ed25519_ref10_ge_p3_to_p2($q,$p); - _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$q); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_to_cached($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_copy($2,$3); - $4 = (($r) + 120|0); - $5 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,1080); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_to_p2($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - _crypto_sign_ed25519_ref10_fe_copy($r,$p); - $0 = (($r) + 40|0); - $1 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_copy($0,$1); - $2 = (($r) + 80|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_copy($2,$3); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_tobytes($s,$h) { - $s = $s|0; - $h = $h|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $recip = 0, $x = 0, $y = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $recip = sp + 80|0; - $x = sp + 40|0; - $y = sp; - $0 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_invert($recip,$0); - _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); - $1 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); - _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); - $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); - $3 = $2 << 7; - $4 = (($s) + 31|0); - $5 = HEAP8[$4>>0]|0; - $6 = $5&255; - $7 = $6 ^ $3; - $8 = $7&255; - HEAP8[$4>>0] = $8; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_precomp_0($h) { - $h = $h|0; - var $0 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - _crypto_sign_ed25519_ref10_fe_1($h); - $0 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_0($1); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { - $h = $h|0; - $a = $a|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $carry$04 = 0, $e = 0, $exitcond = 0, $exitcond7 = 0; - var $i$06 = 0, $i$15 = 0, $i$23 = 0, $i$32 = 0, $r = 0, $s = 0, $sext = 0, $sext1 = 0, $t = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 464|0; - $e = sp + 400|0; - $r = sp + 240|0; - $s = sp + 120|0; - $t = sp; - $i$06 = 0; - while(1) { - $0 = (($a) + ($i$06)|0); - $1 = HEAP8[$0>>0]|0; - $2 = $1&255; - $3 = $2 & 15; - $4 = $3&255; - $5 = $i$06 << 1; - $6 = (($e) + ($5)|0); - HEAP8[$6>>0] = $4; - $7 = HEAP8[$0>>0]|0; - $8 = ($7&255) >>> 4; - $9 = $5 | 1; - $10 = (($e) + ($9)|0); - HEAP8[$10>>0] = $8; - $11 = (($i$06) + 1)|0; - $exitcond7 = ($11|0)==(32); - if ($exitcond7) { - $carry$04 = 0;$i$15 = 0; - break; - } else { - $i$06 = $11; - } - } - while(1) { - $12 = (($e) + ($i$15)|0); - $13 = HEAP8[$12>>0]|0; - $14 = $13&255; - $15 = (($14) + ($carry$04))|0; - $sext = $15 << 24; - $sext1 = (($sext) + 134217728)|0; - $16 = $sext1 >> 28; - $17 = $16 << 4; - $18 = (($15) - ($17))|0; - $19 = $18&255; - HEAP8[$12>>0] = $19; - $20 = (($i$15) + 1)|0; - $exitcond = ($20|0)==(63); - if ($exitcond) { - break; - } else { - $carry$04 = $16;$i$15 = $20; - } - } - $21 = (($e) + 63|0); - $22 = HEAP8[$21>>0]|0; - $23 = $22&255; - $24 = (($23) + ($16))|0; - $25 = $24&255; - HEAP8[$21>>0] = $25; - _crypto_sign_ed25519_ref10_ge_p3_0($h); - $i$23 = 1; - while(1) { - $26 = (($i$23|0) / 2)&-1; - $27 = (($e) + ($i$23)|0); - $28 = HEAP8[$27>>0]|0; - _select($t,$26,$28); - _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); - $29 = (($i$23) + 2)|0; - $30 = ($29|0)<(64); - if ($30) { - $i$23 = $29; - } else { - break; - } - } - _crypto_sign_ed25519_ref10_ge_p3_dbl($r,$h); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($s,$r); - _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$s); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($s,$r); - _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$s); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($s,$r); - _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$s); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); - $i$32 = 0; - while(1) { - $31 = (($i$32|0) / 2)&-1; - $32 = (($e) + ($i$32)|0); - $33 = HEAP8[$32>>0]|0; - _select($t,$31,$33); - _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); - $34 = (($i$32) + 2)|0; - $35 = ($34|0)<(64); - if ($35) { - $i$32 = $34; - } else { - break; - } - } - STACKTOP = sp;return; -} -function _select($t,$pos,$b) { - $t = $t|0; - $pos = $pos|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $minust = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $minust = sp; - $0 = (_negative($b)|0); - $1 = $b << 24 >> 24; - $2 = $0&255; - $3 = (0 - ($2))|0; - $4 = $1 & $3; - $5 = $4 << 1; - $6 = (($1) - ($5))|0; - $7 = $6&255; - _crypto_sign_ed25519_ref10_ge_precomp_0($t); - $8 = (1120 + (($pos*960)|0)|0); - $9 = (_equal($7,1)|0); - _cmov($t,$8,$9); - $10 = ((1120 + (($pos*960)|0)|0) + 120|0); - $11 = (_equal($7,2)|0); - _cmov($t,$10,$11); - $12 = ((1120 + (($pos*960)|0)|0) + 240|0); - $13 = (_equal($7,3)|0); - _cmov($t,$12,$13); - $14 = ((1120 + (($pos*960)|0)|0) + 360|0); - $15 = (_equal($7,4)|0); - _cmov($t,$14,$15); - $16 = ((1120 + (($pos*960)|0)|0) + 480|0); - $17 = (_equal($7,5)|0); - _cmov($t,$16,$17); - $18 = ((1120 + (($pos*960)|0)|0) + 600|0); - $19 = (_equal($7,6)|0); - _cmov($t,$18,$19); - $20 = ((1120 + (($pos*960)|0)|0) + 720|0); - $21 = (_equal($7,7)|0); - _cmov($t,$20,$21); - $22 = ((1120 + (($pos*960)|0)|0) + 840|0); - $23 = (_equal($7,8)|0); - _cmov($t,$22,$23); - $24 = (($t) + 40|0); - _crypto_sign_ed25519_ref10_fe_copy($minust,$24); - $25 = (($minust) + 40|0); - _crypto_sign_ed25519_ref10_fe_copy($25,$t); - $26 = (($minust) + 80|0); - $27 = (($t) + 80|0); - _crypto_sign_ed25519_ref10_fe_neg($26,$27); - _cmov($t,$minust,$0); - STACKTOP = sp;return; -} -function _negative($b) { - $b = $b|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $b << 24 >> 24; - $1 = ($0|0)<(0); - $2 = $1 << 31 >> 31; - $3 = (_bitshift64Lshr(($0|0),($2|0),63)|0); - $4 = tempRet0; - $5 = $3&255; - STACKTOP = sp;return ($5|0); -} -function _equal($b,$c) { - $b = $b|0; - $c = $c|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $c ^ $b; - $1 = $0&255; - $2 = (($1) + -1)|0; - $3 = $2 >>> 31; - $4 = $3&255; - STACKTOP = sp;return ($4|0); -} -function _cmov($t,$u,$b) { - $t = $t|0; - $u = $u|0; - $b = $b|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $b&255; - _crypto_sign_ed25519_ref10_fe_cmov($t,$u,$0); - $1 = (($t) + 40|0); - $2 = (($u) + 40|0); - _crypto_sign_ed25519_ref10_fe_cmov($1,$2,$0); - $3 = (($t) + 80|0); - $4 = (($u) + 80|0); - _crypto_sign_ed25519_ref10_fe_cmov($3,$4,$0); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_sub($r,$p,$q) { - $r = $r|0; - $p = $p|0; - $q = $q|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($q) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); - _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); - $4 = (($r) + 120|0); - $5 = (($q) + 120|0); - $6 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - $8 = (($q) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); - _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); - _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); - _crypto_sign_ed25519_ref10_fe_sub($2,$t0,$4); - _crypto_sign_ed25519_ref10_fe_add($4,$t0,$4); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_tobytes($s,$h) { - $s = $s|0; - $h = $h|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $recip = 0, $x = 0, $y = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $recip = sp + 80|0; - $x = sp + 40|0; - $y = sp; - $0 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_invert($recip,$0); - _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); - $1 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); - _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); - $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); - $3 = $2 << 7; - $4 = (($s) + 31|0); - $5 = HEAP8[$4>>0]|0; - $6 = $5&255; - $7 = $6 ^ $3; - $8 = $7&255; - HEAP8[$4>>0] = $8; - STACKTOP = sp;return; -} -function _crypto_sign_edwards25519sha512batch_ref10_open($m,$mlen,$sm,$0,$1,$pk) { - $m = $m|0; - $mlen = $mlen|0; - $sm = $sm|0; - $0 = $0|0; - $1 = $1|0; - $pk = $pk|0; - var $$0 = 0, $$sum = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $A = 0, $R = 0, $h = 0, $pkcopy1 = 0, $rcheck = 0, $rcopy = 0, $scopy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 480|0; - $pkcopy1 = sp + 440|0; - $rcopy = sp + 408|0; - $scopy = sp + 376|0; - $h = sp + 312|0; - $rcheck = sp + 280|0; - $A = sp + 120|0; - $R = sp; - $2 = ($1>>>0)<(0); - $3 = ($0>>>0)<(64); - $4 = ($1|0)==(0); - $5 = $4 & $3; - $6 = $2 | $5; - if (!($6)) { - $7 = (($sm) + 63|0); - $8 = HEAP8[$7>>0]|0; - $9 = ($8&255)>(31); - if (!($9)) { - $10 = (_crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($A,$pk)|0); - $11 = ($10|0)==(0); - if ($11) { - dest=$pkcopy1+0|0; src=$pk+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - dest=$rcopy+0|0; src=$sm+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $12 = (($sm) + 32|0); - dest=$scopy+0|0; src=$12+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - _memmove(($m|0),($sm|0),($0|0))|0; - $13 = (($m) + 32|0); - dest=$13+0|0; src=$pkcopy1+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - (_crypto_hash_sha512_ref($h,$m,$0,$1)|0); - _crypto_sign_ed25519_ref10_sc_reduce($h); - _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($R,$h,$A,$scopy); - _crypto_sign_ed25519_ref10_ge_tobytes($rcheck,$R); - $14 = (_crypto_verify_32_ref($rcheck,$rcopy)|0); - $15 = ($14|0)==(0); - if ($15) { - $16 = (($m) + 64|0); - $17 = (_i64Add(($0|0),($1|0),-64,-1)|0); - $18 = tempRet0; - _memmove(($m|0),($16|0),($17|0))|0; - $$sum = (($0) + -64)|0; - $19 = (($m) + ($$sum)|0); - dest=$19+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); - $20 = $mlen; - $21 = $20; - HEAP32[$21>>2] = $17; - $22 = (($20) + 4)|0; - $23 = $22; - HEAP32[$23>>2] = $18; - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - } - } - } - $24 = $mlen; - $25 = $24; - HEAP32[$25>>2] = -1; - $26 = (($24) + 4)|0; - $27 = $26; - HEAP32[$27>>2] = -1; - _memset(($m|0),0,($0|0))|0; - $$0 = -1; - STACKTOP = sp;return ($$0|0); -} -function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { - $s = $s|0; - $a = $a|0; - $b = $b|0; - $c = $c|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; - var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; - var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; - var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; - var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; - var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; - var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0; - var $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0; - var $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0; - var $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0; - var $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0; - var $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0; - var $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0, $123 = 0, $1230 = 0; - var $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0, $1248 = 0, $1249 = 0; - var $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0, $1266 = 0, $1267 = 0; - var $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $1274 = 0, $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0, $1283 = 0, $1284 = 0, $1285 = 0; - var $1286 = 0, $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0, $1291 = 0, $1292 = 0, $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0, $1300 = 0, $1301 = 0, $1302 = 0; - var $1303 = 0, $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0, $1309 = 0, $131 = 0, $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0, $1319 = 0, $132 = 0, $1320 = 0; - var $1321 = 0, $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0, $1327 = 0, $1328 = 0, $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0, $1337 = 0, $1338 = 0, $1339 = 0; - var $134 = 0, $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0, $1345 = 0, $1346 = 0, $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0, $1355 = 0, $1356 = 0, $1357 = 0; - var $1358 = 0, $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0, $1363 = 0, $1364 = 0, $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0, $1373 = 0, $1374 = 0, $1375 = 0; - var $1376 = 0, $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0, $1381 = 0, $1382 = 0, $1383 = 0, $1384 = 0, $1385 = 0, $1386 = 0, $1387 = 0, $1388 = 0, $1389 = 0, $139 = 0, $1390 = 0, $1391 = 0, $1392 = 0, $1393 = 0; - var $1394 = 0, $1395 = 0, $1396 = 0, $1397 = 0, $1398 = 0, $1399 = 0, $14 = 0, $140 = 0, $1400 = 0, $1401 = 0, $1402 = 0, $1403 = 0, $1404 = 0, $1405 = 0, $1406 = 0, $1407 = 0, $1408 = 0, $1409 = 0, $141 = 0, $1410 = 0; - var $1411 = 0, $1412 = 0, $1413 = 0, $1414 = 0, $1415 = 0, $1416 = 0, $1417 = 0, $1418 = 0, $1419 = 0, $142 = 0, $1420 = 0, $1421 = 0, $1422 = 0, $1423 = 0, $1424 = 0, $1425 = 0, $1426 = 0, $1427 = 0, $1428 = 0, $1429 = 0; - var $143 = 0, $1430 = 0, $1431 = 0, $1432 = 0, $1433 = 0, $1434 = 0, $1435 = 0, $1436 = 0, $1437 = 0, $1438 = 0, $1439 = 0, $144 = 0, $1440 = 0, $1441 = 0, $1442 = 0, $1443 = 0, $1444 = 0, $1445 = 0, $1446 = 0, $1447 = 0; - var $1448 = 0, $1449 = 0, $145 = 0, $1450 = 0, $1451 = 0, $1452 = 0, $1453 = 0, $1454 = 0, $1455 = 0, $1456 = 0, $1457 = 0, $1458 = 0, $1459 = 0, $146 = 0, $1460 = 0, $1461 = 0, $1462 = 0, $1463 = 0, $1464 = 0, $1465 = 0; - var $1466 = 0, $1467 = 0, $1468 = 0, $1469 = 0, $147 = 0, $1470 = 0, $1471 = 0, $1472 = 0, $1473 = 0, $1474 = 0, $1475 = 0, $1476 = 0, $1477 = 0, $1478 = 0, $1479 = 0, $148 = 0, $1480 = 0, $1481 = 0, $1482 = 0, $1483 = 0; - var $1484 = 0, $1485 = 0, $1486 = 0, $1487 = 0, $1488 = 0, $1489 = 0, $149 = 0, $1490 = 0, $1491 = 0, $1492 = 0, $1493 = 0, $1494 = 0, $1495 = 0, $1496 = 0, $1497 = 0, $1498 = 0, $1499 = 0, $15 = 0, $150 = 0, $1500 = 0; - var $1501 = 0, $1502 = 0, $1503 = 0, $1504 = 0, $1505 = 0, $1506 = 0, $1507 = 0, $1508 = 0, $1509 = 0, $151 = 0, $1510 = 0, $1511 = 0, $1512 = 0, $1513 = 0, $1514 = 0, $1515 = 0, $1516 = 0, $1517 = 0, $1518 = 0, $1519 = 0; - var $152 = 0, $1520 = 0, $1521 = 0, $1522 = 0, $1523 = 0, $1524 = 0, $1525 = 0, $1526 = 0, $1527 = 0, $1528 = 0, $1529 = 0, $153 = 0, $1530 = 0, $1531 = 0, $1532 = 0, $1533 = 0, $1534 = 0, $1535 = 0, $1536 = 0, $1537 = 0; - var $1538 = 0, $1539 = 0, $154 = 0, $1540 = 0, $1541 = 0, $1542 = 0, $1543 = 0, $1544 = 0, $1545 = 0, $1546 = 0, $1547 = 0, $1548 = 0, $1549 = 0, $155 = 0, $1550 = 0, $1551 = 0, $1552 = 0, $1553 = 0, $1554 = 0, $1555 = 0; - var $1556 = 0, $1557 = 0, $1558 = 0, $1559 = 0, $156 = 0, $1560 = 0, $1561 = 0, $1562 = 0, $1563 = 0, $1564 = 0, $1565 = 0, $1566 = 0, $1567 = 0, $1568 = 0, $1569 = 0, $157 = 0, $1570 = 0, $1571 = 0, $1572 = 0, $1573 = 0; - var $1574 = 0, $1575 = 0, $1576 = 0, $1577 = 0, $1578 = 0, $1579 = 0, $158 = 0, $1580 = 0, $1581 = 0, $1582 = 0, $1583 = 0, $1584 = 0, $1585 = 0, $1586 = 0, $1587 = 0, $1588 = 0, $1589 = 0, $159 = 0, $1590 = 0, $1591 = 0; - var $1592 = 0, $1593 = 0, $1594 = 0, $1595 = 0, $1596 = 0, $1597 = 0, $1598 = 0, $1599 = 0, $16 = 0, $160 = 0, $1600 = 0, $1601 = 0, $1602 = 0, $1603 = 0, $1604 = 0, $1605 = 0, $1606 = 0, $1607 = 0, $1608 = 0, $1609 = 0; - var $161 = 0, $1610 = 0, $1611 = 0, $1612 = 0, $1613 = 0, $1614 = 0, $1615 = 0, $1616 = 0, $1617 = 0, $1618 = 0, $1619 = 0, $162 = 0, $1620 = 0, $1621 = 0, $1622 = 0, $1623 = 0, $1624 = 0, $1625 = 0, $1626 = 0, $1627 = 0; - var $1628 = 0, $1629 = 0, $163 = 0, $1630 = 0, $1631 = 0, $1632 = 0, $1633 = 0, $1634 = 0, $1635 = 0, $1636 = 0, $1637 = 0, $1638 = 0, $1639 = 0, $164 = 0, $1640 = 0, $1641 = 0, $1642 = 0, $1643 = 0, $1644 = 0, $1645 = 0; - var $1646 = 0, $1647 = 0, $1648 = 0, $1649 = 0, $165 = 0, $1650 = 0, $1651 = 0, $1652 = 0, $1653 = 0, $1654 = 0, $1655 = 0, $1656 = 0, $1657 = 0, $1658 = 0, $1659 = 0, $166 = 0, $1660 = 0, $1661 = 0, $1662 = 0, $1663 = 0; - var $1664 = 0, $1665 = 0, $1666 = 0, $1667 = 0, $1668 = 0, $1669 = 0, $167 = 0, $1670 = 0, $1671 = 0, $1672 = 0, $1673 = 0, $1674 = 0, $1675 = 0, $1676 = 0, $1677 = 0, $1678 = 0, $1679 = 0, $168 = 0, $1680 = 0, $1681 = 0; - var $1682 = 0, $1683 = 0, $1684 = 0, $1685 = 0, $1686 = 0, $1687 = 0, $1688 = 0, $1689 = 0, $169 = 0, $1690 = 0, $1691 = 0, $1692 = 0, $1693 = 0, $1694 = 0, $1695 = 0, $1696 = 0, $1697 = 0, $1698 = 0, $1699 = 0, $17 = 0; - var $170 = 0, $1700 = 0, $1701 = 0, $1702 = 0, $1703 = 0, $1704 = 0, $1705 = 0, $1706 = 0, $1707 = 0, $1708 = 0, $1709 = 0, $171 = 0, $1710 = 0, $1711 = 0, $1712 = 0, $1713 = 0, $1714 = 0, $1715 = 0, $1716 = 0, $1717 = 0; - var $1718 = 0, $1719 = 0, $172 = 0, $1720 = 0, $1721 = 0, $1722 = 0, $1723 = 0, $1724 = 0, $1725 = 0, $1726 = 0, $1727 = 0, $1728 = 0, $1729 = 0, $173 = 0, $1730 = 0, $1731 = 0, $1732 = 0, $1733 = 0, $1734 = 0, $1735 = 0; - var $1736 = 0, $1737 = 0, $1738 = 0, $1739 = 0, $174 = 0, $1740 = 0, $1741 = 0, $1742 = 0, $1743 = 0, $1744 = 0, $1745 = 0, $1746 = 0, $1747 = 0, $1748 = 0, $1749 = 0, $175 = 0, $1750 = 0, $1751 = 0, $1752 = 0, $1753 = 0; - var $1754 = 0, $1755 = 0, $1756 = 0, $1757 = 0, $1758 = 0, $1759 = 0, $176 = 0, $1760 = 0, $1761 = 0, $1762 = 0, $1763 = 0, $1764 = 0, $1765 = 0, $1766 = 0, $1767 = 0, $1768 = 0, $1769 = 0, $177 = 0, $1770 = 0, $1771 = 0; - var $1772 = 0, $1773 = 0, $1774 = 0, $1775 = 0, $1776 = 0, $1777 = 0, $1778 = 0, $1779 = 0, $178 = 0, $1780 = 0, $1781 = 0, $1782 = 0, $1783 = 0, $1784 = 0, $1785 = 0, $1786 = 0, $1787 = 0, $1788 = 0, $1789 = 0, $179 = 0; - var $1790 = 0, $1791 = 0, $1792 = 0, $1793 = 0, $1794 = 0, $1795 = 0, $1796 = 0, $1797 = 0, $1798 = 0, $1799 = 0, $18 = 0, $180 = 0, $1800 = 0, $1801 = 0, $1802 = 0, $1803 = 0, $1804 = 0, $1805 = 0, $1806 = 0, $1807 = 0; - var $1808 = 0, $1809 = 0, $181 = 0, $1810 = 0, $1811 = 0, $1812 = 0, $1813 = 0, $1814 = 0, $1815 = 0, $1816 = 0, $1817 = 0, $1818 = 0, $1819 = 0, $182 = 0, $1820 = 0, $1821 = 0, $1822 = 0, $1823 = 0, $1824 = 0, $1825 = 0; - var $1826 = 0, $1827 = 0, $1828 = 0, $1829 = 0, $183 = 0, $1830 = 0, $1831 = 0, $1832 = 0, $1833 = 0, $1834 = 0, $1835 = 0, $1836 = 0, $1837 = 0, $1838 = 0, $1839 = 0, $184 = 0, $1840 = 0, $1841 = 0, $1842 = 0, $1843 = 0; - var $1844 = 0, $1845 = 0, $1846 = 0, $1847 = 0, $1848 = 0, $1849 = 0, $185 = 0, $1850 = 0, $1851 = 0, $1852 = 0, $1853 = 0, $1854 = 0, $1855 = 0, $1856 = 0, $1857 = 0, $1858 = 0, $1859 = 0, $186 = 0, $1860 = 0, $1861 = 0; - var $1862 = 0, $1863 = 0, $1864 = 0, $1865 = 0, $1866 = 0, $1867 = 0, $1868 = 0, $1869 = 0, $187 = 0, $1870 = 0, $1871 = 0, $1872 = 0, $1873 = 0, $1874 = 0, $1875 = 0, $1876 = 0, $1877 = 0, $1878 = 0, $188 = 0, $189 = 0; - var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; - var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; - var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; - var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; - var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; - var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; - var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; - var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; - var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; - var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; - var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; - var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; - var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; - var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; - var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; - var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; - var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; - var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; - var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; - var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; - var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; - var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; - var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; - var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; - var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; - var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; - var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; - var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; - var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; - var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; - var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; - var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; - var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; - var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; - var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; - var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; - var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; - var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; - var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; - var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; - var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; - var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; - var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; - var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; - var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = (_load_347($a)|0); - $1 = tempRet0; - $2 = $0 & 2097151; - $3 = (($a) + 2|0); - $4 = (_load_448($3)|0); - $5 = tempRet0; - $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); - $7 = tempRet0; - $8 = $6 & 2097151; - $9 = (($a) + 5|0); - $10 = (_load_347($9)|0); - $11 = tempRet0; - $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); - $13 = tempRet0; - $14 = $12 & 2097151; - $15 = (($a) + 7|0); - $16 = (_load_448($15)|0); - $17 = tempRet0; - $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); - $19 = tempRet0; - $20 = $18 & 2097151; - $21 = (($a) + 10|0); - $22 = (_load_448($21)|0); - $23 = tempRet0; - $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); - $25 = tempRet0; - $26 = $24 & 2097151; - $27 = (($a) + 13|0); - $28 = (_load_347($27)|0); - $29 = tempRet0; - $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); - $31 = tempRet0; - $32 = $30 & 2097151; - $33 = (($a) + 15|0); - $34 = (_load_448($33)|0); - $35 = tempRet0; - $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); - $37 = tempRet0; - $38 = $36 & 2097151; - $39 = (($a) + 18|0); - $40 = (_load_347($39)|0); - $41 = tempRet0; - $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); - $43 = tempRet0; - $44 = $42 & 2097151; - $45 = (($a) + 21|0); - $46 = (_load_347($45)|0); - $47 = tempRet0; - $48 = $46 & 2097151; - $49 = (($a) + 23|0); - $50 = (_load_448($49)|0); - $51 = tempRet0; - $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); - $53 = tempRet0; - $54 = $52 & 2097151; - $55 = (($a) + 26|0); - $56 = (_load_347($55)|0); - $57 = tempRet0; - $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); - $59 = tempRet0; - $60 = $58 & 2097151; - $61 = (($a) + 28|0); - $62 = (_load_448($61)|0); - $63 = tempRet0; - $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); - $65 = tempRet0; - $66 = (_load_347($b)|0); - $67 = tempRet0; - $68 = $66 & 2097151; - $69 = (($b) + 2|0); - $70 = (_load_448($69)|0); - $71 = tempRet0; - $72 = (_bitshift64Lshr(($70|0),($71|0),5)|0); - $73 = tempRet0; - $74 = $72 & 2097151; - $75 = (($b) + 5|0); - $76 = (_load_347($75)|0); - $77 = tempRet0; - $78 = (_bitshift64Lshr(($76|0),($77|0),2)|0); - $79 = tempRet0; - $80 = $78 & 2097151; - $81 = (($b) + 7|0); - $82 = (_load_448($81)|0); - $83 = tempRet0; - $84 = (_bitshift64Lshr(($82|0),($83|0),7)|0); - $85 = tempRet0; - $86 = $84 & 2097151; - $87 = (($b) + 10|0); - $88 = (_load_448($87)|0); - $89 = tempRet0; - $90 = (_bitshift64Lshr(($88|0),($89|0),4)|0); - $91 = tempRet0; - $92 = $90 & 2097151; - $93 = (($b) + 13|0); - $94 = (_load_347($93)|0); - $95 = tempRet0; - $96 = (_bitshift64Lshr(($94|0),($95|0),1)|0); - $97 = tempRet0; - $98 = $96 & 2097151; - $99 = (($b) + 15|0); - $100 = (_load_448($99)|0); - $101 = tempRet0; - $102 = (_bitshift64Lshr(($100|0),($101|0),6)|0); - $103 = tempRet0; - $104 = $102 & 2097151; - $105 = (($b) + 18|0); - $106 = (_load_347($105)|0); - $107 = tempRet0; - $108 = (_bitshift64Lshr(($106|0),($107|0),3)|0); - $109 = tempRet0; - $110 = $108 & 2097151; - $111 = (($b) + 21|0); - $112 = (_load_347($111)|0); - $113 = tempRet0; - $114 = $112 & 2097151; - $115 = (($b) + 23|0); - $116 = (_load_448($115)|0); - $117 = tempRet0; - $118 = (_bitshift64Lshr(($116|0),($117|0),5)|0); - $119 = tempRet0; - $120 = $118 & 2097151; - $121 = (($b) + 26|0); - $122 = (_load_347($121)|0); - $123 = tempRet0; - $124 = (_bitshift64Lshr(($122|0),($123|0),2)|0); - $125 = tempRet0; - $126 = $124 & 2097151; - $127 = (($b) + 28|0); - $128 = (_load_448($127)|0); - $129 = tempRet0; - $130 = (_bitshift64Lshr(($128|0),($129|0),7)|0); - $131 = tempRet0; - $132 = (_load_347($c)|0); - $133 = tempRet0; - $134 = $132 & 2097151; - $135 = (($c) + 2|0); - $136 = (_load_448($135)|0); - $137 = tempRet0; - $138 = (_bitshift64Lshr(($136|0),($137|0),5)|0); - $139 = tempRet0; - $140 = $138 & 2097151; - $141 = (($c) + 5|0); - $142 = (_load_347($141)|0); - $143 = tempRet0; - $144 = (_bitshift64Lshr(($142|0),($143|0),2)|0); - $145 = tempRet0; - $146 = $144 & 2097151; - $147 = (($c) + 7|0); - $148 = (_load_448($147)|0); - $149 = tempRet0; - $150 = (_bitshift64Lshr(($148|0),($149|0),7)|0); - $151 = tempRet0; - $152 = $150 & 2097151; - $153 = (($c) + 10|0); - $154 = (_load_448($153)|0); - $155 = tempRet0; - $156 = (_bitshift64Lshr(($154|0),($155|0),4)|0); - $157 = tempRet0; - $158 = $156 & 2097151; - $159 = (($c) + 13|0); - $160 = (_load_347($159)|0); - $161 = tempRet0; - $162 = (_bitshift64Lshr(($160|0),($161|0),1)|0); - $163 = tempRet0; - $164 = $162 & 2097151; - $165 = (($c) + 15|0); - $166 = (_load_448($165)|0); - $167 = tempRet0; - $168 = (_bitshift64Lshr(($166|0),($167|0),6)|0); - $169 = tempRet0; - $170 = $168 & 2097151; - $171 = (($c) + 18|0); - $172 = (_load_347($171)|0); - $173 = tempRet0; - $174 = (_bitshift64Lshr(($172|0),($173|0),3)|0); - $175 = tempRet0; - $176 = $174 & 2097151; - $177 = (($c) + 21|0); - $178 = (_load_347($177)|0); - $179 = tempRet0; - $180 = $178 & 2097151; - $181 = (($c) + 23|0); - $182 = (_load_448($181)|0); - $183 = tempRet0; - $184 = (_bitshift64Lshr(($182|0),($183|0),5)|0); - $185 = tempRet0; - $186 = $184 & 2097151; - $187 = (($c) + 26|0); - $188 = (_load_347($187)|0); - $189 = tempRet0; - $190 = (_bitshift64Lshr(($188|0),($189|0),2)|0); - $191 = tempRet0; - $192 = $190 & 2097151; - $193 = (($c) + 28|0); - $194 = (_load_448($193)|0); - $195 = tempRet0; - $196 = (_bitshift64Lshr(($194|0),($195|0),7)|0); - $197 = tempRet0; - $198 = (___muldi3(($68|0),0,($2|0),0)|0); - $199 = tempRet0; - $200 = (_i64Add(($134|0),0,($198|0),($199|0))|0); - $201 = tempRet0; - $202 = (___muldi3(($74|0),0,($2|0),0)|0); - $203 = tempRet0; - $204 = (___muldi3(($68|0),0,($8|0),0)|0); - $205 = tempRet0; - $206 = (___muldi3(($80|0),0,($2|0),0)|0); - $207 = tempRet0; - $208 = (___muldi3(($74|0),0,($8|0),0)|0); - $209 = tempRet0; - $210 = (___muldi3(($68|0),0,($14|0),0)|0); - $211 = tempRet0; - $212 = (_i64Add(($208|0),($209|0),($210|0),($211|0))|0); - $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($206|0),($207|0))|0); - $215 = tempRet0; - $216 = (_i64Add(($214|0),($215|0),($146|0),0)|0); - $217 = tempRet0; - $218 = (___muldi3(($86|0),0,($2|0),0)|0); - $219 = tempRet0; - $220 = (___muldi3(($80|0),0,($8|0),0)|0); - $221 = tempRet0; - $222 = (___muldi3(($74|0),0,($14|0),0)|0); - $223 = tempRet0; - $224 = (___muldi3(($68|0),0,($20|0),0)|0); - $225 = tempRet0; - $226 = (___muldi3(($92|0),0,($2|0),0)|0); - $227 = tempRet0; - $228 = (___muldi3(($86|0),0,($8|0),0)|0); - $229 = tempRet0; - $230 = (___muldi3(($80|0),0,($14|0),0)|0); - $231 = tempRet0; - $232 = (___muldi3(($74|0),0,($20|0),0)|0); - $233 = tempRet0; - $234 = (___muldi3(($68|0),0,($26|0),0)|0); - $235 = tempRet0; - $236 = (_i64Add(($232|0),($233|0),($234|0),($235|0))|0); - $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($230|0),($231|0))|0); - $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($228|0),($229|0))|0); - $241 = tempRet0; - $242 = (_i64Add(($240|0),($241|0),($226|0),($227|0))|0); - $243 = tempRet0; - $244 = (_i64Add(($242|0),($243|0),($158|0),0)|0); - $245 = tempRet0; - $246 = (___muldi3(($98|0),0,($2|0),0)|0); - $247 = tempRet0; - $248 = (___muldi3(($92|0),0,($8|0),0)|0); - $249 = tempRet0; - $250 = (___muldi3(($86|0),0,($14|0),0)|0); - $251 = tempRet0; - $252 = (___muldi3(($80|0),0,($20|0),0)|0); - $253 = tempRet0; - $254 = (___muldi3(($74|0),0,($26|0),0)|0); - $255 = tempRet0; - $256 = (___muldi3(($68|0),0,($32|0),0)|0); - $257 = tempRet0; - $258 = (___muldi3(($104|0),0,($2|0),0)|0); - $259 = tempRet0; - $260 = (___muldi3(($98|0),0,($8|0),0)|0); - $261 = tempRet0; - $262 = (___muldi3(($92|0),0,($14|0),0)|0); - $263 = tempRet0; - $264 = (___muldi3(($86|0),0,($20|0),0)|0); - $265 = tempRet0; - $266 = (___muldi3(($80|0),0,($26|0),0)|0); - $267 = tempRet0; - $268 = (___muldi3(($74|0),0,($32|0),0)|0); - $269 = tempRet0; - $270 = (___muldi3(($68|0),0,($38|0),0)|0); - $271 = tempRet0; - $272 = (_i64Add(($268|0),($269|0),($270|0),($271|0))|0); - $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($266|0),($267|0))|0); - $275 = tempRet0; - $276 = (_i64Add(($274|0),($275|0),($264|0),($265|0))|0); - $277 = tempRet0; - $278 = (_i64Add(($276|0),($277|0),($262|0),($263|0))|0); - $279 = tempRet0; - $280 = (_i64Add(($278|0),($279|0),($260|0),($261|0))|0); - $281 = tempRet0; - $282 = (_i64Add(($280|0),($281|0),($258|0),($259|0))|0); - $283 = tempRet0; - $284 = (_i64Add(($282|0),($283|0),($170|0),0)|0); - $285 = tempRet0; - $286 = (___muldi3(($110|0),0,($2|0),0)|0); - $287 = tempRet0; - $288 = (___muldi3(($104|0),0,($8|0),0)|0); - $289 = tempRet0; - $290 = (___muldi3(($98|0),0,($14|0),0)|0); - $291 = tempRet0; - $292 = (___muldi3(($92|0),0,($20|0),0)|0); - $293 = tempRet0; - $294 = (___muldi3(($86|0),0,($26|0),0)|0); - $295 = tempRet0; - $296 = (___muldi3(($80|0),0,($32|0),0)|0); - $297 = tempRet0; - $298 = (___muldi3(($74|0),0,($38|0),0)|0); - $299 = tempRet0; - $300 = (___muldi3(($68|0),0,($44|0),0)|0); - $301 = tempRet0; - $302 = (___muldi3(($114|0),0,($2|0),0)|0); - $303 = tempRet0; - $304 = (___muldi3(($110|0),0,($8|0),0)|0); - $305 = tempRet0; - $306 = (___muldi3(($104|0),0,($14|0),0)|0); - $307 = tempRet0; - $308 = (___muldi3(($98|0),0,($20|0),0)|0); - $309 = tempRet0; - $310 = (___muldi3(($92|0),0,($26|0),0)|0); - $311 = tempRet0; - $312 = (___muldi3(($86|0),0,($32|0),0)|0); - $313 = tempRet0; - $314 = (___muldi3(($80|0),0,($38|0),0)|0); - $315 = tempRet0; - $316 = (___muldi3(($74|0),0,($44|0),0)|0); - $317 = tempRet0; - $318 = (___muldi3(($68|0),0,($48|0),0)|0); - $319 = tempRet0; - $320 = (_i64Add(($316|0),($317|0),($318|0),($319|0))|0); - $321 = tempRet0; - $322 = (_i64Add(($320|0),($321|0),($314|0),($315|0))|0); - $323 = tempRet0; - $324 = (_i64Add(($322|0),($323|0),($312|0),($313|0))|0); - $325 = tempRet0; - $326 = (_i64Add(($324|0),($325|0),($310|0),($311|0))|0); - $327 = tempRet0; - $328 = (_i64Add(($326|0),($327|0),($308|0),($309|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($328|0),($329|0),($306|0),($307|0))|0); - $331 = tempRet0; - $332 = (_i64Add(($330|0),($331|0),($302|0),($303|0))|0); - $333 = tempRet0; - $334 = (_i64Add(($332|0),($333|0),($304|0),($305|0))|0); - $335 = tempRet0; - $336 = (_i64Add(($334|0),($335|0),($180|0),0)|0); - $337 = tempRet0; - $338 = (___muldi3(($120|0),0,($2|0),0)|0); - $339 = tempRet0; - $340 = (___muldi3(($114|0),0,($8|0),0)|0); - $341 = tempRet0; - $342 = (___muldi3(($110|0),0,($14|0),0)|0); - $343 = tempRet0; - $344 = (___muldi3(($104|0),0,($20|0),0)|0); - $345 = tempRet0; - $346 = (___muldi3(($98|0),0,($26|0),0)|0); - $347 = tempRet0; - $348 = (___muldi3(($92|0),0,($32|0),0)|0); - $349 = tempRet0; - $350 = (___muldi3(($86|0),0,($38|0),0)|0); - $351 = tempRet0; - $352 = (___muldi3(($80|0),0,($44|0),0)|0); - $353 = tempRet0; - $354 = (___muldi3(($74|0),0,($48|0),0)|0); - $355 = tempRet0; - $356 = (___muldi3(($68|0),0,($54|0),0)|0); - $357 = tempRet0; - $358 = (___muldi3(($126|0),0,($2|0),0)|0); - $359 = tempRet0; - $360 = (___muldi3(($120|0),0,($8|0),0)|0); - $361 = tempRet0; - $362 = (___muldi3(($114|0),0,($14|0),0)|0); - $363 = tempRet0; - $364 = (___muldi3(($110|0),0,($20|0),0)|0); - $365 = tempRet0; - $366 = (___muldi3(($104|0),0,($26|0),0)|0); - $367 = tempRet0; - $368 = (___muldi3(($98|0),0,($32|0),0)|0); - $369 = tempRet0; - $370 = (___muldi3(($92|0),0,($38|0),0)|0); - $371 = tempRet0; - $372 = (___muldi3(($86|0),0,($44|0),0)|0); - $373 = tempRet0; - $374 = (___muldi3(($80|0),0,($48|0),0)|0); - $375 = tempRet0; - $376 = (___muldi3(($74|0),0,($54|0),0)|0); - $377 = tempRet0; - $378 = (___muldi3(($68|0),0,($60|0),0)|0); - $379 = tempRet0; - $380 = (_i64Add(($376|0),($377|0),($378|0),($379|0))|0); - $381 = tempRet0; - $382 = (_i64Add(($380|0),($381|0),($374|0),($375|0))|0); - $383 = tempRet0; - $384 = (_i64Add(($382|0),($383|0),($372|0),($373|0))|0); - $385 = tempRet0; - $386 = (_i64Add(($384|0),($385|0),($370|0),($371|0))|0); - $387 = tempRet0; - $388 = (_i64Add(($386|0),($387|0),($368|0),($369|0))|0); - $389 = tempRet0; - $390 = (_i64Add(($388|0),($389|0),($366|0),($367|0))|0); - $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($362|0),($363|0))|0); - $393 = tempRet0; - $394 = (_i64Add(($392|0),($393|0),($364|0),($365|0))|0); - $395 = tempRet0; - $396 = (_i64Add(($394|0),($395|0),($360|0),($361|0))|0); - $397 = tempRet0; - $398 = (_i64Add(($396|0),($397|0),($358|0),($359|0))|0); - $399 = tempRet0; - $400 = (_i64Add(($398|0),($399|0),($192|0),0)|0); - $401 = tempRet0; - $402 = (___muldi3(($130|0),($131|0),($2|0),0)|0); - $403 = tempRet0; - $404 = (___muldi3(($126|0),0,($8|0),0)|0); - $405 = tempRet0; - $406 = (___muldi3(($120|0),0,($14|0),0)|0); - $407 = tempRet0; - $408 = (___muldi3(($114|0),0,($20|0),0)|0); - $409 = tempRet0; - $410 = (___muldi3(($110|0),0,($26|0),0)|0); - $411 = tempRet0; - $412 = (___muldi3(($104|0),0,($32|0),0)|0); - $413 = tempRet0; - $414 = (___muldi3(($98|0),0,($38|0),0)|0); - $415 = tempRet0; - $416 = (___muldi3(($92|0),0,($44|0),0)|0); - $417 = tempRet0; - $418 = (___muldi3(($86|0),0,($48|0),0)|0); - $419 = tempRet0; - $420 = (___muldi3(($80|0),0,($54|0),0)|0); - $421 = tempRet0; - $422 = (___muldi3(($74|0),0,($60|0),0)|0); - $423 = tempRet0; - $424 = (___muldi3(($68|0),0,($64|0),($65|0))|0); - $425 = tempRet0; - $426 = (___muldi3(($130|0),($131|0),($8|0),0)|0); - $427 = tempRet0; - $428 = (___muldi3(($126|0),0,($14|0),0)|0); - $429 = tempRet0; - $430 = (___muldi3(($120|0),0,($20|0),0)|0); - $431 = tempRet0; - $432 = (___muldi3(($114|0),0,($26|0),0)|0); - $433 = tempRet0; - $434 = (___muldi3(($110|0),0,($32|0),0)|0); - $435 = tempRet0; - $436 = (___muldi3(($104|0),0,($38|0),0)|0); - $437 = tempRet0; - $438 = (___muldi3(($98|0),0,($44|0),0)|0); - $439 = tempRet0; - $440 = (___muldi3(($92|0),0,($48|0),0)|0); - $441 = tempRet0; - $442 = (___muldi3(($86|0),0,($54|0),0)|0); - $443 = tempRet0; - $444 = (___muldi3(($80|0),0,($60|0),0)|0); - $445 = tempRet0; - $446 = (___muldi3(($74|0),0,($64|0),($65|0))|0); - $447 = tempRet0; - $448 = (_i64Add(($444|0),($445|0),($446|0),($447|0))|0); - $449 = tempRet0; - $450 = (_i64Add(($448|0),($449|0),($442|0),($443|0))|0); - $451 = tempRet0; - $452 = (_i64Add(($450|0),($451|0),($440|0),($441|0))|0); - $453 = tempRet0; - $454 = (_i64Add(($452|0),($453|0),($438|0),($439|0))|0); - $455 = tempRet0; - $456 = (_i64Add(($454|0),($455|0),($436|0),($437|0))|0); - $457 = tempRet0; - $458 = (_i64Add(($456|0),($457|0),($432|0),($433|0))|0); - $459 = tempRet0; - $460 = (_i64Add(($458|0),($459|0),($434|0),($435|0))|0); - $461 = tempRet0; - $462 = (_i64Add(($460|0),($461|0),($430|0),($431|0))|0); - $463 = tempRet0; - $464 = (_i64Add(($462|0),($463|0),($428|0),($429|0))|0); - $465 = tempRet0; - $466 = (_i64Add(($464|0),($465|0),($426|0),($427|0))|0); - $467 = tempRet0; - $468 = (___muldi3(($130|0),($131|0),($14|0),0)|0); - $469 = tempRet0; - $470 = (___muldi3(($126|0),0,($20|0),0)|0); - $471 = tempRet0; - $472 = (___muldi3(($120|0),0,($26|0),0)|0); - $473 = tempRet0; - $474 = (___muldi3(($114|0),0,($32|0),0)|0); - $475 = tempRet0; - $476 = (___muldi3(($110|0),0,($38|0),0)|0); - $477 = tempRet0; - $478 = (___muldi3(($104|0),0,($44|0),0)|0); - $479 = tempRet0; - $480 = (___muldi3(($98|0),0,($48|0),0)|0); - $481 = tempRet0; - $482 = (___muldi3(($92|0),0,($54|0),0)|0); - $483 = tempRet0; - $484 = (___muldi3(($86|0),0,($60|0),0)|0); - $485 = tempRet0; - $486 = (___muldi3(($80|0),0,($64|0),($65|0))|0); - $487 = tempRet0; - $488 = (___muldi3(($130|0),($131|0),($20|0),0)|0); - $489 = tempRet0; - $490 = (___muldi3(($126|0),0,($26|0),0)|0); - $491 = tempRet0; - $492 = (___muldi3(($120|0),0,($32|0),0)|0); - $493 = tempRet0; - $494 = (___muldi3(($114|0),0,($38|0),0)|0); - $495 = tempRet0; - $496 = (___muldi3(($110|0),0,($44|0),0)|0); - $497 = tempRet0; - $498 = (___muldi3(($104|0),0,($48|0),0)|0); - $499 = tempRet0; - $500 = (___muldi3(($98|0),0,($54|0),0)|0); - $501 = tempRet0; - $502 = (___muldi3(($92|0),0,($60|0),0)|0); - $503 = tempRet0; - $504 = (___muldi3(($86|0),0,($64|0),($65|0))|0); - $505 = tempRet0; - $506 = (_i64Add(($502|0),($503|0),($504|0),($505|0))|0); - $507 = tempRet0; - $508 = (_i64Add(($506|0),($507|0),($500|0),($501|0))|0); - $509 = tempRet0; - $510 = (_i64Add(($508|0),($509|0),($498|0),($499|0))|0); - $511 = tempRet0; - $512 = (_i64Add(($510|0),($511|0),($494|0),($495|0))|0); - $513 = tempRet0; - $514 = (_i64Add(($512|0),($513|0),($496|0),($497|0))|0); - $515 = tempRet0; - $516 = (_i64Add(($514|0),($515|0),($492|0),($493|0))|0); - $517 = tempRet0; - $518 = (_i64Add(($516|0),($517|0),($490|0),($491|0))|0); - $519 = tempRet0; - $520 = (_i64Add(($518|0),($519|0),($488|0),($489|0))|0); - $521 = tempRet0; - $522 = (___muldi3(($130|0),($131|0),($26|0),0)|0); - $523 = tempRet0; - $524 = (___muldi3(($126|0),0,($32|0),0)|0); - $525 = tempRet0; - $526 = (___muldi3(($120|0),0,($38|0),0)|0); - $527 = tempRet0; - $528 = (___muldi3(($114|0),0,($44|0),0)|0); - $529 = tempRet0; - $530 = (___muldi3(($110|0),0,($48|0),0)|0); - $531 = tempRet0; - $532 = (___muldi3(($104|0),0,($54|0),0)|0); - $533 = tempRet0; - $534 = (___muldi3(($98|0),0,($60|0),0)|0); - $535 = tempRet0; - $536 = (___muldi3(($92|0),0,($64|0),($65|0))|0); - $537 = tempRet0; - $538 = (___muldi3(($130|0),($131|0),($32|0),0)|0); - $539 = tempRet0; - $540 = (___muldi3(($126|0),0,($38|0),0)|0); - $541 = tempRet0; - $542 = (___muldi3(($120|0),0,($44|0),0)|0); - $543 = tempRet0; - $544 = (___muldi3(($114|0),0,($48|0),0)|0); - $545 = tempRet0; - $546 = (___muldi3(($110|0),0,($54|0),0)|0); - $547 = tempRet0; - $548 = (___muldi3(($104|0),0,($60|0),0)|0); - $549 = tempRet0; - $550 = (___muldi3(($98|0),0,($64|0),($65|0))|0); - $551 = tempRet0; - $552 = (_i64Add(($548|0),($549|0),($550|0),($551|0))|0); - $553 = tempRet0; - $554 = (_i64Add(($552|0),($553|0),($544|0),($545|0))|0); - $555 = tempRet0; - $556 = (_i64Add(($554|0),($555|0),($546|0),($547|0))|0); - $557 = tempRet0; - $558 = (_i64Add(($556|0),($557|0),($542|0),($543|0))|0); - $559 = tempRet0; - $560 = (_i64Add(($558|0),($559|0),($540|0),($541|0))|0); - $561 = tempRet0; - $562 = (_i64Add(($560|0),($561|0),($538|0),($539|0))|0); - $563 = tempRet0; - $564 = (___muldi3(($130|0),($131|0),($38|0),0)|0); - $565 = tempRet0; - $566 = (___muldi3(($126|0),0,($44|0),0)|0); - $567 = tempRet0; - $568 = (___muldi3(($120|0),0,($48|0),0)|0); - $569 = tempRet0; - $570 = (___muldi3(($114|0),0,($54|0),0)|0); - $571 = tempRet0; - $572 = (___muldi3(($110|0),0,($60|0),0)|0); - $573 = tempRet0; - $574 = (___muldi3(($104|0),0,($64|0),($65|0))|0); - $575 = tempRet0; - $576 = (___muldi3(($130|0),($131|0),($44|0),0)|0); - $577 = tempRet0; - $578 = (___muldi3(($126|0),0,($48|0),0)|0); - $579 = tempRet0; - $580 = (___muldi3(($120|0),0,($54|0),0)|0); - $581 = tempRet0; - $582 = (___muldi3(($114|0),0,($60|0),0)|0); - $583 = tempRet0; - $584 = (___muldi3(($110|0),0,($64|0),($65|0))|0); - $585 = tempRet0; - $586 = (_i64Add(($584|0),($585|0),($582|0),($583|0))|0); - $587 = tempRet0; - $588 = (_i64Add(($586|0),($587|0),($580|0),($581|0))|0); - $589 = tempRet0; - $590 = (_i64Add(($588|0),($589|0),($578|0),($579|0))|0); - $591 = tempRet0; - $592 = (_i64Add(($590|0),($591|0),($576|0),($577|0))|0); - $593 = tempRet0; - $594 = (___muldi3(($130|0),($131|0),($48|0),0)|0); - $595 = tempRet0; - $596 = (___muldi3(($126|0),0,($54|0),0)|0); - $597 = tempRet0; - $598 = (___muldi3(($120|0),0,($60|0),0)|0); - $599 = tempRet0; - $600 = (___muldi3(($114|0),0,($64|0),($65|0))|0); - $601 = tempRet0; - $602 = (___muldi3(($130|0),($131|0),($54|0),0)|0); - $603 = tempRet0; - $604 = (___muldi3(($126|0),0,($60|0),0)|0); - $605 = tempRet0; - $606 = (___muldi3(($120|0),0,($64|0),($65|0))|0); - $607 = tempRet0; - $608 = (_i64Add(($604|0),($605|0),($606|0),($607|0))|0); - $609 = tempRet0; - $610 = (_i64Add(($608|0),($609|0),($602|0),($603|0))|0); - $611 = tempRet0; - $612 = (___muldi3(($130|0),($131|0),($60|0),0)|0); - $613 = tempRet0; - $614 = (___muldi3(($126|0),0,($64|0),($65|0))|0); - $615 = tempRet0; - $616 = (_i64Add(($612|0),($613|0),($614|0),($615|0))|0); - $617 = tempRet0; - $618 = (___muldi3(($130|0),($131|0),($64|0),($65|0))|0); - $619 = tempRet0; - $620 = (_i64Add(($200|0),($201|0),1048576,0)|0); - $621 = tempRet0; - $622 = (_bitshift64Lshr(($620|0),($621|0),21)|0); - $623 = tempRet0; - $624 = (_i64Add(($202|0),($203|0),($204|0),($205|0))|0); - $625 = tempRet0; - $626 = (_i64Add(($624|0),($625|0),($140|0),0)|0); - $627 = tempRet0; - $628 = (_i64Add(($626|0),($627|0),($622|0),($623|0))|0); - $629 = tempRet0; - $630 = (_bitshift64Shl(($622|0),($623|0),21)|0); - $631 = tempRet0; - $632 = (_i64Subtract(($200|0),($201|0),($630|0),($631|0))|0); - $633 = tempRet0; - $634 = (_i64Add(($216|0),($217|0),1048576,0)|0); - $635 = tempRet0; - $636 = (_bitshift64Lshr(($634|0),($635|0),21)|0); - $637 = tempRet0; - $638 = (_i64Add(($222|0),($223|0),($224|0),($225|0))|0); - $639 = tempRet0; - $640 = (_i64Add(($638|0),($639|0),($220|0),($221|0))|0); - $641 = tempRet0; - $642 = (_i64Add(($640|0),($641|0),($218|0),($219|0))|0); - $643 = tempRet0; - $644 = (_i64Add(($642|0),($643|0),($152|0),0)|0); - $645 = tempRet0; - $646 = (_i64Add(($644|0),($645|0),($636|0),($637|0))|0); - $647 = tempRet0; - $648 = (_bitshift64Shl(($636|0),($637|0),21)|0); - $649 = tempRet0; - $650 = (_i64Add(($244|0),($245|0),1048576,0)|0); - $651 = tempRet0; - $652 = (_bitshift64Ashr(($650|0),($651|0),21)|0); - $653 = tempRet0; - $654 = (_i64Add(($254|0),($255|0),($256|0),($257|0))|0); - $655 = tempRet0; - $656 = (_i64Add(($654|0),($655|0),($252|0),($253|0))|0); - $657 = tempRet0; - $658 = (_i64Add(($656|0),($657|0),($250|0),($251|0))|0); - $659 = tempRet0; - $660 = (_i64Add(($658|0),($659|0),($248|0),($249|0))|0); - $661 = tempRet0; - $662 = (_i64Add(($660|0),($661|0),($246|0),($247|0))|0); - $663 = tempRet0; - $664 = (_i64Add(($662|0),($663|0),($164|0),0)|0); - $665 = tempRet0; - $666 = (_i64Add(($664|0),($665|0),($652|0),($653|0))|0); - $667 = tempRet0; - $668 = (_bitshift64Shl(($652|0),($653|0),21)|0); - $669 = tempRet0; - $670 = (_i64Subtract(($244|0),($245|0),($668|0),($669|0))|0); - $671 = tempRet0; - $672 = (_i64Add(($284|0),($285|0),1048576,0)|0); - $673 = tempRet0; - $674 = (_bitshift64Ashr(($672|0),($673|0),21)|0); - $675 = tempRet0; - $676 = (_i64Add(($298|0),($299|0),($300|0),($301|0))|0); - $677 = tempRet0; - $678 = (_i64Add(($676|0),($677|0),($296|0),($297|0))|0); - $679 = tempRet0; - $680 = (_i64Add(($678|0),($679|0),($294|0),($295|0))|0); - $681 = tempRet0; - $682 = (_i64Add(($680|0),($681|0),($292|0),($293|0))|0); - $683 = tempRet0; - $684 = (_i64Add(($682|0),($683|0),($290|0),($291|0))|0); - $685 = tempRet0; - $686 = (_i64Add(($684|0),($685|0),($288|0),($289|0))|0); - $687 = tempRet0; - $688 = (_i64Add(($686|0),($687|0),($286|0),($287|0))|0); - $689 = tempRet0; - $690 = (_i64Add(($688|0),($689|0),($176|0),0)|0); - $691 = tempRet0; - $692 = (_i64Add(($690|0),($691|0),($674|0),($675|0))|0); - $693 = tempRet0; - $694 = (_bitshift64Shl(($674|0),($675|0),21)|0); - $695 = tempRet0; - $696 = (_i64Add(($336|0),($337|0),1048576,0)|0); - $697 = tempRet0; - $698 = (_bitshift64Ashr(($696|0),($697|0),21)|0); - $699 = tempRet0; - $700 = (_i64Add(($354|0),($355|0),($356|0),($357|0))|0); - $701 = tempRet0; - $702 = (_i64Add(($700|0),($701|0),($352|0),($353|0))|0); - $703 = tempRet0; - $704 = (_i64Add(($702|0),($703|0),($350|0),($351|0))|0); - $705 = tempRet0; - $706 = (_i64Add(($704|0),($705|0),($348|0),($349|0))|0); - $707 = tempRet0; - $708 = (_i64Add(($706|0),($707|0),($346|0),($347|0))|0); - $709 = tempRet0; - $710 = (_i64Add(($708|0),($709|0),($344|0),($345|0))|0); - $711 = tempRet0; - $712 = (_i64Add(($710|0),($711|0),($340|0),($341|0))|0); - $713 = tempRet0; - $714 = (_i64Add(($712|0),($713|0),($342|0),($343|0))|0); - $715 = tempRet0; - $716 = (_i64Add(($714|0),($715|0),($338|0),($339|0))|0); - $717 = tempRet0; - $718 = (_i64Add(($716|0),($717|0),($186|0),0)|0); - $719 = tempRet0; - $720 = (_i64Add(($718|0),($719|0),($698|0),($699|0))|0); - $721 = tempRet0; - $722 = (_bitshift64Shl(($698|0),($699|0),21)|0); - $723 = tempRet0; - $724 = (_i64Add(($400|0),($401|0),1048576,0)|0); - $725 = tempRet0; - $726 = (_bitshift64Ashr(($724|0),($725|0),21)|0); - $727 = tempRet0; - $728 = (_i64Add(($422|0),($423|0),($424|0),($425|0))|0); - $729 = tempRet0; - $730 = (_i64Add(($728|0),($729|0),($420|0),($421|0))|0); - $731 = tempRet0; - $732 = (_i64Add(($730|0),($731|0),($418|0),($419|0))|0); - $733 = tempRet0; - $734 = (_i64Add(($732|0),($733|0),($416|0),($417|0))|0); - $735 = tempRet0; - $736 = (_i64Add(($734|0),($735|0),($414|0),($415|0))|0); - $737 = tempRet0; - $738 = (_i64Add(($736|0),($737|0),($412|0),($413|0))|0); - $739 = tempRet0; - $740 = (_i64Add(($738|0),($739|0),($408|0),($409|0))|0); - $741 = tempRet0; - $742 = (_i64Add(($740|0),($741|0),($410|0),($411|0))|0); - $743 = tempRet0; - $744 = (_i64Add(($742|0),($743|0),($406|0),($407|0))|0); - $745 = tempRet0; - $746 = (_i64Add(($744|0),($745|0),($402|0),($403|0))|0); - $747 = tempRet0; - $748 = (_i64Add(($746|0),($747|0),($404|0),($405|0))|0); - $749 = tempRet0; - $750 = (_i64Add(($748|0),($749|0),($196|0),($197|0))|0); - $751 = tempRet0; - $752 = (_i64Add(($750|0),($751|0),($726|0),($727|0))|0); - $753 = tempRet0; - $754 = (_bitshift64Shl(($726|0),($727|0),21)|0); - $755 = tempRet0; - $756 = (_i64Add(($466|0),($467|0),1048576,0)|0); - $757 = tempRet0; - $758 = (_bitshift64Ashr(($756|0),($757|0),21)|0); - $759 = tempRet0; - $760 = (_i64Add(($484|0),($485|0),($486|0),($487|0))|0); - $761 = tempRet0; - $762 = (_i64Add(($760|0),($761|0),($482|0),($483|0))|0); - $763 = tempRet0; - $764 = (_i64Add(($762|0),($763|0),($480|0),($481|0))|0); - $765 = tempRet0; - $766 = (_i64Add(($764|0),($765|0),($478|0),($479|0))|0); - $767 = tempRet0; - $768 = (_i64Add(($766|0),($767|0),($474|0),($475|0))|0); - $769 = tempRet0; - $770 = (_i64Add(($768|0),($769|0),($476|0),($477|0))|0); - $771 = tempRet0; - $772 = (_i64Add(($770|0),($771|0),($472|0),($473|0))|0); - $773 = tempRet0; - $774 = (_i64Add(($772|0),($773|0),($470|0),($471|0))|0); - $775 = tempRet0; - $776 = (_i64Add(($774|0),($775|0),($468|0),($469|0))|0); - $777 = tempRet0; - $778 = (_i64Add(($776|0),($777|0),($758|0),($759|0))|0); - $779 = tempRet0; - $780 = (_bitshift64Shl(($758|0),($759|0),21)|0); - $781 = tempRet0; - $782 = (_i64Add(($520|0),($521|0),1048576,0)|0); - $783 = tempRet0; - $784 = (_bitshift64Ashr(($782|0),($783|0),21)|0); - $785 = tempRet0; - $786 = (_i64Add(($534|0),($535|0),($536|0),($537|0))|0); - $787 = tempRet0; - $788 = (_i64Add(($786|0),($787|0),($532|0),($533|0))|0); - $789 = tempRet0; - $790 = (_i64Add(($788|0),($789|0),($528|0),($529|0))|0); - $791 = tempRet0; - $792 = (_i64Add(($790|0),($791|0),($530|0),($531|0))|0); - $793 = tempRet0; - $794 = (_i64Add(($792|0),($793|0),($526|0),($527|0))|0); - $795 = tempRet0; - $796 = (_i64Add(($794|0),($795|0),($524|0),($525|0))|0); - $797 = tempRet0; - $798 = (_i64Add(($796|0),($797|0),($522|0),($523|0))|0); - $799 = tempRet0; - $800 = (_i64Add(($798|0),($799|0),($784|0),($785|0))|0); - $801 = tempRet0; - $802 = (_bitshift64Shl(($784|0),($785|0),21)|0); - $803 = tempRet0; - $804 = (_i64Add(($562|0),($563|0),1048576,0)|0); - $805 = tempRet0; - $806 = (_bitshift64Ashr(($804|0),($805|0),21)|0); - $807 = tempRet0; - $808 = (_i64Add(($570|0),($571|0),($574|0),($575|0))|0); - $809 = tempRet0; - $810 = (_i64Add(($808|0),($809|0),($572|0),($573|0))|0); - $811 = tempRet0; - $812 = (_i64Add(($810|0),($811|0),($568|0),($569|0))|0); - $813 = tempRet0; - $814 = (_i64Add(($812|0),($813|0),($566|0),($567|0))|0); - $815 = tempRet0; - $816 = (_i64Add(($814|0),($815|0),($564|0),($565|0))|0); - $817 = tempRet0; - $818 = (_i64Add(($816|0),($817|0),($806|0),($807|0))|0); - $819 = tempRet0; - $820 = (_bitshift64Shl(($806|0),($807|0),21)|0); - $821 = tempRet0; - $822 = (_i64Add(($592|0),($593|0),1048576,0)|0); - $823 = tempRet0; - $824 = (_bitshift64Ashr(($822|0),($823|0),21)|0); - $825 = tempRet0; - $826 = (_i64Add(($598|0),($599|0),($600|0),($601|0))|0); - $827 = tempRet0; - $828 = (_i64Add(($826|0),($827|0),($596|0),($597|0))|0); - $829 = tempRet0; - $830 = (_i64Add(($828|0),($829|0),($594|0),($595|0))|0); - $831 = tempRet0; - $832 = (_i64Add(($830|0),($831|0),($824|0),($825|0))|0); - $833 = tempRet0; - $834 = (_bitshift64Shl(($824|0),($825|0),21)|0); - $835 = tempRet0; - $836 = (_i64Subtract(($592|0),($593|0),($834|0),($835|0))|0); - $837 = tempRet0; - $838 = (_i64Add(($610|0),($611|0),1048576,0)|0); - $839 = tempRet0; - $840 = (_bitshift64Lshr(($838|0),($839|0),21)|0); - $841 = tempRet0; - $842 = (_i64Add(($616|0),($617|0),($840|0),($841|0))|0); - $843 = tempRet0; - $844 = (_bitshift64Shl(($840|0),($841|0),21)|0); - $845 = tempRet0; - $846 = (_i64Subtract(($610|0),($611|0),($844|0),($845|0))|0); - $847 = tempRet0; - $848 = (_i64Add(($618|0),($619|0),1048576,0)|0); - $849 = tempRet0; - $850 = (_bitshift64Lshr(($848|0),($849|0),21)|0); - $851 = tempRet0; - $852 = (_bitshift64Shl(($850|0),($851|0),21)|0); - $853 = tempRet0; - $854 = (_i64Subtract(($618|0),($619|0),($852|0),($853|0))|0); - $855 = tempRet0; - $856 = (_i64Add(($628|0),($629|0),1048576,0)|0); - $857 = tempRet0; - $858 = (_bitshift64Lshr(($856|0),($857|0),21)|0); - $859 = tempRet0; - $860 = (_bitshift64Shl(($858|0),($859|0),21)|0); - $861 = tempRet0; - $862 = (_i64Subtract(($628|0),($629|0),($860|0),($861|0))|0); - $863 = tempRet0; - $864 = (_i64Add(($646|0),($647|0),1048576,0)|0); - $865 = tempRet0; - $866 = (_bitshift64Ashr(($864|0),($865|0),21)|0); - $867 = tempRet0; - $868 = (_i64Add(($670|0),($671|0),($866|0),($867|0))|0); - $869 = tempRet0; - $870 = (_bitshift64Shl(($866|0),($867|0),21)|0); - $871 = tempRet0; - $872 = (_i64Subtract(($646|0),($647|0),($870|0),($871|0))|0); - $873 = tempRet0; - $874 = (_i64Add(($666|0),($667|0),1048576,0)|0); - $875 = tempRet0; - $876 = (_bitshift64Ashr(($874|0),($875|0),21)|0); - $877 = tempRet0; - $878 = (_bitshift64Shl(($876|0),($877|0),21)|0); - $879 = tempRet0; - $880 = (_i64Subtract(($666|0),($667|0),($878|0),($879|0))|0); - $881 = tempRet0; - $882 = (_i64Add(($692|0),($693|0),1048576,0)|0); - $883 = tempRet0; - $884 = (_bitshift64Ashr(($882|0),($883|0),21)|0); - $885 = tempRet0; - $886 = (_bitshift64Shl(($884|0),($885|0),21)|0); - $887 = tempRet0; - $888 = (_i64Add(($720|0),($721|0),1048576,0)|0); - $889 = tempRet0; - $890 = (_bitshift64Ashr(($888|0),($889|0),21)|0); - $891 = tempRet0; - $892 = (_bitshift64Shl(($890|0),($891|0),21)|0); - $893 = tempRet0; - $894 = (_i64Add(($752|0),($753|0),1048576,0)|0); - $895 = tempRet0; - $896 = (_bitshift64Ashr(($894|0),($895|0),21)|0); - $897 = tempRet0; - $898 = (_bitshift64Shl(($896|0),($897|0),21)|0); - $899 = tempRet0; - $900 = (_i64Add(($778|0),($779|0),1048576,0)|0); - $901 = tempRet0; - $902 = (_bitshift64Ashr(($900|0),($901|0),21)|0); - $903 = tempRet0; - $904 = (_bitshift64Shl(($902|0),($903|0),21)|0); - $905 = tempRet0; - $906 = (_i64Add(($800|0),($801|0),1048576,0)|0); - $907 = tempRet0; - $908 = (_bitshift64Ashr(($906|0),($907|0),21)|0); - $909 = tempRet0; - $910 = (_bitshift64Shl(($908|0),($909|0),21)|0); - $911 = tempRet0; - $912 = (_i64Add(($818|0),($819|0),1048576,0)|0); - $913 = tempRet0; - $914 = (_bitshift64Ashr(($912|0),($913|0),21)|0); - $915 = tempRet0; - $916 = (_i64Add(($914|0),($915|0),($836|0),($837|0))|0); - $917 = tempRet0; - $918 = (_bitshift64Shl(($914|0),($915|0),21)|0); - $919 = tempRet0; - $920 = (_i64Subtract(($818|0),($819|0),($918|0),($919|0))|0); - $921 = tempRet0; - $922 = (_i64Add(($832|0),($833|0),1048576,0)|0); - $923 = tempRet0; - $924 = (_bitshift64Ashr(($922|0),($923|0),21)|0); - $925 = tempRet0; - $926 = (_i64Add(($924|0),($925|0),($846|0),($847|0))|0); - $927 = tempRet0; - $928 = (_bitshift64Shl(($924|0),($925|0),21)|0); - $929 = tempRet0; - $930 = (_i64Subtract(($832|0),($833|0),($928|0),($929|0))|0); - $931 = tempRet0; - $932 = (_i64Add(($842|0),($843|0),1048576,0)|0); - $933 = tempRet0; - $934 = (_bitshift64Lshr(($932|0),($933|0),21)|0); - $935 = tempRet0; - $936 = (_i64Add(($934|0),($935|0),($854|0),($855|0))|0); - $937 = tempRet0; - $938 = (_bitshift64Shl(($934|0),($935|0),21)|0); - $939 = tempRet0; - $940 = (_i64Subtract(($842|0),($843|0),($938|0),($939|0))|0); - $941 = tempRet0; - $942 = (___muldi3(($850|0),($851|0),666643,0)|0); - $943 = tempRet0; - $944 = (___muldi3(($850|0),($851|0),470296,0)|0); - $945 = tempRet0; - $946 = (___muldi3(($850|0),($851|0),654183,0)|0); - $947 = tempRet0; - $948 = (___muldi3(($850|0),($851|0),-997805,-1)|0); - $949 = tempRet0; - $950 = (___muldi3(($850|0),($851|0),136657,0)|0); - $951 = tempRet0; - $952 = (___muldi3(($850|0),($851|0),-683901,-1)|0); - $953 = tempRet0; - $954 = (_i64Add(($952|0),($953|0),($562|0),($563|0))|0); - $955 = tempRet0; - $956 = (_i64Subtract(($954|0),($955|0),($820|0),($821|0))|0); - $957 = tempRet0; - $958 = (_i64Add(($956|0),($957|0),($908|0),($909|0))|0); - $959 = tempRet0; - $960 = (___muldi3(($936|0),($937|0),666643,0)|0); - $961 = tempRet0; - $962 = (___muldi3(($936|0),($937|0),470296,0)|0); - $963 = tempRet0; - $964 = (___muldi3(($936|0),($937|0),654183,0)|0); - $965 = tempRet0; - $966 = (___muldi3(($936|0),($937|0),-997805,-1)|0); - $967 = tempRet0; - $968 = (___muldi3(($936|0),($937|0),136657,0)|0); - $969 = tempRet0; - $970 = (___muldi3(($936|0),($937|0),-683901,-1)|0); - $971 = tempRet0; - $972 = (___muldi3(($940|0),($941|0),666643,0)|0); - $973 = tempRet0; - $974 = (___muldi3(($940|0),($941|0),470296,0)|0); - $975 = tempRet0; - $976 = (___muldi3(($940|0),($941|0),654183,0)|0); - $977 = tempRet0; - $978 = (___muldi3(($940|0),($941|0),-997805,-1)|0); - $979 = tempRet0; - $980 = (___muldi3(($940|0),($941|0),136657,0)|0); - $981 = tempRet0; - $982 = (___muldi3(($940|0),($941|0),-683901,-1)|0); - $983 = tempRet0; - $984 = (_i64Add(($948|0),($949|0),($520|0),($521|0))|0); - $985 = tempRet0; - $986 = (_i64Subtract(($984|0),($985|0),($802|0),($803|0))|0); - $987 = tempRet0; - $988 = (_i64Add(($986|0),($987|0),($902|0),($903|0))|0); - $989 = tempRet0; - $990 = (_i64Add(($988|0),($989|0),($968|0),($969|0))|0); - $991 = tempRet0; - $992 = (_i64Add(($990|0),($991|0),($982|0),($983|0))|0); - $993 = tempRet0; - $994 = (___muldi3(($926|0),($927|0),666643,0)|0); - $995 = tempRet0; - $996 = (___muldi3(($926|0),($927|0),470296,0)|0); - $997 = tempRet0; - $998 = (___muldi3(($926|0),($927|0),654183,0)|0); - $999 = tempRet0; - $1000 = (___muldi3(($926|0),($927|0),-997805,-1)|0); - $1001 = tempRet0; - $1002 = (___muldi3(($926|0),($927|0),136657,0)|0); - $1003 = tempRet0; - $1004 = (___muldi3(($926|0),($927|0),-683901,-1)|0); - $1005 = tempRet0; - $1006 = (___muldi3(($930|0),($931|0),666643,0)|0); - $1007 = tempRet0; - $1008 = (___muldi3(($930|0),($931|0),470296,0)|0); - $1009 = tempRet0; - $1010 = (___muldi3(($930|0),($931|0),654183,0)|0); - $1011 = tempRet0; - $1012 = (___muldi3(($930|0),($931|0),-997805,-1)|0); - $1013 = tempRet0; - $1014 = (___muldi3(($930|0),($931|0),136657,0)|0); - $1015 = tempRet0; - $1016 = (___muldi3(($930|0),($931|0),-683901,-1)|0); - $1017 = tempRet0; - $1018 = (_i64Add(($944|0),($945|0),($466|0),($467|0))|0); - $1019 = tempRet0; - $1020 = (_i64Subtract(($1018|0),($1019|0),($780|0),($781|0))|0); - $1021 = tempRet0; - $1022 = (_i64Add(($1020|0),($1021|0),($964|0),($965|0))|0); - $1023 = tempRet0; - $1024 = (_i64Add(($1022|0),($1023|0),($1002|0),($1003|0))|0); - $1025 = tempRet0; - $1026 = (_i64Add(($1024|0),($1025|0),($978|0),($979|0))|0); - $1027 = tempRet0; - $1028 = (_i64Add(($1026|0),($1027|0),($1016|0),($1017|0))|0); - $1029 = tempRet0; - $1030 = (_i64Add(($1028|0),($1029|0),($896|0),($897|0))|0); - $1031 = tempRet0; - $1032 = (___muldi3(($916|0),($917|0),666643,0)|0); - $1033 = tempRet0; - $1034 = (_i64Add(($1032|0),($1033|0),($284|0),($285|0))|0); - $1035 = tempRet0; - $1036 = (_i64Subtract(($1034|0),($1035|0),($694|0),($695|0))|0); - $1037 = tempRet0; - $1038 = (_i64Add(($1036|0),($1037|0),($876|0),($877|0))|0); - $1039 = tempRet0; - $1040 = (___muldi3(($916|0),($917|0),470296,0)|0); - $1041 = tempRet0; - $1042 = (___muldi3(($916|0),($917|0),654183,0)|0); - $1043 = tempRet0; - $1044 = (_i64Add(($994|0),($995|0),($336|0),($337|0))|0); - $1045 = tempRet0; - $1046 = (_i64Add(($1044|0),($1045|0),($1042|0),($1043|0))|0); - $1047 = tempRet0; - $1048 = (_i64Add(($1046|0),($1047|0),($1008|0),($1009|0))|0); - $1049 = tempRet0; - $1050 = (_i64Subtract(($1048|0),($1049|0),($722|0),($723|0))|0); - $1051 = tempRet0; - $1052 = (_i64Add(($1050|0),($1051|0),($884|0),($885|0))|0); - $1053 = tempRet0; - $1054 = (___muldi3(($916|0),($917|0),-997805,-1)|0); - $1055 = tempRet0; - $1056 = (___muldi3(($916|0),($917|0),136657,0)|0); - $1057 = tempRet0; - $1058 = (_i64Add(($998|0),($999|0),($960|0),($961|0))|0); - $1059 = tempRet0; - $1060 = (_i64Add(($1058|0),($1059|0),($1056|0),($1057|0))|0); - $1061 = tempRet0; - $1062 = (_i64Add(($1060|0),($1061|0),($974|0),($975|0))|0); - $1063 = tempRet0; - $1064 = (_i64Add(($1062|0),($1063|0),($1012|0),($1013|0))|0); - $1065 = tempRet0; - $1066 = (_i64Add(($1064|0),($1065|0),($400|0),($401|0))|0); - $1067 = tempRet0; - $1068 = (_i64Add(($1066|0),($1067|0),($890|0),($891|0))|0); - $1069 = tempRet0; - $1070 = (_i64Subtract(($1068|0),($1069|0),($754|0),($755|0))|0); - $1071 = tempRet0; - $1072 = (___muldi3(($916|0),($917|0),-683901,-1)|0); - $1073 = tempRet0; - $1074 = (_i64Add(($1038|0),($1039|0),1048576,0)|0); - $1075 = tempRet0; - $1076 = (_bitshift64Ashr(($1074|0),($1075|0),21)|0); - $1077 = tempRet0; - $1078 = (_i64Add(($1006|0),($1007|0),($1040|0),($1041|0))|0); - $1079 = tempRet0; - $1080 = (_i64Add(($1078|0),($1079|0),($692|0),($693|0))|0); - $1081 = tempRet0; - $1082 = (_i64Subtract(($1080|0),($1081|0),($886|0),($887|0))|0); - $1083 = tempRet0; - $1084 = (_i64Add(($1082|0),($1083|0),($1076|0),($1077|0))|0); - $1085 = tempRet0; - $1086 = (_bitshift64Shl(($1076|0),($1077|0),21)|0); - $1087 = tempRet0; - $1088 = (_i64Add(($1052|0),($1053|0),1048576,0)|0); - $1089 = tempRet0; - $1090 = (_bitshift64Ashr(($1088|0),($1089|0),21)|0); - $1091 = tempRet0; - $1092 = (_i64Add(($1054|0),($1055|0),($996|0),($997|0))|0); - $1093 = tempRet0; - $1094 = (_i64Add(($1092|0),($1093|0),($972|0),($973|0))|0); - $1095 = tempRet0; - $1096 = (_i64Add(($1094|0),($1095|0),($1010|0),($1011|0))|0); - $1097 = tempRet0; - $1098 = (_i64Add(($1096|0),($1097|0),($720|0),($721|0))|0); - $1099 = tempRet0; - $1100 = (_i64Subtract(($1098|0),($1099|0),($892|0),($893|0))|0); - $1101 = tempRet0; - $1102 = (_i64Add(($1100|0),($1101|0),($1090|0),($1091|0))|0); - $1103 = tempRet0; - $1104 = (_bitshift64Shl(($1090|0),($1091|0),21)|0); - $1105 = tempRet0; - $1106 = (_i64Add(($1070|0),($1071|0),1048576,0)|0); - $1107 = tempRet0; - $1108 = (_bitshift64Ashr(($1106|0),($1107|0),21)|0); - $1109 = tempRet0; - $1110 = (_i64Add(($962|0),($963|0),($942|0),($943|0))|0); - $1111 = tempRet0; - $1112 = (_i64Add(($1110|0),($1111|0),($1000|0),($1001|0))|0); - $1113 = tempRet0; - $1114 = (_i64Add(($1112|0),($1113|0),($1072|0),($1073|0))|0); - $1115 = tempRet0; - $1116 = (_i64Add(($1114|0),($1115|0),($976|0),($977|0))|0); - $1117 = tempRet0; - $1118 = (_i64Add(($1116|0),($1117|0),($1014|0),($1015|0))|0); - $1119 = tempRet0; - $1120 = (_i64Add(($1118|0),($1119|0),($752|0),($753|0))|0); - $1121 = tempRet0; - $1122 = (_i64Subtract(($1120|0),($1121|0),($898|0),($899|0))|0); - $1123 = tempRet0; - $1124 = (_i64Add(($1122|0),($1123|0),($1108|0),($1109|0))|0); - $1125 = tempRet0; - $1126 = (_bitshift64Shl(($1108|0),($1109|0),21)|0); - $1127 = tempRet0; - $1128 = (_i64Add(($1030|0),($1031|0),1048576,0)|0); - $1129 = tempRet0; - $1130 = (_bitshift64Ashr(($1128|0),($1129|0),21)|0); - $1131 = tempRet0; - $1132 = (_i64Add(($778|0),($779|0),($946|0),($947|0))|0); - $1133 = tempRet0; - $1134 = (_i64Subtract(($1132|0),($1133|0),($904|0),($905|0))|0); - $1135 = tempRet0; - $1136 = (_i64Add(($1134|0),($1135|0),($966|0),($967|0))|0); - $1137 = tempRet0; - $1138 = (_i64Add(($1136|0),($1137|0),($1004|0),($1005|0))|0); - $1139 = tempRet0; - $1140 = (_i64Add(($1138|0),($1139|0),($980|0),($981|0))|0); - $1141 = tempRet0; - $1142 = (_i64Add(($1140|0),($1141|0),($1130|0),($1131|0))|0); - $1143 = tempRet0; - $1144 = (_bitshift64Shl(($1130|0),($1131|0),21)|0); - $1145 = tempRet0; - $1146 = (_i64Subtract(($1030|0),($1031|0),($1144|0),($1145|0))|0); - $1147 = tempRet0; - $1148 = (_i64Add(($992|0),($993|0),1048576,0)|0); - $1149 = tempRet0; - $1150 = (_bitshift64Ashr(($1148|0),($1149|0),21)|0); - $1151 = tempRet0; - $1152 = (_i64Add(($800|0),($801|0),($950|0),($951|0))|0); - $1153 = tempRet0; - $1154 = (_i64Subtract(($1152|0),($1153|0),($910|0),($911|0))|0); - $1155 = tempRet0; - $1156 = (_i64Add(($1154|0),($1155|0),($970|0),($971|0))|0); - $1157 = tempRet0; - $1158 = (_i64Add(($1156|0),($1157|0),($1150|0),($1151|0))|0); - $1159 = tempRet0; - $1160 = (_bitshift64Shl(($1150|0),($1151|0),21)|0); - $1161 = tempRet0; - $1162 = (_i64Subtract(($992|0),($993|0),($1160|0),($1161|0))|0); - $1163 = tempRet0; - $1164 = (_i64Add(($958|0),($959|0),1048576,0)|0); - $1165 = tempRet0; - $1166 = (_bitshift64Ashr(($1164|0),($1165|0),21)|0); - $1167 = tempRet0; - $1168 = (_i64Add(($1166|0),($1167|0),($920|0),($921|0))|0); - $1169 = tempRet0; - $1170 = (_bitshift64Shl(($1166|0),($1167|0),21)|0); - $1171 = tempRet0; - $1172 = (_i64Subtract(($958|0),($959|0),($1170|0),($1171|0))|0); - $1173 = tempRet0; - $1174 = (_i64Add(($1084|0),($1085|0),1048576,0)|0); - $1175 = tempRet0; - $1176 = (_bitshift64Ashr(($1174|0),($1175|0),21)|0); - $1177 = tempRet0; - $1178 = (_bitshift64Shl(($1176|0),($1177|0),21)|0); - $1179 = tempRet0; - $1180 = (_i64Add(($1102|0),($1103|0),1048576,0)|0); - $1181 = tempRet0; - $1182 = (_bitshift64Ashr(($1180|0),($1181|0),21)|0); - $1183 = tempRet0; - $1184 = (_bitshift64Shl(($1182|0),($1183|0),21)|0); - $1185 = tempRet0; - $1186 = (_i64Add(($1124|0),($1125|0),1048576,0)|0); - $1187 = tempRet0; - $1188 = (_bitshift64Ashr(($1186|0),($1187|0),21)|0); - $1189 = tempRet0; - $1190 = (_i64Add(($1146|0),($1147|0),($1188|0),($1189|0))|0); - $1191 = tempRet0; - $1192 = (_bitshift64Shl(($1188|0),($1189|0),21)|0); - $1193 = tempRet0; - $1194 = (_i64Subtract(($1124|0),($1125|0),($1192|0),($1193|0))|0); - $1195 = tempRet0; - $1196 = (_i64Add(($1142|0),($1143|0),1048576,0)|0); - $1197 = tempRet0; - $1198 = (_bitshift64Ashr(($1196|0),($1197|0),21)|0); - $1199 = tempRet0; - $1200 = (_i64Add(($1198|0),($1199|0),($1162|0),($1163|0))|0); - $1201 = tempRet0; - $1202 = (_bitshift64Shl(($1198|0),($1199|0),21)|0); - $1203 = tempRet0; - $1204 = (_i64Subtract(($1142|0),($1143|0),($1202|0),($1203|0))|0); - $1205 = tempRet0; - $1206 = (_i64Add(($1158|0),($1159|0),1048576,0)|0); - $1207 = tempRet0; - $1208 = (_bitshift64Ashr(($1206|0),($1207|0),21)|0); - $1209 = tempRet0; - $1210 = (_i64Add(($1208|0),($1209|0),($1172|0),($1173|0))|0); - $1211 = tempRet0; - $1212 = (_bitshift64Shl(($1208|0),($1209|0),21)|0); - $1213 = tempRet0; - $1214 = (_i64Subtract(($1158|0),($1159|0),($1212|0),($1213|0))|0); - $1215 = tempRet0; - $1216 = (___muldi3(($1168|0),($1169|0),666643,0)|0); - $1217 = tempRet0; - $1218 = (_i64Add(($880|0),($881|0),($1216|0),($1217|0))|0); - $1219 = tempRet0; - $1220 = (___muldi3(($1168|0),($1169|0),470296,0)|0); - $1221 = tempRet0; - $1222 = (___muldi3(($1168|0),($1169|0),654183,0)|0); - $1223 = tempRet0; - $1224 = (___muldi3(($1168|0),($1169|0),-997805,-1)|0); - $1225 = tempRet0; - $1226 = (___muldi3(($1168|0),($1169|0),136657,0)|0); - $1227 = tempRet0; - $1228 = (___muldi3(($1168|0),($1169|0),-683901,-1)|0); - $1229 = tempRet0; - $1230 = (_i64Add(($1070|0),($1071|0),($1228|0),($1229|0))|0); - $1231 = tempRet0; - $1232 = (_i64Subtract(($1230|0),($1231|0),($1126|0),($1127|0))|0); - $1233 = tempRet0; - $1234 = (_i64Add(($1232|0),($1233|0),($1182|0),($1183|0))|0); - $1235 = tempRet0; - $1236 = (___muldi3(($1210|0),($1211|0),666643,0)|0); - $1237 = tempRet0; - $1238 = (_i64Add(($868|0),($869|0),($1236|0),($1237|0))|0); - $1239 = tempRet0; - $1240 = (___muldi3(($1210|0),($1211|0),470296,0)|0); - $1241 = tempRet0; - $1242 = (_i64Add(($1218|0),($1219|0),($1240|0),($1241|0))|0); - $1243 = tempRet0; - $1244 = (___muldi3(($1210|0),($1211|0),654183,0)|0); - $1245 = tempRet0; - $1246 = (___muldi3(($1210|0),($1211|0),-997805,-1)|0); - $1247 = tempRet0; - $1248 = (___muldi3(($1210|0),($1211|0),136657,0)|0); - $1249 = tempRet0; - $1250 = (___muldi3(($1210|0),($1211|0),-683901,-1)|0); - $1251 = tempRet0; - $1252 = (___muldi3(($1214|0),($1215|0),666643,0)|0); - $1253 = tempRet0; - $1254 = (_i64Add(($872|0),($873|0),($1252|0),($1253|0))|0); - $1255 = tempRet0; - $1256 = (___muldi3(($1214|0),($1215|0),470296,0)|0); - $1257 = tempRet0; - $1258 = (_i64Add(($1238|0),($1239|0),($1256|0),($1257|0))|0); - $1259 = tempRet0; - $1260 = (___muldi3(($1214|0),($1215|0),654183,0)|0); - $1261 = tempRet0; - $1262 = (_i64Add(($1242|0),($1243|0),($1260|0),($1261|0))|0); - $1263 = tempRet0; - $1264 = (___muldi3(($1214|0),($1215|0),-997805,-1)|0); - $1265 = tempRet0; - $1266 = (___muldi3(($1214|0),($1215|0),136657,0)|0); - $1267 = tempRet0; - $1268 = (___muldi3(($1214|0),($1215|0),-683901,-1)|0); - $1269 = tempRet0; - $1270 = (_i64Add(($1052|0),($1053|0),($1224|0),($1225|0))|0); - $1271 = tempRet0; - $1272 = (_i64Subtract(($1270|0),($1271|0),($1104|0),($1105|0))|0); - $1273 = tempRet0; - $1274 = (_i64Add(($1272|0),($1273|0),($1176|0),($1177|0))|0); - $1275 = tempRet0; - $1276 = (_i64Add(($1274|0),($1275|0),($1248|0),($1249|0))|0); - $1277 = tempRet0; - $1278 = (_i64Add(($1276|0),($1277|0),($1268|0),($1269|0))|0); - $1279 = tempRet0; - $1280 = (___muldi3(($1200|0),($1201|0),666643,0)|0); - $1281 = tempRet0; - $1282 = (___muldi3(($1200|0),($1201|0),470296,0)|0); - $1283 = tempRet0; - $1284 = (___muldi3(($1200|0),($1201|0),654183,0)|0); - $1285 = tempRet0; - $1286 = (___muldi3(($1200|0),($1201|0),-997805,-1)|0); - $1287 = tempRet0; - $1288 = (___muldi3(($1200|0),($1201|0),136657,0)|0); - $1289 = tempRet0; - $1290 = (___muldi3(($1200|0),($1201|0),-683901,-1)|0); - $1291 = tempRet0; - $1292 = (___muldi3(($1204|0),($1205|0),666643,0)|0); - $1293 = tempRet0; - $1294 = (___muldi3(($1204|0),($1205|0),470296,0)|0); - $1295 = tempRet0; - $1296 = (___muldi3(($1204|0),($1205|0),654183,0)|0); - $1297 = tempRet0; - $1298 = (___muldi3(($1204|0),($1205|0),-997805,-1)|0); - $1299 = tempRet0; - $1300 = (___muldi3(($1204|0),($1205|0),136657,0)|0); - $1301 = tempRet0; - $1302 = (___muldi3(($1204|0),($1205|0),-683901,-1)|0); - $1303 = tempRet0; - $1304 = (_i64Add(($1038|0),($1039|0),($1220|0),($1221|0))|0); - $1305 = tempRet0; - $1306 = (_i64Subtract(($1304|0),($1305|0),($1086|0),($1087|0))|0); - $1307 = tempRet0; - $1308 = (_i64Add(($1306|0),($1307|0),($1244|0),($1245|0))|0); - $1309 = tempRet0; - $1310 = (_i64Add(($1308|0),($1309|0),($1264|0),($1265|0))|0); - $1311 = tempRet0; - $1312 = (_i64Add(($1310|0),($1311|0),($1288|0),($1289|0))|0); - $1313 = tempRet0; - $1314 = (_i64Add(($1312|0),($1313|0),($1302|0),($1303|0))|0); - $1315 = tempRet0; - $1316 = (___muldi3(($1190|0),($1191|0),666643,0)|0); - $1317 = tempRet0; - $1318 = (_i64Add(($1316|0),($1317|0),($632|0),($633|0))|0); - $1319 = tempRet0; - $1320 = (___muldi3(($1190|0),($1191|0),470296,0)|0); - $1321 = tempRet0; - $1322 = (___muldi3(($1190|0),($1191|0),654183,0)|0); - $1323 = tempRet0; - $1324 = (_i64Add(($858|0),($859|0),($216|0),($217|0))|0); - $1325 = tempRet0; - $1326 = (_i64Subtract(($1324|0),($1325|0),($648|0),($649|0))|0); - $1327 = tempRet0; - $1328 = (_i64Add(($1326|0),($1327|0),($1322|0),($1323|0))|0); - $1329 = tempRet0; - $1330 = (_i64Add(($1328|0),($1329|0),($1280|0),($1281|0))|0); - $1331 = tempRet0; - $1332 = (_i64Add(($1330|0),($1331|0),($1294|0),($1295|0))|0); - $1333 = tempRet0; - $1334 = (___muldi3(($1190|0),($1191|0),-997805,-1)|0); - $1335 = tempRet0; - $1336 = (___muldi3(($1190|0),($1191|0),136657,0)|0); - $1337 = tempRet0; - $1338 = (_i64Add(($1258|0),($1259|0),($1336|0),($1337|0))|0); - $1339 = tempRet0; - $1340 = (_i64Add(($1338|0),($1339|0),($1284|0),($1285|0))|0); - $1341 = tempRet0; - $1342 = (_i64Add(($1340|0),($1341|0),($1298|0),($1299|0))|0); - $1343 = tempRet0; - $1344 = (___muldi3(($1190|0),($1191|0),-683901,-1)|0); - $1345 = tempRet0; - $1346 = (_i64Add(($1318|0),($1319|0),1048576,0)|0); - $1347 = tempRet0; - $1348 = (_bitshift64Ashr(($1346|0),($1347|0),21)|0); - $1349 = tempRet0; - $1350 = (_i64Add(($862|0),($863|0),($1320|0),($1321|0))|0); - $1351 = tempRet0; - $1352 = (_i64Add(($1350|0),($1351|0),($1292|0),($1293|0))|0); - $1353 = tempRet0; - $1354 = (_i64Add(($1352|0),($1353|0),($1348|0),($1349|0))|0); - $1355 = tempRet0; - $1356 = (_bitshift64Shl(($1348|0),($1349|0),21)|0); - $1357 = tempRet0; - $1358 = (_i64Subtract(($1318|0),($1319|0),($1356|0),($1357|0))|0); - $1359 = tempRet0; - $1360 = (_i64Add(($1332|0),($1333|0),1048576,0)|0); - $1361 = tempRet0; - $1362 = (_bitshift64Ashr(($1360|0),($1361|0),21)|0); - $1363 = tempRet0; - $1364 = (_i64Add(($1254|0),($1255|0),($1334|0),($1335|0))|0); - $1365 = tempRet0; - $1366 = (_i64Add(($1364|0),($1365|0),($1282|0),($1283|0))|0); - $1367 = tempRet0; - $1368 = (_i64Add(($1366|0),($1367|0),($1296|0),($1297|0))|0); - $1369 = tempRet0; - $1370 = (_i64Add(($1368|0),($1369|0),($1362|0),($1363|0))|0); - $1371 = tempRet0; - $1372 = (_bitshift64Shl(($1362|0),($1363|0),21)|0); - $1373 = tempRet0; - $1374 = (_i64Add(($1342|0),($1343|0),1048576,0)|0); - $1375 = tempRet0; - $1376 = (_bitshift64Ashr(($1374|0),($1375|0),21)|0); - $1377 = tempRet0; - $1378 = (_i64Add(($1262|0),($1263|0),($1344|0),($1345|0))|0); - $1379 = tempRet0; - $1380 = (_i64Add(($1378|0),($1379|0),($1286|0),($1287|0))|0); - $1381 = tempRet0; - $1382 = (_i64Add(($1380|0),($1381|0),($1300|0),($1301|0))|0); - $1383 = tempRet0; - $1384 = (_i64Add(($1382|0),($1383|0),($1376|0),($1377|0))|0); - $1385 = tempRet0; - $1386 = (_bitshift64Shl(($1376|0),($1377|0),21)|0); - $1387 = tempRet0; - $1388 = (_i64Add(($1314|0),($1315|0),1048576,0)|0); - $1389 = tempRet0; - $1390 = (_bitshift64Ashr(($1388|0),($1389|0),21)|0); - $1391 = tempRet0; - $1392 = (_i64Add(($1084|0),($1085|0),($1222|0),($1223|0))|0); - $1393 = tempRet0; - $1394 = (_i64Add(($1392|0),($1393|0),($1246|0),($1247|0))|0); - $1395 = tempRet0; - $1396 = (_i64Subtract(($1394|0),($1395|0),($1178|0),($1179|0))|0); - $1397 = tempRet0; - $1398 = (_i64Add(($1396|0),($1397|0),($1266|0),($1267|0))|0); - $1399 = tempRet0; - $1400 = (_i64Add(($1398|0),($1399|0),($1290|0),($1291|0))|0); - $1401 = tempRet0; - $1402 = (_i64Add(($1400|0),($1401|0),($1390|0),($1391|0))|0); - $1403 = tempRet0; - $1404 = (_bitshift64Shl(($1390|0),($1391|0),21)|0); - $1405 = tempRet0; - $1406 = (_i64Subtract(($1314|0),($1315|0),($1404|0),($1405|0))|0); - $1407 = tempRet0; - $1408 = (_i64Add(($1278|0),($1279|0),1048576,0)|0); - $1409 = tempRet0; - $1410 = (_bitshift64Ashr(($1408|0),($1409|0),21)|0); - $1411 = tempRet0; - $1412 = (_i64Add(($1102|0),($1103|0),($1226|0),($1227|0))|0); - $1413 = tempRet0; - $1414 = (_i64Add(($1412|0),($1413|0),($1250|0),($1251|0))|0); - $1415 = tempRet0; - $1416 = (_i64Subtract(($1414|0),($1415|0),($1184|0),($1185|0))|0); - $1417 = tempRet0; - $1418 = (_i64Add(($1416|0),($1417|0),($1410|0),($1411|0))|0); - $1419 = tempRet0; - $1420 = (_bitshift64Shl(($1410|0),($1411|0),21)|0); - $1421 = tempRet0; - $1422 = (_i64Subtract(($1278|0),($1279|0),($1420|0),($1421|0))|0); - $1423 = tempRet0; - $1424 = (_i64Add(($1234|0),($1235|0),1048576,0)|0); - $1425 = tempRet0; - $1426 = (_bitshift64Ashr(($1424|0),($1425|0),21)|0); - $1427 = tempRet0; - $1428 = (_i64Add(($1194|0),($1195|0),($1426|0),($1427|0))|0); - $1429 = tempRet0; - $1430 = (_bitshift64Shl(($1426|0),($1427|0),21)|0); - $1431 = tempRet0; - $1432 = (_i64Subtract(($1234|0),($1235|0),($1430|0),($1431|0))|0); - $1433 = tempRet0; - $1434 = (_i64Add(($1354|0),($1355|0),1048576,0)|0); - $1435 = tempRet0; - $1436 = (_bitshift64Ashr(($1434|0),($1435|0),21)|0); - $1437 = tempRet0; - $1438 = (_bitshift64Shl(($1436|0),($1437|0),21)|0); - $1439 = tempRet0; - $1440 = (_i64Add(($1370|0),($1371|0),1048576,0)|0); - $1441 = tempRet0; - $1442 = (_bitshift64Ashr(($1440|0),($1441|0),21)|0); - $1443 = tempRet0; - $1444 = (_bitshift64Shl(($1442|0),($1443|0),21)|0); - $1445 = tempRet0; - $1446 = (_i64Add(($1384|0),($1385|0),1048576,0)|0); - $1447 = tempRet0; - $1448 = (_bitshift64Ashr(($1446|0),($1447|0),21)|0); - $1449 = tempRet0; - $1450 = (_i64Add(($1406|0),($1407|0),($1448|0),($1449|0))|0); - $1451 = tempRet0; - $1452 = (_bitshift64Shl(($1448|0),($1449|0),21)|0); - $1453 = tempRet0; - $1454 = (_i64Add(($1402|0),($1403|0),1048576,0)|0); - $1455 = tempRet0; - $1456 = (_bitshift64Ashr(($1454|0),($1455|0),21)|0); - $1457 = tempRet0; - $1458 = (_i64Add(($1422|0),($1423|0),($1456|0),($1457|0))|0); - $1459 = tempRet0; - $1460 = (_bitshift64Shl(($1456|0),($1457|0),21)|0); - $1461 = tempRet0; - $1462 = (_i64Subtract(($1402|0),($1403|0),($1460|0),($1461|0))|0); - $1463 = tempRet0; - $1464 = (_i64Add(($1418|0),($1419|0),1048576,0)|0); - $1465 = tempRet0; - $1466 = (_bitshift64Ashr(($1464|0),($1465|0),21)|0); - $1467 = tempRet0; - $1468 = (_i64Add(($1432|0),($1433|0),($1466|0),($1467|0))|0); - $1469 = tempRet0; - $1470 = (_bitshift64Shl(($1466|0),($1467|0),21)|0); - $1471 = tempRet0; - $1472 = (_i64Subtract(($1418|0),($1419|0),($1470|0),($1471|0))|0); - $1473 = tempRet0; - $1474 = (_i64Add(($1428|0),($1429|0),1048576,0)|0); - $1475 = tempRet0; - $1476 = (_bitshift64Ashr(($1474|0),($1475|0),21)|0); - $1477 = tempRet0; - $1478 = (_bitshift64Shl(($1476|0),($1477|0),21)|0); - $1479 = tempRet0; - $1480 = (_i64Subtract(($1428|0),($1429|0),($1478|0),($1479|0))|0); - $1481 = tempRet0; - $1482 = (___muldi3(($1476|0),($1477|0),666643,0)|0); - $1483 = tempRet0; - $1484 = (_i64Add(($1358|0),($1359|0),($1482|0),($1483|0))|0); - $1485 = tempRet0; - $1486 = (___muldi3(($1476|0),($1477|0),470296,0)|0); - $1487 = tempRet0; - $1488 = (___muldi3(($1476|0),($1477|0),654183,0)|0); - $1489 = tempRet0; - $1490 = (___muldi3(($1476|0),($1477|0),-997805,-1)|0); - $1491 = tempRet0; - $1492 = (___muldi3(($1476|0),($1477|0),136657,0)|0); - $1493 = tempRet0; - $1494 = (___muldi3(($1476|0),($1477|0),-683901,-1)|0); - $1495 = tempRet0; - $1496 = (_bitshift64Ashr(($1484|0),($1485|0),21)|0); - $1497 = tempRet0; - $1498 = (_i64Add(($1486|0),($1487|0),($1354|0),($1355|0))|0); - $1499 = tempRet0; - $1500 = (_i64Subtract(($1498|0),($1499|0),($1438|0),($1439|0))|0); - $1501 = tempRet0; - $1502 = (_i64Add(($1500|0),($1501|0),($1496|0),($1497|0))|0); - $1503 = tempRet0; - $1504 = (_bitshift64Shl(($1496|0),($1497|0),21)|0); - $1505 = tempRet0; - $1506 = (_i64Subtract(($1484|0),($1485|0),($1504|0),($1505|0))|0); - $1507 = tempRet0; - $1508 = (_bitshift64Ashr(($1502|0),($1503|0),21)|0); - $1509 = tempRet0; - $1510 = (_i64Add(($1488|0),($1489|0),($1332|0),($1333|0))|0); - $1511 = tempRet0; - $1512 = (_i64Subtract(($1510|0),($1511|0),($1372|0),($1373|0))|0); - $1513 = tempRet0; - $1514 = (_i64Add(($1512|0),($1513|0),($1436|0),($1437|0))|0); - $1515 = tempRet0; - $1516 = (_i64Add(($1514|0),($1515|0),($1508|0),($1509|0))|0); - $1517 = tempRet0; - $1518 = (_bitshift64Shl(($1508|0),($1509|0),21)|0); - $1519 = tempRet0; - $1520 = (_i64Subtract(($1502|0),($1503|0),($1518|0),($1519|0))|0); - $1521 = tempRet0; - $1522 = (_bitshift64Ashr(($1516|0),($1517|0),21)|0); - $1523 = tempRet0; - $1524 = (_i64Add(($1370|0),($1371|0),($1490|0),($1491|0))|0); - $1525 = tempRet0; - $1526 = (_i64Subtract(($1524|0),($1525|0),($1444|0),($1445|0))|0); - $1527 = tempRet0; - $1528 = (_i64Add(($1526|0),($1527|0),($1522|0),($1523|0))|0); - $1529 = tempRet0; - $1530 = (_bitshift64Shl(($1522|0),($1523|0),21)|0); - $1531 = tempRet0; - $1532 = (_i64Subtract(($1516|0),($1517|0),($1530|0),($1531|0))|0); - $1533 = tempRet0; - $1534 = (_bitshift64Ashr(($1528|0),($1529|0),21)|0); - $1535 = tempRet0; - $1536 = (_i64Add(($1492|0),($1493|0),($1342|0),($1343|0))|0); - $1537 = tempRet0; - $1538 = (_i64Subtract(($1536|0),($1537|0),($1386|0),($1387|0))|0); - $1539 = tempRet0; - $1540 = (_i64Add(($1538|0),($1539|0),($1442|0),($1443|0))|0); - $1541 = tempRet0; - $1542 = (_i64Add(($1540|0),($1541|0),($1534|0),($1535|0))|0); - $1543 = tempRet0; - $1544 = (_bitshift64Shl(($1534|0),($1535|0),21)|0); - $1545 = tempRet0; - $1546 = (_i64Subtract(($1528|0),($1529|0),($1544|0),($1545|0))|0); - $1547 = tempRet0; - $1548 = (_bitshift64Ashr(($1542|0),($1543|0),21)|0); - $1549 = tempRet0; - $1550 = (_i64Add(($1384|0),($1385|0),($1494|0),($1495|0))|0); - $1551 = tempRet0; - $1552 = (_i64Subtract(($1550|0),($1551|0),($1452|0),($1453|0))|0); - $1553 = tempRet0; - $1554 = (_i64Add(($1552|0),($1553|0),($1548|0),($1549|0))|0); - $1555 = tempRet0; - $1556 = (_bitshift64Shl(($1548|0),($1549|0),21)|0); - $1557 = tempRet0; - $1558 = (_i64Subtract(($1542|0),($1543|0),($1556|0),($1557|0))|0); - $1559 = tempRet0; - $1560 = (_bitshift64Ashr(($1554|0),($1555|0),21)|0); - $1561 = tempRet0; - $1562 = (_i64Add(($1450|0),($1451|0),($1560|0),($1561|0))|0); - $1563 = tempRet0; - $1564 = (_bitshift64Shl(($1560|0),($1561|0),21)|0); - $1565 = tempRet0; - $1566 = (_i64Subtract(($1554|0),($1555|0),($1564|0),($1565|0))|0); - $1567 = tempRet0; - $1568 = (_bitshift64Ashr(($1562|0),($1563|0),21)|0); - $1569 = tempRet0; - $1570 = (_i64Add(($1568|0),($1569|0),($1462|0),($1463|0))|0); - $1571 = tempRet0; - $1572 = (_bitshift64Shl(($1568|0),($1569|0),21)|0); - $1573 = tempRet0; - $1574 = (_i64Subtract(($1562|0),($1563|0),($1572|0),($1573|0))|0); - $1575 = tempRet0; - $1576 = (_bitshift64Ashr(($1570|0),($1571|0),21)|0); - $1577 = tempRet0; - $1578 = (_i64Add(($1458|0),($1459|0),($1576|0),($1577|0))|0); - $1579 = tempRet0; - $1580 = (_bitshift64Shl(($1576|0),($1577|0),21)|0); - $1581 = tempRet0; - $1582 = (_i64Subtract(($1570|0),($1571|0),($1580|0),($1581|0))|0); - $1583 = tempRet0; - $1584 = (_bitshift64Ashr(($1578|0),($1579|0),21)|0); - $1585 = tempRet0; - $1586 = (_i64Add(($1584|0),($1585|0),($1472|0),($1473|0))|0); - $1587 = tempRet0; - $1588 = (_bitshift64Shl(($1584|0),($1585|0),21)|0); - $1589 = tempRet0; - $1590 = (_i64Subtract(($1578|0),($1579|0),($1588|0),($1589|0))|0); - $1591 = tempRet0; - $1592 = (_bitshift64Ashr(($1586|0),($1587|0),21)|0); - $1593 = tempRet0; - $1594 = (_i64Add(($1468|0),($1469|0),($1592|0),($1593|0))|0); - $1595 = tempRet0; - $1596 = (_bitshift64Shl(($1592|0),($1593|0),21)|0); - $1597 = tempRet0; - $1598 = (_i64Subtract(($1586|0),($1587|0),($1596|0),($1597|0))|0); - $1599 = tempRet0; - $1600 = (_bitshift64Ashr(($1594|0),($1595|0),21)|0); - $1601 = tempRet0; - $1602 = (_i64Add(($1600|0),($1601|0),($1480|0),($1481|0))|0); - $1603 = tempRet0; - $1604 = (_bitshift64Shl(($1600|0),($1601|0),21)|0); - $1605 = tempRet0; - $1606 = (_i64Subtract(($1594|0),($1595|0),($1604|0),($1605|0))|0); - $1607 = tempRet0; - $1608 = (_bitshift64Ashr(($1602|0),($1603|0),21)|0); - $1609 = tempRet0; - $1610 = (_bitshift64Shl(($1608|0),($1609|0),21)|0); - $1611 = tempRet0; - $1612 = (_i64Subtract(($1602|0),($1603|0),($1610|0),($1611|0))|0); - $1613 = tempRet0; - $1614 = (___muldi3(($1608|0),($1609|0),666643,0)|0); - $1615 = tempRet0; - $1616 = (_i64Add(($1614|0),($1615|0),($1506|0),($1507|0))|0); - $1617 = tempRet0; - $1618 = (___muldi3(($1608|0),($1609|0),470296,0)|0); - $1619 = tempRet0; - $1620 = (_i64Add(($1520|0),($1521|0),($1618|0),($1619|0))|0); - $1621 = tempRet0; - $1622 = (___muldi3(($1608|0),($1609|0),654183,0)|0); - $1623 = tempRet0; - $1624 = (_i64Add(($1532|0),($1533|0),($1622|0),($1623|0))|0); - $1625 = tempRet0; - $1626 = (___muldi3(($1608|0),($1609|0),-997805,-1)|0); - $1627 = tempRet0; - $1628 = (_i64Add(($1546|0),($1547|0),($1626|0),($1627|0))|0); - $1629 = tempRet0; - $1630 = (___muldi3(($1608|0),($1609|0),136657,0)|0); - $1631 = tempRet0; - $1632 = (_i64Add(($1558|0),($1559|0),($1630|0),($1631|0))|0); - $1633 = tempRet0; - $1634 = (___muldi3(($1608|0),($1609|0),-683901,-1)|0); - $1635 = tempRet0; - $1636 = (_i64Add(($1566|0),($1567|0),($1634|0),($1635|0))|0); - $1637 = tempRet0; - $1638 = (_bitshift64Ashr(($1616|0),($1617|0),21)|0); - $1639 = tempRet0; - $1640 = (_i64Add(($1620|0),($1621|0),($1638|0),($1639|0))|0); - $1641 = tempRet0; - $1642 = (_bitshift64Shl(($1638|0),($1639|0),21)|0); - $1643 = tempRet0; - $1644 = (_i64Subtract(($1616|0),($1617|0),($1642|0),($1643|0))|0); - $1645 = tempRet0; - $1646 = (_bitshift64Ashr(($1640|0),($1641|0),21)|0); - $1647 = tempRet0; - $1648 = (_i64Add(($1624|0),($1625|0),($1646|0),($1647|0))|0); - $1649 = tempRet0; - $1650 = (_bitshift64Shl(($1646|0),($1647|0),21)|0); - $1651 = tempRet0; - $1652 = (_i64Subtract(($1640|0),($1641|0),($1650|0),($1651|0))|0); - $1653 = tempRet0; - $1654 = (_bitshift64Ashr(($1648|0),($1649|0),21)|0); - $1655 = tempRet0; - $1656 = (_i64Add(($1628|0),($1629|0),($1654|0),($1655|0))|0); - $1657 = tempRet0; - $1658 = (_bitshift64Shl(($1654|0),($1655|0),21)|0); - $1659 = tempRet0; - $1660 = (_i64Subtract(($1648|0),($1649|0),($1658|0),($1659|0))|0); - $1661 = tempRet0; - $1662 = (_bitshift64Ashr(($1656|0),($1657|0),21)|0); - $1663 = tempRet0; - $1664 = (_i64Add(($1632|0),($1633|0),($1662|0),($1663|0))|0); - $1665 = tempRet0; - $1666 = (_bitshift64Shl(($1662|0),($1663|0),21)|0); - $1667 = tempRet0; - $1668 = (_i64Subtract(($1656|0),($1657|0),($1666|0),($1667|0))|0); - $1669 = tempRet0; - $1670 = (_bitshift64Ashr(($1664|0),($1665|0),21)|0); - $1671 = tempRet0; - $1672 = (_i64Add(($1636|0),($1637|0),($1670|0),($1671|0))|0); - $1673 = tempRet0; - $1674 = (_bitshift64Shl(($1670|0),($1671|0),21)|0); - $1675 = tempRet0; - $1676 = (_i64Subtract(($1664|0),($1665|0),($1674|0),($1675|0))|0); - $1677 = tempRet0; - $1678 = (_bitshift64Ashr(($1672|0),($1673|0),21)|0); - $1679 = tempRet0; - $1680 = (_i64Add(($1678|0),($1679|0),($1574|0),($1575|0))|0); - $1681 = tempRet0; - $1682 = (_bitshift64Shl(($1678|0),($1679|0),21)|0); - $1683 = tempRet0; - $1684 = (_i64Subtract(($1672|0),($1673|0),($1682|0),($1683|0))|0); - $1685 = tempRet0; - $1686 = (_bitshift64Ashr(($1680|0),($1681|0),21)|0); - $1687 = tempRet0; - $1688 = (_i64Add(($1686|0),($1687|0),($1582|0),($1583|0))|0); - $1689 = tempRet0; - $1690 = (_bitshift64Shl(($1686|0),($1687|0),21)|0); - $1691 = tempRet0; - $1692 = (_i64Subtract(($1680|0),($1681|0),($1690|0),($1691|0))|0); - $1693 = tempRet0; - $1694 = (_bitshift64Ashr(($1688|0),($1689|0),21)|0); - $1695 = tempRet0; - $1696 = (_i64Add(($1694|0),($1695|0),($1590|0),($1591|0))|0); - $1697 = tempRet0; - $1698 = (_bitshift64Shl(($1694|0),($1695|0),21)|0); - $1699 = tempRet0; - $1700 = (_i64Subtract(($1688|0),($1689|0),($1698|0),($1699|0))|0); - $1701 = tempRet0; - $1702 = (_bitshift64Ashr(($1696|0),($1697|0),21)|0); - $1703 = tempRet0; - $1704 = (_i64Add(($1702|0),($1703|0),($1598|0),($1599|0))|0); - $1705 = tempRet0; - $1706 = (_bitshift64Shl(($1702|0),($1703|0),21)|0); - $1707 = tempRet0; - $1708 = (_i64Subtract(($1696|0),($1697|0),($1706|0),($1707|0))|0); - $1709 = tempRet0; - $1710 = (_bitshift64Ashr(($1704|0),($1705|0),21)|0); - $1711 = tempRet0; - $1712 = (_i64Add(($1710|0),($1711|0),($1606|0),($1607|0))|0); - $1713 = tempRet0; - $1714 = (_bitshift64Shl(($1710|0),($1711|0),21)|0); - $1715 = tempRet0; - $1716 = (_i64Subtract(($1704|0),($1705|0),($1714|0),($1715|0))|0); - $1717 = tempRet0; - $1718 = (_bitshift64Ashr(($1712|0),($1713|0),21)|0); - $1719 = tempRet0; - $1720 = (_i64Add(($1718|0),($1719|0),($1612|0),($1613|0))|0); - $1721 = tempRet0; - $1722 = (_bitshift64Shl(($1718|0),($1719|0),21)|0); - $1723 = tempRet0; - $1724 = (_i64Subtract(($1712|0),($1713|0),($1722|0),($1723|0))|0); - $1725 = tempRet0; - $1726 = $1644&255; - HEAP8[$s>>0] = $1726; - $1727 = (_bitshift64Lshr(($1644|0),($1645|0),8)|0); - $1728 = tempRet0; - $1729 = $1727&255; - $1730 = (($s) + 1|0); - HEAP8[$1730>>0] = $1729; - $1731 = (_bitshift64Lshr(($1644|0),($1645|0),16)|0); - $1732 = tempRet0; - $1733 = (_bitshift64Shl(($1652|0),($1653|0),5)|0); - $1734 = tempRet0; - $1735 = $1733 | $1731; - $1734 | $1732; - $1736 = $1735&255; - $1737 = (($s) + 2|0); - HEAP8[$1737>>0] = $1736; - $1738 = (_bitshift64Lshr(($1652|0),($1653|0),3)|0); - $1739 = tempRet0; - $1740 = $1738&255; - $1741 = (($s) + 3|0); - HEAP8[$1741>>0] = $1740; - $1742 = (_bitshift64Lshr(($1652|0),($1653|0),11)|0); - $1743 = tempRet0; - $1744 = $1742&255; - $1745 = (($s) + 4|0); - HEAP8[$1745>>0] = $1744; - $1746 = (_bitshift64Lshr(($1652|0),($1653|0),19)|0); - $1747 = tempRet0; - $1748 = (_bitshift64Shl(($1660|0),($1661|0),2)|0); - $1749 = tempRet0; - $1750 = $1748 | $1746; - $1749 | $1747; - $1751 = $1750&255; - $1752 = (($s) + 5|0); - HEAP8[$1752>>0] = $1751; - $1753 = (_bitshift64Lshr(($1660|0),($1661|0),6)|0); - $1754 = tempRet0; - $1755 = $1753&255; - $1756 = (($s) + 6|0); - HEAP8[$1756>>0] = $1755; - $1757 = (_bitshift64Lshr(($1660|0),($1661|0),14)|0); - $1758 = tempRet0; - $1759 = (_bitshift64Shl(($1668|0),($1669|0),7)|0); - $1760 = tempRet0; - $1761 = $1759 | $1757; - $1760 | $1758; - $1762 = $1761&255; - $1763 = (($s) + 7|0); - HEAP8[$1763>>0] = $1762; - $1764 = (_bitshift64Lshr(($1668|0),($1669|0),1)|0); - $1765 = tempRet0; - $1766 = $1764&255; - $1767 = (($s) + 8|0); - HEAP8[$1767>>0] = $1766; - $1768 = (_bitshift64Lshr(($1668|0),($1669|0),9)|0); - $1769 = tempRet0; - $1770 = $1768&255; - $1771 = (($s) + 9|0); - HEAP8[$1771>>0] = $1770; - $1772 = (_bitshift64Lshr(($1668|0),($1669|0),17)|0); - $1773 = tempRet0; - $1774 = (_bitshift64Shl(($1676|0),($1677|0),4)|0); - $1775 = tempRet0; - $1776 = $1774 | $1772; - $1775 | $1773; - $1777 = $1776&255; - $1778 = (($s) + 10|0); - HEAP8[$1778>>0] = $1777; - $1779 = (_bitshift64Lshr(($1676|0),($1677|0),4)|0); - $1780 = tempRet0; - $1781 = $1779&255; - $1782 = (($s) + 11|0); - HEAP8[$1782>>0] = $1781; - $1783 = (_bitshift64Lshr(($1676|0),($1677|0),12)|0); - $1784 = tempRet0; - $1785 = $1783&255; - $1786 = (($s) + 12|0); - HEAP8[$1786>>0] = $1785; - $1787 = (_bitshift64Lshr(($1676|0),($1677|0),20)|0); - $1788 = tempRet0; - $1789 = (_bitshift64Shl(($1684|0),($1685|0),1)|0); - $1790 = tempRet0; - $1791 = $1789 | $1787; - $1790 | $1788; - $1792 = $1791&255; - $1793 = (($s) + 13|0); - HEAP8[$1793>>0] = $1792; - $1794 = (_bitshift64Lshr(($1684|0),($1685|0),7)|0); - $1795 = tempRet0; - $1796 = $1794&255; - $1797 = (($s) + 14|0); - HEAP8[$1797>>0] = $1796; - $1798 = (_bitshift64Lshr(($1684|0),($1685|0),15)|0); - $1799 = tempRet0; - $1800 = (_bitshift64Shl(($1692|0),($1693|0),6)|0); - $1801 = tempRet0; - $1802 = $1800 | $1798; - $1801 | $1799; - $1803 = $1802&255; - $1804 = (($s) + 15|0); - HEAP8[$1804>>0] = $1803; - $1805 = (_bitshift64Lshr(($1692|0),($1693|0),2)|0); - $1806 = tempRet0; - $1807 = $1805&255; - $1808 = (($s) + 16|0); - HEAP8[$1808>>0] = $1807; - $1809 = (_bitshift64Lshr(($1692|0),($1693|0),10)|0); - $1810 = tempRet0; - $1811 = $1809&255; - $1812 = (($s) + 17|0); - HEAP8[$1812>>0] = $1811; - $1813 = (_bitshift64Lshr(($1692|0),($1693|0),18)|0); - $1814 = tempRet0; - $1815 = (_bitshift64Shl(($1700|0),($1701|0),3)|0); - $1816 = tempRet0; - $1817 = $1815 | $1813; - $1816 | $1814; - $1818 = $1817&255; - $1819 = (($s) + 18|0); - HEAP8[$1819>>0] = $1818; - $1820 = (_bitshift64Lshr(($1700|0),($1701|0),5)|0); - $1821 = tempRet0; - $1822 = $1820&255; - $1823 = (($s) + 19|0); - HEAP8[$1823>>0] = $1822; - $1824 = (_bitshift64Lshr(($1700|0),($1701|0),13)|0); - $1825 = tempRet0; - $1826 = $1824&255; - $1827 = (($s) + 20|0); - HEAP8[$1827>>0] = $1826; - $1828 = $1708&255; - $1829 = (($s) + 21|0); - HEAP8[$1829>>0] = $1828; - $1830 = (_bitshift64Lshr(($1708|0),($1709|0),8)|0); - $1831 = tempRet0; - $1832 = $1830&255; - $1833 = (($s) + 22|0); - HEAP8[$1833>>0] = $1832; - $1834 = (_bitshift64Lshr(($1708|0),($1709|0),16)|0); - $1835 = tempRet0; - $1836 = (_bitshift64Shl(($1716|0),($1717|0),5)|0); - $1837 = tempRet0; - $1838 = $1836 | $1834; - $1837 | $1835; - $1839 = $1838&255; - $1840 = (($s) + 23|0); - HEAP8[$1840>>0] = $1839; - $1841 = (_bitshift64Lshr(($1716|0),($1717|0),3)|0); - $1842 = tempRet0; - $1843 = $1841&255; - $1844 = (($s) + 24|0); - HEAP8[$1844>>0] = $1843; - $1845 = (_bitshift64Lshr(($1716|0),($1717|0),11)|0); - $1846 = tempRet0; - $1847 = $1845&255; - $1848 = (($s) + 25|0); - HEAP8[$1848>>0] = $1847; - $1849 = (_bitshift64Lshr(($1716|0),($1717|0),19)|0); - $1850 = tempRet0; - $1851 = (_bitshift64Shl(($1724|0),($1725|0),2)|0); - $1852 = tempRet0; - $1853 = $1851 | $1849; - $1852 | $1850; - $1854 = $1853&255; - $1855 = (($s) + 26|0); - HEAP8[$1855>>0] = $1854; - $1856 = (_bitshift64Lshr(($1724|0),($1725|0),6)|0); - $1857 = tempRet0; - $1858 = $1856&255; - $1859 = (($s) + 27|0); - HEAP8[$1859>>0] = $1858; - $1860 = (_bitshift64Lshr(($1724|0),($1725|0),14)|0); - $1861 = tempRet0; - $1862 = (_bitshift64Shl(($1720|0),($1721|0),7)|0); - $1863 = tempRet0; - $1864 = $1860 | $1862; - $1861 | $1863; - $1865 = $1864&255; - $1866 = (($s) + 28|0); - HEAP8[$1866>>0] = $1865; - $1867 = (_bitshift64Lshr(($1720|0),($1721|0),1)|0); - $1868 = tempRet0; - $1869 = $1867&255; - $1870 = (($s) + 29|0); - HEAP8[$1870>>0] = $1869; - $1871 = (_bitshift64Lshr(($1720|0),($1721|0),9)|0); - $1872 = tempRet0; - $1873 = $1871&255; - $1874 = (($s) + 30|0); - HEAP8[$1874>>0] = $1873; - $1875 = (_bitshift64Lshr(($1720|0),($1721|0),17)|0); - $1876 = tempRet0; - $1877 = $1875&255; - $1878 = (($s) + 31|0); - HEAP8[$1878>>0] = $1877; - STACKTOP = sp;return; -} -function _load_347($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); -} -function _load_448($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - $15 = (($in) + 3|0); - $16 = HEAP8[$15>>0]|0; - $17 = $16&255; - $18 = (_bitshift64Shl(($17|0),0,24)|0); - $19 = tempRet0; - $20 = $13 | $18; - $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); -} -function _crypto_sign_ed25519_ref10_sc_reduce($s) { - $s = $s|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; - var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0; - var $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0; - var $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0; - var $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0; - var $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0; - var $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0; - var $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0; - var $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0; - var $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0; - var $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0; - var $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0; - var $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0; - var $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0; - var $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0; - var $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0; - var $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0; - var $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0; - var $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0; - var $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0; - var $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0; - var $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0; - var $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0; - var $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0; - var $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0; - var $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0; - var $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0; - var $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0; - var $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0; - var $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0; - var $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0; - var $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0; - var $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0; - var $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0; - var $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0; - var $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0; - var $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0; - var $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0; - var $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0; - var $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0; - var $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0; - var $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0; - var $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0; - var $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0; - var $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0; - var $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0; - var $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0; - var $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0; - var $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0; - var $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0; - var $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0; - var $997 = 0, $998 = 0, $999 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_load_351($s)|0); - $1 = tempRet0; - $2 = $0 & 2097151; - $3 = (($s) + 2|0); - $4 = (_load_452($3)|0); - $5 = tempRet0; - $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); - $7 = tempRet0; - $8 = $6 & 2097151; - $9 = (($s) + 5|0); - $10 = (_load_351($9)|0); - $11 = tempRet0; - $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); - $13 = tempRet0; - $14 = $12 & 2097151; - $15 = (($s) + 7|0); - $16 = (_load_452($15)|0); - $17 = tempRet0; - $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); - $19 = tempRet0; - $20 = $18 & 2097151; - $21 = (($s) + 10|0); - $22 = (_load_452($21)|0); - $23 = tempRet0; - $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); - $25 = tempRet0; - $26 = $24 & 2097151; - $27 = (($s) + 13|0); - $28 = (_load_351($27)|0); - $29 = tempRet0; - $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); - $31 = tempRet0; - $32 = $30 & 2097151; - $33 = (($s) + 15|0); - $34 = (_load_452($33)|0); - $35 = tempRet0; - $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); - $37 = tempRet0; - $38 = $36 & 2097151; - $39 = (($s) + 18|0); - $40 = (_load_351($39)|0); - $41 = tempRet0; - $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); - $43 = tempRet0; - $44 = $42 & 2097151; - $45 = (($s) + 21|0); - $46 = (_load_351($45)|0); - $47 = tempRet0; - $48 = $46 & 2097151; - $49 = (($s) + 23|0); - $50 = (_load_452($49)|0); - $51 = tempRet0; - $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); - $53 = tempRet0; - $54 = $52 & 2097151; - $55 = (($s) + 26|0); - $56 = (_load_351($55)|0); - $57 = tempRet0; - $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); - $59 = tempRet0; - $60 = $58 & 2097151; - $61 = (($s) + 28|0); - $62 = (_load_452($61)|0); - $63 = tempRet0; - $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); - $65 = tempRet0; - $66 = $64 & 2097151; - $67 = (($s) + 31|0); - $68 = (_load_452($67)|0); - $69 = tempRet0; - $70 = (_bitshift64Lshr(($68|0),($69|0),4)|0); - $71 = tempRet0; - $72 = $70 & 2097151; - $73 = (($s) + 34|0); - $74 = (_load_351($73)|0); - $75 = tempRet0; - $76 = (_bitshift64Lshr(($74|0),($75|0),1)|0); - $77 = tempRet0; - $78 = $76 & 2097151; - $79 = (($s) + 36|0); - $80 = (_load_452($79)|0); - $81 = tempRet0; - $82 = (_bitshift64Lshr(($80|0),($81|0),6)|0); - $83 = tempRet0; - $84 = $82 & 2097151; - $85 = (($s) + 39|0); - $86 = (_load_351($85)|0); - $87 = tempRet0; - $88 = (_bitshift64Lshr(($86|0),($87|0),3)|0); - $89 = tempRet0; - $90 = $88 & 2097151; - $91 = (($s) + 42|0); - $92 = (_load_351($91)|0); - $93 = tempRet0; - $94 = $92 & 2097151; - $95 = (($s) + 44|0); - $96 = (_load_452($95)|0); - $97 = tempRet0; - $98 = (_bitshift64Lshr(($96|0),($97|0),5)|0); - $99 = tempRet0; - $100 = $98 & 2097151; - $101 = (($s) + 47|0); - $102 = (_load_351($101)|0); - $103 = tempRet0; - $104 = (_bitshift64Lshr(($102|0),($103|0),2)|0); - $105 = tempRet0; - $106 = $104 & 2097151; - $107 = (($s) + 49|0); - $108 = (_load_452($107)|0); - $109 = tempRet0; - $110 = (_bitshift64Lshr(($108|0),($109|0),7)|0); - $111 = tempRet0; - $112 = $110 & 2097151; - $113 = (($s) + 52|0); - $114 = (_load_452($113)|0); - $115 = tempRet0; - $116 = (_bitshift64Lshr(($114|0),($115|0),4)|0); - $117 = tempRet0; - $118 = $116 & 2097151; - $119 = (($s) + 55|0); - $120 = (_load_351($119)|0); - $121 = tempRet0; - $122 = (_bitshift64Lshr(($120|0),($121|0),1)|0); - $123 = tempRet0; - $124 = $122 & 2097151; - $125 = (($s) + 57|0); - $126 = (_load_452($125)|0); - $127 = tempRet0; - $128 = (_bitshift64Lshr(($126|0),($127|0),6)|0); - $129 = tempRet0; - $130 = $128 & 2097151; - $131 = (($s) + 60|0); - $132 = (_load_452($131)|0); - $133 = tempRet0; - $134 = (_bitshift64Lshr(($132|0),($133|0),3)|0); - $135 = tempRet0; - $136 = (___muldi3(($134|0),($135|0),666643,0)|0); - $137 = tempRet0; - $138 = (___muldi3(($134|0),($135|0),470296,0)|0); - $139 = tempRet0; - $140 = (___muldi3(($134|0),($135|0),654183,0)|0); - $141 = tempRet0; - $142 = (___muldi3(($134|0),($135|0),-997805,-1)|0); - $143 = tempRet0; - $144 = (___muldi3(($134|0),($135|0),136657,0)|0); - $145 = tempRet0; - $146 = (_i64Add(($144|0),($145|0),($90|0),0)|0); - $147 = tempRet0; - $148 = (___muldi3(($134|0),($135|0),-683901,-1)|0); - $149 = tempRet0; - $150 = (_i64Add(($148|0),($149|0),($94|0),0)|0); - $151 = tempRet0; - $152 = (___muldi3(($130|0),0,666643,0)|0); - $153 = tempRet0; - $154 = (___muldi3(($130|0),0,470296,0)|0); - $155 = tempRet0; - $156 = (___muldi3(($130|0),0,654183,0)|0); - $157 = tempRet0; - $158 = (___muldi3(($130|0),0,-997805,-1)|0); - $159 = tempRet0; - $160 = (___muldi3(($130|0),0,136657,0)|0); - $161 = tempRet0; - $162 = (___muldi3(($130|0),0,-683901,-1)|0); - $163 = tempRet0; - $164 = (_i64Add(($146|0),($147|0),($162|0),($163|0))|0); - $165 = tempRet0; - $166 = (___muldi3(($124|0),0,666643,0)|0); - $167 = tempRet0; - $168 = (___muldi3(($124|0),0,470296,0)|0); - $169 = tempRet0; - $170 = (___muldi3(($124|0),0,654183,0)|0); - $171 = tempRet0; - $172 = (___muldi3(($124|0),0,-997805,-1)|0); - $173 = tempRet0; - $174 = (___muldi3(($124|0),0,136657,0)|0); - $175 = tempRet0; - $176 = (___muldi3(($124|0),0,-683901,-1)|0); - $177 = tempRet0; - $178 = (_i64Add(($176|0),($177|0),($84|0),0)|0); - $179 = tempRet0; - $180 = (_i64Add(($178|0),($179|0),($142|0),($143|0))|0); - $181 = tempRet0; - $182 = (_i64Add(($180|0),($181|0),($160|0),($161|0))|0); - $183 = tempRet0; - $184 = (___muldi3(($118|0),0,666643,0)|0); - $185 = tempRet0; - $186 = (___muldi3(($118|0),0,470296,0)|0); - $187 = tempRet0; - $188 = (___muldi3(($118|0),0,654183,0)|0); - $189 = tempRet0; - $190 = (___muldi3(($118|0),0,-997805,-1)|0); - $191 = tempRet0; - $192 = (___muldi3(($118|0),0,136657,0)|0); - $193 = tempRet0; - $194 = (___muldi3(($118|0),0,-683901,-1)|0); - $195 = tempRet0; - $196 = (___muldi3(($112|0),0,666643,0)|0); - $197 = tempRet0; - $198 = (___muldi3(($112|0),0,470296,0)|0); - $199 = tempRet0; - $200 = (___muldi3(($112|0),0,654183,0)|0); - $201 = tempRet0; - $202 = (___muldi3(($112|0),0,-997805,-1)|0); - $203 = tempRet0; - $204 = (___muldi3(($112|0),0,136657,0)|0); - $205 = tempRet0; - $206 = (___muldi3(($112|0),0,-683901,-1)|0); - $207 = tempRet0; - $208 = (_i64Add(($206|0),($207|0),($72|0),0)|0); - $209 = tempRet0; - $210 = (_i64Add(($208|0),($209|0),($192|0),($193|0))|0); - $211 = tempRet0; - $212 = (_i64Add(($210|0),($211|0),($172|0),($173|0))|0); - $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($138|0),($139|0))|0); - $215 = tempRet0; - $216 = (_i64Add(($214|0),($215|0),($156|0),($157|0))|0); - $217 = tempRet0; - $218 = (___muldi3(($106|0),0,666643,0)|0); - $219 = tempRet0; - $220 = (_i64Add(($218|0),($219|0),($38|0),0)|0); - $221 = tempRet0; - $222 = (___muldi3(($106|0),0,470296,0)|0); - $223 = tempRet0; - $224 = (___muldi3(($106|0),0,654183,0)|0); - $225 = tempRet0; - $226 = (_i64Add(($224|0),($225|0),($48|0),0)|0); - $227 = tempRet0; - $228 = (_i64Add(($226|0),($227|0),($198|0),($199|0))|0); - $229 = tempRet0; - $230 = (_i64Add(($228|0),($229|0),($184|0),($185|0))|0); - $231 = tempRet0; - $232 = (___muldi3(($106|0),0,-997805,-1)|0); - $233 = tempRet0; - $234 = (___muldi3(($106|0),0,136657,0)|0); - $235 = tempRet0; - $236 = (_i64Add(($234|0),($235|0),($60|0),0)|0); - $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($202|0),($203|0))|0); - $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($188|0),($189|0))|0); - $241 = tempRet0; - $242 = (_i64Add(($240|0),($241|0),($168|0),($169|0))|0); - $243 = tempRet0; - $244 = (_i64Add(($242|0),($243|0),($152|0),($153|0))|0); - $245 = tempRet0; - $246 = (___muldi3(($106|0),0,-683901,-1)|0); - $247 = tempRet0; - $248 = (_i64Add(($220|0),($221|0),1048576,0)|0); - $249 = tempRet0; - $250 = (_bitshift64Lshr(($248|0),($249|0),21)|0); - $251 = tempRet0; - $252 = (_i64Add(($222|0),($223|0),($44|0),0)|0); - $253 = tempRet0; - $254 = (_i64Add(($252|0),($253|0),($196|0),($197|0))|0); - $255 = tempRet0; - $256 = (_i64Add(($254|0),($255|0),($250|0),($251|0))|0); - $257 = tempRet0; - $258 = (_bitshift64Shl(($250|0),($251|0),21)|0); - $259 = tempRet0; - $260 = (_i64Subtract(($220|0),($221|0),($258|0),($259|0))|0); - $261 = tempRet0; - $262 = (_i64Add(($230|0),($231|0),1048576,0)|0); - $263 = tempRet0; - $264 = (_bitshift64Lshr(($262|0),($263|0),21)|0); - $265 = tempRet0; - $266 = (_i64Add(($232|0),($233|0),($54|0),0)|0); - $267 = tempRet0; - $268 = (_i64Add(($266|0),($267|0),($200|0),($201|0))|0); - $269 = tempRet0; - $270 = (_i64Add(($268|0),($269|0),($186|0),($187|0))|0); - $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($166|0),($167|0))|0); - $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($264|0),($265|0))|0); - $275 = tempRet0; - $276 = (_bitshift64Shl(($264|0),($265|0),21)|0); - $277 = tempRet0; - $278 = (_i64Subtract(($230|0),($231|0),($276|0),($277|0))|0); - $279 = tempRet0; - $280 = (_i64Add(($244|0),($245|0),1048576,0)|0); - $281 = tempRet0; - $282 = (_bitshift64Ashr(($280|0),($281|0),21)|0); - $283 = tempRet0; - $284 = (_i64Add(($246|0),($247|0),($66|0),0)|0); - $285 = tempRet0; - $286 = (_i64Add(($284|0),($285|0),($204|0),($205|0))|0); - $287 = tempRet0; - $288 = (_i64Add(($286|0),($287|0),($190|0),($191|0))|0); - $289 = tempRet0; - $290 = (_i64Add(($288|0),($289|0),($170|0),($171|0))|0); - $291 = tempRet0; - $292 = (_i64Add(($290|0),($291|0),($136|0),($137|0))|0); - $293 = tempRet0; - $294 = (_i64Add(($292|0),($293|0),($154|0),($155|0))|0); - $295 = tempRet0; - $296 = (_i64Add(($294|0),($295|0),($282|0),($283|0))|0); - $297 = tempRet0; - $298 = (_bitshift64Shl(($282|0),($283|0),21)|0); - $299 = tempRet0; - $300 = (_i64Subtract(($244|0),($245|0),($298|0),($299|0))|0); - $301 = tempRet0; - $302 = (_i64Add(($216|0),($217|0),1048576,0)|0); - $303 = tempRet0; - $304 = (_bitshift64Ashr(($302|0),($303|0),21)|0); - $305 = tempRet0; - $306 = (_i64Add(($194|0),($195|0),($78|0),0)|0); - $307 = tempRet0; - $308 = (_i64Add(($306|0),($307|0),($174|0),($175|0))|0); - $309 = tempRet0; - $310 = (_i64Add(($308|0),($309|0),($140|0),($141|0))|0); - $311 = tempRet0; - $312 = (_i64Add(($310|0),($311|0),($158|0),($159|0))|0); - $313 = tempRet0; - $314 = (_i64Add(($312|0),($313|0),($304|0),($305|0))|0); - $315 = tempRet0; - $316 = (_bitshift64Shl(($304|0),($305|0),21)|0); - $317 = tempRet0; - $318 = (_i64Subtract(($216|0),($217|0),($316|0),($317|0))|0); - $319 = tempRet0; - $320 = (_i64Add(($182|0),($183|0),1048576,0)|0); - $321 = tempRet0; - $322 = (_bitshift64Ashr(($320|0),($321|0),21)|0); - $323 = tempRet0; - $324 = (_i64Add(($164|0),($165|0),($322|0),($323|0))|0); - $325 = tempRet0; - $326 = (_bitshift64Shl(($322|0),($323|0),21)|0); - $327 = tempRet0; - $328 = (_i64Subtract(($182|0),($183|0),($326|0),($327|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($150|0),($151|0),1048576,0)|0); - $331 = tempRet0; - $332 = (_bitshift64Ashr(($330|0),($331|0),21)|0); - $333 = tempRet0; - $334 = (_i64Add(($332|0),($333|0),($100|0),0)|0); - $335 = tempRet0; - $336 = (_bitshift64Shl(($332|0),($333|0),21)|0); - $337 = tempRet0; - $338 = (_i64Subtract(($150|0),($151|0),($336|0),($337|0))|0); - $339 = tempRet0; - $340 = (_i64Add(($256|0),($257|0),1048576,0)|0); - $341 = tempRet0; - $342 = (_bitshift64Lshr(($340|0),($341|0),21)|0); - $343 = tempRet0; - $344 = (_i64Add(($278|0),($279|0),($342|0),($343|0))|0); - $345 = tempRet0; - $346 = (_bitshift64Shl(($342|0),($343|0),21)|0); - $347 = tempRet0; - $348 = (_i64Subtract(($256|0),($257|0),($346|0),($347|0))|0); - $349 = tempRet0; - $350 = (_i64Add(($274|0),($275|0),1048576,0)|0); - $351 = tempRet0; - $352 = (_bitshift64Ashr(($350|0),($351|0),21)|0); - $353 = tempRet0; - $354 = (_i64Add(($300|0),($301|0),($352|0),($353|0))|0); - $355 = tempRet0; - $356 = (_bitshift64Shl(($352|0),($353|0),21)|0); - $357 = tempRet0; - $358 = (_i64Subtract(($274|0),($275|0),($356|0),($357|0))|0); - $359 = tempRet0; - $360 = (_i64Add(($296|0),($297|0),1048576,0)|0); - $361 = tempRet0; - $362 = (_bitshift64Ashr(($360|0),($361|0),21)|0); - $363 = tempRet0; - $364 = (_i64Add(($318|0),($319|0),($362|0),($363|0))|0); - $365 = tempRet0; - $366 = (_bitshift64Shl(($362|0),($363|0),21)|0); - $367 = tempRet0; - $368 = (_i64Subtract(($296|0),($297|0),($366|0),($367|0))|0); - $369 = tempRet0; - $370 = (_i64Add(($314|0),($315|0),1048576,0)|0); - $371 = tempRet0; - $372 = (_bitshift64Ashr(($370|0),($371|0),21)|0); - $373 = tempRet0; - $374 = (_i64Add(($372|0),($373|0),($328|0),($329|0))|0); - $375 = tempRet0; - $376 = (_bitshift64Shl(($372|0),($373|0),21)|0); - $377 = tempRet0; - $378 = (_i64Subtract(($314|0),($315|0),($376|0),($377|0))|0); - $379 = tempRet0; - $380 = (_i64Add(($324|0),($325|0),1048576,0)|0); - $381 = tempRet0; - $382 = (_bitshift64Ashr(($380|0),($381|0),21)|0); - $383 = tempRet0; - $384 = (_i64Add(($382|0),($383|0),($338|0),($339|0))|0); - $385 = tempRet0; - $386 = (_bitshift64Shl(($382|0),($383|0),21)|0); - $387 = tempRet0; - $388 = (_i64Subtract(($324|0),($325|0),($386|0),($387|0))|0); - $389 = tempRet0; - $390 = (___muldi3(($334|0),($335|0),666643,0)|0); - $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($32|0),0)|0); - $393 = tempRet0; - $394 = (___muldi3(($334|0),($335|0),470296,0)|0); - $395 = tempRet0; - $396 = (_i64Add(($260|0),($261|0),($394|0),($395|0))|0); - $397 = tempRet0; - $398 = (___muldi3(($334|0),($335|0),654183,0)|0); - $399 = tempRet0; - $400 = (_i64Add(($348|0),($349|0),($398|0),($399|0))|0); - $401 = tempRet0; - $402 = (___muldi3(($334|0),($335|0),-997805,-1)|0); - $403 = tempRet0; - $404 = (_i64Add(($344|0),($345|0),($402|0),($403|0))|0); - $405 = tempRet0; - $406 = (___muldi3(($334|0),($335|0),136657,0)|0); - $407 = tempRet0; - $408 = (_i64Add(($358|0),($359|0),($406|0),($407|0))|0); - $409 = tempRet0; - $410 = (___muldi3(($334|0),($335|0),-683901,-1)|0); - $411 = tempRet0; - $412 = (_i64Add(($354|0),($355|0),($410|0),($411|0))|0); - $413 = tempRet0; - $414 = (___muldi3(($384|0),($385|0),666643,0)|0); - $415 = tempRet0; - $416 = (___muldi3(($384|0),($385|0),470296,0)|0); - $417 = tempRet0; - $418 = (___muldi3(($384|0),($385|0),654183,0)|0); - $419 = tempRet0; - $420 = (_i64Add(($396|0),($397|0),($418|0),($419|0))|0); - $421 = tempRet0; - $422 = (___muldi3(($384|0),($385|0),-997805,-1)|0); - $423 = tempRet0; - $424 = (_i64Add(($400|0),($401|0),($422|0),($423|0))|0); - $425 = tempRet0; - $426 = (___muldi3(($384|0),($385|0),136657,0)|0); - $427 = tempRet0; - $428 = (_i64Add(($404|0),($405|0),($426|0),($427|0))|0); - $429 = tempRet0; - $430 = (___muldi3(($384|0),($385|0),-683901,-1)|0); - $431 = tempRet0; - $432 = (_i64Add(($408|0),($409|0),($430|0),($431|0))|0); - $433 = tempRet0; - $434 = (___muldi3(($388|0),($389|0),666643,0)|0); - $435 = tempRet0; - $436 = (___muldi3(($388|0),($389|0),470296,0)|0); - $437 = tempRet0; - $438 = (___muldi3(($388|0),($389|0),654183,0)|0); - $439 = tempRet0; - $440 = (___muldi3(($388|0),($389|0),-997805,-1)|0); - $441 = tempRet0; - $442 = (___muldi3(($388|0),($389|0),136657,0)|0); - $443 = tempRet0; - $444 = (___muldi3(($388|0),($389|0),-683901,-1)|0); - $445 = tempRet0; - $446 = (_i64Add(($428|0),($429|0),($444|0),($445|0))|0); - $447 = tempRet0; - $448 = (___muldi3(($374|0),($375|0),666643,0)|0); - $449 = tempRet0; - $450 = (___muldi3(($374|0),($375|0),470296,0)|0); - $451 = tempRet0; - $452 = (___muldi3(($374|0),($375|0),654183,0)|0); - $453 = tempRet0; - $454 = (___muldi3(($374|0),($375|0),-997805,-1)|0); - $455 = tempRet0; - $456 = (___muldi3(($374|0),($375|0),136657,0)|0); - $457 = tempRet0; - $458 = (___muldi3(($374|0),($375|0),-683901,-1)|0); - $459 = tempRet0; - $460 = (___muldi3(($378|0),($379|0),666643,0)|0); - $461 = tempRet0; - $462 = (___muldi3(($378|0),($379|0),470296,0)|0); - $463 = tempRet0; - $464 = (___muldi3(($378|0),($379|0),654183,0)|0); - $465 = tempRet0; - $466 = (___muldi3(($378|0),($379|0),-997805,-1)|0); - $467 = tempRet0; - $468 = (___muldi3(($378|0),($379|0),136657,0)|0); - $469 = tempRet0; - $470 = (___muldi3(($378|0),($379|0),-683901,-1)|0); - $471 = tempRet0; - $472 = (_i64Add(($420|0),($421|0),($456|0),($457|0))|0); - $473 = tempRet0; - $474 = (_i64Add(($472|0),($473|0),($440|0),($441|0))|0); - $475 = tempRet0; - $476 = (_i64Add(($474|0),($475|0),($470|0),($471|0))|0); - $477 = tempRet0; - $478 = (___muldi3(($364|0),($365|0),666643,0)|0); - $479 = tempRet0; - $480 = (_i64Add(($478|0),($479|0),($2|0),0)|0); - $481 = tempRet0; - $482 = (___muldi3(($364|0),($365|0),470296,0)|0); - $483 = tempRet0; - $484 = (___muldi3(($364|0),($365|0),654183,0)|0); - $485 = tempRet0; - $486 = (_i64Add(($484|0),($485|0),($14|0),0)|0); - $487 = tempRet0; - $488 = (_i64Add(($486|0),($487|0),($448|0),($449|0))|0); - $489 = tempRet0; - $490 = (_i64Add(($488|0),($489|0),($462|0),($463|0))|0); - $491 = tempRet0; - $492 = (___muldi3(($364|0),($365|0),-997805,-1)|0); - $493 = tempRet0; - $494 = (___muldi3(($364|0),($365|0),136657,0)|0); - $495 = tempRet0; - $496 = (_i64Add(($494|0),($495|0),($26|0),0)|0); - $497 = tempRet0; - $498 = (_i64Add(($496|0),($497|0),($414|0),($415|0))|0); - $499 = tempRet0; - $500 = (_i64Add(($498|0),($499|0),($452|0),($453|0))|0); - $501 = tempRet0; - $502 = (_i64Add(($500|0),($501|0),($436|0),($437|0))|0); - $503 = tempRet0; - $504 = (_i64Add(($502|0),($503|0),($466|0),($467|0))|0); - $505 = tempRet0; - $506 = (___muldi3(($364|0),($365|0),-683901,-1)|0); - $507 = tempRet0; - $508 = (_i64Add(($480|0),($481|0),1048576,0)|0); - $509 = tempRet0; - $510 = (_bitshift64Ashr(($508|0),($509|0),21)|0); - $511 = tempRet0; - $512 = (_i64Add(($482|0),($483|0),($8|0),0)|0); - $513 = tempRet0; - $514 = (_i64Add(($512|0),($513|0),($460|0),($461|0))|0); - $515 = tempRet0; - $516 = (_i64Add(($514|0),($515|0),($510|0),($511|0))|0); - $517 = tempRet0; - $518 = (_bitshift64Shl(($510|0),($511|0),21)|0); - $519 = tempRet0; - $520 = (_i64Subtract(($480|0),($481|0),($518|0),($519|0))|0); - $521 = tempRet0; - $522 = (_i64Add(($490|0),($491|0),1048576,0)|0); - $523 = tempRet0; - $524 = (_bitshift64Ashr(($522|0),($523|0),21)|0); - $525 = tempRet0; - $526 = (_i64Add(($492|0),($493|0),($20|0),0)|0); - $527 = tempRet0; - $528 = (_i64Add(($526|0),($527|0),($450|0),($451|0))|0); - $529 = tempRet0; - $530 = (_i64Add(($528|0),($529|0),($434|0),($435|0))|0); - $531 = tempRet0; - $532 = (_i64Add(($530|0),($531|0),($464|0),($465|0))|0); - $533 = tempRet0; - $534 = (_i64Add(($532|0),($533|0),($524|0),($525|0))|0); - $535 = tempRet0; - $536 = (_bitshift64Shl(($524|0),($525|0),21)|0); - $537 = tempRet0; - $538 = (_i64Add(($504|0),($505|0),1048576,0)|0); - $539 = tempRet0; - $540 = (_bitshift64Ashr(($538|0),($539|0),21)|0); - $541 = tempRet0; - $542 = (_i64Add(($392|0),($393|0),($506|0),($507|0))|0); - $543 = tempRet0; - $544 = (_i64Add(($542|0),($543|0),($416|0),($417|0))|0); - $545 = tempRet0; - $546 = (_i64Add(($544|0),($545|0),($454|0),($455|0))|0); - $547 = tempRet0; - $548 = (_i64Add(($546|0),($547|0),($438|0),($439|0))|0); - $549 = tempRet0; - $550 = (_i64Add(($548|0),($549|0),($468|0),($469|0))|0); - $551 = tempRet0; - $552 = (_i64Add(($550|0),($551|0),($540|0),($541|0))|0); - $553 = tempRet0; - $554 = (_bitshift64Shl(($540|0),($541|0),21)|0); - $555 = tempRet0; - $556 = (_i64Add(($476|0),($477|0),1048576,0)|0); - $557 = tempRet0; - $558 = (_bitshift64Ashr(($556|0),($557|0),21)|0); - $559 = tempRet0; - $560 = (_i64Add(($424|0),($425|0),($458|0),($459|0))|0); - $561 = tempRet0; - $562 = (_i64Add(($560|0),($561|0),($442|0),($443|0))|0); - $563 = tempRet0; - $564 = (_i64Add(($562|0),($563|0),($558|0),($559|0))|0); - $565 = tempRet0; - $566 = (_bitshift64Shl(($558|0),($559|0),21)|0); - $567 = tempRet0; - $568 = (_i64Subtract(($476|0),($477|0),($566|0),($567|0))|0); - $569 = tempRet0; - $570 = (_i64Add(($446|0),($447|0),1048576,0)|0); - $571 = tempRet0; - $572 = (_bitshift64Ashr(($570|0),($571|0),21)|0); - $573 = tempRet0; - $574 = (_i64Add(($432|0),($433|0),($572|0),($573|0))|0); - $575 = tempRet0; - $576 = (_bitshift64Shl(($572|0),($573|0),21)|0); - $577 = tempRet0; - $578 = (_i64Subtract(($446|0),($447|0),($576|0),($577|0))|0); - $579 = tempRet0; - $580 = (_i64Add(($412|0),($413|0),1048576,0)|0); - $581 = tempRet0; - $582 = (_bitshift64Ashr(($580|0),($581|0),21)|0); - $583 = tempRet0; - $584 = (_i64Add(($582|0),($583|0),($368|0),($369|0))|0); - $585 = tempRet0; - $586 = (_bitshift64Shl(($582|0),($583|0),21)|0); - $587 = tempRet0; - $588 = (_i64Subtract(($412|0),($413|0),($586|0),($587|0))|0); - $589 = tempRet0; - $590 = (_i64Add(($516|0),($517|0),1048576,0)|0); - $591 = tempRet0; - $592 = (_bitshift64Ashr(($590|0),($591|0),21)|0); - $593 = tempRet0; - $594 = (_bitshift64Shl(($592|0),($593|0),21)|0); - $595 = tempRet0; - $596 = (_i64Add(($534|0),($535|0),1048576,0)|0); - $597 = tempRet0; - $598 = (_bitshift64Ashr(($596|0),($597|0),21)|0); - $599 = tempRet0; - $600 = (_bitshift64Shl(($598|0),($599|0),21)|0); - $601 = tempRet0; - $602 = (_i64Add(($552|0),($553|0),1048576,0)|0); - $603 = tempRet0; - $604 = (_bitshift64Ashr(($602|0),($603|0),21)|0); - $605 = tempRet0; - $606 = (_i64Add(($568|0),($569|0),($604|0),($605|0))|0); - $607 = tempRet0; - $608 = (_bitshift64Shl(($604|0),($605|0),21)|0); - $609 = tempRet0; - $610 = (_i64Add(($564|0),($565|0),1048576,0)|0); - $611 = tempRet0; - $612 = (_bitshift64Ashr(($610|0),($611|0),21)|0); - $613 = tempRet0; - $614 = (_i64Add(($578|0),($579|0),($612|0),($613|0))|0); - $615 = tempRet0; - $616 = (_bitshift64Shl(($612|0),($613|0),21)|0); - $617 = tempRet0; - $618 = (_i64Subtract(($564|0),($565|0),($616|0),($617|0))|0); - $619 = tempRet0; - $620 = (_i64Add(($574|0),($575|0),1048576,0)|0); - $621 = tempRet0; - $622 = (_bitshift64Ashr(($620|0),($621|0),21)|0); - $623 = tempRet0; - $624 = (_i64Add(($588|0),($589|0),($622|0),($623|0))|0); - $625 = tempRet0; - $626 = (_bitshift64Shl(($622|0),($623|0),21)|0); - $627 = tempRet0; - $628 = (_i64Subtract(($574|0),($575|0),($626|0),($627|0))|0); - $629 = tempRet0; - $630 = (_i64Add(($584|0),($585|0),1048576,0)|0); - $631 = tempRet0; - $632 = (_bitshift64Ashr(($630|0),($631|0),21)|0); - $633 = tempRet0; - $634 = (_bitshift64Shl(($632|0),($633|0),21)|0); - $635 = tempRet0; - $636 = (_i64Subtract(($584|0),($585|0),($634|0),($635|0))|0); - $637 = tempRet0; - $638 = (___muldi3(($632|0),($633|0),666643,0)|0); - $639 = tempRet0; - $640 = (_i64Add(($520|0),($521|0),($638|0),($639|0))|0); - $641 = tempRet0; - $642 = (___muldi3(($632|0),($633|0),470296,0)|0); - $643 = tempRet0; - $644 = (___muldi3(($632|0),($633|0),654183,0)|0); - $645 = tempRet0; - $646 = (___muldi3(($632|0),($633|0),-997805,-1)|0); - $647 = tempRet0; - $648 = (___muldi3(($632|0),($633|0),136657,0)|0); - $649 = tempRet0; - $650 = (___muldi3(($632|0),($633|0),-683901,-1)|0); - $651 = tempRet0; - $652 = (_bitshift64Ashr(($640|0),($641|0),21)|0); - $653 = tempRet0; - $654 = (_i64Add(($642|0),($643|0),($516|0),($517|0))|0); - $655 = tempRet0; - $656 = (_i64Subtract(($654|0),($655|0),($594|0),($595|0))|0); - $657 = tempRet0; - $658 = (_i64Add(($656|0),($657|0),($652|0),($653|0))|0); - $659 = tempRet0; - $660 = (_bitshift64Shl(($652|0),($653|0),21)|0); - $661 = tempRet0; - $662 = (_i64Subtract(($640|0),($641|0),($660|0),($661|0))|0); - $663 = tempRet0; - $664 = (_bitshift64Ashr(($658|0),($659|0),21)|0); - $665 = tempRet0; - $666 = (_i64Add(($644|0),($645|0),($490|0),($491|0))|0); - $667 = tempRet0; - $668 = (_i64Subtract(($666|0),($667|0),($536|0),($537|0))|0); - $669 = tempRet0; - $670 = (_i64Add(($668|0),($669|0),($592|0),($593|0))|0); - $671 = tempRet0; - $672 = (_i64Add(($670|0),($671|0),($664|0),($665|0))|0); - $673 = tempRet0; - $674 = (_bitshift64Shl(($664|0),($665|0),21)|0); - $675 = tempRet0; - $676 = (_i64Subtract(($658|0),($659|0),($674|0),($675|0))|0); - $677 = tempRet0; - $678 = (_bitshift64Ashr(($672|0),($673|0),21)|0); - $679 = tempRet0; - $680 = (_i64Add(($534|0),($535|0),($646|0),($647|0))|0); - $681 = tempRet0; - $682 = (_i64Subtract(($680|0),($681|0),($600|0),($601|0))|0); - $683 = tempRet0; - $684 = (_i64Add(($682|0),($683|0),($678|0),($679|0))|0); - $685 = tempRet0; - $686 = (_bitshift64Shl(($678|0),($679|0),21)|0); - $687 = tempRet0; - $688 = (_i64Subtract(($672|0),($673|0),($686|0),($687|0))|0); - $689 = tempRet0; - $690 = (_bitshift64Ashr(($684|0),($685|0),21)|0); - $691 = tempRet0; - $692 = (_i64Add(($648|0),($649|0),($504|0),($505|0))|0); - $693 = tempRet0; - $694 = (_i64Subtract(($692|0),($693|0),($554|0),($555|0))|0); - $695 = tempRet0; - $696 = (_i64Add(($694|0),($695|0),($598|0),($599|0))|0); - $697 = tempRet0; - $698 = (_i64Add(($696|0),($697|0),($690|0),($691|0))|0); - $699 = tempRet0; - $700 = (_bitshift64Shl(($690|0),($691|0),21)|0); - $701 = tempRet0; - $702 = (_i64Subtract(($684|0),($685|0),($700|0),($701|0))|0); - $703 = tempRet0; - $704 = (_bitshift64Ashr(($698|0),($699|0),21)|0); - $705 = tempRet0; - $706 = (_i64Add(($552|0),($553|0),($650|0),($651|0))|0); - $707 = tempRet0; - $708 = (_i64Subtract(($706|0),($707|0),($608|0),($609|0))|0); - $709 = tempRet0; - $710 = (_i64Add(($708|0),($709|0),($704|0),($705|0))|0); - $711 = tempRet0; - $712 = (_bitshift64Shl(($704|0),($705|0),21)|0); - $713 = tempRet0; - $714 = (_i64Subtract(($698|0),($699|0),($712|0),($713|0))|0); - $715 = tempRet0; - $716 = (_bitshift64Ashr(($710|0),($711|0),21)|0); - $717 = tempRet0; - $718 = (_i64Add(($606|0),($607|0),($716|0),($717|0))|0); - $719 = tempRet0; - $720 = (_bitshift64Shl(($716|0),($717|0),21)|0); - $721 = tempRet0; - $722 = (_i64Subtract(($710|0),($711|0),($720|0),($721|0))|0); - $723 = tempRet0; - $724 = (_bitshift64Ashr(($718|0),($719|0),21)|0); - $725 = tempRet0; - $726 = (_i64Add(($724|0),($725|0),($618|0),($619|0))|0); - $727 = tempRet0; - $728 = (_bitshift64Shl(($724|0),($725|0),21)|0); - $729 = tempRet0; - $730 = (_i64Subtract(($718|0),($719|0),($728|0),($729|0))|0); - $731 = tempRet0; - $732 = (_bitshift64Ashr(($726|0),($727|0),21)|0); - $733 = tempRet0; - $734 = (_i64Add(($614|0),($615|0),($732|0),($733|0))|0); - $735 = tempRet0; - $736 = (_bitshift64Shl(($732|0),($733|0),21)|0); - $737 = tempRet0; - $738 = (_i64Subtract(($726|0),($727|0),($736|0),($737|0))|0); - $739 = tempRet0; - $740 = (_bitshift64Ashr(($734|0),($735|0),21)|0); - $741 = tempRet0; - $742 = (_i64Add(($740|0),($741|0),($628|0),($629|0))|0); - $743 = tempRet0; - $744 = (_bitshift64Shl(($740|0),($741|0),21)|0); - $745 = tempRet0; - $746 = (_i64Subtract(($734|0),($735|0),($744|0),($745|0))|0); - $747 = tempRet0; - $748 = (_bitshift64Ashr(($742|0),($743|0),21)|0); - $749 = tempRet0; - $750 = (_i64Add(($624|0),($625|0),($748|0),($749|0))|0); - $751 = tempRet0; - $752 = (_bitshift64Shl(($748|0),($749|0),21)|0); - $753 = tempRet0; - $754 = (_i64Subtract(($742|0),($743|0),($752|0),($753|0))|0); - $755 = tempRet0; - $756 = (_bitshift64Ashr(($750|0),($751|0),21)|0); - $757 = tempRet0; - $758 = (_i64Add(($756|0),($757|0),($636|0),($637|0))|0); - $759 = tempRet0; - $760 = (_bitshift64Shl(($756|0),($757|0),21)|0); - $761 = tempRet0; - $762 = (_i64Subtract(($750|0),($751|0),($760|0),($761|0))|0); - $763 = tempRet0; - $764 = (_bitshift64Ashr(($758|0),($759|0),21)|0); - $765 = tempRet0; - $766 = (_bitshift64Shl(($764|0),($765|0),21)|0); - $767 = tempRet0; - $768 = (_i64Subtract(($758|0),($759|0),($766|0),($767|0))|0); - $769 = tempRet0; - $770 = (___muldi3(($764|0),($765|0),666643,0)|0); - $771 = tempRet0; - $772 = (_i64Add(($770|0),($771|0),($662|0),($663|0))|0); - $773 = tempRet0; - $774 = (___muldi3(($764|0),($765|0),470296,0)|0); - $775 = tempRet0; - $776 = (_i64Add(($676|0),($677|0),($774|0),($775|0))|0); - $777 = tempRet0; - $778 = (___muldi3(($764|0),($765|0),654183,0)|0); - $779 = tempRet0; - $780 = (_i64Add(($688|0),($689|0),($778|0),($779|0))|0); - $781 = tempRet0; - $782 = (___muldi3(($764|0),($765|0),-997805,-1)|0); - $783 = tempRet0; - $784 = (_i64Add(($702|0),($703|0),($782|0),($783|0))|0); - $785 = tempRet0; - $786 = (___muldi3(($764|0),($765|0),136657,0)|0); - $787 = tempRet0; - $788 = (_i64Add(($714|0),($715|0),($786|0),($787|0))|0); - $789 = tempRet0; - $790 = (___muldi3(($764|0),($765|0),-683901,-1)|0); - $791 = tempRet0; - $792 = (_i64Add(($722|0),($723|0),($790|0),($791|0))|0); - $793 = tempRet0; - $794 = (_bitshift64Ashr(($772|0),($773|0),21)|0); - $795 = tempRet0; - $796 = (_i64Add(($776|0),($777|0),($794|0),($795|0))|0); - $797 = tempRet0; - $798 = (_bitshift64Shl(($794|0),($795|0),21)|0); - $799 = tempRet0; - $800 = (_i64Subtract(($772|0),($773|0),($798|0),($799|0))|0); - $801 = tempRet0; - $802 = (_bitshift64Ashr(($796|0),($797|0),21)|0); - $803 = tempRet0; - $804 = (_i64Add(($780|0),($781|0),($802|0),($803|0))|0); - $805 = tempRet0; - $806 = (_bitshift64Shl(($802|0),($803|0),21)|0); - $807 = tempRet0; - $808 = (_i64Subtract(($796|0),($797|0),($806|0),($807|0))|0); - $809 = tempRet0; - $810 = (_bitshift64Ashr(($804|0),($805|0),21)|0); - $811 = tempRet0; - $812 = (_i64Add(($784|0),($785|0),($810|0),($811|0))|0); - $813 = tempRet0; - $814 = (_bitshift64Shl(($810|0),($811|0),21)|0); - $815 = tempRet0; - $816 = (_i64Subtract(($804|0),($805|0),($814|0),($815|0))|0); - $817 = tempRet0; - $818 = (_bitshift64Ashr(($812|0),($813|0),21)|0); - $819 = tempRet0; - $820 = (_i64Add(($788|0),($789|0),($818|0),($819|0))|0); - $821 = tempRet0; - $822 = (_bitshift64Shl(($818|0),($819|0),21)|0); - $823 = tempRet0; - $824 = (_i64Subtract(($812|0),($813|0),($822|0),($823|0))|0); - $825 = tempRet0; - $826 = (_bitshift64Ashr(($820|0),($821|0),21)|0); - $827 = tempRet0; - $828 = (_i64Add(($792|0),($793|0),($826|0),($827|0))|0); - $829 = tempRet0; - $830 = (_bitshift64Shl(($826|0),($827|0),21)|0); - $831 = tempRet0; - $832 = (_i64Subtract(($820|0),($821|0),($830|0),($831|0))|0); - $833 = tempRet0; - $834 = (_bitshift64Ashr(($828|0),($829|0),21)|0); - $835 = tempRet0; - $836 = (_i64Add(($834|0),($835|0),($730|0),($731|0))|0); - $837 = tempRet0; - $838 = (_bitshift64Shl(($834|0),($835|0),21)|0); - $839 = tempRet0; - $840 = (_i64Subtract(($828|0),($829|0),($838|0),($839|0))|0); - $841 = tempRet0; - $842 = (_bitshift64Ashr(($836|0),($837|0),21)|0); - $843 = tempRet0; - $844 = (_i64Add(($842|0),($843|0),($738|0),($739|0))|0); - $845 = tempRet0; - $846 = (_bitshift64Shl(($842|0),($843|0),21)|0); - $847 = tempRet0; - $848 = (_i64Subtract(($836|0),($837|0),($846|0),($847|0))|0); - $849 = tempRet0; - $850 = (_bitshift64Ashr(($844|0),($845|0),21)|0); - $851 = tempRet0; - $852 = (_i64Add(($850|0),($851|0),($746|0),($747|0))|0); - $853 = tempRet0; - $854 = (_bitshift64Shl(($850|0),($851|0),21)|0); - $855 = tempRet0; - $856 = (_i64Subtract(($844|0),($845|0),($854|0),($855|0))|0); - $857 = tempRet0; - $858 = (_bitshift64Ashr(($852|0),($853|0),21)|0); - $859 = tempRet0; - $860 = (_i64Add(($858|0),($859|0),($754|0),($755|0))|0); - $861 = tempRet0; - $862 = (_bitshift64Shl(($858|0),($859|0),21)|0); - $863 = tempRet0; - $864 = (_i64Subtract(($852|0),($853|0),($862|0),($863|0))|0); - $865 = tempRet0; - $866 = (_bitshift64Ashr(($860|0),($861|0),21)|0); - $867 = tempRet0; - $868 = (_i64Add(($866|0),($867|0),($762|0),($763|0))|0); - $869 = tempRet0; - $870 = (_bitshift64Shl(($866|0),($867|0),21)|0); - $871 = tempRet0; - $872 = (_i64Subtract(($860|0),($861|0),($870|0),($871|0))|0); - $873 = tempRet0; - $874 = (_bitshift64Ashr(($868|0),($869|0),21)|0); - $875 = tempRet0; - $876 = (_i64Add(($874|0),($875|0),($768|0),($769|0))|0); - $877 = tempRet0; - $878 = (_bitshift64Shl(($874|0),($875|0),21)|0); - $879 = tempRet0; - $880 = (_i64Subtract(($868|0),($869|0),($878|0),($879|0))|0); - $881 = tempRet0; - $882 = $800&255; - HEAP8[$s>>0] = $882; - $883 = (_bitshift64Lshr(($800|0),($801|0),8)|0); - $884 = tempRet0; - $885 = $883&255; - $886 = (($s) + 1|0); - HEAP8[$886>>0] = $885; - $887 = (_bitshift64Lshr(($800|0),($801|0),16)|0); - $888 = tempRet0; - $889 = (_bitshift64Shl(($808|0),($809|0),5)|0); - $890 = tempRet0; - $891 = $889 | $887; - $890 | $888; - $892 = $891&255; - HEAP8[$3>>0] = $892; - $893 = (_bitshift64Lshr(($808|0),($809|0),3)|0); - $894 = tempRet0; - $895 = $893&255; - $896 = (($s) + 3|0); - HEAP8[$896>>0] = $895; - $897 = (_bitshift64Lshr(($808|0),($809|0),11)|0); - $898 = tempRet0; - $899 = $897&255; - $900 = (($s) + 4|0); - HEAP8[$900>>0] = $899; - $901 = (_bitshift64Lshr(($808|0),($809|0),19)|0); - $902 = tempRet0; - $903 = (_bitshift64Shl(($816|0),($817|0),2)|0); - $904 = tempRet0; - $905 = $903 | $901; - $904 | $902; - $906 = $905&255; - HEAP8[$9>>0] = $906; - $907 = (_bitshift64Lshr(($816|0),($817|0),6)|0); - $908 = tempRet0; - $909 = $907&255; - $910 = (($s) + 6|0); - HEAP8[$910>>0] = $909; - $911 = (_bitshift64Lshr(($816|0),($817|0),14)|0); - $912 = tempRet0; - $913 = (_bitshift64Shl(($824|0),($825|0),7)|0); - $914 = tempRet0; - $915 = $913 | $911; - $914 | $912; - $916 = $915&255; - HEAP8[$15>>0] = $916; - $917 = (_bitshift64Lshr(($824|0),($825|0),1)|0); - $918 = tempRet0; - $919 = $917&255; - $920 = (($s) + 8|0); - HEAP8[$920>>0] = $919; - $921 = (_bitshift64Lshr(($824|0),($825|0),9)|0); - $922 = tempRet0; - $923 = $921&255; - $924 = (($s) + 9|0); - HEAP8[$924>>0] = $923; - $925 = (_bitshift64Lshr(($824|0),($825|0),17)|0); - $926 = tempRet0; - $927 = (_bitshift64Shl(($832|0),($833|0),4)|0); - $928 = tempRet0; - $929 = $927 | $925; - $928 | $926; - $930 = $929&255; - HEAP8[$21>>0] = $930; - $931 = (_bitshift64Lshr(($832|0),($833|0),4)|0); - $932 = tempRet0; - $933 = $931&255; - $934 = (($s) + 11|0); - HEAP8[$934>>0] = $933; - $935 = (_bitshift64Lshr(($832|0),($833|0),12)|0); - $936 = tempRet0; - $937 = $935&255; - $938 = (($s) + 12|0); - HEAP8[$938>>0] = $937; - $939 = (_bitshift64Lshr(($832|0),($833|0),20)|0); - $940 = tempRet0; - $941 = (_bitshift64Shl(($840|0),($841|0),1)|0); - $942 = tempRet0; - $943 = $941 | $939; - $942 | $940; - $944 = $943&255; - HEAP8[$27>>0] = $944; - $945 = (_bitshift64Lshr(($840|0),($841|0),7)|0); - $946 = tempRet0; - $947 = $945&255; - $948 = (($s) + 14|0); - HEAP8[$948>>0] = $947; - $949 = (_bitshift64Lshr(($840|0),($841|0),15)|0); - $950 = tempRet0; - $951 = (_bitshift64Shl(($848|0),($849|0),6)|0); - $952 = tempRet0; - $953 = $951 | $949; - $952 | $950; - $954 = $953&255; - HEAP8[$33>>0] = $954; - $955 = (_bitshift64Lshr(($848|0),($849|0),2)|0); - $956 = tempRet0; - $957 = $955&255; - $958 = (($s) + 16|0); - HEAP8[$958>>0] = $957; - $959 = (_bitshift64Lshr(($848|0),($849|0),10)|0); - $960 = tempRet0; - $961 = $959&255; - $962 = (($s) + 17|0); - HEAP8[$962>>0] = $961; - $963 = (_bitshift64Lshr(($848|0),($849|0),18)|0); - $964 = tempRet0; - $965 = (_bitshift64Shl(($856|0),($857|0),3)|0); - $966 = tempRet0; - $967 = $965 | $963; - $966 | $964; - $968 = $967&255; - HEAP8[$39>>0] = $968; - $969 = (_bitshift64Lshr(($856|0),($857|0),5)|0); - $970 = tempRet0; - $971 = $969&255; - $972 = (($s) + 19|0); - HEAP8[$972>>0] = $971; - $973 = (_bitshift64Lshr(($856|0),($857|0),13)|0); - $974 = tempRet0; - $975 = $973&255; - $976 = (($s) + 20|0); - HEAP8[$976>>0] = $975; - $977 = $864&255; - HEAP8[$45>>0] = $977; - $978 = (_bitshift64Lshr(($864|0),($865|0),8)|0); - $979 = tempRet0; - $980 = $978&255; - $981 = (($s) + 22|0); - HEAP8[$981>>0] = $980; - $982 = (_bitshift64Lshr(($864|0),($865|0),16)|0); - $983 = tempRet0; - $984 = (_bitshift64Shl(($872|0),($873|0),5)|0); - $985 = tempRet0; - $986 = $984 | $982; - $985 | $983; - $987 = $986&255; - HEAP8[$49>>0] = $987; - $988 = (_bitshift64Lshr(($872|0),($873|0),3)|0); - $989 = tempRet0; - $990 = $988&255; - $991 = (($s) + 24|0); - HEAP8[$991>>0] = $990; - $992 = (_bitshift64Lshr(($872|0),($873|0),11)|0); - $993 = tempRet0; - $994 = $992&255; - $995 = (($s) + 25|0); - HEAP8[$995>>0] = $994; - $996 = (_bitshift64Lshr(($872|0),($873|0),19)|0); - $997 = tempRet0; - $998 = (_bitshift64Shl(($880|0),($881|0),2)|0); - $999 = tempRet0; - $1000 = $998 | $996; - $999 | $997; - $1001 = $1000&255; - HEAP8[$55>>0] = $1001; - $1002 = (_bitshift64Lshr(($880|0),($881|0),6)|0); - $1003 = tempRet0; - $1004 = $1002&255; - $1005 = (($s) + 27|0); - HEAP8[$1005>>0] = $1004; - $1006 = (_bitshift64Lshr(($880|0),($881|0),14)|0); - $1007 = tempRet0; - $1008 = (_bitshift64Shl(($876|0),($877|0),7)|0); - $1009 = tempRet0; - $1010 = $1006 | $1008; - $1007 | $1009; - $1011 = $1010&255; - HEAP8[$61>>0] = $1011; - $1012 = (_bitshift64Lshr(($876|0),($877|0),1)|0); - $1013 = tempRet0; - $1014 = $1012&255; - $1015 = (($s) + 29|0); - HEAP8[$1015>>0] = $1014; - $1016 = (_bitshift64Lshr(($876|0),($877|0),9)|0); - $1017 = tempRet0; - $1018 = $1016&255; - $1019 = (($s) + 30|0); - HEAP8[$1019>>0] = $1018; - $1020 = (_bitshift64Lshr(($876|0),($877|0),17)|0); - $1021 = tempRet0; - $1022 = $1020&255; - HEAP8[$67>>0] = $1022; - STACKTOP = sp;return; -} -function _load_351($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); -} -function _load_452($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - $15 = (($in) + 3|0); - $16 = HEAP8[$15>>0]|0; - $17 = $16&255; - $18 = (_bitshift64Shl(($17|0),0,24)|0); - $19 = tempRet0; - $20 = $13 | $18; - $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); -} -function _sph_sha512_init($cc) { - $cc = $cc|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - $0 = (($cc) + 128|0); - dest=$0+0|0; src=31840+0|0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $1 = (($cc) + 192|0); - $2 = $1; - $3 = $2; - HEAP32[$3>>2] = 0; - $4 = (($2) + 4)|0; - $5 = $4; - HEAP32[$5>>2] = 0; - STACKTOP = sp;return; -} -function _sph_sha384($cc,$data,$len) { - $cc = $cc|0; - $data = $data|0; - $len = $len|0; - var $$01$ = 0, $$012 = 0, $$03 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $current$04 = 0, $current$1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($cc) + 192|0); - $1 = ($len|0)==(0); - if ($1) { - STACKTOP = sp;return; - } - $2 = $0; - $3 = $2; - $4 = HEAP32[$3>>2]|0; - $5 = (($2) + 4)|0; - $6 = $5; - $7 = HEAP32[$6>>2]|0; - $8 = $4 & 127; - $9 = (($cc) + 128|0); - $$012 = $len;$$03 = $data;$current$04 = $8; - while(1) { - $10 = (128 - ($current$04))|0; - $11 = ($10>>>0)>($$012>>>0); - $$01$ = $11 ? $$012 : $10; - $12 = (($cc) + ($current$04)|0); - _memcpy(($12|0),($$03|0),($$01$|0))|0; - $13 = (($$03) + ($$01$)|0); - $14 = (($$01$) + ($current$04))|0; - $15 = (($$012) - ($$01$))|0; - $16 = ($14|0)==(128); - if ($16) { - _sha3_round($cc,$9); - $current$1 = 0; - } else { - $current$1 = $14; - } - $17 = $0; - $18 = $17; - $19 = HEAP32[$18>>2]|0; - $20 = (($17) + 4)|0; - $21 = $20; - $22 = HEAP32[$21>>2]|0; - $23 = (_i64Add(($19|0),($22|0),($$01$|0),0)|0); - $24 = tempRet0; - $25 = $0; - $26 = $25; - HEAP32[$26>>2] = $23; - $27 = (($25) + 4)|0; - $28 = $27; - HEAP32[$28>>2] = $24; - $29 = ($$012|0)==($$01$|0); - if ($29) { - break; - } else { - $$012 = $15;$$03 = $13;$current$04 = $current$1; - } - } - STACKTOP = sp;return; -} -function _sph_sha512_close($cc,$dst) { - $cc = $cc|0; - $dst = $dst|0; - var label = 0, sp = 0; - sp = STACKTOP; - _sha384_close($cc,$dst,8); - _sph_sha512_init($cc); - STACKTOP = sp;return; -} -function _sha3_round($data,$r) { - $data = $data|0; - $r = $r|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; - var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; - var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; - var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; - var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; - var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; - var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; - var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; - var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0; - var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0; - var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0; - var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0; - var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0; - var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0; - var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0; - var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0; - var $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0; - var $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0; - var $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0; - var $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0; - var $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0; - var $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0; - var $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0; - var $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0; - var $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0; - var $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0; - var $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0; - var $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0; - var $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0; - var $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0; - var $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0; - var $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0; - var $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0; - var $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0; - var $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0; - var $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0; - var $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0; - var $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $W = 0, $exitcond = 0, $exitcond19 = 0, $i$011 = 0, $i$110 = 0, $i$29 = 0; - var label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 640|0; - $W = sp; - $i$011 = 0; - while(1) { - $0 = $i$011 << 3; - $1 = (($data) + ($0)|0); - $2 = (_sph_dec64be_aligned($1)|0); - $3 = tempRet0; - $4 = (($W) + ($i$011<<3)|0); - $5 = $4; - $6 = $5; - HEAP32[$6>>2] = $2; - $7 = (($5) + 4)|0; - $8 = $7; - HEAP32[$8>>2] = $3; - $9 = (($i$011) + 1)|0; - $exitcond19 = ($9|0)==(16); - if ($exitcond19) { - $i$110 = 16; - break; - } else { - $i$011 = $9; - } - } - while(1) { - $10 = (($i$110) + -2)|0; - $11 = (($W) + ($10<<3)|0); - $12 = $11; - $13 = $12; - $14 = HEAP32[$13>>2]|0; - $15 = (($12) + 4)|0; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = (_bitshift64Shl(($14|0),($17|0),45)|0); - $19 = tempRet0; - $20 = (_bitshift64Lshr(($14|0),($17|0),19)|0); - $21 = tempRet0; - $22 = $18 | $20; - $23 = $19 | $21; - $24 = (_bitshift64Shl(($14|0),($17|0),3)|0); - $25 = tempRet0; - $26 = (_bitshift64Lshr(($14|0),($17|0),61)|0); - $27 = tempRet0; - $28 = $24 | $26; - $29 = $25 | $27; - $30 = (_bitshift64Lshr(($14|0),($17|0),6)|0); - $31 = tempRet0; - $32 = $28 ^ $30; - $33 = $29 ^ $31; - $34 = $32 ^ $22; - $35 = $33 ^ $23; - $36 = (($i$110) + -7)|0; - $37 = (($W) + ($36<<3)|0); - $38 = $37; - $39 = $38; - $40 = HEAP32[$39>>2]|0; - $41 = (($38) + 4)|0; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (($i$110) + -15)|0; - $45 = (($W) + ($44<<3)|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_bitshift64Shl(($48|0),($51|0),63)|0); - $53 = tempRet0; - $54 = (_bitshift64Lshr(($48|0),($51|0),1)|0); - $55 = tempRet0; - $56 = $52 | $54; - $57 = $53 | $55; - $58 = (_bitshift64Shl(($48|0),($51|0),56)|0); - $59 = tempRet0; - $60 = (_bitshift64Lshr(($48|0),($51|0),8)|0); - $61 = tempRet0; - $62 = $58 | $60; - $63 = $59 | $61; - $64 = (_bitshift64Lshr(($48|0),($51|0),7)|0); - $65 = tempRet0; - $66 = $62 ^ $64; - $67 = $63 ^ $65; - $68 = $66 ^ $56; - $69 = $67 ^ $57; - $70 = (($i$110) + -16)|0; - $71 = (($W) + ($70<<3)|0); - $72 = $71; - $73 = $72; - $74 = HEAP32[$73>>2]|0; - $75 = (($72) + 4)|0; - $76 = $75; - $77 = HEAP32[$76>>2]|0; - $78 = (_i64Add(($74|0),($77|0),($40|0),($43|0))|0); - $79 = tempRet0; - $80 = (_i64Add(($78|0),($79|0),($34|0),($35|0))|0); - $81 = tempRet0; - $82 = (_i64Add(($80|0),($81|0),($68|0),($69|0))|0); - $83 = tempRet0; - $84 = (($W) + ($i$110<<3)|0); - $85 = $84; - $86 = $85; - HEAP32[$86>>2] = $82; - $87 = (($85) + 4)|0; - $88 = $87; - HEAP32[$88>>2] = $83; - $89 = (($i$110) + 1)|0; - $exitcond = ($89|0)==(80); - if ($exitcond) { - break; - } else { - $i$110 = $89; - } - } - $90 = $r; - $91 = $90; - $92 = HEAP32[$91>>2]|0; - $93 = (($90) + 4)|0; - $94 = $93; - $95 = HEAP32[$94>>2]|0; - $96 = (($r) + 8|0); - $97 = $96; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (($97) + 4)|0; - $101 = $100; - $102 = HEAP32[$101>>2]|0; - $103 = (($r) + 16|0); - $104 = $103; - $105 = $104; - $106 = HEAP32[$105>>2]|0; - $107 = (($104) + 4)|0; - $108 = $107; - $109 = HEAP32[$108>>2]|0; - $110 = (($r) + 24|0); - $111 = $110; - $112 = $111; - $113 = HEAP32[$112>>2]|0; - $114 = (($111) + 4)|0; - $115 = $114; - $116 = HEAP32[$115>>2]|0; - $117 = (($r) + 32|0); - $118 = $117; - $119 = $118; - $120 = HEAP32[$119>>2]|0; - $121 = (($118) + 4)|0; - $122 = $121; - $123 = HEAP32[$122>>2]|0; - $124 = (($r) + 40|0); - $125 = $124; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (($125) + 4)|0; - $129 = $128; - $130 = HEAP32[$129>>2]|0; - $131 = (($r) + 48|0); - $132 = $131; - $133 = $132; - $134 = HEAP32[$133>>2]|0; - $135 = (($132) + 4)|0; - $136 = $135; - $137 = HEAP32[$136>>2]|0; - $138 = (($r) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = $120;$146 = $123;$170 = $134;$171 = $127;$173 = $137;$174 = $130;$193 = $141;$194 = $144;$203 = $92;$204 = $95;$228 = $99;$230 = $102;$234 = $106;$236 = $109;$241 = $113;$242 = $116;$i$29 = 0; - while(1) { - $147 = (_bitshift64Shl(($145|0),($146|0),50)|0); - $148 = tempRet0; - $149 = (_bitshift64Lshr(($145|0),($146|0),14)|0); - $150 = tempRet0; - $151 = $147 | $149; - $152 = $148 | $150; - $153 = (_bitshift64Shl(($145|0),($146|0),46)|0); - $154 = tempRet0; - $155 = (_bitshift64Lshr(($145|0),($146|0),18)|0); - $156 = tempRet0; - $157 = $153 | $155; - $158 = $154 | $156; - $159 = $151 ^ $157; - $160 = $152 ^ $158; - $161 = (_bitshift64Shl(($145|0),($146|0),23)|0); - $162 = tempRet0; - $163 = (_bitshift64Lshr(($145|0),($146|0),41)|0); - $164 = tempRet0; - $165 = $161 | $163; - $166 = $162 | $164; - $167 = $159 ^ $165; - $168 = $160 ^ $166; - $169 = $171 ^ $170; - $172 = $174 ^ $173; - $175 = $169 & $145; - $176 = $172 & $146; - $177 = $175 ^ $170; - $178 = $176 ^ $173; - $179 = (31904 + ($i$29<<3)|0); - $180 = $179; - $181 = $180; - $182 = HEAP32[$181>>2]|0; - $183 = (($180) + 4)|0; - $184 = $183; - $185 = HEAP32[$184>>2]|0; - $186 = (($W) + ($i$29<<3)|0); - $187 = $186; - $188 = $187; - $189 = HEAP32[$188>>2]|0; - $190 = (($187) + 4)|0; - $191 = $190; - $192 = HEAP32[$191>>2]|0; - $195 = (_i64Add(($177|0),($178|0),($193|0),($194|0))|0); - $196 = tempRet0; - $197 = (_i64Add(($195|0),($196|0),($167|0),($168|0))|0); - $198 = tempRet0; - $199 = (_i64Add(($197|0),($198|0),($182|0),($185|0))|0); - $200 = tempRet0; - $201 = (_i64Add(($199|0),($200|0),($189|0),($192|0))|0); - $202 = tempRet0; - $205 = (_bitshift64Shl(($203|0),($204|0),36)|0); - $206 = tempRet0; - $207 = (_bitshift64Lshr(($203|0),($204|0),28)|0); - $208 = tempRet0; - $209 = $205 | $207; - $210 = $206 | $208; - $211 = (_bitshift64Shl(($203|0),($204|0),30)|0); - $212 = tempRet0; - $213 = (_bitshift64Lshr(($203|0),($204|0),34)|0); - $214 = tempRet0; - $215 = $211 | $213; - $216 = $212 | $214; - $217 = $209 ^ $215; - $218 = $210 ^ $216; - $219 = (_bitshift64Shl(($203|0),($204|0),25)|0); - $220 = tempRet0; - $221 = (_bitshift64Lshr(($203|0),($204|0),39)|0); - $222 = tempRet0; - $223 = $219 | $221; - $224 = $220 | $222; - $225 = $217 ^ $223; - $226 = $218 ^ $224; - $227 = $203 & $228; - $229 = $204 & $230; - $231 = $203 | $228; - $232 = $204 | $230; - $233 = $231 & $234; - $235 = $232 & $236; - $237 = $233 | $227; - $238 = $235 | $229; - $239 = (_i64Add(($225|0),($226|0),($237|0),($238|0))|0); - $240 = tempRet0; - $243 = (_i64Add(($201|0),($202|0),($241|0),($242|0))|0); - $244 = tempRet0; - $245 = (_i64Add(($239|0),($240|0),($201|0),($202|0))|0); - $246 = tempRet0; - $247 = (_bitshift64Shl(($243|0),($244|0),50)|0); - $248 = tempRet0; - $249 = (_bitshift64Lshr(($243|0),($244|0),14)|0); - $250 = tempRet0; - $251 = $247 | $249; - $252 = $248 | $250; - $253 = (_bitshift64Shl(($243|0),($244|0),46)|0); - $254 = tempRet0; - $255 = (_bitshift64Lshr(($243|0),($244|0),18)|0); - $256 = tempRet0; - $257 = $253 | $255; - $258 = $254 | $256; - $259 = $251 ^ $257; - $260 = $252 ^ $258; - $261 = (_bitshift64Shl(($243|0),($244|0),23)|0); - $262 = tempRet0; - $263 = (_bitshift64Lshr(($243|0),($244|0),41)|0); - $264 = tempRet0; - $265 = $261 | $263; - $266 = $262 | $264; - $267 = $259 ^ $265; - $268 = $260 ^ $266; - $269 = $145 ^ $171; - $270 = $146 ^ $174; - $271 = $243 & $269; - $272 = $244 & $270; - $273 = $271 ^ $171; - $274 = $272 ^ $174; - $275 = $i$29 | 1; - $276 = (31904 + ($275<<3)|0); - $277 = $276; - $278 = $277; - $279 = HEAP32[$278>>2]|0; - $280 = (($277) + 4)|0; - $281 = $280; - $282 = HEAP32[$281>>2]|0; - $283 = (($W) + ($275<<3)|0); - $284 = $283; - $285 = $284; - $286 = HEAP32[$285>>2]|0; - $287 = (($284) + 4)|0; - $288 = $287; - $289 = HEAP32[$288>>2]|0; - $290 = (_i64Add(($279|0),($282|0),($170|0),($173|0))|0); - $291 = tempRet0; - $292 = (_i64Add(($290|0),($291|0),($286|0),($289|0))|0); - $293 = tempRet0; - $294 = (_i64Add(($292|0),($293|0),($273|0),($274|0))|0); - $295 = tempRet0; - $296 = (_i64Add(($294|0),($295|0),($267|0),($268|0))|0); - $297 = tempRet0; - $298 = (_bitshift64Shl(($245|0),($246|0),36)|0); - $299 = tempRet0; - $300 = (_bitshift64Lshr(($245|0),($246|0),28)|0); - $301 = tempRet0; - $302 = $298 | $300; - $303 = $299 | $301; - $304 = (_bitshift64Shl(($245|0),($246|0),30)|0); - $305 = tempRet0; - $306 = (_bitshift64Lshr(($245|0),($246|0),34)|0); - $307 = tempRet0; - $308 = $304 | $306; - $309 = $305 | $307; - $310 = $302 ^ $308; - $311 = $303 ^ $309; - $312 = (_bitshift64Shl(($245|0),($246|0),25)|0); - $313 = tempRet0; - $314 = (_bitshift64Lshr(($245|0),($246|0),39)|0); - $315 = tempRet0; - $316 = $312 | $314; - $317 = $313 | $315; - $318 = $310 ^ $316; - $319 = $311 ^ $317; - $320 = $245 & $203; - $321 = $246 & $204; - $322 = $245 | $203; - $323 = $246 | $204; - $324 = $322 & $228; - $325 = $323 & $230; - $326 = $324 | $320; - $327 = $325 | $321; - $328 = (_i64Add(($318|0),($319|0),($326|0),($327|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($296|0),($297|0),($234|0),($236|0))|0); - $331 = tempRet0; - $332 = (_i64Add(($328|0),($329|0),($296|0),($297|0))|0); - $333 = tempRet0; - $334 = (_bitshift64Shl(($330|0),($331|0),50)|0); - $335 = tempRet0; - $336 = (_bitshift64Lshr(($330|0),($331|0),14)|0); - $337 = tempRet0; - $338 = $334 | $336; - $339 = $335 | $337; - $340 = (_bitshift64Shl(($330|0),($331|0),46)|0); - $341 = tempRet0; - $342 = (_bitshift64Lshr(($330|0),($331|0),18)|0); - $343 = tempRet0; - $344 = $340 | $342; - $345 = $341 | $343; - $346 = $338 ^ $344; - $347 = $339 ^ $345; - $348 = (_bitshift64Shl(($330|0),($331|0),23)|0); - $349 = tempRet0; - $350 = (_bitshift64Lshr(($330|0),($331|0),41)|0); - $351 = tempRet0; - $352 = $348 | $350; - $353 = $349 | $351; - $354 = $346 ^ $352; - $355 = $347 ^ $353; - $356 = $243 ^ $145; - $357 = $244 ^ $146; - $358 = $330 & $356; - $359 = $331 & $357; - $360 = $358 ^ $145; - $361 = $359 ^ $146; - $362 = $i$29 | 2; - $363 = (31904 + ($362<<3)|0); - $364 = $363; - $365 = $364; - $366 = HEAP32[$365>>2]|0; - $367 = (($364) + 4)|0; - $368 = $367; - $369 = HEAP32[$368>>2]|0; - $370 = (($W) + ($362<<3)|0); - $371 = $370; - $372 = $371; - $373 = HEAP32[$372>>2]|0; - $374 = (($371) + 4)|0; - $375 = $374; - $376 = HEAP32[$375>>2]|0; - $377 = (_i64Add(($366|0),($369|0),($171|0),($174|0))|0); - $378 = tempRet0; - $379 = (_i64Add(($377|0),($378|0),($373|0),($376|0))|0); - $380 = tempRet0; - $381 = (_i64Add(($379|0),($380|0),($360|0),($361|0))|0); - $382 = tempRet0; - $383 = (_i64Add(($381|0),($382|0),($354|0),($355|0))|0); - $384 = tempRet0; - $385 = (_bitshift64Shl(($332|0),($333|0),36)|0); - $386 = tempRet0; - $387 = (_bitshift64Lshr(($332|0),($333|0),28)|0); - $388 = tempRet0; - $389 = $385 | $387; - $390 = $386 | $388; - $391 = (_bitshift64Shl(($332|0),($333|0),30)|0); - $392 = tempRet0; - $393 = (_bitshift64Lshr(($332|0),($333|0),34)|0); - $394 = tempRet0; - $395 = $391 | $393; - $396 = $392 | $394; - $397 = $389 ^ $395; - $398 = $390 ^ $396; - $399 = (_bitshift64Shl(($332|0),($333|0),25)|0); - $400 = tempRet0; - $401 = (_bitshift64Lshr(($332|0),($333|0),39)|0); - $402 = tempRet0; - $403 = $399 | $401; - $404 = $400 | $402; - $405 = $397 ^ $403; - $406 = $398 ^ $404; - $407 = $332 & $245; - $408 = $333 & $246; - $409 = $332 | $245; - $410 = $333 | $246; - $411 = $409 & $203; - $412 = $410 & $204; - $413 = $411 | $407; - $414 = $412 | $408; - $415 = (_i64Add(($405|0),($406|0),($413|0),($414|0))|0); - $416 = tempRet0; - $417 = (_i64Add(($383|0),($384|0),($228|0),($230|0))|0); - $418 = tempRet0; - $419 = (_i64Add(($415|0),($416|0),($383|0),($384|0))|0); - $420 = tempRet0; - $421 = (_bitshift64Shl(($417|0),($418|0),50)|0); - $422 = tempRet0; - $423 = (_bitshift64Lshr(($417|0),($418|0),14)|0); - $424 = tempRet0; - $425 = $421 | $423; - $426 = $422 | $424; - $427 = (_bitshift64Shl(($417|0),($418|0),46)|0); - $428 = tempRet0; - $429 = (_bitshift64Lshr(($417|0),($418|0),18)|0); - $430 = tempRet0; - $431 = $427 | $429; - $432 = $428 | $430; - $433 = $425 ^ $431; - $434 = $426 ^ $432; - $435 = (_bitshift64Shl(($417|0),($418|0),23)|0); - $436 = tempRet0; - $437 = (_bitshift64Lshr(($417|0),($418|0),41)|0); - $438 = tempRet0; - $439 = $435 | $437; - $440 = $436 | $438; - $441 = $433 ^ $439; - $442 = $434 ^ $440; - $443 = $330 ^ $243; - $444 = $331 ^ $244; - $445 = $417 & $443; - $446 = $418 & $444; - $447 = $445 ^ $243; - $448 = $446 ^ $244; - $449 = $i$29 | 3; - $450 = (31904 + ($449<<3)|0); - $451 = $450; - $452 = $451; - $453 = HEAP32[$452>>2]|0; - $454 = (($451) + 4)|0; - $455 = $454; - $456 = HEAP32[$455>>2]|0; - $457 = (($W) + ($449<<3)|0); - $458 = $457; - $459 = $458; - $460 = HEAP32[$459>>2]|0; - $461 = (($458) + 4)|0; - $462 = $461; - $463 = HEAP32[$462>>2]|0; - $464 = (_i64Add(($453|0),($456|0),($145|0),($146|0))|0); - $465 = tempRet0; - $466 = (_i64Add(($464|0),($465|0),($460|0),($463|0))|0); - $467 = tempRet0; - $468 = (_i64Add(($466|0),($467|0),($447|0),($448|0))|0); - $469 = tempRet0; - $470 = (_i64Add(($468|0),($469|0),($441|0),($442|0))|0); - $471 = tempRet0; - $472 = (_bitshift64Shl(($419|0),($420|0),36)|0); - $473 = tempRet0; - $474 = (_bitshift64Lshr(($419|0),($420|0),28)|0); - $475 = tempRet0; - $476 = $472 | $474; - $477 = $473 | $475; - $478 = (_bitshift64Shl(($419|0),($420|0),30)|0); - $479 = tempRet0; - $480 = (_bitshift64Lshr(($419|0),($420|0),34)|0); - $481 = tempRet0; - $482 = $478 | $480; - $483 = $479 | $481; - $484 = $476 ^ $482; - $485 = $477 ^ $483; - $486 = (_bitshift64Shl(($419|0),($420|0),25)|0); - $487 = tempRet0; - $488 = (_bitshift64Lshr(($419|0),($420|0),39)|0); - $489 = tempRet0; - $490 = $486 | $488; - $491 = $487 | $489; - $492 = $484 ^ $490; - $493 = $485 ^ $491; - $494 = $419 & $332; - $495 = $420 & $333; - $496 = $419 | $332; - $497 = $420 | $333; - $498 = $496 & $245; - $499 = $497 & $246; - $500 = $498 | $494; - $501 = $499 | $495; - $502 = (_i64Add(($492|0),($493|0),($500|0),($501|0))|0); - $503 = tempRet0; - $504 = (_i64Add(($470|0),($471|0),($203|0),($204|0))|0); - $505 = tempRet0; - $506 = (_i64Add(($502|0),($503|0),($470|0),($471|0))|0); - $507 = tempRet0; - $508 = (_bitshift64Shl(($504|0),($505|0),50)|0); - $509 = tempRet0; - $510 = (_bitshift64Lshr(($504|0),($505|0),14)|0); - $511 = tempRet0; - $512 = $508 | $510; - $513 = $509 | $511; - $514 = (_bitshift64Shl(($504|0),($505|0),46)|0); - $515 = tempRet0; - $516 = (_bitshift64Lshr(($504|0),($505|0),18)|0); - $517 = tempRet0; - $518 = $514 | $516; - $519 = $515 | $517; - $520 = $512 ^ $518; - $521 = $513 ^ $519; - $522 = (_bitshift64Shl(($504|0),($505|0),23)|0); - $523 = tempRet0; - $524 = (_bitshift64Lshr(($504|0),($505|0),41)|0); - $525 = tempRet0; - $526 = $522 | $524; - $527 = $523 | $525; - $528 = $520 ^ $526; - $529 = $521 ^ $527; - $530 = $417 ^ $330; - $531 = $418 ^ $331; - $532 = $504 & $530; - $533 = $505 & $531; - $534 = $532 ^ $330; - $535 = $533 ^ $331; - $536 = $i$29 | 4; - $537 = (31904 + ($536<<3)|0); - $538 = $537; - $539 = $538; - $540 = HEAP32[$539>>2]|0; - $541 = (($538) + 4)|0; - $542 = $541; - $543 = HEAP32[$542>>2]|0; - $544 = (($W) + ($536<<3)|0); - $545 = $544; - $546 = $545; - $547 = HEAP32[$546>>2]|0; - $548 = (($545) + 4)|0; - $549 = $548; - $550 = HEAP32[$549>>2]|0; - $551 = (_i64Add(($540|0),($543|0),($243|0),($244|0))|0); - $552 = tempRet0; - $553 = (_i64Add(($551|0),($552|0),($547|0),($550|0))|0); - $554 = tempRet0; - $555 = (_i64Add(($553|0),($554|0),($534|0),($535|0))|0); - $556 = tempRet0; - $557 = (_i64Add(($555|0),($556|0),($528|0),($529|0))|0); - $558 = tempRet0; - $559 = (_bitshift64Shl(($506|0),($507|0),36)|0); - $560 = tempRet0; - $561 = (_bitshift64Lshr(($506|0),($507|0),28)|0); - $562 = tempRet0; - $563 = $559 | $561; - $564 = $560 | $562; - $565 = (_bitshift64Shl(($506|0),($507|0),30)|0); - $566 = tempRet0; - $567 = (_bitshift64Lshr(($506|0),($507|0),34)|0); - $568 = tempRet0; - $569 = $565 | $567; - $570 = $566 | $568; - $571 = $563 ^ $569; - $572 = $564 ^ $570; - $573 = (_bitshift64Shl(($506|0),($507|0),25)|0); - $574 = tempRet0; - $575 = (_bitshift64Lshr(($506|0),($507|0),39)|0); - $576 = tempRet0; - $577 = $573 | $575; - $578 = $574 | $576; - $579 = $571 ^ $577; - $580 = $572 ^ $578; - $581 = $506 & $419; - $582 = $507 & $420; - $583 = $506 | $419; - $584 = $507 | $420; - $585 = $583 & $332; - $586 = $584 & $333; - $587 = $585 | $581; - $588 = $586 | $582; - $589 = (_i64Add(($579|0),($580|0),($587|0),($588|0))|0); - $590 = tempRet0; - $591 = (_i64Add(($557|0),($558|0),($245|0),($246|0))|0); - $592 = tempRet0; - $593 = (_i64Add(($589|0),($590|0),($557|0),($558|0))|0); - $594 = tempRet0; - $595 = (_bitshift64Shl(($591|0),($592|0),50)|0); - $596 = tempRet0; - $597 = (_bitshift64Lshr(($591|0),($592|0),14)|0); - $598 = tempRet0; - $599 = $595 | $597; - $600 = $596 | $598; - $601 = (_bitshift64Shl(($591|0),($592|0),46)|0); - $602 = tempRet0; - $603 = (_bitshift64Lshr(($591|0),($592|0),18)|0); - $604 = tempRet0; - $605 = $601 | $603; - $606 = $602 | $604; - $607 = $599 ^ $605; - $608 = $600 ^ $606; - $609 = (_bitshift64Shl(($591|0),($592|0),23)|0); - $610 = tempRet0; - $611 = (_bitshift64Lshr(($591|0),($592|0),41)|0); - $612 = tempRet0; - $613 = $609 | $611; - $614 = $610 | $612; - $615 = $607 ^ $613; - $616 = $608 ^ $614; - $617 = $504 ^ $417; - $618 = $505 ^ $418; - $619 = $591 & $617; - $620 = $592 & $618; - $621 = $619 ^ $417; - $622 = $620 ^ $418; - $623 = $i$29 | 5; - $624 = (31904 + ($623<<3)|0); - $625 = $624; - $626 = $625; - $627 = HEAP32[$626>>2]|0; - $628 = (($625) + 4)|0; - $629 = $628; - $630 = HEAP32[$629>>2]|0; - $631 = (($W) + ($623<<3)|0); - $632 = $631; - $633 = $632; - $634 = HEAP32[$633>>2]|0; - $635 = (($632) + 4)|0; - $636 = $635; - $637 = HEAP32[$636>>2]|0; - $638 = (_i64Add(($627|0),($630|0),($330|0),($331|0))|0); - $639 = tempRet0; - $640 = (_i64Add(($638|0),($639|0),($634|0),($637|0))|0); - $641 = tempRet0; - $642 = (_i64Add(($640|0),($641|0),($621|0),($622|0))|0); - $643 = tempRet0; - $644 = (_i64Add(($642|0),($643|0),($615|0),($616|0))|0); - $645 = tempRet0; - $646 = (_bitshift64Shl(($593|0),($594|0),36)|0); - $647 = tempRet0; - $648 = (_bitshift64Lshr(($593|0),($594|0),28)|0); - $649 = tempRet0; - $650 = $646 | $648; - $651 = $647 | $649; - $652 = (_bitshift64Shl(($593|0),($594|0),30)|0); - $653 = tempRet0; - $654 = (_bitshift64Lshr(($593|0),($594|0),34)|0); - $655 = tempRet0; - $656 = $652 | $654; - $657 = $653 | $655; - $658 = $650 ^ $656; - $659 = $651 ^ $657; - $660 = (_bitshift64Shl(($593|0),($594|0),25)|0); - $661 = tempRet0; - $662 = (_bitshift64Lshr(($593|0),($594|0),39)|0); - $663 = tempRet0; - $664 = $660 | $662; - $665 = $661 | $663; - $666 = $658 ^ $664; - $667 = $659 ^ $665; - $668 = $593 & $506; - $669 = $594 & $507; - $670 = $593 | $506; - $671 = $594 | $507; - $672 = $670 & $419; - $673 = $671 & $420; - $674 = $672 | $668; - $675 = $673 | $669; - $676 = (_i64Add(($666|0),($667|0),($674|0),($675|0))|0); - $677 = tempRet0; - $678 = (_i64Add(($644|0),($645|0),($332|0),($333|0))|0); - $679 = tempRet0; - $680 = (_i64Add(($676|0),($677|0),($644|0),($645|0))|0); - $681 = tempRet0; - $682 = (_bitshift64Shl(($678|0),($679|0),50)|0); - $683 = tempRet0; - $684 = (_bitshift64Lshr(($678|0),($679|0),14)|0); - $685 = tempRet0; - $686 = $682 | $684; - $687 = $683 | $685; - $688 = (_bitshift64Shl(($678|0),($679|0),46)|0); - $689 = tempRet0; - $690 = (_bitshift64Lshr(($678|0),($679|0),18)|0); - $691 = tempRet0; - $692 = $688 | $690; - $693 = $689 | $691; - $694 = $686 ^ $692; - $695 = $687 ^ $693; - $696 = (_bitshift64Shl(($678|0),($679|0),23)|0); - $697 = tempRet0; - $698 = (_bitshift64Lshr(($678|0),($679|0),41)|0); - $699 = tempRet0; - $700 = $696 | $698; - $701 = $697 | $699; - $702 = $694 ^ $700; - $703 = $695 ^ $701; - $704 = $591 ^ $504; - $705 = $592 ^ $505; - $706 = $678 & $704; - $707 = $679 & $705; - $708 = $706 ^ $504; - $709 = $707 ^ $505; - $710 = $i$29 | 6; - $711 = (31904 + ($710<<3)|0); - $712 = $711; - $713 = $712; - $714 = HEAP32[$713>>2]|0; - $715 = (($712) + 4)|0; - $716 = $715; - $717 = HEAP32[$716>>2]|0; - $718 = (($W) + ($710<<3)|0); - $719 = $718; - $720 = $719; - $721 = HEAP32[$720>>2]|0; - $722 = (($719) + 4)|0; - $723 = $722; - $724 = HEAP32[$723>>2]|0; - $725 = (_i64Add(($721|0),($724|0),($714|0),($717|0))|0); - $726 = tempRet0; - $727 = (_i64Add(($725|0),($726|0),($417|0),($418|0))|0); - $728 = tempRet0; - $729 = (_i64Add(($727|0),($728|0),($708|0),($709|0))|0); - $730 = tempRet0; - $731 = (_i64Add(($729|0),($730|0),($702|0),($703|0))|0); - $732 = tempRet0; - $733 = (_bitshift64Shl(($680|0),($681|0),36)|0); - $734 = tempRet0; - $735 = (_bitshift64Lshr(($680|0),($681|0),28)|0); - $736 = tempRet0; - $737 = $733 | $735; - $738 = $734 | $736; - $739 = (_bitshift64Shl(($680|0),($681|0),30)|0); - $740 = tempRet0; - $741 = (_bitshift64Lshr(($680|0),($681|0),34)|0); - $742 = tempRet0; - $743 = $739 | $741; - $744 = $740 | $742; - $745 = $737 ^ $743; - $746 = $738 ^ $744; - $747 = (_bitshift64Shl(($680|0),($681|0),25)|0); - $748 = tempRet0; - $749 = (_bitshift64Lshr(($680|0),($681|0),39)|0); - $750 = tempRet0; - $751 = $747 | $749; - $752 = $748 | $750; - $753 = $745 ^ $751; - $754 = $746 ^ $752; - $755 = $680 & $593; - $756 = $681 & $594; - $757 = $680 | $593; - $758 = $681 | $594; - $759 = $757 & $506; - $760 = $758 & $507; - $761 = $759 | $755; - $762 = $760 | $756; - $763 = (_i64Add(($753|0),($754|0),($761|0),($762|0))|0); - $764 = tempRet0; - $765 = (_i64Add(($731|0),($732|0),($419|0),($420|0))|0); - $766 = tempRet0; - $767 = (_i64Add(($763|0),($764|0),($731|0),($732|0))|0); - $768 = tempRet0; - $769 = (_bitshift64Shl(($765|0),($766|0),50)|0); - $770 = tempRet0; - $771 = (_bitshift64Lshr(($765|0),($766|0),14)|0); - $772 = tempRet0; - $773 = $769 | $771; - $774 = $770 | $772; - $775 = (_bitshift64Shl(($765|0),($766|0),46)|0); - $776 = tempRet0; - $777 = (_bitshift64Lshr(($765|0),($766|0),18)|0); - $778 = tempRet0; - $779 = $775 | $777; - $780 = $776 | $778; - $781 = $773 ^ $779; - $782 = $774 ^ $780; - $783 = (_bitshift64Shl(($765|0),($766|0),23)|0); - $784 = tempRet0; - $785 = (_bitshift64Lshr(($765|0),($766|0),41)|0); - $786 = tempRet0; - $787 = $783 | $785; - $788 = $784 | $786; - $789 = $781 ^ $787; - $790 = $782 ^ $788; - $791 = $678 ^ $591; - $792 = $679 ^ $592; - $793 = $765 & $791; - $794 = $766 & $792; - $795 = $793 ^ $591; - $796 = $794 ^ $592; - $797 = $i$29 | 7; - $798 = (31904 + ($797<<3)|0); - $799 = $798; - $800 = $799; - $801 = HEAP32[$800>>2]|0; - $802 = (($799) + 4)|0; - $803 = $802; - $804 = HEAP32[$803>>2]|0; - $805 = (($W) + ($797<<3)|0); - $806 = $805; - $807 = $806; - $808 = HEAP32[$807>>2]|0; - $809 = (($806) + 4)|0; - $810 = $809; - $811 = HEAP32[$810>>2]|0; - $812 = (_i64Add(($808|0),($811|0),($801|0),($804|0))|0); - $813 = tempRet0; - $814 = (_i64Add(($812|0),($813|0),($504|0),($505|0))|0); - $815 = tempRet0; - $816 = (_i64Add(($814|0),($815|0),($795|0),($796|0))|0); - $817 = tempRet0; - $818 = (_i64Add(($816|0),($817|0),($789|0),($790|0))|0); - $819 = tempRet0; - $820 = (_bitshift64Shl(($767|0),($768|0),36)|0); - $821 = tempRet0; - $822 = (_bitshift64Lshr(($767|0),($768|0),28)|0); - $823 = tempRet0; - $824 = $820 | $822; - $825 = $821 | $823; - $826 = (_bitshift64Shl(($767|0),($768|0),30)|0); - $827 = tempRet0; - $828 = (_bitshift64Lshr(($767|0),($768|0),34)|0); - $829 = tempRet0; - $830 = $826 | $828; - $831 = $827 | $829; - $832 = $824 ^ $830; - $833 = $825 ^ $831; - $834 = (_bitshift64Shl(($767|0),($768|0),25)|0); - $835 = tempRet0; - $836 = (_bitshift64Lshr(($767|0),($768|0),39)|0); - $837 = tempRet0; - $838 = $834 | $836; - $839 = $835 | $837; - $840 = $832 ^ $838; - $841 = $833 ^ $839; - $842 = $767 & $680; - $843 = $768 & $681; - $844 = $767 | $680; - $845 = $768 | $681; - $846 = $844 & $593; - $847 = $845 & $594; - $848 = $846 | $842; - $849 = $847 | $843; - $850 = (_i64Add(($840|0),($841|0),($848|0),($849|0))|0); - $851 = tempRet0; - $852 = (_i64Add(($818|0),($819|0),($506|0),($507|0))|0); - $853 = tempRet0; - $854 = (_i64Add(($850|0),($851|0),($818|0),($819|0))|0); - $855 = tempRet0; - $856 = (($i$29) + 8)|0; - $857 = ($856|0)<(80); - if ($857) { - $145 = $852;$146 = $853;$170 = $678;$171 = $765;$173 = $679;$174 = $766;$193 = $591;$194 = $592;$203 = $854;$204 = $855;$228 = $767;$230 = $768;$234 = $680;$236 = $681;$241 = $593;$242 = $594;$i$29 = $856; - } else { - break; - } - } - $858 = $r; - $859 = $858; - $860 = HEAP32[$859>>2]|0; - $861 = (($858) + 4)|0; - $862 = $861; - $863 = HEAP32[$862>>2]|0; - $864 = (_i64Add(($860|0),($863|0),($854|0),($855|0))|0); - $865 = tempRet0; - $866 = $r; - $867 = $866; - HEAP32[$867>>2] = $864; - $868 = (($866) + 4)|0; - $869 = $868; - HEAP32[$869>>2] = $865; - $870 = $96; - $871 = $870; - $872 = HEAP32[$871>>2]|0; - $873 = (($870) + 4)|0; - $874 = $873; - $875 = HEAP32[$874>>2]|0; - $876 = (_i64Add(($872|0),($875|0),($767|0),($768|0))|0); - $877 = tempRet0; - $878 = $96; - $879 = $878; - HEAP32[$879>>2] = $876; - $880 = (($878) + 4)|0; - $881 = $880; - HEAP32[$881>>2] = $877; - $882 = $103; - $883 = $882; - $884 = HEAP32[$883>>2]|0; - $885 = (($882) + 4)|0; - $886 = $885; - $887 = HEAP32[$886>>2]|0; - $888 = (_i64Add(($884|0),($887|0),($680|0),($681|0))|0); - $889 = tempRet0; - $890 = $103; - $891 = $890; - HEAP32[$891>>2] = $888; - $892 = (($890) + 4)|0; - $893 = $892; - HEAP32[$893>>2] = $889; - $894 = $110; - $895 = $894; - $896 = HEAP32[$895>>2]|0; - $897 = (($894) + 4)|0; - $898 = $897; - $899 = HEAP32[$898>>2]|0; - $900 = (_i64Add(($896|0),($899|0),($593|0),($594|0))|0); - $901 = tempRet0; - $902 = $110; - $903 = $902; - HEAP32[$903>>2] = $900; - $904 = (($902) + 4)|0; - $905 = $904; - HEAP32[$905>>2] = $901; - $906 = $117; - $907 = $906; - $908 = HEAP32[$907>>2]|0; - $909 = (($906) + 4)|0; - $910 = $909; - $911 = HEAP32[$910>>2]|0; - $912 = (_i64Add(($908|0),($911|0),($852|0),($853|0))|0); - $913 = tempRet0; - $914 = $117; - $915 = $914; - HEAP32[$915>>2] = $912; - $916 = (($914) + 4)|0; - $917 = $916; - HEAP32[$917>>2] = $913; - $918 = $124; - $919 = $918; - $920 = HEAP32[$919>>2]|0; - $921 = (($918) + 4)|0; - $922 = $921; - $923 = HEAP32[$922>>2]|0; - $924 = (_i64Add(($920|0),($923|0),($765|0),($766|0))|0); - $925 = tempRet0; - $926 = $124; - $927 = $926; - HEAP32[$927>>2] = $924; - $928 = (($926) + 4)|0; - $929 = $928; - HEAP32[$929>>2] = $925; - $930 = $131; - $931 = $930; - $932 = HEAP32[$931>>2]|0; - $933 = (($930) + 4)|0; - $934 = $933; - $935 = HEAP32[$934>>2]|0; - $936 = (_i64Add(($932|0),($935|0),($678|0),($679|0))|0); - $937 = tempRet0; - $938 = $131; - $939 = $938; - HEAP32[$939>>2] = $936; - $940 = (($938) + 4)|0; - $941 = $940; - HEAP32[$941>>2] = $937; - $942 = $138; - $943 = $942; - $944 = HEAP32[$943>>2]|0; - $945 = (($942) + 4)|0; - $946 = $945; - $947 = HEAP32[$946>>2]|0; - $948 = (_i64Add(($944|0),($947|0),($591|0),($592|0))|0); - $949 = tempRet0; - $950 = $138; - $951 = $950; - HEAP32[$951>>2] = $948; - $952 = (($950) + 4)|0; - $953 = $952; - HEAP32[$953>>2] = $949; - STACKTOP = sp;return; -} -function _sha384_close($cc,$dst,$rnum) { - $cc = $cc|0; - $dst = $dst|0; - $rnum = $rnum|0; - var label = 0, sp = 0; - sp = STACKTOP; - _sha384_addbits_and_close($cc,0,0,$dst,$rnum); - STACKTOP = sp;return; -} -function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { - $cc = $cc|0; - $ub = $ub|0; - $n = $n|0; - $dst = $dst|0; - $rnum = $rnum|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $u$01 = 0, dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - $0 = (($cc) + 192|0); - $1 = $0; - $2 = $1; - $3 = HEAP32[$2>>2]|0; - $4 = (($1) + 4)|0; - $5 = $4; - $6 = HEAP32[$5>>2]|0; - $7 = $3 & 127; - $8 = 128 >>> $n; - $9 = (0 - ($8))|0; - $10 = $9 & $ub; - $11 = $10 | $8; - $12 = $11&255; - $13 = (($7) + 1)|0; - $14 = (($cc) + ($7)|0); - HEAP8[$14>>0] = $12; - $15 = ($13>>>0)>(112); - $16 = (($cc) + ($13)|0); - if ($15) { - $17 = $7 ^ 127; - _memset(($16|0),0,($17|0))|0; - $18 = (($cc) + 128|0); - _sha3_round($cc,$18); - dest=$cc+0|0; stop=dest+112|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); - } else { - $19 = (111 - ($7))|0; - _memset(($16|0),0,($19|0))|0; - } - $20 = (($cc) + 112|0); - $21 = $0; - $22 = $21; - $23 = HEAP32[$22>>2]|0; - $24 = (($21) + 4)|0; - $25 = $24; - $26 = HEAP32[$25>>2]|0; - $27 = (_bitshift64Lshr(($23|0),($26|0),61)|0); - $28 = tempRet0; - _sph_enc64be_aligned($20,$27,$28); - $29 = (($cc) + 120|0); - $30 = $0; - $31 = $30; - $32 = HEAP32[$31>>2]|0; - $33 = (($30) + 4)|0; - $34 = $33; - $35 = HEAP32[$34>>2]|0; - $36 = (_bitshift64Shl(($32|0),($35|0),3)|0); - $37 = tempRet0; - $38 = (_i64Add(($36|0),($37|0),($n|0),0)|0); - $39 = tempRet0; - _sph_enc64be_aligned($29,$38,$39); - $40 = (($cc) + 128|0); - _sha3_round($cc,$40); - $41 = ($rnum|0)==(0); - if ($41) { - STACKTOP = sp;return; - } else { - $u$01 = 0; - } - while(1) { - $42 = $u$01 << 3; - $43 = (($dst) + ($42)|0); - $44 = (($40) + ($u$01<<3)|0); - $45 = $44; - $46 = $45; - $47 = HEAP32[$46>>2]|0; - $48 = (($45) + 4)|0; - $49 = $48; - $50 = HEAP32[$49>>2]|0; - _sph_enc64be($43,$47,$50); - $51 = (($u$01) + 1)|0; - $exitcond = ($51|0)==($rnum|0); - if ($exitcond) { - break; - } else { - $u$01 = $51; - } - } - STACKTOP = sp;return; -} -function _sph_dec64be_aligned($src) { - $src = $src|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$src>>0]|0; - $1 = $0&255; - $2 = (_bitshift64Shl(($1|0),0,56)|0); - $3 = tempRet0; - $4 = (($src) + 1|0); - $5 = HEAP8[$4>>0]|0; - $6 = $5&255; - $7 = (_bitshift64Shl(($6|0),0,48)|0); - $8 = tempRet0; - $9 = $7 | $2; - $10 = $8 | $3; - $11 = (($src) + 2|0); - $12 = HEAP8[$11>>0]|0; - $13 = $12&255; - $14 = (_bitshift64Shl(($13|0),0,40)|0); - $15 = tempRet0; - $16 = $9 | $14; - $17 = $10 | $15; - $18 = (($src) + 3|0); - $19 = HEAP8[$18>>0]|0; - $20 = $19&255; - $21 = $17 | $20; - $22 = (($src) + 4|0); - $23 = HEAP8[$22>>0]|0; - $24 = $23&255; - $25 = (_bitshift64Shl(($24|0),0,24)|0); - $26 = tempRet0; - $27 = $16 | $25; - $28 = $21 | $26; - $29 = (($src) + 5|0); - $30 = HEAP8[$29>>0]|0; - $31 = $30&255; - $32 = (_bitshift64Shl(($31|0),0,16)|0); - $33 = tempRet0; - $34 = $27 | $32; - $35 = $28 | $33; - $36 = (($src) + 6|0); - $37 = HEAP8[$36>>0]|0; - $38 = $37&255; - $39 = (_bitshift64Shl(($38|0),0,8)|0); - $40 = tempRet0; - $41 = $34 | $39; - $42 = $35 | $40; - $43 = (($src) + 7|0); - $44 = HEAP8[$43>>0]|0; - $45 = $44&255; - $46 = $41 | $45; - tempRet0 = $42; - STACKTOP = sp;return ($46|0); -} -function _sph_enc64be_aligned($dst,$0,$1) { - $dst = $dst|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); - $3 = tempRet0; - $4 = $2&255; - HEAP8[$dst>>0] = $4; - $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); - $6 = tempRet0; - $7 = $5&255; - $8 = (($dst) + 1|0); - HEAP8[$8>>0] = $7; - $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); - $10 = tempRet0; - $11 = $9&255; - $12 = (($dst) + 2|0); - HEAP8[$12>>0] = $11; - $13 = $1&255; - $14 = (($dst) + 3|0); - HEAP8[$14>>0] = $13; - $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); - $16 = tempRet0; - $17 = $15&255; - $18 = (($dst) + 4|0); - HEAP8[$18>>0] = $17; - $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); - $20 = tempRet0; - $21 = $19&255; - $22 = (($dst) + 5|0); - HEAP8[$22>>0] = $21; - $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); - $24 = tempRet0; - $25 = $23&255; - $26 = (($dst) + 6|0); - HEAP8[$26>>0] = $25; - $27 = $0&255; - $28 = (($dst) + 7|0); - HEAP8[$28>>0] = $27; - STACKTOP = sp;return; -} -function _sph_enc64be($dst,$0,$1) { - $dst = $dst|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); - $3 = tempRet0; - $4 = $2&255; - HEAP8[$dst>>0] = $4; - $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); - $6 = tempRet0; - $7 = $5&255; - $8 = (($dst) + 1|0); - HEAP8[$8>>0] = $7; - $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); - $10 = tempRet0; - $11 = $9&255; - $12 = (($dst) + 2|0); - HEAP8[$12>>0] = $11; - $13 = $1&255; - $14 = (($dst) + 3|0); - HEAP8[$14>>0] = $13; - $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); - $16 = tempRet0; - $17 = $15&255; - $18 = (($dst) + 4|0); - HEAP8[$18>>0] = $17; - $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); - $20 = tempRet0; - $21 = $19&255; - $22 = (($dst) + 5|0); - HEAP8[$22>>0] = $21; - $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); - $24 = tempRet0; - $25 = $23&255; - $26 = (($dst) + 6|0); - HEAP8[$26>>0] = $25; - $27 = $0&255; - $28 = (($dst) + 7|0); - HEAP8[$28>>0] = $27; - STACKTOP = sp;return; -} -function _malloc($bytes) { - $bytes = $bytes|0; - var $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i23$i = 0, $$pre$i25 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i24$iZ2D = 0, $$pre$phi$i26Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phi59$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre105 = 0, $$pre58$i$i = 0, $$rsize$0$i = 0, $$rsize$3$i = 0, $$sum = 0, $$sum$i$i = 0, $$sum$i$i$i = 0, $$sum$i12$i = 0, $$sum$i13$i = 0; - var $$sum$i16$i = 0, $$sum$i19$i = 0, $$sum$i2338 = 0, $$sum$i32 = 0, $$sum$i39 = 0, $$sum1 = 0, $$sum1$i = 0, $$sum1$i$i = 0, $$sum1$i14$i = 0, $$sum1$i20$i = 0, $$sum1$i24 = 0, $$sum10 = 0, $$sum10$i = 0, $$sum10$i$i = 0, $$sum10$pre$i$i = 0, $$sum102$i = 0, $$sum103$i = 0, $$sum104$i = 0, $$sum105$i = 0, $$sum106$i = 0; - var $$sum107$i = 0, $$sum108$i = 0, $$sum109$i = 0, $$sum11$i = 0, $$sum11$i$i = 0, $$sum11$i22$i = 0, $$sum110$i = 0, $$sum111$i = 0, $$sum1112 = 0, $$sum112$i = 0, $$sum113$i = 0, $$sum114$i = 0, $$sum115$i = 0, $$sum12$i = 0, $$sum12$i$i = 0, $$sum13$i = 0, $$sum13$i$i = 0, $$sum14$i$i = 0, $$sum14$pre$i = 0, $$sum15$i = 0; - var $$sum15$i$i = 0, $$sum16$i = 0, $$sum16$i$i = 0, $$sum17$i = 0, $$sum17$i$i = 0, $$sum18$i = 0, $$sum1819$i$i = 0, $$sum2 = 0, $$sum2$i = 0, $$sum2$i$i = 0, $$sum2$i$i$i = 0, $$sum2$i15$i = 0, $$sum2$i17$i = 0, $$sum2$i21$i = 0, $$sum2$pre$i = 0, $$sum20$i$i = 0, $$sum21$i$i = 0, $$sum22$i$i = 0, $$sum23$i$i = 0, $$sum24$i$i = 0; - var $$sum25$i$i = 0, $$sum26$pre$i$i = 0, $$sum27$i$i = 0, $$sum28$i$i = 0, $$sum29$i$i = 0, $$sum3$i = 0, $$sum3$i$i = 0, $$sum3$i27 = 0, $$sum30$i$i = 0, $$sum3132$i$i = 0, $$sum34$i$i = 0, $$sum3536$i$i = 0, $$sum3738$i$i = 0, $$sum39$i$i = 0, $$sum4 = 0, $$sum4$i = 0, $$sum4$i28 = 0, $$sum40$i$i = 0, $$sum41$i$i = 0, $$sum42$i$i = 0; - var $$sum5$i = 0, $$sum5$i$i = 0, $$sum56 = 0, $$sum6$i = 0, $$sum67$i$i = 0, $$sum7$i = 0, $$sum8$i = 0, $$sum8$pre = 0, $$sum9 = 0, $$sum9$i = 0, $$sum9$i$i = 0, $$tsize$1$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0; - var $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0; - var $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0; - var $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0; - var $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $108 = 0; - var $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0; - var $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0; - var $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0; - var $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0; - var $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0; - var $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0; - var $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0; - var $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0; - var $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0; - var $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0; - var $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0; - var $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0; - var $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0; - var $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0; - var $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0; - var $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0; - var $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0; - var $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0; - var $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0; - var $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0; - var $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0; - var $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0; - var $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0; - var $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0; - var $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0; - var $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0; - var $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0; - var $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0; - var $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0; - var $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0; - var $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0; - var $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0; - var $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0; - var $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0; - var $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0; - var $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0; - var $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0; - var $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0; - var $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0; - var $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0; - var $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0; - var $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0; - var $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0; - var $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0; - var $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0; - var $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0; - var $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0; - var $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0; - var $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0; - var $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0, $F5$0$i = 0, $I1$0$c$i$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$027$i = 0, $K2$015$i$i = 0, $K8$053$i$i = 0; - var $R$0$i = 0, $R$0$i$i = 0, $R$0$i18 = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i20 = 0, $RP$0$i = 0, $RP$0$i$i = 0, $RP$0$i17 = 0, $T$0$lcssa$i = 0, $T$0$lcssa$i$i = 0, $T$0$lcssa$i26$i = 0, $T$014$i$i = 0, $T$026$i = 0, $T$052$i$i = 0, $br$0$i = 0, $br$030$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i21 = 0; - var $exitcond$i$i = 0, $i$02$i$i = 0, $idx$0$i = 0, $mem$0 = 0, $nb$0 = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i$i = 0, $or$cond$i27$i = 0, $or$cond$i29 = 0, $or$cond1$i = 0, $or$cond19$i = 0, $or$cond2$i = 0, $or$cond24$i = 0, $or$cond3$i = 0, $or$cond4$i = 0, $or$cond47$i = 0, $or$cond5$i = 0, $or$cond6$i = 0, $or$cond8$i = 0; - var $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i15 = 0, $rsize$1$i = 0, $rsize$2$i = 0, $rsize$3$lcssa$i = 0, $rsize$331$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$073$i = 0, $sp$166$i = 0, $ssize$0$i = 0, $ssize$1$i = 0, $ssize$129$i = 0, $ssize$2$i = 0, $t$0$i = 0, $t$0$i14 = 0; - var $t$1$i = 0, $t$2$ph$i = 0, $t$2$v$3$i = 0, $t$230$i = 0, $tbase$245$i = 0, $tsize$03141$i = 0, $tsize$1$i = 0, $tsize$244$i = 0, $v$0$i = 0, $v$0$i16 = 0, $v$1$i = 0, $v$2$i = 0, $v$3$lcssa$i = 0, $v$332$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($bytes>>>0)<(245); - do { - if ($0) { - $1 = ($bytes>>>0)<(11); - if ($1) { - $5 = 16; - } else { - $2 = (($bytes) + 11)|0; - $3 = $2 & -8; - $5 = $3; - } - $4 = $5 >>> 3; - $6 = HEAP32[32544>>2]|0; - $7 = $6 >>> $4; - $8 = $7 & 3; - $9 = ($8|0)==(0); - if (!($9)) { - $10 = $7 & 1; - $11 = $10 ^ 1; - $12 = (($11) + ($4))|0; - $13 = $12 << 1; - $14 = ((32544 + ($13<<2)|0) + 40|0); - $$sum10 = (($13) + 2)|0; - $15 = ((32544 + ($$sum10<<2)|0) + 40|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($16) + 8|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($14|0)==($18|0); - do { - if ($19) { - $20 = 1 << $12; - $21 = $20 ^ -1; - $22 = $6 & $21; - HEAP32[32544>>2] = $22; - } else { - $23 = HEAP32[((32544 + 16|0))>>2]|0; - $24 = ($18>>>0)<($23>>>0); - if ($24) { - _abort(); - // unreachable; - } - $25 = (($18) + 12|0); - $26 = HEAP32[$25>>2]|0; - $27 = ($26|0)==($16|0); - if ($27) { - HEAP32[$25>>2] = $14; - HEAP32[$15>>2] = $18; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $28 = $12 << 3; - $29 = $28 | 3; - $30 = (($16) + 4|0); - HEAP32[$30>>2] = $29; - $$sum1112 = $28 | 4; - $31 = (($16) + ($$sum1112)|0); - $32 = HEAP32[$31>>2]|0; - $33 = $32 | 1; - HEAP32[$31>>2] = $33; - $mem$0 = $17; - STACKTOP = sp;return ($mem$0|0); - } - $34 = HEAP32[((32544 + 8|0))>>2]|0; - $35 = ($5>>>0)>($34>>>0); - if ($35) { - $36 = ($7|0)==(0); - if (!($36)) { - $37 = $7 << $4; - $38 = 2 << $4; - $39 = (0 - ($38))|0; - $40 = $38 | $39; - $41 = $37 & $40; - $42 = (0 - ($41))|0; - $43 = $41 & $42; - $44 = (($43) + -1)|0; - $45 = $44 >>> 12; - $46 = $45 & 16; - $47 = $44 >>> $46; - $48 = $47 >>> 5; - $49 = $48 & 8; - $50 = $49 | $46; - $51 = $47 >>> $49; - $52 = $51 >>> 2; - $53 = $52 & 4; - $54 = $50 | $53; - $55 = $51 >>> $53; - $56 = $55 >>> 1; - $57 = $56 & 2; - $58 = $54 | $57; - $59 = $55 >>> $57; - $60 = $59 >>> 1; - $61 = $60 & 1; - $62 = $58 | $61; - $63 = $59 >>> $61; - $64 = (($62) + ($63))|0; - $65 = $64 << 1; - $66 = ((32544 + ($65<<2)|0) + 40|0); - $$sum4 = (($65) + 2)|0; - $67 = ((32544 + ($$sum4<<2)|0) + 40|0); - $68 = HEAP32[$67>>2]|0; - $69 = (($68) + 8|0); - $70 = HEAP32[$69>>2]|0; - $71 = ($66|0)==($70|0); - do { - if ($71) { - $72 = 1 << $64; - $73 = $72 ^ -1; - $74 = $6 & $73; - HEAP32[32544>>2] = $74; - $88 = $34; - } else { - $75 = HEAP32[((32544 + 16|0))>>2]|0; - $76 = ($70>>>0)<($75>>>0); - if ($76) { - _abort(); - // unreachable; - } - $77 = (($70) + 12|0); - $78 = HEAP32[$77>>2]|0; - $79 = ($78|0)==($68|0); - if ($79) { - HEAP32[$77>>2] = $66; - HEAP32[$67>>2] = $70; - $$pre = HEAP32[((32544 + 8|0))>>2]|0; - $88 = $$pre; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $80 = $64 << 3; - $81 = (($80) - ($5))|0; - $82 = $5 | 3; - $83 = (($68) + 4|0); - HEAP32[$83>>2] = $82; - $84 = (($68) + ($5)|0); - $85 = $81 | 1; - $$sum56 = $5 | 4; - $86 = (($68) + ($$sum56)|0); - HEAP32[$86>>2] = $85; - $87 = (($68) + ($80)|0); - HEAP32[$87>>2] = $81; - $89 = ($88|0)==(0); - if (!($89)) { - $90 = HEAP32[((32544 + 20|0))>>2]|0; - $91 = $88 >>> 3; - $92 = $91 << 1; - $93 = ((32544 + ($92<<2)|0) + 40|0); - $94 = HEAP32[32544>>2]|0; - $95 = 1 << $91; - $96 = $94 & $95; - $97 = ($96|0)==(0); - if ($97) { - $98 = $94 | $95; - HEAP32[32544>>2] = $98; - $$sum8$pre = (($92) + 2)|0; - $$pre105 = ((32544 + ($$sum8$pre<<2)|0) + 40|0); - $$pre$phiZ2D = $$pre105;$F4$0 = $93; - } else { - $$sum9 = (($92) + 2)|0; - $99 = ((32544 + ($$sum9<<2)|0) + 40|0); - $100 = HEAP32[$99>>2]|0; - $101 = HEAP32[((32544 + 16|0))>>2]|0; - $102 = ($100>>>0)<($101>>>0); - if ($102) { - _abort(); - // unreachable; - } else { - $$pre$phiZ2D = $99;$F4$0 = $100; - } - } - HEAP32[$$pre$phiZ2D>>2] = $90; - $103 = (($F4$0) + 12|0); - HEAP32[$103>>2] = $90; - $104 = (($90) + 8|0); - HEAP32[$104>>2] = $F4$0; - $105 = (($90) + 12|0); - HEAP32[$105>>2] = $93; - } - HEAP32[((32544 + 8|0))>>2] = $81; - HEAP32[((32544 + 20|0))>>2] = $84; - $mem$0 = $69; - STACKTOP = sp;return ($mem$0|0); - } - $106 = HEAP32[((32544 + 4|0))>>2]|0; - $107 = ($106|0)==(0); - if ($107) { - $nb$0 = $5; - } else { - $108 = (0 - ($106))|0; - $109 = $106 & $108; - $110 = (($109) + -1)|0; - $111 = $110 >>> 12; - $112 = $111 & 16; - $113 = $110 >>> $112; - $114 = $113 >>> 5; - $115 = $114 & 8; - $116 = $115 | $112; - $117 = $113 >>> $115; - $118 = $117 >>> 2; - $119 = $118 & 4; - $120 = $116 | $119; - $121 = $117 >>> $119; - $122 = $121 >>> 1; - $123 = $122 & 2; - $124 = $120 | $123; - $125 = $121 >>> $123; - $126 = $125 >>> 1; - $127 = $126 & 1; - $128 = $124 | $127; - $129 = $125 >>> $127; - $130 = (($128) + ($129))|0; - $131 = ((32544 + ($130<<2)|0) + 304|0); - $132 = HEAP32[$131>>2]|0; - $133 = (($132) + 4|0); - $134 = HEAP32[$133>>2]|0; - $135 = $134 & -8; - $136 = (($135) - ($5))|0; - $rsize$0$i = $136;$t$0$i = $132;$v$0$i = $132; - while(1) { - $137 = (($t$0$i) + 16|0); - $138 = HEAP32[$137>>2]|0; - $139 = ($138|0)==(0|0); - if ($139) { - $140 = (($t$0$i) + 20|0); - $141 = HEAP32[$140>>2]|0; - $142 = ($141|0)==(0|0); - if ($142) { - break; - } else { - $144 = $141; - } - } else { - $144 = $138; - } - $143 = (($144) + 4|0); - $145 = HEAP32[$143>>2]|0; - $146 = $145 & -8; - $147 = (($146) - ($5))|0; - $148 = ($147>>>0)<($rsize$0$i>>>0); - $$rsize$0$i = $148 ? $147 : $rsize$0$i; - $$v$0$i = $148 ? $144 : $v$0$i; - $rsize$0$i = $$rsize$0$i;$t$0$i = $144;$v$0$i = $$v$0$i; - } - $149 = HEAP32[((32544 + 16|0))>>2]|0; - $150 = ($v$0$i>>>0)<($149>>>0); - if ($150) { - _abort(); - // unreachable; - } - $151 = (($v$0$i) + ($5)|0); - $152 = ($v$0$i>>>0)<($151>>>0); - if (!($152)) { - _abort(); - // unreachable; - } - $153 = (($v$0$i) + 24|0); - $154 = HEAP32[$153>>2]|0; - $155 = (($v$0$i) + 12|0); - $156 = HEAP32[$155>>2]|0; - $157 = ($156|0)==($v$0$i|0); - do { - if ($157) { - $167 = (($v$0$i) + 20|0); - $168 = HEAP32[$167>>2]|0; - $169 = ($168|0)==(0|0); - if ($169) { - $170 = (($v$0$i) + 16|0); - $171 = HEAP32[$170>>2]|0; - $172 = ($171|0)==(0|0); - if ($172) { - $R$1$i = 0; - break; - } else { - $R$0$i = $171;$RP$0$i = $170; - } - } else { - $R$0$i = $168;$RP$0$i = $167; - } - while(1) { - $173 = (($R$0$i) + 20|0); - $174 = HEAP32[$173>>2]|0; - $175 = ($174|0)==(0|0); - if (!($175)) { - $R$0$i = $174;$RP$0$i = $173; - continue; - } - $176 = (($R$0$i) + 16|0); - $177 = HEAP32[$176>>2]|0; - $178 = ($177|0)==(0|0); - if ($178) { - break; - } else { - $R$0$i = $177;$RP$0$i = $176; - } - } - $179 = ($RP$0$i>>>0)<($149>>>0); - if ($179) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i>>2] = 0; - $R$1$i = $R$0$i; - break; - } - } else { - $158 = (($v$0$i) + 8|0); - $159 = HEAP32[$158>>2]|0; - $160 = ($159>>>0)<($149>>>0); - if ($160) { - _abort(); - // unreachable; - } - $161 = (($159) + 12|0); - $162 = HEAP32[$161>>2]|0; - $163 = ($162|0)==($v$0$i|0); - if (!($163)) { - _abort(); - // unreachable; - } - $164 = (($156) + 8|0); - $165 = HEAP32[$164>>2]|0; - $166 = ($165|0)==($v$0$i|0); - if ($166) { - HEAP32[$161>>2] = $156; - HEAP32[$164>>2] = $159; - $R$1$i = $156; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $180 = ($154|0)==(0|0); - do { - if (!($180)) { - $181 = (($v$0$i) + 28|0); - $182 = HEAP32[$181>>2]|0; - $183 = ((32544 + ($182<<2)|0) + 304|0); - $184 = HEAP32[$183>>2]|0; - $185 = ($v$0$i|0)==($184|0); - if ($185) { - HEAP32[$183>>2] = $R$1$i; - $cond$i = ($R$1$i|0)==(0|0); - if ($cond$i) { - $186 = 1 << $182; - $187 = $186 ^ -1; - $188 = HEAP32[((32544 + 4|0))>>2]|0; - $189 = $188 & $187; - HEAP32[((32544 + 4|0))>>2] = $189; - break; - } - } else { - $190 = HEAP32[((32544 + 16|0))>>2]|0; - $191 = ($154>>>0)<($190>>>0); - if ($191) { - _abort(); - // unreachable; - } - $192 = (($154) + 16|0); - $193 = HEAP32[$192>>2]|0; - $194 = ($193|0)==($v$0$i|0); - if ($194) { - HEAP32[$192>>2] = $R$1$i; - } else { - $195 = (($154) + 20|0); - HEAP32[$195>>2] = $R$1$i; - } - $196 = ($R$1$i|0)==(0|0); - if ($196) { - break; - } - } - $197 = HEAP32[((32544 + 16|0))>>2]|0; - $198 = ($R$1$i>>>0)<($197>>>0); - if ($198) { - _abort(); - // unreachable; - } - $199 = (($R$1$i) + 24|0); - HEAP32[$199>>2] = $154; - $200 = (($v$0$i) + 16|0); - $201 = HEAP32[$200>>2]|0; - $202 = ($201|0)==(0|0); - do { - if (!($202)) { - $203 = ($201>>>0)<($197>>>0); - if ($203) { - _abort(); - // unreachable; - } else { - $204 = (($R$1$i) + 16|0); - HEAP32[$204>>2] = $201; - $205 = (($201) + 24|0); - HEAP32[$205>>2] = $R$1$i; - break; - } - } - } while(0); - $206 = (($v$0$i) + 20|0); - $207 = HEAP32[$206>>2]|0; - $208 = ($207|0)==(0|0); - if (!($208)) { - $209 = HEAP32[((32544 + 16|0))>>2]|0; - $210 = ($207>>>0)<($209>>>0); - if ($210) { - _abort(); - // unreachable; - } else { - $211 = (($R$1$i) + 20|0); - HEAP32[$211>>2] = $207; - $212 = (($207) + 24|0); - HEAP32[$212>>2] = $R$1$i; - break; - } - } - } - } while(0); - $213 = ($rsize$0$i>>>0)<(16); - if ($213) { - $214 = (($rsize$0$i) + ($5))|0; - $215 = $214 | 3; - $216 = (($v$0$i) + 4|0); - HEAP32[$216>>2] = $215; - $$sum4$i = (($214) + 4)|0; - $217 = (($v$0$i) + ($$sum4$i)|0); - $218 = HEAP32[$217>>2]|0; - $219 = $218 | 1; - HEAP32[$217>>2] = $219; - } else { - $220 = $5 | 3; - $221 = (($v$0$i) + 4|0); - HEAP32[$221>>2] = $220; - $222 = $rsize$0$i | 1; - $$sum$i39 = $5 | 4; - $223 = (($v$0$i) + ($$sum$i39)|0); - HEAP32[$223>>2] = $222; - $$sum1$i = (($rsize$0$i) + ($5))|0; - $224 = (($v$0$i) + ($$sum1$i)|0); - HEAP32[$224>>2] = $rsize$0$i; - $225 = HEAP32[((32544 + 8|0))>>2]|0; - $226 = ($225|0)==(0); - if (!($226)) { - $227 = HEAP32[((32544 + 20|0))>>2]|0; - $228 = $225 >>> 3; - $229 = $228 << 1; - $230 = ((32544 + ($229<<2)|0) + 40|0); - $231 = HEAP32[32544>>2]|0; - $232 = 1 << $228; - $233 = $231 & $232; - $234 = ($233|0)==(0); - if ($234) { - $235 = $231 | $232; - HEAP32[32544>>2] = $235; - $$sum2$pre$i = (($229) + 2)|0; - $$pre$i = ((32544 + ($$sum2$pre$i<<2)|0) + 40|0); - $$pre$phi$iZ2D = $$pre$i;$F1$0$i = $230; - } else { - $$sum3$i = (($229) + 2)|0; - $236 = ((32544 + ($$sum3$i<<2)|0) + 40|0); - $237 = HEAP32[$236>>2]|0; - $238 = HEAP32[((32544 + 16|0))>>2]|0; - $239 = ($237>>>0)<($238>>>0); - if ($239) { - _abort(); - // unreachable; - } else { - $$pre$phi$iZ2D = $236;$F1$0$i = $237; - } - } - HEAP32[$$pre$phi$iZ2D>>2] = $227; - $240 = (($F1$0$i) + 12|0); - HEAP32[$240>>2] = $227; - $241 = (($227) + 8|0); - HEAP32[$241>>2] = $F1$0$i; - $242 = (($227) + 12|0); - HEAP32[$242>>2] = $230; - } - HEAP32[((32544 + 8|0))>>2] = $rsize$0$i; - HEAP32[((32544 + 20|0))>>2] = $151; - } - $243 = (($v$0$i) + 8|0); - $mem$0 = $243; - STACKTOP = sp;return ($mem$0|0); - } - } else { - $nb$0 = $5; - } - } else { - $244 = ($bytes>>>0)>(4294967231); - if ($244) { - $nb$0 = -1; - } else { - $245 = (($bytes) + 11)|0; - $246 = $245 & -8; - $247 = HEAP32[((32544 + 4|0))>>2]|0; - $248 = ($247|0)==(0); - if ($248) { - $nb$0 = $246; - } else { - $249 = (0 - ($246))|0; - $250 = $245 >>> 8; - $251 = ($250|0)==(0); - if ($251) { - $idx$0$i = 0; - } else { - $252 = ($246>>>0)>(16777215); - if ($252) { - $idx$0$i = 31; - } else { - $253 = (($250) + 1048320)|0; - $254 = $253 >>> 16; - $255 = $254 & 8; - $256 = $250 << $255; - $257 = (($256) + 520192)|0; - $258 = $257 >>> 16; - $259 = $258 & 4; - $260 = $259 | $255; - $261 = $256 << $259; - $262 = (($261) + 245760)|0; - $263 = $262 >>> 16; - $264 = $263 & 2; - $265 = $260 | $264; - $266 = (14 - ($265))|0; - $267 = $261 << $264; - $268 = $267 >>> 15; - $269 = (($266) + ($268))|0; - $270 = $269 << 1; - $271 = (($269) + 7)|0; - $272 = $246 >>> $271; - $273 = $272 & 1; - $274 = $273 | $270; - $idx$0$i = $274; - } - } - $275 = ((32544 + ($idx$0$i<<2)|0) + 304|0); - $276 = HEAP32[$275>>2]|0; - $277 = ($276|0)==(0|0); - L126: do { - if ($277) { - $rsize$2$i = $249;$t$1$i = 0;$v$2$i = 0; - } else { - $278 = ($idx$0$i|0)==(31); - if ($278) { - $282 = 0; - } else { - $279 = $idx$0$i >>> 1; - $280 = (25 - ($279))|0; - $282 = $280; - } - $281 = $246 << $282; - $rsize$0$i15 = $249;$rst$0$i = 0;$sizebits$0$i = $281;$t$0$i14 = $276;$v$0$i16 = 0; - while(1) { - $283 = (($t$0$i14) + 4|0); - $284 = HEAP32[$283>>2]|0; - $285 = $284 & -8; - $286 = (($285) - ($246))|0; - $287 = ($286>>>0)<($rsize$0$i15>>>0); - if ($287) { - $288 = ($285|0)==($246|0); - if ($288) { - $rsize$2$i = $286;$t$1$i = $t$0$i14;$v$2$i = $t$0$i14; - break L126; - } else { - $rsize$1$i = $286;$v$1$i = $t$0$i14; - } - } else { - $rsize$1$i = $rsize$0$i15;$v$1$i = $v$0$i16; - } - $289 = (($t$0$i14) + 20|0); - $290 = HEAP32[$289>>2]|0; - $291 = $sizebits$0$i >>> 31; - $292 = ((($t$0$i14) + ($291<<2)|0) + 16|0); - $293 = HEAP32[$292>>2]|0; - $294 = ($290|0)==(0|0); - $295 = ($290|0)==($293|0); - $or$cond19$i = $294 | $295; - $rst$1$i = $or$cond19$i ? $rst$0$i : $290; - $296 = ($293|0)==(0|0); - $297 = $sizebits$0$i << 1; - if ($296) { - $rsize$2$i = $rsize$1$i;$t$1$i = $rst$1$i;$v$2$i = $v$1$i; - break; - } else { - $rsize$0$i15 = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $297;$t$0$i14 = $293;$v$0$i16 = $v$1$i; - } - } - } - } while(0); - $298 = ($t$1$i|0)==(0|0); - $299 = ($v$2$i|0)==(0|0); - $or$cond$i = $298 & $299; - if ($or$cond$i) { - $300 = 2 << $idx$0$i; - $301 = (0 - ($300))|0; - $302 = $300 | $301; - $303 = $247 & $302; - $304 = ($303|0)==(0); - if ($304) { - $nb$0 = $246; - break; - } - $305 = (0 - ($303))|0; - $306 = $303 & $305; - $307 = (($306) + -1)|0; - $308 = $307 >>> 12; - $309 = $308 & 16; - $310 = $307 >>> $309; - $311 = $310 >>> 5; - $312 = $311 & 8; - $313 = $312 | $309; - $314 = $310 >>> $312; - $315 = $314 >>> 2; - $316 = $315 & 4; - $317 = $313 | $316; - $318 = $314 >>> $316; - $319 = $318 >>> 1; - $320 = $319 & 2; - $321 = $317 | $320; - $322 = $318 >>> $320; - $323 = $322 >>> 1; - $324 = $323 & 1; - $325 = $321 | $324; - $326 = $322 >>> $324; - $327 = (($325) + ($326))|0; - $328 = ((32544 + ($327<<2)|0) + 304|0); - $329 = HEAP32[$328>>2]|0; - $t$2$ph$i = $329; - } else { - $t$2$ph$i = $t$1$i; - } - $330 = ($t$2$ph$i|0)==(0|0); - if ($330) { - $rsize$3$lcssa$i = $rsize$2$i;$v$3$lcssa$i = $v$2$i; - } else { - $rsize$331$i = $rsize$2$i;$t$230$i = $t$2$ph$i;$v$332$i = $v$2$i; - while(1) { - $331 = (($t$230$i) + 4|0); - $332 = HEAP32[$331>>2]|0; - $333 = $332 & -8; - $334 = (($333) - ($246))|0; - $335 = ($334>>>0)<($rsize$331$i>>>0); - $$rsize$3$i = $335 ? $334 : $rsize$331$i; - $t$2$v$3$i = $335 ? $t$230$i : $v$332$i; - $336 = (($t$230$i) + 16|0); - $337 = HEAP32[$336>>2]|0; - $338 = ($337|0)==(0|0); - if (!($338)) { - $rsize$331$i = $$rsize$3$i;$t$230$i = $337;$v$332$i = $t$2$v$3$i; - continue; - } - $339 = (($t$230$i) + 20|0); - $340 = HEAP32[$339>>2]|0; - $341 = ($340|0)==(0|0); - if ($341) { - $rsize$3$lcssa$i = $$rsize$3$i;$v$3$lcssa$i = $t$2$v$3$i; - break; - } else { - $rsize$331$i = $$rsize$3$i;$t$230$i = $340;$v$332$i = $t$2$v$3$i; - } - } - } - $342 = ($v$3$lcssa$i|0)==(0|0); - if ($342) { - $nb$0 = $246; - } else { - $343 = HEAP32[((32544 + 8|0))>>2]|0; - $344 = (($343) - ($246))|0; - $345 = ($rsize$3$lcssa$i>>>0)<($344>>>0); - if ($345) { - $346 = HEAP32[((32544 + 16|0))>>2]|0; - $347 = ($v$3$lcssa$i>>>0)<($346>>>0); - if ($347) { - _abort(); - // unreachable; - } - $348 = (($v$3$lcssa$i) + ($246)|0); - $349 = ($v$3$lcssa$i>>>0)<($348>>>0); - if (!($349)) { - _abort(); - // unreachable; - } - $350 = (($v$3$lcssa$i) + 24|0); - $351 = HEAP32[$350>>2]|0; - $352 = (($v$3$lcssa$i) + 12|0); - $353 = HEAP32[$352>>2]|0; - $354 = ($353|0)==($v$3$lcssa$i|0); - do { - if ($354) { - $364 = (($v$3$lcssa$i) + 20|0); - $365 = HEAP32[$364>>2]|0; - $366 = ($365|0)==(0|0); - if ($366) { - $367 = (($v$3$lcssa$i) + 16|0); - $368 = HEAP32[$367>>2]|0; - $369 = ($368|0)==(0|0); - if ($369) { - $R$1$i20 = 0; - break; - } else { - $R$0$i18 = $368;$RP$0$i17 = $367; - } - } else { - $R$0$i18 = $365;$RP$0$i17 = $364; - } - while(1) { - $370 = (($R$0$i18) + 20|0); - $371 = HEAP32[$370>>2]|0; - $372 = ($371|0)==(0|0); - if (!($372)) { - $R$0$i18 = $371;$RP$0$i17 = $370; - continue; - } - $373 = (($R$0$i18) + 16|0); - $374 = HEAP32[$373>>2]|0; - $375 = ($374|0)==(0|0); - if ($375) { - break; - } else { - $R$0$i18 = $374;$RP$0$i17 = $373; - } - } - $376 = ($RP$0$i17>>>0)<($346>>>0); - if ($376) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i17>>2] = 0; - $R$1$i20 = $R$0$i18; - break; - } - } else { - $355 = (($v$3$lcssa$i) + 8|0); - $356 = HEAP32[$355>>2]|0; - $357 = ($356>>>0)<($346>>>0); - if ($357) { - _abort(); - // unreachable; - } - $358 = (($356) + 12|0); - $359 = HEAP32[$358>>2]|0; - $360 = ($359|0)==($v$3$lcssa$i|0); - if (!($360)) { - _abort(); - // unreachable; - } - $361 = (($353) + 8|0); - $362 = HEAP32[$361>>2]|0; - $363 = ($362|0)==($v$3$lcssa$i|0); - if ($363) { - HEAP32[$358>>2] = $353; - HEAP32[$361>>2] = $356; - $R$1$i20 = $353; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $377 = ($351|0)==(0|0); - do { - if (!($377)) { - $378 = (($v$3$lcssa$i) + 28|0); - $379 = HEAP32[$378>>2]|0; - $380 = ((32544 + ($379<<2)|0) + 304|0); - $381 = HEAP32[$380>>2]|0; - $382 = ($v$3$lcssa$i|0)==($381|0); - if ($382) { - HEAP32[$380>>2] = $R$1$i20; - $cond$i21 = ($R$1$i20|0)==(0|0); - if ($cond$i21) { - $383 = 1 << $379; - $384 = $383 ^ -1; - $385 = HEAP32[((32544 + 4|0))>>2]|0; - $386 = $385 & $384; - HEAP32[((32544 + 4|0))>>2] = $386; - break; - } - } else { - $387 = HEAP32[((32544 + 16|0))>>2]|0; - $388 = ($351>>>0)<($387>>>0); - if ($388) { - _abort(); - // unreachable; - } - $389 = (($351) + 16|0); - $390 = HEAP32[$389>>2]|0; - $391 = ($390|0)==($v$3$lcssa$i|0); - if ($391) { - HEAP32[$389>>2] = $R$1$i20; - } else { - $392 = (($351) + 20|0); - HEAP32[$392>>2] = $R$1$i20; - } - $393 = ($R$1$i20|0)==(0|0); - if ($393) { - break; - } - } - $394 = HEAP32[((32544 + 16|0))>>2]|0; - $395 = ($R$1$i20>>>0)<($394>>>0); - if ($395) { - _abort(); - // unreachable; - } - $396 = (($R$1$i20) + 24|0); - HEAP32[$396>>2] = $351; - $397 = (($v$3$lcssa$i) + 16|0); - $398 = HEAP32[$397>>2]|0; - $399 = ($398|0)==(0|0); - do { - if (!($399)) { - $400 = ($398>>>0)<($394>>>0); - if ($400) { - _abort(); - // unreachable; - } else { - $401 = (($R$1$i20) + 16|0); - HEAP32[$401>>2] = $398; - $402 = (($398) + 24|0); - HEAP32[$402>>2] = $R$1$i20; - break; - } - } - } while(0); - $403 = (($v$3$lcssa$i) + 20|0); - $404 = HEAP32[$403>>2]|0; - $405 = ($404|0)==(0|0); - if (!($405)) { - $406 = HEAP32[((32544 + 16|0))>>2]|0; - $407 = ($404>>>0)<($406>>>0); - if ($407) { - _abort(); - // unreachable; - } else { - $408 = (($R$1$i20) + 20|0); - HEAP32[$408>>2] = $404; - $409 = (($404) + 24|0); - HEAP32[$409>>2] = $R$1$i20; - break; - } - } - } - } while(0); - $410 = ($rsize$3$lcssa$i>>>0)<(16); - L204: do { - if ($410) { - $411 = (($rsize$3$lcssa$i) + ($246))|0; - $412 = $411 | 3; - $413 = (($v$3$lcssa$i) + 4|0); - HEAP32[$413>>2] = $412; - $$sum18$i = (($411) + 4)|0; - $414 = (($v$3$lcssa$i) + ($$sum18$i)|0); - $415 = HEAP32[$414>>2]|0; - $416 = $415 | 1; - HEAP32[$414>>2] = $416; - } else { - $417 = $246 | 3; - $418 = (($v$3$lcssa$i) + 4|0); - HEAP32[$418>>2] = $417; - $419 = $rsize$3$lcssa$i | 1; - $$sum$i2338 = $246 | 4; - $420 = (($v$3$lcssa$i) + ($$sum$i2338)|0); - HEAP32[$420>>2] = $419; - $$sum1$i24 = (($rsize$3$lcssa$i) + ($246))|0; - $421 = (($v$3$lcssa$i) + ($$sum1$i24)|0); - HEAP32[$421>>2] = $rsize$3$lcssa$i; - $422 = $rsize$3$lcssa$i >>> 3; - $423 = ($rsize$3$lcssa$i>>>0)<(256); - if ($423) { - $424 = $422 << 1; - $425 = ((32544 + ($424<<2)|0) + 40|0); - $426 = HEAP32[32544>>2]|0; - $427 = 1 << $422; - $428 = $426 & $427; - $429 = ($428|0)==(0); - do { - if ($429) { - $430 = $426 | $427; - HEAP32[32544>>2] = $430; - $$sum14$pre$i = (($424) + 2)|0; - $$pre$i25 = ((32544 + ($$sum14$pre$i<<2)|0) + 40|0); - $$pre$phi$i26Z2D = $$pre$i25;$F5$0$i = $425; - } else { - $$sum17$i = (($424) + 2)|0; - $431 = ((32544 + ($$sum17$i<<2)|0) + 40|0); - $432 = HEAP32[$431>>2]|0; - $433 = HEAP32[((32544 + 16|0))>>2]|0; - $434 = ($432>>>0)<($433>>>0); - if (!($434)) { - $$pre$phi$i26Z2D = $431;$F5$0$i = $432; - break; - } - _abort(); - // unreachable; - } - } while(0); - HEAP32[$$pre$phi$i26Z2D>>2] = $348; - $435 = (($F5$0$i) + 12|0); - HEAP32[$435>>2] = $348; - $$sum15$i = (($246) + 8)|0; - $436 = (($v$3$lcssa$i) + ($$sum15$i)|0); - HEAP32[$436>>2] = $F5$0$i; - $$sum16$i = (($246) + 12)|0; - $437 = (($v$3$lcssa$i) + ($$sum16$i)|0); - HEAP32[$437>>2] = $425; - break; - } - $438 = $rsize$3$lcssa$i >>> 8; - $439 = ($438|0)==(0); - if ($439) { - $I7$0$i = 0; - } else { - $440 = ($rsize$3$lcssa$i>>>0)>(16777215); - if ($440) { - $I7$0$i = 31; - } else { - $441 = (($438) + 1048320)|0; - $442 = $441 >>> 16; - $443 = $442 & 8; - $444 = $438 << $443; - $445 = (($444) + 520192)|0; - $446 = $445 >>> 16; - $447 = $446 & 4; - $448 = $447 | $443; - $449 = $444 << $447; - $450 = (($449) + 245760)|0; - $451 = $450 >>> 16; - $452 = $451 & 2; - $453 = $448 | $452; - $454 = (14 - ($453))|0; - $455 = $449 << $452; - $456 = $455 >>> 15; - $457 = (($454) + ($456))|0; - $458 = $457 << 1; - $459 = (($457) + 7)|0; - $460 = $rsize$3$lcssa$i >>> $459; - $461 = $460 & 1; - $462 = $461 | $458; - $I7$0$i = $462; - } - } - $463 = ((32544 + ($I7$0$i<<2)|0) + 304|0); - $$sum2$i = (($246) + 28)|0; - $464 = (($v$3$lcssa$i) + ($$sum2$i)|0); - HEAP32[$464>>2] = $I7$0$i; - $$sum3$i27 = (($246) + 16)|0; - $465 = (($v$3$lcssa$i) + ($$sum3$i27)|0); - $$sum4$i28 = (($246) + 20)|0; - $466 = (($v$3$lcssa$i) + ($$sum4$i28)|0); - HEAP32[$466>>2] = 0; - HEAP32[$465>>2] = 0; - $467 = HEAP32[((32544 + 4|0))>>2]|0; - $468 = 1 << $I7$0$i; - $469 = $467 & $468; - $470 = ($469|0)==(0); - if ($470) { - $471 = $467 | $468; - HEAP32[((32544 + 4|0))>>2] = $471; - HEAP32[$463>>2] = $348; - $$sum5$i = (($246) + 24)|0; - $472 = (($v$3$lcssa$i) + ($$sum5$i)|0); - HEAP32[$472>>2] = $463; - $$sum6$i = (($246) + 12)|0; - $473 = (($v$3$lcssa$i) + ($$sum6$i)|0); - HEAP32[$473>>2] = $348; - $$sum7$i = (($246) + 8)|0; - $474 = (($v$3$lcssa$i) + ($$sum7$i)|0); - HEAP32[$474>>2] = $348; - break; - } - $475 = HEAP32[$463>>2]|0; - $476 = ($I7$0$i|0)==(31); - if ($476) { - $484 = 0; - } else { - $477 = $I7$0$i >>> 1; - $478 = (25 - ($477))|0; - $484 = $478; - } - $479 = (($475) + 4|0); - $480 = HEAP32[$479>>2]|0; - $481 = $480 & -8; - $482 = ($481|0)==($rsize$3$lcssa$i|0); - L225: do { - if ($482) { - $T$0$lcssa$i = $475; - } else { - $483 = $rsize$3$lcssa$i << $484; - $K12$027$i = $483;$T$026$i = $475; - while(1) { - $491 = $K12$027$i >>> 31; - $492 = ((($T$026$i) + ($491<<2)|0) + 16|0); - $487 = HEAP32[$492>>2]|0; - $493 = ($487|0)==(0|0); - if ($493) { - break; - } - $485 = $K12$027$i << 1; - $486 = (($487) + 4|0); - $488 = HEAP32[$486>>2]|0; - $489 = $488 & -8; - $490 = ($489|0)==($rsize$3$lcssa$i|0); - if ($490) { - $T$0$lcssa$i = $487; - break L225; - } else { - $K12$027$i = $485;$T$026$i = $487; - } - } - $494 = HEAP32[((32544 + 16|0))>>2]|0; - $495 = ($492>>>0)<($494>>>0); - if ($495) { - _abort(); - // unreachable; - } else { - HEAP32[$492>>2] = $348; - $$sum11$i = (($246) + 24)|0; - $496 = (($v$3$lcssa$i) + ($$sum11$i)|0); - HEAP32[$496>>2] = $T$026$i; - $$sum12$i = (($246) + 12)|0; - $497 = (($v$3$lcssa$i) + ($$sum12$i)|0); - HEAP32[$497>>2] = $348; - $$sum13$i = (($246) + 8)|0; - $498 = (($v$3$lcssa$i) + ($$sum13$i)|0); - HEAP32[$498>>2] = $348; - break L204; - } - } - } while(0); - $499 = (($T$0$lcssa$i) + 8|0); - $500 = HEAP32[$499>>2]|0; - $501 = HEAP32[((32544 + 16|0))>>2]|0; - $502 = ($T$0$lcssa$i>>>0)>=($501>>>0); - $503 = ($500>>>0)>=($501>>>0); - $or$cond24$i = $502 & $503; - if ($or$cond24$i) { - $504 = (($500) + 12|0); - HEAP32[$504>>2] = $348; - HEAP32[$499>>2] = $348; - $$sum8$i = (($246) + 8)|0; - $505 = (($v$3$lcssa$i) + ($$sum8$i)|0); - HEAP32[$505>>2] = $500; - $$sum9$i = (($246) + 12)|0; - $506 = (($v$3$lcssa$i) + ($$sum9$i)|0); - HEAP32[$506>>2] = $T$0$lcssa$i; - $$sum10$i = (($246) + 24)|0; - $507 = (($v$3$lcssa$i) + ($$sum10$i)|0); - HEAP32[$507>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $508 = (($v$3$lcssa$i) + 8|0); - $mem$0 = $508; - STACKTOP = sp;return ($mem$0|0); - } else { - $nb$0 = $246; - } - } - } - } - } - } while(0); - $509 = HEAP32[((32544 + 8|0))>>2]|0; - $510 = ($509>>>0)<($nb$0>>>0); - if (!($510)) { - $511 = (($509) - ($nb$0))|0; - $512 = HEAP32[((32544 + 20|0))>>2]|0; - $513 = ($511>>>0)>(15); - if ($513) { - $514 = (($512) + ($nb$0)|0); - HEAP32[((32544 + 20|0))>>2] = $514; - HEAP32[((32544 + 8|0))>>2] = $511; - $515 = $511 | 1; - $$sum2 = (($nb$0) + 4)|0; - $516 = (($512) + ($$sum2)|0); - HEAP32[$516>>2] = $515; - $517 = (($512) + ($509)|0); - HEAP32[$517>>2] = $511; - $518 = $nb$0 | 3; - $519 = (($512) + 4|0); - HEAP32[$519>>2] = $518; - } else { - HEAP32[((32544 + 8|0))>>2] = 0; - HEAP32[((32544 + 20|0))>>2] = 0; - $520 = $509 | 3; - $521 = (($512) + 4|0); - HEAP32[$521>>2] = $520; - $$sum1 = (($509) + 4)|0; - $522 = (($512) + ($$sum1)|0); - $523 = HEAP32[$522>>2]|0; - $524 = $523 | 1; - HEAP32[$522>>2] = $524; - } - $525 = (($512) + 8|0); - $mem$0 = $525; - STACKTOP = sp;return ($mem$0|0); - } - $526 = HEAP32[((32544 + 12|0))>>2]|0; - $527 = ($526>>>0)>($nb$0>>>0); - if ($527) { - $528 = (($526) - ($nb$0))|0; - HEAP32[((32544 + 12|0))>>2] = $528; - $529 = HEAP32[((32544 + 24|0))>>2]|0; - $530 = (($529) + ($nb$0)|0); - HEAP32[((32544 + 24|0))>>2] = $530; - $531 = $528 | 1; - $$sum = (($nb$0) + 4)|0; - $532 = (($529) + ($$sum)|0); - HEAP32[$532>>2] = $531; - $533 = $nb$0 | 3; - $534 = (($529) + 4|0); - HEAP32[$534>>2] = $533; - $535 = (($529) + 8|0); - $mem$0 = $535; - STACKTOP = sp;return ($mem$0|0); - } - $536 = HEAP32[33016>>2]|0; - $537 = ($536|0)==(0); - do { - if ($537) { - $538 = (_sysconf(30)|0); - $539 = (($538) + -1)|0; - $540 = $539 & $538; - $541 = ($540|0)==(0); - if ($541) { - HEAP32[((33016 + 8|0))>>2] = $538; - HEAP32[((33016 + 4|0))>>2] = $538; - HEAP32[((33016 + 12|0))>>2] = -1; - HEAP32[((33016 + 16|0))>>2] = -1; - HEAP32[((33016 + 20|0))>>2] = 0; - HEAP32[((32544 + 444|0))>>2] = 0; - $542 = (_time((0|0))|0); - $543 = $542 & -16; - $544 = $543 ^ 1431655768; - HEAP32[33016>>2] = $544; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $545 = (($nb$0) + 48)|0; - $546 = HEAP32[((33016 + 8|0))>>2]|0; - $547 = (($nb$0) + 47)|0; - $548 = (($546) + ($547))|0; - $549 = (0 - ($546))|0; - $550 = $548 & $549; - $551 = ($550>>>0)>($nb$0>>>0); - if (!($551)) { - $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); - } - $552 = HEAP32[((32544 + 440|0))>>2]|0; - $553 = ($552|0)==(0); - if (!($553)) { - $554 = HEAP32[((32544 + 432|0))>>2]|0; - $555 = (($554) + ($550))|0; - $556 = ($555>>>0)<=($554>>>0); - $557 = ($555>>>0)>($552>>>0); - $or$cond1$i = $556 | $557; - if ($or$cond1$i) { - $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); - } - } - $558 = HEAP32[((32544 + 444|0))>>2]|0; - $559 = $558 & 4; - $560 = ($559|0)==(0); - L266: do { - if ($560) { - $561 = HEAP32[((32544 + 24|0))>>2]|0; - $562 = ($561|0)==(0|0); - L268: do { - if ($562) { - label = 181; - } else { - $sp$0$i$i = ((32544 + 448|0)); - while(1) { - $563 = HEAP32[$sp$0$i$i>>2]|0; - $564 = ($563>>>0)>($561>>>0); - if (!($564)) { - $565 = (($sp$0$i$i) + 4|0); - $566 = HEAP32[$565>>2]|0; - $567 = (($563) + ($566)|0); - $568 = ($567>>>0)>($561>>>0); - if ($568) { - break; - } - } - $569 = (($sp$0$i$i) + 8|0); - $570 = HEAP32[$569>>2]|0; - $571 = ($570|0)==(0|0); - if ($571) { - label = 181; - break L268; - } else { - $sp$0$i$i = $570; - } - } - $572 = ($sp$0$i$i|0)==(0|0); - if ($572) { - label = 181; - } else { - $595 = HEAP32[((32544 + 12|0))>>2]|0; - $596 = (($548) - ($595))|0; - $597 = $596 & $549; - $598 = ($597>>>0)<(2147483647); - if ($598) { - $599 = (_sbrk(($597|0))|0); - $600 = HEAP32[$sp$0$i$i>>2]|0; - $601 = HEAP32[$565>>2]|0; - $602 = (($600) + ($601)|0); - $603 = ($599|0)==($602|0); - if ($603) { - $br$0$i = $599;$ssize$1$i = $597; - label = 190; - } else { - $br$030$i = $599;$ssize$129$i = $597; - label = 191; - } - } else { - $tsize$03141$i = 0; - } - } - } - } while(0); - do { - if ((label|0) == 181) { - $573 = (_sbrk(0)|0); - $574 = ($573|0)==((-1)|0); - if ($574) { - $tsize$03141$i = 0; - } else { - $575 = $573; - $576 = HEAP32[((33016 + 4|0))>>2]|0; - $577 = (($576) + -1)|0; - $578 = $577 & $575; - $579 = ($578|0)==(0); - if ($579) { - $ssize$0$i = $550; - } else { - $580 = (($577) + ($575))|0; - $581 = (0 - ($576))|0; - $582 = $580 & $581; - $583 = (($550) - ($575))|0; - $584 = (($583) + ($582))|0; - $ssize$0$i = $584; - } - $585 = HEAP32[((32544 + 432|0))>>2]|0; - $586 = (($585) + ($ssize$0$i))|0; - $587 = ($ssize$0$i>>>0)>($nb$0>>>0); - $588 = ($ssize$0$i>>>0)<(2147483647); - $or$cond$i29 = $587 & $588; - if ($or$cond$i29) { - $589 = HEAP32[((32544 + 440|0))>>2]|0; - $590 = ($589|0)==(0); - if (!($590)) { - $591 = ($586>>>0)<=($585>>>0); - $592 = ($586>>>0)>($589>>>0); - $or$cond2$i = $591 | $592; - if ($or$cond2$i) { - $tsize$03141$i = 0; - break; - } - } - $593 = (_sbrk(($ssize$0$i|0))|0); - $594 = ($593|0)==($573|0); - if ($594) { - $br$0$i = $573;$ssize$1$i = $ssize$0$i; - label = 190; - } else { - $br$030$i = $593;$ssize$129$i = $ssize$0$i; - label = 191; - } - } else { - $tsize$03141$i = 0; - } - } - } - } while(0); - L288: do { - if ((label|0) == 190) { - $604 = ($br$0$i|0)==((-1)|0); - if ($604) { - $tsize$03141$i = $ssize$1$i; - } else { - $tbase$245$i = $br$0$i;$tsize$244$i = $ssize$1$i; - label = 201; - break L266; - } - } - else if ((label|0) == 191) { - $605 = (0 - ($ssize$129$i))|0; - $606 = ($br$030$i|0)!=((-1)|0); - $607 = ($ssize$129$i>>>0)<(2147483647); - $or$cond5$i = $606 & $607; - $608 = ($545>>>0)>($ssize$129$i>>>0); - $or$cond4$i = $or$cond5$i & $608; - do { - if ($or$cond4$i) { - $609 = HEAP32[((33016 + 8|0))>>2]|0; - $610 = (($547) - ($ssize$129$i))|0; - $611 = (($610) + ($609))|0; - $612 = (0 - ($609))|0; - $613 = $611 & $612; - $614 = ($613>>>0)<(2147483647); - if ($614) { - $615 = (_sbrk(($613|0))|0); - $616 = ($615|0)==((-1)|0); - if ($616) { - (_sbrk(($605|0))|0); - $tsize$03141$i = 0; - break L288; - } else { - $617 = (($613) + ($ssize$129$i))|0; - $ssize$2$i = $617; - break; - } - } else { - $ssize$2$i = $ssize$129$i; - } - } else { - $ssize$2$i = $ssize$129$i; - } - } while(0); - $618 = ($br$030$i|0)==((-1)|0); - if ($618) { - $tsize$03141$i = 0; - } else { - $tbase$245$i = $br$030$i;$tsize$244$i = $ssize$2$i; - label = 201; - break L266; - } - } - } while(0); - $619 = HEAP32[((32544 + 444|0))>>2]|0; - $620 = $619 | 4; - HEAP32[((32544 + 444|0))>>2] = $620; - $tsize$1$i = $tsize$03141$i; - label = 198; - } else { - $tsize$1$i = 0; - label = 198; - } - } while(0); - if ((label|0) == 198) { - $621 = ($550>>>0)<(2147483647); - if ($621) { - $622 = (_sbrk(($550|0))|0); - $623 = (_sbrk(0)|0); - $624 = ($622|0)!=((-1)|0); - $625 = ($623|0)!=((-1)|0); - $or$cond3$i = $624 & $625; - $626 = ($622>>>0)<($623>>>0); - $or$cond6$i = $or$cond3$i & $626; - if ($or$cond6$i) { - $627 = $623; - $628 = $622; - $629 = (($627) - ($628))|0; - $630 = (($nb$0) + 40)|0; - $631 = ($629>>>0)>($630>>>0); - $$tsize$1$i = $631 ? $629 : $tsize$1$i; - if ($631) { - $tbase$245$i = $622;$tsize$244$i = $$tsize$1$i; - label = 201; - } - } - } - } - if ((label|0) == 201) { - $632 = HEAP32[((32544 + 432|0))>>2]|0; - $633 = (($632) + ($tsize$244$i))|0; - HEAP32[((32544 + 432|0))>>2] = $633; - $634 = HEAP32[((32544 + 436|0))>>2]|0; - $635 = ($633>>>0)>($634>>>0); - if ($635) { - HEAP32[((32544 + 436|0))>>2] = $633; - } - $636 = HEAP32[((32544 + 24|0))>>2]|0; - $637 = ($636|0)==(0|0); - L308: do { - if ($637) { - $638 = HEAP32[((32544 + 16|0))>>2]|0; - $639 = ($638|0)==(0|0); - $640 = ($tbase$245$i>>>0)<($638>>>0); - $or$cond8$i = $639 | $640; - if ($or$cond8$i) { - HEAP32[((32544 + 16|0))>>2] = $tbase$245$i; - } - HEAP32[((32544 + 448|0))>>2] = $tbase$245$i; - HEAP32[((32544 + 452|0))>>2] = $tsize$244$i; - HEAP32[((32544 + 460|0))>>2] = 0; - $641 = HEAP32[33016>>2]|0; - HEAP32[((32544 + 36|0))>>2] = $641; - HEAP32[((32544 + 32|0))>>2] = -1; - $i$02$i$i = 0; - while(1) { - $642 = $i$02$i$i << 1; - $643 = ((32544 + ($642<<2)|0) + 40|0); - $$sum$i$i = (($642) + 3)|0; - $644 = ((32544 + ($$sum$i$i<<2)|0) + 40|0); - HEAP32[$644>>2] = $643; - $$sum1$i$i = (($642) + 2)|0; - $645 = ((32544 + ($$sum1$i$i<<2)|0) + 40|0); - HEAP32[$645>>2] = $643; - $646 = (($i$02$i$i) + 1)|0; - $exitcond$i$i = ($646|0)==(32); - if ($exitcond$i$i) { - break; - } else { - $i$02$i$i = $646; - } - } - $647 = (($tsize$244$i) + -40)|0; - $648 = (($tbase$245$i) + 8|0); - $649 = $648; - $650 = $649 & 7; - $651 = ($650|0)==(0); - if ($651) { - $655 = 0; - } else { - $652 = (0 - ($649))|0; - $653 = $652 & 7; - $655 = $653; - } - $654 = (($tbase$245$i) + ($655)|0); - $656 = (($647) - ($655))|0; - HEAP32[((32544 + 24|0))>>2] = $654; - HEAP32[((32544 + 12|0))>>2] = $656; - $657 = $656 | 1; - $$sum$i12$i = (($655) + 4)|0; - $658 = (($tbase$245$i) + ($$sum$i12$i)|0); - HEAP32[$658>>2] = $657; - $$sum2$i$i = (($tsize$244$i) + -36)|0; - $659 = (($tbase$245$i) + ($$sum2$i$i)|0); - HEAP32[$659>>2] = 40; - $660 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $660; - } else { - $sp$073$i = ((32544 + 448|0)); - while(1) { - $661 = HEAP32[$sp$073$i>>2]|0; - $662 = (($sp$073$i) + 4|0); - $663 = HEAP32[$662>>2]|0; - $664 = (($661) + ($663)|0); - $665 = ($tbase$245$i|0)==($664|0); - if ($665) { - label = 213; - break; - } - $666 = (($sp$073$i) + 8|0); - $667 = HEAP32[$666>>2]|0; - $668 = ($667|0)==(0|0); - if ($668) { - break; - } else { - $sp$073$i = $667; - } - } - if ((label|0) == 213) { - $669 = (($sp$073$i) + 12|0); - $670 = HEAP32[$669>>2]|0; - $671 = $670 & 8; - $672 = ($671|0)==(0); - if ($672) { - $673 = ($636>>>0)>=($661>>>0); - $674 = ($636>>>0)<($tbase$245$i>>>0); - $or$cond47$i = $673 & $674; - if ($or$cond47$i) { - $675 = (($663) + ($tsize$244$i))|0; - HEAP32[$662>>2] = $675; - $676 = HEAP32[((32544 + 12|0))>>2]|0; - $677 = (($676) + ($tsize$244$i))|0; - $678 = (($636) + 8|0); - $679 = $678; - $680 = $679 & 7; - $681 = ($680|0)==(0); - if ($681) { - $685 = 0; - } else { - $682 = (0 - ($679))|0; - $683 = $682 & 7; - $685 = $683; - } - $684 = (($636) + ($685)|0); - $686 = (($677) - ($685))|0; - HEAP32[((32544 + 24|0))>>2] = $684; - HEAP32[((32544 + 12|0))>>2] = $686; - $687 = $686 | 1; - $$sum$i16$i = (($685) + 4)|0; - $688 = (($636) + ($$sum$i16$i)|0); - HEAP32[$688>>2] = $687; - $$sum2$i17$i = (($677) + 4)|0; - $689 = (($636) + ($$sum2$i17$i)|0); - HEAP32[$689>>2] = 40; - $690 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $690; - break; - } - } - } - $691 = HEAP32[((32544 + 16|0))>>2]|0; - $692 = ($tbase$245$i>>>0)<($691>>>0); - if ($692) { - HEAP32[((32544 + 16|0))>>2] = $tbase$245$i; - $756 = $tbase$245$i; - } else { - $756 = $691; - } - $693 = (($tbase$245$i) + ($tsize$244$i)|0); - $sp$166$i = ((32544 + 448|0)); - while(1) { - $694 = HEAP32[$sp$166$i>>2]|0; - $695 = ($694|0)==($693|0); - if ($695) { - label = 223; - break; - } - $696 = (($sp$166$i) + 8|0); - $697 = HEAP32[$696>>2]|0; - $698 = ($697|0)==(0|0); - if ($698) { - break; - } else { - $sp$166$i = $697; - } - } - if ((label|0) == 223) { - $699 = (($sp$166$i) + 12|0); - $700 = HEAP32[$699>>2]|0; - $701 = $700 & 8; - $702 = ($701|0)==(0); - if ($702) { - HEAP32[$sp$166$i>>2] = $tbase$245$i; - $703 = (($sp$166$i) + 4|0); - $704 = HEAP32[$703>>2]|0; - $705 = (($704) + ($tsize$244$i))|0; - HEAP32[$703>>2] = $705; - $706 = (($tbase$245$i) + 8|0); - $707 = $706; - $708 = $707 & 7; - $709 = ($708|0)==(0); - if ($709) { - $713 = 0; - } else { - $710 = (0 - ($707))|0; - $711 = $710 & 7; - $713 = $711; - } - $712 = (($tbase$245$i) + ($713)|0); - $$sum102$i = (($tsize$244$i) + 8)|0; - $714 = (($tbase$245$i) + ($$sum102$i)|0); - $715 = $714; - $716 = $715 & 7; - $717 = ($716|0)==(0); - if ($717) { - $720 = 0; - } else { - $718 = (0 - ($715))|0; - $719 = $718 & 7; - $720 = $719; - } - $$sum103$i = (($720) + ($tsize$244$i))|0; - $721 = (($tbase$245$i) + ($$sum103$i)|0); - $722 = $721; - $723 = $712; - $724 = (($722) - ($723))|0; - $$sum$i19$i = (($713) + ($nb$0))|0; - $725 = (($tbase$245$i) + ($$sum$i19$i)|0); - $726 = (($724) - ($nb$0))|0; - $727 = $nb$0 | 3; - $$sum1$i20$i = (($713) + 4)|0; - $728 = (($tbase$245$i) + ($$sum1$i20$i)|0); - HEAP32[$728>>2] = $727; - $729 = ($721|0)==($636|0); - L345: do { - if ($729) { - $730 = HEAP32[((32544 + 12|0))>>2]|0; - $731 = (($730) + ($726))|0; - HEAP32[((32544 + 12|0))>>2] = $731; - HEAP32[((32544 + 24|0))>>2] = $725; - $732 = $731 | 1; - $$sum42$i$i = (($$sum$i19$i) + 4)|0; - $733 = (($tbase$245$i) + ($$sum42$i$i)|0); - HEAP32[$733>>2] = $732; - } else { - $734 = HEAP32[((32544 + 20|0))>>2]|0; - $735 = ($721|0)==($734|0); - if ($735) { - $736 = HEAP32[((32544 + 8|0))>>2]|0; - $737 = (($736) + ($726))|0; - HEAP32[((32544 + 8|0))>>2] = $737; - HEAP32[((32544 + 20|0))>>2] = $725; - $738 = $737 | 1; - $$sum40$i$i = (($$sum$i19$i) + 4)|0; - $739 = (($tbase$245$i) + ($$sum40$i$i)|0); - HEAP32[$739>>2] = $738; - $$sum41$i$i = (($737) + ($$sum$i19$i))|0; - $740 = (($tbase$245$i) + ($$sum41$i$i)|0); - HEAP32[$740>>2] = $737; - break; - } - $$sum2$i21$i = (($tsize$244$i) + 4)|0; - $$sum104$i = (($$sum2$i21$i) + ($720))|0; - $741 = (($tbase$245$i) + ($$sum104$i)|0); - $742 = HEAP32[$741>>2]|0; - $743 = $742 & 3; - $744 = ($743|0)==(1); - if ($744) { - $745 = $742 & -8; - $746 = $742 >>> 3; - $747 = ($742>>>0)<(256); - L353: do { - if ($747) { - $$sum3738$i$i = $720 | 8; - $$sum114$i = (($$sum3738$i$i) + ($tsize$244$i))|0; - $748 = (($tbase$245$i) + ($$sum114$i)|0); - $749 = HEAP32[$748>>2]|0; - $$sum39$i$i = (($tsize$244$i) + 12)|0; - $$sum115$i = (($$sum39$i$i) + ($720))|0; - $750 = (($tbase$245$i) + ($$sum115$i)|0); - $751 = HEAP32[$750>>2]|0; - $752 = $746 << 1; - $753 = ((32544 + ($752<<2)|0) + 40|0); - $754 = ($749|0)==($753|0); - do { - if (!($754)) { - $755 = ($749>>>0)<($756>>>0); - if ($755) { - _abort(); - // unreachable; - } - $757 = (($749) + 12|0); - $758 = HEAP32[$757>>2]|0; - $759 = ($758|0)==($721|0); - if ($759) { - break; - } - _abort(); - // unreachable; - } - } while(0); - $760 = ($751|0)==($749|0); - if ($760) { - $761 = 1 << $746; - $762 = $761 ^ -1; - $763 = HEAP32[32544>>2]|0; - $764 = $763 & $762; - HEAP32[32544>>2] = $764; - break; - } - $765 = ($751|0)==($753|0); - do { - if ($765) { - $$pre58$i$i = (($751) + 8|0); - $$pre$phi59$i$iZ2D = $$pre58$i$i; - } else { - $766 = ($751>>>0)<($756>>>0); - if ($766) { - _abort(); - // unreachable; - } - $767 = (($751) + 8|0); - $768 = HEAP32[$767>>2]|0; - $769 = ($768|0)==($721|0); - if ($769) { - $$pre$phi59$i$iZ2D = $767; - break; - } - _abort(); - // unreachable; - } - } while(0); - $770 = (($749) + 12|0); - HEAP32[$770>>2] = $751; - HEAP32[$$pre$phi59$i$iZ2D>>2] = $749; - } else { - $$sum34$i$i = $720 | 24; - $$sum105$i = (($$sum34$i$i) + ($tsize$244$i))|0; - $771 = (($tbase$245$i) + ($$sum105$i)|0); - $772 = HEAP32[$771>>2]|0; - $$sum5$i$i = (($tsize$244$i) + 12)|0; - $$sum106$i = (($$sum5$i$i) + ($720))|0; - $773 = (($tbase$245$i) + ($$sum106$i)|0); - $774 = HEAP32[$773>>2]|0; - $775 = ($774|0)==($721|0); - do { - if ($775) { - $$sum67$i$i = $720 | 16; - $$sum112$i = (($$sum2$i21$i) + ($$sum67$i$i))|0; - $785 = (($tbase$245$i) + ($$sum112$i)|0); - $786 = HEAP32[$785>>2]|0; - $787 = ($786|0)==(0|0); - if ($787) { - $$sum113$i = (($$sum67$i$i) + ($tsize$244$i))|0; - $788 = (($tbase$245$i) + ($$sum113$i)|0); - $789 = HEAP32[$788>>2]|0; - $790 = ($789|0)==(0|0); - if ($790) { - $R$1$i$i = 0; - break; - } else { - $R$0$i$i = $789;$RP$0$i$i = $788; - } - } else { - $R$0$i$i = $786;$RP$0$i$i = $785; - } - while(1) { - $791 = (($R$0$i$i) + 20|0); - $792 = HEAP32[$791>>2]|0; - $793 = ($792|0)==(0|0); - if (!($793)) { - $R$0$i$i = $792;$RP$0$i$i = $791; - continue; - } - $794 = (($R$0$i$i) + 16|0); - $795 = HEAP32[$794>>2]|0; - $796 = ($795|0)==(0|0); - if ($796) { - break; - } else { - $R$0$i$i = $795;$RP$0$i$i = $794; - } - } - $797 = ($RP$0$i$i>>>0)<($756>>>0); - if ($797) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i$i>>2] = 0; - $R$1$i$i = $R$0$i$i; - break; - } - } else { - $$sum3536$i$i = $720 | 8; - $$sum107$i = (($$sum3536$i$i) + ($tsize$244$i))|0; - $776 = (($tbase$245$i) + ($$sum107$i)|0); - $777 = HEAP32[$776>>2]|0; - $778 = ($777>>>0)<($756>>>0); - if ($778) { - _abort(); - // unreachable; - } - $779 = (($777) + 12|0); - $780 = HEAP32[$779>>2]|0; - $781 = ($780|0)==($721|0); - if (!($781)) { - _abort(); - // unreachable; - } - $782 = (($774) + 8|0); - $783 = HEAP32[$782>>2]|0; - $784 = ($783|0)==($721|0); - if ($784) { - HEAP32[$779>>2] = $774; - HEAP32[$782>>2] = $777; - $R$1$i$i = $774; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $798 = ($772|0)==(0|0); - if ($798) { - break; - } - $$sum30$i$i = (($tsize$244$i) + 28)|0; - $$sum108$i = (($$sum30$i$i) + ($720))|0; - $799 = (($tbase$245$i) + ($$sum108$i)|0); - $800 = HEAP32[$799>>2]|0; - $801 = ((32544 + ($800<<2)|0) + 304|0); - $802 = HEAP32[$801>>2]|0; - $803 = ($721|0)==($802|0); - do { - if ($803) { - HEAP32[$801>>2] = $R$1$i$i; - $cond$i$i = ($R$1$i$i|0)==(0|0); - if (!($cond$i$i)) { - break; - } - $804 = 1 << $800; - $805 = $804 ^ -1; - $806 = HEAP32[((32544 + 4|0))>>2]|0; - $807 = $806 & $805; - HEAP32[((32544 + 4|0))>>2] = $807; - break L353; - } else { - $808 = HEAP32[((32544 + 16|0))>>2]|0; - $809 = ($772>>>0)<($808>>>0); - if ($809) { - _abort(); - // unreachable; - } - $810 = (($772) + 16|0); - $811 = HEAP32[$810>>2]|0; - $812 = ($811|0)==($721|0); - if ($812) { - HEAP32[$810>>2] = $R$1$i$i; - } else { - $813 = (($772) + 20|0); - HEAP32[$813>>2] = $R$1$i$i; - } - $814 = ($R$1$i$i|0)==(0|0); - if ($814) { - break L353; - } - } - } while(0); - $815 = HEAP32[((32544 + 16|0))>>2]|0; - $816 = ($R$1$i$i>>>0)<($815>>>0); - if ($816) { - _abort(); - // unreachable; - } - $817 = (($R$1$i$i) + 24|0); - HEAP32[$817>>2] = $772; - $$sum3132$i$i = $720 | 16; - $$sum109$i = (($$sum3132$i$i) + ($tsize$244$i))|0; - $818 = (($tbase$245$i) + ($$sum109$i)|0); - $819 = HEAP32[$818>>2]|0; - $820 = ($819|0)==(0|0); - do { - if (!($820)) { - $821 = ($819>>>0)<($815>>>0); - if ($821) { - _abort(); - // unreachable; - } else { - $822 = (($R$1$i$i) + 16|0); - HEAP32[$822>>2] = $819; - $823 = (($819) + 24|0); - HEAP32[$823>>2] = $R$1$i$i; - break; - } - } - } while(0); - $$sum110$i = (($$sum2$i21$i) + ($$sum3132$i$i))|0; - $824 = (($tbase$245$i) + ($$sum110$i)|0); - $825 = HEAP32[$824>>2]|0; - $826 = ($825|0)==(0|0); - if ($826) { - break; - } - $827 = HEAP32[((32544 + 16|0))>>2]|0; - $828 = ($825>>>0)<($827>>>0); - if ($828) { - _abort(); - // unreachable; - } else { - $829 = (($R$1$i$i) + 20|0); - HEAP32[$829>>2] = $825; - $830 = (($825) + 24|0); - HEAP32[$830>>2] = $R$1$i$i; - break; - } - } - } while(0); - $$sum9$i$i = $745 | $720; - $$sum111$i = (($$sum9$i$i) + ($tsize$244$i))|0; - $831 = (($tbase$245$i) + ($$sum111$i)|0); - $832 = (($745) + ($726))|0; - $oldfirst$0$i$i = $831;$qsize$0$i$i = $832; - } else { - $oldfirst$0$i$i = $721;$qsize$0$i$i = $726; - } - $833 = (($oldfirst$0$i$i) + 4|0); - $834 = HEAP32[$833>>2]|0; - $835 = $834 & -2; - HEAP32[$833>>2] = $835; - $836 = $qsize$0$i$i | 1; - $$sum10$i$i = (($$sum$i19$i) + 4)|0; - $837 = (($tbase$245$i) + ($$sum10$i$i)|0); - HEAP32[$837>>2] = $836; - $$sum11$i22$i = (($qsize$0$i$i) + ($$sum$i19$i))|0; - $838 = (($tbase$245$i) + ($$sum11$i22$i)|0); - HEAP32[$838>>2] = $qsize$0$i$i; - $839 = $qsize$0$i$i >>> 3; - $840 = ($qsize$0$i$i>>>0)<(256); - if ($840) { - $841 = $839 << 1; - $842 = ((32544 + ($841<<2)|0) + 40|0); - $843 = HEAP32[32544>>2]|0; - $844 = 1 << $839; - $845 = $843 & $844; - $846 = ($845|0)==(0); - do { - if ($846) { - $847 = $843 | $844; - HEAP32[32544>>2] = $847; - $$sum26$pre$i$i = (($841) + 2)|0; - $$pre$i23$i = ((32544 + ($$sum26$pre$i$i<<2)|0) + 40|0); - $$pre$phi$i24$iZ2D = $$pre$i23$i;$F4$0$i$i = $842; - } else { - $$sum29$i$i = (($841) + 2)|0; - $848 = ((32544 + ($$sum29$i$i<<2)|0) + 40|0); - $849 = HEAP32[$848>>2]|0; - $850 = HEAP32[((32544 + 16|0))>>2]|0; - $851 = ($849>>>0)<($850>>>0); - if (!($851)) { - $$pre$phi$i24$iZ2D = $848;$F4$0$i$i = $849; - break; - } - _abort(); - // unreachable; - } - } while(0); - HEAP32[$$pre$phi$i24$iZ2D>>2] = $725; - $852 = (($F4$0$i$i) + 12|0); - HEAP32[$852>>2] = $725; - $$sum27$i$i = (($$sum$i19$i) + 8)|0; - $853 = (($tbase$245$i) + ($$sum27$i$i)|0); - HEAP32[$853>>2] = $F4$0$i$i; - $$sum28$i$i = (($$sum$i19$i) + 12)|0; - $854 = (($tbase$245$i) + ($$sum28$i$i)|0); - HEAP32[$854>>2] = $842; - break; - } - $855 = $qsize$0$i$i >>> 8; - $856 = ($855|0)==(0); - do { - if ($856) { - $I7$0$i$i = 0; - } else { - $857 = ($qsize$0$i$i>>>0)>(16777215); - if ($857) { - $I7$0$i$i = 31; - break; - } - $858 = (($855) + 1048320)|0; - $859 = $858 >>> 16; - $860 = $859 & 8; - $861 = $855 << $860; - $862 = (($861) + 520192)|0; - $863 = $862 >>> 16; - $864 = $863 & 4; - $865 = $864 | $860; - $866 = $861 << $864; - $867 = (($866) + 245760)|0; - $868 = $867 >>> 16; - $869 = $868 & 2; - $870 = $865 | $869; - $871 = (14 - ($870))|0; - $872 = $866 << $869; - $873 = $872 >>> 15; - $874 = (($871) + ($873))|0; - $875 = $874 << 1; - $876 = (($874) + 7)|0; - $877 = $qsize$0$i$i >>> $876; - $878 = $877 & 1; - $879 = $878 | $875; - $I7$0$i$i = $879; - } - } while(0); - $880 = ((32544 + ($I7$0$i$i<<2)|0) + 304|0); - $$sum12$i$i = (($$sum$i19$i) + 28)|0; - $881 = (($tbase$245$i) + ($$sum12$i$i)|0); - HEAP32[$881>>2] = $I7$0$i$i; - $$sum13$i$i = (($$sum$i19$i) + 16)|0; - $882 = (($tbase$245$i) + ($$sum13$i$i)|0); - $$sum14$i$i = (($$sum$i19$i) + 20)|0; - $883 = (($tbase$245$i) + ($$sum14$i$i)|0); - HEAP32[$883>>2] = 0; - HEAP32[$882>>2] = 0; - $884 = HEAP32[((32544 + 4|0))>>2]|0; - $885 = 1 << $I7$0$i$i; - $886 = $884 & $885; - $887 = ($886|0)==(0); - if ($887) { - $888 = $884 | $885; - HEAP32[((32544 + 4|0))>>2] = $888; - HEAP32[$880>>2] = $725; - $$sum15$i$i = (($$sum$i19$i) + 24)|0; - $889 = (($tbase$245$i) + ($$sum15$i$i)|0); - HEAP32[$889>>2] = $880; - $$sum16$i$i = (($$sum$i19$i) + 12)|0; - $890 = (($tbase$245$i) + ($$sum16$i$i)|0); - HEAP32[$890>>2] = $725; - $$sum17$i$i = (($$sum$i19$i) + 8)|0; - $891 = (($tbase$245$i) + ($$sum17$i$i)|0); - HEAP32[$891>>2] = $725; - break; - } - $892 = HEAP32[$880>>2]|0; - $893 = ($I7$0$i$i|0)==(31); - if ($893) { - $901 = 0; - } else { - $894 = $I7$0$i$i >>> 1; - $895 = (25 - ($894))|0; - $901 = $895; - } - $896 = (($892) + 4|0); - $897 = HEAP32[$896>>2]|0; - $898 = $897 & -8; - $899 = ($898|0)==($qsize$0$i$i|0); - L442: do { - if ($899) { - $T$0$lcssa$i26$i = $892; - } else { - $900 = $qsize$0$i$i << $901; - $K8$053$i$i = $900;$T$052$i$i = $892; - while(1) { - $908 = $K8$053$i$i >>> 31; - $909 = ((($T$052$i$i) + ($908<<2)|0) + 16|0); - $904 = HEAP32[$909>>2]|0; - $910 = ($904|0)==(0|0); - if ($910) { - break; - } - $902 = $K8$053$i$i << 1; - $903 = (($904) + 4|0); - $905 = HEAP32[$903>>2]|0; - $906 = $905 & -8; - $907 = ($906|0)==($qsize$0$i$i|0); - if ($907) { - $T$0$lcssa$i26$i = $904; - break L442; - } else { - $K8$053$i$i = $902;$T$052$i$i = $904; - } - } - $911 = HEAP32[((32544 + 16|0))>>2]|0; - $912 = ($909>>>0)<($911>>>0); - if ($912) { - _abort(); - // unreachable; - } else { - HEAP32[$909>>2] = $725; - $$sum23$i$i = (($$sum$i19$i) + 24)|0; - $913 = (($tbase$245$i) + ($$sum23$i$i)|0); - HEAP32[$913>>2] = $T$052$i$i; - $$sum24$i$i = (($$sum$i19$i) + 12)|0; - $914 = (($tbase$245$i) + ($$sum24$i$i)|0); - HEAP32[$914>>2] = $725; - $$sum25$i$i = (($$sum$i19$i) + 8)|0; - $915 = (($tbase$245$i) + ($$sum25$i$i)|0); - HEAP32[$915>>2] = $725; - break L345; - } - } - } while(0); - $916 = (($T$0$lcssa$i26$i) + 8|0); - $917 = HEAP32[$916>>2]|0; - $918 = HEAP32[((32544 + 16|0))>>2]|0; - $919 = ($T$0$lcssa$i26$i>>>0)>=($918>>>0); - $920 = ($917>>>0)>=($918>>>0); - $or$cond$i27$i = $919 & $920; - if ($or$cond$i27$i) { - $921 = (($917) + 12|0); - HEAP32[$921>>2] = $725; - HEAP32[$916>>2] = $725; - $$sum20$i$i = (($$sum$i19$i) + 8)|0; - $922 = (($tbase$245$i) + ($$sum20$i$i)|0); - HEAP32[$922>>2] = $917; - $$sum21$i$i = (($$sum$i19$i) + 12)|0; - $923 = (($tbase$245$i) + ($$sum21$i$i)|0); - HEAP32[$923>>2] = $T$0$lcssa$i26$i; - $$sum22$i$i = (($$sum$i19$i) + 24)|0; - $924 = (($tbase$245$i) + ($$sum22$i$i)|0); - HEAP32[$924>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $$sum1819$i$i = $713 | 8; - $925 = (($tbase$245$i) + ($$sum1819$i$i)|0); - $mem$0 = $925; - STACKTOP = sp;return ($mem$0|0); - } - } - $sp$0$i$i$i = ((32544 + 448|0)); + $198 = HEAP32[$197>>2]|0; + $199 = (($196) + 4)|0; + $200 = $199; + $201 = HEAP32[$200>>2]|0; + $202 = (_bitshift64Ashr(0,($198|0),32)|0); + $203 = tempRet0; + $204 = $160; + $205 = $204; + $206 = HEAP32[$205>>2]|0; + $207 = (($204) + 4)|0; + $208 = $207; + $209 = HEAP32[$208>>2]|0; + $210 = (_bitshift64Ashr(0,($206|0),32)|0); + $211 = tempRet0; + $212 = (___muldi3(($210|0),($211|0),($202|0),($203|0))|0); + $213 = tempRet0; + $214 = (_i64Add(($212|0),($213|0),($194|0),($195|0))|0); + $215 = tempRet0; + $216 = $in; + $217 = $216; + $218 = HEAP32[$217>>2]|0; + $219 = (($216) + 4)|0; + $220 = $219; + $221 = HEAP32[$220>>2]|0; + $222 = (_bitshift64Ashr(0,($218|0),32)|0); + $223 = tempRet0; + $224 = ((($in)) + 40|0); + $225 = $224; + $226 = $225; + $227 = HEAP32[$226>>2]|0; + $228 = (($225) + 4)|0; + $229 = $228; + $230 = HEAP32[$229>>2]|0; + $231 = (_bitshift64Ashr(0,($227|0),32)|0); + $232 = tempRet0; + $233 = (___muldi3(($231|0),($232|0),($222|0),($223|0))|0); + $234 = tempRet0; + $235 = (_i64Add(($214|0),($215|0),($233|0),($234|0))|0); + $236 = tempRet0; + $237 = (_bitshift64Shl(($235|0),($236|0),1)|0); + $238 = tempRet0; + $239 = ((($output)) + 40|0); + $240 = $239; + $241 = $240; + HEAP32[$241>>2] = $237; + $242 = (($240) + 4)|0; + $243 = $242; + HEAP32[$243>>2] = $238; + $244 = $102; + $245 = $244; + $246 = HEAP32[$245>>2]|0; + $247 = (($244) + 4)|0; + $248 = $247; + $249 = HEAP32[$248>>2]|0; + $250 = (_bitshift64Ashr(0,($246|0),32)|0); + $251 = tempRet0; + $252 = (___muldi3(($250|0),($251|0),($250|0),($251|0))|0); + $253 = tempRet0; + $254 = $56; + $255 = $254; + $256 = HEAP32[$255>>2]|0; + $257 = (($254) + 4)|0; + $258 = $257; + $259 = HEAP32[$258>>2]|0; + $260 = (_bitshift64Ashr(0,($256|0),32)|0); + $261 = tempRet0; + $262 = $160; + $263 = $262; + $264 = HEAP32[$263>>2]|0; + $265 = (($262) + 4)|0; + $266 = $265; + $267 = HEAP32[$266>>2]|0; + $268 = (_bitshift64Ashr(0,($264|0),32)|0); + $269 = tempRet0; + $270 = (___muldi3(($268|0),($269|0),($260|0),($261|0))|0); + $271 = tempRet0; + $272 = (_i64Add(($270|0),($271|0),($252|0),($253|0))|0); + $273 = tempRet0; + $274 = $in; + $275 = $274; + $276 = HEAP32[$275>>2]|0; + $277 = (($274) + 4)|0; + $278 = $277; + $279 = HEAP32[$278>>2]|0; + $280 = (_bitshift64Ashr(0,($276|0),32)|0); + $281 = tempRet0; + $282 = ((($in)) + 48|0); + $283 = $282; + $284 = $283; + $285 = HEAP32[$284>>2]|0; + $286 = (($283) + 4)|0; + $287 = $286; + $288 = HEAP32[$287>>2]|0; + $289 = (_bitshift64Ashr(0,($285|0),32)|0); + $290 = tempRet0; + $291 = (___muldi3(($289|0),($290|0),($280|0),($281|0))|0); + $292 = tempRet0; + $293 = (_i64Add(($272|0),($273|0),($291|0),($292|0))|0); + $294 = tempRet0; + $295 = $22; + $296 = $295; + $297 = HEAP32[$296>>2]|0; + $298 = (($295) + 4)|0; + $299 = $298; + $300 = HEAP32[$299>>2]|0; + $301 = (_bitshift64Ashr(0,($297|0),31)|0); + $302 = tempRet0; + $303 = $224; + $304 = $303; + $305 = HEAP32[$304>>2]|0; + $306 = (($303) + 4)|0; + $307 = $306; + $308 = HEAP32[$307>>2]|0; + $309 = (_bitshift64Ashr(0,($305|0),32)|0); + $310 = tempRet0; + $311 = (___muldi3(($309|0),($310|0),($301|0),($302|0))|0); + $312 = tempRet0; + $313 = (_i64Add(($293|0),($294|0),($311|0),($312|0))|0); + $314 = tempRet0; + $315 = (_bitshift64Shl(($313|0),($314|0),1)|0); + $316 = tempRet0; + $317 = ((($output)) + 48|0); + $318 = $317; + $319 = $318; + HEAP32[$319>>2] = $315; + $320 = (($318) + 4)|0; + $321 = $320; + HEAP32[$321>>2] = $316; + $322 = $102; + $323 = $322; + $324 = HEAP32[$323>>2]|0; + $325 = (($322) + 4)|0; + $326 = $325; + $327 = HEAP32[$326>>2]|0; + $328 = (_bitshift64Ashr(0,($324|0),32)|0); + $329 = tempRet0; + $330 = $160; + $331 = $330; + $332 = HEAP32[$331>>2]|0; + $333 = (($330) + 4)|0; + $334 = $333; + $335 = HEAP32[$334>>2]|0; + $336 = (_bitshift64Ashr(0,($332|0),32)|0); + $337 = tempRet0; + $338 = (___muldi3(($336|0),($337|0),($328|0),($329|0))|0); + $339 = tempRet0; + $340 = $56; + $341 = $340; + $342 = HEAP32[$341>>2]|0; + $343 = (($340) + 4)|0; + $344 = $343; + $345 = HEAP32[$344>>2]|0; + $346 = (_bitshift64Ashr(0,($342|0),32)|0); + $347 = tempRet0; + $348 = $224; + $349 = $348; + $350 = HEAP32[$349>>2]|0; + $351 = (($348) + 4)|0; + $352 = $351; + $353 = HEAP32[$352>>2]|0; + $354 = (_bitshift64Ashr(0,($350|0),32)|0); + $355 = tempRet0; + $356 = (___muldi3(($354|0),($355|0),($346|0),($347|0))|0); + $357 = tempRet0; + $358 = (_i64Add(($356|0),($357|0),($338|0),($339|0))|0); + $359 = tempRet0; + $360 = $22; + $361 = $360; + $362 = HEAP32[$361>>2]|0; + $363 = (($360) + 4)|0; + $364 = $363; + $365 = HEAP32[$364>>2]|0; + $366 = (_bitshift64Ashr(0,($362|0),32)|0); + $367 = tempRet0; + $368 = $282; + $369 = $368; + $370 = HEAP32[$369>>2]|0; + $371 = (($368) + 4)|0; + $372 = $371; + $373 = HEAP32[$372>>2]|0; + $374 = (_bitshift64Ashr(0,($370|0),32)|0); + $375 = tempRet0; + $376 = (___muldi3(($374|0),($375|0),($366|0),($367|0))|0); + $377 = tempRet0; + $378 = (_i64Add(($358|0),($359|0),($376|0),($377|0))|0); + $379 = tempRet0; + $380 = $in; + $381 = $380; + $382 = HEAP32[$381>>2]|0; + $383 = (($380) + 4)|0; + $384 = $383; + $385 = HEAP32[$384>>2]|0; + $386 = (_bitshift64Ashr(0,($382|0),32)|0); + $387 = tempRet0; + $388 = ((($in)) + 56|0); + $389 = $388; + $390 = $389; + $391 = HEAP32[$390>>2]|0; + $392 = (($389) + 4)|0; + $393 = $392; + $394 = HEAP32[$393>>2]|0; + $395 = (_bitshift64Ashr(0,($391|0),32)|0); + $396 = tempRet0; + $397 = (___muldi3(($395|0),($396|0),($386|0),($387|0))|0); + $398 = tempRet0; + $399 = (_i64Add(($378|0),($379|0),($397|0),($398|0))|0); + $400 = tempRet0; + $401 = (_bitshift64Shl(($399|0),($400|0),1)|0); + $402 = tempRet0; + $403 = ((($output)) + 56|0); + $404 = $403; + $405 = $404; + HEAP32[$405>>2] = $401; + $406 = (($404) + 4)|0; + $407 = $406; + HEAP32[$407>>2] = $402; + $408 = $160; + $409 = $408; + $410 = HEAP32[$409>>2]|0; + $411 = (($408) + 4)|0; + $412 = $411; + $413 = HEAP32[$412>>2]|0; + $414 = (_bitshift64Ashr(0,($410|0),32)|0); + $415 = tempRet0; + $416 = (___muldi3(($414|0),($415|0),($414|0),($415|0))|0); + $417 = tempRet0; + $418 = $56; + $419 = $418; + $420 = HEAP32[$419>>2]|0; + $421 = (($418) + 4)|0; + $422 = $421; + $423 = HEAP32[$422>>2]|0; + $424 = (_bitshift64Ashr(0,($420|0),32)|0); + $425 = tempRet0; + $426 = $282; + $427 = $426; + $428 = HEAP32[$427>>2]|0; + $429 = (($426) + 4)|0; + $430 = $429; + $431 = HEAP32[$430>>2]|0; + $432 = (_bitshift64Ashr(0,($428|0),32)|0); + $433 = tempRet0; + $434 = (___muldi3(($432|0),($433|0),($424|0),($425|0))|0); + $435 = tempRet0; + $436 = $in; + $437 = $436; + $438 = HEAP32[$437>>2]|0; + $439 = (($436) + 4)|0; + $440 = $439; + $441 = HEAP32[$440>>2]|0; + $442 = (_bitshift64Ashr(0,($438|0),32)|0); + $443 = tempRet0; + $444 = ((($in)) + 64|0); + $445 = $444; + $446 = $445; + $447 = HEAP32[$446>>2]|0; + $448 = (($445) + 4)|0; + $449 = $448; + $450 = HEAP32[$449>>2]|0; + $451 = (_bitshift64Ashr(0,($447|0),32)|0); + $452 = tempRet0; + $453 = (___muldi3(($451|0),($452|0),($442|0),($443|0))|0); + $454 = tempRet0; + $455 = (_i64Add(($453|0),($454|0),($434|0),($435|0))|0); + $456 = tempRet0; + $457 = $22; + $458 = $457; + $459 = HEAP32[$458>>2]|0; + $460 = (($457) + 4)|0; + $461 = $460; + $462 = HEAP32[$461>>2]|0; + $463 = (_bitshift64Ashr(0,($459|0),32)|0); + $464 = tempRet0; + $465 = $388; + $466 = $465; + $467 = HEAP32[$466>>2]|0; + $468 = (($465) + 4)|0; + $469 = $468; + $470 = HEAP32[$469>>2]|0; + $471 = (_bitshift64Ashr(0,($467|0),32)|0); + $472 = tempRet0; + $473 = (___muldi3(($471|0),($472|0),($463|0),($464|0))|0); + $474 = tempRet0; + $475 = $102; + $476 = $475; + $477 = HEAP32[$476>>2]|0; + $478 = (($475) + 4)|0; + $479 = $478; + $480 = HEAP32[$479>>2]|0; + $481 = (_bitshift64Ashr(0,($477|0),32)|0); + $482 = tempRet0; + $483 = $224; + $484 = $483; + $485 = HEAP32[$484>>2]|0; + $486 = (($483) + 4)|0; + $487 = $486; + $488 = HEAP32[$487>>2]|0; + $489 = (_bitshift64Ashr(0,($485|0),32)|0); + $490 = tempRet0; + $491 = (___muldi3(($489|0),($490|0),($481|0),($482|0))|0); + $492 = tempRet0; + $493 = (_i64Add(($491|0),($492|0),($473|0),($474|0))|0); + $494 = tempRet0; + $495 = (_bitshift64Shl(($493|0),($494|0),1)|0); + $496 = tempRet0; + $497 = (_i64Add(($455|0),($456|0),($495|0),($496|0))|0); + $498 = tempRet0; + $499 = (_bitshift64Shl(($497|0),($498|0),1)|0); + $500 = tempRet0; + $501 = (_i64Add(($499|0),($500|0),($416|0),($417|0))|0); + $502 = tempRet0; + $503 = ((($output)) + 64|0); + $504 = $503; + $505 = $504; + HEAP32[$505>>2] = $501; + $506 = (($504) + 4)|0; + $507 = $506; + HEAP32[$507>>2] = $502; + $508 = $160; + $509 = $508; + $510 = HEAP32[$509>>2]|0; + $511 = (($508) + 4)|0; + $512 = $511; + $513 = HEAP32[$512>>2]|0; + $514 = (_bitshift64Ashr(0,($510|0),32)|0); + $515 = tempRet0; + $516 = $224; + $517 = $516; + $518 = HEAP32[$517>>2]|0; + $519 = (($516) + 4)|0; + $520 = $519; + $521 = HEAP32[$520>>2]|0; + $522 = (_bitshift64Ashr(0,($518|0),32)|0); + $523 = tempRet0; + $524 = (___muldi3(($522|0),($523|0),($514|0),($515|0))|0); + $525 = tempRet0; + $526 = $102; + $527 = $526; + $528 = HEAP32[$527>>2]|0; + $529 = (($526) + 4)|0; + $530 = $529; + $531 = HEAP32[$530>>2]|0; + $532 = (_bitshift64Ashr(0,($528|0),32)|0); + $533 = tempRet0; + $534 = $282; + $535 = $534; + $536 = HEAP32[$535>>2]|0; + $537 = (($534) + 4)|0; + $538 = $537; + $539 = HEAP32[$538>>2]|0; + $540 = (_bitshift64Ashr(0,($536|0),32)|0); + $541 = tempRet0; + $542 = (___muldi3(($540|0),($541|0),($532|0),($533|0))|0); + $543 = tempRet0; + $544 = (_i64Add(($542|0),($543|0),($524|0),($525|0))|0); + $545 = tempRet0; + $546 = $56; + $547 = $546; + $548 = HEAP32[$547>>2]|0; + $549 = (($546) + 4)|0; + $550 = $549; + $551 = HEAP32[$550>>2]|0; + $552 = (_bitshift64Ashr(0,($548|0),32)|0); + $553 = tempRet0; + $554 = $388; + $555 = $554; + $556 = HEAP32[$555>>2]|0; + $557 = (($554) + 4)|0; + $558 = $557; + $559 = HEAP32[$558>>2]|0; + $560 = (_bitshift64Ashr(0,($556|0),32)|0); + $561 = tempRet0; + $562 = (___muldi3(($560|0),($561|0),($552|0),($553|0))|0); + $563 = tempRet0; + $564 = (_i64Add(($544|0),($545|0),($562|0),($563|0))|0); + $565 = tempRet0; + $566 = $22; + $567 = $566; + $568 = HEAP32[$567>>2]|0; + $569 = (($566) + 4)|0; + $570 = $569; + $571 = HEAP32[$570>>2]|0; + $572 = (_bitshift64Ashr(0,($568|0),32)|0); + $573 = tempRet0; + $574 = $444; + $575 = $574; + $576 = HEAP32[$575>>2]|0; + $577 = (($574) + 4)|0; + $578 = $577; + $579 = HEAP32[$578>>2]|0; + $580 = (_bitshift64Ashr(0,($576|0),32)|0); + $581 = tempRet0; + $582 = (___muldi3(($580|0),($581|0),($572|0),($573|0))|0); + $583 = tempRet0; + $584 = (_i64Add(($564|0),($565|0),($582|0),($583|0))|0); + $585 = tempRet0; + $586 = $in; + $587 = $586; + $588 = HEAP32[$587>>2]|0; + $589 = (($586) + 4)|0; + $590 = $589; + $591 = HEAP32[$590>>2]|0; + $592 = (_bitshift64Ashr(0,($588|0),32)|0); + $593 = tempRet0; + $594 = ((($in)) + 72|0); + $595 = $594; + $596 = $595; + $597 = HEAP32[$596>>2]|0; + $598 = (($595) + 4)|0; + $599 = $598; + $600 = HEAP32[$599>>2]|0; + $601 = (_bitshift64Ashr(0,($597|0),32)|0); + $602 = tempRet0; + $603 = (___muldi3(($601|0),($602|0),($592|0),($593|0))|0); + $604 = tempRet0; + $605 = (_i64Add(($584|0),($585|0),($603|0),($604|0))|0); + $606 = tempRet0; + $607 = (_bitshift64Shl(($605|0),($606|0),1)|0); + $608 = tempRet0; + $609 = ((($output)) + 72|0); + $610 = $609; + $611 = $610; + HEAP32[$611>>2] = $607; + $612 = (($610) + 4)|0; + $613 = $612; + HEAP32[$613>>2] = $608; + $614 = $224; + $615 = $614; + $616 = HEAP32[$615>>2]|0; + $617 = (($614) + 4)|0; + $618 = $617; + $619 = HEAP32[$618>>2]|0; + $620 = (_bitshift64Ashr(0,($616|0),32)|0); + $621 = tempRet0; + $622 = (___muldi3(($620|0),($621|0),($620|0),($621|0))|0); + $623 = tempRet0; + $624 = $160; + $625 = $624; + $626 = HEAP32[$625>>2]|0; + $627 = (($624) + 4)|0; + $628 = $627; + $629 = HEAP32[$628>>2]|0; + $630 = (_bitshift64Ashr(0,($626|0),32)|0); + $631 = tempRet0; + $632 = $282; + $633 = $632; + $634 = HEAP32[$633>>2]|0; + $635 = (($632) + 4)|0; + $636 = $635; + $637 = HEAP32[$636>>2]|0; + $638 = (_bitshift64Ashr(0,($634|0),32)|0); + $639 = tempRet0; + $640 = (___muldi3(($638|0),($639|0),($630|0),($631|0))|0); + $641 = tempRet0; + $642 = (_i64Add(($640|0),($641|0),($622|0),($623|0))|0); + $643 = tempRet0; + $644 = $56; + $645 = $644; + $646 = HEAP32[$645>>2]|0; + $647 = (($644) + 4)|0; + $648 = $647; + $649 = HEAP32[$648>>2]|0; + $650 = (_bitshift64Ashr(0,($646|0),32)|0); + $651 = tempRet0; + $652 = $444; + $653 = $652; + $654 = HEAP32[$653>>2]|0; + $655 = (($652) + 4)|0; + $656 = $655; + $657 = HEAP32[$656>>2]|0; + $658 = (_bitshift64Ashr(0,($654|0),32)|0); + $659 = tempRet0; + $660 = (___muldi3(($658|0),($659|0),($650|0),($651|0))|0); + $661 = tempRet0; + $662 = (_i64Add(($642|0),($643|0),($660|0),($661|0))|0); + $663 = tempRet0; + $664 = $102; + $665 = $664; + $666 = HEAP32[$665>>2]|0; + $667 = (($664) + 4)|0; + $668 = $667; + $669 = HEAP32[$668>>2]|0; + $670 = (_bitshift64Ashr(0,($666|0),32)|0); + $671 = tempRet0; + $672 = $388; + $673 = $672; + $674 = HEAP32[$673>>2]|0; + $675 = (($672) + 4)|0; + $676 = $675; + $677 = HEAP32[$676>>2]|0; + $678 = (_bitshift64Ashr(0,($674|0),32)|0); + $679 = tempRet0; + $680 = (___muldi3(($678|0),($679|0),($670|0),($671|0))|0); + $681 = tempRet0; + $682 = $22; + $683 = $682; + $684 = HEAP32[$683>>2]|0; + $685 = (($682) + 4)|0; + $686 = $685; + $687 = HEAP32[$686>>2]|0; + $688 = (_bitshift64Ashr(0,($684|0),32)|0); + $689 = tempRet0; + $690 = $594; + $691 = $690; + $692 = HEAP32[$691>>2]|0; + $693 = (($690) + 4)|0; + $694 = $693; + $695 = HEAP32[$694>>2]|0; + $696 = (_bitshift64Ashr(0,($692|0),32)|0); + $697 = tempRet0; + $698 = (___muldi3(($696|0),($697|0),($688|0),($689|0))|0); + $699 = tempRet0; + $700 = (_i64Add(($698|0),($699|0),($680|0),($681|0))|0); + $701 = tempRet0; + $702 = (_bitshift64Shl(($700|0),($701|0),1)|0); + $703 = tempRet0; + $704 = (_i64Add(($662|0),($663|0),($702|0),($703|0))|0); + $705 = tempRet0; + $706 = (_bitshift64Shl(($704|0),($705|0),1)|0); + $707 = tempRet0; + $708 = ((($output)) + 80|0); + $709 = $708; + $710 = $709; + HEAP32[$710>>2] = $706; + $711 = (($709) + 4)|0; + $712 = $711; + HEAP32[$712>>2] = $707; + $713 = $224; + $714 = $713; + $715 = HEAP32[$714>>2]|0; + $716 = (($713) + 4)|0; + $717 = $716; + $718 = HEAP32[$717>>2]|0; + $719 = (_bitshift64Ashr(0,($715|0),32)|0); + $720 = tempRet0; + $721 = $282; + $722 = $721; + $723 = HEAP32[$722>>2]|0; + $724 = (($721) + 4)|0; + $725 = $724; + $726 = HEAP32[$725>>2]|0; + $727 = (_bitshift64Ashr(0,($723|0),32)|0); + $728 = tempRet0; + $729 = (___muldi3(($727|0),($728|0),($719|0),($720|0))|0); + $730 = tempRet0; + $731 = $160; + $732 = $731; + $733 = HEAP32[$732>>2]|0; + $734 = (($731) + 4)|0; + $735 = $734; + $736 = HEAP32[$735>>2]|0; + $737 = (_bitshift64Ashr(0,($733|0),32)|0); + $738 = tempRet0; + $739 = $388; + $740 = $739; + $741 = HEAP32[$740>>2]|0; + $742 = (($739) + 4)|0; + $743 = $742; + $744 = HEAP32[$743>>2]|0; + $745 = (_bitshift64Ashr(0,($741|0),32)|0); + $746 = tempRet0; + $747 = (___muldi3(($745|0),($746|0),($737|0),($738|0))|0); + $748 = tempRet0; + $749 = (_i64Add(($747|0),($748|0),($729|0),($730|0))|0); + $750 = tempRet0; + $751 = $102; + $752 = $751; + $753 = HEAP32[$752>>2]|0; + $754 = (($751) + 4)|0; + $755 = $754; + $756 = HEAP32[$755>>2]|0; + $757 = (_bitshift64Ashr(0,($753|0),32)|0); + $758 = tempRet0; + $759 = $444; + $760 = $759; + $761 = HEAP32[$760>>2]|0; + $762 = (($759) + 4)|0; + $763 = $762; + $764 = HEAP32[$763>>2]|0; + $765 = (_bitshift64Ashr(0,($761|0),32)|0); + $766 = tempRet0; + $767 = (___muldi3(($765|0),($766|0),($757|0),($758|0))|0); + $768 = tempRet0; + $769 = (_i64Add(($749|0),($750|0),($767|0),($768|0))|0); + $770 = tempRet0; + $771 = $56; + $772 = $771; + $773 = HEAP32[$772>>2]|0; + $774 = (($771) + 4)|0; + $775 = $774; + $776 = HEAP32[$775>>2]|0; + $777 = (_bitshift64Ashr(0,($773|0),32)|0); + $778 = tempRet0; + $779 = $594; + $780 = $779; + $781 = HEAP32[$780>>2]|0; + $782 = (($779) + 4)|0; + $783 = $782; + $784 = HEAP32[$783>>2]|0; + $785 = (_bitshift64Ashr(0,($781|0),32)|0); + $786 = tempRet0; + $787 = (___muldi3(($785|0),($786|0),($777|0),($778|0))|0); + $788 = tempRet0; + $789 = (_i64Add(($769|0),($770|0),($787|0),($788|0))|0); + $790 = tempRet0; + $791 = (_bitshift64Shl(($789|0),($790|0),1)|0); + $792 = tempRet0; + $793 = ((($output)) + 88|0); + $794 = $793; + $795 = $794; + HEAP32[$795>>2] = $791; + $796 = (($794) + 4)|0; + $797 = $796; + HEAP32[$797>>2] = $792; + $798 = $282; + $799 = $798; + $800 = HEAP32[$799>>2]|0; + $801 = (($798) + 4)|0; + $802 = $801; + $803 = HEAP32[$802>>2]|0; + $804 = (_bitshift64Ashr(0,($800|0),32)|0); + $805 = tempRet0; + $806 = (___muldi3(($804|0),($805|0),($804|0),($805|0))|0); + $807 = tempRet0; + $808 = $160; + $809 = $808; + $810 = HEAP32[$809>>2]|0; + $811 = (($808) + 4)|0; + $812 = $811; + $813 = HEAP32[$812>>2]|0; + $814 = (_bitshift64Ashr(0,($810|0),32)|0); + $815 = tempRet0; + $816 = $444; + $817 = $816; + $818 = HEAP32[$817>>2]|0; + $819 = (($816) + 4)|0; + $820 = $819; + $821 = HEAP32[$820>>2]|0; + $822 = (_bitshift64Ashr(0,($818|0),32)|0); + $823 = tempRet0; + $824 = (___muldi3(($822|0),($823|0),($814|0),($815|0))|0); + $825 = tempRet0; + $826 = $224; + $827 = $826; + $828 = HEAP32[$827>>2]|0; + $829 = (($826) + 4)|0; + $830 = $829; + $831 = HEAP32[$830>>2]|0; + $832 = (_bitshift64Ashr(0,($828|0),32)|0); + $833 = tempRet0; + $834 = $388; + $835 = $834; + $836 = HEAP32[$835>>2]|0; + $837 = (($834) + 4)|0; + $838 = $837; + $839 = HEAP32[$838>>2]|0; + $840 = (_bitshift64Ashr(0,($836|0),32)|0); + $841 = tempRet0; + $842 = (___muldi3(($840|0),($841|0),($832|0),($833|0))|0); + $843 = tempRet0; + $844 = $102; + $845 = $844; + $846 = HEAP32[$845>>2]|0; + $847 = (($844) + 4)|0; + $848 = $847; + $849 = HEAP32[$848>>2]|0; + $850 = (_bitshift64Ashr(0,($846|0),32)|0); + $851 = tempRet0; + $852 = $594; + $853 = $852; + $854 = HEAP32[$853>>2]|0; + $855 = (($852) + 4)|0; + $856 = $855; + $857 = HEAP32[$856>>2]|0; + $858 = (_bitshift64Ashr(0,($854|0),32)|0); + $859 = tempRet0; + $860 = (___muldi3(($858|0),($859|0),($850|0),($851|0))|0); + $861 = tempRet0; + $862 = (_i64Add(($860|0),($861|0),($842|0),($843|0))|0); + $863 = tempRet0; + $864 = (_bitshift64Shl(($862|0),($863|0),1)|0); + $865 = tempRet0; + $866 = (_i64Add(($864|0),($865|0),($824|0),($825|0))|0); + $867 = tempRet0; + $868 = (_bitshift64Shl(($866|0),($867|0),1)|0); + $869 = tempRet0; + $870 = (_i64Add(($868|0),($869|0),($806|0),($807|0))|0); + $871 = tempRet0; + $872 = ((($output)) + 96|0); + $873 = $872; + $874 = $873; + HEAP32[$874>>2] = $870; + $875 = (($873) + 4)|0; + $876 = $875; + HEAP32[$876>>2] = $871; + $877 = $282; + $878 = $877; + $879 = HEAP32[$878>>2]|0; + $880 = (($877) + 4)|0; + $881 = $880; + $882 = HEAP32[$881>>2]|0; + $883 = (_bitshift64Ashr(0,($879|0),32)|0); + $884 = tempRet0; + $885 = $388; + $886 = $885; + $887 = HEAP32[$886>>2]|0; + $888 = (($885) + 4)|0; + $889 = $888; + $890 = HEAP32[$889>>2]|0; + $891 = (_bitshift64Ashr(0,($887|0),32)|0); + $892 = tempRet0; + $893 = (___muldi3(($891|0),($892|0),($883|0),($884|0))|0); + $894 = tempRet0; + $895 = $224; + $896 = $895; + $897 = HEAP32[$896>>2]|0; + $898 = (($895) + 4)|0; + $899 = $898; + $900 = HEAP32[$899>>2]|0; + $901 = (_bitshift64Ashr(0,($897|0),32)|0); + $902 = tempRet0; + $903 = $444; + $904 = $903; + $905 = HEAP32[$904>>2]|0; + $906 = (($903) + 4)|0; + $907 = $906; + $908 = HEAP32[$907>>2]|0; + $909 = (_bitshift64Ashr(0,($905|0),32)|0); + $910 = tempRet0; + $911 = (___muldi3(($909|0),($910|0),($901|0),($902|0))|0); + $912 = tempRet0; + $913 = (_i64Add(($911|0),($912|0),($893|0),($894|0))|0); + $914 = tempRet0; + $915 = $160; + $916 = $915; + $917 = HEAP32[$916>>2]|0; + $918 = (($915) + 4)|0; + $919 = $918; + $920 = HEAP32[$919>>2]|0; + $921 = (_bitshift64Ashr(0,($917|0),32)|0); + $922 = tempRet0; + $923 = $594; + $924 = $923; + $925 = HEAP32[$924>>2]|0; + $926 = (($923) + 4)|0; + $927 = $926; + $928 = HEAP32[$927>>2]|0; + $929 = (_bitshift64Ashr(0,($925|0),32)|0); + $930 = tempRet0; + $931 = (___muldi3(($929|0),($930|0),($921|0),($922|0))|0); + $932 = tempRet0; + $933 = (_i64Add(($913|0),($914|0),($931|0),($932|0))|0); + $934 = tempRet0; + $935 = (_bitshift64Shl(($933|0),($934|0),1)|0); + $936 = tempRet0; + $937 = ((($output)) + 104|0); + $938 = $937; + $939 = $938; + HEAP32[$939>>2] = $935; + $940 = (($938) + 4)|0; + $941 = $940; + HEAP32[$941>>2] = $936; + $942 = $388; + $943 = $942; + $944 = HEAP32[$943>>2]|0; + $945 = (($942) + 4)|0; + $946 = $945; + $947 = HEAP32[$946>>2]|0; + $948 = (_bitshift64Ashr(0,($944|0),32)|0); + $949 = tempRet0; + $950 = (___muldi3(($948|0),($949|0),($948|0),($949|0))|0); + $951 = tempRet0; + $952 = $282; + $953 = $952; + $954 = HEAP32[$953>>2]|0; + $955 = (($952) + 4)|0; + $956 = $955; + $957 = HEAP32[$956>>2]|0; + $958 = (_bitshift64Ashr(0,($954|0),32)|0); + $959 = tempRet0; + $960 = $444; + $961 = $960; + $962 = HEAP32[$961>>2]|0; + $963 = (($960) + 4)|0; + $964 = $963; + $965 = HEAP32[$964>>2]|0; + $966 = (_bitshift64Ashr(0,($962|0),32)|0); + $967 = tempRet0; + $968 = (___muldi3(($966|0),($967|0),($958|0),($959|0))|0); + $969 = tempRet0; + $970 = (_i64Add(($968|0),($969|0),($950|0),($951|0))|0); + $971 = tempRet0; + $972 = $224; + $973 = $972; + $974 = HEAP32[$973>>2]|0; + $975 = (($972) + 4)|0; + $976 = $975; + $977 = HEAP32[$976>>2]|0; + $978 = (_bitshift64Ashr(0,($974|0),31)|0); + $979 = tempRet0; + $980 = $594; + $981 = $980; + $982 = HEAP32[$981>>2]|0; + $983 = (($980) + 4)|0; + $984 = $983; + $985 = HEAP32[$984>>2]|0; + $986 = (_bitshift64Ashr(0,($982|0),32)|0); + $987 = tempRet0; + $988 = (___muldi3(($986|0),($987|0),($978|0),($979|0))|0); + $989 = tempRet0; + $990 = (_i64Add(($970|0),($971|0),($988|0),($989|0))|0); + $991 = tempRet0; + $992 = (_bitshift64Shl(($990|0),($991|0),1)|0); + $993 = tempRet0; + $994 = ((($output)) + 112|0); + $995 = $994; + $996 = $995; + HEAP32[$996>>2] = $992; + $997 = (($995) + 4)|0; + $998 = $997; + HEAP32[$998>>2] = $993; + $999 = $388; + $1000 = $999; + $1001 = HEAP32[$1000>>2]|0; + $1002 = (($999) + 4)|0; + $1003 = $1002; + $1004 = HEAP32[$1003>>2]|0; + $1005 = (_bitshift64Ashr(0,($1001|0),32)|0); + $1006 = tempRet0; + $1007 = $444; + $1008 = $1007; + $1009 = HEAP32[$1008>>2]|0; + $1010 = (($1007) + 4)|0; + $1011 = $1010; + $1012 = HEAP32[$1011>>2]|0; + $1013 = (_bitshift64Ashr(0,($1009|0),32)|0); + $1014 = tempRet0; + $1015 = (___muldi3(($1013|0),($1014|0),($1005|0),($1006|0))|0); + $1016 = tempRet0; + $1017 = $282; + $1018 = $1017; + $1019 = HEAP32[$1018>>2]|0; + $1020 = (($1017) + 4)|0; + $1021 = $1020; + $1022 = HEAP32[$1021>>2]|0; + $1023 = (_bitshift64Ashr(0,($1019|0),32)|0); + $1024 = tempRet0; + $1025 = $594; + $1026 = $1025; + $1027 = HEAP32[$1026>>2]|0; + $1028 = (($1025) + 4)|0; + $1029 = $1028; + $1030 = HEAP32[$1029>>2]|0; + $1031 = (_bitshift64Ashr(0,($1027|0),32)|0); + $1032 = tempRet0; + $1033 = (___muldi3(($1031|0),($1032|0),($1023|0),($1024|0))|0); + $1034 = tempRet0; + $1035 = (_i64Add(($1033|0),($1034|0),($1015|0),($1016|0))|0); + $1036 = tempRet0; + $1037 = (_bitshift64Shl(($1035|0),($1036|0),1)|0); + $1038 = tempRet0; + $1039 = ((($output)) + 120|0); + $1040 = $1039; + $1041 = $1040; + HEAP32[$1041>>2] = $1037; + $1042 = (($1040) + 4)|0; + $1043 = $1042; + HEAP32[$1043>>2] = $1038; + $1044 = $444; + $1045 = $1044; + $1046 = HEAP32[$1045>>2]|0; + $1047 = (($1044) + 4)|0; + $1048 = $1047; + $1049 = HEAP32[$1048>>2]|0; + $1050 = (_bitshift64Ashr(0,($1046|0),32)|0); + $1051 = tempRet0; + $1052 = (___muldi3(($1050|0),($1051|0),($1050|0),($1051|0))|0); + $1053 = tempRet0; + $1054 = $388; + $1055 = $1054; + $1056 = HEAP32[$1055>>2]|0; + $1057 = (($1054) + 4)|0; + $1058 = $1057; + $1059 = HEAP32[$1058>>2]|0; + $1060 = (_bitshift64Ashr(0,($1056|0),30)|0); + $1061 = tempRet0; + $1062 = $594; + $1063 = $1062; + $1064 = HEAP32[$1063>>2]|0; + $1065 = (($1062) + 4)|0; + $1066 = $1065; + $1067 = HEAP32[$1066>>2]|0; + $1068 = (_bitshift64Ashr(0,($1064|0),32)|0); + $1069 = tempRet0; + $1070 = (___muldi3(($1068|0),($1069|0),($1060|0),($1061|0))|0); + $1071 = tempRet0; + $1072 = (_i64Add(($1070|0),($1071|0),($1052|0),($1053|0))|0); + $1073 = tempRet0; + $1074 = ((($output)) + 128|0); + $1075 = $1074; + $1076 = $1075; + HEAP32[$1076>>2] = $1072; + $1077 = (($1075) + 4)|0; + $1078 = $1077; + HEAP32[$1078>>2] = $1073; + $1079 = $444; + $1080 = $1079; + $1081 = HEAP32[$1080>>2]|0; + $1082 = (($1079) + 4)|0; + $1083 = $1082; + $1084 = HEAP32[$1083>>2]|0; + $1085 = (_bitshift64Ashr(0,($1081|0),31)|0); + $1086 = tempRet0; + $1087 = $594; + $1088 = $1087; + $1089 = HEAP32[$1088>>2]|0; + $1090 = (($1087) + 4)|0; + $1091 = $1090; + $1092 = HEAP32[$1091>>2]|0; + $1093 = (_bitshift64Ashr(0,($1089|0),32)|0); + $1094 = tempRet0; + $1095 = (___muldi3(($1093|0),($1094|0),($1085|0),($1086|0))|0); + $1096 = tempRet0; + $1097 = ((($output)) + 136|0); + $1098 = $1097; + $1099 = $1098; + HEAP32[$1099>>2] = $1095; + $1100 = (($1098) + 4)|0; + $1101 = $1100; + HEAP32[$1101>>2] = $1096; + $1102 = $594; + $1103 = $1102; + $1104 = HEAP32[$1103>>2]|0; + $1105 = (($1102) + 4)|0; + $1106 = $1105; + $1107 = HEAP32[$1106>>2]|0; + $1108 = (_bitshift64Ashr(0,($1104|0),32)|0); + $1109 = tempRet0; + $1110 = (_bitshift64Ashr(0,($1104|0),31)|0); + $1111 = tempRet0; + $1112 = (___muldi3(($1110|0),($1111|0),($1108|0),($1109|0))|0); + $1113 = tempRet0; + $1114 = ((($output)) + 144|0); + $1115 = $1114; + $1116 = $1115; + HEAP32[$1116>>2] = $1112; + $1117 = (($1115) + 4)|0; + $1118 = $1117; + HEAP32[$1118>>2] = $1113; + return; +} +function _swap_conditional($a,$b,$0,$1) { + $a = $a|0; + $b = $b|0; + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, $exitcond = 0, $i$02 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_i64Subtract(0,0,($0|0),($1|0))|0); + $3 = tempRet0; + $i$02 = 0; + while(1) { + $4 = (($a) + ($i$02<<3)|0); + $5 = $4; + $6 = $5; + $7 = HEAP32[$6>>2]|0; + $8 = (($5) + 4)|0; + $9 = $8; + $10 = HEAP32[$9>>2]|0; + $11 = (($b) + ($i$02<<3)|0); + $12 = $11; + $13 = $12; + $14 = HEAP32[$13>>2]|0; + $15 = (($12) + 4)|0; + $16 = $15; + $17 = HEAP32[$16>>2]|0; + $18 = $14 ^ $7; + $19 = $17 ^ $10; + $20 = $18 & $2; + $21 = $19 & $3; + $22 = $20 ^ $7; + $21 ^ $10; + $23 = (_bitshift64Ashr(0,($22|0),32)|0); + $24 = tempRet0; + $25 = $4; + $26 = $25; + HEAP32[$26>>2] = $23; + $27 = (($25) + 4)|0; + $28 = $27; + HEAP32[$28>>2] = $24; + $29 = $11; + $30 = $29; + $31 = HEAP32[$30>>2]|0; + $32 = (($29) + 4)|0; + $33 = $32; + $34 = HEAP32[$33>>2]|0; + $35 = $20 ^ $31; + $21 ^ $34; + $36 = (_bitshift64Ashr(0,($35|0),32)|0); + $37 = tempRet0; + $38 = $11; + $39 = $38; + HEAP32[$39>>2] = $36; + $40 = (($38) + 4)|0; + $41 = $40; + HEAP32[$41>>2] = $37; + $42 = (($i$02) + 1)|0; + $exitcond = ($42|0)==(10); + if ($exitcond) { + break; + } else { + $i$02 = $42; + } + } + return; +} +function _fmonty($x2,$z2,$x3,$z3,$x,$z,$xprime,$zprime,$qmqp) { + $x2 = $x2|0; + $z2 = $z2|0; + $x3 = $x3|0; + $z3 = $z3|0; + $x = $x|0; + $z = $z|0; + $xprime = $xprime|0; + $zprime = $zprime|0; + $qmqp = $qmqp|0; + var $0 = 0, $origx = 0, $origxprime = 0, $xx = 0, $xxprime = 0, $xxxprime = 0, $zz = 0, $zzprime = 0, $zzz = 0, $zzzprime = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1232|0; + $origx = sp + 1144|0; + $origxprime = sp + 1064|0; + $zzz = sp + 912|0; + $xx = sp + 760|0; + $zz = sp + 608|0; + $xxprime = sp + 456|0; + $zzprime = sp + 304|0; + $zzzprime = sp + 152|0; + $xxxprime = sp; + dest=$origx; src=$x; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsum($x,$z); + _fdifference($z,$origx); + dest=$origxprime; src=$xprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsum($xprime,$zprime); + _fdifference($zprime,$origxprime); + _fproduct($xxprime,$xprime,$z); + _fproduct($zzprime,$x,$zprime); + _freduce_degree($xxprime); + _freduce_coefficients($xxprime); + _freduce_degree($zzprime); + _freduce_coefficients($zzprime); + dest=$origxprime; src=$xxprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsum($xxprime,$zzprime); + _fdifference($zzprime,$origxprime); + _fsquare($xxxprime,$xxprime); + _fsquare($zzzprime,$zzprime); + _fproduct($zzprime,$zzzprime,$qmqp); + _freduce_degree($zzprime); + _freduce_coefficients($zzprime); + dest=$x3; src=$xxxprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$z3; src=$zzprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsquare($xx,$x); + _fsquare($zz,$z); + _fproduct($x2,$xx,$zz); + _freduce_degree($x2); + _freduce_coefficients($x2); + _fdifference($zz,$xx); + $0 = ((($zzz)) + 80|0); + dest=$0; stop=dest+72|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + _fscalar_product($zzz,$zz); + _freduce_coefficients($zzz); + _fsum($zzz,$xx); + _fproduct($z2,$zz,$zzz); + _freduce_degree($z2); + _freduce_coefficients($z2); + STACKTOP = sp;return; +} +function _fsum($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $output; + $1 = $0; + $2 = HEAP32[$1>>2]|0; + $3 = (($0) + 4)|0; + $4 = $3; + $5 = HEAP32[$4>>2]|0; + $6 = $in; + $7 = $6; + $8 = HEAP32[$7>>2]|0; + $9 = (($6) + 4)|0; + $10 = $9; + $11 = HEAP32[$10>>2]|0; + $12 = (_i64Add(($8|0),($11|0),($2|0),($5|0))|0); + $13 = tempRet0; + $14 = $output; + $15 = $14; + HEAP32[$15>>2] = $12; + $16 = (($14) + 4)|0; + $17 = $16; + HEAP32[$17>>2] = $13; + $18 = ((($output)) + 8|0); + $19 = $18; + $20 = $19; + $21 = HEAP32[$20>>2]|0; + $22 = (($19) + 4)|0; + $23 = $22; + $24 = HEAP32[$23>>2]|0; + $25 = ((($in)) + 8|0); + $26 = $25; + $27 = $26; + $28 = HEAP32[$27>>2]|0; + $29 = (($26) + 4)|0; + $30 = $29; + $31 = HEAP32[$30>>2]|0; + $32 = (_i64Add(($28|0),($31|0),($21|0),($24|0))|0); + $33 = tempRet0; + $34 = $18; + $35 = $34; + HEAP32[$35>>2] = $32; + $36 = (($34) + 4)|0; + $37 = $36; + HEAP32[$37>>2] = $33; + $38 = ((($output)) + 16|0); + $39 = $38; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = (($39) + 4)|0; + $43 = $42; + $44 = HEAP32[$43>>2]|0; + $45 = ((($in)) + 16|0); + $46 = $45; + $47 = $46; + $48 = HEAP32[$47>>2]|0; + $49 = (($46) + 4)|0; + $50 = $49; + $51 = HEAP32[$50>>2]|0; + $52 = (_i64Add(($48|0),($51|0),($41|0),($44|0))|0); + $53 = tempRet0; + $54 = $38; + $55 = $54; + HEAP32[$55>>2] = $52; + $56 = (($54) + 4)|0; + $57 = $56; + HEAP32[$57>>2] = $53; + $58 = ((($output)) + 24|0); + $59 = $58; + $60 = $59; + $61 = HEAP32[$60>>2]|0; + $62 = (($59) + 4)|0; + $63 = $62; + $64 = HEAP32[$63>>2]|0; + $65 = ((($in)) + 24|0); + $66 = $65; + $67 = $66; + $68 = HEAP32[$67>>2]|0; + $69 = (($66) + 4)|0; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $72 = (_i64Add(($68|0),($71|0),($61|0),($64|0))|0); + $73 = tempRet0; + $74 = $58; + $75 = $74; + HEAP32[$75>>2] = $72; + $76 = (($74) + 4)|0; + $77 = $76; + HEAP32[$77>>2] = $73; + $78 = ((($output)) + 32|0); + $79 = $78; + $80 = $79; + $81 = HEAP32[$80>>2]|0; + $82 = (($79) + 4)|0; + $83 = $82; + $84 = HEAP32[$83>>2]|0; + $85 = ((($in)) + 32|0); + $86 = $85; + $87 = $86; + $88 = HEAP32[$87>>2]|0; + $89 = (($86) + 4)|0; + $90 = $89; + $91 = HEAP32[$90>>2]|0; + $92 = (_i64Add(($88|0),($91|0),($81|0),($84|0))|0); + $93 = tempRet0; + $94 = $78; + $95 = $94; + HEAP32[$95>>2] = $92; + $96 = (($94) + 4)|0; + $97 = $96; + HEAP32[$97>>2] = $93; + $98 = ((($output)) + 40|0); + $99 = $98; + $100 = $99; + $101 = HEAP32[$100>>2]|0; + $102 = (($99) + 4)|0; + $103 = $102; + $104 = HEAP32[$103>>2]|0; + $105 = ((($in)) + 40|0); + $106 = $105; + $107 = $106; + $108 = HEAP32[$107>>2]|0; + $109 = (($106) + 4)|0; + $110 = $109; + $111 = HEAP32[$110>>2]|0; + $112 = (_i64Add(($108|0),($111|0),($101|0),($104|0))|0); + $113 = tempRet0; + $114 = $98; + $115 = $114; + HEAP32[$115>>2] = $112; + $116 = (($114) + 4)|0; + $117 = $116; + HEAP32[$117>>2] = $113; + $118 = ((($output)) + 48|0); + $119 = $118; + $120 = $119; + $121 = HEAP32[$120>>2]|0; + $122 = (($119) + 4)|0; + $123 = $122; + $124 = HEAP32[$123>>2]|0; + $125 = ((($in)) + 48|0); + $126 = $125; + $127 = $126; + $128 = HEAP32[$127>>2]|0; + $129 = (($126) + 4)|0; + $130 = $129; + $131 = HEAP32[$130>>2]|0; + $132 = (_i64Add(($128|0),($131|0),($121|0),($124|0))|0); + $133 = tempRet0; + $134 = $118; + $135 = $134; + HEAP32[$135>>2] = $132; + $136 = (($134) + 4)|0; + $137 = $136; + HEAP32[$137>>2] = $133; + $138 = ((($output)) + 56|0); + $139 = $138; + $140 = $139; + $141 = HEAP32[$140>>2]|0; + $142 = (($139) + 4)|0; + $143 = $142; + $144 = HEAP32[$143>>2]|0; + $145 = ((($in)) + 56|0); + $146 = $145; + $147 = $146; + $148 = HEAP32[$147>>2]|0; + $149 = (($146) + 4)|0; + $150 = $149; + $151 = HEAP32[$150>>2]|0; + $152 = (_i64Add(($148|0),($151|0),($141|0),($144|0))|0); + $153 = tempRet0; + $154 = $138; + $155 = $154; + HEAP32[$155>>2] = $152; + $156 = (($154) + 4)|0; + $157 = $156; + HEAP32[$157>>2] = $153; + $158 = ((($output)) + 64|0); + $159 = $158; + $160 = $159; + $161 = HEAP32[$160>>2]|0; + $162 = (($159) + 4)|0; + $163 = $162; + $164 = HEAP32[$163>>2]|0; + $165 = ((($in)) + 64|0); + $166 = $165; + $167 = $166; + $168 = HEAP32[$167>>2]|0; + $169 = (($166) + 4)|0; + $170 = $169; + $171 = HEAP32[$170>>2]|0; + $172 = (_i64Add(($168|0),($171|0),($161|0),($164|0))|0); + $173 = tempRet0; + $174 = $158; + $175 = $174; + HEAP32[$175>>2] = $172; + $176 = (($174) + 4)|0; + $177 = $176; + HEAP32[$177>>2] = $173; + $178 = ((($output)) + 72|0); + $179 = $178; + $180 = $179; + $181 = HEAP32[$180>>2]|0; + $182 = (($179) + 4)|0; + $183 = $182; + $184 = HEAP32[$183>>2]|0; + $185 = ((($in)) + 72|0); + $186 = $185; + $187 = $186; + $188 = HEAP32[$187>>2]|0; + $189 = (($186) + 4)|0; + $190 = $189; + $191 = HEAP32[$190>>2]|0; + $192 = (_i64Add(($188|0),($191|0),($181|0),($184|0))|0); + $193 = tempRet0; + $194 = $178; + $195 = $194; + HEAP32[$195>>2] = $192; + $196 = (($194) + 4)|0; + $197 = $196; + HEAP32[$197>>2] = $193; + return; +} +function _fdifference($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $in; + $1 = $0; + $2 = HEAP32[$1>>2]|0; + $3 = (($0) + 4)|0; + $4 = $3; + $5 = HEAP32[$4>>2]|0; + $6 = $output; + $7 = $6; + $8 = HEAP32[$7>>2]|0; + $9 = (($6) + 4)|0; + $10 = $9; + $11 = HEAP32[$10>>2]|0; + $12 = (_i64Subtract(($2|0),($5|0),($8|0),($11|0))|0); + $13 = tempRet0; + $14 = $output; + $15 = $14; + HEAP32[$15>>2] = $12; + $16 = (($14) + 4)|0; + $17 = $16; + HEAP32[$17>>2] = $13; + $18 = ((($in)) + 8|0); + $19 = $18; + $20 = $19; + $21 = HEAP32[$20>>2]|0; + $22 = (($19) + 4)|0; + $23 = $22; + $24 = HEAP32[$23>>2]|0; + $25 = ((($output)) + 8|0); + $26 = $25; + $27 = $26; + $28 = HEAP32[$27>>2]|0; + $29 = (($26) + 4)|0; + $30 = $29; + $31 = HEAP32[$30>>2]|0; + $32 = (_i64Subtract(($21|0),($24|0),($28|0),($31|0))|0); + $33 = tempRet0; + $34 = $25; + $35 = $34; + HEAP32[$35>>2] = $32; + $36 = (($34) + 4)|0; + $37 = $36; + HEAP32[$37>>2] = $33; + $38 = ((($in)) + 16|0); + $39 = $38; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = (($39) + 4)|0; + $43 = $42; + $44 = HEAP32[$43>>2]|0; + $45 = ((($output)) + 16|0); + $46 = $45; + $47 = $46; + $48 = HEAP32[$47>>2]|0; + $49 = (($46) + 4)|0; + $50 = $49; + $51 = HEAP32[$50>>2]|0; + $52 = (_i64Subtract(($41|0),($44|0),($48|0),($51|0))|0); + $53 = tempRet0; + $54 = $45; + $55 = $54; + HEAP32[$55>>2] = $52; + $56 = (($54) + 4)|0; + $57 = $56; + HEAP32[$57>>2] = $53; + $58 = ((($in)) + 24|0); + $59 = $58; + $60 = $59; + $61 = HEAP32[$60>>2]|0; + $62 = (($59) + 4)|0; + $63 = $62; + $64 = HEAP32[$63>>2]|0; + $65 = ((($output)) + 24|0); + $66 = $65; + $67 = $66; + $68 = HEAP32[$67>>2]|0; + $69 = (($66) + 4)|0; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $72 = (_i64Subtract(($61|0),($64|0),($68|0),($71|0))|0); + $73 = tempRet0; + $74 = $65; + $75 = $74; + HEAP32[$75>>2] = $72; + $76 = (($74) + 4)|0; + $77 = $76; + HEAP32[$77>>2] = $73; + $78 = ((($in)) + 32|0); + $79 = $78; + $80 = $79; + $81 = HEAP32[$80>>2]|0; + $82 = (($79) + 4)|0; + $83 = $82; + $84 = HEAP32[$83>>2]|0; + $85 = ((($output)) + 32|0); + $86 = $85; + $87 = $86; + $88 = HEAP32[$87>>2]|0; + $89 = (($86) + 4)|0; + $90 = $89; + $91 = HEAP32[$90>>2]|0; + $92 = (_i64Subtract(($81|0),($84|0),($88|0),($91|0))|0); + $93 = tempRet0; + $94 = $85; + $95 = $94; + HEAP32[$95>>2] = $92; + $96 = (($94) + 4)|0; + $97 = $96; + HEAP32[$97>>2] = $93; + $98 = ((($in)) + 40|0); + $99 = $98; + $100 = $99; + $101 = HEAP32[$100>>2]|0; + $102 = (($99) + 4)|0; + $103 = $102; + $104 = HEAP32[$103>>2]|0; + $105 = ((($output)) + 40|0); + $106 = $105; + $107 = $106; + $108 = HEAP32[$107>>2]|0; + $109 = (($106) + 4)|0; + $110 = $109; + $111 = HEAP32[$110>>2]|0; + $112 = (_i64Subtract(($101|0),($104|0),($108|0),($111|0))|0); + $113 = tempRet0; + $114 = $105; + $115 = $114; + HEAP32[$115>>2] = $112; + $116 = (($114) + 4)|0; + $117 = $116; + HEAP32[$117>>2] = $113; + $118 = ((($in)) + 48|0); + $119 = $118; + $120 = $119; + $121 = HEAP32[$120>>2]|0; + $122 = (($119) + 4)|0; + $123 = $122; + $124 = HEAP32[$123>>2]|0; + $125 = ((($output)) + 48|0); + $126 = $125; + $127 = $126; + $128 = HEAP32[$127>>2]|0; + $129 = (($126) + 4)|0; + $130 = $129; + $131 = HEAP32[$130>>2]|0; + $132 = (_i64Subtract(($121|0),($124|0),($128|0),($131|0))|0); + $133 = tempRet0; + $134 = $125; + $135 = $134; + HEAP32[$135>>2] = $132; + $136 = (($134) + 4)|0; + $137 = $136; + HEAP32[$137>>2] = $133; + $138 = ((($in)) + 56|0); + $139 = $138; + $140 = $139; + $141 = HEAP32[$140>>2]|0; + $142 = (($139) + 4)|0; + $143 = $142; + $144 = HEAP32[$143>>2]|0; + $145 = ((($output)) + 56|0); + $146 = $145; + $147 = $146; + $148 = HEAP32[$147>>2]|0; + $149 = (($146) + 4)|0; + $150 = $149; + $151 = HEAP32[$150>>2]|0; + $152 = (_i64Subtract(($141|0),($144|0),($148|0),($151|0))|0); + $153 = tempRet0; + $154 = $145; + $155 = $154; + HEAP32[$155>>2] = $152; + $156 = (($154) + 4)|0; + $157 = $156; + HEAP32[$157>>2] = $153; + $158 = ((($in)) + 64|0); + $159 = $158; + $160 = $159; + $161 = HEAP32[$160>>2]|0; + $162 = (($159) + 4)|0; + $163 = $162; + $164 = HEAP32[$163>>2]|0; + $165 = ((($output)) + 64|0); + $166 = $165; + $167 = $166; + $168 = HEAP32[$167>>2]|0; + $169 = (($166) + 4)|0; + $170 = $169; + $171 = HEAP32[$170>>2]|0; + $172 = (_i64Subtract(($161|0),($164|0),($168|0),($171|0))|0); + $173 = tempRet0; + $174 = $165; + $175 = $174; + HEAP32[$175>>2] = $172; + $176 = (($174) + 4)|0; + $177 = $176; + HEAP32[$177>>2] = $173; + $178 = ((($in)) + 72|0); + $179 = $178; + $180 = $179; + $181 = HEAP32[$180>>2]|0; + $182 = (($179) + 4)|0; + $183 = $182; + $184 = HEAP32[$183>>2]|0; + $185 = ((($output)) + 72|0); + $186 = $185; + $187 = $186; + $188 = HEAP32[$187>>2]|0; + $189 = (($186) + 4)|0; + $190 = $189; + $191 = HEAP32[$190>>2]|0; + $192 = (_i64Subtract(($181|0),($184|0),($188|0),($191|0))|0); + $193 = tempRet0; + $194 = $185; + $195 = $194; + HEAP32[$195>>2] = $192; + $196 = (($194) + 4)|0; + $197 = $196; + HEAP32[$197>>2] = $193; + return; +} +function _fscalar_product($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $in; + $1 = $0; + $2 = HEAP32[$1>>2]|0; + $3 = (($0) + 4)|0; + $4 = $3; + $5 = HEAP32[$4>>2]|0; + $6 = (___muldi3(($2|0),($5|0),121665,0)|0); + $7 = tempRet0; + $8 = $output; + $9 = $8; + HEAP32[$9>>2] = $6; + $10 = (($8) + 4)|0; + $11 = $10; + HEAP32[$11>>2] = $7; + $12 = ((($in)) + 8|0); + $13 = $12; + $14 = $13; + $15 = HEAP32[$14>>2]|0; + $16 = (($13) + 4)|0; + $17 = $16; + $18 = HEAP32[$17>>2]|0; + $19 = (___muldi3(($15|0),($18|0),121665,0)|0); + $20 = tempRet0; + $21 = ((($output)) + 8|0); + $22 = $21; + $23 = $22; + HEAP32[$23>>2] = $19; + $24 = (($22) + 4)|0; + $25 = $24; + HEAP32[$25>>2] = $20; + $26 = ((($in)) + 16|0); + $27 = $26; + $28 = $27; + $29 = HEAP32[$28>>2]|0; + $30 = (($27) + 4)|0; + $31 = $30; + $32 = HEAP32[$31>>2]|0; + $33 = (___muldi3(($29|0),($32|0),121665,0)|0); + $34 = tempRet0; + $35 = ((($output)) + 16|0); + $36 = $35; + $37 = $36; + HEAP32[$37>>2] = $33; + $38 = (($36) + 4)|0; + $39 = $38; + HEAP32[$39>>2] = $34; + $40 = ((($in)) + 24|0); + $41 = $40; + $42 = $41; + $43 = HEAP32[$42>>2]|0; + $44 = (($41) + 4)|0; + $45 = $44; + $46 = HEAP32[$45>>2]|0; + $47 = (___muldi3(($43|0),($46|0),121665,0)|0); + $48 = tempRet0; + $49 = ((($output)) + 24|0); + $50 = $49; + $51 = $50; + HEAP32[$51>>2] = $47; + $52 = (($50) + 4)|0; + $53 = $52; + HEAP32[$53>>2] = $48; + $54 = ((($in)) + 32|0); + $55 = $54; + $56 = $55; + $57 = HEAP32[$56>>2]|0; + $58 = (($55) + 4)|0; + $59 = $58; + $60 = HEAP32[$59>>2]|0; + $61 = (___muldi3(($57|0),($60|0),121665,0)|0); + $62 = tempRet0; + $63 = ((($output)) + 32|0); + $64 = $63; + $65 = $64; + HEAP32[$65>>2] = $61; + $66 = (($64) + 4)|0; + $67 = $66; + HEAP32[$67>>2] = $62; + $68 = ((($in)) + 40|0); + $69 = $68; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $72 = (($69) + 4)|0; + $73 = $72; + $74 = HEAP32[$73>>2]|0; + $75 = (___muldi3(($71|0),($74|0),121665,0)|0); + $76 = tempRet0; + $77 = ((($output)) + 40|0); + $78 = $77; + $79 = $78; + HEAP32[$79>>2] = $75; + $80 = (($78) + 4)|0; + $81 = $80; + HEAP32[$81>>2] = $76; + $82 = ((($in)) + 48|0); + $83 = $82; + $84 = $83; + $85 = HEAP32[$84>>2]|0; + $86 = (($83) + 4)|0; + $87 = $86; + $88 = HEAP32[$87>>2]|0; + $89 = (___muldi3(($85|0),($88|0),121665,0)|0); + $90 = tempRet0; + $91 = ((($output)) + 48|0); + $92 = $91; + $93 = $92; + HEAP32[$93>>2] = $89; + $94 = (($92) + 4)|0; + $95 = $94; + HEAP32[$95>>2] = $90; + $96 = ((($in)) + 56|0); + $97 = $96; + $98 = $97; + $99 = HEAP32[$98>>2]|0; + $100 = (($97) + 4)|0; + $101 = $100; + $102 = HEAP32[$101>>2]|0; + $103 = (___muldi3(($99|0),($102|0),121665,0)|0); + $104 = tempRet0; + $105 = ((($output)) + 56|0); + $106 = $105; + $107 = $106; + HEAP32[$107>>2] = $103; + $108 = (($106) + 4)|0; + $109 = $108; + HEAP32[$109>>2] = $104; + $110 = ((($in)) + 64|0); + $111 = $110; + $112 = $111; + $113 = HEAP32[$112>>2]|0; + $114 = (($111) + 4)|0; + $115 = $114; + $116 = HEAP32[$115>>2]|0; + $117 = (___muldi3(($113|0),($116|0),121665,0)|0); + $118 = tempRet0; + $119 = ((($output)) + 64|0); + $120 = $119; + $121 = $120; + HEAP32[$121>>2] = $117; + $122 = (($120) + 4)|0; + $123 = $122; + HEAP32[$123>>2] = $118; + $124 = ((($in)) + 72|0); + $125 = $124; + $126 = $125; + $127 = HEAP32[$126>>2]|0; + $128 = (($125) + 4)|0; + $129 = $128; + $130 = HEAP32[$129>>2]|0; + $131 = (___muldi3(($127|0),($130|0),121665,0)|0); + $132 = tempRet0; + $133 = ((($output)) + 72|0); + $134 = $133; + $135 = $134; + HEAP32[$135>>2] = $131; + $136 = (($134) + 4)|0; + $137 = $136; + HEAP32[$137>>2] = $132; + return; +} +function _crypto_sign_ed25519_ref10_fe_0($h) { + $h = $h|0; + var dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + dest=$h; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + return; +} +function _crypto_sign_ed25519_ref10_fe_1($h) { + $h = $h|0; + var $0 = 0, dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + HEAP32[$h>>2] = 1; + $0 = ((($h)) + 4|0); + dest=$0; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + return; +} +function _crypto_sign_ed25519_ref10_fe_add($h,$f,$g) { + $h = $h|0; + $f = $f|0; + $g = $g|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$f>>2]|0; + $1 = ((($f)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($f)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($f)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($f)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($f)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 24|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($f)) + 28|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($f)) + 32|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($f)) + 36|0); + $18 = HEAP32[$17>>2]|0; + $19 = HEAP32[$g>>2]|0; + $20 = ((($g)) + 4|0); + $21 = HEAP32[$20>>2]|0; + $22 = ((($g)) + 8|0); + $23 = HEAP32[$22>>2]|0; + $24 = ((($g)) + 12|0); + $25 = HEAP32[$24>>2]|0; + $26 = ((($g)) + 16|0); + $27 = HEAP32[$26>>2]|0; + $28 = ((($g)) + 20|0); + $29 = HEAP32[$28>>2]|0; + $30 = ((($g)) + 24|0); + $31 = HEAP32[$30>>2]|0; + $32 = ((($g)) + 28|0); + $33 = HEAP32[$32>>2]|0; + $34 = ((($g)) + 32|0); + $35 = HEAP32[$34>>2]|0; + $36 = ((($g)) + 36|0); + $37 = HEAP32[$36>>2]|0; + $38 = (($19) + ($0))|0; + $39 = (($21) + ($2))|0; + $40 = (($23) + ($4))|0; + $41 = (($25) + ($6))|0; + $42 = (($27) + ($8))|0; + $43 = (($29) + ($10))|0; + $44 = (($31) + ($12))|0; + $45 = (($33) + ($14))|0; + $46 = (($35) + ($16))|0; + $47 = (($37) + ($18))|0; + HEAP32[$h>>2] = $38; + $48 = ((($h)) + 4|0); + HEAP32[$48>>2] = $39; + $49 = ((($h)) + 8|0); + HEAP32[$49>>2] = $40; + $50 = ((($h)) + 12|0); + HEAP32[$50>>2] = $41; + $51 = ((($h)) + 16|0); + HEAP32[$51>>2] = $42; + $52 = ((($h)) + 20|0); + HEAP32[$52>>2] = $43; + $53 = ((($h)) + 24|0); + HEAP32[$53>>2] = $44; + $54 = ((($h)) + 28|0); + HEAP32[$54>>2] = $45; + $55 = ((($h)) + 32|0); + HEAP32[$55>>2] = $46; + $56 = ((($h)) + 36|0); + HEAP32[$56>>2] = $47; + return; +} +function _crypto_sign_ed25519_ref10_fe_cmov($f,$g,$b) { + $f = $f|0; + $g = $g|0; + $b = $b|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$f>>2]|0; + $1 = ((($f)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($f)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($f)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($f)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($f)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 24|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($f)) + 28|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($f)) + 32|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($f)) + 36|0); + $18 = HEAP32[$17>>2]|0; + $19 = HEAP32[$g>>2]|0; + $20 = ((($g)) + 4|0); + $21 = HEAP32[$20>>2]|0; + $22 = ((($g)) + 8|0); + $23 = HEAP32[$22>>2]|0; + $24 = ((($g)) + 12|0); + $25 = HEAP32[$24>>2]|0; + $26 = ((($g)) + 16|0); + $27 = HEAP32[$26>>2]|0; + $28 = ((($g)) + 20|0); + $29 = HEAP32[$28>>2]|0; + $30 = ((($g)) + 24|0); + $31 = HEAP32[$30>>2]|0; + $32 = ((($g)) + 28|0); + $33 = HEAP32[$32>>2]|0; + $34 = ((($g)) + 32|0); + $35 = HEAP32[$34>>2]|0; + $36 = ((($g)) + 36|0); + $37 = HEAP32[$36>>2]|0; + $38 = $19 ^ $0; + $39 = $21 ^ $2; + $40 = $23 ^ $4; + $41 = $25 ^ $6; + $42 = $27 ^ $8; + $43 = $29 ^ $10; + $44 = $31 ^ $12; + $45 = $33 ^ $14; + $46 = $35 ^ $16; + $47 = $37 ^ $18; + $48 = (0 - ($b))|0; + $49 = $38 & $48; + $50 = $39 & $48; + $51 = $40 & $48; + $52 = $41 & $48; + $53 = $42 & $48; + $54 = $43 & $48; + $55 = $44 & $48; + $56 = $45 & $48; + $57 = $46 & $48; + $58 = $47 & $48; + $59 = $49 ^ $0; + HEAP32[$f>>2] = $59; + $60 = $50 ^ $2; + HEAP32[$1>>2] = $60; + $61 = $51 ^ $4; + HEAP32[$3>>2] = $61; + $62 = $52 ^ $6; + HEAP32[$5>>2] = $62; + $63 = $53 ^ $8; + HEAP32[$7>>2] = $63; + $64 = $54 ^ $10; + HEAP32[$9>>2] = $64; + $65 = $55 ^ $12; + HEAP32[$11>>2] = $65; + $66 = $56 ^ $14; + HEAP32[$13>>2] = $66; + $67 = $57 ^ $16; + HEAP32[$15>>2] = $67; + $68 = $58 ^ $18; + HEAP32[$17>>2] = $68; + return; +} +function _crypto_sign_ed25519_ref10_fe_copy($h,$f) { + $h = $h|0; + $f = $f|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$f>>2]|0; + $1 = ((($f)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($f)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($f)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($f)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($f)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 24|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($f)) + 28|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($f)) + 32|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($f)) + 36|0); + $18 = HEAP32[$17>>2]|0; + HEAP32[$h>>2] = $0; + $19 = ((($h)) + 4|0); + HEAP32[$19>>2] = $2; + $20 = ((($h)) + 8|0); + HEAP32[$20>>2] = $4; + $21 = ((($h)) + 12|0); + HEAP32[$21>>2] = $6; + $22 = ((($h)) + 16|0); + HEAP32[$22>>2] = $8; + $23 = ((($h)) + 20|0); + HEAP32[$23>>2] = $10; + $24 = ((($h)) + 24|0); + HEAP32[$24>>2] = $12; + $25 = ((($h)) + 28|0); + HEAP32[$25>>2] = $14; + $26 = ((($h)) + 32|0); + HEAP32[$26>>2] = $16; + $27 = ((($h)) + 36|0); + HEAP32[$27>>2] = $18; + return; +} +function _crypto_sign_ed25519_ref10_fe_frombytes($h,$s) { + $h = $h|0; + $s = $s|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = (_load_4($s)|0); + $1 = tempRet0; + $2 = ((($s)) + 4|0); + $3 = (_load_3($2)|0); + $4 = tempRet0; + $5 = (_bitshift64Shl(($3|0),($4|0),6)|0); + $6 = tempRet0; + $7 = ((($s)) + 7|0); + $8 = (_load_3($7)|0); + $9 = tempRet0; + $10 = (_bitshift64Shl(($8|0),($9|0),5)|0); + $11 = tempRet0; + $12 = ((($s)) + 10|0); + $13 = (_load_3($12)|0); + $14 = tempRet0; + $15 = (_bitshift64Shl(($13|0),($14|0),3)|0); + $16 = tempRet0; + $17 = ((($s)) + 13|0); + $18 = (_load_3($17)|0); + $19 = tempRet0; + $20 = (_bitshift64Shl(($18|0),($19|0),2)|0); + $21 = tempRet0; + $22 = ((($s)) + 16|0); + $23 = (_load_4($22)|0); + $24 = tempRet0; + $25 = ((($s)) + 20|0); + $26 = (_load_3($25)|0); + $27 = tempRet0; + $28 = (_bitshift64Shl(($26|0),($27|0),7)|0); + $29 = tempRet0; + $30 = ((($s)) + 23|0); + $31 = (_load_3($30)|0); + $32 = tempRet0; + $33 = (_bitshift64Shl(($31|0),($32|0),5)|0); + $34 = tempRet0; + $35 = ((($s)) + 26|0); + $36 = (_load_3($35)|0); + $37 = tempRet0; + $38 = (_bitshift64Shl(($36|0),($37|0),4)|0); + $39 = tempRet0; + $40 = ((($s)) + 29|0); + $41 = (_load_3($40)|0); + $42 = tempRet0; + $43 = (_bitshift64Shl(($41|0),($42|0),2)|0); + $44 = tempRet0; + $45 = $43 & 33554428; + $46 = (_i64Add(($45|0),0,16777216,0)|0); + $47 = tempRet0; + $48 = (_bitshift64Lshr(($46|0),($47|0),25)|0); + $49 = tempRet0; + $50 = (_i64Subtract(0,0,($48|0),($49|0))|0); + $51 = tempRet0; + $52 = $50 & 19; + $53 = (_i64Add(($52|0),0,($0|0),($1|0))|0); + $54 = tempRet0; + $55 = (_bitshift64Shl(($48|0),($49|0),25)|0); + $56 = tempRet0; + $57 = (_i64Add(($5|0),($6|0),16777216,0)|0); + $58 = tempRet0; + $59 = (_bitshift64Ashr(($57|0),($58|0),25)|0); + $60 = tempRet0; + $61 = (_i64Add(($59|0),($60|0),($10|0),($11|0))|0); + $62 = tempRet0; + $63 = (_bitshift64Shl(($59|0),($60|0),25)|0); + $64 = tempRet0; + $65 = (_i64Subtract(($5|0),($6|0),($63|0),($64|0))|0); + $66 = tempRet0; + $67 = (_i64Add(($15|0),($16|0),16777216,0)|0); + $68 = tempRet0; + $69 = (_bitshift64Ashr(($67|0),($68|0),25)|0); + $70 = tempRet0; + $71 = (_i64Add(($69|0),($70|0),($20|0),($21|0))|0); + $72 = tempRet0; + $73 = (_bitshift64Shl(($69|0),($70|0),25)|0); + $74 = tempRet0; + $75 = (_i64Subtract(($15|0),($16|0),($73|0),($74|0))|0); + $76 = tempRet0; + $77 = (_i64Add(($23|0),($24|0),16777216,0)|0); + $78 = tempRet0; + $79 = (_bitshift64Ashr(($77|0),($78|0),25)|0); + $80 = tempRet0; + $81 = (_i64Add(($28|0),($29|0),($79|0),($80|0))|0); + $82 = tempRet0; + $83 = (_bitshift64Shl(($79|0),($80|0),25)|0); + $84 = tempRet0; + $85 = (_i64Subtract(($23|0),($24|0),($83|0),($84|0))|0); + $86 = tempRet0; + $87 = (_i64Add(($33|0),($34|0),16777216,0)|0); + $88 = tempRet0; + $89 = (_bitshift64Ashr(($87|0),($88|0),25)|0); + $90 = tempRet0; + $91 = (_i64Add(($89|0),($90|0),($38|0),($39|0))|0); + $92 = tempRet0; + $93 = (_bitshift64Shl(($89|0),($90|0),25)|0); + $94 = tempRet0; + $95 = (_i64Add(($53|0),($54|0),33554432,0)|0); + $96 = tempRet0; + $97 = (_bitshift64Ashr(($95|0),($96|0),26)|0); + $98 = tempRet0; + $99 = (_i64Add(($65|0),($66|0),($97|0),($98|0))|0); + $100 = tempRet0; + $101 = (_bitshift64Shl(($97|0),($98|0),26)|0); + $102 = tempRet0; + $103 = (_i64Subtract(($53|0),($54|0),($101|0),($102|0))|0); + $104 = tempRet0; + $105 = (_i64Add(($61|0),($62|0),33554432,0)|0); + $106 = tempRet0; + $107 = (_bitshift64Ashr(($105|0),($106|0),26)|0); + $108 = tempRet0; + $109 = (_i64Add(($75|0),($76|0),($107|0),($108|0))|0); + $110 = tempRet0; + $111 = (_bitshift64Shl(($107|0),($108|0),26)|0); + $112 = tempRet0; + $113 = (_i64Subtract(($61|0),($62|0),($111|0),($112|0))|0); + $114 = tempRet0; + $115 = (_i64Add(($71|0),($72|0),33554432,0)|0); + $116 = tempRet0; + $117 = (_bitshift64Ashr(($115|0),($116|0),26)|0); + $118 = tempRet0; + $119 = (_i64Add(($85|0),($86|0),($117|0),($118|0))|0); + $120 = tempRet0; + $121 = (_bitshift64Shl(($117|0),($118|0),26)|0); + $122 = tempRet0; + $123 = (_i64Subtract(($71|0),($72|0),($121|0),($122|0))|0); + $124 = tempRet0; + $125 = (_i64Add(($81|0),($82|0),33554432,0)|0); + $126 = tempRet0; + $127 = (_bitshift64Ashr(($125|0),($126|0),26)|0); + $128 = tempRet0; + $129 = (_i64Add(($127|0),($128|0),($33|0),($34|0))|0); + $130 = tempRet0; + $131 = (_i64Subtract(($129|0),($130|0),($93|0),($94|0))|0); + $132 = tempRet0; + $133 = (_bitshift64Shl(($127|0),($128|0),26)|0); + $134 = tempRet0; + $135 = (_i64Subtract(($81|0),($82|0),($133|0),($134|0))|0); + $136 = tempRet0; + $137 = (_i64Add(($91|0),($92|0),33554432,0)|0); + $138 = tempRet0; + $139 = (_bitshift64Ashr(($137|0),($138|0),26)|0); + $140 = tempRet0; + $141 = (_i64Add(($139|0),($140|0),($45|0),0)|0); + $142 = tempRet0; + $143 = (_i64Subtract(($141|0),($142|0),($55|0),($56|0))|0); + $144 = tempRet0; + $145 = (_bitshift64Shl(($139|0),($140|0),26)|0); + $146 = tempRet0; + $147 = (_i64Subtract(($91|0),($92|0),($145|0),($146|0))|0); + $148 = tempRet0; + HEAP32[$h>>2] = $103; + $149 = ((($h)) + 4|0); + HEAP32[$149>>2] = $99; + $150 = ((($h)) + 8|0); + HEAP32[$150>>2] = $113; + $151 = ((($h)) + 12|0); + HEAP32[$151>>2] = $109; + $152 = ((($h)) + 16|0); + HEAP32[$152>>2] = $123; + $153 = ((($h)) + 20|0); + HEAP32[$153>>2] = $119; + $154 = ((($h)) + 24|0); + HEAP32[$154>>2] = $135; + $155 = ((($h)) + 28|0); + HEAP32[$155>>2] = $131; + $156 = ((($h)) + 32|0); + HEAP32[$156>>2] = $147; + $157 = ((($h)) + 36|0); + HEAP32[$157>>2] = $143; + return; +} +function _load_4($in) { + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + var $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP8[$in>>0]|0; + $1 = $0&255; + $2 = ((($in)) + 1|0); + $3 = HEAP8[$2>>0]|0; + $4 = $3&255; + $5 = (_bitshift64Shl(($4|0),0,8)|0); + $6 = tempRet0; + $7 = $5 | $1; + $8 = ((($in)) + 2|0); + $9 = HEAP8[$8>>0]|0; + $10 = $9&255; + $11 = (_bitshift64Shl(($10|0),0,16)|0); + $12 = tempRet0; + $13 = $7 | $11; + $14 = $6 | $12; + $15 = ((($in)) + 3|0); + $16 = HEAP8[$15>>0]|0; + $17 = $16&255; + $18 = (_bitshift64Shl(($17|0),0,24)|0); + $19 = tempRet0; + $20 = $13 | $18; + $21 = $14 | $19; + tempRet0 = ($21); + return ($20|0); +} +function _load_3($in) { + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP8[$in>>0]|0; + $1 = $0&255; + $2 = ((($in)) + 1|0); + $3 = HEAP8[$2>>0]|0; + $4 = $3&255; + $5 = (_bitshift64Shl(($4|0),0,8)|0); + $6 = tempRet0; + $7 = $5 | $1; + $8 = ((($in)) + 2|0); + $9 = HEAP8[$8>>0]|0; + $10 = $9&255; + $11 = (_bitshift64Shl(($10|0),0,16)|0); + $12 = tempRet0; + $13 = $7 | $11; + $14 = $6 | $12; + tempRet0 = ($14); + return ($13|0); +} +function _crypto_sign_ed25519_ref10_fe_invert($out,$z) { + $out = $out|0; + $z = $z|0; + var $0 = 0, $1 = 0, $2 = 0, $exitcond = 0, $exitcond10 = 0, $exitcond11 = 0, $i$74 = 0, $i$83 = 0, $i$92 = 0, $t0 = 0, $t1 = 0, $t2 = 0, $t3 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 160|0; + $t0 = sp + 120|0; + $t1 = sp + 80|0; + $t2 = sp + 40|0; + $t3 = sp; + _crypto_sign_ed25519_ref10_fe_sq($t0,$z); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_mul($t1,$z,$t1); + _crypto_sign_ed25519_ref10_fe_mul($t0,$t0,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t0); + _crypto_sign_ed25519_ref10_fe_mul($t1,$t1,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_mul($t2,$t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + _crypto_sign_ed25519_ref10_fe_mul($t2,$t3,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); + $i$74 = 1; + while(1) { + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + $0 = (($i$74) + 1)|0; + $exitcond11 = ($0|0)==(50); + if ($exitcond11) { + break; + } else { + $i$74 = $0; + } + } + _crypto_sign_ed25519_ref10_fe_mul($t2,$t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t3,$t2); + $i$83 = 1; + while(1) { + _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); + $1 = (($i$83) + 1)|0; + $exitcond10 = ($1|0)==(100); + if ($exitcond10) { + break; + } else { + $i$83 = $1; + } + } + _crypto_sign_ed25519_ref10_fe_mul($t2,$t3,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + $i$92 = 1; + while(1) { + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + $2 = (($i$92) + 1)|0; + $exitcond = ($2|0)==(50); + if ($exitcond) { + break; + } else { + $i$92 = $2; + } + } + _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_mul($out,$t1,$t0); + STACKTOP = sp;return; +} +function _crypto_sign_ed25519_ref10_fe_isnegative($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $s = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; + $s = sp; + _crypto_sign_ed25519_ref10_fe_tobytes($s,$f); + $0 = HEAP8[$s>>0]|0; + $1 = $0&255; + $2 = $1 & 1; + STACKTOP = sp;return ($2|0); +} +function _crypto_sign_ed25519_ref10_fe_isnonzero($f) { + $f = $f|0; + var $0 = 0, $s = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; + $s = sp; + _crypto_sign_ed25519_ref10_fe_tobytes($s,$f); + $0 = (_crypto_verify_32_ref($s,33172)|0); + STACKTOP = sp;return ($0|0); +} +function _crypto_sign_ed25519_ref10_fe_mul($h,$f,$g) { + $h = $h|0; + $f = $f|0; + $g = $g|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; + var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0; + var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0; + var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0; + var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0; + var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0; + var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0; + var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0; + var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0; + var $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0; + var $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0; + var $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0; + var $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; + var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; + var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$f>>2]|0; + $1 = ((($f)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($f)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($f)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($f)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($f)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 24|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($f)) + 28|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($f)) + 32|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($f)) + 36|0); + $18 = HEAP32[$17>>2]|0; + $19 = HEAP32[$g>>2]|0; + $20 = ((($g)) + 4|0); + $21 = HEAP32[$20>>2]|0; + $22 = ((($g)) + 8|0); + $23 = HEAP32[$22>>2]|0; + $24 = ((($g)) + 12|0); + $25 = HEAP32[$24>>2]|0; + $26 = ((($g)) + 16|0); + $27 = HEAP32[$26>>2]|0; + $28 = ((($g)) + 20|0); + $29 = HEAP32[$28>>2]|0; + $30 = ((($g)) + 24|0); + $31 = HEAP32[$30>>2]|0; + $32 = ((($g)) + 28|0); + $33 = HEAP32[$32>>2]|0; + $34 = ((($g)) + 32|0); + $35 = HEAP32[$34>>2]|0; + $36 = ((($g)) + 36|0); + $37 = HEAP32[$36>>2]|0; + $38 = ($21*19)|0; + $39 = ($23*19)|0; + $40 = ($25*19)|0; + $41 = ($27*19)|0; + $42 = ($29*19)|0; + $43 = ($31*19)|0; + $44 = ($33*19)|0; + $45 = ($35*19)|0; + $46 = ($37*19)|0; + $47 = $2 << 1; + $48 = $6 << 1; + $49 = $10 << 1; + $50 = $14 << 1; + $51 = $18 << 1; + $52 = ($0|0)<(0); + $53 = $52 << 31 >> 31; + $54 = ($19|0)<(0); + $55 = $54 << 31 >> 31; + $56 = (___muldi3(($19|0),($55|0),($0|0),($53|0))|0); + $57 = tempRet0; + $58 = ($21|0)<(0); + $59 = $58 << 31 >> 31; + $60 = (___muldi3(($21|0),($59|0),($0|0),($53|0))|0); + $61 = tempRet0; + $62 = ($23|0)<(0); + $63 = $62 << 31 >> 31; + $64 = (___muldi3(($23|0),($63|0),($0|0),($53|0))|0); + $65 = tempRet0; + $66 = ($25|0)<(0); + $67 = $66 << 31 >> 31; + $68 = (___muldi3(($25|0),($67|0),($0|0),($53|0))|0); + $69 = tempRet0; + $70 = ($27|0)<(0); + $71 = $70 << 31 >> 31; + $72 = (___muldi3(($27|0),($71|0),($0|0),($53|0))|0); + $73 = tempRet0; + $74 = ($29|0)<(0); + $75 = $74 << 31 >> 31; + $76 = (___muldi3(($29|0),($75|0),($0|0),($53|0))|0); + $77 = tempRet0; + $78 = ($31|0)<(0); + $79 = $78 << 31 >> 31; + $80 = (___muldi3(($31|0),($79|0),($0|0),($53|0))|0); + $81 = tempRet0; + $82 = ($33|0)<(0); + $83 = $82 << 31 >> 31; + $84 = (___muldi3(($33|0),($83|0),($0|0),($53|0))|0); + $85 = tempRet0; + $86 = ($35|0)<(0); + $87 = $86 << 31 >> 31; + $88 = (___muldi3(($35|0),($87|0),($0|0),($53|0))|0); + $89 = tempRet0; + $90 = ($37|0)<(0); + $91 = $90 << 31 >> 31; + $92 = (___muldi3(($37|0),($91|0),($0|0),($53|0))|0); + $93 = tempRet0; + $94 = ($2|0)<(0); + $95 = $94 << 31 >> 31; + $96 = (___muldi3(($19|0),($55|0),($2|0),($95|0))|0); + $97 = tempRet0; + $98 = ($47|0)<(0); + $99 = $98 << 31 >> 31; + $100 = (___muldi3(($21|0),($59|0),($47|0),($99|0))|0); + $101 = tempRet0; + $102 = (___muldi3(($23|0),($63|0),($2|0),($95|0))|0); + $103 = tempRet0; + $104 = (___muldi3(($25|0),($67|0),($47|0),($99|0))|0); + $105 = tempRet0; + $106 = (___muldi3(($27|0),($71|0),($2|0),($95|0))|0); + $107 = tempRet0; + $108 = (___muldi3(($29|0),($75|0),($47|0),($99|0))|0); + $109 = tempRet0; + $110 = (___muldi3(($31|0),($79|0),($2|0),($95|0))|0); + $111 = tempRet0; + $112 = (___muldi3(($33|0),($83|0),($47|0),($99|0))|0); + $113 = tempRet0; + $114 = (___muldi3(($35|0),($87|0),($2|0),($95|0))|0); + $115 = tempRet0; + $116 = ($46|0)<(0); + $117 = $116 << 31 >> 31; + $118 = (___muldi3(($46|0),($117|0),($47|0),($99|0))|0); + $119 = tempRet0; + $120 = ($4|0)<(0); + $121 = $120 << 31 >> 31; + $122 = (___muldi3(($19|0),($55|0),($4|0),($121|0))|0); + $123 = tempRet0; + $124 = (___muldi3(($21|0),($59|0),($4|0),($121|0))|0); + $125 = tempRet0; + $126 = (___muldi3(($23|0),($63|0),($4|0),($121|0))|0); + $127 = tempRet0; + $128 = (___muldi3(($25|0),($67|0),($4|0),($121|0))|0); + $129 = tempRet0; + $130 = (___muldi3(($27|0),($71|0),($4|0),($121|0))|0); + $131 = tempRet0; + $132 = (___muldi3(($29|0),($75|0),($4|0),($121|0))|0); + $133 = tempRet0; + $134 = (___muldi3(($31|0),($79|0),($4|0),($121|0))|0); + $135 = tempRet0; + $136 = (___muldi3(($33|0),($83|0),($4|0),($121|0))|0); + $137 = tempRet0; + $138 = ($45|0)<(0); + $139 = $138 << 31 >> 31; + $140 = (___muldi3(($45|0),($139|0),($4|0),($121|0))|0); + $141 = tempRet0; + $142 = (___muldi3(($46|0),($117|0),($4|0),($121|0))|0); + $143 = tempRet0; + $144 = ($6|0)<(0); + $145 = $144 << 31 >> 31; + $146 = (___muldi3(($19|0),($55|0),($6|0),($145|0))|0); + $147 = tempRet0; + $148 = ($48|0)<(0); + $149 = $148 << 31 >> 31; + $150 = (___muldi3(($21|0),($59|0),($48|0),($149|0))|0); + $151 = tempRet0; + $152 = (___muldi3(($23|0),($63|0),($6|0),($145|0))|0); + $153 = tempRet0; + $154 = (___muldi3(($25|0),($67|0),($48|0),($149|0))|0); + $155 = tempRet0; + $156 = (___muldi3(($27|0),($71|0),($6|0),($145|0))|0); + $157 = tempRet0; + $158 = (___muldi3(($29|0),($75|0),($48|0),($149|0))|0); + $159 = tempRet0; + $160 = (___muldi3(($31|0),($79|0),($6|0),($145|0))|0); + $161 = tempRet0; + $162 = ($44|0)<(0); + $163 = $162 << 31 >> 31; + $164 = (___muldi3(($44|0),($163|0),($48|0),($149|0))|0); + $165 = tempRet0; + $166 = (___muldi3(($45|0),($139|0),($6|0),($145|0))|0); + $167 = tempRet0; + $168 = (___muldi3(($46|0),($117|0),($48|0),($149|0))|0); + $169 = tempRet0; + $170 = ($8|0)<(0); + $171 = $170 << 31 >> 31; + $172 = (___muldi3(($19|0),($55|0),($8|0),($171|0))|0); + $173 = tempRet0; + $174 = (___muldi3(($21|0),($59|0),($8|0),($171|0))|0); + $175 = tempRet0; + $176 = (___muldi3(($23|0),($63|0),($8|0),($171|0))|0); + $177 = tempRet0; + $178 = (___muldi3(($25|0),($67|0),($8|0),($171|0))|0); + $179 = tempRet0; + $180 = (___muldi3(($27|0),($71|0),($8|0),($171|0))|0); + $181 = tempRet0; + $182 = (___muldi3(($29|0),($75|0),($8|0),($171|0))|0); + $183 = tempRet0; + $184 = ($43|0)<(0); + $185 = $184 << 31 >> 31; + $186 = (___muldi3(($43|0),($185|0),($8|0),($171|0))|0); + $187 = tempRet0; + $188 = (___muldi3(($44|0),($163|0),($8|0),($171|0))|0); + $189 = tempRet0; + $190 = (___muldi3(($45|0),($139|0),($8|0),($171|0))|0); + $191 = tempRet0; + $192 = (___muldi3(($46|0),($117|0),($8|0),($171|0))|0); + $193 = tempRet0; + $194 = ($10|0)<(0); + $195 = $194 << 31 >> 31; + $196 = (___muldi3(($19|0),($55|0),($10|0),($195|0))|0); + $197 = tempRet0; + $198 = ($49|0)<(0); + $199 = $198 << 31 >> 31; + $200 = (___muldi3(($21|0),($59|0),($49|0),($199|0))|0); + $201 = tempRet0; + $202 = (___muldi3(($23|0),($63|0),($10|0),($195|0))|0); + $203 = tempRet0; + $204 = (___muldi3(($25|0),($67|0),($49|0),($199|0))|0); + $205 = tempRet0; + $206 = (___muldi3(($27|0),($71|0),($10|0),($195|0))|0); + $207 = tempRet0; + $208 = ($42|0)<(0); + $209 = $208 << 31 >> 31; + $210 = (___muldi3(($42|0),($209|0),($49|0),($199|0))|0); + $211 = tempRet0; + $212 = (___muldi3(($43|0),($185|0),($10|0),($195|0))|0); + $213 = tempRet0; + $214 = (___muldi3(($44|0),($163|0),($49|0),($199|0))|0); + $215 = tempRet0; + $216 = (___muldi3(($45|0),($139|0),($10|0),($195|0))|0); + $217 = tempRet0; + $218 = (___muldi3(($46|0),($117|0),($49|0),($199|0))|0); + $219 = tempRet0; + $220 = ($12|0)<(0); + $221 = $220 << 31 >> 31; + $222 = (___muldi3(($19|0),($55|0),($12|0),($221|0))|0); + $223 = tempRet0; + $224 = (___muldi3(($21|0),($59|0),($12|0),($221|0))|0); + $225 = tempRet0; + $226 = (___muldi3(($23|0),($63|0),($12|0),($221|0))|0); + $227 = tempRet0; + $228 = (___muldi3(($25|0),($67|0),($12|0),($221|0))|0); + $229 = tempRet0; + $230 = ($41|0)<(0); + $231 = $230 << 31 >> 31; + $232 = (___muldi3(($41|0),($231|0),($12|0),($221|0))|0); + $233 = tempRet0; + $234 = (___muldi3(($42|0),($209|0),($12|0),($221|0))|0); + $235 = tempRet0; + $236 = (___muldi3(($43|0),($185|0),($12|0),($221|0))|0); + $237 = tempRet0; + $238 = (___muldi3(($44|0),($163|0),($12|0),($221|0))|0); + $239 = tempRet0; + $240 = (___muldi3(($45|0),($139|0),($12|0),($221|0))|0); + $241 = tempRet0; + $242 = (___muldi3(($46|0),($117|0),($12|0),($221|0))|0); + $243 = tempRet0; + $244 = ($14|0)<(0); + $245 = $244 << 31 >> 31; + $246 = (___muldi3(($19|0),($55|0),($14|0),($245|0))|0); + $247 = tempRet0; + $248 = ($50|0)<(0); + $249 = $248 << 31 >> 31; + $250 = (___muldi3(($21|0),($59|0),($50|0),($249|0))|0); + $251 = tempRet0; + $252 = (___muldi3(($23|0),($63|0),($14|0),($245|0))|0); + $253 = tempRet0; + $254 = ($40|0)<(0); + $255 = $254 << 31 >> 31; + $256 = (___muldi3(($40|0),($255|0),($50|0),($249|0))|0); + $257 = tempRet0; + $258 = (___muldi3(($41|0),($231|0),($14|0),($245|0))|0); + $259 = tempRet0; + $260 = (___muldi3(($42|0),($209|0),($50|0),($249|0))|0); + $261 = tempRet0; + $262 = (___muldi3(($43|0),($185|0),($14|0),($245|0))|0); + $263 = tempRet0; + $264 = (___muldi3(($44|0),($163|0),($50|0),($249|0))|0); + $265 = tempRet0; + $266 = (___muldi3(($45|0),($139|0),($14|0),($245|0))|0); + $267 = tempRet0; + $268 = (___muldi3(($46|0),($117|0),($50|0),($249|0))|0); + $269 = tempRet0; + $270 = ($16|0)<(0); + $271 = $270 << 31 >> 31; + $272 = (___muldi3(($19|0),($55|0),($16|0),($271|0))|0); + $273 = tempRet0; + $274 = (___muldi3(($21|0),($59|0),($16|0),($271|0))|0); + $275 = tempRet0; + $276 = ($39|0)<(0); + $277 = $276 << 31 >> 31; + $278 = (___muldi3(($39|0),($277|0),($16|0),($271|0))|0); + $279 = tempRet0; + $280 = (___muldi3(($40|0),($255|0),($16|0),($271|0))|0); + $281 = tempRet0; + $282 = (___muldi3(($41|0),($231|0),($16|0),($271|0))|0); + $283 = tempRet0; + $284 = (___muldi3(($42|0),($209|0),($16|0),($271|0))|0); + $285 = tempRet0; + $286 = (___muldi3(($43|0),($185|0),($16|0),($271|0))|0); + $287 = tempRet0; + $288 = (___muldi3(($44|0),($163|0),($16|0),($271|0))|0); + $289 = tempRet0; + $290 = (___muldi3(($45|0),($139|0),($16|0),($271|0))|0); + $291 = tempRet0; + $292 = (___muldi3(($46|0),($117|0),($16|0),($271|0))|0); + $293 = tempRet0; + $294 = ($18|0)<(0); + $295 = $294 << 31 >> 31; + $296 = (___muldi3(($19|0),($55|0),($18|0),($295|0))|0); + $297 = tempRet0; + $298 = ($51|0)<(0); + $299 = $298 << 31 >> 31; + $300 = ($38|0)<(0); + $301 = $300 << 31 >> 31; + $302 = (___muldi3(($38|0),($301|0),($51|0),($299|0))|0); + $303 = tempRet0; + $304 = (___muldi3(($39|0),($277|0),($18|0),($295|0))|0); + $305 = tempRet0; + $306 = (___muldi3(($40|0),($255|0),($51|0),($299|0))|0); + $307 = tempRet0; + $308 = (___muldi3(($41|0),($231|0),($18|0),($295|0))|0); + $309 = tempRet0; + $310 = (___muldi3(($42|0),($209|0),($51|0),($299|0))|0); + $311 = tempRet0; + $312 = (___muldi3(($43|0),($185|0),($18|0),($295|0))|0); + $313 = tempRet0; + $314 = (___muldi3(($44|0),($163|0),($51|0),($299|0))|0); + $315 = tempRet0; + $316 = (___muldi3(($45|0),($139|0),($18|0),($295|0))|0); + $317 = tempRet0; + $318 = (___muldi3(($46|0),($117|0),($51|0),($299|0))|0); + $319 = tempRet0; + $320 = (_i64Add(($302|0),($303|0),($56|0),($57|0))|0); + $321 = tempRet0; + $322 = (_i64Add(($320|0),($321|0),($278|0),($279|0))|0); + $323 = tempRet0; + $324 = (_i64Add(($322|0),($323|0),($256|0),($257|0))|0); + $325 = tempRet0; + $326 = (_i64Add(($324|0),($325|0),($232|0),($233|0))|0); + $327 = tempRet0; + $328 = (_i64Add(($326|0),($327|0),($210|0),($211|0))|0); + $329 = tempRet0; + $330 = (_i64Add(($328|0),($329|0),($186|0),($187|0))|0); + $331 = tempRet0; + $332 = (_i64Add(($330|0),($331|0),($164|0),($165|0))|0); + $333 = tempRet0; + $334 = (_i64Add(($332|0),($333|0),($140|0),($141|0))|0); + $335 = tempRet0; + $336 = (_i64Add(($334|0),($335|0),($118|0),($119|0))|0); + $337 = tempRet0; + $338 = (_i64Add(($60|0),($61|0),($96|0),($97|0))|0); + $339 = tempRet0; + $340 = (_i64Add(($150|0),($151|0),($172|0),($173|0))|0); + $341 = tempRet0; + $342 = (_i64Add(($340|0),($341|0),($126|0),($127|0))|0); + $343 = tempRet0; + $344 = (_i64Add(($342|0),($343|0),($104|0),($105|0))|0); + $345 = tempRet0; + $346 = (_i64Add(($344|0),($345|0),($72|0),($73|0))|0); + $347 = tempRet0; + $348 = (_i64Add(($346|0),($347|0),($310|0),($311|0))|0); + $349 = tempRet0; + $350 = (_i64Add(($348|0),($349|0),($286|0),($287|0))|0); + $351 = tempRet0; + $352 = (_i64Add(($350|0),($351|0),($264|0),($265|0))|0); + $353 = tempRet0; + $354 = (_i64Add(($352|0),($353|0),($240|0),($241|0))|0); + $355 = tempRet0; + $356 = (_i64Add(($354|0),($355|0),($218|0),($219|0))|0); + $357 = tempRet0; + $358 = (_i64Add(($336|0),($337|0),33554432,0)|0); + $359 = tempRet0; + $360 = (_bitshift64Ashr(($358|0),($359|0),26)|0); + $361 = tempRet0; + $362 = (_i64Add(($338|0),($339|0),($304|0),($305|0))|0); + $363 = tempRet0; + $364 = (_i64Add(($362|0),($363|0),($280|0),($281|0))|0); + $365 = tempRet0; + $366 = (_i64Add(($364|0),($365|0),($258|0),($259|0))|0); + $367 = tempRet0; + $368 = (_i64Add(($366|0),($367|0),($234|0),($235|0))|0); + $369 = tempRet0; + $370 = (_i64Add(($368|0),($369|0),($212|0),($213|0))|0); + $371 = tempRet0; + $372 = (_i64Add(($370|0),($371|0),($188|0),($189|0))|0); + $373 = tempRet0; + $374 = (_i64Add(($372|0),($373|0),($166|0),($167|0))|0); + $375 = tempRet0; + $376 = (_i64Add(($374|0),($375|0),($142|0),($143|0))|0); + $377 = tempRet0; + $378 = (_i64Add(($376|0),($377|0),($360|0),($361|0))|0); + $379 = tempRet0; + $380 = (_bitshift64Shl(($360|0),($361|0),26)|0); + $381 = tempRet0; + $382 = (_i64Subtract(($336|0),($337|0),($380|0),($381|0))|0); + $383 = tempRet0; + $384 = (_i64Add(($356|0),($357|0),33554432,0)|0); + $385 = tempRet0; + $386 = (_bitshift64Ashr(($384|0),($385|0),26)|0); + $387 = tempRet0; + $388 = (_i64Add(($174|0),($175|0),($196|0),($197|0))|0); + $389 = tempRet0; + $390 = (_i64Add(($388|0),($389|0),($152|0),($153|0))|0); + $391 = tempRet0; + $392 = (_i64Add(($390|0),($391|0),($128|0),($129|0))|0); + $393 = tempRet0; + $394 = (_i64Add(($392|0),($393|0),($106|0),($107|0))|0); + $395 = tempRet0; + $396 = (_i64Add(($394|0),($395|0),($76|0),($77|0))|0); + $397 = tempRet0; + $398 = (_i64Add(($396|0),($397|0),($312|0),($313|0))|0); + $399 = tempRet0; + $400 = (_i64Add(($398|0),($399|0),($288|0),($289|0))|0); + $401 = tempRet0; + $402 = (_i64Add(($400|0),($401|0),($266|0),($267|0))|0); + $403 = tempRet0; + $404 = (_i64Add(($402|0),($403|0),($242|0),($243|0))|0); + $405 = tempRet0; + $406 = (_i64Add(($404|0),($405|0),($386|0),($387|0))|0); + $407 = tempRet0; + $408 = (_bitshift64Shl(($386|0),($387|0),26)|0); + $409 = tempRet0; + $410 = (_i64Subtract(($356|0),($357|0),($408|0),($409|0))|0); + $411 = tempRet0; + $412 = (_i64Add(($378|0),($379|0),16777216,0)|0); + $413 = tempRet0; + $414 = (_bitshift64Ashr(($412|0),($413|0),25)|0); + $415 = tempRet0; + $416 = (_i64Add(($100|0),($101|0),($122|0),($123|0))|0); + $417 = tempRet0; + $418 = (_i64Add(($416|0),($417|0),($64|0),($65|0))|0); + $419 = tempRet0; + $420 = (_i64Add(($418|0),($419|0),($306|0),($307|0))|0); + $421 = tempRet0; + $422 = (_i64Add(($420|0),($421|0),($282|0),($283|0))|0); + $423 = tempRet0; + $424 = (_i64Add(($422|0),($423|0),($260|0),($261|0))|0); + $425 = tempRet0; + $426 = (_i64Add(($424|0),($425|0),($236|0),($237|0))|0); + $427 = tempRet0; + $428 = (_i64Add(($426|0),($427|0),($214|0),($215|0))|0); + $429 = tempRet0; + $430 = (_i64Add(($428|0),($429|0),($190|0),($191|0))|0); + $431 = tempRet0; + $432 = (_i64Add(($430|0),($431|0),($168|0),($169|0))|0); + $433 = tempRet0; + $434 = (_i64Add(($432|0),($433|0),($414|0),($415|0))|0); + $435 = tempRet0; + $436 = (_bitshift64Shl(($414|0),($415|0),25)|0); + $437 = tempRet0; + $438 = (_i64Subtract(($378|0),($379|0),($436|0),($437|0))|0); + $439 = tempRet0; + $440 = (_i64Add(($406|0),($407|0),16777216,0)|0); + $441 = tempRet0; + $442 = (_bitshift64Ashr(($440|0),($441|0),25)|0); + $443 = tempRet0; + $444 = (_i64Add(($200|0),($201|0),($222|0),($223|0))|0); + $445 = tempRet0; + $446 = (_i64Add(($444|0),($445|0),($176|0),($177|0))|0); + $447 = tempRet0; + $448 = (_i64Add(($446|0),($447|0),($154|0),($155|0))|0); + $449 = tempRet0; + $450 = (_i64Add(($448|0),($449|0),($130|0),($131|0))|0); + $451 = tempRet0; + $452 = (_i64Add(($450|0),($451|0),($108|0),($109|0))|0); + $453 = tempRet0; + $454 = (_i64Add(($452|0),($453|0),($80|0),($81|0))|0); + $455 = tempRet0; + $456 = (_i64Add(($454|0),($455|0),($314|0),($315|0))|0); + $457 = tempRet0; + $458 = (_i64Add(($456|0),($457|0),($290|0),($291|0))|0); + $459 = tempRet0; + $460 = (_i64Add(($458|0),($459|0),($268|0),($269|0))|0); + $461 = tempRet0; + $462 = (_i64Add(($460|0),($461|0),($442|0),($443|0))|0); + $463 = tempRet0; + $464 = (_bitshift64Shl(($442|0),($443|0),25)|0); + $465 = tempRet0; + $466 = (_i64Subtract(($406|0),($407|0),($464|0),($465|0))|0); + $467 = tempRet0; + $468 = (_i64Add(($434|0),($435|0),33554432,0)|0); + $469 = tempRet0; + $470 = (_bitshift64Ashr(($468|0),($469|0),26)|0); + $471 = tempRet0; + $472 = (_i64Add(($124|0),($125|0),($146|0),($147|0))|0); + $473 = tempRet0; + $474 = (_i64Add(($472|0),($473|0),($102|0),($103|0))|0); + $475 = tempRet0; + $476 = (_i64Add(($474|0),($475|0),($68|0),($69|0))|0); + $477 = tempRet0; + $478 = (_i64Add(($476|0),($477|0),($308|0),($309|0))|0); + $479 = tempRet0; + $480 = (_i64Add(($478|0),($479|0),($284|0),($285|0))|0); + $481 = tempRet0; + $482 = (_i64Add(($480|0),($481|0),($262|0),($263|0))|0); + $483 = tempRet0; + $484 = (_i64Add(($482|0),($483|0),($238|0),($239|0))|0); + $485 = tempRet0; + $486 = (_i64Add(($484|0),($485|0),($216|0),($217|0))|0); + $487 = tempRet0; + $488 = (_i64Add(($486|0),($487|0),($192|0),($193|0))|0); + $489 = tempRet0; + $490 = (_i64Add(($488|0),($489|0),($470|0),($471|0))|0); + $491 = tempRet0; + $492 = (_bitshift64Shl(($470|0),($471|0),26)|0); + $493 = tempRet0; + $494 = (_i64Subtract(($434|0),($435|0),($492|0),($493|0))|0); + $495 = tempRet0; + $496 = (_i64Add(($462|0),($463|0),33554432,0)|0); + $497 = tempRet0; + $498 = (_bitshift64Ashr(($496|0),($497|0),26)|0); + $499 = tempRet0; + $500 = (_i64Add(($224|0),($225|0),($246|0),($247|0))|0); + $501 = tempRet0; + $502 = (_i64Add(($500|0),($501|0),($202|0),($203|0))|0); + $503 = tempRet0; + $504 = (_i64Add(($502|0),($503|0),($178|0),($179|0))|0); + $505 = tempRet0; + $506 = (_i64Add(($504|0),($505|0),($156|0),($157|0))|0); + $507 = tempRet0; + $508 = (_i64Add(($506|0),($507|0),($132|0),($133|0))|0); + $509 = tempRet0; + $510 = (_i64Add(($508|0),($509|0),($110|0),($111|0))|0); + $511 = tempRet0; + $512 = (_i64Add(($510|0),($511|0),($84|0),($85|0))|0); + $513 = tempRet0; + $514 = (_i64Add(($512|0),($513|0),($316|0),($317|0))|0); + $515 = tempRet0; + $516 = (_i64Add(($514|0),($515|0),($292|0),($293|0))|0); + $517 = tempRet0; + $518 = (_i64Add(($516|0),($517|0),($498|0),($499|0))|0); + $519 = tempRet0; + $520 = (_bitshift64Shl(($498|0),($499|0),26)|0); + $521 = tempRet0; + $522 = (_i64Subtract(($462|0),($463|0),($520|0),($521|0))|0); + $523 = tempRet0; + $524 = (_i64Add(($490|0),($491|0),16777216,0)|0); + $525 = tempRet0; + $526 = (_bitshift64Ashr(($524|0),($525|0),25)|0); + $527 = tempRet0; + $528 = (_i64Add(($526|0),($527|0),($410|0),($411|0))|0); + $529 = tempRet0; + $530 = (_bitshift64Shl(($526|0),($527|0),25)|0); + $531 = tempRet0; + $532 = (_i64Subtract(($490|0),($491|0),($530|0),($531|0))|0); + $533 = tempRet0; + $534 = (_i64Add(($518|0),($519|0),16777216,0)|0); + $535 = tempRet0; + $536 = (_bitshift64Ashr(($534|0),($535|0),25)|0); + $537 = tempRet0; + $538 = (_i64Add(($250|0),($251|0),($272|0),($273|0))|0); + $539 = tempRet0; + $540 = (_i64Add(($538|0),($539|0),($226|0),($227|0))|0); + $541 = tempRet0; + $542 = (_i64Add(($540|0),($541|0),($204|0),($205|0))|0); + $543 = tempRet0; + $544 = (_i64Add(($542|0),($543|0),($180|0),($181|0))|0); + $545 = tempRet0; + $546 = (_i64Add(($544|0),($545|0),($158|0),($159|0))|0); + $547 = tempRet0; + $548 = (_i64Add(($546|0),($547|0),($134|0),($135|0))|0); + $549 = tempRet0; + $550 = (_i64Add(($548|0),($549|0),($112|0),($113|0))|0); + $551 = tempRet0; + $552 = (_i64Add(($550|0),($551|0),($88|0),($89|0))|0); + $553 = tempRet0; + $554 = (_i64Add(($552|0),($553|0),($318|0),($319|0))|0); + $555 = tempRet0; + $556 = (_i64Add(($554|0),($555|0),($536|0),($537|0))|0); + $557 = tempRet0; + $558 = (_bitshift64Shl(($536|0),($537|0),25)|0); + $559 = tempRet0; + $560 = (_i64Subtract(($518|0),($519|0),($558|0),($559|0))|0); + $561 = tempRet0; + $562 = (_i64Add(($528|0),($529|0),33554432,0)|0); + $563 = tempRet0; + $564 = (_bitshift64Ashr(($562|0),($563|0),26)|0); + $565 = tempRet0; + $566 = (_i64Add(($466|0),($467|0),($564|0),($565|0))|0); + $567 = tempRet0; + $568 = (_bitshift64Shl(($564|0),($565|0),26)|0); + $569 = tempRet0; + $570 = (_i64Subtract(($528|0),($529|0),($568|0),($569|0))|0); + $571 = tempRet0; + $572 = (_i64Add(($556|0),($557|0),33554432,0)|0); + $573 = tempRet0; + $574 = (_bitshift64Ashr(($572|0),($573|0),26)|0); + $575 = tempRet0; + $576 = (_i64Add(($274|0),($275|0),($296|0),($297|0))|0); + $577 = tempRet0; + $578 = (_i64Add(($576|0),($577|0),($252|0),($253|0))|0); + $579 = tempRet0; + $580 = (_i64Add(($578|0),($579|0),($228|0),($229|0))|0); + $581 = tempRet0; + $582 = (_i64Add(($580|0),($581|0),($206|0),($207|0))|0); + $583 = tempRet0; + $584 = (_i64Add(($582|0),($583|0),($182|0),($183|0))|0); + $585 = tempRet0; + $586 = (_i64Add(($584|0),($585|0),($160|0),($161|0))|0); + $587 = tempRet0; + $588 = (_i64Add(($586|0),($587|0),($136|0),($137|0))|0); + $589 = tempRet0; + $590 = (_i64Add(($588|0),($589|0),($114|0),($115|0))|0); + $591 = tempRet0; + $592 = (_i64Add(($590|0),($591|0),($92|0),($93|0))|0); + $593 = tempRet0; + $594 = (_i64Add(($592|0),($593|0),($574|0),($575|0))|0); + $595 = tempRet0; + $596 = (_bitshift64Shl(($574|0),($575|0),26)|0); + $597 = tempRet0; + $598 = (_i64Subtract(($556|0),($557|0),($596|0),($597|0))|0); + $599 = tempRet0; + $600 = (_i64Add(($594|0),($595|0),16777216,0)|0); + $601 = tempRet0; + $602 = (_bitshift64Ashr(($600|0),($601|0),25)|0); + $603 = tempRet0; + $604 = (___muldi3(($602|0),($603|0),19,0)|0); + $605 = tempRet0; + $606 = (_i64Add(($604|0),($605|0),($382|0),($383|0))|0); + $607 = tempRet0; + $608 = (_bitshift64Shl(($602|0),($603|0),25)|0); + $609 = tempRet0; + $610 = (_i64Subtract(($594|0),($595|0),($608|0),($609|0))|0); + $611 = tempRet0; + $612 = (_i64Add(($606|0),($607|0),33554432,0)|0); + $613 = tempRet0; + $614 = (_bitshift64Ashr(($612|0),($613|0),26)|0); + $615 = tempRet0; + $616 = (_i64Add(($438|0),($439|0),($614|0),($615|0))|0); + $617 = tempRet0; + $618 = (_bitshift64Shl(($614|0),($615|0),26)|0); + $619 = tempRet0; + $620 = (_i64Subtract(($606|0),($607|0),($618|0),($619|0))|0); + $621 = tempRet0; + HEAP32[$h>>2] = $620; + $622 = ((($h)) + 4|0); + HEAP32[$622>>2] = $616; + $623 = ((($h)) + 8|0); + HEAP32[$623>>2] = $494; + $624 = ((($h)) + 12|0); + HEAP32[$624>>2] = $532; + $625 = ((($h)) + 16|0); + HEAP32[$625>>2] = $570; + $626 = ((($h)) + 20|0); + HEAP32[$626>>2] = $566; + $627 = ((($h)) + 24|0); + HEAP32[$627>>2] = $522; + $628 = ((($h)) + 28|0); + HEAP32[$628>>2] = $560; + $629 = ((($h)) + 32|0); + HEAP32[$629>>2] = $598; + $630 = ((($h)) + 36|0); + HEAP32[$630>>2] = $610; + return; +} +function _crypto_sign_ed25519_ref10_fe_neg($h,$f) { + $h = $h|0; + $f = $f|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$f>>2]|0; + $1 = ((($f)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($f)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($f)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($f)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($f)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 24|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($f)) + 28|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($f)) + 32|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($f)) + 36|0); + $18 = HEAP32[$17>>2]|0; + $19 = (0 - ($0))|0; + $20 = (0 - ($2))|0; + $21 = (0 - ($4))|0; + $22 = (0 - ($6))|0; + $23 = (0 - ($8))|0; + $24 = (0 - ($10))|0; + $25 = (0 - ($12))|0; + $26 = (0 - ($14))|0; + $27 = (0 - ($16))|0; + $28 = (0 - ($18))|0; + HEAP32[$h>>2] = $19; + $29 = ((($h)) + 4|0); + HEAP32[$29>>2] = $20; + $30 = ((($h)) + 8|0); + HEAP32[$30>>2] = $21; + $31 = ((($h)) + 12|0); + HEAP32[$31>>2] = $22; + $32 = ((($h)) + 16|0); + HEAP32[$32>>2] = $23; + $33 = ((($h)) + 20|0); + HEAP32[$33>>2] = $24; + $34 = ((($h)) + 24|0); + HEAP32[$34>>2] = $25; + $35 = ((($h)) + 28|0); + HEAP32[$35>>2] = $26; + $36 = ((($h)) + 32|0); + HEAP32[$36>>2] = $27; + $37 = ((($h)) + 36|0); + HEAP32[$37>>2] = $28; + return; +} +function _crypto_sign_ed25519_ref10_fe_pow22523($out,$z) { + $out = $out|0; + $z = $z|0; + var $0 = 0, $1 = 0, $2 = 0, $exitcond = 0, $exitcond10 = 0, $exitcond11 = 0, $i$74 = 0, $i$83 = 0, $i$92 = 0, $t0 = 0, $t1 = 0, $t2 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; + $t0 = sp + 80|0; + $t1 = sp + 40|0; + $t2 = sp; + _crypto_sign_ed25519_ref10_fe_sq($t0,$z); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_mul($t1,$z,$t1); + _crypto_sign_ed25519_ref10_fe_mul($t0,$t0,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t0,$t0); + _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_mul($t1,$t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); + $i$74 = 1; + while(1) { + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + $0 = (($i$74) + 1)|0; + $exitcond11 = ($0|0)==(50); + if ($exitcond11) { + break; + } else { + $i$74 = $0; + } + } + _crypto_sign_ed25519_ref10_fe_mul($t1,$t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); + $i$83 = 1; + while(1) { + _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); + $1 = (($i$83) + 1)|0; + $exitcond10 = ($1|0)==(100); + if ($exitcond10) { + break; + } else { + $i$83 = $1; + } + } + _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + $i$92 = 1; + while(1) { + _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); + $2 = (($i$92) + 1)|0; + $exitcond = ($2|0)==(50); + if ($exitcond) { + break; + } else { + $i$92 = $2; + } + } + _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t0,$t0); + _crypto_sign_ed25519_ref10_fe_sq($t0,$t0); + _crypto_sign_ed25519_ref10_fe_mul($out,$t0,$z); + STACKTOP = sp;return; +} +function _crypto_sign_ed25519_ref10_fe_sq($h,$f) { + $h = $h|0; + $f = $f|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; + var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; + var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; + var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$f>>2]|0; + $1 = ((($f)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($f)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($f)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($f)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($f)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 24|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($f)) + 28|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($f)) + 32|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($f)) + 36|0); + $18 = HEAP32[$17>>2]|0; + $19 = $0 << 1; + $20 = $2 << 1; + $21 = $4 << 1; + $22 = $6 << 1; + $23 = $8 << 1; + $24 = $10 << 1; + $25 = $12 << 1; + $26 = $14 << 1; + $27 = ($10*38)|0; + $28 = ($12*19)|0; + $29 = ($14*38)|0; + $30 = ($16*19)|0; + $31 = ($18*38)|0; + $32 = ($0|0)<(0); + $33 = $32 << 31 >> 31; + $34 = (___muldi3(($0|0),($33|0),($0|0),($33|0))|0); + $35 = tempRet0; + $36 = ($19|0)<(0); + $37 = $36 << 31 >> 31; + $38 = ($2|0)<(0); + $39 = $38 << 31 >> 31; + $40 = (___muldi3(($19|0),($37|0),($2|0),($39|0))|0); + $41 = tempRet0; + $42 = ($4|0)<(0); + $43 = $42 << 31 >> 31; + $44 = (___muldi3(($4|0),($43|0),($19|0),($37|0))|0); + $45 = tempRet0; + $46 = ($6|0)<(0); + $47 = $46 << 31 >> 31; + $48 = (___muldi3(($6|0),($47|0),($19|0),($37|0))|0); + $49 = tempRet0; + $50 = ($8|0)<(0); + $51 = $50 << 31 >> 31; + $52 = (___muldi3(($8|0),($51|0),($19|0),($37|0))|0); + $53 = tempRet0; + $54 = ($10|0)<(0); + $55 = $54 << 31 >> 31; + $56 = (___muldi3(($10|0),($55|0),($19|0),($37|0))|0); + $57 = tempRet0; + $58 = ($12|0)<(0); + $59 = $58 << 31 >> 31; + $60 = (___muldi3(($12|0),($59|0),($19|0),($37|0))|0); + $61 = tempRet0; + $62 = ($14|0)<(0); + $63 = $62 << 31 >> 31; + $64 = (___muldi3(($14|0),($63|0),($19|0),($37|0))|0); + $65 = tempRet0; + $66 = ($16|0)<(0); + $67 = $66 << 31 >> 31; + $68 = (___muldi3(($16|0),($67|0),($19|0),($37|0))|0); + $69 = tempRet0; + $70 = ($18|0)<(0); + $71 = $70 << 31 >> 31; + $72 = (___muldi3(($18|0),($71|0),($19|0),($37|0))|0); + $73 = tempRet0; + $74 = ($20|0)<(0); + $75 = $74 << 31 >> 31; + $76 = (___muldi3(($20|0),($75|0),($2|0),($39|0))|0); + $77 = tempRet0; + $78 = (___muldi3(($20|0),($75|0),($4|0),($43|0))|0); + $79 = tempRet0; + $80 = ($22|0)<(0); + $81 = $80 << 31 >> 31; + $82 = (___muldi3(($22|0),($81|0),($20|0),($75|0))|0); + $83 = tempRet0; + $84 = (___muldi3(($8|0),($51|0),($20|0),($75|0))|0); + $85 = tempRet0; + $86 = ($24|0)<(0); + $87 = $86 << 31 >> 31; + $88 = (___muldi3(($24|0),($87|0),($20|0),($75|0))|0); + $89 = tempRet0; + $90 = (___muldi3(($12|0),($59|0),($20|0),($75|0))|0); + $91 = tempRet0; + $92 = ($26|0)<(0); + $93 = $92 << 31 >> 31; + $94 = (___muldi3(($26|0),($93|0),($20|0),($75|0))|0); + $95 = tempRet0; + $96 = (___muldi3(($16|0),($67|0),($20|0),($75|0))|0); + $97 = tempRet0; + $98 = ($31|0)<(0); + $99 = $98 << 31 >> 31; + $100 = (___muldi3(($31|0),($99|0),($20|0),($75|0))|0); + $101 = tempRet0; + $102 = (___muldi3(($4|0),($43|0),($4|0),($43|0))|0); + $103 = tempRet0; + $104 = ($21|0)<(0); + $105 = $104 << 31 >> 31; + $106 = (___muldi3(($21|0),($105|0),($6|0),($47|0))|0); + $107 = tempRet0; + $108 = (___muldi3(($8|0),($51|0),($21|0),($105|0))|0); + $109 = tempRet0; + $110 = (___muldi3(($10|0),($55|0),($21|0),($105|0))|0); + $111 = tempRet0; + $112 = (___muldi3(($12|0),($59|0),($21|0),($105|0))|0); + $113 = tempRet0; + $114 = (___muldi3(($14|0),($63|0),($21|0),($105|0))|0); + $115 = tempRet0; + $116 = ($30|0)<(0); + $117 = $116 << 31 >> 31; + $118 = (___muldi3(($30|0),($117|0),($21|0),($105|0))|0); + $119 = tempRet0; + $120 = (___muldi3(($31|0),($99|0),($4|0),($43|0))|0); + $121 = tempRet0; + $122 = (___muldi3(($22|0),($81|0),($6|0),($47|0))|0); + $123 = tempRet0; + $124 = (___muldi3(($22|0),($81|0),($8|0),($51|0))|0); + $125 = tempRet0; + $126 = (___muldi3(($24|0),($87|0),($22|0),($81|0))|0); + $127 = tempRet0; + $128 = (___muldi3(($12|0),($59|0),($22|0),($81|0))|0); + $129 = tempRet0; + $130 = ($29|0)<(0); + $131 = $130 << 31 >> 31; + $132 = (___muldi3(($29|0),($131|0),($22|0),($81|0))|0); + $133 = tempRet0; + $134 = (___muldi3(($30|0),($117|0),($22|0),($81|0))|0); + $135 = tempRet0; + $136 = (___muldi3(($31|0),($99|0),($22|0),($81|0))|0); + $137 = tempRet0; + $138 = (___muldi3(($8|0),($51|0),($8|0),($51|0))|0); + $139 = tempRet0; + $140 = ($23|0)<(0); + $141 = $140 << 31 >> 31; + $142 = (___muldi3(($23|0),($141|0),($10|0),($55|0))|0); + $143 = tempRet0; + $144 = ($28|0)<(0); + $145 = $144 << 31 >> 31; + $146 = (___muldi3(($28|0),($145|0),($23|0),($141|0))|0); + $147 = tempRet0; + $148 = (___muldi3(($29|0),($131|0),($8|0),($51|0))|0); + $149 = tempRet0; + $150 = (___muldi3(($30|0),($117|0),($23|0),($141|0))|0); + $151 = tempRet0; + $152 = (___muldi3(($31|0),($99|0),($8|0),($51|0))|0); + $153 = tempRet0; + $154 = ($27|0)<(0); + $155 = $154 << 31 >> 31; + $156 = (___muldi3(($27|0),($155|0),($10|0),($55|0))|0); + $157 = tempRet0; + $158 = (___muldi3(($28|0),($145|0),($24|0),($87|0))|0); + $159 = tempRet0; + $160 = (___muldi3(($29|0),($131|0),($24|0),($87|0))|0); + $161 = tempRet0; + $162 = (___muldi3(($30|0),($117|0),($24|0),($87|0))|0); + $163 = tempRet0; + $164 = (___muldi3(($31|0),($99|0),($24|0),($87|0))|0); + $165 = tempRet0; + $166 = (___muldi3(($28|0),($145|0),($12|0),($59|0))|0); + $167 = tempRet0; + $168 = (___muldi3(($29|0),($131|0),($12|0),($59|0))|0); + $169 = tempRet0; + $170 = ($25|0)<(0); + $171 = $170 << 31 >> 31; + $172 = (___muldi3(($30|0),($117|0),($25|0),($171|0))|0); + $173 = tempRet0; + $174 = (___muldi3(($31|0),($99|0),($12|0),($59|0))|0); + $175 = tempRet0; + $176 = (___muldi3(($29|0),($131|0),($14|0),($63|0))|0); + $177 = tempRet0; + $178 = (___muldi3(($30|0),($117|0),($26|0),($93|0))|0); + $179 = tempRet0; + $180 = (___muldi3(($31|0),($99|0),($26|0),($93|0))|0); + $181 = tempRet0; + $182 = (___muldi3(($30|0),($117|0),($16|0),($67|0))|0); + $183 = tempRet0; + $184 = (___muldi3(($31|0),($99|0),($16|0),($67|0))|0); + $185 = tempRet0; + $186 = (___muldi3(($31|0),($99|0),($18|0),($71|0))|0); + $187 = tempRet0; + $188 = (_i64Add(($156|0),($157|0),($34|0),($35|0))|0); + $189 = tempRet0; + $190 = (_i64Add(($188|0),($189|0),($146|0),($147|0))|0); + $191 = tempRet0; + $192 = (_i64Add(($190|0),($191|0),($132|0),($133|0))|0); + $193 = tempRet0; + $194 = (_i64Add(($192|0),($193|0),($118|0),($119|0))|0); + $195 = tempRet0; + $196 = (_i64Add(($194|0),($195|0),($100|0),($101|0))|0); + $197 = tempRet0; + $198 = (_i64Add(($44|0),($45|0),($76|0),($77|0))|0); + $199 = tempRet0; + $200 = (_i64Add(($48|0),($49|0),($78|0),($79|0))|0); + $201 = tempRet0; + $202 = (_i64Add(($82|0),($83|0),($102|0),($103|0))|0); + $203 = tempRet0; + $204 = (_i64Add(($202|0),($203|0),($52|0),($53|0))|0); + $205 = tempRet0; + $206 = (_i64Add(($204|0),($205|0),($176|0),($177|0))|0); + $207 = tempRet0; + $208 = (_i64Add(($206|0),($207|0),($172|0),($173|0))|0); + $209 = tempRet0; + $210 = (_i64Add(($208|0),($209|0),($164|0),($165|0))|0); + $211 = tempRet0; + $212 = (_i64Add(($196|0),($197|0),33554432,0)|0); + $213 = tempRet0; + $214 = (_bitshift64Ashr(($212|0),($213|0),26)|0); + $215 = tempRet0; + $216 = (_i64Add(($158|0),($159|0),($40|0),($41|0))|0); + $217 = tempRet0; + $218 = (_i64Add(($216|0),($217|0),($148|0),($149|0))|0); + $219 = tempRet0; + $220 = (_i64Add(($218|0),($219|0),($134|0),($135|0))|0); + $221 = tempRet0; + $222 = (_i64Add(($220|0),($221|0),($120|0),($121|0))|0); + $223 = tempRet0; + $224 = (_i64Add(($222|0),($223|0),($214|0),($215|0))|0); + $225 = tempRet0; + $226 = (_bitshift64Shl(($214|0),($215|0),26)|0); + $227 = tempRet0; + $228 = (_i64Subtract(($196|0),($197|0),($226|0),($227|0))|0); + $229 = tempRet0; + $230 = (_i64Add(($210|0),($211|0),33554432,0)|0); + $231 = tempRet0; + $232 = (_bitshift64Ashr(($230|0),($231|0),26)|0); + $233 = tempRet0; + $234 = (_i64Add(($84|0),($85|0),($106|0),($107|0))|0); + $235 = tempRet0; + $236 = (_i64Add(($234|0),($235|0),($56|0),($57|0))|0); + $237 = tempRet0; + $238 = (_i64Add(($236|0),($237|0),($178|0),($179|0))|0); + $239 = tempRet0; + $240 = (_i64Add(($238|0),($239|0),($174|0),($175|0))|0); + $241 = tempRet0; + $242 = (_i64Add(($240|0),($241|0),($232|0),($233|0))|0); + $243 = tempRet0; + $244 = (_bitshift64Shl(($232|0),($233|0),26)|0); + $245 = tempRet0; + $246 = (_i64Subtract(($210|0),($211|0),($244|0),($245|0))|0); + $247 = tempRet0; + $248 = (_i64Add(($224|0),($225|0),16777216,0)|0); + $249 = tempRet0; + $250 = (_bitshift64Ashr(($248|0),($249|0),25)|0); + $251 = tempRet0; + $252 = (_i64Add(($198|0),($199|0),($166|0),($167|0))|0); + $253 = tempRet0; + $254 = (_i64Add(($252|0),($253|0),($160|0),($161|0))|0); + $255 = tempRet0; + $256 = (_i64Add(($254|0),($255|0),($150|0),($151|0))|0); + $257 = tempRet0; + $258 = (_i64Add(($256|0),($257|0),($136|0),($137|0))|0); + $259 = tempRet0; + $260 = (_i64Add(($258|0),($259|0),($250|0),($251|0))|0); + $261 = tempRet0; + $262 = (_bitshift64Shl(($250|0),($251|0),25)|0); + $263 = tempRet0; + $264 = (_i64Subtract(($224|0),($225|0),($262|0),($263|0))|0); + $265 = tempRet0; + $266 = (_i64Add(($242|0),($243|0),16777216,0)|0); + $267 = tempRet0; + $268 = (_bitshift64Ashr(($266|0),($267|0),25)|0); + $269 = tempRet0; + $270 = (_i64Add(($122|0),($123|0),($108|0),($109|0))|0); + $271 = tempRet0; + $272 = (_i64Add(($270|0),($271|0),($88|0),($89|0))|0); + $273 = tempRet0; + $274 = (_i64Add(($272|0),($273|0),($60|0),($61|0))|0); + $275 = tempRet0; + $276 = (_i64Add(($274|0),($275|0),($182|0),($183|0))|0); + $277 = tempRet0; + $278 = (_i64Add(($276|0),($277|0),($180|0),($181|0))|0); + $279 = tempRet0; + $280 = (_i64Add(($278|0),($279|0),($268|0),($269|0))|0); + $281 = tempRet0; + $282 = (_bitshift64Shl(($268|0),($269|0),25)|0); + $283 = tempRet0; + $284 = (_i64Subtract(($242|0),($243|0),($282|0),($283|0))|0); + $285 = tempRet0; + $286 = (_i64Add(($260|0),($261|0),33554432,0)|0); + $287 = tempRet0; + $288 = (_bitshift64Ashr(($286|0),($287|0),26)|0); + $289 = tempRet0; + $290 = (_i64Add(($200|0),($201|0),($168|0),($169|0))|0); + $291 = tempRet0; + $292 = (_i64Add(($290|0),($291|0),($162|0),($163|0))|0); + $293 = tempRet0; + $294 = (_i64Add(($292|0),($293|0),($152|0),($153|0))|0); + $295 = tempRet0; + $296 = (_i64Add(($294|0),($295|0),($288|0),($289|0))|0); + $297 = tempRet0; + $298 = (_bitshift64Shl(($288|0),($289|0),26)|0); + $299 = tempRet0; + $300 = (_i64Subtract(($260|0),($261|0),($298|0),($299|0))|0); + $301 = tempRet0; + $302 = (_i64Add(($280|0),($281|0),33554432,0)|0); + $303 = tempRet0; + $304 = (_bitshift64Ashr(($302|0),($303|0),26)|0); + $305 = tempRet0; + $306 = (_i64Add(($110|0),($111|0),($124|0),($125|0))|0); + $307 = tempRet0; + $308 = (_i64Add(($306|0),($307|0),($90|0),($91|0))|0); + $309 = tempRet0; + $310 = (_i64Add(($308|0),($309|0),($64|0),($65|0))|0); + $311 = tempRet0; + $312 = (_i64Add(($310|0),($311|0),($184|0),($185|0))|0); + $313 = tempRet0; + $314 = (_i64Add(($312|0),($313|0),($304|0),($305|0))|0); + $315 = tempRet0; + $316 = (_bitshift64Shl(($304|0),($305|0),26)|0); + $317 = tempRet0; + $318 = (_i64Subtract(($280|0),($281|0),($316|0),($317|0))|0); + $319 = tempRet0; + $320 = (_i64Add(($296|0),($297|0),16777216,0)|0); + $321 = tempRet0; + $322 = (_bitshift64Ashr(($320|0),($321|0),25)|0); + $323 = tempRet0; + $324 = (_i64Add(($322|0),($323|0),($246|0),($247|0))|0); + $325 = tempRet0; + $326 = (_bitshift64Shl(($322|0),($323|0),25)|0); + $327 = tempRet0; + $328 = (_i64Subtract(($296|0),($297|0),($326|0),($327|0))|0); + $329 = tempRet0; + $330 = (_i64Add(($314|0),($315|0),16777216,0)|0); + $331 = tempRet0; + $332 = (_bitshift64Ashr(($330|0),($331|0),25)|0); + $333 = tempRet0; + $334 = (_i64Add(($112|0),($113|0),($138|0),($139|0))|0); + $335 = tempRet0; + $336 = (_i64Add(($334|0),($335|0),($126|0),($127|0))|0); + $337 = tempRet0; + $338 = (_i64Add(($336|0),($337|0),($94|0),($95|0))|0); + $339 = tempRet0; + $340 = (_i64Add(($338|0),($339|0),($68|0),($69|0))|0); + $341 = tempRet0; + $342 = (_i64Add(($340|0),($341|0),($186|0),($187|0))|0); + $343 = tempRet0; + $344 = (_i64Add(($342|0),($343|0),($332|0),($333|0))|0); + $345 = tempRet0; + $346 = (_bitshift64Shl(($332|0),($333|0),25)|0); + $347 = tempRet0; + $348 = (_i64Subtract(($314|0),($315|0),($346|0),($347|0))|0); + $349 = tempRet0; + $350 = (_i64Add(($324|0),($325|0),33554432,0)|0); + $351 = tempRet0; + $352 = (_bitshift64Ashr(($350|0),($351|0),26)|0); + $353 = tempRet0; + $354 = (_i64Add(($284|0),($285|0),($352|0),($353|0))|0); + $355 = tempRet0; + $356 = (_bitshift64Shl(($352|0),($353|0),26)|0); + $357 = tempRet0; + $358 = (_i64Subtract(($324|0),($325|0),($356|0),($357|0))|0); + $359 = tempRet0; + $360 = (_i64Add(($344|0),($345|0),33554432,0)|0); + $361 = tempRet0; + $362 = (_bitshift64Ashr(($360|0),($361|0),26)|0); + $363 = tempRet0; + $364 = (_i64Add(($128|0),($129|0),($142|0),($143|0))|0); + $365 = tempRet0; + $366 = (_i64Add(($364|0),($365|0),($114|0),($115|0))|0); + $367 = tempRet0; + $368 = (_i64Add(($366|0),($367|0),($96|0),($97|0))|0); + $369 = tempRet0; + $370 = (_i64Add(($368|0),($369|0),($72|0),($73|0))|0); + $371 = tempRet0; + $372 = (_i64Add(($370|0),($371|0),($362|0),($363|0))|0); + $373 = tempRet0; + $374 = (_bitshift64Shl(($362|0),($363|0),26)|0); + $375 = tempRet0; + $376 = (_i64Subtract(($344|0),($345|0),($374|0),($375|0))|0); + $377 = tempRet0; + $378 = (_i64Add(($372|0),($373|0),16777216,0)|0); + $379 = tempRet0; + $380 = (_bitshift64Ashr(($378|0),($379|0),25)|0); + $381 = tempRet0; + $382 = (___muldi3(($380|0),($381|0),19,0)|0); + $383 = tempRet0; + $384 = (_i64Add(($382|0),($383|0),($228|0),($229|0))|0); + $385 = tempRet0; + $386 = (_bitshift64Shl(($380|0),($381|0),25)|0); + $387 = tempRet0; + $388 = (_i64Subtract(($372|0),($373|0),($386|0),($387|0))|0); + $389 = tempRet0; + $390 = (_i64Add(($384|0),($385|0),33554432,0)|0); + $391 = tempRet0; + $392 = (_bitshift64Ashr(($390|0),($391|0),26)|0); + $393 = tempRet0; + $394 = (_i64Add(($264|0),($265|0),($392|0),($393|0))|0); + $395 = tempRet0; + $396 = (_bitshift64Shl(($392|0),($393|0),26)|0); + $397 = tempRet0; + $398 = (_i64Subtract(($384|0),($385|0),($396|0),($397|0))|0); + $399 = tempRet0; + HEAP32[$h>>2] = $398; + $400 = ((($h)) + 4|0); + HEAP32[$400>>2] = $394; + $401 = ((($h)) + 8|0); + HEAP32[$401>>2] = $300; + $402 = ((($h)) + 12|0); + HEAP32[$402>>2] = $328; + $403 = ((($h)) + 16|0); + HEAP32[$403>>2] = $358; + $404 = ((($h)) + 20|0); + HEAP32[$404>>2] = $354; + $405 = ((($h)) + 24|0); + HEAP32[$405>>2] = $318; + $406 = ((($h)) + 28|0); + HEAP32[$406>>2] = $348; + $407 = ((($h)) + 32|0); + HEAP32[$407>>2] = $376; + $408 = ((($h)) + 36|0); + HEAP32[$408>>2] = $388; + return; +} +function _crypto_sign_ed25519_ref10_fe_sq2($h,$f) { + $h = $h|0; + $f = $f|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; + var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; + var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; + var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; + var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$f>>2]|0; + $1 = ((($f)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($f)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($f)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($f)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($f)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 24|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($f)) + 28|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($f)) + 32|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($f)) + 36|0); + $18 = HEAP32[$17>>2]|0; + $19 = $0 << 1; + $20 = $2 << 1; + $21 = $4 << 1; + $22 = $6 << 1; + $23 = $8 << 1; + $24 = $10 << 1; + $25 = $12 << 1; + $26 = $14 << 1; + $27 = ($10*38)|0; + $28 = ($12*19)|0; + $29 = ($14*38)|0; + $30 = ($16*19)|0; + $31 = ($18*38)|0; + $32 = ($0|0)<(0); + $33 = $32 << 31 >> 31; + $34 = (___muldi3(($0|0),($33|0),($0|0),($33|0))|0); + $35 = tempRet0; + $36 = ($19|0)<(0); + $37 = $36 << 31 >> 31; + $38 = ($2|0)<(0); + $39 = $38 << 31 >> 31; + $40 = (___muldi3(($19|0),($37|0),($2|0),($39|0))|0); + $41 = tempRet0; + $42 = ($4|0)<(0); + $43 = $42 << 31 >> 31; + $44 = (___muldi3(($4|0),($43|0),($19|0),($37|0))|0); + $45 = tempRet0; + $46 = ($6|0)<(0); + $47 = $46 << 31 >> 31; + $48 = (___muldi3(($6|0),($47|0),($19|0),($37|0))|0); + $49 = tempRet0; + $50 = ($8|0)<(0); + $51 = $50 << 31 >> 31; + $52 = (___muldi3(($8|0),($51|0),($19|0),($37|0))|0); + $53 = tempRet0; + $54 = ($10|0)<(0); + $55 = $54 << 31 >> 31; + $56 = (___muldi3(($10|0),($55|0),($19|0),($37|0))|0); + $57 = tempRet0; + $58 = ($12|0)<(0); + $59 = $58 << 31 >> 31; + $60 = (___muldi3(($12|0),($59|0),($19|0),($37|0))|0); + $61 = tempRet0; + $62 = ($14|0)<(0); + $63 = $62 << 31 >> 31; + $64 = (___muldi3(($14|0),($63|0),($19|0),($37|0))|0); + $65 = tempRet0; + $66 = ($16|0)<(0); + $67 = $66 << 31 >> 31; + $68 = (___muldi3(($16|0),($67|0),($19|0),($37|0))|0); + $69 = tempRet0; + $70 = ($18|0)<(0); + $71 = $70 << 31 >> 31; + $72 = (___muldi3(($18|0),($71|0),($19|0),($37|0))|0); + $73 = tempRet0; + $74 = ($20|0)<(0); + $75 = $74 << 31 >> 31; + $76 = (___muldi3(($20|0),($75|0),($2|0),($39|0))|0); + $77 = tempRet0; + $78 = (___muldi3(($20|0),($75|0),($4|0),($43|0))|0); + $79 = tempRet0; + $80 = ($22|0)<(0); + $81 = $80 << 31 >> 31; + $82 = (___muldi3(($22|0),($81|0),($20|0),($75|0))|0); + $83 = tempRet0; + $84 = (___muldi3(($8|0),($51|0),($20|0),($75|0))|0); + $85 = tempRet0; + $86 = ($24|0)<(0); + $87 = $86 << 31 >> 31; + $88 = (___muldi3(($24|0),($87|0),($20|0),($75|0))|0); + $89 = tempRet0; + $90 = (___muldi3(($12|0),($59|0),($20|0),($75|0))|0); + $91 = tempRet0; + $92 = ($26|0)<(0); + $93 = $92 << 31 >> 31; + $94 = (___muldi3(($26|0),($93|0),($20|0),($75|0))|0); + $95 = tempRet0; + $96 = (___muldi3(($16|0),($67|0),($20|0),($75|0))|0); + $97 = tempRet0; + $98 = ($31|0)<(0); + $99 = $98 << 31 >> 31; + $100 = (___muldi3(($31|0),($99|0),($20|0),($75|0))|0); + $101 = tempRet0; + $102 = (___muldi3(($4|0),($43|0),($4|0),($43|0))|0); + $103 = tempRet0; + $104 = ($21|0)<(0); + $105 = $104 << 31 >> 31; + $106 = (___muldi3(($21|0),($105|0),($6|0),($47|0))|0); + $107 = tempRet0; + $108 = (___muldi3(($8|0),($51|0),($21|0),($105|0))|0); + $109 = tempRet0; + $110 = (___muldi3(($10|0),($55|0),($21|0),($105|0))|0); + $111 = tempRet0; + $112 = (___muldi3(($12|0),($59|0),($21|0),($105|0))|0); + $113 = tempRet0; + $114 = (___muldi3(($14|0),($63|0),($21|0),($105|0))|0); + $115 = tempRet0; + $116 = ($30|0)<(0); + $117 = $116 << 31 >> 31; + $118 = (___muldi3(($30|0),($117|0),($21|0),($105|0))|0); + $119 = tempRet0; + $120 = (___muldi3(($31|0),($99|0),($4|0),($43|0))|0); + $121 = tempRet0; + $122 = (___muldi3(($22|0),($81|0),($6|0),($47|0))|0); + $123 = tempRet0; + $124 = (___muldi3(($22|0),($81|0),($8|0),($51|0))|0); + $125 = tempRet0; + $126 = (___muldi3(($24|0),($87|0),($22|0),($81|0))|0); + $127 = tempRet0; + $128 = (___muldi3(($12|0),($59|0),($22|0),($81|0))|0); + $129 = tempRet0; + $130 = ($29|0)<(0); + $131 = $130 << 31 >> 31; + $132 = (___muldi3(($29|0),($131|0),($22|0),($81|0))|0); + $133 = tempRet0; + $134 = (___muldi3(($30|0),($117|0),($22|0),($81|0))|0); + $135 = tempRet0; + $136 = (___muldi3(($31|0),($99|0),($22|0),($81|0))|0); + $137 = tempRet0; + $138 = (___muldi3(($8|0),($51|0),($8|0),($51|0))|0); + $139 = tempRet0; + $140 = ($23|0)<(0); + $141 = $140 << 31 >> 31; + $142 = (___muldi3(($23|0),($141|0),($10|0),($55|0))|0); + $143 = tempRet0; + $144 = ($28|0)<(0); + $145 = $144 << 31 >> 31; + $146 = (___muldi3(($28|0),($145|0),($23|0),($141|0))|0); + $147 = tempRet0; + $148 = (___muldi3(($29|0),($131|0),($8|0),($51|0))|0); + $149 = tempRet0; + $150 = (___muldi3(($30|0),($117|0),($23|0),($141|0))|0); + $151 = tempRet0; + $152 = (___muldi3(($31|0),($99|0),($8|0),($51|0))|0); + $153 = tempRet0; + $154 = ($27|0)<(0); + $155 = $154 << 31 >> 31; + $156 = (___muldi3(($27|0),($155|0),($10|0),($55|0))|0); + $157 = tempRet0; + $158 = (___muldi3(($28|0),($145|0),($24|0),($87|0))|0); + $159 = tempRet0; + $160 = (___muldi3(($29|0),($131|0),($24|0),($87|0))|0); + $161 = tempRet0; + $162 = (___muldi3(($30|0),($117|0),($24|0),($87|0))|0); + $163 = tempRet0; + $164 = (___muldi3(($31|0),($99|0),($24|0),($87|0))|0); + $165 = tempRet0; + $166 = (___muldi3(($28|0),($145|0),($12|0),($59|0))|0); + $167 = tempRet0; + $168 = (___muldi3(($29|0),($131|0),($12|0),($59|0))|0); + $169 = tempRet0; + $170 = ($25|0)<(0); + $171 = $170 << 31 >> 31; + $172 = (___muldi3(($30|0),($117|0),($25|0),($171|0))|0); + $173 = tempRet0; + $174 = (___muldi3(($31|0),($99|0),($12|0),($59|0))|0); + $175 = tempRet0; + $176 = (___muldi3(($29|0),($131|0),($14|0),($63|0))|0); + $177 = tempRet0; + $178 = (___muldi3(($30|0),($117|0),($26|0),($93|0))|0); + $179 = tempRet0; + $180 = (___muldi3(($31|0),($99|0),($26|0),($93|0))|0); + $181 = tempRet0; + $182 = (___muldi3(($30|0),($117|0),($16|0),($67|0))|0); + $183 = tempRet0; + $184 = (___muldi3(($31|0),($99|0),($16|0),($67|0))|0); + $185 = tempRet0; + $186 = (___muldi3(($31|0),($99|0),($18|0),($71|0))|0); + $187 = tempRet0; + $188 = (_i64Add(($156|0),($157|0),($34|0),($35|0))|0); + $189 = tempRet0; + $190 = (_i64Add(($188|0),($189|0),($146|0),($147|0))|0); + $191 = tempRet0; + $192 = (_i64Add(($190|0),($191|0),($132|0),($133|0))|0); + $193 = tempRet0; + $194 = (_i64Add(($192|0),($193|0),($118|0),($119|0))|0); + $195 = tempRet0; + $196 = (_i64Add(($194|0),($195|0),($100|0),($101|0))|0); + $197 = tempRet0; + $198 = (_i64Add(($158|0),($159|0),($40|0),($41|0))|0); + $199 = tempRet0; + $200 = (_i64Add(($198|0),($199|0),($148|0),($149|0))|0); + $201 = tempRet0; + $202 = (_i64Add(($200|0),($201|0),($134|0),($135|0))|0); + $203 = tempRet0; + $204 = (_i64Add(($202|0),($203|0),($120|0),($121|0))|0); + $205 = tempRet0; + $206 = (_i64Add(($44|0),($45|0),($76|0),($77|0))|0); + $207 = tempRet0; + $208 = (_i64Add(($206|0),($207|0),($166|0),($167|0))|0); + $209 = tempRet0; + $210 = (_i64Add(($208|0),($209|0),($160|0),($161|0))|0); + $211 = tempRet0; + $212 = (_i64Add(($210|0),($211|0),($150|0),($151|0))|0); + $213 = tempRet0; + $214 = (_i64Add(($212|0),($213|0),($136|0),($137|0))|0); + $215 = tempRet0; + $216 = (_i64Add(($48|0),($49|0),($78|0),($79|0))|0); + $217 = tempRet0; + $218 = (_i64Add(($216|0),($217|0),($168|0),($169|0))|0); + $219 = tempRet0; + $220 = (_i64Add(($218|0),($219|0),($162|0),($163|0))|0); + $221 = tempRet0; + $222 = (_i64Add(($220|0),($221|0),($152|0),($153|0))|0); + $223 = tempRet0; + $224 = (_i64Add(($82|0),($83|0),($102|0),($103|0))|0); + $225 = tempRet0; + $226 = (_i64Add(($224|0),($225|0),($52|0),($53|0))|0); + $227 = tempRet0; + $228 = (_i64Add(($226|0),($227|0),($176|0),($177|0))|0); + $229 = tempRet0; + $230 = (_i64Add(($228|0),($229|0),($172|0),($173|0))|0); + $231 = tempRet0; + $232 = (_i64Add(($230|0),($231|0),($164|0),($165|0))|0); + $233 = tempRet0; + $234 = (_i64Add(($84|0),($85|0),($106|0),($107|0))|0); + $235 = tempRet0; + $236 = (_i64Add(($234|0),($235|0),($56|0),($57|0))|0); + $237 = tempRet0; + $238 = (_i64Add(($236|0),($237|0),($178|0),($179|0))|0); + $239 = tempRet0; + $240 = (_i64Add(($238|0),($239|0),($174|0),($175|0))|0); + $241 = tempRet0; + $242 = (_i64Add(($122|0),($123|0),($108|0),($109|0))|0); + $243 = tempRet0; + $244 = (_i64Add(($242|0),($243|0),($88|0),($89|0))|0); + $245 = tempRet0; + $246 = (_i64Add(($244|0),($245|0),($60|0),($61|0))|0); + $247 = tempRet0; + $248 = (_i64Add(($246|0),($247|0),($182|0),($183|0))|0); + $249 = tempRet0; + $250 = (_i64Add(($248|0),($249|0),($180|0),($181|0))|0); + $251 = tempRet0; + $252 = (_i64Add(($110|0),($111|0),($124|0),($125|0))|0); + $253 = tempRet0; + $254 = (_i64Add(($252|0),($253|0),($90|0),($91|0))|0); + $255 = tempRet0; + $256 = (_i64Add(($254|0),($255|0),($64|0),($65|0))|0); + $257 = tempRet0; + $258 = (_i64Add(($256|0),($257|0),($184|0),($185|0))|0); + $259 = tempRet0; + $260 = (_i64Add(($112|0),($113|0),($138|0),($139|0))|0); + $261 = tempRet0; + $262 = (_i64Add(($260|0),($261|0),($126|0),($127|0))|0); + $263 = tempRet0; + $264 = (_i64Add(($262|0),($263|0),($94|0),($95|0))|0); + $265 = tempRet0; + $266 = (_i64Add(($264|0),($265|0),($68|0),($69|0))|0); + $267 = tempRet0; + $268 = (_i64Add(($266|0),($267|0),($186|0),($187|0))|0); + $269 = tempRet0; + $270 = (_i64Add(($128|0),($129|0),($142|0),($143|0))|0); + $271 = tempRet0; + $272 = (_i64Add(($270|0),($271|0),($114|0),($115|0))|0); + $273 = tempRet0; + $274 = (_i64Add(($272|0),($273|0),($96|0),($97|0))|0); + $275 = tempRet0; + $276 = (_i64Add(($274|0),($275|0),($72|0),($73|0))|0); + $277 = tempRet0; + $278 = (_bitshift64Shl(($196|0),($197|0),1)|0); + $279 = tempRet0; + $280 = (_bitshift64Shl(($204|0),($205|0),1)|0); + $281 = tempRet0; + $282 = (_bitshift64Shl(($214|0),($215|0),1)|0); + $283 = tempRet0; + $284 = (_bitshift64Shl(($222|0),($223|0),1)|0); + $285 = tempRet0; + $286 = (_bitshift64Shl(($232|0),($233|0),1)|0); + $287 = tempRet0; + $288 = (_bitshift64Shl(($240|0),($241|0),1)|0); + $289 = tempRet0; + $290 = (_bitshift64Shl(($250|0),($251|0),1)|0); + $291 = tempRet0; + $292 = (_bitshift64Shl(($258|0),($259|0),1)|0); + $293 = tempRet0; + $294 = (_bitshift64Shl(($268|0),($269|0),1)|0); + $295 = tempRet0; + $296 = (_bitshift64Shl(($276|0),($277|0),1)|0); + $297 = tempRet0; + $298 = (_i64Add(($278|0),($279|0),33554432,0)|0); + $299 = tempRet0; + $300 = (_bitshift64Ashr(($298|0),($299|0),26)|0); + $301 = tempRet0; + $302 = (_i64Add(($300|0),($301|0),($280|0),($281|0))|0); + $303 = tempRet0; + $304 = (_bitshift64Shl(($300|0),($301|0),26)|0); + $305 = tempRet0; + $306 = (_i64Subtract(($278|0),($279|0),($304|0),($305|0))|0); + $307 = tempRet0; + $308 = (_i64Add(($286|0),($287|0),33554432,0)|0); + $309 = tempRet0; + $310 = (_bitshift64Ashr(($308|0),($309|0),26)|0); + $311 = tempRet0; + $312 = (_i64Add(($310|0),($311|0),($288|0),($289|0))|0); + $313 = tempRet0; + $314 = (_bitshift64Shl(($310|0),($311|0),26)|0); + $315 = tempRet0; + $316 = (_i64Subtract(($286|0),($287|0),($314|0),($315|0))|0); + $317 = tempRet0; + $318 = (_i64Add(($302|0),($303|0),16777216,0)|0); + $319 = tempRet0; + $320 = (_bitshift64Ashr(($318|0),($319|0),25)|0); + $321 = tempRet0; + $322 = (_i64Add(($320|0),($321|0),($282|0),($283|0))|0); + $323 = tempRet0; + $324 = (_bitshift64Shl(($320|0),($321|0),25)|0); + $325 = tempRet0; + $326 = (_i64Subtract(($302|0),($303|0),($324|0),($325|0))|0); + $327 = tempRet0; + $328 = (_i64Add(($312|0),($313|0),16777216,0)|0); + $329 = tempRet0; + $330 = (_bitshift64Ashr(($328|0),($329|0),25)|0); + $331 = tempRet0; + $332 = (_i64Add(($330|0),($331|0),($290|0),($291|0))|0); + $333 = tempRet0; + $334 = (_bitshift64Shl(($330|0),($331|0),25)|0); + $335 = tempRet0; + $336 = (_i64Subtract(($312|0),($313|0),($334|0),($335|0))|0); + $337 = tempRet0; + $338 = (_i64Add(($322|0),($323|0),33554432,0)|0); + $339 = tempRet0; + $340 = (_bitshift64Ashr(($338|0),($339|0),26)|0); + $341 = tempRet0; + $342 = (_i64Add(($340|0),($341|0),($284|0),($285|0))|0); + $343 = tempRet0; + $344 = (_bitshift64Shl(($340|0),($341|0),26)|0); + $345 = tempRet0; + $346 = (_i64Subtract(($322|0),($323|0),($344|0),($345|0))|0); + $347 = tempRet0; + $348 = (_i64Add(($332|0),($333|0),33554432,0)|0); + $349 = tempRet0; + $350 = (_bitshift64Ashr(($348|0),($349|0),26)|0); + $351 = tempRet0; + $352 = (_i64Add(($350|0),($351|0),($292|0),($293|0))|0); + $353 = tempRet0; + $354 = (_bitshift64Shl(($350|0),($351|0),26)|0); + $355 = tempRet0; + $356 = (_i64Subtract(($332|0),($333|0),($354|0),($355|0))|0); + $357 = tempRet0; + $358 = (_i64Add(($342|0),($343|0),16777216,0)|0); + $359 = tempRet0; + $360 = (_bitshift64Ashr(($358|0),($359|0),25)|0); + $361 = tempRet0; + $362 = (_i64Add(($360|0),($361|0),($316|0),($317|0))|0); + $363 = tempRet0; + $364 = (_bitshift64Shl(($360|0),($361|0),25)|0); + $365 = tempRet0; + $366 = (_i64Subtract(($342|0),($343|0),($364|0),($365|0))|0); + $367 = tempRet0; + $368 = (_i64Add(($352|0),($353|0),16777216,0)|0); + $369 = tempRet0; + $370 = (_bitshift64Ashr(($368|0),($369|0),25)|0); + $371 = tempRet0; + $372 = (_i64Add(($370|0),($371|0),($294|0),($295|0))|0); + $373 = tempRet0; + $374 = (_bitshift64Shl(($370|0),($371|0),25)|0); + $375 = tempRet0; + $376 = (_i64Subtract(($352|0),($353|0),($374|0),($375|0))|0); + $377 = tempRet0; + $378 = (_i64Add(($362|0),($363|0),33554432,0)|0); + $379 = tempRet0; + $380 = (_bitshift64Ashr(($378|0),($379|0),26)|0); + $381 = tempRet0; + $382 = (_i64Add(($336|0),($337|0),($380|0),($381|0))|0); + $383 = tempRet0; + $384 = (_bitshift64Shl(($380|0),($381|0),26)|0); + $385 = tempRet0; + $386 = (_i64Subtract(($362|0),($363|0),($384|0),($385|0))|0); + $387 = tempRet0; + $388 = (_i64Add(($372|0),($373|0),33554432,0)|0); + $389 = tempRet0; + $390 = (_bitshift64Ashr(($388|0),($389|0),26)|0); + $391 = tempRet0; + $392 = (_i64Add(($390|0),($391|0),($296|0),($297|0))|0); + $393 = tempRet0; + $394 = (_bitshift64Shl(($390|0),($391|0),26)|0); + $395 = tempRet0; + $396 = (_i64Subtract(($372|0),($373|0),($394|0),($395|0))|0); + $397 = tempRet0; + $398 = (_i64Add(($392|0),($393|0),16777216,0)|0); + $399 = tempRet0; + $400 = (_bitshift64Ashr(($398|0),($399|0),25)|0); + $401 = tempRet0; + $402 = (___muldi3(($400|0),($401|0),19,0)|0); + $403 = tempRet0; + $404 = (_i64Add(($402|0),($403|0),($306|0),($307|0))|0); + $405 = tempRet0; + $406 = (_bitshift64Shl(($400|0),($401|0),25)|0); + $407 = tempRet0; + $408 = (_i64Subtract(($392|0),($393|0),($406|0),($407|0))|0); + $409 = tempRet0; + $410 = (_i64Add(($404|0),($405|0),33554432,0)|0); + $411 = tempRet0; + $412 = (_bitshift64Ashr(($410|0),($411|0),26)|0); + $413 = tempRet0; + $414 = (_i64Add(($326|0),($327|0),($412|0),($413|0))|0); + $415 = tempRet0; + $416 = (_bitshift64Shl(($412|0),($413|0),26)|0); + $417 = tempRet0; + $418 = (_i64Subtract(($404|0),($405|0),($416|0),($417|0))|0); + $419 = tempRet0; + HEAP32[$h>>2] = $418; + $420 = ((($h)) + 4|0); + HEAP32[$420>>2] = $414; + $421 = ((($h)) + 8|0); + HEAP32[$421>>2] = $346; + $422 = ((($h)) + 12|0); + HEAP32[$422>>2] = $366; + $423 = ((($h)) + 16|0); + HEAP32[$423>>2] = $386; + $424 = ((($h)) + 20|0); + HEAP32[$424>>2] = $382; + $425 = ((($h)) + 24|0); + HEAP32[$425>>2] = $356; + $426 = ((($h)) + 28|0); + HEAP32[$426>>2] = $376; + $427 = ((($h)) + 32|0); + HEAP32[$427>>2] = $396; + $428 = ((($h)) + 36|0); + HEAP32[$428>>2] = $408; + return; +} +function _crypto_sign_ed25519_ref10_fe_sub($h,$f,$g) { + $h = $h|0; + $f = $f|0; + $g = $g|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$f>>2]|0; + $1 = ((($f)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($f)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($f)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($f)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($f)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 24|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($f)) + 28|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($f)) + 32|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($f)) + 36|0); + $18 = HEAP32[$17>>2]|0; + $19 = HEAP32[$g>>2]|0; + $20 = ((($g)) + 4|0); + $21 = HEAP32[$20>>2]|0; + $22 = ((($g)) + 8|0); + $23 = HEAP32[$22>>2]|0; + $24 = ((($g)) + 12|0); + $25 = HEAP32[$24>>2]|0; + $26 = ((($g)) + 16|0); + $27 = HEAP32[$26>>2]|0; + $28 = ((($g)) + 20|0); + $29 = HEAP32[$28>>2]|0; + $30 = ((($g)) + 24|0); + $31 = HEAP32[$30>>2]|0; + $32 = ((($g)) + 28|0); + $33 = HEAP32[$32>>2]|0; + $34 = ((($g)) + 32|0); + $35 = HEAP32[$34>>2]|0; + $36 = ((($g)) + 36|0); + $37 = HEAP32[$36>>2]|0; + $38 = (($0) - ($19))|0; + $39 = (($2) - ($21))|0; + $40 = (($4) - ($23))|0; + $41 = (($6) - ($25))|0; + $42 = (($8) - ($27))|0; + $43 = (($10) - ($29))|0; + $44 = (($12) - ($31))|0; + $45 = (($14) - ($33))|0; + $46 = (($16) - ($35))|0; + $47 = (($18) - ($37))|0; + HEAP32[$h>>2] = $38; + $48 = ((($h)) + 4|0); + HEAP32[$48>>2] = $39; + $49 = ((($h)) + 8|0); + HEAP32[$49>>2] = $40; + $50 = ((($h)) + 12|0); + HEAP32[$50>>2] = $41; + $51 = ((($h)) + 16|0); + HEAP32[$51>>2] = $42; + $52 = ((($h)) + 20|0); + HEAP32[$52>>2] = $43; + $53 = ((($h)) + 24|0); + HEAP32[$53>>2] = $44; + $54 = ((($h)) + 28|0); + HEAP32[$54>>2] = $45; + $55 = ((($h)) + 32|0); + HEAP32[$55>>2] = $46; + $56 = ((($h)) + 36|0); + HEAP32[$56>>2] = $47; + return; +} +function _crypto_sign_ed25519_ref10_fe_tobytes($s,$h) { + $s = $s|0; + $h = $h|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; + var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; + var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; + var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; + var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[$h>>2]|0; + $1 = ((($h)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($h)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($h)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($h)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($h)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($h)) + 24|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($h)) + 28|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($h)) + 32|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($h)) + 36|0); + $18 = HEAP32[$17>>2]|0; + $19 = ($18*19)|0; + $20 = (($19) + 16777216)|0; + $21 = $20 >> 25; + $22 = (($21) + ($0))|0; + $23 = $22 >> 26; + $24 = (($23) + ($2))|0; + $25 = $24 >> 25; + $26 = (($25) + ($4))|0; + $27 = $26 >> 26; + $28 = (($27) + ($6))|0; + $29 = $28 >> 25; + $30 = (($29) + ($8))|0; + $31 = $30 >> 26; + $32 = (($31) + ($10))|0; + $33 = $32 >> 25; + $34 = (($33) + ($12))|0; + $35 = $34 >> 26; + $36 = (($35) + ($14))|0; + $37 = $36 >> 25; + $38 = (($37) + ($16))|0; + $39 = $38 >> 26; + $40 = (($39) + ($18))|0; + $41 = $40 >> 25; + $42 = ($41*19)|0; + $43 = (($42) + ($0))|0; + $44 = $43 >> 26; + $45 = (($44) + ($2))|0; + $46 = $44 << 26; + $47 = (($43) - ($46))|0; + $48 = $45 >> 25; + $49 = (($48) + ($4))|0; + $50 = $48 << 25; + $51 = (($45) - ($50))|0; + $52 = $49 >> 26; + $53 = (($52) + ($6))|0; + $54 = $52 << 26; + $55 = (($49) - ($54))|0; + $56 = $53 >> 25; + $57 = (($56) + ($8))|0; + $58 = $56 << 25; + $59 = (($53) - ($58))|0; + $60 = $57 >> 26; + $61 = (($60) + ($10))|0; + $62 = $60 << 26; + $63 = (($57) - ($62))|0; + $64 = $61 >> 25; + $65 = (($64) + ($12))|0; + $66 = $64 << 25; + $67 = (($61) - ($66))|0; + $68 = $65 >> 26; + $69 = (($68) + ($14))|0; + $70 = $68 << 26; + $71 = (($65) - ($70))|0; + $72 = $69 >> 25; + $73 = (($72) + ($16))|0; + $74 = $72 << 25; + $75 = (($69) - ($74))|0; + $76 = $73 >> 26; + $77 = (($76) + ($18))|0; + $78 = $76 << 26; + $79 = (($73) - ($78))|0; + $80 = $77 & 33554431; + $81 = $47&255; + HEAP8[$s>>0] = $81; + $82 = $47 >>> 8; + $83 = $82&255; + $84 = ((($s)) + 1|0); + HEAP8[$84>>0] = $83; + $85 = $47 >>> 16; + $86 = $85&255; + $87 = ((($s)) + 2|0); + HEAP8[$87>>0] = $86; + $88 = $47 >>> 24; + $89 = $51 << 2; + $90 = $89 | $88; + $91 = $90&255; + $92 = ((($s)) + 3|0); + HEAP8[$92>>0] = $91; + $93 = $51 >>> 6; + $94 = $93&255; + $95 = ((($s)) + 4|0); + HEAP8[$95>>0] = $94; + $96 = $51 >>> 14; + $97 = $96&255; + $98 = ((($s)) + 5|0); + HEAP8[$98>>0] = $97; + $99 = $51 >>> 22; + $100 = $55 << 3; + $101 = $100 | $99; + $102 = $101&255; + $103 = ((($s)) + 6|0); + HEAP8[$103>>0] = $102; + $104 = $55 >>> 5; + $105 = $104&255; + $106 = ((($s)) + 7|0); + HEAP8[$106>>0] = $105; + $107 = $55 >>> 13; + $108 = $107&255; + $109 = ((($s)) + 8|0); + HEAP8[$109>>0] = $108; + $110 = $55 >>> 21; + $111 = $59 << 5; + $112 = $111 | $110; + $113 = $112&255; + $114 = ((($s)) + 9|0); + HEAP8[$114>>0] = $113; + $115 = $59 >>> 3; + $116 = $115&255; + $117 = ((($s)) + 10|0); + HEAP8[$117>>0] = $116; + $118 = $59 >>> 11; + $119 = $118&255; + $120 = ((($s)) + 11|0); + HEAP8[$120>>0] = $119; + $121 = $59 >>> 19; + $122 = $63 << 6; + $123 = $122 | $121; + $124 = $123&255; + $125 = ((($s)) + 12|0); + HEAP8[$125>>0] = $124; + $126 = $63 >>> 2; + $127 = $126&255; + $128 = ((($s)) + 13|0); + HEAP8[$128>>0] = $127; + $129 = $63 >>> 10; + $130 = $129&255; + $131 = ((($s)) + 14|0); + HEAP8[$131>>0] = $130; + $132 = $63 >>> 18; + $133 = $132&255; + $134 = ((($s)) + 15|0); + HEAP8[$134>>0] = $133; + $135 = $67&255; + $136 = ((($s)) + 16|0); + HEAP8[$136>>0] = $135; + $137 = $67 >>> 8; + $138 = $137&255; + $139 = ((($s)) + 17|0); + HEAP8[$139>>0] = $138; + $140 = $67 >>> 16; + $141 = $140&255; + $142 = ((($s)) + 18|0); + HEAP8[$142>>0] = $141; + $143 = $67 >>> 24; + $144 = $71 << 1; + $145 = $144 | $143; + $146 = $145&255; + $147 = ((($s)) + 19|0); + HEAP8[$147>>0] = $146; + $148 = $71 >>> 7; + $149 = $148&255; + $150 = ((($s)) + 20|0); + HEAP8[$150>>0] = $149; + $151 = $71 >>> 15; + $152 = $151&255; + $153 = ((($s)) + 21|0); + HEAP8[$153>>0] = $152; + $154 = $71 >>> 23; + $155 = $75 << 3; + $156 = $155 | $154; + $157 = $156&255; + $158 = ((($s)) + 22|0); + HEAP8[$158>>0] = $157; + $159 = $75 >>> 5; + $160 = $159&255; + $161 = ((($s)) + 23|0); + HEAP8[$161>>0] = $160; + $162 = $75 >>> 13; + $163 = $162&255; + $164 = ((($s)) + 24|0); + HEAP8[$164>>0] = $163; + $165 = $75 >>> 21; + $166 = $79 << 4; + $167 = $166 | $165; + $168 = $167&255; + $169 = ((($s)) + 25|0); + HEAP8[$169>>0] = $168; + $170 = $79 >>> 4; + $171 = $170&255; + $172 = ((($s)) + 26|0); + HEAP8[$172>>0] = $171; + $173 = $79 >>> 12; + $174 = $173&255; + $175 = ((($s)) + 27|0); + HEAP8[$175>>0] = $174; + $176 = $79 >>> 20; + $177 = $80 << 6; + $178 = $176 | $177; + $179 = $178&255; + $180 = ((($s)) + 28|0); + HEAP8[$180>>0] = $179; + $181 = $77 >>> 2; + $182 = $181&255; + $183 = ((($s)) + 29|0); + HEAP8[$183>>0] = $182; + $184 = $77 >>> 10; + $185 = $184&255; + $186 = ((($s)) + 30|0); + HEAP8[$186>>0] = $185; + $187 = $80 >>> 18; + $188 = $187&255; + $189 = ((($s)) + 31|0); + HEAP8[$189>>0] = $188; + return; +} +function _crypto_sign_ed25519_ref10_ge_add($r,$p,$q) { + $r = $r|0; + $p = $p|0; + $q = $q|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $t0 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; + $t0 = sp; + $0 = ((($p)) + 40|0); + _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); + $1 = ((($r)) + 40|0); + _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); + $2 = ((($r)) + 80|0); + _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); + $3 = ((($q)) + 40|0); + _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 120|0); + $6 = ((($p)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); + $7 = ((($p)) + 80|0); + $8 = ((($q)) + 80|0); + _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); + _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); + _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); + _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); + _crypto_sign_ed25519_ref10_fe_add($2,$t0,$4); + _crypto_sign_ed25519_ref10_fe_sub($4,$t0,$4); + STACKTOP = sp;return; +} +function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { + $r = $r|0; + $a = $a|0; + $A = $A|0; + $b = $b|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0; + var $8 = 0, $9 = 0, $A2 = 0, $Ai = 0, $aslide = 0, $bslide = 0, $i$0$lcssa = 0, $i$02 = 0, $i$11 = 0, $t = 0, $u = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 2272|0; + $aslide = sp + 2016|0; + $bslide = sp + 1760|0; + $Ai = sp + 480|0; + $t = sp + 320|0; + $u = sp + 160|0; + $A2 = sp; + _slide($aslide,$a); + _slide($bslide,$b); + _crypto_sign_ed25519_ref10_ge_p3_to_cached($Ai,$A); + _crypto_sign_ed25519_ref10_ge_p3_dbl($t,$A); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($A2,$t); + _crypto_sign_ed25519_ref10_ge_add($t,$A2,$Ai); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $0 = ((($Ai)) + 160|0); + _crypto_sign_ed25519_ref10_ge_p3_to_cached($0,$u); + _crypto_sign_ed25519_ref10_ge_add($t,$A2,$0); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $1 = ((($Ai)) + 320|0); + _crypto_sign_ed25519_ref10_ge_p3_to_cached($1,$u); + _crypto_sign_ed25519_ref10_ge_add($t,$A2,$1); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $2 = ((($Ai)) + 480|0); + _crypto_sign_ed25519_ref10_ge_p3_to_cached($2,$u); + _crypto_sign_ed25519_ref10_ge_add($t,$A2,$2); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $3 = ((($Ai)) + 640|0); + _crypto_sign_ed25519_ref10_ge_p3_to_cached($3,$u); + _crypto_sign_ed25519_ref10_ge_add($t,$A2,$3); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $4 = ((($Ai)) + 800|0); + _crypto_sign_ed25519_ref10_ge_p3_to_cached($4,$u); + _crypto_sign_ed25519_ref10_ge_add($t,$A2,$4); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $5 = ((($Ai)) + 960|0); + _crypto_sign_ed25519_ref10_ge_p3_to_cached($5,$u); + _crypto_sign_ed25519_ref10_ge_add($t,$A2,$5); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $6 = ((($Ai)) + 1120|0); + _crypto_sign_ed25519_ref10_ge_p3_to_cached($6,$u); + _crypto_sign_ed25519_ref10_ge_p2_0($r); + $i$02 = 255; + while(1) { + $7 = (($aslide) + ($i$02)|0); + $8 = HEAP8[$7>>0]|0; + $9 = ($8<<24>>24)==(0); + if (!($9)) { + $i$0$lcssa = $i$02; + break; + } + $10 = (($bslide) + ($i$02)|0); + $11 = HEAP8[$10>>0]|0; + $12 = ($11<<24>>24)==(0); + if (!($12)) { + $i$0$lcssa = $i$02; + break; + } + $14 = (($i$02) + -1)|0; + $15 = ($i$02|0)>(0); + if ($15) { + $i$02 = $14; + } else { + $i$0$lcssa = $14; + break; + } + } + $13 = ($i$0$lcssa|0)>(-1); + if ($13) { + $i$11 = $i$0$lcssa; + } else { + STACKTOP = sp;return; + } + while(1) { + _crypto_sign_ed25519_ref10_ge_p2_dbl($t,$r); + $16 = (($aslide) + ($i$11)|0); + $17 = HEAP8[$16>>0]|0; + $18 = ($17<<24>>24)>(0); + if ($18) { + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $19 = HEAP8[$16>>0]|0; + $20 = $19 << 24 >> 24; + $21 = (($20|0) / 2)&-1; + $22 = (($Ai) + (($21*160)|0)|0); + _crypto_sign_ed25519_ref10_ge_add($t,$u,$22); + } else { + $23 = ($17<<24>>24)<(0); + if ($23) { + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $24 = HEAP8[$16>>0]|0; + $25 = $24 << 24 >> 24; + $26 = (($25|0) / -2)&-1; + $27 = (($Ai) + (($26*160)|0)|0); + _crypto_sign_ed25519_ref10_ge_sub($t,$u,$27); + } + } + $28 = (($bslide) + ($i$11)|0); + $29 = HEAP8[$28>>0]|0; + $30 = ($29<<24>>24)>(0); + if ($30) { + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $31 = HEAP8[$28>>0]|0; + $32 = $31 << 24 >> 24; + $33 = (($32|0) / 2)&-1; + $34 = (712 + (($33*120)|0)|0); + _crypto_sign_ed25519_ref10_ge_madd($t,$u,$34); + } else { + $35 = ($29<<24>>24)<(0); + if ($35) { + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); + $36 = HEAP8[$28>>0]|0; + $37 = $36 << 24 >> 24; + $38 = (($37|0) / -2)&-1; + $39 = (712 + (($38*120)|0)|0); + _crypto_sign_ed25519_ref10_ge_msub($t,$u,$39); + } + } + _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($r,$t); + $40 = (($i$11) + -1)|0; + $41 = ($i$11|0)>(0); + if ($41) { + $i$11 = $40; + } else { + break; + } + } + STACKTOP = sp;return; +} +function _slide($r,$a) { + $r = $r|0; + $a = $a|0; + var $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$03 = 0, $exitcond = 0, $exitcond9 = 0; + var $i$07 = 0, $i$14 = 0, $k$02 = 0, label = 0, sp = 0; + sp = STACKTOP; + $i$07 = 0; + while(1) { + $0 = $i$07 >> 3; + $1 = (($a) + ($0)|0); + $2 = HEAP8[$1>>0]|0; + $3 = $2&255; + $4 = $i$07 & 7; + $5 = $3 >>> $4; + $6 = $5 & 1; + $7 = $6&255; + $8 = (($r) + ($i$07)|0); + HEAP8[$8>>0] = $7; + $9 = (($i$07) + 1)|0; + $exitcond9 = ($9|0)==(256); + if ($exitcond9) { + $i$14 = 0; + break; + } else { + $i$07 = $9; + } + } + while(1) { + $10 = (($r) + ($i$14)|0); + $11 = HEAP8[$10>>0]|0; + $12 = ($11<<24>>24)==(0); + L5: do { + if (!($12)) { + $b$03 = 1; while(1) { - $926 = HEAP32[$sp$0$i$i$i>>2]|0; - $927 = ($926>>>0)>($636>>>0); - if (!($927)) { - $928 = (($sp$0$i$i$i) + 4|0); - $929 = HEAP32[$928>>2]|0; - $930 = (($926) + ($929)|0); - $931 = ($930>>>0)>($636>>>0); - if ($931) { - break; - } - } - $932 = (($sp$0$i$i$i) + 8|0); - $933 = HEAP32[$932>>2]|0; - $sp$0$i$i$i = $933; - } - $$sum$i13$i = (($929) + -47)|0; - $$sum1$i14$i = (($929) + -39)|0; - $934 = (($926) + ($$sum1$i14$i)|0); - $935 = $934; - $936 = $935 & 7; - $937 = ($936|0)==(0); - if ($937) { - $940 = 0; - } else { - $938 = (0 - ($935))|0; - $939 = $938 & 7; - $940 = $939; - } - $$sum2$i15$i = (($$sum$i13$i) + ($940))|0; - $941 = (($926) + ($$sum2$i15$i)|0); - $942 = (($636) + 16|0); - $943 = ($941>>>0)<($942>>>0); - $944 = $943 ? $636 : $941; - $945 = (($944) + 8|0); - $946 = (($tsize$244$i) + -40)|0; - $947 = (($tbase$245$i) + 8|0); - $948 = $947; - $949 = $948 & 7; - $950 = ($949|0)==(0); - if ($950) { - $954 = 0; - } else { - $951 = (0 - ($948))|0; - $952 = $951 & 7; - $954 = $952; - } - $953 = (($tbase$245$i) + ($954)|0); - $955 = (($946) - ($954))|0; - HEAP32[((32544 + 24|0))>>2] = $953; - HEAP32[((32544 + 12|0))>>2] = $955; - $956 = $955 | 1; - $$sum$i$i$i = (($954) + 4)|0; - $957 = (($tbase$245$i) + ($$sum$i$i$i)|0); - HEAP32[$957>>2] = $956; - $$sum2$i$i$i = (($tsize$244$i) + -36)|0; - $958 = (($tbase$245$i) + ($$sum2$i$i$i)|0); - HEAP32[$958>>2] = 40; - $959 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $959; - $960 = (($944) + 4|0); - HEAP32[$960>>2] = 27; - ;HEAP32[$945+0>>2]=HEAP32[((32544 + 448|0))+0>>2]|0;HEAP32[$945+4>>2]=HEAP32[((32544 + 448|0))+4>>2]|0;HEAP32[$945+8>>2]=HEAP32[((32544 + 448|0))+8>>2]|0;HEAP32[$945+12>>2]=HEAP32[((32544 + 448|0))+12>>2]|0; - HEAP32[((32544 + 448|0))>>2] = $tbase$245$i; - HEAP32[((32544 + 452|0))>>2] = $tsize$244$i; - HEAP32[((32544 + 460|0))>>2] = 0; - HEAP32[((32544 + 456|0))>>2] = $945; - $961 = (($944) + 28|0); - HEAP32[$961>>2] = 7; - $962 = (($944) + 32|0); - $963 = ($962>>>0)<($930>>>0); - if ($963) { - $965 = $961; - while(1) { - $964 = (($965) + 4|0); - HEAP32[$964>>2] = 7; - $966 = (($965) + 8|0); - $967 = ($966>>>0)<($930>>>0); - if ($967) { - $965 = $964; - } else { - break; - } + $13 = (($b$03) + ($i$14))|0; + $14 = ($13|0)<(256); + if (!($14)) { + break L5; } - } - $968 = ($944|0)==($636|0); - if (!($968)) { - $969 = $944; - $970 = $636; - $971 = (($969) - ($970))|0; - $972 = (($636) + ($971)|0); - $$sum3$i$i = (($971) + 4)|0; - $973 = (($636) + ($$sum3$i$i)|0); - $974 = HEAP32[$973>>2]|0; - $975 = $974 & -2; - HEAP32[$973>>2] = $975; - $976 = $971 | 1; - $977 = (($636) + 4|0); - HEAP32[$977>>2] = $976; - HEAP32[$972>>2] = $971; - $978 = $971 >>> 3; - $979 = ($971>>>0)<(256); - if ($979) { - $980 = $978 << 1; - $981 = ((32544 + ($980<<2)|0) + 40|0); - $982 = HEAP32[32544>>2]|0; - $983 = 1 << $978; - $984 = $982 & $983; - $985 = ($984|0)==(0); - do { - if ($985) { - $986 = $982 | $983; - HEAP32[32544>>2] = $986; - $$sum10$pre$i$i = (($980) + 2)|0; - $$pre$i$i = ((32544 + ($$sum10$pre$i$i<<2)|0) + 40|0); - $$pre$phi$i$iZ2D = $$pre$i$i;$F$0$i$i = $981; - } else { - $$sum11$i$i = (($980) + 2)|0; - $987 = ((32544 + ($$sum11$i$i<<2)|0) + 40|0); - $988 = HEAP32[$987>>2]|0; - $989 = HEAP32[((32544 + 16|0))>>2]|0; - $990 = ($988>>>0)<($989>>>0); - if (!($990)) { - $$pre$phi$i$iZ2D = $987;$F$0$i$i = $988; - break; - } - _abort(); - // unreachable; + $15 = (($r) + ($13)|0); + $16 = HEAP8[$15>>0]|0; + $17 = ($16<<24>>24)==(0); + L9: do { + if (!($17)) { + $18 = HEAP8[$10>>0]|0; + $19 = $18 << 24 >> 24; + $20 = $16 << 24 >> 24; + $21 = $20 << $b$03; + $22 = (($19) + ($21))|0; + $23 = ($22|0)<(16); + if ($23) { + $24 = $22&255; + HEAP8[$10>>0] = $24; + HEAP8[$15>>0] = 0; + break; } - } while(0); - HEAP32[$$pre$phi$i$iZ2D>>2] = $636; - $991 = (($F$0$i$i) + 12|0); - HEAP32[$991>>2] = $636; - $992 = (($636) + 8|0); - HEAP32[$992>>2] = $F$0$i$i; - $993 = (($636) + 12|0); - HEAP32[$993>>2] = $981; - break; - } - $994 = $971 >>> 8; - $995 = ($994|0)==(0); - if ($995) { - $I1$0$i$i = 0; - } else { - $996 = ($971>>>0)>(16777215); - if ($996) { - $I1$0$i$i = 31; - } else { - $997 = (($994) + 1048320)|0; - $998 = $997 >>> 16; - $999 = $998 & 8; - $1000 = $994 << $999; - $1001 = (($1000) + 520192)|0; - $1002 = $1001 >>> 16; - $1003 = $1002 & 4; - $1004 = $1003 | $999; - $1005 = $1000 << $1003; - $1006 = (($1005) + 245760)|0; - $1007 = $1006 >>> 16; - $1008 = $1007 & 2; - $1009 = $1004 | $1008; - $1010 = (14 - ($1009))|0; - $1011 = $1005 << $1008; - $1012 = $1011 >>> 15; - $1013 = (($1010) + ($1012))|0; - $1014 = $1013 << 1; - $1015 = (($1013) + 7)|0; - $1016 = $971 >>> $1015; - $1017 = $1016 & 1; - $1018 = $1017 | $1014; - $I1$0$i$i = $1018; - } - } - $1019 = ((32544 + ($I1$0$i$i<<2)|0) + 304|0); - $1020 = (($636) + 28|0); - $I1$0$c$i$i = $I1$0$i$i; - HEAP32[$1020>>2] = $I1$0$c$i$i; - $1021 = (($636) + 20|0); - HEAP32[$1021>>2] = 0; - $1022 = (($636) + 16|0); - HEAP32[$1022>>2] = 0; - $1023 = HEAP32[((32544 + 4|0))>>2]|0; - $1024 = 1 << $I1$0$i$i; - $1025 = $1023 & $1024; - $1026 = ($1025|0)==(0); - if ($1026) { - $1027 = $1023 | $1024; - HEAP32[((32544 + 4|0))>>2] = $1027; - HEAP32[$1019>>2] = $636; - $1028 = (($636) + 24|0); - HEAP32[$1028>>2] = $1019; - $1029 = (($636) + 12|0); - HEAP32[$1029>>2] = $636; - $1030 = (($636) + 8|0); - HEAP32[$1030>>2] = $636; - break; - } - $1031 = HEAP32[$1019>>2]|0; - $1032 = ($I1$0$i$i|0)==(31); - if ($1032) { - $1040 = 0; - } else { - $1033 = $I1$0$i$i >>> 1; - $1034 = (25 - ($1033))|0; - $1040 = $1034; - } - $1035 = (($1031) + 4|0); - $1036 = HEAP32[$1035>>2]|0; - $1037 = $1036 & -8; - $1038 = ($1037|0)==($971|0); - L493: do { - if ($1038) { - $T$0$lcssa$i$i = $1031; - } else { - $1039 = $971 << $1040; - $K2$015$i$i = $1039;$T$014$i$i = $1031; + $25 = (($19) - ($21))|0; + $26 = ($25|0)>(-16); + if (!($26)) { + break L5; + } + $27 = $25&255; + HEAP8[$10>>0] = $27; + $k$02 = $13; while(1) { - $1047 = $K2$015$i$i >>> 31; - $1048 = ((($T$014$i$i) + ($1047<<2)|0) + 16|0); - $1043 = HEAP32[$1048>>2]|0; - $1049 = ($1043|0)==(0|0); - if ($1049) { + $28 = (($r) + ($k$02)|0); + $29 = HEAP8[$28>>0]|0; + $30 = ($29<<24>>24)==(0); + if ($30) { + $$lcssa = $28; break; } - $1041 = $K2$015$i$i << 1; - $1042 = (($1043) + 4|0); - $1044 = HEAP32[$1042>>2]|0; - $1045 = $1044 & -8; - $1046 = ($1045|0)==($971|0); - if ($1046) { - $T$0$lcssa$i$i = $1043; - break L493; + HEAP8[$28>>0] = 0; + $31 = (($k$02) + 1)|0; + $32 = ($31|0)<(256); + if ($32) { + $k$02 = $31; } else { - $K2$015$i$i = $1041;$T$014$i$i = $1043; + break L9; } } - $1050 = HEAP32[((32544 + 16|0))>>2]|0; - $1051 = ($1048>>>0)<($1050>>>0); - if ($1051) { - _abort(); - // unreachable; - } else { - HEAP32[$1048>>2] = $636; - $1052 = (($636) + 24|0); - HEAP32[$1052>>2] = $T$014$i$i; - $1053 = (($636) + 12|0); - HEAP32[$1053>>2] = $636; - $1054 = (($636) + 8|0); - HEAP32[$1054>>2] = $636; - break L308; - } + HEAP8[$$lcssa>>0] = 1; } } while(0); - $1055 = (($T$0$lcssa$i$i) + 8|0); - $1056 = HEAP32[$1055>>2]|0; - $1057 = HEAP32[((32544 + 16|0))>>2]|0; - $1058 = ($T$0$lcssa$i$i>>>0)>=($1057>>>0); - $1059 = ($1056>>>0)>=($1057>>>0); - $or$cond$i$i = $1058 & $1059; - if ($or$cond$i$i) { - $1060 = (($1056) + 12|0); - HEAP32[$1060>>2] = $636; - HEAP32[$1055>>2] = $636; - $1061 = (($636) + 8|0); - HEAP32[$1061>>2] = $1056; - $1062 = (($636) + 12|0); - HEAP32[$1062>>2] = $T$0$lcssa$i$i; - $1063 = (($636) + 24|0); - HEAP32[$1063>>2] = 0; - break; + $33 = (($b$03) + 1)|0; + $34 = ($33|0)<(7); + if ($34) { + $b$03 = $33; } else { - _abort(); - // unreachable; + break; } } } - } while(0); - $1064 = HEAP32[((32544 + 12|0))>>2]|0; - $1065 = ($1064>>>0)>($nb$0>>>0); - if ($1065) { - $1066 = (($1064) - ($nb$0))|0; - HEAP32[((32544 + 12|0))>>2] = $1066; - $1067 = HEAP32[((32544 + 24|0))>>2]|0; - $1068 = (($1067) + ($nb$0)|0); - HEAP32[((32544 + 24|0))>>2] = $1068; - $1069 = $1066 | 1; - $$sum$i32 = (($nb$0) + 4)|0; - $1070 = (($1067) + ($$sum$i32)|0); - HEAP32[$1070>>2] = $1069; - $1071 = $nb$0 | 3; - $1072 = (($1067) + 4|0); - HEAP32[$1072>>2] = $1071; - $1073 = (($1067) + 8|0); - $mem$0 = $1073; - STACKTOP = sp;return ($mem$0|0); + } while(0); + $35 = (($i$14) + 1)|0; + $exitcond = ($35|0)==(256); + if ($exitcond) { + break; + } else { + $i$14 = $35; + } + } + return; +} +function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { + $h = $h|0; + $s = $s|0; + var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $check = 0, $u = 0, $v = 0, $v3 = 0, $vxx = 0, label = 0; + var sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 208|0; + $u = sp + 160|0; + $v = sp + 120|0; + $v3 = sp + 80|0; + $vxx = sp + 40|0; + $check = sp; + $0 = ((($h)) + 40|0); + _crypto_sign_ed25519_ref10_fe_frombytes($0,$s); + $1 = ((($h)) + 80|0); + _crypto_sign_ed25519_ref10_fe_1($1); + _crypto_sign_ed25519_ref10_fe_sq($u,$0); + _crypto_sign_ed25519_ref10_fe_mul($v,$u,1672); + _crypto_sign_ed25519_ref10_fe_sub($u,$u,$1); + _crypto_sign_ed25519_ref10_fe_add($v,$v,$1); + _crypto_sign_ed25519_ref10_fe_sq($v3,$v); + _crypto_sign_ed25519_ref10_fe_mul($v3,$v3,$v); + _crypto_sign_ed25519_ref10_fe_sq($h,$v3); + _crypto_sign_ed25519_ref10_fe_mul($h,$h,$v); + _crypto_sign_ed25519_ref10_fe_mul($h,$h,$u); + _crypto_sign_ed25519_ref10_fe_pow22523($h,$h); + _crypto_sign_ed25519_ref10_fe_mul($h,$h,$v3); + _crypto_sign_ed25519_ref10_fe_mul($h,$h,$u); + _crypto_sign_ed25519_ref10_fe_sq($vxx,$h); + _crypto_sign_ed25519_ref10_fe_mul($vxx,$vxx,$v); + _crypto_sign_ed25519_ref10_fe_sub($check,$vxx,$u); + $2 = (_crypto_sign_ed25519_ref10_fe_isnonzero($check)|0); + $3 = ($2|0)==(0); + do { + if (!($3)) { + _crypto_sign_ed25519_ref10_fe_add($check,$vxx,$u); + $4 = (_crypto_sign_ed25519_ref10_fe_isnonzero($check)|0); + $5 = ($4|0)==(0); + if ($5) { + _crypto_sign_ed25519_ref10_fe_mul($h,$h,1712); + break; + } else { + $$0 = -1; + STACKTOP = sp;return ($$0|0); + } + } + } while(0); + $6 = (_crypto_sign_ed25519_ref10_fe_isnegative($h)|0); + $7 = ((($s)) + 31|0); + $8 = HEAP8[$7>>0]|0; + $9 = $8&255; + $10 = $9 >>> 7; + $11 = ($6|0)==($10|0); + if ($11) { + _crypto_sign_ed25519_ref10_fe_neg($h,$h); + } + $12 = ((($h)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($12,$h,$0); + $$0 = 0; + STACKTOP = sp;return ($$0|0); +} +function _crypto_sign_ed25519_ref10_ge_madd($r,$p,$q) { + $r = $r|0; + $p = $p|0; + $q = $q|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $t0 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; + $t0 = sp; + $0 = ((($p)) + 40|0); + _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); + $1 = ((($r)) + 40|0); + _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); + $2 = ((($r)) + 80|0); + _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); + $3 = ((($q)) + 40|0); + _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 80|0); + $6 = ((($p)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); + $7 = ((($p)) + 80|0); + _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); + _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); + _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); + _crypto_sign_ed25519_ref10_fe_add($2,$t0,$4); + _crypto_sign_ed25519_ref10_fe_sub($4,$t0,$4); + STACKTOP = sp;return; +} +function _crypto_sign_ed25519_ref10_ge_msub($r,$p,$q) { + $r = $r|0; + $p = $p|0; + $q = $q|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $t0 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; + $t0 = sp; + $0 = ((($p)) + 40|0); + _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); + $1 = ((($r)) + 40|0); + _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); + $2 = ((($r)) + 80|0); + $3 = ((($q)) + 40|0); + _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); + _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 80|0); + $6 = ((($p)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); + $7 = ((($p)) + 80|0); + _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); + _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); + _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); + _crypto_sign_ed25519_ref10_fe_sub($2,$t0,$4); + _crypto_sign_ed25519_ref10_fe_add($4,$t0,$4); + STACKTOP = sp;return; +} +function _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($r,$p) { + $r = $r|0; + $p = $p|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ((($p)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); + $1 = ((($r)) + 40|0); + $2 = ((($p)) + 40|0); + $3 = ((($p)) + 80|0); + _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); + $4 = ((($r)) + 80|0); + _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); + return; +} +function _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($r,$p) { + $r = $r|0; + $p = $p|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ((($p)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); + $1 = ((($r)) + 40|0); + $2 = ((($p)) + 40|0); + $3 = ((($p)) + 80|0); + _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); + $4 = ((($r)) + 80|0); + _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); + $5 = ((($r)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($5,$p,$2); + return; +} +function _crypto_sign_ed25519_ref10_ge_p2_0($h) { + $h = $h|0; + var $0 = 0, $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + _crypto_sign_ed25519_ref10_fe_0($h); + $0 = ((($h)) + 40|0); + _crypto_sign_ed25519_ref10_fe_1($0); + $1 = ((($h)) + 80|0); + _crypto_sign_ed25519_ref10_fe_1($1); + return; +} +function _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$p) { + $r = $r|0; + $p = $p|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $t0 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; + $t0 = sp; + _crypto_sign_ed25519_ref10_fe_sq($r,$p); + $0 = ((($r)) + 80|0); + $1 = ((($p)) + 40|0); + _crypto_sign_ed25519_ref10_fe_sq($0,$1); + $2 = ((($r)) + 120|0); + $3 = ((($p)) + 80|0); + _crypto_sign_ed25519_ref10_fe_sq2($2,$3); + $4 = ((($r)) + 40|0); + _crypto_sign_ed25519_ref10_fe_add($4,$p,$1); + _crypto_sign_ed25519_ref10_fe_sq($t0,$4); + _crypto_sign_ed25519_ref10_fe_add($4,$0,$r); + _crypto_sign_ed25519_ref10_fe_sub($0,$0,$r); + _crypto_sign_ed25519_ref10_fe_sub($r,$t0,$4); + _crypto_sign_ed25519_ref10_fe_sub($2,$2,$0); + STACKTOP = sp;return; +} +function _crypto_sign_ed25519_ref10_ge_p3_0($h) { + $h = $h|0; + var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + _crypto_sign_ed25519_ref10_fe_0($h); + $0 = ((($h)) + 40|0); + _crypto_sign_ed25519_ref10_fe_1($0); + $1 = ((($h)) + 80|0); + _crypto_sign_ed25519_ref10_fe_1($1); + $2 = ((($h)) + 120|0); + _crypto_sign_ed25519_ref10_fe_0($2); + return; +} +function _crypto_sign_ed25519_ref10_ge_p3_dbl($r,$p) { + $r = $r|0; + $p = $p|0; + var $q = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; + $q = sp; + _crypto_sign_ed25519_ref10_ge_p3_to_p2($q,$p); + _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$q); + STACKTOP = sp;return; +} +function _crypto_sign_ed25519_ref10_ge_p3_to_cached($r,$p) { + $r = $r|0; + $p = $p|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ((($p)) + 40|0); + _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); + $1 = ((($r)) + 40|0); + _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); + $2 = ((($r)) + 80|0); + $3 = ((($p)) + 80|0); + _crypto_sign_ed25519_ref10_fe_copy($2,$3); + $4 = ((($r)) + 120|0); + $5 = ((($p)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($4,$5,1752); + return; +} +function _crypto_sign_ed25519_ref10_ge_p3_to_p2($r,$p) { + $r = $r|0; + $p = $p|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; + sp = STACKTOP; + _crypto_sign_ed25519_ref10_fe_copy($r,$p); + $0 = ((($r)) + 40|0); + $1 = ((($p)) + 40|0); + _crypto_sign_ed25519_ref10_fe_copy($0,$1); + $2 = ((($r)) + 80|0); + $3 = ((($p)) + 80|0); + _crypto_sign_ed25519_ref10_fe_copy($2,$3); + return; +} +function _crypto_sign_ed25519_ref10_ge_p3_tobytes($s,$h) { + $s = $s|0; + $h = $h|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $recip = 0, $x = 0, $y = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; + $recip = sp + 80|0; + $x = sp + 40|0; + $y = sp; + $0 = ((($h)) + 80|0); + _crypto_sign_ed25519_ref10_fe_invert($recip,$0); + _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); + $1 = ((($h)) + 40|0); + _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); + _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); + $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); + $3 = $2 << 7; + $4 = ((($s)) + 31|0); + $5 = HEAP8[$4>>0]|0; + $6 = $5&255; + $7 = $6 ^ $3; + $8 = $7&255; + HEAP8[$4>>0] = $8; + STACKTOP = sp;return; +} +function _crypto_sign_ed25519_ref10_ge_precomp_0($h) { + $h = $h|0; + var $0 = 0, $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + _crypto_sign_ed25519_ref10_fe_1($h); + $0 = ((($h)) + 40|0); + _crypto_sign_ed25519_ref10_fe_1($0); + $1 = ((($h)) + 80|0); + _crypto_sign_ed25519_ref10_fe_0($1); + return; +} +function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { + $h = $h|0; + $a = $a|0; + var $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $carry$04 = 0, $e = 0, $exitcond = 0; + var $exitcond7 = 0, $i$06 = 0, $i$15 = 0, $i$23 = 0, $i$32 = 0, $r = 0, $s = 0, $sext = 0, $sext1 = 0, $t = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 464|0; + $e = sp + 400|0; + $r = sp + 240|0; + $s = sp + 120|0; + $t = sp; + $i$06 = 0; + while(1) { + $0 = (($a) + ($i$06)|0); + $1 = HEAP8[$0>>0]|0; + $2 = $1&255; + $3 = $2 & 15; + $4 = $3&255; + $5 = $i$06 << 1; + $6 = (($e) + ($5)|0); + HEAP8[$6>>0] = $4; + $7 = HEAP8[$0>>0]|0; + $8 = ($7&255) >>> 4; + $9 = $5 | 1; + $10 = (($e) + ($9)|0); + HEAP8[$10>>0] = $8; + $11 = (($i$06) + 1)|0; + $exitcond7 = ($11|0)==(32); + if ($exitcond7) { + $carry$04 = 0;$i$15 = 0; + break; + } else { + $i$06 = $11; + } + } + while(1) { + $12 = (($e) + ($i$15)|0); + $13 = HEAP8[$12>>0]|0; + $14 = $13&255; + $15 = (($14) + ($carry$04))|0; + $sext = $15 << 24; + $sext1 = (($sext) + 134217728)|0; + $16 = $sext1 >> 28; + $17 = $16 << 4; + $18 = (($15) - ($17))|0; + $19 = $18&255; + HEAP8[$12>>0] = $19; + $20 = (($i$15) + 1)|0; + $exitcond = ($20|0)==(63); + if ($exitcond) { + $$lcssa = $16; + break; + } else { + $carry$04 = $16;$i$15 = $20; + } + } + $21 = ((($e)) + 63|0); + $22 = HEAP8[$21>>0]|0; + $23 = $22&255; + $24 = (($23) + ($$lcssa))|0; + $25 = $24&255; + HEAP8[$21>>0] = $25; + _crypto_sign_ed25519_ref10_ge_p3_0($h); + $i$23 = 1; + while(1) { + $26 = (($i$23|0) / 2)&-1; + $27 = (($e) + ($i$23)|0); + $28 = HEAP8[$27>>0]|0; + _select60($t,$26,$28); + _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); + $29 = (($i$23) + 2)|0; + $30 = ($29|0)<(64); + if ($30) { + $i$23 = $29; + } else { + break; + } + } + _crypto_sign_ed25519_ref10_ge_p3_dbl($r,$h); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($s,$r); + _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$s); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($s,$r); + _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$s); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($s,$r); + _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$s); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); + $i$32 = 0; + while(1) { + $31 = (($i$32|0) / 2)&-1; + $32 = (($e) + ($i$32)|0); + $33 = HEAP8[$32>>0]|0; + _select60($t,$31,$33); + _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); + _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); + $34 = (($i$32) + 2)|0; + $35 = ($34|0)<(64); + if ($35) { + $i$32 = $34; + } else { + break; + } + } + STACKTOP = sp;return; +} +function _select60($t,$pos,$b) { + $t = $t|0; + $pos = $pos|0; + $b = $b|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $minust = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; + $minust = sp; + $0 = (_negative($b)|0); + $1 = $b << 24 >> 24; + $2 = $0&255; + $3 = (0 - ($2))|0; + $4 = $1 & $3; + $5 = $4 << 1; + $6 = (($1) - ($5))|0; + $7 = $6&255; + _crypto_sign_ed25519_ref10_ge_precomp_0($t); + $8 = (1792 + (($pos*960)|0)|0); + $9 = (_equal($7,1)|0); + _cmov($t,$8,$9); + $10 = (((1792 + (($pos*960)|0)|0)) + 120|0); + $11 = (_equal($7,2)|0); + _cmov($t,$10,$11); + $12 = (((1792 + (($pos*960)|0)|0)) + 240|0); + $13 = (_equal($7,3)|0); + _cmov($t,$12,$13); + $14 = (((1792 + (($pos*960)|0)|0)) + 360|0); + $15 = (_equal($7,4)|0); + _cmov($t,$14,$15); + $16 = (((1792 + (($pos*960)|0)|0)) + 480|0); + $17 = (_equal($7,5)|0); + _cmov($t,$16,$17); + $18 = (((1792 + (($pos*960)|0)|0)) + 600|0); + $19 = (_equal($7,6)|0); + _cmov($t,$18,$19); + $20 = (((1792 + (($pos*960)|0)|0)) + 720|0); + $21 = (_equal($7,7)|0); + _cmov($t,$20,$21); + $22 = (((1792 + (($pos*960)|0)|0)) + 840|0); + $23 = (_equal($7,8)|0); + _cmov($t,$22,$23); + $24 = ((($t)) + 40|0); + _crypto_sign_ed25519_ref10_fe_copy($minust,$24); + $25 = ((($minust)) + 40|0); + _crypto_sign_ed25519_ref10_fe_copy($25,$t); + $26 = ((($minust)) + 80|0); + $27 = ((($t)) + 80|0); + _crypto_sign_ed25519_ref10_fe_neg($26,$27); + _cmov($t,$minust,$0); + STACKTOP = sp;return; +} +function _negative($b) { + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $b << 24 >> 24; + $1 = ($0|0)<(0); + $2 = $1 << 31 >> 31; + $3 = (_bitshift64Lshr(($0|0),($2|0),63)|0); + $4 = tempRet0; + $5 = $3&255; + return ($5|0); +} +function _equal($b,$c) { + $b = $b|0; + $c = $c|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $c ^ $b; + $1 = $0&255; + $2 = (($1) + -1)|0; + $3 = $2 >>> 31; + $4 = $3&255; + return ($4|0); +} +function _cmov($t,$u,$b) { + $t = $t|0; + $u = $u|0; + $b = $b|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $b&255; + _crypto_sign_ed25519_ref10_fe_cmov($t,$u,$0); + $1 = ((($t)) + 40|0); + $2 = ((($u)) + 40|0); + _crypto_sign_ed25519_ref10_fe_cmov($1,$2,$0); + $3 = ((($t)) + 80|0); + $4 = ((($u)) + 80|0); + _crypto_sign_ed25519_ref10_fe_cmov($3,$4,$0); + return; +} +function _crypto_sign_ed25519_ref10_ge_sub($r,$p,$q) { + $r = $r|0; + $p = $p|0; + $q = $q|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $t0 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; + $t0 = sp; + $0 = ((($p)) + 40|0); + _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); + $1 = ((($r)) + 40|0); + _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); + $2 = ((($r)) + 80|0); + $3 = ((($q)) + 40|0); + _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); + _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 120|0); + $6 = ((($p)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); + $7 = ((($p)) + 80|0); + $8 = ((($q)) + 80|0); + _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); + _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); + _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); + _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); + _crypto_sign_ed25519_ref10_fe_sub($2,$t0,$4); + _crypto_sign_ed25519_ref10_fe_add($4,$t0,$4); + STACKTOP = sp;return; +} +function _crypto_sign_ed25519_ref10_ge_tobytes($s,$h) { + $s = $s|0; + $h = $h|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $recip = 0, $x = 0, $y = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; + $recip = sp + 80|0; + $x = sp + 40|0; + $y = sp; + $0 = ((($h)) + 80|0); + _crypto_sign_ed25519_ref10_fe_invert($recip,$0); + _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); + $1 = ((($h)) + 40|0); + _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); + _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); + $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); + $3 = $2 << 7; + $4 = ((($s)) + 31|0); + $5 = HEAP8[$4>>0]|0; + $6 = $5&255; + $7 = $6 ^ $3; + $8 = $7&255; + HEAP8[$4>>0] = $8; + STACKTOP = sp;return; +} +function _crypto_sign_edwards25519sha512batch_ref10_open($m,$mlen,$sm,$0,$1,$pk) { + $m = $m|0; + $mlen = $mlen|0; + $sm = $sm|0; + $0 = $0|0; + $1 = $1|0; + $pk = $pk|0; + var $$0 = 0, $$sum = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $A = 0, $R = 0, $h = 0, $pkcopy1 = 0, $rcheck = 0, $rcopy = 0, $scopy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 480|0; + $pkcopy1 = sp + 440|0; + $rcopy = sp + 344|0; + $scopy = sp + 312|0; + $h = sp + 376|0; + $rcheck = sp + 280|0; + $A = sp + 120|0; + $R = sp; + $2 = ($1>>>0)<(0); + $3 = ($0>>>0)<(64); + $4 = ($1|0)==(0); + $5 = $4 & $3; + $6 = $2 | $5; + if (!($6)) { + $7 = ((($sm)) + 63|0); + $8 = HEAP8[$7>>0]|0; + $9 = ($8&255)>(31); + if (!($9)) { + $10 = (_crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($A,$pk)|0); + $11 = ($10|0)==(0); + if ($11) { + dest=$pkcopy1; src=$pk; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$rcopy; src=$sm; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $12 = ((($sm)) + 32|0); + dest=$scopy; src=$12; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + _memmove(($m|0),($sm|0),($0|0))|0; + $13 = ((($m)) + 32|0); + dest=$13; src=$pkcopy1; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + (_crypto_hash_sha512_ref($h,$m,$0,$1)|0); + _crypto_sign_ed25519_ref10_sc_reduce($h); + _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($R,$h,$A,$scopy); + _crypto_sign_ed25519_ref10_ge_tobytes($rcheck,$R); + $14 = (_crypto_verify_32_ref($rcheck,$rcopy)|0); + $15 = ($14|0)==(0); + if ($15) { + $16 = ((($m)) + 64|0); + $17 = (_i64Add(($0|0),($1|0),-64,-1)|0); + $18 = tempRet0; + _memmove(($m|0),($16|0),($17|0))|0; + $$sum = (($0) + -64)|0; + $19 = (($m) + ($$sum)|0); + dest=$19; stop=dest+64|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); + $20 = $mlen; + $21 = $20; + HEAP32[$21>>2] = $17; + $22 = (($20) + 4)|0; + $23 = $22; + HEAP32[$23>>2] = $18; + $$0 = 0; + STACKTOP = sp;return ($$0|0); + } + } + } + } + $24 = $mlen; + $25 = $24; + HEAP32[$25>>2] = -1; + $26 = (($24) + 4)|0; + $27 = $26; + HEAP32[$27>>2] = -1; + _memset(($m|0),0,($0|0))|0; + $$0 = -1; + STACKTOP = sp;return ($$0|0); +} +function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { + $s = $s|0; + $a = $a|0; + $b = $b|0; + $c = $c|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; + var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; + var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; + var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; + var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; + var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; + var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0; + var $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0; + var $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0; + var $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0; + var $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0; + var $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0; + var $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0, $123 = 0, $1230 = 0; + var $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0, $1248 = 0, $1249 = 0; + var $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0, $1266 = 0, $1267 = 0; + var $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $1274 = 0, $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0, $1283 = 0, $1284 = 0, $1285 = 0; + var $1286 = 0, $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0, $1291 = 0, $1292 = 0, $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0, $1300 = 0, $1301 = 0, $1302 = 0; + var $1303 = 0, $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0, $1309 = 0, $131 = 0, $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0, $1319 = 0, $132 = 0, $1320 = 0; + var $1321 = 0, $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0, $1327 = 0, $1328 = 0, $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0, $1337 = 0, $1338 = 0, $1339 = 0; + var $134 = 0, $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0, $1345 = 0, $1346 = 0, $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0, $1355 = 0, $1356 = 0, $1357 = 0; + var $1358 = 0, $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0, $1363 = 0, $1364 = 0, $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0, $1373 = 0, $1374 = 0, $1375 = 0; + var $1376 = 0, $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0, $1381 = 0, $1382 = 0, $1383 = 0, $1384 = 0, $1385 = 0, $1386 = 0, $1387 = 0, $1388 = 0, $1389 = 0, $139 = 0, $1390 = 0, $1391 = 0, $1392 = 0, $1393 = 0; + var $1394 = 0, $1395 = 0, $1396 = 0, $1397 = 0, $1398 = 0, $1399 = 0, $14 = 0, $140 = 0, $1400 = 0, $1401 = 0, $1402 = 0, $1403 = 0, $1404 = 0, $1405 = 0, $1406 = 0, $1407 = 0, $1408 = 0, $1409 = 0, $141 = 0, $1410 = 0; + var $1411 = 0, $1412 = 0, $1413 = 0, $1414 = 0, $1415 = 0, $1416 = 0, $1417 = 0, $1418 = 0, $1419 = 0, $142 = 0, $1420 = 0, $1421 = 0, $1422 = 0, $1423 = 0, $1424 = 0, $1425 = 0, $1426 = 0, $1427 = 0, $1428 = 0, $1429 = 0; + var $143 = 0, $1430 = 0, $1431 = 0, $1432 = 0, $1433 = 0, $1434 = 0, $1435 = 0, $1436 = 0, $1437 = 0, $1438 = 0, $1439 = 0, $144 = 0, $1440 = 0, $1441 = 0, $1442 = 0, $1443 = 0, $1444 = 0, $1445 = 0, $1446 = 0, $1447 = 0; + var $1448 = 0, $1449 = 0, $145 = 0, $1450 = 0, $1451 = 0, $1452 = 0, $1453 = 0, $1454 = 0, $1455 = 0, $1456 = 0, $1457 = 0, $1458 = 0, $1459 = 0, $146 = 0, $1460 = 0, $1461 = 0, $1462 = 0, $1463 = 0, $1464 = 0, $1465 = 0; + var $1466 = 0, $1467 = 0, $1468 = 0, $1469 = 0, $147 = 0, $1470 = 0, $1471 = 0, $1472 = 0, $1473 = 0, $1474 = 0, $1475 = 0, $1476 = 0, $1477 = 0, $1478 = 0, $1479 = 0, $148 = 0, $1480 = 0, $1481 = 0, $1482 = 0, $1483 = 0; + var $1484 = 0, $1485 = 0, $1486 = 0, $1487 = 0, $1488 = 0, $1489 = 0, $149 = 0, $1490 = 0, $1491 = 0, $1492 = 0, $1493 = 0, $1494 = 0, $1495 = 0, $1496 = 0, $1497 = 0, $1498 = 0, $1499 = 0, $15 = 0, $150 = 0, $1500 = 0; + var $1501 = 0, $1502 = 0, $1503 = 0, $1504 = 0, $1505 = 0, $1506 = 0, $1507 = 0, $1508 = 0, $1509 = 0, $151 = 0, $1510 = 0, $1511 = 0, $1512 = 0, $1513 = 0, $1514 = 0, $1515 = 0, $1516 = 0, $1517 = 0, $1518 = 0, $1519 = 0; + var $152 = 0, $1520 = 0, $1521 = 0, $1522 = 0, $1523 = 0, $1524 = 0, $1525 = 0, $1526 = 0, $1527 = 0, $1528 = 0, $1529 = 0, $153 = 0, $1530 = 0, $1531 = 0, $1532 = 0, $1533 = 0, $1534 = 0, $1535 = 0, $1536 = 0, $1537 = 0; + var $1538 = 0, $1539 = 0, $154 = 0, $1540 = 0, $1541 = 0, $1542 = 0, $1543 = 0, $1544 = 0, $1545 = 0, $1546 = 0, $1547 = 0, $1548 = 0, $1549 = 0, $155 = 0, $1550 = 0, $1551 = 0, $1552 = 0, $1553 = 0, $1554 = 0, $1555 = 0; + var $1556 = 0, $1557 = 0, $1558 = 0, $1559 = 0, $156 = 0, $1560 = 0, $1561 = 0, $1562 = 0, $1563 = 0, $1564 = 0, $1565 = 0, $1566 = 0, $1567 = 0, $1568 = 0, $1569 = 0, $157 = 0, $1570 = 0, $1571 = 0, $1572 = 0, $1573 = 0; + var $1574 = 0, $1575 = 0, $1576 = 0, $1577 = 0, $1578 = 0, $1579 = 0, $158 = 0, $1580 = 0, $1581 = 0, $1582 = 0, $1583 = 0, $1584 = 0, $1585 = 0, $1586 = 0, $1587 = 0, $1588 = 0, $1589 = 0, $159 = 0, $1590 = 0, $1591 = 0; + var $1592 = 0, $1593 = 0, $1594 = 0, $1595 = 0, $1596 = 0, $1597 = 0, $1598 = 0, $1599 = 0, $16 = 0, $160 = 0, $1600 = 0, $1601 = 0, $1602 = 0, $1603 = 0, $1604 = 0, $1605 = 0, $1606 = 0, $1607 = 0, $1608 = 0, $1609 = 0; + var $161 = 0, $1610 = 0, $1611 = 0, $1612 = 0, $1613 = 0, $1614 = 0, $1615 = 0, $1616 = 0, $1617 = 0, $1618 = 0, $1619 = 0, $162 = 0, $1620 = 0, $1621 = 0, $1622 = 0, $1623 = 0, $1624 = 0, $1625 = 0, $1626 = 0, $1627 = 0; + var $1628 = 0, $1629 = 0, $163 = 0, $1630 = 0, $1631 = 0, $1632 = 0, $1633 = 0, $1634 = 0, $1635 = 0, $1636 = 0, $1637 = 0, $1638 = 0, $1639 = 0, $164 = 0, $1640 = 0, $1641 = 0, $1642 = 0, $1643 = 0, $1644 = 0, $1645 = 0; + var $1646 = 0, $1647 = 0, $1648 = 0, $1649 = 0, $165 = 0, $1650 = 0, $1651 = 0, $1652 = 0, $1653 = 0, $1654 = 0, $1655 = 0, $1656 = 0, $1657 = 0, $1658 = 0, $1659 = 0, $166 = 0, $1660 = 0, $1661 = 0, $1662 = 0, $1663 = 0; + var $1664 = 0, $1665 = 0, $1666 = 0, $1667 = 0, $1668 = 0, $1669 = 0, $167 = 0, $1670 = 0, $1671 = 0, $1672 = 0, $1673 = 0, $1674 = 0, $1675 = 0, $1676 = 0, $1677 = 0, $1678 = 0, $1679 = 0, $168 = 0, $1680 = 0, $1681 = 0; + var $1682 = 0, $1683 = 0, $1684 = 0, $1685 = 0, $1686 = 0, $1687 = 0, $1688 = 0, $1689 = 0, $169 = 0, $1690 = 0, $1691 = 0, $1692 = 0, $1693 = 0, $1694 = 0, $1695 = 0, $1696 = 0, $1697 = 0, $1698 = 0, $1699 = 0, $17 = 0; + var $170 = 0, $1700 = 0, $1701 = 0, $1702 = 0, $1703 = 0, $1704 = 0, $1705 = 0, $1706 = 0, $1707 = 0, $1708 = 0, $1709 = 0, $171 = 0, $1710 = 0, $1711 = 0, $1712 = 0, $1713 = 0, $1714 = 0, $1715 = 0, $1716 = 0, $1717 = 0; + var $1718 = 0, $1719 = 0, $172 = 0, $1720 = 0, $1721 = 0, $1722 = 0, $1723 = 0, $1724 = 0, $1725 = 0, $1726 = 0, $1727 = 0, $1728 = 0, $1729 = 0, $173 = 0, $1730 = 0, $1731 = 0, $1732 = 0, $1733 = 0, $1734 = 0, $1735 = 0; + var $1736 = 0, $1737 = 0, $1738 = 0, $1739 = 0, $174 = 0, $1740 = 0, $1741 = 0, $1742 = 0, $1743 = 0, $1744 = 0, $1745 = 0, $1746 = 0, $1747 = 0, $1748 = 0, $1749 = 0, $175 = 0, $1750 = 0, $1751 = 0, $1752 = 0, $1753 = 0; + var $1754 = 0, $1755 = 0, $1756 = 0, $1757 = 0, $1758 = 0, $1759 = 0, $176 = 0, $1760 = 0, $1761 = 0, $1762 = 0, $1763 = 0, $1764 = 0, $1765 = 0, $1766 = 0, $1767 = 0, $1768 = 0, $1769 = 0, $177 = 0, $1770 = 0, $1771 = 0; + var $1772 = 0, $1773 = 0, $1774 = 0, $1775 = 0, $1776 = 0, $1777 = 0, $1778 = 0, $1779 = 0, $178 = 0, $1780 = 0, $1781 = 0, $1782 = 0, $1783 = 0, $1784 = 0, $1785 = 0, $1786 = 0, $1787 = 0, $1788 = 0, $1789 = 0, $179 = 0; + var $1790 = 0, $1791 = 0, $1792 = 0, $1793 = 0, $1794 = 0, $1795 = 0, $1796 = 0, $1797 = 0, $1798 = 0, $1799 = 0, $18 = 0, $180 = 0, $1800 = 0, $1801 = 0, $1802 = 0, $1803 = 0, $1804 = 0, $1805 = 0, $1806 = 0, $1807 = 0; + var $1808 = 0, $1809 = 0, $181 = 0, $1810 = 0, $1811 = 0, $1812 = 0, $1813 = 0, $1814 = 0, $1815 = 0, $1816 = 0, $1817 = 0, $1818 = 0, $1819 = 0, $182 = 0, $1820 = 0, $1821 = 0, $1822 = 0, $1823 = 0, $1824 = 0, $1825 = 0; + var $1826 = 0, $1827 = 0, $1828 = 0, $1829 = 0, $183 = 0, $1830 = 0, $1831 = 0, $1832 = 0, $1833 = 0, $1834 = 0, $1835 = 0, $1836 = 0, $1837 = 0, $1838 = 0, $1839 = 0, $184 = 0, $1840 = 0, $1841 = 0, $1842 = 0, $1843 = 0; + var $1844 = 0, $1845 = 0, $1846 = 0, $1847 = 0, $1848 = 0, $1849 = 0, $185 = 0, $1850 = 0, $1851 = 0, $1852 = 0, $1853 = 0, $1854 = 0, $1855 = 0, $1856 = 0, $1857 = 0, $1858 = 0, $1859 = 0, $186 = 0, $1860 = 0, $1861 = 0; + var $1862 = 0, $1863 = 0, $1864 = 0, $1865 = 0, $1866 = 0, $1867 = 0, $1868 = 0, $1869 = 0, $187 = 0, $1870 = 0, $1871 = 0, $1872 = 0, $1873 = 0, $1874 = 0, $1875 = 0, $1876 = 0, $1877 = 0, $1878 = 0, $188 = 0, $189 = 0; + var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; + var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; + var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; + var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; + var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; + var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; + var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; + var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; + var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; + var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; + var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; + var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; + var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; + var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; + var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; + var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; + var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; + var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; + var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; + var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; + var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; + var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; + var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; + var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; + var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; + var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; + var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; + var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; + var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; + var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; + var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; + var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; + var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; + var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; + var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; + var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; + var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; + var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; + var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; + var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; + var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; + var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; + var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; + var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; + var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $0 = (_load_347($a)|0); + $1 = tempRet0; + $2 = $0 & 2097151; + $3 = ((($a)) + 2|0); + $4 = (_load_448($3)|0); + $5 = tempRet0; + $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); + $7 = tempRet0; + $8 = $6 & 2097151; + $9 = ((($a)) + 5|0); + $10 = (_load_347($9)|0); + $11 = tempRet0; + $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); + $13 = tempRet0; + $14 = $12 & 2097151; + $15 = ((($a)) + 7|0); + $16 = (_load_448($15)|0); + $17 = tempRet0; + $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); + $19 = tempRet0; + $20 = $18 & 2097151; + $21 = ((($a)) + 10|0); + $22 = (_load_448($21)|0); + $23 = tempRet0; + $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); + $25 = tempRet0; + $26 = $24 & 2097151; + $27 = ((($a)) + 13|0); + $28 = (_load_347($27)|0); + $29 = tempRet0; + $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); + $31 = tempRet0; + $32 = $30 & 2097151; + $33 = ((($a)) + 15|0); + $34 = (_load_448($33)|0); + $35 = tempRet0; + $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); + $37 = tempRet0; + $38 = $36 & 2097151; + $39 = ((($a)) + 18|0); + $40 = (_load_347($39)|0); + $41 = tempRet0; + $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); + $43 = tempRet0; + $44 = $42 & 2097151; + $45 = ((($a)) + 21|0); + $46 = (_load_347($45)|0); + $47 = tempRet0; + $48 = $46 & 2097151; + $49 = ((($a)) + 23|0); + $50 = (_load_448($49)|0); + $51 = tempRet0; + $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); + $53 = tempRet0; + $54 = $52 & 2097151; + $55 = ((($a)) + 26|0); + $56 = (_load_347($55)|0); + $57 = tempRet0; + $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); + $59 = tempRet0; + $60 = $58 & 2097151; + $61 = ((($a)) + 28|0); + $62 = (_load_448($61)|0); + $63 = tempRet0; + $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); + $65 = tempRet0; + $66 = (_load_347($b)|0); + $67 = tempRet0; + $68 = $66 & 2097151; + $69 = ((($b)) + 2|0); + $70 = (_load_448($69)|0); + $71 = tempRet0; + $72 = (_bitshift64Lshr(($70|0),($71|0),5)|0); + $73 = tempRet0; + $74 = $72 & 2097151; + $75 = ((($b)) + 5|0); + $76 = (_load_347($75)|0); + $77 = tempRet0; + $78 = (_bitshift64Lshr(($76|0),($77|0),2)|0); + $79 = tempRet0; + $80 = $78 & 2097151; + $81 = ((($b)) + 7|0); + $82 = (_load_448($81)|0); + $83 = tempRet0; + $84 = (_bitshift64Lshr(($82|0),($83|0),7)|0); + $85 = tempRet0; + $86 = $84 & 2097151; + $87 = ((($b)) + 10|0); + $88 = (_load_448($87)|0); + $89 = tempRet0; + $90 = (_bitshift64Lshr(($88|0),($89|0),4)|0); + $91 = tempRet0; + $92 = $90 & 2097151; + $93 = ((($b)) + 13|0); + $94 = (_load_347($93)|0); + $95 = tempRet0; + $96 = (_bitshift64Lshr(($94|0),($95|0),1)|0); + $97 = tempRet0; + $98 = $96 & 2097151; + $99 = ((($b)) + 15|0); + $100 = (_load_448($99)|0); + $101 = tempRet0; + $102 = (_bitshift64Lshr(($100|0),($101|0),6)|0); + $103 = tempRet0; + $104 = $102 & 2097151; + $105 = ((($b)) + 18|0); + $106 = (_load_347($105)|0); + $107 = tempRet0; + $108 = (_bitshift64Lshr(($106|0),($107|0),3)|0); + $109 = tempRet0; + $110 = $108 & 2097151; + $111 = ((($b)) + 21|0); + $112 = (_load_347($111)|0); + $113 = tempRet0; + $114 = $112 & 2097151; + $115 = ((($b)) + 23|0); + $116 = (_load_448($115)|0); + $117 = tempRet0; + $118 = (_bitshift64Lshr(($116|0),($117|0),5)|0); + $119 = tempRet0; + $120 = $118 & 2097151; + $121 = ((($b)) + 26|0); + $122 = (_load_347($121)|0); + $123 = tempRet0; + $124 = (_bitshift64Lshr(($122|0),($123|0),2)|0); + $125 = tempRet0; + $126 = $124 & 2097151; + $127 = ((($b)) + 28|0); + $128 = (_load_448($127)|0); + $129 = tempRet0; + $130 = (_bitshift64Lshr(($128|0),($129|0),7)|0); + $131 = tempRet0; + $132 = (_load_347($c)|0); + $133 = tempRet0; + $134 = $132 & 2097151; + $135 = ((($c)) + 2|0); + $136 = (_load_448($135)|0); + $137 = tempRet0; + $138 = (_bitshift64Lshr(($136|0),($137|0),5)|0); + $139 = tempRet0; + $140 = $138 & 2097151; + $141 = ((($c)) + 5|0); + $142 = (_load_347($141)|0); + $143 = tempRet0; + $144 = (_bitshift64Lshr(($142|0),($143|0),2)|0); + $145 = tempRet0; + $146 = $144 & 2097151; + $147 = ((($c)) + 7|0); + $148 = (_load_448($147)|0); + $149 = tempRet0; + $150 = (_bitshift64Lshr(($148|0),($149|0),7)|0); + $151 = tempRet0; + $152 = $150 & 2097151; + $153 = ((($c)) + 10|0); + $154 = (_load_448($153)|0); + $155 = tempRet0; + $156 = (_bitshift64Lshr(($154|0),($155|0),4)|0); + $157 = tempRet0; + $158 = $156 & 2097151; + $159 = ((($c)) + 13|0); + $160 = (_load_347($159)|0); + $161 = tempRet0; + $162 = (_bitshift64Lshr(($160|0),($161|0),1)|0); + $163 = tempRet0; + $164 = $162 & 2097151; + $165 = ((($c)) + 15|0); + $166 = (_load_448($165)|0); + $167 = tempRet0; + $168 = (_bitshift64Lshr(($166|0),($167|0),6)|0); + $169 = tempRet0; + $170 = $168 & 2097151; + $171 = ((($c)) + 18|0); + $172 = (_load_347($171)|0); + $173 = tempRet0; + $174 = (_bitshift64Lshr(($172|0),($173|0),3)|0); + $175 = tempRet0; + $176 = $174 & 2097151; + $177 = ((($c)) + 21|0); + $178 = (_load_347($177)|0); + $179 = tempRet0; + $180 = $178 & 2097151; + $181 = ((($c)) + 23|0); + $182 = (_load_448($181)|0); + $183 = tempRet0; + $184 = (_bitshift64Lshr(($182|0),($183|0),5)|0); + $185 = tempRet0; + $186 = $184 & 2097151; + $187 = ((($c)) + 26|0); + $188 = (_load_347($187)|0); + $189 = tempRet0; + $190 = (_bitshift64Lshr(($188|0),($189|0),2)|0); + $191 = tempRet0; + $192 = $190 & 2097151; + $193 = ((($c)) + 28|0); + $194 = (_load_448($193)|0); + $195 = tempRet0; + $196 = (_bitshift64Lshr(($194|0),($195|0),7)|0); + $197 = tempRet0; + $198 = (___muldi3(($68|0),0,($2|0),0)|0); + $199 = tempRet0; + $200 = (_i64Add(($134|0),0,($198|0),($199|0))|0); + $201 = tempRet0; + $202 = (___muldi3(($74|0),0,($2|0),0)|0); + $203 = tempRet0; + $204 = (___muldi3(($68|0),0,($8|0),0)|0); + $205 = tempRet0; + $206 = (___muldi3(($80|0),0,($2|0),0)|0); + $207 = tempRet0; + $208 = (___muldi3(($74|0),0,($8|0),0)|0); + $209 = tempRet0; + $210 = (___muldi3(($68|0),0,($14|0),0)|0); + $211 = tempRet0; + $212 = (_i64Add(($208|0),($209|0),($210|0),($211|0))|0); + $213 = tempRet0; + $214 = (_i64Add(($212|0),($213|0),($206|0),($207|0))|0); + $215 = tempRet0; + $216 = (_i64Add(($214|0),($215|0),($146|0),0)|0); + $217 = tempRet0; + $218 = (___muldi3(($86|0),0,($2|0),0)|0); + $219 = tempRet0; + $220 = (___muldi3(($80|0),0,($8|0),0)|0); + $221 = tempRet0; + $222 = (___muldi3(($74|0),0,($14|0),0)|0); + $223 = tempRet0; + $224 = (___muldi3(($68|0),0,($20|0),0)|0); + $225 = tempRet0; + $226 = (___muldi3(($92|0),0,($2|0),0)|0); + $227 = tempRet0; + $228 = (___muldi3(($86|0),0,($8|0),0)|0); + $229 = tempRet0; + $230 = (___muldi3(($80|0),0,($14|0),0)|0); + $231 = tempRet0; + $232 = (___muldi3(($74|0),0,($20|0),0)|0); + $233 = tempRet0; + $234 = (___muldi3(($68|0),0,($26|0),0)|0); + $235 = tempRet0; + $236 = (_i64Add(($232|0),($233|0),($234|0),($235|0))|0); + $237 = tempRet0; + $238 = (_i64Add(($236|0),($237|0),($230|0),($231|0))|0); + $239 = tempRet0; + $240 = (_i64Add(($238|0),($239|0),($228|0),($229|0))|0); + $241 = tempRet0; + $242 = (_i64Add(($240|0),($241|0),($226|0),($227|0))|0); + $243 = tempRet0; + $244 = (_i64Add(($242|0),($243|0),($158|0),0)|0); + $245 = tempRet0; + $246 = (___muldi3(($98|0),0,($2|0),0)|0); + $247 = tempRet0; + $248 = (___muldi3(($92|0),0,($8|0),0)|0); + $249 = tempRet0; + $250 = (___muldi3(($86|0),0,($14|0),0)|0); + $251 = tempRet0; + $252 = (___muldi3(($80|0),0,($20|0),0)|0); + $253 = tempRet0; + $254 = (___muldi3(($74|0),0,($26|0),0)|0); + $255 = tempRet0; + $256 = (___muldi3(($68|0),0,($32|0),0)|0); + $257 = tempRet0; + $258 = (___muldi3(($104|0),0,($2|0),0)|0); + $259 = tempRet0; + $260 = (___muldi3(($98|0),0,($8|0),0)|0); + $261 = tempRet0; + $262 = (___muldi3(($92|0),0,($14|0),0)|0); + $263 = tempRet0; + $264 = (___muldi3(($86|0),0,($20|0),0)|0); + $265 = tempRet0; + $266 = (___muldi3(($80|0),0,($26|0),0)|0); + $267 = tempRet0; + $268 = (___muldi3(($74|0),0,($32|0),0)|0); + $269 = tempRet0; + $270 = (___muldi3(($68|0),0,($38|0),0)|0); + $271 = tempRet0; + $272 = (_i64Add(($268|0),($269|0),($270|0),($271|0))|0); + $273 = tempRet0; + $274 = (_i64Add(($272|0),($273|0),($266|0),($267|0))|0); + $275 = tempRet0; + $276 = (_i64Add(($274|0),($275|0),($264|0),($265|0))|0); + $277 = tempRet0; + $278 = (_i64Add(($276|0),($277|0),($262|0),($263|0))|0); + $279 = tempRet0; + $280 = (_i64Add(($278|0),($279|0),($260|0),($261|0))|0); + $281 = tempRet0; + $282 = (_i64Add(($280|0),($281|0),($258|0),($259|0))|0); + $283 = tempRet0; + $284 = (_i64Add(($282|0),($283|0),($170|0),0)|0); + $285 = tempRet0; + $286 = (___muldi3(($110|0),0,($2|0),0)|0); + $287 = tempRet0; + $288 = (___muldi3(($104|0),0,($8|0),0)|0); + $289 = tempRet0; + $290 = (___muldi3(($98|0),0,($14|0),0)|0); + $291 = tempRet0; + $292 = (___muldi3(($92|0),0,($20|0),0)|0); + $293 = tempRet0; + $294 = (___muldi3(($86|0),0,($26|0),0)|0); + $295 = tempRet0; + $296 = (___muldi3(($80|0),0,($32|0),0)|0); + $297 = tempRet0; + $298 = (___muldi3(($74|0),0,($38|0),0)|0); + $299 = tempRet0; + $300 = (___muldi3(($68|0),0,($44|0),0)|0); + $301 = tempRet0; + $302 = (___muldi3(($114|0),0,($2|0),0)|0); + $303 = tempRet0; + $304 = (___muldi3(($110|0),0,($8|0),0)|0); + $305 = tempRet0; + $306 = (___muldi3(($104|0),0,($14|0),0)|0); + $307 = tempRet0; + $308 = (___muldi3(($98|0),0,($20|0),0)|0); + $309 = tempRet0; + $310 = (___muldi3(($92|0),0,($26|0),0)|0); + $311 = tempRet0; + $312 = (___muldi3(($86|0),0,($32|0),0)|0); + $313 = tempRet0; + $314 = (___muldi3(($80|0),0,($38|0),0)|0); + $315 = tempRet0; + $316 = (___muldi3(($74|0),0,($44|0),0)|0); + $317 = tempRet0; + $318 = (___muldi3(($68|0),0,($48|0),0)|0); + $319 = tempRet0; + $320 = (_i64Add(($316|0),($317|0),($318|0),($319|0))|0); + $321 = tempRet0; + $322 = (_i64Add(($320|0),($321|0),($314|0),($315|0))|0); + $323 = tempRet0; + $324 = (_i64Add(($322|0),($323|0),($312|0),($313|0))|0); + $325 = tempRet0; + $326 = (_i64Add(($324|0),($325|0),($310|0),($311|0))|0); + $327 = tempRet0; + $328 = (_i64Add(($326|0),($327|0),($308|0),($309|0))|0); + $329 = tempRet0; + $330 = (_i64Add(($328|0),($329|0),($306|0),($307|0))|0); + $331 = tempRet0; + $332 = (_i64Add(($330|0),($331|0),($302|0),($303|0))|0); + $333 = tempRet0; + $334 = (_i64Add(($332|0),($333|0),($304|0),($305|0))|0); + $335 = tempRet0; + $336 = (_i64Add(($334|0),($335|0),($180|0),0)|0); + $337 = tempRet0; + $338 = (___muldi3(($120|0),0,($2|0),0)|0); + $339 = tempRet0; + $340 = (___muldi3(($114|0),0,($8|0),0)|0); + $341 = tempRet0; + $342 = (___muldi3(($110|0),0,($14|0),0)|0); + $343 = tempRet0; + $344 = (___muldi3(($104|0),0,($20|0),0)|0); + $345 = tempRet0; + $346 = (___muldi3(($98|0),0,($26|0),0)|0); + $347 = tempRet0; + $348 = (___muldi3(($92|0),0,($32|0),0)|0); + $349 = tempRet0; + $350 = (___muldi3(($86|0),0,($38|0),0)|0); + $351 = tempRet0; + $352 = (___muldi3(($80|0),0,($44|0),0)|0); + $353 = tempRet0; + $354 = (___muldi3(($74|0),0,($48|0),0)|0); + $355 = tempRet0; + $356 = (___muldi3(($68|0),0,($54|0),0)|0); + $357 = tempRet0; + $358 = (___muldi3(($126|0),0,($2|0),0)|0); + $359 = tempRet0; + $360 = (___muldi3(($120|0),0,($8|0),0)|0); + $361 = tempRet0; + $362 = (___muldi3(($114|0),0,($14|0),0)|0); + $363 = tempRet0; + $364 = (___muldi3(($110|0),0,($20|0),0)|0); + $365 = tempRet0; + $366 = (___muldi3(($104|0),0,($26|0),0)|0); + $367 = tempRet0; + $368 = (___muldi3(($98|0),0,($32|0),0)|0); + $369 = tempRet0; + $370 = (___muldi3(($92|0),0,($38|0),0)|0); + $371 = tempRet0; + $372 = (___muldi3(($86|0),0,($44|0),0)|0); + $373 = tempRet0; + $374 = (___muldi3(($80|0),0,($48|0),0)|0); + $375 = tempRet0; + $376 = (___muldi3(($74|0),0,($54|0),0)|0); + $377 = tempRet0; + $378 = (___muldi3(($68|0),0,($60|0),0)|0); + $379 = tempRet0; + $380 = (_i64Add(($376|0),($377|0),($378|0),($379|0))|0); + $381 = tempRet0; + $382 = (_i64Add(($380|0),($381|0),($374|0),($375|0))|0); + $383 = tempRet0; + $384 = (_i64Add(($382|0),($383|0),($372|0),($373|0))|0); + $385 = tempRet0; + $386 = (_i64Add(($384|0),($385|0),($370|0),($371|0))|0); + $387 = tempRet0; + $388 = (_i64Add(($386|0),($387|0),($368|0),($369|0))|0); + $389 = tempRet0; + $390 = (_i64Add(($388|0),($389|0),($366|0),($367|0))|0); + $391 = tempRet0; + $392 = (_i64Add(($390|0),($391|0),($362|0),($363|0))|0); + $393 = tempRet0; + $394 = (_i64Add(($392|0),($393|0),($364|0),($365|0))|0); + $395 = tempRet0; + $396 = (_i64Add(($394|0),($395|0),($360|0),($361|0))|0); + $397 = tempRet0; + $398 = (_i64Add(($396|0),($397|0),($358|0),($359|0))|0); + $399 = tempRet0; + $400 = (_i64Add(($398|0),($399|0),($192|0),0)|0); + $401 = tempRet0; + $402 = (___muldi3(($130|0),($131|0),($2|0),0)|0); + $403 = tempRet0; + $404 = (___muldi3(($126|0),0,($8|0),0)|0); + $405 = tempRet0; + $406 = (___muldi3(($120|0),0,($14|0),0)|0); + $407 = tempRet0; + $408 = (___muldi3(($114|0),0,($20|0),0)|0); + $409 = tempRet0; + $410 = (___muldi3(($110|0),0,($26|0),0)|0); + $411 = tempRet0; + $412 = (___muldi3(($104|0),0,($32|0),0)|0); + $413 = tempRet0; + $414 = (___muldi3(($98|0),0,($38|0),0)|0); + $415 = tempRet0; + $416 = (___muldi3(($92|0),0,($44|0),0)|0); + $417 = tempRet0; + $418 = (___muldi3(($86|0),0,($48|0),0)|0); + $419 = tempRet0; + $420 = (___muldi3(($80|0),0,($54|0),0)|0); + $421 = tempRet0; + $422 = (___muldi3(($74|0),0,($60|0),0)|0); + $423 = tempRet0; + $424 = (___muldi3(($68|0),0,($64|0),($65|0))|0); + $425 = tempRet0; + $426 = (___muldi3(($130|0),($131|0),($8|0),0)|0); + $427 = tempRet0; + $428 = (___muldi3(($126|0),0,($14|0),0)|0); + $429 = tempRet0; + $430 = (___muldi3(($120|0),0,($20|0),0)|0); + $431 = tempRet0; + $432 = (___muldi3(($114|0),0,($26|0),0)|0); + $433 = tempRet0; + $434 = (___muldi3(($110|0),0,($32|0),0)|0); + $435 = tempRet0; + $436 = (___muldi3(($104|0),0,($38|0),0)|0); + $437 = tempRet0; + $438 = (___muldi3(($98|0),0,($44|0),0)|0); + $439 = tempRet0; + $440 = (___muldi3(($92|0),0,($48|0),0)|0); + $441 = tempRet0; + $442 = (___muldi3(($86|0),0,($54|0),0)|0); + $443 = tempRet0; + $444 = (___muldi3(($80|0),0,($60|0),0)|0); + $445 = tempRet0; + $446 = (___muldi3(($74|0),0,($64|0),($65|0))|0); + $447 = tempRet0; + $448 = (_i64Add(($444|0),($445|0),($446|0),($447|0))|0); + $449 = tempRet0; + $450 = (_i64Add(($448|0),($449|0),($442|0),($443|0))|0); + $451 = tempRet0; + $452 = (_i64Add(($450|0),($451|0),($440|0),($441|0))|0); + $453 = tempRet0; + $454 = (_i64Add(($452|0),($453|0),($438|0),($439|0))|0); + $455 = tempRet0; + $456 = (_i64Add(($454|0),($455|0),($436|0),($437|0))|0); + $457 = tempRet0; + $458 = (_i64Add(($456|0),($457|0),($432|0),($433|0))|0); + $459 = tempRet0; + $460 = (_i64Add(($458|0),($459|0),($434|0),($435|0))|0); + $461 = tempRet0; + $462 = (_i64Add(($460|0),($461|0),($430|0),($431|0))|0); + $463 = tempRet0; + $464 = (_i64Add(($462|0),($463|0),($428|0),($429|0))|0); + $465 = tempRet0; + $466 = (_i64Add(($464|0),($465|0),($426|0),($427|0))|0); + $467 = tempRet0; + $468 = (___muldi3(($130|0),($131|0),($14|0),0)|0); + $469 = tempRet0; + $470 = (___muldi3(($126|0),0,($20|0),0)|0); + $471 = tempRet0; + $472 = (___muldi3(($120|0),0,($26|0),0)|0); + $473 = tempRet0; + $474 = (___muldi3(($114|0),0,($32|0),0)|0); + $475 = tempRet0; + $476 = (___muldi3(($110|0),0,($38|0),0)|0); + $477 = tempRet0; + $478 = (___muldi3(($104|0),0,($44|0),0)|0); + $479 = tempRet0; + $480 = (___muldi3(($98|0),0,($48|0),0)|0); + $481 = tempRet0; + $482 = (___muldi3(($92|0),0,($54|0),0)|0); + $483 = tempRet0; + $484 = (___muldi3(($86|0),0,($60|0),0)|0); + $485 = tempRet0; + $486 = (___muldi3(($80|0),0,($64|0),($65|0))|0); + $487 = tempRet0; + $488 = (___muldi3(($130|0),($131|0),($20|0),0)|0); + $489 = tempRet0; + $490 = (___muldi3(($126|0),0,($26|0),0)|0); + $491 = tempRet0; + $492 = (___muldi3(($120|0),0,($32|0),0)|0); + $493 = tempRet0; + $494 = (___muldi3(($114|0),0,($38|0),0)|0); + $495 = tempRet0; + $496 = (___muldi3(($110|0),0,($44|0),0)|0); + $497 = tempRet0; + $498 = (___muldi3(($104|0),0,($48|0),0)|0); + $499 = tempRet0; + $500 = (___muldi3(($98|0),0,($54|0),0)|0); + $501 = tempRet0; + $502 = (___muldi3(($92|0),0,($60|0),0)|0); + $503 = tempRet0; + $504 = (___muldi3(($86|0),0,($64|0),($65|0))|0); + $505 = tempRet0; + $506 = (_i64Add(($502|0),($503|0),($504|0),($505|0))|0); + $507 = tempRet0; + $508 = (_i64Add(($506|0),($507|0),($500|0),($501|0))|0); + $509 = tempRet0; + $510 = (_i64Add(($508|0),($509|0),($498|0),($499|0))|0); + $511 = tempRet0; + $512 = (_i64Add(($510|0),($511|0),($494|0),($495|0))|0); + $513 = tempRet0; + $514 = (_i64Add(($512|0),($513|0),($496|0),($497|0))|0); + $515 = tempRet0; + $516 = (_i64Add(($514|0),($515|0),($492|0),($493|0))|0); + $517 = tempRet0; + $518 = (_i64Add(($516|0),($517|0),($490|0),($491|0))|0); + $519 = tempRet0; + $520 = (_i64Add(($518|0),($519|0),($488|0),($489|0))|0); + $521 = tempRet0; + $522 = (___muldi3(($130|0),($131|0),($26|0),0)|0); + $523 = tempRet0; + $524 = (___muldi3(($126|0),0,($32|0),0)|0); + $525 = tempRet0; + $526 = (___muldi3(($120|0),0,($38|0),0)|0); + $527 = tempRet0; + $528 = (___muldi3(($114|0),0,($44|0),0)|0); + $529 = tempRet0; + $530 = (___muldi3(($110|0),0,($48|0),0)|0); + $531 = tempRet0; + $532 = (___muldi3(($104|0),0,($54|0),0)|0); + $533 = tempRet0; + $534 = (___muldi3(($98|0),0,($60|0),0)|0); + $535 = tempRet0; + $536 = (___muldi3(($92|0),0,($64|0),($65|0))|0); + $537 = tempRet0; + $538 = (___muldi3(($130|0),($131|0),($32|0),0)|0); + $539 = tempRet0; + $540 = (___muldi3(($126|0),0,($38|0),0)|0); + $541 = tempRet0; + $542 = (___muldi3(($120|0),0,($44|0),0)|0); + $543 = tempRet0; + $544 = (___muldi3(($114|0),0,($48|0),0)|0); + $545 = tempRet0; + $546 = (___muldi3(($110|0),0,($54|0),0)|0); + $547 = tempRet0; + $548 = (___muldi3(($104|0),0,($60|0),0)|0); + $549 = tempRet0; + $550 = (___muldi3(($98|0),0,($64|0),($65|0))|0); + $551 = tempRet0; + $552 = (_i64Add(($548|0),($549|0),($550|0),($551|0))|0); + $553 = tempRet0; + $554 = (_i64Add(($552|0),($553|0),($544|0),($545|0))|0); + $555 = tempRet0; + $556 = (_i64Add(($554|0),($555|0),($546|0),($547|0))|0); + $557 = tempRet0; + $558 = (_i64Add(($556|0),($557|0),($542|0),($543|0))|0); + $559 = tempRet0; + $560 = (_i64Add(($558|0),($559|0),($540|0),($541|0))|0); + $561 = tempRet0; + $562 = (_i64Add(($560|0),($561|0),($538|0),($539|0))|0); + $563 = tempRet0; + $564 = (___muldi3(($130|0),($131|0),($38|0),0)|0); + $565 = tempRet0; + $566 = (___muldi3(($126|0),0,($44|0),0)|0); + $567 = tempRet0; + $568 = (___muldi3(($120|0),0,($48|0),0)|0); + $569 = tempRet0; + $570 = (___muldi3(($114|0),0,($54|0),0)|0); + $571 = tempRet0; + $572 = (___muldi3(($110|0),0,($60|0),0)|0); + $573 = tempRet0; + $574 = (___muldi3(($104|0),0,($64|0),($65|0))|0); + $575 = tempRet0; + $576 = (___muldi3(($130|0),($131|0),($44|0),0)|0); + $577 = tempRet0; + $578 = (___muldi3(($126|0),0,($48|0),0)|0); + $579 = tempRet0; + $580 = (___muldi3(($120|0),0,($54|0),0)|0); + $581 = tempRet0; + $582 = (___muldi3(($114|0),0,($60|0),0)|0); + $583 = tempRet0; + $584 = (___muldi3(($110|0),0,($64|0),($65|0))|0); + $585 = tempRet0; + $586 = (_i64Add(($584|0),($585|0),($582|0),($583|0))|0); + $587 = tempRet0; + $588 = (_i64Add(($586|0),($587|0),($580|0),($581|0))|0); + $589 = tempRet0; + $590 = (_i64Add(($588|0),($589|0),($578|0),($579|0))|0); + $591 = tempRet0; + $592 = (_i64Add(($590|0),($591|0),($576|0),($577|0))|0); + $593 = tempRet0; + $594 = (___muldi3(($130|0),($131|0),($48|0),0)|0); + $595 = tempRet0; + $596 = (___muldi3(($126|0),0,($54|0),0)|0); + $597 = tempRet0; + $598 = (___muldi3(($120|0),0,($60|0),0)|0); + $599 = tempRet0; + $600 = (___muldi3(($114|0),0,($64|0),($65|0))|0); + $601 = tempRet0; + $602 = (___muldi3(($130|0),($131|0),($54|0),0)|0); + $603 = tempRet0; + $604 = (___muldi3(($126|0),0,($60|0),0)|0); + $605 = tempRet0; + $606 = (___muldi3(($120|0),0,($64|0),($65|0))|0); + $607 = tempRet0; + $608 = (_i64Add(($604|0),($605|0),($606|0),($607|0))|0); + $609 = tempRet0; + $610 = (_i64Add(($608|0),($609|0),($602|0),($603|0))|0); + $611 = tempRet0; + $612 = (___muldi3(($130|0),($131|0),($60|0),0)|0); + $613 = tempRet0; + $614 = (___muldi3(($126|0),0,($64|0),($65|0))|0); + $615 = tempRet0; + $616 = (_i64Add(($612|0),($613|0),($614|0),($615|0))|0); + $617 = tempRet0; + $618 = (___muldi3(($130|0),($131|0),($64|0),($65|0))|0); + $619 = tempRet0; + $620 = (_i64Add(($200|0),($201|0),1048576,0)|0); + $621 = tempRet0; + $622 = (_bitshift64Lshr(($620|0),($621|0),21)|0); + $623 = tempRet0; + $624 = (_i64Add(($202|0),($203|0),($204|0),($205|0))|0); + $625 = tempRet0; + $626 = (_i64Add(($624|0),($625|0),($140|0),0)|0); + $627 = tempRet0; + $628 = (_i64Add(($626|0),($627|0),($622|0),($623|0))|0); + $629 = tempRet0; + $630 = (_bitshift64Shl(($622|0),($623|0),21)|0); + $631 = tempRet0; + $632 = (_i64Subtract(($200|0),($201|0),($630|0),($631|0))|0); + $633 = tempRet0; + $634 = (_i64Add(($216|0),($217|0),1048576,0)|0); + $635 = tempRet0; + $636 = (_bitshift64Lshr(($634|0),($635|0),21)|0); + $637 = tempRet0; + $638 = (_i64Add(($222|0),($223|0),($224|0),($225|0))|0); + $639 = tempRet0; + $640 = (_i64Add(($638|0),($639|0),($220|0),($221|0))|0); + $641 = tempRet0; + $642 = (_i64Add(($640|0),($641|0),($218|0),($219|0))|0); + $643 = tempRet0; + $644 = (_i64Add(($642|0),($643|0),($152|0),0)|0); + $645 = tempRet0; + $646 = (_i64Add(($644|0),($645|0),($636|0),($637|0))|0); + $647 = tempRet0; + $648 = (_bitshift64Shl(($636|0),($637|0),21)|0); + $649 = tempRet0; + $650 = (_i64Add(($244|0),($245|0),1048576,0)|0); + $651 = tempRet0; + $652 = (_bitshift64Ashr(($650|0),($651|0),21)|0); + $653 = tempRet0; + $654 = (_i64Add(($254|0),($255|0),($256|0),($257|0))|0); + $655 = tempRet0; + $656 = (_i64Add(($654|0),($655|0),($252|0),($253|0))|0); + $657 = tempRet0; + $658 = (_i64Add(($656|0),($657|0),($250|0),($251|0))|0); + $659 = tempRet0; + $660 = (_i64Add(($658|0),($659|0),($248|0),($249|0))|0); + $661 = tempRet0; + $662 = (_i64Add(($660|0),($661|0),($246|0),($247|0))|0); + $663 = tempRet0; + $664 = (_i64Add(($662|0),($663|0),($164|0),0)|0); + $665 = tempRet0; + $666 = (_i64Add(($664|0),($665|0),($652|0),($653|0))|0); + $667 = tempRet0; + $668 = (_bitshift64Shl(($652|0),($653|0),21)|0); + $669 = tempRet0; + $670 = (_i64Subtract(($244|0),($245|0),($668|0),($669|0))|0); + $671 = tempRet0; + $672 = (_i64Add(($284|0),($285|0),1048576,0)|0); + $673 = tempRet0; + $674 = (_bitshift64Ashr(($672|0),($673|0),21)|0); + $675 = tempRet0; + $676 = (_i64Add(($298|0),($299|0),($300|0),($301|0))|0); + $677 = tempRet0; + $678 = (_i64Add(($676|0),($677|0),($296|0),($297|0))|0); + $679 = tempRet0; + $680 = (_i64Add(($678|0),($679|0),($294|0),($295|0))|0); + $681 = tempRet0; + $682 = (_i64Add(($680|0),($681|0),($292|0),($293|0))|0); + $683 = tempRet0; + $684 = (_i64Add(($682|0),($683|0),($290|0),($291|0))|0); + $685 = tempRet0; + $686 = (_i64Add(($684|0),($685|0),($288|0),($289|0))|0); + $687 = tempRet0; + $688 = (_i64Add(($686|0),($687|0),($286|0),($287|0))|0); + $689 = tempRet0; + $690 = (_i64Add(($688|0),($689|0),($176|0),0)|0); + $691 = tempRet0; + $692 = (_i64Add(($690|0),($691|0),($674|0),($675|0))|0); + $693 = tempRet0; + $694 = (_bitshift64Shl(($674|0),($675|0),21)|0); + $695 = tempRet0; + $696 = (_i64Add(($336|0),($337|0),1048576,0)|0); + $697 = tempRet0; + $698 = (_bitshift64Ashr(($696|0),($697|0),21)|0); + $699 = tempRet0; + $700 = (_i64Add(($354|0),($355|0),($356|0),($357|0))|0); + $701 = tempRet0; + $702 = (_i64Add(($700|0),($701|0),($352|0),($353|0))|0); + $703 = tempRet0; + $704 = (_i64Add(($702|0),($703|0),($350|0),($351|0))|0); + $705 = tempRet0; + $706 = (_i64Add(($704|0),($705|0),($348|0),($349|0))|0); + $707 = tempRet0; + $708 = (_i64Add(($706|0),($707|0),($346|0),($347|0))|0); + $709 = tempRet0; + $710 = (_i64Add(($708|0),($709|0),($344|0),($345|0))|0); + $711 = tempRet0; + $712 = (_i64Add(($710|0),($711|0),($340|0),($341|0))|0); + $713 = tempRet0; + $714 = (_i64Add(($712|0),($713|0),($342|0),($343|0))|0); + $715 = tempRet0; + $716 = (_i64Add(($714|0),($715|0),($338|0),($339|0))|0); + $717 = tempRet0; + $718 = (_i64Add(($716|0),($717|0),($186|0),0)|0); + $719 = tempRet0; + $720 = (_i64Add(($718|0),($719|0),($698|0),($699|0))|0); + $721 = tempRet0; + $722 = (_bitshift64Shl(($698|0),($699|0),21)|0); + $723 = tempRet0; + $724 = (_i64Add(($400|0),($401|0),1048576,0)|0); + $725 = tempRet0; + $726 = (_bitshift64Ashr(($724|0),($725|0),21)|0); + $727 = tempRet0; + $728 = (_i64Add(($422|0),($423|0),($424|0),($425|0))|0); + $729 = tempRet0; + $730 = (_i64Add(($728|0),($729|0),($420|0),($421|0))|0); + $731 = tempRet0; + $732 = (_i64Add(($730|0),($731|0),($418|0),($419|0))|0); + $733 = tempRet0; + $734 = (_i64Add(($732|0),($733|0),($416|0),($417|0))|0); + $735 = tempRet0; + $736 = (_i64Add(($734|0),($735|0),($414|0),($415|0))|0); + $737 = tempRet0; + $738 = (_i64Add(($736|0),($737|0),($412|0),($413|0))|0); + $739 = tempRet0; + $740 = (_i64Add(($738|0),($739|0),($408|0),($409|0))|0); + $741 = tempRet0; + $742 = (_i64Add(($740|0),($741|0),($410|0),($411|0))|0); + $743 = tempRet0; + $744 = (_i64Add(($742|0),($743|0),($406|0),($407|0))|0); + $745 = tempRet0; + $746 = (_i64Add(($744|0),($745|0),($402|0),($403|0))|0); + $747 = tempRet0; + $748 = (_i64Add(($746|0),($747|0),($404|0),($405|0))|0); + $749 = tempRet0; + $750 = (_i64Add(($748|0),($749|0),($196|0),($197|0))|0); + $751 = tempRet0; + $752 = (_i64Add(($750|0),($751|0),($726|0),($727|0))|0); + $753 = tempRet0; + $754 = (_bitshift64Shl(($726|0),($727|0),21)|0); + $755 = tempRet0; + $756 = (_i64Subtract(($400|0),($401|0),($754|0),($755|0))|0); + $757 = tempRet0; + $758 = (_i64Add(($466|0),($467|0),1048576,0)|0); + $759 = tempRet0; + $760 = (_bitshift64Ashr(($758|0),($759|0),21)|0); + $761 = tempRet0; + $762 = (_i64Add(($484|0),($485|0),($486|0),($487|0))|0); + $763 = tempRet0; + $764 = (_i64Add(($762|0),($763|0),($482|0),($483|0))|0); + $765 = tempRet0; + $766 = (_i64Add(($764|0),($765|0),($480|0),($481|0))|0); + $767 = tempRet0; + $768 = (_i64Add(($766|0),($767|0),($478|0),($479|0))|0); + $769 = tempRet0; + $770 = (_i64Add(($768|0),($769|0),($474|0),($475|0))|0); + $771 = tempRet0; + $772 = (_i64Add(($770|0),($771|0),($476|0),($477|0))|0); + $773 = tempRet0; + $774 = (_i64Add(($772|0),($773|0),($472|0),($473|0))|0); + $775 = tempRet0; + $776 = (_i64Add(($774|0),($775|0),($470|0),($471|0))|0); + $777 = tempRet0; + $778 = (_i64Add(($776|0),($777|0),($468|0),($469|0))|0); + $779 = tempRet0; + $780 = (_i64Add(($778|0),($779|0),($760|0),($761|0))|0); + $781 = tempRet0; + $782 = (_bitshift64Shl(($760|0),($761|0),21)|0); + $783 = tempRet0; + $784 = (_i64Subtract(($466|0),($467|0),($782|0),($783|0))|0); + $785 = tempRet0; + $786 = (_i64Add(($520|0),($521|0),1048576,0)|0); + $787 = tempRet0; + $788 = (_bitshift64Ashr(($786|0),($787|0),21)|0); + $789 = tempRet0; + $790 = (_i64Add(($534|0),($535|0),($536|0),($537|0))|0); + $791 = tempRet0; + $792 = (_i64Add(($790|0),($791|0),($532|0),($533|0))|0); + $793 = tempRet0; + $794 = (_i64Add(($792|0),($793|0),($528|0),($529|0))|0); + $795 = tempRet0; + $796 = (_i64Add(($794|0),($795|0),($530|0),($531|0))|0); + $797 = tempRet0; + $798 = (_i64Add(($796|0),($797|0),($526|0),($527|0))|0); + $799 = tempRet0; + $800 = (_i64Add(($798|0),($799|0),($524|0),($525|0))|0); + $801 = tempRet0; + $802 = (_i64Add(($800|0),($801|0),($522|0),($523|0))|0); + $803 = tempRet0; + $804 = (_i64Add(($802|0),($803|0),($788|0),($789|0))|0); + $805 = tempRet0; + $806 = (_bitshift64Shl(($788|0),($789|0),21)|0); + $807 = tempRet0; + $808 = (_i64Subtract(($520|0),($521|0),($806|0),($807|0))|0); + $809 = tempRet0; + $810 = (_i64Add(($562|0),($563|0),1048576,0)|0); + $811 = tempRet0; + $812 = (_bitshift64Ashr(($810|0),($811|0),21)|0); + $813 = tempRet0; + $814 = (_i64Add(($570|0),($571|0),($574|0),($575|0))|0); + $815 = tempRet0; + $816 = (_i64Add(($814|0),($815|0),($572|0),($573|0))|0); + $817 = tempRet0; + $818 = (_i64Add(($816|0),($817|0),($568|0),($569|0))|0); + $819 = tempRet0; + $820 = (_i64Add(($818|0),($819|0),($566|0),($567|0))|0); + $821 = tempRet0; + $822 = (_i64Add(($820|0),($821|0),($564|0),($565|0))|0); + $823 = tempRet0; + $824 = (_i64Add(($822|0),($823|0),($812|0),($813|0))|0); + $825 = tempRet0; + $826 = (_bitshift64Shl(($812|0),($813|0),21)|0); + $827 = tempRet0; + $828 = (_i64Subtract(($562|0),($563|0),($826|0),($827|0))|0); + $829 = tempRet0; + $830 = (_i64Add(($592|0),($593|0),1048576,0)|0); + $831 = tempRet0; + $832 = (_bitshift64Ashr(($830|0),($831|0),21)|0); + $833 = tempRet0; + $834 = (_i64Add(($598|0),($599|0),($600|0),($601|0))|0); + $835 = tempRet0; + $836 = (_i64Add(($834|0),($835|0),($596|0),($597|0))|0); + $837 = tempRet0; + $838 = (_i64Add(($836|0),($837|0),($594|0),($595|0))|0); + $839 = tempRet0; + $840 = (_i64Add(($838|0),($839|0),($832|0),($833|0))|0); + $841 = tempRet0; + $842 = (_bitshift64Shl(($832|0),($833|0),21)|0); + $843 = tempRet0; + $844 = (_i64Subtract(($592|0),($593|0),($842|0),($843|0))|0); + $845 = tempRet0; + $846 = (_i64Add(($610|0),($611|0),1048576,0)|0); + $847 = tempRet0; + $848 = (_bitshift64Lshr(($846|0),($847|0),21)|0); + $849 = tempRet0; + $850 = (_i64Add(($616|0),($617|0),($848|0),($849|0))|0); + $851 = tempRet0; + $852 = (_bitshift64Shl(($848|0),($849|0),21)|0); + $853 = tempRet0; + $854 = (_i64Subtract(($610|0),($611|0),($852|0),($853|0))|0); + $855 = tempRet0; + $856 = (_i64Add(($618|0),($619|0),1048576,0)|0); + $857 = tempRet0; + $858 = (_bitshift64Lshr(($856|0),($857|0),21)|0); + $859 = tempRet0; + $860 = (_bitshift64Shl(($858|0),($859|0),21)|0); + $861 = tempRet0; + $862 = (_i64Subtract(($618|0),($619|0),($860|0),($861|0))|0); + $863 = tempRet0; + $864 = (_i64Add(($628|0),($629|0),1048576,0)|0); + $865 = tempRet0; + $866 = (_bitshift64Lshr(($864|0),($865|0),21)|0); + $867 = tempRet0; + $868 = (_bitshift64Shl(($866|0),($867|0),21)|0); + $869 = tempRet0; + $870 = (_i64Subtract(($628|0),($629|0),($868|0),($869|0))|0); + $871 = tempRet0; + $872 = (_i64Add(($646|0),($647|0),1048576,0)|0); + $873 = tempRet0; + $874 = (_bitshift64Ashr(($872|0),($873|0),21)|0); + $875 = tempRet0; + $876 = (_i64Add(($874|0),($875|0),($670|0),($671|0))|0); + $877 = tempRet0; + $878 = (_bitshift64Shl(($874|0),($875|0),21)|0); + $879 = tempRet0; + $880 = (_i64Subtract(($646|0),($647|0),($878|0),($879|0))|0); + $881 = tempRet0; + $882 = (_i64Add(($666|0),($667|0),1048576,0)|0); + $883 = tempRet0; + $884 = (_bitshift64Ashr(($882|0),($883|0),21)|0); + $885 = tempRet0; + $886 = (_bitshift64Shl(($884|0),($885|0),21)|0); + $887 = tempRet0; + $888 = (_i64Subtract(($666|0),($667|0),($886|0),($887|0))|0); + $889 = tempRet0; + $890 = (_i64Add(($692|0),($693|0),1048576,0)|0); + $891 = tempRet0; + $892 = (_bitshift64Ashr(($890|0),($891|0),21)|0); + $893 = tempRet0; + $894 = (_bitshift64Shl(($892|0),($893|0),21)|0); + $895 = tempRet0; + $896 = (_i64Add(($720|0),($721|0),1048576,0)|0); + $897 = tempRet0; + $898 = (_bitshift64Ashr(($896|0),($897|0),21)|0); + $899 = tempRet0; + $900 = (_i64Add(($898|0),($899|0),($756|0),($757|0))|0); + $901 = tempRet0; + $902 = (_bitshift64Shl(($898|0),($899|0),21)|0); + $903 = tempRet0; + $904 = (_i64Subtract(($720|0),($721|0),($902|0),($903|0))|0); + $905 = tempRet0; + $906 = (_i64Add(($752|0),($753|0),1048576,0)|0); + $907 = tempRet0; + $908 = (_bitshift64Ashr(($906|0),($907|0),21)|0); + $909 = tempRet0; + $910 = (_i64Add(($784|0),($785|0),($908|0),($909|0))|0); + $911 = tempRet0; + $912 = (_bitshift64Shl(($908|0),($909|0),21)|0); + $913 = tempRet0; + $914 = (_i64Subtract(($752|0),($753|0),($912|0),($913|0))|0); + $915 = tempRet0; + $916 = (_i64Add(($780|0),($781|0),1048576,0)|0); + $917 = tempRet0; + $918 = (_bitshift64Ashr(($916|0),($917|0),21)|0); + $919 = tempRet0; + $920 = (_i64Add(($808|0),($809|0),($918|0),($919|0))|0); + $921 = tempRet0; + $922 = (_bitshift64Shl(($918|0),($919|0),21)|0); + $923 = tempRet0; + $924 = (_i64Subtract(($780|0),($781|0),($922|0),($923|0))|0); + $925 = tempRet0; + $926 = (_i64Add(($804|0),($805|0),1048576,0)|0); + $927 = tempRet0; + $928 = (_bitshift64Ashr(($926|0),($927|0),21)|0); + $929 = tempRet0; + $930 = (_i64Add(($828|0),($829|0),($928|0),($929|0))|0); + $931 = tempRet0; + $932 = (_bitshift64Shl(($928|0),($929|0),21)|0); + $933 = tempRet0; + $934 = (_i64Subtract(($804|0),($805|0),($932|0),($933|0))|0); + $935 = tempRet0; + $936 = (_i64Add(($824|0),($825|0),1048576,0)|0); + $937 = tempRet0; + $938 = (_bitshift64Ashr(($936|0),($937|0),21)|0); + $939 = tempRet0; + $940 = (_i64Add(($938|0),($939|0),($844|0),($845|0))|0); + $941 = tempRet0; + $942 = (_bitshift64Shl(($938|0),($939|0),21)|0); + $943 = tempRet0; + $944 = (_i64Subtract(($824|0),($825|0),($942|0),($943|0))|0); + $945 = tempRet0; + $946 = (_i64Add(($840|0),($841|0),1048576,0)|0); + $947 = tempRet0; + $948 = (_bitshift64Ashr(($946|0),($947|0),21)|0); + $949 = tempRet0; + $950 = (_i64Add(($948|0),($949|0),($854|0),($855|0))|0); + $951 = tempRet0; + $952 = (_bitshift64Shl(($948|0),($949|0),21)|0); + $953 = tempRet0; + $954 = (_i64Subtract(($840|0),($841|0),($952|0),($953|0))|0); + $955 = tempRet0; + $956 = (_i64Add(($850|0),($851|0),1048576,0)|0); + $957 = tempRet0; + $958 = (_bitshift64Lshr(($956|0),($957|0),21)|0); + $959 = tempRet0; + $960 = (_i64Add(($958|0),($959|0),($862|0),($863|0))|0); + $961 = tempRet0; + $962 = (_bitshift64Shl(($958|0),($959|0),21)|0); + $963 = tempRet0; + $964 = (_i64Subtract(($850|0),($851|0),($962|0),($963|0))|0); + $965 = tempRet0; + $966 = (___muldi3(($858|0),($859|0),666643,0)|0); + $967 = tempRet0; + $968 = (_i64Add(($966|0),($967|0),($914|0),($915|0))|0); + $969 = tempRet0; + $970 = (___muldi3(($858|0),($859|0),470296,0)|0); + $971 = tempRet0; + $972 = (_i64Add(($970|0),($971|0),($910|0),($911|0))|0); + $973 = tempRet0; + $974 = (___muldi3(($858|0),($859|0),654183,0)|0); + $975 = tempRet0; + $976 = (_i64Add(($974|0),($975|0),($924|0),($925|0))|0); + $977 = tempRet0; + $978 = (___muldi3(($858|0),($859|0),-997805,-1)|0); + $979 = tempRet0; + $980 = (_i64Add(($978|0),($979|0),($920|0),($921|0))|0); + $981 = tempRet0; + $982 = (___muldi3(($858|0),($859|0),136657,0)|0); + $983 = tempRet0; + $984 = (_i64Add(($982|0),($983|0),($934|0),($935|0))|0); + $985 = tempRet0; + $986 = (___muldi3(($858|0),($859|0),-683901,-1)|0); + $987 = tempRet0; + $988 = (_i64Add(($930|0),($931|0),($986|0),($987|0))|0); + $989 = tempRet0; + $990 = (___muldi3(($960|0),($961|0),666643,0)|0); + $991 = tempRet0; + $992 = (_i64Add(($990|0),($991|0),($900|0),($901|0))|0); + $993 = tempRet0; + $994 = (___muldi3(($960|0),($961|0),470296,0)|0); + $995 = tempRet0; + $996 = (_i64Add(($994|0),($995|0),($968|0),($969|0))|0); + $997 = tempRet0; + $998 = (___muldi3(($960|0),($961|0),654183,0)|0); + $999 = tempRet0; + $1000 = (_i64Add(($998|0),($999|0),($972|0),($973|0))|0); + $1001 = tempRet0; + $1002 = (___muldi3(($960|0),($961|0),-997805,-1)|0); + $1003 = tempRet0; + $1004 = (_i64Add(($1002|0),($1003|0),($976|0),($977|0))|0); + $1005 = tempRet0; + $1006 = (___muldi3(($960|0),($961|0),136657,0)|0); + $1007 = tempRet0; + $1008 = (_i64Add(($1006|0),($1007|0),($980|0),($981|0))|0); + $1009 = tempRet0; + $1010 = (___muldi3(($960|0),($961|0),-683901,-1)|0); + $1011 = tempRet0; + $1012 = (_i64Add(($984|0),($985|0),($1010|0),($1011|0))|0); + $1013 = tempRet0; + $1014 = (___muldi3(($964|0),($965|0),666643,0)|0); + $1015 = tempRet0; + $1016 = (_i64Add(($1014|0),($1015|0),($904|0),($905|0))|0); + $1017 = tempRet0; + $1018 = (___muldi3(($964|0),($965|0),470296,0)|0); + $1019 = tempRet0; + $1020 = (_i64Add(($1018|0),($1019|0),($992|0),($993|0))|0); + $1021 = tempRet0; + $1022 = (___muldi3(($964|0),($965|0),654183,0)|0); + $1023 = tempRet0; + $1024 = (_i64Add(($1022|0),($1023|0),($996|0),($997|0))|0); + $1025 = tempRet0; + $1026 = (___muldi3(($964|0),($965|0),-997805,-1)|0); + $1027 = tempRet0; + $1028 = (_i64Add(($1026|0),($1027|0),($1000|0),($1001|0))|0); + $1029 = tempRet0; + $1030 = (___muldi3(($964|0),($965|0),136657,0)|0); + $1031 = tempRet0; + $1032 = (_i64Add(($1030|0),($1031|0),($1004|0),($1005|0))|0); + $1033 = tempRet0; + $1034 = (___muldi3(($964|0),($965|0),-683901,-1)|0); + $1035 = tempRet0; + $1036 = (_i64Add(($1008|0),($1009|0),($1034|0),($1035|0))|0); + $1037 = tempRet0; + $1038 = (___muldi3(($950|0),($951|0),666643,0)|0); + $1039 = tempRet0; + $1040 = (___muldi3(($950|0),($951|0),470296,0)|0); + $1041 = tempRet0; + $1042 = (_i64Add(($1040|0),($1041|0),($1016|0),($1017|0))|0); + $1043 = tempRet0; + $1044 = (___muldi3(($950|0),($951|0),654183,0)|0); + $1045 = tempRet0; + $1046 = (_i64Add(($1044|0),($1045|0),($1020|0),($1021|0))|0); + $1047 = tempRet0; + $1048 = (___muldi3(($950|0),($951|0),-997805,-1)|0); + $1049 = tempRet0; + $1050 = (_i64Add(($1048|0),($1049|0),($1024|0),($1025|0))|0); + $1051 = tempRet0; + $1052 = (___muldi3(($950|0),($951|0),136657,0)|0); + $1053 = tempRet0; + $1054 = (_i64Add(($1052|0),($1053|0),($1028|0),($1029|0))|0); + $1055 = tempRet0; + $1056 = (___muldi3(($950|0),($951|0),-683901,-1)|0); + $1057 = tempRet0; + $1058 = (_i64Add(($1032|0),($1033|0),($1056|0),($1057|0))|0); + $1059 = tempRet0; + $1060 = (___muldi3(($954|0),($955|0),666643,0)|0); + $1061 = tempRet0; + $1062 = (___muldi3(($954|0),($955|0),470296,0)|0); + $1063 = tempRet0; + $1064 = (___muldi3(($954|0),($955|0),654183,0)|0); + $1065 = tempRet0; + $1066 = (_i64Add(($1064|0),($1065|0),($1042|0),($1043|0))|0); + $1067 = tempRet0; + $1068 = (___muldi3(($954|0),($955|0),-997805,-1)|0); + $1069 = tempRet0; + $1070 = (_i64Add(($1046|0),($1047|0),($1068|0),($1069|0))|0); + $1071 = tempRet0; + $1072 = (___muldi3(($954|0),($955|0),136657,0)|0); + $1073 = tempRet0; + $1074 = (_i64Add(($1072|0),($1073|0),($1050|0),($1051|0))|0); + $1075 = tempRet0; + $1076 = (___muldi3(($954|0),($955|0),-683901,-1)|0); + $1077 = tempRet0; + $1078 = (_i64Add(($1054|0),($1055|0),($1076|0),($1077|0))|0); + $1079 = tempRet0; + $1080 = (___muldi3(($940|0),($941|0),666643,0)|0); + $1081 = tempRet0; + $1082 = (_i64Add(($284|0),($285|0),($1080|0),($1081|0))|0); + $1083 = tempRet0; + $1084 = (_i64Add(($1082|0),($1083|0),($884|0),($885|0))|0); + $1085 = tempRet0; + $1086 = (_i64Subtract(($1084|0),($1085|0),($694|0),($695|0))|0); + $1087 = tempRet0; + $1088 = (___muldi3(($940|0),($941|0),470296,0)|0); + $1089 = tempRet0; + $1090 = (___muldi3(($940|0),($941|0),654183,0)|0); + $1091 = tempRet0; + $1092 = (_i64Add(($1062|0),($1063|0),($1038|0),($1039|0))|0); + $1093 = tempRet0; + $1094 = (_i64Add(($1092|0),($1093|0),($1090|0),($1091|0))|0); + $1095 = tempRet0; + $1096 = (_i64Add(($1094|0),($1095|0),($336|0),($337|0))|0); + $1097 = tempRet0; + $1098 = (_i64Add(($1096|0),($1097|0),($892|0),($893|0))|0); + $1099 = tempRet0; + $1100 = (_i64Subtract(($1098|0),($1099|0),($722|0),($723|0))|0); + $1101 = tempRet0; + $1102 = (___muldi3(($940|0),($941|0),-997805,-1)|0); + $1103 = tempRet0; + $1104 = (_i64Add(($1066|0),($1067|0),($1102|0),($1103|0))|0); + $1105 = tempRet0; + $1106 = (___muldi3(($940|0),($941|0),136657,0)|0); + $1107 = tempRet0; + $1108 = (_i64Add(($1070|0),($1071|0),($1106|0),($1107|0))|0); + $1109 = tempRet0; + $1110 = (___muldi3(($940|0),($941|0),-683901,-1)|0); + $1111 = tempRet0; + $1112 = (_i64Add(($1074|0),($1075|0),($1110|0),($1111|0))|0); + $1113 = tempRet0; + $1114 = (_i64Add(($1086|0),($1087|0),1048576,0)|0); + $1115 = tempRet0; + $1116 = (_bitshift64Ashr(($1114|0),($1115|0),21)|0); + $1117 = tempRet0; + $1118 = (_i64Add(($1088|0),($1089|0),($1060|0),($1061|0))|0); + $1119 = tempRet0; + $1120 = (_i64Add(($1118|0),($1119|0),($692|0),($693|0))|0); + $1121 = tempRet0; + $1122 = (_i64Subtract(($1120|0),($1121|0),($894|0),($895|0))|0); + $1123 = tempRet0; + $1124 = (_i64Add(($1122|0),($1123|0),($1116|0),($1117|0))|0); + $1125 = tempRet0; + $1126 = (_bitshift64Shl(($1116|0),($1117|0),21)|0); + $1127 = tempRet0; + $1128 = (_i64Subtract(($1086|0),($1087|0),($1126|0),($1127|0))|0); + $1129 = tempRet0; + $1130 = (_i64Add(($1100|0),($1101|0),1048576,0)|0); + $1131 = tempRet0; + $1132 = (_bitshift64Ashr(($1130|0),($1131|0),21)|0); + $1133 = tempRet0; + $1134 = (_i64Add(($1104|0),($1105|0),($1132|0),($1133|0))|0); + $1135 = tempRet0; + $1136 = (_bitshift64Shl(($1132|0),($1133|0),21)|0); + $1137 = tempRet0; + $1138 = (_i64Subtract(($1100|0),($1101|0),($1136|0),($1137|0))|0); + $1139 = tempRet0; + $1140 = (_i64Add(($1108|0),($1109|0),1048576,0)|0); + $1141 = tempRet0; + $1142 = (_bitshift64Ashr(($1140|0),($1141|0),21)|0); + $1143 = tempRet0; + $1144 = (_i64Add(($1112|0),($1113|0),($1142|0),($1143|0))|0); + $1145 = tempRet0; + $1146 = (_bitshift64Shl(($1142|0),($1143|0),21)|0); + $1147 = tempRet0; + $1148 = (_i64Subtract(($1108|0),($1109|0),($1146|0),($1147|0))|0); + $1149 = tempRet0; + $1150 = (_i64Add(($1078|0),($1079|0),1048576,0)|0); + $1151 = tempRet0; + $1152 = (_bitshift64Ashr(($1150|0),($1151|0),21)|0); + $1153 = tempRet0; + $1154 = (_i64Add(($1152|0),($1153|0),($1058|0),($1059|0))|0); + $1155 = tempRet0; + $1156 = (_bitshift64Shl(($1152|0),($1153|0),21)|0); + $1157 = tempRet0; + $1158 = (_i64Subtract(($1078|0),($1079|0),($1156|0),($1157|0))|0); + $1159 = tempRet0; + $1160 = (_i64Add(($1036|0),($1037|0),1048576,0)|0); + $1161 = tempRet0; + $1162 = (_bitshift64Ashr(($1160|0),($1161|0),21)|0); + $1163 = tempRet0; + $1164 = (_i64Add(($1162|0),($1163|0),($1012|0),($1013|0))|0); + $1165 = tempRet0; + $1166 = (_bitshift64Shl(($1162|0),($1163|0),21)|0); + $1167 = tempRet0; + $1168 = (_i64Subtract(($1036|0),($1037|0),($1166|0),($1167|0))|0); + $1169 = tempRet0; + $1170 = (_i64Add(($988|0),($989|0),1048576,0)|0); + $1171 = tempRet0; + $1172 = (_bitshift64Ashr(($1170|0),($1171|0),21)|0); + $1173 = tempRet0; + $1174 = (_i64Add(($1172|0),($1173|0),($944|0),($945|0))|0); + $1175 = tempRet0; + $1176 = (_bitshift64Shl(($1172|0),($1173|0),21)|0); + $1177 = tempRet0; + $1178 = (_i64Subtract(($988|0),($989|0),($1176|0),($1177|0))|0); + $1179 = tempRet0; + $1180 = (_i64Add(($1124|0),($1125|0),1048576,0)|0); + $1181 = tempRet0; + $1182 = (_bitshift64Ashr(($1180|0),($1181|0),21)|0); + $1183 = tempRet0; + $1184 = (_i64Add(($1182|0),($1183|0),($1138|0),($1139|0))|0); + $1185 = tempRet0; + $1186 = (_bitshift64Shl(($1182|0),($1183|0),21)|0); + $1187 = tempRet0; + $1188 = (_i64Subtract(($1124|0),($1125|0),($1186|0),($1187|0))|0); + $1189 = tempRet0; + $1190 = (_i64Add(($1134|0),($1135|0),1048576,0)|0); + $1191 = tempRet0; + $1192 = (_bitshift64Ashr(($1190|0),($1191|0),21)|0); + $1193 = tempRet0; + $1194 = (_i64Add(($1192|0),($1193|0),($1148|0),($1149|0))|0); + $1195 = tempRet0; + $1196 = (_bitshift64Shl(($1192|0),($1193|0),21)|0); + $1197 = tempRet0; + $1198 = (_i64Subtract(($1134|0),($1135|0),($1196|0),($1197|0))|0); + $1199 = tempRet0; + $1200 = (_i64Add(($1144|0),($1145|0),1048576,0)|0); + $1201 = tempRet0; + $1202 = (_bitshift64Ashr(($1200|0),($1201|0),21)|0); + $1203 = tempRet0; + $1204 = (_i64Add(($1202|0),($1203|0),($1158|0),($1159|0))|0); + $1205 = tempRet0; + $1206 = (_bitshift64Shl(($1202|0),($1203|0),21)|0); + $1207 = tempRet0; + $1208 = (_i64Subtract(($1144|0),($1145|0),($1206|0),($1207|0))|0); + $1209 = tempRet0; + $1210 = (_i64Add(($1154|0),($1155|0),1048576,0)|0); + $1211 = tempRet0; + $1212 = (_bitshift64Ashr(($1210|0),($1211|0),21)|0); + $1213 = tempRet0; + $1214 = (_i64Add(($1212|0),($1213|0),($1168|0),($1169|0))|0); + $1215 = tempRet0; + $1216 = (_bitshift64Shl(($1212|0),($1213|0),21)|0); + $1217 = tempRet0; + $1218 = (_i64Subtract(($1154|0),($1155|0),($1216|0),($1217|0))|0); + $1219 = tempRet0; + $1220 = (_i64Add(($1164|0),($1165|0),1048576,0)|0); + $1221 = tempRet0; + $1222 = (_bitshift64Ashr(($1220|0),($1221|0),21)|0); + $1223 = tempRet0; + $1224 = (_i64Add(($1222|0),($1223|0),($1178|0),($1179|0))|0); + $1225 = tempRet0; + $1226 = (_bitshift64Shl(($1222|0),($1223|0),21)|0); + $1227 = tempRet0; + $1228 = (_i64Subtract(($1164|0),($1165|0),($1226|0),($1227|0))|0); + $1229 = tempRet0; + $1230 = (___muldi3(($1174|0),($1175|0),666643,0)|0); + $1231 = tempRet0; + $1232 = (_i64Add(($888|0),($889|0),($1230|0),($1231|0))|0); + $1233 = tempRet0; + $1234 = (___muldi3(($1174|0),($1175|0),470296,0)|0); + $1235 = tempRet0; + $1236 = (_i64Add(($1234|0),($1235|0),($1128|0),($1129|0))|0); + $1237 = tempRet0; + $1238 = (___muldi3(($1174|0),($1175|0),654183,0)|0); + $1239 = tempRet0; + $1240 = (_i64Add(($1238|0),($1239|0),($1188|0),($1189|0))|0); + $1241 = tempRet0; + $1242 = (___muldi3(($1174|0),($1175|0),-997805,-1)|0); + $1243 = tempRet0; + $1244 = (_i64Add(($1242|0),($1243|0),($1184|0),($1185|0))|0); + $1245 = tempRet0; + $1246 = (___muldi3(($1174|0),($1175|0),136657,0)|0); + $1247 = tempRet0; + $1248 = (_i64Add(($1246|0),($1247|0),($1198|0),($1199|0))|0); + $1249 = tempRet0; + $1250 = (___muldi3(($1174|0),($1175|0),-683901,-1)|0); + $1251 = tempRet0; + $1252 = (_i64Add(($1194|0),($1195|0),($1250|0),($1251|0))|0); + $1253 = tempRet0; + $1254 = (___muldi3(($1224|0),($1225|0),666643,0)|0); + $1255 = tempRet0; + $1256 = (_i64Add(($876|0),($877|0),($1254|0),($1255|0))|0); + $1257 = tempRet0; + $1258 = (___muldi3(($1224|0),($1225|0),470296,0)|0); + $1259 = tempRet0; + $1260 = (_i64Add(($1232|0),($1233|0),($1258|0),($1259|0))|0); + $1261 = tempRet0; + $1262 = (___muldi3(($1224|0),($1225|0),654183,0)|0); + $1263 = tempRet0; + $1264 = (_i64Add(($1236|0),($1237|0),($1262|0),($1263|0))|0); + $1265 = tempRet0; + $1266 = (___muldi3(($1224|0),($1225|0),-997805,-1)|0); + $1267 = tempRet0; + $1268 = (_i64Add(($1266|0),($1267|0),($1240|0),($1241|0))|0); + $1269 = tempRet0; + $1270 = (___muldi3(($1224|0),($1225|0),136657,0)|0); + $1271 = tempRet0; + $1272 = (_i64Add(($1270|0),($1271|0),($1244|0),($1245|0))|0); + $1273 = tempRet0; + $1274 = (___muldi3(($1224|0),($1225|0),-683901,-1)|0); + $1275 = tempRet0; + $1276 = (_i64Add(($1248|0),($1249|0),($1274|0),($1275|0))|0); + $1277 = tempRet0; + $1278 = (___muldi3(($1228|0),($1229|0),666643,0)|0); + $1279 = tempRet0; + $1280 = (_i64Add(($880|0),($881|0),($1278|0),($1279|0))|0); + $1281 = tempRet0; + $1282 = (___muldi3(($1228|0),($1229|0),470296,0)|0); + $1283 = tempRet0; + $1284 = (_i64Add(($1256|0),($1257|0),($1282|0),($1283|0))|0); + $1285 = tempRet0; + $1286 = (___muldi3(($1228|0),($1229|0),654183,0)|0); + $1287 = tempRet0; + $1288 = (_i64Add(($1260|0),($1261|0),($1286|0),($1287|0))|0); + $1289 = tempRet0; + $1290 = (___muldi3(($1228|0),($1229|0),-997805,-1)|0); + $1291 = tempRet0; + $1292 = (_i64Add(($1264|0),($1265|0),($1290|0),($1291|0))|0); + $1293 = tempRet0; + $1294 = (___muldi3(($1228|0),($1229|0),136657,0)|0); + $1295 = tempRet0; + $1296 = (_i64Add(($1294|0),($1295|0),($1268|0),($1269|0))|0); + $1297 = tempRet0; + $1298 = (___muldi3(($1228|0),($1229|0),-683901,-1)|0); + $1299 = tempRet0; + $1300 = (_i64Add(($1272|0),($1273|0),($1298|0),($1299|0))|0); + $1301 = tempRet0; + $1302 = (___muldi3(($1214|0),($1215|0),666643,0)|0); + $1303 = tempRet0; + $1304 = (___muldi3(($1214|0),($1215|0),470296,0)|0); + $1305 = tempRet0; + $1306 = (_i64Add(($1280|0),($1281|0),($1304|0),($1305|0))|0); + $1307 = tempRet0; + $1308 = (___muldi3(($1214|0),($1215|0),654183,0)|0); + $1309 = tempRet0; + $1310 = (_i64Add(($1284|0),($1285|0),($1308|0),($1309|0))|0); + $1311 = tempRet0; + $1312 = (___muldi3(($1214|0),($1215|0),-997805,-1)|0); + $1313 = tempRet0; + $1314 = (_i64Add(($1288|0),($1289|0),($1312|0),($1313|0))|0); + $1315 = tempRet0; + $1316 = (___muldi3(($1214|0),($1215|0),136657,0)|0); + $1317 = tempRet0; + $1318 = (_i64Add(($1292|0),($1293|0),($1316|0),($1317|0))|0); + $1319 = tempRet0; + $1320 = (___muldi3(($1214|0),($1215|0),-683901,-1)|0); + $1321 = tempRet0; + $1322 = (_i64Add(($1296|0),($1297|0),($1320|0),($1321|0))|0); + $1323 = tempRet0; + $1324 = (___muldi3(($1218|0),($1219|0),666643,0)|0); + $1325 = tempRet0; + $1326 = (___muldi3(($1218|0),($1219|0),470296,0)|0); + $1327 = tempRet0; + $1328 = (___muldi3(($1218|0),($1219|0),654183,0)|0); + $1329 = tempRet0; + $1330 = (_i64Add(($1306|0),($1307|0),($1328|0),($1329|0))|0); + $1331 = tempRet0; + $1332 = (___muldi3(($1218|0),($1219|0),-997805,-1)|0); + $1333 = tempRet0; + $1334 = (_i64Add(($1310|0),($1311|0),($1332|0),($1333|0))|0); + $1335 = tempRet0; + $1336 = (___muldi3(($1218|0),($1219|0),136657,0)|0); + $1337 = tempRet0; + $1338 = (_i64Add(($1314|0),($1315|0),($1336|0),($1337|0))|0); + $1339 = tempRet0; + $1340 = (___muldi3(($1218|0),($1219|0),-683901,-1)|0); + $1341 = tempRet0; + $1342 = (_i64Add(($1318|0),($1319|0),($1340|0),($1341|0))|0); + $1343 = tempRet0; + $1344 = (___muldi3(($1204|0),($1205|0),666643,0)|0); + $1345 = tempRet0; + $1346 = (_i64Add(($1344|0),($1345|0),($632|0),($633|0))|0); + $1347 = tempRet0; + $1348 = (___muldi3(($1204|0),($1205|0),470296,0)|0); + $1349 = tempRet0; + $1350 = (___muldi3(($1204|0),($1205|0),654183,0)|0); + $1351 = tempRet0; + $1352 = (_i64Add(($866|0),($867|0),($216|0),($217|0))|0); + $1353 = tempRet0; + $1354 = (_i64Subtract(($1352|0),($1353|0),($648|0),($649|0))|0); + $1355 = tempRet0; + $1356 = (_i64Add(($1354|0),($1355|0),($1302|0),($1303|0))|0); + $1357 = tempRet0; + $1358 = (_i64Add(($1356|0),($1357|0),($1350|0),($1351|0))|0); + $1359 = tempRet0; + $1360 = (_i64Add(($1358|0),($1359|0),($1326|0),($1327|0))|0); + $1361 = tempRet0; + $1362 = (___muldi3(($1204|0),($1205|0),-997805,-1)|0); + $1363 = tempRet0; + $1364 = (_i64Add(($1330|0),($1331|0),($1362|0),($1363|0))|0); + $1365 = tempRet0; + $1366 = (___muldi3(($1204|0),($1205|0),136657,0)|0); + $1367 = tempRet0; + $1368 = (_i64Add(($1334|0),($1335|0),($1366|0),($1367|0))|0); + $1369 = tempRet0; + $1370 = (___muldi3(($1204|0),($1205|0),-683901,-1)|0); + $1371 = tempRet0; + $1372 = (_i64Add(($1338|0),($1339|0),($1370|0),($1371|0))|0); + $1373 = tempRet0; + $1374 = (_i64Add(($1346|0),($1347|0),1048576,0)|0); + $1375 = tempRet0; + $1376 = (_bitshift64Ashr(($1374|0),($1375|0),21)|0); + $1377 = tempRet0; + $1378 = (_i64Add(($870|0),($871|0),($1348|0),($1349|0))|0); + $1379 = tempRet0; + $1380 = (_i64Add(($1378|0),($1379|0),($1324|0),($1325|0))|0); + $1381 = tempRet0; + $1382 = (_i64Add(($1380|0),($1381|0),($1376|0),($1377|0))|0); + $1383 = tempRet0; + $1384 = (_bitshift64Shl(($1376|0),($1377|0),21)|0); + $1385 = tempRet0; + $1386 = (_i64Subtract(($1346|0),($1347|0),($1384|0),($1385|0))|0); + $1387 = tempRet0; + $1388 = (_i64Add(($1360|0),($1361|0),1048576,0)|0); + $1389 = tempRet0; + $1390 = (_bitshift64Ashr(($1388|0),($1389|0),21)|0); + $1391 = tempRet0; + $1392 = (_i64Add(($1390|0),($1391|0),($1364|0),($1365|0))|0); + $1393 = tempRet0; + $1394 = (_bitshift64Shl(($1390|0),($1391|0),21)|0); + $1395 = tempRet0; + $1396 = (_i64Add(($1368|0),($1369|0),1048576,0)|0); + $1397 = tempRet0; + $1398 = (_bitshift64Ashr(($1396|0),($1397|0),21)|0); + $1399 = tempRet0; + $1400 = (_i64Add(($1398|0),($1399|0),($1372|0),($1373|0))|0); + $1401 = tempRet0; + $1402 = (_bitshift64Shl(($1398|0),($1399|0),21)|0); + $1403 = tempRet0; + $1404 = (_i64Add(($1342|0),($1343|0),1048576,0)|0); + $1405 = tempRet0; + $1406 = (_bitshift64Ashr(($1404|0),($1405|0),21)|0); + $1407 = tempRet0; + $1408 = (_i64Add(($1406|0),($1407|0),($1322|0),($1323|0))|0); + $1409 = tempRet0; + $1410 = (_bitshift64Shl(($1406|0),($1407|0),21)|0); + $1411 = tempRet0; + $1412 = (_i64Subtract(($1342|0),($1343|0),($1410|0),($1411|0))|0); + $1413 = tempRet0; + $1414 = (_i64Add(($1300|0),($1301|0),1048576,0)|0); + $1415 = tempRet0; + $1416 = (_bitshift64Ashr(($1414|0),($1415|0),21)|0); + $1417 = tempRet0; + $1418 = (_i64Add(($1276|0),($1277|0),($1416|0),($1417|0))|0); + $1419 = tempRet0; + $1420 = (_bitshift64Shl(($1416|0),($1417|0),21)|0); + $1421 = tempRet0; + $1422 = (_i64Subtract(($1300|0),($1301|0),($1420|0),($1421|0))|0); + $1423 = tempRet0; + $1424 = (_i64Add(($1252|0),($1253|0),1048576,0)|0); + $1425 = tempRet0; + $1426 = (_bitshift64Ashr(($1424|0),($1425|0),21)|0); + $1427 = tempRet0; + $1428 = (_i64Add(($1208|0),($1209|0),($1426|0),($1427|0))|0); + $1429 = tempRet0; + $1430 = (_bitshift64Shl(($1426|0),($1427|0),21)|0); + $1431 = tempRet0; + $1432 = (_i64Add(($1382|0),($1383|0),1048576,0)|0); + $1433 = tempRet0; + $1434 = (_bitshift64Ashr(($1432|0),($1433|0),21)|0); + $1435 = tempRet0; + $1436 = (_bitshift64Shl(($1434|0),($1435|0),21)|0); + $1437 = tempRet0; + $1438 = (_i64Add(($1392|0),($1393|0),1048576,0)|0); + $1439 = tempRet0; + $1440 = (_bitshift64Ashr(($1438|0),($1439|0),21)|0); + $1441 = tempRet0; + $1442 = (_bitshift64Shl(($1440|0),($1441|0),21)|0); + $1443 = tempRet0; + $1444 = (_i64Subtract(($1392|0),($1393|0),($1442|0),($1443|0))|0); + $1445 = tempRet0; + $1446 = (_i64Add(($1400|0),($1401|0),1048576,0)|0); + $1447 = tempRet0; + $1448 = (_bitshift64Ashr(($1446|0),($1447|0),21)|0); + $1449 = tempRet0; + $1450 = (_i64Add(($1412|0),($1413|0),($1448|0),($1449|0))|0); + $1451 = tempRet0; + $1452 = (_bitshift64Shl(($1448|0),($1449|0),21)|0); + $1453 = tempRet0; + $1454 = (_i64Subtract(($1400|0),($1401|0),($1452|0),($1453|0))|0); + $1455 = tempRet0; + $1456 = (_i64Add(($1408|0),($1409|0),1048576,0)|0); + $1457 = tempRet0; + $1458 = (_bitshift64Ashr(($1456|0),($1457|0),21)|0); + $1459 = tempRet0; + $1460 = (_i64Add(($1422|0),($1423|0),($1458|0),($1459|0))|0); + $1461 = tempRet0; + $1462 = (_bitshift64Shl(($1458|0),($1459|0),21)|0); + $1463 = tempRet0; + $1464 = (_i64Subtract(($1408|0),($1409|0),($1462|0),($1463|0))|0); + $1465 = tempRet0; + $1466 = (_i64Add(($1418|0),($1419|0),1048576,0)|0); + $1467 = tempRet0; + $1468 = (_bitshift64Ashr(($1466|0),($1467|0),21)|0); + $1469 = tempRet0; + $1470 = (_bitshift64Shl(($1468|0),($1469|0),21)|0); + $1471 = tempRet0; + $1472 = (_i64Subtract(($1418|0),($1419|0),($1470|0),($1471|0))|0); + $1473 = tempRet0; + $1474 = (_i64Add(($1428|0),($1429|0),1048576,0)|0); + $1475 = tempRet0; + $1476 = (_bitshift64Ashr(($1474|0),($1475|0),21)|0); + $1477 = tempRet0; + $1478 = (_bitshift64Shl(($1476|0),($1477|0),21)|0); + $1479 = tempRet0; + $1480 = (_i64Subtract(($1428|0),($1429|0),($1478|0),($1479|0))|0); + $1481 = tempRet0; + $1482 = (___muldi3(($1476|0),($1477|0),666643,0)|0); + $1483 = tempRet0; + $1484 = (_i64Add(($1386|0),($1387|0),($1482|0),($1483|0))|0); + $1485 = tempRet0; + $1486 = (___muldi3(($1476|0),($1477|0),470296,0)|0); + $1487 = tempRet0; + $1488 = (___muldi3(($1476|0),($1477|0),654183,0)|0); + $1489 = tempRet0; + $1490 = (___muldi3(($1476|0),($1477|0),-997805,-1)|0); + $1491 = tempRet0; + $1492 = (_i64Add(($1444|0),($1445|0),($1490|0),($1491|0))|0); + $1493 = tempRet0; + $1494 = (___muldi3(($1476|0),($1477|0),136657,0)|0); + $1495 = tempRet0; + $1496 = (___muldi3(($1476|0),($1477|0),-683901,-1)|0); + $1497 = tempRet0; + $1498 = (_i64Add(($1454|0),($1455|0),($1496|0),($1497|0))|0); + $1499 = tempRet0; + $1500 = (_bitshift64Ashr(($1484|0),($1485|0),21)|0); + $1501 = tempRet0; + $1502 = (_i64Add(($1486|0),($1487|0),($1382|0),($1383|0))|0); + $1503 = tempRet0; + $1504 = (_i64Subtract(($1502|0),($1503|0),($1436|0),($1437|0))|0); + $1505 = tempRet0; + $1506 = (_i64Add(($1504|0),($1505|0),($1500|0),($1501|0))|0); + $1507 = tempRet0; + $1508 = (_bitshift64Shl(($1500|0),($1501|0),21)|0); + $1509 = tempRet0; + $1510 = (_i64Subtract(($1484|0),($1485|0),($1508|0),($1509|0))|0); + $1511 = tempRet0; + $1512 = (_bitshift64Ashr(($1506|0),($1507|0),21)|0); + $1513 = tempRet0; + $1514 = (_i64Add(($1488|0),($1489|0),($1360|0),($1361|0))|0); + $1515 = tempRet0; + $1516 = (_i64Subtract(($1514|0),($1515|0),($1394|0),($1395|0))|0); + $1517 = tempRet0; + $1518 = (_i64Add(($1516|0),($1517|0),($1434|0),($1435|0))|0); + $1519 = tempRet0; + $1520 = (_i64Add(($1518|0),($1519|0),($1512|0),($1513|0))|0); + $1521 = tempRet0; + $1522 = (_bitshift64Shl(($1512|0),($1513|0),21)|0); + $1523 = tempRet0; + $1524 = (_i64Subtract(($1506|0),($1507|0),($1522|0),($1523|0))|0); + $1525 = tempRet0; + $1526 = (_bitshift64Ashr(($1520|0),($1521|0),21)|0); + $1527 = tempRet0; + $1528 = (_i64Add(($1526|0),($1527|0),($1492|0),($1493|0))|0); + $1529 = tempRet0; + $1530 = (_bitshift64Shl(($1526|0),($1527|0),21)|0); + $1531 = tempRet0; + $1532 = (_i64Subtract(($1520|0),($1521|0),($1530|0),($1531|0))|0); + $1533 = tempRet0; + $1534 = (_bitshift64Ashr(($1528|0),($1529|0),21)|0); + $1535 = tempRet0; + $1536 = (_i64Add(($1494|0),($1495|0),($1368|0),($1369|0))|0); + $1537 = tempRet0; + $1538 = (_i64Subtract(($1536|0),($1537|0),($1402|0),($1403|0))|0); + $1539 = tempRet0; + $1540 = (_i64Add(($1538|0),($1539|0),($1440|0),($1441|0))|0); + $1541 = tempRet0; + $1542 = (_i64Add(($1540|0),($1541|0),($1534|0),($1535|0))|0); + $1543 = tempRet0; + $1544 = (_bitshift64Shl(($1534|0),($1535|0),21)|0); + $1545 = tempRet0; + $1546 = (_i64Subtract(($1528|0),($1529|0),($1544|0),($1545|0))|0); + $1547 = tempRet0; + $1548 = (_bitshift64Ashr(($1542|0),($1543|0),21)|0); + $1549 = tempRet0; + $1550 = (_i64Add(($1548|0),($1549|0),($1498|0),($1499|0))|0); + $1551 = tempRet0; + $1552 = (_bitshift64Shl(($1548|0),($1549|0),21)|0); + $1553 = tempRet0; + $1554 = (_i64Subtract(($1542|0),($1543|0),($1552|0),($1553|0))|0); + $1555 = tempRet0; + $1556 = (_bitshift64Ashr(($1550|0),($1551|0),21)|0); + $1557 = tempRet0; + $1558 = (_i64Add(($1450|0),($1451|0),($1556|0),($1557|0))|0); + $1559 = tempRet0; + $1560 = (_bitshift64Shl(($1556|0),($1557|0),21)|0); + $1561 = tempRet0; + $1562 = (_i64Subtract(($1550|0),($1551|0),($1560|0),($1561|0))|0); + $1563 = tempRet0; + $1564 = (_bitshift64Ashr(($1558|0),($1559|0),21)|0); + $1565 = tempRet0; + $1566 = (_i64Add(($1564|0),($1565|0),($1464|0),($1465|0))|0); + $1567 = tempRet0; + $1568 = (_bitshift64Shl(($1564|0),($1565|0),21)|0); + $1569 = tempRet0; + $1570 = (_i64Subtract(($1558|0),($1559|0),($1568|0),($1569|0))|0); + $1571 = tempRet0; + $1572 = (_bitshift64Ashr(($1566|0),($1567|0),21)|0); + $1573 = tempRet0; + $1574 = (_i64Add(($1460|0),($1461|0),($1572|0),($1573|0))|0); + $1575 = tempRet0; + $1576 = (_bitshift64Shl(($1572|0),($1573|0),21)|0); + $1577 = tempRet0; + $1578 = (_i64Subtract(($1566|0),($1567|0),($1576|0),($1577|0))|0); + $1579 = tempRet0; + $1580 = (_bitshift64Ashr(($1574|0),($1575|0),21)|0); + $1581 = tempRet0; + $1582 = (_i64Add(($1580|0),($1581|0),($1472|0),($1473|0))|0); + $1583 = tempRet0; + $1584 = (_bitshift64Shl(($1580|0),($1581|0),21)|0); + $1585 = tempRet0; + $1586 = (_i64Subtract(($1574|0),($1575|0),($1584|0),($1585|0))|0); + $1587 = tempRet0; + $1588 = (_bitshift64Ashr(($1582|0),($1583|0),21)|0); + $1589 = tempRet0; + $1590 = (_i64Add(($1468|0),($1469|0),($1252|0),($1253|0))|0); + $1591 = tempRet0; + $1592 = (_i64Subtract(($1590|0),($1591|0),($1430|0),($1431|0))|0); + $1593 = tempRet0; + $1594 = (_i64Add(($1592|0),($1593|0),($1588|0),($1589|0))|0); + $1595 = tempRet0; + $1596 = (_bitshift64Shl(($1588|0),($1589|0),21)|0); + $1597 = tempRet0; + $1598 = (_i64Subtract(($1582|0),($1583|0),($1596|0),($1597|0))|0); + $1599 = tempRet0; + $1600 = (_bitshift64Ashr(($1594|0),($1595|0),21)|0); + $1601 = tempRet0; + $1602 = (_i64Add(($1600|0),($1601|0),($1480|0),($1481|0))|0); + $1603 = tempRet0; + $1604 = (_bitshift64Shl(($1600|0),($1601|0),21)|0); + $1605 = tempRet0; + $1606 = (_i64Subtract(($1594|0),($1595|0),($1604|0),($1605|0))|0); + $1607 = tempRet0; + $1608 = (_bitshift64Ashr(($1602|0),($1603|0),21)|0); + $1609 = tempRet0; + $1610 = (_bitshift64Shl(($1608|0),($1609|0),21)|0); + $1611 = tempRet0; + $1612 = (_i64Subtract(($1602|0),($1603|0),($1610|0),($1611|0))|0); + $1613 = tempRet0; + $1614 = (___muldi3(($1608|0),($1609|0),666643,0)|0); + $1615 = tempRet0; + $1616 = (_i64Add(($1614|0),($1615|0),($1510|0),($1511|0))|0); + $1617 = tempRet0; + $1618 = (___muldi3(($1608|0),($1609|0),470296,0)|0); + $1619 = tempRet0; + $1620 = (_i64Add(($1524|0),($1525|0),($1618|0),($1619|0))|0); + $1621 = tempRet0; + $1622 = (___muldi3(($1608|0),($1609|0),654183,0)|0); + $1623 = tempRet0; + $1624 = (_i64Add(($1532|0),($1533|0),($1622|0),($1623|0))|0); + $1625 = tempRet0; + $1626 = (___muldi3(($1608|0),($1609|0),-997805,-1)|0); + $1627 = tempRet0; + $1628 = (_i64Add(($1546|0),($1547|0),($1626|0),($1627|0))|0); + $1629 = tempRet0; + $1630 = (___muldi3(($1608|0),($1609|0),136657,0)|0); + $1631 = tempRet0; + $1632 = (_i64Add(($1554|0),($1555|0),($1630|0),($1631|0))|0); + $1633 = tempRet0; + $1634 = (___muldi3(($1608|0),($1609|0),-683901,-1)|0); + $1635 = tempRet0; + $1636 = (_i64Add(($1562|0),($1563|0),($1634|0),($1635|0))|0); + $1637 = tempRet0; + $1638 = (_bitshift64Ashr(($1616|0),($1617|0),21)|0); + $1639 = tempRet0; + $1640 = (_i64Add(($1620|0),($1621|0),($1638|0),($1639|0))|0); + $1641 = tempRet0; + $1642 = (_bitshift64Shl(($1638|0),($1639|0),21)|0); + $1643 = tempRet0; + $1644 = (_i64Subtract(($1616|0),($1617|0),($1642|0),($1643|0))|0); + $1645 = tempRet0; + $1646 = (_bitshift64Ashr(($1640|0),($1641|0),21)|0); + $1647 = tempRet0; + $1648 = (_i64Add(($1624|0),($1625|0),($1646|0),($1647|0))|0); + $1649 = tempRet0; + $1650 = (_bitshift64Shl(($1646|0),($1647|0),21)|0); + $1651 = tempRet0; + $1652 = (_i64Subtract(($1640|0),($1641|0),($1650|0),($1651|0))|0); + $1653 = tempRet0; + $1654 = (_bitshift64Ashr(($1648|0),($1649|0),21)|0); + $1655 = tempRet0; + $1656 = (_i64Add(($1654|0),($1655|0),($1628|0),($1629|0))|0); + $1657 = tempRet0; + $1658 = (_bitshift64Shl(($1654|0),($1655|0),21)|0); + $1659 = tempRet0; + $1660 = (_i64Subtract(($1648|0),($1649|0),($1658|0),($1659|0))|0); + $1661 = tempRet0; + $1662 = (_bitshift64Ashr(($1656|0),($1657|0),21)|0); + $1663 = tempRet0; + $1664 = (_i64Add(($1632|0),($1633|0),($1662|0),($1663|0))|0); + $1665 = tempRet0; + $1666 = (_bitshift64Shl(($1662|0),($1663|0),21)|0); + $1667 = tempRet0; + $1668 = (_i64Subtract(($1656|0),($1657|0),($1666|0),($1667|0))|0); + $1669 = tempRet0; + $1670 = (_bitshift64Ashr(($1664|0),($1665|0),21)|0); + $1671 = tempRet0; + $1672 = (_i64Add(($1670|0),($1671|0),($1636|0),($1637|0))|0); + $1673 = tempRet0; + $1674 = (_bitshift64Shl(($1670|0),($1671|0),21)|0); + $1675 = tempRet0; + $1676 = (_i64Subtract(($1664|0),($1665|0),($1674|0),($1675|0))|0); + $1677 = tempRet0; + $1678 = (_bitshift64Ashr(($1672|0),($1673|0),21)|0); + $1679 = tempRet0; + $1680 = (_i64Add(($1678|0),($1679|0),($1570|0),($1571|0))|0); + $1681 = tempRet0; + $1682 = (_bitshift64Shl(($1678|0),($1679|0),21)|0); + $1683 = tempRet0; + $1684 = (_i64Subtract(($1672|0),($1673|0),($1682|0),($1683|0))|0); + $1685 = tempRet0; + $1686 = (_bitshift64Ashr(($1680|0),($1681|0),21)|0); + $1687 = tempRet0; + $1688 = (_i64Add(($1686|0),($1687|0),($1578|0),($1579|0))|0); + $1689 = tempRet0; + $1690 = (_bitshift64Shl(($1686|0),($1687|0),21)|0); + $1691 = tempRet0; + $1692 = (_i64Subtract(($1680|0),($1681|0),($1690|0),($1691|0))|0); + $1693 = tempRet0; + $1694 = (_bitshift64Ashr(($1688|0),($1689|0),21)|0); + $1695 = tempRet0; + $1696 = (_i64Add(($1694|0),($1695|0),($1586|0),($1587|0))|0); + $1697 = tempRet0; + $1698 = (_bitshift64Shl(($1694|0),($1695|0),21)|0); + $1699 = tempRet0; + $1700 = (_i64Subtract(($1688|0),($1689|0),($1698|0),($1699|0))|0); + $1701 = tempRet0; + $1702 = (_bitshift64Ashr(($1696|0),($1697|0),21)|0); + $1703 = tempRet0; + $1704 = (_i64Add(($1702|0),($1703|0),($1598|0),($1599|0))|0); + $1705 = tempRet0; + $1706 = (_bitshift64Shl(($1702|0),($1703|0),21)|0); + $1707 = tempRet0; + $1708 = (_i64Subtract(($1696|0),($1697|0),($1706|0),($1707|0))|0); + $1709 = tempRet0; + $1710 = (_bitshift64Ashr(($1704|0),($1705|0),21)|0); + $1711 = tempRet0; + $1712 = (_i64Add(($1710|0),($1711|0),($1606|0),($1607|0))|0); + $1713 = tempRet0; + $1714 = (_bitshift64Shl(($1710|0),($1711|0),21)|0); + $1715 = tempRet0; + $1716 = (_i64Subtract(($1704|0),($1705|0),($1714|0),($1715|0))|0); + $1717 = tempRet0; + $1718 = (_bitshift64Ashr(($1712|0),($1713|0),21)|0); + $1719 = tempRet0; + $1720 = (_i64Add(($1718|0),($1719|0),($1612|0),($1613|0))|0); + $1721 = tempRet0; + $1722 = (_bitshift64Shl(($1718|0),($1719|0),21)|0); + $1723 = tempRet0; + $1724 = (_i64Subtract(($1712|0),($1713|0),($1722|0),($1723|0))|0); + $1725 = tempRet0; + $1726 = $1644&255; + HEAP8[$s>>0] = $1726; + $1727 = (_bitshift64Lshr(($1644|0),($1645|0),8)|0); + $1728 = tempRet0; + $1729 = $1727&255; + $1730 = ((($s)) + 1|0); + HEAP8[$1730>>0] = $1729; + $1731 = (_bitshift64Lshr(($1644|0),($1645|0),16)|0); + $1732 = tempRet0; + $1733 = (_bitshift64Shl(($1652|0),($1653|0),5)|0); + $1734 = tempRet0; + $1735 = $1733 | $1731; + $1734 | $1732; + $1736 = $1735&255; + $1737 = ((($s)) + 2|0); + HEAP8[$1737>>0] = $1736; + $1738 = (_bitshift64Lshr(($1652|0),($1653|0),3)|0); + $1739 = tempRet0; + $1740 = $1738&255; + $1741 = ((($s)) + 3|0); + HEAP8[$1741>>0] = $1740; + $1742 = (_bitshift64Lshr(($1652|0),($1653|0),11)|0); + $1743 = tempRet0; + $1744 = $1742&255; + $1745 = ((($s)) + 4|0); + HEAP8[$1745>>0] = $1744; + $1746 = (_bitshift64Lshr(($1652|0),($1653|0),19)|0); + $1747 = tempRet0; + $1748 = (_bitshift64Shl(($1660|0),($1661|0),2)|0); + $1749 = tempRet0; + $1750 = $1748 | $1746; + $1749 | $1747; + $1751 = $1750&255; + $1752 = ((($s)) + 5|0); + HEAP8[$1752>>0] = $1751; + $1753 = (_bitshift64Lshr(($1660|0),($1661|0),6)|0); + $1754 = tempRet0; + $1755 = $1753&255; + $1756 = ((($s)) + 6|0); + HEAP8[$1756>>0] = $1755; + $1757 = (_bitshift64Lshr(($1660|0),($1661|0),14)|0); + $1758 = tempRet0; + $1759 = (_bitshift64Shl(($1668|0),($1669|0),7)|0); + $1760 = tempRet0; + $1761 = $1759 | $1757; + $1760 | $1758; + $1762 = $1761&255; + $1763 = ((($s)) + 7|0); + HEAP8[$1763>>0] = $1762; + $1764 = (_bitshift64Lshr(($1668|0),($1669|0),1)|0); + $1765 = tempRet0; + $1766 = $1764&255; + $1767 = ((($s)) + 8|0); + HEAP8[$1767>>0] = $1766; + $1768 = (_bitshift64Lshr(($1668|0),($1669|0),9)|0); + $1769 = tempRet0; + $1770 = $1768&255; + $1771 = ((($s)) + 9|0); + HEAP8[$1771>>0] = $1770; + $1772 = (_bitshift64Lshr(($1668|0),($1669|0),17)|0); + $1773 = tempRet0; + $1774 = (_bitshift64Shl(($1676|0),($1677|0),4)|0); + $1775 = tempRet0; + $1776 = $1774 | $1772; + $1775 | $1773; + $1777 = $1776&255; + $1778 = ((($s)) + 10|0); + HEAP8[$1778>>0] = $1777; + $1779 = (_bitshift64Lshr(($1676|0),($1677|0),4)|0); + $1780 = tempRet0; + $1781 = $1779&255; + $1782 = ((($s)) + 11|0); + HEAP8[$1782>>0] = $1781; + $1783 = (_bitshift64Lshr(($1676|0),($1677|0),12)|0); + $1784 = tempRet0; + $1785 = $1783&255; + $1786 = ((($s)) + 12|0); + HEAP8[$1786>>0] = $1785; + $1787 = (_bitshift64Lshr(($1676|0),($1677|0),20)|0); + $1788 = tempRet0; + $1789 = (_bitshift64Shl(($1684|0),($1685|0),1)|0); + $1790 = tempRet0; + $1791 = $1789 | $1787; + $1790 | $1788; + $1792 = $1791&255; + $1793 = ((($s)) + 13|0); + HEAP8[$1793>>0] = $1792; + $1794 = (_bitshift64Lshr(($1684|0),($1685|0),7)|0); + $1795 = tempRet0; + $1796 = $1794&255; + $1797 = ((($s)) + 14|0); + HEAP8[$1797>>0] = $1796; + $1798 = (_bitshift64Lshr(($1684|0),($1685|0),15)|0); + $1799 = tempRet0; + $1800 = (_bitshift64Shl(($1692|0),($1693|0),6)|0); + $1801 = tempRet0; + $1802 = $1800 | $1798; + $1801 | $1799; + $1803 = $1802&255; + $1804 = ((($s)) + 15|0); + HEAP8[$1804>>0] = $1803; + $1805 = (_bitshift64Lshr(($1692|0),($1693|0),2)|0); + $1806 = tempRet0; + $1807 = $1805&255; + $1808 = ((($s)) + 16|0); + HEAP8[$1808>>0] = $1807; + $1809 = (_bitshift64Lshr(($1692|0),($1693|0),10)|0); + $1810 = tempRet0; + $1811 = $1809&255; + $1812 = ((($s)) + 17|0); + HEAP8[$1812>>0] = $1811; + $1813 = (_bitshift64Lshr(($1692|0),($1693|0),18)|0); + $1814 = tempRet0; + $1815 = (_bitshift64Shl(($1700|0),($1701|0),3)|0); + $1816 = tempRet0; + $1817 = $1815 | $1813; + $1816 | $1814; + $1818 = $1817&255; + $1819 = ((($s)) + 18|0); + HEAP8[$1819>>0] = $1818; + $1820 = (_bitshift64Lshr(($1700|0),($1701|0),5)|0); + $1821 = tempRet0; + $1822 = $1820&255; + $1823 = ((($s)) + 19|0); + HEAP8[$1823>>0] = $1822; + $1824 = (_bitshift64Lshr(($1700|0),($1701|0),13)|0); + $1825 = tempRet0; + $1826 = $1824&255; + $1827 = ((($s)) + 20|0); + HEAP8[$1827>>0] = $1826; + $1828 = $1708&255; + $1829 = ((($s)) + 21|0); + HEAP8[$1829>>0] = $1828; + $1830 = (_bitshift64Lshr(($1708|0),($1709|0),8)|0); + $1831 = tempRet0; + $1832 = $1830&255; + $1833 = ((($s)) + 22|0); + HEAP8[$1833>>0] = $1832; + $1834 = (_bitshift64Lshr(($1708|0),($1709|0),16)|0); + $1835 = tempRet0; + $1836 = (_bitshift64Shl(($1716|0),($1717|0),5)|0); + $1837 = tempRet0; + $1838 = $1836 | $1834; + $1837 | $1835; + $1839 = $1838&255; + $1840 = ((($s)) + 23|0); + HEAP8[$1840>>0] = $1839; + $1841 = (_bitshift64Lshr(($1716|0),($1717|0),3)|0); + $1842 = tempRet0; + $1843 = $1841&255; + $1844 = ((($s)) + 24|0); + HEAP8[$1844>>0] = $1843; + $1845 = (_bitshift64Lshr(($1716|0),($1717|0),11)|0); + $1846 = tempRet0; + $1847 = $1845&255; + $1848 = ((($s)) + 25|0); + HEAP8[$1848>>0] = $1847; + $1849 = (_bitshift64Lshr(($1716|0),($1717|0),19)|0); + $1850 = tempRet0; + $1851 = (_bitshift64Shl(($1724|0),($1725|0),2)|0); + $1852 = tempRet0; + $1853 = $1851 | $1849; + $1852 | $1850; + $1854 = $1853&255; + $1855 = ((($s)) + 26|0); + HEAP8[$1855>>0] = $1854; + $1856 = (_bitshift64Lshr(($1724|0),($1725|0),6)|0); + $1857 = tempRet0; + $1858 = $1856&255; + $1859 = ((($s)) + 27|0); + HEAP8[$1859>>0] = $1858; + $1860 = (_bitshift64Lshr(($1724|0),($1725|0),14)|0); + $1861 = tempRet0; + $1862 = (_bitshift64Shl(($1720|0),($1721|0),7)|0); + $1863 = tempRet0; + $1864 = $1860 | $1862; + $1861 | $1863; + $1865 = $1864&255; + $1866 = ((($s)) + 28|0); + HEAP8[$1866>>0] = $1865; + $1867 = (_bitshift64Lshr(($1720|0),($1721|0),1)|0); + $1868 = tempRet0; + $1869 = $1867&255; + $1870 = ((($s)) + 29|0); + HEAP8[$1870>>0] = $1869; + $1871 = (_bitshift64Lshr(($1720|0),($1721|0),9)|0); + $1872 = tempRet0; + $1873 = $1871&255; + $1874 = ((($s)) + 30|0); + HEAP8[$1874>>0] = $1873; + $1875 = (_bitshift64Lshr(($1720|0),($1721|0),17)|0); + $1876 = tempRet0; + $1877 = $1875&255; + $1878 = ((($s)) + 31|0); + HEAP8[$1878>>0] = $1877; + return; +} +function _load_347($in) { + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP8[$in>>0]|0; + $1 = $0&255; + $2 = ((($in)) + 1|0); + $3 = HEAP8[$2>>0]|0; + $4 = $3&255; + $5 = (_bitshift64Shl(($4|0),0,8)|0); + $6 = tempRet0; + $7 = $5 | $1; + $8 = ((($in)) + 2|0); + $9 = HEAP8[$8>>0]|0; + $10 = $9&255; + $11 = (_bitshift64Shl(($10|0),0,16)|0); + $12 = tempRet0; + $13 = $7 | $11; + $14 = $6 | $12; + tempRet0 = ($14); + return ($13|0); +} +function _load_448($in) { + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + var $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP8[$in>>0]|0; + $1 = $0&255; + $2 = ((($in)) + 1|0); + $3 = HEAP8[$2>>0]|0; + $4 = $3&255; + $5 = (_bitshift64Shl(($4|0),0,8)|0); + $6 = tempRet0; + $7 = $5 | $1; + $8 = ((($in)) + 2|0); + $9 = HEAP8[$8>>0]|0; + $10 = $9&255; + $11 = (_bitshift64Shl(($10|0),0,16)|0); + $12 = tempRet0; + $13 = $7 | $11; + $14 = $6 | $12; + $15 = ((($in)) + 3|0); + $16 = HEAP8[$15>>0]|0; + $17 = $16&255; + $18 = (_bitshift64Shl(($17|0),0,24)|0); + $19 = tempRet0; + $20 = $13 | $18; + $21 = $14 | $19; + tempRet0 = ($21); + return ($20|0); +} +function _crypto_sign_ed25519_ref10_sc_reduce($s) { + $s = $s|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; + var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0; + var $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0; + var $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0; + var $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0; + var $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0; + var $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0; + var $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0; + var $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0; + var $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0; + var $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0; + var $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0; + var $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0; + var $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0; + var $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0; + var $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0; + var $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0; + var $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0; + var $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0; + var $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0; + var $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0; + var $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0; + var $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0; + var $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0; + var $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0; + var $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0; + var $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0; + var $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0; + var $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0; + var $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0; + var $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0; + var $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0; + var $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0; + var $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0; + var $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0; + var $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0; + var $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0; + var $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0; + var $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0; + var $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0; + var $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0; + var $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0; + var $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0; + var $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0; + var $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0; + var $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0; + var $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0; + var $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0; + var $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0; + var $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0; + var $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0; + var $997 = 0, $998 = 0, $999 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = (_load_351($s)|0); + $1 = tempRet0; + $2 = $0 & 2097151; + $3 = ((($s)) + 2|0); + $4 = (_load_452($3)|0); + $5 = tempRet0; + $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); + $7 = tempRet0; + $8 = $6 & 2097151; + $9 = ((($s)) + 5|0); + $10 = (_load_351($9)|0); + $11 = tempRet0; + $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); + $13 = tempRet0; + $14 = $12 & 2097151; + $15 = ((($s)) + 7|0); + $16 = (_load_452($15)|0); + $17 = tempRet0; + $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); + $19 = tempRet0; + $20 = $18 & 2097151; + $21 = ((($s)) + 10|0); + $22 = (_load_452($21)|0); + $23 = tempRet0; + $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); + $25 = tempRet0; + $26 = $24 & 2097151; + $27 = ((($s)) + 13|0); + $28 = (_load_351($27)|0); + $29 = tempRet0; + $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); + $31 = tempRet0; + $32 = $30 & 2097151; + $33 = ((($s)) + 15|0); + $34 = (_load_452($33)|0); + $35 = tempRet0; + $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); + $37 = tempRet0; + $38 = $36 & 2097151; + $39 = ((($s)) + 18|0); + $40 = (_load_351($39)|0); + $41 = tempRet0; + $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); + $43 = tempRet0; + $44 = $42 & 2097151; + $45 = ((($s)) + 21|0); + $46 = (_load_351($45)|0); + $47 = tempRet0; + $48 = $46 & 2097151; + $49 = ((($s)) + 23|0); + $50 = (_load_452($49)|0); + $51 = tempRet0; + $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); + $53 = tempRet0; + $54 = $52 & 2097151; + $55 = ((($s)) + 26|0); + $56 = (_load_351($55)|0); + $57 = tempRet0; + $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); + $59 = tempRet0; + $60 = $58 & 2097151; + $61 = ((($s)) + 28|0); + $62 = (_load_452($61)|0); + $63 = tempRet0; + $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); + $65 = tempRet0; + $66 = $64 & 2097151; + $67 = ((($s)) + 31|0); + $68 = (_load_452($67)|0); + $69 = tempRet0; + $70 = (_bitshift64Lshr(($68|0),($69|0),4)|0); + $71 = tempRet0; + $72 = $70 & 2097151; + $73 = ((($s)) + 34|0); + $74 = (_load_351($73)|0); + $75 = tempRet0; + $76 = (_bitshift64Lshr(($74|0),($75|0),1)|0); + $77 = tempRet0; + $78 = $76 & 2097151; + $79 = ((($s)) + 36|0); + $80 = (_load_452($79)|0); + $81 = tempRet0; + $82 = (_bitshift64Lshr(($80|0),($81|0),6)|0); + $83 = tempRet0; + $84 = $82 & 2097151; + $85 = ((($s)) + 39|0); + $86 = (_load_351($85)|0); + $87 = tempRet0; + $88 = (_bitshift64Lshr(($86|0),($87|0),3)|0); + $89 = tempRet0; + $90 = $88 & 2097151; + $91 = ((($s)) + 42|0); + $92 = (_load_351($91)|0); + $93 = tempRet0; + $94 = $92 & 2097151; + $95 = ((($s)) + 44|0); + $96 = (_load_452($95)|0); + $97 = tempRet0; + $98 = (_bitshift64Lshr(($96|0),($97|0),5)|0); + $99 = tempRet0; + $100 = $98 & 2097151; + $101 = ((($s)) + 47|0); + $102 = (_load_351($101)|0); + $103 = tempRet0; + $104 = (_bitshift64Lshr(($102|0),($103|0),2)|0); + $105 = tempRet0; + $106 = $104 & 2097151; + $107 = ((($s)) + 49|0); + $108 = (_load_452($107)|0); + $109 = tempRet0; + $110 = (_bitshift64Lshr(($108|0),($109|0),7)|0); + $111 = tempRet0; + $112 = $110 & 2097151; + $113 = ((($s)) + 52|0); + $114 = (_load_452($113)|0); + $115 = tempRet0; + $116 = (_bitshift64Lshr(($114|0),($115|0),4)|0); + $117 = tempRet0; + $118 = $116 & 2097151; + $119 = ((($s)) + 55|0); + $120 = (_load_351($119)|0); + $121 = tempRet0; + $122 = (_bitshift64Lshr(($120|0),($121|0),1)|0); + $123 = tempRet0; + $124 = $122 & 2097151; + $125 = ((($s)) + 57|0); + $126 = (_load_452($125)|0); + $127 = tempRet0; + $128 = (_bitshift64Lshr(($126|0),($127|0),6)|0); + $129 = tempRet0; + $130 = $128 & 2097151; + $131 = ((($s)) + 60|0); + $132 = (_load_452($131)|0); + $133 = tempRet0; + $134 = (_bitshift64Lshr(($132|0),($133|0),3)|0); + $135 = tempRet0; + $136 = (___muldi3(($134|0),($135|0),666643,0)|0); + $137 = tempRet0; + $138 = (_i64Add(($66|0),0,($136|0),($137|0))|0); + $139 = tempRet0; + $140 = (___muldi3(($134|0),($135|0),470296,0)|0); + $141 = tempRet0; + $142 = (_i64Add(($72|0),0,($140|0),($141|0))|0); + $143 = tempRet0; + $144 = (___muldi3(($134|0),($135|0),654183,0)|0); + $145 = tempRet0; + $146 = (_i64Add(($78|0),0,($144|0),($145|0))|0); + $147 = tempRet0; + $148 = (___muldi3(($134|0),($135|0),-997805,-1)|0); + $149 = tempRet0; + $150 = (_i64Add(($84|0),0,($148|0),($149|0))|0); + $151 = tempRet0; + $152 = (___muldi3(($134|0),($135|0),136657,0)|0); + $153 = tempRet0; + $154 = (_i64Add(($90|0),0,($152|0),($153|0))|0); + $155 = tempRet0; + $156 = (___muldi3(($134|0),($135|0),-683901,-1)|0); + $157 = tempRet0; + $158 = (_i64Add(($94|0),0,($156|0),($157|0))|0); + $159 = tempRet0; + $160 = (___muldi3(($130|0),0,666643,0)|0); + $161 = tempRet0; + $162 = (_i64Add(($60|0),0,($160|0),($161|0))|0); + $163 = tempRet0; + $164 = (___muldi3(($130|0),0,470296,0)|0); + $165 = tempRet0; + $166 = (_i64Add(($164|0),($165|0),($138|0),($139|0))|0); + $167 = tempRet0; + $168 = (___muldi3(($130|0),0,654183,0)|0); + $169 = tempRet0; + $170 = (_i64Add(($168|0),($169|0),($142|0),($143|0))|0); + $171 = tempRet0; + $172 = (___muldi3(($130|0),0,-997805,-1)|0); + $173 = tempRet0; + $174 = (_i64Add(($172|0),($173|0),($146|0),($147|0))|0); + $175 = tempRet0; + $176 = (___muldi3(($130|0),0,136657,0)|0); + $177 = tempRet0; + $178 = (_i64Add(($176|0),($177|0),($150|0),($151|0))|0); + $179 = tempRet0; + $180 = (___muldi3(($130|0),0,-683901,-1)|0); + $181 = tempRet0; + $182 = (_i64Add(($154|0),($155|0),($180|0),($181|0))|0); + $183 = tempRet0; + $184 = (___muldi3(($124|0),0,666643,0)|0); + $185 = tempRet0; + $186 = (_i64Add(($54|0),0,($184|0),($185|0))|0); + $187 = tempRet0; + $188 = (___muldi3(($124|0),0,470296,0)|0); + $189 = tempRet0; + $190 = (_i64Add(($188|0),($189|0),($162|0),($163|0))|0); + $191 = tempRet0; + $192 = (___muldi3(($124|0),0,654183,0)|0); + $193 = tempRet0; + $194 = (_i64Add(($192|0),($193|0),($166|0),($167|0))|0); + $195 = tempRet0; + $196 = (___muldi3(($124|0),0,-997805,-1)|0); + $197 = tempRet0; + $198 = (_i64Add(($196|0),($197|0),($170|0),($171|0))|0); + $199 = tempRet0; + $200 = (___muldi3(($124|0),0,136657,0)|0); + $201 = tempRet0; + $202 = (_i64Add(($200|0),($201|0),($174|0),($175|0))|0); + $203 = tempRet0; + $204 = (___muldi3(($124|0),0,-683901,-1)|0); + $205 = tempRet0; + $206 = (_i64Add(($178|0),($179|0),($204|0),($205|0))|0); + $207 = tempRet0; + $208 = (___muldi3(($118|0),0,666643,0)|0); + $209 = tempRet0; + $210 = (___muldi3(($118|0),0,470296,0)|0); + $211 = tempRet0; + $212 = (_i64Add(($210|0),($211|0),($186|0),($187|0))|0); + $213 = tempRet0; + $214 = (___muldi3(($118|0),0,654183,0)|0); + $215 = tempRet0; + $216 = (_i64Add(($214|0),($215|0),($190|0),($191|0))|0); + $217 = tempRet0; + $218 = (___muldi3(($118|0),0,-997805,-1)|0); + $219 = tempRet0; + $220 = (_i64Add(($218|0),($219|0),($194|0),($195|0))|0); + $221 = tempRet0; + $222 = (___muldi3(($118|0),0,136657,0)|0); + $223 = tempRet0; + $224 = (_i64Add(($222|0),($223|0),($198|0),($199|0))|0); + $225 = tempRet0; + $226 = (___muldi3(($118|0),0,-683901,-1)|0); + $227 = tempRet0; + $228 = (_i64Add(($202|0),($203|0),($226|0),($227|0))|0); + $229 = tempRet0; + $230 = (___muldi3(($112|0),0,666643,0)|0); + $231 = tempRet0; + $232 = (___muldi3(($112|0),0,470296,0)|0); + $233 = tempRet0; + $234 = (___muldi3(($112|0),0,654183,0)|0); + $235 = tempRet0; + $236 = (_i64Add(($234|0),($235|0),($212|0),($213|0))|0); + $237 = tempRet0; + $238 = (___muldi3(($112|0),0,-997805,-1)|0); + $239 = tempRet0; + $240 = (_i64Add(($216|0),($217|0),($238|0),($239|0))|0); + $241 = tempRet0; + $242 = (___muldi3(($112|0),0,136657,0)|0); + $243 = tempRet0; + $244 = (_i64Add(($242|0),($243|0),($220|0),($221|0))|0); + $245 = tempRet0; + $246 = (___muldi3(($112|0),0,-683901,-1)|0); + $247 = tempRet0; + $248 = (_i64Add(($224|0),($225|0),($246|0),($247|0))|0); + $249 = tempRet0; + $250 = (___muldi3(($106|0),0,666643,0)|0); + $251 = tempRet0; + $252 = (_i64Add(($250|0),($251|0),($38|0),0)|0); + $253 = tempRet0; + $254 = (___muldi3(($106|0),0,470296,0)|0); + $255 = tempRet0; + $256 = (___muldi3(($106|0),0,654183,0)|0); + $257 = tempRet0; + $258 = (_i64Add(($256|0),($257|0),($48|0),0)|0); + $259 = tempRet0; + $260 = (_i64Add(($258|0),($259|0),($232|0),($233|0))|0); + $261 = tempRet0; + $262 = (_i64Add(($260|0),($261|0),($208|0),($209|0))|0); + $263 = tempRet0; + $264 = (___muldi3(($106|0),0,-997805,-1)|0); + $265 = tempRet0; + $266 = (_i64Add(($236|0),($237|0),($264|0),($265|0))|0); + $267 = tempRet0; + $268 = (___muldi3(($106|0),0,136657,0)|0); + $269 = tempRet0; + $270 = (_i64Add(($240|0),($241|0),($268|0),($269|0))|0); + $271 = tempRet0; + $272 = (___muldi3(($106|0),0,-683901,-1)|0); + $273 = tempRet0; + $274 = (_i64Add(($244|0),($245|0),($272|0),($273|0))|0); + $275 = tempRet0; + $276 = (_i64Add(($252|0),($253|0),1048576,0)|0); + $277 = tempRet0; + $278 = (_bitshift64Lshr(($276|0),($277|0),21)|0); + $279 = tempRet0; + $280 = (_i64Add(($254|0),($255|0),($44|0),0)|0); + $281 = tempRet0; + $282 = (_i64Add(($280|0),($281|0),($230|0),($231|0))|0); + $283 = tempRet0; + $284 = (_i64Add(($282|0),($283|0),($278|0),($279|0))|0); + $285 = tempRet0; + $286 = (_bitshift64Shl(($278|0),($279|0),21)|0); + $287 = tempRet0; + $288 = (_i64Subtract(($252|0),($253|0),($286|0),($287|0))|0); + $289 = tempRet0; + $290 = (_i64Add(($262|0),($263|0),1048576,0)|0); + $291 = tempRet0; + $292 = (_bitshift64Lshr(($290|0),($291|0),21)|0); + $293 = tempRet0; + $294 = (_i64Add(($266|0),($267|0),($292|0),($293|0))|0); + $295 = tempRet0; + $296 = (_bitshift64Shl(($292|0),($293|0),21)|0); + $297 = tempRet0; + $298 = (_i64Subtract(($262|0),($263|0),($296|0),($297|0))|0); + $299 = tempRet0; + $300 = (_i64Add(($270|0),($271|0),1048576,0)|0); + $301 = tempRet0; + $302 = (_bitshift64Ashr(($300|0),($301|0),21)|0); + $303 = tempRet0; + $304 = (_i64Add(($302|0),($303|0),($274|0),($275|0))|0); + $305 = tempRet0; + $306 = (_bitshift64Shl(($302|0),($303|0),21)|0); + $307 = tempRet0; + $308 = (_i64Subtract(($270|0),($271|0),($306|0),($307|0))|0); + $309 = tempRet0; + $310 = (_i64Add(($248|0),($249|0),1048576,0)|0); + $311 = tempRet0; + $312 = (_bitshift64Ashr(($310|0),($311|0),21)|0); + $313 = tempRet0; + $314 = (_i64Add(($312|0),($313|0),($228|0),($229|0))|0); + $315 = tempRet0; + $316 = (_bitshift64Shl(($312|0),($313|0),21)|0); + $317 = tempRet0; + $318 = (_i64Subtract(($248|0),($249|0),($316|0),($317|0))|0); + $319 = tempRet0; + $320 = (_i64Add(($206|0),($207|0),1048576,0)|0); + $321 = tempRet0; + $322 = (_bitshift64Ashr(($320|0),($321|0),21)|0); + $323 = tempRet0; + $324 = (_i64Add(($322|0),($323|0),($182|0),($183|0))|0); + $325 = tempRet0; + $326 = (_bitshift64Shl(($322|0),($323|0),21)|0); + $327 = tempRet0; + $328 = (_i64Subtract(($206|0),($207|0),($326|0),($327|0))|0); + $329 = tempRet0; + $330 = (_i64Add(($158|0),($159|0),1048576,0)|0); + $331 = tempRet0; + $332 = (_bitshift64Ashr(($330|0),($331|0),21)|0); + $333 = tempRet0; + $334 = (_i64Add(($332|0),($333|0),($100|0),0)|0); + $335 = tempRet0; + $336 = (_bitshift64Shl(($332|0),($333|0),21)|0); + $337 = tempRet0; + $338 = (_i64Subtract(($158|0),($159|0),($336|0),($337|0))|0); + $339 = tempRet0; + $340 = (_i64Add(($284|0),($285|0),1048576,0)|0); + $341 = tempRet0; + $342 = (_bitshift64Lshr(($340|0),($341|0),21)|0); + $343 = tempRet0; + $344 = (_i64Add(($342|0),($343|0),($298|0),($299|0))|0); + $345 = tempRet0; + $346 = (_bitshift64Shl(($342|0),($343|0),21)|0); + $347 = tempRet0; + $348 = (_i64Subtract(($284|0),($285|0),($346|0),($347|0))|0); + $349 = tempRet0; + $350 = (_i64Add(($294|0),($295|0),1048576,0)|0); + $351 = tempRet0; + $352 = (_bitshift64Ashr(($350|0),($351|0),21)|0); + $353 = tempRet0; + $354 = (_i64Add(($352|0),($353|0),($308|0),($309|0))|0); + $355 = tempRet0; + $356 = (_bitshift64Shl(($352|0),($353|0),21)|0); + $357 = tempRet0; + $358 = (_i64Subtract(($294|0),($295|0),($356|0),($357|0))|0); + $359 = tempRet0; + $360 = (_i64Add(($304|0),($305|0),1048576,0)|0); + $361 = tempRet0; + $362 = (_bitshift64Ashr(($360|0),($361|0),21)|0); + $363 = tempRet0; + $364 = (_i64Add(($362|0),($363|0),($318|0),($319|0))|0); + $365 = tempRet0; + $366 = (_bitshift64Shl(($362|0),($363|0),21)|0); + $367 = tempRet0; + $368 = (_i64Subtract(($304|0),($305|0),($366|0),($367|0))|0); + $369 = tempRet0; + $370 = (_i64Add(($314|0),($315|0),1048576,0)|0); + $371 = tempRet0; + $372 = (_bitshift64Ashr(($370|0),($371|0),21)|0); + $373 = tempRet0; + $374 = (_i64Add(($372|0),($373|0),($328|0),($329|0))|0); + $375 = tempRet0; + $376 = (_bitshift64Shl(($372|0),($373|0),21)|0); + $377 = tempRet0; + $378 = (_i64Subtract(($314|0),($315|0),($376|0),($377|0))|0); + $379 = tempRet0; + $380 = (_i64Add(($324|0),($325|0),1048576,0)|0); + $381 = tempRet0; + $382 = (_bitshift64Ashr(($380|0),($381|0),21)|0); + $383 = tempRet0; + $384 = (_i64Add(($382|0),($383|0),($338|0),($339|0))|0); + $385 = tempRet0; + $386 = (_bitshift64Shl(($382|0),($383|0),21)|0); + $387 = tempRet0; + $388 = (_i64Subtract(($324|0),($325|0),($386|0),($387|0))|0); + $389 = tempRet0; + $390 = (___muldi3(($334|0),($335|0),666643,0)|0); + $391 = tempRet0; + $392 = (_i64Add(($32|0),0,($390|0),($391|0))|0); + $393 = tempRet0; + $394 = (___muldi3(($334|0),($335|0),470296,0)|0); + $395 = tempRet0; + $396 = (_i64Add(($288|0),($289|0),($394|0),($395|0))|0); + $397 = tempRet0; + $398 = (___muldi3(($334|0),($335|0),654183,0)|0); + $399 = tempRet0; + $400 = (_i64Add(($348|0),($349|0),($398|0),($399|0))|0); + $401 = tempRet0; + $402 = (___muldi3(($334|0),($335|0),-997805,-1)|0); + $403 = tempRet0; + $404 = (_i64Add(($402|0),($403|0),($344|0),($345|0))|0); + $405 = tempRet0; + $406 = (___muldi3(($334|0),($335|0),136657,0)|0); + $407 = tempRet0; + $408 = (_i64Add(($406|0),($407|0),($358|0),($359|0))|0); + $409 = tempRet0; + $410 = (___muldi3(($334|0),($335|0),-683901,-1)|0); + $411 = tempRet0; + $412 = (_i64Add(($354|0),($355|0),($410|0),($411|0))|0); + $413 = tempRet0; + $414 = (___muldi3(($384|0),($385|0),666643,0)|0); + $415 = tempRet0; + $416 = (_i64Add(($26|0),0,($414|0),($415|0))|0); + $417 = tempRet0; + $418 = (___muldi3(($384|0),($385|0),470296,0)|0); + $419 = tempRet0; + $420 = (_i64Add(($392|0),($393|0),($418|0),($419|0))|0); + $421 = tempRet0; + $422 = (___muldi3(($384|0),($385|0),654183,0)|0); + $423 = tempRet0; + $424 = (_i64Add(($396|0),($397|0),($422|0),($423|0))|0); + $425 = tempRet0; + $426 = (___muldi3(($384|0),($385|0),-997805,-1)|0); + $427 = tempRet0; + $428 = (_i64Add(($400|0),($401|0),($426|0),($427|0))|0); + $429 = tempRet0; + $430 = (___muldi3(($384|0),($385|0),136657,0)|0); + $431 = tempRet0; + $432 = (_i64Add(($404|0),($405|0),($430|0),($431|0))|0); + $433 = tempRet0; + $434 = (___muldi3(($384|0),($385|0),-683901,-1)|0); + $435 = tempRet0; + $436 = (_i64Add(($408|0),($409|0),($434|0),($435|0))|0); + $437 = tempRet0; + $438 = (___muldi3(($388|0),($389|0),666643,0)|0); + $439 = tempRet0; + $440 = (_i64Add(($20|0),0,($438|0),($439|0))|0); + $441 = tempRet0; + $442 = (___muldi3(($388|0),($389|0),470296,0)|0); + $443 = tempRet0; + $444 = (_i64Add(($416|0),($417|0),($442|0),($443|0))|0); + $445 = tempRet0; + $446 = (___muldi3(($388|0),($389|0),654183,0)|0); + $447 = tempRet0; + $448 = (_i64Add(($420|0),($421|0),($446|0),($447|0))|0); + $449 = tempRet0; + $450 = (___muldi3(($388|0),($389|0),-997805,-1)|0); + $451 = tempRet0; + $452 = (_i64Add(($424|0),($425|0),($450|0),($451|0))|0); + $453 = tempRet0; + $454 = (___muldi3(($388|0),($389|0),136657,0)|0); + $455 = tempRet0; + $456 = (_i64Add(($428|0),($429|0),($454|0),($455|0))|0); + $457 = tempRet0; + $458 = (___muldi3(($388|0),($389|0),-683901,-1)|0); + $459 = tempRet0; + $460 = (_i64Add(($432|0),($433|0),($458|0),($459|0))|0); + $461 = tempRet0; + $462 = (___muldi3(($374|0),($375|0),666643,0)|0); + $463 = tempRet0; + $464 = (_i64Add(($462|0),($463|0),($14|0),0)|0); + $465 = tempRet0; + $466 = (___muldi3(($374|0),($375|0),470296,0)|0); + $467 = tempRet0; + $468 = (_i64Add(($440|0),($441|0),($466|0),($467|0))|0); + $469 = tempRet0; + $470 = (___muldi3(($374|0),($375|0),654183,0)|0); + $471 = tempRet0; + $472 = (_i64Add(($444|0),($445|0),($470|0),($471|0))|0); + $473 = tempRet0; + $474 = (___muldi3(($374|0),($375|0),-997805,-1)|0); + $475 = tempRet0; + $476 = (_i64Add(($448|0),($449|0),($474|0),($475|0))|0); + $477 = tempRet0; + $478 = (___muldi3(($374|0),($375|0),136657,0)|0); + $479 = tempRet0; + $480 = (_i64Add(($452|0),($453|0),($478|0),($479|0))|0); + $481 = tempRet0; + $482 = (___muldi3(($374|0),($375|0),-683901,-1)|0); + $483 = tempRet0; + $484 = (_i64Add(($456|0),($457|0),($482|0),($483|0))|0); + $485 = tempRet0; + $486 = (___muldi3(($378|0),($379|0),666643,0)|0); + $487 = tempRet0; + $488 = (___muldi3(($378|0),($379|0),470296,0)|0); + $489 = tempRet0; + $490 = (___muldi3(($378|0),($379|0),654183,0)|0); + $491 = tempRet0; + $492 = (_i64Add(($468|0),($469|0),($490|0),($491|0))|0); + $493 = tempRet0; + $494 = (___muldi3(($378|0),($379|0),-997805,-1)|0); + $495 = tempRet0; + $496 = (_i64Add(($472|0),($473|0),($494|0),($495|0))|0); + $497 = tempRet0; + $498 = (___muldi3(($378|0),($379|0),136657,0)|0); + $499 = tempRet0; + $500 = (_i64Add(($476|0),($477|0),($498|0),($499|0))|0); + $501 = tempRet0; + $502 = (___muldi3(($378|0),($379|0),-683901,-1)|0); + $503 = tempRet0; + $504 = (_i64Add(($480|0),($481|0),($502|0),($503|0))|0); + $505 = tempRet0; + $506 = (___muldi3(($364|0),($365|0),666643,0)|0); + $507 = tempRet0; + $508 = (_i64Add(($506|0),($507|0),($2|0),0)|0); + $509 = tempRet0; + $510 = (___muldi3(($364|0),($365|0),470296,0)|0); + $511 = tempRet0; + $512 = (___muldi3(($364|0),($365|0),654183,0)|0); + $513 = tempRet0; + $514 = (_i64Add(($464|0),($465|0),($512|0),($513|0))|0); + $515 = tempRet0; + $516 = (_i64Add(($514|0),($515|0),($488|0),($489|0))|0); + $517 = tempRet0; + $518 = (___muldi3(($364|0),($365|0),-997805,-1)|0); + $519 = tempRet0; + $520 = (_i64Add(($492|0),($493|0),($518|0),($519|0))|0); + $521 = tempRet0; + $522 = (___muldi3(($364|0),($365|0),136657,0)|0); + $523 = tempRet0; + $524 = (_i64Add(($496|0),($497|0),($522|0),($523|0))|0); + $525 = tempRet0; + $526 = (___muldi3(($364|0),($365|0),-683901,-1)|0); + $527 = tempRet0; + $528 = (_i64Add(($500|0),($501|0),($526|0),($527|0))|0); + $529 = tempRet0; + $530 = (_i64Add(($508|0),($509|0),1048576,0)|0); + $531 = tempRet0; + $532 = (_bitshift64Ashr(($530|0),($531|0),21)|0); + $533 = tempRet0; + $534 = (_i64Add(($510|0),($511|0),($8|0),0)|0); + $535 = tempRet0; + $536 = (_i64Add(($534|0),($535|0),($486|0),($487|0))|0); + $537 = tempRet0; + $538 = (_i64Add(($536|0),($537|0),($532|0),($533|0))|0); + $539 = tempRet0; + $540 = (_bitshift64Shl(($532|0),($533|0),21)|0); + $541 = tempRet0; + $542 = (_i64Subtract(($508|0),($509|0),($540|0),($541|0))|0); + $543 = tempRet0; + $544 = (_i64Add(($516|0),($517|0),1048576,0)|0); + $545 = tempRet0; + $546 = (_bitshift64Ashr(($544|0),($545|0),21)|0); + $547 = tempRet0; + $548 = (_i64Add(($546|0),($547|0),($520|0),($521|0))|0); + $549 = tempRet0; + $550 = (_bitshift64Shl(($546|0),($547|0),21)|0); + $551 = tempRet0; + $552 = (_i64Add(($524|0),($525|0),1048576,0)|0); + $553 = tempRet0; + $554 = (_bitshift64Ashr(($552|0),($553|0),21)|0); + $555 = tempRet0; + $556 = (_i64Add(($554|0),($555|0),($528|0),($529|0))|0); + $557 = tempRet0; + $558 = (_bitshift64Shl(($554|0),($555|0),21)|0); + $559 = tempRet0; + $560 = (_i64Add(($504|0),($505|0),1048576,0)|0); + $561 = tempRet0; + $562 = (_bitshift64Ashr(($560|0),($561|0),21)|0); + $563 = tempRet0; + $564 = (_i64Add(($562|0),($563|0),($484|0),($485|0))|0); + $565 = tempRet0; + $566 = (_bitshift64Shl(($562|0),($563|0),21)|0); + $567 = tempRet0; + $568 = (_i64Subtract(($504|0),($505|0),($566|0),($567|0))|0); + $569 = tempRet0; + $570 = (_i64Add(($460|0),($461|0),1048576,0)|0); + $571 = tempRet0; + $572 = (_bitshift64Ashr(($570|0),($571|0),21)|0); + $573 = tempRet0; + $574 = (_i64Add(($572|0),($573|0),($436|0),($437|0))|0); + $575 = tempRet0; + $576 = (_bitshift64Shl(($572|0),($573|0),21)|0); + $577 = tempRet0; + $578 = (_i64Subtract(($460|0),($461|0),($576|0),($577|0))|0); + $579 = tempRet0; + $580 = (_i64Add(($412|0),($413|0),1048576,0)|0); + $581 = tempRet0; + $582 = (_bitshift64Ashr(($580|0),($581|0),21)|0); + $583 = tempRet0; + $584 = (_i64Add(($582|0),($583|0),($368|0),($369|0))|0); + $585 = tempRet0; + $586 = (_bitshift64Shl(($582|0),($583|0),21)|0); + $587 = tempRet0; + $588 = (_i64Subtract(($412|0),($413|0),($586|0),($587|0))|0); + $589 = tempRet0; + $590 = (_i64Add(($538|0),($539|0),1048576,0)|0); + $591 = tempRet0; + $592 = (_bitshift64Ashr(($590|0),($591|0),21)|0); + $593 = tempRet0; + $594 = (_bitshift64Shl(($592|0),($593|0),21)|0); + $595 = tempRet0; + $596 = (_i64Add(($548|0),($549|0),1048576,0)|0); + $597 = tempRet0; + $598 = (_bitshift64Ashr(($596|0),($597|0),21)|0); + $599 = tempRet0; + $600 = (_bitshift64Shl(($598|0),($599|0),21)|0); + $601 = tempRet0; + $602 = (_i64Subtract(($548|0),($549|0),($600|0),($601|0))|0); + $603 = tempRet0; + $604 = (_i64Add(($556|0),($557|0),1048576,0)|0); + $605 = tempRet0; + $606 = (_bitshift64Ashr(($604|0),($605|0),21)|0); + $607 = tempRet0; + $608 = (_i64Add(($568|0),($569|0),($606|0),($607|0))|0); + $609 = tempRet0; + $610 = (_bitshift64Shl(($606|0),($607|0),21)|0); + $611 = tempRet0; + $612 = (_i64Subtract(($556|0),($557|0),($610|0),($611|0))|0); + $613 = tempRet0; + $614 = (_i64Add(($564|0),($565|0),1048576,0)|0); + $615 = tempRet0; + $616 = (_bitshift64Ashr(($614|0),($615|0),21)|0); + $617 = tempRet0; + $618 = (_i64Add(($578|0),($579|0),($616|0),($617|0))|0); + $619 = tempRet0; + $620 = (_bitshift64Shl(($616|0),($617|0),21)|0); + $621 = tempRet0; + $622 = (_i64Subtract(($564|0),($565|0),($620|0),($621|0))|0); + $623 = tempRet0; + $624 = (_i64Add(($574|0),($575|0),1048576,0)|0); + $625 = tempRet0; + $626 = (_bitshift64Ashr(($624|0),($625|0),21)|0); + $627 = tempRet0; + $628 = (_i64Add(($588|0),($589|0),($626|0),($627|0))|0); + $629 = tempRet0; + $630 = (_bitshift64Shl(($626|0),($627|0),21)|0); + $631 = tempRet0; + $632 = (_i64Subtract(($574|0),($575|0),($630|0),($631|0))|0); + $633 = tempRet0; + $634 = (_i64Add(($584|0),($585|0),1048576,0)|0); + $635 = tempRet0; + $636 = (_bitshift64Ashr(($634|0),($635|0),21)|0); + $637 = tempRet0; + $638 = (_bitshift64Shl(($636|0),($637|0),21)|0); + $639 = tempRet0; + $640 = (_i64Subtract(($584|0),($585|0),($638|0),($639|0))|0); + $641 = tempRet0; + $642 = (___muldi3(($636|0),($637|0),666643,0)|0); + $643 = tempRet0; + $644 = (_i64Add(($542|0),($543|0),($642|0),($643|0))|0); + $645 = tempRet0; + $646 = (___muldi3(($636|0),($637|0),470296,0)|0); + $647 = tempRet0; + $648 = (___muldi3(($636|0),($637|0),654183,0)|0); + $649 = tempRet0; + $650 = (___muldi3(($636|0),($637|0),-997805,-1)|0); + $651 = tempRet0; + $652 = (_i64Add(($602|0),($603|0),($650|0),($651|0))|0); + $653 = tempRet0; + $654 = (___muldi3(($636|0),($637|0),136657,0)|0); + $655 = tempRet0; + $656 = (___muldi3(($636|0),($637|0),-683901,-1)|0); + $657 = tempRet0; + $658 = (_i64Add(($612|0),($613|0),($656|0),($657|0))|0); + $659 = tempRet0; + $660 = (_bitshift64Ashr(($644|0),($645|0),21)|0); + $661 = tempRet0; + $662 = (_i64Add(($646|0),($647|0),($538|0),($539|0))|0); + $663 = tempRet0; + $664 = (_i64Subtract(($662|0),($663|0),($594|0),($595|0))|0); + $665 = tempRet0; + $666 = (_i64Add(($664|0),($665|0),($660|0),($661|0))|0); + $667 = tempRet0; + $668 = (_bitshift64Shl(($660|0),($661|0),21)|0); + $669 = tempRet0; + $670 = (_i64Subtract(($644|0),($645|0),($668|0),($669|0))|0); + $671 = tempRet0; + $672 = (_bitshift64Ashr(($666|0),($667|0),21)|0); + $673 = tempRet0; + $674 = (_i64Add(($648|0),($649|0),($516|0),($517|0))|0); + $675 = tempRet0; + $676 = (_i64Subtract(($674|0),($675|0),($550|0),($551|0))|0); + $677 = tempRet0; + $678 = (_i64Add(($676|0),($677|0),($592|0),($593|0))|0); + $679 = tempRet0; + $680 = (_i64Add(($678|0),($679|0),($672|0),($673|0))|0); + $681 = tempRet0; + $682 = (_bitshift64Shl(($672|0),($673|0),21)|0); + $683 = tempRet0; + $684 = (_i64Subtract(($666|0),($667|0),($682|0),($683|0))|0); + $685 = tempRet0; + $686 = (_bitshift64Ashr(($680|0),($681|0),21)|0); + $687 = tempRet0; + $688 = (_i64Add(($686|0),($687|0),($652|0),($653|0))|0); + $689 = tempRet0; + $690 = (_bitshift64Shl(($686|0),($687|0),21)|0); + $691 = tempRet0; + $692 = (_i64Subtract(($680|0),($681|0),($690|0),($691|0))|0); + $693 = tempRet0; + $694 = (_bitshift64Ashr(($688|0),($689|0),21)|0); + $695 = tempRet0; + $696 = (_i64Add(($654|0),($655|0),($524|0),($525|0))|0); + $697 = tempRet0; + $698 = (_i64Subtract(($696|0),($697|0),($558|0),($559|0))|0); + $699 = tempRet0; + $700 = (_i64Add(($698|0),($699|0),($598|0),($599|0))|0); + $701 = tempRet0; + $702 = (_i64Add(($700|0),($701|0),($694|0),($695|0))|0); + $703 = tempRet0; + $704 = (_bitshift64Shl(($694|0),($695|0),21)|0); + $705 = tempRet0; + $706 = (_i64Subtract(($688|0),($689|0),($704|0),($705|0))|0); + $707 = tempRet0; + $708 = (_bitshift64Ashr(($702|0),($703|0),21)|0); + $709 = tempRet0; + $710 = (_i64Add(($708|0),($709|0),($658|0),($659|0))|0); + $711 = tempRet0; + $712 = (_bitshift64Shl(($708|0),($709|0),21)|0); + $713 = tempRet0; + $714 = (_i64Subtract(($702|0),($703|0),($712|0),($713|0))|0); + $715 = tempRet0; + $716 = (_bitshift64Ashr(($710|0),($711|0),21)|0); + $717 = tempRet0; + $718 = (_i64Add(($608|0),($609|0),($716|0),($717|0))|0); + $719 = tempRet0; + $720 = (_bitshift64Shl(($716|0),($717|0),21)|0); + $721 = tempRet0; + $722 = (_i64Subtract(($710|0),($711|0),($720|0),($721|0))|0); + $723 = tempRet0; + $724 = (_bitshift64Ashr(($718|0),($719|0),21)|0); + $725 = tempRet0; + $726 = (_i64Add(($724|0),($725|0),($622|0),($623|0))|0); + $727 = tempRet0; + $728 = (_bitshift64Shl(($724|0),($725|0),21)|0); + $729 = tempRet0; + $730 = (_i64Subtract(($718|0),($719|0),($728|0),($729|0))|0); + $731 = tempRet0; + $732 = (_bitshift64Ashr(($726|0),($727|0),21)|0); + $733 = tempRet0; + $734 = (_i64Add(($618|0),($619|0),($732|0),($733|0))|0); + $735 = tempRet0; + $736 = (_bitshift64Shl(($732|0),($733|0),21)|0); + $737 = tempRet0; + $738 = (_i64Subtract(($726|0),($727|0),($736|0),($737|0))|0); + $739 = tempRet0; + $740 = (_bitshift64Ashr(($734|0),($735|0),21)|0); + $741 = tempRet0; + $742 = (_i64Add(($740|0),($741|0),($632|0),($633|0))|0); + $743 = tempRet0; + $744 = (_bitshift64Shl(($740|0),($741|0),21)|0); + $745 = tempRet0; + $746 = (_i64Subtract(($734|0),($735|0),($744|0),($745|0))|0); + $747 = tempRet0; + $748 = (_bitshift64Ashr(($742|0),($743|0),21)|0); + $749 = tempRet0; + $750 = (_i64Add(($628|0),($629|0),($748|0),($749|0))|0); + $751 = tempRet0; + $752 = (_bitshift64Shl(($748|0),($749|0),21)|0); + $753 = tempRet0; + $754 = (_i64Subtract(($742|0),($743|0),($752|0),($753|0))|0); + $755 = tempRet0; + $756 = (_bitshift64Ashr(($750|0),($751|0),21)|0); + $757 = tempRet0; + $758 = (_i64Add(($756|0),($757|0),($640|0),($641|0))|0); + $759 = tempRet0; + $760 = (_bitshift64Shl(($756|0),($757|0),21)|0); + $761 = tempRet0; + $762 = (_i64Subtract(($750|0),($751|0),($760|0),($761|0))|0); + $763 = tempRet0; + $764 = (_bitshift64Ashr(($758|0),($759|0),21)|0); + $765 = tempRet0; + $766 = (_bitshift64Shl(($764|0),($765|0),21)|0); + $767 = tempRet0; + $768 = (_i64Subtract(($758|0),($759|0),($766|0),($767|0))|0); + $769 = tempRet0; + $770 = (___muldi3(($764|0),($765|0),666643,0)|0); + $771 = tempRet0; + $772 = (_i64Add(($770|0),($771|0),($670|0),($671|0))|0); + $773 = tempRet0; + $774 = (___muldi3(($764|0),($765|0),470296,0)|0); + $775 = tempRet0; + $776 = (_i64Add(($684|0),($685|0),($774|0),($775|0))|0); + $777 = tempRet0; + $778 = (___muldi3(($764|0),($765|0),654183,0)|0); + $779 = tempRet0; + $780 = (_i64Add(($692|0),($693|0),($778|0),($779|0))|0); + $781 = tempRet0; + $782 = (___muldi3(($764|0),($765|0),-997805,-1)|0); + $783 = tempRet0; + $784 = (_i64Add(($706|0),($707|0),($782|0),($783|0))|0); + $785 = tempRet0; + $786 = (___muldi3(($764|0),($765|0),136657,0)|0); + $787 = tempRet0; + $788 = (_i64Add(($714|0),($715|0),($786|0),($787|0))|0); + $789 = tempRet0; + $790 = (___muldi3(($764|0),($765|0),-683901,-1)|0); + $791 = tempRet0; + $792 = (_i64Add(($722|0),($723|0),($790|0),($791|0))|0); + $793 = tempRet0; + $794 = (_bitshift64Ashr(($772|0),($773|0),21)|0); + $795 = tempRet0; + $796 = (_i64Add(($776|0),($777|0),($794|0),($795|0))|0); + $797 = tempRet0; + $798 = (_bitshift64Shl(($794|0),($795|0),21)|0); + $799 = tempRet0; + $800 = (_i64Subtract(($772|0),($773|0),($798|0),($799|0))|0); + $801 = tempRet0; + $802 = (_bitshift64Ashr(($796|0),($797|0),21)|0); + $803 = tempRet0; + $804 = (_i64Add(($780|0),($781|0),($802|0),($803|0))|0); + $805 = tempRet0; + $806 = (_bitshift64Shl(($802|0),($803|0),21)|0); + $807 = tempRet0; + $808 = (_i64Subtract(($796|0),($797|0),($806|0),($807|0))|0); + $809 = tempRet0; + $810 = (_bitshift64Ashr(($804|0),($805|0),21)|0); + $811 = tempRet0; + $812 = (_i64Add(($810|0),($811|0),($784|0),($785|0))|0); + $813 = tempRet0; + $814 = (_bitshift64Shl(($810|0),($811|0),21)|0); + $815 = tempRet0; + $816 = (_i64Subtract(($804|0),($805|0),($814|0),($815|0))|0); + $817 = tempRet0; + $818 = (_bitshift64Ashr(($812|0),($813|0),21)|0); + $819 = tempRet0; + $820 = (_i64Add(($788|0),($789|0),($818|0),($819|0))|0); + $821 = tempRet0; + $822 = (_bitshift64Shl(($818|0),($819|0),21)|0); + $823 = tempRet0; + $824 = (_i64Subtract(($812|0),($813|0),($822|0),($823|0))|0); + $825 = tempRet0; + $826 = (_bitshift64Ashr(($820|0),($821|0),21)|0); + $827 = tempRet0; + $828 = (_i64Add(($826|0),($827|0),($792|0),($793|0))|0); + $829 = tempRet0; + $830 = (_bitshift64Shl(($826|0),($827|0),21)|0); + $831 = tempRet0; + $832 = (_i64Subtract(($820|0),($821|0),($830|0),($831|0))|0); + $833 = tempRet0; + $834 = (_bitshift64Ashr(($828|0),($829|0),21)|0); + $835 = tempRet0; + $836 = (_i64Add(($834|0),($835|0),($730|0),($731|0))|0); + $837 = tempRet0; + $838 = (_bitshift64Shl(($834|0),($835|0),21)|0); + $839 = tempRet0; + $840 = (_i64Subtract(($828|0),($829|0),($838|0),($839|0))|0); + $841 = tempRet0; + $842 = (_bitshift64Ashr(($836|0),($837|0),21)|0); + $843 = tempRet0; + $844 = (_i64Add(($842|0),($843|0),($738|0),($739|0))|0); + $845 = tempRet0; + $846 = (_bitshift64Shl(($842|0),($843|0),21)|0); + $847 = tempRet0; + $848 = (_i64Subtract(($836|0),($837|0),($846|0),($847|0))|0); + $849 = tempRet0; + $850 = (_bitshift64Ashr(($844|0),($845|0),21)|0); + $851 = tempRet0; + $852 = (_i64Add(($850|0),($851|0),($746|0),($747|0))|0); + $853 = tempRet0; + $854 = (_bitshift64Shl(($850|0),($851|0),21)|0); + $855 = tempRet0; + $856 = (_i64Subtract(($844|0),($845|0),($854|0),($855|0))|0); + $857 = tempRet0; + $858 = (_bitshift64Ashr(($852|0),($853|0),21)|0); + $859 = tempRet0; + $860 = (_i64Add(($858|0),($859|0),($754|0),($755|0))|0); + $861 = tempRet0; + $862 = (_bitshift64Shl(($858|0),($859|0),21)|0); + $863 = tempRet0; + $864 = (_i64Subtract(($852|0),($853|0),($862|0),($863|0))|0); + $865 = tempRet0; + $866 = (_bitshift64Ashr(($860|0),($861|0),21)|0); + $867 = tempRet0; + $868 = (_i64Add(($866|0),($867|0),($762|0),($763|0))|0); + $869 = tempRet0; + $870 = (_bitshift64Shl(($866|0),($867|0),21)|0); + $871 = tempRet0; + $872 = (_i64Subtract(($860|0),($861|0),($870|0),($871|0))|0); + $873 = tempRet0; + $874 = (_bitshift64Ashr(($868|0),($869|0),21)|0); + $875 = tempRet0; + $876 = (_i64Add(($874|0),($875|0),($768|0),($769|0))|0); + $877 = tempRet0; + $878 = (_bitshift64Shl(($874|0),($875|0),21)|0); + $879 = tempRet0; + $880 = (_i64Subtract(($868|0),($869|0),($878|0),($879|0))|0); + $881 = tempRet0; + $882 = $800&255; + HEAP8[$s>>0] = $882; + $883 = (_bitshift64Lshr(($800|0),($801|0),8)|0); + $884 = tempRet0; + $885 = $883&255; + $886 = ((($s)) + 1|0); + HEAP8[$886>>0] = $885; + $887 = (_bitshift64Lshr(($800|0),($801|0),16)|0); + $888 = tempRet0; + $889 = (_bitshift64Shl(($808|0),($809|0),5)|0); + $890 = tempRet0; + $891 = $889 | $887; + $890 | $888; + $892 = $891&255; + HEAP8[$3>>0] = $892; + $893 = (_bitshift64Lshr(($808|0),($809|0),3)|0); + $894 = tempRet0; + $895 = $893&255; + $896 = ((($s)) + 3|0); + HEAP8[$896>>0] = $895; + $897 = (_bitshift64Lshr(($808|0),($809|0),11)|0); + $898 = tempRet0; + $899 = $897&255; + $900 = ((($s)) + 4|0); + HEAP8[$900>>0] = $899; + $901 = (_bitshift64Lshr(($808|0),($809|0),19)|0); + $902 = tempRet0; + $903 = (_bitshift64Shl(($816|0),($817|0),2)|0); + $904 = tempRet0; + $905 = $903 | $901; + $904 | $902; + $906 = $905&255; + HEAP8[$9>>0] = $906; + $907 = (_bitshift64Lshr(($816|0),($817|0),6)|0); + $908 = tempRet0; + $909 = $907&255; + $910 = ((($s)) + 6|0); + HEAP8[$910>>0] = $909; + $911 = (_bitshift64Lshr(($816|0),($817|0),14)|0); + $912 = tempRet0; + $913 = (_bitshift64Shl(($824|0),($825|0),7)|0); + $914 = tempRet0; + $915 = $913 | $911; + $914 | $912; + $916 = $915&255; + HEAP8[$15>>0] = $916; + $917 = (_bitshift64Lshr(($824|0),($825|0),1)|0); + $918 = tempRet0; + $919 = $917&255; + $920 = ((($s)) + 8|0); + HEAP8[$920>>0] = $919; + $921 = (_bitshift64Lshr(($824|0),($825|0),9)|0); + $922 = tempRet0; + $923 = $921&255; + $924 = ((($s)) + 9|0); + HEAP8[$924>>0] = $923; + $925 = (_bitshift64Lshr(($824|0),($825|0),17)|0); + $926 = tempRet0; + $927 = (_bitshift64Shl(($832|0),($833|0),4)|0); + $928 = tempRet0; + $929 = $927 | $925; + $928 | $926; + $930 = $929&255; + HEAP8[$21>>0] = $930; + $931 = (_bitshift64Lshr(($832|0),($833|0),4)|0); + $932 = tempRet0; + $933 = $931&255; + $934 = ((($s)) + 11|0); + HEAP8[$934>>0] = $933; + $935 = (_bitshift64Lshr(($832|0),($833|0),12)|0); + $936 = tempRet0; + $937 = $935&255; + $938 = ((($s)) + 12|0); + HEAP8[$938>>0] = $937; + $939 = (_bitshift64Lshr(($832|0),($833|0),20)|0); + $940 = tempRet0; + $941 = (_bitshift64Shl(($840|0),($841|0),1)|0); + $942 = tempRet0; + $943 = $941 | $939; + $942 | $940; + $944 = $943&255; + HEAP8[$27>>0] = $944; + $945 = (_bitshift64Lshr(($840|0),($841|0),7)|0); + $946 = tempRet0; + $947 = $945&255; + $948 = ((($s)) + 14|0); + HEAP8[$948>>0] = $947; + $949 = (_bitshift64Lshr(($840|0),($841|0),15)|0); + $950 = tempRet0; + $951 = (_bitshift64Shl(($848|0),($849|0),6)|0); + $952 = tempRet0; + $953 = $951 | $949; + $952 | $950; + $954 = $953&255; + HEAP8[$33>>0] = $954; + $955 = (_bitshift64Lshr(($848|0),($849|0),2)|0); + $956 = tempRet0; + $957 = $955&255; + $958 = ((($s)) + 16|0); + HEAP8[$958>>0] = $957; + $959 = (_bitshift64Lshr(($848|0),($849|0),10)|0); + $960 = tempRet0; + $961 = $959&255; + $962 = ((($s)) + 17|0); + HEAP8[$962>>0] = $961; + $963 = (_bitshift64Lshr(($848|0),($849|0),18)|0); + $964 = tempRet0; + $965 = (_bitshift64Shl(($856|0),($857|0),3)|0); + $966 = tempRet0; + $967 = $965 | $963; + $966 | $964; + $968 = $967&255; + HEAP8[$39>>0] = $968; + $969 = (_bitshift64Lshr(($856|0),($857|0),5)|0); + $970 = tempRet0; + $971 = $969&255; + $972 = ((($s)) + 19|0); + HEAP8[$972>>0] = $971; + $973 = (_bitshift64Lshr(($856|0),($857|0),13)|0); + $974 = tempRet0; + $975 = $973&255; + $976 = ((($s)) + 20|0); + HEAP8[$976>>0] = $975; + $977 = $864&255; + HEAP8[$45>>0] = $977; + $978 = (_bitshift64Lshr(($864|0),($865|0),8)|0); + $979 = tempRet0; + $980 = $978&255; + $981 = ((($s)) + 22|0); + HEAP8[$981>>0] = $980; + $982 = (_bitshift64Lshr(($864|0),($865|0),16)|0); + $983 = tempRet0; + $984 = (_bitshift64Shl(($872|0),($873|0),5)|0); + $985 = tempRet0; + $986 = $984 | $982; + $985 | $983; + $987 = $986&255; + HEAP8[$49>>0] = $987; + $988 = (_bitshift64Lshr(($872|0),($873|0),3)|0); + $989 = tempRet0; + $990 = $988&255; + $991 = ((($s)) + 24|0); + HEAP8[$991>>0] = $990; + $992 = (_bitshift64Lshr(($872|0),($873|0),11)|0); + $993 = tempRet0; + $994 = $992&255; + $995 = ((($s)) + 25|0); + HEAP8[$995>>0] = $994; + $996 = (_bitshift64Lshr(($872|0),($873|0),19)|0); + $997 = tempRet0; + $998 = (_bitshift64Shl(($880|0),($881|0),2)|0); + $999 = tempRet0; + $1000 = $998 | $996; + $999 | $997; + $1001 = $1000&255; + HEAP8[$55>>0] = $1001; + $1002 = (_bitshift64Lshr(($880|0),($881|0),6)|0); + $1003 = tempRet0; + $1004 = $1002&255; + $1005 = ((($s)) + 27|0); + HEAP8[$1005>>0] = $1004; + $1006 = (_bitshift64Lshr(($880|0),($881|0),14)|0); + $1007 = tempRet0; + $1008 = (_bitshift64Shl(($876|0),($877|0),7)|0); + $1009 = tempRet0; + $1010 = $1006 | $1008; + $1007 | $1009; + $1011 = $1010&255; + HEAP8[$61>>0] = $1011; + $1012 = (_bitshift64Lshr(($876|0),($877|0),1)|0); + $1013 = tempRet0; + $1014 = $1012&255; + $1015 = ((($s)) + 29|0); + HEAP8[$1015>>0] = $1014; + $1016 = (_bitshift64Lshr(($876|0),($877|0),9)|0); + $1017 = tempRet0; + $1018 = $1016&255; + $1019 = ((($s)) + 30|0); + HEAP8[$1019>>0] = $1018; + $1020 = (_bitshift64Lshr(($876|0),($877|0),17)|0); + $1021 = tempRet0; + $1022 = $1020&255; + HEAP8[$67>>0] = $1022; + return; +} +function _load_351($in) { + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP8[$in>>0]|0; + $1 = $0&255; + $2 = ((($in)) + 1|0); + $3 = HEAP8[$2>>0]|0; + $4 = $3&255; + $5 = (_bitshift64Shl(($4|0),0,8)|0); + $6 = tempRet0; + $7 = $5 | $1; + $8 = ((($in)) + 2|0); + $9 = HEAP8[$8>>0]|0; + $10 = $9&255; + $11 = (_bitshift64Shl(($10|0),0,16)|0); + $12 = tempRet0; + $13 = $7 | $11; + $14 = $6 | $12; + tempRet0 = ($14); + return ($13|0); +} +function _load_452($in) { + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + var $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP8[$in>>0]|0; + $1 = $0&255; + $2 = ((($in)) + 1|0); + $3 = HEAP8[$2>>0]|0; + $4 = $3&255; + $5 = (_bitshift64Shl(($4|0),0,8)|0); + $6 = tempRet0; + $7 = $5 | $1; + $8 = ((($in)) + 2|0); + $9 = HEAP8[$8>>0]|0; + $10 = $9&255; + $11 = (_bitshift64Shl(($10|0),0,16)|0); + $12 = tempRet0; + $13 = $7 | $11; + $14 = $6 | $12; + $15 = ((($in)) + 3|0); + $16 = HEAP8[$15>>0]|0; + $17 = $16&255; + $18 = (_bitshift64Shl(($17|0),0,24)|0); + $19 = tempRet0; + $20 = $13 | $18; + $21 = $14 | $19; + tempRet0 = ($21); + return ($20|0); +} +function _sph_sha512_init($cc) { + $cc = $cc|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + $0 = ((($cc)) + 128|0); + dest=$0; src=8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $1 = ((($cc)) + 192|0); + $2 = $1; + $3 = $2; + HEAP32[$3>>2] = 0; + $4 = (($2) + 4)|0; + $5 = $4; + HEAP32[$5>>2] = 0; + return; +} +function _sph_sha384($cc,$data,$len) { + $cc = $cc|0; + $data = $data|0; + $len = $len|0; + var $$01$ = 0, $$012 = 0, $$03 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $current$04 = 0, $current$1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ((($cc)) + 192|0); + $1 = ($len|0)==(0); + if ($1) { + return; + } + $2 = $0; + $3 = $2; + $4 = HEAP32[$3>>2]|0; + $5 = (($2) + 4)|0; + $6 = $5; + $7 = HEAP32[$6>>2]|0; + $8 = $4 & 127; + $9 = ((($cc)) + 128|0); + $$012 = $len;$$03 = $data;$current$04 = $8; + while(1) { + $10 = (128 - ($current$04))|0; + $11 = ($10>>>0)>($$012>>>0); + $$01$ = $11 ? $$012 : $10; + $12 = (($cc) + ($current$04)|0); + _memcpy(($12|0),($$03|0),($$01$|0))|0; + $13 = (($$03) + ($$01$)|0); + $14 = (($$01$) + ($current$04))|0; + $15 = (($$012) - ($$01$))|0; + $16 = ($14|0)==(128); + if ($16) { + _sha3_round($cc,$9); + $current$1 = 0; + } else { + $current$1 = $14; + } + $17 = $0; + $18 = $17; + $19 = HEAP32[$18>>2]|0; + $20 = (($17) + 4)|0; + $21 = $20; + $22 = HEAP32[$21>>2]|0; + $23 = (_i64Add(($19|0),($22|0),($$01$|0),0)|0); + $24 = tempRet0; + $25 = $0; + $26 = $25; + HEAP32[$26>>2] = $23; + $27 = (($25) + 4)|0; + $28 = $27; + HEAP32[$28>>2] = $24; + $29 = ($$012|0)==($$01$|0); + if ($29) { + break; + } else { + $$012 = $15;$$03 = $13;$current$04 = $current$1; + } + } + return; +} +function _sph_sha512_close($cc,$dst) { + $cc = $cc|0; + $dst = $dst|0; + var label = 0, sp = 0; + sp = STACKTOP; + _sha384_close($cc,$dst,8); + _sph_sha512_init($cc); + return; +} +function _sha3_round($data,$r) { + $data = $data|0; + $r = $r|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; + var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0; + var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0; + var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0; + var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0; + var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0; + var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0; + var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0; + var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0; + var $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0; + var $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0; + var $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0; + var $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0; + var $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0; + var $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0; + var $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0; + var $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0; + var $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0; + var $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0; + var $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0; + var $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0; + var $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0; + var $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0; + var $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0; + var $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0; + var $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0; + var $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0; + var $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0; + var $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0; + var $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0; + var $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0; + var $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $98 = 0, $99 = 0, $W = 0, $exitcond = 0, $exitcond19 = 0, $i$011 = 0, $i$110 = 0, $i$29 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 640|0; + $W = sp; + $i$011 = 0; + while(1) { + $0 = $i$011 << 3; + $1 = (($data) + ($0)|0); + $2 = (_sph_dec64be_aligned($1)|0); + $3 = tempRet0; + $4 = (($W) + ($i$011<<3)|0); + $5 = $4; + $6 = $5; + HEAP32[$6>>2] = $2; + $7 = (($5) + 4)|0; + $8 = $7; + HEAP32[$8>>2] = $3; + $9 = (($i$011) + 1)|0; + $exitcond19 = ($9|0)==(16); + if ($exitcond19) { + $i$110 = 16; + break; + } else { + $i$011 = $9; + } + } + while(1) { + $10 = (($i$110) + -2)|0; + $11 = (($W) + ($10<<3)|0); + $12 = $11; + $13 = $12; + $14 = HEAP32[$13>>2]|0; + $15 = (($12) + 4)|0; + $16 = $15; + $17 = HEAP32[$16>>2]|0; + $18 = (_bitshift64Shl(($14|0),($17|0),45)|0); + $19 = tempRet0; + $20 = (_bitshift64Lshr(($14|0),($17|0),19)|0); + $21 = tempRet0; + $22 = $18 | $20; + $23 = $19 | $21; + $24 = (_bitshift64Shl(($14|0),($17|0),3)|0); + $25 = tempRet0; + $26 = (_bitshift64Lshr(($14|0),($17|0),61)|0); + $27 = tempRet0; + $28 = $24 | $26; + $29 = $25 | $27; + $30 = (_bitshift64Lshr(($14|0),($17|0),6)|0); + $31 = tempRet0; + $32 = $28 ^ $30; + $33 = $29 ^ $31; + $34 = $32 ^ $22; + $35 = $33 ^ $23; + $36 = (($i$110) + -7)|0; + $37 = (($W) + ($36<<3)|0); + $38 = $37; + $39 = $38; + $40 = HEAP32[$39>>2]|0; + $41 = (($38) + 4)|0; + $42 = $41; + $43 = HEAP32[$42>>2]|0; + $44 = (($i$110) + -15)|0; + $45 = (($W) + ($44<<3)|0); + $46 = $45; + $47 = $46; + $48 = HEAP32[$47>>2]|0; + $49 = (($46) + 4)|0; + $50 = $49; + $51 = HEAP32[$50>>2]|0; + $52 = (_bitshift64Shl(($48|0),($51|0),63)|0); + $53 = tempRet0; + $54 = (_bitshift64Lshr(($48|0),($51|0),1)|0); + $55 = tempRet0; + $56 = $52 | $54; + $57 = $53 | $55; + $58 = (_bitshift64Shl(($48|0),($51|0),56)|0); + $59 = tempRet0; + $60 = (_bitshift64Lshr(($48|0),($51|0),8)|0); + $61 = tempRet0; + $62 = $58 | $60; + $63 = $59 | $61; + $64 = (_bitshift64Lshr(($48|0),($51|0),7)|0); + $65 = tempRet0; + $66 = $62 ^ $64; + $67 = $63 ^ $65; + $68 = $66 ^ $56; + $69 = $67 ^ $57; + $70 = (($i$110) + -16)|0; + $71 = (($W) + ($70<<3)|0); + $72 = $71; + $73 = $72; + $74 = HEAP32[$73>>2]|0; + $75 = (($72) + 4)|0; + $76 = $75; + $77 = HEAP32[$76>>2]|0; + $78 = (_i64Add(($74|0),($77|0),($40|0),($43|0))|0); + $79 = tempRet0; + $80 = (_i64Add(($78|0),($79|0),($34|0),($35|0))|0); + $81 = tempRet0; + $82 = (_i64Add(($80|0),($81|0),($68|0),($69|0))|0); + $83 = tempRet0; + $84 = (($W) + ($i$110<<3)|0); + $85 = $84; + $86 = $85; + HEAP32[$86>>2] = $82; + $87 = (($85) + 4)|0; + $88 = $87; + HEAP32[$88>>2] = $83; + $89 = (($i$110) + 1)|0; + $exitcond = ($89|0)==(80); + if ($exitcond) { + break; + } else { + $i$110 = $89; + } + } + $90 = $r; + $91 = $90; + $92 = HEAP32[$91>>2]|0; + $93 = (($90) + 4)|0; + $94 = $93; + $95 = HEAP32[$94>>2]|0; + $96 = ((($r)) + 8|0); + $97 = $96; + $98 = $97; + $99 = HEAP32[$98>>2]|0; + $100 = (($97) + 4)|0; + $101 = $100; + $102 = HEAP32[$101>>2]|0; + $103 = ((($r)) + 16|0); + $104 = $103; + $105 = $104; + $106 = HEAP32[$105>>2]|0; + $107 = (($104) + 4)|0; + $108 = $107; + $109 = HEAP32[$108>>2]|0; + $110 = ((($r)) + 24|0); + $111 = $110; + $112 = $111; + $113 = HEAP32[$112>>2]|0; + $114 = (($111) + 4)|0; + $115 = $114; + $116 = HEAP32[$115>>2]|0; + $117 = ((($r)) + 32|0); + $118 = $117; + $119 = $118; + $120 = HEAP32[$119>>2]|0; + $121 = (($118) + 4)|0; + $122 = $121; + $123 = HEAP32[$122>>2]|0; + $124 = ((($r)) + 40|0); + $125 = $124; + $126 = $125; + $127 = HEAP32[$126>>2]|0; + $128 = (($125) + 4)|0; + $129 = $128; + $130 = HEAP32[$129>>2]|0; + $131 = ((($r)) + 48|0); + $132 = $131; + $133 = $132; + $134 = HEAP32[$133>>2]|0; + $135 = (($132) + 4)|0; + $136 = $135; + $137 = HEAP32[$136>>2]|0; + $138 = ((($r)) + 56|0); + $139 = $138; + $140 = $139; + $141 = HEAP32[$140>>2]|0; + $142 = (($139) + 4)|0; + $143 = $142; + $144 = HEAP32[$143>>2]|0; + $145 = $120;$146 = $123;$170 = $127;$171 = $134;$173 = $130;$174 = $137;$193 = $141;$194 = $144;$203 = $92;$204 = $95;$228 = $99;$230 = $102;$234 = $106;$236 = $109;$241 = $113;$242 = $116;$i$29 = 0; + while(1) { + $147 = (_bitshift64Shl(($145|0),($146|0),50)|0); + $148 = tempRet0; + $149 = (_bitshift64Lshr(($145|0),($146|0),14)|0); + $150 = tempRet0; + $151 = $147 | $149; + $152 = $148 | $150; + $153 = (_bitshift64Shl(($145|0),($146|0),46)|0); + $154 = tempRet0; + $155 = (_bitshift64Lshr(($145|0),($146|0),18)|0); + $156 = tempRet0; + $157 = $153 | $155; + $158 = $154 | $156; + $159 = $151 ^ $157; + $160 = $152 ^ $158; + $161 = (_bitshift64Shl(($145|0),($146|0),23)|0); + $162 = tempRet0; + $163 = (_bitshift64Lshr(($145|0),($146|0),41)|0); + $164 = tempRet0; + $165 = $161 | $163; + $166 = $162 | $164; + $167 = $159 ^ $165; + $168 = $160 ^ $166; + $169 = $170 ^ $171; + $172 = $173 ^ $174; + $175 = $169 & $145; + $176 = $172 & $146; + $177 = $175 ^ $171; + $178 = $176 ^ $174; + $179 = (72 + ($i$29<<3)|0); + $180 = $179; + $181 = $180; + $182 = HEAP32[$181>>2]|0; + $183 = (($180) + 4)|0; + $184 = $183; + $185 = HEAP32[$184>>2]|0; + $186 = (($W) + ($i$29<<3)|0); + $187 = $186; + $188 = $187; + $189 = HEAP32[$188>>2]|0; + $190 = (($187) + 4)|0; + $191 = $190; + $192 = HEAP32[$191>>2]|0; + $195 = (_i64Add(($177|0),($178|0),($193|0),($194|0))|0); + $196 = tempRet0; + $197 = (_i64Add(($195|0),($196|0),($167|0),($168|0))|0); + $198 = tempRet0; + $199 = (_i64Add(($197|0),($198|0),($182|0),($185|0))|0); + $200 = tempRet0; + $201 = (_i64Add(($199|0),($200|0),($189|0),($192|0))|0); + $202 = tempRet0; + $205 = (_bitshift64Shl(($203|0),($204|0),36)|0); + $206 = tempRet0; + $207 = (_bitshift64Lshr(($203|0),($204|0),28)|0); + $208 = tempRet0; + $209 = $205 | $207; + $210 = $206 | $208; + $211 = (_bitshift64Shl(($203|0),($204|0),30)|0); + $212 = tempRet0; + $213 = (_bitshift64Lshr(($203|0),($204|0),34)|0); + $214 = tempRet0; + $215 = $211 | $213; + $216 = $212 | $214; + $217 = $209 ^ $215; + $218 = $210 ^ $216; + $219 = (_bitshift64Shl(($203|0),($204|0),25)|0); + $220 = tempRet0; + $221 = (_bitshift64Lshr(($203|0),($204|0),39)|0); + $222 = tempRet0; + $223 = $219 | $221; + $224 = $220 | $222; + $225 = $217 ^ $223; + $226 = $218 ^ $224; + $227 = $203 & $228; + $229 = $204 & $230; + $231 = $203 | $228; + $232 = $204 | $230; + $233 = $231 & $234; + $235 = $232 & $236; + $237 = $233 | $227; + $238 = $235 | $229; + $239 = (_i64Add(($225|0),($226|0),($237|0),($238|0))|0); + $240 = tempRet0; + $243 = (_i64Add(($201|0),($202|0),($241|0),($242|0))|0); + $244 = tempRet0; + $245 = (_i64Add(($239|0),($240|0),($201|0),($202|0))|0); + $246 = tempRet0; + $247 = (_bitshift64Shl(($243|0),($244|0),50)|0); + $248 = tempRet0; + $249 = (_bitshift64Lshr(($243|0),($244|0),14)|0); + $250 = tempRet0; + $251 = $247 | $249; + $252 = $248 | $250; + $253 = (_bitshift64Shl(($243|0),($244|0),46)|0); + $254 = tempRet0; + $255 = (_bitshift64Lshr(($243|0),($244|0),18)|0); + $256 = tempRet0; + $257 = $253 | $255; + $258 = $254 | $256; + $259 = $251 ^ $257; + $260 = $252 ^ $258; + $261 = (_bitshift64Shl(($243|0),($244|0),23)|0); + $262 = tempRet0; + $263 = (_bitshift64Lshr(($243|0),($244|0),41)|0); + $264 = tempRet0; + $265 = $261 | $263; + $266 = $262 | $264; + $267 = $259 ^ $265; + $268 = $260 ^ $266; + $269 = $145 ^ $170; + $270 = $146 ^ $173; + $271 = $243 & $269; + $272 = $244 & $270; + $273 = $271 ^ $170; + $274 = $272 ^ $173; + $275 = $i$29 | 1; + $276 = (72 + ($275<<3)|0); + $277 = $276; + $278 = $277; + $279 = HEAP32[$278>>2]|0; + $280 = (($277) + 4)|0; + $281 = $280; + $282 = HEAP32[$281>>2]|0; + $283 = (($W) + ($275<<3)|0); + $284 = $283; + $285 = $284; + $286 = HEAP32[$285>>2]|0; + $287 = (($284) + 4)|0; + $288 = $287; + $289 = HEAP32[$288>>2]|0; + $290 = (_i64Add(($279|0),($282|0),($171|0),($174|0))|0); + $291 = tempRet0; + $292 = (_i64Add(($290|0),($291|0),($286|0),($289|0))|0); + $293 = tempRet0; + $294 = (_i64Add(($292|0),($293|0),($273|0),($274|0))|0); + $295 = tempRet0; + $296 = (_i64Add(($294|0),($295|0),($267|0),($268|0))|0); + $297 = tempRet0; + $298 = (_bitshift64Shl(($245|0),($246|0),36)|0); + $299 = tempRet0; + $300 = (_bitshift64Lshr(($245|0),($246|0),28)|0); + $301 = tempRet0; + $302 = $298 | $300; + $303 = $299 | $301; + $304 = (_bitshift64Shl(($245|0),($246|0),30)|0); + $305 = tempRet0; + $306 = (_bitshift64Lshr(($245|0),($246|0),34)|0); + $307 = tempRet0; + $308 = $304 | $306; + $309 = $305 | $307; + $310 = $302 ^ $308; + $311 = $303 ^ $309; + $312 = (_bitshift64Shl(($245|0),($246|0),25)|0); + $313 = tempRet0; + $314 = (_bitshift64Lshr(($245|0),($246|0),39)|0); + $315 = tempRet0; + $316 = $312 | $314; + $317 = $313 | $315; + $318 = $310 ^ $316; + $319 = $311 ^ $317; + $320 = $245 & $203; + $321 = $246 & $204; + $322 = $245 | $203; + $323 = $246 | $204; + $324 = $322 & $228; + $325 = $323 & $230; + $326 = $324 | $320; + $327 = $325 | $321; + $328 = (_i64Add(($318|0),($319|0),($326|0),($327|0))|0); + $329 = tempRet0; + $330 = (_i64Add(($296|0),($297|0),($234|0),($236|0))|0); + $331 = tempRet0; + $332 = (_i64Add(($328|0),($329|0),($296|0),($297|0))|0); + $333 = tempRet0; + $334 = (_bitshift64Shl(($330|0),($331|0),50)|0); + $335 = tempRet0; + $336 = (_bitshift64Lshr(($330|0),($331|0),14)|0); + $337 = tempRet0; + $338 = $334 | $336; + $339 = $335 | $337; + $340 = (_bitshift64Shl(($330|0),($331|0),46)|0); + $341 = tempRet0; + $342 = (_bitshift64Lshr(($330|0),($331|0),18)|0); + $343 = tempRet0; + $344 = $340 | $342; + $345 = $341 | $343; + $346 = $338 ^ $344; + $347 = $339 ^ $345; + $348 = (_bitshift64Shl(($330|0),($331|0),23)|0); + $349 = tempRet0; + $350 = (_bitshift64Lshr(($330|0),($331|0),41)|0); + $351 = tempRet0; + $352 = $348 | $350; + $353 = $349 | $351; + $354 = $346 ^ $352; + $355 = $347 ^ $353; + $356 = $243 ^ $145; + $357 = $244 ^ $146; + $358 = $330 & $356; + $359 = $331 & $357; + $360 = $358 ^ $145; + $361 = $359 ^ $146; + $362 = $i$29 | 2; + $363 = (72 + ($362<<3)|0); + $364 = $363; + $365 = $364; + $366 = HEAP32[$365>>2]|0; + $367 = (($364) + 4)|0; + $368 = $367; + $369 = HEAP32[$368>>2]|0; + $370 = (($W) + ($362<<3)|0); + $371 = $370; + $372 = $371; + $373 = HEAP32[$372>>2]|0; + $374 = (($371) + 4)|0; + $375 = $374; + $376 = HEAP32[$375>>2]|0; + $377 = (_i64Add(($366|0),($369|0),($170|0),($173|0))|0); + $378 = tempRet0; + $379 = (_i64Add(($377|0),($378|0),($373|0),($376|0))|0); + $380 = tempRet0; + $381 = (_i64Add(($379|0),($380|0),($360|0),($361|0))|0); + $382 = tempRet0; + $383 = (_i64Add(($381|0),($382|0),($354|0),($355|0))|0); + $384 = tempRet0; + $385 = (_bitshift64Shl(($332|0),($333|0),36)|0); + $386 = tempRet0; + $387 = (_bitshift64Lshr(($332|0),($333|0),28)|0); + $388 = tempRet0; + $389 = $385 | $387; + $390 = $386 | $388; + $391 = (_bitshift64Shl(($332|0),($333|0),30)|0); + $392 = tempRet0; + $393 = (_bitshift64Lshr(($332|0),($333|0),34)|0); + $394 = tempRet0; + $395 = $391 | $393; + $396 = $392 | $394; + $397 = $389 ^ $395; + $398 = $390 ^ $396; + $399 = (_bitshift64Shl(($332|0),($333|0),25)|0); + $400 = tempRet0; + $401 = (_bitshift64Lshr(($332|0),($333|0),39)|0); + $402 = tempRet0; + $403 = $399 | $401; + $404 = $400 | $402; + $405 = $397 ^ $403; + $406 = $398 ^ $404; + $407 = $332 & $245; + $408 = $333 & $246; + $409 = $332 | $245; + $410 = $333 | $246; + $411 = $409 & $203; + $412 = $410 & $204; + $413 = $411 | $407; + $414 = $412 | $408; + $415 = (_i64Add(($405|0),($406|0),($413|0),($414|0))|0); + $416 = tempRet0; + $417 = (_i64Add(($383|0),($384|0),($228|0),($230|0))|0); + $418 = tempRet0; + $419 = (_i64Add(($415|0),($416|0),($383|0),($384|0))|0); + $420 = tempRet0; + $421 = (_bitshift64Shl(($417|0),($418|0),50)|0); + $422 = tempRet0; + $423 = (_bitshift64Lshr(($417|0),($418|0),14)|0); + $424 = tempRet0; + $425 = $421 | $423; + $426 = $422 | $424; + $427 = (_bitshift64Shl(($417|0),($418|0),46)|0); + $428 = tempRet0; + $429 = (_bitshift64Lshr(($417|0),($418|0),18)|0); + $430 = tempRet0; + $431 = $427 | $429; + $432 = $428 | $430; + $433 = $425 ^ $431; + $434 = $426 ^ $432; + $435 = (_bitshift64Shl(($417|0),($418|0),23)|0); + $436 = tempRet0; + $437 = (_bitshift64Lshr(($417|0),($418|0),41)|0); + $438 = tempRet0; + $439 = $435 | $437; + $440 = $436 | $438; + $441 = $433 ^ $439; + $442 = $434 ^ $440; + $443 = $330 ^ $243; + $444 = $331 ^ $244; + $445 = $417 & $443; + $446 = $418 & $444; + $447 = $445 ^ $243; + $448 = $446 ^ $244; + $449 = $i$29 | 3; + $450 = (72 + ($449<<3)|0); + $451 = $450; + $452 = $451; + $453 = HEAP32[$452>>2]|0; + $454 = (($451) + 4)|0; + $455 = $454; + $456 = HEAP32[$455>>2]|0; + $457 = (($W) + ($449<<3)|0); + $458 = $457; + $459 = $458; + $460 = HEAP32[$459>>2]|0; + $461 = (($458) + 4)|0; + $462 = $461; + $463 = HEAP32[$462>>2]|0; + $464 = (_i64Add(($453|0),($456|0),($145|0),($146|0))|0); + $465 = tempRet0; + $466 = (_i64Add(($464|0),($465|0),($460|0),($463|0))|0); + $467 = tempRet0; + $468 = (_i64Add(($466|0),($467|0),($447|0),($448|0))|0); + $469 = tempRet0; + $470 = (_i64Add(($468|0),($469|0),($441|0),($442|0))|0); + $471 = tempRet0; + $472 = (_bitshift64Shl(($419|0),($420|0),36)|0); + $473 = tempRet0; + $474 = (_bitshift64Lshr(($419|0),($420|0),28)|0); + $475 = tempRet0; + $476 = $472 | $474; + $477 = $473 | $475; + $478 = (_bitshift64Shl(($419|0),($420|0),30)|0); + $479 = tempRet0; + $480 = (_bitshift64Lshr(($419|0),($420|0),34)|0); + $481 = tempRet0; + $482 = $478 | $480; + $483 = $479 | $481; + $484 = $476 ^ $482; + $485 = $477 ^ $483; + $486 = (_bitshift64Shl(($419|0),($420|0),25)|0); + $487 = tempRet0; + $488 = (_bitshift64Lshr(($419|0),($420|0),39)|0); + $489 = tempRet0; + $490 = $486 | $488; + $491 = $487 | $489; + $492 = $484 ^ $490; + $493 = $485 ^ $491; + $494 = $419 & $332; + $495 = $420 & $333; + $496 = $419 | $332; + $497 = $420 | $333; + $498 = $496 & $245; + $499 = $497 & $246; + $500 = $498 | $494; + $501 = $499 | $495; + $502 = (_i64Add(($492|0),($493|0),($500|0),($501|0))|0); + $503 = tempRet0; + $504 = (_i64Add(($470|0),($471|0),($203|0),($204|0))|0); + $505 = tempRet0; + $506 = (_i64Add(($502|0),($503|0),($470|0),($471|0))|0); + $507 = tempRet0; + $508 = (_bitshift64Shl(($504|0),($505|0),50)|0); + $509 = tempRet0; + $510 = (_bitshift64Lshr(($504|0),($505|0),14)|0); + $511 = tempRet0; + $512 = $508 | $510; + $513 = $509 | $511; + $514 = (_bitshift64Shl(($504|0),($505|0),46)|0); + $515 = tempRet0; + $516 = (_bitshift64Lshr(($504|0),($505|0),18)|0); + $517 = tempRet0; + $518 = $514 | $516; + $519 = $515 | $517; + $520 = $512 ^ $518; + $521 = $513 ^ $519; + $522 = (_bitshift64Shl(($504|0),($505|0),23)|0); + $523 = tempRet0; + $524 = (_bitshift64Lshr(($504|0),($505|0),41)|0); + $525 = tempRet0; + $526 = $522 | $524; + $527 = $523 | $525; + $528 = $520 ^ $526; + $529 = $521 ^ $527; + $530 = $417 ^ $330; + $531 = $418 ^ $331; + $532 = $504 & $530; + $533 = $505 & $531; + $534 = $532 ^ $330; + $535 = $533 ^ $331; + $536 = $i$29 | 4; + $537 = (72 + ($536<<3)|0); + $538 = $537; + $539 = $538; + $540 = HEAP32[$539>>2]|0; + $541 = (($538) + 4)|0; + $542 = $541; + $543 = HEAP32[$542>>2]|0; + $544 = (($W) + ($536<<3)|0); + $545 = $544; + $546 = $545; + $547 = HEAP32[$546>>2]|0; + $548 = (($545) + 4)|0; + $549 = $548; + $550 = HEAP32[$549>>2]|0; + $551 = (_i64Add(($540|0),($543|0),($243|0),($244|0))|0); + $552 = tempRet0; + $553 = (_i64Add(($551|0),($552|0),($547|0),($550|0))|0); + $554 = tempRet0; + $555 = (_i64Add(($553|0),($554|0),($534|0),($535|0))|0); + $556 = tempRet0; + $557 = (_i64Add(($555|0),($556|0),($528|0),($529|0))|0); + $558 = tempRet0; + $559 = (_bitshift64Shl(($506|0),($507|0),36)|0); + $560 = tempRet0; + $561 = (_bitshift64Lshr(($506|0),($507|0),28)|0); + $562 = tempRet0; + $563 = $559 | $561; + $564 = $560 | $562; + $565 = (_bitshift64Shl(($506|0),($507|0),30)|0); + $566 = tempRet0; + $567 = (_bitshift64Lshr(($506|0),($507|0),34)|0); + $568 = tempRet0; + $569 = $565 | $567; + $570 = $566 | $568; + $571 = $563 ^ $569; + $572 = $564 ^ $570; + $573 = (_bitshift64Shl(($506|0),($507|0),25)|0); + $574 = tempRet0; + $575 = (_bitshift64Lshr(($506|0),($507|0),39)|0); + $576 = tempRet0; + $577 = $573 | $575; + $578 = $574 | $576; + $579 = $571 ^ $577; + $580 = $572 ^ $578; + $581 = $506 & $419; + $582 = $507 & $420; + $583 = $506 | $419; + $584 = $507 | $420; + $585 = $583 & $332; + $586 = $584 & $333; + $587 = $585 | $581; + $588 = $586 | $582; + $589 = (_i64Add(($579|0),($580|0),($587|0),($588|0))|0); + $590 = tempRet0; + $591 = (_i64Add(($557|0),($558|0),($245|0),($246|0))|0); + $592 = tempRet0; + $593 = (_i64Add(($589|0),($590|0),($557|0),($558|0))|0); + $594 = tempRet0; + $595 = (_bitshift64Shl(($591|0),($592|0),50)|0); + $596 = tempRet0; + $597 = (_bitshift64Lshr(($591|0),($592|0),14)|0); + $598 = tempRet0; + $599 = $595 | $597; + $600 = $596 | $598; + $601 = (_bitshift64Shl(($591|0),($592|0),46)|0); + $602 = tempRet0; + $603 = (_bitshift64Lshr(($591|0),($592|0),18)|0); + $604 = tempRet0; + $605 = $601 | $603; + $606 = $602 | $604; + $607 = $599 ^ $605; + $608 = $600 ^ $606; + $609 = (_bitshift64Shl(($591|0),($592|0),23)|0); + $610 = tempRet0; + $611 = (_bitshift64Lshr(($591|0),($592|0),41)|0); + $612 = tempRet0; + $613 = $609 | $611; + $614 = $610 | $612; + $615 = $607 ^ $613; + $616 = $608 ^ $614; + $617 = $504 ^ $417; + $618 = $505 ^ $418; + $619 = $591 & $617; + $620 = $592 & $618; + $621 = $619 ^ $417; + $622 = $620 ^ $418; + $623 = $i$29 | 5; + $624 = (72 + ($623<<3)|0); + $625 = $624; + $626 = $625; + $627 = HEAP32[$626>>2]|0; + $628 = (($625) + 4)|0; + $629 = $628; + $630 = HEAP32[$629>>2]|0; + $631 = (($W) + ($623<<3)|0); + $632 = $631; + $633 = $632; + $634 = HEAP32[$633>>2]|0; + $635 = (($632) + 4)|0; + $636 = $635; + $637 = HEAP32[$636>>2]|0; + $638 = (_i64Add(($634|0),($637|0),($627|0),($630|0))|0); + $639 = tempRet0; + $640 = (_i64Add(($638|0),($639|0),($330|0),($331|0))|0); + $641 = tempRet0; + $642 = (_i64Add(($640|0),($641|0),($621|0),($622|0))|0); + $643 = tempRet0; + $644 = (_i64Add(($642|0),($643|0),($615|0),($616|0))|0); + $645 = tempRet0; + $646 = (_bitshift64Shl(($593|0),($594|0),36)|0); + $647 = tempRet0; + $648 = (_bitshift64Lshr(($593|0),($594|0),28)|0); + $649 = tempRet0; + $650 = $646 | $648; + $651 = $647 | $649; + $652 = (_bitshift64Shl(($593|0),($594|0),30)|0); + $653 = tempRet0; + $654 = (_bitshift64Lshr(($593|0),($594|0),34)|0); + $655 = tempRet0; + $656 = $652 | $654; + $657 = $653 | $655; + $658 = $650 ^ $656; + $659 = $651 ^ $657; + $660 = (_bitshift64Shl(($593|0),($594|0),25)|0); + $661 = tempRet0; + $662 = (_bitshift64Lshr(($593|0),($594|0),39)|0); + $663 = tempRet0; + $664 = $660 | $662; + $665 = $661 | $663; + $666 = $658 ^ $664; + $667 = $659 ^ $665; + $668 = $593 & $506; + $669 = $594 & $507; + $670 = $593 | $506; + $671 = $594 | $507; + $672 = $670 & $419; + $673 = $671 & $420; + $674 = $672 | $668; + $675 = $673 | $669; + $676 = (_i64Add(($666|0),($667|0),($674|0),($675|0))|0); + $677 = tempRet0; + $678 = (_i64Add(($644|0),($645|0),($332|0),($333|0))|0); + $679 = tempRet0; + $680 = (_i64Add(($676|0),($677|0),($644|0),($645|0))|0); + $681 = tempRet0; + $682 = (_bitshift64Shl(($678|0),($679|0),50)|0); + $683 = tempRet0; + $684 = (_bitshift64Lshr(($678|0),($679|0),14)|0); + $685 = tempRet0; + $686 = $682 | $684; + $687 = $683 | $685; + $688 = (_bitshift64Shl(($678|0),($679|0),46)|0); + $689 = tempRet0; + $690 = (_bitshift64Lshr(($678|0),($679|0),18)|0); + $691 = tempRet0; + $692 = $688 | $690; + $693 = $689 | $691; + $694 = $686 ^ $692; + $695 = $687 ^ $693; + $696 = (_bitshift64Shl(($678|0),($679|0),23)|0); + $697 = tempRet0; + $698 = (_bitshift64Lshr(($678|0),($679|0),41)|0); + $699 = tempRet0; + $700 = $696 | $698; + $701 = $697 | $699; + $702 = $694 ^ $700; + $703 = $695 ^ $701; + $704 = $591 ^ $504; + $705 = $592 ^ $505; + $706 = $678 & $704; + $707 = $679 & $705; + $708 = $706 ^ $504; + $709 = $707 ^ $505; + $710 = $i$29 | 6; + $711 = (72 + ($710<<3)|0); + $712 = $711; + $713 = $712; + $714 = HEAP32[$713>>2]|0; + $715 = (($712) + 4)|0; + $716 = $715; + $717 = HEAP32[$716>>2]|0; + $718 = (($W) + ($710<<3)|0); + $719 = $718; + $720 = $719; + $721 = HEAP32[$720>>2]|0; + $722 = (($719) + 4)|0; + $723 = $722; + $724 = HEAP32[$723>>2]|0; + $725 = (_i64Add(($721|0),($724|0),($714|0),($717|0))|0); + $726 = tempRet0; + $727 = (_i64Add(($725|0),($726|0),($417|0),($418|0))|0); + $728 = tempRet0; + $729 = (_i64Add(($727|0),($728|0),($708|0),($709|0))|0); + $730 = tempRet0; + $731 = (_i64Add(($729|0),($730|0),($702|0),($703|0))|0); + $732 = tempRet0; + $733 = (_bitshift64Shl(($680|0),($681|0),36)|0); + $734 = tempRet0; + $735 = (_bitshift64Lshr(($680|0),($681|0),28)|0); + $736 = tempRet0; + $737 = $733 | $735; + $738 = $734 | $736; + $739 = (_bitshift64Shl(($680|0),($681|0),30)|0); + $740 = tempRet0; + $741 = (_bitshift64Lshr(($680|0),($681|0),34)|0); + $742 = tempRet0; + $743 = $739 | $741; + $744 = $740 | $742; + $745 = $737 ^ $743; + $746 = $738 ^ $744; + $747 = (_bitshift64Shl(($680|0),($681|0),25)|0); + $748 = tempRet0; + $749 = (_bitshift64Lshr(($680|0),($681|0),39)|0); + $750 = tempRet0; + $751 = $747 | $749; + $752 = $748 | $750; + $753 = $745 ^ $751; + $754 = $746 ^ $752; + $755 = $680 & $593; + $756 = $681 & $594; + $757 = $680 | $593; + $758 = $681 | $594; + $759 = $757 & $506; + $760 = $758 & $507; + $761 = $759 | $755; + $762 = $760 | $756; + $763 = (_i64Add(($753|0),($754|0),($761|0),($762|0))|0); + $764 = tempRet0; + $765 = (_i64Add(($731|0),($732|0),($419|0),($420|0))|0); + $766 = tempRet0; + $767 = (_i64Add(($763|0),($764|0),($731|0),($732|0))|0); + $768 = tempRet0; + $769 = (_bitshift64Shl(($765|0),($766|0),50)|0); + $770 = tempRet0; + $771 = (_bitshift64Lshr(($765|0),($766|0),14)|0); + $772 = tempRet0; + $773 = $769 | $771; + $774 = $770 | $772; + $775 = (_bitshift64Shl(($765|0),($766|0),46)|0); + $776 = tempRet0; + $777 = (_bitshift64Lshr(($765|0),($766|0),18)|0); + $778 = tempRet0; + $779 = $775 | $777; + $780 = $776 | $778; + $781 = $773 ^ $779; + $782 = $774 ^ $780; + $783 = (_bitshift64Shl(($765|0),($766|0),23)|0); + $784 = tempRet0; + $785 = (_bitshift64Lshr(($765|0),($766|0),41)|0); + $786 = tempRet0; + $787 = $783 | $785; + $788 = $784 | $786; + $789 = $781 ^ $787; + $790 = $782 ^ $788; + $791 = $678 ^ $591; + $792 = $679 ^ $592; + $793 = $765 & $791; + $794 = $766 & $792; + $795 = $793 ^ $591; + $796 = $794 ^ $592; + $797 = $i$29 | 7; + $798 = (72 + ($797<<3)|0); + $799 = $798; + $800 = $799; + $801 = HEAP32[$800>>2]|0; + $802 = (($799) + 4)|0; + $803 = $802; + $804 = HEAP32[$803>>2]|0; + $805 = (($W) + ($797<<3)|0); + $806 = $805; + $807 = $806; + $808 = HEAP32[$807>>2]|0; + $809 = (($806) + 4)|0; + $810 = $809; + $811 = HEAP32[$810>>2]|0; + $812 = (_i64Add(($808|0),($811|0),($801|0),($804|0))|0); + $813 = tempRet0; + $814 = (_i64Add(($812|0),($813|0),($504|0),($505|0))|0); + $815 = tempRet0; + $816 = (_i64Add(($814|0),($815|0),($795|0),($796|0))|0); + $817 = tempRet0; + $818 = (_i64Add(($816|0),($817|0),($789|0),($790|0))|0); + $819 = tempRet0; + $820 = (_bitshift64Shl(($767|0),($768|0),36)|0); + $821 = tempRet0; + $822 = (_bitshift64Lshr(($767|0),($768|0),28)|0); + $823 = tempRet0; + $824 = $820 | $822; + $825 = $821 | $823; + $826 = (_bitshift64Shl(($767|0),($768|0),30)|0); + $827 = tempRet0; + $828 = (_bitshift64Lshr(($767|0),($768|0),34)|0); + $829 = tempRet0; + $830 = $826 | $828; + $831 = $827 | $829; + $832 = $824 ^ $830; + $833 = $825 ^ $831; + $834 = (_bitshift64Shl(($767|0),($768|0),25)|0); + $835 = tempRet0; + $836 = (_bitshift64Lshr(($767|0),($768|0),39)|0); + $837 = tempRet0; + $838 = $834 | $836; + $839 = $835 | $837; + $840 = $832 ^ $838; + $841 = $833 ^ $839; + $842 = $767 & $680; + $843 = $768 & $681; + $844 = $767 | $680; + $845 = $768 | $681; + $846 = $844 & $593; + $847 = $845 & $594; + $848 = $846 | $842; + $849 = $847 | $843; + $850 = (_i64Add(($840|0),($841|0),($848|0),($849|0))|0); + $851 = tempRet0; + $852 = (_i64Add(($818|0),($819|0),($506|0),($507|0))|0); + $853 = tempRet0; + $854 = (_i64Add(($850|0),($851|0),($818|0),($819|0))|0); + $855 = tempRet0; + $856 = (($i$29) + 8)|0; + $857 = ($856|0)<(80); + if ($857) { + $145 = $852;$146 = $853;$170 = $765;$171 = $678;$173 = $766;$174 = $679;$193 = $591;$194 = $592;$203 = $854;$204 = $855;$228 = $767;$230 = $768;$234 = $680;$236 = $681;$241 = $593;$242 = $594;$i$29 = $856; + } else { + $864 = $854;$865 = $855;$878 = $767;$879 = $768;$892 = $680;$893 = $681;$906 = $593;$907 = $594;$920 = $852;$921 = $853;$934 = $765;$935 = $766;$948 = $678;$949 = $679;$962 = $591;$963 = $592; + break; + } + } + $858 = $r; + $859 = $858; + $860 = HEAP32[$859>>2]|0; + $861 = (($858) + 4)|0; + $862 = $861; + $863 = HEAP32[$862>>2]|0; + $866 = (_i64Add(($860|0),($863|0),($864|0),($865|0))|0); + $867 = tempRet0; + $868 = $r; + $869 = $868; + HEAP32[$869>>2] = $866; + $870 = (($868) + 4)|0; + $871 = $870; + HEAP32[$871>>2] = $867; + $872 = $96; + $873 = $872; + $874 = HEAP32[$873>>2]|0; + $875 = (($872) + 4)|0; + $876 = $875; + $877 = HEAP32[$876>>2]|0; + $880 = (_i64Add(($874|0),($877|0),($878|0),($879|0))|0); + $881 = tempRet0; + $882 = $96; + $883 = $882; + HEAP32[$883>>2] = $880; + $884 = (($882) + 4)|0; + $885 = $884; + HEAP32[$885>>2] = $881; + $886 = $103; + $887 = $886; + $888 = HEAP32[$887>>2]|0; + $889 = (($886) + 4)|0; + $890 = $889; + $891 = HEAP32[$890>>2]|0; + $894 = (_i64Add(($888|0),($891|0),($892|0),($893|0))|0); + $895 = tempRet0; + $896 = $103; + $897 = $896; + HEAP32[$897>>2] = $894; + $898 = (($896) + 4)|0; + $899 = $898; + HEAP32[$899>>2] = $895; + $900 = $110; + $901 = $900; + $902 = HEAP32[$901>>2]|0; + $903 = (($900) + 4)|0; + $904 = $903; + $905 = HEAP32[$904>>2]|0; + $908 = (_i64Add(($902|0),($905|0),($906|0),($907|0))|0); + $909 = tempRet0; + $910 = $110; + $911 = $910; + HEAP32[$911>>2] = $908; + $912 = (($910) + 4)|0; + $913 = $912; + HEAP32[$913>>2] = $909; + $914 = $117; + $915 = $914; + $916 = HEAP32[$915>>2]|0; + $917 = (($914) + 4)|0; + $918 = $917; + $919 = HEAP32[$918>>2]|0; + $922 = (_i64Add(($916|0),($919|0),($920|0),($921|0))|0); + $923 = tempRet0; + $924 = $117; + $925 = $924; + HEAP32[$925>>2] = $922; + $926 = (($924) + 4)|0; + $927 = $926; + HEAP32[$927>>2] = $923; + $928 = $124; + $929 = $928; + $930 = HEAP32[$929>>2]|0; + $931 = (($928) + 4)|0; + $932 = $931; + $933 = HEAP32[$932>>2]|0; + $936 = (_i64Add(($930|0),($933|0),($934|0),($935|0))|0); + $937 = tempRet0; + $938 = $124; + $939 = $938; + HEAP32[$939>>2] = $936; + $940 = (($938) + 4)|0; + $941 = $940; + HEAP32[$941>>2] = $937; + $942 = $131; + $943 = $942; + $944 = HEAP32[$943>>2]|0; + $945 = (($942) + 4)|0; + $946 = $945; + $947 = HEAP32[$946>>2]|0; + $950 = (_i64Add(($944|0),($947|0),($948|0),($949|0))|0); + $951 = tempRet0; + $952 = $131; + $953 = $952; + HEAP32[$953>>2] = $950; + $954 = (($952) + 4)|0; + $955 = $954; + HEAP32[$955>>2] = $951; + $956 = $138; + $957 = $956; + $958 = HEAP32[$957>>2]|0; + $959 = (($956) + 4)|0; + $960 = $959; + $961 = HEAP32[$960>>2]|0; + $964 = (_i64Add(($958|0),($961|0),($962|0),($963|0))|0); + $965 = tempRet0; + $966 = $138; + $967 = $966; + HEAP32[$967>>2] = $964; + $968 = (($966) + 4)|0; + $969 = $968; + HEAP32[$969>>2] = $965; + STACKTOP = sp;return; +} +function _sha384_close($cc,$dst,$rnum) { + $cc = $cc|0; + $dst = $dst|0; + $rnum = $rnum|0; + var label = 0, sp = 0; + sp = STACKTOP; + _sha384_addbits_and_close($cc,0,0,$dst,$rnum); + return; +} +function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { + $cc = $cc|0; + $ub = $ub|0; + $n = $n|0; + $dst = $dst|0; + $rnum = $rnum|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $u$01 = 0, dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + $0 = ((($cc)) + 192|0); + $1 = $0; + $2 = $1; + $3 = HEAP32[$2>>2]|0; + $4 = (($1) + 4)|0; + $5 = $4; + $6 = HEAP32[$5>>2]|0; + $7 = $3 & 127; + $8 = 128 >>> $n; + $9 = (0 - ($8))|0; + $10 = $9 & $ub; + $11 = $10 | $8; + $12 = $11&255; + $13 = (($7) + 1)|0; + $14 = (($cc) + ($7)|0); + HEAP8[$14>>0] = $12; + $15 = ($13>>>0)>(112); + $16 = (($cc) + ($13)|0); + if ($15) { + $17 = $7 ^ 127; + _memset(($16|0),0,($17|0))|0; + $18 = ((($cc)) + 128|0); + _sha3_round($cc,$18); + dest=$cc; stop=dest+112|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); + } else { + $19 = (111 - ($7))|0; + _memset(($16|0),0,($19|0))|0; + } + $20 = ((($cc)) + 112|0); + $21 = $0; + $22 = $21; + $23 = HEAP32[$22>>2]|0; + $24 = (($21) + 4)|0; + $25 = $24; + $26 = HEAP32[$25>>2]|0; + $27 = (_bitshift64Lshr(($23|0),($26|0),61)|0); + $28 = tempRet0; + _sph_enc64be_aligned($20,$27,$28); + $29 = ((($cc)) + 120|0); + $30 = $0; + $31 = $30; + $32 = HEAP32[$31>>2]|0; + $33 = (($30) + 4)|0; + $34 = $33; + $35 = HEAP32[$34>>2]|0; + $36 = (_bitshift64Shl(($32|0),($35|0),3)|0); + $37 = tempRet0; + $38 = (_i64Add(($36|0),($37|0),($n|0),0)|0); + $39 = tempRet0; + _sph_enc64be_aligned($29,$38,$39); + $40 = ((($cc)) + 128|0); + _sha3_round($cc,$40); + $41 = ($rnum|0)==(0); + if ($41) { + return; + } else { + $u$01 = 0; + } + while(1) { + $42 = $u$01 << 3; + $43 = (($dst) + ($42)|0); + $44 = (($40) + ($u$01<<3)|0); + $45 = $44; + $46 = $45; + $47 = HEAP32[$46>>2]|0; + $48 = (($45) + 4)|0; + $49 = $48; + $50 = HEAP32[$49>>2]|0; + _sph_enc64be($43,$47,$50); + $51 = (($u$01) + 1)|0; + $exitcond = ($51|0)==($rnum|0); + if ($exitcond) { + break; + } else { + $u$01 = $51; } } - $1074 = (___errno_location()|0); - HEAP32[$1074>>2] = 12; - $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); + return; +} +function _sph_enc64be_aligned($dst,$0,$1) { + $dst = $dst|0; + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); + $3 = tempRet0; + $4 = $2&255; + HEAP8[$dst>>0] = $4; + $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); + $6 = tempRet0; + $7 = $5&255; + $8 = ((($dst)) + 1|0); + HEAP8[$8>>0] = $7; + $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); + $10 = tempRet0; + $11 = $9&255; + $12 = ((($dst)) + 2|0); + HEAP8[$12>>0] = $11; + $13 = $1&255; + $14 = ((($dst)) + 3|0); + HEAP8[$14>>0] = $13; + $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); + $16 = tempRet0; + $17 = $15&255; + $18 = ((($dst)) + 4|0); + HEAP8[$18>>0] = $17; + $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); + $20 = tempRet0; + $21 = $19&255; + $22 = ((($dst)) + 5|0); + HEAP8[$22>>0] = $21; + $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); + $24 = tempRet0; + $25 = $23&255; + $26 = ((($dst)) + 6|0); + HEAP8[$26>>0] = $25; + $27 = $0&255; + $28 = ((($dst)) + 7|0); + HEAP8[$28>>0] = $27; + return; +} +function _sph_enc64be($dst,$0,$1) { + $dst = $dst|0; + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); + $3 = tempRet0; + $4 = $2&255; + HEAP8[$dst>>0] = $4; + $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); + $6 = tempRet0; + $7 = $5&255; + $8 = ((($dst)) + 1|0); + HEAP8[$8>>0] = $7; + $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); + $10 = tempRet0; + $11 = $9&255; + $12 = ((($dst)) + 2|0); + HEAP8[$12>>0] = $11; + $13 = $1&255; + $14 = ((($dst)) + 3|0); + HEAP8[$14>>0] = $13; + $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); + $16 = tempRet0; + $17 = $15&255; + $18 = ((($dst)) + 4|0); + HEAP8[$18>>0] = $17; + $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); + $20 = tempRet0; + $21 = $19&255; + $22 = ((($dst)) + 5|0); + HEAP8[$22>>0] = $21; + $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); + $24 = tempRet0; + $25 = $23&255; + $26 = ((($dst)) + 6|0); + HEAP8[$26>>0] = $25; + $27 = $0&255; + $28 = ((($dst)) + 7|0); + HEAP8[$28>>0] = $27; + return; +} +function _sph_dec64be_aligned($src) { + $src = $src|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP8[$src>>0]|0; + $1 = $0&255; + $2 = (_bitshift64Shl(($1|0),0,56)|0); + $3 = tempRet0; + $4 = ((($src)) + 1|0); + $5 = HEAP8[$4>>0]|0; + $6 = $5&255; + $7 = (_bitshift64Shl(($6|0),0,48)|0); + $8 = tempRet0; + $9 = $7 | $2; + $10 = $8 | $3; + $11 = ((($src)) + 2|0); + $12 = HEAP8[$11>>0]|0; + $13 = $12&255; + $14 = (_bitshift64Shl(($13|0),0,40)|0); + $15 = tempRet0; + $16 = $9 | $14; + $17 = $10 | $15; + $18 = ((($src)) + 3|0); + $19 = HEAP8[$18>>0]|0; + $20 = $19&255; + $21 = $17 | $20; + $22 = ((($src)) + 4|0); + $23 = HEAP8[$22>>0]|0; + $24 = $23&255; + $25 = (_bitshift64Shl(($24|0),0,24)|0); + $26 = tempRet0; + $27 = $16 | $25; + $28 = $21 | $26; + $29 = ((($src)) + 5|0); + $30 = HEAP8[$29>>0]|0; + $31 = $30&255; + $32 = (_bitshift64Shl(($31|0),0,16)|0); + $33 = tempRet0; + $34 = $27 | $32; + $35 = $28 | $33; + $36 = ((($src)) + 6|0); + $37 = HEAP8[$36>>0]|0; + $38 = $37&255; + $39 = (_bitshift64Shl(($38|0),0,8)|0); + $40 = tempRet0; + $41 = $34 | $39; + $42 = $35 | $40; + $43 = ((($src)) + 7|0); + $44 = HEAP8[$43>>0]|0; + $45 = $44&255; + $46 = $41 | $45; + tempRet0 = ($42); + return ($46|0); +} +function ___errno_location() { + var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[32512>>2]|0; + $1 = ($0|0)==(0|0); + if ($1) { + $$0 = 32560; + } else { + $2 = (_pthread_self()|0); + $3 = ((($2)) + 60|0); + $4 = HEAP32[$3>>2]|0; + $$0 = $4; + } + return ($$0|0); } -function _free($mem) { - $mem = $mem|0; - var $$pre = 0, $$pre$phi66Z2D = 0, $$pre$phi68Z2D = 0, $$pre$phiZ2D = 0, $$pre65 = 0, $$pre67 = 0, $$sum = 0, $$sum16$pre = 0, $$sum17 = 0, $$sum18 = 0, $$sum19 = 0, $$sum2 = 0, $$sum20 = 0, $$sum2324 = 0, $$sum25 = 0, $$sum26 = 0, $$sum28 = 0, $$sum29 = 0, $$sum3 = 0, $$sum30 = 0; - var $$sum31 = 0, $$sum32 = 0, $$sum33 = 0, $$sum34 = 0, $$sum35 = 0, $$sum36 = 0, $$sum37 = 0, $$sum5 = 0, $$sum67 = 0, $$sum8 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0; - var $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0; - var $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0; - var $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0; - var $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0; - var $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0; - var $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0; - var $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0; - var $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0; - var $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0; - var $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0; - var $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0; - var $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0; - var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; - var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0; - var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0; - var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F16$0 = 0, $I18$0 = 0, $I18$0$c = 0, $K19$058 = 0, $R$0 = 0, $R$1 = 0, $R7$0 = 0; - var $R7$1 = 0, $RP$0 = 0, $RP9$0 = 0, $T$0$lcssa = 0, $T$057 = 0, $cond = 0, $cond54 = 0, $or$cond = 0, $p$0 = 0, $psize$0 = 0, $psize$1 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0; +function ___syscall_ret($r) { + $r = $r|0; + var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = ($mem|0)==(0|0); + $0 = ($r>>>0)>(4294963200); if ($0) { - STACKTOP = sp;return; + $1 = (0 - ($r))|0; + $2 = (___errno_location()|0); + HEAP32[$2>>2] = $1; + $$0 = -1; + } else { + $$0 = $r; } - $1 = (($mem) + -8|0); - $2 = HEAP32[((32544 + 16|0))>>2]|0; - $3 = ($1>>>0)<($2>>>0); - if ($3) { - _abort(); - // unreachable; + return ($$0|0); +} +function ___lockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function ___unlockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function ___stdio_close($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; + $vararg_buffer = sp; + $0 = ((($f)) + 60|0); + $1 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $1; + $2 = (___syscall6(6,($vararg_buffer|0))|0); + $3 = (___syscall_ret($2)|0); + STACKTOP = sp;return ($3|0); +} +function ___stdio_seek($f,$off,$whence) { + $f = $f|0; + $off = $off|0; + $whence = $whence|0; + var $$pre = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $ret = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr4 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; + $vararg_buffer = sp; + $ret = sp + 20|0; + $0 = ((($f)) + 60|0); + $1 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $1; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 0; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $off; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $ret; + $vararg_ptr4 = ((($vararg_buffer)) + 16|0); + HEAP32[$vararg_ptr4>>2] = $whence; + $2 = (___syscall140(140,($vararg_buffer|0))|0); + $3 = (___syscall_ret($2)|0); + $4 = ($3|0)<(0); + if ($4) { + HEAP32[$ret>>2] = -1; + $5 = -1; + } else { + $$pre = HEAP32[$ret>>2]|0; + $5 = $$pre; } - $4 = (($mem) + -4|0); - $5 = HEAP32[$4>>2]|0; - $6 = $5 & 3; - $7 = ($6|0)==(1); - if ($7) { - _abort(); - // unreachable; + STACKTOP = sp;return ($5|0); +} +function ___stdio_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $$0 = 0, $$phi$trans$insert = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cnt$0 = 0, $cnt$1 = 0, $iov$0 = 0, $iov$0$lcssa11 = 0, $iov$1 = 0, $iovcnt$0 = 0; + var $iovcnt$0$lcssa12 = 0, $iovcnt$1 = 0, $iovs = 0, $rem$0 = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $vararg_ptr7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer = sp; + $iovs = sp + 32|0; + $0 = ((($f)) + 28|0); + $1 = HEAP32[$0>>2]|0; + HEAP32[$iovs>>2] = $1; + $2 = ((($iovs)) + 4|0); + $3 = ((($f)) + 20|0); + $4 = HEAP32[$3>>2]|0; + $5 = $4; + $6 = (($5) - ($1))|0; + HEAP32[$2>>2] = $6; + $7 = ((($iovs)) + 8|0); + HEAP32[$7>>2] = $buf; + $8 = ((($iovs)) + 12|0); + HEAP32[$8>>2] = $len; + $9 = (($6) + ($len))|0; + $10 = ((($f)) + 60|0); + $11 = ((($f)) + 44|0); + $iov$0 = $iovs;$iovcnt$0 = 2;$rem$0 = $9; + while(1) { + $12 = HEAP32[32512>>2]|0; + $13 = ($12|0)==(0|0); + if ($13) { + $17 = HEAP32[$10>>2]|0; + HEAP32[$vararg_buffer3>>2] = $17; + $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr6>>2] = $iov$0; + $vararg_ptr7 = ((($vararg_buffer3)) + 8|0); + HEAP32[$vararg_ptr7>>2] = $iovcnt$0; + $18 = (___syscall146(146,($vararg_buffer3|0))|0); + $19 = (___syscall_ret($18)|0); + $cnt$0 = $19; + } else { + _pthread_cleanup_push((1|0),($f|0)); + $14 = HEAP32[$10>>2]|0; + HEAP32[$vararg_buffer>>2] = $14; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $iov$0; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $iovcnt$0; + $15 = (___syscall146(146,($vararg_buffer|0))|0); + $16 = (___syscall_ret($15)|0); + _pthread_cleanup_pop(0); + $cnt$0 = $16; + } + $20 = ($rem$0|0)==($cnt$0|0); + if ($20) { + label = 6; + break; + } + $27 = ($cnt$0|0)<(0); + if ($27) { + $iov$0$lcssa11 = $iov$0;$iovcnt$0$lcssa12 = $iovcnt$0; + label = 8; + break; + } + $35 = (($rem$0) - ($cnt$0))|0; + $36 = ((($iov$0)) + 4|0); + $37 = HEAP32[$36>>2]|0; + $38 = ($cnt$0>>>0)>($37>>>0); + if ($38) { + $39 = HEAP32[$11>>2]|0; + HEAP32[$0>>2] = $39; + HEAP32[$3>>2] = $39; + $40 = (($cnt$0) - ($37))|0; + $41 = ((($iov$0)) + 8|0); + $42 = (($iovcnt$0) + -1)|0; + $$phi$trans$insert = ((($iov$0)) + 12|0); + $$pre = HEAP32[$$phi$trans$insert>>2]|0; + $50 = $$pre;$cnt$1 = $40;$iov$1 = $41;$iovcnt$1 = $42; + } else { + $43 = ($iovcnt$0|0)==(2); + if ($43) { + $44 = HEAP32[$0>>2]|0; + $45 = (($44) + ($cnt$0)|0); + HEAP32[$0>>2] = $45; + $50 = $37;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = 2; + } else { + $50 = $37;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = $iovcnt$0; + } + } + $46 = HEAP32[$iov$1>>2]|0; + $47 = (($46) + ($cnt$1)|0); + HEAP32[$iov$1>>2] = $47; + $48 = ((($iov$1)) + 4|0); + $49 = (($50) - ($cnt$1))|0; + HEAP32[$48>>2] = $49; + $iov$0 = $iov$1;$iovcnt$0 = $iovcnt$1;$rem$0 = $35; } - $8 = $5 & -8; - $$sum = (($8) + -8)|0; - $9 = (($mem) + ($$sum)|0); - $10 = $5 & 1; - $11 = ($10|0)==(0); + if ((label|0) == 6) { + $21 = HEAP32[$11>>2]|0; + $22 = ((($f)) + 48|0); + $23 = HEAP32[$22>>2]|0; + $24 = (($21) + ($23)|0); + $25 = ((($f)) + 16|0); + HEAP32[$25>>2] = $24; + $26 = $21; + HEAP32[$0>>2] = $26; + HEAP32[$3>>2] = $26; + $$0 = $len; + } + else if ((label|0) == 8) { + $28 = ((($f)) + 16|0); + HEAP32[$28>>2] = 0; + HEAP32[$0>>2] = 0; + HEAP32[$3>>2] = 0; + $29 = HEAP32[$f>>2]|0; + $30 = $29 | 32; + HEAP32[$f>>2] = $30; + $31 = ($iovcnt$0$lcssa12|0)==(2); + if ($31) { + $$0 = 0; + } else { + $32 = ((($iov$0$lcssa11)) + 4|0); + $33 = HEAP32[$32>>2]|0; + $34 = (($len) - ($33))|0; + $$0 = $34; + } + } + STACKTOP = sp;return ($$0|0); +} +function ___stdout_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tio = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; + $vararg_buffer = sp; + $tio = sp + 12|0; + $0 = ((($f)) + 36|0); + HEAP32[$0>>2] = 3; + $1 = HEAP32[$f>>2]|0; + $2 = $1 & 64; + $3 = ($2|0)==(0); + if ($3) { + $4 = ((($f)) + 60|0); + $5 = HEAP32[$4>>2]|0; + HEAP32[$vararg_buffer>>2] = $5; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 21505; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $tio; + $6 = (___syscall54(54,($vararg_buffer|0))|0); + $7 = ($6|0)==(0); + if (!($7)) { + $8 = ((($f)) + 75|0); + HEAP8[$8>>0] = -1; + } + } + $9 = (___stdio_write($f,$buf,$len)|0); + STACKTOP = sp;return ($9|0); +} +function _fflush($f) { + $f = $f|0; + var $$0 = 0, $$01 = 0, $$012 = 0, $$014 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, $r$0$lcssa = 0, $r$03 = 0, $r$1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ($f|0)==(0|0); do { - if ($11) { - $12 = HEAP32[$1>>2]|0; - $13 = ($6|0)==(0); - if ($13) { - STACKTOP = sp;return; - } - $$sum2 = (-8 - ($12))|0; - $14 = (($mem) + ($$sum2)|0); - $15 = (($12) + ($8))|0; - $16 = ($14>>>0)<($2>>>0); - if ($16) { - _abort(); - // unreachable; - } - $17 = HEAP32[((32544 + 20|0))>>2]|0; - $18 = ($14|0)==($17|0); - if ($18) { - $$sum3 = (($8) + -4)|0; - $103 = (($mem) + ($$sum3)|0); - $104 = HEAP32[$103>>2]|0; - $105 = $104 & 3; - $106 = ($105|0)==(3); - if (!($106)) { - $p$0 = $14;$psize$0 = $15; - break; - } - HEAP32[((32544 + 8|0))>>2] = $15; - $107 = $104 & -2; - HEAP32[$103>>2] = $107; - $108 = $15 | 1; - $$sum26 = (($$sum2) + 4)|0; - $109 = (($mem) + ($$sum26)|0); - HEAP32[$109>>2] = $108; - HEAP32[$9>>2] = $15; - STACKTOP = sp;return; - } - $19 = $12 >>> 3; - $20 = ($12>>>0)<(256); - if ($20) { - $$sum36 = (($$sum2) + 8)|0; - $21 = (($mem) + ($$sum36)|0); - $22 = HEAP32[$21>>2]|0; - $$sum37 = (($$sum2) + 12)|0; - $23 = (($mem) + ($$sum37)|0); - $24 = HEAP32[$23>>2]|0; - $25 = $19 << 1; - $26 = ((32544 + ($25<<2)|0) + 40|0); - $27 = ($22|0)==($26|0); - if (!($27)) { - $28 = ($22>>>0)<($2>>>0); - if ($28) { - _abort(); - // unreachable; - } - $29 = (($22) + 12|0); - $30 = HEAP32[$29>>2]|0; - $31 = ($30|0)==($14|0); - if (!($31)) { - _abort(); - // unreachable; - } - } - $32 = ($24|0)==($22|0); - if ($32) { - $33 = 1 << $19; - $34 = $33 ^ -1; - $35 = HEAP32[32544>>2]|0; - $36 = $35 & $34; - HEAP32[32544>>2] = $36; - $p$0 = $14;$psize$0 = $15; - break; - } - $37 = ($24|0)==($26|0); - if ($37) { - $$pre67 = (($24) + 8|0); - $$pre$phi68Z2D = $$pre67; - } else { - $38 = ($24>>>0)<($2>>>0); - if ($38) { - _abort(); - // unreachable; - } - $39 = (($24) + 8|0); - $40 = HEAP32[$39>>2]|0; - $41 = ($40|0)==($14|0); - if ($41) { - $$pre$phi68Z2D = $39; - } else { - _abort(); - // unreachable; - } - } - $42 = (($22) + 12|0); - HEAP32[$42>>2] = $24; - HEAP32[$$pre$phi68Z2D>>2] = $22; - $p$0 = $14;$psize$0 = $15; - break; + if ($0) { + $7 = HEAP32[32556>>2]|0; + $8 = ($7|0)==(0|0); + if ($8) { + $27 = 0; + } else { + $9 = HEAP32[32556>>2]|0; + $10 = (_fflush($9)|0); + $27 = $10; } - $$sum28 = (($$sum2) + 24)|0; - $43 = (($mem) + ($$sum28)|0); - $44 = HEAP32[$43>>2]|0; - $$sum29 = (($$sum2) + 12)|0; - $45 = (($mem) + ($$sum29)|0); - $46 = HEAP32[$45>>2]|0; - $47 = ($46|0)==($14|0); - do { - if ($47) { - $$sum31 = (($$sum2) + 20)|0; - $57 = (($mem) + ($$sum31)|0); - $58 = HEAP32[$57>>2]|0; - $59 = ($58|0)==(0|0); - if ($59) { - $$sum30 = (($$sum2) + 16)|0; - $60 = (($mem) + ($$sum30)|0); - $61 = HEAP32[$60>>2]|0; - $62 = ($61|0)==(0|0); - if ($62) { - $R$1 = 0; - break; - } else { - $R$0 = $61;$RP$0 = $60; - } - } else { - $R$0 = $58;$RP$0 = $57; - } - while(1) { - $63 = (($R$0) + 20|0); - $64 = HEAP32[$63>>2]|0; - $65 = ($64|0)==(0|0); - if (!($65)) { - $R$0 = $64;$RP$0 = $63; - continue; - } - $66 = (($R$0) + 16|0); - $67 = HEAP32[$66>>2]|0; - $68 = ($67|0)==(0|0); - if ($68) { - break; - } else { - $R$0 = $67;$RP$0 = $66; - } - } - $69 = ($RP$0>>>0)<($2>>>0); - if ($69) { - _abort(); - // unreachable; + ___lock(((32540)|0)); + $$012 = HEAP32[(32536)>>2]|0; + $11 = ($$012|0)==(0|0); + if ($11) { + $r$0$lcssa = $27; + } else { + $$014 = $$012;$r$03 = $27; + while(1) { + $12 = ((($$014)) + 76|0); + $13 = HEAP32[$12>>2]|0; + $14 = ($13|0)>(-1); + if ($14) { + $15 = (___lockfile($$014)|0); + $24 = $15; } else { - HEAP32[$RP$0>>2] = 0; - $R$1 = $R$0; - break; + $24 = 0; } - } else { - $$sum35 = (($$sum2) + 8)|0; - $48 = (($mem) + ($$sum35)|0); - $49 = HEAP32[$48>>2]|0; - $50 = ($49>>>0)<($2>>>0); - if ($50) { - _abort(); - // unreachable; + $16 = ((($$014)) + 20|0); + $17 = HEAP32[$16>>2]|0; + $18 = ((($$014)) + 28|0); + $19 = HEAP32[$18>>2]|0; + $20 = ($17>>>0)>($19>>>0); + if ($20) { + $21 = (___fflush_unlocked($$014)|0); + $22 = $21 | $r$03; + $r$1 = $22; + } else { + $r$1 = $r$03; } - $51 = (($49) + 12|0); - $52 = HEAP32[$51>>2]|0; - $53 = ($52|0)==($14|0); - if (!($53)) { - _abort(); - // unreachable; + $23 = ($24|0)==(0); + if (!($23)) { + ___unlockfile($$014); } - $54 = (($46) + 8|0); - $55 = HEAP32[$54>>2]|0; - $56 = ($55|0)==($14|0); - if ($56) { - HEAP32[$51>>2] = $46; - HEAP32[$54>>2] = $49; - $R$1 = $46; + $25 = ((($$014)) + 56|0); + $$01 = HEAP32[$25>>2]|0; + $26 = ($$01|0)==(0|0); + if ($26) { + $r$0$lcssa = $r$1; break; } else { - _abort(); - // unreachable; + $$014 = $$01;$r$03 = $r$1; } } - } while(0); - $70 = ($44|0)==(0|0); - if ($70) { - $p$0 = $14;$psize$0 = $15; + } + ___unlock(((32540)|0)); + $$0 = $r$0$lcssa; + } else { + $1 = ((($f)) + 76|0); + $2 = HEAP32[$1>>2]|0; + $3 = ($2|0)>(-1); + if (!($3)) { + $4 = (___fflush_unlocked($f)|0); + $$0 = $4; + break; + } + $5 = (___lockfile($f)|0); + $phitmp = ($5|0)==(0); + $6 = (___fflush_unlocked($f)|0); + if ($phitmp) { + $$0 = $6; } else { - $$sum32 = (($$sum2) + 28)|0; - $71 = (($mem) + ($$sum32)|0); - $72 = HEAP32[$71>>2]|0; - $73 = ((32544 + ($72<<2)|0) + 304|0); - $74 = HEAP32[$73>>2]|0; - $75 = ($14|0)==($74|0); - if ($75) { - HEAP32[$73>>2] = $R$1; - $cond = ($R$1|0)==(0|0); - if ($cond) { - $76 = 1 << $72; - $77 = $76 ^ -1; - $78 = HEAP32[((32544 + 4|0))>>2]|0; - $79 = $78 & $77; - HEAP32[((32544 + 4|0))>>2] = $79; - $p$0 = $14;$psize$0 = $15; - break; - } - } else { - $80 = HEAP32[((32544 + 16|0))>>2]|0; - $81 = ($44>>>0)<($80>>>0); - if ($81) { - _abort(); - // unreachable; - } - $82 = (($44) + 16|0); - $83 = HEAP32[$82>>2]|0; - $84 = ($83|0)==($14|0); - if ($84) { - HEAP32[$82>>2] = $R$1; + ___unlockfile($f); + $$0 = $6; + } + } + } while(0); + return ($$0|0); +} +function _cleanup392($p) { + $p = $p|0; + var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ((($p)) + 68|0); + $1 = HEAP32[$0>>2]|0; + $2 = ($1|0)==(0); + if ($2) { + ___unlockfile($p); + } + return; +} +function ___fflush_unlocked($f) { + $f = $f|0; + var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ((($f)) + 20|0); + $1 = HEAP32[$0>>2]|0; + $2 = ((($f)) + 28|0); + $3 = HEAP32[$2>>2]|0; + $4 = ($1>>>0)>($3>>>0); + if ($4) { + $5 = ((($f)) + 36|0); + $6 = HEAP32[$5>>2]|0; + (FUNCTION_TABLE_iiii[$6 & 3]($f,0,0)|0); + $7 = HEAP32[$0>>2]|0; + $8 = ($7|0)==(0|0); + if ($8) { + $$0 = -1; + } else { + label = 3; + } + } else { + label = 3; + } + if ((label|0) == 3) { + $9 = ((($f)) + 4|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 8|0); + $12 = HEAP32[$11>>2]|0; + $13 = ($10>>>0)<($12>>>0); + if ($13) { + $14 = ((($f)) + 40|0); + $15 = HEAP32[$14>>2]|0; + $16 = $10; + $17 = $12; + $18 = (($16) - ($17))|0; + (FUNCTION_TABLE_iiii[$15 & 3]($f,$18,1)|0); + } + $19 = ((($f)) + 16|0); + HEAP32[$19>>2] = 0; + HEAP32[$2>>2] = 0; + HEAP32[$0>>2] = 0; + HEAP32[$11>>2] = 0; + HEAP32[$9>>2] = 0; + $$0 = 0; + } + return ($$0|0); +} +function _malloc($bytes) { + $bytes = $bytes|0; + var $$3$i = 0, $$lcssa = 0, $$lcssa211 = 0, $$lcssa215 = 0, $$lcssa216 = 0, $$lcssa217 = 0, $$lcssa219 = 0, $$lcssa222 = 0, $$lcssa224 = 0, $$lcssa226 = 0, $$lcssa228 = 0, $$lcssa230 = 0, $$lcssa232 = 0, $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i22$i = 0, $$pre$i25 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i23$iZ2D = 0; + var $$pre$phi$i26Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phi58$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre105 = 0, $$pre106 = 0, $$pre14$i$i = 0, $$pre43$i = 0, $$pre56$i$i = 0, $$pre57$i$i = 0, $$pre8$i = 0, $$rsize$0$i = 0, $$rsize$3$i = 0, $$sum = 0, $$sum$i$i = 0, $$sum$i$i$i = 0, $$sum$i13$i = 0, $$sum$i14$i = 0, $$sum$i17$i = 0, $$sum$i19$i = 0; + var $$sum$i2334 = 0, $$sum$i32 = 0, $$sum$i35 = 0, $$sum1 = 0, $$sum1$i = 0, $$sum1$i$i = 0, $$sum1$i15$i = 0, $$sum1$i20$i = 0, $$sum1$i24 = 0, $$sum10 = 0, $$sum10$i = 0, $$sum10$i$i = 0, $$sum11$i = 0, $$sum11$i$i = 0, $$sum1112 = 0, $$sum112$i = 0, $$sum113$i = 0, $$sum114$i = 0, $$sum115$i = 0, $$sum116$i = 0; + var $$sum117$i = 0, $$sum118$i = 0, $$sum119$i = 0, $$sum12$i = 0, $$sum12$i$i = 0, $$sum120$i = 0, $$sum121$i = 0, $$sum122$i = 0, $$sum123$i = 0, $$sum124$i = 0, $$sum125$i = 0, $$sum13$i = 0, $$sum13$i$i = 0, $$sum14$i$i = 0, $$sum15$i = 0, $$sum15$i$i = 0, $$sum16$i = 0, $$sum16$i$i = 0, $$sum17$i = 0, $$sum17$i$i = 0; + var $$sum18$i = 0, $$sum1819$i$i = 0, $$sum2 = 0, $$sum2$i = 0, $$sum2$i$i = 0, $$sum2$i$i$i = 0, $$sum2$i16$i = 0, $$sum2$i18$i = 0, $$sum2$i21$i = 0, $$sum20$i$i = 0, $$sum21$i$i = 0, $$sum22$i$i = 0, $$sum23$i$i = 0, $$sum24$i$i = 0, $$sum25$i$i = 0, $$sum27$i$i = 0, $$sum28$i$i = 0, $$sum29$i$i = 0, $$sum3$i = 0, $$sum3$i27 = 0; + var $$sum30$i$i = 0, $$sum3132$i$i = 0, $$sum34$i$i = 0, $$sum3536$i$i = 0, $$sum3738$i$i = 0, $$sum39$i$i = 0, $$sum4 = 0, $$sum4$i = 0, $$sum4$i$i = 0, $$sum4$i28 = 0, $$sum40$i$i = 0, $$sum41$i$i = 0, $$sum42$i$i = 0, $$sum5$i = 0, $$sum5$i$i = 0, $$sum56 = 0, $$sum6$i = 0, $$sum67$i$i = 0, $$sum7$i = 0, $$sum8$i = 0; + var $$sum9 = 0, $$sum9$i = 0, $$sum9$i$i = 0, $$tsize$1$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0; + var $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0; + var $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0; + var $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0; + var $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0; + var $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0; + var $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0; + var $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0; + var $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0; + var $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0; + var $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0; + var $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0; + var $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0; + var $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0; + var $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0; + var $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0; + var $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0; + var $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0; + var $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0; + var $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0; + var $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0; + var $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0; + var $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0; + var $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0; + var $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0; + var $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0; + var $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0; + var $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0; + var $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0; + var $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0; + var $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0; + var $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0; + var $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0; + var $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0; + var $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0; + var $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0; + var $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0; + var $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0; + var $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0; + var $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0; + var $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0; + var $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0; + var $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0; + var $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0; + var $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0; + var $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0; + var $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0; + var $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0; + var $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0; + var $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0; + var $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0; + var $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0; + var $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0; + var $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0; + var $F5$0$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$029$i = 0, $K2$07$i$i = 0, $K8$051$i$i = 0, $R$0$i = 0, $R$0$i$i = 0, $R$0$i$i$lcssa = 0, $R$0$i$lcssa = 0, $R$0$i18 = 0, $R$0$i18$lcssa = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i20 = 0, $RP$0$i = 0, $RP$0$i$i = 0, $RP$0$i$i$lcssa = 0, $RP$0$i$lcssa = 0; + var $RP$0$i17 = 0, $RP$0$i17$lcssa = 0, $T$0$lcssa$i = 0, $T$0$lcssa$i$i = 0, $T$0$lcssa$i25$i = 0, $T$028$i = 0, $T$028$i$lcssa = 0, $T$050$i$i = 0, $T$050$i$i$lcssa = 0, $T$06$i$i = 0, $T$06$i$i$lcssa = 0, $br$0$ph$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i21 = 0, $exitcond$i$i = 0, $i$02$i$i = 0, $idx$0$i = 0, $mem$0 = 0, $nb$0 = 0; + var $not$$i = 0, $not$$i$i = 0, $not$$i26$i = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i30 = 0, $or$cond1$i = 0, $or$cond19$i = 0, $or$cond2$i = 0, $or$cond3$i = 0, $or$cond5$i = 0, $or$cond57$i = 0, $or$cond6$i = 0, $or$cond8$i = 0, $or$cond9$i = 0, $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i$lcssa = 0, $rsize$0$i15 = 0, $rsize$1$i = 0; + var $rsize$2$i = 0, $rsize$3$lcssa$i = 0, $rsize$331$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$084$i = 0, $sp$084$i$lcssa = 0, $sp$183$i = 0, $sp$183$i$lcssa = 0, $ssize$0$$i = 0, $ssize$0$i = 0, $ssize$1$ph$i = 0, $ssize$2$i = 0, $t$0$i = 0, $t$0$i14 = 0, $t$1$i = 0, $t$2$ph$i = 0; + var $t$2$v$3$i = 0, $t$230$i = 0, $tbase$255$i = 0, $tsize$0$ph$i = 0, $tsize$0323944$i = 0, $tsize$1$i = 0, $tsize$254$i = 0, $v$0$i = 0, $v$0$i$lcssa = 0, $v$0$i16 = 0, $v$1$i = 0, $v$2$i = 0, $v$3$lcssa$i = 0, $v$3$ph$i = 0, $v$332$i = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ($bytes>>>0)<(245); + do { + if ($0) { + $1 = ($bytes>>>0)<(11); + $2 = (($bytes) + 11)|0; + $3 = $2 & -8; + $4 = $1 ? 16 : $3; + $5 = $4 >>> 3; + $6 = HEAP32[32676>>2]|0; + $7 = $6 >>> $5; + $8 = $7 & 3; + $9 = ($8|0)==(0); + if (!($9)) { + $10 = $7 & 1; + $11 = $10 ^ 1; + $12 = (($11) + ($5))|0; + $13 = $12 << 1; + $14 = (32716 + ($13<<2)|0); + $$sum10 = (($13) + 2)|0; + $15 = (32716 + ($$sum10<<2)|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($16)) + 8|0); + $18 = HEAP32[$17>>2]|0; + $19 = ($14|0)==($18|0); + do { + if ($19) { + $20 = 1 << $12; + $21 = $20 ^ -1; + $22 = $6 & $21; + HEAP32[32676>>2] = $22; } else { - $85 = (($44) + 20|0); - HEAP32[$85>>2] = $R$1; + $23 = HEAP32[(32692)>>2]|0; + $24 = ($18>>>0)<($23>>>0); + if ($24) { + _abort(); + // unreachable; + } + $25 = ((($18)) + 12|0); + $26 = HEAP32[$25>>2]|0; + $27 = ($26|0)==($16|0); + if ($27) { + HEAP32[$25>>2] = $14; + HEAP32[$15>>2] = $18; + break; + } else { + _abort(); + // unreachable; + } } - $86 = ($R$1|0)==(0|0); - if ($86) { - $p$0 = $14;$psize$0 = $15; - break; + } while(0); + $28 = $12 << 3; + $29 = $28 | 3; + $30 = ((($16)) + 4|0); + HEAP32[$30>>2] = $29; + $$sum1112 = $28 | 4; + $31 = (($16) + ($$sum1112)|0); + $32 = HEAP32[$31>>2]|0; + $33 = $32 | 1; + HEAP32[$31>>2] = $33; + $mem$0 = $17; + return ($mem$0|0); + } + $34 = HEAP32[(32684)>>2]|0; + $35 = ($4>>>0)>($34>>>0); + if ($35) { + $36 = ($7|0)==(0); + if (!($36)) { + $37 = $7 << $5; + $38 = 2 << $5; + $39 = (0 - ($38))|0; + $40 = $38 | $39; + $41 = $37 & $40; + $42 = (0 - ($41))|0; + $43 = $41 & $42; + $44 = (($43) + -1)|0; + $45 = $44 >>> 12; + $46 = $45 & 16; + $47 = $44 >>> $46; + $48 = $47 >>> 5; + $49 = $48 & 8; + $50 = $49 | $46; + $51 = $47 >>> $49; + $52 = $51 >>> 2; + $53 = $52 & 4; + $54 = $50 | $53; + $55 = $51 >>> $53; + $56 = $55 >>> 1; + $57 = $56 & 2; + $58 = $54 | $57; + $59 = $55 >>> $57; + $60 = $59 >>> 1; + $61 = $60 & 1; + $62 = $58 | $61; + $63 = $59 >>> $61; + $64 = (($62) + ($63))|0; + $65 = $64 << 1; + $66 = (32716 + ($65<<2)|0); + $$sum4 = (($65) + 2)|0; + $67 = (32716 + ($$sum4<<2)|0); + $68 = HEAP32[$67>>2]|0; + $69 = ((($68)) + 8|0); + $70 = HEAP32[$69>>2]|0; + $71 = ($66|0)==($70|0); + do { + if ($71) { + $72 = 1 << $64; + $73 = $72 ^ -1; + $74 = $6 & $73; + HEAP32[32676>>2] = $74; + $89 = $34; + } else { + $75 = HEAP32[(32692)>>2]|0; + $76 = ($70>>>0)<($75>>>0); + if ($76) { + _abort(); + // unreachable; + } + $77 = ((($70)) + 12|0); + $78 = HEAP32[$77>>2]|0; + $79 = ($78|0)==($68|0); + if ($79) { + HEAP32[$77>>2] = $66; + HEAP32[$67>>2] = $70; + $$pre = HEAP32[(32684)>>2]|0; + $89 = $$pre; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $80 = $64 << 3; + $81 = (($80) - ($4))|0; + $82 = $4 | 3; + $83 = ((($68)) + 4|0); + HEAP32[$83>>2] = $82; + $84 = (($68) + ($4)|0); + $85 = $81 | 1; + $$sum56 = $4 | 4; + $86 = (($68) + ($$sum56)|0); + HEAP32[$86>>2] = $85; + $87 = (($68) + ($80)|0); + HEAP32[$87>>2] = $81; + $88 = ($89|0)==(0); + if (!($88)) { + $90 = HEAP32[(32696)>>2]|0; + $91 = $89 >>> 3; + $92 = $91 << 1; + $93 = (32716 + ($92<<2)|0); + $94 = HEAP32[32676>>2]|0; + $95 = 1 << $91; + $96 = $94 & $95; + $97 = ($96|0)==(0); + if ($97) { + $98 = $94 | $95; + HEAP32[32676>>2] = $98; + $$pre105 = (($92) + 2)|0; + $$pre106 = (32716 + ($$pre105<<2)|0); + $$pre$phiZ2D = $$pre106;$F4$0 = $93; + } else { + $$sum9 = (($92) + 2)|0; + $99 = (32716 + ($$sum9<<2)|0); + $100 = HEAP32[$99>>2]|0; + $101 = HEAP32[(32692)>>2]|0; + $102 = ($100>>>0)<($101>>>0); + if ($102) { + _abort(); + // unreachable; + } else { + $$pre$phiZ2D = $99;$F4$0 = $100; + } + } + HEAP32[$$pre$phiZ2D>>2] = $90; + $103 = ((($F4$0)) + 12|0); + HEAP32[$103>>2] = $90; + $104 = ((($90)) + 8|0); + HEAP32[$104>>2] = $F4$0; + $105 = ((($90)) + 12|0); + HEAP32[$105>>2] = $93; } + HEAP32[(32684)>>2] = $81; + HEAP32[(32696)>>2] = $84; + $mem$0 = $69; + return ($mem$0|0); } - $87 = HEAP32[((32544 + 16|0))>>2]|0; - $88 = ($R$1>>>0)<($87>>>0); - if ($88) { - _abort(); - // unreachable; - } - $89 = (($R$1) + 24|0); - HEAP32[$89>>2] = $44; - $$sum33 = (($$sum2) + 16)|0; - $90 = (($mem) + ($$sum33)|0); - $91 = HEAP32[$90>>2]|0; - $92 = ($91|0)==(0|0); - do { - if (!($92)) { - $93 = ($91>>>0)<($87>>>0); - if ($93) { - _abort(); - // unreachable; + $106 = HEAP32[(32680)>>2]|0; + $107 = ($106|0)==(0); + if ($107) { + $nb$0 = $4; + } else { + $108 = (0 - ($106))|0; + $109 = $106 & $108; + $110 = (($109) + -1)|0; + $111 = $110 >>> 12; + $112 = $111 & 16; + $113 = $110 >>> $112; + $114 = $113 >>> 5; + $115 = $114 & 8; + $116 = $115 | $112; + $117 = $113 >>> $115; + $118 = $117 >>> 2; + $119 = $118 & 4; + $120 = $116 | $119; + $121 = $117 >>> $119; + $122 = $121 >>> 1; + $123 = $122 & 2; + $124 = $120 | $123; + $125 = $121 >>> $123; + $126 = $125 >>> 1; + $127 = $126 & 1; + $128 = $124 | $127; + $129 = $125 >>> $127; + $130 = (($128) + ($129))|0; + $131 = (32980 + ($130<<2)|0); + $132 = HEAP32[$131>>2]|0; + $133 = ((($132)) + 4|0); + $134 = HEAP32[$133>>2]|0; + $135 = $134 & -8; + $136 = (($135) - ($4))|0; + $rsize$0$i = $136;$t$0$i = $132;$v$0$i = $132; + while(1) { + $137 = ((($t$0$i)) + 16|0); + $138 = HEAP32[$137>>2]|0; + $139 = ($138|0)==(0|0); + if ($139) { + $140 = ((($t$0$i)) + 20|0); + $141 = HEAP32[$140>>2]|0; + $142 = ($141|0)==(0|0); + if ($142) { + $rsize$0$i$lcssa = $rsize$0$i;$v$0$i$lcssa = $v$0$i; + break; + } else { + $144 = $141; + } } else { - $94 = (($R$1) + 16|0); - HEAP32[$94>>2] = $91; - $95 = (($91) + 24|0); - HEAP32[$95>>2] = $R$1; - break; + $144 = $138; } + $143 = ((($144)) + 4|0); + $145 = HEAP32[$143>>2]|0; + $146 = $145 & -8; + $147 = (($146) - ($4))|0; + $148 = ($147>>>0)<($rsize$0$i>>>0); + $$rsize$0$i = $148 ? $147 : $rsize$0$i; + $$v$0$i = $148 ? $144 : $v$0$i; + $rsize$0$i = $$rsize$0$i;$t$0$i = $144;$v$0$i = $$v$0$i; } - } while(0); - $$sum34 = (($$sum2) + 20)|0; - $96 = (($mem) + ($$sum34)|0); - $97 = HEAP32[$96>>2]|0; - $98 = ($97|0)==(0|0); - if ($98) { - $p$0 = $14;$psize$0 = $15; - } else { - $99 = HEAP32[((32544 + 16|0))>>2]|0; - $100 = ($97>>>0)<($99>>>0); - if ($100) { + $149 = HEAP32[(32692)>>2]|0; + $150 = ($v$0$i$lcssa>>>0)<($149>>>0); + if ($150) { _abort(); // unreachable; - } else { - $101 = (($R$1) + 20|0); - HEAP32[$101>>2] = $97; - $102 = (($97) + 24|0); - HEAP32[$102>>2] = $R$1; - $p$0 = $14;$psize$0 = $15; - break; } - } - } - } else { - $p$0 = $1;$psize$0 = $8; - } - } while(0); - $110 = ($p$0>>>0)<($9>>>0); - if (!($110)) { - _abort(); - // unreachable; - } - $$sum25 = (($8) + -4)|0; - $111 = (($mem) + ($$sum25)|0); - $112 = HEAP32[$111>>2]|0; - $113 = $112 & 1; - $114 = ($113|0)==(0); - if ($114) { - _abort(); - // unreachable; - } - $115 = $112 & 2; - $116 = ($115|0)==(0); - if ($116) { - $117 = HEAP32[((32544 + 24|0))>>2]|0; - $118 = ($9|0)==($117|0); - if ($118) { - $119 = HEAP32[((32544 + 12|0))>>2]|0; - $120 = (($119) + ($psize$0))|0; - HEAP32[((32544 + 12|0))>>2] = $120; - HEAP32[((32544 + 24|0))>>2] = $p$0; - $121 = $120 | 1; - $122 = (($p$0) + 4|0); - HEAP32[$122>>2] = $121; - $123 = HEAP32[((32544 + 20|0))>>2]|0; - $124 = ($p$0|0)==($123|0); - if (!($124)) { - STACKTOP = sp;return; - } - HEAP32[((32544 + 20|0))>>2] = 0; - HEAP32[((32544 + 8|0))>>2] = 0; - STACKTOP = sp;return; - } - $125 = HEAP32[((32544 + 20|0))>>2]|0; - $126 = ($9|0)==($125|0); - if ($126) { - $127 = HEAP32[((32544 + 8|0))>>2]|0; - $128 = (($127) + ($psize$0))|0; - HEAP32[((32544 + 8|0))>>2] = $128; - HEAP32[((32544 + 20|0))>>2] = $p$0; - $129 = $128 | 1; - $130 = (($p$0) + 4|0); - HEAP32[$130>>2] = $129; - $131 = (($p$0) + ($128)|0); - HEAP32[$131>>2] = $128; - STACKTOP = sp;return; - } - $132 = $112 & -8; - $133 = (($132) + ($psize$0))|0; - $134 = $112 >>> 3; - $135 = ($112>>>0)<(256); - do { - if ($135) { - $136 = (($mem) + ($8)|0); - $137 = HEAP32[$136>>2]|0; - $$sum2324 = $8 | 4; - $138 = (($mem) + ($$sum2324)|0); - $139 = HEAP32[$138>>2]|0; - $140 = $134 << 1; - $141 = ((32544 + ($140<<2)|0) + 40|0); - $142 = ($137|0)==($141|0); - if (!($142)) { - $143 = HEAP32[((32544 + 16|0))>>2]|0; - $144 = ($137>>>0)<($143>>>0); - if ($144) { + $151 = (($v$0$i$lcssa) + ($4)|0); + $152 = ($v$0$i$lcssa>>>0)<($151>>>0); + if (!($152)) { _abort(); // unreachable; } - $145 = (($137) + 12|0); - $146 = HEAP32[$145>>2]|0; - $147 = ($146|0)==($9|0); - if (!($147)) { - _abort(); - // unreachable; + $153 = ((($v$0$i$lcssa)) + 24|0); + $154 = HEAP32[$153>>2]|0; + $155 = ((($v$0$i$lcssa)) + 12|0); + $156 = HEAP32[$155>>2]|0; + $157 = ($156|0)==($v$0$i$lcssa|0); + do { + if ($157) { + $167 = ((($v$0$i$lcssa)) + 20|0); + $168 = HEAP32[$167>>2]|0; + $169 = ($168|0)==(0|0); + if ($169) { + $170 = ((($v$0$i$lcssa)) + 16|0); + $171 = HEAP32[$170>>2]|0; + $172 = ($171|0)==(0|0); + if ($172) { + $R$1$i = 0; + break; + } else { + $R$0$i = $171;$RP$0$i = $170; + } + } else { + $R$0$i = $168;$RP$0$i = $167; + } + while(1) { + $173 = ((($R$0$i)) + 20|0); + $174 = HEAP32[$173>>2]|0; + $175 = ($174|0)==(0|0); + if (!($175)) { + $R$0$i = $174;$RP$0$i = $173; + continue; + } + $176 = ((($R$0$i)) + 16|0); + $177 = HEAP32[$176>>2]|0; + $178 = ($177|0)==(0|0); + if ($178) { + $R$0$i$lcssa = $R$0$i;$RP$0$i$lcssa = $RP$0$i; + break; + } else { + $R$0$i = $177;$RP$0$i = $176; + } + } + $179 = ($RP$0$i$lcssa>>>0)<($149>>>0); + if ($179) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$0$i$lcssa>>2] = 0; + $R$1$i = $R$0$i$lcssa; + break; + } + } else { + $158 = ((($v$0$i$lcssa)) + 8|0); + $159 = HEAP32[$158>>2]|0; + $160 = ($159>>>0)<($149>>>0); + if ($160) { + _abort(); + // unreachable; + } + $161 = ((($159)) + 12|0); + $162 = HEAP32[$161>>2]|0; + $163 = ($162|0)==($v$0$i$lcssa|0); + if (!($163)) { + _abort(); + // unreachable; + } + $164 = ((($156)) + 8|0); + $165 = HEAP32[$164>>2]|0; + $166 = ($165|0)==($v$0$i$lcssa|0); + if ($166) { + HEAP32[$161>>2] = $156; + HEAP32[$164>>2] = $159; + $R$1$i = $156; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $180 = ($154|0)==(0|0); + do { + if (!($180)) { + $181 = ((($v$0$i$lcssa)) + 28|0); + $182 = HEAP32[$181>>2]|0; + $183 = (32980 + ($182<<2)|0); + $184 = HEAP32[$183>>2]|0; + $185 = ($v$0$i$lcssa|0)==($184|0); + if ($185) { + HEAP32[$183>>2] = $R$1$i; + $cond$i = ($R$1$i|0)==(0|0); + if ($cond$i) { + $186 = 1 << $182; + $187 = $186 ^ -1; + $188 = HEAP32[(32680)>>2]|0; + $189 = $188 & $187; + HEAP32[(32680)>>2] = $189; + break; + } + } else { + $190 = HEAP32[(32692)>>2]|0; + $191 = ($154>>>0)<($190>>>0); + if ($191) { + _abort(); + // unreachable; + } + $192 = ((($154)) + 16|0); + $193 = HEAP32[$192>>2]|0; + $194 = ($193|0)==($v$0$i$lcssa|0); + if ($194) { + HEAP32[$192>>2] = $R$1$i; + } else { + $195 = ((($154)) + 20|0); + HEAP32[$195>>2] = $R$1$i; + } + $196 = ($R$1$i|0)==(0|0); + if ($196) { + break; + } + } + $197 = HEAP32[(32692)>>2]|0; + $198 = ($R$1$i>>>0)<($197>>>0); + if ($198) { + _abort(); + // unreachable; + } + $199 = ((($R$1$i)) + 24|0); + HEAP32[$199>>2] = $154; + $200 = ((($v$0$i$lcssa)) + 16|0); + $201 = HEAP32[$200>>2]|0; + $202 = ($201|0)==(0|0); + do { + if (!($202)) { + $203 = ($201>>>0)<($197>>>0); + if ($203) { + _abort(); + // unreachable; + } else { + $204 = ((($R$1$i)) + 16|0); + HEAP32[$204>>2] = $201; + $205 = ((($201)) + 24|0); + HEAP32[$205>>2] = $R$1$i; + break; + } + } + } while(0); + $206 = ((($v$0$i$lcssa)) + 20|0); + $207 = HEAP32[$206>>2]|0; + $208 = ($207|0)==(0|0); + if (!($208)) { + $209 = HEAP32[(32692)>>2]|0; + $210 = ($207>>>0)<($209>>>0); + if ($210) { + _abort(); + // unreachable; + } else { + $211 = ((($R$1$i)) + 20|0); + HEAP32[$211>>2] = $207; + $212 = ((($207)) + 24|0); + HEAP32[$212>>2] = $R$1$i; + break; + } + } + } + } while(0); + $213 = ($rsize$0$i$lcssa>>>0)<(16); + if ($213) { + $214 = (($rsize$0$i$lcssa) + ($4))|0; + $215 = $214 | 3; + $216 = ((($v$0$i$lcssa)) + 4|0); + HEAP32[$216>>2] = $215; + $$sum4$i = (($214) + 4)|0; + $217 = (($v$0$i$lcssa) + ($$sum4$i)|0); + $218 = HEAP32[$217>>2]|0; + $219 = $218 | 1; + HEAP32[$217>>2] = $219; + } else { + $220 = $4 | 3; + $221 = ((($v$0$i$lcssa)) + 4|0); + HEAP32[$221>>2] = $220; + $222 = $rsize$0$i$lcssa | 1; + $$sum$i35 = $4 | 4; + $223 = (($v$0$i$lcssa) + ($$sum$i35)|0); + HEAP32[$223>>2] = $222; + $$sum1$i = (($rsize$0$i$lcssa) + ($4))|0; + $224 = (($v$0$i$lcssa) + ($$sum1$i)|0); + HEAP32[$224>>2] = $rsize$0$i$lcssa; + $225 = HEAP32[(32684)>>2]|0; + $226 = ($225|0)==(0); + if (!($226)) { + $227 = HEAP32[(32696)>>2]|0; + $228 = $225 >>> 3; + $229 = $228 << 1; + $230 = (32716 + ($229<<2)|0); + $231 = HEAP32[32676>>2]|0; + $232 = 1 << $228; + $233 = $231 & $232; + $234 = ($233|0)==(0); + if ($234) { + $235 = $231 | $232; + HEAP32[32676>>2] = $235; + $$pre$i = (($229) + 2)|0; + $$pre8$i = (32716 + ($$pre$i<<2)|0); + $$pre$phi$iZ2D = $$pre8$i;$F1$0$i = $230; + } else { + $$sum3$i = (($229) + 2)|0; + $236 = (32716 + ($$sum3$i<<2)|0); + $237 = HEAP32[$236>>2]|0; + $238 = HEAP32[(32692)>>2]|0; + $239 = ($237>>>0)<($238>>>0); + if ($239) { + _abort(); + // unreachable; + } else { + $$pre$phi$iZ2D = $236;$F1$0$i = $237; + } + } + HEAP32[$$pre$phi$iZ2D>>2] = $227; + $240 = ((($F1$0$i)) + 12|0); + HEAP32[$240>>2] = $227; + $241 = ((($227)) + 8|0); + HEAP32[$241>>2] = $F1$0$i; + $242 = ((($227)) + 12|0); + HEAP32[$242>>2] = $230; + } + HEAP32[(32684)>>2] = $rsize$0$i$lcssa; + HEAP32[(32696)>>2] = $151; } + $243 = ((($v$0$i$lcssa)) + 8|0); + $mem$0 = $243; + return ($mem$0|0); } - $148 = ($139|0)==($137|0); - if ($148) { - $149 = 1 << $134; - $150 = $149 ^ -1; - $151 = HEAP32[32544>>2]|0; - $152 = $151 & $150; - HEAP32[32544>>2] = $152; - break; - } - $153 = ($139|0)==($141|0); - if ($153) { - $$pre65 = (($139) + 8|0); - $$pre$phi66Z2D = $$pre65; + } else { + $nb$0 = $4; + } + } else { + $244 = ($bytes>>>0)>(4294967231); + if ($244) { + $nb$0 = -1; + } else { + $245 = (($bytes) + 11)|0; + $246 = $245 & -8; + $247 = HEAP32[(32680)>>2]|0; + $248 = ($247|0)==(0); + if ($248) { + $nb$0 = $246; } else { - $154 = HEAP32[((32544 + 16|0))>>2]|0; - $155 = ($139>>>0)<($154>>>0); - if ($155) { - _abort(); - // unreachable; - } - $156 = (($139) + 8|0); - $157 = HEAP32[$156>>2]|0; - $158 = ($157|0)==($9|0); - if ($158) { - $$pre$phi66Z2D = $156; + $249 = (0 - ($246))|0; + $250 = $245 >>> 8; + $251 = ($250|0)==(0); + if ($251) { + $idx$0$i = 0; } else { - _abort(); - // unreachable; + $252 = ($246>>>0)>(16777215); + if ($252) { + $idx$0$i = 31; + } else { + $253 = (($250) + 1048320)|0; + $254 = $253 >>> 16; + $255 = $254 & 8; + $256 = $250 << $255; + $257 = (($256) + 520192)|0; + $258 = $257 >>> 16; + $259 = $258 & 4; + $260 = $259 | $255; + $261 = $256 << $259; + $262 = (($261) + 245760)|0; + $263 = $262 >>> 16; + $264 = $263 & 2; + $265 = $260 | $264; + $266 = (14 - ($265))|0; + $267 = $261 << $264; + $268 = $267 >>> 15; + $269 = (($266) + ($268))|0; + $270 = $269 << 1; + $271 = (($269) + 7)|0; + $272 = $246 >>> $271; + $273 = $272 & 1; + $274 = $273 | $270; + $idx$0$i = $274; + } } - } - $159 = (($137) + 12|0); - HEAP32[$159>>2] = $139; - HEAP32[$$pre$phi66Z2D>>2] = $137; - } else { - $$sum5 = (($8) + 16)|0; - $160 = (($mem) + ($$sum5)|0); - $161 = HEAP32[$160>>2]|0; - $$sum67 = $8 | 4; - $162 = (($mem) + ($$sum67)|0); - $163 = HEAP32[$162>>2]|0; - $164 = ($163|0)==($9|0); - do { - if ($164) { - $$sum9 = (($8) + 12)|0; - $175 = (($mem) + ($$sum9)|0); - $176 = HEAP32[$175>>2]|0; - $177 = ($176|0)==(0|0); - if ($177) { - $$sum8 = (($8) + 8)|0; - $178 = (($mem) + ($$sum8)|0); - $179 = HEAP32[$178>>2]|0; - $180 = ($179|0)==(0|0); - if ($180) { - $R7$1 = 0; + $275 = (32980 + ($idx$0$i<<2)|0); + $276 = HEAP32[$275>>2]|0; + $277 = ($276|0)==(0|0); + L123: do { + if ($277) { + $rsize$2$i = $249;$t$1$i = 0;$v$2$i = 0; + label = 86; + } else { + $278 = ($idx$0$i|0)==(31); + $279 = $idx$0$i >>> 1; + $280 = (25 - ($279))|0; + $281 = $278 ? 0 : $280; + $282 = $246 << $281; + $rsize$0$i15 = $249;$rst$0$i = 0;$sizebits$0$i = $282;$t$0$i14 = $276;$v$0$i16 = 0; + while(1) { + $283 = ((($t$0$i14)) + 4|0); + $284 = HEAP32[$283>>2]|0; + $285 = $284 & -8; + $286 = (($285) - ($246))|0; + $287 = ($286>>>0)<($rsize$0$i15>>>0); + if ($287) { + $288 = ($285|0)==($246|0); + if ($288) { + $rsize$331$i = $286;$t$230$i = $t$0$i14;$v$332$i = $t$0$i14; + label = 90; + break L123; + } else { + $rsize$1$i = $286;$v$1$i = $t$0$i14; + } + } else { + $rsize$1$i = $rsize$0$i15;$v$1$i = $v$0$i16; + } + $289 = ((($t$0$i14)) + 20|0); + $290 = HEAP32[$289>>2]|0; + $291 = $sizebits$0$i >>> 31; + $292 = (((($t$0$i14)) + 16|0) + ($291<<2)|0); + $293 = HEAP32[$292>>2]|0; + $294 = ($290|0)==(0|0); + $295 = ($290|0)==($293|0); + $or$cond19$i = $294 | $295; + $rst$1$i = $or$cond19$i ? $rst$0$i : $290; + $296 = ($293|0)==(0|0); + $297 = $sizebits$0$i << 1; + if ($296) { + $rsize$2$i = $rsize$1$i;$t$1$i = $rst$1$i;$v$2$i = $v$1$i; + label = 86; + break; + } else { + $rsize$0$i15 = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $297;$t$0$i14 = $293;$v$0$i16 = $v$1$i; + } + } + } + } while(0); + if ((label|0) == 86) { + $298 = ($t$1$i|0)==(0|0); + $299 = ($v$2$i|0)==(0|0); + $or$cond$i = $298 & $299; + if ($or$cond$i) { + $300 = 2 << $idx$0$i; + $301 = (0 - ($300))|0; + $302 = $300 | $301; + $303 = $247 & $302; + $304 = ($303|0)==(0); + if ($304) { + $nb$0 = $246; break; - } else { - $R7$0 = $179;$RP9$0 = $178; } + $305 = (0 - ($303))|0; + $306 = $303 & $305; + $307 = (($306) + -1)|0; + $308 = $307 >>> 12; + $309 = $308 & 16; + $310 = $307 >>> $309; + $311 = $310 >>> 5; + $312 = $311 & 8; + $313 = $312 | $309; + $314 = $310 >>> $312; + $315 = $314 >>> 2; + $316 = $315 & 4; + $317 = $313 | $316; + $318 = $314 >>> $316; + $319 = $318 >>> 1; + $320 = $319 & 2; + $321 = $317 | $320; + $322 = $318 >>> $320; + $323 = $322 >>> 1; + $324 = $323 & 1; + $325 = $321 | $324; + $326 = $322 >>> $324; + $327 = (($325) + ($326))|0; + $328 = (32980 + ($327<<2)|0); + $329 = HEAP32[$328>>2]|0; + $t$2$ph$i = $329;$v$3$ph$i = 0; } else { - $R7$0 = $176;$RP9$0 = $175; + $t$2$ph$i = $t$1$i;$v$3$ph$i = $v$2$i; + } + $330 = ($t$2$ph$i|0)==(0|0); + if ($330) { + $rsize$3$lcssa$i = $rsize$2$i;$v$3$lcssa$i = $v$3$ph$i; + } else { + $rsize$331$i = $rsize$2$i;$t$230$i = $t$2$ph$i;$v$332$i = $v$3$ph$i; + label = 90; } + } + if ((label|0) == 90) { while(1) { - $181 = (($R7$0) + 20|0); - $182 = HEAP32[$181>>2]|0; - $183 = ($182|0)==(0|0); - if (!($183)) { - $R7$0 = $182;$RP9$0 = $181; + label = 0; + $331 = ((($t$230$i)) + 4|0); + $332 = HEAP32[$331>>2]|0; + $333 = $332 & -8; + $334 = (($333) - ($246))|0; + $335 = ($334>>>0)<($rsize$331$i>>>0); + $$rsize$3$i = $335 ? $334 : $rsize$331$i; + $t$2$v$3$i = $335 ? $t$230$i : $v$332$i; + $336 = ((($t$230$i)) + 16|0); + $337 = HEAP32[$336>>2]|0; + $338 = ($337|0)==(0|0); + if (!($338)) { + $rsize$331$i = $$rsize$3$i;$t$230$i = $337;$v$332$i = $t$2$v$3$i; + label = 90; continue; } - $184 = (($R7$0) + 16|0); - $185 = HEAP32[$184>>2]|0; - $186 = ($185|0)==(0|0); - if ($186) { + $339 = ((($t$230$i)) + 20|0); + $340 = HEAP32[$339>>2]|0; + $341 = ($340|0)==(0|0); + if ($341) { + $rsize$3$lcssa$i = $$rsize$3$i;$v$3$lcssa$i = $t$2$v$3$i; break; } else { - $R7$0 = $185;$RP9$0 = $184; + $rsize$331$i = $$rsize$3$i;$t$230$i = $340;$v$332$i = $t$2$v$3$i; + label = 90; } } - $187 = HEAP32[((32544 + 16|0))>>2]|0; - $188 = ($RP9$0>>>0)<($187>>>0); - if ($188) { - _abort(); - // unreachable; - } else { - HEAP32[$RP9$0>>2] = 0; - $R7$1 = $R7$0; - break; - } - } else { - $165 = (($mem) + ($8)|0); - $166 = HEAP32[$165>>2]|0; - $167 = HEAP32[((32544 + 16|0))>>2]|0; - $168 = ($166>>>0)<($167>>>0); - if ($168) { - _abort(); - // unreachable; - } - $169 = (($166) + 12|0); - $170 = HEAP32[$169>>2]|0; - $171 = ($170|0)==($9|0); - if (!($171)) { - _abort(); - // unreachable; - } - $172 = (($163) + 8|0); - $173 = HEAP32[$172>>2]|0; - $174 = ($173|0)==($9|0); - if ($174) { - HEAP32[$169>>2] = $163; - HEAP32[$172>>2] = $166; - $R7$1 = $163; - break; - } else { - _abort(); - // unreachable; - } } - } while(0); - $189 = ($161|0)==(0|0); - if (!($189)) { - $$sum18 = (($8) + 20)|0; - $190 = (($mem) + ($$sum18)|0); - $191 = HEAP32[$190>>2]|0; - $192 = ((32544 + ($191<<2)|0) + 304|0); - $193 = HEAP32[$192>>2]|0; - $194 = ($9|0)==($193|0); - if ($194) { - HEAP32[$192>>2] = $R7$1; - $cond54 = ($R7$1|0)==(0|0); - if ($cond54) { - $195 = 1 << $191; - $196 = $195 ^ -1; - $197 = HEAP32[((32544 + 4|0))>>2]|0; - $198 = $197 & $196; - HEAP32[((32544 + 4|0))>>2] = $198; - break; - } + $342 = ($v$3$lcssa$i|0)==(0|0); + if ($342) { + $nb$0 = $246; } else { - $199 = HEAP32[((32544 + 16|0))>>2]|0; - $200 = ($161>>>0)<($199>>>0); - if ($200) { - _abort(); - // unreachable; - } - $201 = (($161) + 16|0); - $202 = HEAP32[$201>>2]|0; - $203 = ($202|0)==($9|0); - if ($203) { - HEAP32[$201>>2] = $R7$1; - } else { - $204 = (($161) + 20|0); - HEAP32[$204>>2] = $R7$1; - } - $205 = ($R7$1|0)==(0|0); - if ($205) { - break; - } - } - $206 = HEAP32[((32544 + 16|0))>>2]|0; - $207 = ($R7$1>>>0)<($206>>>0); - if ($207) { - _abort(); - // unreachable; - } - $208 = (($R7$1) + 24|0); - HEAP32[$208>>2] = $161; - $$sum19 = (($8) + 8)|0; - $209 = (($mem) + ($$sum19)|0); - $210 = HEAP32[$209>>2]|0; - $211 = ($210|0)==(0|0); - do { - if (!($211)) { - $212 = ($210>>>0)<($206>>>0); - if ($212) { + $343 = HEAP32[(32684)>>2]|0; + $344 = (($343) - ($246))|0; + $345 = ($rsize$3$lcssa$i>>>0)<($344>>>0); + if ($345) { + $346 = HEAP32[(32692)>>2]|0; + $347 = ($v$3$lcssa$i>>>0)<($346>>>0); + if ($347) { _abort(); // unreachable; - } else { - $213 = (($R7$1) + 16|0); - HEAP32[$213>>2] = $210; - $214 = (($210) + 24|0); - HEAP32[$214>>2] = $R7$1; - break; } - } - } while(0); - $$sum20 = (($8) + 12)|0; - $215 = (($mem) + ($$sum20)|0); - $216 = HEAP32[$215>>2]|0; - $217 = ($216|0)==(0|0); - if (!($217)) { - $218 = HEAP32[((32544 + 16|0))>>2]|0; - $219 = ($216>>>0)<($218>>>0); - if ($219) { - _abort(); - // unreachable; + $348 = (($v$3$lcssa$i) + ($246)|0); + $349 = ($v$3$lcssa$i>>>0)<($348>>>0); + if (!($349)) { + _abort(); + // unreachable; + } + $350 = ((($v$3$lcssa$i)) + 24|0); + $351 = HEAP32[$350>>2]|0; + $352 = ((($v$3$lcssa$i)) + 12|0); + $353 = HEAP32[$352>>2]|0; + $354 = ($353|0)==($v$3$lcssa$i|0); + do { + if ($354) { + $364 = ((($v$3$lcssa$i)) + 20|0); + $365 = HEAP32[$364>>2]|0; + $366 = ($365|0)==(0|0); + if ($366) { + $367 = ((($v$3$lcssa$i)) + 16|0); + $368 = HEAP32[$367>>2]|0; + $369 = ($368|0)==(0|0); + if ($369) { + $R$1$i20 = 0; + break; + } else { + $R$0$i18 = $368;$RP$0$i17 = $367; + } + } else { + $R$0$i18 = $365;$RP$0$i17 = $364; + } + while(1) { + $370 = ((($R$0$i18)) + 20|0); + $371 = HEAP32[$370>>2]|0; + $372 = ($371|0)==(0|0); + if (!($372)) { + $R$0$i18 = $371;$RP$0$i17 = $370; + continue; + } + $373 = ((($R$0$i18)) + 16|0); + $374 = HEAP32[$373>>2]|0; + $375 = ($374|0)==(0|0); + if ($375) { + $R$0$i18$lcssa = $R$0$i18;$RP$0$i17$lcssa = $RP$0$i17; + break; + } else { + $R$0$i18 = $374;$RP$0$i17 = $373; + } + } + $376 = ($RP$0$i17$lcssa>>>0)<($346>>>0); + if ($376) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$0$i17$lcssa>>2] = 0; + $R$1$i20 = $R$0$i18$lcssa; + break; + } + } else { + $355 = ((($v$3$lcssa$i)) + 8|0); + $356 = HEAP32[$355>>2]|0; + $357 = ($356>>>0)<($346>>>0); + if ($357) { + _abort(); + // unreachable; + } + $358 = ((($356)) + 12|0); + $359 = HEAP32[$358>>2]|0; + $360 = ($359|0)==($v$3$lcssa$i|0); + if (!($360)) { + _abort(); + // unreachable; + } + $361 = ((($353)) + 8|0); + $362 = HEAP32[$361>>2]|0; + $363 = ($362|0)==($v$3$lcssa$i|0); + if ($363) { + HEAP32[$358>>2] = $353; + HEAP32[$361>>2] = $356; + $R$1$i20 = $353; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $377 = ($351|0)==(0|0); + do { + if (!($377)) { + $378 = ((($v$3$lcssa$i)) + 28|0); + $379 = HEAP32[$378>>2]|0; + $380 = (32980 + ($379<<2)|0); + $381 = HEAP32[$380>>2]|0; + $382 = ($v$3$lcssa$i|0)==($381|0); + if ($382) { + HEAP32[$380>>2] = $R$1$i20; + $cond$i21 = ($R$1$i20|0)==(0|0); + if ($cond$i21) { + $383 = 1 << $379; + $384 = $383 ^ -1; + $385 = HEAP32[(32680)>>2]|0; + $386 = $385 & $384; + HEAP32[(32680)>>2] = $386; + break; + } + } else { + $387 = HEAP32[(32692)>>2]|0; + $388 = ($351>>>0)<($387>>>0); + if ($388) { + _abort(); + // unreachable; + } + $389 = ((($351)) + 16|0); + $390 = HEAP32[$389>>2]|0; + $391 = ($390|0)==($v$3$lcssa$i|0); + if ($391) { + HEAP32[$389>>2] = $R$1$i20; + } else { + $392 = ((($351)) + 20|0); + HEAP32[$392>>2] = $R$1$i20; + } + $393 = ($R$1$i20|0)==(0|0); + if ($393) { + break; + } + } + $394 = HEAP32[(32692)>>2]|0; + $395 = ($R$1$i20>>>0)<($394>>>0); + if ($395) { + _abort(); + // unreachable; + } + $396 = ((($R$1$i20)) + 24|0); + HEAP32[$396>>2] = $351; + $397 = ((($v$3$lcssa$i)) + 16|0); + $398 = HEAP32[$397>>2]|0; + $399 = ($398|0)==(0|0); + do { + if (!($399)) { + $400 = ($398>>>0)<($394>>>0); + if ($400) { + _abort(); + // unreachable; + } else { + $401 = ((($R$1$i20)) + 16|0); + HEAP32[$401>>2] = $398; + $402 = ((($398)) + 24|0); + HEAP32[$402>>2] = $R$1$i20; + break; + } + } + } while(0); + $403 = ((($v$3$lcssa$i)) + 20|0); + $404 = HEAP32[$403>>2]|0; + $405 = ($404|0)==(0|0); + if (!($405)) { + $406 = HEAP32[(32692)>>2]|0; + $407 = ($404>>>0)<($406>>>0); + if ($407) { + _abort(); + // unreachable; + } else { + $408 = ((($R$1$i20)) + 20|0); + HEAP32[$408>>2] = $404; + $409 = ((($404)) + 24|0); + HEAP32[$409>>2] = $R$1$i20; + break; + } + } + } + } while(0); + $410 = ($rsize$3$lcssa$i>>>0)<(16); + L199: do { + if ($410) { + $411 = (($rsize$3$lcssa$i) + ($246))|0; + $412 = $411 | 3; + $413 = ((($v$3$lcssa$i)) + 4|0); + HEAP32[$413>>2] = $412; + $$sum18$i = (($411) + 4)|0; + $414 = (($v$3$lcssa$i) + ($$sum18$i)|0); + $415 = HEAP32[$414>>2]|0; + $416 = $415 | 1; + HEAP32[$414>>2] = $416; + } else { + $417 = $246 | 3; + $418 = ((($v$3$lcssa$i)) + 4|0); + HEAP32[$418>>2] = $417; + $419 = $rsize$3$lcssa$i | 1; + $$sum$i2334 = $246 | 4; + $420 = (($v$3$lcssa$i) + ($$sum$i2334)|0); + HEAP32[$420>>2] = $419; + $$sum1$i24 = (($rsize$3$lcssa$i) + ($246))|0; + $421 = (($v$3$lcssa$i) + ($$sum1$i24)|0); + HEAP32[$421>>2] = $rsize$3$lcssa$i; + $422 = $rsize$3$lcssa$i >>> 3; + $423 = ($rsize$3$lcssa$i>>>0)<(256); + if ($423) { + $424 = $422 << 1; + $425 = (32716 + ($424<<2)|0); + $426 = HEAP32[32676>>2]|0; + $427 = 1 << $422; + $428 = $426 & $427; + $429 = ($428|0)==(0); + if ($429) { + $430 = $426 | $427; + HEAP32[32676>>2] = $430; + $$pre$i25 = (($424) + 2)|0; + $$pre43$i = (32716 + ($$pre$i25<<2)|0); + $$pre$phi$i26Z2D = $$pre43$i;$F5$0$i = $425; + } else { + $$sum17$i = (($424) + 2)|0; + $431 = (32716 + ($$sum17$i<<2)|0); + $432 = HEAP32[$431>>2]|0; + $433 = HEAP32[(32692)>>2]|0; + $434 = ($432>>>0)<($433>>>0); + if ($434) { + _abort(); + // unreachable; + } else { + $$pre$phi$i26Z2D = $431;$F5$0$i = $432; + } + } + HEAP32[$$pre$phi$i26Z2D>>2] = $348; + $435 = ((($F5$0$i)) + 12|0); + HEAP32[$435>>2] = $348; + $$sum15$i = (($246) + 8)|0; + $436 = (($v$3$lcssa$i) + ($$sum15$i)|0); + HEAP32[$436>>2] = $F5$0$i; + $$sum16$i = (($246) + 12)|0; + $437 = (($v$3$lcssa$i) + ($$sum16$i)|0); + HEAP32[$437>>2] = $425; + break; + } + $438 = $rsize$3$lcssa$i >>> 8; + $439 = ($438|0)==(0); + if ($439) { + $I7$0$i = 0; + } else { + $440 = ($rsize$3$lcssa$i>>>0)>(16777215); + if ($440) { + $I7$0$i = 31; + } else { + $441 = (($438) + 1048320)|0; + $442 = $441 >>> 16; + $443 = $442 & 8; + $444 = $438 << $443; + $445 = (($444) + 520192)|0; + $446 = $445 >>> 16; + $447 = $446 & 4; + $448 = $447 | $443; + $449 = $444 << $447; + $450 = (($449) + 245760)|0; + $451 = $450 >>> 16; + $452 = $451 & 2; + $453 = $448 | $452; + $454 = (14 - ($453))|0; + $455 = $449 << $452; + $456 = $455 >>> 15; + $457 = (($454) + ($456))|0; + $458 = $457 << 1; + $459 = (($457) + 7)|0; + $460 = $rsize$3$lcssa$i >>> $459; + $461 = $460 & 1; + $462 = $461 | $458; + $I7$0$i = $462; + } + } + $463 = (32980 + ($I7$0$i<<2)|0); + $$sum2$i = (($246) + 28)|0; + $464 = (($v$3$lcssa$i) + ($$sum2$i)|0); + HEAP32[$464>>2] = $I7$0$i; + $$sum3$i27 = (($246) + 16)|0; + $465 = (($v$3$lcssa$i) + ($$sum3$i27)|0); + $$sum4$i28 = (($246) + 20)|0; + $466 = (($v$3$lcssa$i) + ($$sum4$i28)|0); + HEAP32[$466>>2] = 0; + HEAP32[$465>>2] = 0; + $467 = HEAP32[(32680)>>2]|0; + $468 = 1 << $I7$0$i; + $469 = $467 & $468; + $470 = ($469|0)==(0); + if ($470) { + $471 = $467 | $468; + HEAP32[(32680)>>2] = $471; + HEAP32[$463>>2] = $348; + $$sum5$i = (($246) + 24)|0; + $472 = (($v$3$lcssa$i) + ($$sum5$i)|0); + HEAP32[$472>>2] = $463; + $$sum6$i = (($246) + 12)|0; + $473 = (($v$3$lcssa$i) + ($$sum6$i)|0); + HEAP32[$473>>2] = $348; + $$sum7$i = (($246) + 8)|0; + $474 = (($v$3$lcssa$i) + ($$sum7$i)|0); + HEAP32[$474>>2] = $348; + break; + } + $475 = HEAP32[$463>>2]|0; + $476 = ((($475)) + 4|0); + $477 = HEAP32[$476>>2]|0; + $478 = $477 & -8; + $479 = ($478|0)==($rsize$3$lcssa$i|0); + L217: do { + if ($479) { + $T$0$lcssa$i = $475; + } else { + $480 = ($I7$0$i|0)==(31); + $481 = $I7$0$i >>> 1; + $482 = (25 - ($481))|0; + $483 = $480 ? 0 : $482; + $484 = $rsize$3$lcssa$i << $483; + $K12$029$i = $484;$T$028$i = $475; + while(1) { + $491 = $K12$029$i >>> 31; + $492 = (((($T$028$i)) + 16|0) + ($491<<2)|0); + $487 = HEAP32[$492>>2]|0; + $493 = ($487|0)==(0|0); + if ($493) { + $$lcssa232 = $492;$T$028$i$lcssa = $T$028$i; + break; + } + $485 = $K12$029$i << 1; + $486 = ((($487)) + 4|0); + $488 = HEAP32[$486>>2]|0; + $489 = $488 & -8; + $490 = ($489|0)==($rsize$3$lcssa$i|0); + if ($490) { + $T$0$lcssa$i = $487; + break L217; + } else { + $K12$029$i = $485;$T$028$i = $487; + } + } + $494 = HEAP32[(32692)>>2]|0; + $495 = ($$lcssa232>>>0)<($494>>>0); + if ($495) { + _abort(); + // unreachable; + } else { + HEAP32[$$lcssa232>>2] = $348; + $$sum11$i = (($246) + 24)|0; + $496 = (($v$3$lcssa$i) + ($$sum11$i)|0); + HEAP32[$496>>2] = $T$028$i$lcssa; + $$sum12$i = (($246) + 12)|0; + $497 = (($v$3$lcssa$i) + ($$sum12$i)|0); + HEAP32[$497>>2] = $348; + $$sum13$i = (($246) + 8)|0; + $498 = (($v$3$lcssa$i) + ($$sum13$i)|0); + HEAP32[$498>>2] = $348; + break L199; + } + } + } while(0); + $499 = ((($T$0$lcssa$i)) + 8|0); + $500 = HEAP32[$499>>2]|0; + $501 = HEAP32[(32692)>>2]|0; + $502 = ($500>>>0)>=($501>>>0); + $not$$i = ($T$0$lcssa$i>>>0)>=($501>>>0); + $503 = $502 & $not$$i; + if ($503) { + $504 = ((($500)) + 12|0); + HEAP32[$504>>2] = $348; + HEAP32[$499>>2] = $348; + $$sum8$i = (($246) + 8)|0; + $505 = (($v$3$lcssa$i) + ($$sum8$i)|0); + HEAP32[$505>>2] = $500; + $$sum9$i = (($246) + 12)|0; + $506 = (($v$3$lcssa$i) + ($$sum9$i)|0); + HEAP32[$506>>2] = $T$0$lcssa$i; + $$sum10$i = (($246) + 24)|0; + $507 = (($v$3$lcssa$i) + ($$sum10$i)|0); + HEAP32[$507>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $508 = ((($v$3$lcssa$i)) + 8|0); + $mem$0 = $508; + return ($mem$0|0); } else { - $220 = (($R7$1) + 20|0); - HEAP32[$220>>2] = $216; - $221 = (($216) + 24|0); - HEAP32[$221>>2] = $R7$1; - break; + $nb$0 = $246; } } } } - } while(0); - $222 = $133 | 1; - $223 = (($p$0) + 4|0); - HEAP32[$223>>2] = $222; - $224 = (($p$0) + ($133)|0); - HEAP32[$224>>2] = $133; - $225 = HEAP32[((32544 + 20|0))>>2]|0; - $226 = ($p$0|0)==($225|0); - if ($226) { - HEAP32[((32544 + 8|0))>>2] = $133; - STACKTOP = sp;return; + } + } while(0); + $509 = HEAP32[(32684)>>2]|0; + $510 = ($509>>>0)<($nb$0>>>0); + if (!($510)) { + $511 = (($509) - ($nb$0))|0; + $512 = HEAP32[(32696)>>2]|0; + $513 = ($511>>>0)>(15); + if ($513) { + $514 = (($512) + ($nb$0)|0); + HEAP32[(32696)>>2] = $514; + HEAP32[(32684)>>2] = $511; + $515 = $511 | 1; + $$sum2 = (($nb$0) + 4)|0; + $516 = (($512) + ($$sum2)|0); + HEAP32[$516>>2] = $515; + $517 = (($512) + ($509)|0); + HEAP32[$517>>2] = $511; + $518 = $nb$0 | 3; + $519 = ((($512)) + 4|0); + HEAP32[$519>>2] = $518; } else { - $psize$1 = $133; + HEAP32[(32684)>>2] = 0; + HEAP32[(32696)>>2] = 0; + $520 = $509 | 3; + $521 = ((($512)) + 4|0); + HEAP32[$521>>2] = $520; + $$sum1 = (($509) + 4)|0; + $522 = (($512) + ($$sum1)|0); + $523 = HEAP32[$522>>2]|0; + $524 = $523 | 1; + HEAP32[$522>>2] = $524; } - } else { - $227 = $112 & -2; - HEAP32[$111>>2] = $227; - $228 = $psize$0 | 1; - $229 = (($p$0) + 4|0); - HEAP32[$229>>2] = $228; - $230 = (($p$0) + ($psize$0)|0); - HEAP32[$230>>2] = $psize$0; - $psize$1 = $psize$0; + $525 = ((($512)) + 8|0); + $mem$0 = $525; + return ($mem$0|0); } - $231 = $psize$1 >>> 3; - $232 = ($psize$1>>>0)<(256); - if ($232) { - $233 = $231 << 1; - $234 = ((32544 + ($233<<2)|0) + 40|0); - $235 = HEAP32[32544>>2]|0; - $236 = 1 << $231; - $237 = $235 & $236; - $238 = ($237|0)==(0); - if ($238) { - $239 = $235 | $236; - HEAP32[32544>>2] = $239; - $$sum16$pre = (($233) + 2)|0; - $$pre = ((32544 + ($$sum16$pre<<2)|0) + 40|0); - $$pre$phiZ2D = $$pre;$F16$0 = $234; - } else { - $$sum17 = (($233) + 2)|0; - $240 = ((32544 + ($$sum17<<2)|0) + 40|0); - $241 = HEAP32[$240>>2]|0; - $242 = HEAP32[((32544 + 16|0))>>2]|0; - $243 = ($241>>>0)<($242>>>0); - if ($243) { + $526 = HEAP32[(32688)>>2]|0; + $527 = ($526>>>0)>($nb$0>>>0); + if ($527) { + $528 = (($526) - ($nb$0))|0; + HEAP32[(32688)>>2] = $528; + $529 = HEAP32[(32700)>>2]|0; + $530 = (($529) + ($nb$0)|0); + HEAP32[(32700)>>2] = $530; + $531 = $528 | 1; + $$sum = (($nb$0) + 4)|0; + $532 = (($529) + ($$sum)|0); + HEAP32[$532>>2] = $531; + $533 = $nb$0 | 3; + $534 = ((($529)) + 4|0); + HEAP32[$534>>2] = $533; + $535 = ((($529)) + 8|0); + $mem$0 = $535; + return ($mem$0|0); + } + $536 = HEAP32[33148>>2]|0; + $537 = ($536|0)==(0); + do { + if ($537) { + $538 = (_sysconf(30)|0); + $539 = (($538) + -1)|0; + $540 = $539 & $538; + $541 = ($540|0)==(0); + if ($541) { + HEAP32[(33156)>>2] = $538; + HEAP32[(33152)>>2] = $538; + HEAP32[(33160)>>2] = -1; + HEAP32[(33164)>>2] = -1; + HEAP32[(33168)>>2] = 0; + HEAP32[(33120)>>2] = 0; + $542 = (_time((0|0))|0); + $543 = $542 & -16; + $544 = $543 ^ 1431655768; + HEAP32[33148>>2] = $544; + break; + } else { _abort(); // unreachable; - } else { - $$pre$phiZ2D = $240;$F16$0 = $241; } } - HEAP32[$$pre$phiZ2D>>2] = $p$0; - $244 = (($F16$0) + 12|0); - HEAP32[$244>>2] = $p$0; - $245 = (($p$0) + 8|0); - HEAP32[$245>>2] = $F16$0; - $246 = (($p$0) + 12|0); - HEAP32[$246>>2] = $234; - STACKTOP = sp;return; + } while(0); + $545 = (($nb$0) + 48)|0; + $546 = HEAP32[(33156)>>2]|0; + $547 = (($nb$0) + 47)|0; + $548 = (($546) + ($547))|0; + $549 = (0 - ($546))|0; + $550 = $548 & $549; + $551 = ($550>>>0)>($nb$0>>>0); + if (!($551)) { + $mem$0 = 0; + return ($mem$0|0); } - $247 = $psize$1 >>> 8; - $248 = ($247|0)==(0); - if ($248) { - $I18$0 = 0; - } else { - $249 = ($psize$1>>>0)>(16777215); - if ($249) { - $I18$0 = 31; - } else { - $250 = (($247) + 1048320)|0; - $251 = $250 >>> 16; - $252 = $251 & 8; - $253 = $247 << $252; - $254 = (($253) + 520192)|0; - $255 = $254 >>> 16; - $256 = $255 & 4; - $257 = $256 | $252; - $258 = $253 << $256; - $259 = (($258) + 245760)|0; - $260 = $259 >>> 16; - $261 = $260 & 2; - $262 = $257 | $261; - $263 = (14 - ($262))|0; - $264 = $258 << $261; - $265 = $264 >>> 15; - $266 = (($263) + ($265))|0; - $267 = $266 << 1; - $268 = (($266) + 7)|0; - $269 = $psize$1 >>> $268; - $270 = $269 & 1; - $271 = $270 | $267; - $I18$0 = $271; + $552 = HEAP32[(33116)>>2]|0; + $553 = ($552|0)==(0); + if (!($553)) { + $554 = HEAP32[(33108)>>2]|0; + $555 = (($554) + ($550))|0; + $556 = ($555>>>0)<=($554>>>0); + $557 = ($555>>>0)>($552>>>0); + $or$cond1$i = $556 | $557; + if ($or$cond1$i) { + $mem$0 = 0; + return ($mem$0|0); } } - $272 = ((32544 + ($I18$0<<2)|0) + 304|0); - $273 = (($p$0) + 28|0); - $I18$0$c = $I18$0; - HEAP32[$273>>2] = $I18$0$c; - $274 = (($p$0) + 20|0); - HEAP32[$274>>2] = 0; - $275 = (($p$0) + 16|0); - HEAP32[$275>>2] = 0; - $276 = HEAP32[((32544 + 4|0))>>2]|0; - $277 = 1 << $I18$0; - $278 = $276 & $277; - $279 = ($278|0)==(0); - L199: do { - if ($279) { - $280 = $276 | $277; - HEAP32[((32544 + 4|0))>>2] = $280; - HEAP32[$272>>2] = $p$0; - $281 = (($p$0) + 24|0); - HEAP32[$281>>2] = $272; - $282 = (($p$0) + 12|0); - HEAP32[$282>>2] = $p$0; - $283 = (($p$0) + 8|0); - HEAP32[$283>>2] = $p$0; - } else { - $284 = HEAP32[$272>>2]|0; - $285 = ($I18$0|0)==(31); - if ($285) { - $293 = 0; - } else { - $286 = $I18$0 >>> 1; - $287 = (25 - ($286))|0; - $293 = $287; - } - $288 = (($284) + 4|0); - $289 = HEAP32[$288>>2]|0; - $290 = $289 & -8; - $291 = ($290|0)==($psize$1|0); - L205: do { - if ($291) { - $T$0$lcssa = $284; + $558 = HEAP32[(33120)>>2]|0; + $559 = $558 & 4; + $560 = ($559|0)==(0); + L258: do { + if ($560) { + $561 = HEAP32[(32700)>>2]|0; + $562 = ($561|0)==(0|0); + L260: do { + if ($562) { + label = 174; } else { - $292 = $psize$1 << $293; - $K19$058 = $292;$T$057 = $284; + $sp$0$i$i = (33124); while(1) { - $300 = $K19$058 >>> 31; - $301 = ((($T$057) + ($300<<2)|0) + 16|0); - $296 = HEAP32[$301>>2]|0; - $302 = ($296|0)==(0|0); - if ($302) { - break; + $563 = HEAP32[$sp$0$i$i>>2]|0; + $564 = ($563>>>0)>($561>>>0); + if (!($564)) { + $565 = ((($sp$0$i$i)) + 4|0); + $566 = HEAP32[$565>>2]|0; + $567 = (($563) + ($566)|0); + $568 = ($567>>>0)>($561>>>0); + if ($568) { + $$lcssa228 = $sp$0$i$i;$$lcssa230 = $565; + break; + } } - $294 = $K19$058 << 1; - $295 = (($296) + 4|0); - $297 = HEAP32[$295>>2]|0; - $298 = $297 & -8; - $299 = ($298|0)==($psize$1|0); - if ($299) { - $T$0$lcssa = $296; - break L205; + $569 = ((($sp$0$i$i)) + 8|0); + $570 = HEAP32[$569>>2]|0; + $571 = ($570|0)==(0|0); + if ($571) { + label = 174; + break L260; } else { - $K19$058 = $294;$T$057 = $296; + $sp$0$i$i = $570; } } - $303 = HEAP32[((32544 + 16|0))>>2]|0; - $304 = ($301>>>0)<($303>>>0); - if ($304) { - _abort(); - // unreachable; + $594 = HEAP32[(32688)>>2]|0; + $595 = (($548) - ($594))|0; + $596 = $595 & $549; + $597 = ($596>>>0)<(2147483647); + if ($597) { + $598 = (_sbrk(($596|0))|0); + $599 = HEAP32[$$lcssa228>>2]|0; + $600 = HEAP32[$$lcssa230>>2]|0; + $601 = (($599) + ($600)|0); + $602 = ($598|0)==($601|0); + $$3$i = $602 ? $596 : 0; + if ($602) { + $603 = ($598|0)==((-1)|0); + if ($603) { + $tsize$0323944$i = $$3$i; + } else { + $tbase$255$i = $598;$tsize$254$i = $$3$i; + label = 194; + break L258; + } + } else { + $br$0$ph$i = $598;$ssize$1$ph$i = $596;$tsize$0$ph$i = $$3$i; + label = 184; + } } else { - HEAP32[$301>>2] = $p$0; - $305 = (($p$0) + 24|0); - HEAP32[$305>>2] = $T$057; - $306 = (($p$0) + 12|0); - HEAP32[$306>>2] = $p$0; - $307 = (($p$0) + 8|0); - HEAP32[$307>>2] = $p$0; - break L199; + $tsize$0323944$i = 0; } } - } while(0); - $308 = (($T$0$lcssa) + 8|0); - $309 = HEAP32[$308>>2]|0; - $310 = HEAP32[((32544 + 16|0))>>2]|0; - $311 = ($T$0$lcssa>>>0)>=($310>>>0); - $312 = ($309>>>0)>=($310>>>0); - $or$cond = $311 & $312; - if ($or$cond) { - $313 = (($309) + 12|0); - HEAP32[$313>>2] = $p$0; - HEAP32[$308>>2] = $p$0; - $314 = (($p$0) + 8|0); - HEAP32[$314>>2] = $309; - $315 = (($p$0) + 12|0); - HEAP32[$315>>2] = $T$0$lcssa; - $316 = (($p$0) + 24|0); - HEAP32[$316>>2] = 0; - break; - } else { - _abort(); - // unreachable; + } while(0); + do { + if ((label|0) == 174) { + $572 = (_sbrk(0)|0); + $573 = ($572|0)==((-1)|0); + if ($573) { + $tsize$0323944$i = 0; + } else { + $574 = $572; + $575 = HEAP32[(33152)>>2]|0; + $576 = (($575) + -1)|0; + $577 = $576 & $574; + $578 = ($577|0)==(0); + if ($578) { + $ssize$0$i = $550; + } else { + $579 = (($576) + ($574))|0; + $580 = (0 - ($575))|0; + $581 = $579 & $580; + $582 = (($550) - ($574))|0; + $583 = (($582) + ($581))|0; + $ssize$0$i = $583; + } + $584 = HEAP32[(33108)>>2]|0; + $585 = (($584) + ($ssize$0$i))|0; + $586 = ($ssize$0$i>>>0)>($nb$0>>>0); + $587 = ($ssize$0$i>>>0)<(2147483647); + $or$cond$i30 = $586 & $587; + if ($or$cond$i30) { + $588 = HEAP32[(33116)>>2]|0; + $589 = ($588|0)==(0); + if (!($589)) { + $590 = ($585>>>0)<=($584>>>0); + $591 = ($585>>>0)>($588>>>0); + $or$cond2$i = $590 | $591; + if ($or$cond2$i) { + $tsize$0323944$i = 0; + break; + } + } + $592 = (_sbrk(($ssize$0$i|0))|0); + $593 = ($592|0)==($572|0); + $ssize$0$$i = $593 ? $ssize$0$i : 0; + if ($593) { + $tbase$255$i = $572;$tsize$254$i = $ssize$0$$i; + label = 194; + break L258; + } else { + $br$0$ph$i = $592;$ssize$1$ph$i = $ssize$0$i;$tsize$0$ph$i = $ssize$0$$i; + label = 184; + } + } else { + $tsize$0323944$i = 0; + } + } + } + } while(0); + L280: do { + if ((label|0) == 184) { + $604 = (0 - ($ssize$1$ph$i))|0; + $605 = ($br$0$ph$i|0)!=((-1)|0); + $606 = ($ssize$1$ph$i>>>0)<(2147483647); + $or$cond5$i = $606 & $605; + $607 = ($545>>>0)>($ssize$1$ph$i>>>0); + $or$cond6$i = $607 & $or$cond5$i; + do { + if ($or$cond6$i) { + $608 = HEAP32[(33156)>>2]|0; + $609 = (($547) - ($ssize$1$ph$i))|0; + $610 = (($609) + ($608))|0; + $611 = (0 - ($608))|0; + $612 = $610 & $611; + $613 = ($612>>>0)<(2147483647); + if ($613) { + $614 = (_sbrk(($612|0))|0); + $615 = ($614|0)==((-1)|0); + if ($615) { + (_sbrk(($604|0))|0); + $tsize$0323944$i = $tsize$0$ph$i; + break L280; + } else { + $616 = (($612) + ($ssize$1$ph$i))|0; + $ssize$2$i = $616; + break; + } + } else { + $ssize$2$i = $ssize$1$ph$i; + } + } else { + $ssize$2$i = $ssize$1$ph$i; + } + } while(0); + $617 = ($br$0$ph$i|0)==((-1)|0); + if ($617) { + $tsize$0323944$i = $tsize$0$ph$i; + } else { + $tbase$255$i = $br$0$ph$i;$tsize$254$i = $ssize$2$i; + label = 194; + break L258; + } + } + } while(0); + $618 = HEAP32[(33120)>>2]|0; + $619 = $618 | 4; + HEAP32[(33120)>>2] = $619; + $tsize$1$i = $tsize$0323944$i; + label = 191; + } else { + $tsize$1$i = 0; + label = 191; + } + } while(0); + if ((label|0) == 191) { + $620 = ($550>>>0)<(2147483647); + if ($620) { + $621 = (_sbrk(($550|0))|0); + $622 = (_sbrk(0)|0); + $623 = ($621|0)!=((-1)|0); + $624 = ($622|0)!=((-1)|0); + $or$cond3$i = $623 & $624; + $625 = ($621>>>0)<($622>>>0); + $or$cond8$i = $625 & $or$cond3$i; + if ($or$cond8$i) { + $626 = $622; + $627 = $621; + $628 = (($626) - ($627))|0; + $629 = (($nb$0) + 40)|0; + $630 = ($628>>>0)>($629>>>0); + $$tsize$1$i = $630 ? $628 : $tsize$1$i; + if ($630) { + $tbase$255$i = $621;$tsize$254$i = $$tsize$1$i; + label = 194; + } } } - } while(0); - $317 = HEAP32[((32544 + 32|0))>>2]|0; - $318 = (($317) + -1)|0; - HEAP32[((32544 + 32|0))>>2] = $318; - $319 = ($318|0)==(0); - if ($319) { - $sp$0$in$i = ((32544 + 456|0)); - } else { - STACKTOP = sp;return; } - while(1) { - $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; - $320 = ($sp$0$i|0)==(0|0); - $321 = (($sp$0$i) + 8|0); - if ($320) { - break; - } else { - $sp$0$in$i = $321; + if ((label|0) == 194) { + $631 = HEAP32[(33108)>>2]|0; + $632 = (($631) + ($tsize$254$i))|0; + HEAP32[(33108)>>2] = $632; + $633 = HEAP32[(33112)>>2]|0; + $634 = ($632>>>0)>($633>>>0); + if ($634) { + HEAP32[(33112)>>2] = $632; } - } - HEAP32[((32544 + 32|0))>>2] = -1; - STACKTOP = sp;return; -} -function runPostSets() { - -} -function _bitshift64Ashr(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = high >> bits; - return (low >>> bits) | ((high&ander) << (32 - bits)); + $635 = HEAP32[(32700)>>2]|0; + $636 = ($635|0)==(0|0); + L299: do { + if ($636) { + $637 = HEAP32[(32692)>>2]|0; + $638 = ($637|0)==(0|0); + $639 = ($tbase$255$i>>>0)<($637>>>0); + $or$cond9$i = $638 | $639; + if ($or$cond9$i) { + HEAP32[(32692)>>2] = $tbase$255$i; } - tempRet0 = (high|0) < 0 ? -1 : 0; - return (high >> (bits - 32))|0; -} -function _i64Subtract(a, b, c, d) { - a = a|0; b = b|0; c = c|0; d = d|0; - var l = 0, h = 0; - l = (a - c)>>>0; - h = (b - d)>>>0; - h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow. - return ((tempRet0 = h,l|0)|0); -} -function _i64Add(a, b, c, d) { - /* - x = a + b*2^32 - y = c + d*2^32 - result = l + h*2^32 - */ - a = a|0; b = b|0; c = c|0; d = d|0; - var l = 0, h = 0; - l = (a + c)>>>0; - h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow. - return ((tempRet0 = h,l|0)|0); -} -function _memset(ptr, value, num) { - ptr = ptr|0; value = value|0; num = num|0; - var stop = 0, value4 = 0, stop4 = 0, unaligned = 0; - stop = (ptr + num)|0; - if ((num|0) >= 20) { - // This is unaligned, but quite large, so work hard to get to aligned settings - value = value & 0xff; - unaligned = ptr & 3; - value4 = value | (value << 8) | (value << 16) | (value << 24); - stop4 = stop & ~3; - if (unaligned) { - unaligned = (ptr + 4 - unaligned)|0; - while ((ptr|0) < (unaligned|0)) { // no need to check for stop, since we have large num - HEAP8[((ptr)>>0)]=value; - ptr = (ptr+1)|0; + HEAP32[(33124)>>2] = $tbase$255$i; + HEAP32[(33128)>>2] = $tsize$254$i; + HEAP32[(33136)>>2] = 0; + $640 = HEAP32[33148>>2]|0; + HEAP32[(32712)>>2] = $640; + HEAP32[(32708)>>2] = -1; + $i$02$i$i = 0; + while(1) { + $641 = $i$02$i$i << 1; + $642 = (32716 + ($641<<2)|0); + $$sum$i$i = (($641) + 3)|0; + $643 = (32716 + ($$sum$i$i<<2)|0); + HEAP32[$643>>2] = $642; + $$sum1$i$i = (($641) + 2)|0; + $644 = (32716 + ($$sum1$i$i<<2)|0); + HEAP32[$644>>2] = $642; + $645 = (($i$02$i$i) + 1)|0; + $exitcond$i$i = ($645|0)==(32); + if ($exitcond$i$i) { + break; + } else { + $i$02$i$i = $645; + } + } + $646 = (($tsize$254$i) + -40)|0; + $647 = ((($tbase$255$i)) + 8|0); + $648 = $647; + $649 = $648 & 7; + $650 = ($649|0)==(0); + $651 = (0 - ($648))|0; + $652 = $651 & 7; + $653 = $650 ? 0 : $652; + $654 = (($tbase$255$i) + ($653)|0); + $655 = (($646) - ($653))|0; + HEAP32[(32700)>>2] = $654; + HEAP32[(32688)>>2] = $655; + $656 = $655 | 1; + $$sum$i13$i = (($653) + 4)|0; + $657 = (($tbase$255$i) + ($$sum$i13$i)|0); + HEAP32[$657>>2] = $656; + $$sum2$i$i = (($tsize$254$i) + -36)|0; + $658 = (($tbase$255$i) + ($$sum2$i$i)|0); + HEAP32[$658>>2] = 40; + $659 = HEAP32[(33164)>>2]|0; + HEAP32[(32704)>>2] = $659; + } else { + $sp$084$i = (33124); + while(1) { + $660 = HEAP32[$sp$084$i>>2]|0; + $661 = ((($sp$084$i)) + 4|0); + $662 = HEAP32[$661>>2]|0; + $663 = (($660) + ($662)|0); + $664 = ($tbase$255$i|0)==($663|0); + if ($664) { + $$lcssa222 = $660;$$lcssa224 = $661;$$lcssa226 = $662;$sp$084$i$lcssa = $sp$084$i; + label = 204; + break; + } + $665 = ((($sp$084$i)) + 8|0); + $666 = HEAP32[$665>>2]|0; + $667 = ($666|0)==(0|0); + if ($667) { + break; + } else { + $sp$084$i = $666; + } + } + if ((label|0) == 204) { + $668 = ((($sp$084$i$lcssa)) + 12|0); + $669 = HEAP32[$668>>2]|0; + $670 = $669 & 8; + $671 = ($670|0)==(0); + if ($671) { + $672 = ($635>>>0)>=($$lcssa222>>>0); + $673 = ($635>>>0)<($tbase$255$i>>>0); + $or$cond57$i = $673 & $672; + if ($or$cond57$i) { + $674 = (($$lcssa226) + ($tsize$254$i))|0; + HEAP32[$$lcssa224>>2] = $674; + $675 = HEAP32[(32688)>>2]|0; + $676 = (($675) + ($tsize$254$i))|0; + $677 = ((($635)) + 8|0); + $678 = $677; + $679 = $678 & 7; + $680 = ($679|0)==(0); + $681 = (0 - ($678))|0; + $682 = $681 & 7; + $683 = $680 ? 0 : $682; + $684 = (($635) + ($683)|0); + $685 = (($676) - ($683))|0; + HEAP32[(32700)>>2] = $684; + HEAP32[(32688)>>2] = $685; + $686 = $685 | 1; + $$sum$i17$i = (($683) + 4)|0; + $687 = (($635) + ($$sum$i17$i)|0); + HEAP32[$687>>2] = $686; + $$sum2$i18$i = (($676) + 4)|0; + $688 = (($635) + ($$sum2$i18$i)|0); + HEAP32[$688>>2] = 40; + $689 = HEAP32[(33164)>>2]|0; + HEAP32[(32704)>>2] = $689; + break; + } + } + } + $690 = HEAP32[(32692)>>2]|0; + $691 = ($tbase$255$i>>>0)<($690>>>0); + if ($691) { + HEAP32[(32692)>>2] = $tbase$255$i; + $755 = $tbase$255$i; + } else { + $755 = $690; + } + $692 = (($tbase$255$i) + ($tsize$254$i)|0); + $sp$183$i = (33124); + while(1) { + $693 = HEAP32[$sp$183$i>>2]|0; + $694 = ($693|0)==($692|0); + if ($694) { + $$lcssa219 = $sp$183$i;$sp$183$i$lcssa = $sp$183$i; + label = 212; + break; + } + $695 = ((($sp$183$i)) + 8|0); + $696 = HEAP32[$695>>2]|0; + $697 = ($696|0)==(0|0); + if ($697) { + $sp$0$i$i$i = (33124); + break; + } else { + $sp$183$i = $696; + } + } + if ((label|0) == 212) { + $698 = ((($sp$183$i$lcssa)) + 12|0); + $699 = HEAP32[$698>>2]|0; + $700 = $699 & 8; + $701 = ($700|0)==(0); + if ($701) { + HEAP32[$$lcssa219>>2] = $tbase$255$i; + $702 = ((($sp$183$i$lcssa)) + 4|0); + $703 = HEAP32[$702>>2]|0; + $704 = (($703) + ($tsize$254$i))|0; + HEAP32[$702>>2] = $704; + $705 = ((($tbase$255$i)) + 8|0); + $706 = $705; + $707 = $706 & 7; + $708 = ($707|0)==(0); + $709 = (0 - ($706))|0; + $710 = $709 & 7; + $711 = $708 ? 0 : $710; + $712 = (($tbase$255$i) + ($711)|0); + $$sum112$i = (($tsize$254$i) + 8)|0; + $713 = (($tbase$255$i) + ($$sum112$i)|0); + $714 = $713; + $715 = $714 & 7; + $716 = ($715|0)==(0); + $717 = (0 - ($714))|0; + $718 = $717 & 7; + $719 = $716 ? 0 : $718; + $$sum113$i = (($719) + ($tsize$254$i))|0; + $720 = (($tbase$255$i) + ($$sum113$i)|0); + $721 = $720; + $722 = $712; + $723 = (($721) - ($722))|0; + $$sum$i19$i = (($711) + ($nb$0))|0; + $724 = (($tbase$255$i) + ($$sum$i19$i)|0); + $725 = (($723) - ($nb$0))|0; + $726 = $nb$0 | 3; + $$sum1$i20$i = (($711) + 4)|0; + $727 = (($tbase$255$i) + ($$sum1$i20$i)|0); + HEAP32[$727>>2] = $726; + $728 = ($720|0)==($635|0); + L324: do { + if ($728) { + $729 = HEAP32[(32688)>>2]|0; + $730 = (($729) + ($725))|0; + HEAP32[(32688)>>2] = $730; + HEAP32[(32700)>>2] = $724; + $731 = $730 | 1; + $$sum42$i$i = (($$sum$i19$i) + 4)|0; + $732 = (($tbase$255$i) + ($$sum42$i$i)|0); + HEAP32[$732>>2] = $731; + } else { + $733 = HEAP32[(32696)>>2]|0; + $734 = ($720|0)==($733|0); + if ($734) { + $735 = HEAP32[(32684)>>2]|0; + $736 = (($735) + ($725))|0; + HEAP32[(32684)>>2] = $736; + HEAP32[(32696)>>2] = $724; + $737 = $736 | 1; + $$sum40$i$i = (($$sum$i19$i) + 4)|0; + $738 = (($tbase$255$i) + ($$sum40$i$i)|0); + HEAP32[$738>>2] = $737; + $$sum41$i$i = (($736) + ($$sum$i19$i))|0; + $739 = (($tbase$255$i) + ($$sum41$i$i)|0); + HEAP32[$739>>2] = $736; + break; + } + $$sum2$i21$i = (($tsize$254$i) + 4)|0; + $$sum114$i = (($$sum2$i21$i) + ($719))|0; + $740 = (($tbase$255$i) + ($$sum114$i)|0); + $741 = HEAP32[$740>>2]|0; + $742 = $741 & 3; + $743 = ($742|0)==(1); + if ($743) { + $744 = $741 & -8; + $745 = $741 >>> 3; + $746 = ($741>>>0)<(256); + L332: do { + if ($746) { + $$sum3738$i$i = $719 | 8; + $$sum124$i = (($$sum3738$i$i) + ($tsize$254$i))|0; + $747 = (($tbase$255$i) + ($$sum124$i)|0); + $748 = HEAP32[$747>>2]|0; + $$sum39$i$i = (($tsize$254$i) + 12)|0; + $$sum125$i = (($$sum39$i$i) + ($719))|0; + $749 = (($tbase$255$i) + ($$sum125$i)|0); + $750 = HEAP32[$749>>2]|0; + $751 = $745 << 1; + $752 = (32716 + ($751<<2)|0); + $753 = ($748|0)==($752|0); + do { + if (!($753)) { + $754 = ($748>>>0)<($755>>>0); + if ($754) { + _abort(); + // unreachable; + } + $756 = ((($748)) + 12|0); + $757 = HEAP32[$756>>2]|0; + $758 = ($757|0)==($720|0); + if ($758) { + break; + } + _abort(); + // unreachable; + } + } while(0); + $759 = ($750|0)==($748|0); + if ($759) { + $760 = 1 << $745; + $761 = $760 ^ -1; + $762 = HEAP32[32676>>2]|0; + $763 = $762 & $761; + HEAP32[32676>>2] = $763; + break; + } + $764 = ($750|0)==($752|0); + do { + if ($764) { + $$pre57$i$i = ((($750)) + 8|0); + $$pre$phi58$i$iZ2D = $$pre57$i$i; + } else { + $765 = ($750>>>0)<($755>>>0); + if ($765) { + _abort(); + // unreachable; + } + $766 = ((($750)) + 8|0); + $767 = HEAP32[$766>>2]|0; + $768 = ($767|0)==($720|0); + if ($768) { + $$pre$phi58$i$iZ2D = $766; + break; + } + _abort(); + // unreachable; + } + } while(0); + $769 = ((($748)) + 12|0); + HEAP32[$769>>2] = $750; + HEAP32[$$pre$phi58$i$iZ2D>>2] = $748; + } else { + $$sum34$i$i = $719 | 24; + $$sum115$i = (($$sum34$i$i) + ($tsize$254$i))|0; + $770 = (($tbase$255$i) + ($$sum115$i)|0); + $771 = HEAP32[$770>>2]|0; + $$sum5$i$i = (($tsize$254$i) + 12)|0; + $$sum116$i = (($$sum5$i$i) + ($719))|0; + $772 = (($tbase$255$i) + ($$sum116$i)|0); + $773 = HEAP32[$772>>2]|0; + $774 = ($773|0)==($720|0); + do { + if ($774) { + $$sum67$i$i = $719 | 16; + $$sum122$i = (($$sum2$i21$i) + ($$sum67$i$i))|0; + $784 = (($tbase$255$i) + ($$sum122$i)|0); + $785 = HEAP32[$784>>2]|0; + $786 = ($785|0)==(0|0); + if ($786) { + $$sum123$i = (($$sum67$i$i) + ($tsize$254$i))|0; + $787 = (($tbase$255$i) + ($$sum123$i)|0); + $788 = HEAP32[$787>>2]|0; + $789 = ($788|0)==(0|0); + if ($789) { + $R$1$i$i = 0; + break; + } else { + $R$0$i$i = $788;$RP$0$i$i = $787; + } + } else { + $R$0$i$i = $785;$RP$0$i$i = $784; + } + while(1) { + $790 = ((($R$0$i$i)) + 20|0); + $791 = HEAP32[$790>>2]|0; + $792 = ($791|0)==(0|0); + if (!($792)) { + $R$0$i$i = $791;$RP$0$i$i = $790; + continue; + } + $793 = ((($R$0$i$i)) + 16|0); + $794 = HEAP32[$793>>2]|0; + $795 = ($794|0)==(0|0); + if ($795) { + $R$0$i$i$lcssa = $R$0$i$i;$RP$0$i$i$lcssa = $RP$0$i$i; + break; + } else { + $R$0$i$i = $794;$RP$0$i$i = $793; + } + } + $796 = ($RP$0$i$i$lcssa>>>0)<($755>>>0); + if ($796) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$0$i$i$lcssa>>2] = 0; + $R$1$i$i = $R$0$i$i$lcssa; + break; + } + } else { + $$sum3536$i$i = $719 | 8; + $$sum117$i = (($$sum3536$i$i) + ($tsize$254$i))|0; + $775 = (($tbase$255$i) + ($$sum117$i)|0); + $776 = HEAP32[$775>>2]|0; + $777 = ($776>>>0)<($755>>>0); + if ($777) { + _abort(); + // unreachable; + } + $778 = ((($776)) + 12|0); + $779 = HEAP32[$778>>2]|0; + $780 = ($779|0)==($720|0); + if (!($780)) { + _abort(); + // unreachable; + } + $781 = ((($773)) + 8|0); + $782 = HEAP32[$781>>2]|0; + $783 = ($782|0)==($720|0); + if ($783) { + HEAP32[$778>>2] = $773; + HEAP32[$781>>2] = $776; + $R$1$i$i = $773; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $797 = ($771|0)==(0|0); + if ($797) { + break; + } + $$sum30$i$i = (($tsize$254$i) + 28)|0; + $$sum118$i = (($$sum30$i$i) + ($719))|0; + $798 = (($tbase$255$i) + ($$sum118$i)|0); + $799 = HEAP32[$798>>2]|0; + $800 = (32980 + ($799<<2)|0); + $801 = HEAP32[$800>>2]|0; + $802 = ($720|0)==($801|0); + do { + if ($802) { + HEAP32[$800>>2] = $R$1$i$i; + $cond$i$i = ($R$1$i$i|0)==(0|0); + if (!($cond$i$i)) { + break; + } + $803 = 1 << $799; + $804 = $803 ^ -1; + $805 = HEAP32[(32680)>>2]|0; + $806 = $805 & $804; + HEAP32[(32680)>>2] = $806; + break L332; + } else { + $807 = HEAP32[(32692)>>2]|0; + $808 = ($771>>>0)<($807>>>0); + if ($808) { + _abort(); + // unreachable; + } + $809 = ((($771)) + 16|0); + $810 = HEAP32[$809>>2]|0; + $811 = ($810|0)==($720|0); + if ($811) { + HEAP32[$809>>2] = $R$1$i$i; + } else { + $812 = ((($771)) + 20|0); + HEAP32[$812>>2] = $R$1$i$i; + } + $813 = ($R$1$i$i|0)==(0|0); + if ($813) { + break L332; + } + } + } while(0); + $814 = HEAP32[(32692)>>2]|0; + $815 = ($R$1$i$i>>>0)<($814>>>0); + if ($815) { + _abort(); + // unreachable; + } + $816 = ((($R$1$i$i)) + 24|0); + HEAP32[$816>>2] = $771; + $$sum3132$i$i = $719 | 16; + $$sum119$i = (($$sum3132$i$i) + ($tsize$254$i))|0; + $817 = (($tbase$255$i) + ($$sum119$i)|0); + $818 = HEAP32[$817>>2]|0; + $819 = ($818|0)==(0|0); + do { + if (!($819)) { + $820 = ($818>>>0)<($814>>>0); + if ($820) { + _abort(); + // unreachable; + } else { + $821 = ((($R$1$i$i)) + 16|0); + HEAP32[$821>>2] = $818; + $822 = ((($818)) + 24|0); + HEAP32[$822>>2] = $R$1$i$i; + break; + } + } + } while(0); + $$sum120$i = (($$sum2$i21$i) + ($$sum3132$i$i))|0; + $823 = (($tbase$255$i) + ($$sum120$i)|0); + $824 = HEAP32[$823>>2]|0; + $825 = ($824|0)==(0|0); + if ($825) { + break; + } + $826 = HEAP32[(32692)>>2]|0; + $827 = ($824>>>0)<($826>>>0); + if ($827) { + _abort(); + // unreachable; + } else { + $828 = ((($R$1$i$i)) + 20|0); + HEAP32[$828>>2] = $824; + $829 = ((($824)) + 24|0); + HEAP32[$829>>2] = $R$1$i$i; + break; + } + } + } while(0); + $$sum9$i$i = $744 | $719; + $$sum121$i = (($$sum9$i$i) + ($tsize$254$i))|0; + $830 = (($tbase$255$i) + ($$sum121$i)|0); + $831 = (($744) + ($725))|0; + $oldfirst$0$i$i = $830;$qsize$0$i$i = $831; + } else { + $oldfirst$0$i$i = $720;$qsize$0$i$i = $725; + } + $832 = ((($oldfirst$0$i$i)) + 4|0); + $833 = HEAP32[$832>>2]|0; + $834 = $833 & -2; + HEAP32[$832>>2] = $834; + $835 = $qsize$0$i$i | 1; + $$sum10$i$i = (($$sum$i19$i) + 4)|0; + $836 = (($tbase$255$i) + ($$sum10$i$i)|0); + HEAP32[$836>>2] = $835; + $$sum11$i$i = (($qsize$0$i$i) + ($$sum$i19$i))|0; + $837 = (($tbase$255$i) + ($$sum11$i$i)|0); + HEAP32[$837>>2] = $qsize$0$i$i; + $838 = $qsize$0$i$i >>> 3; + $839 = ($qsize$0$i$i>>>0)<(256); + if ($839) { + $840 = $838 << 1; + $841 = (32716 + ($840<<2)|0); + $842 = HEAP32[32676>>2]|0; + $843 = 1 << $838; + $844 = $842 & $843; + $845 = ($844|0)==(0); + do { + if ($845) { + $846 = $842 | $843; + HEAP32[32676>>2] = $846; + $$pre$i22$i = (($840) + 2)|0; + $$pre56$i$i = (32716 + ($$pre$i22$i<<2)|0); + $$pre$phi$i23$iZ2D = $$pre56$i$i;$F4$0$i$i = $841; + } else { + $$sum29$i$i = (($840) + 2)|0; + $847 = (32716 + ($$sum29$i$i<<2)|0); + $848 = HEAP32[$847>>2]|0; + $849 = HEAP32[(32692)>>2]|0; + $850 = ($848>>>0)<($849>>>0); + if (!($850)) { + $$pre$phi$i23$iZ2D = $847;$F4$0$i$i = $848; + break; + } + _abort(); + // unreachable; + } + } while(0); + HEAP32[$$pre$phi$i23$iZ2D>>2] = $724; + $851 = ((($F4$0$i$i)) + 12|0); + HEAP32[$851>>2] = $724; + $$sum27$i$i = (($$sum$i19$i) + 8)|0; + $852 = (($tbase$255$i) + ($$sum27$i$i)|0); + HEAP32[$852>>2] = $F4$0$i$i; + $$sum28$i$i = (($$sum$i19$i) + 12)|0; + $853 = (($tbase$255$i) + ($$sum28$i$i)|0); + HEAP32[$853>>2] = $841; + break; + } + $854 = $qsize$0$i$i >>> 8; + $855 = ($854|0)==(0); + do { + if ($855) { + $I7$0$i$i = 0; + } else { + $856 = ($qsize$0$i$i>>>0)>(16777215); + if ($856) { + $I7$0$i$i = 31; + break; + } + $857 = (($854) + 1048320)|0; + $858 = $857 >>> 16; + $859 = $858 & 8; + $860 = $854 << $859; + $861 = (($860) + 520192)|0; + $862 = $861 >>> 16; + $863 = $862 & 4; + $864 = $863 | $859; + $865 = $860 << $863; + $866 = (($865) + 245760)|0; + $867 = $866 >>> 16; + $868 = $867 & 2; + $869 = $864 | $868; + $870 = (14 - ($869))|0; + $871 = $865 << $868; + $872 = $871 >>> 15; + $873 = (($870) + ($872))|0; + $874 = $873 << 1; + $875 = (($873) + 7)|0; + $876 = $qsize$0$i$i >>> $875; + $877 = $876 & 1; + $878 = $877 | $874; + $I7$0$i$i = $878; + } + } while(0); + $879 = (32980 + ($I7$0$i$i<<2)|0); + $$sum12$i$i = (($$sum$i19$i) + 28)|0; + $880 = (($tbase$255$i) + ($$sum12$i$i)|0); + HEAP32[$880>>2] = $I7$0$i$i; + $$sum13$i$i = (($$sum$i19$i) + 16)|0; + $881 = (($tbase$255$i) + ($$sum13$i$i)|0); + $$sum14$i$i = (($$sum$i19$i) + 20)|0; + $882 = (($tbase$255$i) + ($$sum14$i$i)|0); + HEAP32[$882>>2] = 0; + HEAP32[$881>>2] = 0; + $883 = HEAP32[(32680)>>2]|0; + $884 = 1 << $I7$0$i$i; + $885 = $883 & $884; + $886 = ($885|0)==(0); + if ($886) { + $887 = $883 | $884; + HEAP32[(32680)>>2] = $887; + HEAP32[$879>>2] = $724; + $$sum15$i$i = (($$sum$i19$i) + 24)|0; + $888 = (($tbase$255$i) + ($$sum15$i$i)|0); + HEAP32[$888>>2] = $879; + $$sum16$i$i = (($$sum$i19$i) + 12)|0; + $889 = (($tbase$255$i) + ($$sum16$i$i)|0); + HEAP32[$889>>2] = $724; + $$sum17$i$i = (($$sum$i19$i) + 8)|0; + $890 = (($tbase$255$i) + ($$sum17$i$i)|0); + HEAP32[$890>>2] = $724; + break; + } + $891 = HEAP32[$879>>2]|0; + $892 = ((($891)) + 4|0); + $893 = HEAP32[$892>>2]|0; + $894 = $893 & -8; + $895 = ($894|0)==($qsize$0$i$i|0); + L418: do { + if ($895) { + $T$0$lcssa$i25$i = $891; + } else { + $896 = ($I7$0$i$i|0)==(31); + $897 = $I7$0$i$i >>> 1; + $898 = (25 - ($897))|0; + $899 = $896 ? 0 : $898; + $900 = $qsize$0$i$i << $899; + $K8$051$i$i = $900;$T$050$i$i = $891; + while(1) { + $907 = $K8$051$i$i >>> 31; + $908 = (((($T$050$i$i)) + 16|0) + ($907<<2)|0); + $903 = HEAP32[$908>>2]|0; + $909 = ($903|0)==(0|0); + if ($909) { + $$lcssa = $908;$T$050$i$i$lcssa = $T$050$i$i; + break; + } + $901 = $K8$051$i$i << 1; + $902 = ((($903)) + 4|0); + $904 = HEAP32[$902>>2]|0; + $905 = $904 & -8; + $906 = ($905|0)==($qsize$0$i$i|0); + if ($906) { + $T$0$lcssa$i25$i = $903; + break L418; + } else { + $K8$051$i$i = $901;$T$050$i$i = $903; + } + } + $910 = HEAP32[(32692)>>2]|0; + $911 = ($$lcssa>>>0)<($910>>>0); + if ($911) { + _abort(); + // unreachable; + } else { + HEAP32[$$lcssa>>2] = $724; + $$sum23$i$i = (($$sum$i19$i) + 24)|0; + $912 = (($tbase$255$i) + ($$sum23$i$i)|0); + HEAP32[$912>>2] = $T$050$i$i$lcssa; + $$sum24$i$i = (($$sum$i19$i) + 12)|0; + $913 = (($tbase$255$i) + ($$sum24$i$i)|0); + HEAP32[$913>>2] = $724; + $$sum25$i$i = (($$sum$i19$i) + 8)|0; + $914 = (($tbase$255$i) + ($$sum25$i$i)|0); + HEAP32[$914>>2] = $724; + break L324; + } + } + } while(0); + $915 = ((($T$0$lcssa$i25$i)) + 8|0); + $916 = HEAP32[$915>>2]|0; + $917 = HEAP32[(32692)>>2]|0; + $918 = ($916>>>0)>=($917>>>0); + $not$$i26$i = ($T$0$lcssa$i25$i>>>0)>=($917>>>0); + $919 = $918 & $not$$i26$i; + if ($919) { + $920 = ((($916)) + 12|0); + HEAP32[$920>>2] = $724; + HEAP32[$915>>2] = $724; + $$sum20$i$i = (($$sum$i19$i) + 8)|0; + $921 = (($tbase$255$i) + ($$sum20$i$i)|0); + HEAP32[$921>>2] = $916; + $$sum21$i$i = (($$sum$i19$i) + 12)|0; + $922 = (($tbase$255$i) + ($$sum21$i$i)|0); + HEAP32[$922>>2] = $T$0$lcssa$i25$i; + $$sum22$i$i = (($$sum$i19$i) + 24)|0; + $923 = (($tbase$255$i) + ($$sum22$i$i)|0); + HEAP32[$923>>2] = 0; + break; + } else { + _abort(); + // unreachable; } + } + } while(0); + $$sum1819$i$i = $711 | 8; + $924 = (($tbase$255$i) + ($$sum1819$i$i)|0); + $mem$0 = $924; + return ($mem$0|0); + } else { + $sp$0$i$i$i = (33124); + } + } + while(1) { + $925 = HEAP32[$sp$0$i$i$i>>2]|0; + $926 = ($925>>>0)>($635>>>0); + if (!($926)) { + $927 = ((($sp$0$i$i$i)) + 4|0); + $928 = HEAP32[$927>>2]|0; + $929 = (($925) + ($928)|0); + $930 = ($929>>>0)>($635>>>0); + if ($930) { + $$lcssa215 = $925;$$lcssa216 = $928;$$lcssa217 = $929; + break; } - while ((ptr|0) < (stop4|0)) { - HEAP32[((ptr)>>2)]=value4; - ptr = (ptr+4)|0; + } + $931 = ((($sp$0$i$i$i)) + 8|0); + $932 = HEAP32[$931>>2]|0; + $sp$0$i$i$i = $932; + } + $$sum$i14$i = (($$lcssa216) + -47)|0; + $$sum1$i15$i = (($$lcssa216) + -39)|0; + $933 = (($$lcssa215) + ($$sum1$i15$i)|0); + $934 = $933; + $935 = $934 & 7; + $936 = ($935|0)==(0); + $937 = (0 - ($934))|0; + $938 = $937 & 7; + $939 = $936 ? 0 : $938; + $$sum2$i16$i = (($$sum$i14$i) + ($939))|0; + $940 = (($$lcssa215) + ($$sum2$i16$i)|0); + $941 = ((($635)) + 16|0); + $942 = ($940>>>0)<($941>>>0); + $943 = $942 ? $635 : $940; + $944 = ((($943)) + 8|0); + $945 = (($tsize$254$i) + -40)|0; + $946 = ((($tbase$255$i)) + 8|0); + $947 = $946; + $948 = $947 & 7; + $949 = ($948|0)==(0); + $950 = (0 - ($947))|0; + $951 = $950 & 7; + $952 = $949 ? 0 : $951; + $953 = (($tbase$255$i) + ($952)|0); + $954 = (($945) - ($952))|0; + HEAP32[(32700)>>2] = $953; + HEAP32[(32688)>>2] = $954; + $955 = $954 | 1; + $$sum$i$i$i = (($952) + 4)|0; + $956 = (($tbase$255$i) + ($$sum$i$i$i)|0); + HEAP32[$956>>2] = $955; + $$sum2$i$i$i = (($tsize$254$i) + -36)|0; + $957 = (($tbase$255$i) + ($$sum2$i$i$i)|0); + HEAP32[$957>>2] = 40; + $958 = HEAP32[(33164)>>2]|0; + HEAP32[(32704)>>2] = $958; + $959 = ((($943)) + 4|0); + HEAP32[$959>>2] = 27; + ;HEAP32[$944>>2]=HEAP32[(33124)>>2]|0;HEAP32[$944+4>>2]=HEAP32[(33124)+4>>2]|0;HEAP32[$944+8>>2]=HEAP32[(33124)+8>>2]|0;HEAP32[$944+12>>2]=HEAP32[(33124)+12>>2]|0; + HEAP32[(33124)>>2] = $tbase$255$i; + HEAP32[(33128)>>2] = $tsize$254$i; + HEAP32[(33136)>>2] = 0; + HEAP32[(33132)>>2] = $944; + $960 = ((($943)) + 28|0); + HEAP32[$960>>2] = 7; + $961 = ((($943)) + 32|0); + $962 = ($961>>>0)<($$lcssa217>>>0); + if ($962) { + $964 = $960; + while(1) { + $963 = ((($964)) + 4|0); + HEAP32[$963>>2] = 7; + $965 = ((($964)) + 8|0); + $966 = ($965>>>0)<($$lcssa217>>>0); + if ($966) { + $964 = $963; + } else { + break; } + } } - while ((ptr|0) < (stop|0)) { - HEAP8[((ptr)>>0)]=value; - ptr = (ptr+1)|0; + $967 = ($943|0)==($635|0); + if (!($967)) { + $968 = $943; + $969 = $635; + $970 = (($968) - ($969))|0; + $971 = HEAP32[$959>>2]|0; + $972 = $971 & -2; + HEAP32[$959>>2] = $972; + $973 = $970 | 1; + $974 = ((($635)) + 4|0); + HEAP32[$974>>2] = $973; + HEAP32[$943>>2] = $970; + $975 = $970 >>> 3; + $976 = ($970>>>0)<(256); + if ($976) { + $977 = $975 << 1; + $978 = (32716 + ($977<<2)|0); + $979 = HEAP32[32676>>2]|0; + $980 = 1 << $975; + $981 = $979 & $980; + $982 = ($981|0)==(0); + if ($982) { + $983 = $979 | $980; + HEAP32[32676>>2] = $983; + $$pre$i$i = (($977) + 2)|0; + $$pre14$i$i = (32716 + ($$pre$i$i<<2)|0); + $$pre$phi$i$iZ2D = $$pre14$i$i;$F$0$i$i = $978; + } else { + $$sum4$i$i = (($977) + 2)|0; + $984 = (32716 + ($$sum4$i$i<<2)|0); + $985 = HEAP32[$984>>2]|0; + $986 = HEAP32[(32692)>>2]|0; + $987 = ($985>>>0)<($986>>>0); + if ($987) { + _abort(); + // unreachable; + } else { + $$pre$phi$i$iZ2D = $984;$F$0$i$i = $985; + } + } + HEAP32[$$pre$phi$i$iZ2D>>2] = $635; + $988 = ((($F$0$i$i)) + 12|0); + HEAP32[$988>>2] = $635; + $989 = ((($635)) + 8|0); + HEAP32[$989>>2] = $F$0$i$i; + $990 = ((($635)) + 12|0); + HEAP32[$990>>2] = $978; + break; + } + $991 = $970 >>> 8; + $992 = ($991|0)==(0); + if ($992) { + $I1$0$i$i = 0; + } else { + $993 = ($970>>>0)>(16777215); + if ($993) { + $I1$0$i$i = 31; + } else { + $994 = (($991) + 1048320)|0; + $995 = $994 >>> 16; + $996 = $995 & 8; + $997 = $991 << $996; + $998 = (($997) + 520192)|0; + $999 = $998 >>> 16; + $1000 = $999 & 4; + $1001 = $1000 | $996; + $1002 = $997 << $1000; + $1003 = (($1002) + 245760)|0; + $1004 = $1003 >>> 16; + $1005 = $1004 & 2; + $1006 = $1001 | $1005; + $1007 = (14 - ($1006))|0; + $1008 = $1002 << $1005; + $1009 = $1008 >>> 15; + $1010 = (($1007) + ($1009))|0; + $1011 = $1010 << 1; + $1012 = (($1010) + 7)|0; + $1013 = $970 >>> $1012; + $1014 = $1013 & 1; + $1015 = $1014 | $1011; + $I1$0$i$i = $1015; + } + } + $1016 = (32980 + ($I1$0$i$i<<2)|0); + $1017 = ((($635)) + 28|0); + HEAP32[$1017>>2] = $I1$0$i$i; + $1018 = ((($635)) + 20|0); + HEAP32[$1018>>2] = 0; + HEAP32[$941>>2] = 0; + $1019 = HEAP32[(32680)>>2]|0; + $1020 = 1 << $I1$0$i$i; + $1021 = $1019 & $1020; + $1022 = ($1021|0)==(0); + if ($1022) { + $1023 = $1019 | $1020; + HEAP32[(32680)>>2] = $1023; + HEAP32[$1016>>2] = $635; + $1024 = ((($635)) + 24|0); + HEAP32[$1024>>2] = $1016; + $1025 = ((($635)) + 12|0); + HEAP32[$1025>>2] = $635; + $1026 = ((($635)) + 8|0); + HEAP32[$1026>>2] = $635; + break; + } + $1027 = HEAP32[$1016>>2]|0; + $1028 = ((($1027)) + 4|0); + $1029 = HEAP32[$1028>>2]|0; + $1030 = $1029 & -8; + $1031 = ($1030|0)==($970|0); + L459: do { + if ($1031) { + $T$0$lcssa$i$i = $1027; + } else { + $1032 = ($I1$0$i$i|0)==(31); + $1033 = $I1$0$i$i >>> 1; + $1034 = (25 - ($1033))|0; + $1035 = $1032 ? 0 : $1034; + $1036 = $970 << $1035; + $K2$07$i$i = $1036;$T$06$i$i = $1027; + while(1) { + $1043 = $K2$07$i$i >>> 31; + $1044 = (((($T$06$i$i)) + 16|0) + ($1043<<2)|0); + $1039 = HEAP32[$1044>>2]|0; + $1045 = ($1039|0)==(0|0); + if ($1045) { + $$lcssa211 = $1044;$T$06$i$i$lcssa = $T$06$i$i; + break; + } + $1037 = $K2$07$i$i << 1; + $1038 = ((($1039)) + 4|0); + $1040 = HEAP32[$1038>>2]|0; + $1041 = $1040 & -8; + $1042 = ($1041|0)==($970|0); + if ($1042) { + $T$0$lcssa$i$i = $1039; + break L459; + } else { + $K2$07$i$i = $1037;$T$06$i$i = $1039; + } + } + $1046 = HEAP32[(32692)>>2]|0; + $1047 = ($$lcssa211>>>0)<($1046>>>0); + if ($1047) { + _abort(); + // unreachable; + } else { + HEAP32[$$lcssa211>>2] = $635; + $1048 = ((($635)) + 24|0); + HEAP32[$1048>>2] = $T$06$i$i$lcssa; + $1049 = ((($635)) + 12|0); + HEAP32[$1049>>2] = $635; + $1050 = ((($635)) + 8|0); + HEAP32[$1050>>2] = $635; + break L299; + } + } + } while(0); + $1051 = ((($T$0$lcssa$i$i)) + 8|0); + $1052 = HEAP32[$1051>>2]|0; + $1053 = HEAP32[(32692)>>2]|0; + $1054 = ($1052>>>0)>=($1053>>>0); + $not$$i$i = ($T$0$lcssa$i$i>>>0)>=($1053>>>0); + $1055 = $1054 & $not$$i$i; + if ($1055) { + $1056 = ((($1052)) + 12|0); + HEAP32[$1056>>2] = $635; + HEAP32[$1051>>2] = $635; + $1057 = ((($635)) + 8|0); + HEAP32[$1057>>2] = $1052; + $1058 = ((($635)) + 12|0); + HEAP32[$1058>>2] = $T$0$lcssa$i$i; + $1059 = ((($635)) + 24|0); + HEAP32[$1059>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } } - return (ptr-num)|0; + } + } while(0); + $1060 = HEAP32[(32688)>>2]|0; + $1061 = ($1060>>>0)>($nb$0>>>0); + if ($1061) { + $1062 = (($1060) - ($nb$0))|0; + HEAP32[(32688)>>2] = $1062; + $1063 = HEAP32[(32700)>>2]|0; + $1064 = (($1063) + ($nb$0)|0); + HEAP32[(32700)>>2] = $1064; + $1065 = $1062 | 1; + $$sum$i32 = (($nb$0) + 4)|0; + $1066 = (($1063) + ($$sum$i32)|0); + HEAP32[$1066>>2] = $1065; + $1067 = $nb$0 | 3; + $1068 = ((($1063)) + 4|0); + HEAP32[$1068>>2] = $1067; + $1069 = ((($1063)) + 8|0); + $mem$0 = $1069; + return ($mem$0|0); + } + } + $1070 = (___errno_location()|0); + HEAP32[$1070>>2] = 12; + $mem$0 = 0; + return ($mem$0|0); } -function _bitshift64Lshr(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = high >>> bits; - return (low >>> bits) | ((high&ander) << (32 - bits)); +function _free($mem) { + $mem = $mem|0; + var $$lcssa = 0, $$pre = 0, $$pre$phi59Z2D = 0, $$pre$phi61Z2D = 0, $$pre$phiZ2D = 0, $$pre57 = 0, $$pre58 = 0, $$pre60 = 0, $$sum = 0, $$sum11 = 0, $$sum12 = 0, $$sum13 = 0, $$sum14 = 0, $$sum1718 = 0, $$sum19 = 0, $$sum2 = 0, $$sum20 = 0, $$sum22 = 0, $$sum23 = 0, $$sum24 = 0; + var $$sum25 = 0, $$sum26 = 0, $$sum27 = 0, $$sum28 = 0, $$sum29 = 0, $$sum3 = 0, $$sum30 = 0, $$sum31 = 0, $$sum5 = 0, $$sum67 = 0, $$sum8 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0; + var $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0; + var $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0; + var $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0; + var $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0; + var $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0; + var $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0; + var $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0; + var $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0; + var $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0; + var $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0; + var $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0; + var $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0; + var $321 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0; + var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0; + var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0; + var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F16$0 = 0, $I18$0 = 0, $K19$052 = 0, $R$0 = 0, $R$0$lcssa = 0, $R$1 = 0; + var $R7$0 = 0, $R7$0$lcssa = 0, $R7$1 = 0, $RP$0 = 0, $RP$0$lcssa = 0, $RP9$0 = 0, $RP9$0$lcssa = 0, $T$0$lcssa = 0, $T$051 = 0, $T$051$lcssa = 0, $cond = 0, $cond47 = 0, $not$ = 0, $p$0 = 0, $psize$0 = 0, $psize$1 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ($mem|0)==(0|0); + if ($0) { + return; + } + $1 = ((($mem)) + -8|0); + $2 = HEAP32[(32692)>>2]|0; + $3 = ($1>>>0)<($2>>>0); + if ($3) { + _abort(); + // unreachable; + } + $4 = ((($mem)) + -4|0); + $5 = HEAP32[$4>>2]|0; + $6 = $5 & 3; + $7 = ($6|0)==(1); + if ($7) { + _abort(); + // unreachable; + } + $8 = $5 & -8; + $$sum = (($8) + -8)|0; + $9 = (($mem) + ($$sum)|0); + $10 = $5 & 1; + $11 = ($10|0)==(0); + do { + if ($11) { + $12 = HEAP32[$1>>2]|0; + $13 = ($6|0)==(0); + if ($13) { + return; + } + $$sum2 = (-8 - ($12))|0; + $14 = (($mem) + ($$sum2)|0); + $15 = (($12) + ($8))|0; + $16 = ($14>>>0)<($2>>>0); + if ($16) { + _abort(); + // unreachable; + } + $17 = HEAP32[(32696)>>2]|0; + $18 = ($14|0)==($17|0); + if ($18) { + $$sum3 = (($8) + -4)|0; + $103 = (($mem) + ($$sum3)|0); + $104 = HEAP32[$103>>2]|0; + $105 = $104 & 3; + $106 = ($105|0)==(3); + if (!($106)) { + $p$0 = $14;$psize$0 = $15; + break; } - tempRet0 = 0; - return (high >>> (bits - 32))|0; -} -function _bitshift64Shl(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits)); - return low << bits; + HEAP32[(32684)>>2] = $15; + $107 = $104 & -2; + HEAP32[$103>>2] = $107; + $108 = $15 | 1; + $$sum20 = (($$sum2) + 4)|0; + $109 = (($mem) + ($$sum20)|0); + HEAP32[$109>>2] = $108; + HEAP32[$9>>2] = $15; + return; + } + $19 = $12 >>> 3; + $20 = ($12>>>0)<(256); + if ($20) { + $$sum30 = (($$sum2) + 8)|0; + $21 = (($mem) + ($$sum30)|0); + $22 = HEAP32[$21>>2]|0; + $$sum31 = (($$sum2) + 12)|0; + $23 = (($mem) + ($$sum31)|0); + $24 = HEAP32[$23>>2]|0; + $25 = $19 << 1; + $26 = (32716 + ($25<<2)|0); + $27 = ($22|0)==($26|0); + if (!($27)) { + $28 = ($22>>>0)<($2>>>0); + if ($28) { + _abort(); + // unreachable; + } + $29 = ((($22)) + 12|0); + $30 = HEAP32[$29>>2]|0; + $31 = ($30|0)==($14|0); + if (!($31)) { + _abort(); + // unreachable; + } } - tempRet0 = low << (bits - 32); - return 0; -} -function _strlen(ptr) { - ptr = ptr|0; - var curr = 0; - curr = ptr; - while (((HEAP8[((curr)>>0)])|0)) { - curr = (curr + 1)|0; + $32 = ($24|0)==($22|0); + if ($32) { + $33 = 1 << $19; + $34 = $33 ^ -1; + $35 = HEAP32[32676>>2]|0; + $36 = $35 & $34; + HEAP32[32676>>2] = $36; + $p$0 = $14;$psize$0 = $15; + break; } - return (curr - ptr)|0; -} -function _memcpy(dest, src, num) { - - dest = dest|0; src = src|0; num = num|0; - var ret = 0; - if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; - ret = dest|0; - if ((dest&3) == (src&3)) { - while (dest & 3) { - if ((num|0) == 0) return ret|0; - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); - dest = (dest+1)|0; - src = (src+1)|0; - num = (num-1)|0; + $37 = ($24|0)==($26|0); + if ($37) { + $$pre60 = ((($24)) + 8|0); + $$pre$phi61Z2D = $$pre60; + } else { + $38 = ($24>>>0)<($2>>>0); + if ($38) { + _abort(); + // unreachable; + } + $39 = ((($24)) + 8|0); + $40 = HEAP32[$39>>2]|0; + $41 = ($40|0)==($14|0); + if ($41) { + $$pre$phi61Z2D = $39; + } else { + _abort(); + // unreachable; + } + } + $42 = ((($22)) + 12|0); + HEAP32[$42>>2] = $24; + HEAP32[$$pre$phi61Z2D>>2] = $22; + $p$0 = $14;$psize$0 = $15; + break; + } + $$sum22 = (($$sum2) + 24)|0; + $43 = (($mem) + ($$sum22)|0); + $44 = HEAP32[$43>>2]|0; + $$sum23 = (($$sum2) + 12)|0; + $45 = (($mem) + ($$sum23)|0); + $46 = HEAP32[$45>>2]|0; + $47 = ($46|0)==($14|0); + do { + if ($47) { + $$sum25 = (($$sum2) + 20)|0; + $57 = (($mem) + ($$sum25)|0); + $58 = HEAP32[$57>>2]|0; + $59 = ($58|0)==(0|0); + if ($59) { + $$sum24 = (($$sum2) + 16)|0; + $60 = (($mem) + ($$sum24)|0); + $61 = HEAP32[$60>>2]|0; + $62 = ($61|0)==(0|0); + if ($62) { + $R$1 = 0; + break; + } else { + $R$0 = $61;$RP$0 = $60; } - while ((num|0) >= 4) { - HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); - dest = (dest+4)|0; - src = (src+4)|0; - num = (num-4)|0; + } else { + $R$0 = $58;$RP$0 = $57; + } + while(1) { + $63 = ((($R$0)) + 20|0); + $64 = HEAP32[$63>>2]|0; + $65 = ($64|0)==(0|0); + if (!($65)) { + $R$0 = $64;$RP$0 = $63; + continue; } - } - while ((num|0) > 0) { - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); - dest = (dest+1)|0; - src = (src+1)|0; - num = (num-1)|0; - } - return ret|0; -} -function _memmove(dest, src, num) { - dest = dest|0; src = src|0; num = num|0; - var ret = 0; - if (((src|0) < (dest|0)) & ((dest|0) < ((src + num)|0))) { - // Unlikely case: Copy backwards in a safe manner - ret = dest; - src = (src + num)|0; - dest = (dest + num)|0; - while ((num|0) > 0) { - dest = (dest - 1)|0; - src = (src - 1)|0; - num = (num - 1)|0; - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + $66 = ((($R$0)) + 16|0); + $67 = HEAP32[$66>>2]|0; + $68 = ($67|0)==(0|0); + if ($68) { + $R$0$lcssa = $R$0;$RP$0$lcssa = $RP$0; + break; + } else { + $R$0 = $67;$RP$0 = $66; } - dest = ret; + } + $69 = ($RP$0$lcssa>>>0)<($2>>>0); + if ($69) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$0$lcssa>>2] = 0; + $R$1 = $R$0$lcssa; + break; + } } else { - _memcpy(dest, src, num) | 0; + $$sum29 = (($$sum2) + 8)|0; + $48 = (($mem) + ($$sum29)|0); + $49 = HEAP32[$48>>2]|0; + $50 = ($49>>>0)<($2>>>0); + if ($50) { + _abort(); + // unreachable; + } + $51 = ((($49)) + 12|0); + $52 = HEAP32[$51>>2]|0; + $53 = ($52|0)==($14|0); + if (!($53)) { + _abort(); + // unreachable; + } + $54 = ((($46)) + 8|0); + $55 = HEAP32[$54>>2]|0; + $56 = ($55|0)==($14|0); + if ($56) { + HEAP32[$51>>2] = $46; + HEAP32[$54>>2] = $49; + $R$1 = $46; + break; + } else { + _abort(); + // unreachable; + } } - return dest | 0; -} -function _llvm_ctlz_i32(x) { - x = x|0; - var ret = 0; - ret = ((HEAP8[(((ctlz_i8)+(x >>> 24))>>0)])|0); - if ((ret|0) < 8) return ret|0; - ret = ((HEAP8[(((ctlz_i8)+((x >> 16)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 8)|0; - ret = ((HEAP8[(((ctlz_i8)+((x >> 8)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 16)|0; - return (((HEAP8[(((ctlz_i8)+(x&0xff))>>0)])|0) + 24)|0; - } - -function _llvm_cttz_i32(x) { - x = x|0; - var ret = 0; - ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0); - if ((ret|0) < 8) return ret|0; - ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 8)|0; - ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 16)|0; - return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0; - } - -// ======== compiled code from system/lib/compiler-rt , see readme therein -function ___muldsi3($a, $b) { - $a = $a | 0; - $b = $b | 0; - var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0; - $1 = $a & 65535; - $2 = $b & 65535; - $3 = Math_imul($2, $1) | 0; - $6 = $a >>> 16; - $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0; - $11 = $b >>> 16; - $12 = Math_imul($11, $1) | 0; - return (tempRet0 = (($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0, 0 | ($8 + $12 << 16 | $3 & 65535)) | 0; -} -function ___divdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $7$0 = 0, $7$1 = 0, $8$0 = 0, $10$0 = 0; - $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; - $4$1 = tempRet0; - $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; - $7$0 = $2$0 ^ $1$0; - $7$1 = $2$1 ^ $1$1; - $8$0 = ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, 0) | 0; - $10$0 = _i64Subtract($8$0 ^ $7$0, tempRet0 ^ $7$1, $7$0, $7$1) | 0; - return (tempRet0 = tempRet0, $10$0) | 0; -} -function ___remdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $rem = 0, $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $10$0 = 0, $10$1 = 0, __stackBase__ = 0; - __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; - $rem = __stackBase__ | 0; - $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; - $4$1 = tempRet0; - $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; - ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, $rem) | 0; - $10$0 = _i64Subtract(HEAP32[$rem >> 2] ^ $1$0, HEAP32[$rem + 4 >> 2] ^ $1$1, $1$0, $1$1) | 0; - $10$1 = tempRet0; - STACKTOP = __stackBase__; - return (tempRet0 = $10$1, $10$0) | 0; -} -function ___muldi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0; - $x_sroa_0_0_extract_trunc = $a$0; - $y_sroa_0_0_extract_trunc = $b$0; - $1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0; - $1$1 = tempRet0; - $2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0; - return (tempRet0 = ((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0, 0 | $1$0 & -1) | 0; -} -function ___udivdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $1$0 = 0; - $1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0; - return (tempRet0 = tempRet0, $1$0) | 0; -} -function ___uremdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $rem = 0, __stackBase__ = 0; - __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; - $rem = __stackBase__ | 0; - ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0; - STACKTOP = __stackBase__; - return (tempRet0 = HEAP32[$rem + 4 >> 2] | 0, HEAP32[$rem >> 2] | 0) | 0; -} -function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - $rem = $rem | 0; - var $n_sroa_0_0_extract_trunc = 0, $n_sroa_1_4_extract_shift$0 = 0, $n_sroa_1_4_extract_trunc = 0, $d_sroa_0_0_extract_trunc = 0, $d_sroa_1_4_extract_shift$0 = 0, $d_sroa_1_4_extract_trunc = 0, $4 = 0, $17 = 0, $37 = 0, $49 = 0, $51 = 0, $57 = 0, $58 = 0, $66 = 0, $78 = 0, $86 = 0, $88 = 0, $89 = 0, $91 = 0, $92 = 0, $95 = 0, $105 = 0, $117 = 0, $119 = 0, $125 = 0, $126 = 0, $130 = 0, $q_sroa_1_1_ph = 0, $q_sroa_0_1_ph = 0, $r_sroa_1_1_ph = 0, $r_sroa_0_1_ph = 0, $sr_1_ph = 0, $d_sroa_0_0_insert_insert99$0 = 0, $d_sroa_0_0_insert_insert99$1 = 0, $137$0 = 0, $137$1 = 0, $carry_0203 = 0, $sr_1202 = 0, $r_sroa_0_1201 = 0, $r_sroa_1_1200 = 0, $q_sroa_0_1199 = 0, $q_sroa_1_1198 = 0, $147 = 0, $149 = 0, $r_sroa_0_0_insert_insert42$0 = 0, $r_sroa_0_0_insert_insert42$1 = 0, $150$1 = 0, $151$0 = 0, $152 = 0, $154$0 = 0, $r_sroa_0_0_extract_trunc = 0, $r_sroa_1_4_extract_trunc = 0, $155 = 0, $carry_0_lcssa$0 = 0, $carry_0_lcssa$1 = 0, $r_sroa_0_1_lcssa = 0, $r_sroa_1_1_lcssa = 0, $q_sroa_0_1_lcssa = 0, $q_sroa_1_1_lcssa = 0, $q_sroa_0_0_insert_ext75$0 = 0, $q_sroa_0_0_insert_ext75$1 = 0, $q_sroa_0_0_insert_insert77$1 = 0, $_0$0 = 0, $_0$1 = 0; - $n_sroa_0_0_extract_trunc = $a$0; - $n_sroa_1_4_extract_shift$0 = $a$1; - $n_sroa_1_4_extract_trunc = $n_sroa_1_4_extract_shift$0; - $d_sroa_0_0_extract_trunc = $b$0; - $d_sroa_1_4_extract_shift$0 = $b$1; - $d_sroa_1_4_extract_trunc = $d_sroa_1_4_extract_shift$0; - if (($n_sroa_1_4_extract_trunc | 0) == 0) { - $4 = ($rem | 0) != 0; - if (($d_sroa_1_4_extract_trunc | 0) == 0) { - if ($4) { - HEAP32[$rem >> 2] = ($n_sroa_0_0_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); - HEAP32[$rem + 4 >> 2] = 0; - } - $_0$1 = 0; - $_0$0 = ($n_sroa_0_0_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + } while(0); + $70 = ($44|0)==(0|0); + if ($70) { + $p$0 = $14;$psize$0 = $15; + } else { + $$sum26 = (($$sum2) + 28)|0; + $71 = (($mem) + ($$sum26)|0); + $72 = HEAP32[$71>>2]|0; + $73 = (32980 + ($72<<2)|0); + $74 = HEAP32[$73>>2]|0; + $75 = ($14|0)==($74|0); + if ($75) { + HEAP32[$73>>2] = $R$1; + $cond = ($R$1|0)==(0|0); + if ($cond) { + $76 = 1 << $72; + $77 = $76 ^ -1; + $78 = HEAP32[(32680)>>2]|0; + $79 = $78 & $77; + HEAP32[(32680)>>2] = $79; + $p$0 = $14;$psize$0 = $15; + break; + } } else { - if (!$4) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + $80 = HEAP32[(32692)>>2]|0; + $81 = ($44>>>0)<($80>>>0); + if ($81) { + _abort(); + // unreachable; + } + $82 = ((($44)) + 16|0); + $83 = HEAP32[$82>>2]|0; + $84 = ($83|0)==($14|0); + if ($84) { + HEAP32[$82>>2] = $R$1; + } else { + $85 = ((($44)) + 20|0); + HEAP32[$85>>2] = $R$1; + } + $86 = ($R$1|0)==(0|0); + if ($86) { + $p$0 = $14;$psize$0 = $15; + break; + } + } + $87 = HEAP32[(32692)>>2]|0; + $88 = ($R$1>>>0)<($87>>>0); + if ($88) { + _abort(); + // unreachable; + } + $89 = ((($R$1)) + 24|0); + HEAP32[$89>>2] = $44; + $$sum27 = (($$sum2) + 16)|0; + $90 = (($mem) + ($$sum27)|0); + $91 = HEAP32[$90>>2]|0; + $92 = ($91|0)==(0|0); + do { + if (!($92)) { + $93 = ($91>>>0)<($87>>>0); + if ($93) { + _abort(); + // unreachable; + } else { + $94 = ((($R$1)) + 16|0); + HEAP32[$94>>2] = $91; + $95 = ((($91)) + 24|0); + HEAP32[$95>>2] = $R$1; + break; } - HEAP32[$rem >> 2] = $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + } + } while(0); + $$sum28 = (($$sum2) + 20)|0; + $96 = (($mem) + ($$sum28)|0); + $97 = HEAP32[$96>>2]|0; + $98 = ($97|0)==(0|0); + if ($98) { + $p$0 = $14;$psize$0 = $15; + } else { + $99 = HEAP32[(32692)>>2]|0; + $100 = ($97>>>0)<($99>>>0); + if ($100) { + _abort(); + // unreachable; + } else { + $101 = ((($R$1)) + 20|0); + HEAP32[$101>>2] = $97; + $102 = ((($97)) + 24|0); + HEAP32[$102>>2] = $R$1; + $p$0 = $14;$psize$0 = $15; + break; + } } + } + } else { + $p$0 = $1;$psize$0 = $8; + } + } while(0); + $110 = ($p$0>>>0)<($9>>>0); + if (!($110)) { + _abort(); + // unreachable; + } + $$sum19 = (($8) + -4)|0; + $111 = (($mem) + ($$sum19)|0); + $112 = HEAP32[$111>>2]|0; + $113 = $112 & 1; + $114 = ($113|0)==(0); + if ($114) { + _abort(); + // unreachable; + } + $115 = $112 & 2; + $116 = ($115|0)==(0); + if ($116) { + $117 = HEAP32[(32700)>>2]|0; + $118 = ($9|0)==($117|0); + if ($118) { + $119 = HEAP32[(32688)>>2]|0; + $120 = (($119) + ($psize$0))|0; + HEAP32[(32688)>>2] = $120; + HEAP32[(32700)>>2] = $p$0; + $121 = $120 | 1; + $122 = ((($p$0)) + 4|0); + HEAP32[$122>>2] = $121; + $123 = HEAP32[(32696)>>2]|0; + $124 = ($p$0|0)==($123|0); + if (!($124)) { + return; + } + HEAP32[(32696)>>2] = 0; + HEAP32[(32684)>>2] = 0; + return; } - $17 = ($d_sroa_1_4_extract_trunc | 0) == 0; + $125 = HEAP32[(32696)>>2]|0; + $126 = ($9|0)==($125|0); + if ($126) { + $127 = HEAP32[(32684)>>2]|0; + $128 = (($127) + ($psize$0))|0; + HEAP32[(32684)>>2] = $128; + HEAP32[(32696)>>2] = $p$0; + $129 = $128 | 1; + $130 = ((($p$0)) + 4|0); + HEAP32[$130>>2] = $129; + $131 = (($p$0) + ($128)|0); + HEAP32[$131>>2] = $128; + return; + } + $132 = $112 & -8; + $133 = (($132) + ($psize$0))|0; + $134 = $112 >>> 3; + $135 = ($112>>>0)<(256); do { - if (($d_sroa_0_0_extract_trunc | 0) == 0) { - if ($17) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); - HEAP32[$rem + 4 >> 2] = 0; - } - $_0$1 = 0; - $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + if ($135) { + $136 = (($mem) + ($8)|0); + $137 = HEAP32[$136>>2]|0; + $$sum1718 = $8 | 4; + $138 = (($mem) + ($$sum1718)|0); + $139 = HEAP32[$138>>2]|0; + $140 = $134 << 1; + $141 = (32716 + ($140<<2)|0); + $142 = ($137|0)==($141|0); + if (!($142)) { + $143 = HEAP32[(32692)>>2]|0; + $144 = ($137>>>0)<($143>>>0); + if ($144) { + _abort(); + // unreachable; + } + $145 = ((($137)) + 12|0); + $146 = HEAP32[$145>>2]|0; + $147 = ($146|0)==($9|0); + if (!($147)) { + _abort(); + // unreachable; + } + } + $148 = ($139|0)==($137|0); + if ($148) { + $149 = 1 << $134; + $150 = $149 ^ -1; + $151 = HEAP32[32676>>2]|0; + $152 = $151 & $150; + HEAP32[32676>>2] = $152; + break; + } + $153 = ($139|0)==($141|0); + if ($153) { + $$pre58 = ((($139)) + 8|0); + $$pre$phi59Z2D = $$pre58; + } else { + $154 = HEAP32[(32692)>>2]|0; + $155 = ($139>>>0)<($154>>>0); + if ($155) { + _abort(); + // unreachable; + } + $156 = ((($139)) + 8|0); + $157 = HEAP32[$156>>2]|0; + $158 = ($157|0)==($9|0); + if ($158) { + $$pre$phi59Z2D = $156; + } else { + _abort(); + // unreachable; + } + } + $159 = ((($137)) + 12|0); + HEAP32[$159>>2] = $139; + HEAP32[$$pre$phi59Z2D>>2] = $137; + } else { + $$sum5 = (($8) + 16)|0; + $160 = (($mem) + ($$sum5)|0); + $161 = HEAP32[$160>>2]|0; + $$sum67 = $8 | 4; + $162 = (($mem) + ($$sum67)|0); + $163 = HEAP32[$162>>2]|0; + $164 = ($163|0)==($9|0); + do { + if ($164) { + $$sum9 = (($8) + 12)|0; + $175 = (($mem) + ($$sum9)|0); + $176 = HEAP32[$175>>2]|0; + $177 = ($176|0)==(0|0); + if ($177) { + $$sum8 = (($8) + 8)|0; + $178 = (($mem) + ($$sum8)|0); + $179 = HEAP32[$178>>2]|0; + $180 = ($179|0)==(0|0); + if ($180) { + $R7$1 = 0; + break; + } else { + $R7$0 = $179;$RP9$0 = $178; + } + } else { + $R7$0 = $176;$RP9$0 = $175; } - if (($n_sroa_0_0_extract_trunc | 0) == 0) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0; - HEAP32[$rem + 4 >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_1_4_extract_trunc >>> 0); - } - $_0$1 = 0; - $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_1_4_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + while(1) { + $181 = ((($R7$0)) + 20|0); + $182 = HEAP32[$181>>2]|0; + $183 = ($182|0)==(0|0); + if (!($183)) { + $R7$0 = $182;$RP9$0 = $181; + continue; + } + $184 = ((($R7$0)) + 16|0); + $185 = HEAP32[$184>>2]|0; + $186 = ($185|0)==(0|0); + if ($186) { + $R7$0$lcssa = $R7$0;$RP9$0$lcssa = $RP9$0; + break; + } else { + $R7$0 = $185;$RP9$0 = $184; + } } - $37 = $d_sroa_1_4_extract_trunc - 1 | 0; - if (($37 & $d_sroa_1_4_extract_trunc | 0) == 0) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $37 & $n_sroa_1_4_extract_trunc | $a$1 & 0; - } - $_0$1 = 0; - $_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0); - return (tempRet0 = $_0$1, $_0$0) | 0; + $187 = HEAP32[(32692)>>2]|0; + $188 = ($RP9$0$lcssa>>>0)<($187>>>0); + if ($188) { + _abort(); + // unreachable; + } else { + HEAP32[$RP9$0$lcssa>>2] = 0; + $R7$1 = $R7$0$lcssa; + break; } - $49 = _llvm_ctlz_i32($d_sroa_1_4_extract_trunc | 0) | 0; - $51 = $49 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - if ($51 >>> 0 <= 30) { - $57 = $51 + 1 | 0; - $58 = 31 - $51 | 0; - $sr_1_ph = $57; - $r_sroa_0_1_ph = $n_sroa_1_4_extract_trunc << $58 | $n_sroa_0_0_extract_trunc >>> ($57 >>> 0); - $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($57 >>> 0); - $q_sroa_0_1_ph = 0; - $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $58; - break; + } else { + $165 = (($mem) + ($8)|0); + $166 = HEAP32[$165>>2]|0; + $167 = HEAP32[(32692)>>2]|0; + $168 = ($166>>>0)<($167>>>0); + if ($168) { + _abort(); + // unreachable; } - if (($rem | 0) == 0) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + $169 = ((($166)) + 12|0); + $170 = HEAP32[$169>>2]|0; + $171 = ($170|0)==($9|0); + if (!($171)) { + _abort(); + // unreachable; } - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } else { - if (!$17) { - $117 = _llvm_ctlz_i32($d_sroa_1_4_extract_trunc | 0) | 0; - $119 = $117 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - if ($119 >>> 0 <= 31) { - $125 = $119 + 1 | 0; - $126 = 31 - $119 | 0; - $130 = $119 - 31 >> 31; - $sr_1_ph = $125; - $r_sroa_0_1_ph = $n_sroa_0_0_extract_trunc >>> ($125 >>> 0) & $130 | $n_sroa_1_4_extract_trunc << $126; - $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($125 >>> 0) & $130; - $q_sroa_0_1_ph = 0; - $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $126; - break; - } - if (($rem | 0) == 0) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + $172 = ((($163)) + 8|0); + $173 = HEAP32[$172>>2]|0; + $174 = ($173|0)==($9|0); + if ($174) { + HEAP32[$169>>2] = $163; + HEAP32[$172>>2] = $166; + $R7$1 = $163; + break; + } else { + _abort(); + // unreachable; } - $66 = $d_sroa_0_0_extract_trunc - 1 | 0; - if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) { - $86 = (_llvm_ctlz_i32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0; - $88 = $86 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - $89 = 64 - $88 | 0; - $91 = 32 - $88 | 0; - $92 = $91 >> 31; - $95 = $88 - 32 | 0; - $105 = $95 >> 31; - $sr_1_ph = $88; - $r_sroa_0_1_ph = $91 - 1 >> 31 & $n_sroa_1_4_extract_trunc >>> ($95 >>> 0) | ($n_sroa_1_4_extract_trunc << $91 | $n_sroa_0_0_extract_trunc >>> ($88 >>> 0)) & $105; - $r_sroa_1_1_ph = $105 & $n_sroa_1_4_extract_trunc >>> ($88 >>> 0); - $q_sroa_0_1_ph = $n_sroa_0_0_extract_trunc << $89 & $92; - $q_sroa_1_1_ph = ($n_sroa_1_4_extract_trunc << $89 | $n_sroa_0_0_extract_trunc >>> ($95 >>> 0)) & $92 | $n_sroa_0_0_extract_trunc << $91 & $88 - 33 >> 31; + } + } while(0); + $189 = ($161|0)==(0|0); + if (!($189)) { + $$sum12 = (($8) + 20)|0; + $190 = (($mem) + ($$sum12)|0); + $191 = HEAP32[$190>>2]|0; + $192 = (32980 + ($191<<2)|0); + $193 = HEAP32[$192>>2]|0; + $194 = ($9|0)==($193|0); + if ($194) { + HEAP32[$192>>2] = $R7$1; + $cond47 = ($R7$1|0)==(0|0); + if ($cond47) { + $195 = 1 << $191; + $196 = $195 ^ -1; + $197 = HEAP32[(32680)>>2]|0; + $198 = $197 & $196; + HEAP32[(32680)>>2] = $198; + break; + } + } else { + $199 = HEAP32[(32692)>>2]|0; + $200 = ($161>>>0)<($199>>>0); + if ($200) { + _abort(); + // unreachable; + } + $201 = ((($161)) + 16|0); + $202 = HEAP32[$201>>2]|0; + $203 = ($202|0)==($9|0); + if ($203) { + HEAP32[$201>>2] = $R7$1; + } else { + $204 = ((($161)) + 20|0); + HEAP32[$204>>2] = $R7$1; + } + $205 = ($R7$1|0)==(0|0); + if ($205) { + break; + } + } + $206 = HEAP32[(32692)>>2]|0; + $207 = ($R7$1>>>0)<($206>>>0); + if ($207) { + _abort(); + // unreachable; + } + $208 = ((($R7$1)) + 24|0); + HEAP32[$208>>2] = $161; + $$sum13 = (($8) + 8)|0; + $209 = (($mem) + ($$sum13)|0); + $210 = HEAP32[$209>>2]|0; + $211 = ($210|0)==(0|0); + do { + if (!($211)) { + $212 = ($210>>>0)<($206>>>0); + if ($212) { + _abort(); + // unreachable; + } else { + $213 = ((($R7$1)) + 16|0); + HEAP32[$213>>2] = $210; + $214 = ((($210)) + 24|0); + HEAP32[$214>>2] = $R7$1; break; + } } - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = $66 & $n_sroa_0_0_extract_trunc; - HEAP32[$rem + 4 >> 2] = 0; - } - if (($d_sroa_0_0_extract_trunc | 0) == 1) { - $_0$1 = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$0 = 0 | $a$0 & -1; - return (tempRet0 = $_0$1, $_0$0) | 0; + } while(0); + $$sum14 = (($8) + 12)|0; + $215 = (($mem) + ($$sum14)|0); + $216 = HEAP32[$215>>2]|0; + $217 = ($216|0)==(0|0); + if (!($217)) { + $218 = HEAP32[(32692)>>2]|0; + $219 = ($216>>>0)<($218>>>0); + if ($219) { + _abort(); + // unreachable; } else { - $78 = _llvm_cttz_i32($d_sroa_0_0_extract_trunc | 0) | 0; - $_0$1 = 0 | $n_sroa_1_4_extract_trunc >>> ($78 >>> 0); - $_0$0 = $n_sroa_1_4_extract_trunc << 32 - $78 | $n_sroa_0_0_extract_trunc >>> ($78 >>> 0) | 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + $220 = ((($R7$1)) + 20|0); + HEAP32[$220>>2] = $216; + $221 = ((($216)) + 24|0); + HEAP32[$221>>2] = $R7$1; + break; } + } } - } while (0); - if (($sr_1_ph | 0) == 0) { - $q_sroa_1_1_lcssa = $q_sroa_1_1_ph; - $q_sroa_0_1_lcssa = $q_sroa_0_1_ph; - $r_sroa_1_1_lcssa = $r_sroa_1_1_ph; - $r_sroa_0_1_lcssa = $r_sroa_0_1_ph; - $carry_0_lcssa$1 = 0; - $carry_0_lcssa$0 = 0; + } + } while(0); + $222 = $133 | 1; + $223 = ((($p$0)) + 4|0); + HEAP32[$223>>2] = $222; + $224 = (($p$0) + ($133)|0); + HEAP32[$224>>2] = $133; + $225 = HEAP32[(32696)>>2]|0; + $226 = ($p$0|0)==($225|0); + if ($226) { + HEAP32[(32684)>>2] = $133; + return; } else { - $d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1; - $d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0; - $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0, $d_sroa_0_0_insert_insert99$1, -1, -1) | 0; - $137$1 = tempRet0; - $q_sroa_1_1198 = $q_sroa_1_1_ph; - $q_sroa_0_1199 = $q_sroa_0_1_ph; - $r_sroa_1_1200 = $r_sroa_1_1_ph; - $r_sroa_0_1201 = $r_sroa_0_1_ph; - $sr_1202 = $sr_1_ph; - $carry_0203 = 0; - while (1) { - $147 = $q_sroa_0_1199 >>> 31 | $q_sroa_1_1198 << 1; - $149 = $carry_0203 | $q_sroa_0_1199 << 1; - $r_sroa_0_0_insert_insert42$0 = 0 | ($r_sroa_0_1201 << 1 | $q_sroa_1_1198 >>> 31); - $r_sroa_0_0_insert_insert42$1 = $r_sroa_0_1201 >>> 31 | $r_sroa_1_1200 << 1 | 0; - _i64Subtract($137$0, $137$1, $r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1) | 0; - $150$1 = tempRet0; - $151$0 = $150$1 >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1; - $152 = $151$0 & 1; - $154$0 = _i64Subtract($r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1, $151$0 & $d_sroa_0_0_insert_insert99$0, ((($150$1 | 0) < 0 ? -1 : 0) >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1) & $d_sroa_0_0_insert_insert99$1) | 0; - $r_sroa_0_0_extract_trunc = $154$0; - $r_sroa_1_4_extract_trunc = tempRet0; - $155 = $sr_1202 - 1 | 0; - if (($155 | 0) == 0) { - break; - } else { - $q_sroa_1_1198 = $147; - $q_sroa_0_1199 = $149; - $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc; - $sr_1202 = $155; - $carry_0203 = $152; - } - } - $q_sroa_1_1_lcssa = $147; - $q_sroa_0_1_lcssa = $149; - $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc; - $carry_0_lcssa$1 = 0; - $carry_0_lcssa$0 = $152; + $psize$1 = $133; } - $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa; - $q_sroa_0_0_insert_ext75$1 = 0; - $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1; - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa; - HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0; + } else { + $227 = $112 & -2; + HEAP32[$111>>2] = $227; + $228 = $psize$0 | 1; + $229 = ((($p$0)) + 4|0); + HEAP32[$229>>2] = $228; + $230 = (($p$0) + ($psize$0)|0); + HEAP32[$230>>2] = $psize$0; + $psize$1 = $psize$0; + } + $231 = $psize$1 >>> 3; + $232 = ($psize$1>>>0)<(256); + if ($232) { + $233 = $231 << 1; + $234 = (32716 + ($233<<2)|0); + $235 = HEAP32[32676>>2]|0; + $236 = 1 << $231; + $237 = $235 & $236; + $238 = ($237|0)==(0); + if ($238) { + $239 = $235 | $236; + HEAP32[32676>>2] = $239; + $$pre = (($233) + 2)|0; + $$pre57 = (32716 + ($$pre<<2)|0); + $$pre$phiZ2D = $$pre57;$F16$0 = $234; + } else { + $$sum11 = (($233) + 2)|0; + $240 = (32716 + ($$sum11<<2)|0); + $241 = HEAP32[$240>>2]|0; + $242 = HEAP32[(32692)>>2]|0; + $243 = ($241>>>0)<($242>>>0); + if ($243) { + _abort(); + // unreachable; + } else { + $$pre$phiZ2D = $240;$F16$0 = $241; + } } - $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1; - $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0; - return (tempRet0 = $_0$1, $_0$0) | 0; -} -// ======================================================================= - - - -// EMSCRIPTEN_END_FUNCS - - - - // EMSCRIPTEN_END_FUNCS - - - return { _curve25519_verify: _curve25519_verify, _crypto_sign_ed25519_ref10_ge_scalarmult_base: _crypto_sign_ed25519_ref10_ge_scalarmult_base, _curve25519_sign: _curve25519_sign, _free: _free, _i64Add: _i64Add, _memmove: _memmove, _bitshift64Ashr: _bitshift64Ashr, _sph_sha512_init: _sph_sha512_init, _curve25519_donna: _curve25519_donna, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, _strlen: _strlen, _bitshift64Lshr: _bitshift64Lshr, _i64Subtract: _i64Subtract, _bitshift64Shl: _bitshift64Shl, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, getTempRet0: getTempRet0 }; -}) -// EMSCRIPTEN_END_ASM -(Module.asmGlobalArg, Module.asmLibraryArg, buffer); -var _curve25519_verify = Module["_curve25519_verify"] = asm["_curve25519_verify"]; -var _crypto_sign_ed25519_ref10_ge_scalarmult_base = Module["_crypto_sign_ed25519_ref10_ge_scalarmult_base"] = asm["_crypto_sign_ed25519_ref10_ge_scalarmult_base"]; -var _curve25519_sign = Module["_curve25519_sign"] = asm["_curve25519_sign"]; -var _free = Module["_free"] = asm["_free"]; -var _i64Add = Module["_i64Add"] = asm["_i64Add"]; -var _memmove = Module["_memmove"] = asm["_memmove"]; -var _bitshift64Ashr = Module["_bitshift64Ashr"] = asm["_bitshift64Ashr"]; -var _sph_sha512_init = Module["_sph_sha512_init"] = asm["_sph_sha512_init"]; -var _curve25519_donna = Module["_curve25519_donna"] = asm["_curve25519_donna"]; -var _memset = Module["_memset"] = asm["_memset"]; -var _malloc = Module["_malloc"] = asm["_malloc"]; -var _memcpy = Module["_memcpy"] = asm["_memcpy"]; -var _strlen = Module["_strlen"] = asm["_strlen"]; -var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"]; -var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"]; -var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"]; -var runPostSets = Module["runPostSets"] = asm["runPostSets"]; - -Runtime.stackAlloc = asm['stackAlloc']; -Runtime.stackSave = asm['stackSave']; -Runtime.stackRestore = asm['stackRestore']; -Runtime.setTempRet0 = asm['setTempRet0']; -Runtime.getTempRet0 = asm['getTempRet0']; - - -// TODO: strip out parts of this we do not need - -//======= begin closure i64 code ======= - -// Copyright 2009 The Closure Library Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Defines a Long class for representing a 64-bit two's-complement - * integer value, which faithfully simulates the behavior of a Java "long". This - * implementation is derived from LongLib in GWT. - * - */ - -var i64Math = (function() { // Emscripten wrapper - var goog = { math: {} }; - - - /** - * Constructs a 64-bit two's-complement integer, given its low and high 32-bit - * values as *signed* integers. See the from* functions below for more - * convenient ways of constructing Longs. - * - * The internal representation of a long is the two given signed, 32-bit values. - * We use 32-bit pieces because these are the size of integers on which - * Javascript performs bit-operations. For operations like addition and - * multiplication, we split each number into 16-bit pieces, which can easily be - * multiplied within Javascript's floating-point representation without overflow - * or change in sign. - * - * In the algorithms below, we frequently reduce the negative case to the - * positive case by negating the input(s) and then post-processing the result. - * Note that we must ALWAYS check specially whether those values are MIN_VALUE - * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as - * a positive number, it overflows back into a negative). Not handling this - * case would often result in infinite recursion. - * - * @param {number} low The low (signed) 32 bits of the long. - * @param {number} high The high (signed) 32 bits of the long. - * @constructor - */ - goog.math.Long = function(low, high) { - /** - * @type {number} - * @private - */ - this.low_ = low | 0; // force into 32 signed bits. - - /** - * @type {number} - * @private - */ - this.high_ = high | 0; // force into 32 signed bits. - }; - - - // NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the - // from* methods on which they depend. - - - /** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @private - */ - goog.math.Long.IntCache_ = {}; - - - /** - * Returns a Long representing the given (32-bit) integer value. - * @param {number} value The 32-bit integer in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromInt = function(value) { - if (-128 <= value && value < 128) { - var cachedObj = goog.math.Long.IntCache_[value]; - if (cachedObj) { - return cachedObj; - } - } - - var obj = new goog.math.Long(value | 0, value < 0 ? -1 : 0); - if (-128 <= value && value < 128) { - goog.math.Long.IntCache_[value] = obj; - } - return obj; - }; - - - /** - * Returns a Long representing the given value, provided that it is a finite - * number. Otherwise, zero is returned. - * @param {number} value The number in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromNumber = function(value) { - if (isNaN(value) || !isFinite(value)) { - return goog.math.Long.ZERO; - } else if (value <= -goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MIN_VALUE; - } else if (value + 1 >= goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MAX_VALUE; - } else if (value < 0) { - return goog.math.Long.fromNumber(-value).negate(); + HEAP32[$$pre$phiZ2D>>2] = $p$0; + $244 = ((($F16$0)) + 12|0); + HEAP32[$244>>2] = $p$0; + $245 = ((($p$0)) + 8|0); + HEAP32[$245>>2] = $F16$0; + $246 = ((($p$0)) + 12|0); + HEAP32[$246>>2] = $234; + return; + } + $247 = $psize$1 >>> 8; + $248 = ($247|0)==(0); + if ($248) { + $I18$0 = 0; + } else { + $249 = ($psize$1>>>0)>(16777215); + if ($249) { + $I18$0 = 31; + } else { + $250 = (($247) + 1048320)|0; + $251 = $250 >>> 16; + $252 = $251 & 8; + $253 = $247 << $252; + $254 = (($253) + 520192)|0; + $255 = $254 >>> 16; + $256 = $255 & 4; + $257 = $256 | $252; + $258 = $253 << $256; + $259 = (($258) + 245760)|0; + $260 = $259 >>> 16; + $261 = $260 & 2; + $262 = $257 | $261; + $263 = (14 - ($262))|0; + $264 = $258 << $261; + $265 = $264 >>> 15; + $266 = (($263) + ($265))|0; + $267 = $266 << 1; + $268 = (($266) + 7)|0; + $269 = $psize$1 >>> $268; + $270 = $269 & 1; + $271 = $270 | $267; + $I18$0 = $271; + } + } + $272 = (32980 + ($I18$0<<2)|0); + $273 = ((($p$0)) + 28|0); + HEAP32[$273>>2] = $I18$0; + $274 = ((($p$0)) + 16|0); + $275 = ((($p$0)) + 20|0); + HEAP32[$275>>2] = 0; + HEAP32[$274>>2] = 0; + $276 = HEAP32[(32680)>>2]|0; + $277 = 1 << $I18$0; + $278 = $276 & $277; + $279 = ($278|0)==(0); + L199: do { + if ($279) { + $280 = $276 | $277; + HEAP32[(32680)>>2] = $280; + HEAP32[$272>>2] = $p$0; + $281 = ((($p$0)) + 24|0); + HEAP32[$281>>2] = $272; + $282 = ((($p$0)) + 12|0); + HEAP32[$282>>2] = $p$0; + $283 = ((($p$0)) + 8|0); + HEAP32[$283>>2] = $p$0; + } else { + $284 = HEAP32[$272>>2]|0; + $285 = ((($284)) + 4|0); + $286 = HEAP32[$285>>2]|0; + $287 = $286 & -8; + $288 = ($287|0)==($psize$1|0); + L202: do { + if ($288) { + $T$0$lcssa = $284; } else { - return new goog.math.Long( - (value % goog.math.Long.TWO_PWR_32_DBL_) | 0, - (value / goog.math.Long.TWO_PWR_32_DBL_) | 0); - } - }; - - - /** - * Returns a Long representing the 64-bit integer that comes by concatenating - * the given high and low bits. Each is assumed to use 32 bits. - * @param {number} lowBits The low 32-bits. - * @param {number} highBits The high 32-bits. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromBits = function(lowBits, highBits) { - return new goog.math.Long(lowBits, highBits); - }; - - - /** - * Returns a Long representation of the given string, written using the given - * radix. - * @param {string} str The textual representation of the Long. - * @param {number=} opt_radix The radix in which the text is written. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromString = function(str, opt_radix) { - if (str.length == 0) { - throw Error('number format error: empty string'); - } - - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (str.charAt(0) == '-') { - return goog.math.Long.fromString(str.substring(1), radix).negate(); - } else if (str.indexOf('-') >= 0) { - throw Error('number format error: interior "-" character: ' + str); - } - - // Do several (8) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 8)); - - var result = goog.math.Long.ZERO; - for (var i = 0; i < str.length; i += 8) { - var size = Math.min(8, str.length - i); - var value = parseInt(str.substring(i, i + size), radix); - if (size < 8) { - var power = goog.math.Long.fromNumber(Math.pow(radix, size)); - result = result.multiply(power).add(goog.math.Long.fromNumber(value)); + $289 = ($I18$0|0)==(31); + $290 = $I18$0 >>> 1; + $291 = (25 - ($290))|0; + $292 = $289 ? 0 : $291; + $293 = $psize$1 << $292; + $K19$052 = $293;$T$051 = $284; + while(1) { + $300 = $K19$052 >>> 31; + $301 = (((($T$051)) + 16|0) + ($300<<2)|0); + $296 = HEAP32[$301>>2]|0; + $302 = ($296|0)==(0|0); + if ($302) { + $$lcssa = $301;$T$051$lcssa = $T$051; + break; + } + $294 = $K19$052 << 1; + $295 = ((($296)) + 4|0); + $297 = HEAP32[$295>>2]|0; + $298 = $297 & -8; + $299 = ($298|0)==($psize$1|0); + if ($299) { + $T$0$lcssa = $296; + break L202; } else { - result = result.multiply(radixToPower); - result = result.add(goog.math.Long.fromNumber(value)); + $K19$052 = $294;$T$051 = $296; } + } + $303 = HEAP32[(32692)>>2]|0; + $304 = ($$lcssa>>>0)<($303>>>0); + if ($304) { + _abort(); + // unreachable; + } else { + HEAP32[$$lcssa>>2] = $p$0; + $305 = ((($p$0)) + 24|0); + HEAP32[$305>>2] = $T$051$lcssa; + $306 = ((($p$0)) + 12|0); + HEAP32[$306>>2] = $p$0; + $307 = ((($p$0)) + 8|0); + HEAP32[$307>>2] = $p$0; + break L199; + } } - return result; - }; - - - // NOTE: the compiler should inline these constant values below and then remove - // these variables, so there should be no runtime penalty for these. - - - /** - * Number used repeated below in calculations. This must appear before the - * first call to any from* function below. - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_16_DBL_ = 1 << 16; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_24_DBL_ = 1 << 24; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_32_DBL_ = - goog.math.Long.TWO_PWR_16_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_31_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ / 2; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_48_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_64_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_32_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_63_DBL_ = - goog.math.Long.TWO_PWR_64_DBL_ / 2; - - - /** @type {!goog.math.Long} */ - goog.math.Long.ZERO = goog.math.Long.fromInt(0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.ONE = goog.math.Long.fromInt(1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.NEG_ONE = goog.math.Long.fromInt(-1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MAX_VALUE = - goog.math.Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MIN_VALUE = goog.math.Long.fromBits(0, 0x80000000 | 0); - - - /** - * @type {!goog.math.Long} - * @private - */ - goog.math.Long.TWO_PWR_24_ = goog.math.Long.fromInt(1 << 24); - - - /** @return {number} The value, assuming it is a 32-bit integer. */ - goog.math.Long.prototype.toInt = function() { - return this.low_; - }; - - - /** @return {number} The closest floating-point representation to this value. */ - goog.math.Long.prototype.toNumber = function() { - return this.high_ * goog.math.Long.TWO_PWR_32_DBL_ + - this.getLowBitsUnsigned(); - }; - - - /** - * @param {number=} opt_radix The radix in which the text should be written. - * @return {string} The textual representation of this value. - */ - goog.math.Long.prototype.toString = function(opt_radix) { - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (this.isZero()) { - return '0'; - } - - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - // We need to change the Long value before it can be negated, so we remove - // the bottom-most digit in this base and then recurse to do the rest. - var radixLong = goog.math.Long.fromNumber(radix); - var div = this.div(radixLong); - var rem = div.multiply(radixLong).subtract(this); - return div.toString(radix) + rem.toInt().toString(radix); - } else { - return '-' + this.negate().toString(radix); - } + } while(0); + $308 = ((($T$0$lcssa)) + 8|0); + $309 = HEAP32[$308>>2]|0; + $310 = HEAP32[(32692)>>2]|0; + $311 = ($309>>>0)>=($310>>>0); + $not$ = ($T$0$lcssa>>>0)>=($310>>>0); + $312 = $311 & $not$; + if ($312) { + $313 = ((($309)) + 12|0); + HEAP32[$313>>2] = $p$0; + HEAP32[$308>>2] = $p$0; + $314 = ((($p$0)) + 8|0); + HEAP32[$314>>2] = $309; + $315 = ((($p$0)) + 12|0); + HEAP32[$315>>2] = $T$0$lcssa; + $316 = ((($p$0)) + 24|0); + HEAP32[$316>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $317 = HEAP32[(32708)>>2]|0; + $318 = (($317) + -1)|0; + HEAP32[(32708)>>2] = $318; + $319 = ($318|0)==(0); + if ($319) { + $sp$0$in$i = (33132); + } else { + return; + } + while(1) { + $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; + $320 = ($sp$0$i|0)==(0|0); + $321 = ((($sp$0$i)) + 8|0); + if ($320) { + break; + } else { + $sp$0$in$i = $321; + } + } + HEAP32[(32708)>>2] = -1; + return; +} +function runPostSets() { +} +function _bitshift64Ashr(low, high, bits) { + low = low|0; high = high|0; bits = bits|0; + var ander = 0; + if ((bits|0) < 32) { + ander = ((1 << bits) - 1)|0; + tempRet0 = high >> bits; + return (low >>> bits) | ((high&ander) << (32 - bits)); } - - // Do several (6) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 6)); - - var rem = this; - var result = ''; - while (true) { - var remDiv = rem.div(radixToPower); - var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt(); - var digits = intval.toString(radix); - - rem = remDiv; - if (rem.isZero()) { - return digits + result; - } else { - while (digits.length < 6) { - digits = '0' + digits; + tempRet0 = (high|0) < 0 ? -1 : 0; + return (high >> (bits - 32))|0; +} +function _i64Subtract(a, b, c, d) { + a = a|0; b = b|0; c = c|0; d = d|0; + var l = 0, h = 0; + l = (a - c)>>>0; + h = (b - d)>>>0; + h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow. + return ((tempRet0 = h,l|0)|0); +} +function _i64Add(a, b, c, d) { + /* + x = a + b*2^32 + y = c + d*2^32 + result = l + h*2^32 + */ + a = a|0; b = b|0; c = c|0; d = d|0; + var l = 0, h = 0; + l = (a + c)>>>0; + h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow. + return ((tempRet0 = h,l|0)|0); +} +function _memset(ptr, value, num) { + ptr = ptr|0; value = value|0; num = num|0; + var stop = 0, value4 = 0, stop4 = 0, unaligned = 0; + stop = (ptr + num)|0; + if ((num|0) >= 20) { + // This is unaligned, but quite large, so work hard to get to aligned settings + value = value & 0xff; + unaligned = ptr & 3; + value4 = value | (value << 8) | (value << 16) | (value << 24); + stop4 = stop & ~3; + if (unaligned) { + unaligned = (ptr + 4 - unaligned)|0; + while ((ptr|0) < (unaligned|0)) { // no need to check for stop, since we have large num + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; } - result = '' + digits + result; - } - } - }; - - - /** @return {number} The high 32-bits as a signed value. */ - goog.math.Long.prototype.getHighBits = function() { - return this.high_; - }; - - - /** @return {number} The low 32-bits as a signed value. */ - goog.math.Long.prototype.getLowBits = function() { - return this.low_; - }; - - - /** @return {number} The low 32-bits as an unsigned value. */ - goog.math.Long.prototype.getLowBitsUnsigned = function() { - return (this.low_ >= 0) ? - this.low_ : goog.math.Long.TWO_PWR_32_DBL_ + this.low_; - }; - - - /** - * @return {number} Returns the number of bits needed to represent the absolute - * value of this Long. - */ - goog.math.Long.prototype.getNumBitsAbs = function() { - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return 64; - } else { - return this.negate().getNumBitsAbs(); } - } else { - var val = this.high_ != 0 ? this.high_ : this.low_; - for (var bit = 31; bit > 0; bit--) { - if ((val & (1 << bit)) != 0) { - break; - } + while ((ptr|0) < (stop4|0)) { + HEAP32[((ptr)>>2)]=value4; + ptr = (ptr+4)|0; } - return this.high_ != 0 ? bit + 33 : bit + 1; - } - }; - - - /** @return {boolean} Whether this value is zero. */ - goog.math.Long.prototype.isZero = function() { - return this.high_ == 0 && this.low_ == 0; - }; - - - /** @return {boolean} Whether this value is negative. */ - goog.math.Long.prototype.isNegative = function() { - return this.high_ < 0; - }; - - - /** @return {boolean} Whether this value is odd. */ - goog.math.Long.prototype.isOdd = function() { - return (this.low_ & 1) == 1; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long equals the other. - */ - goog.math.Long.prototype.equals = function(other) { - return (this.high_ == other.high_) && (this.low_ == other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long does not equal the other. - */ - goog.math.Long.prototype.notEquals = function(other) { - return (this.high_ != other.high_) || (this.low_ != other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than the other. - */ - goog.math.Long.prototype.lessThan = function(other) { - return this.compare(other) < 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than or equal to the other. - */ - goog.math.Long.prototype.lessThanOrEqual = function(other) { - return this.compare(other) <= 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than the other. - */ - goog.math.Long.prototype.greaterThan = function(other) { - return this.compare(other) > 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than or equal to the other. - */ - goog.math.Long.prototype.greaterThanOrEqual = function(other) { - return this.compare(other) >= 0; - }; - - - /** - * Compares this Long with the given one. - * @param {goog.math.Long} other Long to compare against. - * @return {number} 0 if they are the same, 1 if the this is greater, and -1 - * if the given one is greater. - */ - goog.math.Long.prototype.compare = function(other) { - if (this.equals(other)) { - return 0; - } - - var thisNeg = this.isNegative(); - var otherNeg = other.isNegative(); - if (thisNeg && !otherNeg) { - return -1; - } - if (!thisNeg && otherNeg) { - return 1; } - - // at this point, the signs are the same, so subtraction will not overflow - if (this.subtract(other).isNegative()) { - return -1; - } else { - return 1; - } - }; - - - /** @return {!goog.math.Long} The negation of this value. */ - goog.math.Long.prototype.negate = function() { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.MIN_VALUE; - } else { - return this.not().add(goog.math.Long.ONE); - } - }; - - - /** - * Returns the sum of this and the given Long. - * @param {goog.math.Long} other Long to add to this one. - * @return {!goog.math.Long} The sum of this and the given Long. - */ - goog.math.Long.prototype.add = function(other) { - // Divide each number into 4 chunks of 16 bits, and then sum the chunks. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 + b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns the difference of this and the given Long. - * @param {goog.math.Long} other Long to subtract from this. - * @return {!goog.math.Long} The difference of this and the given Long. - */ - goog.math.Long.prototype.subtract = function(other) { - return this.add(other.negate()); - }; - - - /** - * Returns the product of this and the given long. - * @param {goog.math.Long} other Long to multiply with this. - * @return {!goog.math.Long} The product of this and the other. - */ - goog.math.Long.prototype.multiply = function(other) { - if (this.isZero()) { - return goog.math.Long.ZERO; - } else if (other.isZero()) { - return goog.math.Long.ZERO; - } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - return other.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return this.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().multiply(other.negate()); - } else { - return this.negate().multiply(other).negate(); - } - } else if (other.isNegative()) { - return this.multiply(other.negate()).negate(); + while ((ptr|0) < (stop|0)) { + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; } - - // If both longs are small, use float multiplication - if (this.lessThan(goog.math.Long.TWO_PWR_24_) && - other.lessThan(goog.math.Long.TWO_PWR_24_)) { - return goog.math.Long.fromNumber(this.toNumber() * other.toNumber()); + return (ptr-num)|0; +} +function _bitshift64Lshr(low, high, bits) { + low = low|0; high = high|0; bits = bits|0; + var ander = 0; + if ((bits|0) < 32) { + ander = ((1 << bits) - 1)|0; + tempRet0 = high >>> bits; + return (low >>> bits) | ((high&ander) << (32 - bits)); } - - // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. - // We can skip products that would overflow. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns this Long divided by the given one. - * @param {goog.math.Long} other Long by which to divide. - * @return {!goog.math.Long} This Long divided by the given one. - */ - goog.math.Long.prototype.div = function(other) { - if (other.isZero()) { - throw Error('division by zero'); - } else if (this.isZero()) { - return goog.math.Long.ZERO; + tempRet0 = 0; + return (high >>> (bits - 32))|0; +} +function _bitshift64Shl(low, high, bits) { + low = low|0; high = high|0; bits = bits|0; + var ander = 0; + if ((bits|0) < 32) { + ander = ((1 << bits) - 1)|0; + tempRet0 = (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits)); + return low << bits; } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - if (other.equals(goog.math.Long.ONE) || - other.equals(goog.math.Long.NEG_ONE)) { - return goog.math.Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ONE; - } else { - // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. - var halfThis = this.shiftRight(1); - var approx = halfThis.div(other).shiftLeft(1); - if (approx.equals(goog.math.Long.ZERO)) { - return other.isNegative() ? goog.math.Long.ONE : goog.math.Long.NEG_ONE; - } else { - var rem = this.subtract(other.multiply(approx)); - var result = approx.add(rem.div(other)); - return result; - } + tempRet0 = low << (bits - 32); + return 0; +} +function _memcpy(dest, src, num) { + dest = dest|0; src = src|0; num = num|0; + var ret = 0; + if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; + ret = dest|0; + if ((dest&3) == (src&3)) { + while (dest & 3) { + if ((num|0) == 0) return ret|0; + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + num = (num-1)|0; } - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().div(other.negate()); - } else { - return this.negate().div(other).negate(); + while ((num|0) >= 4) { + HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); + dest = (dest+4)|0; + src = (src+4)|0; + num = (num-4)|0; } - } else if (other.isNegative()) { - return this.div(other.negate()).negate(); } - - // Repeat the following until the remainder is less than other: find a - // floating-point that approximates remainder / other *from below*, add this - // into the result, and subtract it from the remainder. It is critical that - // the approximate value is less than or equal to the real value so that the - // remainder never becomes negative. - var res = goog.math.Long.ZERO; - var rem = this; - while (rem.greaterThanOrEqual(other)) { - // Approximate the result of division. This may be a little greater or - // smaller than the actual value. - var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber())); - - // We will tweak the approximate result by changing it in the 48-th digit or - // the smallest non-fractional digit, whichever is larger. - var log2 = Math.ceil(Math.log(approx) / Math.LN2); - var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48); - - // Decrease the approximation until it is smaller than the remainder. Note - // that if it is too large, the product overflows and is negative. - var approxRes = goog.math.Long.fromNumber(approx); - var approxRem = approxRes.multiply(other); - while (approxRem.isNegative() || approxRem.greaterThan(rem)) { - approx -= delta; - approxRes = goog.math.Long.fromNumber(approx); - approxRem = approxRes.multiply(other); - } - - // We know the answer can't be zero... and actually, zero would cause - // infinite recursion since we would make no progress. - if (approxRes.isZero()) { - approxRes = goog.math.Long.ONE; - } - - res = res.add(approxRes); - rem = rem.subtract(approxRem); + while ((num|0) > 0) { + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + num = (num-1)|0; } - return res; - }; - - - /** - * Returns this Long modulo the given one. - * @param {goog.math.Long} other Long by which to mod. - * @return {!goog.math.Long} This Long modulo the given one. - */ - goog.math.Long.prototype.modulo = function(other) { - return this.subtract(this.div(other).multiply(other)); - }; - - - /** @return {!goog.math.Long} The bitwise-NOT of this value. */ - goog.math.Long.prototype.not = function() { - return goog.math.Long.fromBits(~this.low_, ~this.high_); - }; - - - /** - * Returns the bitwise-AND of this Long and the given one. - * @param {goog.math.Long} other The Long with which to AND. - * @return {!goog.math.Long} The bitwise-AND of this and the other. - */ - goog.math.Long.prototype.and = function(other) { - return goog.math.Long.fromBits(this.low_ & other.low_, - this.high_ & other.high_); - }; - - - /** - * Returns the bitwise-OR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to OR. - * @return {!goog.math.Long} The bitwise-OR of this and the other. - */ - goog.math.Long.prototype.or = function(other) { - return goog.math.Long.fromBits(this.low_ | other.low_, - this.high_ | other.high_); - }; - - - /** - * Returns the bitwise-XOR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to XOR. - * @return {!goog.math.Long} The bitwise-XOR of this and the other. - */ - goog.math.Long.prototype.xor = function(other) { - return goog.math.Long.fromBits(this.low_ ^ other.low_, - this.high_ ^ other.high_); - }; - - - /** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the left by the given amount. - */ - goog.math.Long.prototype.shiftLeft = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var low = this.low_; - if (numBits < 32) { - var high = this.high_; - return goog.math.Long.fromBits( - low << numBits, - (high << numBits) | (low >>> (32 - numBits))); - } else { - return goog.math.Long.fromBits(0, low << (numBits - 32)); + return ret|0; +} +function _memmove(dest, src, num) { + dest = dest|0; src = src|0; num = num|0; + var ret = 0; + if (((src|0) < (dest|0)) & ((dest|0) < ((src + num)|0))) { + // Unlikely case: Copy backwards in a safe manner + ret = dest; + src = (src + num)|0; + dest = (dest + num)|0; + while ((num|0) > 0) { + dest = (dest - 1)|0; + src = (src - 1)|0; + num = (num - 1)|0; + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); } - } - }; - - - /** - * Returns this Long with bits shifted to the right by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount. - */ - goog.math.Long.prototype.shiftRight = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; + dest = ret; } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >> numBits); - } else { - return goog.math.Long.fromBits( - high >> (numBits - 32), - high >= 0 ? 0 : -1); - } + _memcpy(dest, src, num) | 0; } - }; - + return dest | 0; +} +function _llvm_cttz_i32(x) { + x = x|0; + var ret = 0; + ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0); + if ((ret|0) < 8) return ret|0; + ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0); + if ((ret|0) < 8) return (ret + 8)|0; + ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0); + if ((ret|0) < 8) return (ret + 16)|0; + return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0; + } - /** - * Returns this Long with bits shifted to the right by the given amount, with - * the new top bits matching the current sign bit. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount, with - * zeros placed into the new leading bits. - */ - goog.math.Long.prototype.shiftRightUnsigned = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; +// ======== compiled code from system/lib/compiler-rt , see readme therein +function ___muldsi3($a, $b) { + $a = $a | 0; + $b = $b | 0; + var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0; + $1 = $a & 65535; + $2 = $b & 65535; + $3 = Math_imul($2, $1) | 0; + $6 = $a >>> 16; + $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0; + $11 = $b >>> 16; + $12 = Math_imul($11, $1) | 0; + return (tempRet0 = (($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0, 0 | ($8 + $12 << 16 | $3 & 65535)) | 0; +} +function ___divdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $7$0 = 0, $7$1 = 0, $8$0 = 0, $10$0 = 0; + $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; + $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; + $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; + $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; + $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; + $4$1 = tempRet0; + $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; + $7$0 = $2$0 ^ $1$0; + $7$1 = $2$1 ^ $1$1; + $8$0 = ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, 0) | 0; + $10$0 = _i64Subtract($8$0 ^ $7$0, tempRet0 ^ $7$1, $7$0, $7$1) | 0; + return $10$0 | 0; +} +function ___remdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $rem = 0, $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $10$0 = 0, $10$1 = 0, __stackBase__ = 0; + __stackBase__ = STACKTOP; + STACKTOP = STACKTOP + 16 | 0; + $rem = __stackBase__ | 0; + $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; + $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; + $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; + $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; + $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; + $4$1 = tempRet0; + $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; + ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, $rem) | 0; + $10$0 = _i64Subtract(HEAP32[$rem >> 2] ^ $1$0, HEAP32[$rem + 4 >> 2] ^ $1$1, $1$0, $1$1) | 0; + $10$1 = tempRet0; + STACKTOP = __stackBase__; + return (tempRet0 = $10$1, $10$0) | 0; +} +function ___muldi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0; + $x_sroa_0_0_extract_trunc = $a$0; + $y_sroa_0_0_extract_trunc = $b$0; + $1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0; + $1$1 = tempRet0; + $2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0; + return (tempRet0 = ((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0, 0 | $1$0 & -1) | 0; +} +function ___udivdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $1$0 = 0; + $1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0; + return $1$0 | 0; +} +function ___uremdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $rem = 0, __stackBase__ = 0; + __stackBase__ = STACKTOP; + STACKTOP = STACKTOP + 16 | 0; + $rem = __stackBase__ | 0; + ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0; + STACKTOP = __stackBase__; + return (tempRet0 = HEAP32[$rem + 4 >> 2] | 0, HEAP32[$rem >> 2] | 0) | 0; +} +function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + $rem = $rem | 0; + var $n_sroa_0_0_extract_trunc = 0, $n_sroa_1_4_extract_shift$0 = 0, $n_sroa_1_4_extract_trunc = 0, $d_sroa_0_0_extract_trunc = 0, $d_sroa_1_4_extract_shift$0 = 0, $d_sroa_1_4_extract_trunc = 0, $4 = 0, $17 = 0, $37 = 0, $49 = 0, $51 = 0, $57 = 0, $58 = 0, $66 = 0, $78 = 0, $86 = 0, $88 = 0, $89 = 0, $91 = 0, $92 = 0, $95 = 0, $105 = 0, $117 = 0, $119 = 0, $125 = 0, $126 = 0, $130 = 0, $q_sroa_1_1_ph = 0, $q_sroa_0_1_ph = 0, $r_sroa_1_1_ph = 0, $r_sroa_0_1_ph = 0, $sr_1_ph = 0, $d_sroa_0_0_insert_insert99$0 = 0, $d_sroa_0_0_insert_insert99$1 = 0, $137$0 = 0, $137$1 = 0, $carry_0203 = 0, $sr_1202 = 0, $r_sroa_0_1201 = 0, $r_sroa_1_1200 = 0, $q_sroa_0_1199 = 0, $q_sroa_1_1198 = 0, $147 = 0, $149 = 0, $r_sroa_0_0_insert_insert42$0 = 0, $r_sroa_0_0_insert_insert42$1 = 0, $150$1 = 0, $151$0 = 0, $152 = 0, $154$0 = 0, $r_sroa_0_0_extract_trunc = 0, $r_sroa_1_4_extract_trunc = 0, $155 = 0, $carry_0_lcssa$0 = 0, $carry_0_lcssa$1 = 0, $r_sroa_0_1_lcssa = 0, $r_sroa_1_1_lcssa = 0, $q_sroa_0_1_lcssa = 0, $q_sroa_1_1_lcssa = 0, $q_sroa_0_0_insert_ext75$0 = 0, $q_sroa_0_0_insert_ext75$1 = 0, $q_sroa_0_0_insert_insert77$1 = 0, $_0$0 = 0, $_0$1 = 0; + $n_sroa_0_0_extract_trunc = $a$0; + $n_sroa_1_4_extract_shift$0 = $a$1; + $n_sroa_1_4_extract_trunc = $n_sroa_1_4_extract_shift$0; + $d_sroa_0_0_extract_trunc = $b$0; + $d_sroa_1_4_extract_shift$0 = $b$1; + $d_sroa_1_4_extract_trunc = $d_sroa_1_4_extract_shift$0; + if (($n_sroa_1_4_extract_trunc | 0) == 0) { + $4 = ($rem | 0) != 0; + if (($d_sroa_1_4_extract_trunc | 0) == 0) { + if ($4) { + HEAP32[$rem >> 2] = ($n_sroa_0_0_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); + HEAP32[$rem + 4 >> 2] = 0; + } + $_0$1 = 0; + $_0$0 = ($n_sroa_0_0_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >>> numBits); - } else if (numBits == 32) { - return goog.math.Long.fromBits(high, 0); - } else { - return goog.math.Long.fromBits(high >>> (numBits - 32), 0); + if (!$4) { + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } + HEAP32[$rem >> 2] = $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $a$1 & 0; + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } - }; - - //======= begin jsbn ======= - - var navigator = { appName: 'Modern Browser' }; // polyfill a little - - // Copyright (c) 2005 Tom Wu - // All Rights Reserved. - // http://www-cs-students.stanford.edu/~tjw/jsbn/ - - /* - * Copyright (c) 2003-2005 Tom Wu - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF - * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * In addition, the following condition applies: - * - * All redistributions must retain an intact copy of this copyright notice - * and disclaimer. - */ - - // Basic JavaScript BN library - subset useful for RSA encryption. - - // Bits per digit - var dbits; - - // JavaScript engine analysis - var canary = 0xdeadbeefcafe; - var j_lm = ((canary&0xffffff)==0xefcafe); - - // (public) Constructor - function BigInteger(a,b,c) { - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); - } - - // return new, unset BigInteger - function nbi() { return new BigInteger(null); } - - // am: Compute w_j += (x*this_i), propagate carries, - // c is initial carry, returns final carry. - // c < 3*dvalue, x < 2*dvalue, this_i < dvalue - // We need to select the fastest one that works in this environment. - - // am1: use a single mult and divide to get the high bits, - // max digit bits should be 26 because - // max internal value = 2*dvalue^2-2*dvalue (< 2^53) - function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this[i++]+w[j]+c; - c = Math.floor(v/0x4000000); - w[j++] = v&0x3ffffff; - } - return c; - } - // am2 avoids a big mult-and-extract completely. - // Max digit bits should be <= 30 because we do bitwise ops - // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this[i]&0x7fff; - var h = this[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w[j++] = l&0x3fffffff; - } - return c; - } - // Alternately, set max digit bits to 28 since some - // browsers slow down when dealing with 32-bit numbers. - function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this[i]&0x3fff; - var h = this[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w[j++] = l&0xfffffff; - } - return c; - } - if(j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; - } - else if(j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; - } - else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; - } - - BigInteger.prototype.DB = dbits; - BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; - } - - // (protected) set from integer value x, -DV <= x < DV - function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+DV; - else this.t = 0; } - - // return bigint initialized to value - function nbv(i) { var r = nbi(); r.fromInt(i); return r; } - - // (protected) set from string and radix - function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; + $17 = ($d_sroa_1_4_extract_trunc | 0) == 0; + do { + if (($d_sroa_0_0_extract_trunc | 0) == 0) { + if ($17) { + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); + HEAP32[$rem + 4 >> 2] = 0; + } + $_0$1 = 0; + $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + if (($n_sroa_0_0_extract_trunc | 0) == 0) { + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0; + HEAP32[$rem + 4 >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_1_4_extract_trunc >>> 0); + } + $_0$1 = 0; + $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_1_4_extract_trunc >>> 0) >>> 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + $37 = $d_sroa_1_4_extract_trunc - 1 | 0; + if (($37 & $d_sroa_1_4_extract_trunc | 0) == 0) { + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0 | $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $37 & $n_sroa_1_4_extract_trunc | $a$1 & 0; + } + $_0$1 = 0; + $_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0); + return (tempRet0 = $_0$1, $_0$0) | 0; + } + $49 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; + $51 = $49 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + if ($51 >>> 0 <= 30) { + $57 = $51 + 1 | 0; + $58 = 31 - $51 | 0; + $sr_1_ph = $57; + $r_sroa_0_1_ph = $n_sroa_1_4_extract_trunc << $58 | $n_sroa_0_0_extract_trunc >>> ($57 >>> 0); + $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($57 >>> 0); + $q_sroa_0_1_ph = 0; + $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $58; + break; } - mi = false; - if(sh == 0) - this[this.t++] = x; - else if(sh+k > this.DB) { - this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); + if (($rem | 0) == 0) { + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } - else - this[this.t-1] |= x<= this.DB) sh -= this.DB; - } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; - } - - // (public) return string representation in given radix - function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this[i]&((1<>(p+=this.DB-k); + HEAP32[$rem >> 2] = 0 | $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } else { + if (!$17) { + $117 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; + $119 = $117 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + if ($119 >>> 0 <= 31) { + $125 = $119 + 1 | 0; + $126 = 31 - $119 | 0; + $130 = $119 - 31 >> 31; + $sr_1_ph = $125; + $r_sroa_0_1_ph = $n_sroa_0_0_extract_trunc >>> ($125 >>> 0) & $130 | $n_sroa_1_4_extract_trunc << $126; + $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($125 >>> 0) & $130; + $q_sroa_0_1_ph = 0; + $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $126; + break; } - else { - d = (this[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } + if (($rem | 0) == 0) { + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } - if(d > 0) m = true; - if(m) r += int2char(d); + HEAP32[$rem >> 2] = 0 | $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } - } - return m?r:"0"; - } - - // (public) -this - function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } - - // (public) |this| - function bnAbs() { return (this.s<0)?this.negate():this; } - - // (public) return + if this > a, - if this < a, 0 if equal - function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; - return 0; - } - - // returns bit length of the integer x - function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; - } - - // (public) return the number of bits in "this" - function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); - } - - // (protected) r = this << n*DB - function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; - for(i = n-1; i >= 0; --i) r[i] = 0; - r.t = this.t+n; - r.s = this.s; - } - - // (protected) r = this >> n*DB - function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r[i-n] = this[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; - } - - // (protected) r = this << n - function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r[i+ds+1] = (this[i]>>cbs)|c; - c = (this[i]&bm)<= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); - } - - // (protected) r = this >> n - function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r[i-ds-1] |= (this[i]&bm)<>bs; - } - if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; + $66 = $d_sroa_0_0_extract_trunc - 1 | 0; + if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) { + $86 = (Math_clz32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0; + $88 = $86 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + $89 = 64 - $88 | 0; + $91 = 32 - $88 | 0; + $92 = $91 >> 31; + $95 = $88 - 32 | 0; + $105 = $95 >> 31; + $sr_1_ph = $88; + $r_sroa_0_1_ph = $91 - 1 >> 31 & $n_sroa_1_4_extract_trunc >>> ($95 >>> 0) | ($n_sroa_1_4_extract_trunc << $91 | $n_sroa_0_0_extract_trunc >>> ($88 >>> 0)) & $105; + $r_sroa_1_1_ph = $105 & $n_sroa_1_4_extract_trunc >>> ($88 >>> 0); + $q_sroa_0_1_ph = $n_sroa_0_0_extract_trunc << $89 & $92; + $q_sroa_1_1_ph = ($n_sroa_1_4_extract_trunc << $89 | $n_sroa_0_0_extract_trunc >>> ($95 >>> 0)) & $92 | $n_sroa_0_0_extract_trunc << $91 & $88 - 33 >> 31; + break; } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c -= a[i]; - r[i++] = c&this.DM; - c >>= this.DB; + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = $66 & $n_sroa_0_0_extract_trunc; + HEAP32[$rem + 4 >> 2] = 0; } - c -= a.s; - } - r.s = (c<0)?-1:0; - if(c < -1) r[i++] = this.DV+c; - else if(c > 0) r[i++] = c; - r.t = i; - r.clamp(); - } - - // (protected) r = this * a, r != this,a (HAC 14.12) - // "this" should be the larger one if appropriate. - function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); - } - - // (protected) r = this^2, r != this (HAC 14.16) - function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x[i],r,2*i,0,1); - if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r[i+x.t] -= x.DV; - r[i+x.t+1] = 1; + if (($d_sroa_0_0_extract_trunc | 0) == 1) { + $_0$1 = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; + $_0$0 = 0 | $a$0 & -1; + return (tempRet0 = $_0$1, $_0$0) | 0; + } else { + $78 = _llvm_cttz_i32($d_sroa_0_0_extract_trunc | 0) | 0; + $_0$1 = 0 | $n_sroa_1_4_extract_trunc >>> ($78 >>> 0); + $_0$0 = $n_sroa_1_4_extract_trunc << 32 - $78 | $n_sroa_0_0_extract_trunc >>> ($78 >>> 0) | 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } } - if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); - r.s = 0; - r.clamp(); - } - - // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) - // r != q, this != m. q or r may be null. - function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; - } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } - else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r[r.t++] = 1; - r.subTo(t,r); - } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); - if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r[i] < --qd) r.subTo(t,r); + } while (0); + if (($sr_1_ph | 0) == 0) { + $q_sroa_1_1_lcssa = $q_sroa_1_1_ph; + $q_sroa_0_1_lcssa = $q_sroa_0_1_ph; + $r_sroa_1_1_lcssa = $r_sroa_1_1_ph; + $r_sroa_0_1_lcssa = $r_sroa_0_1_ph; + $carry_0_lcssa$1 = 0; + $carry_0_lcssa$0 = 0; + } else { + $d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1; + $d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0; + $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0 | 0, $d_sroa_0_0_insert_insert99$1 | 0, -1, -1) | 0; + $137$1 = tempRet0; + $q_sroa_1_1198 = $q_sroa_1_1_ph; + $q_sroa_0_1199 = $q_sroa_0_1_ph; + $r_sroa_1_1200 = $r_sroa_1_1_ph; + $r_sroa_0_1201 = $r_sroa_0_1_ph; + $sr_1202 = $sr_1_ph; + $carry_0203 = 0; + while (1) { + $147 = $q_sroa_0_1199 >>> 31 | $q_sroa_1_1198 << 1; + $149 = $carry_0203 | $q_sroa_0_1199 << 1; + $r_sroa_0_0_insert_insert42$0 = 0 | ($r_sroa_0_1201 << 1 | $q_sroa_1_1198 >>> 31); + $r_sroa_0_0_insert_insert42$1 = $r_sroa_0_1201 >>> 31 | $r_sroa_1_1200 << 1 | 0; + _i64Subtract($137$0, $137$1, $r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1) | 0; + $150$1 = tempRet0; + $151$0 = $150$1 >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1; + $152 = $151$0 & 1; + $154$0 = _i64Subtract($r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1, $151$0 & $d_sroa_0_0_insert_insert99$0, ((($150$1 | 0) < 0 ? -1 : 0) >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1) & $d_sroa_0_0_insert_insert99$1) | 0; + $r_sroa_0_0_extract_trunc = $154$0; + $r_sroa_1_4_extract_trunc = tempRet0; + $155 = $sr_1202 - 1 | 0; + if (($155 | 0) == 0) { + break; + } else { + $q_sroa_1_1198 = $147; + $q_sroa_0_1199 = $149; + $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc; + $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc; + $sr_1202 = $155; + $carry_0203 = $152; } } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); - } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); - } - - // (public) this mod a - function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; - } - - // Modular reduction using "classic" algorithm - function Classic(m) { this.m = m; } - function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; - } - function cRevert(x) { return x; } - function cReduce(x) { x.divRemTo(this.m,null,x); } - function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - Classic.prototype.convert = cConvert; - Classic.prototype.revert = cRevert; - Classic.prototype.reduce = cReduce; - Classic.prototype.mulTo = cMulTo; - Classic.prototype.sqrTo = cSqrTo; - - // (protected) return "-1/this % 2^DB"; useful for Mont. reduction - // justification: - // xy == 1 (mod m) - // xy = 1+km - // xy(2-xy) = (1+km)(1-km) - // x[y(2-xy)] = 1-k^2m^2 - // x[y(2-xy)] == 1 (mod m^2) - // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 - // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. - // JS multiply "overflows" differently from C/C++, so care is needed here. - function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; - } - - // Montgomery reduction - function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; - } - - // xR mod m - function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; - } - - // x/R mod m - function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; + $q_sroa_1_1_lcssa = $147; + $q_sroa_0_1_lcssa = $149; + $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc; + $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc; + $carry_0_lcssa$1 = 0; + $carry_0_lcssa$0 = $152; } - - // x = x/R mod m (HAC 14.32) - function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } - } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa; + $q_sroa_0_0_insert_ext75$1 = 0; + $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1; + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa; + HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0; } + $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1; + $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0; + return (tempRet0 = $_0$1, $_0$0) | 0; +} +// ======================================================================= - // r = "x^2/R mod m"; x != r - function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = "xy/R mod m"; x,y != r - function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Montgomery.prototype.convert = montConvert; - Montgomery.prototype.revert = montRevert; - Montgomery.prototype.reduce = montReduce; - Montgomery.prototype.mulTo = montMulTo; - Montgomery.prototype.sqrTo = montSqrTo; - - // (protected) true iff this is even - function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } - - // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } - } - return z.revert(r); - } - // (public) this^e % m, 0 <= e < 2^32 - function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); - } - // protected - BigInteger.prototype.copyTo = bnpCopyTo; - BigInteger.prototype.fromInt = bnpFromInt; - BigInteger.prototype.fromString = bnpFromString; - BigInteger.prototype.clamp = bnpClamp; - BigInteger.prototype.dlShiftTo = bnpDLShiftTo; - BigInteger.prototype.drShiftTo = bnpDRShiftTo; - BigInteger.prototype.lShiftTo = bnpLShiftTo; - BigInteger.prototype.rShiftTo = bnpRShiftTo; - BigInteger.prototype.subTo = bnpSubTo; - BigInteger.prototype.multiplyTo = bnpMultiplyTo; - BigInteger.prototype.squareTo = bnpSquareTo; - BigInteger.prototype.divRemTo = bnpDivRemTo; - BigInteger.prototype.invDigit = bnpInvDigit; - BigInteger.prototype.isEven = bnpIsEven; - BigInteger.prototype.exp = bnpExp; - - // public - BigInteger.prototype.toString = bnToString; - BigInteger.prototype.negate = bnNegate; - BigInteger.prototype.abs = bnAbs; - BigInteger.prototype.compareTo = bnCompareTo; - BigInteger.prototype.bitLength = bnBitLength; - BigInteger.prototype.mod = bnMod; - BigInteger.prototype.modPowInt = bnModPowInt; - - // "constants" - BigInteger.ZERO = nbv(0); - BigInteger.ONE = nbv(1); - - // jsbn2 stuff - - // (protected) convert from radix string - function bnpFromRadix(s,b) { - this.fromInt(0); - if(b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b,cs), mi = false, j = 0, w = 0; - for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } - } - if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); - } - if(mi) BigInteger.ZERO.subTo(this,this); - } + +function dynCall_ii(index,a1) { + index = index|0; + a1=a1|0; + return FUNCTION_TABLE_ii[index&1](a1|0)|0; +} - // (protected) return x s.t. r^x < DV - function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } - // (public) 0 if this == 0, 1 if this > 0 - function bnSigNum() { - if(this.s < 0) return -1; - else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; - } +function dynCall_iiii(index,a1,a2,a3) { + index = index|0; + a1=a1|0; a2=a2|0; a3=a3|0; + return FUNCTION_TABLE_iiii[index&3](a1|0,a2|0,a3|0)|0; +} - // (protected) this *= n, this >= 0, 1 < n < DV - function bnpDMultiply(n) { - this[this.t] = this.am(0,n-1,this,0,0,this.t); - ++this.t; - this.clamp(); - } - // (protected) this += n << w words, this >= 0 - function bnpDAddOffset(n,w) { - if(n == 0) return; - while(this.t <= w) this[this.t++] = 0; - this[w] += n; - while(this[w] >= this.DV) { - this[w] -= this.DV; - if(++w >= this.t) this[this.t++] = 0; - ++this[w]; - } - } +function dynCall_vi(index,a1) { + index = index|0; + a1=a1|0; + FUNCTION_TABLE_vi[index&1](a1|0); +} - // (protected) convert to radix string - function bnpToRadix(b) { - if(b == null) b = 10; - if(this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b,cs); - var d = nbv(a), y = nbi(), z = nbi(), r = ""; - this.divRemTo(d,y,z); - while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); - } - return z.intValue().toString(b) + r; - } +function b0(p0) { + p0 = p0|0; abort(0);return 0; +} +function b1(p0,p1,p2) { + p0 = p0|0;p1 = p1|0;p2 = p2|0; abort(1);return 0; +} +function b2(p0) { + p0 = p0|0; abort(2); +} - // (public) return value as integer - function bnIntValue() { - if(this.s < 0) { - if(this.t == 1) return this[0]-this.DV; - else if(this.t == 0) return -1; - } - else if(this.t == 1) return this[0]; - else if(this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1]&((1<<(32-this.DB))-1))<>= this.DB; - } - if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c += a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c<0)?-1:0; - if(c > 0) r[i++] = c; - else if(c < -1) r[i++] = this.DV+c; - r.t = i; - r.clamp(); - } + return { _curve25519_verify: _curve25519_verify, _crypto_sign_ed25519_ref10_ge_scalarmult_base: _crypto_sign_ed25519_ref10_ge_scalarmult_base, _curve25519_sign: _curve25519_sign, _fflush: _fflush, _i64Add: _i64Add, _memmove: _memmove, _bitshift64Ashr: _bitshift64Ashr, _sph_sha512_init: _sph_sha512_init, _curve25519_donna: _curve25519_donna, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, _bitshift64Lshr: _bitshift64Lshr, _free: _free, _i64Subtract: _i64Subtract, ___errno_location: ___errno_location, _bitshift64Shl: _bitshift64Shl, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, establishStackSpace: establishStackSpace, setThrew: setThrew, setTempRet0: setTempRet0, getTempRet0: getTempRet0, dynCall_ii: dynCall_ii, dynCall_iiii: dynCall_iiii, dynCall_vi: dynCall_vi }; +}) +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg, Module.asmLibraryArg, buffer); +var _curve25519_verify = Module["_curve25519_verify"] = asm["_curve25519_verify"]; +var _crypto_sign_ed25519_ref10_ge_scalarmult_base = Module["_crypto_sign_ed25519_ref10_ge_scalarmult_base"] = asm["_crypto_sign_ed25519_ref10_ge_scalarmult_base"]; +var _curve25519_sign = Module["_curve25519_sign"] = asm["_curve25519_sign"]; +var _fflush = Module["_fflush"] = asm["_fflush"]; +var runPostSets = Module["runPostSets"] = asm["runPostSets"]; +var _i64Add = Module["_i64Add"] = asm["_i64Add"]; +var _memmove = Module["_memmove"] = asm["_memmove"]; +var _bitshift64Ashr = Module["_bitshift64Ashr"] = asm["_bitshift64Ashr"]; +var _sph_sha512_init = Module["_sph_sha512_init"] = asm["_sph_sha512_init"]; +var _curve25519_donna = Module["_curve25519_donna"] = asm["_curve25519_donna"]; +var _memset = Module["_memset"] = asm["_memset"]; +var _malloc = Module["_malloc"] = asm["_malloc"]; +var _memcpy = Module["_memcpy"] = asm["_memcpy"]; +var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"]; +var _free = Module["_free"] = asm["_free"]; +var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"]; +var ___errno_location = Module["___errno_location"] = asm["___errno_location"]; +var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"]; +var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"]; +var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"]; +var dynCall_vi = Module["dynCall_vi"] = asm["dynCall_vi"]; +; - BigInteger.prototype.fromRadix = bnpFromRadix; - BigInteger.prototype.chunkSize = bnpChunkSize; - BigInteger.prototype.signum = bnSigNum; - BigInteger.prototype.dMultiply = bnpDMultiply; - BigInteger.prototype.dAddOffset = bnpDAddOffset; - BigInteger.prototype.toRadix = bnpToRadix; - BigInteger.prototype.intValue = bnIntValue; - BigInteger.prototype.addTo = bnpAddTo; - - //======= end jsbn ======= - - // Emscripten wrapper - var Wrapper = { - abs: function(l, h) { - var x = new goog.math.Long(l, h); - var ret; - if (x.isNegative()) { - ret = x.negate(); - } else { - ret = x; - } - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - }, - ensureTemps: function() { - if (Wrapper.ensuredTemps) return; - Wrapper.ensuredTemps = true; - Wrapper.two32 = new BigInteger(); - Wrapper.two32.fromString('4294967296', 10); - Wrapper.two64 = new BigInteger(); - Wrapper.two64.fromString('18446744073709551616', 10); - Wrapper.temp1 = new BigInteger(); - Wrapper.temp2 = new BigInteger(); - }, - lh2bignum: function(l, h) { - var a = new BigInteger(); - a.fromString(h.toString(), 10); - var b = new BigInteger(); - a.multiplyTo(Wrapper.two32, b); - var c = new BigInteger(); - c.fromString(l.toString(), 10); - var d = new BigInteger(); - c.addTo(b, d); - return d; - }, - stringify: function(l, h, unsigned) { - var ret = new goog.math.Long(l, h).toString(); - if (unsigned && ret[0] == '-') { - // unsign slowly using jsbn bignums - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(ret, 10); - ret = new BigInteger(); - Wrapper.two64.addTo(bignum, ret); - ret = ret.toString(10); - } - return ret; - }, - fromString: function(str, base, min, max, unsigned) { - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(str, base); - var bigmin = new BigInteger(); - bigmin.fromString(min, 10); - var bigmax = new BigInteger(); - bigmax.fromString(max, 10); - if (unsigned && bignum.compareTo(BigInteger.ZERO) < 0) { - var temp = new BigInteger(); - bignum.addTo(Wrapper.two64, temp); - bignum = temp; - } - var error = false; - if (bignum.compareTo(bigmin) < 0) { - bignum = bigmin; - error = true; - } else if (bignum.compareTo(bigmax) > 0) { - bignum = bigmax; - error = true; - } - var ret = goog.math.Long.fromString(bignum.toString()); // min-max checks should have clamped this to a range goog.math.Long can handle well - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - if (error) throw 'range error'; - } - }; - return Wrapper; -})(); +Runtime.stackAlloc = asm['stackAlloc']; +Runtime.stackSave = asm['stackSave']; +Runtime.stackRestore = asm['stackRestore']; +Runtime.establishStackSpace = asm['establishStackSpace']; -//======= end closure i64 code ======= +Runtime.setTempRet0 = asm['setTempRet0']; +Runtime.getTempRet0 = asm['getTempRet0']; // === Auto-generated postamble setup entry stuff === -if (memoryInitializer) { - if (typeof Module['locateFile'] === 'function') { - memoryInitializer = Module['locateFile'](memoryInitializer); - } else if (Module['memoryInitializerPrefixURL']) { - memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; - } - if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { - var data = Module['readBinary'](memoryInitializer); - HEAPU8.set(data, STATIC_BASE); - } else { - addRunDependency('memory initializer'); - Browser.asyncLoad(memoryInitializer, function(data) { - HEAPU8.set(data, STATIC_BASE); - removeRunDependency('memory initializer'); - }, function(data) { - throw 'could not load memory initializer ' + memoryInitializer; - }); - } -} function ExitStatus(status) { this.name = "ExitStatus"; @@ -24943,7 +24450,7 @@ var calledMain = false; dependenciesFulfilled = function runCaller() { // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) - if (!Module['calledRun'] && shouldRunNow) run(); + if (!Module['calledRun']) run(); if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled } @@ -24970,7 +24477,6 @@ Module['callMain'] = Module.callMain = function callMain(args) { argv.push(0); argv = allocate(argv, 'i32', ALLOC_NORMAL); - initialStackTop = STACKTOP; try { @@ -24978,7 +24484,7 @@ Module['callMain'] = Module.callMain = function callMain(args) { // if we're not running an evented main loop, it's time to exit - exit(ret); + exit(ret, /* implicit = */ true); } catch(e) { if (e instanceof ExitStatus) { @@ -25025,9 +24531,6 @@ function run(args) { preMain(); - if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) { - Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms'); - } if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); @@ -25050,17 +24553,22 @@ function run(args) { } Module['run'] = Module.run = run; -function exit(status) { - if (Module['noExitRuntime']) { +function exit(status, implicit) { + if (implicit && Module['noExitRuntime']) { return; } - ABORT = true; - EXITSTATUS = status; - STACKTOP = initialStackTop; + if (Module['noExitRuntime']) { + } else { + + ABORT = true; + EXITSTATUS = status; + STACKTOP = initialStackTop; - // exit the runtime - exitRuntime(); + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } if (ENVIRONMENT_IS_NODE) { // Work around a node.js bug where stdout buffer is not flushed at process exit: @@ -25085,10 +24593,15 @@ function exit(status) { } Module['exit'] = Module.exit = exit; -function abort(text) { - if (text) { - Module.print(text); - Module.printErr(text); +var abortDecorators = []; + +function abort(what) { + if (what !== undefined) { + Module.print(what); + Module.printErr(what); + what = JSON.stringify(what) + } else { + what = ''; } ABORT = true; @@ -25096,7 +24609,13 @@ function abort(text) { var extra = '\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.'; - throw 'abort() at ' + stackTrace() + extra; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; } Module['abort'] = Module.abort = abort; diff --git a/build/curve25519_concat.js b/build/curve25519_concat.js index 9360e0c..b933057 100644 --- a/build/curve25519_concat.js +++ b/build/curve25519_concat.js @@ -30,9 +30,13 @@ for (var key in Module) { // The environment setup code below is customized to use Module. // *** Environment setup code *** -var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; var ENVIRONMENT_IS_WEB = typeof window === 'object'; +// Three configurations we can be running in: +// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) +// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) +// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function' && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; if (ENVIRONMENT_IS_NODE) { @@ -60,16 +64,25 @@ if (ENVIRONMENT_IS_NODE) { return ret; }; - Module['readBinary'] = function readBinary(filename) { return Module['read'](filename, true) }; + Module['readBinary'] = function readBinary(filename) { + var ret = Module['read'](filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; Module['load'] = function load(f) { globalEval(read(f)); }; - if (process['argv'].length > 1) { - Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); - } else { - Module['thisProgram'] = 'unknown-program'; + if (!Module['thisProgram']) { + if (process['argv'].length > 1) { + Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); + } else { + Module['thisProgram'] = 'unknown-program'; + } } Module['arguments'] = process['argv'].slice(2); @@ -84,6 +97,8 @@ if (ENVIRONMENT_IS_NODE) { throw ex; } }); + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; } else if (ENVIRONMENT_IS_SHELL) { if (!Module['print']) Module['print'] = print; @@ -110,8 +125,6 @@ else if (ENVIRONMENT_IS_SHELL) { Module['arguments'] = arguments; } - this['Module'] = Module; - } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { Module['read'] = function read(url) { @@ -142,11 +155,13 @@ else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { })); } - if (ENVIRONMENT_IS_WEB) { - window['Module'] = Module; - } else { + if (ENVIRONMENT_IS_WORKER) { Module['load'] = importScripts; } + + if (typeof Module['setWindowTitle'] === 'undefined') { + Module['setWindowTitle'] = function(title) { document.title = title }; + } } else { // Unreachable because SHELL is dependant on the others @@ -245,6 +260,18 @@ var Runtime = { return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE); }, STACK_ALIGN: 16, + prepVararg: function (ptr, type) { + if (type === 'double' || type === 'i64') { + // move so the load is aligned + if (ptr & 7) { + assert((ptr & 7) === 4); + ptr += 4; + } + } else { + assert((ptr & 3) === 0); + } + return ptr; + }, getAlignSize: function (type, size, vararg) { // we align i64s and doubles on 64-bit boundaries, unlike x86 if (!vararg && (type == 'i64' || type == 'double')) return 8; @@ -273,34 +300,6 @@ var Runtime = { removeFunction: function (index) { Runtime.functionPointers[(index-2)/2] = null; }, - getAsmConst: function (code, numArgs) { - // code is a constant string on the heap, so we can cache these - if (!Runtime.asmConstCache) Runtime.asmConstCache = {}; - var func = Runtime.asmConstCache[code]; - if (func) return func; - var args = []; - for (var i = 0; i < numArgs; i++) { - args.push(String.fromCharCode(36) + i); // $0, $1 etc - } - var source = Pointer_stringify(code); - if (source[0] === '"') { - // tolerate EM_ASM("..code..") even though EM_ASM(..code..) is correct - if (source.indexOf('"', 1) === source.length-1) { - source = source.substr(1, source.length-2); - } else { - // something invalid happened, e.g. EM_ASM("..code($0)..", input) - abort('invalid EM_ASM input |' + source + '|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)'); - } - } - try { - // Module is the only 'upvar', which we provide directly. We also provide FS for legacy support. - var evalled = eval('(function(Module, FS) { return function(' + args.join(',') + '){ ' + source + ' } })')(Module, typeof FS !== 'undefined' ? FS : null); - } catch(e) { - Module.printErr('error in executing inline EM_ASM code: ' + e + ' on: \n\n' + source + '\n\nwith args |' + args + '| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)'); - throw e; - } - return Runtime.asmConstCache[code] = evalled; - }, warnOnce: function (text) { if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {}; if (!Runtime.warnOnce.shown[text]) { @@ -322,73 +321,12 @@ var Runtime = { } return sigCache[func]; }, - UTF8Processor: function () { - var buffer = []; - var needed = 0; - this.processCChar = function (code) { - code = code & 0xFF; - - if (buffer.length == 0) { - if ((code & 0x80) == 0x00) { // 0xxxxxxx - return String.fromCharCode(code); - } - buffer.push(code); - if ((code & 0xE0) == 0xC0) { // 110xxxxx - needed = 1; - } else if ((code & 0xF0) == 0xE0) { // 1110xxxx - needed = 2; - } else { // 11110xxx - needed = 3; - } - return ''; - } - - if (needed) { - buffer.push(code); - needed--; - if (needed > 0) return ''; - } - - var c1 = buffer[0]; - var c2 = buffer[1]; - var c3 = buffer[2]; - var c4 = buffer[3]; - var ret; - if (buffer.length == 2) { - ret = String.fromCharCode(((c1 & 0x1F) << 6) | (c2 & 0x3F)); - } else if (buffer.length == 3) { - ret = String.fromCharCode(((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F)); - } else { - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var codePoint = ((c1 & 0x07) << 18) | ((c2 & 0x3F) << 12) | - ((c3 & 0x3F) << 6) | (c4 & 0x3F); - ret = String.fromCharCode( - (((codePoint - 0x10000) / 0x400)|0) + 0xD800, - (codePoint - 0x10000) % 0x400 + 0xDC00); - } - buffer.length = 0; - return ret; - } - this.processJSString = function processJSString(string) { - /* TODO: use TextEncoder when present, - var encoder = new TextEncoder(); - encoder['encoding'] = "utf-8"; - var utf8Array = encoder['encode'](aMsg.data); - */ - string = unescape(encodeURIComponent(string)); - var ret = []; - for (var i = 0; i < string.length; i++) { - ret.push(string.charCodeAt(i)); - } - return ret; - } - }, getCompilerSetting: function (name) { throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work'; }, stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+15)&-16); return ret; }, staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = (((STATICTOP)+15)&-16); return ret; }, - dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; }, + dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) { var success = enlargeMemory(); if (!success) { DYNAMICTOP = ret; return 0; } }; return ret; }, alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 16))*(quantum ? quantum : 16); return ret; }, makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0))); return ret; }, GLOBAL_BASE: 8, @@ -397,13 +335,8 @@ var Runtime = { } -Module['Runtime'] = Runtime; - - - - - +Module["Runtime"] = Runtime; @@ -475,7 +408,7 @@ var cwrap, ccall; var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']}; // C calling interface. - ccall = function ccallFunc(ident, returnType, argTypes, args) { + ccall = function ccallFunc(ident, returnType, argTypes, args, opts) { var func = getCFunc(ident); var cArgs = []; var stack = 0; @@ -492,7 +425,15 @@ var cwrap, ccall; } var ret = func.apply(null, cArgs); if (returnType === 'string') ret = Pointer_stringify(ret); - if (stack !== 0) Runtime.stackRestore(stack); + if (stack !== 0) { + if (opts && opts.async) { + EmterpreterAsync.asyncFinalizers.push(function() { + Runtime.stackRestore(stack); + }); + return; + } + Runtime.stackRestore(stack); + } return ret; } @@ -557,9 +498,8 @@ var cwrap, ccall; return eval(funcstr); }; })(); -Module["cwrap"] = cwrap; Module["ccall"] = ccall; - +Module["cwrap"] = cwrap; function setValue(ptr, value, type, noSafe) { type = type || 'i8'; @@ -575,7 +515,7 @@ function setValue(ptr, value, type, noSafe) { default: abort('invalid type for setValue: ' + type); } } -Module['setValue'] = setValue; +Module["setValue"] = setValue; function getValue(ptr, type, noSafe) { @@ -593,18 +533,18 @@ function getValue(ptr, type, noSafe) { } return null; } -Module['getValue'] = getValue; +Module["getValue"] = getValue; var ALLOC_NORMAL = 0; // Tries to use _malloc() var ALLOC_STACK = 1; // Lives for the duration of the current function call var ALLOC_STATIC = 2; // Cannot be freed var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk var ALLOC_NONE = 4; // Do not allocate -Module['ALLOC_NORMAL'] = ALLOC_NORMAL; -Module['ALLOC_STACK'] = ALLOC_STACK; -Module['ALLOC_STATIC'] = ALLOC_STATIC; -Module['ALLOC_DYNAMIC'] = ALLOC_DYNAMIC; -Module['ALLOC_NONE'] = ALLOC_NONE; +Module["ALLOC_NORMAL"] = ALLOC_NORMAL; +Module["ALLOC_STACK"] = ALLOC_STACK; +Module["ALLOC_STATIC"] = ALLOC_STATIC; +Module["ALLOC_DYNAMIC"] = ALLOC_DYNAMIC; +Module["ALLOC_NONE"] = ALLOC_NONE; // allocate(): This is for internal use. You can use it yourself as well, but the interface // is a little tricky (see docs right below). The reason is that it is optimized @@ -689,19 +629,27 @@ function allocate(slab, types, allocator, ptr) { return ret; } -Module['allocate'] = allocate; +Module["allocate"] = allocate; + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!staticSealed) return Runtime.staticAlloc(size); + if ((typeof _sbrk !== 'undefined' && !_sbrk.called) || !runtimeInitialized) return Runtime.dynamicAlloc(size); + return _malloc(size); +} +Module["getMemory"] = getMemory; function Pointer_stringify(ptr, /* optional */ length) { if (length === 0 || !ptr) return ''; // TODO: use TextDecoder // Find the length, and check for UTF while doing so - var hasUtf = false; + var hasUtf = 0; var t; var i = 0; while (1) { t = HEAPU8[(((ptr)+(i))>>0)]; - if (t >= 128) hasUtf = true; - else if (t == 0 && !length) break; + hasUtf |= t; + if (t == 0 && !length) break; i++; if (length && i == length) break; } @@ -709,7 +657,7 @@ function Pointer_stringify(ptr, /* optional */ length) { var ret = ''; - if (!hasUtf) { + if (hasUtf < 128) { var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack var curr; while (length > 0) { @@ -720,15 +668,184 @@ function Pointer_stringify(ptr, /* optional */ length) { } return ret; } + return Module['UTF8ToString'](ptr); +} +Module["Pointer_stringify"] = Pointer_stringify; - var utf8 = new Runtime.UTF8Processor(); - for (i = 0; i < length; i++) { - t = HEAPU8[(((ptr)+(i))>>0)]; - ret += utf8.processCChar(t); +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAP8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); } - return ret; } -Module['Pointer_stringify'] = Pointer_stringify; +Module["AsciiToString"] = AsciiToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} +Module["stringToAscii"] = stringToAscii; + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +function UTF8ArrayToString(u8Array, idx) { + var u0, u1, u2, u3, u4, u5; + + var str = ''; + while (1) { + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + u0 = u8Array[idx++]; + if (!u0) return str; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + u3 = u8Array[idx++] & 63; + if ((u0 & 0xF8) == 0xF0) { + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3; + } else { + u4 = u8Array[idx++] & 63; + if ((u0 & 0xFC) == 0xF8) { + u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4; + } else { + u5 = u8Array[idx++] & 63; + u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5; + } + } + } + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } +} +Module["UTF8ArrayToString"] = UTF8ArrayToString; + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function UTF8ToString(ptr) { + return UTF8ArrayToString(HEAPU8,ptr); +} +Module["UTF8ToString"] = UTF8ToString; + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x1FFFFF) { + if (outIdx + 3 >= endIdx) break; + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x3FFFFFF) { + if (outIdx + 4 >= endIdx) break; + outU8Array[outIdx++] = 0xF8 | (u >> 24); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 5 >= endIdx) break; + outU8Array[outIdx++] = 0xFC | (u >> 30); + outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} +Module["stringToUTF8Array"] = stringToUTF8Array; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} +Module["stringToUTF8"] = stringToUTF8; + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + ++len; + } else if (u <= 0x7FF) { + len += 2; + } else if (u <= 0xFFFF) { + len += 3; + } else if (u <= 0x1FFFFF) { + len += 4; + } else if (u <= 0x3FFFFFF) { + len += 5; + } else { + len += 6; + } + } + return len; +} +Module["lengthBytesUTF8"] = lengthBytesUTF8; + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. function UTF16ToString(ptr) { var i = 0; @@ -743,20 +860,46 @@ function UTF16ToString(ptr) { str += String.fromCharCode(codeUnit); } } -Module['UTF16ToString'] = UTF16ToString; - - -function stringToUTF16(str, outPtr) { - for(var i = 0; i < str.length; ++i) { +Module["UTF16ToString"] = UTF16ToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. var codeUnit = str.charCodeAt(i); // possibly a lead surrogate - HEAP16[(((outPtr)+(i*2))>>1)]=codeUnit; + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; } // Null-terminate the pointer to the HEAP. - HEAP16[(((outPtr)+(str.length*2))>>1)]=0; + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; } -Module['stringToUTF16'] = stringToUTF16; +Module["stringToUTF16"] = stringToUTF16; +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} +Module["lengthBytesUTF16"] = lengthBytesUTF16; function UTF32ToString(ptr) { var i = 0; @@ -768,6 +911,7 @@ function UTF32ToString(ptr) { return str; ++i; // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 if (utf32 >= 0x10000) { var ch = utf32 - 0x10000; str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); @@ -776,25 +920,60 @@ function UTF32ToString(ptr) { } } } -Module['UTF32ToString'] = UTF32ToString; - - -function stringToUTF32(str, outPtr) { - var iChar = 0; - for(var iCodeUnit = 0; iCodeUnit < str.length; ++iCodeUnit) { +Module["UTF32ToString"] = UTF32ToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. - var codeUnit = str.charCodeAt(iCodeUnit); // possibly a lead surrogate + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { - var trailSurrogate = str.charCodeAt(++iCodeUnit); + var trailSurrogate = str.charCodeAt(++i); codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); } - HEAP32[(((outPtr)+(iChar*4))>>2)]=codeUnit; - ++iChar; + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; } // Null-terminate the pointer to the HEAP. - HEAP32[(((outPtr)+(iChar*4))>>2)]=0; + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} +Module["stringToUTF32"] = stringToUTF32; + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; } -Module['stringToUTF32'] = stringToUTF32; +Module["lengthBytesUTF32"] = lengthBytesUTF32; function demangle(func) { var hasLibcxxabi = !!Module['___cxa_demangle']; @@ -995,13 +1174,17 @@ function jsStackTrace() { function stackTrace() { return demangleAll(jsStackTrace()); } -Module['stackTrace'] = stackTrace; +Module["stackTrace"] = stackTrace; // Memory management var PAGE_SIZE = 4096; + function alignMemoryPage(x) { - return (x+4095)&-4096; + if (x % 4096 > 0) { + x += (4096 - (x % 4096)); + } + return x; } var HEAP; @@ -1011,14 +1194,18 @@ var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk + +function abortOnCannotGrowMemory() { + abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); +} + function enlargeMemory() { - abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.'); + abortOnCannotGrowMemory(); } var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; -var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152; var totalMemory = 64*1024; while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) { @@ -1029,7 +1216,6 @@ while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) { } } if (totalMemory !== TOTAL_MEMORY) { - Module.printErr('increasing TOTAL_MEMORY to ' + totalMemory + ' to be compliant with the asm.js spec'); TOTAL_MEMORY = totalMemory; } @@ -1038,7 +1224,11 @@ if (totalMemory !== TOTAL_MEMORY) { assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']), 'JS engine does not provide full typed array support'); -var buffer = new ArrayBuffer(TOTAL_MEMORY); +var buffer; + + + +buffer = new ArrayBuffer(TOTAL_MEMORY); HEAP8 = new Int8Array(buffer); HEAP16 = new Int16Array(buffer); HEAP32 = new Int32Array(buffer); @@ -1048,6 +1238,7 @@ HEAPU32 = new Uint32Array(buffer); HEAPF32 = new Float32Array(buffer); HEAPF64 = new Float64Array(buffer); + // Endianness check (note: assumes compiler arch was little-endian) HEAP32[0] = 255; assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system'); @@ -1092,6 +1283,7 @@ var __ATPOSTRUN__ = []; // functions called after the runtime has exited var runtimeInitialized = false; var runtimeExited = false; + function preRun() { // compatibility - merge in anything from Module['preRun'] at this time if (Module['preRun']) { @@ -1132,42 +1324,39 @@ function postRun() { function addOnPreRun(cb) { __ATPRERUN__.unshift(cb); } -Module['addOnPreRun'] = Module.addOnPreRun = addOnPreRun; +Module["addOnPreRun"] = addOnPreRun; function addOnInit(cb) { __ATINIT__.unshift(cb); } -Module['addOnInit'] = Module.addOnInit = addOnInit; +Module["addOnInit"] = addOnInit; function addOnPreMain(cb) { __ATMAIN__.unshift(cb); } -Module['addOnPreMain'] = Module.addOnPreMain = addOnPreMain; +Module["addOnPreMain"] = addOnPreMain; function addOnExit(cb) { __ATEXIT__.unshift(cb); } -Module['addOnExit'] = Module.addOnExit = addOnExit; +Module["addOnExit"] = addOnExit; function addOnPostRun(cb) { __ATPOSTRUN__.unshift(cb); } -Module['addOnPostRun'] = Module.addOnPostRun = addOnPostRun; +Module["addOnPostRun"] = addOnPostRun; // Tools function intArrayFromString(stringy, dontAddNull, length /* optional */) { - var ret = (new Runtime.UTF8Processor()).processJSString(stringy); - if (length) { - ret.length = length; - } - if (!dontAddNull) { - ret.push(0); - } - return ret; + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; } -Module['intArrayFromString'] = intArrayFromString; +Module["intArrayFromString"] = intArrayFromString; function intArrayToString(array) { var ret = []; @@ -1180,7 +1369,7 @@ function intArrayToString(array) { } return ret.join(''); } -Module['intArrayToString'] = intArrayToString; +Module["intArrayToString"] = intArrayToString; function writeStringToMemory(string, buffer, dontAddNull) { var array = intArrayFromString(string, dontAddNull); @@ -1191,22 +1380,23 @@ function writeStringToMemory(string, buffer, dontAddNull) { i = i + 1; } } -Module['writeStringToMemory'] = writeStringToMemory; +Module["writeStringToMemory"] = writeStringToMemory; function writeArrayToMemory(array, buffer) { for (var i = 0; i < array.length; i++) { - HEAP8[(((buffer)+(i))>>0)]=array[i]; + HEAP8[((buffer++)>>0)]=array[i]; } } -Module['writeArrayToMemory'] = writeArrayToMemory; +Module["writeArrayToMemory"] = writeArrayToMemory; function writeAsciiToMemory(str, buffer, dontAddNull) { - for (var i = 0; i < str.length; i++) { - HEAP8[(((buffer)+(i))>>0)]=str.charCodeAt(i); + for (var i = 0; i < str.length; ++i) { + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); } - if (!dontAddNull) HEAP8[(((buffer)+(str.length))>>0)]=0; + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; } -Module['writeAsciiToMemory'] = writeAsciiToMemory; +Module["writeAsciiToMemory"] = writeAsciiToMemory; function unSign(value, bits, ignore) { if (value >= 0) { @@ -1229,6 +1419,7 @@ function reSign(value, bits, ignore) { return value; } + // check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 ) if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function imul(a, b) { var ah = a >>> 16; @@ -1240,6 +1431,15 @@ if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function Math.imul = Math['imul']; +if (!Math['clz32']) Math['clz32'] = function(x) { + x = x >>> 0; + for (var i = 0; i < 32; i++) { + if (x & (1 << (31 - i))) return i; + } + return 32; +}; +Math.clz32 = Math['clz32'] + var Math_abs = Math.abs; var Math_cos = Math.cos; var Math_sin = Math.sin; @@ -1257,6 +1457,7 @@ var Math_pow = Math.pow; var Math_imul = Math.imul; var Math_fround = Math.fround; var Math_min = Math.min; +var Math_clz32 = Math.clz32; // A counter of dependencies for calling run(). If we need to // do asynchronous work before running, increment this and @@ -1269,13 +1470,18 @@ var runDependencies = 0; var runDependencyWatcher = null; var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +function getUniqueRunDependency(id) { + return id; +} + function addRunDependency(id) { runDependencies++; if (Module['monitorRunDependencies']) { Module['monitorRunDependencies'](runDependencies); } } -Module['addRunDependency'] = addRunDependency; +Module["addRunDependency"] = addRunDependency; + function removeRunDependency(id) { runDependencies--; if (Module['monitorRunDependencies']) { @@ -1293,34 +1499,40 @@ function removeRunDependency(id) { } } } -Module['removeRunDependency'] = removeRunDependency; +Module["removeRunDependency"] = removeRunDependency; Module["preloadedImages"] = {}; // maps url to image data Module["preloadedAudios"] = {}; // maps url to audio data + var memoryInitializer = null; + + // === Body === +var ASM_CONSTS = []; STATIC_BASE = 8; -STATICTOP = STATIC_BASE + 33040; - /* global initializers */ __ATINIT__.push(); +STATICTOP = STATIC_BASE + 34240; + /* global initializers */ __ATINIT__.push(); -/* memory initializer */ allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,47,99,168,254,170,226,153,255,102,179,216,0,226,141,122,255,122,66,153,254,182,245,134,0,227,228,25,1,214,57,235,255,216,173,56,255,181,231,210,0,119,128,157,255,129,95,136,255,110,126,51,0,2,169,183,255,7,130,98,254,69,176,94,255,116,4,227,1,217,242,145,255,202,173,31,1,105,1,39,255,46,175,69,0,228,47,58,255,215,224,69,254,207,56,69,255,16,254,139,255,23,207,212,255,202,20,126,255,95,213,96,255,9,176,33,0,200,5,207,255,241,42,128,254,35,33,192,255,248,229,196,1,129,17,120,0,251,103,151,255,7,52,112,255,140,56,66,255,40,226,245,255,217,70,37,254,172,214,9,255,72,67,134,1,146,192,214,255,44,38,112,0,68,184,75,255,206,90,251,0,149,235,141,0,181,170,58,0,116,244,239,0,92,157,2,0,102,173,98,0,233,137,96,1,127,49,203,0,5,155,148,0,23,148,9,255,211,122,12,0,34,134,26,255,219,204,136,0,134,8,41,255,224,83,43,254,85,25,247,0,109,127,0,254,169,136,48,0,238,119,219,255,231,173,213,0,206,18,254,254,8,186,7,255,126,9,7,1,111,42,72,0,111,52,236,254,96,63,141,0,147,191,127,254,205,78,192,255,14,106,237,1,187,219,76,0,175,243,187,254,105,89,173,0,85,25,89,1,162,243,148,0,2,118,209,254,33,158,9,0,139,163,46,255,93,70,40,0,108,42,142,254,111,252,142,255,155,223,144,0,51,229,167,255,73,252,155,255,94,116,12,255,152,160,218,255,156,238,37,255,179,234,207,255,197,0,179,255,154,164,141,0,225,196,104,0,10,35,25,254,209,212,242,255,97,253,222,254,184,101,229,0,222,18,127,1,164,136,135,255,30,207,140,254,146,97,243,0,129,192,26,254,201,84,33,255,111,10,78,255,147,81,178,255,4,4,24,0,161,238,215,255,6,141,33,0,53,215,14,255,41,181,208,255,231,139,157,0,179,203,221,255,255,185,113,0,189,226,172,255,113,66,214,255,202,62,45,255,102,64,8,255,78,174,16,254,133,117,68,255,182,120,89,255,133,114,211,0,189,110,21,255,15,10,106,0,41,192,1,0,152,232,121,255,188,60,160,255,153,113,206,255,0,183,226,254,180,13,72,255,176,160,14,254,211,201,134,255,158,24,143,0,127,105,53,0,96,12,189,0,167,215,251,255,159,76,128,254,106,101,225,255,30,252,4,0,146,12,174,0,89,241,178,254,10,229,166,255,123,221,42,254,30,20,212,0,82,128,3,0,48,209,243,0,119,121,64,255,50,227,156,255,0,110,197,1,103,27,144,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,234,113,60,255,37,255,57,255,69,178,182,254,128,208,179,0,118,26,125,254,3,7,214,255,241,50,77,255,85,203,197,255,211,135,250,255,25,48,100,255,187,213,180,254,17,88,105,0,83,209,158,1,5,115,98,0,4,174,60,254,171,55,110,255,217,181,17,255,20,188,170,0,146,156,102,254,87,214,174,255,114,122,155,1,233,44,170,0,127,8,239,1,214,236,234,0,175,5,219,0,49,106,61,255,6,66,208,255,2,106,110,255,81,234,19,255,215,107,192,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,178,9,252,254,100,110,212,0,14,5,167,0,233,239,163,255,28,151,157,1,101,146,10,255,254,158,70,254,71,249,228,0,88,30,50,0,68,58,160,255,191,24,104,1,129,66,129,255,192,50,85,255,8,179,138,255,38,250,201,0,115,80,160,0,131,230,113,0,125,88,147,0,90,68,199,0,253,76,158,0,28,255,118,0,113,250,254,0,66,75,46,0,230,218,43,0,229,120,186,1,148,68,43,0,136,124,238,1,187,107,197,255,84,53,246,255,51,116,254,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,68,113,21,255,222,186,59,255,66,7,241,1,69,6,72,0,86,156,108,254,55,167,89,0,109,52,219,254,13,176,23,255,196,44,106,255,239,149,71,255,164,140,125,255,159,173,1,0,51,41,231,0,145,62,33,0,138,111,93,1,185,83,69,0,144,115,46,0,97,151,16,255,24,228,26,0,49,217,226,0,113,75,234,254,193,153,12,255,182,48,96,255,14,13,26,0,128,195,249,254,69,193,59,0,132,37,81,254,125,106,60,0,214,240,169,1,164,227,66,0,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,143,62,221,0,129,89,214,255,55,139,5,254,68,20,191,255,14,204,178,1,35,195,217,0,47,51,206,1,38,246,165,0,206,27,6,254,158,87,36,0,217,52,146,255,125,123,215,255,85,60,31,255,171,13,7,0,218,245,88,254,252,35,60,0,55,214,160,255,133,101,56,0,224,32,19,254,147,64,234,0,26,145,162,1,114,118,125,0,248,252,250,0,101,94,196,255,198,141,226,254,51,42,182,0,135,12,9,254,109,172,210,255,197,236,194,1,241,65,154,0,48,156,47,255,153,67,55,255,218,165,34,254,74,180,179,0,218,66,71,1,88,122,99,0,212,181,219,255,92,42,231,255,239,0,154,0,245,77,183,255,94,81,170,1,18,213,216,0,171,93,71,0,52,94,248,0,18,151,161,254,197,209,66,255,174,244,15,254,162,48,183,0,49,61,240,254,182,93,195,0,199,228,6,1,200,5,17,255,137,45,237,255,108,148,4,0,90,79,237,255,39,63,77,255,53,82,207,1,142,22,118,255,101,232,18,1,92,26,67,0,5,200,88,255,33,168,138,255,149,225,72,0,2,209,27,255,44,245,168,1,220,237,17,255,30,211,105,254,141,238,221,0,128,80,245,254,111,254,14,0,222,95,190,1,223,9,241,0,146,76,212,255,108,205,104,255,63,117,153,0,144,69,48,0,35,228,111,0,192,33,193,255,112,214,190,254,115,152,151,0,23,102,88,0,51,74,248,0,226,199,143,254,204,162,101,255,208,97,189,1,245,104,18,0,230,246,30,255,23,148,69,0,110,88,52,254,226,181,89,255,208,47,90,254,114,161,80,255,33,116,248,0,179,152,87,255,69,144,177,1,88,238,26,255,58,32,113,1,1,77,69,0,59,121,52,255,152,238,83,0,52,8,193,0,231,39,233,255,199,34,138,0,222,68,173,0,91,57,242,254,220,210,127,255,192,7,246,254,151,35,187,0,195,236,165,0,111,93,206,0,212,247,133,1,154,133,209,255,155,231,10,0,64,78,38,0,122,249,100,1,30,19,97,255,62,91,249,1,248,133,77,0,197,63,168,254,116,10,82,0,184,236,113,254,212,203,194,255,61,100,252,254,36,5,202,255,119,91,153,255,129,79,29,0,103,103,171,254,237,215,111,255,216,53,69,0,239,240,23,0,194,149,221,255,38,225,222,0,232,255,180,254,118,82,133,255,57,209,177,1,139,232,133,0,158,176,46,254,194,115,46,0,88,247,229,1,28,103,191,0,221,222,175,254,149,235,44,0,151,228,25,254,218,105,103,0,142,85,210,0,149,129,190,255,213,65,94,254,117,134,224,255,82,198,117,0,157,221,220,0,163,101,36,0,197,114,37,0,104,172,166,254,11,182,0,0,81,72,188,255,97,188,16,255,69,6,10,0,199,147,145,255,8,9,115,1,65,214,175,255,217,173,209,0,80,127,166,0,247,229,4,254,167,183,124,255,90,28,204,254,175,59,240,255,11,41,248,1,108,40,51,255,144,177,195,254,150,250,126,0,138,91,65,1,120,60,222,255,245,193,239,0,29,214,189,255,128,2,25,0,80,154,162,0,77,220,107,1,234,205,74,255,54,166,103,255,116,72,9,0,228,94,47,255,30,200,25,255,35,214,89,255,61,176,140,255,83,226,163,255,75,130,172,0,128,38,17,0,95,137,152,255,215,124,159,1,79,93,0,0,148,82,157,254,195,130,251,255,40,202,76,255,251,126,224,0,157,99,62,254,207,7,225,255,96,68,195,0,140,186,157,255,131,19,231,255,42,128,254,0,52,219,61,254,102,203,72,0,141,7,11,255,186,164,213,0,31,122,119,0,133,242,145,0,208,252,232,255,91,213,182,255,143,4,250,254,249,215,74,0,165,30,111,1,171,9,223,0,229,123,34,1,92,130,26,255,77,155,45,1,195,139,28,255,59,224,78,0,136,17,247,0,108,121,32,0,79,250,189,255,96,227,252,254,38,241,62,0,62,174,125,255,155,111,93,255,10,230,206,1,97,197,40,255,0,49,57,254,65,250,13,0,18,251,150,255,220,109,210,255,5,174,166,254,44,129,189,0,235,35,147,255,37,247,141,255,72,141,4,255,103,107,255,0,247,90,4,0,53,44,42,0,2,30,240,0,4,59,63,0,88,78,36,0,113,167,180,0,190,71,193,255,199,158,164,255,58,8,172,0,77,33,12,0,65,63,3,0,153,77,33,255,172,254,102,1,228,221,4,255,87,30,254,1,146,41,86,255,138,204,239,254,108,141,17,255,187,242,135,0,210,208,127,0,68,45,14,254,73,96,62,0,81,60,24,255,170,6,36,255,3,249,26,0,35,213,109,0,22,129,54,255,21,35,225,255,234,61,56,255,58,217,6,0,143,124,88,0,236,126,66,0,209,38,183,255,34,238,6,255,174,145,102,0,95,22,211,0,196,15,153,254,46,84,232,255,117,34,146,1,231,250,74,255,27,134,100,1,92,187,195,255,170,198,112,0,120,28,42,0,209,70,67,0,29,81,31,0,29,168,100,1,169,173,160,0,107,35,117,0,62,96,59,255,81,12,69,1,135,239,190,255,220,252,18,0,163,220,58,255,137,137,188,255,83,102,109,0,96,6,76,0,234,222,210,255,185,174,205,1,60,158,213,255,13,241,214,0,172,129,140,0,93,104,242,0,192,156,251,0,43,117,30,0,225,81,158,0,127,232,218,0,226,28,203,0,233,27,151,255,117,43,5,255,242,14,47,255,33,20,6,0,137,251,44,254,27,31,245,255,183,214,125,254,40,121,149,0,186,158,213,255,89,8,227,0,69,88,0,254,203,135,225,0,201,174,203,0,147,71,184,0,18,121,41,254,94,5,78,0,224,214,240,254,36,5,180,0,251,135,231,1,163,138,212,0,210,249,116,254,88,129,187,0,19,8,49,254,62,14,144,255,159,76,211,0,214,51,82,0,109,117,228,254,103,223,203,255,75,252,15,1,154,71,220,255,23,13,91,1,141,168,96,255,181,182,133,0,250,51,55,0,234,234,212,254,175,63,158,0,39,240,52,1,158,189,36,255,213,40,85,1,32,180,247,255,19,102,26,1,84,24,97,255,69,21,222,0,148,139,122,255,220,213,235,1,232,203,255,0,121,57,147,0,227,7,154,0,53,22,147,1,72,1,225,0,82,134,48,254,83,60,157,255,145,72,169,0,34,103,239,0,198,233,47,0,116,19,4,255,184,106,9,255,183,129,83,0,36,176,230,1,34,103,72,0,219,162,134,0,245,42,158,0,32,149,96,254,165,44,144,0,202,239,72,254,215,150,5,0,42,66,36,1,132,215,175,0,86,174,86,255,26,197,156,255,49,232,135,254,103,182,82,0,253,128,176,1,153,178,122,0,245,250,10,0,236,24,178,0,137,106,132,0,40,29,41,0,50,30,152,255,124,105,38,0,230,191,75,0,143,43,170,0,44,131,20,255,44,13,23,255,237,255,155,1,159,109,100,255,112,181,24,255,104,220,108,0,55,211,131,0,99,12,213,255,152,151,145,255,238,5,159,0,97,155,8,0,33,108,81,0,1,3,103,0,62,109,34,255,250,155,180,0,32,71,195,255,38,70,145,1,159,95,245,0,69,229,101,1,136,28,240,0,79,224,25,0,78,110,121,255,248,168,124,0,187,128,247,0,2,147,235,254,79,11,132,0,70,58,12,1,181,8,163,255,79,137,133,255,37,170,11,255,141,243,85,255,176,231,215,255,204,150,164,255,239,215,39,255,46,87,156,254,8,163,88,255,172,34,232,0,66,44,102,255,27,54,41,254,236,99,87,255,41,123,169,1,52,114,43,0,117,134,40,0,155,134,26,0,231,207,91,254,35,132,38,255,19,102,125,254,36,227,133,255,118,3,113,255,29,13,124,0,152,96,74,1,88,146,206,255,167,191,220,254,162,18,88,255,182,100,23,0,31,117,52,0,81,46,106,1,12,2,7,0,69,80,201,1,209,246,172,0,12,48,141,1,224,211,88,0,116,226,159,0,122,98,130,0,65,236,234,1,225,226,9,255,207,226,123,1,89,214,59,0,112,135,88,1,90,244,203,255,49,11,38,1,129,108,186,0,89,112,15,1,101,46,204,255,127,204,45,254,79,255,221,255,51,73,18,255,127,42,101,255,241,21,202,0,160,227,7,0,105,50,236,0,79,52,197,255,104,202,208,1,180,15,16,0,101,197,78,255,98,77,203,0,41,185,241,1,35,193,124,0,35,155,23,255,207,53,192,0,11,125,163,1,249,158,185,255,4,131,48,0,21,93,111,255,61,121,231,1,69,200,36,255,185,48,185,255,111,238,21,255,39,50,25,255,99,215,163,255,87,212,30,255,164,147,5,255,128,6,35,1,108,223,110,255,194,76,178,0,74,101,180,0,243,47,48,0,174,25,43,255,82,173,253,1,54,114,192,255,40,55,91,0,215,108,176,255,11,56,7,0,224,233,76,0,209,98,202,254,242,25,125,0,44,193,93,254,203,8,177,0,135,176,19,0,112,71,213,255,206,59,176,1,4,67,26,0,14,143,213,254,42,55,208,255,60,67,120,0,193,21,163,0,99,164,115,0,10,20,118,0,156,212,222,254,160,7,217,255,114,245,76,1,117,59,123,0,176,194,86,254,213,15,176,0,78,206,207,254,213,129,59,0,233,251,22,1,96,55,152,255,236,255,15,255,197,89,84,255,93,149,133,0,174,160,113,0,234,99,169,255,152,116,88,0,144,164,83,255,95,29,198,255,34,47,15,255,99,120,134,255,5,236,193,0,249,247,126,255,147,187,30,0,50,230,117,255,108,217,219,255,163,81,166,255,72,25,169,254,155,121,79,255,28,155,89,254,7,126,17,0,147,65,33,1,47,234,253,0,26,51,18,0,105,83,199,255,163,196,230,0,113,248,164,0,226,254,218,0,189,209,203,255,164,247,222,254,255,35,165,0,4,188,243,1,127,179,71,0,37,237,254,255,100,186,240,0,5,57,71,254,103,72,73,255,244,18,81,254,229,210,132,255,238,6,180,255,11,229,174,255,227,221,192,1,17,49,28,0,163,215,196,254,9,118,4,255,51,240,71,0,113,129,109,255,76,240,231,0,188,177,127,0,125,71,44,1,26,175,243,0,94,169,25,254,27,230,29,0,15,139,119,1,168,170,186,255,172,197,76,255,252,75,188,0,137,124,196,0,72,22,96,255,45,151,249,1,220,145,100,0,64,192,159,255,120,239,226,0,129,178,146,0,0,192,125,0,235,138,234,0,183,157,146,0,83,199,192,255,184,172,72,255,73,225,128,0,77,6,250,255,186,65,67,0,104,246,207,0,188,32,138,255,218,24,242,0,67,138,81,254,237,129,121,255,20,207,150,1,41,199,16,255,6,20,128,0,159,118,5,0,181,16,143,255,220,38,15,0,23,64,147,254,73,26,13,0,87,228,57,1,204,124,128,0,43,24,223,0,219,99,199,0,22,75,20,255,19,27,126,0,157,62,215,0,110,29,230,0,179,167,255,1,54,252,190,0,221,204,182,254,179,158,65,255,81,157,3,0,194,218,159,0,170,223,0,0,224,11,32,255,38,197,98,0,168,164,37,0,23,88,7,1,164,186,110,0,96,36,134,0,234,242,229,0,250,121,19,0,242,254,112,255,3,47,94,1,9,239,6,255,81,134,153,254,214,253,168,255,67,124,224,0,245,95,74,0,28,30,44,254,1,109,220,255,178,89,89,0,252,36,76,0,24,198,46,255,76,77,111,0,134,234,136,255,39,94,29,0,185,72,234,255,70,68,135,255,231,102,7,254,77,231,140,0,167,47,58,1,148,97,118,255,16,27,225,1,166,206,143,255,110,178,214,255,180,131,162,0,143,141,225,1,13,218,78,255,114,153,33,1,98,104,204,0,175,114,117,1,167,206,75,0,202,196,83,1,58,64,67,0,138,47,111,1,196,247,128,255,137,224,224,254,158,112,207,0,154,100,255,1,134,37,107,0,198,128,79,255,127,209,155,255,163,254,185,254,60,14,243,0,31,219,112,254,29,217,65,0,200,13,116,254,123,60,196,255,224,59,184,254,242,89,196,0,123,16,75,254,149,16,206,0,69,254,48,1,231,116,223,255,209,160,65,1,200,80,98,0,37,194,184,254,148,63,34,0,139,240,65,255,217,144,132,255,56,38,45,254,199,120,210,0,108,177,166,255,160,222,4,0,220,126,119,254,165,107,160,255,82,220,248,1,241,175,136,0,144,141,23,255,169,138,84,0,160,137,78,255,226,118,80,255,52,27,132,255,63,96,139,255,152,250,39,0,188,155,15,0,232,51,150,254,40,15,232,255,240,229,9,255,137,175,27,255,75,73,97,1,218,212,11,0,135,5,162,1,107,185,213,0,2,249,107,255,40,242,70,0,219,200,25,0,25,157,13,0,67,82,80,255,196,249,23,255,145,20,149,0,50,72,146,0,94,76,148,1,24,251,65,0,31,192,23,0,184,212,201,255,123,233,162,1,247,173,72,0,162,87,219,254,126,134,89,0,159,11,12,254,166,105,29,0,73,27,228,1,113,120,183,255,66,163,109,1,212,143,11,255,159,231,168,1,255,128,90,0,57,14,58,254,89,52,10,255,253,8,163,1,0,145,210,255,10,129,85,1,46,181,27,0,103,136,160,254,126,188,209,255,34,35,111,0,215,219,24,255,212,11,214,254,101,5,118,0,232,197,133,255,223,167,109,255,237,80,86,255,70,139,94,0,158,193,191,1,155,15,51,255,15,190,115,0,78,135,207,255,249,10,27,1,181,125,233,0,95,172,13,254,170,213,161,255,39,236,138,255,95,93,87,255,190,128,95,0,125,15,206,0,166,150,159,0,227,15,158,255,206,158,120,255,42,141,128,0,101,178,120,1,156,109,131,0,218,14,44,254,247,168,206,255,212,112,28,0,112,17,228,255,90,16,37,1,197,222,108,0,254,207,83,255,9,90,243,255,243,244,172,0,26,88,115,255,205,116,122,0,191,230,193,0,180,100,11,1,217,37,96,255,154,78,156,0,235,234,31,255,206,178,178,255,149,192,251,0,182,250,135,0,246,22,105,0,124,193,109,255,2,210,149,255,169,17,170,0,0,96,110,255,117,9,8,1,50,123,40,255,193,189,99,0,34,227,160,0,48,80,70,254,211,51,236,0,45,122,245,254,44,174,8,0,173,37,233,255,158,65,171,0,122,69,215,255,90,80,2,255,131,106,96,254,227,114,135,0,205,49,119,254,176,62,64,255,82,51,17,255,241,20,243,255,130,13,8,254,128,217,243,255,162,27,1,254,90,118,241,0,246,198,246,255,55,16,118,255,200,159,157,0,163,17,1,0,140,107,121,0,85,161,118,255,38,0,149,0,156,47,238,0,9,166,166,1,75,98,181,255,50,74,25,0,66,15,47,0,139,225,159,0,76,3,142,255,14,238,184,0,11,207,53,255,183,192,186,1,171,32,174,255,191,76,221,1,247,170,219,0,25,172,50,254,217,9,233,0,203,126,68,255,183,92,48,0,127,167,183,1,65,49,254,0,16,63,127,1,254,21,170,255,59,224,127,254,22,48,63,255,27,78,130,254,40,195,29,0,250,132,112,254,35,203,144,0,104,169,168,0,207,253,30,255,104,40,38,254,94,228,88,0,206,16,128,255,212,55,122,255,223,22,234,0,223,197,127,0,253,181,181,1,145,102,118,0,236,153,36,255,212,217,72,255,20,38,24,254,138,62,62,0,152,140,4,0,230,220,99,255,1,21,212,255,148,201,231,0,244,123,9,254,0,171,210,0,51,58,37,255,1,255,14,255,244,183,145,254,0,242,166,0,22,74,132,0,121,216,41,0,95,195,114,254,133,24,151,255,156,226,231,255,247,5,77,255,246,148,115,254,225,92,81,255,222,80,246,254,170,123,89,255,74,199,141,0,29,20,8,255,138,136,70,255,93,75,92,0,221,147,49,254,52,126,226,0,229,124,23,0,46,9,181,0,205,64,52,1,131,254,28,0,151,158,212,0,131,64,78,0,206,25,171,0,0,230,139,0,191,253,110,254,103,247,167,0,64,40,40,1,42,165,241,255,59,75,228,254,124,243,189,255,196,92,178,255,130,140,86,255,141,89,56,1,147,198,5,255,203,248,158,254,144,162,141,0,11,172,226,0,130,42,21,255,1,167,143,255,144,36,36,255,48,88,164,254,168,170,220,0,98,71,214,0,91,208,79,0,159,76,201,1,166,42,214,255,69,255,0,255,6,128,125,255,190,1,140,0,146,83,218,255,215,238,72,1,122,127,53,0,189,116,165,255,84,8,66,255,214,3,208,255,213,110,133,0,195,168,44,1,158,231,69,0,162,64,200,254,91,58,104,0,182,58,187,254,249,228,136,0,203,134,76,254,99,221,233,0,75,254,214,254,80,69,154,0,64,152,248,254,236,136,202,255,157,105,153,254,149,175,20,0,22,35,19,255,124,121,233,0,186,250,198,254,132,229,139,0,137,80,174,255,165,125,68,0,144,202,148,254,235,239,248,0,135,184,118,0,101,94,17,255,122,72,70,254,69,130,146,0,127,222,248,1,69,127,118,255,30,82,215,254,188,74,19,255,229,167,194,254,117,25,66,255,65,234,56,254,213,22,156,0,151,59,93,254,45,28,27,255,186,126,164,255,32,6,239,0,127,114,99,1,219,52,2,255,99,96,166,254,62,190,126,255,108,222,168,1,75,226,174,0,230,226,199,0,60,117,218,255,252,248,20,1,214,188,204,0,31,194,134,254,123,69,192,255,169,173,36,254,55,98,91,0,223,42,102,254,137,1,102,0,157,90,25,0,239,122,64,255,252,6,233,0,7,54,20,255,82,116,174,0,135,37,54,255,15,186,125,0,227,112,175,255,100,180,225,255,42,237,244,255,244,173,226,254,248,18,33,0,171,99,150,255,74,235,50,255,117,82,32,254,106,168,237,0,207,109,208,1,228,9,186,0,135,60,169,254,179,92,143,0,244,170,104,255,235,45,124,255,70,99,186,0,117,137,183,0,224,31,215,0,40,9,100,0,26,16,95,1,68,217,87,0,8,151,20,255,26,100,58,255,176,165,203,1,52,118,70,0,7,32,254,254,244,254,245,255,167,144,194,255,125,113,23,255,176,121,181,0,136,84,209,0,138,6,30,255,89,48,28,0,33,155,14,255,25,240,154,0,141,205,109,1,70,115,62,255,20,40,107,254,138,154,199,255,94,223,226,255,157,171,38,0,163,177,25,254,45,118,3,255,14,222,23,1,209,190,81,255,118,123,232,1,13,213,101,255,123,55,123,254,27,246,165,0,50,99,76,255,140,214,32,255,97,65,67,255,24,12,28,0,174,86,78,1,64,247,96,0,160,135,67,0,66,55,243,255,147,204,96,255,26,6,33,255,98,51,83,1,153,213,208,255,2,184,54,255,25,218,11,0,49,67,246,254,18,149,72,255,13,25,72,0,42,79,214,0,42,4,38,1,27,139,144,255,149,187,23,0,18,164,132,0,245,84,184,254,120,198,104,255,126,218,96,0,56,117,234,255,13,29,214,254,68,47,10,255,167,154,132,254,152,38,198,0,66,178,89,255,200,46,171,255,13,99,83,255,210,187,253,255,170,45,42,1,138,209,124,0,214,162,141,0,12,230,156,0,102,36,112,254,3,147,67,0,52,215,123,255,233,171,54,255,98,137,62,0,247,218,39,255,231,218,236,0,247,191,127,0,195,146,84,0,165,176,92,255,19,212,94,255,17,74,227,0,88,40,153,1,198,147,1,255,206,67,245,254,240,3,218,255,61,141,213,255,97,183,106,0,195,232,235,254,95,86,154,0,209,48,205,254,118,209,241,255,240,120,223,1,213,29,159,0,163,127,147,255,13,218,93,0,85,24,68,254,70,20,80,255,189,5,140,1,82,97,254,255,99,99,191,255,132,84,133,255,107,218,116,255,112,122,46,0,105,17,32,0,194,160,63,255,68,222,39,1,216,253,92,0,177,105,205,255,149,201,195,0,42,225,11,255,40,162,115,0,9,7,81,0,165,218,219,0,180,22,0,254,29,146,252,255,146,207,225,1,180,135,96,0,31,163,112,0,177,11,219,255,133,12,193,254,43,78,50,0,65,113,121,1,59,217,6,255,110,94,24,1,112,172,111,0,7,15,96,0,36,85,123,0,71,150,21,255,208,73,188,0,192,11,167,1,213,245,34,0,9,230,92,0,162,142,39,255,215,90,27,0,98,97,89,0,94,79,211,0,90,157,240,0,95,220,126,1,102,176,226,0,36,30,224,254,35,31,127,0,231,232,115,1,85,83,130,0,210,73,245,255,47,143,114,255,68,65,197,0,59,72,62,255,183,133,173,254,93,121,118,255,59,177,81,255,234,69,173,255,205,128,177,0,220,244,51,0,26,244,209,1,73,222,77,255,163,8,96,254,150,149,211,0,158,254,203,1,54,127,139,0,161,224,59,0,4,109,22,255,222,42,45,255,208,146,102,255,236,142,187,0,50,205,245,255,10,74,89,254,48,79,142,0,222,76,130,255,30,166,63,0,236,12,13,255,49,184,244,0,187,113,102,0,218,101,253,0,153,57,182,254,32,150,42,0,25,198,146,1,237,241,56,0,140,68,5,0,91,164,172,255,78,145,186,254,67,52,205,0,219,207,129,1,109,115,17,0,54,143,58,1,21,248,120,255,179,255,30,0,193,236,66,255,1,255,7,255,253,192,48,255,19,69,217,1,3,214,0,255,64,101,146,1,223,125,35,255,235,73,179,255,249,167,226,0,225,175,10,1,97,162,58,0,106,112,171,1,84,172,5,255,133,140,178,255,134,245,142,0,97,90,125,255,186,203,185,255,223,77,23,255,192,92,106,0,15,198,115,255,217,152,248,0,171,178,120,255,228,134,53,0,176,54,193,1,250,251,53,0,213,10,100,1,34,199,106,0,151,31,244,254,172,224,87,255,14,237,23,255,253,85,26,255,127,39,116,255,172,104,100,0,251,14,70,255,212,208,138,255,253,211,250,0,176,49,165,0,15,76,123,255,37,218,160,255,92,135,16,1,10,126,114,255,70,5,224,255,247,249,141,0,68,20,60,1,241,210,189,255,195,217,187,1,151,3,113,0,151,92,174,0,231,62,178,255,219,183,225,0,23,23,33,255,205,181,80,0,57,184,248,255,67,180,1,255,90,123,93,255,39,0,162,255,96,248,52,255,84,66,140,0,34,127,228,255,194,138,7,1,166,110,188,0,21,17,155,1,154,190,198,255,214,80,59,255,18,7,143,0,72,29,226,1,199,217,249,0,232,161,71,1,149,190,201,0,217,175,95,254,113,147,67,255,138,143,199,255,127,204,1,0,29,182,83,1,206,230,155,255,186,204,60,0,10,125,85,255,232,96,25,255,255,89,247,255,213,254,175,1,232,193,81,0,28,43,156,254,12,69,8,0,147,24,248,0,18,198,49,0,134,60,35,0,118,246,18,255,49,88,254,254,228,21,186,255,182,65,112,1,219,22,1,255,22,126,52,255,189,53,49,255,112,25,143,0,38,127,55,255,226,101,163,254,208,133,61,255,137,69,174,1,190,118,145,255,60,98,219,255,217,13,245,255,250,136,10,0,84,254,226,0,201,31,125,1,240,51,251,255,31,131,130,255,2,138,50,255,215,215,177,1,223,12,238,255,252,149,56,255,124,91,68,255,72,126,170,254,119,255,100,0,130,135,232,255,14,79,178,0,250,131,197,0,138,198,208,0,121,216,139,254,119,18,36,255,29,193,122,0,16,42,45,255,213,240,235,1,230,190,169,255,198,35,228,254,110,173,72,0,214,221,241,255,56,148,135,0,192,117,78,254,141,93,207,255,143,65,149,0,21,18,98,255,95,44,244,1,106,191,77,0,254,85,8,254,214,110,176,255,73,173,19,254,160,196,199,255,237,90,144,0,193,172,113,255,200,155,136,254,228,90,221,0,137,49,74,1,164,221,215,255,209,189,5,255,105,236,55,255,42,31,129,1,193,255,236,0,46,217,60,0,138,88,187,255,226,82,236,255,81,69,151,255,142,190,16,1,13,134,8,0,127,122,48,255,81,64,156,0,171,243,139,0,237,35,246,0,122,143,193,254,212,122,146,0,95,41,255,1,87,132,77,0,4,212,31,0,17,31,78,0,39,45,173,254,24,142,217,255,95,9,6,255,227,83,6,0,98,59,130,254,62,30,33,0,8,115,211,1,162,97,128,255,7,184,23,254,116,28,168,255,248,138,151,255,98,244,240,0,186,118,130,0,114,248,235,255,105,173,200,1,160,124,71,255,94,36,164,1,175,65,146,255,238,241,170,254,202,198,197,0,228,71,138,254,45,246,109,255,194,52,158,0,133,187,176,0,83,252,154,254,89,189,221,255,170,73,252,0,148,58,125,0,36,68,51,254,42,69,177,255,168,76,86,255,38,100,204,255,38,53,35,0,175,19,97,0,225,238,253,255,81,81,135,0,210,27,255,254,235,73,107,0,8,207,115,0,82,127,136,0,84,99,21,254,207,19,136,0,100,164,101,0,80,208,77,255,132,207,237,255,15,3,15,255,33,166,110,0,156,95,85,255,37,185,111,1,150,106,35,255,166,151,76,0,114,87,135,255,159,194,64,0,12,122,31,255,232,7,101,254,173,119,98,0,154,71,220,254,191,57,53,255,168,232,160,255,224,32,99,255,218,156,165,0,151,153,163,0,217,13,148,1,197,113,89,0,149,28,161,254,207,23,30,0,105,132,227,255,54,230,94,255,133,173,204,255,92,183,157,255,88,144,252,254,102,33,90,0,159,97,3,0,181,218,155,255,240,114,119,0,106,214,53,255,165,190,115,1,152,91,225,255,88,106,44,255,208,61,113,0,151,52,124,0,191,27,156,255,110,54,236,1,14,30,166,255,39,127,207,1,229,199,28,0,188,228,188,254,100,157,235,0,246,218,183,1,107,22,193,255,206,160,95,0,76,239,147,0,207,161,117,0,51,166,2,255,52,117,10,254,73,56,227,255,152,193,225,0,132,94,136,255,101,191,209,0,32,107,229,255,198,43,180,1,100,210,118,0,114,67,153,255,23,88,26,255,89,154,92,1,220,120,140,255,144,114,207,255,252,115,250,255,34,206,72,0,138,133,127,255,8,178,124,1,87,75,97,0,15,229,92,254,240,67,131,255,118,123,227,254,146,120,104,255,145,213,255,1,129,187,70,255,219,119,54,0,1,19,173,0,45,150,148,1,248,83,72,0,203,233,169,1,142,107,56,0,247,249,38,1,45,242,80,255,30,233,103,0,96,82,70,0,23,201,111,0,81,39,30,255,161,183,78,255,194,234,33,255,68,227,140,254,216,206,116,0,70,27,235,255,104,144,79,0,164,230,93,254,214,135,156,0,154,187,242,254,188,20,131,255,36,109,174,0,159,112,241,0,5,110,149,1,36,165,218,0,166,29,19,1,178,46,73,0,93,43,32,254,248,189,237,0,102,155,141,0,201,93,195,255,241,139,253,255,15,111,98,255,108,65,163,254,155,79,190,255,73,174,193,254,246,40,48,255,107,88,11,254,202,97,85,255,253,204,18,255,113,242,66,0,110,160,194,254,208,18,186,0,81,21,60,0,188,104,167,255,124,166,97,254,210,133,142,0,56,242,137,254,41,111,130,0,111,151,58,1,111,213,141,255,183,172,241,255,38,6,196,255,185,7,123,255,46,11,246,0,245,105,119,1,15,2,161,255,8,206,45,255,18,202,74,255,83,124,115,1,212,141,157,0,83,8,209,254,139,15,232,255,172,54,173,254,50,247,132,0,214,189,213,0,144,184,105,0,223,254,248,0,255,147,240,255,23,188,72,0,7,51,54,0,188,25,180,254,220,180,0,255,83,160,20,0,163,189,243,255,58,209,194,255,87,73,60,0,106,24,49,0,245,249,220,0,22,173,167,0,118,11,195,255,19,126,237,0,110,159,37,255,59,82,47,0,180,187,86,0,188,148,208,1,100,37,133,255,7,112,193,0,129,188,156,255,84,106,129,255,133,225,202,0,14,236,111,255,40,20,101,0,172,172,49,254,51,54,74,255,251,185,184,255,93,155,224,255,180,249,224,1,230,178,146,0,72,57,54,254,178,62,184,0,119,205,72,0,185,239,253,255,61,15,218,0,196,67,56,255,234,32,171,1,46,219,228,0,208,108,234,255,20,63,232,255,165,53,199,1,133,228,5,255,52,205,107,0,74,238,140,255,150,156,219,254,239,172,178,255,251,189,223,254,32,142,211,255,218,15,138,1,241,196,80,0,28,36,98,254,22,234,199,0,61,237,220,255,246,57,37,0,142,17,142,255,157,62,26,0,43,238,95,254,3,217,6,255,213,25,240,1,39,220,174,255,154,205,48,254,19,13,192,255,244,34,54,254,140,16,155,0,240,181,5,254,155,193,60,0,166,128,4,255,36,145,56,255,150,240,219,0,120,51,145,0,82,153,42,1,140,236,146,0,107,92,248,1,189,10,3,0,63,136,242,0,211,39,24,0,19,202,161,1,173,27,186,255,210,204,239,254,41,209,162,255,182,254,159,255,172,116,52,0,195,103,222,254,205,69,59,0,53,22,41,1,218,48,194,0,80,210,242,0,210,188,207,0,187,161,161,254,216,17,1,0,136,225,113,0,250,184,63,0,223,30,98,254,77,168,162,0,59,53,175,0,19,201,10,255,139,224,194,0,147,193,154,255,212,189,12,254,1,200,174,255,50,133,113,1,94,179,90,0,173,182,135,0,94,177,113,0,43,89,215,255,136,252,106,255,123,134,83,254,5,245,66,255,82,49,39,1,220,2,224,0,97,129,177,0,77,59,89,0,61,29,155,1,203,171,220,255,92,78,139,0,145,33,181,255,169,24,141,1,55,150,179,0,139,60,80,255,218,39,97,0,2,147,107,255,60,248,72,0,173,230,47,1,6,83,182,255,16,105,162,254,137,212,81,255,180,184,134,1,39,222,164,255,221,105,251,1,239,112,125,0,63,7,97,0,63,104,227,255,148,58,12,0,90,60,224,255,84,212,252,0,79,215,168,0,248,221,199,1,115,121,1,0,36,172,120,0,32,162,187,255,57,107,49,255,147,42,21,0,106,198,43,1,57,74,87,0,126,203,81,255,129,135,195,0,140,31,177,0,221,139,194,0,3,222,215,0,131,68,231,0,177,86,178,254,124,151,180,0,184,124,38,1,70,163,17,0,249,251,181,1,42,55,227,0,226,161,44,0,23,236,110,0,51,149,142,1,93,5,236,0,218,183,106,254,67,24,77,0,40,245,209,255,222,121,153,0,165,57,30,0,83,125,60,0,70,38,82,1,229,6,188,0,109,222,157,255,55,118,63,255,205,151,186,0,227,33,149,255,254,176,246,1,227,177,227,0,34,106,163,254,176,43,79,0,106,95,78,1,185,241,122,255,185,14,61,0,36,1,202,0,13,178,162,255,247,11,132,0,161,230,92,1,65,1,185,255,212,50,165,1,141,146,64,255,158,242,218,0,21,164,125,0,213,139,122,1,67,71,87,0,203,158,178,1,151,92,43,0,152,111,5,255,39,3,239,255,217,255,250,255,176,63,71,255,74,245,77,1,250,174,18,255,34,49,227,255,246,46,251,255,154,35,48,1,125,157,61,255,106,36,78,255,97,236,153,0,136,187,120,255,113,134,171,255,19,213,217,254,216,94,209,255,252,5,61,0,94,3,202,0,3,26,183,255,64,191,43,255,30,23,21,0,129,141,77,255,102,120,7,1,194,76,140,0,188,175,52,255,17,81,148,0,232,86,55,1,225,48,172,0,134,42,42,255,238,50,47,0,169,18,254,0,20,147,87,255,14,195,239,255,69,247,23,0,238,229,128,255,177,49,112,0,168,98,251,255,121,71,248,0,243,8,145,254,246,227,153,255,219,169,177,254,251,139,165,255,12,163,185,255,164,40,171,255,153,159,27,254,243,109,91,255,222,24,112,1,18,214,231,0,107,157,181,254,195,147,0,255,194,99,104,255,89,140,190,255,177,66,126,254,106,185,66,0,49,218,31,0,252,174,158,0,188,79,230,1,238,41,224,0,212,234,8,1,136,11,181,0,166,117,83,255,68,195,94,0,46,132,201,0,240,152,88,0,164,57,69,254,160,224,42,255,59,215,67,255,119,195,141,255,36,180,121,254,207,47,8,255,174,210,223,0,101,197,68,255,255,82,141,1,250,137,233,0,97,86,133,1,16,80,69,0,132,131,159,0,116,93,100,0,45,141,139,0,152,172,157,255,90,43,91,0,71,153,46,0,39,16,112,255,217,136,97,255,220,198,25,254,177,53,49,0,222,88,134,255,128,15,60,0,207,192,169,255,192,116,209,255,106,78,211,1,200,213,183,255,7,12,122,254,222,203,60,255,33,110,199,254,251,106,117,0,228,225,4,1,120,58,7,255,221,193,84,254,112,133,27,0,189,200,201,255,139,135,150,0,234,55,176,255,61,50,65,0,152,108,169,255,220,85,1,255,112,135,227,0,162,26,186,0,207,96,185,254,244,136,107,0,93,153,50,1,198,97,151,0,110,11,86,255,143,117,174,255,115,212,200,0,5,202,183,0,237,164,10,254,185,239,62,0,236,120,18,254,98,123,99,255,168,201,194,254,46,234,214,0,191,133,49,255,99,169,119,0,190,187,35,1,115,21,45,255,249,131,72,0,112,6,123,255,214,49,181,254,166,233,34,0,92,197,102,254,253,228,205,255,3,59,201,1,42,98,46,0,219,37,35,255,169,195,38,0,94,124,193,1,156,43,223,0,95,72,133,254,120,206,191,0,122,197,239,255,177,187,79,255,254,46,2,1,250,167,190,0,84,129,19,0,203,113,166,255,249,31,189,254,72,157,202,255,208,71,73,255,207,24,72,0,10,16,18,1,210,81,76,255,88,208,192,255,126,243,107,255,238,141,120,255,199,121,234,255,137,12,59,255,36,220,123,255,148,179,60,254,240,12,29,0,66,0,97,1,36,30,38,255,115,1,93,255,96,103,231,255,197,158,59,1,192,164,240,0,202,202,57,255,24,174,48,0,89,77,155,1,42,76,215,0,244,151,233,0,23,48,81,0,239,127,52,254,227,130,37,255,248,116,93,1,124,132,118,0,173,254,192,1,6,235,83,255,110,175,231,1,251,28,182,0,129,249,93,254,84,184,128,0,76,181,62,0,175,128,186,0,100,53,136,254,109,29,226,0,221,233,58,1,20,99,74,0,0,22,160,0,134,13,21,0,9,52,55,255,17,89,140,0,175,34,59,0,84,165,119,255,224,226,234,255,7,72,166,255,123,115,255,1,18,214,246,0,250,7,71,1,217,220,185,0,212,35,76,255,38,125,175,0,189,97,210,0,114,238,44,255,41,188,169,254,45,186,154,0,81,92,22,0,132,160,193,0,121,208,98,255,13,81,44,255,203,156,82,0,71,58,21,255,208,114,191,254,50,38,147,0,154,216,195,0,101,25,18,0,60,250,215,255,233,132,235,255,103,175,142,1,16,14,92,0,141,31,110,254,238,241,45,255,153,217,239,1,97,168,47,255,249,85,16,1,28,175,62,255,57,254,54,0,222,231,126,0,166,45,117,254,18,189,96,255,228,76,50,0,200,244,94,0,198,152,120,1,68,34,69,255,12,65,160,254,101,19,90,0,167,197,120,255,68,54,185,255,41,218,188,0,113,168,48,0,88,105,189,1,26,82,32,255,185,93,164,1,228,240,237,255,66,182,53,0,171,197,92,255,107,9,233,1,199,120,144,255,78,49,10,255,109,170,105,255,90,4,31,255,28,244,113,255,74,58,11,0,62,220,246,255,121,154,200,254,144,210,178,255,126,57,129,1,43,250,14,255,101,111,28,1,47,86,241,255,61,70,150,255,53,73,5,255,30,26,158,0,209,26,86,0,138,237,74,0,164,95,188,0,142,60,29,254,162,116,248,255,187,175,160,0,151,18,16,0,209,111,65,254,203,134,39,255,88,108,49,255,131,26,71,255,221,27,215,254,104,105,93,255,31,236,31,254,135,0,211,255,143,127,110,1,212,73,229,0,233,67,167,254,195,1,208,255,132,17,221,255,51,217,90,0,67,235,50,255,223,210,143,0,179,53,130,1,233,106,198,0,217,173,220,255,112,229,24,255,175,154,93,254,71,203,246,255,48,66,133,255,3,136,230,255,23,221,113,254,235,111,213,0,170,120,95,254,251,221,2,0,45,130,158,254,105,94,217,255,242,52,180,254,213,68,45,255,104,38,28,0,244,158,76,0,161,200,96,255,207,53,13,255,187,67,148,0,170,54,248,0,119,162,178,255,83,20,11,0,42,42,192,1,146,159,163,255,183,232,111,0,77,229,21,255,71,53,143,0,27,76,34,0,246,136,47,255,219,39,182,255,92,224,201,1,19,142,14,255,69,182,241,255,163,118,245,0,9,109,106,1,170,181,247,255,78,47,238,255,84,210,176,255,213,107,139,0,39,38,11,0,72,21,150,0,72,130,69,0,205,77,155,254,142,133,21], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); -/* memory initializer */ allocate([71,111,172,254,226,42,59,255,179,0,215,1,33,128,241,0,234,252,13,1,184,79,8,0,110,30,73,255,246,141,189,0,170,207,218,1,74,154,69,255,138,246,49,255,155,32,100,0,125,74,105,255,90,85,61,255,35,229,177,255,62,125,193,255,153,86,188,1,73,120,212,0,209,123,246,254,135,209,38,255,151,58,44,1,92,69,214,255,14,12,88,255,252,153,166,255,253,207,112,255,60,78,83,255,227,124,110,0,180,96,252,255,53,117,33,254,164,220,82,255,41,1,27,255,38,164,166,255,164,99,169,254,61,144,70,255,192,166,18,0,107,250,66,0,197,65,50,0,1,179,18,255,255,104,1,255,43,153,35,255,80,111,168,0,110,175,168,0,41,105,45,255,219,14,205,255,164,233,140,254,43,1,118,0,233,67,195,0,178,82,159,255,138,87,122,255,212,238,90,255,144,35,124,254,25,140,164,0,251,215,44,254,133,70,107,255,101,227,80,254,92,169,55,0,215,42,49,0,114,180,85,255,33,232,27,1,172,213,25,0,62,176,123,254,32,133,24,255,225,191,62,0,93,70,153,0,181,42,104,1,22,191,224,255,200,200,140,255,249,234,37,0,149,57,141,0,195,56,208,255,254,130,70,255,32,173,240,255,29,220,199,0,110,100,115,255,132,229,249,0,228,233,223,255,37,216,209,254,178,177,209,255,183,45,165,254,224,97,114,0,137,97,168,255,225,222,172,0,165,13,49,1,210,235,204,255,252,4,28,254,70,160,151,0,232,190,52,254,83,248,93,255,62,215,77,1,175,175,179,255,160,50,66,0,121,48,208,0,63,169,209,255,0,210,200,0,224,187,44,1,73,162,82,0,9,176,143,255,19,76,193,255,29,59,167,1,24,43,154,0,28,190,190,0,141,188,129,0,232,235,203,255,234,0,109,255,54,65,159,0,60,88,232,255,121,253,150,254,252,233,131,255,198,110,41,1,83,77,71,255,200,22,59,254,106,253,242,255,21,12,207,255,237,66,189,0,90,198,202,1,225,172,127,0,53,22,202,0,56,230,132,0,1,86,183,0,109,190,42,0,243,68,174,1,109,228,154,0,200,177,122,1,35,160,183,255,177,48,85,255,90,218,169,255,248,152,78,0,202,254,110,0,6,52,43,0,142,98,65,255,63,145,22,0,70,106,93,0,232,138,107,1,110,179,61,255,211,129,218,1,242,209,92,0,35,90,217,1,182,143,106,255,116,101,217,255,114,250,221,255,173,204,6,0,60,150,163,0,73,172,44,255,239,110,80,255,237,76,153,254,161,140,249,0,149,232,229,0,133,31,40,255,174,164,119,0,113,51,214,0,129,228,2,254,64,34,243,0,107,227,244,255,174,106,200,255,84,153,70,1,50,35,16,0,250,74,216,254,236,189,66,255,153,249,13,0,230,178,4,255,221,41,238,0,118,227,121,255,94,87,140,254,254,119,92,0,73,239,246,254,117,87,128,0,19,211,145,255,177,46,252,0,229,91,246,1,69,128,247,255,202,77,54,1,8,11,9,255,153,96,166,0,217,214,173,255,134,192,2,1,0,207,0,0,189,174,107,1,140,134,100,0,158,193,243,1,182,102,171,0,235,154,51,0,142,5,123,255,60,168,89,1,217,14,92,255,19,214,5,1,211,167,254,0,44,6,202,254,120,18,236,255,15,113,184,255,184,223,139,0,40,177,119,254,182,123,90,255,176,165,176,0,247,77,194,0,27,234,120,0,231,0,214,255,59,39,30,0,125,99,145,255,150,68,68,1,141,222,248,0,153,123,210,255,110,127,152,255,229,33,214,1,135,221,197,0,137,97,2,0,12,143,204,255,81,41,188,0,115,79,130,255,94,3,132,0,152,175,187,255,124,141,10,255,126,192,179,255,11,103,198,0,149,6,45,0,219,85,187,1,230,18,178,255,72,182,152,0,3,198,184,255,128,112,224,1,97,161,230,0,254,99,38,255,58,159,197,0,151,66,219,0,59,69,143,255,185,112,249,0,119,136,47,255,123,130,132,0,168,71,95,255,113,176,40,1,232,185,173,0,207,93,117,1,68,157,108,255,102,5,147,254,49,97,33,0,89,65,111,254,247,30,163,255,124,217,221,1,102,250,216,0,198,174,75,254,57,55,18,0,227,5,236,1,229,213,173,0,201,109,218,1,49,233,239,0,30,55,158,1,25,178,106,0,155,111,188,1,94,126,140,0,215,31,238,1,77,240,16,0,213,242,25,1,38,71,168,0,205,186,93,254,49,211,140,255,219,0,180,255,134,118,165,0,160,147,134,255,110,186,35,255,198,243,42,0,243,146,119,0,134,235,163,1,4,241,135,255,193,46,193,254,103,180,79,255,225,4,184,254,242,118,130,0,146,135,176,1,234,111,30,0,69,66,213,254,41,96,123,0,121,94,42,255,178,191,195,255,46,130,42,0,117,84,8,255,233,49,214,254,238,122,109,0,6,71,89,1,236,211,123,0,244,13,48,254,119,148,14,0,114,28,86,255,75,237,25,255,145,229,16,254,129,100,53,255,134,150,120,254,168,157,50,0,23,72,104,255,224,49,14,0,255,123,22,255,151,185,151,255,170,80,184,1,134,182,20,0,41,100,101,1,153,33,16,0,76,154,111,1,86,206,234,255,192,160,164,254,165,123,93,255,1,216,164,254,67,17,175,255,169,11,59,255,158,41,61,255,73,188,14,255,195,6,137,255,22,147,29,255,20,103,3,255,246,130,227,255,122,40,128,0,226,47,24,254,35,36,32,0,152,186,183,255,69,202,20,0,195,133,195,0,222,51,247,0,169,171,94,1,183,0,160,255,64,205,18,1,156,83,15,255,197,58,249,254,251,89,110,255,50,10,88,254,51,43,216,0,98,242,198,1,245,151,113,0,171,236,194,1,197,31,199,255,229,81,38,1,41,59,20,0,253,104,230,0,152,93,14,255,246,242,146,254,214,169,240,255,240,102,108,254,160,167,236,0,154,218,188,0,150,233,202,255,27,19,250,1,2,71,133,255,175,12,63,1,145,183,198,0,104,120,115,255,130,251,247,0,17,212,167,255,62,123,132,255,247,100,189,0,155,223,152,0,143,197,33,0,155,59,44,255,150,93,240,1,127,3,87,255,95,71,207,1,167,85,1,255,188,152,116,255,10,23,23,0,137,195,93,1,54,98,97,0,240,0,168,255,148,188,127,0,134,107,151,0,76,253,171,0,90,132,192,0,146,22,54,0,224,66,54,254,230,186,229,255,39,182,196,0,148,251,130,255,65,131,108,254,128,1,160,0,169,49,167,254,199,254,148,255,251,6,131,0,187,254,129,255,85,82,62,0,178,23,58,255,254,132,5,0,164,213,39,0,134,252,146,254,37,53,81,255,155,134,82,0,205,167,238,255,94,45,180,255,132,40,161,0,254,111,112,1,54,75,217,0,179,230,221,1,235,94,191,255,23,243,48,1,202,145,203,255,39,118,42,255,117,141,253,0,254,0,222,0,43,251,50,0,54,169,234,1,80,68,208,0,148,203,243,254,145,7,135,0,6,254,0,0,252,185,127,0,98,8,129,255,38,35,72,255,211,36,220,1,40,26,89,0,168,64,197,254,3,222,239,255,2,83,215,254,180,159,105,0,58,115,194,0,186,116,106,255,229,247,219,255,129,118,193,0,202,174,183,1,166,161,72,0,201,107,147,254,237,136,74,0,233,230,106,1,105,111,168,0,64,224,30,1,1,229,3,0,102,151,175,255,194,238,228,255,254,250,212,0,187,237,121,0,67,251,96,1,197,30,11,0,183,95,204,0,205,89,138,0,64,221,37,1,255,223,30,255,178,48,211,255,241,200,90,255,167,209,96,255,57,130,221,0,46,114,200,255,61,184,66,0,55,182,24,254,110,182,33,0,171,190,232,255,114,94,31,0,18,221,8,0,47,231,254,0,255,112,83,0,118,15,215,255,173,25,40,254,192,193,31,255,238,21,146,255,171,193,118,255,101,234,53,254,131,212,112,0,89,192,107,1,8,208,27,0,181,217,15,255,231,149,232,0,140,236,126,0,144,9,199,255,12,79,181,254,147,182,202,255,19,109,182,255,49,212,225,0,74,163,203,0,175,233,148,0,26,112,51,0,193,193,9,255,15,135,249,0,150,227,130,0,204,0,219,1,24,242,205,0,238,208,117,255,22,244,112,0,26,229,34,0,37,80,188,255,38,45,206,254,240,90,225,255,29,3,47,255,42,224,76,0,186,243,167,0,32,132,15,255,5,51,125,0,139,135,24,0,6,241,219,0,172,229,133,255,246,214,50,0,231,11,207,255,191,126,83,1,180,163,170,255,245,56,24,1,178,164,211,255,3,16,202,1,98,57,118,255,141,131,89,254,33,51,24,0,243,149,91,255,253,52,14,0,35,169,67,254,49,30,88,255,179,27,36,255,165,140,183,0,58,189,151,0,88,31,0,0,75,169,66,0,66,101,199,255,24,216,199,1,121,196,26,255,14,79,203,254,240,226,81,255,94,28,10,255,83,193,240,255,204,193,131,255,94,15,86,0,218,40,157,0,51,193,209,0,0,242,177,0,102,185,247,0,158,109,116,0,38,135,91,0,223,175,149,0,220,66,1,255,86,60,232,0,25,96,37,255,225,122,162,1,215,187,168,255,158,157,46,0,56,171,162,0,232,240,101,1,122,22,9,0,51,9,21,255,53,25,238,255,217,30,232,254,125,169,148,0,13,232,102,0,148,9,37,0,165,97,141,1,228,131,41,0,222,15,243,255,254,18,17,0,6,60,237,1,106,3,113,0,59,132,189,0,92,112,30,0,105,208,213,0,48,84,179,255,187,121,231,254,27,216,109,255,162,221,107,254,73,239,195,255,250,31,57,255,149,135,89,255,185,23,115,1,3,163,157,255,18,112,250,0,25,57,187,255,161,96,164,0,47,16,243,0,12,141,251,254,67,234,184,255,41,18,161,0,175,6,96,255,160,172,52,254,24,176,183,255,198,193,85,1,124,121,137,255,151,50,114,255,220,203,60,255,207,239,5,1,0,38,107,255,55,238,94,254,70,152,94,0,213,220,77,1,120,17,69,255,85,164,190,255,203,234,81,0,38,49,37,254,61,144,124,0,137,78,49,254,168,247,48,0,95,164,252,0,105,169,135,0,253,228,134,0,64,166,75,0,81,73,20,255,207,210,10,0,234,106,150,255,94,34,90,255,254,159,57,254,220,133,99,0,139,147,180,254,24,23,185,0,41,57,30,255,189,97,76,0,65,187,223,255,224,172,37,255,34,62,95,1,231,144,240,0,77,106,126,254,64,152,91,0,29,98,155,0,226,251,53,255,234,211,5,255,144,203,222,255,164,176,221,254,5,231,24,0,179,122,205,0,36,1,134,255,125,70,151,254,97,228,252,0,172,129,23,254,48,90,209,255,150,224,82,1,84,134,30,0,241,196,46,0,103,113,234,255,46,101,121,254,40,124,250,255,135,45,242,254,9,249,168,255,140,108,131,255,143,163,171,0,50,173,199,255,88,222,142,255,200,95,158,0,142,192,163,255,7,117,135,0,111,124,22,0,236,12,65,254,68,38,65,255,227,174,254,0,244,245,38,0,240,50,208,255,161,63,250,0,60,209,239,0,122,35,19,0,14,33,230,254,2,159,113,0,106,20,127,255,228,205,96,0,137,210,174,254,180,212,144,255,89,98,154,1,34,88,139,0,167,162,112,1,65,110,197,0,241,37,169,0,66,56,131,255,10,201,83,254,133,253,187,255,177,112,45,254,196,251,0,0,196,250,151,255,238,232,214,255,150,209,205,0,28,240,118,0,71,76,83,1,236,99,91,0,42,250,131,1,96,18,64,255,118,222,35,0,113,214,203,255,122,119,184,255,66,19,36,0,204,64,249,0,146,89,139,0,134,62,135,1,104,233,101,0,188,84,26,0,49,249,129,0,208,214,75,255,207,130,77,255,115,175,235,0,171,2,137,255,175,145,186,1,55,245,135,255,154,86,181,1,100,58,246,255,109,199,60,255,82,204,134,255,215,49,230,1,140,229,192,255,222,193,251,255,81,136,15,255,179,149,162,255,23,39,29,255,7,95,75,254,191,81,222,0,241,81,90,255,107,49,201,255,244,211,157,0,222,140,149,255,65,219,56,254,189,246,90,255,178,59,157,1,48,219,52,0,98,34,215,0,28,17,187,255,175,169,24,0,92,79,161,255,236,200,194,1,147,143,234,0,229,225,7,1,197,168,14,0,235,51,53,1,253,120,174,0,197,6,168,255,202,117,171,0,163,21,206,0,114,85,90,255,15,41,10,255,194,19,99,0,65,55,216,254,162,146,116,0,50,206,212,255,64,146,29,255,158,158,131,1,100,165,130,255,172,23,129,255,125,53,9,255,15,193,18,1,26,49,11,255,181,174,201,1,135,201,14,255,100,19,149,0,219,98,79,0,42,99,143,254,96,0,48,255,197,249,83,254,104,149,79,255,235,110,136,254,82,128,44,255,65,41,36,254,88,211,10,0,187,121,187,0,98,134,199,0,171,188,179,254,210,11,238,255,66,123,130,254,52,234,61,0,48,113,23,254,6,86,120,255,119,178,245,0,87,129,201,0,242,141,209,0,202,114,85,0,148,22,161,0,103,195,48,0,25,49,171,255,138,67,130,0,182,73,122,254,148,24,130,0,211,229,154,0,32,155,158,0,84,105,61,0,177,194,9,255,166,89,86,1,54,83,187,0,249,40,117,255,109,3,215,255,53,146,44,1,63,47,179,0,194,216,3,254,14,84,136,0,136,177,13,255,72,243,186,255,117,17,125,255,211,58,211,255,93,79,223,0,90,88,245,255,139,209,111,255,70,222,47,0,10,246,79,255,198,217,178,0,227,225,11,1,78,126,179,255,62,43,126,0,103,148,35,0,129,8,165,254,245,240,148,0,61,51,142,0,81,208,134,0,15,137,115,255,211,119,236,255,159,245,248,255,2,134,136,255,230,139,58,1,160,164,254,0,114,85,141,255,49,166,182,255,144,70,84,1,85,182,7,0,46,53,93,0,9,166,161,255,55,162,178,255,45,184,188,0,146,28,44,254,169,90,49,0,120,178,241,1,14,123,127,255,7,241,199,1,189,66,50,255,198,143,101,254,189,243,135,255,141,24,24,254,75,97,87,0,118,251,154,1,237,54,156,0,171,146,207,255,131,196,246,255,136,64,113,1,151,232,57,0,240,218,115,0,49,61,27,255,64,129,73,1,252,169,27,255,40,132,10,1,90,201,193,255,252,121,240,1,186,206,41,0,43,198,97,0,145,100,183,0,204,216,80,254,172,150,65,0,249,229,196,254,104,123,73,255,77,104,96,254,130,180,8,0,104,123,57,0,220,202,229,255,102,249,211,0,86,14,232,255,182,78,209,0,239,225,164,0,106,13,32,255,120,73,17,255,134,67,233,0,83,254,181,0,183,236,112,1,48,64,131,255,241,216,243,255,65,193,226,0,206,241,100,254,100,134,166,255,237,202,197,0,55,13,81,0,32,124,102,255,40,228,177,0,118,181,31,1,231,160,134,255,119,187,202,0,0,142,60,255,128,38,189,255,166,201,150,0,207,120,26,1,54,184,172,0,12,242,204,254,133,66,230,0,34,38,31,1,184,112,80,0,32,51,165,254,191,243,55,0,58,73,146,254,155,167,205,255,100,104,152,255,197,254,207,255,173,19,247,0,238,10,202,0,239,151,242,0,94,59,39,255,240,29,102,255,10,92,154,255,229,84,219,255,161,129,80,0,208,90,204,1,240,219,174,255,158,102,145,1,53,178,76,255,52,108,168,1,83,222,107,0,211,36,109,0,118,58,56,0,8,29,22,0,237,160,199,0,170,209,157,0,137,71,47,0,143,86,32,0,198,242,2,0,212,48,136,1,92,172,186,0,230,151,105,1,96,191,229,0,138,80,191,254,240,216,130,255,98,43,6,254,168,196,49,0,253,18,91,1,144,73,121,0,61,146,39,1,63,104,24,255,184,165,112,254,126,235,98,0,80,213,98,255,123,60,87,255,82,140,245,1,223,120,173,255,15,198,134,1,206,60,239,0,231,234,92,255,33,238,19,255,165,113,142,1,176,119,38,0,160,43,166,254,239,91,105,0,107,61,194,1,25,4,68,0,15,139,51,0,164,132,106,255,34,116,46,254,168,95,197,0,137,212,23,0,72,156,58,0,137,112,69,254,150,105,154,255,236,201,157,0,23,212,154,255,136,82,227,254,226,59,221,255,95,149,192,0,81,118,52,255,33,43,215,1,14,147,75,255,89,156,121,254,14,18,79,0,147,208,139,1,151,218,62,255,156,88,8,1,210,184,98,255,20,175,123,255,102,83,229,0,220,65,116,1,150,250,4,255,92,142,220,255,34,247,66,255,204,225,179,254,151,81,151,0,71,40,236,255,138,63,62,0,6,79,240,255,183,185,181,0,118,50,27,0,63,227,192,0,123,99,58,1,50,224,155,255,17,225,223,254,220,224,77,255,14,44,123,1,141,128,175,0,248,212,200,0,150,59,183,255,147,97,29,0,150,204,181,0,253,37,71,0,145,85,119,0,154,200,186,0,2,128,249,255,83,24,124,0,14,87,143,0,168,51,245,1,124,151,231,255,208,240,197,1,124,190,185,0,48,58,246,0,20,233,232,0,125,18,98,255,13,254,31,255,245,177,130,255,108,142,35,0,171,125,242,254,140,12,34,255,165,161,162,0,206,205,101,0,247,25,34,1,100,145,57,0,39,70,57,0,118,204,203,255,242,0,162,0,165,244,30,0,198,116,226,0,128,111,153,255,140,54,182,1,60,122,15,255,155,58,57,1,54,50,198,0,171,211,29,255,107,138,167,255,173,107,199,255,109,161,193,0,89,72,242,255,206,115,89,255,250,254,142,254,177,202,94,255,81,89,50,0,7,105,66,255,25,254,255,254,203,64,23,255,79,222,108,255,39,249,75,0,241,124,50,0,239,152,133,0,221,241,105,0,147,151,98,0,213,161,121,254,242,49,137,0,233,37,249,254,42,183,27,0,184,119,230,255,217,32,163,255,208,251,228,1,137,62,131,255,79,64,9,254,94,48,113,0,17,138,50,254,193,255,22,0,247,18,197,1,67,55,104,0,16,205,95,255,48,37,66,0,55,156,63,1,64,82,74,255,200,53,71,254,239,67,125,0,26,224,222,0,223,137,93,255,30,224,202,255,9,220,132,0,198,38,235,1,102,141,86,0,60,43,81,1,136,28,26,0,233,36,8,254,207,242,148,0,164,162,63,0,51,46,224,255,114,48,79,255,9,175,226,0,222,3,193,255,47,160,232,255,255,93,105,254,14,42,230,0,26,138,82,1,208,43,244,0,27,39,38,255,98,208,127,255,64,149,182,255,5,250,209,0,187,60,28,254,49,25,218,255,169,116,205,255,119,18,120,0,156,116,147,255,132,53,109,255,13,10,202,0,110,83,167,0,157,219,137,255,6,3,130,255,50,167,30,255,60,159,47,255,129,128,157,254,94,3,189,0,3,166,68,0,83,223,215,0,150,90,194,1,15,168,65,0,227,83,51,255,205,171,66,255,54,187,60,1,152,102,45,255,119,154,225,0,240,247,136,0,100,197,178,255,139,71,223,255,204,82,16,1,41,206,42,255,156,192,221,255,216,123,244,255,218,218,185,255,187,186,239,255,252,172,160,255,195,52,22,0,144,174,181,254,187,100,115,255,211,78,176,255,27,7,193,0,147,213,104,255,90,201,10,255,80,123,66,1,22,33,186,0,1,7,99,254,30,206,10,0,229,234,5,0,53,30,210,0,138,8,220,254,71,55,167,0,72,225,86,1,118,190,188,0,254,193,101,1,171,249,172,255,94,158,183,254,93,2,108,255,176,93,76,255,73,99,79,255,74,64,129,254,246,46,65,0,99,241,127,254,246,151,102,255,44,53,208,254,59,102,234,0,154,175,164,255,88,242,32,0,111,38,1,0,255,182,190,255,115,176,15,254,169,60,129,0,122,237,241,0,90,76,63,0,62,74,120,255,122,195,110,0,119,4,178,0,222,242,210,0,130,33,46,254,156,40,41,0,167,146,112,1,49,163,111,255,121,176,235,0,76,207,14,255,3,25,198,1,41,235,213,0,85,36,214,1,49,92,109,255,200,24,30,254,168,236,195,0,145,39,124,1,236,195,149,0,90,36,184,255,67,85,170,255,38,35,26,254,131,124,68,255,239,155,35,255,54,201,164,0,196,22,117,255,49,15,205,0,24,224,29,1,126,113,144,0,117,21,182,0,203,159,141,0,223,135,77,0,176,230,176,255,190,229,215,255,99,37,181,255,51,21,138,255,25,189,89,255,49,48,165,254,152,45,247,0,170,108,222,0,80,202,5,0,27,69,103,254,204,22,129,255,180,252,62,254,210,1,91,255,146,110,254,255,219,162,28,0,223,252,213,1,59,8,33,0,206,16,244,0,129,211,48,0,107,160,208,0,112,59,209,0,109,77,216,254,34,21,185,255,246,99,56,255,179,139,19,255,185,29,50,255,84,89,19,0,74,250,98,255,225,42,200,255,192,217,205,255,210,16,167,0,99,132,95,1,43,230,57,0,254,11,203,255,99,188,63,255,119,193,251,254,80,105,54,0,232,181,189,1,183,69,112,255,208,171,165,255,47,109,180,255,123,83,165,0,146,162,52,255,154,11,4,255,151,227,90,255,146,137,97,254,61,233,41,255,94,42,55,255,108,164,236,0,152,68,254,0,10,140,131,255,10,106,79,254,243,158,137,0,67,178,66,254,177,123,198,255,15,62,34,0,197,88,42,255,149,95,177,255,152,0,198,255,149,254,113,255,225,90,163,255,125,217,247,0,18,17,224,0,128,66,120,254,192,25,9,255,50,221,205,0,49,212,70,0,233,255,164,0,2,209,9,0,221,52,219,254,172,224,244,255,94,56,206,1,242,179,2,255,31,91,164,1,230,46,138,255,189,230,220,0,57,47,61,255,111,11,157,0,177,91,152,0,28,230,98,0,97,87,126,0,198,89,145,255,167,79,107,0,249,77,160,1,29,233,230,255,150,21,86,254,60,11,193,0,151,37,36,254,185,150,243,255,228,212,83,1,172,151,180,0,201,169,155,0,244,60,234,0,142,235,4,1,67,218,60,0,192,113,75,1,116,243,207,255,65,172,155,0,81,30,156,255,80,72,33,254,18,231,109,255,142,107,21,254,125,26,132,255,176,16,59,255,150,201,58,0,206,169,201,0,208,121,226,0,40,172,14,255,150,61,94,255,56,57,156,255,141,60,145,255,45,108,149,255,238,145,155,255,209,85,31,254,192,12,210,0,99,98,93,254,152,16,151,0,225,185,220,0,141,235,44,255,160,172,21,254,71,26,31,255,13,64,93,254,28,56,198,0,177,62,248,1,182,8,241,0,166,101,148,255,78,81,133,255,129,222,215,1,188,169,129,255,232,7,97,0,49,112,60,255,217,229,251,0,119,108,138,0,39,19,123,254,131,49,235,0,132,84,145,0,130,230,148,255,25,74,187,0,5,245,54,255,185,219,241,1,18,194,228,255,241,202,102,0,105,113,202,0,155,235,79,0,21,9,178,255,156,1,239,0,200,148,61,0,115,247,210,255,49,221,135,0,58,189,8,1,35,46,9,0,81,65,5,255,52,158,185,255,125,116,46,255,74,140,13,255,210,92,172,254,147,23,71,0,217,224,253,254,115,108,180,255,145,58,48,254,219,177,24,255,156,255,60,1,154,147,242,0,253,134,87,0,53,75,229,0,48,195,222,255,31,175,50,255,156,210,120,255,208,35,222,255,18,248,179,1,2,10,101,255,157,194,248,255,158,204,101,255,104,254,197,255,79,62,4,0,178,172,101,1,96,146,251,255,65,10,156,0,2,137,165,255,116,4,231,0,242,215,1,0,19,35,29,255,43,161,79,0,59,149,246,1,251,66,176,0,200,33,3,255,80,110,142,255,195,161,17,1,228,56,66,255,123,47,145,254,132,4,164,0,67,174,172,0,25,253,114,0,87,97,87,1,250,220,84,0,96,91,200,255,37,125,59,0,19,65,118,0,161,52,241,255,237,172,6,255,176,191,255,255,1,65,130,254,223,190,230,0,101,253,231,255,146,35,109,0,250,29,77,1,49,0,19,0,123,90,155,1,22,86,32,255,218,213,65,0,111,93,127,0,60,93,169,255,8,127,182,0,17,186,14,254,253,137,246,255,213,25,48,254,76,238,0,255,248,92,70,255,99,224,139,0,184,9,255,1,7,164,208,0,205,131,198,1,87,214,199,0,130,214,95,0,221,149,222,0,23,38,171,254,197,110,213,0,43,115,140,254,215,177,118,0,96,52,66,1,117,158,237,0,14,64,182,255,46,63,174,255,158,95,190,255,225,205,177,255,43,5,142,255,172,99,212,255,244,187,147,0,29,51,153,255,228,116,24,254,30,101,207,0,19,246,150,255,134,231,5,0,125,134,226,1,77,65,98,0,236,130,33,255,5,110,62,0,69,108,127,255,7,113,22,0,145,20,83,254,194,161,231,255,131,181,60,0,217,209,177,255,229,148,212,254,3,131,184,0,117,177,187,1,28,14,31,255,176,102,80,0,50,84,151,255,125,31,54,255,21,157,133,255,19,179,139,1,224,232,26,0,34,117,170,255,167,252,171,255,73,141,206,254,129,250,35,0,72,79,236,1,220,229,20,255,41,202,173,255,99,76,238,255,198,22,224,255,108,198,195,255,36,141,96,1,236,158,59,255,106,100,87,0,110,226,2,0,227,234,222,0,154,93,119,255,74,112,164,255,67,91,2,255,21,145,33,255,102,214,137,255,175,230,103,254,163,246,166,0,93,247,116,254,167,224,28,255,220,2,57,1,171,206,84,0,123,228,17,255,27,120,119,0,119,11,147,1,180,47,225,255,104,200,185,254,165,2,114,0,77,78,212,0,45,154,177,255,24,196,121,254,82,157,182,0,90,16,190,1,12,147,197,0,95,239,152,255,11,235,71,0,86,146,119,255,172,134,214,0,60,131,196,0,161,225,129,0,31,130,120,254,95,200,51,0,105,231,210,255,58,9,148,255,43,168,221,255,124,237,142,0,198,211,50,254,46,245,103,0,164,248,84,0,152,70,208,255,180,117,177,0,70,79,185,0,243,74,32,0,149,156,207,0,197,196,161,1,245,53,239,0,15,93,246,254,139,240,49,255,196,88,36,255,162,38,123,0,128,200,157,1,174,76,103,255,173,169,34,254,216,1,171,255,114,51,17,0,136,228,194,0,110,150,56,254,106,246,159,0,19,184,79,255,150,77,240,255,155,80,162,0,0,53,169,255,29,151,86,0,68,94,16,0,92,7,110,254,98,117,149,255,249,77,230,255,253,10,140,0,214,124,92,254,35,118,235,0,89,48,57,1,22,53,166,0,184,144,61,255,179,255,194,0,214,248,61,254,59,110,246,0,121,21,81,254,166,3,228,0,106,64,26,255,69,232,134,255,242,220,53,254,46,220,85,0,113,149,247,255,97,179,103,255,190,127,11,0,135,209,182,0,95,52,129,1,170,144,206,255,122,200,204,255,168,100,146,0,60,144,149,254,70,60,40,0,122,52,177,255,246,211,101,255,174,237,8,0,7,51,120,0,19,31,173,0,126,239,156,255,143,189,203,0,196,128,88,255,233,133,226,255,30,125,173,255,201,108,50,0,123,100,59,255,254,163,3,1,221,148,181,255,214,136,57,254,222,180,137,255,207,88,54,255,28,33,251,255,67,214,52,1,210,208,100,0,81,170,94,0,145,40,53,0,224,111,231,254,35,28,244,255,226,199,195,254,238,17,230,0,217,217,164,254,169,157,221,0,218,46,162,1,199,207,163,255,108,115,162,1,14,96,187,255,118,60,76,0,184,159,152,0,209,231,71,254,42,164,186,255,186,153,51,254,221,171,182,255,162,142,173,0,235,47,193,0,7,139,16,1,95,164,64,255,16,221,166,0,219,197,16,0,132,29,44,255,100,69,117,255,60,235,88,254,40,81,173,0,71,190,61,255,187,88,157,0,231,11,23,0,237,117,164,0,225,168,223,255,154,114,116,255,163,152,242,1,24,32,170,0,125,98,113,254,168,19,76,0,17,157,220,254,155,52,5,0,19,111,161,255,71,90,252,255,173,110,240,0,10,198,121,255,253,255,240,255,66,123,210,0,221,194,215,254,121,163,17,255,225,7,99,0,190,49,182,0,115,9,133,1,232,26,138,255,213,68,132,0,44,119,122,255,179,98,51,0,149,90,106,0,71,50,230,255,10,153,118,255,177,70,25,0,165,87,205,0,55,138,234,0,238,30,97,0,113,155,207,0,98,153,127,0,34,107,219,254,117,114,172,255,76,180,255,254,242,57,179,255,221,34,172,254,56,162,49,255,83,3,255,255,113,221,189,255,188,25,228,254,16,88,89,255,71,28,198,254,22,17,149,255,243,121,254,255,107,202,99,255,9,206,14,1,220,47,153,0,107,137,39,1,97,49,194,255,149,51,197,254,186,58,11,255,107,43,232,1,200,6,14,255,181,133,65,254,221,228,171,255,123,62,231,1,227,234,179,255,34,189,212,254,244,187,249,0,190,13,80,1,130,89,1,0,223,133,173,0,9,222,198,255,66,127,74,0,167,216,93,255,155,168,198,1,66,145,0,0,68,102,46,1,172,90,154,0,216,128,75,255,160,40,51,0,158,17,27,1,124,240,49,0,236,202,176,255,151,124,192,255,38,193,190,0,95,182,61,0,163,147,124,255,255,165,51,255,28,40,17,254,215,96,78,0,86,145,218,254,31,36,202,255,86,9,5,0,111,41,200,255,237,108,97,0,57,62,44,0,117,184,15,1,45,241,116,0,152,1,220,255,157,165,188,0,250,15,131,1,60,44,125,255,65,220,251,255,75,50,184,0,53,90,128,255,231,80,194,255,136,129,127,1,21,18,187,255,45,58,161,255,71,147,34,0,174,249,11,254,35,141,29,0,239,68,177,255,115,110,58,0,238,190,177,1,87,245,166,255,190,49,247,255,146,83,184,255,173,14,39,255,146,215,104,0,142,223,120,0,149,200,155,255,212,207,145,1,16,181,217,0,173,32,87,255,255,35,181,0,119,223,161,1,200,223,94,255,70,6,186,255,192,67,85,255,50,169,152,0,144,26,123,255,56,243,179,254,20,68,136,0,39,140,188,254,253,208,5,255,200,115,135,1,43,172,229,255,156,104,187,0,151,251,167,0,52,135,23,0,151,153,72,0,147,197,107,254,148,158,5,255,238,143,206,0,126,153,137,255,88,152,197,254,7,68,167,0,252,159,165,255,239,78,54,255,24,63,55,255,38,222,94,0,237,183,12,255,206,204,210,0,19,39,246,254,30,74,231,0,135,108,29,1,179,115,0,0,117,118,116,1,132,6,252,255,145,129,161,1,105,67,141,0,82,37,226,255,238,226,228,255,204,214,129,254,162,123,100,255,185,121,234,0,45,108,231,0,66,8,56,255,132,136,128,0,172,224,66,254,175,157,188,0,230,223,226,254,242,219,69,0,184,14,119,1,82,162,56,0,114,123,20,0,162,103,85,255,49,239,99,254,156,135,215,0,111,255,167,254,39,196,214,0,144,38,79,1,249,168,125,0,155,97,156,255,23,52,219,255,150,22,144,0,44,149,165,255,40,127,183,0,196,77,233,255,118,129,210,255,170,135,230,255,214,119,198,0,233,240,35,0,253,52,7,255,117,102,48,255,21,204,154,255,179,136,177,255,23,2,3,1,149,130,89,255,252,17,159,1,70,60,26,0,144,107,17,0,180,190,60,255,56,182,59,255,110,71,54,255,198,18,129,255,149,224,87,255,223,21,152,255,138,22,182,255,250,156,205,0,236,45,208,255,79,148,242,1,101,70,209,0,103,78,174,0,101,144,172,255,152,136,237,1,191,194,136,0,113,80,125,1,152,4,141,0,155,150,53,255,196,116,245,0,239,114,73,254,19,82,17,255,124,125,234,255,40,52,191,0,42,210,158,255,155,132,165,0,178,5,42,1,64,92,40,255,36,85,77,255,178,228,118,0,137,66,96,254,115,226,66,0,110,240,69,254,151,111,80,0,167,174,236,255,227,108,107,255,188,242,65,255,183,81,255,0,57,206,181,255,47,34,181,255,213,240,158,1,71,75,95,0,156,40,24,255,102,210,81,0,171,199,228,255,154,34,41,0,227,175,75,0,21,239,195,0,138,229,95,1,76,192,49,0,117,123,87,1,227,225,130,0,125,62,63,255,2,198,171,0,254,36,13,254,145,186,206,0,148,255,244,255,35,0,166,0,30,150,219,1,92,228,212,0,92,198,60,254,62,133,200,255,201,41,59,0,125,238,109,255,180,163,238,1,140,122,82,0,9,22,88,255,197,157,47,255,153,94,57,0,88,30,182,0,84,161,85,0,178,146,124,0,166,166,7,255,21,208,223,0,156,182,242,0,155,121,185,0,83,156,174,254,154,16,118,255,186,83,232,1,223,58,121,255,29,23,88,0,35,125,127,255,170,5,149,254,164,12,130,255,155,196,29,0,161,96,136,0,7,35,29,1,162,37,251,0,3,46,242,255,0,217,188,0,57,174,226,1,206,233,2,0,57,187,136,254,123,189,9,255,201,117,127,255,186,36,204,0,231,25,216,0,80,78,105,0,19,134,129,255,148,203,68,0,141,81,125,254,248,165,200,255,214,144,135,0,151,55,166,255,38,235,91,0,21,46,154,0,223,254,150,255,35,153,180,255,125,176,29,1,43,98,30,255,216,122,230,255,233,160,12,0,57,185,12,254,240,113,7,255,5,9,16,254,26,91,108,0,109,198,203,0,8,147,40,0,129,134,228,255,124,186,40,255,114,98,132,254,166,132,23,0,99,69,44,0,9,242,238,255,184,53,59,0,132,129,102,255,52,32,243,254,147,223,200,255,123,83,179,254,135,144,201,255,141,37,56,1,151,60,227,255,90,73,156,1,203,172,187,0,80,151,47,255,94,137,231,255,36,191,59,255,225,209,181,255,74,215,213,254,6,118,179,255,153,54,193,1,50,0,231,0,104,157,72,1,140,227,154,255,182,226,16,254,96,225,92,255,115,20,170,254,6,250,78,0,248,75,173,255,53,89,6,255,0,180,118,0,72,173,1,0,64,8,206,1,174,133,223,0,185,62,133,255,214,11,98,0,197,31,208,0,171,167,244,255,22,231,181,1,150,218,185,0,247,169,97,1,165,139,247,255,47,120,149,1,103,248,51,0,60,69,28,254,25,179,196,0,124,7,218,254,58,107,81,0,184,233,156,255,252,74,36,0,118,188,67,0,141,95,53,255,222,94,165,254,46,61,53,0,206,59,115,255,47,236,250,255,74,5,32,1,129,154,238,255,106,32,226,0,121,187,61,255,3,166,241,254,67,170,172,255,29,216,178,255,23,201,252,0,253,110,243,0,200,125,57,0,109,192,96,255,52,115,238,0,38,121,243,255,201,56,33,0,194,118,130,0,75,96,25,255,170,30,230,254,39,63,253,0,36,45,250,255,251,1,239,0,160,212,92,1,45,209,237,0,243,33,87,254,237,84,201,255,212,18,157,254,212,99,127,255,217,98,16,254,139,172,239,0,168,201,130,255,143,193,169,255,238,151,193,1,215,104,41,0,239,61,165,254,2,3,242,0,22,203,177,254,177,204,22,0,149,129,213,254,31,11,41,255,0,159,121,254,160,25,114,255,162,80,200,0,157,151,11,0,154,134,78,1,216,54,252,0,48,103,133,0,105,220,197,0,253,168,77,254,53,179,23,0,24,121,240,1,255,46,96,255,107,60,135,254,98,205,249,255,63,249,119,255,120,59,211,255,114,180,55,254,91,85,237,0,149,212,77,1,56,73,49,0,86,198,150,0,93,209,160,0,69,205,182,255,244,90,43,0,20,36,176,0,122,116,221,0,51,167,39,1,231,1,63,255,13,197,134,0,3,209,34,255,135,59,202,0,167,100,78,0,47,223,76,0,185,60,62,0,178,166,123,1,132,12,161,255,61,174,43,0,195,69,144,0,127,47,191,1,34,44,78,0,57,234,52,1,255,22,40,255,246,94,146,0,83,228,128,0,60,78,224,255,0,96,210,255,153,175,236,0,159,21,73,0,180,115,196,254,131,225,106,0,255,167,134,0,159,8,112,255,120,68,194,255,176,196,198,255,118,48,168,255,93,169,1,0,112,200,102,1,74,24,254,0,19,141,4,254,142,62,63,0,131,179,187,255,77,156,155,255,119,86,164,0,170,208,146,255,208,133,154,255,148,155,58,255,162,120,232,254,252,213,155,0,241,13,42,0,94,50,131,0,179,170,112,0,140,83,151,255,55,119,84,1,140,35,239,255,153,45,67,1,236,175,39,0,54,151,103,255,158,42,65,255,196,239,135,254,86,53,203,0,149,97,47,254,216,35,17,255,70,3,70,1,103,36,90,255,40,26,173,0,184,48,13,0,163,219,217,255,81,6,1,255,221,170,108,254,233,208,93,0,100,201,249,254,86,36,35,255,209,154,30,1,227,201,251,255,2,189,167,254,100,57,3,0,13,128,41,0,197,100,75,0,150,204,235,255,145,174,59,0,120,248,149,255,85,55,225,0,114,210,53,254,199,204,119,0,14,247,74,1,63,251,129,0,67,104,151,1,135,130,80,0,79,89,55,255,117,230,157,255,25,96,143,0,213,145,5,0,69,241,120,1,149,243,95,255,114,42,20,0,131,72,2,0,154,53,20,255,73,62,109,0,196,102,152,0,41,12,204,255,122,38,11,1,250,10,145,0,207,125,148,0,246,244,222,255,41,32,85,1,112,213,126,0,162,249,86,1,71,198,127,255,81,9,21,1,98,39,4,255,204,71,45,1,75,111,137,0,234,59,231,0,32,48,95,255,204,31,114,1,29,196,181,255,51,241,167,254,93,109,142,0,104,144,45,0,235,12,181,255,52,112,164,0,76,254,202,255,174,14,162,0,61,235,147,255,43,64,185,254,233,125,217,0,243,88,167,254,74,49,8,0,156,204,66,0,124,214,123,0,38,221,118,1,146,112,236,0,114,98,177,0,151,89,199,0,87,197,112,0,185,149,161,0,44,96,165,0,248,179,20,255,188,219,216,254,40,62,13,0,243,142,141,0,229,227,206,255,172,202,35,255,117,176,225,255,82,110,38,1,42,245,14,255,20,83,97,0,49,171,10,0,242,119,120,0,25,232,61,0,212,240,147,255,4,115,56,255,145,17,239,254,202,17,251,255,249,18,245,255,99,117,239,0,184,4,179,255,246,237,51,255,37,239,137,255,166,112,166,255,81,188,33,255,185,250,142,255,54,187,173,0,208,112,201,0,246,43,228,1,104,184,88,255,212,52,196,255,51,117,108,255,254,117,155,0,46,91,15,255,87,14,144,255,87,227,204,0,83,26,83,1,159,76,227,0,159,27,213,1,24,151,108,0,117,144,179,254,137,209,82,0,38,159,10,0,115,133,201,0,223,182,156,1,110,196,93,255,57,60,233,0,5,167,105,255,154,197,164,0,96,34,186,255,147,133,37,1,220,99,190,0,1,167,84,255,20,145,171,0,194,197,251,254,95,78,133,255,252,248,243,255,225,93,131,255,187,134,196,255,216,153,170,0,20,118,158,254,140,1,118,0,86,158,15,1,45,211,41,255,147,1,100,254,113,116,76,255,211,127,108,1,103,15,48,0,193,16,102,1,69,51,95,255,107,128,157,0,137,171,233,0,90,124,144,1,106,161,182,0,175,76,236,1,200,141,172,255,163,58,104,0,233,180,52,255,240,253,14,255,162,113,254,255,38,239,138,254,52,46,166,0,241,101,33,254,131,186,156,0,111,208,62,255,124,94,160,255,31,172,254,0,112,174,56,255,188,99,27,255,67,138,251,0,125,58,128,1,156,152,174,255,178,12,247,255,252,84,158,0,82,197,14,254,172,200,83,255,37,39,46,1,106,207,167,0,24,189,34,0,131,178,144,0,206,213,4,0,161,226,210,0,72,51,105,255,97,45,187,255,78,184,223,255,176,29,251,0,79,160,86,255,116,37,178,0,82,77,213,1,82,84,141,255,226,101,212,1,175,88,199,255,245,94,247,1,172,118,109,255,166,185,190,0,131,181,120,0,87,254,93,255,134,240,73,255,32,245,143,255,139,162,103,255,179,98,18,254,217,204,112,0,147,223,120,255,53,10,243,0,166,140,150,0,125,80,200,255,14,109,219,255,91,218,1,255,252,252,47,254,109,156,116,255,115,49,127,1,204,87,211,255,148,202,217,255,26,85,249,255,14,245,134,1,76,89,169,255,242,45,230,0,59,98,172,255,114,73,132,254,78,155,49,255,158,126,84,0,49,175,43,255,16,182,84,255,157,103,35,0,104,193,109,255,67,221,154,0,201,172,1,254,8,162,88,0,165,1,29,255,125,155,229,255,30,154,220,1,103,239,92,0,220,1,109,255,202,198,1,0,94,2,142,1,36,54,44,0,235,226,158,255,170,251,214,255,185,77,9,0,97,74,242,0,219,163,149,255,240,35,118,255,223,114,88,254,192,199,3,0,106,37,24,255,201,161,118,255,97,89,99,1,224,58,103,255,101,199,147,254,222,60,99,0,234,25,59,1,52,135,27,0,102,3,91,254,168,216,235,0,229,232,136,0,104,60,129,0,46,168,238,0,39,191,67,0,75,163,47,0,143,97,98,255,56,216,168,1,168,233,252,255,35,111,22,255,92,84,43,0,26,200,87,1,91,253,152,0,202,56,70,0,142,8,77,0,80,10,175,1,252,199,76,0,22,110,82,255,129,1,194,0,11,128,61,1,87,14,145,255,253,222,190,1,15,72,174,0,85,163,86,254,58,99,44,255,45,24,188,254,26,205,15,0,19,229,210,254,248,67,195,0,99,71,184,0,154,199,37,255,151,243,121,255,38,51,75,255,201,85,130,254,44,65,250,0,57,147,243,254,146,43,59,255,89,28,53,0,33,84,24,255,179,51,18,254,189,70,83,0,11,156,179,1,98,134,119,0,158,111,111,0,119,154,73,255,200,63,140,254,45,13,13,255,154,192,2,254,81,72,42,0,46,160,185,254,44,112,6,0,146,215,149,1,26,176,104,0,68,28,87,1,236,50,153,255,179,128,250,254,206,193,191,255,166,92,137,254,53,40,239,0,210,1,204,254,168,173,35,0,141,243,45,1,36,50,109,255,15,242,194,255,227,159,122,255,176,175,202,254,70,57,72,0,40,223,56,0,208,162,58,255,183,98,93,0,15,111,12,0,30,8,76,255,132,127,246,255,45,242,103,0,69,181,15,255,10,209,30,0,3,179,121,0,241,232,218,1,123,199,88,255,2,210,202,1,188,130,81,255,94,101,208,1,103,36,45,0,76,193,24,1,95,26,241,255,165,162,187,0,36,114,140,0,202,66,5,255,37,56,147,0,152,11,243,1,127,85,232,255,250,135,212,1,185,177,113,0,90,220,75,255,69,248,146,0,50,111,50,0,92,22,80,0,244,36,115,254,163,100,82,255,25,193,6,1,127,61,36,0,253,67,30,254,65,236,170,255,161,17,215,254,63,175,140,0,55,127,4,0,79,112,233,0,109,160,40,0,143,83,7,255,65,26,238,255,217,169,140,255,78,94,189,255,0,147,190,255,147,71,186,254,106,77,127,255,233,157,233,1,135,87,237,255,208,13,236,1,155,109,36,255,180,100,218,0,180,163,18,0,190,110,9,1,17,63,123,255,179,136,180,255,165,123,123,255,144,188,81,254,71,240,108,255,25,112,11,255,227,218,51,255,167,50,234,255,114,79,108,255,31,19,115,255,183,240,99,0,227,87,143,255,72,217,248,255,102,169,95,1,129,149,149,0,238,133,12,1,227,204,35,0,208,115,26,1,102,8,234,0,112,88,143,1,144,249,14,0,240,158,172,254,100,112,119,0,194,141,153,254,40,56,83,255,121,176,46,0,42,53,76,255,158,191,154,0,91,209,92,0,173,13,16,1,5,72,226,255,204,254,149,0,80,184,207,0,100,9,122,254,118,101,171,255,252,203,0,254,160,207,54,0,56,72,249,1,56,140,13,255,10,64,107,254,91,101,52,255,225,181,248,1,139,255,132,0,230,145,17,0,233,56,23,0,119,1,241,255,213,169,151,255,99,99,9,254,185,15,191,255,173,103,109,1,174,13,251,255,178,88,7,254,27,59,68,255,10,33,2,255,248,97,59,0,26,30,146,1,176,147,10,0,95,121,207,1,188,88,24,0,185,94,254,254,115,55,201,0,24,50,70,0,120,53,6,0,142,66,146,0,228,226,249,255,104,192,222,1,173,68,219,0,162,184,36,255,143,102,137,255,157,11,23,0,125,45,98,0,235,93,225,254,56,112,160,255,70,116,243,1,153,249,55,255,129,39,17,1,241,80,244,0,87,69,21,1,94,228,73,255,78,66,65,255,194,227,231,0,61,146,87,255,173,155,23,255,112,116,219,254,216,38,11,255,131,186,133,0,94,212,187,0,100,47,91,0,204,254,175,255,222,18,215,254,173,68,108,255,227,228,79,255,38,221,213,0,163,227,150,254,31,190,18,0,160,179,11,1,10,90,94,255,220,174,88,0,163,211,229,255,199,136,52,0,130,95,221,255,140,188,231,254,139,113,128,255,117,171,236,254,49,220,20,255,59,20,171,255,228,109,188,0,20,225,32,254,195,16,174,0,227,254,136,1,135,39,105,0,150,77,206,255,210,238,226,0,55,212,132,254,239,57,124,0,170,194,93,255,249,16,247,255,24,151,62,255,10,151,10,0,79,139,178,255,120,242,202,0,26,219,213,0,62,125,35,255,144,2,108,255,230,33,83,255,81,45,216,1,224,62,17,0,214,217,125,0,98,153,153,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); -/* memory initializer */ allocate([179,176,106,254,131,93,138,255,109,62,36,255,178,121,32,255,120,252,70,0,220,248,37,0,204,88,103,1,128,220,251,255,236,227,7,1,106,49,198,255,60,56,107,0,99,114,238,0,220,204,94,1,73,187,1,0,89,154,34,0,78,217,165,255,14,195,249,255,9,230,253,255,205,135,245,0,26,252,7,255,84,205,27,1,134,2,112,0,37,158,32,0,231,91,237,255,191,170,204,255,152,7,222,0,109,192,49,0,193,166,146,255,232,19,181,255,105,142,52,255,103,16,27,1,253,200,165,0,195,217,4,255,52,189,144,255,123,155,160,254,87,130,54,255,78,120,61,255,14,56,41,0,25,41,125,255,87,168,245,0,214,165,70,0,212,169,6,255,219,211,194,254,72,93,164,255,197,33,103,255,43,142,141,0,131,225,172,0,244,105,28,0,68,68,225,0,136,84,13,255,130,57,40,254,139,77,56,0,84,150,53,0,54,95,157,0,144,13,177,254,95,115,186,0,117,23,118,255,244,166,241,255,11,186,135,0,178,106,203,255,97,218,93,0,43,253,45,0,164,152,4,0,139,118,239,0,96,1,24,254,235,153,211,255,168,110,20,255,50,239,176,0,114,41,232,0,193,250,53,0,254,160,111,254,136,122,41,255,97,108,67,0,215,152,23,255,140,209,212,0,42,189,163,0,202,42,50,255,106,106,189,255,190,68,217,255,233,58,117,0,229,220,243,1,197,3,4,0,37,120,54,254,4,156,134,255,36,61,171,254,165,136,100,255,212,232,14,0,90,174,10,0,216,198,65,255,12,3,64,0,116,113,115,255,248,103,8,0,231,125,18,255,160,28,197,0,30,184,35,1,223,73,249,255,123,20,46,254,135,56,37,255,173,13,229,1,119,161,34,255,245,61,73,0,205,125,112,0,137,104,134,0,217,246,30,255,237,142,143,0,65,159,102,255,108,164,190,0,219,117,173,255,34,37,120,254,200,69,80,0,31,124,218,254,74,27,160,255,186,154,199,255,71,199,252,0,104,81,159,1,17,200,39,0,211,61,192,1,26,238,91,0,148,217,12,0,59,91,213,255,11,81,183,255,129,230,122,255,114,203,145,1,119,180,66,255,72,138,180,0,224,149,106,0,119,82,104,255,208,140,43,0,98,9,182,255,205,101,134,255,18,101,38,0,95,197,166,255,203,241,147,0,62,208,145,255,133,246,251,0,2,169,14,0,13,247,184,0,142,7,254,0,36,200,23,255,88,205,223,0,91,129,52,255,21,186,30,0,143,228,210,1,247,234,248,255,230,69,31,254,176,186,135,255,238,205,52,1,139,79,43,0,17,176,217,254,32,243,67,0,242,111,233,0,44,35,9,255,227,114,81,1,4,71,12,255,38,105,191,0,7,117,50,255,81,79,16,0,63,68,65,255,157,36,110,255,77,241,3,255,226,45,251,1,142,25,206,0,120,123,209,1,28,254,238,255,5,128,126,255,91,222,215,255,162,15,191,0,86,240,73,0,135,185,81,254,44,241,163,0,212,219,210,255,112,162,155,0,207,101,118,0,168,72,56,255,196,5,52,0,72,172,242,255,126,22,157,255,146,96,59,255,162,121,152,254,140,16,95,0,195,254,200,254,82,150,162,0,119,43,145,254,204,172,78,255,166,224,159,0,104,19,237,255,245,126,208,255,226,59,213,0,117,217,197,0,152,72,237,0,220,31,23,254,14,90,231,255,188,212,64,1,60,101,246,255,85,24,86,0,1,177,109,0,146,83,32,1,75,182,192,0,119,241,224,0,185,237,27,255,184,101,82,1,235,37,77,255,253,134,19,0,232,246,122,0,60,106,179,0,195,11,12,0,109,66,235,1,125,113,59,0,61,40,164,0,175,104,240,0,2,47,187,255,50,12,141,0,194,139,181,255,135,250,104,0,97,92,222,255,217,149,201,255,203,241,118,255,79,151,67,0,122,142,218,255,149,245,239,0,138,42,200,254,80,37,97,255,124,112,167,255,36,138,87,255,130,29,147,255,241,87,78,255,204,97,19,1,177,209,22,255,247,227,127,254,99,119,83,255,212,25,198,1,16,179,179,0,145,77,172,254,89,153,14,255,218,189,167,0,107,233,59,255,35,33,243,254,44,112,112,255,161,127,79,1,204,175,10,0,40,21,138,254,104,116,228,0,199,95,137,255,133,190,168,255,146,165,234,1,183,99,39,0,183,220,54,254,255,222,133,0,162,219,121,254,63,239,6,0,225,102,54,255,251,18,246,0,4,34,129,1,135,36,131,0,206,50,59,1,15,97,183,0,171,216,135,255,101,152,43,255,150,251,91,0,38,145,95,0,34,204,38,254,178,140,83,255,25,129,243,255,76,144,37,0,106,36,26,254,118,144,172,255,68,186,229,255,107,161,213,255,46,163,68,255,149,170,253,0,187,17,15,0,218,160,165,255,171,35,246,1,96,13,19,0,165,203,117,0,214,107,192,255,244,123,177,1,100,3,104,0,178,242,97,255,251,76,130,255,211,77,42,1,250,79,70,255,63,244,80,1,105,101,246,0,61,136,58,1,238,91,213,0,14,59,98,255,167,84,77,0,17,132,46,254,57,175,197,255,185,62,184,0,76,64,207,0,172,175,208,254,175,74,37,0,138,27,211,254,148,125,194,0,10,89,81,0,168,203,101,255,43,213,209,1,235,245,54,0,30,35,226,255,9,126,70,0,226,125,94,254,156,117,20,255,57,248,112,1,230,48,64,255,164,92,166,1,224,214,230,255,36,120,143,0,55,8,43,255,251,1,245,1,106,98,165,0,74,107,106,254,53,4,54,255,90,178,150,1,3,120,123,255,244,5,89,1,114,250,61,255,254,153,82,1,77,15,17,0,57,238,90,1,95,223,230,0,236,52,47,254,103,148,164,255,121,207,36,1,18,16,185,255,75,20,74,0,187,11,101,0,46,48,129,255,22,239,210,255,77,236,129,255,111,77,204,255,61,72,97,255,199,217,251,255,42,215,204,0,133,145,201,255,57,230,146,1,235,100,198,0,146,73,35,254,108,198,20,255,182,79,210,255,82,103,136,0,246,108,176,0,34,17,60,255,19,74,114,254,168,170,78,255,157,239,20,255,149,41,168,0,58,121,28,0,79,179,134,255,231,121,135,255,174,209,98,255,243,122,190,0,171,166,205,0,212,116,48,0,29,108,66,255,162,222,182,1,14,119,21,0,213,39,249,255,254,223,228,255,183,165,198,0,133,190,48,0,124,208,109,255,119,175,85,255,9,209,121,1,48,171,189,255,195,71,134,1,136,219,51,255,182,91,141,254,49,159,72,0,35,118,245,255,112,186,227,255,59,137,31,0,137,44,163,0,114,103,60,254,8,213,150,0,162,10,113,255,194,104,72,0,220,131,116,255,178,79,92,0,203,250,213,254,93,193,189,255,130,255,34,254,212,188,151,0,136,17,20,255,20,101,83,255,212,206,166,0,229,238,73,255,151,74,3,255,168,87,215,0,155,188,133,255,166,129,73,0,240,79,133,255,178,211,81,255,203,72,163,254,193,168,165,0,14,164,199,254,30,255,204,0,65,72,91,1,166,74,102,255,200,42,0,255,194,113,227,255,66,23,208,0,229,216,100,255,24,239,26,0,10,233,62,255,123,10,178,1,26,36,174,255,119,219,199,1,45,163,190,0,16,168,42,0,166,57,198,255,28,26,26,0,126,165,231,0,251,108,100,255,61,229,121,255,58,118,138,0,76,207,17,0,13,34,112,254,89,16,168,0,37,208,105,255,35,201,215,255,40,106,101,254,6,239,114,0,40,103,226,254,246,127,110,255,63,167,58,0,132,240,142,0,5,158,88,255,129,73,158,255,94,89,146,0,230,54,146,0,8,45,173,0,79,169,1,0,115,186,247,0,84,64,131,0,67,224,253,255,207,189,64,0,154,28,81,1,45,184,54,255,87,212,224,255,0,96,73,255,129,33,235,1,52,66,80,255,251,174,155,255,4,179,37,0,234,164,93,254,93,175,253,0,198,69,87,255,224,106,46,0,99,29,210,0,62,188,114,255,44,234,8,0,169,175,247,255,23,109,137,255,229,182,39,0,192,165,94,254,245,101,217,0,191,88,96,0,196,94,99,255,106,238,11,254,53,126,243,0,94,1,101,255,46,147,2,0,201,124,124,255,141,12,218,0,13,166,157,1,48,251,237,255,155,250,124,255,106,148,146,255,182,13,202,0,28,61,167,0,217,152,8,254,220,130,45,255,200,230,255,1,55,65,87,255,93,191,97,254,114,251,14,0,32,105,92,1,26,207,141,0,24,207,13,254,21,50,48,255,186,148,116,255,211,43,225,0,37,34,162,254,164,210,42,255,68,23,96,255,182,214,8,255,245,117,137,255,66,195,50,0,75,12,83,254,80,140,164,0,9,165,36,1,228,110,227,0,241,17,90,1,25,52,212,0,6,223,12,255,139,243,57,0,12,113,75,1,246,183,191,255,213,191,69,255,230,15,142,0,1,195,196,255,138,171,47,255,64,63,106,1,16,169,214,255,207,174,56,1,88,73,133,255,182,133,140,0,177,14,25,255,147,184,53,255,10,227,161,255,120,216,244,255,73,77,233,0,157,238,139,1,59,65,233,0,70,251,216,1,41,184,153,255,32,203,112,0,146,147,253,0,87,101,109,1,44,82,133,255,244,150,53,255,94,152,232,255,59,93,39,255,88,147,220,255,78,81,13,1,32,47,252,255,160,19,114,255,93,107,39,255,118,16,211,1,185,119,209,255,227,219,127,254,88,105,236,255,162,110,23,255,36,166,110,255,91,236,221,255,66,234,116,0,111,19,244,254,10,233,26,0,32,183,6,254,2,191,242,0,218,156,53,254,41,60,70,255,168,236,111,0,121,185,126,255,238,142,207,255,55,126,52,0,220,129,208,254,80,204,164,255,67,23,144,254,218,40,108,255,127,202,164,0,203,33,3,255,2,158,0,0,37,96,188,255,192,49,74,0,109,4,0,0,111,167,10,254,91,218,135,255,203,66,173,255,150,194,226,0,201,253,6,255,174,102,121,0,205,191,110,0,53,194,4,0,81,40,45,254,35,102,143,255,12,108,198,255,16,27,232,255,252,71,186,1,176,110,114,0,142,3,117,1,113,77,142,0,19,156,197,1,92,47,252,0,53,232,22,1,54,18,235,0,46,35,189,255,236,212,129,0,2,96,208,254,200,238,199,255,59,175,164,255,146,43,231,0,194,217,52,255,3,223,12,0,138,54,178,254,85,235,207,0,232,207,34,0,49,52,50,255,166,113,89,255,10,45,216,255,62,173,28,0,111,165,246,0,118,115,91,255,128,84,60,0,167,144,203,0,87,13,243,0,22,30,228,1,177,113,146,255,129,170,230,254,252,153,129,255,145,225,43,0,70,231,5,255,122,105,126,254,86,246,148,255,110,37,154,254,209,3,91,0,68,145,62,0,228,16,165,255,55,221,249,254,178,210,91,0,83,146,226,254,69,146,186,0,93,210,104,254,16,25,173,0,231,186,38,0,189,122,140,255,251,13,112,255,105,110,93,0,251,72,170,0,192,23,223,255,24,3,202,1,225,93,228,0,153,147,199,254,109,170,22,0,248,101,246,255,178,124,12,255,178,254,102,254,55,4,65,0,125,214,180,0,183,96,147,0,45,117,23,254,132,191,249,0,143,176,203,254,136,183,54,255,146,234,177,0,146,101,86,255,44,123,143,1,33,209,152,0,192,90,41,254,83,15,125,255,213,172,82,0,215,169,144,0,16,13,34,0,32,209,100,255,84,18,249,1,197,17,236,255,217,186,230,0,49,160,176,255,111,118,97,255,237,104,235,0,79,59,92,254,69,249,11,255,35,172,74,1,19,118,68,0,222,124,165,255,180,66,35,255,86,174,246,0,43,74,111,255,126,144,86,255,228,234,91,0,242,213,24,254,69,44,235,255,220,180,35,0,8,248,7,255,102,47,92,255,240,205,102,255,113,230,171,1,31,185,201,255,194,246,70,255,122,17,187,0,134,70,199,255,149,3,150,255,117,63,103,0,65,104,123,255,212,54,19,1,6,141,88,0,83,134,243,255,136,53,103,0,169,27,180,0,177,49,24,0,111,54,167,0,195,61,215,255,31,1,108,1,60,42,70,0,185,3,162,255,194,149,40,255,246,127,38,254,190,119,38,255,61,119,8,1,96,161,219,255,42,203,221,1,177,242,164,255,245,159,10,0,116,196,0,0,5,93,205,254,128,127,179,0,125,237,246,255,149,162,217,255,87,37,20,254,140,238,192,0,9,9,193,0,97,1,226,0,29,38,10,0,0,136,63,255,229,72,210,254,38,134,92,255,78,218,208,1,104,36,84,255,12,5,193,255,242,175,61,255,191,169,46,1,179,147,147,255,113,190,139,254,125,172,31,0,3,75,252,254,215,36,15,0,193,27,24,1,255,69,149,255,110,129,118,0,203,93,249,0,138,137,64,254,38,70,6,0,153,116,222,0,161,74,123,0,193,99,79,255,118,59,94,255,61,12,43,1,146,177,157,0,46,147,191,0,16,255,38,0,11,51,31,1,60,58,98,255,111,194,77,1,154,91,244,0,140,40,144,1,173,10,251,0,203,209,50,254,108,130,78,0,228,180,90,0,174,7,250,0,31,174,60,0,41,171,30,0,116,99,82,255,118,193,139,255,187,173,198,254,218,111,56,0,185,123,216,0,249,158,52,0,52,180,93,255,201,9,91,255,56,45,166,254,132,155,203,255,58,232,110,0,52,211,89,255,253,0,162,1,9,87,183,0,145,136,44,1,94,122,245,0,85,188,171,1,147,92,198,0,0,8,104,0,30,95,174,0,221,230,52,1,247,247,235,255,137,174,53,255,35,21,204,255,71,227,214,1,232,82,194,0,11,48,227,255,170,73,184,255,198,251,252,254,44,112,34,0,131,101,131,255,72,168,187,0,132,135,125,255,138,104,97,255,238,184,168,255,243,104,84,255,135,216,226,255,139,144,237,0,188,137,150,1,80,56,140,255,86,169,167,255,194,78,25,255,220,17,180,255,17,13,193,0,117,137,212,255,141,224,151,0,49,244,175,0,193,99,175,255,19,99,154,1,255,65,62,255,156,210,55,255,242,244,3,255,250,14,149,0,158,88,217,255,157,207,134,254,251,232,28,0,46,156,251,255,171,56,184,255,239,51,234,0,142,138,131,255,25,254,243,1,10,201,194,0,63,97,75,0,210,239,162,0,192,200,31,1,117,214,243,0,24,71,222,254,54,40,232,255,76,183,111,254,144,14,87,255,214,79,136,255,216,196,212,0,132,27,140,254,131,5,253,0,124,108,19,255,28,215,75,0,76,222,55,254,233,182,63,0,68,171,191,254,52,111,222,255,10,105,77,255,80,170,235,0,143,24,88,255,45,231,121,0,148,129,224,1,61,246,84,0,253,46,219,255,239,76,33,0,49,148,18,254,230,37,69,0,67,134,22,254,142,155,94,0,31,157,211,254,213,42,30,255,4,228,247,254,252,176,13,255,39,0,31,254,241,244,255,255,170,45,10,254,253,222,249,0,222,114,132,0,255,47,6,255,180,163,179,1,84,94,151,255,89,209,82,254,229,52,169,255,213,236,0,1,214,56,228,255,135,119,151,255,112,201,193,0,83,160,53,254,6,151,66,0,18,162,17,0,233,97,91,0,131,5,78,1,181,120,53,255,117,95,63,255,237,117,185,0,191,126,136,255,144,119,233,0,183,57,97,1,47,201,187,255,167,165,119,1,45,100,126,0,21,98,6,254,145,150,95,255,120,54,152,0,209,98,104,0,143,111,30,254,184,148,249,0,235,216,46,0,248,202,148,255,57,95,22,0,242,225,163,0,233,247,232,255,71,171,19,255,103,244,49,255,84,103,93,255,68,121,244,1,82,224,13,0,41,79,43,255,249,206,167,255,215,52,21,254,192,32,22,255,247,111,60,0,101,74,38,255,22,91,84,254,29,28,13,255,198,231,215,254,244,154,200,0,223,137,237,0,211,132,14,0,95,64,206,255,17,62,247,255,233,131,121,1,93,23,77,0,205,204,52,254,81,189,136,0,180,219,138,1,143,18,94,0,204,43,140,254,188,175,219,0,111,98,143,255,151,63,162,255,211,50,71,254,19,146,53,0,146,45,83,254,178,82,238,255,16,133,84,255,226,198,93,255,201,97,20,255,120,118,35,255,114,50,231,255,162,229,156,255,211,26,12,0,114,39,115,255,206,212,134,0,197,217,160,255,116,129,94,254,199,215,219,255,75,223,249,1,253,116,181,255,232,215,104,255,228,130,246,255,185,117,86,0,14,5,8,0,239,29,61,1,237,87,133,255,125,146,137,254,204,168,223,0,46,168,245,0,154,105,22,0,220,212,161,255,107,69,24,255,137,218,181,255,241,84,198,255,130,122,211,255,141,8,153,255,190,177,118,0,96,89,178,0,255,16,48,254,122,96,105,255,117,54,232,255,34,126,105,255,204,67,166,0,232,52,138,255,211,147,12,0,25,54,7,0,44,15,215,254,51,236,45,0,190,68,129,1,106,147,225,0,28,93,45,254,236,141,15,255,17,61,161,0,220,115,192,0,236,145,24,254,111,168,169,0,224,58,63,255,127,164,188,0,82,234,75,1,224,158,134,0,209,68,110,1,217,166,217,0,70,225,166,1,187,193,143,255,16,7,88,255,10,205,140,0,117,192,156,1,17,56,38,0,27,124,108,1,171,215,55,255,95,253,212,0,155,135,168,255,246,178,153,254,154,68,74,0,232,61,96,254,105,132,59,0,33,76,199,1,189,176,130,255,9,104,25,254,75,198,102,255,233,1,112,0,108,220,20,255,114,230,70,0,140,194,133,255,57,158,164,254,146,6,80,255,169,196,97,1,85,183,130,0,70,158,222,1,59,237,234,255,96,25,26,255,232,175,97,255,11,121,248,254,88,35,194,0,219,180,252,254,74,8,227,0,195,227,73,1,184,110,161,255,49,233,164,1,128,53,47,0,82,14,121,255,193,190,58,0,48,174,117,255,132,23,32,0,40,10,134,1,22,51,25,255,240,11,176,255,110,57,146,0,117,143,239,1,157,101,118,255,54,84,76,0,205,184,18,255,47,4,72,255,78,112,85,255,193,50,66,1,93,16,52,255,8,105,134,0,12,109,72,255,58,156,251,0,144,35,204,0,44,160,117,254,50,107,194,0,1,68,165,255,111,110,162,0,158,83,40,254,76,214,234,0,58,216,205,255,171,96,147,255,40,227,114,1,176,227,241,0,70,249,183,1,136,84,139,255,60,122,247,254,143,9,117,255,177,174,137,254,73,247,143,0,236,185,126,255,62,25,247,255,45,64,56,255,161,244,6,0,34,57,56,1,105,202,83,0,128,147,208,0,6,103,10,255,74,138,65,255,97,80,100,255,214,174,33,255,50,134,74,255,110,151,130,254,111,84,172,0,84,199,75,254,248,59,112,255,8,216,178,1,9,183,95,0,238,27,8,254,170,205,220,0,195,229,135,0,98,76,237,255,226,91,26,1,82,219,39,255,225,190,199,1,217,200,121,255,81,179,8,255,140,65,206,0,178,207,87,254,250,252,46,255,104,89,110,1,253,189,158,255,144,214,158,255,160,245,54,255,53,183,92,1,21,200,194,255,146,33,113,1,209,1,255,0,235,106,43,255,167,52,232,0,157,229,221,0,51,30,25,0,250,221,27,1,65,147,87,255,79,123,196,0,65,196,223,255,76,44,17,1,85,241,68,0,202,183,249,255,65,212,212,255,9,33,154,1,71,59,80,0,175,194,59,255,141,72,9,0,100,160,244,0,230,208,56,0,59,25,75,254,80,194,194,0,18,3,200,254,160,159,115,0,132,143,247,1,111,93,57,255,58,237,11,1,134,222,135,255,122,163,108,1,123,43,190,255,251,189,206,254,80,182,72,255,208,246,224,1,17,60,9,0,161,207,38,0,141,109,91,0,216,15,211,255,136,78,110,0,98,163,104,255,21,80,121,255,173,178,183,1,127,143,4,0,104,60,82,254,214,16,13,255,96,238,33,1,158,148,230,255,127,129,62,255,51,255,210,255,62,141,236,254,157,55,224,255,114,39,244,0,192,188,250,255,228,76,53,0,98,84,81,255,173,203,61,254,147,50,55,255,204,235,191,0,52,197,244,0,88,43,211,254,27,191,119,0,188,231,154,0,66,81,161,0,92,193,160,1,250,227,120,0,123,55,226,0,184,17,72,0,133,168,10,254,22,135,156,255,41,25,103,255,48,202,58,0,186,149,81,255,188,134,239,0,235,181,189,254,217,139,188,255,74,48,82,0,46,218,229,0,189,253,251,0,50,229,12,255,211,141,191,1,128,244,25,255,169,231,122,254,86,47,189,255,132,183,23,255,37,178,150,255,51,137,253,0,200,78,31,0,22,105,50,0,130,60,0,0,132,163,91,254,23,231,187,0,192,79,239,0,157,102,164,255,192,82,20,1,24,181,103,255,240,9,234,0,1,123,164,255,133,233,0,255,202,242,242,0,60,186,245,0,241,16,199,255,224,116,158,254,191,125,91,255,224,86,207,0,121,37,231,255,227,9,198,255,15,153,239,255,121,232,217,254,75,112,82,0,95,12,57,254,51,214,105,255,148,220,97,1,199,98,36,0,156,209,12,254,10,212,52,0,217,180,55,254,212,170,232,255,216,20,84,255,157,250,135,0,157,99,127,254,1,206,41,0,149,36,70,1,54,196,201,255,87,116,0,254,235,171,150,0,27,163,234,0,202,135,180,0,208,95,0,254,123,156,93,0,183,62,75,0,137,235,182,0,204,225,255,255,214,139,210,255,2,115,8,255,29,12,111,0,52,156,1,0,253,21,251,255,37,165,31,254,12,130,211,0,106,18,53,254,42,99,154,0,14,217,61,254,216,11,92,255,200,197,112,254,147,38,199,0,36,252,120,254,107,169,77,0,1,123,159,255,207,75,102,0,163,175,196,0,44,1,240,0,120,186,176,254,13,98,76,255,237,124,241,255,232,146,188,255,200,96,224,0,204,31,41,0,208,200,13,0,21,225,96,255,175,156,196,0,247,208,126,0,62,184,244,254,2,171,81,0,85,115,158,0,54,64,45,255,19,138,114,0,135,71,205,0,227,47,147,1,218,231,66,0,253,209,28,0,244,15,173,255,6,15,118,254,16,150,208,255,185,22,50,255,86,112,207,255,75,113,215,1,63,146,43,255,4,225,19,254,227,23,62,255,14,255,214,254,45,8,205,255,87,197,151,254,210,82,215,255,245,248,247,255,128,248,70,0,225,247,87,0,90,120,70,0,213,245,92,0,13,133,226,0,47,181,5,1,92,163,105,255,6,30,133,254,232,178,61,255,230,149,24,255,18,49,158,0,228,100,61,254,116,243,251,255,77,75,92,1,81,219,147,255,76,163,254,254,141,213,246,0,232,37,152,254,97,44,100,0,201,37,50,1,212,244,57,0,174,171,183,255,249,74,112,0,166,156,30,0,222,221,97,255,243,93,73,254,251,101,100,255,216,217,93,255,254,138,187,255,142,190,52,255,59,203,177,255,200,94,52,0,115,114,158,255,165,152,104,1,126,99,226,255,118,157,244,1,107,200,16,0,193,90,229,0,121,6,88,0,156,32,93,254,125,241,211,255,14,237,157,255,165,154,21,255,184,224,22,255,250,24,152,255,113,77,31,0,247,171,23,255,237,177,204,255,52,137,145,255,194,182,114,0,224,234,149,0,10,111,103,1,201,129,4,0,238,142,78,0,52,6,40,255,110,213,165,254,60,207,253,0,62,215,69,0,96,97,0,255,49,45,202,0,120,121,22,255,235,139,48,1,198,45,34,255,182,50,27,1,131,210,91,255,46,54,128,0,175,123,105,255,198,141,78,254,67,244,239,255,245,54,103,254,78,38,242,255,2,92,249,254,251,174,87,255,139,63,144,0,24,108,27,255,34,102,18,1,34,22,152,0,66,229,118,254,50,143,99,0,144,169,149,1,118,30,152,0,178,8,121,1,8,159,18,0,90,101,230,255,129,29,119,0,68,36,11,1,232,183,55,0,23,255,96,255,161,41,193,255,63,139,222,0,15,179,243,0,255,100,15,255,82,53,135,0,137,57,149,1,99,240,170,255,22,230,228,254,49,180,82,255,61,82,43,0,110,245,217,0,199,125,61,0,46,253,52,0,141,197,219,0,211,159,193,0,55,121,105,254,183,20,129,0,169,119,170,255,203,178,139,255,135,40,182,255,172,13,202,255,65,178,148,0,8,207,43,0,122,53,127,1,74,161,48,0,227,214,128,254,86,11,243,255,100,86,7,1,245,68,134,255,61,43,21,1,152,84,94,255,190,60,250,254,239,118,232,255,214,136,37,1,113,76,107,255,93,104,100,1,144,206,23,255,110,150,154,1,228,103,185,0,218,49,50,254,135,77,139,255,185,1,78,0,0,161,148,255,97,29,233,255,207,148,149,255,160,168,0,0,91,128,171,255,6,28,19,254,11,111,247,0,39,187,150,255,138,232,149,0,117,62,68,255,63,216,188,255,235,234,32,254,29,57,160,255,25,12,241,1,169,60,191,0,32,131,141,255,237,159,123,255,94,197,94,254,116,254,3,255,92,179,97,254,121,97,92,255,170,112,14,0,21,149,248,0,248,227,3,0,80,96,109,0,75,192,74,1,12,90,226,255,161,106,68,1,208,114,127,255,114,42,255,254,74,26,74,255,247,179,150,254,121,140,60,0,147,70,200,255,214,40,161,255,161,188,201,255,141,65,135,255,242,115,252,0,62,47,202,0,180,149,255,254,130,55,237,0,165,17,186,255,10,169,194,0,156,109,218,255,112,140,123,255,104,128,223,254,177,142,108,255,121,37,219,255,128,77,18,255,111,108,23,1,91,192,75,0,174,245,22,255,4,236,62,255,43,64,153,1,227,173,254,0,237,122,132,1,127,89,186,255,142,82,128,254,252,84,174,0,90,179,177,1,243,214,87,255,103,60,162,255,208,130,14,255,11,130,139,0,206,129,219,255,94,217,157,255,239,230,230,255,116,115,159,254,164,107,95,0,51,218,2,1,216,125,198,255,140,202,128,254,11,95,68,255,55,9,93,254,174,153,6,255,204,172,96,0,69,160,110,0,213,38,49,254,27,80,213,0,118,125,114,0,70,70,67,255,15,142,73,255,131,122,185,255,243,20,50,254,130,237,40,0,210,159,140,1,197,151,65,255,84,153,66,0,195,126,90,0,16,238,236,1,118,187,102,255,3,24,133,255,187,69,230,0,56,197,92,1,213,69,94,255,80,138,229,1,206,7,230,0,222,111,230,1,91,233,119,255,9,89,7,1,2,98,1,0,148,74,133,255,51,246,180,255,228,177,112,1,58,189,108,255,194,203,237,254,21,209,195,0,147,10,35,1,86,157,226,0,31,163,139,254,56,7,75,255,62,90,116,0,181,60,169,0,138,162,212,254,81,167,31,0,205,90,112,255,33,112,227,0,83,151,117,1,177,224,73,255,174,144,217,255,230,204,79,255,22,77,232,255,114,78,234,0,224,57,126,254,9,49,141,0,242,147,165,1,104,182,140,255,167,132,12,1,123,68,127,0,225,87,39,1,251,108,8,0,198,193,143,1,121,135,207,255,172,22,70,0,50,68,116,255,101,175,40,255,248,105,233,0,166,203,7,0,110,197,218,0,215,254,26,254,168,226,253,0,31,143,96,0,11,103,41,0,183,129,203,254,100,247,74,255,213,126,132,0,210,147,44,0,199,234,27,1,148,47,181,0,155,91,158,1,54,105,175,255,2,78,145,254,102,154,95,0,128,207,127,254,52,124,236,255,130,84,71,0,221,243,211,0,152,170,207,0,222,106,199,0,183,84,94,254,92,200,56,255,138,182,115,1,142,96,146,0,133,136,228,0,97,18,150,0,55,251,66,0,140,102,4,0,202,103,151,0,30,19,248,255,51,184,207,0,202,198,89,0,55,197,225,254,169,95,249,255,66,65,68,255,188,234,126,0,166,223,100,1,112,239,244,0,144,23,194,0,58,39,182,0,244,44,24,254,175,68,179,255,152,118,154,1,176,162,130,0,217,114,204,254,173,126,78,255,33,222,30,255,36,2,91,255,2,143,243,0,9,235,215,0,3,171,151,1,24,215,245,255,168,47,164,254,241,146,207,0,69,129,180,0,68,243,113,0,144,53,72,254,251,45,14,0,23,110,168,0,68,68,79,255,110,70,95,254,174,91,144,255,33,206,95,255,137,41,7,255,19,187,153,254,35,255,112,255,9,145,185,254,50,157,37,0,11,112,49,1,102,8,190,255,234,243,169,1,60,85,23,0,74,39,189,0,116,49,239,0,173,213,210,0,46,161,108,255,159,150,37,0,196,120,185,255,34,98,6,255,153,195,62,255,97,230,71,255,102,61,76,0,26,212,236,255,164,97,16,0,198,59,146,0,163,23,196,0,56,24,61,0,181,98,193,0,251,147,229,255,98,189,24,255,46,54,206,255,234,82,246,0,183,103,38,1,109,62,204,0,10,240,224,0,146,22,117,255,142,154,120,0,69,212,35,0,208,99,118,1,121,255,3,255,72,6,194,0,117,17,197,255,125,15,23,0,154,79,153,0,214,94,197,255,185,55,147,255,62,254,78,254,127,82,153,0,110,102,63,255,108,82,161,255,105,187,212,1,80,138,39,0,60,255,93,255,72,12,186,0,210,251,31,1,190,167,144,255,228,44,19,254,128,67,232,0,214,249,107,254,136,145,86,255,132,46,176,0,189,187,227,255,208,22,140,0,217,211,116,0,50,81,186,254,139,250,31,0,30,64,198,1,135,155,100,0,160,206,23,254,187,162,211,255,16,188,63,0,254,208,49,0,85,84,191,0,241,192,242,255,153,126,145,1,234,162,162,255,230,97,216,1,64,135,126,0,190,148,223,1,52,0,43,255,28,39,189,1,64,136,238,0,175,196,185,0,98,226,213,255,127,159,244,1,226,175,60,0,160,233,142,1,180,243,207,255,69,152,89,1,31,101,21,0,144,25,164,254,139,191,209,0,91,25,121,0,32,147,5,0,39,186,123,255,63,115,230,255,93,167,198,255,143,213,220,255,179,156,19,255,25,66,122,0,214,160,217,255,2,45,62,255,106,79,146,254,51,137,99,255,87,100,231,255,175,145,232,255,101,184,1,255,174,9,125,0,82,37,161,1,36,114,141,255,48,222,142,255,245,186,154,0,5,174,221,254,63,114,155,255,135,55,160,1,80,31,135,0,126,250,179,1,236,218,45,0,20,28,145,1,16,147,73,0,249,189,132,1,17,189,192,255,223,142,198,255,72,20,15,255,250,53,237,254,15,11,18,0,27,211,113,254,213,107,56,255,174,147,146,255,96,126,48,0,23,193,109,1,37,162,94,0,199,157,249,254,24,128,187,255,205,49,178,254,93,164,42,255,43,119,235,1,88,183,237,255,218,210,1,255,107,254,42,0,230,10,99,255,162,0,226,0,219,237,91,0,129,178,203,0,208,50,95,254,206,208,95,255,247,191,89,254,110,234,79,255,165,61,243,0,20,122,112,255,246,246,185,254,103,4,123,0,233,99,230,1,219,91,252,255,199,222,22,255,179,245,233,255,211,241,234,0,111,250,192,255,85,84,136,0,101,58,50,255,131,173,156,254,119,45,51,255,118,233,16,254,242,90,214,0,94,159,219,1,3,3,234,255,98,76,92,254,80,54,230,0,5,228,231,254,53,24,223,255,113,56,118,1,20,132,1,255,171,210,236,0,56,241,158,255,186,115,19,255,8,229,174,0,48,44,0,1,114,114,166,255,6,73,226,255,205,89,244,0,137,227,75,1,248,173,56,0,74,120,246,254,119,3,11,255,81,120,198,255,136,122,98,255,146,241,221,1,109,194,78,255,223,241,70,1,214,200,169,255,97,190,47,255,47,103,174,255,99,92,72,254,118,233,180,255,193,35,233,254,26,229,32,255,222,252,198,0,204,43,71,255,199,84,172,0,134,102,190,0,111,238,97,254,230,40,230,0,227,205,64,254,200,12,225,0,166,25,222,0,113,69,51,255,143,159,24,0,167,184,74,0,29,224,116,254,158,208,233,0,193,116,126,255,212,11,133,255,22,58,140,1,204,36,51,255,232,30,43,0,235,70,181,255,64,56,146,254,169,18,84,255,226,1,13,255,200,50,176,255,52,213,245,254,168,209,97,0,191,71,55,0,34,78,156,0,232,144,58,1,185,74,189,0,186,142,149,254,64,69,127,255,161,203,147,255,176,151,191,0,136,231,203,254,163,182,137,0,161,126,251,254,233,32,66,0,68,207,66,0,30,28,37,0,93,114,96,1,254,92,247,255,44,171,69,0,202,119,11,255,188,118,50,1,255,83,136,255,71,82,26,0,70,227,2,0,32,235,121,1,181,41,154,0,71,134,229,254,202,255,36,0,41,152,5,0,154,63,73,255,34,182,124,0,121,221,150,255,26,204,213,1,41,172,87,0,90,157,146,255,109,130,20,0,71,107,200,255,243,102,189,0,1,195,145,254,46,88,117,0,8,206,227,0,191,110,253,255,109,128,20,254,134,85,51,255,137,177,112,1,216,34,22,255,131,16,208,255,121,149,170,0,114,19,23,1,166,80,31,255,113,240,122,0,232,179,250,0,68,110,180,254,210,170,119,0,223,108,164,255,207,79,233,255,27,229,226,254,209,98,81,255,79,68,7,0,131,185,100,0,170,29,162,255,17,162,107,255,57,21,11,1,100,200,181,255,127,65,166,1,165,134,204,0,104,167,168,0,1,164,79,0,146,135,59,1,70,50,128,255,102,119,13,254,227,6,135,0,162,142,179,255,160,100,222,0,27,224,219,1,158,93,195,255,234,141,137,0,16,24,125,255,238,206,47,255,97,17,98,255,116,110,12,255,96,115,77,0,91,227,232,255,248,254,79,255,92,229,6,254,88,198,139,0,206,75,129,0,250,77,206,255,141,244,123,1,138,69,220,0,32,151,6,1,131,167,22,255,237,68,167,254,199,189,150,0,163,171,138,255,51,188,6,255,95,29,137,254,148,226,179,0,181,107,208,255,134,31,82,255,151,101,45,255,129,202,225,0,224,72,147,0,48,138,151,255,195,64,206,254,237,218,158,0,106,29,137,254,253,189,233,255,103,15,17,255,194,97,255,0,178,45,169,254,198,225,155,0,39,48,117,255,135,106,115,0,97,38,181,0,150,47,65,255,83,130,229,254,246,38,129,0,92,239,154,254,91,99,127,0,161,111,33,255,238,217,242,255,131,185,195,255,213,191,158,255,41,150,218,0,132,169,131,0,89,84,252,1,171,70,128,255,163,248,203,254,1,50,180,255,124,76,85,1,251,111,80,0,99,66,239,255,154,237,182,255,221,126,133,254,74,204,99,255,65,147,119,255,99,56,167,255,79,248,149,255,116,155,228,255,237,43,14,254,69,137,11,255,22,250,241,1,91,122,143,255,205,249,243,0,212,26,60,255,48,182,176,1,48,23,191,255,203,121,152,254,45,74,213,255,62,90,18,254,245,163,230,255,185,106,116,255,83,35,159,0,12,33,2,255,80,34,62,0,16,87,174,255,173,101,85,0,202,36,81,254,160,69,204,255,64,225,187,0,58,206,94,0,86,144,47,0,229,86,245,0,63,145,190,1,37,5,39,0,109,251,26,0,137,147,234,0,162,121,145,255,144,116,206,255,197,232,185,255,183,190,140,255,73,12,254,255,139,20,242,255,170,90,239,255,97,66,187,255,245,181,135,254,222,136,52,0,245,5,51,254,203,47,78,0,152,101,216,0,73,23,125,0,254,96,33,1,235,210,73,255,43,209,88,1,7,129,109,0,122,104,228,254,170,242,203,0,242,204,135,255,202,28,233,255,65,6,127,0,159,144,71,0,100,140,95,0,78,150,13,0,251,107,118,1,182,58,125,255,1,38,108,255,141,189,209,255,8,155,125,1,113,163,91,255,121,79,190,255,134,239,108,255,76,47,248,0,163,228,239,0,17,111,10,0,88,149,75,255,215,235,239,0,167,159,24,255,47,151,108,255,107,209,188,0,233,231,99,254,28,202,148,255,174,35,138,255,110,24,68,255,2,69,181,0,107,102,82,0,102,237,7,0,92,36,237,255,221,162,83,1,55,202,6,255,135,234,135,255,24,250,222,0,65,94,168,254,245,248,210,255,167,108,201,254,255,161,111,0,205,8,254,0,136,13,116,0,100,176,132,255,43,215,126,255,177,133,130,255,158,79,148,0,67,224,37,1,12,206,21,255,62,34,110,1,237,104,175,255,80,132,111,255,142,174,72,0,84,229,180,254,105,179,140,0,64,248,15,255,233,138,16,0,245,67,123,254,218,121,212,255,63,95,218,1,213,133,137,255,143,182,82,255,48,28,11,0,244,114,141,1,209,175,76,255,157,181,150,255,186,229,3,255,164,157,111,1,231,189,139,0,119,202,190,255,218,106,64,255,68,235,63,254,96,26,172,255,187,47,11,1,215,18,251,255,81,84,89,0,68,58,128,0,94,113,5,1,92,129,208,255,97,15,83,254,9,28,188,0,239,9,164,0,60,205,152,0,192,163,98,255,184,18,60,0,217,182,139,0,109,59,120,255,4,192,251,0,169,210,240,255,37,172,92,254,148,211,245,255,179,65,52,0,253,13,115,0,185,174,206,1,114,188,149,255,237,90,173,0,43,199,192,255,88,108,113,0,52,35,76,0,66,25,148,255,221,4,7,255,151,241,114,255,190,209,232,0,98,50,199,0,151,150,213,255,18,74,36,1,53,40,7,0,19,135,65,255,26,172,69,0,174,237,85,0,99,95,41,0,3,56,16,0,39,160,177,255,200,106,218,254,185,68,84,255,91,186,61,254,67,143,141,255,13,244,166,255,99,114,198,0,199,110,163,255,193,18,186,0,124,239,246,1,110,68,22,0,2,235,46,1,212,60,107,0,105,42,105,1,14,230,152,0,7,5,131,0,141,104,154,255,213,3,6,0,131,228,162,255,179,100,28,1,231,123,85,255,206,14,223,1,253,96,230,0,38,152,149,1,98,137,122,0,214,205,3,255,226,152,179,255,6,133,137,0,158,69,140,255,113,162,154,255,180,243,172,255,27,189,115,255,143,46,220,255,213,134,225,255,126,29,69,0,188,43,137,1,242,70,9,0,90,204,255,255,231,170,147,0,23,56,19,254,56,125,157,255,48,179,218,255,79,182,253,255,38,212,191,1,41,235,124,0,96,151,28,0,135,148,190,0,205,249,39,254,52,96,136,255,212,44,136,255,67,209,131,255,252,130,23,255,219,128,20,255,198,129,118,0,108,101,11,0,178,5,146,1,62,7,100,255,181,236,94,254,28,26,164,0,76,22,112,255,120,102,79,0,202,192,229,1,200,176,215,0,41,64,244,255,206,184,78,0,167,45,63,1,160,35,0,255,59,12,142,255,204,9,144,255,219,94,229,1,122,27,112,0,189,105,109,255,64,208,74,255,251,127,55,1,2,226,198,0,44,76,209,0,151,152,77,255,210,23,46,1,201,171,69,255,44,211,231,0,190,37,224,255,245,196,62,255,169,181,222,255,34,211,17,0,119,241,197,255,229,35,152,1,21,69,40,255,178,226,161,0,148,179,193,0,219,194,254,1,40,206,51,255,231,92,250,1,67,153,170,0,21,148,241,0,170,69,82,255,121,18,231,255,92,114,3,0,184,62,230,0,225,201,87,255,146,96,162,255,181,242,220,0,173,187,221,1,226,62,170,255,56,126,217,1,117,13,227,255,179,44,239,0,157,141,155,255,144,221,83,0,235,209,208,0,42,17,165,1,251,81,133,0,124,245,201,254,97,211,24,255,83,214,166,0,154,36,9,255,248,47,127,0,90,219,140,255,161,217,38,254,212,147,63,255,66,84,148,1,207,3,1,0,230,134,89,1,127,78,122,255,224,155,1,255,82,136,74,0,178,156,208,255,186,25,49,255,222,3,210,1,229,150,190,255,85,162,52,255,41,84,141,255,73,123,84,254,93,17,150,0,119,19,28,1,32,22,215,255,28,23,204,255,142,241,52,255,228,52,125,0,29,76,207,0,215,167,250,254,175,164,230,0,55,207,105,1,109,187,245,255,161,44,220,1,41,101,128,255,167,16,94,0,93,214,107,255,118,72,0,254,80,61,234,255,121,175,125,0,139,169,251,0,97,39,147,254,250,196,49,255,165,179,110,254,223,70,187,255,22,142,125,1,154,179,138,255,118,176,42,1,10,174,153,0,156,92,102,0,168,13,161,255,143,16,32,0,250,197,180,255,203,163,44,1,87,32,36,0,161,153,20,255,123,252,15,0,25,227,80,0,60,88,142,0,17,22,201,1,154,205,77,255,39,63,47,0,8,122,141,0,128,23,182,254,204,39,19,255,4,112,29,255,23,36,140,255,210,234,116,254,53,50,63,255,121,171,104,255,160,219,94,0,87,82,14,254,231,42,5,0,165,139,127,254,86,78,38,0,130,60,66,254,203,30,45,255,46,196,122,1,249,53,162,255,136,143,103,254,215,210,114,0,231,7,160,254,169,152,42,255,111,45,246,0,142,131,135,255,131,71,204,255,36,226,11,0,0,28,242,255,225,138,213,255,247,46,216,254,245,3,183,0,108,252,74,1,206,26,48,255,205,54,246,255,211,198,36,255,121,35,50,0,52,216,202,255,38,139,129,254,242,73,148,0,67,231,141,255,42,47,204,0,78,116,25,1,4,225,191,255,6,147,228,0,58,88,177,0,122,165,229,255,252,83,201,255,224,167,96,1,177,184,158,255,242,105,179,1,248,198,240,0,133,66,203,1,254,36,47,0,45,24,115,255,119,62,254,0,196,225,186,254,123,141,172,0,26,85,41,255,226,111,183,0,213,231,151,0,4,59,7,255,238,138,148,0,66,147,33,255,31,246,141,255,209,141,116,255,104,112,31,0,88,161,172,0,83,215,230,254,47,111,151,0,45,38,52,1,132,45,204,0,138,128,109,254,233,117,134,255,243,190,173,254,241,236,240,0,82,127,236,254,40,223,161,255,110,182,225,255,123,174,239,0,135,242,145,1,51,209,154,0,150,3,115,254,217,164,252,255,55,156,69,1,84,94,255,255,232,73,45,1,20,19,212,255,96,197,59,254,96,251,33,0,38,199,73,1,64,172,247,255,117,116,56,255,228,17,18,0,62,138,103,1,246,229,164,255,244,118,201,254,86,32,159,255,109,34,137,1,85,211,186,0,10,193,193,254,122,194,177,0,122,238,102,255,162,218,171,0,108,217,161,1,158,170,34,0,176,47,155,1,181,228,11,255,8,156,0,0,16,75,93,0,206,98,255,1,58,154,35,0,12,243,184,254,67,117,66,255,230,229,123,0,201,42,110,0,134,228,178,254,186,108,118,255,58,19,154,255,82,169,62,255,114,143,115,1,239,196,50,255,173,48,193,255,147,2,84,255,150,134,147,254,95,232,73,0,109,227,52,254,191,137,10,0,40,204,30,254,76,52,97,255,164,235,126,0,254,124,188,0,74,182,21,1,121,29,35,255,241,30,7,254,85,218,214,255,7,84,150,254,81,27,117,255,160,159,152,254,66,24,221,255,227,10,60,1,141,135,102,0,208,189,150,1,117,179,92,0,132,22,136,255,120,199,28,0,21,129,79,254,182,9,65,0,218,163,169,0,246,147,198,255,107,38,144,1,78,175,205,255,214,5,250,254,47,88,29,255,164,47,204,255,43,55,6,255,131,134,207,254,116,100,214,0,96,140,75,1,106,220,144,0,195,32,28,1,172,81,5,255,199,179,52,255,37,84,203,0,170,112,174,0,11,4,91,0,69,244,27,1,117,131,92,0,33,152,175,255,140,153,107,255,251,135,43,254,87,138,4,255,198,234,147,254,121,152,84,255,205,101,155,1,157,9,25,0,72,106,17,254,108,153,0,255,189,229,186,0,193,8,176,255,174,149,209,0,238,130,29,0,233,214,126,1,61,226,102,0,57,163,4,1,198,111,51,255,45,79,78,1,115,210,10,255,218,9,25,255,158,139,198,255,211,82,187,254,80,133,83,0,157,129,230,1,243,133,134,255,40,136,16,0,77,107,79,255,183,85,92,1,177,204,202,0,163,71,147,255,152,69,190,0,172,51,188,1,250,210,172,255,211,242,113,1,89,89,26,255,64,66,111,254,116,152,42,0,161,39,27,255,54,80,254,0,106,209,115,1,103,124,97,0,221,230,98,255,31,231,6,0,178,192,120,254,15,217,203,255,124,158,79,0,112,145,247,0,92,250,48,1,163,181,193,255,37,47,142,254,144,189,165,255,46,146,240,0,6,75,128,0,41,157,200,254,87,121,213,0,1,113,236,0,5,45,250,0,144,12,82,0,31,108,231,0,225,239,119,255,167,7,189,255,187,228,132,255,110,189,34,0,94,44,204,1,162,52,197,0,78,188,241,254,57,20,141,0,244,146,47,1,206,100,51,0,125,107,148,254,27,195,77,0,152,253,90,1,7,143,144,255,51,37,31,0,34,119,38,255,7,197,118,0,153,188,211,0,151,20,116,254,245,65,52,255,180,253,110,1,47,177,209,0,161,99,17,255,118,222,202,0,125,179,252,1,123,54,126,255,145,57,191,0,55,186,121,0,10,243,138,0,205,211,229,255,125,156,241,254,148,156,185,255,227,19,188,255,124,41,32,255,31,34,206,254,17,57,83,0,204,22,37,255,42,96,98,0,119,102,184,1,3,190,28,0,110,82,218,255,200,204,192,255,201,145,118,0,117,204,146,0,132,32,98,1,192,194,121,0,106,161,248,1,237,88,124,0,23,212,26,0,205,171,90,255,248,48,216,1,141,37,230,255,124,203,0,254,158,168,30,255,214,248,21,0,112,187,7,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+20480); -/* memory initializer */ allocate([75,133,239,255,74,227,243,255,250,147,70,0,214,120,162,0,167,9,179,255,22,158,18,0,218,77,209,1,97,109,81,255,244,33,179,255,57,52,57,255,65,172,210,255,249,71,209,255,142,169,238,0,158,189,153,255,174,254,103,254,98,33,14,0,141,76,230,255,113,139,52,255,15,58,212,0,168,215,201,255,248,204,215,1,223,68,160,255,57,154,183,254,47,231,121,0,106,166,137,0,81,136,138,0,165,43,51,0,231,139,61,0,57,95,59,254,118,98,25,255,151,63,236,1,94,190,250,255,169,185,114,1,5,250,58,255,75,105,97,1,215,223,134,0,113,99,163,1,128,62,112,0,99,106,147,0,163,195,10,0,33,205,182,0,214,14,174,255,129,38,231,255,53,182,223,0,98,42,159,255,247,13,40,0,188,210,177,1,6,21,0,255,255,61,148,254,137,45,129,255,89,26,116,254,126,38,114,0,251,50,242,254,121,134,128,255,204,249,167,254,165,235,215,0,202,177,243,0,133,141,62,0,240,130,190,1,110,175,255,0,0,20,146,1,37,210,121,255,7,39,130,0,142,250,84,255,141,200,207,0,9,95,104,255,11,244,174,0,134,232,126,0,167,1,123,254,16,193,149,255,232,233,239,1,213,70,112,255,252,116,160,254,242,222,220,255,205,85,227,0,7,185,58,0,118,247,63,1,116,77,177,255,62,245,200,254,63,18,37,255,107,53,232,254,50,221,211,0,162,219,7,254,2,94,43,0,182,62,182,254,160,78,200,255,135,140,170,0,235,184,228,0,175,53,138,254,80,58,77,255,152,201,2,1,63,196,34,0,5,30,184,0,171,176,154,0,121,59,206,0,38,99,39,0,172,80,77,254,0,134,151,0,186,33,241,254,94,253,223,255,44,114,252,0,108,126,57,255,201,40,13,255,39,229,27,255,39,239,23,1,151,121,51,255,153,150,248,0,10,234,174,255,118,246,4,254,200,245,38,0,69,161,242,1,16,178,150,0,113,56,130,0,171,31,105,0,26,88,108,255,49,42,106,0,251,169,66,0,69,93,149,0,20,57,254,0,164,25,111,0,90,188,90,255,204,4,197,0,40,213,50,1,212,96,132,255,88,138,180,254,228,146,124,255,184,246,247,0,65,117,86,255,253,102,210,254,254,121,36,0,137,115,3,255,60,24,216,0,134,18,29,0,59,226,97,0,176,142,71,0,7,209,161,0,189,84,51,254,155,250,72,0,213,84,235,255,45,222,224,0,238,148,143,255,170,42,53,255,78,167,117,0,186,0,40,255,125,177,103,255,69,225,66,0,227,7,88,1,75,172,6,0,169,45,227,1,16,36,70,255,50,2,9,255,139,193,22,0,143,183,231,254,218,69,50,0,236,56,161,1,213,131,42,0,138,145,44,254,136,229,40,255,49,63,35,255,61,145,245,255,101,192,2,254,232,167,113,0,152,104,38,1,121,185,218,0,121,139,211,254,119,240,35,0,65,189,217,254,187,179,162,255,160,187,230,0,62,248,14,255,60,78,97,0,255,247,163,255,225,59,91,255,107,71,58,255,241,47,33,1,50,117,236,0,219,177,63,254,244,90,179,0,35,194,215,255,189,67,50,255,23,135,129,0,104,189,37,255,185,57,194,0,35,62,231,255,220,248,108,0,12,231,178,0,143,80,91,1,131,93,101,255,144,39,2,1,255,250,178,0,5,17,236,254,139,32,46,0,204,188,38,254,245,115,52,255,191,113,73,254,191,108,69,255,22,69,245,1,23,203,178,0,170,99,170,0,65,248,111,0,37,108,153,255,64,37,69,0,0,88,62,254,89,148,144,255,191,68,224,1,241,39,53,0,41,203,237,255,145,126,194,255,221,42,253,255,25,99,151,0,97,253,223,1,74,115,49,255,6,175,72,255,59,176,203,0,124,183,249,1,228,228,99,0,129,12,207,254,168,192,195,255,204,176,16,254,152,234,171,0,77,37,85,255,33,120,135,255,142,194,227,1,31,214,58,0,213,187,125,255,232,46,60,255,190,116,42,254,151,178,19,255,51,62,237,254,204,236,193,0,194,232,60,0,172,34,157,255,189,16,184,254,103,3,95,255,141,233,36,254,41,25,11,255,21,195,166,0,118,245,45,0,67,213,149,255,159,12,18,255,187,164,227,1,160,25,5,0,12,78,195,1,43,197,225,0,48,142,41,254,196,155,60,255,223,199,18,1,145,136,156,0,252,117,169,254,145,226,238,0,239,23,107,0,109,181,188,255,230,112,49,254,73,170,237,255,231,183,227,255,80,220,20,0,194,107,127,1,127,205,101,0,46,52,197,1,210,171,36,255,88,3,90,255,56,151,141,0,96,187,255,255,42,78,200,0,254,70,70,1,244,125,168,0,204,68,138,1,124,215,70,0,102,66,200,254,17,52,228,0,117,220,143,254,203,248,123,0,56,18,174,255,186,151,164,255,51,232,208,1,160,228,43,255,249,29,25,1,68,190,63,0,8,201,188,243,103,230,9,106,59,167,202,132,133,174,103,187,43,248,148,254,114,243,110,60,241,54,29,95,58,245,79,165,209,130,230,173,127,82,14,81,31,108,62,43,140,104,5,155,107,189,65,251,171,217,131,31,121,33,126,19,25,205,224,91,34,174,40,215,152,47,138,66,205,101,239,35,145,68,55,113,47,59,77,236,207,251,192,181,188,219,137,129,165,219,181,233,56,181,72,243,91,194,86,57,25,208,5,182,241,17,241,89,155,79,25,175,164,130,63,146,24,129,109,218,213,94,28,171,66,2,3,163,152,170,7,216,190,111,112,69,1,91,131,18,140,178,228,78,190,133,49,36,226,180,255,213,195,125,12,85,111,137,123,242,116,93,190,114,177,150,22,59,254,177,222,128,53,18,199,37,167,6,220,155,148,38,105,207,116,241,155,193,210,74,241,158,193,105,155,228,227,37,79,56,134,71,190,239,181,213,140,139,198,157,193,15,101,156,172,119,204,161,12,36,117,2,43,89,111,44,233,45,131,228,166,110,170,132,116,74,212,251,65,189,220,169,176,92,181,83,17,131,218,136,249,118,171,223,102,238,82,81,62,152,16,50,180,45,109,198,49,168,63,33,251,152,200,39,3,176,228,14,239,190,199,127,89,191,194,143,168,61,243,11,224,198,37,167,10,147,71,145,167,213,111,130,3,224,81,99,202,6,112,110,14,10,103,41,41,20,252,47,210,70,133,10,183,39,38,201,38,92,56,33,27,46,237,42,196,90,252,109,44,77,223,179,149,157,19,13,56,83,222,99,175,139,84,115,10,101,168,178,119,60,187,10,106,118,230,174,237,71,46,201,194,129,59,53,130,20,133,44,114,146,100,3,241,76,161,232,191,162,1,48,66,188,75,102,26,168,145,151,248,208,112,139,75,194,48,190,84,6,163,81,108,199,24,82,239,214,25,232,146,209,16,169,101,85,36,6,153,214,42,32,113,87,133,53,14,244,184,209,187,50,112,160,106,16,200,208,210,184,22,193,164,25,83,171,65,81,8,108,55,30,153,235,142,223,76,119,72,39,168,72,155,225,181,188,176,52,99,90,201,197,179,12,28,57,203,138,65,227,74,170,216,78,115,227,99,119,79,202,156,91,163,184,178,214,243,111,46,104,252,178,239,93,238,130,143,116,96,47,23,67,111,99,165,120,114,171,240,161,20,120,200,132,236,57,100,26,8,2,199,140,40,30,99,35,250,255,190,144,233,189,130,222,235,108,80,164,21,121,198,178,247,163,249,190,43,83,114,227,242,120,113,198,156,97,38,234,206,62,39,202,7,194,192,33,199,184,134,209,30,235,224,205,214,125,218,234,120,209,110,238,127,79,125,245,186,111,23,114,170,103,240,6,166,152,200,162,197,125,99,10,174,13,249,190,4,152,63,17,27,71,28,19,53,11,113,27,132,125,4,35,245,119,219,40,147,36,199,64,123,171,202,50,188,190,201,21,10,190,158,60,76,13,16,156,196,103,29,67,182,66,62,203,190,212,197,76,42,126,101,252,156,41,127,89,236,250,214,58,171,111,203,95,23,88,71,74,140,25,68,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+30720); +/* memory initializer */ allocate([8,201,188,243,103,230,9,106,59,167,202,132,133,174,103,187,43,248,148,254,114,243,110,60,241,54,29,95,58,245,79,165,209,130,230,173,127,82,14,81,31,108,62,43,140,104,5,155,107,189,65,251,171,217,131,31,121,33,126,19,25,205,224,91,34,174,40,215,152,47,138,66,205,101,239,35,145,68,55,113,47,59,77,236,207,251,192,181,188,219,137,129,165,219,181,233,56,181,72,243,91,194,86,57,25,208,5,182,241,17,241,89,155,79,25,175,164,130,63,146,24,129,109,218,213,94,28,171,66,2,3,163,152,170,7,216,190,111,112,69,1,91,131,18,140,178,228,78,190,133,49,36,226,180,255,213,195,125,12,85,111,137,123,242,116,93,190,114,177,150,22,59,254,177,222,128,53,18,199,37,167,6,220,155,148,38,105,207,116,241,155,193,210,74,241,158,193,105,155,228,227,37,79,56,134,71,190,239,181,213,140,139,198,157,193,15,101,156,172,119,204,161,12,36,117,2,43,89,111,44,233,45,131,228,166,110,170,132,116,74,212,251,65,189,220,169,176,92,181,83,17,131,218,136,249,118,171,223,102,238,82,81,62,152,16,50,180,45,109,198,49,168,63,33,251,152,200,39,3,176,228,14,239,190,199,127,89,191,194,143,168,61,243,11,224,198,37,167,10,147,71,145,167,213,111,130,3,224,81,99,202,6,112,110,14,10,103,41,41,20,252,47,210,70,133,10,183,39,38,201,38,92,56,33,27,46,237,42,196,90,252,109,44,77,223,179,149,157,19,13,56,83,222,99,175,139,84,115,10,101,168,178,119,60,187,10,106,118,230,174,237,71,46,201,194,129,59,53,130,20,133,44,114,146,100,3,241,76,161,232,191,162,1,48,66,188,75,102,26,168,145,151,248,208,112,139,75,194,48,190,84,6,163,81,108,199,24,82,239,214,25,232,146,209,16,169,101,85,36,6,153,214,42,32,113,87,133,53,14,244,184,209,187,50,112,160,106,16,200,208,210,184,22,193,164,25,83,171,65,81,8,108,55,30,153,235,142,223,76,119,72,39,168,72,155,225,181,188,176,52,99,90,201,197,179,12,28,57,203,138,65,227,74,170,216,78,115,227,99,119,79,202,156,91,163,184,178,214,243,111,46,104,252,178,239,93,238,130,143,116,96,47,23,67,111,99,165,120,114,171,240,161,20,120,200,132,236,57,100,26,8,2,199,140,40,30,99,35,250,255,190,144,233,189,130,222,235,108,80,164,21,121,198,178,247,163,249,190,43,83,114,227,242,120,113,198,156,97,38,234,206,62,39,202,7,194,192,33,199,184,134,209,30,235,224,205,214,125,218,234,120,209,110,238,127,79,125,245,186,111,23,114,170,103,240,6,166,152,200,162,197,125,99,10,174,13,249,190,4,152,63,17,27,71,28,19,53,11,113,27,132,125,4,35,245,119,219,40,147,36,199,64,123,171,202,50,188,190,201,21,10,190,158,60,76,13,16,156,196,103,29,67,182,66,62,203,190,212,197,76,42,126,101,252,156,41,127,89,236,250,214,58,171,111,203,95,23,88,71,74,140,25,68,108,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,47,99,168,254,170,226,153,255,102,179,216,0,226,141,122,255,122,66,153,254,182,245,134,0,227,228,25,1,214,57,235,255,216,173,56,255,181,231,210,0,119,128,157,255,129,95,136,255,110,126,51,0,2,169,183,255,7,130,98,254,69,176,94,255,116,4,227,1,217,242,145,255,202,173,31,1,105,1,39,255,46,175,69,0,228,47,58,255,215,224,69,254,207,56,69,255,16,254,139,255,23,207,212,255,202,20,126,255,95,213,96,255,9,176,33,0,200,5,207,255,241,42,128,254,35,33,192,255,248,229,196,1,129,17,120,0,251,103,151,255,7,52,112,255,140,56,66,255,40,226,245,255,217,70,37,254,172,214,9,255,72,67,134,1,146,192,214,255,44,38,112,0,68,184,75,255,206,90,251,0,149,235,141,0,181,170,58,0,116,244,239,0,92,157,2,0,102,173,98,0,233,137,96,1,127,49,203,0,5,155,148,0,23,148,9,255,211,122,12,0,34,134,26,255,219,204,136,0,134,8,41,255,224,83,43,254,85,25,247,0,109,127,0,254,169,136,48,0,238,119,219,255,231,173,213,0,206,18,254,254,8,186,7,255,126,9,7,1,111,42,72,0,111,52,236,254,96,63,141,0,147,191,127,254,205,78,192,255,14,106,237,1,187,219,76,0,175,243,187,254,105,89,173,0,85,25,89,1,162,243,148,0,2,118,209,254,33,158,9,0,139,163,46,255,93,70,40,0,108,42,142,254,111,252,142,255,155,223,144,0,51,229,167,255,73,252,155,255,94,116,12,255,152,160,218,255,156,238,37,255,179,234,207,255,197,0,179,255,154,164,141,0,225,196,104,0,10,35,25,254,209,212,242,255,97,253,222,254,184,101,229,0,222,18,127,1,164,136,135,255,30,207,140,254,146,97,243,0,129,192,26,254,201,84,33,255,111,10,78,255,147,81,178,255,4,4,24,0,161,238,215,255,6,141,33,0,53,215,14,255,41,181,208,255,231,139,157,0,179,203,221,255,255,185,113,0,189,226,172,255,113,66,214,255,202,62,45,255,102,64,8,255,78,174,16,254,133,117,68,255,182,120,89,255,133,114,211,0,189,110,21,255,15,10,106,0,41,192,1,0,152,232,121,255,188,60,160,255,153,113,206,255,0,183,226,254,180,13,72,255,176,160,14,254,211,201,134,255,158,24,143,0,127,105,53,0,96,12,189,0,167,215,251,255,159,76,128,254,106,101,225,255,30,252,4,0,146,12,174,0,89,241,178,254,10,229,166,255,123,221,42,254,30,20,212,0,82,128,3,0,48,209,243,0,119,121,64,255,50,227,156,255,0,110,197,1,103,27,144,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,234,113,60,255,37,255,57,255,69,178,182,254,128,208,179,0,118,26,125,254,3,7,214,255,241,50,77,255,85,203,197,255,211,135,250,255,25,48,100,255,187,213,180,254,17,88,105,0,83,209,158,1,5,115,98,0,4,174,60,254,171,55,110,255,217,181,17,255,20,188,170,0,146,156,102,254,87,214,174,255,114,122,155,1,233,44,170,0,127,8,239,1,214,236,234,0,175,5,219,0,49,106,61,255,6,66,208,255,2,106,110,255,81,234,19,255,215,107,192,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,178,9,252,254,100,110,212,0,14,5,167,0,233,239,163,255,28,151,157,1,101,146,10,255,254,158,70,254,71,249,228,0,88,30,50,0,68,58,160,255,191,24,104,1,129,66,129,255,192,50,85,255,8,179,138,255,38,250,201,0,115,80,160,0,131,230,113,0,125,88,147,0,90,68,199,0,253,76,158,0,28,255,118,0,113,250,254,0,66,75,46,0,230,218,43,0,229,120,186,1,148,68,43,0,136,124,238,1,187,107,197,255,84,53,246,255,51,116,254,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,68,113,21,255,222,186,59,255,66,7,241,1,69,6,72,0,86,156,108,254,55,167,89,0,109,52,219,254,13,176,23,255,196,44,106,255,239,149,71,255,164,140,125,255,159,173,1,0,51,41,231,0,145,62,33,0,138,111,93,1,185,83,69,0,144,115,46,0,97,151,16,255,24,228,26,0,49,217,226,0,113,75,234,254,193,153,12,255,182,48,96,255,14,13,26,0,128,195,249,254,69,193,59,0,132,37,81,254,125,106,60,0,214,240,169,1,164,227,66,0,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,143,62,221,0,129,89,214,255,55,139,5,254,68,20,191,255,14,204,178,1,35,195,217,0,47,51,206,1,38,246,165,0,206,27,6,254,158,87,36,0,217,52,146,255,125,123,215,255,85,60,31,255,171,13,7,0,218,245,88,254,252,35,60,0,55,214,160,255,133,101,56,0,224,32,19,254,147,64,234,0,26,145,162,1,114,118,125,0,248,252,250,0,101,94,196,255,198,141,226,254,51,42,182,0,135,12,9,254,109,172,210,255,197,236,194,1,241,65,154,0,48,156,47,255,153,67,55,255,218,165,34,254,74,180,179,0,218,66,71,1,88,122,99,0,212,181,219,255,92,42,231,255,239,0,154,0,245,77,183,255,94,81,170,1,18,213,216,0,171,93,71,0,52,94,248,0,18,151,161,254,197,209,66,255,174,244,15,254,162,48,183,0,49,61,240,254,182,93,195,0,199,228,6,1,200,5,17,255,137,45,237,255,108,148,4,0,90,79,237,255,39,63,77,255,53,82,207,1,142,22,118,255,101,232,18,1,92,26,67,0,5,200,88,255,33,168,138,255,149,225,72,0,2,209,27,255,44,245,168,1,220,237,17,255,30,211,105,254,141,238,221,0,128,80,245,254,111,254,14,0,222,95,190,1,223,9,241,0,146,76,212,255,108,205,104,255,63,117,153,0,144,69,48,0,35,228,111,0,192,33,193,255,112,214,190,254,115,152,151,0,23,102,88,0,51,74,248,0,226,199,143,254,204,162,101,255,208,97,189,1,245,104,18,0,230,246,30,255,23,148,69,0,110,88,52,254,226,181,89,255,208,47,90,254,114,161,80,255,33,116,248,0,179,152,87,255,69,144,177,1,88,238,26,255,58,32,113,1,1,77,69,0,59,121,52,255,152,238,83,0,52,8,193,0,231,39,233,255,199,34,138,0,222,68,173,0,91,57,242,254,220,210,127,255,192,7,246,254,151,35,187,0,195,236,165,0,111,93,206,0,212,247,133,1,154,133,209,255,155,231,10,0,64,78,38,0,122,249,100,1,30,19,97,255,62,91,249,1,248,133,77,0,197,63,168,254,116,10,82,0,184,236,113,254,212,203,194,255,61,100,252,254,36,5,202,255,119,91,153,255,129,79,29,0,103,103,171,254,237,215,111,255,216,53,69,0,239,240,23,0,194,149,221,255,38,225,222,0,232,255,180,254,118,82,133,255,57,209,177,1,139,232,133,0,158,176,46,254,194,115,46,0,88,247,229,1,28,103,191,0,221,222,175,254,149,235,44,0,151,228,25,254,218,105,103,0,142,85,210,0,149,129,190,255,213,65,94,254,117,134,224,255,82,198,117,0,157,221,220,0,163,101,36,0,197,114,37,0,104,172,166,254,11,182,0,0,81,72,188,255,97,188,16,255,69,6,10,0,199,147,145,255,8,9,115,1,65,214,175,255,217,173,209,0,80,127,166,0,247,229,4,254,167,183,124,255,90,28,204,254,175,59,240,255,11,41,248,1,108,40,51,255,144,177,195,254,150,250,126,0,138,91,65,1,120,60,222,255,245,193,239,0,29,214,189,255,128,2,25,0,80,154,162,0,77,220,107,1,234,205,74,255,54,166,103,255,116,72,9,0,228,94,47,255,30,200,25,255,35,214,89,255,61,176,140,255,83,226,163,255,75,130,172,0,128,38,17,0,95,137,152,255,215,124,159,1,79,93,0,0,148,82,157,254,195,130,251,255,40,202,76,255,251,126,224,0,157,99,62,254,207,7,225,255,96,68,195,0,140,186,157,255,131,19,231,255,42,128,254,0,52,219,61,254,102,203,72,0,141,7,11,255,186,164,213,0,31,122,119,0,133,242,145,0,208,252,232,255,91,213,182,255,143,4,250,254,249,215,74,0,165,30,111,1,171,9,223,0,229,123,34,1,92,130,26,255,77,155,45,1,195,139,28,255,59,224,78,0,136,17,247,0,108,121,32,0,79,250,189,255,96,227,252,254,38,241,62,0,62,174,125,255,155,111,93,255,10,230,206,1,97,197,40,255,0,49,57,254,65,250,13,0,18,251,150,255,220,109,210,255,5,174,166,254,44,129,189,0,235,35,147,255,37,247,141,255,72,141,4,255,103,107,255,0,247,90,4,0,53,44,42,0,2,30,240,0,4,59,63,0,88,78,36,0,113,167,180,0,190,71,193,255,199,158,164,255,58,8,172,0,77,33,12,0,65,63,3,0,153,77,33,255,172,254,102,1,228,221,4,255,87,30,254,1,146,41,86,255,138,204,239,254,108,141,17,255,187,242,135,0,210,208,127,0,68,45,14,254,73,96,62,0,81,60,24,255,170,6,36,255,3,249,26,0,35,213,109,0,22,129,54,255,21,35,225,255,234,61,56,255,58,217,6,0,143,124,88,0,236,126,66,0,209,38,183,255,34,238,6,255,174,145,102,0,95,22,211,0,196,15,153,254,46,84,232,255,117,34,146,1,231,250,74,255,27,134,100,1,92,187,195,255,170,198,112,0,120,28,42,0,209,70,67,0,29,81,31,0,29,168,100,1,169,173,160,0,107,35,117,0,62,96,59,255,81,12,69,1,135,239,190,255,220,252,18,0,163,220,58,255,137,137,188,255,83,102,109,0,96,6,76,0,234,222,210,255,185,174,205,1,60,158,213,255,13,241,214,0,172,129,140,0,93,104,242,0,192,156,251,0,43,117,30,0,225,81,158,0,127,232,218,0,226,28,203,0,233,27,151,255,117,43,5,255,242,14,47,255,33,20,6,0,137,251,44,254,27,31,245,255,183,214,125,254,40,121,149,0,186,158,213,255,89,8,227,0,69,88,0,254,203,135,225,0,201,174,203,0,147,71,184,0,18,121,41,254,94,5,78,0,224,214,240,254,36,5,180,0,251,135,231,1,163,138,212,0,210,249,116,254,88,129,187,0,19,8,49,254,62,14,144,255,159,76,211,0,214,51,82,0,109,117,228,254,103,223,203,255,75,252,15,1,154,71,220,255,23,13,91,1,141,168,96,255,181,182,133,0,250,51,55,0,234,234,212,254,175,63,158,0,39,240,52,1,158,189,36,255,213,40,85,1,32,180,247,255,19,102,26,1,84,24,97,255,69,21,222,0,148,139,122,255,220,213,235,1,232,203,255,0,121,57,147,0,227,7,154,0,53,22,147,1,72,1,225,0,82,134,48,254,83,60,157,255,145,72,169,0,34,103,239,0,198,233,47,0,116,19,4,255,184,106,9,255,183,129,83,0,36,176,230,1,34,103,72,0,219,162,134,0,245,42,158,0,32,149,96,254,165,44,144,0,202,239,72,254,215,150,5,0,42,66,36,1,132,215,175,0,86,174,86,255,26,197,156,255,49,232,135,254,103,182,82,0,253,128,176,1,153,178,122,0,245,250,10,0,236,24,178,0,137,106,132,0,40,29,41,0,50,30,152,255,124,105,38,0,230,191,75,0,143,43,170,0,44,131,20,255,44,13,23,255,237,255,155,1,159,109,100,255,112,181,24,255,104,220,108,0,55,211,131,0,99,12,213,255,152,151,145,255,238,5,159,0,97,155,8,0,33,108,81,0,1,3,103,0,62,109,34,255,250,155,180,0,32,71,195,255,38,70,145,1,159,95,245,0,69,229,101,1,136,28,240,0,79,224,25,0,78,110,121,255,248,168,124,0,187,128,247,0,2,147,235,254,79,11,132,0,70,58,12,1,181,8,163,255,79,137,133,255,37,170,11,255,141,243,85,255,176,231,215,255,204,150,164,255,239,215,39,255,46,87,156,254,8,163,88,255,172,34,232,0,66,44,102,255,27,54,41,254,236,99,87,255,41,123,169,1,52,114,43,0,117,134,40,0,155,134,26,0,231,207,91,254,35,132,38,255,19,102,125,254,36,227,133,255,118,3,113,255,29,13,124,0,152,96,74,1,88,146,206,255,167,191,220,254,162,18,88,255,182,100,23,0,31,117,52,0,81,46,106,1,12,2,7,0,69,80,201,1,209,246,172,0,12,48,141,1,224,211,88,0,116,226,159,0,122,98,130,0,65,236,234,1,225,226,9,255,207,226,123,1,89,214,59,0,112,135,88,1,90,244,203,255,49,11,38,1,129,108,186,0,89,112,15,1,101,46,204,255,127,204,45,254,79,255,221,255,51,73,18,255,127,42,101,255,241,21,202,0,160,227,7,0,105,50,236,0,79,52,197,255,104,202,208,1,180,15,16,0,101,197,78,255,98,77,203,0,41,185,241,1,35,193,124,0,35,155,23,255,207,53,192,0,11,125,163,1,249,158,185,255,4,131,48,0,21,93,111,255,61,121,231,1,69,200,36,255,185,48,185,255,111,238,21,255,39,50,25,255,99,215,163,255,87,212,30,255,164,147,5,255,128,6,35,1,108,223,110,255,194,76,178,0,74,101,180,0,243,47,48,0,174,25,43,255,82,173,253,1,54,114,192,255,40,55,91,0,215,108,176,255,11,56,7,0,224,233,76,0,209,98,202,254,242,25,125,0,44,193,93,254,203,8,177,0,135,176,19,0,112,71,213,255,206,59,176,1,4,67,26,0,14,143,213,254,42,55,208,255,60,67,120,0,193,21,163,0,99,164,115,0,10,20,118,0,156,212,222,254,160,7,217,255,114,245,76,1,117,59,123,0,176,194,86,254,213,15,176,0,78,206,207,254,213,129,59,0,233,251,22,1,96,55,152,255,236,255,15,255,197,89,84,255,93,149,133,0,174,160,113,0,234,99,169,255,152,116,88,0,144,164,83,255,95,29,198,255,34,47,15,255,99,120,134,255,5,236,193,0,249,247,126,255,147,187,30,0,50,230,117,255,108,217,219,255,163,81,166,255,72,25,169,254,155,121,79,255,28,155,89,254,7,126,17,0,147,65,33,1,47,234,253,0,26,51,18,0,105,83,199,255,163,196,230,0,113,248,164,0,226,254,218,0,189,209,203,255,164,247,222,254,255,35,165,0,4,188,243,1,127,179,71,0,37,237,254,255,100,186,240,0,5,57,71,254,103,72,73,255,244,18,81,254,229,210,132,255,238,6,180,255,11,229,174,255,227,221,192,1,17,49,28,0,163,215,196,254,9,118,4,255,51,240,71,0,113,129,109,255,76,240,231,0,188,177,127,0,125,71,44,1,26,175,243,0,94,169,25,254,27,230,29,0,15,139,119,1,168,170,186,255,172,197,76,255,252,75,188,0,137,124,196,0,72,22,96,255,45,151,249,1,220,145,100,0,64,192,159,255,120,239,226,0,129,178,146,0,0,192,125,0,235,138,234,0,183,157,146,0,83,199,192,255,184,172,72,255,73,225,128,0,77,6,250,255,186,65,67,0,104,246,207,0,188,32,138,255,218,24,242,0,67,138,81,254,237,129,121,255,20,207,150,1,41,199,16,255,6,20,128,0,159,118,5,0,181,16,143,255,220,38,15,0,23,64,147,254,73,26,13,0,87,228,57,1,204,124,128,0,43,24,223,0,219,99,199,0,22,75,20,255,19,27,126,0,157,62,215,0,110,29,230,0,179,167,255,1,54,252,190,0,221,204,182,254,179,158,65,255,81,157,3,0,194,218,159,0,170,223,0,0,224,11,32,255,38,197,98,0,168,164,37,0,23,88,7,1,164,186,110,0,96,36,134,0,234,242,229,0,250,121,19,0,242,254,112,255,3,47,94,1,9,239,6,255,81,134,153,254,214,253,168,255,67,124,224,0,245,95,74,0,28,30,44,254,1,109,220,255,178,89,89,0,252,36,76,0,24,198,46,255,76,77,111,0,134,234,136,255,39,94,29,0,185,72,234,255,70,68,135,255,231,102,7,254,77,231,140,0,167,47,58,1,148,97,118,255,16,27,225,1,166,206,143,255,110,178,214,255,180,131,162,0,143,141,225,1,13,218,78,255,114,153,33,1,98,104,204,0,175,114,117,1,167,206,75,0,202,196,83,1,58,64,67,0,138,47,111,1,196,247,128,255,137,224,224,254,158,112,207,0,154,100,255,1,134,37,107,0,198,128,79,255,127,209,155,255,163,254,185,254,60,14,243,0,31,219,112,254,29,217,65,0,200,13,116,254,123,60,196,255,224,59,184,254,242,89,196,0,123,16,75,254,149,16,206,0,69,254,48,1,231,116,223,255,209,160,65,1,200,80,98,0,37,194,184,254,148,63,34,0,139,240,65,255,217,144,132,255,56,38,45,254,199,120,210,0,108,177,166,255,160,222,4,0,220,126,119,254,165,107,160,255,82,220,248,1,241,175,136,0,144,141,23,255,169,138,84,0,160,137,78,255,226,118,80,255,52,27,132,255,63,96,139,255,152,250,39,0,188,155,15,0,232,51,150,254,40,15,232,255,240,229,9,255,137,175,27,255,75,73,97,1,218,212,11,0,135,5,162,1,107,185,213,0,2,249,107,255,40,242,70,0,219,200,25,0,25,157,13,0,67,82,80,255,196,249,23,255,145,20,149,0,50,72,146,0,94,76,148,1,24,251,65,0,31,192,23,0,184,212,201,255,123,233,162,1,247,173,72,0,162,87,219,254,126,134,89,0,159,11,12,254,166,105,29,0,73,27,228,1,113,120,183,255,66,163,109,1,212,143,11,255,159,231,168,1,255,128,90,0,57,14,58,254,89,52,10,255,253,8,163,1,0,145,210,255,10,129,85,1,46,181,27,0,103,136,160,254,126,188,209,255,34,35,111,0,215,219,24,255,212,11,214,254,101,5,118,0,232,197,133,255,223,167,109,255,237,80,86,255,70,139,94,0,158,193,191,1,155,15,51,255,15,190,115,0,78,135,207,255,249,10,27,1,181,125,233,0,95,172,13,254,170,213,161,255,39,236,138,255,95,93,87,255,190,128,95,0,125,15,206,0,166,150,159,0,227,15,158,255,206,158,120,255,42,141,128,0,101,178,120,1,156,109,131,0,218,14,44,254,247,168,206,255,212,112,28,0,112,17,228,255,90,16,37,1,197,222,108,0,254,207,83,255,9,90,243,255,243,244,172,0,26,88,115,255,205,116,122,0,191,230,193,0,180,100,11,1,217,37,96,255,154,78,156,0,235,234,31,255,206,178,178,255,149,192,251,0,182,250,135,0,246,22,105,0,124,193,109,255,2,210,149,255,169,17,170,0,0,96,110,255,117,9,8,1,50,123,40,255,193,189,99,0,34,227,160,0,48,80,70,254,211,51,236,0,45,122,245,254,44,174,8,0,173,37,233,255,158,65,171,0,122,69,215,255,90,80,2,255,131,106,96,254,227,114,135,0,205,49,119,254,176,62,64,255,82,51,17,255,241,20,243,255,130,13,8,254,128,217,243,255,162,27,1,254,90,118,241,0,246,198,246,255,55,16,118,255,200,159,157,0,163,17,1,0,140,107,121,0,85,161,118,255,38,0,149,0,156,47,238,0,9,166,166,1,75,98,181,255,50,74,25,0,66,15,47,0,139,225,159,0,76,3,142,255,14,238,184,0,11,207,53,255,183,192,186,1,171,32,174,255,191,76,221,1,247,170,219,0,25,172,50,254,217,9,233,0,203,126,68,255,183,92,48,0,127,167,183,1,65,49,254,0,16,63,127,1,254,21,170,255,59,224,127,254,22,48,63,255,27,78,130,254,40,195,29,0,250,132,112,254,35,203,144,0,104,169,168,0,207,253,30,255,104,40,38,254,94,228,88,0,206,16,128,255,212,55,122,255,223,22,234,0,223,197,127,0,253,181,181,1,145,102,118,0,236,153,36,255,212,217,72,255,20,38,24,254,138,62,62,0,152,140,4,0,230,220,99,255,1,21,212,255,148,201,231,0,244,123,9,254,0,171,210,0,51,58,37,255,1,255,14,255,244,183,145,254,0,242,166,0,22,74,132,0,121,216,41,0,95,195,114,254,133,24,151,255,156,226,231,255,247,5,77,255,246,148,115,254,225,92,81,255,222,80,246,254,170,123,89,255,74,199,141,0,29,20,8,255,138,136,70,255,93,75,92,0,221,147,49,254,52,126,226,0,229,124,23,0,46,9,181,0,205,64,52,1,131,254,28,0,151,158,212,0,131,64,78,0,206,25,171,0,0,230,139,0,191,253,110,254,103,247,167,0,64,40,40,1,42,165,241,255,59,75,228,254,124,243,189,255,196,92,178,255,130,140,86,255,141,89,56,1,147,198,5,255,203,248,158,254,144,162,141,0,11,172,226,0,130,42,21,255,1,167,143,255,144,36,36,255,48,88,164,254,168,170,220,0,98,71,214,0,91,208,79,0,159,76,201,1,166,42,214,255,69,255,0,255,6,128,125,255,190,1,140,0,146,83,218,255,215,238,72,1,122,127,53,0,189,116,165,255,84,8,66,255,214,3,208,255,213,110,133,0,195,168,44,1,158,231,69,0,162,64,200,254,91,58,104,0,182,58,187,254,249,228,136,0,203,134,76,254,99,221,233,0,75,254,214,254,80,69,154,0,64,152,248,254,236,136,202,255,157,105,153,254,149,175,20,0,22,35,19,255,124,121,233,0,186,250,198,254,132,229,139,0,137,80,174,255,165,125,68,0,144,202,148,254,235,239,248,0,135,184,118,0,101,94,17,255,122,72,70,254,69,130,146,0,127,222,248,1,69,127,118,255,30,82,215,254,188,74,19,255,229,167,194,254,117,25,66,255,65,234,56,254,213,22,156,0,151,59,93,254,45,28,27,255,186,126,164,255,32,6,239,0,127,114,99,1,219,52,2,255,99,96,166,254,62,190,126,255,108,222,168,1,75,226,174,0,230,226,199,0,60,117,218,255,252,248,20,1,214,188,204,0,31,194,134,254,123,69,192,255,169,173,36,254,55,98,91,0,223,42,102,254,137,1,102,0,157,90,25,0,239,122,64,255,252,6,233,0,7,54,20,255,82,116,174,0,135,37,54,255,15,186,125,0,227,112,175,255,100,180,225,255,42,237,244,255,244,173,226,254,248,18,33,0,171,99,150,255,74,235,50,255,117,82,32,254,106,168,237,0,207,109,208,1,228,9,186,0,135,60,169,254,179,92,143,0,244,170,104,255,235,45,124,255,70,99,186,0,117,137,183,0,224,31,215,0,40,9,100,0,26,16,95,1,68,217,87,0,8,151,20,255,26,100,58,255,176,165,203,1,52,118,70,0,7,32,254,254,244,254,245,255,167,144,194,255,125,113,23,255,176,121,181,0,136,84,209,0,138,6,30,255,89,48,28,0,33,155,14,255,25,240,154,0,141,205,109,1,70,115,62,255,20,40,107,254,138,154,199,255,94,223,226,255,157,171,38,0,163,177,25,254,45,118,3,255,14,222,23,1,209,190,81,255,118,123,232,1,13,213,101,255,123,55,123,254,27,246,165,0,50,99,76,255,140,214,32,255,97,65,67,255,24,12,28,0,174,86,78,1,64,247,96,0,160,135,67,0,66,55,243,255,147,204,96,255,26,6,33,255,98,51,83,1,153,213,208,255,2,184,54,255,25,218,11,0,49,67,246,254,18,149,72,255,13,25,72,0,42,79,214,0,42,4,38,1,27,139,144,255,149,187,23,0,18,164,132,0,245,84,184,254,120,198,104,255,126,218,96,0,56,117,234,255,13,29,214,254,68,47,10,255,167,154,132,254,152,38,198,0,66,178,89,255,200,46,171,255,13,99,83,255,210,187,253,255,170,45,42,1,138,209,124,0,214,162,141,0,12,230,156,0,102,36,112,254,3,147,67,0,52,215,123,255,233,171,54,255,98,137,62,0,247,218,39,255,231,218,236,0,247,191,127,0,195,146,84,0,165,176,92,255,19,212,94,255,17,74,227,0,88,40,153,1,198,147,1,255,206,67,245,254,240,3,218,255,61,141,213,255,97,183,106,0,195,232,235,254,95,86,154,0,209,48,205,254,118,209,241,255,240,120,223,1,213,29,159,0,163,127,147,255,13,218,93,0,85,24,68,254,70,20,80,255,189,5,140,1,82,97,254,255,99,99,191,255,132,84,133,255,107,218,116,255,112,122,46,0,105,17,32,0,194,160,63,255,68,222,39,1,216,253,92,0,177,105,205,255,149,201,195,0,42,225,11,255,40,162,115,0,9,7,81,0,165,218,219,0,180,22,0,254,29,146,252,255,146,207,225,1,180,135,96,0,31,163,112,0,177,11,219,255,133,12,193,254,43,78,50,0,65,113,121,1,59,217,6,255,110,94,24,1,112,172,111,0,7,15,96,0,36,85,123,0,71,150,21,255,208,73,188,0,192,11,167,1,213,245,34,0,9,230,92,0,162,142,39,255,215,90,27,0,98,97,89,0,94,79,211,0,90,157,240,0,95,220,126,1,102,176,226,0,36,30,224,254,35,31,127,0,231,232,115,1,85,83,130,0,210,73,245,255,47,143,114,255,68,65,197,0,59,72,62,255,183,133,173,254,93,121,118,255,59,177,81,255,234,69,173,255,205,128,177,0,220,244,51,0,26,244,209,1,73,222,77,255,163,8,96,254,150,149,211,0,158,254,203,1,54,127,139,0,161,224,59,0,4,109,22,255,222,42,45,255,208,146,102,255,236,142,187,0,50,205,245,255,10,74,89,254,48,79,142,0,222,76,130,255,30,166,63,0,236,12,13,255,49,184,244,0,187,113,102,0,218,101,253,0,153,57,182,254,32,150,42,0,25,198,146,1,237,241,56,0,140,68,5,0,91,164,172,255,78,145,186,254,67,52,205,0,219,207,129,1,109,115,17,0,54,143,58,1,21,248,120,255,179,255,30,0,193,236,66,255,1,255,7,255,253,192,48,255,19,69,217,1,3,214,0,255,64,101,146,1,223,125,35,255,235,73,179,255,249,167,226,0,225,175,10,1,97,162,58,0,106,112,171,1,84,172,5,255,133,140,178,255,134,245,142,0,97,90,125,255,186,203,185,255,223,77,23,255,192,92,106,0,15,198,115,255,217,152,248,0,171,178,120,255,228,134,53,0,176,54,193,1,250,251,53,0,213,10,100,1,34,199,106,0,151,31,244,254,172,224,87,255,14,237,23,255,253,85,26,255,127,39,116,255,172,104,100,0,251,14,70,255,212,208,138,255,253,211,250,0,176,49,165,0,15,76,123,255,37,218,160,255,92,135,16,1,10,126,114,255,70,5,224,255,247,249,141,0,68,20,60,1,241,210,189,255,195,217,187,1,151,3,113,0,151,92,174,0,231,62,178,255,219,183,225,0,23,23,33,255,205,181,80,0,57,184,248,255,67,180,1,255,90,123,93,255,39,0,162,255,96,248,52,255,84,66,140,0,34,127,228,255,194,138,7,1,166,110,188,0,21,17,155,1,154,190,198,255,214,80,59,255,18,7,143,0,72,29,226,1,199,217,249,0,232,161,71,1,149,190,201,0,217,175,95,254,113,147,67,255,138,143,199,255,127,204,1,0,29,182,83,1,206,230,155,255,186,204,60,0,10,125,85,255,232,96,25,255,255,89,247,255,213,254,175,1,232,193,81,0,28,43,156,254,12,69,8,0,147,24,248,0,18,198,49,0,134,60,35,0,118,246,18,255,49,88,254,254,228,21,186,255,182,65,112,1,219,22,1,255,22,126,52,255,189,53,49,255,112,25,143,0,38,127,55,255,226,101,163,254,208,133,61,255,137,69,174,1,190,118,145,255,60,98,219,255,217,13,245,255,250,136,10,0,84,254,226,0,201,31,125,1,240,51,251,255,31,131,130,255,2,138,50,255,215,215,177,1,223,12,238,255,252,149,56,255,124,91,68,255,72,126,170,254,119,255,100,0,130,135,232,255,14,79,178,0,250,131,197,0,138,198,208,0,121,216,139,254,119,18,36,255,29,193,122,0,16,42,45,255,213,240,235,1,230,190,169,255,198,35,228,254,110,173,72,0,214,221,241,255,56,148,135,0,192,117,78,254,141,93,207,255,143,65,149,0,21,18,98,255,95,44,244,1,106,191,77,0,254,85,8,254,214,110,176,255,73,173,19,254,160,196,199,255,237,90,144,0,193,172,113,255,200,155,136,254,228,90,221,0,137,49,74,1,164,221,215,255,209,189,5,255,105,236,55,255,42,31,129,1,193,255,236,0,46,217,60,0,138,88,187,255,226,82,236,255,81,69,151,255,142,190,16,1,13,134,8,0,127,122,48,255,81,64,156,0,171,243,139,0,237,35,246,0,122,143,193,254,212,122,146,0,95,41,255,1,87,132,77,0,4,212,31,0,17,31,78,0,39,45,173,254,24,142,217,255,95,9,6,255,227,83,6,0,98,59,130,254,62,30,33,0,8,115,211,1,162,97,128,255,7,184,23,254,116,28,168,255,248,138,151,255,98,244,240,0,186,118,130,0,114,248,235,255,105,173,200,1,160,124,71,255,94,36,164,1,175,65,146,255,238,241,170,254,202,198,197,0,228,71,138,254,45,246,109,255,194,52,158,0,133,187,176,0,83,252,154,254,89,189,221,255,170,73,252,0,148,58,125,0,36,68,51,254,42,69,177,255,168,76,86,255,38,100,204,255,38,53,35,0,175,19,97,0,225,238,253,255,81,81,135,0,210,27,255,254,235,73,107,0,8,207,115,0,82,127,136,0,84,99,21,254,207,19,136,0,100,164,101,0,80,208,77,255,132,207,237,255,15,3,15,255,33,166,110,0,156,95,85,255,37,185,111,1,150,106,35,255,166,151,76,0,114,87,135,255,159,194,64,0,12,122,31,255,232,7,101,254,173,119,98,0,154,71,220,254,191,57,53,255,168,232,160,255,224,32,99,255,218,156,165,0,151,153,163,0,217,13,148,1,197,113,89,0,149,28,161,254,207,23,30,0,105,132,227,255,54,230,94,255,133,173,204,255,92,183,157,255,88,144,252,254,102,33,90,0,159,97,3,0,181,218,155,255,240,114,119,0,106,214,53,255,165,190,115,1,152,91,225,255,88,106,44,255,208,61,113,0,151,52,124,0,191,27,156,255,110,54,236,1,14,30,166,255,39,127,207,1,229,199,28,0,188,228,188,254,100,157,235,0,246,218,183,1,107,22,193,255,206,160,95,0,76,239,147,0,207,161,117,0,51,166,2,255,52,117,10,254,73,56,227,255,152,193,225,0,132,94,136,255,101,191,209,0,32,107,229,255,198,43,180,1,100,210,118,0,114,67,153,255,23,88,26,255,89,154,92,1,220,120,140,255,144,114,207,255,252,115,250,255,34,206,72,0,138,133,127,255,8,178,124,1,87,75,97,0,15,229,92,254,240,67,131,255,118,123,227,254,146,120,104,255,145,213,255,1,129,187,70,255,219,119,54,0,1,19,173,0,45,150,148,1,248,83,72,0,203,233,169,1,142,107,56,0,247,249,38,1,45,242,80,255,30,233,103,0,96,82,70,0,23,201,111,0,81,39,30,255,161,183,78,255,194,234,33,255,68,227,140,254,216,206,116,0,70,27,235,255,104,144,79,0,164,230,93,254,214,135,156,0,154,187,242,254,188,20,131,255,36,109,174,0,159,112,241,0,5,110,149,1,36,165,218,0,166,29,19,1,178,46,73,0,93,43,32,254,248,189,237,0,102,155,141,0,201,93,195,255,241,139,253,255,15,111,98,255,108,65,163,254,155,79,190,255,73,174,193,254,246,40,48,255,107,88,11,254,202,97,85,255,253,204,18,255,113,242,66,0,110,160,194,254,208,18,186,0,81,21,60,0,188,104,167,255,124,166,97,254,210,133,142,0,56,242,137,254,41,111,130,0,111,151,58,1,111,213,141,255,183,172,241,255,38,6,196,255,185,7,123,255,46,11,246,0,245,105,119,1,15,2,161,255,8,206,45,255,18,202,74,255,83,124,115,1,212,141,157,0,83,8,209,254,139,15,232,255,172,54,173,254,50,247,132,0,214,189,213,0,144,184,105,0,223,254,248,0,255,147,240,255,23,188,72,0,7,51,54,0,188,25,180,254,220,180,0,255,83,160,20,0,163,189,243,255,58,209,194,255,87,73,60,0,106,24,49,0,245,249,220,0,22,173,167,0,118,11,195,255,19,126,237,0,110,159,37,255,59,82,47,0,180,187,86,0,188,148,208,1,100,37,133,255,7,112,193,0,129,188,156,255,84,106,129,255,133,225,202,0,14,236,111,255,40,20,101,0,172,172,49,254,51,54,74,255,251,185,184,255,93,155,224,255,180,249,224,1,230,178,146,0,72,57,54,254,178,62,184,0,119,205,72,0,185,239,253,255,61,15,218,0,196,67,56,255,234,32,171,1,46,219,228,0,208,108,234,255,20,63,232,255,165,53,199,1,133,228,5,255,52,205,107,0,74,238,140,255,150,156,219,254,239,172,178,255,251,189,223,254,32,142,211,255,218,15,138,1,241,196,80,0,28,36,98,254,22,234,199,0,61,237,220,255,246,57,37,0,142,17,142,255,157,62,26,0,43,238,95,254,3,217,6,255,213,25,240,1,39,220,174,255,154,205,48,254,19,13,192,255,244,34,54,254,140,16,155,0,240,181,5,254,155,193,60,0,166,128,4,255,36,145,56,255,150,240,219,0,120,51,145,0,82,153,42,1,140,236,146,0,107,92,248,1,189,10,3,0,63,136,242,0,211,39,24,0,19,202,161,1,173,27,186,255,210,204,239,254,41,209,162,255,182,254,159,255,172,116,52,0,195,103,222,254,205,69,59,0,53,22,41,1,218,48,194,0,80,210,242,0,210,188,207,0,187,161,161,254,216,17,1,0,136,225,113,0,250,184,63,0,223,30,98,254,77,168,162,0,59,53,175,0,19,201,10,255,139,224,194,0,147,193,154,255,212,189,12,254,1,200,174,255,50,133,113,1,94,179,90,0,173,182,135,0,94,177,113,0,43,89,215,255,136,252,106,255,123,134,83,254,5,245,66,255,82,49,39,1,220,2,224,0,97,129,177,0,77,59,89,0,61,29,155,1,203,171,220,255,92,78,139,0,145,33,181,255,169,24,141,1,55,150,179,0,139,60,80,255,218,39,97,0,2,147,107,255,60,248,72,0,173,230,47,1,6,83,182,255,16,105,162,254,137,212,81,255,180,184,134,1,39,222,164,255,221,105,251,1,239,112,125,0,63,7,97,0,63,104,227,255,148,58,12,0,90,60,224,255,84,212,252,0,79,215,168,0,248,221,199,1,115,121,1,0,36,172,120,0,32,162,187,255,57,107,49,255,147,42,21,0,106,198,43,1,57,74,87,0,126,203,81,255,129,135,195,0,140,31,177,0,221,139,194,0,3,222,215,0,131,68,231,0,177,86,178,254,124,151,180,0,184,124,38,1,70,163,17,0,249,251,181,1,42,55,227,0,226,161,44,0,23,236,110,0,51,149,142,1,93,5,236,0,218,183,106,254,67,24,77,0,40,245,209,255,222,121,153,0,165,57,30,0,83,125,60,0,70,38,82,1,229,6,188,0,109,222,157,255,55,118,63,255,205,151,186,0,227,33,149,255,254,176,246,1,227,177,227,0,34,106,163,254,176,43,79,0,106,95,78,1,185,241,122,255,185,14,61,0,36,1,202,0,13,178,162,255,247,11,132,0,161,230,92,1,65,1,185,255,212,50,165,1,141,146,64,255,158,242,218,0,21,164,125,0,213,139,122,1,67,71,87,0,203,158,178,1,151,92,43,0,152,111,5,255,39,3,239,255,217,255,250,255,176,63,71,255,74,245,77,1,250,174,18,255,34,49,227,255,246,46,251,255,154,35,48,1,125,157,61,255,106,36,78,255,97,236,153,0,136,187,120,255,113,134,171,255,19,213,217,254,216,94,209,255,252,5,61,0,94,3,202,0,3,26,183,255,64,191,43,255,30,23,21,0,129,141,77,255,102,120,7,1,194,76,140,0,188,175,52,255,17,81,148,0,232,86,55,1,225,48,172,0,134,42,42,255,238,50,47,0,169,18,254,0,20,147,87,255,14,195,239,255,69,247,23,0,238,229,128,255,177,49,112,0,168,98,251,255,121,71,248,0,243,8,145,254,246,227,153,255,219,169,177,254,251,139,165,255,12,163,185,255,164,40,171,255,153,159,27,254,243,109,91,255,222,24,112,1,18,214,231,0,107,157,181,254,195,147,0,255,194,99,104,255,89,140,190,255,177,66,126,254,106,185,66,0,49,218,31,0,252,174,158,0,188,79,230,1,238,41,224,0,212,234,8,1,136,11,181,0,166,117,83,255,68,195,94,0,46,132,201,0,240,152,88,0,164,57,69,254,160,224,42,255,59,215,67,255,119,195,141,255,36,180,121,254,207,47,8,255,174,210,223,0,101,197,68,255,255,82,141,1,250,137,233,0,97,86,133,1,16,80,69,0,132,131,159,0,116,93,100,0,45,141,139,0,152,172,157,255,90,43,91,0,71,153,46,0,39,16,112,255,217,136,97,255,220,198,25,254,177,53,49,0,222,88,134,255,128,15,60,0,207,192,169,255,192,116,209,255,106,78,211,1,200,213,183,255,7,12,122,254,222,203,60,255,33,110,199,254,251,106,117,0,228,225,4,1,120,58,7,255,221,193,84,254,112,133,27,0,189,200,201,255,139,135,150,0,234,55,176,255,61,50,65,0,152,108,169,255,220,85,1,255,112,135,227,0,162,26,186,0,207,96,185,254,244,136,107,0,93,153,50,1,198,97,151,0,110,11,86,255,143,117,174,255,115,212,200,0,5,202,183,0,237,164,10,254,185,239,62,0,236,120,18,254,98,123,99,255,168,201,194,254,46,234,214,0,191,133,49,255,99,169,119,0,190,187,35,1,115,21,45,255,249,131,72,0,112,6,123,255,214,49,181,254,166,233,34,0,92,197,102,254,253,228,205,255,3,59,201,1,42,98,46,0,219,37,35,255,169,195,38,0,94,124,193,1,156,43,223,0,95,72,133,254,120,206,191,0,122,197,239,255,177,187,79,255,254,46,2,1,250,167,190,0,84,129,19,0,203,113,166,255,249,31,189,254,72,157,202,255,208,71,73,255,207,24,72,0,10,16,18,1,210,81,76,255,88,208,192,255,126,243,107,255,238,141,120,255,199,121,234,255,137,12,59,255,36,220,123,255,148,179,60,254,240,12,29,0,66,0,97,1,36,30,38,255,115,1,93,255,96,103,231,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); +/* memory initializer */ allocate([197,158,59,1,192,164,240,0,202,202,57,255,24,174,48,0,89,77,155,1,42,76,215,0,244,151,233,0,23,48,81,0,239,127,52,254,227,130,37,255,248,116,93,1,124,132,118,0,173,254,192,1,6,235,83,255,110,175,231,1,251,28,182,0,129,249,93,254,84,184,128,0,76,181,62,0,175,128,186,0,100,53,136,254,109,29,226,0,221,233,58,1,20,99,74,0,0,22,160,0,134,13,21,0,9,52,55,255,17,89,140,0,175,34,59,0,84,165,119,255,224,226,234,255,7,72,166,255,123,115,255,1,18,214,246,0,250,7,71,1,217,220,185,0,212,35,76,255,38,125,175,0,189,97,210,0,114,238,44,255,41,188,169,254,45,186,154,0,81,92,22,0,132,160,193,0,121,208,98,255,13,81,44,255,203,156,82,0,71,58,21,255,208,114,191,254,50,38,147,0,154,216,195,0,101,25,18,0,60,250,215,255,233,132,235,255,103,175,142,1,16,14,92,0,141,31,110,254,238,241,45,255,153,217,239,1,97,168,47,255,249,85,16,1,28,175,62,255,57,254,54,0,222,231,126,0,166,45,117,254,18,189,96,255,228,76,50,0,200,244,94,0,198,152,120,1,68,34,69,255,12,65,160,254,101,19,90,0,167,197,120,255,68,54,185,255,41,218,188,0,113,168,48,0,88,105,189,1,26,82,32,255,185,93,164,1,228,240,237,255,66,182,53,0,171,197,92,255,107,9,233,1,199,120,144,255,78,49,10,255,109,170,105,255,90,4,31,255,28,244,113,255,74,58,11,0,62,220,246,255,121,154,200,254,144,210,178,255,126,57,129,1,43,250,14,255,101,111,28,1,47,86,241,255,61,70,150,255,53,73,5,255,30,26,158,0,209,26,86,0,138,237,74,0,164,95,188,0,142,60,29,254,162,116,248,255,187,175,160,0,151,18,16,0,209,111,65,254,203,134,39,255,88,108,49,255,131,26,71,255,221,27,215,254,104,105,93,255,31,236,31,254,135,0,211,255,143,127,110,1,212,73,229,0,233,67,167,254,195,1,208,255,132,17,221,255,51,217,90,0,67,235,50,255,223,210,143,0,179,53,130,1,233,106,198,0,217,173,220,255,112,229,24,255,175,154,93,254,71,203,246,255,48,66,133,255,3,136,230,255,23,221,113,254,235,111,213,0,170,120,95,254,251,221,2,0,45,130,158,254,105,94,217,255,242,52,180,254,213,68,45,255,104,38,28,0,244,158,76,0,161,200,96,255,207,53,13,255,187,67,148,0,170,54,248,0,119,162,178,255,83,20,11,0,42,42,192,1,146,159,163,255,183,232,111,0,77,229,21,255,71,53,143,0,27,76,34,0,246,136,47,255,219,39,182,255,92,224,201,1,19,142,14,255,69,182,241,255,163,118,245,0,9,109,106,1,170,181,247,255,78,47,238,255,84,210,176,255,213,107,139,0,39,38,11,0,72,21,150,0,72,130,69,0,205,77,155,254,142,133,21,0,71,111,172,254,226,42,59,255,179,0,215,1,33,128,241,0,234,252,13,1,184,79,8,0,110,30,73,255,246,141,189,0,170,207,218,1,74,154,69,255,138,246,49,255,155,32,100,0,125,74,105,255,90,85,61,255,35,229,177,255,62,125,193,255,153,86,188,1,73,120,212,0,209,123,246,254,135,209,38,255,151,58,44,1,92,69,214,255,14,12,88,255,252,153,166,255,253,207,112,255,60,78,83,255,227,124,110,0,180,96,252,255,53,117,33,254,164,220,82,255,41,1,27,255,38,164,166,255,164,99,169,254,61,144,70,255,192,166,18,0,107,250,66,0,197,65,50,0,1,179,18,255,255,104,1,255,43,153,35,255,80,111,168,0,110,175,168,0,41,105,45,255,219,14,205,255,164,233,140,254,43,1,118,0,233,67,195,0,178,82,159,255,138,87,122,255,212,238,90,255,144,35,124,254,25,140,164,0,251,215,44,254,133,70,107,255,101,227,80,254,92,169,55,0,215,42,49,0,114,180,85,255,33,232,27,1,172,213,25,0,62,176,123,254,32,133,24,255,225,191,62,0,93,70,153,0,181,42,104,1,22,191,224,255,200,200,140,255,249,234,37,0,149,57,141,0,195,56,208,255,254,130,70,255,32,173,240,255,29,220,199,0,110,100,115,255,132,229,249,0,228,233,223,255,37,216,209,254,178,177,209,255,183,45,165,254,224,97,114,0,137,97,168,255,225,222,172,0,165,13,49,1,210,235,204,255,252,4,28,254,70,160,151,0,232,190,52,254,83,248,93,255,62,215,77,1,175,175,179,255,160,50,66,0,121,48,208,0,63,169,209,255,0,210,200,0,224,187,44,1,73,162,82,0,9,176,143,255,19,76,193,255,29,59,167,1,24,43,154,0,28,190,190,0,141,188,129,0,232,235,203,255,234,0,109,255,54,65,159,0,60,88,232,255,121,253,150,254,252,233,131,255,198,110,41,1,83,77,71,255,200,22,59,254,106,253,242,255,21,12,207,255,237,66,189,0,90,198,202,1,225,172,127,0,53,22,202,0,56,230,132,0,1,86,183,0,109,190,42,0,243,68,174,1,109,228,154,0,200,177,122,1,35,160,183,255,177,48,85,255,90,218,169,255,248,152,78,0,202,254,110,0,6,52,43,0,142,98,65,255,63,145,22,0,70,106,93,0,232,138,107,1,110,179,61,255,211,129,218,1,242,209,92,0,35,90,217,1,182,143,106,255,116,101,217,255,114,250,221,255,173,204,6,0,60,150,163,0,73,172,44,255,239,110,80,255,237,76,153,254,161,140,249,0,149,232,229,0,133,31,40,255,174,164,119,0,113,51,214,0,129,228,2,254,64,34,243,0,107,227,244,255,174,106,200,255,84,153,70,1,50,35,16,0,250,74,216,254,236,189,66,255,153,249,13,0,230,178,4,255,221,41,238,0,118,227,121,255,94,87,140,254,254,119,92,0,73,239,246,254,117,87,128,0,19,211,145,255,177,46,252,0,229,91,246,1,69,128,247,255,202,77,54,1,8,11,9,255,153,96,166,0,217,214,173,255,134,192,2,1,0,207,0,0,189,174,107,1,140,134,100,0,158,193,243,1,182,102,171,0,235,154,51,0,142,5,123,255,60,168,89,1,217,14,92,255,19,214,5,1,211,167,254,0,44,6,202,254,120,18,236,255,15,113,184,255,184,223,139,0,40,177,119,254,182,123,90,255,176,165,176,0,247,77,194,0,27,234,120,0,231,0,214,255,59,39,30,0,125,99,145,255,150,68,68,1,141,222,248,0,153,123,210,255,110,127,152,255,229,33,214,1,135,221,197,0,137,97,2,0,12,143,204,255,81,41,188,0,115,79,130,255,94,3,132,0,152,175,187,255,124,141,10,255,126,192,179,255,11,103,198,0,149,6,45,0,219,85,187,1,230,18,178,255,72,182,152,0,3,198,184,255,128,112,224,1,97,161,230,0,254,99,38,255,58,159,197,0,151,66,219,0,59,69,143,255,185,112,249,0,119,136,47,255,123,130,132,0,168,71,95,255,113,176,40,1,232,185,173,0,207,93,117,1,68,157,108,255,102,5,147,254,49,97,33,0,89,65,111,254,247,30,163,255,124,217,221,1,102,250,216,0,198,174,75,254,57,55,18,0,227,5,236,1,229,213,173,0,201,109,218,1,49,233,239,0,30,55,158,1,25,178,106,0,155,111,188,1,94,126,140,0,215,31,238,1,77,240,16,0,213,242,25,1,38,71,168,0,205,186,93,254,49,211,140,255,219,0,180,255,134,118,165,0,160,147,134,255,110,186,35,255,198,243,42,0,243,146,119,0,134,235,163,1,4,241,135,255,193,46,193,254,103,180,79,255,225,4,184,254,242,118,130,0,146,135,176,1,234,111,30,0,69,66,213,254,41,96,123,0,121,94,42,255,178,191,195,255,46,130,42,0,117,84,8,255,233,49,214,254,238,122,109,0,6,71,89,1,236,211,123,0,244,13,48,254,119,148,14,0,114,28,86,255,75,237,25,255,145,229,16,254,129,100,53,255,134,150,120,254,168,157,50,0,23,72,104,255,224,49,14,0,255,123,22,255,151,185,151,255,170,80,184,1,134,182,20,0,41,100,101,1,153,33,16,0,76,154,111,1,86,206,234,255,192,160,164,254,165,123,93,255,1,216,164,254,67,17,175,255,169,11,59,255,158,41,61,255,73,188,14,255,195,6,137,255,22,147,29,255,20,103,3,255,246,130,227,255,122,40,128,0,226,47,24,254,35,36,32,0,152,186,183,255,69,202,20,0,195,133,195,0,222,51,247,0,169,171,94,1,183,0,160,255,64,205,18,1,156,83,15,255,197,58,249,254,251,89,110,255,50,10,88,254,51,43,216,0,98,242,198,1,245,151,113,0,171,236,194,1,197,31,199,255,229,81,38,1,41,59,20,0,253,104,230,0,152,93,14,255,246,242,146,254,214,169,240,255,240,102,108,254,160,167,236,0,154,218,188,0,150,233,202,255,27,19,250,1,2,71,133,255,175,12,63,1,145,183,198,0,104,120,115,255,130,251,247,0,17,212,167,255,62,123,132,255,247,100,189,0,155,223,152,0,143,197,33,0,155,59,44,255,150,93,240,1,127,3,87,255,95,71,207,1,167,85,1,255,188,152,116,255,10,23,23,0,137,195,93,1,54,98,97,0,240,0,168,255,148,188,127,0,134,107,151,0,76,253,171,0,90,132,192,0,146,22,54,0,224,66,54,254,230,186,229,255,39,182,196,0,148,251,130,255,65,131,108,254,128,1,160,0,169,49,167,254,199,254,148,255,251,6,131,0,187,254,129,255,85,82,62,0,178,23,58,255,254,132,5,0,164,213,39,0,134,252,146,254,37,53,81,255,155,134,82,0,205,167,238,255,94,45,180,255,132,40,161,0,254,111,112,1,54,75,217,0,179,230,221,1,235,94,191,255,23,243,48,1,202,145,203,255,39,118,42,255,117,141,253,0,254,0,222,0,43,251,50,0,54,169,234,1,80,68,208,0,148,203,243,254,145,7,135,0,6,254,0,0,252,185,127,0,98,8,129,255,38,35,72,255,211,36,220,1,40,26,89,0,168,64,197,254,3,222,239,255,2,83,215,254,180,159,105,0,58,115,194,0,186,116,106,255,229,247,219,255,129,118,193,0,202,174,183,1,166,161,72,0,201,107,147,254,237,136,74,0,233,230,106,1,105,111,168,0,64,224,30,1,1,229,3,0,102,151,175,255,194,238,228,255,254,250,212,0,187,237,121,0,67,251,96,1,197,30,11,0,183,95,204,0,205,89,138,0,64,221,37,1,255,223,30,255,178,48,211,255,241,200,90,255,167,209,96,255,57,130,221,0,46,114,200,255,61,184,66,0,55,182,24,254,110,182,33,0,171,190,232,255,114,94,31,0,18,221,8,0,47,231,254,0,255,112,83,0,118,15,215,255,173,25,40,254,192,193,31,255,238,21,146,255,171,193,118,255,101,234,53,254,131,212,112,0,89,192,107,1,8,208,27,0,181,217,15,255,231,149,232,0,140,236,126,0,144,9,199,255,12,79,181,254,147,182,202,255,19,109,182,255,49,212,225,0,74,163,203,0,175,233,148,0,26,112,51,0,193,193,9,255,15,135,249,0,150,227,130,0,204,0,219,1,24,242,205,0,238,208,117,255,22,244,112,0,26,229,34,0,37,80,188,255,38,45,206,254,240,90,225,255,29,3,47,255,42,224,76,0,186,243,167,0,32,132,15,255,5,51,125,0,139,135,24,0,6,241,219,0,172,229,133,255,246,214,50,0,231,11,207,255,191,126,83,1,180,163,170,255,245,56,24,1,178,164,211,255,3,16,202,1,98,57,118,255,141,131,89,254,33,51,24,0,243,149,91,255,253,52,14,0,35,169,67,254,49,30,88,255,179,27,36,255,165,140,183,0,58,189,151,0,88,31,0,0,75,169,66,0,66,101,199,255,24,216,199,1,121,196,26,255,14,79,203,254,240,226,81,255,94,28,10,255,83,193,240,255,204,193,131,255,94,15,86,0,218,40,157,0,51,193,209,0,0,242,177,0,102,185,247,0,158,109,116,0,38,135,91,0,223,175,149,0,220,66,1,255,86,60,232,0,25,96,37,255,225,122,162,1,215,187,168,255,158,157,46,0,56,171,162,0,232,240,101,1,122,22,9,0,51,9,21,255,53,25,238,255,217,30,232,254,125,169,148,0,13,232,102,0,148,9,37,0,165,97,141,1,228,131,41,0,222,15,243,255,254,18,17,0,6,60,237,1,106,3,113,0,59,132,189,0,92,112,30,0,105,208,213,0,48,84,179,255,187,121,231,254,27,216,109,255,162,221,107,254,73,239,195,255,250,31,57,255,149,135,89,255,185,23,115,1,3,163,157,255,18,112,250,0,25,57,187,255,161,96,164,0,47,16,243,0,12,141,251,254,67,234,184,255,41,18,161,0,175,6,96,255,160,172,52,254,24,176,183,255,198,193,85,1,124,121,137,255,151,50,114,255,220,203,60,255,207,239,5,1,0,38,107,255,55,238,94,254,70,152,94,0,213,220,77,1,120,17,69,255,85,164,190,255,203,234,81,0,38,49,37,254,61,144,124,0,137,78,49,254,168,247,48,0,95,164,252,0,105,169,135,0,253,228,134,0,64,166,75,0,81,73,20,255,207,210,10,0,234,106,150,255,94,34,90,255,254,159,57,254,220,133,99,0,139,147,180,254,24,23,185,0,41,57,30,255,189,97,76,0,65,187,223,255,224,172,37,255,34,62,95,1,231,144,240,0,77,106,126,254,64,152,91,0,29,98,155,0,226,251,53,255,234,211,5,255,144,203,222,255,164,176,221,254,5,231,24,0,179,122,205,0,36,1,134,255,125,70,151,254,97,228,252,0,172,129,23,254,48,90,209,255,150,224,82,1,84,134,30,0,241,196,46,0,103,113,234,255,46,101,121,254,40,124,250,255,135,45,242,254,9,249,168,255,140,108,131,255,143,163,171,0,50,173,199,255,88,222,142,255,200,95,158,0,142,192,163,255,7,117,135,0,111,124,22,0,236,12,65,254,68,38,65,255,227,174,254,0,244,245,38,0,240,50,208,255,161,63,250,0,60,209,239,0,122,35,19,0,14,33,230,254,2,159,113,0,106,20,127,255,228,205,96,0,137,210,174,254,180,212,144,255,89,98,154,1,34,88,139,0,167,162,112,1,65,110,197,0,241,37,169,0,66,56,131,255,10,201,83,254,133,253,187,255,177,112,45,254,196,251,0,0,196,250,151,255,238,232,214,255,150,209,205,0,28,240,118,0,71,76,83,1,236,99,91,0,42,250,131,1,96,18,64,255,118,222,35,0,113,214,203,255,122,119,184,255,66,19,36,0,204,64,249,0,146,89,139,0,134,62,135,1,104,233,101,0,188,84,26,0,49,249,129,0,208,214,75,255,207,130,77,255,115,175,235,0,171,2,137,255,175,145,186,1,55,245,135,255,154,86,181,1,100,58,246,255,109,199,60,255,82,204,134,255,215,49,230,1,140,229,192,255,222,193,251,255,81,136,15,255,179,149,162,255,23,39,29,255,7,95,75,254,191,81,222,0,241,81,90,255,107,49,201,255,244,211,157,0,222,140,149,255,65,219,56,254,189,246,90,255,178,59,157,1,48,219,52,0,98,34,215,0,28,17,187,255,175,169,24,0,92,79,161,255,236,200,194,1,147,143,234,0,229,225,7,1,197,168,14,0,235,51,53,1,253,120,174,0,197,6,168,255,202,117,171,0,163,21,206,0,114,85,90,255,15,41,10,255,194,19,99,0,65,55,216,254,162,146,116,0,50,206,212,255,64,146,29,255,158,158,131,1,100,165,130,255,172,23,129,255,125,53,9,255,15,193,18,1,26,49,11,255,181,174,201,1,135,201,14,255,100,19,149,0,219,98,79,0,42,99,143,254,96,0,48,255,197,249,83,254,104,149,79,255,235,110,136,254,82,128,44,255,65,41,36,254,88,211,10,0,187,121,187,0,98,134,199,0,171,188,179,254,210,11,238,255,66,123,130,254,52,234,61,0,48,113,23,254,6,86,120,255,119,178,245,0,87,129,201,0,242,141,209,0,202,114,85,0,148,22,161,0,103,195,48,0,25,49,171,255,138,67,130,0,182,73,122,254,148,24,130,0,211,229,154,0,32,155,158,0,84,105,61,0,177,194,9,255,166,89,86,1,54,83,187,0,249,40,117,255,109,3,215,255,53,146,44,1,63,47,179,0,194,216,3,254,14,84,136,0,136,177,13,255,72,243,186,255,117,17,125,255,211,58,211,255,93,79,223,0,90,88,245,255,139,209,111,255,70,222,47,0,10,246,79,255,198,217,178,0,227,225,11,1,78,126,179,255,62,43,126,0,103,148,35,0,129,8,165,254,245,240,148,0,61,51,142,0,81,208,134,0,15,137,115,255,211,119,236,255,159,245,248,255,2,134,136,255,230,139,58,1,160,164,254,0,114,85,141,255,49,166,182,255,144,70,84,1,85,182,7,0,46,53,93,0,9,166,161,255,55,162,178,255,45,184,188,0,146,28,44,254,169,90,49,0,120,178,241,1,14,123,127,255,7,241,199,1,189,66,50,255,198,143,101,254,189,243,135,255,141,24,24,254,75,97,87,0,118,251,154,1,237,54,156,0,171,146,207,255,131,196,246,255,136,64,113,1,151,232,57,0,240,218,115,0,49,61,27,255,64,129,73,1,252,169,27,255,40,132,10,1,90,201,193,255,252,121,240,1,186,206,41,0,43,198,97,0,145,100,183,0,204,216,80,254,172,150,65,0,249,229,196,254,104,123,73,255,77,104,96,254,130,180,8,0,104,123,57,0,220,202,229,255,102,249,211,0,86,14,232,255,182,78,209,0,239,225,164,0,106,13,32,255,120,73,17,255,134,67,233,0,83,254,181,0,183,236,112,1,48,64,131,255,241,216,243,255,65,193,226,0,206,241,100,254,100,134,166,255,237,202,197,0,55,13,81,0,32,124,102,255,40,228,177,0,118,181,31,1,231,160,134,255,119,187,202,0,0,142,60,255,128,38,189,255,166,201,150,0,207,120,26,1,54,184,172,0,12,242,204,254,133,66,230,0,34,38,31,1,184,112,80,0,32,51,165,254,191,243,55,0,58,73,146,254,155,167,205,255,100,104,152,255,197,254,207,255,173,19,247,0,238,10,202,0,239,151,242,0,94,59,39,255,240,29,102,255,10,92,154,255,229,84,219,255,161,129,80,0,208,90,204,1,240,219,174,255,158,102,145,1,53,178,76,255,52,108,168,1,83,222,107,0,211,36,109,0,118,58,56,0,8,29,22,0,237,160,199,0,170,209,157,0,137,71,47,0,143,86,32,0,198,242,2,0,212,48,136,1,92,172,186,0,230,151,105,1,96,191,229,0,138,80,191,254,240,216,130,255,98,43,6,254,168,196,49,0,253,18,91,1,144,73,121,0,61,146,39,1,63,104,24,255,184,165,112,254,126,235,98,0,80,213,98,255,123,60,87,255,82,140,245,1,223,120,173,255,15,198,134,1,206,60,239,0,231,234,92,255,33,238,19,255,165,113,142,1,176,119,38,0,160,43,166,254,239,91,105,0,107,61,194,1,25,4,68,0,15,139,51,0,164,132,106,255,34,116,46,254,168,95,197,0,137,212,23,0,72,156,58,0,137,112,69,254,150,105,154,255,236,201,157,0,23,212,154,255,136,82,227,254,226,59,221,255,95,149,192,0,81,118,52,255,33,43,215,1,14,147,75,255,89,156,121,254,14,18,79,0,147,208,139,1,151,218,62,255,156,88,8,1,210,184,98,255,20,175,123,255,102,83,229,0,220,65,116,1,150,250,4,255,92,142,220,255,34,247,66,255,204,225,179,254,151,81,151,0,71,40,236,255,138,63,62,0,6,79,240,255,183,185,181,0,118,50,27,0,63,227,192,0,123,99,58,1,50,224,155,255,17,225,223,254,220,224,77,255,14,44,123,1,141,128,175,0,248,212,200,0,150,59,183,255,147,97,29,0,150,204,181,0,253,37,71,0,145,85,119,0,154,200,186,0,2,128,249,255,83,24,124,0,14,87,143,0,168,51,245,1,124,151,231,255,208,240,197,1,124,190,185,0,48,58,246,0,20,233,232,0,125,18,98,255,13,254,31,255,245,177,130,255,108,142,35,0,171,125,242,254,140,12,34,255,165,161,162,0,206,205,101,0,247,25,34,1,100,145,57,0,39,70,57,0,118,204,203,255,242,0,162,0,165,244,30,0,198,116,226,0,128,111,153,255,140,54,182,1,60,122,15,255,155,58,57,1,54,50,198,0,171,211,29,255,107,138,167,255,173,107,199,255,109,161,193,0,89,72,242,255,206,115,89,255,250,254,142,254,177,202,94,255,81,89,50,0,7,105,66,255,25,254,255,254,203,64,23,255,79,222,108,255,39,249,75,0,241,124,50,0,239,152,133,0,221,241,105,0,147,151,98,0,213,161,121,254,242,49,137,0,233,37,249,254,42,183,27,0,184,119,230,255,217,32,163,255,208,251,228,1,137,62,131,255,79,64,9,254,94,48,113,0,17,138,50,254,193,255,22,0,247,18,197,1,67,55,104,0,16,205,95,255,48,37,66,0,55,156,63,1,64,82,74,255,200,53,71,254,239,67,125,0,26,224,222,0,223,137,93,255,30,224,202,255,9,220,132,0,198,38,235,1,102,141,86,0,60,43,81,1,136,28,26,0,233,36,8,254,207,242,148,0,164,162,63,0,51,46,224,255,114,48,79,255,9,175,226,0,222,3,193,255,47,160,232,255,255,93,105,254,14,42,230,0,26,138,82,1,208,43,244,0,27,39,38,255,98,208,127,255,64,149,182,255,5,250,209,0,187,60,28,254,49,25,218,255,169,116,205,255,119,18,120,0,156,116,147,255,132,53,109,255,13,10,202,0,110,83,167,0,157,219,137,255,6,3,130,255,50,167,30,255,60,159,47,255,129,128,157,254,94,3,189,0,3,166,68,0,83,223,215,0,150,90,194,1,15,168,65,0,227,83,51,255,205,171,66,255,54,187,60,1,152,102,45,255,119,154,225,0,240,247,136,0,100,197,178,255,139,71,223,255,204,82,16,1,41,206,42,255,156,192,221,255,216,123,244,255,218,218,185,255,187,186,239,255,252,172,160,255,195,52,22,0,144,174,181,254,187,100,115,255,211,78,176,255,27,7,193,0,147,213,104,255,90,201,10,255,80,123,66,1,22,33,186,0,1,7,99,254,30,206,10,0,229,234,5,0,53,30,210,0,138,8,220,254,71,55,167,0,72,225,86,1,118,190,188,0,254,193,101,1,171,249,172,255,94,158,183,254,93,2,108,255,176,93,76,255,73,99,79,255,74,64,129,254,246,46,65,0,99,241,127,254,246,151,102,255,44,53,208,254,59,102,234,0,154,175,164,255,88,242,32,0,111,38,1,0,255,182,190,255,115,176,15,254,169,60,129,0,122,237,241,0,90,76,63,0,62,74,120,255,122,195,110,0,119,4,178,0,222,242,210,0,130,33,46,254,156,40,41,0,167,146,112,1,49,163,111,255,121,176,235,0,76,207,14,255,3,25,198,1,41,235,213,0,85,36,214,1,49,92,109,255,200,24,30,254,168,236,195,0,145,39,124,1,236,195,149,0,90,36,184,255,67,85,170,255,38,35,26,254,131,124,68,255,239,155,35,255,54,201,164,0,196,22,117,255,49,15,205,0,24,224,29,1,126,113,144,0,117,21,182,0,203,159,141,0,223,135,77,0,176,230,176,255,190,229,215,255,99,37,181,255,51,21,138,255,25,189,89,255,49,48,165,254,152,45,247,0,170,108,222,0,80,202,5,0,27,69,103,254,204,22,129,255,180,252,62,254,210,1,91,255,146,110,254,255,219,162,28,0,223,252,213,1,59,8,33,0,206,16,244,0,129,211,48,0,107,160,208,0,112,59,209,0,109,77,216,254,34,21,185,255,246,99,56,255,179,139,19,255,185,29,50,255,84,89,19,0,74,250,98,255,225,42,200,255,192,217,205,255,210,16,167,0,99,132,95,1,43,230,57,0,254,11,203,255,99,188,63,255,119,193,251,254,80,105,54,0,232,181,189,1,183,69,112,255,208,171,165,255,47,109,180,255,123,83,165,0,146,162,52,255,154,11,4,255,151,227,90,255,146,137,97,254,61,233,41,255,94,42,55,255,108,164,236,0,152,68,254,0,10,140,131,255,10,106,79,254,243,158,137,0,67,178,66,254,177,123,198,255,15,62,34,0,197,88,42,255,149,95,177,255,152,0,198,255,149,254,113,255,225,90,163,255,125,217,247,0,18,17,224,0,128,66,120,254,192,25,9,255,50,221,205,0,49,212,70,0,233,255,164,0,2,209,9,0,221,52,219,254,172,224,244,255,94,56,206,1,242,179,2,255,31,91,164,1,230,46,138,255,189,230,220,0,57,47,61,255,111,11,157,0,177,91,152,0,28,230,98,0,97,87,126,0,198,89,145,255,167,79,107,0,249,77,160,1,29,233,230,255,150,21,86,254,60,11,193,0,151,37,36,254,185,150,243,255,228,212,83,1,172,151,180,0,201,169,155,0,244,60,234,0,142,235,4,1,67,218,60,0,192,113,75,1,116,243,207,255,65,172,155,0,81,30,156,255,80,72,33,254,18,231,109,255,142,107,21,254,125,26,132,255,176,16,59,255,150,201,58,0,206,169,201,0,208,121,226,0,40,172,14,255,150,61,94,255,56,57,156,255,141,60,145,255,45,108,149,255,238,145,155,255,209,85,31,254,192,12,210,0,99,98,93,254,152,16,151,0,225,185,220,0,141,235,44,255,160,172,21,254,71,26,31,255,13,64,93,254,28,56,198,0,177,62,248,1,182,8,241,0,166,101,148,255,78,81,133,255,129,222,215,1,188,169,129,255,232,7,97,0,49,112,60,255,217,229,251,0,119,108,138,0,39,19,123,254,131,49,235,0,132,84,145,0,130,230,148,255,25,74,187,0,5,245,54,255,185,219,241,1,18,194,228,255,241,202,102,0,105,113,202,0,155,235,79,0,21,9,178,255,156,1,239,0,200,148,61,0,115,247,210,255,49,221,135,0,58,189,8,1,35,46,9,0,81,65,5,255,52,158,185,255,125,116,46,255,74,140,13,255,210,92,172,254,147,23,71,0,217,224,253,254,115,108,180,255,145,58,48,254,219,177,24,255,156,255,60,1,154,147,242,0,253,134,87,0,53,75,229,0,48,195,222,255,31,175,50,255,156,210,120,255,208,35,222,255,18,248,179,1,2,10,101,255,157,194,248,255,158,204,101,255,104,254,197,255,79,62,4,0,178,172,101,1,96,146,251,255,65,10,156,0,2,137,165,255,116,4,231,0,242,215,1,0,19,35,29,255,43,161,79,0,59,149,246,1,251,66,176,0,200,33,3,255,80,110,142,255,195,161,17,1,228,56,66,255,123,47,145,254,132,4,164,0,67,174,172,0,25,253,114,0,87,97,87,1,250,220,84,0,96,91,200,255,37,125,59,0,19,65,118,0,161,52,241,255,237,172,6,255,176,191,255,255,1,65,130,254,223,190,230,0,101,253,231,255,146,35,109,0,250,29,77,1,49,0,19,0,123,90,155,1,22,86,32,255,218,213,65,0,111,93,127,0,60,93,169,255,8,127,182,0,17,186,14,254,253,137,246,255,213,25,48,254,76,238,0,255,248,92,70,255,99,224,139,0,184,9,255,1,7,164,208,0,205,131,198,1,87,214,199,0,130,214,95,0,221,149,222,0,23,38,171,254,197,110,213,0,43,115,140,254,215,177,118,0,96,52,66,1,117,158,237,0,14,64,182,255,46,63,174,255,158,95,190,255,225,205,177,255,43,5,142,255,172,99,212,255,244,187,147,0,29,51,153,255,228,116,24,254,30,101,207,0,19,246,150,255,134,231,5,0,125,134,226,1,77,65,98,0,236,130,33,255,5,110,62,0,69,108,127,255,7,113,22,0,145,20,83,254,194,161,231,255,131,181,60,0,217,209,177,255,229,148,212,254,3,131,184,0,117,177,187,1,28,14,31,255,176,102,80,0,50,84,151,255,125,31,54,255,21,157,133,255,19,179,139,1,224,232,26,0,34,117,170,255,167,252,171,255,73,141,206,254,129,250,35,0,72,79,236,1,220,229,20,255,41,202,173,255,99,76,238,255,198,22,224,255,108,198,195,255,36,141,96,1,236,158,59,255,106,100,87,0,110,226,2,0,227,234,222,0,154,93,119,255,74,112,164,255,67,91,2,255,21,145,33,255,102,214,137,255,175,230,103,254,163,246,166,0,93,247,116,254,167,224,28,255,220,2,57,1,171,206,84,0,123,228,17,255,27,120,119,0,119,11,147,1,180,47,225,255,104,200,185,254,165,2,114,0,77,78,212,0,45,154,177,255,24,196,121,254,82,157,182,0,90,16,190,1,12,147,197,0,95,239,152,255,11,235,71,0,86,146,119,255,172,134,214,0,60,131,196,0,161,225,129,0,31,130,120,254,95,200,51,0,105,231,210,255,58,9,148,255,43,168,221,255,124,237,142,0,198,211,50,254,46,245,103,0,164,248,84,0,152,70,208,255,180,117,177,0,70,79,185,0,243,74,32,0,149,156,207,0,197,196,161,1,245,53,239,0,15,93,246,254,139,240,49,255,196,88,36,255,162,38,123,0,128,200,157,1,174,76,103,255,173,169,34,254,216,1,171,255,114,51,17,0,136,228,194,0,110,150,56,254,106,246,159,0,19,184,79,255,150,77,240,255,155,80,162,0,0,53,169,255,29,151,86,0,68,94,16,0,92,7,110,254,98,117,149,255,249,77,230,255,253,10,140,0,214,124,92,254,35,118,235,0,89,48,57,1,22,53,166,0,184,144,61,255,179,255,194,0,214,248,61,254,59,110,246,0,121,21,81,254,166,3,228,0,106,64,26,255,69,232,134,255,242,220,53,254,46,220,85,0,113,149,247,255,97,179,103,255,190,127,11,0,135,209,182,0,95,52,129,1,170,144,206,255,122,200,204,255,168,100,146,0,60,144,149,254,70,60,40,0,122,52,177,255,246,211,101,255,174,237,8,0,7,51,120,0,19,31,173,0,126,239,156,255,143,189,203,0,196,128,88,255,233,133,226,255,30,125,173,255,201,108,50,0,123,100,59,255,254,163,3,1,221,148,181,255,214,136,57,254,222,180,137,255,207,88,54,255,28,33,251,255,67,214,52,1,210,208,100,0,81,170,94,0,145,40,53,0,224,111,231,254,35,28,244,255,226,199,195,254,238,17,230,0,217,217,164,254,169,157,221,0,218,46,162,1,199,207,163,255,108,115,162,1,14,96,187,255,118,60,76,0,184,159,152,0,209,231,71,254,42,164,186,255,186,153,51,254,221,171,182,255,162,142,173,0,235,47,193,0,7,139,16,1,95,164,64,255,16,221,166,0,219,197,16,0,132,29,44,255,100,69,117,255,60,235,88,254,40,81,173,0,71,190,61,255,187,88,157,0,231,11,23,0,237,117,164,0,225,168,223,255,154,114,116,255,163,152,242,1,24,32,170,0,125,98,113,254,168,19,76,0,17,157,220,254,155,52,5,0,19,111,161,255,71,90,252,255,173,110,240,0,10,198,121,255,253,255,240,255,66,123,210,0,221,194,215,254,121,163,17,255,225,7,99,0,190,49,182,0,115,9,133,1,232,26,138,255,213,68,132,0,44,119,122,255,179,98,51,0,149,90,106,0,71,50,230,255,10,153,118,255,177,70,25,0,165,87,205,0,55,138,234,0,238,30,97,0,113,155,207,0,98,153,127,0,34,107,219,254,117,114,172,255,76,180,255,254,242,57,179,255,221,34,172,254,56,162,49,255,83,3,255,255,113,221,189,255,188,25,228,254,16,88,89,255,71,28,198,254,22,17,149,255,243,121,254,255,107,202,99,255,9,206,14,1,220,47,153,0,107,137,39,1,97,49,194,255,149,51,197,254,186,58,11,255,107,43,232,1,200,6,14,255,181,133,65,254,221,228,171,255,123,62,231,1,227,234,179,255,34,189,212,254,244,187,249,0,190,13,80,1,130,89,1,0,223,133,173,0,9,222,198,255,66,127,74,0,167,216,93,255,155,168,198,1,66,145,0,0,68,102,46,1,172,90,154,0,216,128,75,255,160,40,51,0,158,17,27,1,124,240,49,0,236,202,176,255,151,124,192,255,38,193,190,0,95,182,61,0,163,147,124,255,255,165,51,255,28,40,17,254,215,96,78,0,86,145,218,254,31,36,202,255,86,9,5,0,111,41,200,255,237,108,97,0,57,62,44,0,117,184,15,1,45,241,116,0,152,1,220,255,157,165,188,0,250,15,131,1,60,44,125,255,65,220,251,255,75,50,184,0,53,90,128,255,231,80,194,255,136,129,127,1,21,18,187,255,45,58,161,255,71,147,34,0,174,249,11,254,35,141,29,0,239,68,177,255,115,110,58,0,238,190,177,1,87,245,166,255,190,49,247,255,146,83,184,255,173,14,39,255,146,215,104,0,142,223,120,0,149,200,155,255,212,207,145,1,16,181,217,0,173,32,87,255,255,35,181,0,119,223,161,1,200,223,94,255,70,6,186,255,192,67,85,255,50,169,152,0,144,26,123,255,56,243,179,254,20,68,136,0,39,140,188,254,253,208,5,255,200,115,135,1,43,172,229,255,156,104,187,0,151,251,167,0,52,135,23,0,151,153,72,0,147,197,107,254,148,158,5,255,238,143,206,0,126,153,137,255,88,152,197,254,7,68,167,0,252,159,165,255,239,78,54,255,24,63,55,255,38,222,94,0,237,183,12,255,206,204,210,0,19,39,246,254,30,74,231,0,135,108,29,1,179,115,0,0,117,118,116,1,132,6,252,255,145,129,161,1,105,67,141,0,82,37,226,255,238,226,228,255,204,214,129,254,162,123,100,255,185,121,234,0,45,108,231,0,66,8,56,255,132,136,128,0,172,224,66,254,175,157,188,0,230,223,226,254,242,219,69,0,184,14,119,1,82,162,56,0,114,123,20,0,162,103,85,255,49,239,99,254,156,135,215,0,111,255,167,254,39,196,214,0,144,38,79,1,249,168,125,0,155,97,156,255,23,52,219,255,150,22,144,0,44,149,165,255,40,127,183,0,196,77,233,255,118,129,210,255,170,135,230,255,214,119,198,0,233,240,35,0,253,52,7,255,117,102,48,255,21,204,154,255,179,136,177,255,23,2,3,1,149,130,89,255,252,17,159,1,70,60,26,0,144,107,17,0,180,190,60,255,56,182,59,255,110,71,54,255,198,18,129,255,149,224,87,255,223,21,152,255,138,22,182,255,250,156,205,0,236,45,208,255,79,148,242,1,101,70,209,0,103,78,174,0,101,144,172,255,152,136,237,1,191,194,136,0,113,80,125,1,152,4,141,0,155,150,53,255,196,116,245,0,239,114,73,254,19,82,17,255,124,125,234,255,40,52,191,0,42,210,158,255,155,132,165,0,178,5,42,1,64,92,40,255,36,85,77,255,178,228,118,0,137,66,96,254,115,226,66,0,110,240,69,254,151,111,80,0,167,174,236,255,227,108,107,255,188,242,65,255,183,81,255,0,57,206,181,255,47,34,181,255,213,240,158,1,71,75,95,0,156,40,24,255,102,210,81,0,171,199,228,255,154,34,41,0,227,175,75,0,21,239,195,0,138,229,95,1,76,192,49,0,117,123,87,1,227,225,130,0,125,62,63,255,2,198,171,0,254,36,13,254,145,186,206,0,148,255,244,255,35,0,166,0,30,150,219,1,92,228,212,0,92,198,60,254,62,133,200,255,201,41,59,0,125,238,109,255,180,163,238,1,140,122,82,0,9,22,88,255,197,157,47,255,153,94,57,0,88,30,182,0,84,161,85,0,178,146,124,0,166,166,7,255,21,208,223,0,156,182,242,0,155,121,185,0,83,156,174,254,154,16,118,255,186,83,232,1,223,58,121,255,29,23,88,0,35,125,127,255,170,5,149,254,164,12,130,255,155,196,29,0,161,96,136,0,7,35,29,1,162,37,251,0,3,46,242,255,0,217,188,0,57,174,226,1,206,233,2,0,57,187,136,254,123,189,9,255,201,117,127,255,186,36,204,0,231,25,216,0,80,78,105,0,19,134,129,255,148,203,68,0,141,81,125,254,248,165,200,255,214,144,135,0,151,55,166,255,38,235,91,0,21,46,154,0,223,254,150,255,35,153,180,255,125,176,29,1,43,98,30,255,216,122,230,255,233,160,12,0,57,185,12,254,240,113,7,255,5,9,16,254,26,91,108,0,109,198,203,0,8,147,40,0,129,134,228,255,124,186,40,255,114,98,132,254,166,132,23,0,99,69,44,0,9,242,238,255,184,53,59,0,132,129,102,255,52,32,243,254,147,223,200,255,123,83,179,254,135,144,201,255,141,37,56,1,151,60,227,255,90,73,156,1,203,172,187,0,80,151,47,255,94,137,231,255,36,191,59,255,225,209,181,255,74,215,213,254,6,118,179,255,153,54,193,1,50,0,231,0,104,157,72,1,140,227,154,255,182,226,16,254,96,225,92,255,115,20,170,254,6,250,78,0,248,75,173,255,53,89,6,255,0,180,118,0,72,173,1,0,64,8,206,1,174,133,223,0,185,62,133,255,214,11,98,0,197,31,208,0,171,167,244,255,22,231,181,1,150,218,185,0,247,169,97,1,165,139,247,255,47,120,149,1,103,248,51,0,60,69,28,254,25,179,196,0,124,7,218,254,58,107,81,0,184,233,156,255,252,74,36,0,118,188,67,0,141,95,53,255,222,94,165,254,46,61,53,0,206,59,115,255,47,236,250,255,74,5,32,1,129,154,238,255,106,32,226,0,121,187,61,255,3,166,241,254,67,170,172,255,29,216,178,255,23,201,252,0,253,110,243,0,200,125,57,0,109,192,96,255,52,115,238,0,38,121,243,255,201,56,33,0,194,118,130,0,75,96,25,255,170,30,230,254,39,63,253,0,36,45,250,255,251,1,239,0,160,212,92,1,45,209,237,0,243,33,87,254,237,84,201,255,212,18,157,254,212,99,127,255,217,98,16,254,139,172,239,0,168,201,130,255,143,193,169,255,238,151,193,1,215,104,41,0,239,61,165,254,2,3,242,0,22,203,177,254,177,204,22,0,149,129,213,254,31,11,41,255,0,159,121,254,160,25,114,255,162,80,200,0,157,151,11,0,154,134,78,1,216,54,252,0,48,103,133,0,105,220,197,0,253,168,77,254,53,179,23,0,24,121,240,1,255,46,96,255,107,60,135,254,98,205,249,255,63,249,119,255,120,59,211,255,114,180,55,254,91,85,237,0,149,212,77,1,56,73,49,0,86,198,150,0,93,209,160,0,69,205,182,255,244,90,43,0,20,36,176,0,122,116,221,0,51,167,39,1,231,1,63,255,13,197,134,0,3,209,34,255,135,59,202,0,167,100,78,0,47,223,76,0,185,60,62,0,178,166,123,1,132,12,161,255,61,174,43,0,195,69,144,0,127,47,191,1,34,44,78,0,57,234,52,1,255,22,40,255,246,94,146,0,83,228,128,0,60,78,224,255,0,96,210,255,153,175,236,0,159,21,73,0,180,115,196,254,131,225,106,0,255,167,134,0,159,8,112,255,120,68,194,255,176,196,198,255,118,48,168,255,93,169,1,0,112,200,102,1,74,24,254,0,19,141,4,254,142,62,63,0,131,179,187,255,77,156,155,255,119,86,164,0,170,208,146,255,208,133,154,255,148,155,58,255,162,120,232,254,252,213,155,0,241,13,42,0,94,50,131,0,179,170,112,0,140,83,151,255,55,119,84,1,140,35,239,255,153,45,67,1,236,175,39,0,54,151,103,255,158,42,65,255,196,239,135,254,86,53,203,0,149,97,47,254,216,35,17,255,70,3,70,1,103,36,90,255,40,26,173,0,184,48,13,0,163,219,217,255,81,6,1,255,221,170,108,254,233,208,93,0,100,201,249,254,86,36,35,255,209,154,30,1,227,201,251,255,2,189,167,254,100,57,3,0,13,128,41,0,197,100,75,0,150,204,235,255,145,174,59,0,120,248,149,255,85,55,225,0,114,210,53,254,199,204,119,0,14,247,74,1,63,251,129,0,67,104,151,1,135,130,80,0,79,89,55,255,117,230,157,255,25,96,143,0,213,145,5,0,69,241,120,1,149,243,95,255,114,42,20,0,131,72,2,0,154,53,20,255,73,62,109,0,196,102,152,0,41,12,204,255,122,38,11,1,250,10,145,0,207,125,148,0,246,244,222,255,41,32,85,1,112,213,126,0,162,249,86,1,71,198,127,255,81,9,21,1,98,39,4,255,204,71,45,1,75,111,137,0,234,59,231,0,32,48,95,255,204,31,114,1,29,196,181,255,51,241,167,254,93,109,142,0,104,144,45,0,235,12,181,255,52,112,164,0,76,254,202,255,174,14,162,0,61,235,147,255,43,64,185,254,233,125,217,0,243,88,167,254,74,49,8,0,156,204,66,0,124,214,123,0,38,221,118,1,146,112,236,0,114,98,177,0,151,89,199,0,87,197,112,0,185,149,161,0,44,96,165,0,248,179,20,255,188,219,216,254,40,62,13,0,243,142,141,0,229,227,206,255,172,202,35,255,117,176,225,255,82,110,38,1,42,245,14,255,20,83,97,0,49,171,10,0,242,119,120,0,25,232,61,0,212,240,147,255,4,115,56,255,145,17,239,254,202,17,251,255,249,18,245,255,99,117,239,0,184,4,179,255,246,237,51,255,37,239,137,255,166,112,166,255,81,188,33,255,185,250,142,255,54,187,173,0,208,112,201,0,246,43,228,1,104,184,88,255,212,52,196,255,51,117,108,255,254,117,155,0,46,91,15,255,87,14,144,255,87,227,204,0,83,26,83,1,159,76,227,0,159,27,213,1,24,151,108,0,117,144,179,254,137,209,82,0,38,159,10,0,115,133,201,0,223,182,156,1,110,196,93,255,57,60,233,0,5,167,105,255,154,197,164,0,96,34,186,255,147,133,37,1,220,99,190,0,1,167,84,255,20,145,171,0,194,197,251,254,95,78,133,255,252,248,243,255,225,93,131,255,187,134,196,255,216,153,170,0,20,118,158,254,140,1,118,0,86,158,15,1,45,211,41,255,147,1,100,254,113,116,76,255,211,127,108,1,103,15,48,0,193,16,102,1,69,51,95,255,107,128,157,0,137,171,233,0,90,124,144,1,106,161,182,0,175,76,236,1,200,141,172,255,163,58,104,0,233,180,52,255,240,253,14,255,162,113,254,255,38,239,138,254,52,46,166,0,241,101,33,254,131,186,156,0,111,208,62,255,124,94,160,255,31,172,254,0,112,174,56,255,188,99,27,255,67,138,251,0,125,58,128,1,156,152,174,255,178,12,247,255,252,84,158,0,82,197,14,254,172,200,83,255,37,39,46,1,106,207,167,0,24,189,34,0,131,178,144,0,206,213,4,0,161,226,210,0,72,51,105,255,97,45,187,255,78,184,223,255,176,29,251,0,79,160,86,255,116,37,178,0,82,77,213,1,82,84,141,255,226,101,212,1,175,88,199,255,245,94,247,1,172,118,109,255,166,185,190,0,131,181,120,0,87,254,93,255,134,240,73,255,32,245,143,255,139,162,103,255,179,98,18,254,217,204,112,0,147,223,120,255,53,10,243,0,166,140,150,0,125,80,200,255,14,109,219,255,91,218,1,255,252,252,47,254,109,156,116,255,115,49,127,1,204,87,211,255,148,202,217,255,26,85,249,255,14,245,134,1,76,89,169,255,242,45,230,0,59,98,172,255,114,73,132,254,78,155,49,255,158,126,84,0,49,175,43,255,16,182,84,255,157,103,35,0,104,193,109,255,67,221,154,0,201,172,1,254,8,162,88,0,165,1,29,255,125,155,229,255,30,154,220,1,103,239,92,0,220,1,109,255,202,198,1,0,94,2,142,1,36,54,44,0,235,226,158,255,170,251,214,255,185,77,9,0,97,74,242,0,219,163,149,255,240,35,118,255,223,114,88,254,192,199,3,0,106,37,24,255,201,161,118,255,97,89,99,1,224,58,103,255,101,199,147,254,222,60,99,0,234,25,59,1,52,135,27,0,102,3,91,254,168,216,235,0,229,232,136,0,104,60,129,0,46,168,238,0,39,191,67,0,75,163,47,0,143,97,98,255,56,216,168,1,168,233,252,255,35,111,22,255,92,84,43,0,26,200,87,1,91,253,152,0,202,56,70,0,142,8,77,0,80,10,175,1,252,199,76,0,22,110,82,255,129,1,194,0,11,128,61,1,87,14,145,255,253,222,190,1,15,72,174,0,85,163,86,254,58,99,44,255,45,24,188,254,26,205,15,0,19,229,210,254,248,67,195,0,99,71,184,0,154,199,37,255,151,243,121,255,38,51,75,255,201,85,130,254,44,65,250,0,57,147,243,254,146,43,59,255,89,28,53,0,33,84,24,255,179,51,18,254,189,70,83,0,11,156,179,1,98,134,119,0,158,111,111,0,119,154,73,255,200,63,140,254,45,13,13,255,154,192,2,254,81,72,42,0,46,160,185,254,44,112,6,0,146,215,149,1,26,176,104,0,68,28,87,1,236,50,153,255,179,128,250,254,206,193,191,255,166,92,137,254,53,40,239,0,210,1,204,254,168,173,35,0,141,243,45,1,36,50,109,255,15,242,194,255,227,159,122,255,176,175,202,254,70,57,72,0,40,223,56,0,208,162,58,255,183,98,93,0,15,111,12,0,30,8,76,255,132,127,246,255,45,242,103,0,69,181,15,255,10,209,30,0,3,179,121,0,241,232,218,1,123,199,88,255,2,210,202,1,188,130,81,255,94,101,208,1,103,36,45], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); +/* memory initializer */ allocate([76,193,24,1,95,26,241,255,165,162,187,0,36,114,140,0,202,66,5,255,37,56,147,0,152,11,243,1,127,85,232,255,250,135,212,1,185,177,113,0,90,220,75,255,69,248,146,0,50,111,50,0,92,22,80,0,244,36,115,254,163,100,82,255,25,193,6,1,127,61,36,0,253,67,30,254,65,236,170,255,161,17,215,254,63,175,140,0,55,127,4,0,79,112,233,0,109,160,40,0,143,83,7,255,65,26,238,255,217,169,140,255,78,94,189,255,0,147,190,255,147,71,186,254,106,77,127,255,233,157,233,1,135,87,237,255,208,13,236,1,155,109,36,255,180,100,218,0,180,163,18,0,190,110,9,1,17,63,123,255,179,136,180,255,165,123,123,255,144,188,81,254,71,240,108,255,25,112,11,255,227,218,51,255,167,50,234,255,114,79,108,255,31,19,115,255,183,240,99,0,227,87,143,255,72,217,248,255,102,169,95,1,129,149,149,0,238,133,12,1,227,204,35,0,208,115,26,1,102,8,234,0,112,88,143,1,144,249,14,0,240,158,172,254,100,112,119,0,194,141,153,254,40,56,83,255,121,176,46,0,42,53,76,255,158,191,154,0,91,209,92,0,173,13,16,1,5,72,226,255,204,254,149,0,80,184,207,0,100,9,122,254,118,101,171,255,252,203,0,254,160,207,54,0,56,72,249,1,56,140,13,255,10,64,107,254,91,101,52,255,225,181,248,1,139,255,132,0,230,145,17,0,233,56,23,0,119,1,241,255,213,169,151,255,99,99,9,254,185,15,191,255,173,103,109,1,174,13,251,255,178,88,7,254,27,59,68,255,10,33,2,255,248,97,59,0,26,30,146,1,176,147,10,0,95,121,207,1,188,88,24,0,185,94,254,254,115,55,201,0,24,50,70,0,120,53,6,0,142,66,146,0,228,226,249,255,104,192,222,1,173,68,219,0,162,184,36,255,143,102,137,255,157,11,23,0,125,45,98,0,235,93,225,254,56,112,160,255,70,116,243,1,153,249,55,255,129,39,17,1,241,80,244,0,87,69,21,1,94,228,73,255,78,66,65,255,194,227,231,0,61,146,87,255,173,155,23,255,112,116,219,254,216,38,11,255,131,186,133,0,94,212,187,0,100,47,91,0,204,254,175,255,222,18,215,254,173,68,108,255,227,228,79,255,38,221,213,0,163,227,150,254,31,190,18,0,160,179,11,1,10,90,94,255,220,174,88,0,163,211,229,255,199,136,52,0,130,95,221,255,140,188,231,254,139,113,128,255,117,171,236,254,49,220,20,255,59,20,171,255,228,109,188,0,20,225,32,254,195,16,174,0,227,254,136,1,135,39,105,0,150,77,206,255,210,238,226,0,55,212,132,254,239,57,124,0,170,194,93,255,249,16,247,255,24,151,62,255,10,151,10,0,79,139,178,255,120,242,202,0,26,219,213,0,62,125,35,255,144,2,108,255,230,33,83,255,81,45,216,1,224,62,17,0,214,217,125,0,98,153,153,255,179,176,106,254,131,93,138,255,109,62,36,255,178,121,32,255,120,252,70,0,220,248,37,0,204,88,103,1,128,220,251,255,236,227,7,1,106,49,198,255,60,56,107,0,99,114,238,0,220,204,94,1,73,187,1,0,89,154,34,0,78,217,165,255,14,195,249,255,9,230,253,255,205,135,245,0,26,252,7,255,84,205,27,1,134,2,112,0,37,158,32,0,231,91,237,255,191,170,204,255,152,7,222,0,109,192,49,0,193,166,146,255,232,19,181,255,105,142,52,255,103,16,27,1,253,200,165,0,195,217,4,255,52,189,144,255,123,155,160,254,87,130,54,255,78,120,61,255,14,56,41,0,25,41,125,255,87,168,245,0,214,165,70,0,212,169,6,255,219,211,194,254,72,93,164,255,197,33,103,255,43,142,141,0,131,225,172,0,244,105,28,0,68,68,225,0,136,84,13,255,130,57,40,254,139,77,56,0,84,150,53,0,54,95,157,0,144,13,177,254,95,115,186,0,117,23,118,255,244,166,241,255,11,186,135,0,178,106,203,255,97,218,93,0,43,253,45,0,164,152,4,0,139,118,239,0,96,1,24,254,235,153,211,255,168,110,20,255,50,239,176,0,114,41,232,0,193,250,53,0,254,160,111,254,136,122,41,255,97,108,67,0,215,152,23,255,140,209,212,0,42,189,163,0,202,42,50,255,106,106,189,255,190,68,217,255,233,58,117,0,229,220,243,1,197,3,4,0,37,120,54,254,4,156,134,255,36,61,171,254,165,136,100,255,212,232,14,0,90,174,10,0,216,198,65,255,12,3,64,0,116,113,115,255,248,103,8,0,231,125,18,255,160,28,197,0,30,184,35,1,223,73,249,255,123,20,46,254,135,56,37,255,173,13,229,1,119,161,34,255,245,61,73,0,205,125,112,0,137,104,134,0,217,246,30,255,237,142,143,0,65,159,102,255,108,164,190,0,219,117,173,255,34,37,120,254,200,69,80,0,31,124,218,254,74,27,160,255,186,154,199,255,71,199,252,0,104,81,159,1,17,200,39,0,211,61,192,1,26,238,91,0,148,217,12,0,59,91,213,255,11,81,183,255,129,230,122,255,114,203,145,1,119,180,66,255,72,138,180,0,224,149,106,0,119,82,104,255,208,140,43,0,98,9,182,255,205,101,134,255,18,101,38,0,95,197,166,255,203,241,147,0,62,208,145,255,133,246,251,0,2,169,14,0,13,247,184,0,142,7,254,0,36,200,23,255,88,205,223,0,91,129,52,255,21,186,30,0,143,228,210,1,247,234,248,255,230,69,31,254,176,186,135,255,238,205,52,1,139,79,43,0,17,176,217,254,32,243,67,0,242,111,233,0,44,35,9,255,227,114,81,1,4,71,12,255,38,105,191,0,7,117,50,255,81,79,16,0,63,68,65,255,157,36,110,255,77,241,3,255,226,45,251,1,142,25,206,0,120,123,209,1,28,254,238,255,5,128,126,255,91,222,215,255,162,15,191,0,86,240,73,0,135,185,81,254,44,241,163,0,212,219,210,255,112,162,155,0,207,101,118,0,168,72,56,255,196,5,52,0,72,172,242,255,126,22,157,255,146,96,59,255,162,121,152,254,140,16,95,0,195,254,200,254,82,150,162,0,119,43,145,254,204,172,78,255,166,224,159,0,104,19,237,255,245,126,208,255,226,59,213,0,117,217,197,0,152,72,237,0,220,31,23,254,14,90,231,255,188,212,64,1,60,101,246,255,85,24,86,0,1,177,109,0,146,83,32,1,75,182,192,0,119,241,224,0,185,237,27,255,184,101,82,1,235,37,77,255,253,134,19,0,232,246,122,0,60,106,179,0,195,11,12,0,109,66,235,1,125,113,59,0,61,40,164,0,175,104,240,0,2,47,187,255,50,12,141,0,194,139,181,255,135,250,104,0,97,92,222,255,217,149,201,255,203,241,118,255,79,151,67,0,122,142,218,255,149,245,239,0,138,42,200,254,80,37,97,255,124,112,167,255,36,138,87,255,130,29,147,255,241,87,78,255,204,97,19,1,177,209,22,255,247,227,127,254,99,119,83,255,212,25,198,1,16,179,179,0,145,77,172,254,89,153,14,255,218,189,167,0,107,233,59,255,35,33,243,254,44,112,112,255,161,127,79,1,204,175,10,0,40,21,138,254,104,116,228,0,199,95,137,255,133,190,168,255,146,165,234,1,183,99,39,0,183,220,54,254,255,222,133,0,162,219,121,254,63,239,6,0,225,102,54,255,251,18,246,0,4,34,129,1,135,36,131,0,206,50,59,1,15,97,183,0,171,216,135,255,101,152,43,255,150,251,91,0,38,145,95,0,34,204,38,254,178,140,83,255,25,129,243,255,76,144,37,0,106,36,26,254,118,144,172,255,68,186,229,255,107,161,213,255,46,163,68,255,149,170,253,0,187,17,15,0,218,160,165,255,171,35,246,1,96,13,19,0,165,203,117,0,214,107,192,255,244,123,177,1,100,3,104,0,178,242,97,255,251,76,130,255,211,77,42,1,250,79,70,255,63,244,80,1,105,101,246,0,61,136,58,1,238,91,213,0,14,59,98,255,167,84,77,0,17,132,46,254,57,175,197,255,185,62,184,0,76,64,207,0,172,175,208,254,175,74,37,0,138,27,211,254,148,125,194,0,10,89,81,0,168,203,101,255,43,213,209,1,235,245,54,0,30,35,226,255,9,126,70,0,226,125,94,254,156,117,20,255,57,248,112,1,230,48,64,255,164,92,166,1,224,214,230,255,36,120,143,0,55,8,43,255,251,1,245,1,106,98,165,0,74,107,106,254,53,4,54,255,90,178,150,1,3,120,123,255,244,5,89,1,114,250,61,255,254,153,82,1,77,15,17,0,57,238,90,1,95,223,230,0,236,52,47,254,103,148,164,255,121,207,36,1,18,16,185,255,75,20,74,0,187,11,101,0,46,48,129,255,22,239,210,255,77,236,129,255,111,77,204,255,61,72,97,255,199,217,251,255,42,215,204,0,133,145,201,255,57,230,146,1,235,100,198,0,146,73,35,254,108,198,20,255,182,79,210,255,82,103,136,0,246,108,176,0,34,17,60,255,19,74,114,254,168,170,78,255,157,239,20,255,149,41,168,0,58,121,28,0,79,179,134,255,231,121,135,255,174,209,98,255,243,122,190,0,171,166,205,0,212,116,48,0,29,108,66,255,162,222,182,1,14,119,21,0,213,39,249,255,254,223,228,255,183,165,198,0,133,190,48,0,124,208,109,255,119,175,85,255,9,209,121,1,48,171,189,255,195,71,134,1,136,219,51,255,182,91,141,254,49,159,72,0,35,118,245,255,112,186,227,255,59,137,31,0,137,44,163,0,114,103,60,254,8,213,150,0,162,10,113,255,194,104,72,0,220,131,116,255,178,79,92,0,203,250,213,254,93,193,189,255,130,255,34,254,212,188,151,0,136,17,20,255,20,101,83,255,212,206,166,0,229,238,73,255,151,74,3,255,168,87,215,0,155,188,133,255,166,129,73,0,240,79,133,255,178,211,81,255,203,72,163,254,193,168,165,0,14,164,199,254,30,255,204,0,65,72,91,1,166,74,102,255,200,42,0,255,194,113,227,255,66,23,208,0,229,216,100,255,24,239,26,0,10,233,62,255,123,10,178,1,26,36,174,255,119,219,199,1,45,163,190,0,16,168,42,0,166,57,198,255,28,26,26,0,126,165,231,0,251,108,100,255,61,229,121,255,58,118,138,0,76,207,17,0,13,34,112,254,89,16,168,0,37,208,105,255,35,201,215,255,40,106,101,254,6,239,114,0,40,103,226,254,246,127,110,255,63,167,58,0,132,240,142,0,5,158,88,255,129,73,158,255,94,89,146,0,230,54,146,0,8,45,173,0,79,169,1,0,115,186,247,0,84,64,131,0,67,224,253,255,207,189,64,0,154,28,81,1,45,184,54,255,87,212,224,255,0,96,73,255,129,33,235,1,52,66,80,255,251,174,155,255,4,179,37,0,234,164,93,254,93,175,253,0,198,69,87,255,224,106,46,0,99,29,210,0,62,188,114,255,44,234,8,0,169,175,247,255,23,109,137,255,229,182,39,0,192,165,94,254,245,101,217,0,191,88,96,0,196,94,99,255,106,238,11,254,53,126,243,0,94,1,101,255,46,147,2,0,201,124,124,255,141,12,218,0,13,166,157,1,48,251,237,255,155,250,124,255,106,148,146,255,182,13,202,0,28,61,167,0,217,152,8,254,220,130,45,255,200,230,255,1,55,65,87,255,93,191,97,254,114,251,14,0,32,105,92,1,26,207,141,0,24,207,13,254,21,50,48,255,186,148,116,255,211,43,225,0,37,34,162,254,164,210,42,255,68,23,96,255,182,214,8,255,245,117,137,255,66,195,50,0,75,12,83,254,80,140,164,0,9,165,36,1,228,110,227,0,241,17,90,1,25,52,212,0,6,223,12,255,139,243,57,0,12,113,75,1,246,183,191,255,213,191,69,255,230,15,142,0,1,195,196,255,138,171,47,255,64,63,106,1,16,169,214,255,207,174,56,1,88,73,133,255,182,133,140,0,177,14,25,255,147,184,53,255,10,227,161,255,120,216,244,255,73,77,233,0,157,238,139,1,59,65,233,0,70,251,216,1,41,184,153,255,32,203,112,0,146,147,253,0,87,101,109,1,44,82,133,255,244,150,53,255,94,152,232,255,59,93,39,255,88,147,220,255,78,81,13,1,32,47,252,255,160,19,114,255,93,107,39,255,118,16,211,1,185,119,209,255,227,219,127,254,88,105,236,255,162,110,23,255,36,166,110,255,91,236,221,255,66,234,116,0,111,19,244,254,10,233,26,0,32,183,6,254,2,191,242,0,218,156,53,254,41,60,70,255,168,236,111,0,121,185,126,255,238,142,207,255,55,126,52,0,220,129,208,254,80,204,164,255,67,23,144,254,218,40,108,255,127,202,164,0,203,33,3,255,2,158,0,0,37,96,188,255,192,49,74,0,109,4,0,0,111,167,10,254,91,218,135,255,203,66,173,255,150,194,226,0,201,253,6,255,174,102,121,0,205,191,110,0,53,194,4,0,81,40,45,254,35,102,143,255,12,108,198,255,16,27,232,255,252,71,186,1,176,110,114,0,142,3,117,1,113,77,142,0,19,156,197,1,92,47,252,0,53,232,22,1,54,18,235,0,46,35,189,255,236,212,129,0,2,96,208,254,200,238,199,255,59,175,164,255,146,43,231,0,194,217,52,255,3,223,12,0,138,54,178,254,85,235,207,0,232,207,34,0,49,52,50,255,166,113,89,255,10,45,216,255,62,173,28,0,111,165,246,0,118,115,91,255,128,84,60,0,167,144,203,0,87,13,243,0,22,30,228,1,177,113,146,255,129,170,230,254,252,153,129,255,145,225,43,0,70,231,5,255,122,105,126,254,86,246,148,255,110,37,154,254,209,3,91,0,68,145,62,0,228,16,165,255,55,221,249,254,178,210,91,0,83,146,226,254,69,146,186,0,93,210,104,254,16,25,173,0,231,186,38,0,189,122,140,255,251,13,112,255,105,110,93,0,251,72,170,0,192,23,223,255,24,3,202,1,225,93,228,0,153,147,199,254,109,170,22,0,248,101,246,255,178,124,12,255,178,254,102,254,55,4,65,0,125,214,180,0,183,96,147,0,45,117,23,254,132,191,249,0,143,176,203,254,136,183,54,255,146,234,177,0,146,101,86,255,44,123,143,1,33,209,152,0,192,90,41,254,83,15,125,255,213,172,82,0,215,169,144,0,16,13,34,0,32,209,100,255,84,18,249,1,197,17,236,255,217,186,230,0,49,160,176,255,111,118,97,255,237,104,235,0,79,59,92,254,69,249,11,255,35,172,74,1,19,118,68,0,222,124,165,255,180,66,35,255,86,174,246,0,43,74,111,255,126,144,86,255,228,234,91,0,242,213,24,254,69,44,235,255,220,180,35,0,8,248,7,255,102,47,92,255,240,205,102,255,113,230,171,1,31,185,201,255,194,246,70,255,122,17,187,0,134,70,199,255,149,3,150,255,117,63,103,0,65,104,123,255,212,54,19,1,6,141,88,0,83,134,243,255,136,53,103,0,169,27,180,0,177,49,24,0,111,54,167,0,195,61,215,255,31,1,108,1,60,42,70,0,185,3,162,255,194,149,40,255,246,127,38,254,190,119,38,255,61,119,8,1,96,161,219,255,42,203,221,1,177,242,164,255,245,159,10,0,116,196,0,0,5,93,205,254,128,127,179,0,125,237,246,255,149,162,217,255,87,37,20,254,140,238,192,0,9,9,193,0,97,1,226,0,29,38,10,0,0,136,63,255,229,72,210,254,38,134,92,255,78,218,208,1,104,36,84,255,12,5,193,255,242,175,61,255,191,169,46,1,179,147,147,255,113,190,139,254,125,172,31,0,3,75,252,254,215,36,15,0,193,27,24,1,255,69,149,255,110,129,118,0,203,93,249,0,138,137,64,254,38,70,6,0,153,116,222,0,161,74,123,0,193,99,79,255,118,59,94,255,61,12,43,1,146,177,157,0,46,147,191,0,16,255,38,0,11,51,31,1,60,58,98,255,111,194,77,1,154,91,244,0,140,40,144,1,173,10,251,0,203,209,50,254,108,130,78,0,228,180,90,0,174,7,250,0,31,174,60,0,41,171,30,0,116,99,82,255,118,193,139,255,187,173,198,254,218,111,56,0,185,123,216,0,249,158,52,0,52,180,93,255,201,9,91,255,56,45,166,254,132,155,203,255,58,232,110,0,52,211,89,255,253,0,162,1,9,87,183,0,145,136,44,1,94,122,245,0,85,188,171,1,147,92,198,0,0,8,104,0,30,95,174,0,221,230,52,1,247,247,235,255,137,174,53,255,35,21,204,255,71,227,214,1,232,82,194,0,11,48,227,255,170,73,184,255,198,251,252,254,44,112,34,0,131,101,131,255,72,168,187,0,132,135,125,255,138,104,97,255,238,184,168,255,243,104,84,255,135,216,226,255,139,144,237,0,188,137,150,1,80,56,140,255,86,169,167,255,194,78,25,255,220,17,180,255,17,13,193,0,117,137,212,255,141,224,151,0,49,244,175,0,193,99,175,255,19,99,154,1,255,65,62,255,156,210,55,255,242,244,3,255,250,14,149,0,158,88,217,255,157,207,134,254,251,232,28,0,46,156,251,255,171,56,184,255,239,51,234,0,142,138,131,255,25,254,243,1,10,201,194,0,63,97,75,0,210,239,162,0,192,200,31,1,117,214,243,0,24,71,222,254,54,40,232,255,76,183,111,254,144,14,87,255,214,79,136,255,216,196,212,0,132,27,140,254,131,5,253,0,124,108,19,255,28,215,75,0,76,222,55,254,233,182,63,0,68,171,191,254,52,111,222,255,10,105,77,255,80,170,235,0,143,24,88,255,45,231,121,0,148,129,224,1,61,246,84,0,253,46,219,255,239,76,33,0,49,148,18,254,230,37,69,0,67,134,22,254,142,155,94,0,31,157,211,254,213,42,30,255,4,228,247,254,252,176,13,255,39,0,31,254,241,244,255,255,170,45,10,254,253,222,249,0,222,114,132,0,255,47,6,255,180,163,179,1,84,94,151,255,89,209,82,254,229,52,169,255,213,236,0,1,214,56,228,255,135,119,151,255,112,201,193,0,83,160,53,254,6,151,66,0,18,162,17,0,233,97,91,0,131,5,78,1,181,120,53,255,117,95,63,255,237,117,185,0,191,126,136,255,144,119,233,0,183,57,97,1,47,201,187,255,167,165,119,1,45,100,126,0,21,98,6,254,145,150,95,255,120,54,152,0,209,98,104,0,143,111,30,254,184,148,249,0,235,216,46,0,248,202,148,255,57,95,22,0,242,225,163,0,233,247,232,255,71,171,19,255,103,244,49,255,84,103,93,255,68,121,244,1,82,224,13,0,41,79,43,255,249,206,167,255,215,52,21,254,192,32,22,255,247,111,60,0,101,74,38,255,22,91,84,254,29,28,13,255,198,231,215,254,244,154,200,0,223,137,237,0,211,132,14,0,95,64,206,255,17,62,247,255,233,131,121,1,93,23,77,0,205,204,52,254,81,189,136,0,180,219,138,1,143,18,94,0,204,43,140,254,188,175,219,0,111,98,143,255,151,63,162,255,211,50,71,254,19,146,53,0,146,45,83,254,178,82,238,255,16,133,84,255,226,198,93,255,201,97,20,255,120,118,35,255,114,50,231,255,162,229,156,255,211,26,12,0,114,39,115,255,206,212,134,0,197,217,160,255,116,129,94,254,199,215,219,255,75,223,249,1,253,116,181,255,232,215,104,255,228,130,246,255,185,117,86,0,14,5,8,0,239,29,61,1,237,87,133,255,125,146,137,254,204,168,223,0,46,168,245,0,154,105,22,0,220,212,161,255,107,69,24,255,137,218,181,255,241,84,198,255,130,122,211,255,141,8,153,255,190,177,118,0,96,89,178,0,255,16,48,254,122,96,105,255,117,54,232,255,34,126,105,255,204,67,166,0,232,52,138,255,211,147,12,0,25,54,7,0,44,15,215,254,51,236,45,0,190,68,129,1,106,147,225,0,28,93,45,254,236,141,15,255,17,61,161,0,220,115,192,0,236,145,24,254,111,168,169,0,224,58,63,255,127,164,188,0,82,234,75,1,224,158,134,0,209,68,110,1,217,166,217,0,70,225,166,1,187,193,143,255,16,7,88,255,10,205,140,0,117,192,156,1,17,56,38,0,27,124,108,1,171,215,55,255,95,253,212,0,155,135,168,255,246,178,153,254,154,68,74,0,232,61,96,254,105,132,59,0,33,76,199,1,189,176,130,255,9,104,25,254,75,198,102,255,233,1,112,0,108,220,20,255,114,230,70,0,140,194,133,255,57,158,164,254,146,6,80,255,169,196,97,1,85,183,130,0,70,158,222,1,59,237,234,255,96,25,26,255,232,175,97,255,11,121,248,254,88,35,194,0,219,180,252,254,74,8,227,0,195,227,73,1,184,110,161,255,49,233,164,1,128,53,47,0,82,14,121,255,193,190,58,0,48,174,117,255,132,23,32,0,40,10,134,1,22,51,25,255,240,11,176,255,110,57,146,0,117,143,239,1,157,101,118,255,54,84,76,0,205,184,18,255,47,4,72,255,78,112,85,255,193,50,66,1,93,16,52,255,8,105,134,0,12,109,72,255,58,156,251,0,144,35,204,0,44,160,117,254,50,107,194,0,1,68,165,255,111,110,162,0,158,83,40,254,76,214,234,0,58,216,205,255,171,96,147,255,40,227,114,1,176,227,241,0,70,249,183,1,136,84,139,255,60,122,247,254,143,9,117,255,177,174,137,254,73,247,143,0,236,185,126,255,62,25,247,255,45,64,56,255,161,244,6,0,34,57,56,1,105,202,83,0,128,147,208,0,6,103,10,255,74,138,65,255,97,80,100,255,214,174,33,255,50,134,74,255,110,151,130,254,111,84,172,0,84,199,75,254,248,59,112,255,8,216,178,1,9,183,95,0,238,27,8,254,170,205,220,0,195,229,135,0,98,76,237,255,226,91,26,1,82,219,39,255,225,190,199,1,217,200,121,255,81,179,8,255,140,65,206,0,178,207,87,254,250,252,46,255,104,89,110,1,253,189,158,255,144,214,158,255,160,245,54,255,53,183,92,1,21,200,194,255,146,33,113,1,209,1,255,0,235,106,43,255,167,52,232,0,157,229,221,0,51,30,25,0,250,221,27,1,65,147,87,255,79,123,196,0,65,196,223,255,76,44,17,1,85,241,68,0,202,183,249,255,65,212,212,255,9,33,154,1,71,59,80,0,175,194,59,255,141,72,9,0,100,160,244,0,230,208,56,0,59,25,75,254,80,194,194,0,18,3,200,254,160,159,115,0,132,143,247,1,111,93,57,255,58,237,11,1,134,222,135,255,122,163,108,1,123,43,190,255,251,189,206,254,80,182,72,255,208,246,224,1,17,60,9,0,161,207,38,0,141,109,91,0,216,15,211,255,136,78,110,0,98,163,104,255,21,80,121,255,173,178,183,1,127,143,4,0,104,60,82,254,214,16,13,255,96,238,33,1,158,148,230,255,127,129,62,255,51,255,210,255,62,141,236,254,157,55,224,255,114,39,244,0,192,188,250,255,228,76,53,0,98,84,81,255,173,203,61,254,147,50,55,255,204,235,191,0,52,197,244,0,88,43,211,254,27,191,119,0,188,231,154,0,66,81,161,0,92,193,160,1,250,227,120,0,123,55,226,0,184,17,72,0,133,168,10,254,22,135,156,255,41,25,103,255,48,202,58,0,186,149,81,255,188,134,239,0,235,181,189,254,217,139,188,255,74,48,82,0,46,218,229,0,189,253,251,0,50,229,12,255,211,141,191,1,128,244,25,255,169,231,122,254,86,47,189,255,132,183,23,255,37,178,150,255,51,137,253,0,200,78,31,0,22,105,50,0,130,60,0,0,132,163,91,254,23,231,187,0,192,79,239,0,157,102,164,255,192,82,20,1,24,181,103,255,240,9,234,0,1,123,164,255,133,233,0,255,202,242,242,0,60,186,245,0,241,16,199,255,224,116,158,254,191,125,91,255,224,86,207,0,121,37,231,255,227,9,198,255,15,153,239,255,121,232,217,254,75,112,82,0,95,12,57,254,51,214,105,255,148,220,97,1,199,98,36,0,156,209,12,254,10,212,52,0,217,180,55,254,212,170,232,255,216,20,84,255,157,250,135,0,157,99,127,254,1,206,41,0,149,36,70,1,54,196,201,255,87,116,0,254,235,171,150,0,27,163,234,0,202,135,180,0,208,95,0,254,123,156,93,0,183,62,75,0,137,235,182,0,204,225,255,255,214,139,210,255,2,115,8,255,29,12,111,0,52,156,1,0,253,21,251,255,37,165,31,254,12,130,211,0,106,18,53,254,42,99,154,0,14,217,61,254,216,11,92,255,200,197,112,254,147,38,199,0,36,252,120,254,107,169,77,0,1,123,159,255,207,75,102,0,163,175,196,0,44,1,240,0,120,186,176,254,13,98,76,255,237,124,241,255,232,146,188,255,200,96,224,0,204,31,41,0,208,200,13,0,21,225,96,255,175,156,196,0,247,208,126,0,62,184,244,254,2,171,81,0,85,115,158,0,54,64,45,255,19,138,114,0,135,71,205,0,227,47,147,1,218,231,66,0,253,209,28,0,244,15,173,255,6,15,118,254,16,150,208,255,185,22,50,255,86,112,207,255,75,113,215,1,63,146,43,255,4,225,19,254,227,23,62,255,14,255,214,254,45,8,205,255,87,197,151,254,210,82,215,255,245,248,247,255,128,248,70,0,225,247,87,0,90,120,70,0,213,245,92,0,13,133,226,0,47,181,5,1,92,163,105,255,6,30,133,254,232,178,61,255,230,149,24,255,18,49,158,0,228,100,61,254,116,243,251,255,77,75,92,1,81,219,147,255,76,163,254,254,141,213,246,0,232,37,152,254,97,44,100,0,201,37,50,1,212,244,57,0,174,171,183,255,249,74,112,0,166,156,30,0,222,221,97,255,243,93,73,254,251,101,100,255,216,217,93,255,254,138,187,255,142,190,52,255,59,203,177,255,200,94,52,0,115,114,158,255,165,152,104,1,126,99,226,255,118,157,244,1,107,200,16,0,193,90,229,0,121,6,88,0,156,32,93,254,125,241,211,255,14,237,157,255,165,154,21,255,184,224,22,255,250,24,152,255,113,77,31,0,247,171,23,255,237,177,204,255,52,137,145,255,194,182,114,0,224,234,149,0,10,111,103,1,201,129,4,0,238,142,78,0,52,6,40,255,110,213,165,254,60,207,253,0,62,215,69,0,96,97,0,255,49,45,202,0,120,121,22,255,235,139,48,1,198,45,34,255,182,50,27,1,131,210,91,255,46,54,128,0,175,123,105,255,198,141,78,254,67,244,239,255,245,54,103,254,78,38,242,255,2,92,249,254,251,174,87,255,139,63,144,0,24,108,27,255,34,102,18,1,34,22,152,0,66,229,118,254,50,143,99,0,144,169,149,1,118,30,152,0,178,8,121,1,8,159,18,0,90,101,230,255,129,29,119,0,68,36,11,1,232,183,55,0,23,255,96,255,161,41,193,255,63,139,222,0,15,179,243,0,255,100,15,255,82,53,135,0,137,57,149,1,99,240,170,255,22,230,228,254,49,180,82,255,61,82,43,0,110,245,217,0,199,125,61,0,46,253,52,0,141,197,219,0,211,159,193,0,55,121,105,254,183,20,129,0,169,119,170,255,203,178,139,255,135,40,182,255,172,13,202,255,65,178,148,0,8,207,43,0,122,53,127,1,74,161,48,0,227,214,128,254,86,11,243,255,100,86,7,1,245,68,134,255,61,43,21,1,152,84,94,255,190,60,250,254,239,118,232,255,214,136,37,1,113,76,107,255,93,104,100,1,144,206,23,255,110,150,154,1,228,103,185,0,218,49,50,254,135,77,139,255,185,1,78,0,0,161,148,255,97,29,233,255,207,148,149,255,160,168,0,0,91,128,171,255,6,28,19,254,11,111,247,0,39,187,150,255,138,232,149,0,117,62,68,255,63,216,188,255,235,234,32,254,29,57,160,255,25,12,241,1,169,60,191,0,32,131,141,255,237,159,123,255,94,197,94,254,116,254,3,255,92,179,97,254,121,97,92,255,170,112,14,0,21,149,248,0,248,227,3,0,80,96,109,0,75,192,74,1,12,90,226,255,161,106,68,1,208,114,127,255,114,42,255,254,74,26,74,255,247,179,150,254,121,140,60,0,147,70,200,255,214,40,161,255,161,188,201,255,141,65,135,255,242,115,252,0,62,47,202,0,180,149,255,254,130,55,237,0,165,17,186,255,10,169,194,0,156,109,218,255,112,140,123,255,104,128,223,254,177,142,108,255,121,37,219,255,128,77,18,255,111,108,23,1,91,192,75,0,174,245,22,255,4,236,62,255,43,64,153,1,227,173,254,0,237,122,132,1,127,89,186,255,142,82,128,254,252,84,174,0,90,179,177,1,243,214,87,255,103,60,162,255,208,130,14,255,11,130,139,0,206,129,219,255,94,217,157,255,239,230,230,255,116,115,159,254,164,107,95,0,51,218,2,1,216,125,198,255,140,202,128,254,11,95,68,255,55,9,93,254,174,153,6,255,204,172,96,0,69,160,110,0,213,38,49,254,27,80,213,0,118,125,114,0,70,70,67,255,15,142,73,255,131,122,185,255,243,20,50,254,130,237,40,0,210,159,140,1,197,151,65,255,84,153,66,0,195,126,90,0,16,238,236,1,118,187,102,255,3,24,133,255,187,69,230,0,56,197,92,1,213,69,94,255,80,138,229,1,206,7,230,0,222,111,230,1,91,233,119,255,9,89,7,1,2,98,1,0,148,74,133,255,51,246,180,255,228,177,112,1,58,189,108,255,194,203,237,254,21,209,195,0,147,10,35,1,86,157,226,0,31,163,139,254,56,7,75,255,62,90,116,0,181,60,169,0,138,162,212,254,81,167,31,0,205,90,112,255,33,112,227,0,83,151,117,1,177,224,73,255,174,144,217,255,230,204,79,255,22,77,232,255,114,78,234,0,224,57,126,254,9,49,141,0,242,147,165,1,104,182,140,255,167,132,12,1,123,68,127,0,225,87,39,1,251,108,8,0,198,193,143,1,121,135,207,255,172,22,70,0,50,68,116,255,101,175,40,255,248,105,233,0,166,203,7,0,110,197,218,0,215,254,26,254,168,226,253,0,31,143,96,0,11,103,41,0,183,129,203,254,100,247,74,255,213,126,132,0,210,147,44,0,199,234,27,1,148,47,181,0,155,91,158,1,54,105,175,255,2,78,145,254,102,154,95,0,128,207,127,254,52,124,236,255,130,84,71,0,221,243,211,0,152,170,207,0,222,106,199,0,183,84,94,254,92,200,56,255,138,182,115,1,142,96,146,0,133,136,228,0,97,18,150,0,55,251,66,0,140,102,4,0,202,103,151,0,30,19,248,255,51,184,207,0,202,198,89,0,55,197,225,254,169,95,249,255,66,65,68,255,188,234,126,0,166,223,100,1,112,239,244,0,144,23,194,0,58,39,182,0,244,44,24,254,175,68,179,255,152,118,154,1,176,162,130,0,217,114,204,254,173,126,78,255,33,222,30,255,36,2,91,255,2,143,243,0,9,235,215,0,3,171,151,1,24,215,245,255,168,47,164,254,241,146,207,0,69,129,180,0,68,243,113,0,144,53,72,254,251,45,14,0,23,110,168,0,68,68,79,255,110,70,95,254,174,91,144,255,33,206,95,255,137,41,7,255,19,187,153,254,35,255,112,255,9,145,185,254,50,157,37,0,11,112,49,1,102,8,190,255,234,243,169,1,60,85,23,0,74,39,189,0,116,49,239,0,173,213,210,0,46,161,108,255,159,150,37,0,196,120,185,255,34,98,6,255,153,195,62,255,97,230,71,255,102,61,76,0,26,212,236,255,164,97,16,0,198,59,146,0,163,23,196,0,56,24,61,0,181,98,193,0,251,147,229,255,98,189,24,255,46,54,206,255,234,82,246,0,183,103,38,1,109,62,204,0,10,240,224,0,146,22,117,255,142,154,120,0,69,212,35,0,208,99,118,1,121,255,3,255,72,6,194,0,117,17,197,255,125,15,23,0,154,79,153,0,214,94,197,255,185,55,147,255,62,254,78,254,127,82,153,0,110,102,63,255,108,82,161,255,105,187,212,1,80,138,39,0,60,255,93,255,72,12,186,0,210,251,31,1,190,167,144,255,228,44,19,254,128,67,232,0,214,249,107,254,136,145,86,255,132,46,176,0,189,187,227,255,208,22,140,0,217,211,116,0,50,81,186,254,139,250,31,0,30,64,198,1,135,155,100,0,160,206,23,254,187,162,211,255,16,188,63,0,254,208,49,0,85,84,191,0,241,192,242,255,153,126,145,1,234,162,162,255,230,97,216,1,64,135,126,0,190,148,223,1,52,0,43,255,28,39,189,1,64,136,238,0,175,196,185,0,98,226,213,255,127,159,244,1,226,175,60,0,160,233,142,1,180,243,207,255,69,152,89,1,31,101,21,0,144,25,164,254,139,191,209,0,91,25,121,0,32,147,5,0,39,186,123,255,63,115,230,255,93,167,198,255,143,213,220,255,179,156,19,255,25,66,122,0,214,160,217,255,2,45,62,255,106,79,146,254,51,137,99,255,87,100,231,255,175,145,232,255,101,184,1,255,174,9,125,0,82,37,161,1,36,114,141,255,48,222,142,255,245,186,154,0,5,174,221,254,63,114,155,255,135,55,160,1,80,31,135,0,126,250,179,1,236,218,45,0,20,28,145,1,16,147,73,0,249,189,132,1,17,189,192,255,223,142,198,255,72,20,15,255,250,53,237,254,15,11,18,0,27,211,113,254,213,107,56,255,174,147,146,255,96,126,48,0,23,193,109,1,37,162,94,0,199,157,249,254,24,128,187,255,205,49,178,254,93,164,42,255,43,119,235,1,88,183,237,255,218,210,1,255,107,254,42,0,230,10,99,255,162,0,226,0,219,237,91,0,129,178,203,0,208,50,95,254,206,208,95,255,247,191,89,254,110,234,79,255,165,61,243,0,20,122,112,255,246,246,185,254,103,4,123,0,233,99,230,1,219,91,252,255,199,222,22,255,179,245,233,255,211,241,234,0,111,250,192,255,85,84,136,0,101,58,50,255,131,173,156,254,119,45,51,255,118,233,16,254,242,90,214,0,94,159,219,1,3,3,234,255,98,76,92,254,80,54,230,0,5,228,231,254,53,24,223,255,113,56,118,1,20,132,1,255,171,210,236,0,56,241,158,255,186,115,19,255,8,229,174,0,48,44,0,1,114,114,166,255,6,73,226,255,205,89,244,0,137,227,75,1,248,173,56,0,74,120,246,254,119,3,11,255,81,120,198,255,136,122,98,255,146,241,221,1,109,194,78,255,223,241,70,1,214,200,169,255,97,190,47,255,47,103,174,255,99,92,72,254,118,233,180,255,193,35,233,254,26,229,32,255,222,252,198,0,204,43,71,255,199,84,172,0,134,102,190,0,111,238,97,254,230,40,230,0,227,205,64,254,200,12,225,0,166,25,222,0,113,69,51,255,143,159,24,0,167,184,74,0,29,224,116,254,158,208,233,0,193,116,126,255,212,11,133,255,22,58,140,1,204,36,51,255,232,30,43,0,235,70,181,255,64,56,146,254,169,18,84,255,226,1,13,255,200,50,176,255,52,213,245,254,168,209,97,0,191,71,55,0,34,78,156,0,232,144,58,1,185,74,189,0,186,142,149,254,64,69,127,255,161,203,147,255,176,151,191,0,136,231,203,254,163,182,137,0,161,126,251,254,233,32,66,0,68,207,66,0,30,28,37,0,93,114,96,1,254,92,247,255,44,171,69,0,202,119,11,255,188,118,50,1,255,83,136,255,71,82,26,0,70,227,2,0,32,235,121,1,181,41,154,0,71,134,229,254,202,255,36,0,41,152,5,0,154,63,73,255,34,182,124,0,121,221,150,255,26,204,213,1,41,172,87,0,90,157,146,255,109,130,20,0,71,107,200,255,243,102,189,0,1,195,145,254,46,88,117,0,8,206,227,0,191,110,253,255,109,128,20,254,134,85,51,255,137,177,112,1,216,34,22,255,131,16,208,255,121,149,170,0,114,19,23,1,166,80,31,255,113,240,122,0,232,179,250,0,68,110,180,254,210,170,119,0,223,108,164,255,207,79,233,255,27,229,226,254,209,98,81,255,79,68,7,0,131,185,100,0,170,29,162,255,17,162,107,255,57,21,11,1,100,200,181,255,127,65,166,1,165,134,204,0,104,167,168,0,1,164,79,0,146,135,59,1,70,50,128,255,102,119,13,254,227,6,135,0,162,142,179,255,160,100,222,0,27,224,219,1,158,93,195,255,234,141,137,0,16,24,125,255,238,206,47,255,97,17,98,255,116,110,12,255,96,115,77,0,91,227,232,255,248,254,79,255,92,229,6,254,88,198,139,0,206,75,129,0,250,77,206,255,141,244,123,1,138,69,220,0,32,151,6,1,131,167,22,255,237,68,167,254,199,189,150,0,163,171,138,255,51,188,6,255,95,29,137,254,148,226,179,0,181,107,208,255,134,31,82,255,151,101,45,255,129,202,225,0,224,72,147,0,48,138,151,255,195,64,206,254,237,218,158,0,106,29,137,254,253,189,233,255,103,15,17,255,194,97,255,0,178,45,169,254,198,225,155,0,39,48,117,255,135,106,115,0,97,38,181,0,150,47,65,255,83,130,229,254,246,38,129,0,92,239,154,254,91,99,127,0,161,111,33,255,238,217,242,255,131,185,195,255,213,191,158,255,41,150,218,0,132,169,131,0,89,84,252,1,171,70,128,255,163,248,203,254,1,50,180,255,124,76,85,1,251,111,80,0,99,66,239,255,154,237,182,255,221,126,133,254,74,204,99,255,65,147,119,255,99,56,167,255,79,248,149,255,116,155,228,255,237,43,14,254,69,137,11,255,22,250,241,1,91,122,143,255,205,249,243,0,212,26,60,255,48,182,176,1,48,23,191,255,203,121,152,254,45,74,213,255,62,90,18,254,245,163,230,255,185,106,116,255,83,35,159,0,12,33,2,255,80,34,62,0,16,87,174,255,173,101,85,0,202,36,81,254,160,69,204,255,64,225,187,0,58,206,94,0,86,144,47,0,229,86,245,0,63,145,190,1,37,5,39,0,109,251,26,0,137,147,234,0,162,121,145,255,144,116,206,255,197,232,185,255,183,190,140,255,73,12,254,255,139,20,242,255,170,90,239,255,97,66,187,255,245,181,135,254,222,136,52,0,245,5,51,254,203,47,78,0,152,101,216,0,73,23,125,0,254,96,33,1,235,210,73,255,43,209,88,1,7,129,109,0,122,104,228,254,170,242,203,0,242,204,135,255,202,28,233,255,65,6,127,0,159,144,71,0,100,140,95,0,78,150,13,0,251,107,118,1,182,58,125,255,1,38,108,255,141,189,209,255,8,155,125,1,113,163,91,255,121,79,190,255,134,239,108,255,76,47,248,0,163,228,239,0,17,111,10,0,88,149,75,255,215,235,239,0,167,159,24,255,47,151,108,255,107,209,188,0,233,231,99,254,28,202,148,255,174,35,138,255,110,24,68,255,2,69,181,0,107,102,82,0,102,237,7,0,92,36,237,255,221,162,83,1,55,202,6,255,135,234,135,255,24,250,222,0,65,94,168,254,245,248,210,255,167,108,201,254,255,161,111,0,205,8,254,0,136,13,116,0,100,176,132,255,43,215,126,255,177,133,130,255,158,79,148,0,67,224,37,1,12,206,21,255,62,34,110,1,237,104,175,255,80,132,111,255,142,174,72,0,84,229,180,254,105,179,140,0,64,248,15,255,233,138,16,0,245,67,123,254,218,121,212,255,63,95,218,1,213,133,137,255,143,182,82,255,48,28,11,0,244,114,141,1,209,175,76,255,157,181,150,255,186,229,3,255,164,157,111,1,231,189,139,0,119,202,190,255,218,106,64,255,68,235,63,254,96,26,172,255,187,47,11,1,215,18,251,255,81,84,89,0,68,58,128,0,94,113,5,1,92,129,208,255,97,15,83,254,9,28,188,0,239,9,164,0,60,205,152,0,192,163,98,255,184,18,60,0,217,182,139,0,109,59,120,255,4,192,251,0,169,210,240,255,37,172,92,254,148,211,245,255,179,65,52,0,253,13,115,0,185,174,206,1,114,188,149,255,237,90,173,0,43,199,192,255,88,108,113,0,52,35,76,0,66,25,148,255,221,4,7,255,151,241,114,255,190,209,232,0,98,50,199,0,151,150,213,255,18,74,36,1,53,40,7,0,19,135,65,255,26,172,69,0,174,237,85,0,99,95,41,0,3,56,16,0,39,160,177,255,200,106,218,254,185,68,84,255,91,186,61,254,67,143,141,255,13,244,166,255,99,114,198,0,199,110,163,255,193,18,186,0,124,239,246,1,110,68,22,0,2,235,46,1,212,60,107,0,105,42,105,1,14,230,152,0,7,5,131,0,141,104,154,255,213,3,6,0,131,228,162,255,179,100,28,1,231,123,85,255,206,14,223,1,253,96,230,0,38,152,149,1,98,137,122,0,214,205,3,255,226,152,179,255,6,133,137,0,158,69,140,255,113,162,154,255,180,243,172,255,27,189,115,255,143,46,220,255,213,134,225,255,126,29,69,0,188,43,137,1,242,70,9,0,90,204,255,255,231,170,147,0,23,56,19,254,56,125,157,255,48,179,218,255,79,182,253,255,38,212,191,1,41,235,124,0,96,151,28,0,135,148,190,0,205,249,39,254,52,96,136,255,212,44,136,255,67,209,131,255,252,130,23,255,219,128,20,255,198,129,118,0,108,101,11,0,178,5,146,1,62,7,100,255,181,236,94,254,28,26,164,0,76,22,112,255,120,102,79,0,202,192,229,1,200,176,215,0,41,64,244,255,206,184,78,0,167,45,63,1,160,35,0,255,59,12,142,255,204,9,144,255,219,94,229,1,122,27,112,0,189,105,109,255,64,208,74,255,251,127,55,1,2,226,198,0,44,76,209,0,151,152,77,255,210,23,46,1,201,171,69,255,44,211,231,0,190,37,224,255,245,196,62,255,169,181,222,255,34,211,17,0,119,241,197,255,229,35,152,1,21,69,40,255,178,226,161,0,148,179,193,0,219,194,254,1,40,206,51,255,231,92,250,1,67,153,170,0,21,148,241,0,170,69,82,255,121,18,231,255,92,114,3,0,184,62,230,0,225,201,87,255,146,96,162,255,181,242,220,0,173,187,221,1,226,62,170,255,56,126,217,1,117,13,227,255,179,44,239,0,157,141,155,255,144,221,83,0,235,209,208,0,42,17,165,1,251,81,133,0,124,245,201,254,97,211,24,255,83,214,166,0,154,36,9,255,248,47,127,0,90,219,140,255,161,217,38,254,212,147,63,255,66,84,148,1,207,3,1,0,230,134,89,1,127,78,122,255,224,155,1,255,82,136,74,0,178,156,208,255,186,25,49,255,222,3,210,1,229,150,190,255,85,162,52,255,41,84,141,255,73,123,84,254,93,17,150,0,119,19,28,1,32,22,215,255,28,23,204,255,142,241,52,255,228,52,125,0,29,76,207,0,215,167,250,254,175,164,230,0,55,207,105,1,109,187,245,255,161,44,220,1,41,101,128,255,167,16,94,0,93,214,107,255,118,72,0,254,80,61,234,255,121,175,125,0,139,169,251,0,97,39,147,254,250,196,49,255,165,179,110,254,223,70,187,255,22,142,125,1,154,179,138,255,118,176,42,1,10,174,153,0,156,92,102,0,168,13,161,255,143,16,32,0,250,197,180,255,203,163,44,1,87,32,36,0,161,153,20,255,123,252,15,0,25,227,80,0,60,88,142,0,17,22,201,1,154,205,77,255,39,63,47,0,8,122,141,0,128,23,182,254,204,39,19,255,4,112,29,255,23,36,140,255,210,234,116,254,53,50,63,255,121,171,104,255,160,219,94,0,87,82,14,254,231,42,5,0,165,139,127,254,86,78,38,0,130,60,66,254,203,30,45,255,46,196,122,1,249,53,162,255,136,143,103,254,215,210,114,0,231,7,160,254,169,152,42,255,111,45,246,0,142,131,135,255,131,71,204,255,36,226,11,0,0,28,242,255,225,138,213,255,247,46,216,254,245,3,183,0,108,252,74,1,206,26,48,255,205,54,246,255,211,198,36,255,121,35,50,0,52,216,202,255,38,139,129,254,242,73,148,0,67,231,141,255,42,47,204,0,78,116,25,1,4,225,191,255,6,147,228,0,58,88,177,0,122,165,229,255,252,83,201,255,224,167,96,1,177,184,158,255,242,105,179,1,248,198,240,0,133,66,203,1,254,36,47,0,45,24,115,255,119,62,254,0,196,225,186,254,123,141,172,0,26,85,41,255,226,111,183,0,213,231,151,0,4,59,7,255,238,138,148,0,66,147,33,255,31,246,141,255,209,141,116,255,104,112,31,0,88,161,172,0,83,215,230,254,47,111,151,0,45,38,52,1,132,45,204,0,138,128,109,254,233,117,134,255,243,190,173,254,241,236,240,0,82,127,236,254,40,223,161,255,110,182,225,255,123,174,239,0,135,242,145,1,51,209,154,0,150,3,115,254,217,164,252,255,55,156,69,1,84,94,255,255,232,73,45,1,20,19,212,255,96,197,59,254,96,251,33,0,38,199,73,1,64,172,247,255,117,116,56,255,228,17,18,0,62,138,103,1,246,229,164,255,244,118,201,254,86,32,159,255,109,34,137,1,85,211,186,0,10,193,193,254,122,194,177,0,122,238,102,255,162,218,171,0,108,217,161,1,158,170,34,0,176,47,155,1,181,228,11,255,8,156,0,0,16,75,93,0,206,98,255,1,58,154,35,0,12,243,184,254,67,117,66,255,230,229,123,0,201,42,110], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+20480); +/* memory initializer */ allocate([134,228,178,254,186,108,118,255,58,19,154,255,82,169,62,255,114,143,115,1,239,196,50,255,173,48,193,255,147,2,84,255,150,134,147,254,95,232,73,0,109,227,52,254,191,137,10,0,40,204,30,254,76,52,97,255,164,235,126,0,254,124,188,0,74,182,21,1,121,29,35,255,241,30,7,254,85,218,214,255,7,84,150,254,81,27,117,255,160,159,152,254,66,24,221,255,227,10,60,1,141,135,102,0,208,189,150,1,117,179,92,0,132,22,136,255,120,199,28,0,21,129,79,254,182,9,65,0,218,163,169,0,246,147,198,255,107,38,144,1,78,175,205,255,214,5,250,254,47,88,29,255,164,47,204,255,43,55,6,255,131,134,207,254,116,100,214,0,96,140,75,1,106,220,144,0,195,32,28,1,172,81,5,255,199,179,52,255,37,84,203,0,170,112,174,0,11,4,91,0,69,244,27,1,117,131,92,0,33,152,175,255,140,153,107,255,251,135,43,254,87,138,4,255,198,234,147,254,121,152,84,255,205,101,155,1,157,9,25,0,72,106,17,254,108,153,0,255,189,229,186,0,193,8,176,255,174,149,209,0,238,130,29,0,233,214,126,1,61,226,102,0,57,163,4,1,198,111,51,255,45,79,78,1,115,210,10,255,218,9,25,255,158,139,198,255,211,82,187,254,80,133,83,0,157,129,230,1,243,133,134,255,40,136,16,0,77,107,79,255,183,85,92,1,177,204,202,0,163,71,147,255,152,69,190,0,172,51,188,1,250,210,172,255,211,242,113,1,89,89,26,255,64,66,111,254,116,152,42,0,161,39,27,255,54,80,254,0,106,209,115,1,103,124,97,0,221,230,98,255,31,231,6,0,178,192,120,254,15,217,203,255,124,158,79,0,112,145,247,0,92,250,48,1,163,181,193,255,37,47,142,254,144,189,165,255,46,146,240,0,6,75,128,0,41,157,200,254,87,121,213,0,1,113,236,0,5,45,250,0,144,12,82,0,31,108,231,0,225,239,119,255,167,7,189,255,187,228,132,255,110,189,34,0,94,44,204,1,162,52,197,0,78,188,241,254,57,20,141,0,244,146,47,1,206,100,51,0,125,107,148,254,27,195,77,0,152,253,90,1,7,143,144,255,51,37,31,0,34,119,38,255,7,197,118,0,153,188,211,0,151,20,116,254,245,65,52,255,180,253,110,1,47,177,209,0,161,99,17,255,118,222,202,0,125,179,252,1,123,54,126,255,145,57,191,0,55,186,121,0,10,243,138,0,205,211,229,255,125,156,241,254,148,156,185,255,227,19,188,255,124,41,32,255,31,34,206,254,17,57,83,0,204,22,37,255,42,96,98,0,119,102,184,1,3,190,28,0,110,82,218,255,200,204,192,255,201,145,118,0,117,204,146,0,132,32,98,1,192,194,121,0,106,161,248,1,237,88,124,0,23,212,26,0,205,171,90,255,248,48,216,1,141,37,230,255,124,203,0,254,158,168,30,255,214,248,21,0,112,187,7,255,75,133,239,255,74,227,243,255,250,147,70,0,214,120,162,0,167,9,179,255,22,158,18,0,218,77,209,1,97,109,81,255,244,33,179,255,57,52,57,255,65,172,210,255,249,71,209,255,142,169,238,0,158,189,153,255,174,254,103,254,98,33,14,0,141,76,230,255,113,139,52,255,15,58,212,0,168,215,201,255,248,204,215,1,223,68,160,255,57,154,183,254,47,231,121,0,106,166,137,0,81,136,138,0,165,43,51,0,231,139,61,0,57,95,59,254,118,98,25,255,151,63,236,1,94,190,250,255,169,185,114,1,5,250,58,255,75,105,97,1,215,223,134,0,113,99,163,1,128,62,112,0,99,106,147,0,163,195,10,0,33,205,182,0,214,14,174,255,129,38,231,255,53,182,223,0,98,42,159,255,247,13,40,0,188,210,177,1,6,21,0,255,255,61,148,254,137,45,129,255,89,26,116,254,126,38,114,0,251,50,242,254,121,134,128,255,204,249,167,254,165,235,215,0,202,177,243,0,133,141,62,0,240,130,190,1,110,175,255,0,0,20,146,1,37,210,121,255,7,39,130,0,142,250,84,255,141,200,207,0,9,95,104,255,11,244,174,0,134,232,126,0,167,1,123,254,16,193,149,255,232,233,239,1,213,70,112,255,252,116,160,254,242,222,220,255,205,85,227,0,7,185,58,0,118,247,63,1,116,77,177,255,62,245,200,254,63,18,37,255,107,53,232,254,50,221,211,0,162,219,7,254,2,94,43,0,182,62,182,254,160,78,200,255,135,140,170,0,235,184,228,0,175,53,138,254,80,58,77,255,152,201,2,1,63,196,34,0,5,30,184,0,171,176,154,0,121,59,206,0,38,99,39,0,172,80,77,254,0,134,151,0,186,33,241,254,94,253,223,255,44,114,252,0,108,126,57,255,201,40,13,255,39,229,27,255,39,239,23,1,151,121,51,255,153,150,248,0,10,234,174,255,118,246,4,254,200,245,38,0,69,161,242,1,16,178,150,0,113,56,130,0,171,31,105,0,26,88,108,255,49,42,106,0,251,169,66,0,69,93,149,0,20,57,254,0,164,25,111,0,90,188,90,255,204,4,197,0,40,213,50,1,212,96,132,255,88,138,180,254,228,146,124,255,184,246,247,0,65,117,86,255,253,102,210,254,254,121,36,0,137,115,3,255,60,24,216,0,134,18,29,0,59,226,97,0,176,142,71,0,7,209,161,0,189,84,51,254,155,250,72,0,213,84,235,255,45,222,224,0,238,148,143,255,170,42,53,255,78,167,117,0,186,0,40,255,125,177,103,255,69,225,66,0,227,7,88,1,75,172,6,0,169,45,227,1,16,36,70,255,50,2,9,255,139,193,22,0,143,183,231,254,218,69,50,0,236,56,161,1,213,131,42,0,138,145,44,254,136,229,40,255,49,63,35,255,61,145,245,255,101,192,2,254,232,167,113,0,152,104,38,1,121,185,218,0,121,139,211,254,119,240,35,0,65,189,217,254,187,179,162,255,160,187,230,0,62,248,14,255,60,78,97,0,255,247,163,255,225,59,91,255,107,71,58,255,241,47,33,1,50,117,236,0,219,177,63,254,244,90,179,0,35,194,215,255,189,67,50,255,23,135,129,0,104,189,37,255,185,57,194,0,35,62,231,255,220,248,108,0,12,231,178,0,143,80,91,1,131,93,101,255,144,39,2,1,255,250,178,0,5,17,236,254,139,32,46,0,204,188,38,254,245,115,52,255,191,113,73,254,191,108,69,255,22,69,245,1,23,203,178,0,170,99,170,0,65,248,111,0,37,108,153,255,64,37,69,0,0,88,62,254,89,148,144,255,191,68,224,1,241,39,53,0,41,203,237,255,145,126,194,255,221,42,253,255,25,99,151,0,97,253,223,1,74,115,49,255,6,175,72,255,59,176,203,0,124,183,249,1,228,228,99,0,129,12,207,254,168,192,195,255,204,176,16,254,152,234,171,0,77,37,85,255,33,120,135,255,142,194,227,1,31,214,58,0,213,187,125,255,232,46,60,255,190,116,42,254,151,178,19,255,51,62,237,254,204,236,193,0,194,232,60,0,172,34,157,255,189,16,184,254,103,3,95,255,141,233,36,254,41,25,11,255,21,195,166,0,118,245,45,0,67,213,149,255,159,12,18,255,187,164,227,1,160,25,5,0,12,78,195,1,43,197,225,0,48,142,41,254,196,155,60,255,223,199,18,1,145,136,156,0,252,117,169,254,145,226,238,0,239,23,107,0,109,181,188,255,230,112,49,254,73,170,237,255,231,183,227,255,80,220,20,0,194,107,127,1,127,205,101,0,46,52,197,1,210,171,36,255,88,3,90,255,56,151,141,0,96,187,255,255,42,78,200,0,254,70,70,1,244,125,168,0,204,68,138,1,124,215,70,0,102,66,200,254,17,52,228,0,117,220,143,254,203,248,123,0,56,18,174,255,186,151,164,255,51,232,208,1,160,228,43,255,249,29,25,1,68,190,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,127,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,188,129,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+30720); + +/* no memory initializer */ var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8); assert(tempDoublePtr % 8 == 0); @@ -1357,6 +1569,8 @@ function copyTempDouble(ptr) { } +// {{PRE_LIBRARY}} + Module["_bitshift64Ashr"] = _bitshift64Ashr; @@ -1370,206 +1584,160 @@ function copyTempDouble(ptr) { Module["_memset"] = _memset; + function _pthread_cleanup_push(routine, arg) { + __ATEXIT__.push(function() { Runtime.dynCall('vi', routine, [arg]) }) + _pthread_cleanup_push.level = __ATEXIT__.length; + } + Module["_bitshift64Lshr"] = _bitshift64Lshr; Module["_bitshift64Shl"] = _bitshift64Shl; + function _pthread_cleanup_pop() { + assert(_pthread_cleanup_push.level == __ATEXIT__.length, 'cannot pop if something else added meanwhile!'); + __ATEXIT__.pop(); + _pthread_cleanup_push.level = __ATEXIT__.length; + } + function _abort() { Module['abort'](); } - - Module["_strlen"] = _strlen; + function ___lock() {} - - function _emscripten_memcpy_big(dest, src, num) { - HEAPU8.set(HEAPU8.subarray(src, src+num), dest); - return dest; - } - Module["_memcpy"] = _memcpy; + function ___unlock() {} - var ___errno_state=0;function ___setErrNo(value) { - // For convenient setting and returning of errno. - HEAP32[((___errno_state)>>2)]=value; + + var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86}; + + var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; return value; } - var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(name) { - // long sysconf(int name); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html - switch(name) { - case 30: return PAGE_SIZE; - case 132: - case 133: - case 12: - case 137: - case 138: - case 15: - case 235: - case 16: - case 17: - case 18: - case 19: - case 20: - case 149: - case 13: - case 10: - case 236: - case 153: - case 9: - case 21: - case 22: - case 159: - case 154: - case 14: - case 77: - case 78: - case 139: - case 80: - case 81: - case 79: - case 82: - case 68: - case 67: - case 164: - case 11: - case 29: - case 47: - case 48: - case 95: - case 52: - case 51: - case 46: - return 200809; - case 27: - case 246: - case 127: - case 128: - case 23: - case 24: - case 160: - case 161: - case 181: - case 182: - case 242: - case 183: - case 184: - case 243: - case 244: - case 245: - case 165: - case 178: - case 179: - case 49: - case 50: - case 168: - case 169: - case 175: - case 170: - case 171: - case 172: - case 97: - case 76: - case 32: - case 173: - case 35: - return -1; - case 176: - case 177: - case 7: - case 155: - case 8: - case 157: - case 125: - case 126: - case 92: - case 93: - case 129: - case 130: - case 131: - case 94: - case 91: - return 1; - case 74: - case 60: - case 69: - case 70: - case 4: - return 1024; - case 31: - case 42: - case 72: - return 32; - case 87: - case 26: - case 33: - return 2147483647; - case 34: - case 1: - return 47839; - case 38: - case 36: - return 99; - case 43: - case 37: - return 2048; - case 0: return 2097152; - case 3: return 65536; - case 28: return 32768; - case 44: return 32767; - case 75: return 16384; - case 39: return 1000; - case 89: return 700; - case 71: return 256; - case 40: return 255; - case 2: return 100; - case 180: return 64; - case 25: return 20; - case 5: return 16; - case 6: return 6; - case 73: return 4; - case 84: { - if (typeof navigator === 'object') return navigator['hardwareConcurrency'] || 1; - return 1; + var PATH={splitPath:function (filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + },normalizeArray:function (parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } } - } - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } - - function _sbrk(bytes) { - // Implement a Linux-like 'memory area' for our 'process'. - // Changes the size of the memory area by |bytes|; returns the - // address of the previous top ('break') of the memory area - // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP - var self = _sbrk; - if (!self.called) { - DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned - self.called = true; - assert(Runtime.dynamicAlloc); - self.alloc = Runtime.dynamicAlloc; - Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; - } - var ret = DYNAMICTOP; - if (bytes != 0) self.alloc(bytes); - return ret; // Previous break location. - } - - - Module["_memmove"] = _memmove; - - function ___errno_location() { - return ___errno_state; - } - - - - - var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + return parts; + },normalize:function (path) { + var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.substr(-1) === '/'; + // Normalize the path + path = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + return (isAbsolute ? '/' : '') + path; + },dirname:function (path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + },basename:function (path) { + // EMSCRIPTEN return '/'' for '/', not an empty string + if (path === '/') return '/'; + var lastSlash = path.lastIndexOf('/'); + if (lastSlash === -1) return path; + return path.substr(lastSlash+1); + },extname:function (path) { + return PATH.splitPath(path)[3]; + },join:function () { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join('/')); + },join2:function (l, r) { + return PATH.normalize(l + '/' + r); + },resolve:function () { + var resolvedPath = '', + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : FS.cwd(); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + return ''; // an invalid portion invalidates the whole thing + } + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; + },relative:function (from, to) { + from = PATH.resolve(from).substr(1); + to = PATH.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); + }}; var TTY={ttys:[],init:function () { // https://github.com/kripken/emscripten/pull/1555 @@ -1647,13 +1815,28 @@ function copyTempDouble(ptr) { if (!tty.input.length) { var result = null; if (ENVIRONMENT_IS_NODE) { - result = process['stdin']['read'](); - if (!result) { - if (process['stdin']['_readableState'] && process['stdin']['_readableState']['ended']) { - return null; // EOF - } - return undefined; // no data available + // we will read data by chunks of BUFSIZE + var BUFSIZE = 256; + var buf = new Buffer(BUFSIZE); + var bytesRead = 0; + + var fd = process.stdin.fd; + // Linux and Mac cannot use process.stdin.fd (which isn't set up as sync) + var usingDevice = false; + try { + fd = fs.openSync('/dev/stdin', 'r'); + usingDevice = true; + } catch (e) {} + + bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null); + + if (usingDevice) { fs.closeSync(fd); } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString('utf-8'); + } else { + result = null; } + } else if (typeof window != 'undefined' && typeof window.prompt == 'function') { // Browser. @@ -1674,28 +1857,28 @@ function copyTempDouble(ptr) { tty.input = intArrayFromString(result, true); } return tty.input.shift(); - },flush:function (tty) { - if (tty.output && tty.output.length > 0) { - Module['print'](tty.output.join('')); - tty.output = []; - } },put_char:function (tty, val) { if (val === null || val === 10) { - Module['print'](tty.output.join('')); + Module['print'](UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { - tty.output.push(TTY.utf8.processCChar(val)); + if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. + } + },flush:function (tty) { + if (tty.output && tty.output.length > 0) { + Module['print'](UTF8ArrayToString(tty.output, 0)); + tty.output = []; } }},default_tty1_ops:{put_char:function (tty, val) { if (val === null || val === 10) { - Module['printErr'](tty.output.join('')); + Module['printErr'](UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { - tty.output.push(TTY.utf8.processCChar(val)); + if (val != 0) tty.output.push(val); } },flush:function (tty) { if (tty.output && tty.output.length > 0) { - Module['printErr'](tty.output.join('')); + Module['printErr'](UTF8ArrayToString(tty.output, 0)); tty.output = []; } }}}; @@ -1735,7 +1918,8 @@ function copyTempDouble(ptr) { read: MEMFS.stream_ops.read, write: MEMFS.stream_ops.write, allocate: MEMFS.stream_ops.allocate, - mmap: MEMFS.stream_ops.mmap + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync } }, link: { @@ -1793,7 +1977,6 @@ function copyTempDouble(ptr) { if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. return new Uint8Array(node.contents); },expandFileStorage:function (node, newCapacity) { - // If we are asked to expand the size of a file that already exists, revert to using a standard JS array to store the file // instead of a typed array. This makes resizing the array more flexible because we can just .push() elements at the back to // increase the size. @@ -1826,7 +2009,6 @@ function copyTempDouble(ptr) { node.usedBytes = 0; return; } - if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. var oldContents = node.contents; node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. @@ -1934,8 +2116,7 @@ function copyTempDouble(ptr) { assert(size >= 0); if (size > 8 && contents.subarray) { // non-trivial, and typed array buffer.set(contents.subarray(position, position + size), offset); - } else - { + } else { for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; } return size; @@ -1958,13 +2139,15 @@ function copyTempDouble(ptr) { return length; } } + // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. MEMFS.expandFileStorage(node, position+length); if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. - else + else { for (var i = 0; i < length; i++) { node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. } + } node.usedBytes = Math.max(node.usedBytes, position+length); return length; },llseek:function (stream, offset, whence) { @@ -2014,6 +2197,18 @@ function copyTempDouble(ptr) { buffer.set(contents, ptr); } return { ptr: ptr, allocated: allocated }; + },msync:function (stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(ERRNO_CODES.ENODEV); + } + if (mmapFlags & 2) { + // MAP_PRIVATE calls need not to be synced back to underlying fs + return 0; + } + + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + // should we check if bytesWritten and length are the same? + return 0; }}}; var IDBFS={dbs:{},indexedDB:function () { @@ -2063,7 +2258,9 @@ function copyTempDouble(ptr) { fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); } - fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + if (!fileStore.indexNames.contains('timestamp')) { + fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + } }; req.onsuccess = function() { db = req.result; @@ -2072,8 +2269,9 @@ function copyTempDouble(ptr) { IDBFS.dbs[name] = db; callback(null, db); }; - req.onerror = function() { + req.onerror = function(e) { callback(this.error); + e.preventDefault(); }; },getLocalSet:function (mount, callback) { var entries = {}; @@ -2114,7 +2312,10 @@ function copyTempDouble(ptr) { if (err) return callback(err); var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); - transaction.onerror = function() { callback(this.error); }; + transaction.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; var store = transaction.objectStore(IDBFS.DB_STORE_NAME); var index = store.index('timestamp'); @@ -2187,15 +2388,24 @@ function copyTempDouble(ptr) { },loadRemoteEntry:function (store, path, callback) { var req = store.get(path); req.onsuccess = function(event) { callback(null, event.target.result); }; - req.onerror = function() { callback(this.error); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; },storeRemoteEntry:function (store, path, entry, callback) { var req = store.put(entry, path); req.onsuccess = function() { callback(null); }; - req.onerror = function() { callback(this.error); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; },removeRemoteEntry:function (store, path, callback) { var req = store.delete(path); req.onsuccess = function() { callback(null); }; - req.onerror = function() { callback(this.error); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; },reconcile:function (src, dst, callback) { var total = 0; @@ -2242,7 +2452,10 @@ function copyTempDouble(ptr) { } }; - transaction.onerror = function() { done(this.error); }; + transaction.onerror = function(e) { + done(this.error); + e.preventDefault(); + }; // sort paths in ascending order so directory entries are created // before the files inside them @@ -2289,7 +2502,7 @@ function copyTempDouble(ptr) { try { stat = fs.lstatSync(path); if (NODEFS.isWindows) { - // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so + // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so // propagate write bits to execute bits. stat.mode = stat.mode | ((stat.mode & 146) >> 1); } @@ -2308,10 +2521,11 @@ function copyTempDouble(ptr) { parts.reverse(); return PATH.join.apply(null, parts); },flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function (flags) { + flags &= ~0100000 /*O_LARGEFILE*/; // Ignore this flag from musl, otherwise node.js fails to open the file. if (flags in NODEFS.flagsToPermissionStringMap) { return NODEFS.flagsToPermissionStringMap[flags]; } else { - return flags; + throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } },node_ops:{getattr:function (node) { var path = NODEFS.realPath(node); @@ -2427,7 +2641,9 @@ function copyTempDouble(ptr) { },readlink:function (node) { var path = NODEFS.realPath(node); try { - return fs.readlinkSync(path); + path = fs.readlinkSync(path); + path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); + return path; } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(ERRNO_CODES[e.code]); @@ -2499,64 +2715,167 @@ function copyTempDouble(ptr) { return position; }}}; - var _stdin=allocate(1, "i32*", ALLOC_STATIC); - - var _stdout=allocate(1, "i32*", ALLOC_STATIC); - - var _stderr=allocate(1, "i32*", ALLOC_STATIC); - - function _fflush(stream) { - // int fflush(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fflush.html - - /* - // Disabled, see https://github.com/kripken/emscripten/issues/2770 - stream = FS.getStreamFromPtr(stream); - if (stream.stream_ops.flush) { - stream.stream_ops.flush(stream); - } - */ - }var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},handleFSError:function (e) { - if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); - return ___setErrNo(e.errno); - },lookupPath:function (path, opts) { - path = PATH.resolve(FS.cwd(), path); - opts = opts || {}; - - if (!path) return { path: '', node: null }; - - var defaults = { - follow_mount: true, - recurse_count: 0 - }; - for (var key in defaults) { - if (opts[key] === undefined) { - opts[key] = defaults[key]; + var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function (mount) { + assert(ENVIRONMENT_IS_WORKER); + if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync(); + var root = WORKERFS.createNode(null, '/', WORKERFS.DIR_MODE, 0); + var createdParents = {}; + function ensureParent(path) { + // return the parent node, creating subdirs as necessary + var parts = path.split('/'); + var parent = root; + for (var i = 0; i < parts.length-1; i++) { + var curr = parts.slice(0, i+1).join('/'); + if (!createdParents[curr]) { + createdParents[curr] = WORKERFS.createNode(parent, curr, WORKERFS.DIR_MODE, 0); + } + parent = createdParents[curr]; } + return parent; } - - if (opts.recurse_count > 8) { // max recursive lookup of 8 - throw new FS.ErrnoError(ERRNO_CODES.ELOOP); + function base(path) { + var parts = path.split('/'); + return parts[parts.length-1]; } - - // split the path - var parts = PATH.normalizeArray(path.split('/').filter(function(p) { - return !!p; - }), false); - - // start at the root - var current = FS.root; - var current_path = '/'; - - for (var i = 0; i < parts.length; i++) { - var islast = (i === parts.length-1); - if (islast && opts.parent) { - // stop resolving - break; - } - - current = FS.lookupNode(current, parts[i]); - current_path = PATH.join2(current_path, parts[i]); + // We also accept FileList here, by using Array.prototype + Array.prototype.forEach.call(mount.opts["files"] || [], function(file) { + WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate); + }); + (mount.opts["blobs"] || []).forEach(function(obj) { + WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"]); + }); + (mount.opts["packages"] || []).forEach(function(pack) { + pack['metadata'].files.forEach(function(file) { + var name = file.filename.substr(1); // remove initial slash + WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack['blob'].slice(file.start, file.end)); + }); + }); + return root; + },createNode:function (parent, name, mode, dev, contents, mtime) { + var node = FS.createNode(parent, name, mode); + node.mode = mode; + node.node_ops = WORKERFS.node_ops; + node.stream_ops = WORKERFS.stream_ops; + node.timestamp = (mtime || new Date).getTime(); + assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE); + if (mode === WORKERFS.FILE_MODE) { + node.size = contents.size; + node.contents = contents; + } else { + node.size = 4096; + node.contents = {}; + } + if (parent) { + parent.contents[name] = node; + } + return node; + },node_ops:{getattr:function (node) { + return { + dev: 1, + ino: undefined, + mode: node.mode, + nlink: 1, + uid: 0, + gid: 0, + rdev: undefined, + size: node.size, + atime: new Date(node.timestamp), + mtime: new Date(node.timestamp), + ctime: new Date(node.timestamp), + blksize: 4096, + blocks: Math.ceil(node.size / 4096), + }; + },setattr:function (node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + },lookup:function (parent, name) { + throw new FS.ErrnoError(ERRNO_CODES.ENOENT); + },mknod:function (parent, name, mode, dev) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },rename:function (oldNode, newDir, newName) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },unlink:function (parent, name) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },rmdir:function (parent, name) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },readdir:function (node) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },symlink:function (parent, newName, oldPath) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },readlink:function (node) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + }},stream_ops:{read:function (stream, buffer, offset, length, position) { + if (position >= stream.node.size) return 0; + var chunk = stream.node.contents.slice(position, position + length); + var ab = WORKERFS.reader.readAsArrayBuffer(chunk); + buffer.set(new Uint8Array(ab), offset); + return chunk.size; + },write:function (stream, buffer, offset, length, position) { + throw new FS.ErrnoError(ERRNO_CODES.EIO); + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.size; + } + } + if (position < 0) { + throw new FS.ErrnoError(ERRNO_CODES.EINVAL); + } + return position; + }}}; + + var _stdin=allocate(1, "i32*", ALLOC_STATIC); + + var _stdout=allocate(1, "i32*", ALLOC_STATIC); + + var _stderr=allocate(1, "i32*", ALLOC_STATIC);var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,handleFSError:function (e) { + if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); + return ___setErrNo(e.errno); + },lookupPath:function (path, opts) { + path = PATH.resolve(FS.cwd(), path); + opts = opts || {}; + + if (!path) return { path: '', node: null }; + + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + for (var key in defaults) { + if (opts[key] === undefined) { + opts[key] = defaults[key]; + } + } + + if (opts.recurse_count > 8) { // max recursive lookup of 8 + throw new FS.ErrnoError(ERRNO_CODES.ELOOP); + } + + // split the path + var parts = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), false); + + // start at the root + var current = FS.root; + var current_path = '/'; + + for (var i = 0; i < parts.length; i++) { + var islast = (i === parts.length-1); + if (islast && opts.parent) { + // stop resolving + break; + } + + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); // jump to the mount's root node if this is a mountpoint if (FS.isMountpoint(current)) { @@ -2572,7 +2891,7 @@ function copyTempDouble(ptr) { while (FS.isLink(current.mode)) { var link = FS.readlink(current_path); current_path = PATH.resolve(PATH.dirname(current_path), link); - + var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); current = lookup.node; @@ -2710,8 +3029,7 @@ function copyTempDouble(ptr) { } return flags; },flagsToPermissionString:function (flag) { - var accmode = flag & 2097155; - var perms = ['r', 'w', 'rw'][accmode]; + var perms = ['r', 'w', 'rw'][flag & 3]; if ((flag & 512)) { perms += 'w'; } @@ -2822,10 +3140,6 @@ function copyTempDouble(ptr) { return stream; },closeStream:function (fd) { FS.streams[fd] = null; - },getStreamFromPtr:function (ptr) { - return FS.streams[ptr - 1]; - },getPtrForStream:function (stream) { - return stream ? stream.fd + 1 : 0; },chrdev_stream_ops:{open:function (stream) { var device = FS.getDevice(stream.node.rdev); // override node's stream ops with the device's @@ -3190,7 +3504,7 @@ function copyTempDouble(ptr) { if (!link.node_ops.readlink) { throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } - return link.node_ops.readlink(link); + return PATH.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); },stat:function (path, dontFollow) { var lookup = FS.lookupPath(path, { follow: !dontFollow }); var node = lookup.node; @@ -3338,6 +3652,10 @@ function copyTempDouble(ptr) { if (FS.isChrdev(node.mode)) { flags &= ~512; } + // if asked only for a directory, then this must be one + if ((flags & 65536) && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); + } // check permissions, if this is not a file we just created now (it is ok to // create and write to a file with read-only permissions; it is read-only // for later use) @@ -3393,6 +3711,7 @@ function copyTempDouble(ptr) { } return stream; },close:function (stream) { + if (stream.getdents) stream.getdents = null; // free readdir state try { if (stream.stream_ops.close) { stream.stream_ops.close(stream); @@ -3487,6 +3806,13 @@ function copyTempDouble(ptr) { throw new FS.ErrnoError(ERRNO_CODES.ENODEV); } return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); + },msync:function (stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + },munmap:function (stream) { + return 0; },ioctl:function (stream, cmd, arg) { if (!stream.stream_ops.ioctl) { throw new FS.ErrnoError(ERRNO_CODES.ENOTTY); @@ -3506,11 +3832,7 @@ function copyTempDouble(ptr) { var buf = new Uint8Array(length); FS.read(stream, buf, 0, length, 0); if (opts.encoding === 'utf8') { - ret = ''; - var utf8 = new Runtime.UTF8Processor(); - for (var i = 0; i < length; i++) { - ret += utf8.processCChar(buf[i]); - } + ret = UTF8ArrayToString(buf, 0); } else if (opts.encoding === 'binary') { ret = buf; } @@ -3525,9 +3847,9 @@ function copyTempDouble(ptr) { } var stream = FS.open(path, opts.flags, opts.mode); if (opts.encoding === 'utf8') { - var utf8 = new Runtime.UTF8Processor(); - var buf = new Uint8Array(utf8.processJSString(data)); - FS.write(stream, buf, 0, buf.length, 0, opts.canOwn); + var buf = new Uint8Array(lengthBytesUTF8(data)+1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, 0, opts.canOwn); } else if (opts.encoding === 'binary') { FS.write(stream, data, 0, data.length, 0, opts.canOwn); } @@ -3554,7 +3876,7 @@ function copyTempDouble(ptr) { // setup /dev/null FS.registerDevice(FS.makedev(1, 3), { read: function() { return 0; }, - write: function() { return 0; } + write: function(stream, buffer, offset, length, pos) { return length; } }); FS.mkdev('/dev/null', FS.makedev(1, 3)); // setup /dev/tty and /dev/tty1 @@ -3583,6 +3905,31 @@ function copyTempDouble(ptr) { // just create the tmp dirs that reside in it commonly FS.mkdir('/dev/shm'); FS.mkdir('/dev/shm/tmp'); + },createSpecialDirectories:function () { + // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) + FS.mkdir('/proc'); + FS.mkdir('/proc/self'); + FS.mkdir('/proc/self/fd'); + FS.mount({ + mount: function() { + var node = FS.createNode('/proc/self', 'fd', 16384 | 0777, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + var ret = { + parent: null, + mount: { mountpoint: 'fake' }, + node_ops: { readlink: function() { return stream.path } } + }; + ret.parent = ret; // make it look like a simple root node + return ret; + } + }; + return node; + } + }, {}, '/proc/self/fd'); },createStandardStreams:function () { // TODO deprecate the old functionality of a single // input / output callback and that utilizes FS.createDevice @@ -3610,19 +3957,17 @@ function copyTempDouble(ptr) { // open default streams for the stdin, stdout and stderr devices var stdin = FS.open('/dev/stdin', 'r'); - HEAP32[((_stdin)>>2)]=FS.getPtrForStream(stdin); assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); var stdout = FS.open('/dev/stdout', 'w'); - HEAP32[((_stdout)>>2)]=FS.getPtrForStream(stdout); assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); var stderr = FS.open('/dev/stderr', 'w'); - HEAP32[((_stderr)>>2)]=FS.getPtrForStream(stderr); assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); },ensureErrnoError:function () { if (FS.ErrnoError) return; FS.ErrnoError = function ErrnoError(errno, node) { + //Module.printErr(stackTrace()); // useful for debugging this.node = node; this.setErrno = function(errno) { this.errno = errno; @@ -3652,6 +3997,14 @@ function copyTempDouble(ptr) { FS.createDefaultDirectories(); FS.createDefaultDevices(); + FS.createSpecialDirectories(); + + FS.filesystems = { + 'MEMFS': MEMFS, + 'IDBFS': IDBFS, + 'NODEFS': NODEFS, + 'WORKERFS': WORKERFS, + }; },init:function (input, output, error) { assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); FS.init.initialized = true; @@ -3666,6 +4019,10 @@ function copyTempDouble(ptr) { FS.createStandardStreams(); },quit:function () { FS.init.initialized = false; + // force-flush all streams, so we get musl std streams printed out + var fflush = Module['_fflush']; + if (fflush) fflush(0); + // close all of our streams for (var i = 0; i < FS.streams.length; i++) { var stream = FS.streams[i]; if (!stream) { @@ -3982,18 +4339,20 @@ function copyTempDouble(ptr) { }; node.stream_ops = stream_ops; return node; - },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn) { + },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { Browser.init(); // TODO we should allow people to just pass in a complete filename instead // of parent and name being that we just join them anyways var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname function processData(byteArray) { function finish(byteArray) { + if (preFinish) preFinish(); if (!dontCreateFile) { FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); } if (onload) onload(); - removeRunDependency('cp ' + fullname); + removeRunDependency(dep); } var handled = false; Module['preloadPlugins'].forEach(function(plugin) { @@ -4001,14 +4360,14 @@ function copyTempDouble(ptr) { if (plugin['canHandle'](fullname)) { plugin['handle'](byteArray, fullname, finish, function() { if (onerror) onerror(); - removeRunDependency('cp ' + fullname); + removeRunDependency(dep); }); handled = true; } }); if (!handled) finish(byteArray); } - addRunDependency('cp ' + fullname); + addRunDependency(dep); if (typeof url == 'string') { Browser.asyncLoad(url, function(byteArray) { processData(byteArray); @@ -4088,149 +4447,384 @@ function copyTempDouble(ptr) { transaction.onerror = onerror; }; openRequest.onerror = onerror; - }};var PATH={splitPath:function (filename) { - var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; - return splitPathRe.exec(filename).slice(1); - },normalizeArray:function (parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; + }};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function (dirfd, path) { + if (path[0] !== '/') { + // relative path + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + dir = dirstream.path; } + path = PATH.join2(dir, path); } - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); + return path; + },doStat:function (func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + // an error occurred while trying to look up the path; we should just report ENOTDIR + return -ERRNO_CODES.ENOTDIR; } + throw e; } - return parts; - },normalize:function (path) { - var isAbsolute = path.charAt(0) === '/', - trailingSlash = path.substr(-1) === '/'; - // Normalize the path - path = PATH.normalizeArray(path.split('/').filter(function(p) { - return !!p; - }), !isAbsolute).join('/'); - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - return (isAbsolute ? '/' : '') + path; - },dirname:function (path) { - var result = PATH.splitPath(path), - root = result[0], - dir = result[1]; - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); + HEAP32[((buf)>>2)]=stat.dev; + HEAP32[(((buf)+(4))>>2)]=0; + HEAP32[(((buf)+(8))>>2)]=stat.ino; + HEAP32[(((buf)+(12))>>2)]=stat.mode; + HEAP32[(((buf)+(16))>>2)]=stat.nlink; + HEAP32[(((buf)+(20))>>2)]=stat.uid; + HEAP32[(((buf)+(24))>>2)]=stat.gid; + HEAP32[(((buf)+(28))>>2)]=stat.rdev; + HEAP32[(((buf)+(32))>>2)]=0; + HEAP32[(((buf)+(36))>>2)]=stat.size; + HEAP32[(((buf)+(40))>>2)]=4096; + HEAP32[(((buf)+(44))>>2)]=stat.blocks; + HEAP32[(((buf)+(48))>>2)]=(stat.atime.getTime() / 1000)|0; + HEAP32[(((buf)+(52))>>2)]=0; + HEAP32[(((buf)+(56))>>2)]=(stat.mtime.getTime() / 1000)|0; + HEAP32[(((buf)+(60))>>2)]=0; + HEAP32[(((buf)+(64))>>2)]=(stat.ctime.getTime() / 1000)|0; + HEAP32[(((buf)+(68))>>2)]=0; + HEAP32[(((buf)+(72))>>2)]=stat.ino; + return 0; + },doMsync:function (addr, stream, len, flags) { + var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len)); + FS.msync(stream, buffer, 0, len, flags); + },doMkdir:function (path, mode) { + // remove a trailing slash, if one - /a/b/ has basename of '', but + // we want to create b in the context of this function + path = PATH.normalize(path); + if (path[path.length-1] === '/') path = path.substr(0, path.length-1); + FS.mkdir(path, mode, 0); + return 0; + },doMknod:function (path, mode, dev) { + // we don't want this in the JS API as it uses mknod to create all nodes. + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + default: return -ERRNO_CODES.EINVAL; } - return root + dir; - },basename:function (path) { - // EMSCRIPTEN return '/'' for '/', not an empty string - if (path === '/') return '/'; - var lastSlash = path.lastIndexOf('/'); - if (lastSlash === -1) return path; - return path.substr(lastSlash+1); - },extname:function (path) { - return PATH.splitPath(path)[3]; - },join:function () { - var paths = Array.prototype.slice.call(arguments, 0); - return PATH.normalize(paths.join('/')); - },join2:function (l, r) { - return PATH.normalize(l + '/' + r); - },resolve:function () { - var resolvedPath = '', - resolvedAbsolute = false; - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : FS.cwd(); - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - return ''; // an invalid portion invalidates the whole thing - } - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; + FS.mknod(path, mode, dev); + return 0; + },doReadlink:function (path, buf, bufsize) { + if (bufsize <= 0) return -ERRNO_CODES.EINVAL; + var ret = FS.readlink(path); + ret = ret.slice(0, Math.max(0, bufsize)); + writeStringToMemory(ret, buf, true); + return ret.length; + },doAccess:function (path, amode) { + if (amode & ~7) { + // need a valid mode + return -ERRNO_CODES.EINVAL; } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; - },relative:function (from, to) { - from = PATH.resolve(from).substr(1); - to = PATH.resolve(to).substr(1); - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - if (start > end) return []; - return arr.slice(start, end - start + 1); + var node; + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + var perms = ''; + if (amode & 4) perms += 'r'; + if (amode & 2) perms += 'w'; + if (amode & 1) perms += 'x'; + if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { + return -ERRNO_CODES.EACCES; } - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } + return 0; + },doDup:function (path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + },doReadv:function (stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.read(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; // nothing more to read } - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); + return ret; + },doWritev:function (stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.write(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - return outputParts.join('/'); - }}; - - - function _emscripten_set_main_loop_timing(mode, value) { - Browser.mainLoop.timingMode = mode; - Browser.mainLoop.timingValue = value; - - if (!Browser.mainLoop.func) { - return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. - } - - if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { - setTimeout(Browser.mainLoop.runner, value); // doing this each time means that on exception, we stop - }; - Browser.mainLoop.method = 'timeout'; - } else if (mode == 1 /*EM_TIMING_RAF*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { - Browser.requestAnimationFrame(Browser.mainLoop.runner); - }; - Browser.mainLoop.method = 'rAF'; - } - return 0; - }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg) { - Module['noExitRuntime'] = true; - - assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); + return ret; + },varargs:0,get:function (varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function () { + var ret = Pointer_stringify(SYSCALLS.get()); + return ret; + },getStreamFromFD:function () { + var stream = FS.getStream(SYSCALLS.get()); + if (!stream) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + return stream; + },getSocketFromFD:function () { + var socket = SOCKFS.getSocket(SYSCALLS.get()); + if (!socket) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + return socket; + },getSocketAddress:function (allowNull) { + var addrp = SYSCALLS.get(), addrlen = SYSCALLS.get(); + if (allowNull && addrp === 0) return null; + var info = __read_sockaddr(addrp, addrlen); + if (info.errno) throw new FS.ErrnoError(info.errno); + info.addr = DNS.lookup_addr(info.addr) || info.addr; + return info; + },get64:function () { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function () { + assert(SYSCALLS.get() === 0); + }};function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function _sysconf(name) { + // long sysconf(int name); + // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html + switch(name) { + case 30: return PAGE_SIZE; + case 85: return totalMemory / PAGE_SIZE; + case 132: + case 133: + case 12: + case 137: + case 138: + case 15: + case 235: + case 16: + case 17: + case 18: + case 19: + case 20: + case 149: + case 13: + case 10: + case 236: + case 153: + case 9: + case 21: + case 22: + case 159: + case 154: + case 14: + case 77: + case 78: + case 139: + case 80: + case 81: + case 82: + case 68: + case 67: + case 164: + case 11: + case 29: + case 47: + case 48: + case 95: + case 52: + case 51: + case 46: + return 200809; + case 79: + return 0; + case 27: + case 246: + case 127: + case 128: + case 23: + case 24: + case 160: + case 161: + case 181: + case 182: + case 242: + case 183: + case 184: + case 243: + case 244: + case 245: + case 165: + case 178: + case 179: + case 49: + case 50: + case 168: + case 169: + case 175: + case 170: + case 171: + case 172: + case 97: + case 76: + case 32: + case 173: + case 35: + return -1; + case 176: + case 177: + case 7: + case 155: + case 8: + case 157: + case 125: + case 126: + case 92: + case 93: + case 129: + case 130: + case 131: + case 94: + case 91: + return 1; + case 74: + case 60: + case 69: + case 70: + case 4: + return 1024; + case 31: + case 42: + case 72: + return 32; + case 87: + case 26: + case 33: + return 2147483647; + case 34: + case 1: + return 47839; + case 38: + case 36: + return 99; + case 43: + case 37: + return 2048; + case 0: return 2097152; + case 3: return 65536; + case 28: return 32768; + case 44: return 32767; + case 75: return 16384; + case 39: return 1000; + case 89: return 700; + case 71: return 256; + case 40: return 255; + case 2: return 100; + case 180: return 64; + case 25: return 20; + case 5: return 16; + case 6: return 6; + case 73: return 4; + case 84: { + if (typeof navigator === 'object') return navigator['hardwareConcurrency'] || 1; + return 1; + } + } + ___setErrNo(ERRNO_CODES.EINVAL); + return -1; + } + + function _sbrk(bytes) { + // Implement a Linux-like 'memory area' for our 'process'. + // Changes the size of the memory area by |bytes|; returns the + // address of the previous top ('break') of the memory area + // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP + var self = _sbrk; + if (!self.called) { + DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned + self.called = true; + assert(Runtime.dynamicAlloc); + self.alloc = Runtime.dynamicAlloc; + Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; + } + var ret = DYNAMICTOP; + if (bytes != 0) { + var success = self.alloc(bytes); + if (!success) return -1 >>> 0; // sbrk failure code + } + return ret; // Previous break location. + } + + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + return dest; + } + Module["_memcpy"] = _memcpy; + Module["_memmove"] = _memmove; + + + + + function _emscripten_set_main_loop_timing(mode, value) { + Browser.mainLoop.timingMode = mode; + Browser.mainLoop.timingValue = value; + + if (!Browser.mainLoop.func) { + return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. + } + + if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { + setTimeout(Browser.mainLoop.runner, value); // doing this each time means that on exception, we stop + }; + Browser.mainLoop.method = 'timeout'; + } else if (mode == 1 /*EM_TIMING_RAF*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { + Browser.requestAnimationFrame(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'rAF'; + } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { + if (!window['setImmediate']) { + // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) + var setImmediates = []; + var emscriptenMainLoopMessageId = '__emcc'; + function Browser_setImmediate_messageHandler(event) { + if (event.source === window && event.data === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()(); + } + } + window.addEventListener("message", Browser_setImmediate_messageHandler, true); + window['setImmediate'] = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + window.postMessage(emscriptenMainLoopMessageId, "*"); + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + window['setImmediate'](Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'immediate'; + } + return 0; + }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { + Module['noExitRuntime'] = true; + + assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); Browser.mainLoop.func = func; Browser.mainLoop.arg = arg; @@ -4299,10 +4893,12 @@ function copyTempDouble(ptr) { Browser.mainLoop.scheduler(); } - if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); - else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) + if (!noSetTiming) { + if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) - Browser.mainLoop.scheduler(); + Browser.mainLoop.scheduler(); + } if (simulateInfiniteLoop) { throw 'SimulateInfiniteLoop'; @@ -4316,8 +4912,9 @@ function copyTempDouble(ptr) { var timingValue = Browser.mainLoop.timingValue; var func = Browser.mainLoop.func; Browser.mainLoop.func = null; - _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg); + _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler(); },updateStatus:function () { if (Module['setStatus']) { var message = Module['statusMessage'] || 'Please wait...'; @@ -4571,11 +5168,13 @@ function copyTempDouble(ptr) { Browser.init(); } return ctx; - },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas) { + },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas, vrDevice) { Browser.lockPointer = lockPointer; Browser.resizeCanvas = resizeCanvas; + Browser.vrDevice = vrDevice; if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; + if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; var canvas = Module['canvas']; function fullScreenChange() { @@ -4620,13 +5219,18 @@ function copyTempDouble(ptr) { var canvasContainer = document.createElement("div"); canvas.parentNode.insertBefore(canvasContainer, canvas); canvasContainer.appendChild(canvas); - + // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) canvasContainer.requestFullScreen = canvasContainer['requestFullScreen'] || canvasContainer['mozRequestFullScreen'] || canvasContainer['msRequestFullscreen'] || (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); - canvasContainer.requestFullScreen(); + + if (vrDevice) { + canvasContainer.requestFullScreen({ vrDisplay: vrDevice }); + } else { + canvasContainer.requestFullScreen(); + } },nextRAF:0,fakeRequestAnimationFrame:function (func) { // try to keep 60fps between calls to here var now = Date.now(); @@ -4657,19 +5261,43 @@ function copyTempDouble(ptr) { return function() { if (!ABORT) return func.apply(null, arguments); }; + },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function () { + Browser.allowAsyncCallbacks = false; + },resumeAsyncCallbacks:function () { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now + Browser.allowAsyncCallbacks = true; + if (Browser.queuedAsyncCallbacks.length > 0) { + var callbacks = Browser.queuedAsyncCallbacks; + Browser.queuedAsyncCallbacks = []; + callbacks.forEach(function(func) { + func(); + }); + } },safeRequestAnimationFrame:function (func) { return Browser.requestAnimationFrame(function() { - if (!ABORT) func(); + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } }); },safeSetTimeout:function (func, timeout) { Module['noExitRuntime'] = true; return setTimeout(function() { - if (!ABORT) func(); + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } }, timeout); },safeSetInterval:function (func, timeout) { Module['noExitRuntime'] = true; return setInterval(function() { - if (!ABORT) func(); + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } // drop it on the floor otherwise, next interval will kick in }, timeout); },getMimetype:function (name) { return { @@ -4767,8 +5395,10 @@ function copyTempDouble(ptr) { Browser.lastTouches[touch.identifier] = coords; Browser.touches[touch.identifier] = coords; } else if (event.type === 'touchend' || event.type === 'touchmove') { - Browser.lastTouches[touch.identifier] = Browser.touches[touch.identifier]; - Browser.touches[touch.identifier] = { x: adjustedX, y: adjustedY }; + var last = Browser.touches[touch.identifier]; + if (!last) last = coords; + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords; } return; } @@ -4897,16 +5527,83 @@ function copyTempDouble(ptr) { } return ret; } -___errno_state = Runtime.staticAlloc(4); HEAP32[((___errno_state)>>2)]=0; -Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas) { Browser.requestFullScreen(lockPointer, resizeCanvas) }; + + function _pthread_self() { + //FIXME: assumes only a single thread + return 0; + } + + function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + var offset = offset_low; + assert(offset_high === 0); + FS.llseek(stream, offset, whence); + HEAP32[((result)>>2)]=stream.position; + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall146(which, varargs) {SYSCALLS.varargs = varargs; + try { + // writev + var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + return SYSCALLS.doWritev(stream, iov, iovcnt); + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get(); + switch (op) { + case 21505: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + return 0; + } + case 21506: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + return 0; // no-op, not actually adjusting terminal settings + } + case 21519: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + var argp = SYSCALLS.get(); + HEAP32[((argp)>>2)]=0; + return 0; + } + case 21520: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + return -ERRNO_CODES.EINVAL; // not supported + } + case 21531: { + var argp = SYSCALLS.get(); + return FS.ioctl(stream, op, argp); + } + default: abort('bad ioctl syscall ' + op); + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } +FS.staticInit();__ATINIT__.unshift(function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() });__ATMAIN__.push(function() { FS.ignorePermissions = false });__ATEXIT__.push(function() { FS.quit() });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice;Module["FS_unlink"] = FS.unlink; +__ATINIT__.unshift(function() { TTY.init() });__ATEXIT__.push(function() { TTY.shutdown() }); +if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); } +Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } -FS.staticInit();__ATINIT__.unshift({ func: function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() } });__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });__ATEXIT__.push({ func: function() { FS.quit() } });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice; -__ATINIT__.unshift({ func: function() { TTY.init() } });__ATEXIT__.push({ func: function() { TTY.shutdown() } });TTY.utf8 = new Runtime.UTF8Processor(); -if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); NODEFS.staticInit(); } + Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) } STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP); staticSealed = true; // seal the static portion of memory @@ -4917,16 +5614,44 @@ DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX); assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack"); - var ctlz_i8 = allocate([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_DYNAMIC); var cttz_i8 = allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0], "i8", ALLOC_DYNAMIC); -Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }; -Module.asmLibraryArg = { "abort": abort, "assert": assert, "min": Math_min, "_fflush": _fflush, "_sysconf": _sysconf, "_abort": _abort, "___setErrNo": ___setErrNo, "_sbrk": _sbrk, "_time": _time, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_emscripten_set_main_loop": _emscripten_set_main_loop, "___errno_location": ___errno_location, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8, "ctlz_i8": ctlz_i8, "NaN": NaN, "Infinity": Infinity }; -// EMSCRIPTEN_START_ASM -var asm = (function(global, env, buffer) { - 'use asm'; - +function invoke_ii(index,a1) { + try { + return Module["dynCall_ii"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + asm["setThrew"](1, 0); + } +} + +function invoke_iiii(index,a1,a2,a3) { + try { + return Module["dynCall_iiii"](index,a1,a2,a3); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + asm["setThrew"](1, 0); + } +} + +function invoke_vi(index,a1) { + try { + Module["dynCall_vi"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + asm["setThrew"](1, 0); + } +} + +Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; + +Module.asmLibraryArg = { "abort": abort, "assert": assert, "invoke_ii": invoke_ii, "invoke_iiii": invoke_iiii, "invoke_vi": invoke_vi, "_pthread_cleanup_pop": _pthread_cleanup_pop, "___lock": ___lock, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_pthread_self": _pthread_self, "___syscall6": ___syscall6, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_abort": _abort, "_sbrk": _sbrk, "_time": _time, "___setErrNo": ___setErrNo, "_emscripten_memcpy_big": _emscripten_memcpy_big, "___syscall54": ___syscall54, "___unlock": ___unlock, "___syscall140": ___syscall140, "_pthread_cleanup_push": _pthread_cleanup_push, "_sysconf": _sysconf, "___syscall146": ___syscall146, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8 }; +// EMSCRIPTEN_START_ASM +var asm = (function(global, env, buffer) { + 'use asm'; + + var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); var HEAP32 = new global.Int32Array(buffer); @@ -4942,13 +5667,12 @@ var asm = (function(global, env, buffer) { var tempDoublePtr=env.tempDoublePtr|0; var ABORT=env.ABORT|0; var cttz_i8=env.cttz_i8|0; - var ctlz_i8=env.ctlz_i8|0; var __THREW__ = 0; var threwValue = 0; var setjmpId = 0; var undef = 0; - var nan = +env.NaN, inf = +env.Infinity; + var nan = global.NaN, inf = global.Infinity; var tempInt = 0, tempBigInt = 0, tempBigIntP = 0, tempBigIntS = 0, tempBigIntR = 0.0, tempBigIntI = 0, tempBigIntD = 0, tempValue = 0, tempDouble = 0.0; var tempRet0 = 0; @@ -4976,19 +5700,30 @@ var asm = (function(global, env, buffer) { var Math_log=global.Math.log; var Math_ceil=global.Math.ceil; var Math_imul=global.Math.imul; + var Math_min=global.Math.min; + var Math_clz32=global.Math.clz32; var abort=env.abort; var assert=env.assert; - var Math_min=env.min; - var _fflush=env._fflush; - var _sysconf=env._sysconf; + var invoke_ii=env.invoke_ii; + var invoke_iiii=env.invoke_iiii; + var invoke_vi=env.invoke_vi; + var _pthread_cleanup_pop=env._pthread_cleanup_pop; + var ___lock=env.___lock; + var _emscripten_set_main_loop=env._emscripten_set_main_loop; + var _pthread_self=env._pthread_self; + var ___syscall6=env.___syscall6; + var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing; var _abort=env._abort; - var ___setErrNo=env.___setErrNo; var _sbrk=env._sbrk; var _time=env._time; - var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing; + var ___setErrNo=env.___setErrNo; var _emscripten_memcpy_big=env._emscripten_memcpy_big; - var _emscripten_set_main_loop=env._emscripten_set_main_loop; - var ___errno_location=env.___errno_location; + var ___syscall54=env.___syscall54; + var ___unlock=env.___unlock; + var ___syscall140=env.___syscall140; + var _pthread_cleanup_push=env._pthread_cleanup_push; + var _sysconf=env._sysconf; + var ___syscall146=env.___syscall146; var tempFloat = 0.0; // EMSCRIPTEN_START_FUNCS @@ -4997,7 +5732,7 @@ function stackAlloc(size) { var ret = 0; ret = STACKTOP; STACKTOP = (STACKTOP + size)|0; -STACKTOP = (STACKTOP + 15)&-16; + STACKTOP = (STACKTOP + 15)&-16; return ret|0; } @@ -5008,6 +5743,12 @@ function stackRestore(top) { top = top|0; STACKTOP = top; } +function establishStackSpace(stackBase, stackMax) { + stackBase = stackBase|0; + stackMax = stackMax|0; + STACKTOP = stackBase; + STACK_MAX = stackMax; +} function setThrew(threw, value) { threw = threw|0; @@ -5035,6 +5776,7 @@ function copyTempDouble(ptr) { HEAP8[tempDoublePtr+6>>0] = HEAP8[ptr+6>>0]; HEAP8[tempDoublePtr+7>>0] = HEAP8[ptr+7>>0]; } + function setTempRet0(value) { value = value|0; tempRet0 = value; @@ -5060,189 +5802,189 @@ function _crypto_verify_32_ref($x,$y) { $0 = HEAP8[$x>>0]|0; $1 = HEAP8[$y>>0]|0; $2 = $1 ^ $0; - $3 = (($x) + 1|0); + $3 = ((($x)) + 1|0); $4 = HEAP8[$3>>0]|0; - $5 = (($y) + 1|0); + $5 = ((($y)) + 1|0); $6 = HEAP8[$5>>0]|0; $7 = $6 ^ $4; $8 = $7 | $2; - $9 = (($x) + 2|0); + $9 = ((($x)) + 2|0); $10 = HEAP8[$9>>0]|0; - $11 = (($y) + 2|0); + $11 = ((($y)) + 2|0); $12 = HEAP8[$11>>0]|0; $13 = $12 ^ $10; $14 = $8 | $13; - $15 = (($x) + 3|0); + $15 = ((($x)) + 3|0); $16 = HEAP8[$15>>0]|0; - $17 = (($y) + 3|0); + $17 = ((($y)) + 3|0); $18 = HEAP8[$17>>0]|0; $19 = $18 ^ $16; $20 = $14 | $19; - $21 = (($x) + 4|0); + $21 = ((($x)) + 4|0); $22 = HEAP8[$21>>0]|0; - $23 = (($y) + 4|0); + $23 = ((($y)) + 4|0); $24 = HEAP8[$23>>0]|0; $25 = $24 ^ $22; $26 = $20 | $25; - $27 = (($x) + 5|0); + $27 = ((($x)) + 5|0); $28 = HEAP8[$27>>0]|0; - $29 = (($y) + 5|0); + $29 = ((($y)) + 5|0); $30 = HEAP8[$29>>0]|0; $31 = $30 ^ $28; $32 = $26 | $31; - $33 = (($x) + 6|0); + $33 = ((($x)) + 6|0); $34 = HEAP8[$33>>0]|0; - $35 = (($y) + 6|0); + $35 = ((($y)) + 6|0); $36 = HEAP8[$35>>0]|0; $37 = $36 ^ $34; $38 = $32 | $37; - $39 = (($x) + 7|0); + $39 = ((($x)) + 7|0); $40 = HEAP8[$39>>0]|0; - $41 = (($y) + 7|0); + $41 = ((($y)) + 7|0); $42 = HEAP8[$41>>0]|0; $43 = $42 ^ $40; $44 = $38 | $43; - $45 = (($x) + 8|0); + $45 = ((($x)) + 8|0); $46 = HEAP8[$45>>0]|0; - $47 = (($y) + 8|0); + $47 = ((($y)) + 8|0); $48 = HEAP8[$47>>0]|0; $49 = $48 ^ $46; $50 = $44 | $49; - $51 = (($x) + 9|0); + $51 = ((($x)) + 9|0); $52 = HEAP8[$51>>0]|0; - $53 = (($y) + 9|0); + $53 = ((($y)) + 9|0); $54 = HEAP8[$53>>0]|0; $55 = $54 ^ $52; $56 = $50 | $55; - $57 = (($x) + 10|0); + $57 = ((($x)) + 10|0); $58 = HEAP8[$57>>0]|0; - $59 = (($y) + 10|0); + $59 = ((($y)) + 10|0); $60 = HEAP8[$59>>0]|0; $61 = $60 ^ $58; $62 = $56 | $61; - $63 = (($x) + 11|0); + $63 = ((($x)) + 11|0); $64 = HEAP8[$63>>0]|0; - $65 = (($y) + 11|0); + $65 = ((($y)) + 11|0); $66 = HEAP8[$65>>0]|0; $67 = $66 ^ $64; $68 = $62 | $67; - $69 = (($x) + 12|0); + $69 = ((($x)) + 12|0); $70 = HEAP8[$69>>0]|0; - $71 = (($y) + 12|0); + $71 = ((($y)) + 12|0); $72 = HEAP8[$71>>0]|0; $73 = $72 ^ $70; $74 = $68 | $73; - $75 = (($x) + 13|0); + $75 = ((($x)) + 13|0); $76 = HEAP8[$75>>0]|0; - $77 = (($y) + 13|0); + $77 = ((($y)) + 13|0); $78 = HEAP8[$77>>0]|0; $79 = $78 ^ $76; $80 = $74 | $79; - $81 = (($x) + 14|0); + $81 = ((($x)) + 14|0); $82 = HEAP8[$81>>0]|0; - $83 = (($y) + 14|0); + $83 = ((($y)) + 14|0); $84 = HEAP8[$83>>0]|0; $85 = $84 ^ $82; $86 = $80 | $85; - $87 = (($x) + 15|0); + $87 = ((($x)) + 15|0); $88 = HEAP8[$87>>0]|0; - $89 = (($y) + 15|0); + $89 = ((($y)) + 15|0); $90 = HEAP8[$89>>0]|0; $91 = $90 ^ $88; $92 = $86 | $91; - $93 = (($x) + 16|0); + $93 = ((($x)) + 16|0); $94 = HEAP8[$93>>0]|0; - $95 = (($y) + 16|0); + $95 = ((($y)) + 16|0); $96 = HEAP8[$95>>0]|0; $97 = $96 ^ $94; $98 = $92 | $97; - $99 = (($x) + 17|0); + $99 = ((($x)) + 17|0); $100 = HEAP8[$99>>0]|0; - $101 = (($y) + 17|0); + $101 = ((($y)) + 17|0); $102 = HEAP8[$101>>0]|0; $103 = $102 ^ $100; $104 = $98 | $103; - $105 = (($x) + 18|0); + $105 = ((($x)) + 18|0); $106 = HEAP8[$105>>0]|0; - $107 = (($y) + 18|0); + $107 = ((($y)) + 18|0); $108 = HEAP8[$107>>0]|0; $109 = $108 ^ $106; $110 = $104 | $109; - $111 = (($x) + 19|0); + $111 = ((($x)) + 19|0); $112 = HEAP8[$111>>0]|0; - $113 = (($y) + 19|0); + $113 = ((($y)) + 19|0); $114 = HEAP8[$113>>0]|0; $115 = $114 ^ $112; $116 = $110 | $115; - $117 = (($x) + 20|0); + $117 = ((($x)) + 20|0); $118 = HEAP8[$117>>0]|0; - $119 = (($y) + 20|0); + $119 = ((($y)) + 20|0); $120 = HEAP8[$119>>0]|0; $121 = $120 ^ $118; $122 = $116 | $121; - $123 = (($x) + 21|0); + $123 = ((($x)) + 21|0); $124 = HEAP8[$123>>0]|0; - $125 = (($y) + 21|0); + $125 = ((($y)) + 21|0); $126 = HEAP8[$125>>0]|0; $127 = $126 ^ $124; $128 = $122 | $127; - $129 = (($x) + 22|0); + $129 = ((($x)) + 22|0); $130 = HEAP8[$129>>0]|0; - $131 = (($y) + 22|0); + $131 = ((($y)) + 22|0); $132 = HEAP8[$131>>0]|0; $133 = $132 ^ $130; $134 = $128 | $133; - $135 = (($x) + 23|0); + $135 = ((($x)) + 23|0); $136 = HEAP8[$135>>0]|0; - $137 = (($y) + 23|0); + $137 = ((($y)) + 23|0); $138 = HEAP8[$137>>0]|0; $139 = $138 ^ $136; $140 = $134 | $139; - $141 = (($x) + 24|0); + $141 = ((($x)) + 24|0); $142 = HEAP8[$141>>0]|0; - $143 = (($y) + 24|0); + $143 = ((($y)) + 24|0); $144 = HEAP8[$143>>0]|0; $145 = $144 ^ $142; $146 = $140 | $145; - $147 = (($x) + 25|0); + $147 = ((($x)) + 25|0); $148 = HEAP8[$147>>0]|0; - $149 = (($y) + 25|0); + $149 = ((($y)) + 25|0); $150 = HEAP8[$149>>0]|0; $151 = $150 ^ $148; $152 = $146 | $151; - $153 = (($x) + 26|0); + $153 = ((($x)) + 26|0); $154 = HEAP8[$153>>0]|0; - $155 = (($y) + 26|0); + $155 = ((($y)) + 26|0); $156 = HEAP8[$155>>0]|0; $157 = $156 ^ $154; $158 = $152 | $157; - $159 = (($x) + 27|0); + $159 = ((($x)) + 27|0); $160 = HEAP8[$159>>0]|0; - $161 = (($y) + 27|0); + $161 = ((($y)) + 27|0); $162 = HEAP8[$161>>0]|0; $163 = $162 ^ $160; $164 = $158 | $163; - $165 = (($x) + 28|0); + $165 = ((($x)) + 28|0); $166 = HEAP8[$165>>0]|0; - $167 = (($y) + 28|0); + $167 = ((($y)) + 28|0); $168 = HEAP8[$167>>0]|0; $169 = $168 ^ $166; $170 = $164 | $169; - $171 = (($x) + 29|0); + $171 = ((($x)) + 29|0); $172 = HEAP8[$171>>0]|0; - $173 = (($y) + 29|0); + $173 = ((($y)) + 29|0); $174 = HEAP8[$173>>0]|0; $175 = $174 ^ $172; $176 = $170 | $175; - $177 = (($x) + 30|0); + $177 = ((($x)) + 30|0); $178 = HEAP8[$177>>0]|0; - $179 = (($y) + 30|0); + $179 = ((($y)) + 30|0); $180 = HEAP8[$179>>0]|0; $181 = $180 ^ $178; $182 = $176 | $181; - $183 = (($x) + 31|0); + $183 = ((($x)) + 31|0); $184 = HEAP8[$183>>0]|0; - $185 = (($y) + 31|0); + $185 = ((($y)) + 31|0); $186 = HEAP8[$185>>0]|0; $187 = $186 ^ $184; $188 = $182 | $187; @@ -5251,39 +5993,40 @@ function _crypto_verify_32_ref($x,$y) { $191 = $190 >>> 8; $192 = $191 & 1; $193 = (($192) + -1)|0; - STACKTOP = sp;return ($193|0); + return ($193|0); } function _curve25519_sign($signature_out,$curve25519_privkey,$msg,$msg_len) { $signature_out = $signature_out|0; $curve25519_privkey = $curve25519_privkey|0; $msg = $msg|0; $msg_len = $msg_len|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_keypair = 0, $ed_pubkey_point = 0, $sigbuf_out_len = 0, dest = 0; - var label = 0, sp = 0, src = 0, stop = 0; + var $$alloca_mul = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_keypair = 0, $ed_pubkey_point = 0, $sigbuf_out_len = 0; + var dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 240|0; $ed_pubkey_point = sp + 8|0; $ed_keypair = sp + 168|0; $sigbuf_out_len = sp; $0 = (($msg_len) + 64)|0; - $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; + $$alloca_mul = $0; + $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0;; $2 = $sigbuf_out_len; $3 = $2; HEAP32[$3>>2] = 0; $4 = (($2) + 4)|0; $5 = $4; HEAP32[$5>>2] = 0; - dest=$ed_keypair+0|0; src=$curve25519_privkey+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$ed_keypair; src=$curve25519_privkey; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _crypto_sign_ed25519_ref10_ge_scalarmult_base($ed_pubkey_point,$curve25519_privkey); - $6 = (($ed_keypair) + 32|0); + $6 = ((($ed_keypair)) + 32|0); _crypto_sign_ed25519_ref10_ge_p3_tobytes($6,$ed_pubkey_point); - $7 = (($ed_keypair) + 63|0); + $7 = ((($ed_keypair)) + 63|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = $9 & 128; (_crypto_sign_modified($1,$sigbuf_out_len,$msg,$msg_len,0,$ed_keypair)|0); - dest=$signature_out+0|0; src=$1+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $11 = (($signature_out) + 63|0); + dest=$signature_out; src=$1; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $11 = ((($signature_out)) + 63|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = $13 | $10; @@ -5296,8 +6039,8 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { $curve25519_pubkey = $curve25519_pubkey|0; $msg = $msg|0; $msg_len = $msg_len|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_pubkey = 0, $ed_y = 0; - var $inv_mont_x_plus_one = 0, $mont_x = 0, $mont_x_minus_one = 0, $mont_x_plus_one = 0, $one = 0, $some_retval = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $$alloca_mul = 0, $$alloca_mul1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + var $ed_pubkey = 0, $ed_y = 0, $inv_mont_x_plus_one = 0, $mont_x = 0, $mont_x_minus_one = 0, $mont_x_plus_one = 0, $one = 0, $some_retval = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 288|0; $mont_x = sp + 208|0; @@ -5309,8 +6052,10 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { $ed_pubkey = sp + 248|0; $some_retval = sp; $0 = (($msg_len) + 64)|0; - $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; - $2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; + $$alloca_mul = $0; + $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0;; + $$alloca_mul1 = $0; + $2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul1)|0)+15)&-16)|0;; _crypto_sign_ed25519_ref10_fe_frombytes($mont_x,$curve25519_pubkey); _crypto_sign_ed25519_ref10_fe_1($one); _crypto_sign_ed25519_ref10_fe_sub($mont_x_minus_one,$mont_x,$one); @@ -5318,11 +6063,11 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { _crypto_sign_ed25519_ref10_fe_invert($inv_mont_x_plus_one,$mont_x_plus_one); _crypto_sign_ed25519_ref10_fe_mul($ed_y,$mont_x_minus_one,$inv_mont_x_plus_one); _crypto_sign_ed25519_ref10_fe_tobytes($ed_pubkey,$ed_y); - $3 = (($signature) + 63|0); + $3 = ((($signature)) + 63|0); $4 = HEAP8[$3>>0]|0; $5 = $4&255; $6 = $5 & 128; - $7 = (($ed_pubkey) + 31|0); + $7 = ((($ed_pubkey)) + 31|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = $9 | $6; @@ -5333,8 +6078,8 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { $14 = $13 & 127; $15 = $14&255; HEAP8[$3>>0] = $15; - dest=$1+0|0; src=$signature+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $16 = (($1) + 64|0); + dest=$1; src=$signature; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $16 = ((($1)) + 64|0); _memcpy(($16|0),($msg|0),($msg_len|0))|0; $17 = (_crypto_sign_edwards25519sha512batch_ref10_open($2,$some_retval,$1,$0,0,$ed_pubkey)|0); STACKTOP = sp;return ($17|0); @@ -5363,12 +6108,12 @@ function _crypto_sign_modified($sm,$smlen,$m,$0,$1,$sk) { var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $R = 0, $hram = 0, $nonce = 0, $pk1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 320|0; - $pk1 = sp + 288|0; - $nonce = sp + 224|0; + $pk1 = sp + 224|0; + $nonce = sp + 256|0; $hram = sp + 160|0; $R = sp; - $2 = (($sk) + 32|0); - dest=$pk1+0|0; src=$2+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $2 = ((($sk)) + 32|0); + dest=$pk1; src=$2; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); $3 = (_i64Add(($0|0),($1|0),64,0)|0); $4 = tempRet0; $5 = $smlen; @@ -5377,14 +6122,14 @@ function _crypto_sign_modified($sm,$smlen,$m,$0,$1,$sk) { $7 = (($5) + 4)|0; $8 = $7; HEAP32[$8>>2] = $4; - $9 = (($sm) + 64|0); + $9 = ((($sm)) + 64|0); _memmove(($9|0),($m|0),($0|0))|0; - $10 = (($sm) + 32|0); + $10 = ((($sm)) + 32|0); _memmove(($10|0),($sk|0),32)|0; $11 = (_i64Add(($0|0),($1|0),32,0)|0); $12 = tempRet0; (_crypto_hash_sha512_ref($nonce,$10,$11,$12)|0); - dest=$10+0|0; src=$pk1+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$10; src=$pk1; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _crypto_sign_ed25519_ref10_sc_reduce($nonce); _crypto_sign_ed25519_ref10_ge_scalarmult_base($R,$nonce); _crypto_sign_ed25519_ref10_ge_p3_tobytes($sm,$R); @@ -5405,7 +6150,7 @@ function _curve25519_donna($mypublic,$secret,$basepoint) { $z = sp + 80|0; $zmone = sp; $e = sp + 328|0; - dest=$e+0|0; src=$secret+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$e; src=$secret; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _fexpand($bp,$basepoint); _cmult($x,$z,$e,$bp); _crecip($zmone,$z); @@ -5434,20 +6179,20 @@ function _fexpand($output,$input) { sp = STACKTOP; $0 = HEAP8[$input>>0]|0; $1 = $0&255; - $2 = (($input) + 1|0); + $2 = ((($input)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($input) + 2|0); + $8 = ((($input)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - $15 = (($input) + 3|0); + $15 = ((($input)) + 3|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (_bitshift64Shl(($17|0),0,24)|0); @@ -5462,20 +6207,20 @@ function _fexpand($output,$input) { HEAP32[$25>>2] = $14; $26 = HEAP8[$15>>0]|0; $27 = $26&255; - $28 = (($input) + 4|0); + $28 = ((($input)) + 4|0); $29 = HEAP8[$28>>0]|0; $30 = $29&255; $31 = (_bitshift64Shl(($30|0),0,8)|0); $32 = tempRet0; $33 = $31 | $27; - $34 = (($input) + 5|0); + $34 = ((($input)) + 5|0); $35 = HEAP8[$34>>0]|0; $36 = $35&255; $37 = (_bitshift64Shl(($36|0),0,16)|0); $38 = tempRet0; $39 = $33 | $37; $40 = $32 | $38; - $41 = (($input) + 6|0); + $41 = ((($input)) + 6|0); $42 = HEAP8[$41>>0]|0; $43 = $42&255; $44 = (_bitshift64Shl(($43|0),0,24)|0); @@ -5485,7 +6230,7 @@ function _fexpand($output,$input) { $48 = (_bitshift64Lshr(($46|0),($47|0),2)|0); $49 = tempRet0; $50 = $48 & 33554431; - $51 = (($output) + 8|0); + $51 = ((($output)) + 8|0); $52 = $51; $53 = $52; HEAP32[$53>>2] = $50; @@ -5494,20 +6239,20 @@ function _fexpand($output,$input) { HEAP32[$55>>2] = 0; $56 = HEAP8[$41>>0]|0; $57 = $56&255; - $58 = (($input) + 7|0); + $58 = ((($input)) + 7|0); $59 = HEAP8[$58>>0]|0; $60 = $59&255; $61 = (_bitshift64Shl(($60|0),0,8)|0); $62 = tempRet0; $63 = $61 | $57; - $64 = (($input) + 8|0); + $64 = ((($input)) + 8|0); $65 = HEAP8[$64>>0]|0; $66 = $65&255; $67 = (_bitshift64Shl(($66|0),0,16)|0); $68 = tempRet0; $69 = $63 | $67; $70 = $62 | $68; - $71 = (($input) + 9|0); + $71 = ((($input)) + 9|0); $72 = HEAP8[$71>>0]|0; $73 = $72&255; $74 = (_bitshift64Shl(($73|0),0,24)|0); @@ -5517,7 +6262,7 @@ function _fexpand($output,$input) { $78 = (_bitshift64Lshr(($76|0),($77|0),3)|0); $79 = tempRet0; $80 = $78 & 67108863; - $81 = (($output) + 16|0); + $81 = ((($output)) + 16|0); $82 = $81; $83 = $82; HEAP32[$83>>2] = $80; @@ -5526,20 +6271,20 @@ function _fexpand($output,$input) { HEAP32[$85>>2] = 0; $86 = HEAP8[$71>>0]|0; $87 = $86&255; - $88 = (($input) + 10|0); + $88 = ((($input)) + 10|0); $89 = HEAP8[$88>>0]|0; $90 = $89&255; $91 = (_bitshift64Shl(($90|0),0,8)|0); $92 = tempRet0; $93 = $91 | $87; - $94 = (($input) + 11|0); + $94 = ((($input)) + 11|0); $95 = HEAP8[$94>>0]|0; $96 = $95&255; $97 = (_bitshift64Shl(($96|0),0,16)|0); $98 = tempRet0; $99 = $93 | $97; $100 = $92 | $98; - $101 = (($input) + 12|0); + $101 = ((($input)) + 12|0); $102 = HEAP8[$101>>0]|0; $103 = $102&255; $104 = (_bitshift64Shl(($103|0),0,24)|0); @@ -5549,7 +6294,7 @@ function _fexpand($output,$input) { $108 = (_bitshift64Lshr(($106|0),($107|0),5)|0); $109 = tempRet0; $110 = $108 & 33554431; - $111 = (($output) + 24|0); + $111 = ((($output)) + 24|0); $112 = $111; $113 = $112; HEAP32[$113>>2] = $110; @@ -5558,20 +6303,20 @@ function _fexpand($output,$input) { HEAP32[$115>>2] = 0; $116 = HEAP8[$101>>0]|0; $117 = $116&255; - $118 = (($input) + 13|0); + $118 = ((($input)) + 13|0); $119 = HEAP8[$118>>0]|0; $120 = $119&255; $121 = (_bitshift64Shl(($120|0),0,8)|0); $122 = tempRet0; $123 = $121 | $117; - $124 = (($input) + 14|0); + $124 = ((($input)) + 14|0); $125 = HEAP8[$124>>0]|0; $126 = $125&255; $127 = (_bitshift64Shl(($126|0),0,16)|0); $128 = tempRet0; $129 = $123 | $127; $130 = $122 | $128; - $131 = (($input) + 15|0); + $131 = ((($input)) + 15|0); $132 = HEAP8[$131>>0]|0; $133 = $132&255; $134 = (_bitshift64Shl(($133|0),0,24)|0); @@ -5581,37 +6326,37 @@ function _fexpand($output,$input) { $138 = (_bitshift64Lshr(($136|0),($137|0),6)|0); $139 = tempRet0; $140 = $138 & 67108863; - $141 = (($output) + 32|0); + $141 = ((($output)) + 32|0); $142 = $141; $143 = $142; HEAP32[$143>>2] = $140; $144 = (($142) + 4)|0; $145 = $144; HEAP32[$145>>2] = 0; - $146 = (($input) + 16|0); + $146 = ((($input)) + 16|0); $147 = HEAP8[$146>>0]|0; $148 = $147&255; - $149 = (($input) + 17|0); + $149 = ((($input)) + 17|0); $150 = HEAP8[$149>>0]|0; $151 = $150&255; $152 = (_bitshift64Shl(($151|0),0,8)|0); $153 = tempRet0; $154 = $152 | $148; - $155 = (($input) + 18|0); + $155 = ((($input)) + 18|0); $156 = HEAP8[$155>>0]|0; $157 = $156&255; $158 = (_bitshift64Shl(($157|0),0,16)|0); $159 = tempRet0; $160 = $154 | $158; $161 = $153 | $159; - $162 = (($input) + 19|0); + $162 = ((($input)) + 19|0); $163 = HEAP8[$162>>0]|0; $164 = $163&255; $165 = (_bitshift64Shl(($164|0),0,24)|0); $166 = tempRet0; $167 = $165 & 16777216; $168 = $160 | $167; - $169 = (($output) + 40|0); + $169 = ((($output)) + 40|0); $170 = $169; $171 = $170; HEAP32[$171>>2] = $168; @@ -5620,20 +6365,20 @@ function _fexpand($output,$input) { HEAP32[$173>>2] = $161; $174 = HEAP8[$162>>0]|0; $175 = $174&255; - $176 = (($input) + 20|0); + $176 = ((($input)) + 20|0); $177 = HEAP8[$176>>0]|0; $178 = $177&255; $179 = (_bitshift64Shl(($178|0),0,8)|0); $180 = tempRet0; $181 = $179 | $175; - $182 = (($input) + 21|0); + $182 = ((($input)) + 21|0); $183 = HEAP8[$182>>0]|0; $184 = $183&255; $185 = (_bitshift64Shl(($184|0),0,16)|0); $186 = tempRet0; $187 = $181 | $185; $188 = $180 | $186; - $189 = (($input) + 22|0); + $189 = ((($input)) + 22|0); $190 = HEAP8[$189>>0]|0; $191 = $190&255; $192 = (_bitshift64Shl(($191|0),0,24)|0); @@ -5643,7 +6388,7 @@ function _fexpand($output,$input) { $196 = (_bitshift64Lshr(($194|0),($195|0),1)|0); $197 = tempRet0; $198 = $196 & 67108863; - $199 = (($output) + 48|0); + $199 = ((($output)) + 48|0); $200 = $199; $201 = $200; HEAP32[$201>>2] = $198; @@ -5652,20 +6397,20 @@ function _fexpand($output,$input) { HEAP32[$203>>2] = 0; $204 = HEAP8[$189>>0]|0; $205 = $204&255; - $206 = (($input) + 23|0); + $206 = ((($input)) + 23|0); $207 = HEAP8[$206>>0]|0; $208 = $207&255; $209 = (_bitshift64Shl(($208|0),0,8)|0); $210 = tempRet0; $211 = $209 | $205; - $212 = (($input) + 24|0); + $212 = ((($input)) + 24|0); $213 = HEAP8[$212>>0]|0; $214 = $213&255; $215 = (_bitshift64Shl(($214|0),0,16)|0); $216 = tempRet0; $217 = $211 | $215; $218 = $210 | $216; - $219 = (($input) + 25|0); + $219 = ((($input)) + 25|0); $220 = HEAP8[$219>>0]|0; $221 = $220&255; $222 = (_bitshift64Shl(($221|0),0,24)|0); @@ -5675,7 +6420,7 @@ function _fexpand($output,$input) { $226 = (_bitshift64Lshr(($224|0),($225|0),3)|0); $227 = tempRet0; $228 = $226 & 33554431; - $229 = (($output) + 56|0); + $229 = ((($output)) + 56|0); $230 = $229; $231 = $230; HEAP32[$231>>2] = $228; @@ -5684,20 +6429,20 @@ function _fexpand($output,$input) { HEAP32[$233>>2] = 0; $234 = HEAP8[$219>>0]|0; $235 = $234&255; - $236 = (($input) + 26|0); + $236 = ((($input)) + 26|0); $237 = HEAP8[$236>>0]|0; $238 = $237&255; $239 = (_bitshift64Shl(($238|0),0,8)|0); $240 = tempRet0; $241 = $239 | $235; - $242 = (($input) + 27|0); + $242 = ((($input)) + 27|0); $243 = HEAP8[$242>>0]|0; $244 = $243&255; $245 = (_bitshift64Shl(($244|0),0,16)|0); $246 = tempRet0; $247 = $241 | $245; $248 = $240 | $246; - $249 = (($input) + 28|0); + $249 = ((($input)) + 28|0); $250 = HEAP8[$249>>0]|0; $251 = $250&255; $252 = (_bitshift64Shl(($251|0),0,24)|0); @@ -5707,7 +6452,7 @@ function _fexpand($output,$input) { $256 = (_bitshift64Lshr(($254|0),($255|0),4)|0); $257 = tempRet0; $258 = $256 & 67108863; - $259 = (($output) + 64|0); + $259 = ((($output)) + 64|0); $260 = $259; $261 = $260; HEAP32[$261>>2] = $258; @@ -5716,20 +6461,20 @@ function _fexpand($output,$input) { HEAP32[$263>>2] = 0; $264 = HEAP8[$249>>0]|0; $265 = $264&255; - $266 = (($input) + 29|0); + $266 = ((($input)) + 29|0); $267 = HEAP8[$266>>0]|0; $268 = $267&255; $269 = (_bitshift64Shl(($268|0),0,8)|0); $270 = tempRet0; $271 = $269 | $265; - $272 = (($input) + 30|0); + $272 = ((($input)) + 30|0); $273 = HEAP8[$272>>0]|0; $274 = $273&255; $275 = (_bitshift64Shl(($274|0),0,16)|0); $276 = tempRet0; $277 = $271 | $275; $278 = $270 | $276; - $279 = (($input) + 31|0); + $279 = ((($input)) + 31|0); $280 = HEAP8[$279>>0]|0; $281 = $280&255; $282 = (_bitshift64Shl(($281|0),0,24)|0); @@ -5739,14 +6484,14 @@ function _fexpand($output,$input) { $286 = (_bitshift64Lshr(($284|0),($285|0),6)|0); $287 = tempRet0; $288 = $286 & 33554431; - $289 = (($output) + 72|0); + $289 = ((($output)) + 72|0); $290 = $289; $291 = $290; HEAP32[$291>>2] = $288; $292 = (($290) + 4)|0; $293 = $292; HEAP32[$293>>2] = 0; - STACKTOP = sp;return; + return; } function _cmult($resultx,$resultz,$n,$q) { $resultx = $resultx|0; @@ -5755,8 +6500,8 @@ function _cmult($resultx,$resultz,$n,$q) { $q = $q|0; var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $b = 0, $byte$09 = 0, $c = 0, $d = 0, $e = 0, $exitcond = 0, $exitcond20 = 0, $f = 0, $g = 0, $h = 0, $i$018 = 0, $j$08 = 0, $nqpqx$019 = 0, $nqpqx$110 = 0; - var $nqpqx$110$phi = 0, $nqpqx2$014 = 0, $nqpqx2$14 = 0, $nqpqx2$14$phi = 0, $nqpqz$013 = 0, $nqpqz$13 = 0, $nqpqz$13$phi = 0, $nqpqz2$015 = 0, $nqpqz2$15 = 0, $nqpqz2$15$phi = 0, $nqx$011 = 0, $nqx$11 = 0, $nqx$11$phi = 0, $nqx2$016 = 0, $nqx2$16 = 0, $nqx2$16$phi = 0, $nqz$012 = 0, $nqz$12 = 0, $nqz$12$phi = 0, $nqz2$017 = 0; - var $nqz2$17 = 0, $nqz2$17$phi = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $nqpqx$110$lcssa = 0, $nqpqx$110$phi = 0, $nqpqx2$014 = 0, $nqpqx2$14 = 0, $nqpqx2$14$lcssa = 0, $nqpqx2$14$phi = 0, $nqpqz$013 = 0, $nqpqz$13 = 0, $nqpqz$13$lcssa = 0, $nqpqz$13$phi = 0, $nqpqz2$015 = 0, $nqpqz2$15 = 0, $nqpqz2$15$lcssa = 0, $nqpqz2$15$phi = 0, $nqx$011 = 0, $nqx$11 = 0, $nqx$11$lcssa = 0, $nqx$11$phi = 0, $nqx2$016 = 0, $nqx2$16 = 0; + var $nqx2$16$lcssa = 0, $nqx2$16$lcssa$lcssa = 0, $nqx2$16$phi = 0, $nqz$012 = 0, $nqz$12 = 0, $nqz$12$lcssa = 0, $nqz$12$phi = 0, $nqz2$017 = 0, $nqz2$17 = 0, $nqz2$17$lcssa = 0, $nqz2$17$lcssa$lcssa = 0, $nqz2$17$phi = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1216|0; $a = sp + 1064|0; @@ -5799,7 +6544,7 @@ function _cmult($resultx,$resultz,$n,$q) { $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = 0; - dest=$a+0|0; src=$q+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$a; src=$q; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $i$018 = 0;$nqpqx$019 = $a;$nqpqx2$014 = $e;$nqpqz$013 = $b;$nqpqz2$015 = $f;$nqx$011 = $c;$nqx2$016 = $g;$nqz$012 = $d;$nqz2$017 = $h; while(1) { $16 = (31 - ($i$018))|0; @@ -5819,6 +6564,7 @@ function _cmult($resultx,$resultz,$n,$q) { $23 = (($j$08) + 1)|0; $exitcond = ($23|0)==(8); if ($exitcond) { + $nqpqx$110$lcssa = $nqpqx$110;$nqpqx2$14$lcssa = $nqpqx2$14;$nqpqz$13$lcssa = $nqpqz$13;$nqpqz2$15$lcssa = $nqpqz2$15;$nqx$11$lcssa = $nqx$11;$nqx2$16$lcssa = $nqx2$16;$nqz$12$lcssa = $nqz$12;$nqz2$17$lcssa = $nqz2$17; break; } else { $nqz2$17$phi = $nqz$12;$nqz$12$phi = $nqz2$17;$nqx2$16$phi = $nqx$11;$nqx$11$phi = $nqx2$16;$nqpqz2$15$phi = $nqpqz$13;$nqpqz$13$phi = $nqpqz2$15;$nqpqx2$14$phi = $nqpqx$110;$nqpqx$110$phi = $nqpqx2$14;$byte$09 = $22;$j$08 = $23;$nqz2$17 = $nqz2$17$phi;$nqz$12 = $nqz$12$phi;$nqx2$16 = $nqx2$16$phi;$nqx$11 = $nqx$11$phi;$nqpqz2$15 = $nqpqz2$15$phi;$nqpqz$13 = $nqpqz$13$phi;$nqpqx2$14 = $nqpqx2$14$phi;$nqpqx$110 = $nqpqx$110$phi; @@ -5827,13 +6573,14 @@ function _cmult($resultx,$resultz,$n,$q) { $24 = (($i$018) + 1)|0; $exitcond20 = ($24|0)==(32); if ($exitcond20) { + $nqx2$16$lcssa$lcssa = $nqx2$16$lcssa;$nqz2$17$lcssa$lcssa = $nqz2$17$lcssa; break; } else { - $i$018 = $24;$nqpqx$019 = $nqpqx2$14;$nqpqx2$014 = $nqpqx$110;$nqpqz$013 = $nqpqz2$15;$nqpqz2$015 = $nqpqz$13;$nqx$011 = $nqx2$16;$nqx2$016 = $nqx$11;$nqz$012 = $nqz2$17;$nqz2$017 = $nqz$12; + $i$018 = $24;$nqpqx$019 = $nqpqx2$14$lcssa;$nqpqx2$014 = $nqpqx$110$lcssa;$nqpqz$013 = $nqpqz2$15$lcssa;$nqpqz2$015 = $nqpqz$13$lcssa;$nqx$011 = $nqx2$16$lcssa;$nqx2$016 = $nqx$11$lcssa;$nqz$012 = $nqz2$17$lcssa;$nqz2$017 = $nqz$12$lcssa; } } - dest=$resultx+0|0; src=$nqx2$16+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$resultz+0|0; src=$nqz2$17+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$resultx; src=$nqx2$16$lcssa$lcssa; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$resultz; src=$nqz2$17$lcssa$lcssa; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); STACKTOP = sp;return; } function _crecip($out,$z) { @@ -5973,34 +6720,35 @@ function _fmul($output,$in,$in2) { _fproduct($t,$in,$in2); _freduce_degree($t); _freduce_coefficients($t); - dest=$output+0|0; src=$t+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$output; src=$t; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); STACKTOP = sp;return; } function _fcontract($output,$input_limbs) { $output = $output|0; $input_limbs = $input_limbs|0; - var $$pn = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; - var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; - var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; - var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0; - var $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0; - var $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0; - var $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0; - var $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0; - var $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0; - var $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0; - var $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0; - var $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0; - var $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0; - var $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0; - var $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0; - var $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0; - var $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0; - var $403 = 0, $404 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; - var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; - var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0; - var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond11 = 0, $exitcond11$1 = 0, $exitcond14 = 0, $exitcond14$1 = 0, $i$17 = 0, $i$17$1 = 0, $i$24 = 0, $i$24$1 = 0, $i$33 = 0, $input = 0, $mask$02 = 0, $mask$1 = 0, label = 0; - var sp = 0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; + var $422 = 0, $423 = 0, $424 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; + var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; + var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0; + var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond$1 = 0, $exitcond13 = 0, $exitcond13$1 = 0, $i$18 = 0, $i$18$1 = 0, $i$26 = 0, $i$26$1 = 0, $input = 0, $mask$1 = 0, $mask$1$1 = 0, $mask$1$2 = 0, $mask$1$3 = 0, $mask$1$4 = 0, $mask$1$5 = 0; + var $mask$1$6 = 0, $mask$1$7 = 0, $mask$1$8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $input = sp; @@ -6011,93 +6759,93 @@ function _fcontract($output,$input_limbs) { $4 = $3; $5 = HEAP32[$4>>2]|0; HEAP32[$input>>2] = $2; - $6 = (($input_limbs) + 8|0); + $6 = ((($input_limbs)) + 8|0); $7 = $6; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; - $13 = (($input) + 4|0); + $13 = ((($input)) + 4|0); HEAP32[$13>>2] = $9; - $14 = (($input_limbs) + 16|0); + $14 = ((($input_limbs)) + 16|0); $15 = $14; $16 = $15; $17 = HEAP32[$16>>2]|0; $18 = (($15) + 4)|0; $19 = $18; $20 = HEAP32[$19>>2]|0; - $21 = (($input) + 8|0); + $21 = ((($input)) + 8|0); HEAP32[$21>>2] = $17; - $22 = (($input_limbs) + 24|0); + $22 = ((($input_limbs)) + 24|0); $23 = $22; $24 = $23; $25 = HEAP32[$24>>2]|0; $26 = (($23) + 4)|0; $27 = $26; $28 = HEAP32[$27>>2]|0; - $29 = (($input) + 12|0); + $29 = ((($input)) + 12|0); HEAP32[$29>>2] = $25; - $30 = (($input_limbs) + 32|0); + $30 = ((($input_limbs)) + 32|0); $31 = $30; $32 = $31; $33 = HEAP32[$32>>2]|0; $34 = (($31) + 4)|0; $35 = $34; $36 = HEAP32[$35>>2]|0; - $37 = (($input) + 16|0); + $37 = ((($input)) + 16|0); HEAP32[$37>>2] = $33; - $38 = (($input_limbs) + 40|0); + $38 = ((($input_limbs)) + 40|0); $39 = $38; $40 = $39; $41 = HEAP32[$40>>2]|0; $42 = (($39) + 4)|0; $43 = $42; $44 = HEAP32[$43>>2]|0; - $45 = (($input) + 20|0); + $45 = ((($input)) + 20|0); HEAP32[$45>>2] = $41; - $46 = (($input_limbs) + 48|0); + $46 = ((($input_limbs)) + 48|0); $47 = $46; $48 = $47; $49 = HEAP32[$48>>2]|0; $50 = (($47) + 4)|0; $51 = $50; $52 = HEAP32[$51>>2]|0; - $53 = (($input) + 24|0); + $53 = ((($input)) + 24|0); HEAP32[$53>>2] = $49; - $54 = (($input_limbs) + 56|0); + $54 = ((($input_limbs)) + 56|0); $55 = $54; $56 = $55; $57 = HEAP32[$56>>2]|0; $58 = (($55) + 4)|0; $59 = $58; $60 = HEAP32[$59>>2]|0; - $61 = (($input) + 28|0); + $61 = ((($input)) + 28|0); HEAP32[$61>>2] = $57; - $62 = (($input_limbs) + 64|0); + $62 = ((($input_limbs)) + 64|0); $63 = $62; $64 = $63; $65 = HEAP32[$64>>2]|0; $66 = (($63) + 4)|0; $67 = $66; $68 = HEAP32[$67>>2]|0; - $69 = (($input) + 32|0); + $69 = ((($input)) + 32|0); HEAP32[$69>>2] = $65; - $70 = (($input_limbs) + 72|0); + $70 = ((($input_limbs)) + 72|0); $71 = $70; $72 = $71; $73 = HEAP32[$72>>2]|0; $74 = (($71) + 4)|0; $75 = $74; $76 = HEAP32[$75>>2]|0; - $77 = (($input) + 36|0); + $77 = ((($input)) + 36|0); HEAP32[$77>>2] = $73; - $78 = (($input) + 36|0); - $i$17 = 0; + $78 = ((($input)) + 36|0); + $i$18 = 0; while(1) { - $79 = $i$17 & 1; + $79 = $i$18 & 1; $80 = ($79|0)==(0); - $81 = (($input) + ($i$17<<2)|0); + $81 = (($input) + ($i$18<<2)|0); $82 = HEAP32[$81>>2]|0; $83 = $82 >> 31; $84 = $83 & $82; @@ -6106,7 +6854,7 @@ function _fcontract($output,$input_limbs) { $93 = Math_imul($92, -67108864)|0; $94 = (($93) + ($82))|0; HEAP32[$81>>2] = $94; - $95 = (($i$17) + 1)|0; + $95 = (($i$18) + 1)|0; $96 = (($input) + ($95<<2)|0); $97 = HEAP32[$96>>2]|0; $98 = (($97) + ($92))|0; @@ -6116,18 +6864,18 @@ function _fcontract($output,$input_limbs) { $86 = Math_imul($85, -33554432)|0; $87 = (($86) + ($82))|0; HEAP32[$81>>2] = $87; - $88 = (($i$17) + 1)|0; + $88 = (($i$18) + 1)|0; $89 = (($input) + ($88<<2)|0); $90 = HEAP32[$89>>2]|0; $91 = (($90) + ($85))|0; HEAP32[$89>>2] = $91; } - $99 = (($i$17) + 1)|0; - $exitcond14 = ($99|0)==(9); - if ($exitcond14) { + $99 = (($i$18) + 1)|0; + $exitcond13 = ($99|0)==(9); + if ($exitcond13) { break; } else { - $i$17 = $99; + $i$18 = $99; } } $100 = HEAP32[$78>>2]|0; @@ -6141,41 +6889,41 @@ function _fcontract($output,$input_limbs) { $107 = ($103*19)|0; $108 = (($107) + ($106))|0; HEAP32[$input>>2] = $108; - $i$17$1 = 0; + $i$18$1 = 0; while(1) { - $384 = $i$17$1 & 1; - $385 = ($384|0)==(0); - $386 = (($input) + ($i$17$1<<2)|0); - $387 = HEAP32[$386>>2]|0; - $388 = $387 >> 31; - $389 = $388 & $387; - if ($385) { - $397 = $389 >> 26; - $398 = Math_imul($397, -67108864)|0; - $399 = (($398) + ($387))|0; - HEAP32[$386>>2] = $399; - $400 = (($i$17$1) + 1)|0; - $401 = (($input) + ($400<<2)|0); - $402 = HEAP32[$401>>2]|0; - $403 = (($402) + ($397))|0; - HEAP32[$401>>2] = $403; + $404 = $i$18$1 & 1; + $405 = ($404|0)==(0); + $406 = (($input) + ($i$18$1<<2)|0); + $407 = HEAP32[$406>>2]|0; + $408 = $407 >> 31; + $409 = $408 & $407; + if ($405) { + $417 = $409 >> 26; + $418 = Math_imul($417, -67108864)|0; + $419 = (($418) + ($407))|0; + HEAP32[$406>>2] = $419; + $420 = (($i$18$1) + 1)|0; + $421 = (($input) + ($420<<2)|0); + $422 = HEAP32[$421>>2]|0; + $423 = (($422) + ($417))|0; + HEAP32[$421>>2] = $423; } else { - $390 = $389 >> 25; - $391 = Math_imul($390, -33554432)|0; - $392 = (($391) + ($387))|0; - HEAP32[$386>>2] = $392; - $393 = (($i$17$1) + 1)|0; - $394 = (($input) + ($393<<2)|0); - $395 = HEAP32[$394>>2]|0; - $396 = (($395) + ($390))|0; - HEAP32[$394>>2] = $396; + $410 = $409 >> 25; + $411 = Math_imul($410, -33554432)|0; + $412 = (($411) + ($407))|0; + HEAP32[$406>>2] = $412; + $413 = (($i$18$1) + 1)|0; + $414 = (($input) + ($413<<2)|0); + $415 = HEAP32[$414>>2]|0; + $416 = (($415) + ($410))|0; + HEAP32[$414>>2] = $416; } - $404 = (($i$17$1) + 1)|0; - $exitcond14$1 = ($404|0)==(9); - if ($exitcond14$1) { + $424 = (($i$18$1) + 1)|0; + $exitcond13$1 = ($424|0)==(9); + if ($exitcond13$1) { break; } else { - $i$17$1 = $404; + $i$18$1 = $424; } } $109 = HEAP32[$78>>2]|0; @@ -6194,22 +6942,22 @@ function _fcontract($output,$input_limbs) { $121 = Math_imul($120, -67108864)|0; $122 = (($121) + ($117))|0; HEAP32[$input>>2] = $122; - $123 = (($input) + 4|0); + $123 = ((($input)) + 4|0); $124 = HEAP32[$123>>2]|0; $125 = (($120) + ($124))|0; HEAP32[$123>>2] = $125; - $126 = (($input) + 36|0); - $i$24 = 0; + $126 = ((($input)) + 36|0); + $i$26 = 0; while(1) { - $127 = $i$24 & 1; + $127 = $i$26 & 1; $128 = ($127|0)==(0); - $129 = (($input) + ($i$24<<2)|0); + $129 = (($input) + ($i$26<<2)|0); $130 = HEAP32[$129>>2]|0; if ($128) { $137 = $130 >> 26; $138 = $130 & 67108863; HEAP32[$129>>2] = $138; - $139 = (($i$24) + 1)|0; + $139 = (($i$26) + 1)|0; $140 = (($input) + ($139<<2)|0); $141 = HEAP32[$140>>2]|0; $142 = (($141) + ($137))|0; @@ -6218,18 +6966,18 @@ function _fcontract($output,$input_limbs) { $131 = $130 >> 25; $132 = $130 & 33554431; HEAP32[$129>>2] = $132; - $133 = (($i$24) + 1)|0; + $133 = (($i$26) + 1)|0; $134 = (($input) + ($133<<2)|0); $135 = HEAP32[$134>>2]|0; $136 = (($135) + ($131))|0; HEAP32[$134>>2] = $136; } - $143 = (($i$24) + 1)|0; - $exitcond11 = ($143|0)==(9); - if ($exitcond11) { + $143 = (($i$26) + 1)|0; + $exitcond = ($143|0)==(9); + if ($exitcond) { break; } else { - $i$24 = $143; + $i$26 = $143; } } $144 = HEAP32[$126>>2]|0; @@ -6240,466 +6988,369 @@ function _fcontract($output,$input_limbs) { $148 = HEAP32[$input>>2]|0; $149 = (($147) + ($148))|0; HEAP32[$input>>2] = $149; - $i$24$1 = 0; + $i$26$1 = 0; while(1) { - $360 = $i$24$1 & 1; - $361 = ($360|0)==(0); - $362 = (($input) + ($i$24$1<<2)|0); - $363 = HEAP32[$362>>2]|0; - if ($361) { - $370 = $363 >> 26; - $371 = $363 & 67108863; - HEAP32[$362>>2] = $371; - $372 = (($i$24$1) + 1)|0; - $373 = (($input) + ($372<<2)|0); - $374 = HEAP32[$373>>2]|0; - $375 = (($374) + ($370))|0; - HEAP32[$373>>2] = $375; + $387 = $i$26$1 & 1; + $388 = ($387|0)==(0); + $389 = (($input) + ($i$26$1<<2)|0); + $390 = HEAP32[$389>>2]|0; + if ($388) { + $397 = $390 >> 26; + $398 = $390 & 67108863; + HEAP32[$389>>2] = $398; + $399 = (($i$26$1) + 1)|0; + $400 = (($input) + ($399<<2)|0); + $401 = HEAP32[$400>>2]|0; + $402 = (($401) + ($397))|0; + HEAP32[$400>>2] = $402; } else { - $364 = $363 >> 25; - $365 = $363 & 33554431; - HEAP32[$362>>2] = $365; - $366 = (($i$24$1) + 1)|0; - $367 = (($input) + ($366<<2)|0); - $368 = HEAP32[$367>>2]|0; - $369 = (($368) + ($364))|0; - HEAP32[$367>>2] = $369; - } - $376 = (($i$24$1) + 1)|0; - $exitcond11$1 = ($376|0)==(9); - if ($exitcond11$1) { - break; - } else { - $i$24$1 = $376; - } - } - $377 = HEAP32[$126>>2]|0; - $378 = $377 >> 25; - $379 = $377 & 33554431; - HEAP32[$126>>2] = $379; - $380 = ($378*19)|0; - $381 = HEAP32[$input>>2]|0; - $382 = (($380) + ($381))|0; - HEAP32[$input>>2] = $382; - $383 = (_s32_gte($382)|0); - $i$33 = 1;$mask$02 = $383; - while(1) { - $150 = $i$33 & 1; - $151 = ($150|0)==(0); - $152 = (($input) + ($i$33<<2)|0); - $153 = HEAP32[$152>>2]|0; - if ($151) { - $155 = (_s32_eq($153,67108863)|0); - $$pn = $155; - } else { - $154 = (_s32_eq($153,33554431)|0); - $$pn = $154; + $391 = $390 >> 25; + $392 = $390 & 33554431; + HEAP32[$389>>2] = $392; + $393 = (($i$26$1) + 1)|0; + $394 = (($input) + ($393<<2)|0); + $395 = HEAP32[$394>>2]|0; + $396 = (($395) + ($391))|0; + HEAP32[$394>>2] = $396; } - $mask$1 = $$pn & $mask$02; - $156 = (($i$33) + 1)|0; - $exitcond = ($156|0)==(10); - if ($exitcond) { + $403 = (($i$26$1) + 1)|0; + $exitcond$1 = ($403|0)==(9); + if ($exitcond$1) { break; } else { - $i$33 = $156;$mask$02 = $mask$1; + $i$26$1 = $403; } } - $157 = $mask$1 & 67108845; - $158 = HEAP32[$input>>2]|0; - $159 = (($158) - ($157))|0; - HEAP32[$input>>2] = $159; - $160 = $mask$1 & 67108863; - $161 = $mask$1 & 33554431; - $162 = (($input) + 4|0); - $163 = HEAP32[$162>>2]|0; - $164 = (($163) - ($161))|0; - HEAP32[$162>>2] = $164; - $165 = (($input) + 8|0); - $166 = HEAP32[$165>>2]|0; - $167 = (($166) - ($160))|0; - HEAP32[$165>>2] = $167; - $168 = (($input) + 12|0); - $169 = HEAP32[$168>>2]|0; - $170 = (($169) - ($161))|0; - HEAP32[$168>>2] = $170; - $171 = (($input) + 16|0); - $172 = HEAP32[$171>>2]|0; - $173 = (($172) - ($160))|0; - HEAP32[$171>>2] = $173; - $174 = (($input) + 20|0); - $175 = HEAP32[$174>>2]|0; - $176 = (($175) - ($161))|0; - HEAP32[$174>>2] = $176; - $177 = (($input) + 24|0); - $178 = HEAP32[$177>>2]|0; - $179 = (($178) - ($160))|0; - HEAP32[$177>>2] = $179; - $180 = (($input) + 28|0); - $181 = HEAP32[$180>>2]|0; - $182 = (($181) - ($161))|0; - HEAP32[$180>>2] = $182; - $183 = (($input) + 32|0); - $184 = HEAP32[$183>>2]|0; - $185 = (($184) - ($160))|0; - HEAP32[$183>>2] = $185; - $186 = (($input) + 36|0); - $187 = HEAP32[$186>>2]|0; - $188 = (($187) - ($161))|0; - HEAP32[$186>>2] = $188; - $189 = HEAP32[$123>>2]|0; - $190 = $189 << 2; - HEAP32[$123>>2] = $190; - $191 = (($input) + 8|0); - $192 = HEAP32[$191>>2]|0; - $193 = $192 << 3; - HEAP32[$191>>2] = $193; - $194 = (($input) + 12|0); - $195 = HEAP32[$194>>2]|0; - $196 = $195 << 5; - HEAP32[$194>>2] = $196; - $197 = (($input) + 16|0); - $198 = HEAP32[$197>>2]|0; - $199 = $198 << 6; - HEAP32[$197>>2] = $199; - $200 = (($input) + 24|0); - $201 = HEAP32[$200>>2]|0; - $202 = $201 << 1; - HEAP32[$200>>2] = $202; - $203 = (($input) + 28|0); - $204 = HEAP32[$203>>2]|0; - $205 = $204 << 3; - HEAP32[$203>>2] = $205; - $206 = (($input) + 32|0); - $207 = HEAP32[$206>>2]|0; - $208 = $207 << 4; - HEAP32[$206>>2] = $208; - $209 = (($input) + 36|0); - $210 = HEAP32[$209>>2]|0; - $211 = $210 << 6; - HEAP32[$209>>2] = $211; + $150 = HEAP32[$126>>2]|0; + $151 = $150 >> 25; + $152 = $150 & 33554431; + HEAP32[$126>>2] = $152; + $153 = ($151*19)|0; + $154 = HEAP32[$input>>2]|0; + $155 = (($153) + ($154))|0; + HEAP32[$input>>2] = $155; + $156 = (_s32_gte($155)|0); + $157 = ((($input)) + 4|0); + $158 = HEAP32[$157>>2]|0; + $159 = (_s32_eq($158,33554431)|0); + $mask$1 = $159 & $156; + $160 = ((($input)) + 8|0); + $161 = HEAP32[$160>>2]|0; + $162 = (_s32_eq($161,67108863)|0); + $mask$1$1 = $162 & $mask$1; + $163 = ((($input)) + 12|0); + $164 = HEAP32[$163>>2]|0; + $165 = (_s32_eq($164,33554431)|0); + $mask$1$2 = $165 & $mask$1$1; + $166 = ((($input)) + 16|0); + $167 = HEAP32[$166>>2]|0; + $168 = (_s32_eq($167,67108863)|0); + $mask$1$3 = $168 & $mask$1$2; + $169 = ((($input)) + 20|0); + $170 = HEAP32[$169>>2]|0; + $171 = (_s32_eq($170,33554431)|0); + $mask$1$4 = $171 & $mask$1$3; + $172 = ((($input)) + 24|0); + $173 = HEAP32[$172>>2]|0; + $174 = (_s32_eq($173,67108863)|0); + $mask$1$5 = $174 & $mask$1$4; + $175 = ((($input)) + 28|0); + $176 = HEAP32[$175>>2]|0; + $177 = (_s32_eq($176,33554431)|0); + $mask$1$6 = $177 & $mask$1$5; + $178 = ((($input)) + 32|0); + $179 = HEAP32[$178>>2]|0; + $180 = (_s32_eq($179,67108863)|0); + $mask$1$7 = $180 & $mask$1$6; + $181 = ((($input)) + 36|0); + $182 = HEAP32[$181>>2]|0; + $183 = (_s32_eq($182,33554431)|0); + $mask$1$8 = $183 & $mask$1$7; + $184 = $mask$1$8 & 67108845; + $185 = HEAP32[$input>>2]|0; + $186 = (($185) - ($184))|0; + HEAP32[$input>>2] = $186; + $187 = $mask$1$8 & 67108863; + $188 = $mask$1$8 & 33554431; + $189 = ((($input)) + 4|0); + $190 = HEAP32[$189>>2]|0; + $191 = (($190) - ($188))|0; + HEAP32[$189>>2] = $191; + $192 = ((($input)) + 8|0); + $193 = HEAP32[$192>>2]|0; + $194 = (($193) - ($187))|0; + HEAP32[$192>>2] = $194; + $195 = ((($input)) + 12|0); + $196 = HEAP32[$195>>2]|0; + $197 = (($196) - ($188))|0; + HEAP32[$195>>2] = $197; + $198 = ((($input)) + 16|0); + $199 = HEAP32[$198>>2]|0; + $200 = (($199) - ($187))|0; + HEAP32[$198>>2] = $200; + $201 = ((($input)) + 20|0); + $202 = HEAP32[$201>>2]|0; + $203 = (($202) - ($188))|0; + HEAP32[$201>>2] = $203; + $204 = ((($input)) + 24|0); + $205 = HEAP32[$204>>2]|0; + $206 = (($205) - ($187))|0; + HEAP32[$204>>2] = $206; + $207 = ((($input)) + 28|0); + $208 = HEAP32[$207>>2]|0; + $209 = (($208) - ($188))|0; + HEAP32[$207>>2] = $209; + $210 = ((($input)) + 32|0); + $211 = HEAP32[$210>>2]|0; + $212 = (($211) - ($187))|0; + HEAP32[$210>>2] = $212; + $213 = ((($input)) + 36|0); + $214 = HEAP32[$213>>2]|0; + $215 = (($214) - ($188))|0; + HEAP32[$213>>2] = $215; + $216 = HEAP32[$123>>2]|0; + $217 = $216 << 2; + HEAP32[$123>>2] = $217; + $218 = ((($input)) + 8|0); + $219 = HEAP32[$218>>2]|0; + $220 = $219 << 3; + HEAP32[$218>>2] = $220; + $221 = ((($input)) + 12|0); + $222 = HEAP32[$221>>2]|0; + $223 = $222 << 5; + HEAP32[$221>>2] = $223; + $224 = ((($input)) + 16|0); + $225 = HEAP32[$224>>2]|0; + $226 = $225 << 6; + HEAP32[$224>>2] = $226; + $227 = ((($input)) + 24|0); + $228 = HEAP32[$227>>2]|0; + $229 = $228 << 1; + HEAP32[$227>>2] = $229; + $230 = ((($input)) + 28|0); + $231 = HEAP32[$230>>2]|0; + $232 = $231 << 3; + HEAP32[$230>>2] = $232; + $233 = ((($input)) + 32|0); + $234 = HEAP32[$233>>2]|0; + $235 = $234 << 4; + HEAP32[$233>>2] = $235; + $236 = ((($input)) + 36|0); + $237 = HEAP32[$236>>2]|0; + $238 = $237 << 6; + HEAP32[$236>>2] = $238; HEAP8[$output>>0] = 0; - $212 = (($output) + 16|0); - HEAP8[$212>>0] = 0; - $213 = HEAP32[$input>>2]|0; - $214 = HEAP8[$output>>0]|0; - $215 = $214&255; - $216 = $215 | $213; - $217 = $216&255; - HEAP8[$output>>0] = $217; - $218 = HEAP32[$input>>2]|0; - $219 = $218 >>> 8; - $220 = $219&255; - $221 = (($output) + 1|0); - HEAP8[$221>>0] = $220; - $222 = HEAP32[$input>>2]|0; - $223 = $222 >>> 16; - $224 = $223&255; - $225 = (($output) + 2|0); - HEAP8[$225>>0] = $224; - $226 = HEAP32[$input>>2]|0; - $227 = $226 >>> 24; - $228 = (($output) + 3|0); - $229 = HEAP32[$123>>2]|0; - $230 = $227 | $229; - $231 = $230&255; - HEAP8[$228>>0] = $231; - $232 = HEAP32[$123>>2]|0; - $233 = $232 >>> 8; - $234 = $233&255; - $235 = (($output) + 4|0); - HEAP8[$235>>0] = $234; - $236 = HEAP32[$123>>2]|0; - $237 = $236 >>> 16; - $238 = $237&255; - $239 = (($output) + 5|0); - HEAP8[$239>>0] = $238; - $240 = HEAP32[$123>>2]|0; - $241 = $240 >>> 24; - $242 = (($output) + 6|0); - $243 = HEAP32[$191>>2]|0; - $244 = $241 | $243; - $245 = $244&255; - HEAP8[$242>>0] = $245; - $246 = HEAP32[$191>>2]|0; - $247 = $246 >>> 8; - $248 = $247&255; - $249 = (($output) + 7|0); - HEAP8[$249>>0] = $248; - $250 = HEAP32[$191>>2]|0; - $251 = $250 >>> 16; - $252 = $251&255; - $253 = (($output) + 8|0); - HEAP8[$253>>0] = $252; - $254 = HEAP32[$191>>2]|0; - $255 = $254 >>> 24; - $256 = (($output) + 9|0); - $257 = HEAP32[$194>>2]|0; - $258 = $255 | $257; - $259 = $258&255; - HEAP8[$256>>0] = $259; - $260 = HEAP32[$194>>2]|0; - $261 = $260 >>> 8; - $262 = $261&255; - $263 = (($output) + 10|0); - HEAP8[$263>>0] = $262; - $264 = HEAP32[$194>>2]|0; - $265 = $264 >>> 16; - $266 = $265&255; - $267 = (($output) + 11|0); - HEAP8[$267>>0] = $266; - $268 = HEAP32[$194>>2]|0; - $269 = $268 >>> 24; - $270 = (($output) + 12|0); - $271 = HEAP32[$197>>2]|0; - $272 = $269 | $271; - $273 = $272&255; - HEAP8[$270>>0] = $273; - $274 = HEAP32[$197>>2]|0; - $275 = $274 >>> 8; - $276 = $275&255; - $277 = (($output) + 13|0); - HEAP8[$277>>0] = $276; - $278 = HEAP32[$197>>2]|0; - $279 = $278 >>> 16; - $280 = $279&255; - $281 = (($output) + 14|0); - HEAP8[$281>>0] = $280; - $282 = HEAP32[$197>>2]|0; - $283 = $282 >>> 24; - $284 = $283&255; - $285 = (($output) + 15|0); - HEAP8[$285>>0] = $284; - $286 = (($input) + 20|0); - $287 = HEAP32[$286>>2]|0; - $288 = HEAP8[$212>>0]|0; + $239 = ((($output)) + 16|0); + HEAP8[$239>>0] = 0; + $240 = HEAP32[$input>>2]|0; + $241 = HEAP8[$output>>0]|0; + $242 = $241&255; + $243 = $242 | $240; + $244 = $243&255; + HEAP8[$output>>0] = $244; + $245 = HEAP32[$input>>2]|0; + $246 = $245 >>> 8; + $247 = $246&255; + $248 = ((($output)) + 1|0); + HEAP8[$248>>0] = $247; + $249 = HEAP32[$input>>2]|0; + $250 = $249 >>> 16; + $251 = $250&255; + $252 = ((($output)) + 2|0); + HEAP8[$252>>0] = $251; + $253 = HEAP32[$input>>2]|0; + $254 = $253 >>> 24; + $255 = ((($output)) + 3|0); + $256 = HEAP32[$123>>2]|0; + $257 = $254 | $256; + $258 = $257&255; + HEAP8[$255>>0] = $258; + $259 = HEAP32[$123>>2]|0; + $260 = $259 >>> 8; + $261 = $260&255; + $262 = ((($output)) + 4|0); + HEAP8[$262>>0] = $261; + $263 = HEAP32[$123>>2]|0; + $264 = $263 >>> 16; + $265 = $264&255; + $266 = ((($output)) + 5|0); + HEAP8[$266>>0] = $265; + $267 = HEAP32[$123>>2]|0; + $268 = $267 >>> 24; + $269 = ((($output)) + 6|0); + $270 = HEAP32[$218>>2]|0; + $271 = $268 | $270; + $272 = $271&255; + HEAP8[$269>>0] = $272; + $273 = HEAP32[$218>>2]|0; + $274 = $273 >>> 8; + $275 = $274&255; + $276 = ((($output)) + 7|0); + HEAP8[$276>>0] = $275; + $277 = HEAP32[$218>>2]|0; + $278 = $277 >>> 16; + $279 = $278&255; + $280 = ((($output)) + 8|0); + HEAP8[$280>>0] = $279; + $281 = HEAP32[$218>>2]|0; + $282 = $281 >>> 24; + $283 = ((($output)) + 9|0); + $284 = HEAP32[$221>>2]|0; + $285 = $282 | $284; + $286 = $285&255; + HEAP8[$283>>0] = $286; + $287 = HEAP32[$221>>2]|0; + $288 = $287 >>> 8; $289 = $288&255; - $290 = $289 | $287; - $291 = $290&255; - HEAP8[$212>>0] = $291; - $292 = HEAP32[$286>>2]|0; - $293 = $292 >>> 8; - $294 = $293&255; - $295 = (($output) + 17|0); - HEAP8[$295>>0] = $294; - $296 = HEAP32[$286>>2]|0; - $297 = $296 >>> 16; - $298 = $297&255; - $299 = (($output) + 18|0); - HEAP8[$299>>0] = $298; - $300 = HEAP32[$286>>2]|0; - $301 = $300 >>> 24; - $302 = (($output) + 19|0); - $303 = HEAP32[$200>>2]|0; - $304 = $301 | $303; - $305 = $304&255; - HEAP8[$302>>0] = $305; - $306 = HEAP32[$200>>2]|0; - $307 = $306 >>> 8; - $308 = $307&255; - $309 = (($output) + 20|0); - HEAP8[$309>>0] = $308; - $310 = HEAP32[$200>>2]|0; - $311 = $310 >>> 16; - $312 = $311&255; - $313 = (($output) + 21|0); - HEAP8[$313>>0] = $312; - $314 = HEAP32[$200>>2]|0; - $315 = $314 >>> 24; - $316 = (($output) + 22|0); - $317 = HEAP32[$203>>2]|0; - $318 = $315 | $317; - $319 = $318&255; - HEAP8[$316>>0] = $319; - $320 = HEAP32[$203>>2]|0; - $321 = $320 >>> 8; - $322 = $321&255; - $323 = (($output) + 23|0); - HEAP8[$323>>0] = $322; - $324 = HEAP32[$203>>2]|0; - $325 = $324 >>> 16; - $326 = $325&255; - $327 = (($output) + 24|0); - HEAP8[$327>>0] = $326; - $328 = HEAP32[$203>>2]|0; - $329 = $328 >>> 24; - $330 = (($output) + 25|0); - $331 = HEAP32[$206>>2]|0; - $332 = $329 | $331; - $333 = $332&255; - HEAP8[$330>>0] = $333; - $334 = HEAP32[$206>>2]|0; - $335 = $334 >>> 8; - $336 = $335&255; - $337 = (($output) + 26|0); - HEAP8[$337>>0] = $336; - $338 = HEAP32[$206>>2]|0; - $339 = $338 >>> 16; - $340 = $339&255; - $341 = (($output) + 27|0); - HEAP8[$341>>0] = $340; - $342 = HEAP32[$206>>2]|0; - $343 = $342 >>> 24; - $344 = (($output) + 28|0); - $345 = HEAP32[$209>>2]|0; - $346 = $343 | $345; - $347 = $346&255; - HEAP8[$344>>0] = $347; - $348 = HEAP32[$209>>2]|0; - $349 = $348 >>> 8; - $350 = $349&255; - $351 = (($output) + 29|0); - HEAP8[$351>>0] = $350; - $352 = HEAP32[$209>>2]|0; - $353 = $352 >>> 16; - $354 = $353&255; - $355 = (($output) + 30|0); - HEAP8[$355>>0] = $354; - $356 = HEAP32[$209>>2]|0; - $357 = $356 >>> 24; - $358 = $357&255; - $359 = (($output) + 31|0); - HEAP8[$359>>0] = $358; + $290 = ((($output)) + 10|0); + HEAP8[$290>>0] = $289; + $291 = HEAP32[$221>>2]|0; + $292 = $291 >>> 16; + $293 = $292&255; + $294 = ((($output)) + 11|0); + HEAP8[$294>>0] = $293; + $295 = HEAP32[$221>>2]|0; + $296 = $295 >>> 24; + $297 = ((($output)) + 12|0); + $298 = HEAP32[$224>>2]|0; + $299 = $296 | $298; + $300 = $299&255; + HEAP8[$297>>0] = $300; + $301 = HEAP32[$224>>2]|0; + $302 = $301 >>> 8; + $303 = $302&255; + $304 = ((($output)) + 13|0); + HEAP8[$304>>0] = $303; + $305 = HEAP32[$224>>2]|0; + $306 = $305 >>> 16; + $307 = $306&255; + $308 = ((($output)) + 14|0); + HEAP8[$308>>0] = $307; + $309 = HEAP32[$224>>2]|0; + $310 = $309 >>> 24; + $311 = $310&255; + $312 = ((($output)) + 15|0); + HEAP8[$312>>0] = $311; + $313 = ((($input)) + 20|0); + $314 = HEAP32[$313>>2]|0; + $315 = HEAP8[$239>>0]|0; + $316 = $315&255; + $317 = $316 | $314; + $318 = $317&255; + HEAP8[$239>>0] = $318; + $319 = HEAP32[$313>>2]|0; + $320 = $319 >>> 8; + $321 = $320&255; + $322 = ((($output)) + 17|0); + HEAP8[$322>>0] = $321; + $323 = HEAP32[$313>>2]|0; + $324 = $323 >>> 16; + $325 = $324&255; + $326 = ((($output)) + 18|0); + HEAP8[$326>>0] = $325; + $327 = HEAP32[$313>>2]|0; + $328 = $327 >>> 24; + $329 = ((($output)) + 19|0); + $330 = HEAP32[$227>>2]|0; + $331 = $328 | $330; + $332 = $331&255; + HEAP8[$329>>0] = $332; + $333 = HEAP32[$227>>2]|0; + $334 = $333 >>> 8; + $335 = $334&255; + $336 = ((($output)) + 20|0); + HEAP8[$336>>0] = $335; + $337 = HEAP32[$227>>2]|0; + $338 = $337 >>> 16; + $339 = $338&255; + $340 = ((($output)) + 21|0); + HEAP8[$340>>0] = $339; + $341 = HEAP32[$227>>2]|0; + $342 = $341 >>> 24; + $343 = ((($output)) + 22|0); + $344 = HEAP32[$230>>2]|0; + $345 = $342 | $344; + $346 = $345&255; + HEAP8[$343>>0] = $346; + $347 = HEAP32[$230>>2]|0; + $348 = $347 >>> 8; + $349 = $348&255; + $350 = ((($output)) + 23|0); + HEAP8[$350>>0] = $349; + $351 = HEAP32[$230>>2]|0; + $352 = $351 >>> 16; + $353 = $352&255; + $354 = ((($output)) + 24|0); + HEAP8[$354>>0] = $353; + $355 = HEAP32[$230>>2]|0; + $356 = $355 >>> 24; + $357 = ((($output)) + 25|0); + $358 = HEAP32[$233>>2]|0; + $359 = $356 | $358; + $360 = $359&255; + HEAP8[$357>>0] = $360; + $361 = HEAP32[$233>>2]|0; + $362 = $361 >>> 8; + $363 = $362&255; + $364 = ((($output)) + 26|0); + HEAP8[$364>>0] = $363; + $365 = HEAP32[$233>>2]|0; + $366 = $365 >>> 16; + $367 = $366&255; + $368 = ((($output)) + 27|0); + HEAP8[$368>>0] = $367; + $369 = HEAP32[$233>>2]|0; + $370 = $369 >>> 24; + $371 = ((($output)) + 28|0); + $372 = HEAP32[$236>>2]|0; + $373 = $370 | $372; + $374 = $373&255; + HEAP8[$371>>0] = $374; + $375 = HEAP32[$236>>2]|0; + $376 = $375 >>> 8; + $377 = $376&255; + $378 = ((($output)) + 29|0); + HEAP8[$378>>0] = $377; + $379 = HEAP32[$236>>2]|0; + $380 = $379 >>> 16; + $381 = $380&255; + $382 = ((($output)) + 30|0); + HEAP8[$382>>0] = $381; + $383 = HEAP32[$236>>2]|0; + $384 = $383 >>> 24; + $385 = $384&255; + $386 = ((($output)) + 31|0); + HEAP8[$386>>0] = $385; STACKTOP = sp;return; } -function _swap_conditional($a,$b,$0,$1) { +function _s32_gte($a) { $a = $a|0; - $b = $b|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; - var $9 = 0, $exitcond = 0, $i$02 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_i64Subtract(0,0,($0|0),($1|0))|0); - $3 = tempRet0; - $i$02 = 0; - while(1) { - $4 = (($a) + ($i$02<<3)|0); - $5 = $4; - $6 = $5; - $7 = HEAP32[$6>>2]|0; - $8 = (($5) + 4)|0; - $9 = $8; - $10 = HEAP32[$9>>2]|0; - $11 = (($b) + ($i$02<<3)|0); - $12 = $11; - $13 = $12; - $14 = HEAP32[$13>>2]|0; - $15 = (($12) + 4)|0; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = $14 ^ $7; - $19 = $17 ^ $10; - $20 = $18 & $2; - $21 = $19 & $3; - $22 = $20 ^ $7; - $21 ^ $10; - $23 = (_bitshift64Ashr(0,($22|0),32)|0); - $24 = tempRet0; - $25 = $4; - $26 = $25; - HEAP32[$26>>2] = $23; - $27 = (($25) + 4)|0; - $28 = $27; - HEAP32[$28>>2] = $24; - $29 = $11; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (($29) + 4)|0; - $33 = $32; - $34 = HEAP32[$33>>2]|0; - $35 = $20 ^ $31; - $21 ^ $34; - $36 = (_bitshift64Ashr(0,($35|0),32)|0); - $37 = tempRet0; - $38 = $11; - $39 = $38; - HEAP32[$39>>2] = $36; - $40 = (($38) + 4)|0; - $41 = $40; - HEAP32[$41>>2] = $37; - $42 = (($i$02) + 1)|0; - $exitcond = ($42|0)==(10); - if ($exitcond) { - break; - } else { - $i$02 = $42; - } - } - STACKTOP = sp;return; -} -function _fmonty($x2,$z2,$x3,$z3,$x,$z,$xprime,$zprime,$qmqp) { - $x2 = $x2|0; - $z2 = $z2|0; - $x3 = $x3|0; - $z3 = $z3|0; - $x = $x|0; - $z = $z|0; - $xprime = $xprime|0; - $zprime = $zprime|0; - $qmqp = $qmqp|0; - var $0 = 0, $origx = 0, $origxprime = 0, $xx = 0, $xxprime = 0, $xxxprime = 0, $zz = 0, $zzprime = 0, $zzz = 0, $zzzprime = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 1232|0; - $origx = sp + 1144|0; - $origxprime = sp + 1064|0; - $zzz = sp + 912|0; - $xx = sp + 760|0; - $zz = sp + 608|0; - $xxprime = sp + 456|0; - $zzprime = sp + 304|0; - $zzzprime = sp + 152|0; - $xxxprime = sp; - dest=$origx+0|0; src=$x+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($x,$z); - _fdifference($z,$origx); - dest=$origxprime+0|0; src=$xprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($xprime,$zprime); - _fdifference($zprime,$origxprime); - _fproduct($xxprime,$xprime,$z); - _fproduct($zzprime,$x,$zprime); - _freduce_degree($xxprime); - _freduce_coefficients($xxprime); - _freduce_degree($zzprime); - _freduce_coefficients($zzprime); - dest=$origxprime+0|0; src=$xxprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($xxprime,$zzprime); - _fdifference($zzprime,$origxprime); - _fsquare($xxxprime,$xxprime); - _fsquare($zzzprime,$zzprime); - _fproduct($zzprime,$zzzprime,$qmqp); - _freduce_degree($zzprime); - _freduce_coefficients($zzprime); - dest=$x3+0|0; src=$xxxprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$z3+0|0; src=$zzprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsquare($xx,$x); - _fsquare($zz,$z); - _fproduct($x2,$xx,$zz); - _freduce_degree($x2); - _freduce_coefficients($x2); - _fdifference($zz,$xx); - $0 = (($zzz) + 80|0); - dest=$0+0|0; stop=dest+72|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - _fscalar_product($zzz,$zz); - _freduce_coefficients($zzz); - _fsum($zzz,$xx); - _fproduct($z2,$zz,$zzz); - _freduce_degree($z2); - _freduce_coefficients($z2); - STACKTOP = sp;return; + $0 = (($a) + -67108845)|0; + $1 = $0 >> 31; + $2 = $1 ^ -1; + return ($2|0); } -function _fsquare($output,$in) { - $output = $output|0; - $in = $in|0; - var $t = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; +function _s32_eq($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 160|0; - $t = sp; - _fsquare_inner($t,$in); - _freduce_degree($t); - _freduce_coefficients($t); - dest=$output+0|0; src=$t+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; + $0 = $a ^ -1; + $1 = $0 ^ $b; + $2 = $1 << 16; + $3 = $2 & $1; + $4 = $3 << 8; + $5 = $4 & $3; + $6 = $5 << 4; + $7 = $6 & $5; + $8 = $7 << 2; + $9 = $8 & $7; + $10 = $9 << 1; + $11 = $10 & $9; + $12 = $11 >> 31; + return ($12|0); } function _fproduct($output,$in2,$in) { $output = $output|0; @@ -6843,7 +7494,7 @@ function _fproduct($output,$in2,$in) { $27 = HEAP32[$26>>2]|0; $28 = (_bitshift64Ashr(0,($24|0),32)|0); $29 = tempRet0; - $30 = (($in) + 8|0); + $30 = ((($in)) + 8|0); $31 = $30; $32 = $31; $33 = HEAP32[$32>>2]|0; @@ -6854,7 +7505,7 @@ function _fproduct($output,$in2,$in) { $38 = tempRet0; $39 = (___muldi3(($37|0),($38|0),($28|0),($29|0))|0); $40 = tempRet0; - $41 = (($in2) + 8|0); + $41 = ((($in2)) + 8|0); $42 = $41; $43 = $42; $44 = HEAP32[$43>>2]|0; @@ -6875,7 +7526,7 @@ function _fproduct($output,$in2,$in) { $59 = tempRet0; $60 = (_i64Add(($58|0),($59|0),($39|0),($40|0))|0); $61 = tempRet0; - $62 = (($output) + 8|0); + $62 = ((($output)) + 8|0); $63 = $62; $64 = $63; HEAP32[$64>>2] = $60; @@ -6908,7 +7559,7 @@ function _fproduct($output,$in2,$in) { $90 = HEAP32[$89>>2]|0; $91 = (_bitshift64Ashr(0,($87|0),32)|0); $92 = tempRet0; - $93 = (($in) + 16|0); + $93 = ((($in)) + 16|0); $94 = $93; $95 = $94; $96 = HEAP32[$95>>2]|0; @@ -6921,7 +7572,7 @@ function _fproduct($output,$in2,$in) { $103 = tempRet0; $104 = (_i64Add(($102|0),($103|0),($83|0),($84|0))|0); $105 = tempRet0; - $106 = (($in2) + 16|0); + $106 = ((($in2)) + 16|0); $107 = $106; $108 = $107; $109 = HEAP32[$108>>2]|0; @@ -6942,7 +7593,7 @@ function _fproduct($output,$in2,$in) { $124 = tempRet0; $125 = (_i64Add(($104|0),($105|0),($123|0),($124|0))|0); $126 = tempRet0; - $127 = (($output) + 16|0); + $127 = ((($output)) + 16|0); $128 = $127; $129 = $128; HEAP32[$129>>2] = $125; @@ -6995,7 +7646,7 @@ function _fproduct($output,$in2,$in) { $175 = HEAP32[$174>>2]|0; $176 = (_bitshift64Ashr(0,($172|0),32)|0); $177 = tempRet0; - $178 = (($in) + 24|0); + $178 = ((($in)) + 24|0); $179 = $178; $180 = $179; $181 = HEAP32[$180>>2]|0; @@ -7008,7 +7659,7 @@ function _fproduct($output,$in2,$in) { $188 = tempRet0; $189 = (_i64Add(($168|0),($169|0),($187|0),($188|0))|0); $190 = tempRet0; - $191 = (($in2) + 24|0); + $191 = ((($in2)) + 24|0); $192 = $191; $193 = $192; $194 = HEAP32[$193>>2]|0; @@ -7029,7 +7680,7 @@ function _fproduct($output,$in2,$in) { $209 = tempRet0; $210 = (_i64Add(($189|0),($190|0),($208|0),($209|0))|0); $211 = tempRet0; - $212 = (($output) + 24|0); + $212 = ((($output)) + 24|0); $213 = $212; $214 = $213; HEAP32[$214>>2] = $210; @@ -7104,7 +7755,7 @@ function _fproduct($output,$in2,$in) { $282 = HEAP32[$281>>2]|0; $283 = (_bitshift64Ashr(0,($279|0),32)|0); $284 = tempRet0; - $285 = (($in) + 32|0); + $285 = ((($in)) + 32|0); $286 = $285; $287 = $286; $288 = HEAP32[$287>>2]|0; @@ -7117,7 +7768,7 @@ function _fproduct($output,$in2,$in) { $295 = tempRet0; $296 = (_i64Add(($275|0),($276|0),($294|0),($295|0))|0); $297 = tempRet0; - $298 = (($in2) + 32|0); + $298 = ((($in2)) + 32|0); $299 = $298; $300 = $299; $301 = HEAP32[$300>>2]|0; @@ -7138,7 +7789,7 @@ function _fproduct($output,$in2,$in) { $316 = tempRet0; $317 = (_i64Add(($296|0),($297|0),($315|0),($316|0))|0); $318 = tempRet0; - $319 = (($output) + 32|0); + $319 = ((($output)) + 32|0); $320 = $319; $321 = $320; HEAP32[$321>>2] = $317; @@ -7231,7 +7882,7 @@ function _fproduct($output,$in2,$in) { $407 = HEAP32[$406>>2]|0; $408 = (_bitshift64Ashr(0,($404|0),32)|0); $409 = tempRet0; - $410 = (($in) + 40|0); + $410 = ((($in)) + 40|0); $411 = $410; $412 = $411; $413 = HEAP32[$412>>2]|0; @@ -7244,7 +7895,7 @@ function _fproduct($output,$in2,$in) { $420 = tempRet0; $421 = (_i64Add(($400|0),($401|0),($419|0),($420|0))|0); $422 = tempRet0; - $423 = (($in2) + 40|0); + $423 = ((($in2)) + 40|0); $424 = $423; $425 = $424; $426 = HEAP32[$425>>2]|0; @@ -7265,7 +7916,7 @@ function _fproduct($output,$in2,$in) { $441 = tempRet0; $442 = (_i64Add(($421|0),($422|0),($440|0),($441|0))|0); $443 = tempRet0; - $444 = (($output) + 40|0); + $444 = ((($output)) + 40|0); $445 = $444; $446 = $445; HEAP32[$446>>2] = $442; @@ -7380,7 +8031,7 @@ function _fproduct($output,$in2,$in) { $554 = HEAP32[$553>>2]|0; $555 = (_bitshift64Ashr(0,($551|0),32)|0); $556 = tempRet0; - $557 = (($in) + 48|0); + $557 = ((($in)) + 48|0); $558 = $557; $559 = $558; $560 = HEAP32[$559>>2]|0; @@ -7393,7 +8044,7 @@ function _fproduct($output,$in2,$in) { $567 = tempRet0; $568 = (_i64Add(($547|0),($548|0),($566|0),($567|0))|0); $569 = tempRet0; - $570 = (($in2) + 48|0); + $570 = ((($in2)) + 48|0); $571 = $570; $572 = $571; $573 = HEAP32[$572>>2]|0; @@ -7414,7 +8065,7 @@ function _fproduct($output,$in2,$in) { $588 = tempRet0; $589 = (_i64Add(($568|0),($569|0),($587|0),($588|0))|0); $590 = tempRet0; - $591 = (($output) + 48|0); + $591 = ((($output)) + 48|0); $592 = $591; $593 = $592; HEAP32[$593>>2] = $589; @@ -7547,7 +8198,7 @@ function _fproduct($output,$in2,$in) { $719 = HEAP32[$718>>2]|0; $720 = (_bitshift64Ashr(0,($716|0),32)|0); $721 = tempRet0; - $722 = (($in) + 56|0); + $722 = ((($in)) + 56|0); $723 = $722; $724 = $723; $725 = HEAP32[$724>>2]|0; @@ -7560,7 +8211,7 @@ function _fproduct($output,$in2,$in) { $732 = tempRet0; $733 = (_i64Add(($712|0),($713|0),($731|0),($732|0))|0); $734 = tempRet0; - $735 = (($in2) + 56|0); + $735 = ((($in2)) + 56|0); $736 = $735; $737 = $736; $738 = HEAP32[$737>>2]|0; @@ -7581,7 +8232,7 @@ function _fproduct($output,$in2,$in) { $753 = tempRet0; $754 = (_i64Add(($733|0),($734|0),($752|0),($753|0))|0); $755 = tempRet0; - $756 = (($output) + 56|0); + $756 = ((($output)) + 56|0); $757 = $756; $758 = $757; HEAP32[$758>>2] = $754; @@ -7736,7 +8387,7 @@ function _fproduct($output,$in2,$in) { $906 = HEAP32[$905>>2]|0; $907 = (_bitshift64Ashr(0,($903|0),32)|0); $908 = tempRet0; - $909 = (($in) + 64|0); + $909 = ((($in)) + 64|0); $910 = $909; $911 = $910; $912 = HEAP32[$911>>2]|0; @@ -7749,7 +8400,7 @@ function _fproduct($output,$in2,$in) { $919 = tempRet0; $920 = (_i64Add(($899|0),($900|0),($918|0),($919|0))|0); $921 = tempRet0; - $922 = (($in2) + 64|0); + $922 = ((($in2)) + 64|0); $923 = $922; $924 = $923; $925 = HEAP32[$924>>2]|0; @@ -7770,7 +8421,7 @@ function _fproduct($output,$in2,$in) { $940 = tempRet0; $941 = (_i64Add(($920|0),($921|0),($939|0),($940|0))|0); $942 = tempRet0; - $943 = (($output) + 64|0); + $943 = ((($output)) + 64|0); $944 = $943; $945 = $944; HEAP32[$945>>2] = $941; @@ -7943,7 +8594,7 @@ function _fproduct($output,$in2,$in) { $1111 = HEAP32[$1110>>2]|0; $1112 = (_bitshift64Ashr(0,($1108|0),32)|0); $1113 = tempRet0; - $1114 = (($in) + 72|0); + $1114 = ((($in)) + 72|0); $1115 = $1114; $1116 = $1115; $1117 = HEAP32[$1116>>2]|0; @@ -7956,7 +8607,7 @@ function _fproduct($output,$in2,$in) { $1124 = tempRet0; $1125 = (_i64Add(($1104|0),($1105|0),($1123|0),($1124|0))|0); $1126 = tempRet0; - $1127 = (($in2) + 72|0); + $1127 = ((($in2)) + 72|0); $1128 = $1127; $1129 = $1128; $1130 = HEAP32[$1129>>2]|0; @@ -7977,7 +8628,7 @@ function _fproduct($output,$in2,$in) { $1145 = tempRet0; $1146 = (_i64Add(($1125|0),($1126|0),($1144|0),($1145|0))|0); $1147 = tempRet0; - $1148 = (($output) + 72|0); + $1148 = ((($output)) + 72|0); $1149 = $1148; $1150 = $1149; HEAP32[$1150>>2] = $1146; @@ -8164,7 +8815,7 @@ function _fproduct($output,$in2,$in) { $1330 = tempRet0; $1331 = (_i64Add(($1311|0),($1312|0),($1329|0),($1330|0))|0); $1332 = tempRet0; - $1333 = (($output) + 80|0); + $1333 = ((($output)) + 80|0); $1334 = $1333; $1335 = $1334; HEAP32[$1335>>2] = $1331; @@ -8329,7 +8980,7 @@ function _fproduct($output,$in2,$in) { $1493 = tempRet0; $1494 = (_i64Add(($1474|0),($1475|0),($1492|0),($1493|0))|0); $1495 = tempRet0; - $1496 = (($output) + 88|0); + $1496 = ((($output)) + 88|0); $1497 = $1496; $1498 = $1497; HEAP32[$1498>>2] = $1494; @@ -8476,7 +9127,7 @@ function _fproduct($output,$in2,$in) { $1638 = tempRet0; $1639 = (_i64Add(($1619|0),($1620|0),($1637|0),($1638|0))|0); $1640 = tempRet0; - $1641 = (($output) + 96|0); + $1641 = ((($output)) + 96|0); $1642 = $1641; $1643 = $1642; HEAP32[$1643>>2] = $1639; @@ -8601,7 +9252,7 @@ function _fproduct($output,$in2,$in) { $1761 = tempRet0; $1762 = (_i64Add(($1742|0),($1743|0),($1760|0),($1761|0))|0); $1763 = tempRet0; - $1764 = (($output) + 104|0); + $1764 = ((($output)) + 104|0); $1765 = $1764; $1766 = $1765; HEAP32[$1766>>2] = $1762; @@ -8708,7 +9359,7 @@ function _fproduct($output,$in2,$in) { $1866 = tempRet0; $1867 = (_i64Add(($1847|0),($1848|0),($1865|0),($1866|0))|0); $1868 = tempRet0; - $1869 = (($output) + 112|0); + $1869 = ((($output)) + 112|0); $1870 = $1869; $1871 = $1870; HEAP32[$1871>>2] = $1867; @@ -8793,7 +9444,7 @@ function _fproduct($output,$in2,$in) { $1949 = tempRet0; $1950 = (_i64Add(($1930|0),($1931|0),($1948|0),($1949|0))|0); $1951 = tempRet0; - $1952 = (($output) + 120|0); + $1952 = ((($output)) + 120|0); $1953 = $1952; $1954 = $1953; HEAP32[$1954>>2] = $1950; @@ -8860,7 +9511,7 @@ function _fproduct($output,$in2,$in) { $2014 = tempRet0; $2015 = (_i64Add(($2013|0),($2014|0),($1973|0),($1974|0))|0); $2016 = tempRet0; - $2017 = (($output) + 128|0); + $2017 = ((($output)) + 128|0); $2018 = $2017; $2019 = $2018; HEAP32[$2019>>2] = $2015; @@ -8905,7 +9556,7 @@ function _fproduct($output,$in2,$in) { $2057 = tempRet0; $2058 = (_i64Add(($2056|0),($2057|0),($2038|0),($2039|0))|0); $2059 = tempRet0; - $2060 = (($output) + 136|0); + $2060 = ((($output)) + 136|0); $2061 = $2060; $2062 = $2061; HEAP32[$2062>>2] = $2058; @@ -8930,14 +9581,14 @@ function _fproduct($output,$in2,$in) { $2080 = tempRet0; $2081 = (___muldi3(($2079|0),($2080|0),($2071|0),($2072|0))|0); $2082 = tempRet0; - $2083 = (($output) + 144|0); + $2083 = ((($output)) + 144|0); $2084 = $2083; $2085 = $2084; HEAP32[$2085>>2] = $2081; $2086 = (($2084) + 4)|0; $2087 = $2086; HEAP32[$2087>>2] = $2082; - STACKTOP = sp;return; + return; } function _freduce_degree($output) { $output = $output|0; @@ -8958,7 +9609,7 @@ function _freduce_degree($output) { var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0; var sp = 0; sp = STACKTOP; - $0 = (($output) + 144|0); + $0 = ((($output)) + 144|0); $1 = $0; $2 = $1; $3 = HEAP32[$2>>2]|0; @@ -8967,7 +9618,7 @@ function _freduce_degree($output) { $6 = HEAP32[$5>>2]|0; $7 = (_bitshift64Shl(($3|0),($6|0),4)|0); $8 = tempRet0; - $9 = (($output) + 64|0); + $9 = ((($output)) + 64|0); $10 = $9; $11 = $10; $12 = HEAP32[$11>>2]|0; @@ -8994,7 +9645,7 @@ function _freduce_degree($output) { $32 = (($30) + 4)|0; $33 = $32; HEAP32[$33>>2] = $29; - $34 = (($output) + 136|0); + $34 = ((($output)) + 136|0); $35 = $34; $36 = $35; $37 = HEAP32[$36>>2]|0; @@ -9003,7 +9654,7 @@ function _freduce_degree($output) { $40 = HEAP32[$39>>2]|0; $41 = (_bitshift64Shl(($37|0),($40|0),4)|0); $42 = tempRet0; - $43 = (($output) + 56|0); + $43 = ((($output)) + 56|0); $44 = $43; $45 = $44; $46 = HEAP32[$45>>2]|0; @@ -9030,7 +9681,7 @@ function _freduce_degree($output) { $66 = (($64) + 4)|0; $67 = $66; HEAP32[$67>>2] = $63; - $68 = (($output) + 128|0); + $68 = ((($output)) + 128|0); $69 = $68; $70 = $69; $71 = HEAP32[$70>>2]|0; @@ -9039,7 +9690,7 @@ function _freduce_degree($output) { $74 = HEAP32[$73>>2]|0; $75 = (_bitshift64Shl(($71|0),($74|0),4)|0); $76 = tempRet0; - $77 = (($output) + 48|0); + $77 = ((($output)) + 48|0); $78 = $77; $79 = $78; $80 = HEAP32[$79>>2]|0; @@ -9066,7 +9717,7 @@ function _freduce_degree($output) { $100 = (($98) + 4)|0; $101 = $100; HEAP32[$101>>2] = $97; - $102 = (($output) + 120|0); + $102 = ((($output)) + 120|0); $103 = $102; $104 = $103; $105 = HEAP32[$104>>2]|0; @@ -9075,7 +9726,7 @@ function _freduce_degree($output) { $108 = HEAP32[$107>>2]|0; $109 = (_bitshift64Shl(($105|0),($108|0),4)|0); $110 = tempRet0; - $111 = (($output) + 40|0); + $111 = ((($output)) + 40|0); $112 = $111; $113 = $112; $114 = HEAP32[$113>>2]|0; @@ -9102,7 +9753,7 @@ function _freduce_degree($output) { $134 = (($132) + 4)|0; $135 = $134; HEAP32[$135>>2] = $131; - $136 = (($output) + 112|0); + $136 = ((($output)) + 112|0); $137 = $136; $138 = $137; $139 = HEAP32[$138>>2]|0; @@ -9111,7 +9762,7 @@ function _freduce_degree($output) { $142 = HEAP32[$141>>2]|0; $143 = (_bitshift64Shl(($139|0),($142|0),4)|0); $144 = tempRet0; - $145 = (($output) + 32|0); + $145 = ((($output)) + 32|0); $146 = $145; $147 = $146; $148 = HEAP32[$147>>2]|0; @@ -9138,7 +9789,7 @@ function _freduce_degree($output) { $168 = (($166) + 4)|0; $169 = $168; HEAP32[$169>>2] = $165; - $170 = (($output) + 104|0); + $170 = ((($output)) + 104|0); $171 = $170; $172 = $171; $173 = HEAP32[$172>>2]|0; @@ -9147,7 +9798,7 @@ function _freduce_degree($output) { $176 = HEAP32[$175>>2]|0; $177 = (_bitshift64Shl(($173|0),($176|0),4)|0); $178 = tempRet0; - $179 = (($output) + 24|0); + $179 = ((($output)) + 24|0); $180 = $179; $181 = $180; $182 = HEAP32[$181>>2]|0; @@ -9174,7 +9825,7 @@ function _freduce_degree($output) { $202 = (($200) + 4)|0; $203 = $202; HEAP32[$203>>2] = $199; - $204 = (($output) + 96|0); + $204 = ((($output)) + 96|0); $205 = $204; $206 = $205; $207 = HEAP32[$206>>2]|0; @@ -9183,7 +9834,7 @@ function _freduce_degree($output) { $210 = HEAP32[$209>>2]|0; $211 = (_bitshift64Shl(($207|0),($210|0),4)|0); $212 = tempRet0; - $213 = (($output) + 16|0); + $213 = ((($output)) + 16|0); $214 = $213; $215 = $214; $216 = HEAP32[$215>>2]|0; @@ -9210,7 +9861,7 @@ function _freduce_degree($output) { $236 = (($234) + 4)|0; $237 = $236; HEAP32[$237>>2] = $233; - $238 = (($output) + 88|0); + $238 = ((($output)) + 88|0); $239 = $238; $240 = $239; $241 = HEAP32[$240>>2]|0; @@ -9219,7 +9870,7 @@ function _freduce_degree($output) { $244 = HEAP32[$243>>2]|0; $245 = (_bitshift64Shl(($241|0),($244|0),4)|0); $246 = tempRet0; - $247 = (($output) + 8|0); + $247 = ((($output)) + 8|0); $248 = $247; $249 = $248; $250 = HEAP32[$249>>2]|0; @@ -9246,7 +9897,7 @@ function _freduce_degree($output) { $270 = (($268) + 4)|0; $271 = $270; HEAP32[$271>>2] = $267; - $272 = (($output) + 80|0); + $272 = ((($output)) + 80|0); $273 = $272; $274 = $273; $275 = HEAP32[$274>>2]|0; @@ -9275,7 +9926,7 @@ function _freduce_degree($output) { $297 = (($295) + 4)|0; $298 = $297; HEAP32[$298>>2] = $294; - STACKTOP = sp;return; + return; } function _freduce_coefficients($output) { $output = $output|0; @@ -9286,7 +9937,7 @@ function _freduce_coefficients($output) { var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0; var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i$01 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($output) + 80|0); + $0 = ((($output)) + 80|0); $1 = $0; $2 = $1; HEAP32[$2>>2] = 0; @@ -9411,7 +10062,7 @@ function _freduce_coefficients($output) { $101 = (($99) + 4)|0; $102 = $101; HEAP32[$102>>2] = $98; - $103 = (($output) + 8|0); + $103 = ((($output)) + 8|0); $104 = $103; $105 = $104; $106 = HEAP32[$105>>2]|0; @@ -9426,944 +10077,317 @@ function _freduce_coefficients($output) { $114 = (($112) + 4)|0; $115 = $114; HEAP32[$115>>2] = $111; - STACKTOP = sp;return; + return; } -function _s32_eq($a,$b) { - $a = $a|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; +function _div_by_2_26($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = $a ^ -1; - $1 = $0 ^ $b; - $2 = $1 << 16; - $3 = $2 & $1; - $4 = $3 << 8; - $5 = $4 & $3; - $6 = $5 << 4; - $7 = $6 & $5; - $8 = $7 << 2; - $9 = $8 & $7; - $10 = $9 << 1; - $11 = $10 & $9; - $12 = $11 >> 31; - STACKTOP = sp;return ($12|0); + $2 = $1 >> 31; + $3 = $2 >>> 6; + $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); + $5 = tempRet0; + $6 = (_bitshift64Ashr(($4|0),($5|0),26)|0); + $7 = tempRet0; + tempRet0 = ($7); + return ($6|0); } -function _s32_gte($a) { - $a = $a|0; - var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; +function _div_by_2_25($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($a) + -67108845)|0; - $1 = $0 >> 31; - $2 = $1 ^ -1; - STACKTOP = sp;return ($2|0); + $2 = $1 >> 31; + $3 = $2 >>> 7; + $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); + $5 = tempRet0; + $6 = (_bitshift64Ashr(($4|0),($5|0),25)|0); + $7 = tempRet0; + tempRet0 = ($7); + return ($6|0); } -function _fsum($output,$in) { +function _fsquare($output,$in) { $output = $output|0; $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + var $t = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; - $0 = $output; + STACKTOP = STACKTOP + 160|0; + $t = sp; + _fsquare_inner($t,$in); + _freduce_degree($t); + _freduce_coefficients($t); + dest=$output; src=$t; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _fsquare_inner($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; + var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; + var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; + var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; + var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; + var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; + var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; + var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; + var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; + var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; + var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; + var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; + var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; + var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; + var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; + var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; + var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; + var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; + var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; + var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; + var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; + var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; + var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; + var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; + var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; + var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; + var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; + var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; + var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; + var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; + var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; + var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; + var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; + var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; + var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; + var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; + var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; + var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; + var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; + var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; + var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; + var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; + var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; + var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; + var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; + var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; + var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; + var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; + var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; + var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; + var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; + var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; + var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; + var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; + var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; + var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $0 = $in; $1 = $0; $2 = HEAP32[$1>>2]|0; $3 = (($0) + 4)|0; $4 = $3; $5 = HEAP32[$4>>2]|0; - $6 = $in; - $7 = $6; - $8 = HEAP32[$7>>2]|0; - $9 = (($6) + 4)|0; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (_i64Add(($8|0),($11|0),($2|0),($5|0))|0); - $13 = tempRet0; - $14 = $output; + $6 = (_bitshift64Ashr(0,($2|0),32)|0); + $7 = tempRet0; + $8 = (___muldi3(($6|0),($7|0),($6|0),($7|0))|0); + $9 = tempRet0; + $10 = $output; + $11 = $10; + HEAP32[$11>>2] = $8; + $12 = (($10) + 4)|0; + $13 = $12; + HEAP32[$13>>2] = $9; + $14 = $in; $15 = $14; - HEAP32[$15>>2] = $12; - $16 = (($14) + 4)|0; - $17 = $16; - HEAP32[$17>>2] = $13; - $18 = (($output) + 8|0); - $19 = $18; - $20 = $19; - $21 = HEAP32[$20>>2]|0; - $22 = (($19) + 4)|0; + $16 = HEAP32[$15>>2]|0; + $17 = (($14) + 4)|0; + $18 = $17; + $19 = HEAP32[$18>>2]|0; + $20 = (_bitshift64Ashr(0,($16|0),31)|0); + $21 = tempRet0; + $22 = ((($in)) + 8|0); $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($in) + 8|0); - $26 = $25; + $24 = $23; + $25 = HEAP32[$24>>2]|0; + $26 = (($23) + 4)|0; $27 = $26; $28 = HEAP32[$27>>2]|0; - $29 = (($26) + 4)|0; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (_i64Add(($28|0),($31|0),($21|0),($24|0))|0); - $33 = tempRet0; - $34 = $18; + $29 = (_bitshift64Ashr(0,($25|0),32)|0); + $30 = tempRet0; + $31 = (___muldi3(($29|0),($30|0),($20|0),($21|0))|0); + $32 = tempRet0; + $33 = ((($output)) + 8|0); + $34 = $33; $35 = $34; - HEAP32[$35>>2] = $32; + HEAP32[$35>>2] = $31; $36 = (($34) + 4)|0; $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($output) + 16|0); + HEAP32[$37>>2] = $32; + $38 = $22; $39 = $38; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (($39) + 4)|0; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($in) + 16|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_i64Add(($48|0),($51|0),($41|0),($44|0))|0); - $53 = tempRet0; - $54 = $38; - $55 = $54; - HEAP32[$55>>2] = $52; - $56 = (($54) + 4)|0; + $40 = HEAP32[$39>>2]|0; + $41 = (($38) + 4)|0; + $42 = $41; + $43 = HEAP32[$42>>2]|0; + $44 = (_bitshift64Ashr(0,($40|0),32)|0); + $45 = tempRet0; + $46 = (___muldi3(($44|0),($45|0),($44|0),($45|0))|0); + $47 = tempRet0; + $48 = $in; + $49 = $48; + $50 = HEAP32[$49>>2]|0; + $51 = (($48) + 4)|0; + $52 = $51; + $53 = HEAP32[$52>>2]|0; + $54 = (_bitshift64Ashr(0,($50|0),32)|0); + $55 = tempRet0; + $56 = ((($in)) + 16|0); $57 = $56; - HEAP32[$57>>2] = $53; - $58 = (($output) + 24|0); - $59 = $58; - $60 = $59; - $61 = HEAP32[$60>>2]|0; - $62 = (($59) + 4)|0; - $63 = $62; - $64 = HEAP32[$63>>2]|0; - $65 = (($in) + 24|0); - $66 = $65; - $67 = $66; - $68 = HEAP32[$67>>2]|0; - $69 = (($66) + 4)|0; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (_i64Add(($68|0),($71|0),($61|0),($64|0))|0); - $73 = tempRet0; - $74 = $58; + $58 = $57; + $59 = HEAP32[$58>>2]|0; + $60 = (($57) + 4)|0; + $61 = $60; + $62 = HEAP32[$61>>2]|0; + $63 = (_bitshift64Ashr(0,($59|0),32)|0); + $64 = tempRet0; + $65 = (___muldi3(($63|0),($64|0),($54|0),($55|0))|0); + $66 = tempRet0; + $67 = (_i64Add(($65|0),($66|0),($46|0),($47|0))|0); + $68 = tempRet0; + $69 = (_bitshift64Shl(($67|0),($68|0),1)|0); + $70 = tempRet0; + $71 = ((($output)) + 16|0); + $72 = $71; + $73 = $72; + HEAP32[$73>>2] = $69; + $74 = (($72) + 4)|0; $75 = $74; - HEAP32[$75>>2] = $72; - $76 = (($74) + 4)|0; + HEAP32[$75>>2] = $70; + $76 = $22; $77 = $76; - HEAP32[$77>>2] = $73; - $78 = (($output) + 32|0); - $79 = $78; + $78 = HEAP32[$77>>2]|0; + $79 = (($76) + 4)|0; $80 = $79; $81 = HEAP32[$80>>2]|0; - $82 = (($79) + 4)|0; - $83 = $82; - $84 = HEAP32[$83>>2]|0; - $85 = (($in) + 32|0); - $86 = $85; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (($86) + 4)|0; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (_i64Add(($88|0),($91|0),($81|0),($84|0))|0); - $93 = tempRet0; - $94 = $78; + $82 = (_bitshift64Ashr(0,($78|0),32)|0); + $83 = tempRet0; + $84 = $56; + $85 = $84; + $86 = HEAP32[$85>>2]|0; + $87 = (($84) + 4)|0; + $88 = $87; + $89 = HEAP32[$88>>2]|0; + $90 = (_bitshift64Ashr(0,($86|0),32)|0); + $91 = tempRet0; + $92 = (___muldi3(($90|0),($91|0),($82|0),($83|0))|0); + $93 = tempRet0; + $94 = $in; $95 = $94; - HEAP32[$95>>2] = $92; - $96 = (($94) + 4)|0; - $97 = $96; - HEAP32[$97>>2] = $93; - $98 = (($output) + 40|0); - $99 = $98; - $100 = $99; - $101 = HEAP32[$100>>2]|0; - $102 = (($99) + 4)|0; + $96 = HEAP32[$95>>2]|0; + $97 = (($94) + 4)|0; + $98 = $97; + $99 = HEAP32[$98>>2]|0; + $100 = (_bitshift64Ashr(0,($96|0),32)|0); + $101 = tempRet0; + $102 = ((($in)) + 24|0); $103 = $102; - $104 = HEAP32[$103>>2]|0; - $105 = (($in) + 40|0); - $106 = $105; + $104 = $103; + $105 = HEAP32[$104>>2]|0; + $106 = (($103) + 4)|0; $107 = $106; $108 = HEAP32[$107>>2]|0; - $109 = (($106) + 4)|0; - $110 = $109; - $111 = HEAP32[$110>>2]|0; - $112 = (_i64Add(($108|0),($111|0),($101|0),($104|0))|0); - $113 = tempRet0; - $114 = $98; - $115 = $114; - HEAP32[$115>>2] = $112; - $116 = (($114) + 4)|0; - $117 = $116; - HEAP32[$117>>2] = $113; - $118 = (($output) + 48|0); + $109 = (_bitshift64Ashr(0,($105|0),32)|0); + $110 = tempRet0; + $111 = (___muldi3(($109|0),($110|0),($100|0),($101|0))|0); + $112 = tempRet0; + $113 = (_i64Add(($111|0),($112|0),($92|0),($93|0))|0); + $114 = tempRet0; + $115 = (_bitshift64Shl(($113|0),($114|0),1)|0); + $116 = tempRet0; + $117 = ((($output)) + 24|0); + $118 = $117; $119 = $118; - $120 = $119; - $121 = HEAP32[$120>>2]|0; - $122 = (($119) + 4)|0; + HEAP32[$119>>2] = $115; + $120 = (($118) + 4)|0; + $121 = $120; + HEAP32[$121>>2] = $116; + $122 = $56; $123 = $122; $124 = HEAP32[$123>>2]|0; - $125 = (($in) + 48|0); + $125 = (($122) + 4)|0; $126 = $125; - $127 = $126; - $128 = HEAP32[$127>>2]|0; - $129 = (($126) + 4)|0; - $130 = $129; - $131 = HEAP32[$130>>2]|0; - $132 = (_i64Add(($128|0),($131|0),($121|0),($124|0))|0); - $133 = tempRet0; - $134 = $118; - $135 = $134; - HEAP32[$135>>2] = $132; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $133; - $138 = (($output) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = (($in) + 56|0); - $146 = $145; - $147 = $146; - $148 = HEAP32[$147>>2]|0; - $149 = (($146) + 4)|0; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (_i64Add(($148|0),($151|0),($141|0),($144|0))|0); - $153 = tempRet0; - $154 = $138; - $155 = $154; - HEAP32[$155>>2] = $152; - $156 = (($154) + 4)|0; - $157 = $156; - HEAP32[$157>>2] = $153; - $158 = (($output) + 64|0); - $159 = $158; - $160 = $159; - $161 = HEAP32[$160>>2]|0; - $162 = (($159) + 4)|0; - $163 = $162; - $164 = HEAP32[$163>>2]|0; - $165 = (($in) + 64|0); - $166 = $165; - $167 = $166; - $168 = HEAP32[$167>>2]|0; - $169 = (($166) + 4)|0; - $170 = $169; - $171 = HEAP32[$170>>2]|0; - $172 = (_i64Add(($168|0),($171|0),($161|0),($164|0))|0); - $173 = tempRet0; - $174 = $158; + $127 = HEAP32[$126>>2]|0; + $128 = (_bitshift64Ashr(0,($124|0),32)|0); + $129 = tempRet0; + $130 = (___muldi3(($128|0),($129|0),($128|0),($129|0))|0); + $131 = tempRet0; + $132 = $22; + $133 = $132; + $134 = HEAP32[$133>>2]|0; + $135 = (($132) + 4)|0; + $136 = $135; + $137 = HEAP32[$136>>2]|0; + $138 = (_bitshift64Ashr(0,($134|0),30)|0); + $139 = tempRet0; + $140 = $102; + $141 = $140; + $142 = HEAP32[$141>>2]|0; + $143 = (($140) + 4)|0; + $144 = $143; + $145 = HEAP32[$144>>2]|0; + $146 = (_bitshift64Ashr(0,($142|0),32)|0); + $147 = tempRet0; + $148 = (___muldi3(($146|0),($147|0),($138|0),($139|0))|0); + $149 = tempRet0; + $150 = (_i64Add(($148|0),($149|0),($130|0),($131|0))|0); + $151 = tempRet0; + $152 = $in; + $153 = $152; + $154 = HEAP32[$153>>2]|0; + $155 = (($152) + 4)|0; + $156 = $155; + $157 = HEAP32[$156>>2]|0; + $158 = (_bitshift64Ashr(0,($154|0),31)|0); + $159 = tempRet0; + $160 = ((($in)) + 32|0); + $161 = $160; + $162 = $161; + $163 = HEAP32[$162>>2]|0; + $164 = (($161) + 4)|0; + $165 = $164; + $166 = HEAP32[$165>>2]|0; + $167 = (_bitshift64Ashr(0,($163|0),32)|0); + $168 = tempRet0; + $169 = (___muldi3(($167|0),($168|0),($158|0),($159|0))|0); + $170 = tempRet0; + $171 = (_i64Add(($150|0),($151|0),($169|0),($170|0))|0); + $172 = tempRet0; + $173 = ((($output)) + 32|0); + $174 = $173; $175 = $174; - HEAP32[$175>>2] = $172; + HEAP32[$175>>2] = $171; $176 = (($174) + 4)|0; $177 = $176; - HEAP32[$177>>2] = $173; - $178 = (($output) + 72|0); + HEAP32[$177>>2] = $172; + $178 = $56; $179 = $178; - $180 = $179; - $181 = HEAP32[$180>>2]|0; - $182 = (($179) + 4)|0; - $183 = $182; - $184 = HEAP32[$183>>2]|0; - $185 = (($in) + 72|0); - $186 = $185; + $180 = HEAP32[$179>>2]|0; + $181 = (($178) + 4)|0; + $182 = $181; + $183 = HEAP32[$182>>2]|0; + $184 = (_bitshift64Ashr(0,($180|0),32)|0); + $185 = tempRet0; + $186 = $102; $187 = $186; $188 = HEAP32[$187>>2]|0; $189 = (($186) + 4)|0; $190 = $189; $191 = HEAP32[$190>>2]|0; - $192 = (_i64Add(($188|0),($191|0),($181|0),($184|0))|0); + $192 = (_bitshift64Ashr(0,($188|0),32)|0); $193 = tempRet0; - $194 = $178; - $195 = $194; - HEAP32[$195>>2] = $192; - $196 = (($194) + 4)|0; - $197 = $196; - HEAP32[$197>>2] = $193; - STACKTOP = sp;return; -} -function _fdifference($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = $output; - $7 = $6; - $8 = HEAP32[$7>>2]|0; - $9 = (($6) + 4)|0; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (_i64Subtract(($2|0),($5|0),($8|0),($11|0))|0); - $13 = tempRet0; - $14 = $output; - $15 = $14; - HEAP32[$15>>2] = $12; - $16 = (($14) + 4)|0; - $17 = $16; - HEAP32[$17>>2] = $13; - $18 = (($in) + 8|0); - $19 = $18; - $20 = $19; - $21 = HEAP32[$20>>2]|0; - $22 = (($19) + 4)|0; - $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($output) + 8|0); - $26 = $25; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (($26) + 4)|0; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (_i64Subtract(($21|0),($24|0),($28|0),($31|0))|0); - $33 = tempRet0; - $34 = $25; - $35 = $34; - HEAP32[$35>>2] = $32; - $36 = (($34) + 4)|0; - $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($in) + 16|0); - $39 = $38; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (($39) + 4)|0; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($output) + 16|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_i64Subtract(($41|0),($44|0),($48|0),($51|0))|0); - $53 = tempRet0; - $54 = $45; - $55 = $54; - HEAP32[$55>>2] = $52; - $56 = (($54) + 4)|0; - $57 = $56; - HEAP32[$57>>2] = $53; - $58 = (($in) + 24|0); - $59 = $58; - $60 = $59; - $61 = HEAP32[$60>>2]|0; - $62 = (($59) + 4)|0; - $63 = $62; - $64 = HEAP32[$63>>2]|0; - $65 = (($output) + 24|0); - $66 = $65; - $67 = $66; - $68 = HEAP32[$67>>2]|0; - $69 = (($66) + 4)|0; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (_i64Subtract(($61|0),($64|0),($68|0),($71|0))|0); - $73 = tempRet0; - $74 = $65; - $75 = $74; - HEAP32[$75>>2] = $72; - $76 = (($74) + 4)|0; - $77 = $76; - HEAP32[$77>>2] = $73; - $78 = (($in) + 32|0); - $79 = $78; - $80 = $79; - $81 = HEAP32[$80>>2]|0; - $82 = (($79) + 4)|0; - $83 = $82; - $84 = HEAP32[$83>>2]|0; - $85 = (($output) + 32|0); - $86 = $85; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (($86) + 4)|0; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (_i64Subtract(($81|0),($84|0),($88|0),($91|0))|0); - $93 = tempRet0; - $94 = $85; - $95 = $94; - HEAP32[$95>>2] = $92; - $96 = (($94) + 4)|0; - $97 = $96; - HEAP32[$97>>2] = $93; - $98 = (($in) + 40|0); - $99 = $98; - $100 = $99; - $101 = HEAP32[$100>>2]|0; - $102 = (($99) + 4)|0; - $103 = $102; - $104 = HEAP32[$103>>2]|0; - $105 = (($output) + 40|0); - $106 = $105; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (($106) + 4)|0; - $110 = $109; - $111 = HEAP32[$110>>2]|0; - $112 = (_i64Subtract(($101|0),($104|0),($108|0),($111|0))|0); - $113 = tempRet0; - $114 = $105; - $115 = $114; - HEAP32[$115>>2] = $112; - $116 = (($114) + 4)|0; - $117 = $116; - HEAP32[$117>>2] = $113; - $118 = (($in) + 48|0); - $119 = $118; - $120 = $119; - $121 = HEAP32[$120>>2]|0; - $122 = (($119) + 4)|0; - $123 = $122; - $124 = HEAP32[$123>>2]|0; - $125 = (($output) + 48|0); - $126 = $125; - $127 = $126; - $128 = HEAP32[$127>>2]|0; - $129 = (($126) + 4)|0; - $130 = $129; - $131 = HEAP32[$130>>2]|0; - $132 = (_i64Subtract(($121|0),($124|0),($128|0),($131|0))|0); - $133 = tempRet0; - $134 = $125; - $135 = $134; - HEAP32[$135>>2] = $132; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $133; - $138 = (($in) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = (($output) + 56|0); - $146 = $145; - $147 = $146; - $148 = HEAP32[$147>>2]|0; - $149 = (($146) + 4)|0; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (_i64Subtract(($141|0),($144|0),($148|0),($151|0))|0); - $153 = tempRet0; - $154 = $145; - $155 = $154; - HEAP32[$155>>2] = $152; - $156 = (($154) + 4)|0; - $157 = $156; - HEAP32[$157>>2] = $153; - $158 = (($in) + 64|0); - $159 = $158; - $160 = $159; - $161 = HEAP32[$160>>2]|0; - $162 = (($159) + 4)|0; - $163 = $162; - $164 = HEAP32[$163>>2]|0; - $165 = (($output) + 64|0); - $166 = $165; - $167 = $166; - $168 = HEAP32[$167>>2]|0; - $169 = (($166) + 4)|0; - $170 = $169; - $171 = HEAP32[$170>>2]|0; - $172 = (_i64Subtract(($161|0),($164|0),($168|0),($171|0))|0); - $173 = tempRet0; - $174 = $165; - $175 = $174; - HEAP32[$175>>2] = $172; - $176 = (($174) + 4)|0; - $177 = $176; - HEAP32[$177>>2] = $173; - $178 = (($in) + 72|0); - $179 = $178; - $180 = $179; - $181 = HEAP32[$180>>2]|0; - $182 = (($179) + 4)|0; - $183 = $182; - $184 = HEAP32[$183>>2]|0; - $185 = (($output) + 72|0); - $186 = $185; - $187 = $186; - $188 = HEAP32[$187>>2]|0; - $189 = (($186) + 4)|0; - $190 = $189; - $191 = HEAP32[$190>>2]|0; - $192 = (_i64Subtract(($181|0),($184|0),($188|0),($191|0))|0); - $193 = tempRet0; - $194 = $185; - $195 = $194; - HEAP32[$195>>2] = $192; - $196 = (($194) + 4)|0; - $197 = $196; - HEAP32[$197>>2] = $193; - STACKTOP = sp;return; -} -function _fscalar_product($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = (___muldi3(($2|0),($5|0),121665,0)|0); - $7 = tempRet0; - $8 = $output; - $9 = $8; - HEAP32[$9>>2] = $6; - $10 = (($8) + 4)|0; - $11 = $10; - HEAP32[$11>>2] = $7; - $12 = (($in) + 8|0); - $13 = $12; - $14 = $13; - $15 = HEAP32[$14>>2]|0; - $16 = (($13) + 4)|0; - $17 = $16; - $18 = HEAP32[$17>>2]|0; - $19 = (___muldi3(($15|0),($18|0),121665,0)|0); - $20 = tempRet0; - $21 = (($output) + 8|0); - $22 = $21; - $23 = $22; - HEAP32[$23>>2] = $19; - $24 = (($22) + 4)|0; - $25 = $24; - HEAP32[$25>>2] = $20; - $26 = (($in) + 16|0); - $27 = $26; - $28 = $27; - $29 = HEAP32[$28>>2]|0; - $30 = (($27) + 4)|0; - $31 = $30; - $32 = HEAP32[$31>>2]|0; - $33 = (___muldi3(($29|0),($32|0),121665,0)|0); - $34 = tempRet0; - $35 = (($output) + 16|0); - $36 = $35; - $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($36) + 4)|0; - $39 = $38; - HEAP32[$39>>2] = $34; - $40 = (($in) + 24|0); - $41 = $40; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (($41) + 4)|0; - $45 = $44; - $46 = HEAP32[$45>>2]|0; - $47 = (___muldi3(($43|0),($46|0),121665,0)|0); - $48 = tempRet0; - $49 = (($output) + 24|0); - $50 = $49; - $51 = $50; - HEAP32[$51>>2] = $47; - $52 = (($50) + 4)|0; - $53 = $52; - HEAP32[$53>>2] = $48; - $54 = (($in) + 32|0); - $55 = $54; - $56 = $55; - $57 = HEAP32[$56>>2]|0; - $58 = (($55) + 4)|0; - $59 = $58; - $60 = HEAP32[$59>>2]|0; - $61 = (___muldi3(($57|0),($60|0),121665,0)|0); - $62 = tempRet0; - $63 = (($output) + 32|0); - $64 = $63; - $65 = $64; - HEAP32[$65>>2] = $61; - $66 = (($64) + 4)|0; - $67 = $66; - HEAP32[$67>>2] = $62; - $68 = (($in) + 40|0); - $69 = $68; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (($69) + 4)|0; - $73 = $72; - $74 = HEAP32[$73>>2]|0; - $75 = (___muldi3(($71|0),($74|0),121665,0)|0); - $76 = tempRet0; - $77 = (($output) + 40|0); - $78 = $77; - $79 = $78; - HEAP32[$79>>2] = $75; - $80 = (($78) + 4)|0; - $81 = $80; - HEAP32[$81>>2] = $76; - $82 = (($in) + 48|0); - $83 = $82; - $84 = $83; - $85 = HEAP32[$84>>2]|0; - $86 = (($83) + 4)|0; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (___muldi3(($85|0),($88|0),121665,0)|0); - $90 = tempRet0; - $91 = (($output) + 48|0); - $92 = $91; - $93 = $92; - HEAP32[$93>>2] = $89; - $94 = (($92) + 4)|0; - $95 = $94; - HEAP32[$95>>2] = $90; - $96 = (($in) + 56|0); - $97 = $96; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (($97) + 4)|0; - $101 = $100; - $102 = HEAP32[$101>>2]|0; - $103 = (___muldi3(($99|0),($102|0),121665,0)|0); - $104 = tempRet0; - $105 = (($output) + 56|0); - $106 = $105; - $107 = $106; - HEAP32[$107>>2] = $103; - $108 = (($106) + 4)|0; - $109 = $108; - HEAP32[$109>>2] = $104; - $110 = (($in) + 64|0); - $111 = $110; - $112 = $111; - $113 = HEAP32[$112>>2]|0; - $114 = (($111) + 4)|0; - $115 = $114; - $116 = HEAP32[$115>>2]|0; - $117 = (___muldi3(($113|0),($116|0),121665,0)|0); - $118 = tempRet0; - $119 = (($output) + 64|0); - $120 = $119; - $121 = $120; - HEAP32[$121>>2] = $117; - $122 = (($120) + 4)|0; - $123 = $122; - HEAP32[$123>>2] = $118; - $124 = (($in) + 72|0); - $125 = $124; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (($125) + 4)|0; - $129 = $128; - $130 = HEAP32[$129>>2]|0; - $131 = (___muldi3(($127|0),($130|0),121665,0)|0); - $132 = tempRet0; - $133 = (($output) + 72|0); - $134 = $133; - $135 = $134; - HEAP32[$135>>2] = $131; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $132; - STACKTOP = sp;return; -} -function _fsquare_inner($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; - var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; - var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; - var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; - var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; - var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; - var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; - var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; - var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; - var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; - var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; - var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; - var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; - var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; - var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; - var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; - var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; - var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; - var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; - var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; - var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; - var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; - var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; - var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; - var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; - var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; - var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; - var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; - var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; - var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; - var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; - var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; - var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; - var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; - var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; - var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; - var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; - var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; - var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; - var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; - var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; - var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; - var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; - var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; - var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; - var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; - var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; - var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; - var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; - var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; - var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; - var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; - var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; - var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; - var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; - var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = (_bitshift64Ashr(0,($2|0),32)|0); - $7 = tempRet0; - $8 = (___muldi3(($6|0),($7|0),($6|0),($7|0))|0); - $9 = tempRet0; - $10 = $output; - $11 = $10; - HEAP32[$11>>2] = $8; - $12 = (($10) + 4)|0; - $13 = $12; - HEAP32[$13>>2] = $9; - $14 = $in; - $15 = $14; - $16 = HEAP32[$15>>2]|0; - $17 = (($14) + 4)|0; - $18 = $17; - $19 = HEAP32[$18>>2]|0; - $20 = (_bitshift64Ashr(0,($16|0),31)|0); - $21 = tempRet0; - $22 = (($in) + 8|0); - $23 = $22; - $24 = $23; - $25 = HEAP32[$24>>2]|0; - $26 = (($23) + 4)|0; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (_bitshift64Ashr(0,($25|0),32)|0); - $30 = tempRet0; - $31 = (___muldi3(($29|0),($30|0),($20|0),($21|0))|0); - $32 = tempRet0; - $33 = (($output) + 8|0); - $34 = $33; - $35 = $34; - HEAP32[$35>>2] = $31; - $36 = (($34) + 4)|0; - $37 = $36; - HEAP32[$37>>2] = $32; - $38 = $22; - $39 = $38; - $40 = HEAP32[$39>>2]|0; - $41 = (($38) + 4)|0; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (_bitshift64Ashr(0,($40|0),32)|0); - $45 = tempRet0; - $46 = (___muldi3(($44|0),($45|0),($44|0),($45|0))|0); - $47 = tempRet0; - $48 = $in; - $49 = $48; - $50 = HEAP32[$49>>2]|0; - $51 = (($48) + 4)|0; - $52 = $51; - $53 = HEAP32[$52>>2]|0; - $54 = (_bitshift64Ashr(0,($50|0),32)|0); - $55 = tempRet0; - $56 = (($in) + 16|0); - $57 = $56; - $58 = $57; - $59 = HEAP32[$58>>2]|0; - $60 = (($57) + 4)|0; - $61 = $60; - $62 = HEAP32[$61>>2]|0; - $63 = (_bitshift64Ashr(0,($59|0),32)|0); - $64 = tempRet0; - $65 = (___muldi3(($63|0),($64|0),($54|0),($55|0))|0); - $66 = tempRet0; - $67 = (_i64Add(($65|0),($66|0),($46|0),($47|0))|0); - $68 = tempRet0; - $69 = (_bitshift64Shl(($67|0),($68|0),1)|0); - $70 = tempRet0; - $71 = (($output) + 16|0); - $72 = $71; - $73 = $72; - HEAP32[$73>>2] = $69; - $74 = (($72) + 4)|0; - $75 = $74; - HEAP32[$75>>2] = $70; - $76 = $22; - $77 = $76; - $78 = HEAP32[$77>>2]|0; - $79 = (($76) + 4)|0; - $80 = $79; - $81 = HEAP32[$80>>2]|0; - $82 = (_bitshift64Ashr(0,($78|0),32)|0); - $83 = tempRet0; - $84 = $56; - $85 = $84; - $86 = HEAP32[$85>>2]|0; - $87 = (($84) + 4)|0; - $88 = $87; - $89 = HEAP32[$88>>2]|0; - $90 = (_bitshift64Ashr(0,($86|0),32)|0); - $91 = tempRet0; - $92 = (___muldi3(($90|0),($91|0),($82|0),($83|0))|0); - $93 = tempRet0; - $94 = $in; - $95 = $94; - $96 = HEAP32[$95>>2]|0; - $97 = (($94) + 4)|0; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (_bitshift64Ashr(0,($96|0),32)|0); - $101 = tempRet0; - $102 = (($in) + 24|0); - $103 = $102; - $104 = $103; - $105 = HEAP32[$104>>2]|0; - $106 = (($103) + 4)|0; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (_bitshift64Ashr(0,($105|0),32)|0); - $110 = tempRet0; - $111 = (___muldi3(($109|0),($110|0),($100|0),($101|0))|0); - $112 = tempRet0; - $113 = (_i64Add(($111|0),($112|0),($92|0),($93|0))|0); - $114 = tempRet0; - $115 = (_bitshift64Shl(($113|0),($114|0),1)|0); - $116 = tempRet0; - $117 = (($output) + 24|0); - $118 = $117; - $119 = $118; - HEAP32[$119>>2] = $115; - $120 = (($118) + 4)|0; - $121 = $120; - HEAP32[$121>>2] = $116; - $122 = $56; - $123 = $122; - $124 = HEAP32[$123>>2]|0; - $125 = (($122) + 4)|0; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (_bitshift64Ashr(0,($124|0),32)|0); - $129 = tempRet0; - $130 = (___muldi3(($128|0),($129|0),($128|0),($129|0))|0); - $131 = tempRet0; - $132 = $22; - $133 = $132; - $134 = HEAP32[$133>>2]|0; - $135 = (($132) + 4)|0; - $136 = $135; - $137 = HEAP32[$136>>2]|0; - $138 = (_bitshift64Ashr(0,($134|0),30)|0); - $139 = tempRet0; - $140 = $102; - $141 = $140; - $142 = HEAP32[$141>>2]|0; - $143 = (($140) + 4)|0; - $144 = $143; - $145 = HEAP32[$144>>2]|0; - $146 = (_bitshift64Ashr(0,($142|0),32)|0); - $147 = tempRet0; - $148 = (___muldi3(($146|0),($147|0),($138|0),($139|0))|0); - $149 = tempRet0; - $150 = (_i64Add(($148|0),($149|0),($130|0),($131|0))|0); - $151 = tempRet0; - $152 = $in; - $153 = $152; - $154 = HEAP32[$153>>2]|0; - $155 = (($152) + 4)|0; - $156 = $155; - $157 = HEAP32[$156>>2]|0; - $158 = (_bitshift64Ashr(0,($154|0),31)|0); - $159 = tempRet0; - $160 = (($in) + 32|0); - $161 = $160; - $162 = $161; - $163 = HEAP32[$162>>2]|0; - $164 = (($161) + 4)|0; - $165 = $164; - $166 = HEAP32[$165>>2]|0; - $167 = (_bitshift64Ashr(0,($163|0),32)|0); - $168 = tempRet0; - $169 = (___muldi3(($167|0),($168|0),($158|0),($159|0))|0); - $170 = tempRet0; - $171 = (_i64Add(($150|0),($151|0),($169|0),($170|0))|0); - $172 = tempRet0; - $173 = (($output) + 32|0); - $174 = $173; - $175 = $174; - HEAP32[$175>>2] = $171; - $176 = (($174) + 4)|0; - $177 = $176; - HEAP32[$177>>2] = $172; - $178 = $56; - $179 = $178; - $180 = HEAP32[$179>>2]|0; - $181 = (($178) + 4)|0; - $182 = $181; - $183 = HEAP32[$182>>2]|0; - $184 = (_bitshift64Ashr(0,($180|0),32)|0); - $185 = tempRet0; - $186 = $102; - $187 = $186; - $188 = HEAP32[$187>>2]|0; - $189 = (($186) + 4)|0; - $190 = $189; - $191 = HEAP32[$190>>2]|0; - $192 = (_bitshift64Ashr(0,($188|0),32)|0); - $193 = tempRet0; - $194 = (___muldi3(($192|0),($193|0),($184|0),($185|0))|0); - $195 = tempRet0; - $196 = $22; + $194 = (___muldi3(($192|0),($193|0),($184|0),($185|0))|0); + $195 = tempRet0; + $196 = $22; $197 = $196; $198 = HEAP32[$197>>2]|0; $199 = (($196) + 4)|0; @@ -10391,7 +10415,7 @@ function _fsquare_inner($output,$in) { $221 = HEAP32[$220>>2]|0; $222 = (_bitshift64Ashr(0,($218|0),32)|0); $223 = tempRet0; - $224 = (($in) + 40|0); + $224 = ((($in)) + 40|0); $225 = $224; $226 = $225; $227 = HEAP32[$226>>2]|0; @@ -10406,7 +10430,7 @@ function _fsquare_inner($output,$in) { $236 = tempRet0; $237 = (_bitshift64Shl(($235|0),($236|0),1)|0); $238 = tempRet0; - $239 = (($output) + 40|0); + $239 = ((($output)) + 40|0); $240 = $239; $241 = $240; HEAP32[$241>>2] = $237; @@ -10451,7 +10475,7 @@ function _fsquare_inner($output,$in) { $279 = HEAP32[$278>>2]|0; $280 = (_bitshift64Ashr(0,($276|0),32)|0); $281 = tempRet0; - $282 = (($in) + 48|0); + $282 = ((($in)) + 48|0); $283 = $282; $284 = $283; $285 = HEAP32[$284>>2]|0; @@ -10486,7 +10510,7 @@ function _fsquare_inner($output,$in) { $314 = tempRet0; $315 = (_bitshift64Shl(($313|0),($314|0),1)|0); $316 = tempRet0; - $317 = (($output) + 48|0); + $317 = ((($output)) + 48|0); $318 = $317; $319 = $318; HEAP32[$319>>2] = $315; @@ -10559,7 +10583,7 @@ function _fsquare_inner($output,$in) { $385 = HEAP32[$384>>2]|0; $386 = (_bitshift64Ashr(0,($382|0),32)|0); $387 = tempRet0; - $388 = (($in) + 56|0); + $388 = ((($in)) + 56|0); $389 = $388; $390 = $389; $391 = HEAP32[$390>>2]|0; @@ -10574,7 +10598,7 @@ function _fsquare_inner($output,$in) { $400 = tempRet0; $401 = (_bitshift64Shl(($399|0),($400|0),1)|0); $402 = tempRet0; - $403 = (($output) + 56|0); + $403 = ((($output)) + 56|0); $404 = $403; $405 = $404; HEAP32[$405>>2] = $401; @@ -10617,7 +10641,7 @@ function _fsquare_inner($output,$in) { $441 = HEAP32[$440>>2]|0; $442 = (_bitshift64Ashr(0,($438|0),32)|0); $443 = tempRet0; - $444 = (($in) + 64|0); + $444 = ((($in)) + 64|0); $445 = $444; $446 = $445; $447 = HEAP32[$446>>2]|0; @@ -10676,7 +10700,7 @@ function _fsquare_inner($output,$in) { $500 = tempRet0; $501 = (_i64Add(($499|0),($500|0),($416|0),($417|0))|0); $502 = tempRet0; - $503 = (($output) + 64|0); + $503 = ((($output)) + 64|0); $504 = $503; $505 = $504; HEAP32[$505>>2] = $501; @@ -10769,7 +10793,7 @@ function _fsquare_inner($output,$in) { $591 = HEAP32[$590>>2]|0; $592 = (_bitshift64Ashr(0,($588|0),32)|0); $593 = tempRet0; - $594 = (($in) + 72|0); + $594 = ((($in)) + 72|0); $595 = $594; $596 = $595; $597 = HEAP32[$596>>2]|0; @@ -10784,7 +10808,7 @@ function _fsquare_inner($output,$in) { $606 = tempRet0; $607 = (_bitshift64Shl(($605|0),($606|0),1)|0); $608 = tempRet0; - $609 = (($output) + 72|0); + $609 = ((($output)) + 72|0); $610 = $609; $611 = $610; HEAP32[$611>>2] = $607; @@ -10885,7 +10909,7 @@ function _fsquare_inner($output,$in) { $705 = tempRet0; $706 = (_bitshift64Shl(($704|0),($705|0),1)|0); $707 = tempRet0; - $708 = (($output) + 80|0); + $708 = ((($output)) + 80|0); $709 = $708; $710 = $709; HEAP32[$710>>2] = $706; @@ -10972,7 +10996,7 @@ function _fsquare_inner($output,$in) { $790 = tempRet0; $791 = (_bitshift64Shl(($789|0),($790|0),1)|0); $792 = tempRet0; - $793 = (($output) + 88|0); + $793 = ((($output)) + 88|0); $794 = $793; $795 = $794; HEAP32[$795>>2] = $791; @@ -11053,7 +11077,7 @@ function _fsquare_inner($output,$in) { $869 = tempRet0; $870 = (_i64Add(($868|0),($869|0),($806|0),($807|0))|0); $871 = tempRet0; - $872 = (($output) + 96|0); + $872 = ((($output)) + 96|0); $873 = $872; $874 = $873; HEAP32[$874>>2] = $870; @@ -11120,7 +11144,7 @@ function _fsquare_inner($output,$in) { $934 = tempRet0; $935 = (_bitshift64Shl(($933|0),($934|0),1)|0); $936 = tempRet0; - $937 = (($output) + 104|0); + $937 = ((($output)) + 104|0); $938 = $937; $939 = $938; HEAP32[$939>>2] = $935; @@ -11179,7 +11203,7 @@ function _fsquare_inner($output,$in) { $991 = tempRet0; $992 = (_bitshift64Shl(($990|0),($991|0),1)|0); $993 = tempRet0; - $994 = (($output) + 112|0); + $994 = ((($output)) + 112|0); $995 = $994; $996 = $995; HEAP32[$996>>2] = $992; @@ -11226,7 +11250,7 @@ function _fsquare_inner($output,$in) { $1036 = tempRet0; $1037 = (_bitshift64Shl(($1035|0),($1036|0),1)|0); $1038 = tempRet0; - $1039 = (($output) + 120|0); + $1039 = ((($output)) + 120|0); $1040 = $1039; $1041 = $1040; HEAP32[$1041>>2] = $1037; @@ -11263,7 +11287,7 @@ function _fsquare_inner($output,$in) { $1071 = tempRet0; $1072 = (_i64Add(($1070|0),($1071|0),($1052|0),($1053|0))|0); $1073 = tempRet0; - $1074 = (($output) + 128|0); + $1074 = ((($output)) + 128|0); $1075 = $1074; $1076 = $1075; HEAP32[$1076>>2] = $1072; @@ -11288,7 +11312,7 @@ function _fsquare_inner($output,$in) { $1094 = tempRet0; $1095 = (___muldi3(($1093|0),($1094|0),($1085|0),($1086|0))|0); $1096 = tempRet0; - $1097 = (($output) + 136|0); + $1097 = ((($output)) + 136|0); $1098 = $1097; $1099 = $1098; HEAP32[$1099>>2] = $1095; @@ -11307,58 +11331,796 @@ function _fsquare_inner($output,$in) { $1111 = tempRet0; $1112 = (___muldi3(($1110|0),($1111|0),($1108|0),($1109|0))|0); $1113 = tempRet0; - $1114 = (($output) + 144|0); + $1114 = ((($output)) + 144|0); $1115 = $1114; $1116 = $1115; HEAP32[$1116>>2] = $1112; $1117 = (($1115) + 4)|0; $1118 = $1117; HEAP32[$1118>>2] = $1113; + return; +} +function _swap_conditional($a,$b,$0,$1) { + $a = $a|0; + $b = $b|0; + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, $exitcond = 0, $i$02 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_i64Subtract(0,0,($0|0),($1|0))|0); + $3 = tempRet0; + $i$02 = 0; + while(1) { + $4 = (($a) + ($i$02<<3)|0); + $5 = $4; + $6 = $5; + $7 = HEAP32[$6>>2]|0; + $8 = (($5) + 4)|0; + $9 = $8; + $10 = HEAP32[$9>>2]|0; + $11 = (($b) + ($i$02<<3)|0); + $12 = $11; + $13 = $12; + $14 = HEAP32[$13>>2]|0; + $15 = (($12) + 4)|0; + $16 = $15; + $17 = HEAP32[$16>>2]|0; + $18 = $14 ^ $7; + $19 = $17 ^ $10; + $20 = $18 & $2; + $21 = $19 & $3; + $22 = $20 ^ $7; + $21 ^ $10; + $23 = (_bitshift64Ashr(0,($22|0),32)|0); + $24 = tempRet0; + $25 = $4; + $26 = $25; + HEAP32[$26>>2] = $23; + $27 = (($25) + 4)|0; + $28 = $27; + HEAP32[$28>>2] = $24; + $29 = $11; + $30 = $29; + $31 = HEAP32[$30>>2]|0; + $32 = (($29) + 4)|0; + $33 = $32; + $34 = HEAP32[$33>>2]|0; + $35 = $20 ^ $31; + $21 ^ $34; + $36 = (_bitshift64Ashr(0,($35|0),32)|0); + $37 = tempRet0; + $38 = $11; + $39 = $38; + HEAP32[$39>>2] = $36; + $40 = (($38) + 4)|0; + $41 = $40; + HEAP32[$41>>2] = $37; + $42 = (($i$02) + 1)|0; + $exitcond = ($42|0)==(10); + if ($exitcond) { + break; + } else { + $i$02 = $42; + } + } + return; +} +function _fmonty($x2,$z2,$x3,$z3,$x,$z,$xprime,$zprime,$qmqp) { + $x2 = $x2|0; + $z2 = $z2|0; + $x3 = $x3|0; + $z3 = $z3|0; + $x = $x|0; + $z = $z|0; + $xprime = $xprime|0; + $zprime = $zprime|0; + $qmqp = $qmqp|0; + var $0 = 0, $origx = 0, $origxprime = 0, $xx = 0, $xxprime = 0, $xxxprime = 0, $zz = 0, $zzprime = 0, $zzz = 0, $zzzprime = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1232|0; + $origx = sp + 1144|0; + $origxprime = sp + 1064|0; + $zzz = sp + 912|0; + $xx = sp + 760|0; + $zz = sp + 608|0; + $xxprime = sp + 456|0; + $zzprime = sp + 304|0; + $zzzprime = sp + 152|0; + $xxxprime = sp; + dest=$origx; src=$x; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsum($x,$z); + _fdifference($z,$origx); + dest=$origxprime; src=$xprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsum($xprime,$zprime); + _fdifference($zprime,$origxprime); + _fproduct($xxprime,$xprime,$z); + _fproduct($zzprime,$x,$zprime); + _freduce_degree($xxprime); + _freduce_coefficients($xxprime); + _freduce_degree($zzprime); + _freduce_coefficients($zzprime); + dest=$origxprime; src=$xxprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsum($xxprime,$zzprime); + _fdifference($zzprime,$origxprime); + _fsquare($xxxprime,$xxprime); + _fsquare($zzzprime,$zzprime); + _fproduct($zzprime,$zzzprime,$qmqp); + _freduce_degree($zzprime); + _freduce_coefficients($zzprime); + dest=$x3; src=$xxxprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$z3; src=$zzprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsquare($xx,$x); + _fsquare($zz,$z); + _fproduct($x2,$xx,$zz); + _freduce_degree($x2); + _freduce_coefficients($x2); + _fdifference($zz,$xx); + $0 = ((($zzz)) + 80|0); + dest=$0; stop=dest+72|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + _fscalar_product($zzz,$zz); + _freduce_coefficients($zzz); + _fsum($zzz,$xx); + _fproduct($z2,$zz,$zzz); + _freduce_degree($z2); + _freduce_coefficients($z2); STACKTOP = sp;return; } -function _div_by_2_26($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; +function _fsum($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $output; + $1 = $0; + $2 = HEAP32[$1>>2]|0; + $3 = (($0) + 4)|0; + $4 = $3; + $5 = HEAP32[$4>>2]|0; + $6 = $in; + $7 = $6; + $8 = HEAP32[$7>>2]|0; + $9 = (($6) + 4)|0; + $10 = $9; + $11 = HEAP32[$10>>2]|0; + $12 = (_i64Add(($8|0),($11|0),($2|0),($5|0))|0); + $13 = tempRet0; + $14 = $output; + $15 = $14; + HEAP32[$15>>2] = $12; + $16 = (($14) + 4)|0; + $17 = $16; + HEAP32[$17>>2] = $13; + $18 = ((($output)) + 8|0); + $19 = $18; + $20 = $19; + $21 = HEAP32[$20>>2]|0; + $22 = (($19) + 4)|0; + $23 = $22; + $24 = HEAP32[$23>>2]|0; + $25 = ((($in)) + 8|0); + $26 = $25; + $27 = $26; + $28 = HEAP32[$27>>2]|0; + $29 = (($26) + 4)|0; + $30 = $29; + $31 = HEAP32[$30>>2]|0; + $32 = (_i64Add(($28|0),($31|0),($21|0),($24|0))|0); + $33 = tempRet0; + $34 = $18; + $35 = $34; + HEAP32[$35>>2] = $32; + $36 = (($34) + 4)|0; + $37 = $36; + HEAP32[$37>>2] = $33; + $38 = ((($output)) + 16|0); + $39 = $38; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = (($39) + 4)|0; + $43 = $42; + $44 = HEAP32[$43>>2]|0; + $45 = ((($in)) + 16|0); + $46 = $45; + $47 = $46; + $48 = HEAP32[$47>>2]|0; + $49 = (($46) + 4)|0; + $50 = $49; + $51 = HEAP32[$50>>2]|0; + $52 = (_i64Add(($48|0),($51|0),($41|0),($44|0))|0); + $53 = tempRet0; + $54 = $38; + $55 = $54; + HEAP32[$55>>2] = $52; + $56 = (($54) + 4)|0; + $57 = $56; + HEAP32[$57>>2] = $53; + $58 = ((($output)) + 24|0); + $59 = $58; + $60 = $59; + $61 = HEAP32[$60>>2]|0; + $62 = (($59) + 4)|0; + $63 = $62; + $64 = HEAP32[$63>>2]|0; + $65 = ((($in)) + 24|0); + $66 = $65; + $67 = $66; + $68 = HEAP32[$67>>2]|0; + $69 = (($66) + 4)|0; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $72 = (_i64Add(($68|0),($71|0),($61|0),($64|0))|0); + $73 = tempRet0; + $74 = $58; + $75 = $74; + HEAP32[$75>>2] = $72; + $76 = (($74) + 4)|0; + $77 = $76; + HEAP32[$77>>2] = $73; + $78 = ((($output)) + 32|0); + $79 = $78; + $80 = $79; + $81 = HEAP32[$80>>2]|0; + $82 = (($79) + 4)|0; + $83 = $82; + $84 = HEAP32[$83>>2]|0; + $85 = ((($in)) + 32|0); + $86 = $85; + $87 = $86; + $88 = HEAP32[$87>>2]|0; + $89 = (($86) + 4)|0; + $90 = $89; + $91 = HEAP32[$90>>2]|0; + $92 = (_i64Add(($88|0),($91|0),($81|0),($84|0))|0); + $93 = tempRet0; + $94 = $78; + $95 = $94; + HEAP32[$95>>2] = $92; + $96 = (($94) + 4)|0; + $97 = $96; + HEAP32[$97>>2] = $93; + $98 = ((($output)) + 40|0); + $99 = $98; + $100 = $99; + $101 = HEAP32[$100>>2]|0; + $102 = (($99) + 4)|0; + $103 = $102; + $104 = HEAP32[$103>>2]|0; + $105 = ((($in)) + 40|0); + $106 = $105; + $107 = $106; + $108 = HEAP32[$107>>2]|0; + $109 = (($106) + 4)|0; + $110 = $109; + $111 = HEAP32[$110>>2]|0; + $112 = (_i64Add(($108|0),($111|0),($101|0),($104|0))|0); + $113 = tempRet0; + $114 = $98; + $115 = $114; + HEAP32[$115>>2] = $112; + $116 = (($114) + 4)|0; + $117 = $116; + HEAP32[$117>>2] = $113; + $118 = ((($output)) + 48|0); + $119 = $118; + $120 = $119; + $121 = HEAP32[$120>>2]|0; + $122 = (($119) + 4)|0; + $123 = $122; + $124 = HEAP32[$123>>2]|0; + $125 = ((($in)) + 48|0); + $126 = $125; + $127 = $126; + $128 = HEAP32[$127>>2]|0; + $129 = (($126) + 4)|0; + $130 = $129; + $131 = HEAP32[$130>>2]|0; + $132 = (_i64Add(($128|0),($131|0),($121|0),($124|0))|0); + $133 = tempRet0; + $134 = $118; + $135 = $134; + HEAP32[$135>>2] = $132; + $136 = (($134) + 4)|0; + $137 = $136; + HEAP32[$137>>2] = $133; + $138 = ((($output)) + 56|0); + $139 = $138; + $140 = $139; + $141 = HEAP32[$140>>2]|0; + $142 = (($139) + 4)|0; + $143 = $142; + $144 = HEAP32[$143>>2]|0; + $145 = ((($in)) + 56|0); + $146 = $145; + $147 = $146; + $148 = HEAP32[$147>>2]|0; + $149 = (($146) + 4)|0; + $150 = $149; + $151 = HEAP32[$150>>2]|0; + $152 = (_i64Add(($148|0),($151|0),($141|0),($144|0))|0); + $153 = tempRet0; + $154 = $138; + $155 = $154; + HEAP32[$155>>2] = $152; + $156 = (($154) + 4)|0; + $157 = $156; + HEAP32[$157>>2] = $153; + $158 = ((($output)) + 64|0); + $159 = $158; + $160 = $159; + $161 = HEAP32[$160>>2]|0; + $162 = (($159) + 4)|0; + $163 = $162; + $164 = HEAP32[$163>>2]|0; + $165 = ((($in)) + 64|0); + $166 = $165; + $167 = $166; + $168 = HEAP32[$167>>2]|0; + $169 = (($166) + 4)|0; + $170 = $169; + $171 = HEAP32[$170>>2]|0; + $172 = (_i64Add(($168|0),($171|0),($161|0),($164|0))|0); + $173 = tempRet0; + $174 = $158; + $175 = $174; + HEAP32[$175>>2] = $172; + $176 = (($174) + 4)|0; + $177 = $176; + HEAP32[$177>>2] = $173; + $178 = ((($output)) + 72|0); + $179 = $178; + $180 = $179; + $181 = HEAP32[$180>>2]|0; + $182 = (($179) + 4)|0; + $183 = $182; + $184 = HEAP32[$183>>2]|0; + $185 = ((($in)) + 72|0); + $186 = $185; + $187 = $186; + $188 = HEAP32[$187>>2]|0; + $189 = (($186) + 4)|0; + $190 = $189; + $191 = HEAP32[$190>>2]|0; + $192 = (_i64Add(($188|0),($191|0),($181|0),($184|0))|0); + $193 = tempRet0; + $194 = $178; + $195 = $194; + HEAP32[$195>>2] = $192; + $196 = (($194) + 4)|0; + $197 = $196; + HEAP32[$197>>2] = $193; + return; +} +function _fdifference($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; - $2 = $1 >> 31; - $3 = $2 >>> 6; - $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); - $5 = tempRet0; - $6 = (_bitshift64Ashr(($4|0),($5|0),26)|0); - $7 = tempRet0; - tempRet0 = $7; - STACKTOP = sp;return ($6|0); + $0 = $in; + $1 = $0; + $2 = HEAP32[$1>>2]|0; + $3 = (($0) + 4)|0; + $4 = $3; + $5 = HEAP32[$4>>2]|0; + $6 = $output; + $7 = $6; + $8 = HEAP32[$7>>2]|0; + $9 = (($6) + 4)|0; + $10 = $9; + $11 = HEAP32[$10>>2]|0; + $12 = (_i64Subtract(($2|0),($5|0),($8|0),($11|0))|0); + $13 = tempRet0; + $14 = $output; + $15 = $14; + HEAP32[$15>>2] = $12; + $16 = (($14) + 4)|0; + $17 = $16; + HEAP32[$17>>2] = $13; + $18 = ((($in)) + 8|0); + $19 = $18; + $20 = $19; + $21 = HEAP32[$20>>2]|0; + $22 = (($19) + 4)|0; + $23 = $22; + $24 = HEAP32[$23>>2]|0; + $25 = ((($output)) + 8|0); + $26 = $25; + $27 = $26; + $28 = HEAP32[$27>>2]|0; + $29 = (($26) + 4)|0; + $30 = $29; + $31 = HEAP32[$30>>2]|0; + $32 = (_i64Subtract(($21|0),($24|0),($28|0),($31|0))|0); + $33 = tempRet0; + $34 = $25; + $35 = $34; + HEAP32[$35>>2] = $32; + $36 = (($34) + 4)|0; + $37 = $36; + HEAP32[$37>>2] = $33; + $38 = ((($in)) + 16|0); + $39 = $38; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = (($39) + 4)|0; + $43 = $42; + $44 = HEAP32[$43>>2]|0; + $45 = ((($output)) + 16|0); + $46 = $45; + $47 = $46; + $48 = HEAP32[$47>>2]|0; + $49 = (($46) + 4)|0; + $50 = $49; + $51 = HEAP32[$50>>2]|0; + $52 = (_i64Subtract(($41|0),($44|0),($48|0),($51|0))|0); + $53 = tempRet0; + $54 = $45; + $55 = $54; + HEAP32[$55>>2] = $52; + $56 = (($54) + 4)|0; + $57 = $56; + HEAP32[$57>>2] = $53; + $58 = ((($in)) + 24|0); + $59 = $58; + $60 = $59; + $61 = HEAP32[$60>>2]|0; + $62 = (($59) + 4)|0; + $63 = $62; + $64 = HEAP32[$63>>2]|0; + $65 = ((($output)) + 24|0); + $66 = $65; + $67 = $66; + $68 = HEAP32[$67>>2]|0; + $69 = (($66) + 4)|0; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $72 = (_i64Subtract(($61|0),($64|0),($68|0),($71|0))|0); + $73 = tempRet0; + $74 = $65; + $75 = $74; + HEAP32[$75>>2] = $72; + $76 = (($74) + 4)|0; + $77 = $76; + HEAP32[$77>>2] = $73; + $78 = ((($in)) + 32|0); + $79 = $78; + $80 = $79; + $81 = HEAP32[$80>>2]|0; + $82 = (($79) + 4)|0; + $83 = $82; + $84 = HEAP32[$83>>2]|0; + $85 = ((($output)) + 32|0); + $86 = $85; + $87 = $86; + $88 = HEAP32[$87>>2]|0; + $89 = (($86) + 4)|0; + $90 = $89; + $91 = HEAP32[$90>>2]|0; + $92 = (_i64Subtract(($81|0),($84|0),($88|0),($91|0))|0); + $93 = tempRet0; + $94 = $85; + $95 = $94; + HEAP32[$95>>2] = $92; + $96 = (($94) + 4)|0; + $97 = $96; + HEAP32[$97>>2] = $93; + $98 = ((($in)) + 40|0); + $99 = $98; + $100 = $99; + $101 = HEAP32[$100>>2]|0; + $102 = (($99) + 4)|0; + $103 = $102; + $104 = HEAP32[$103>>2]|0; + $105 = ((($output)) + 40|0); + $106 = $105; + $107 = $106; + $108 = HEAP32[$107>>2]|0; + $109 = (($106) + 4)|0; + $110 = $109; + $111 = HEAP32[$110>>2]|0; + $112 = (_i64Subtract(($101|0),($104|0),($108|0),($111|0))|0); + $113 = tempRet0; + $114 = $105; + $115 = $114; + HEAP32[$115>>2] = $112; + $116 = (($114) + 4)|0; + $117 = $116; + HEAP32[$117>>2] = $113; + $118 = ((($in)) + 48|0); + $119 = $118; + $120 = $119; + $121 = HEAP32[$120>>2]|0; + $122 = (($119) + 4)|0; + $123 = $122; + $124 = HEAP32[$123>>2]|0; + $125 = ((($output)) + 48|0); + $126 = $125; + $127 = $126; + $128 = HEAP32[$127>>2]|0; + $129 = (($126) + 4)|0; + $130 = $129; + $131 = HEAP32[$130>>2]|0; + $132 = (_i64Subtract(($121|0),($124|0),($128|0),($131|0))|0); + $133 = tempRet0; + $134 = $125; + $135 = $134; + HEAP32[$135>>2] = $132; + $136 = (($134) + 4)|0; + $137 = $136; + HEAP32[$137>>2] = $133; + $138 = ((($in)) + 56|0); + $139 = $138; + $140 = $139; + $141 = HEAP32[$140>>2]|0; + $142 = (($139) + 4)|0; + $143 = $142; + $144 = HEAP32[$143>>2]|0; + $145 = ((($output)) + 56|0); + $146 = $145; + $147 = $146; + $148 = HEAP32[$147>>2]|0; + $149 = (($146) + 4)|0; + $150 = $149; + $151 = HEAP32[$150>>2]|0; + $152 = (_i64Subtract(($141|0),($144|0),($148|0),($151|0))|0); + $153 = tempRet0; + $154 = $145; + $155 = $154; + HEAP32[$155>>2] = $152; + $156 = (($154) + 4)|0; + $157 = $156; + HEAP32[$157>>2] = $153; + $158 = ((($in)) + 64|0); + $159 = $158; + $160 = $159; + $161 = HEAP32[$160>>2]|0; + $162 = (($159) + 4)|0; + $163 = $162; + $164 = HEAP32[$163>>2]|0; + $165 = ((($output)) + 64|0); + $166 = $165; + $167 = $166; + $168 = HEAP32[$167>>2]|0; + $169 = (($166) + 4)|0; + $170 = $169; + $171 = HEAP32[$170>>2]|0; + $172 = (_i64Subtract(($161|0),($164|0),($168|0),($171|0))|0); + $173 = tempRet0; + $174 = $165; + $175 = $174; + HEAP32[$175>>2] = $172; + $176 = (($174) + 4)|0; + $177 = $176; + HEAP32[$177>>2] = $173; + $178 = ((($in)) + 72|0); + $179 = $178; + $180 = $179; + $181 = HEAP32[$180>>2]|0; + $182 = (($179) + 4)|0; + $183 = $182; + $184 = HEAP32[$183>>2]|0; + $185 = ((($output)) + 72|0); + $186 = $185; + $187 = $186; + $188 = HEAP32[$187>>2]|0; + $189 = (($186) + 4)|0; + $190 = $189; + $191 = HEAP32[$190>>2]|0; + $192 = (_i64Subtract(($181|0),($184|0),($188|0),($191|0))|0); + $193 = tempRet0; + $194 = $185; + $195 = $194; + HEAP32[$195>>2] = $192; + $196 = (($194) + 4)|0; + $197 = $196; + HEAP32[$197>>2] = $193; + return; } -function _div_by_2_25($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; +function _fscalar_product($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; - $2 = $1 >> 31; - $3 = $2 >>> 7; - $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); - $5 = tempRet0; - $6 = (_bitshift64Ashr(($4|0),($5|0),25)|0); + $0 = $in; + $1 = $0; + $2 = HEAP32[$1>>2]|0; + $3 = (($0) + 4)|0; + $4 = $3; + $5 = HEAP32[$4>>2]|0; + $6 = (___muldi3(($2|0),($5|0),121665,0)|0); $7 = tempRet0; - tempRet0 = $7; - STACKTOP = sp;return ($6|0); + $8 = $output; + $9 = $8; + HEAP32[$9>>2] = $6; + $10 = (($8) + 4)|0; + $11 = $10; + HEAP32[$11>>2] = $7; + $12 = ((($in)) + 8|0); + $13 = $12; + $14 = $13; + $15 = HEAP32[$14>>2]|0; + $16 = (($13) + 4)|0; + $17 = $16; + $18 = HEAP32[$17>>2]|0; + $19 = (___muldi3(($15|0),($18|0),121665,0)|0); + $20 = tempRet0; + $21 = ((($output)) + 8|0); + $22 = $21; + $23 = $22; + HEAP32[$23>>2] = $19; + $24 = (($22) + 4)|0; + $25 = $24; + HEAP32[$25>>2] = $20; + $26 = ((($in)) + 16|0); + $27 = $26; + $28 = $27; + $29 = HEAP32[$28>>2]|0; + $30 = (($27) + 4)|0; + $31 = $30; + $32 = HEAP32[$31>>2]|0; + $33 = (___muldi3(($29|0),($32|0),121665,0)|0); + $34 = tempRet0; + $35 = ((($output)) + 16|0); + $36 = $35; + $37 = $36; + HEAP32[$37>>2] = $33; + $38 = (($36) + 4)|0; + $39 = $38; + HEAP32[$39>>2] = $34; + $40 = ((($in)) + 24|0); + $41 = $40; + $42 = $41; + $43 = HEAP32[$42>>2]|0; + $44 = (($41) + 4)|0; + $45 = $44; + $46 = HEAP32[$45>>2]|0; + $47 = (___muldi3(($43|0),($46|0),121665,0)|0); + $48 = tempRet0; + $49 = ((($output)) + 24|0); + $50 = $49; + $51 = $50; + HEAP32[$51>>2] = $47; + $52 = (($50) + 4)|0; + $53 = $52; + HEAP32[$53>>2] = $48; + $54 = ((($in)) + 32|0); + $55 = $54; + $56 = $55; + $57 = HEAP32[$56>>2]|0; + $58 = (($55) + 4)|0; + $59 = $58; + $60 = HEAP32[$59>>2]|0; + $61 = (___muldi3(($57|0),($60|0),121665,0)|0); + $62 = tempRet0; + $63 = ((($output)) + 32|0); + $64 = $63; + $65 = $64; + HEAP32[$65>>2] = $61; + $66 = (($64) + 4)|0; + $67 = $66; + HEAP32[$67>>2] = $62; + $68 = ((($in)) + 40|0); + $69 = $68; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $72 = (($69) + 4)|0; + $73 = $72; + $74 = HEAP32[$73>>2]|0; + $75 = (___muldi3(($71|0),($74|0),121665,0)|0); + $76 = tempRet0; + $77 = ((($output)) + 40|0); + $78 = $77; + $79 = $78; + HEAP32[$79>>2] = $75; + $80 = (($78) + 4)|0; + $81 = $80; + HEAP32[$81>>2] = $76; + $82 = ((($in)) + 48|0); + $83 = $82; + $84 = $83; + $85 = HEAP32[$84>>2]|0; + $86 = (($83) + 4)|0; + $87 = $86; + $88 = HEAP32[$87>>2]|0; + $89 = (___muldi3(($85|0),($88|0),121665,0)|0); + $90 = tempRet0; + $91 = ((($output)) + 48|0); + $92 = $91; + $93 = $92; + HEAP32[$93>>2] = $89; + $94 = (($92) + 4)|0; + $95 = $94; + HEAP32[$95>>2] = $90; + $96 = ((($in)) + 56|0); + $97 = $96; + $98 = $97; + $99 = HEAP32[$98>>2]|0; + $100 = (($97) + 4)|0; + $101 = $100; + $102 = HEAP32[$101>>2]|0; + $103 = (___muldi3(($99|0),($102|0),121665,0)|0); + $104 = tempRet0; + $105 = ((($output)) + 56|0); + $106 = $105; + $107 = $106; + HEAP32[$107>>2] = $103; + $108 = (($106) + 4)|0; + $109 = $108; + HEAP32[$109>>2] = $104; + $110 = ((($in)) + 64|0); + $111 = $110; + $112 = $111; + $113 = HEAP32[$112>>2]|0; + $114 = (($111) + 4)|0; + $115 = $114; + $116 = HEAP32[$115>>2]|0; + $117 = (___muldi3(($113|0),($116|0),121665,0)|0); + $118 = tempRet0; + $119 = ((($output)) + 64|0); + $120 = $119; + $121 = $120; + HEAP32[$121>>2] = $117; + $122 = (($120) + 4)|0; + $123 = $122; + HEAP32[$123>>2] = $118; + $124 = ((($in)) + 72|0); + $125 = $124; + $126 = $125; + $127 = HEAP32[$126>>2]|0; + $128 = (($125) + 4)|0; + $129 = $128; + $130 = HEAP32[$129>>2]|0; + $131 = (___muldi3(($127|0),($130|0),121665,0)|0); + $132 = tempRet0; + $133 = ((($output)) + 72|0); + $134 = $133; + $135 = $134; + HEAP32[$135>>2] = $131; + $136 = (($134) + 4)|0; + $137 = $136; + HEAP32[$137>>2] = $132; + return; } function _crypto_sign_ed25519_ref10_fe_0($h) { $h = $h|0; var dest = 0, label = 0, sp = 0, stop = 0; sp = STACKTOP; - dest=$h+0|0; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; + dest=$h; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + return; } function _crypto_sign_ed25519_ref10_fe_1($h) { $h = $h|0; var $0 = 0, dest = 0, label = 0, sp = 0, stop = 0; sp = STACKTOP; HEAP32[$h>>2] = 1; - $0 = (($h) + 4|0); - dest=$0+0|0; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; + $0 = ((($h)) + 4|0); + dest=$0; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + return; } function _crypto_sign_ed25519_ref10_fe_add($h,$f,$g) { $h = $h|0; @@ -11369,42 +12131,42 @@ function _crypto_sign_ed25519_ref10_fe_add($h,$f,$g) { var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); + $20 = ((($g)) + 4|0); $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); + $22 = ((($g)) + 8|0); $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); + $24 = ((($g)) + 12|0); $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); + $26 = ((($g)) + 16|0); $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); + $28 = ((($g)) + 20|0); $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); + $30 = ((($g)) + 24|0); $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); + $32 = ((($g)) + 28|0); $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); + $34 = ((($g)) + 32|0); $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); + $36 = ((($g)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = (($19) + ($0))|0; $39 = (($21) + ($2))|0; @@ -11417,25 +12179,25 @@ function _crypto_sign_ed25519_ref10_fe_add($h,$f,$g) { $46 = (($35) + ($16))|0; $47 = (($37) + ($18))|0; HEAP32[$h>>2] = $38; - $48 = (($h) + 4|0); + $48 = ((($h)) + 4|0); HEAP32[$48>>2] = $39; - $49 = (($h) + 8|0); + $49 = ((($h)) + 8|0); HEAP32[$49>>2] = $40; - $50 = (($h) + 12|0); + $50 = ((($h)) + 12|0); HEAP32[$50>>2] = $41; - $51 = (($h) + 16|0); + $51 = ((($h)) + 16|0); HEAP32[$51>>2] = $42; - $52 = (($h) + 20|0); + $52 = ((($h)) + 20|0); HEAP32[$52>>2] = $43; - $53 = (($h) + 24|0); + $53 = ((($h)) + 24|0); HEAP32[$53>>2] = $44; - $54 = (($h) + 28|0); + $54 = ((($h)) + 28|0); HEAP32[$54>>2] = $45; - $55 = (($h) + 32|0); + $55 = ((($h)) + 32|0); HEAP32[$55>>2] = $46; - $56 = (($h) + 36|0); + $56 = ((($h)) + 36|0); HEAP32[$56>>2] = $47; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_cmov($f,$g,$b) { $f = $f|0; @@ -11447,42 +12209,42 @@ function _crypto_sign_ed25519_ref10_fe_cmov($f,$g,$b) { var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); + $20 = ((($g)) + 4|0); $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); + $22 = ((($g)) + 8|0); $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); + $24 = ((($g)) + 12|0); $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); + $26 = ((($g)) + 16|0); $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); + $28 = ((($g)) + 20|0); $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); + $30 = ((($g)) + 24|0); $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); + $32 = ((($g)) + 28|0); $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); + $34 = ((($g)) + 32|0); $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); + $36 = ((($g)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = $19 ^ $0; $39 = $21 ^ $2; @@ -11525,7 +12287,7 @@ function _crypto_sign_ed25519_ref10_fe_cmov($f,$g,$b) { HEAP32[$15>>2] = $67; $68 = $58 ^ $18; HEAP32[$17>>2] = $68; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_copy($h,$f) { $h = $h|0; @@ -11534,44 +12296,44 @@ function _crypto_sign_ed25519_ref10_fe_copy($h,$f) { var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; HEAP32[$h>>2] = $0; - $19 = (($h) + 4|0); + $19 = ((($h)) + 4|0); HEAP32[$19>>2] = $2; - $20 = (($h) + 8|0); + $20 = ((($h)) + 8|0); HEAP32[$20>>2] = $4; - $21 = (($h) + 12|0); + $21 = ((($h)) + 12|0); HEAP32[$21>>2] = $6; - $22 = (($h) + 16|0); + $22 = ((($h)) + 16|0); HEAP32[$22>>2] = $8; - $23 = (($h) + 20|0); + $23 = ((($h)) + 20|0); HEAP32[$23>>2] = $10; - $24 = (($h) + 24|0); + $24 = ((($h)) + 24|0); HEAP32[$24>>2] = $12; - $25 = (($h) + 28|0); + $25 = ((($h)) + 28|0); HEAP32[$25>>2] = $14; - $26 = (($h) + 32|0); + $26 = ((($h)) + 32|0); HEAP32[$26>>2] = $16; - $27 = (($h) + 36|0); + $27 = ((($h)) + 36|0); HEAP32[$27>>2] = $18; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_frombytes($h,$s) { $h = $h|0; @@ -11579,53 +12341,53 @@ function _crypto_sign_ed25519_ref10_fe_frombytes($h,$s) { var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; - var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; - var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; - var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; - var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_load_4($s)|0); $1 = tempRet0; - $2 = (($s) + 4|0); + $2 = ((($s)) + 4|0); $3 = (_load_3($2)|0); $4 = tempRet0; $5 = (_bitshift64Shl(($3|0),($4|0),6)|0); $6 = tempRet0; - $7 = (($s) + 7|0); + $7 = ((($s)) + 7|0); $8 = (_load_3($7)|0); $9 = tempRet0; $10 = (_bitshift64Shl(($8|0),($9|0),5)|0); $11 = tempRet0; - $12 = (($s) + 10|0); + $12 = ((($s)) + 10|0); $13 = (_load_3($12)|0); $14 = tempRet0; $15 = (_bitshift64Shl(($13|0),($14|0),3)|0); $16 = tempRet0; - $17 = (($s) + 13|0); + $17 = ((($s)) + 13|0); $18 = (_load_3($17)|0); $19 = tempRet0; $20 = (_bitshift64Shl(($18|0),($19|0),2)|0); $21 = tempRet0; - $22 = (($s) + 16|0); + $22 = ((($s)) + 16|0); $23 = (_load_4($22)|0); $24 = tempRet0; - $25 = (($s) + 20|0); + $25 = ((($s)) + 20|0); $26 = (_load_3($25)|0); $27 = tempRet0; $28 = (_bitshift64Shl(($26|0),($27|0),7)|0); $29 = tempRet0; - $30 = (($s) + 23|0); + $30 = ((($s)) + 23|0); $31 = (_load_3($30)|0); $32 = tempRet0; $33 = (_bitshift64Shl(($31|0),($32|0),5)|0); $34 = tempRet0; - $35 = (($s) + 26|0); + $35 = ((($s)) + 26|0); $36 = (_load_3($35)|0); $37 = tempRet0; $38 = (_bitshift64Shl(($36|0),($37|0),4)|0); $39 = tempRet0; - $40 = (($s) + 29|0); + $40 = ((($s)) + 29|0); $41 = (_load_3($40)|0); $42 = tempRet0; $43 = (_bitshift64Shl(($41|0),($42|0),2)|0); @@ -11635,124 +12397,125 @@ function _crypto_sign_ed25519_ref10_fe_frombytes($h,$s) { $47 = tempRet0; $48 = (_bitshift64Lshr(($46|0),($47|0),25)|0); $49 = tempRet0; - $50 = (___muldi3(($48|0),($49|0),19,0)|0); + $50 = (_i64Subtract(0,0,($48|0),($49|0))|0); $51 = tempRet0; - $52 = (_i64Add(($50|0),($51|0),($0|0),($1|0))|0); - $53 = tempRet0; - $54 = (_bitshift64Shl(($48|0),($49|0),25)|0); - $55 = tempRet0; - $56 = (_i64Add(($5|0),($6|0),16777216,0)|0); - $57 = tempRet0; - $58 = (_bitshift64Ashr(($56|0),($57|0),25)|0); - $59 = tempRet0; - $60 = (_i64Add(($58|0),($59|0),($10|0),($11|0))|0); - $61 = tempRet0; - $62 = (_bitshift64Shl(($58|0),($59|0),25)|0); - $63 = tempRet0; - $64 = (_i64Subtract(($5|0),($6|0),($62|0),($63|0))|0); - $65 = tempRet0; - $66 = (_i64Add(($15|0),($16|0),16777216,0)|0); - $67 = tempRet0; - $68 = (_bitshift64Ashr(($66|0),($67|0),25)|0); - $69 = tempRet0; - $70 = (_i64Add(($68|0),($69|0),($20|0),($21|0))|0); - $71 = tempRet0; - $72 = (_bitshift64Shl(($68|0),($69|0),25)|0); - $73 = tempRet0; - $74 = (_i64Subtract(($15|0),($16|0),($72|0),($73|0))|0); - $75 = tempRet0; - $76 = (_i64Add(($23|0),($24|0),16777216,0)|0); - $77 = tempRet0; - $78 = (_bitshift64Ashr(($76|0),($77|0),25)|0); - $79 = tempRet0; - $80 = (_i64Add(($28|0),($29|0),($78|0),($79|0))|0); - $81 = tempRet0; - $82 = (_bitshift64Shl(($78|0),($79|0),25)|0); - $83 = tempRet0; - $84 = (_i64Subtract(($23|0),($24|0),($82|0),($83|0))|0); - $85 = tempRet0; - $86 = (_i64Add(($33|0),($34|0),16777216,0)|0); - $87 = tempRet0; - $88 = (_bitshift64Ashr(($86|0),($87|0),25)|0); - $89 = tempRet0; - $90 = (_i64Add(($88|0),($89|0),($38|0),($39|0))|0); - $91 = tempRet0; - $92 = (_bitshift64Shl(($88|0),($89|0),25)|0); - $93 = tempRet0; - $94 = (_i64Add(($52|0),($53|0),33554432,0)|0); - $95 = tempRet0; - $96 = (_bitshift64Ashr(($94|0),($95|0),26)|0); - $97 = tempRet0; - $98 = (_i64Add(($64|0),($65|0),($96|0),($97|0))|0); - $99 = tempRet0; - $100 = (_bitshift64Shl(($96|0),($97|0),26)|0); - $101 = tempRet0; - $102 = (_i64Subtract(($52|0),($53|0),($100|0),($101|0))|0); - $103 = tempRet0; - $104 = (_i64Add(($60|0),($61|0),33554432,0)|0); - $105 = tempRet0; - $106 = (_bitshift64Ashr(($104|0),($105|0),26)|0); - $107 = tempRet0; - $108 = (_i64Add(($74|0),($75|0),($106|0),($107|0))|0); - $109 = tempRet0; - $110 = (_bitshift64Shl(($106|0),($107|0),26)|0); - $111 = tempRet0; - $112 = (_i64Subtract(($60|0),($61|0),($110|0),($111|0))|0); - $113 = tempRet0; - $114 = (_i64Add(($70|0),($71|0),33554432,0)|0); - $115 = tempRet0; - $116 = (_bitshift64Ashr(($114|0),($115|0),26)|0); - $117 = tempRet0; - $118 = (_i64Add(($84|0),($85|0),($116|0),($117|0))|0); - $119 = tempRet0; - $120 = (_bitshift64Shl(($116|0),($117|0),26)|0); - $121 = tempRet0; - $122 = (_i64Subtract(($70|0),($71|0),($120|0),($121|0))|0); - $123 = tempRet0; - $124 = (_i64Add(($80|0),($81|0),33554432,0)|0); - $125 = tempRet0; - $126 = (_bitshift64Ashr(($124|0),($125|0),26)|0); - $127 = tempRet0; - $128 = (_i64Add(($126|0),($127|0),($33|0),($34|0))|0); - $129 = tempRet0; - $130 = (_i64Subtract(($128|0),($129|0),($92|0),($93|0))|0); - $131 = tempRet0; - $132 = (_bitshift64Shl(($126|0),($127|0),26)|0); - $133 = tempRet0; - $134 = (_i64Subtract(($80|0),($81|0),($132|0),($133|0))|0); - $135 = tempRet0; - $136 = (_i64Add(($90|0),($91|0),33554432,0)|0); - $137 = tempRet0; - $138 = (_bitshift64Ashr(($136|0),($137|0),26)|0); - $139 = tempRet0; - $140 = (_i64Add(($138|0),($139|0),($45|0),0)|0); - $141 = tempRet0; - $142 = (_i64Subtract(($140|0),($141|0),($54|0),($55|0))|0); - $143 = tempRet0; - $144 = (_bitshift64Shl(($138|0),($139|0),26)|0); - $145 = tempRet0; - $146 = (_i64Subtract(($90|0),($91|0),($144|0),($145|0))|0); - $147 = tempRet0; - HEAP32[$h>>2] = $102; - $148 = (($h) + 4|0); - HEAP32[$148>>2] = $98; - $149 = (($h) + 8|0); - HEAP32[$149>>2] = $112; - $150 = (($h) + 12|0); - HEAP32[$150>>2] = $108; - $151 = (($h) + 16|0); - HEAP32[$151>>2] = $122; - $152 = (($h) + 20|0); - HEAP32[$152>>2] = $118; - $153 = (($h) + 24|0); - HEAP32[$153>>2] = $134; - $154 = (($h) + 28|0); - HEAP32[$154>>2] = $130; - $155 = (($h) + 32|0); - HEAP32[$155>>2] = $146; - $156 = (($h) + 36|0); - HEAP32[$156>>2] = $142; - STACKTOP = sp;return; + $52 = $50 & 19; + $53 = (_i64Add(($52|0),0,($0|0),($1|0))|0); + $54 = tempRet0; + $55 = (_bitshift64Shl(($48|0),($49|0),25)|0); + $56 = tempRet0; + $57 = (_i64Add(($5|0),($6|0),16777216,0)|0); + $58 = tempRet0; + $59 = (_bitshift64Ashr(($57|0),($58|0),25)|0); + $60 = tempRet0; + $61 = (_i64Add(($59|0),($60|0),($10|0),($11|0))|0); + $62 = tempRet0; + $63 = (_bitshift64Shl(($59|0),($60|0),25)|0); + $64 = tempRet0; + $65 = (_i64Subtract(($5|0),($6|0),($63|0),($64|0))|0); + $66 = tempRet0; + $67 = (_i64Add(($15|0),($16|0),16777216,0)|0); + $68 = tempRet0; + $69 = (_bitshift64Ashr(($67|0),($68|0),25)|0); + $70 = tempRet0; + $71 = (_i64Add(($69|0),($70|0),($20|0),($21|0))|0); + $72 = tempRet0; + $73 = (_bitshift64Shl(($69|0),($70|0),25)|0); + $74 = tempRet0; + $75 = (_i64Subtract(($15|0),($16|0),($73|0),($74|0))|0); + $76 = tempRet0; + $77 = (_i64Add(($23|0),($24|0),16777216,0)|0); + $78 = tempRet0; + $79 = (_bitshift64Ashr(($77|0),($78|0),25)|0); + $80 = tempRet0; + $81 = (_i64Add(($28|0),($29|0),($79|0),($80|0))|0); + $82 = tempRet0; + $83 = (_bitshift64Shl(($79|0),($80|0),25)|0); + $84 = tempRet0; + $85 = (_i64Subtract(($23|0),($24|0),($83|0),($84|0))|0); + $86 = tempRet0; + $87 = (_i64Add(($33|0),($34|0),16777216,0)|0); + $88 = tempRet0; + $89 = (_bitshift64Ashr(($87|0),($88|0),25)|0); + $90 = tempRet0; + $91 = (_i64Add(($89|0),($90|0),($38|0),($39|0))|0); + $92 = tempRet0; + $93 = (_bitshift64Shl(($89|0),($90|0),25)|0); + $94 = tempRet0; + $95 = (_i64Add(($53|0),($54|0),33554432,0)|0); + $96 = tempRet0; + $97 = (_bitshift64Ashr(($95|0),($96|0),26)|0); + $98 = tempRet0; + $99 = (_i64Add(($65|0),($66|0),($97|0),($98|0))|0); + $100 = tempRet0; + $101 = (_bitshift64Shl(($97|0),($98|0),26)|0); + $102 = tempRet0; + $103 = (_i64Subtract(($53|0),($54|0),($101|0),($102|0))|0); + $104 = tempRet0; + $105 = (_i64Add(($61|0),($62|0),33554432,0)|0); + $106 = tempRet0; + $107 = (_bitshift64Ashr(($105|0),($106|0),26)|0); + $108 = tempRet0; + $109 = (_i64Add(($75|0),($76|0),($107|0),($108|0))|0); + $110 = tempRet0; + $111 = (_bitshift64Shl(($107|0),($108|0),26)|0); + $112 = tempRet0; + $113 = (_i64Subtract(($61|0),($62|0),($111|0),($112|0))|0); + $114 = tempRet0; + $115 = (_i64Add(($71|0),($72|0),33554432,0)|0); + $116 = tempRet0; + $117 = (_bitshift64Ashr(($115|0),($116|0),26)|0); + $118 = tempRet0; + $119 = (_i64Add(($85|0),($86|0),($117|0),($118|0))|0); + $120 = tempRet0; + $121 = (_bitshift64Shl(($117|0),($118|0),26)|0); + $122 = tempRet0; + $123 = (_i64Subtract(($71|0),($72|0),($121|0),($122|0))|0); + $124 = tempRet0; + $125 = (_i64Add(($81|0),($82|0),33554432,0)|0); + $126 = tempRet0; + $127 = (_bitshift64Ashr(($125|0),($126|0),26)|0); + $128 = tempRet0; + $129 = (_i64Add(($127|0),($128|0),($33|0),($34|0))|0); + $130 = tempRet0; + $131 = (_i64Subtract(($129|0),($130|0),($93|0),($94|0))|0); + $132 = tempRet0; + $133 = (_bitshift64Shl(($127|0),($128|0),26)|0); + $134 = tempRet0; + $135 = (_i64Subtract(($81|0),($82|0),($133|0),($134|0))|0); + $136 = tempRet0; + $137 = (_i64Add(($91|0),($92|0),33554432,0)|0); + $138 = tempRet0; + $139 = (_bitshift64Ashr(($137|0),($138|0),26)|0); + $140 = tempRet0; + $141 = (_i64Add(($139|0),($140|0),($45|0),0)|0); + $142 = tempRet0; + $143 = (_i64Subtract(($141|0),($142|0),($55|0),($56|0))|0); + $144 = tempRet0; + $145 = (_bitshift64Shl(($139|0),($140|0),26)|0); + $146 = tempRet0; + $147 = (_i64Subtract(($91|0),($92|0),($145|0),($146|0))|0); + $148 = tempRet0; + HEAP32[$h>>2] = $103; + $149 = ((($h)) + 4|0); + HEAP32[$149>>2] = $99; + $150 = ((($h)) + 8|0); + HEAP32[$150>>2] = $113; + $151 = ((($h)) + 12|0); + HEAP32[$151>>2] = $109; + $152 = ((($h)) + 16|0); + HEAP32[$152>>2] = $123; + $153 = ((($h)) + 20|0); + HEAP32[$153>>2] = $119; + $154 = ((($h)) + 24|0); + HEAP32[$154>>2] = $135; + $155 = ((($h)) + 28|0); + HEAP32[$155>>2] = $131; + $156 = ((($h)) + 32|0); + HEAP32[$156>>2] = $147; + $157 = ((($h)) + 36|0); + HEAP32[$157>>2] = $143; + return; } function _load_4($in) { $in = $in|0; @@ -11761,28 +12524,28 @@ function _load_4($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - $15 = (($in) + 3|0); + $15 = ((($in)) + 3|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (_bitshift64Shl(($17|0),0,24)|0); $19 = tempRet0; $20 = $13 | $18; $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); + tempRet0 = ($21); + return ($20|0); } function _load_3($in) { $in = $in|0; @@ -11790,21 +12553,21 @@ function _load_3($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); + tempRet0 = ($14); + return ($13|0); } function _crypto_sign_ed25519_ref10_fe_invert($out,$z) { $out = $out|0; @@ -11938,7 +12701,7 @@ function _crypto_sign_ed25519_ref10_fe_isnonzero($f) { STACKTOP = STACKTOP + 32|0; $s = sp; _crypto_sign_ed25519_ref10_fe_tobytes($s,$f); - $0 = (_crypto_verify_32_ref($s,8)|0); + $0 = (_crypto_verify_32_ref($s,33172)|0); STACKTOP = sp;return ($0|0); } function _crypto_sign_ed25519_ref10_fe_mul($h,$f,$g) { @@ -11979,42 +12742,42 @@ function _crypto_sign_ed25519_ref10_fe_mul($h,$f,$g) { var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); + $20 = ((($g)) + 4|0); $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); + $22 = ((($g)) + 8|0); $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); + $24 = ((($g)) + 12|0); $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); + $26 = ((($g)) + 16|0); $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); + $28 = ((($g)) + 20|0); $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); + $30 = ((($g)) + 24|0); $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); + $32 = ((($g)) + 28|0); $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); + $34 = ((($g)) + 32|0); $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); + $36 = ((($g)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = ($21*19)|0; $39 = ($23*19)|0; @@ -12601,25 +13364,25 @@ function _crypto_sign_ed25519_ref10_fe_mul($h,$f,$g) { $620 = (_i64Subtract(($606|0),($607|0),($618|0),($619|0))|0); $621 = tempRet0; HEAP32[$h>>2] = $620; - $622 = (($h) + 4|0); + $622 = ((($h)) + 4|0); HEAP32[$622>>2] = $616; - $623 = (($h) + 8|0); + $623 = ((($h)) + 8|0); HEAP32[$623>>2] = $494; - $624 = (($h) + 12|0); + $624 = ((($h)) + 12|0); HEAP32[$624>>2] = $532; - $625 = (($h) + 16|0); + $625 = ((($h)) + 16|0); HEAP32[$625>>2] = $570; - $626 = (($h) + 20|0); + $626 = ((($h)) + 20|0); HEAP32[$626>>2] = $566; - $627 = (($h) + 24|0); + $627 = ((($h)) + 24|0); HEAP32[$627>>2] = $522; - $628 = (($h) + 28|0); + $628 = ((($h)) + 28|0); HEAP32[$628>>2] = $560; - $629 = (($h) + 32|0); + $629 = ((($h)) + 32|0); HEAP32[$629>>2] = $598; - $630 = (($h) + 36|0); + $630 = ((($h)) + 36|0); HEAP32[$630>>2] = $610; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_neg($h,$f) { $h = $h|0; @@ -12628,23 +13391,23 @@ function _crypto_sign_ed25519_ref10_fe_neg($h,$f) { var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = (0 - ($0))|0; $20 = (0 - ($2))|0; @@ -12657,25 +13420,25 @@ function _crypto_sign_ed25519_ref10_fe_neg($h,$f) { $27 = (0 - ($16))|0; $28 = (0 - ($18))|0; HEAP32[$h>>2] = $19; - $29 = (($h) + 4|0); + $29 = ((($h)) + 4|0); HEAP32[$29>>2] = $20; - $30 = (($h) + 8|0); + $30 = ((($h)) + 8|0); HEAP32[$30>>2] = $21; - $31 = (($h) + 12|0); + $31 = ((($h)) + 12|0); HEAP32[$31>>2] = $22; - $32 = (($h) + 16|0); + $32 = ((($h)) + 16|0); HEAP32[$32>>2] = $23; - $33 = (($h) + 20|0); + $33 = ((($h)) + 20|0); HEAP32[$33>>2] = $24; - $34 = (($h) + 24|0); + $34 = ((($h)) + 24|0); HEAP32[$34>>2] = $25; - $35 = (($h) + 28|0); + $35 = ((($h)) + 28|0); HEAP32[$35>>2] = $26; - $36 = (($h) + 32|0); + $36 = ((($h)) + 32|0); HEAP32[$36>>2] = $27; - $37 = (($h) + 36|0); + $37 = ((($h)) + 36|0); HEAP32[$37>>2] = $28; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_pow22523($out,$z) { $out = $out|0; @@ -12812,23 +13575,23 @@ function _crypto_sign_ed25519_ref10_fe_sq($h,$f) { var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = $0 << 1; $20 = $2 << 1; @@ -13212,25 +13975,25 @@ function _crypto_sign_ed25519_ref10_fe_sq($h,$f) { $398 = (_i64Subtract(($384|0),($385|0),($396|0),($397|0))|0); $399 = tempRet0; HEAP32[$h>>2] = $398; - $400 = (($h) + 4|0); + $400 = ((($h)) + 4|0); HEAP32[$400>>2] = $394; - $401 = (($h) + 8|0); + $401 = ((($h)) + 8|0); HEAP32[$401>>2] = $300; - $402 = (($h) + 12|0); + $402 = ((($h)) + 12|0); HEAP32[$402>>2] = $328; - $403 = (($h) + 16|0); + $403 = ((($h)) + 16|0); HEAP32[$403>>2] = $358; - $404 = (($h) + 20|0); + $404 = ((($h)) + 20|0); HEAP32[$404>>2] = $354; - $405 = (($h) + 24|0); + $405 = ((($h)) + 24|0); HEAP32[$405>>2] = $318; - $406 = (($h) + 28|0); + $406 = ((($h)) + 28|0); HEAP32[$406>>2] = $348; - $407 = (($h) + 32|0); + $407 = ((($h)) + 32|0); HEAP32[$407>>2] = $376; - $408 = (($h) + 36|0); + $408 = ((($h)) + 36|0); HEAP32[$408>>2] = $388; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_sq2($h,$f) { $h = $h|0; @@ -13259,23 +14022,23 @@ function _crypto_sign_ed25519_ref10_fe_sq2($h,$f) { var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = $0 << 1; $20 = $2 << 1; @@ -13679,25 +14442,25 @@ function _crypto_sign_ed25519_ref10_fe_sq2($h,$f) { $418 = (_i64Subtract(($404|0),($405|0),($416|0),($417|0))|0); $419 = tempRet0; HEAP32[$h>>2] = $418; - $420 = (($h) + 4|0); + $420 = ((($h)) + 4|0); HEAP32[$420>>2] = $414; - $421 = (($h) + 8|0); + $421 = ((($h)) + 8|0); HEAP32[$421>>2] = $346; - $422 = (($h) + 12|0); + $422 = ((($h)) + 12|0); HEAP32[$422>>2] = $366; - $423 = (($h) + 16|0); + $423 = ((($h)) + 16|0); HEAP32[$423>>2] = $386; - $424 = (($h) + 20|0); + $424 = ((($h)) + 20|0); HEAP32[$424>>2] = $382; - $425 = (($h) + 24|0); + $425 = ((($h)) + 24|0); HEAP32[$425>>2] = $356; - $426 = (($h) + 28|0); + $426 = ((($h)) + 28|0); HEAP32[$426>>2] = $376; - $427 = (($h) + 32|0); + $427 = ((($h)) + 32|0); HEAP32[$427>>2] = $396; - $428 = (($h) + 36|0); + $428 = ((($h)) + 36|0); HEAP32[$428>>2] = $408; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_sub($h,$f,$g) { $h = $h|0; @@ -13708,42 +14471,42 @@ function _crypto_sign_ed25519_ref10_fe_sub($h,$f,$g) { var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); + $20 = ((($g)) + 4|0); $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); + $22 = ((($g)) + 8|0); $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); + $24 = ((($g)) + 12|0); $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); + $26 = ((($g)) + 16|0); $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); + $28 = ((($g)) + 20|0); $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); + $30 = ((($g)) + 24|0); $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); + $32 = ((($g)) + 28|0); $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); + $34 = ((($g)) + 32|0); $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); + $36 = ((($g)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = (($0) - ($19))|0; $39 = (($2) - ($21))|0; @@ -13756,25 +14519,25 @@ function _crypto_sign_ed25519_ref10_fe_sub($h,$f,$g) { $46 = (($16) - ($35))|0; $47 = (($18) - ($37))|0; HEAP32[$h>>2] = $38; - $48 = (($h) + 4|0); + $48 = ((($h)) + 4|0); HEAP32[$48>>2] = $39; - $49 = (($h) + 8|0); + $49 = ((($h)) + 8|0); HEAP32[$49>>2] = $40; - $50 = (($h) + 12|0); + $50 = ((($h)) + 12|0); HEAP32[$50>>2] = $41; - $51 = (($h) + 16|0); + $51 = ((($h)) + 16|0); HEAP32[$51>>2] = $42; - $52 = (($h) + 20|0); + $52 = ((($h)) + 20|0); HEAP32[$52>>2] = $43; - $53 = (($h) + 24|0); + $53 = ((($h)) + 24|0); HEAP32[$53>>2] = $44; - $54 = (($h) + 28|0); + $54 = ((($h)) + 28|0); HEAP32[$54>>2] = $45; - $55 = (($h) + 32|0); + $55 = ((($h)) + 32|0); HEAP32[$55>>2] = $46; - $56 = (($h) + 36|0); + $56 = ((($h)) + 36|0); HEAP32[$56>>2] = $47; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_tobytes($s,$h) { $s = $s|0; @@ -13791,23 +14554,23 @@ function _crypto_sign_ed25519_ref10_fe_tobytes($s,$h) { var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$h>>2]|0; - $1 = (($h) + 4|0); + $1 = ((($h)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($h) + 8|0); + $3 = ((($h)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($h) + 12|0); + $5 = ((($h)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($h) + 16|0); + $7 = ((($h)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($h) + 20|0); + $9 = ((($h)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($h) + 24|0); + $11 = ((($h)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($h) + 28|0); + $13 = ((($h)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($h) + 32|0); + $15 = ((($h)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($h) + 36|0); + $17 = ((($h)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = ($18*19)|0; $20 = (($19) + 16777216)|0; @@ -13875,144 +14638,144 @@ function _crypto_sign_ed25519_ref10_fe_tobytes($s,$h) { HEAP8[$s>>0] = $81; $82 = $47 >>> 8; $83 = $82&255; - $84 = (($s) + 1|0); + $84 = ((($s)) + 1|0); HEAP8[$84>>0] = $83; $85 = $47 >>> 16; $86 = $85&255; - $87 = (($s) + 2|0); + $87 = ((($s)) + 2|0); HEAP8[$87>>0] = $86; $88 = $47 >>> 24; $89 = $51 << 2; $90 = $89 | $88; $91 = $90&255; - $92 = (($s) + 3|0); + $92 = ((($s)) + 3|0); HEAP8[$92>>0] = $91; $93 = $51 >>> 6; $94 = $93&255; - $95 = (($s) + 4|0); + $95 = ((($s)) + 4|0); HEAP8[$95>>0] = $94; $96 = $51 >>> 14; $97 = $96&255; - $98 = (($s) + 5|0); + $98 = ((($s)) + 5|0); HEAP8[$98>>0] = $97; $99 = $51 >>> 22; $100 = $55 << 3; $101 = $100 | $99; $102 = $101&255; - $103 = (($s) + 6|0); + $103 = ((($s)) + 6|0); HEAP8[$103>>0] = $102; $104 = $55 >>> 5; $105 = $104&255; - $106 = (($s) + 7|0); + $106 = ((($s)) + 7|0); HEAP8[$106>>0] = $105; $107 = $55 >>> 13; $108 = $107&255; - $109 = (($s) + 8|0); + $109 = ((($s)) + 8|0); HEAP8[$109>>0] = $108; $110 = $55 >>> 21; $111 = $59 << 5; $112 = $111 | $110; $113 = $112&255; - $114 = (($s) + 9|0); + $114 = ((($s)) + 9|0); HEAP8[$114>>0] = $113; $115 = $59 >>> 3; $116 = $115&255; - $117 = (($s) + 10|0); + $117 = ((($s)) + 10|0); HEAP8[$117>>0] = $116; $118 = $59 >>> 11; $119 = $118&255; - $120 = (($s) + 11|0); + $120 = ((($s)) + 11|0); HEAP8[$120>>0] = $119; $121 = $59 >>> 19; $122 = $63 << 6; $123 = $122 | $121; $124 = $123&255; - $125 = (($s) + 12|0); + $125 = ((($s)) + 12|0); HEAP8[$125>>0] = $124; $126 = $63 >>> 2; $127 = $126&255; - $128 = (($s) + 13|0); + $128 = ((($s)) + 13|0); HEAP8[$128>>0] = $127; $129 = $63 >>> 10; $130 = $129&255; - $131 = (($s) + 14|0); + $131 = ((($s)) + 14|0); HEAP8[$131>>0] = $130; $132 = $63 >>> 18; $133 = $132&255; - $134 = (($s) + 15|0); + $134 = ((($s)) + 15|0); HEAP8[$134>>0] = $133; $135 = $67&255; - $136 = (($s) + 16|0); + $136 = ((($s)) + 16|0); HEAP8[$136>>0] = $135; $137 = $67 >>> 8; $138 = $137&255; - $139 = (($s) + 17|0); + $139 = ((($s)) + 17|0); HEAP8[$139>>0] = $138; $140 = $67 >>> 16; $141 = $140&255; - $142 = (($s) + 18|0); + $142 = ((($s)) + 18|0); HEAP8[$142>>0] = $141; $143 = $67 >>> 24; $144 = $71 << 1; $145 = $144 | $143; $146 = $145&255; - $147 = (($s) + 19|0); + $147 = ((($s)) + 19|0); HEAP8[$147>>0] = $146; $148 = $71 >>> 7; $149 = $148&255; - $150 = (($s) + 20|0); + $150 = ((($s)) + 20|0); HEAP8[$150>>0] = $149; $151 = $71 >>> 15; $152 = $151&255; - $153 = (($s) + 21|0); + $153 = ((($s)) + 21|0); HEAP8[$153>>0] = $152; $154 = $71 >>> 23; $155 = $75 << 3; $156 = $155 | $154; $157 = $156&255; - $158 = (($s) + 22|0); + $158 = ((($s)) + 22|0); HEAP8[$158>>0] = $157; $159 = $75 >>> 5; $160 = $159&255; - $161 = (($s) + 23|0); + $161 = ((($s)) + 23|0); HEAP8[$161>>0] = $160; $162 = $75 >>> 13; $163 = $162&255; - $164 = (($s) + 24|0); + $164 = ((($s)) + 24|0); HEAP8[$164>>0] = $163; $165 = $75 >>> 21; $166 = $79 << 4; $167 = $166 | $165; $168 = $167&255; - $169 = (($s) + 25|0); + $169 = ((($s)) + 25|0); HEAP8[$169>>0] = $168; $170 = $79 >>> 4; $171 = $170&255; - $172 = (($s) + 26|0); + $172 = ((($s)) + 26|0); HEAP8[$172>>0] = $171; $173 = $79 >>> 12; $174 = $173&255; - $175 = (($s) + 27|0); + $175 = ((($s)) + 27|0); HEAP8[$175>>0] = $174; $176 = $79 >>> 20; $177 = $80 << 6; $178 = $176 | $177; $179 = $178&255; - $180 = (($s) + 28|0); + $180 = ((($s)) + 28|0); HEAP8[$180>>0] = $179; $181 = $77 >>> 2; $182 = $181&255; - $183 = (($s) + 29|0); + $183 = ((($s)) + 29|0); HEAP8[$183>>0] = $182; $184 = $77 >>> 10; $185 = $184&255; - $186 = (($s) + 30|0); + $186 = ((($s)) + 30|0); HEAP8[$186>>0] = $185; $187 = $80 >>> 18; $188 = $187&255; - $189 = (($s) + 31|0); + $189 = ((($s)) + 31|0); HEAP8[$189>>0] = $188; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_add($r,$p,$q) { $r = $r|0; @@ -14022,20 +14785,20 @@ function _crypto_sign_ed25519_ref10_ge_add($r,$p,$q) { sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $t0 = sp; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); + $2 = ((($r)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); - $3 = (($q) + 40|0); + $3 = ((($q)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); - $4 = (($r) + 120|0); - $5 = (($q) + 120|0); - $6 = (($p) + 120|0); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 120|0); + $6 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - $8 = (($q) + 80|0); + $7 = ((($p)) + 80|0); + $8 = ((($q)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); @@ -14067,60 +14830,60 @@ function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($A2,$t); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$Ai); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $0 = (($Ai) + 160|0); + $0 = ((($Ai)) + 160|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($0,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$0); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $1 = (($Ai) + 320|0); + $1 = ((($Ai)) + 320|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($1,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$1); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $2 = (($Ai) + 480|0); + $2 = ((($Ai)) + 480|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($2,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$2); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $3 = (($Ai) + 640|0); + $3 = ((($Ai)) + 640|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($3,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$3); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $4 = (($Ai) + 800|0); + $4 = ((($Ai)) + 800|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($4,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$4); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $5 = (($Ai) + 960|0); + $5 = ((($Ai)) + 960|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($5,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$5); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $6 = (($Ai) + 1120|0); + $6 = ((($Ai)) + 1120|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($6,$u); _crypto_sign_ed25519_ref10_ge_p2_0($r); $i$02 = 255; while(1) { - $8 = (($aslide) + ($i$02)|0); - $9 = HEAP8[$8>>0]|0; - $10 = ($9<<24>>24)==(0); - if (!($10)) { + $7 = (($aslide) + ($i$02)|0); + $8 = HEAP8[$7>>0]|0; + $9 = ($8<<24>>24)==(0); + if (!($9)) { $i$0$lcssa = $i$02; break; } - $11 = (($bslide) + ($i$02)|0); - $12 = HEAP8[$11>>0]|0; - $13 = ($12<<24>>24)==(0); - $14 = (($i$02) + -1)|0; - if (!($13)) { + $10 = (($bslide) + ($i$02)|0); + $11 = HEAP8[$10>>0]|0; + $12 = ($11<<24>>24)==(0); + if (!($12)) { $i$0$lcssa = $i$02; break; } - $7 = ($i$02|0)>(0); - if ($7) { + $14 = (($i$02) + -1)|0; + $15 = ($i$02|0)>(0); + if ($15) { $i$02 = $14; } else { $i$0$lcssa = $14; break; } } - $15 = ($i$0$lcssa|0)>(-1); - if ($15) { + $13 = ($i$0$lcssa|0)>(-1); + if ($13) { $i$11 = $i$0$lcssa; } else { STACKTOP = sp;return; @@ -14156,7 +14919,7 @@ function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { $31 = HEAP8[$28>>0]|0; $32 = $31 << 24 >> 24; $33 = (($32|0) / 2)&-1; - $34 = (40 + (($33*120)|0)|0); + $34 = (712 + (($33*120)|0)|0); _crypto_sign_ed25519_ref10_ge_madd($t,$u,$34); } else { $35 = ($29<<24>>24)<(0); @@ -14165,7 +14928,7 @@ function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { $36 = HEAP8[$28>>0]|0; $37 = $36 << 24 >> 24; $38 = (($37|0) / -2)&-1; - $39 = (40 + (($38*120)|0)|0); + $39 = (712 + (($38*120)|0)|0); _crypto_sign_ed25519_ref10_ge_msub($t,$u,$39); } } @@ -14183,40 +14946,40 @@ function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { function _slide($r,$a) { $r = $r|0; $a = $a|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$03 = 0, $exitcond = 0, $exitcond10 = 0; - var $i$08 = 0, $i$15 = 0, $k$01 = 0, label = 0, sp = 0; + var $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$03 = 0, $exitcond = 0, $exitcond9 = 0; + var $i$07 = 0, $i$14 = 0, $k$02 = 0, label = 0, sp = 0; sp = STACKTOP; - $i$08 = 0; + $i$07 = 0; while(1) { - $0 = $i$08 >> 3; + $0 = $i$07 >> 3; $1 = (($a) + ($0)|0); $2 = HEAP8[$1>>0]|0; $3 = $2&255; - $4 = $i$08 & 7; + $4 = $i$07 & 7; $5 = $3 >>> $4; $6 = $5 & 1; $7 = $6&255; - $8 = (($r) + ($i$08)|0); + $8 = (($r) + ($i$07)|0); HEAP8[$8>>0] = $7; - $9 = (($i$08) + 1)|0; - $exitcond10 = ($9|0)==(256); - if ($exitcond10) { - $i$15 = 0; + $9 = (($i$07) + 1)|0; + $exitcond9 = ($9|0)==(256); + if ($exitcond9) { + $i$14 = 0; break; } else { - $i$08 = $9; + $i$07 = $9; } } while(1) { - $10 = (($r) + ($i$15)|0); + $10 = (($r) + ($i$14)|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); L5: do { if (!($12)) { $b$03 = 1; while(1) { - $13 = (($b$03) + ($i$15))|0; + $13 = (($b$03) + ($i$14))|0; $14 = ($13|0)<(256); if (!($14)) { break L5; @@ -14245,48 +15008,46 @@ function _slide($r,$a) { } $27 = $25&255; HEAP8[$10>>0] = $27; - $28 = ($13|0)<(256); - if ($28) { - $k$01 = $13; - while(1) { - $29 = (($r) + ($k$01)|0); - $30 = HEAP8[$29>>0]|0; - $31 = ($30<<24>>24)==(0); - if ($31) { - break; - } - HEAP8[$29>>0] = 0; - $32 = (($k$01) + 1)|0; - $33 = ($32|0)<(256); - if ($33) { - $k$01 = $32; - } else { - break L9; - } + $k$02 = $13; + while(1) { + $28 = (($r) + ($k$02)|0); + $29 = HEAP8[$28>>0]|0; + $30 = ($29<<24>>24)==(0); + if ($30) { + $$lcssa = $28; + break; + } + HEAP8[$28>>0] = 0; + $31 = (($k$02) + 1)|0; + $32 = ($31|0)<(256); + if ($32) { + $k$02 = $31; + } else { + break L9; } - HEAP8[$29>>0] = 1; } + HEAP8[$$lcssa>>0] = 1; } } while(0); - $34 = (($b$03) + 1)|0; - $35 = ($34|0)<(7); - if ($35) { - $b$03 = $34; + $33 = (($b$03) + 1)|0; + $34 = ($33|0)<(7); + if ($34) { + $b$03 = $33; } else { break; } } } } while(0); - $36 = (($i$15) + 1)|0; - $exitcond = ($36|0)==(256); + $35 = (($i$14) + 1)|0; + $exitcond = ($35|0)==(256); if ($exitcond) { break; } else { - $i$15 = $36; + $i$14 = $35; } } - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { $h = $h|0; @@ -14300,12 +15061,12 @@ function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { $v3 = sp + 80|0; $vxx = sp + 40|0; $check = sp; - $0 = (($h) + 40|0); + $0 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_frombytes($0,$s); - $1 = (($h) + 80|0); + $1 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_1($1); _crypto_sign_ed25519_ref10_fe_sq($u,$0); - _crypto_sign_ed25519_ref10_fe_mul($v,$u,1000); + _crypto_sign_ed25519_ref10_fe_mul($v,$u,1672); _crypto_sign_ed25519_ref10_fe_sub($u,$u,$1); _crypto_sign_ed25519_ref10_fe_add($v,$v,$1); _crypto_sign_ed25519_ref10_fe_sq($v3,$v); @@ -14327,7 +15088,7 @@ function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { $4 = (_crypto_sign_ed25519_ref10_fe_isnonzero($check)|0); $5 = ($4|0)==(0); if ($5) { - _crypto_sign_ed25519_ref10_fe_mul($h,$h,1040); + _crypto_sign_ed25519_ref10_fe_mul($h,$h,1712); break; } else { $$0 = -1; @@ -14336,7 +15097,7 @@ function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { } } while(0); $6 = (_crypto_sign_ed25519_ref10_fe_isnegative($h)|0); - $7 = (($s) + 31|0); + $7 = ((($s)) + 31|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = $9 >>> 7; @@ -14344,7 +15105,7 @@ function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { if ($11) { _crypto_sign_ed25519_ref10_fe_neg($h,$h); } - $12 = (($h) + 120|0); + $12 = ((($h)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($12,$h,$0); $$0 = 0; STACKTOP = sp;return ($$0|0); @@ -14357,19 +15118,19 @@ function _crypto_sign_ed25519_ref10_ge_madd($r,$p,$q) { sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $t0 = sp; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); + $2 = ((($r)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); - $3 = (($q) + 40|0); + $3 = ((($q)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); - $4 = (($r) + 120|0); - $5 = (($q) + 80|0); - $6 = (($p) + 120|0); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 80|0); + $6 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); + $7 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); @@ -14385,19 +15146,19 @@ function _crypto_sign_ed25519_ref10_ge_msub($r,$p,$q) { sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $t0 = sp; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($q) + 40|0); + $2 = ((($r)) + 80|0); + $3 = ((($q)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); - $4 = (($r) + 120|0); - $5 = (($q) + 80|0); - $6 = (($p) + 120|0); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 80|0); + $6 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); + $7 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); @@ -14410,43 +15171,43 @@ function _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($r,$p) { $p = $p|0; var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($p) + 120|0); + $0 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); - $1 = (($r) + 40|0); - $2 = (($p) + 40|0); - $3 = (($p) + 80|0); + $1 = ((($r)) + 40|0); + $2 = ((($p)) + 40|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); - $4 = (($r) + 80|0); + $4 = ((($r)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($r,$p) { $r = $r|0; $p = $p|0; var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($p) + 120|0); + $0 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); - $1 = (($r) + 40|0); - $2 = (($p) + 40|0); - $3 = (($p) + 80|0); + $1 = ((($r)) + 40|0); + $2 = ((($p)) + 40|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); - $4 = (($r) + 80|0); + $4 = ((($r)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); - $5 = (($r) + 120|0); + $5 = ((($r)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($5,$p,$2); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p2_0($h) { $h = $h|0; var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; _crypto_sign_ed25519_ref10_fe_0($h); - $0 = (($h) + 40|0); + $0 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); + $1 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_1($1); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$p) { $r = $r|0; @@ -14456,13 +15217,13 @@ function _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$p) { STACKTOP = STACKTOP + 48|0; $t0 = sp; _crypto_sign_ed25519_ref10_fe_sq($r,$p); - $0 = (($r) + 80|0); - $1 = (($p) + 40|0); + $0 = ((($r)) + 80|0); + $1 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_sq($0,$1); - $2 = (($r) + 120|0); - $3 = (($p) + 80|0); + $2 = ((($r)) + 120|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_sq2($2,$3); - $4 = (($r) + 40|0); + $4 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($4,$p,$1); _crypto_sign_ed25519_ref10_fe_sq($t0,$4); _crypto_sign_ed25519_ref10_fe_add($4,$0,$r); @@ -14476,13 +15237,13 @@ function _crypto_sign_ed25519_ref10_ge_p3_0($h) { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _crypto_sign_ed25519_ref10_fe_0($h); - $0 = (($h) + 40|0); + $0 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); + $1 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_1($1); - $2 = (($h) + 120|0); + $2 = ((($h)) + 120|0); _crypto_sign_ed25519_ref10_fe_0($2); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p3_dbl($r,$p) { $r = $r|0; @@ -14500,17 +15261,17 @@ function _crypto_sign_ed25519_ref10_ge_p3_to_cached($r,$p) { $p = $p|0; var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($p) + 80|0); + $2 = ((($r)) + 80|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_copy($2,$3); - $4 = (($r) + 120|0); - $5 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,1080); - STACKTOP = sp;return; + $4 = ((($r)) + 120|0); + $5 = ((($p)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($4,$5,1752); + return; } function _crypto_sign_ed25519_ref10_ge_p3_to_p2($r,$p) { $r = $r|0; @@ -14518,13 +15279,13 @@ function _crypto_sign_ed25519_ref10_ge_p3_to_p2($r,$p) { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; _crypto_sign_ed25519_ref10_fe_copy($r,$p); - $0 = (($r) + 40|0); - $1 = (($p) + 40|0); + $0 = ((($r)) + 40|0); + $1 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_copy($0,$1); - $2 = (($r) + 80|0); - $3 = (($p) + 80|0); + $2 = ((($r)) + 80|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_copy($2,$3); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p3_tobytes($s,$h) { $s = $s|0; @@ -14535,15 +15296,15 @@ function _crypto_sign_ed25519_ref10_ge_p3_tobytes($s,$h) { $recip = sp + 80|0; $x = sp + 40|0; $y = sp; - $0 = (($h) + 80|0); + $0 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_invert($recip,$0); _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); - $1 = (($h) + 40|0); + $1 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); $3 = $2 << 7; - $4 = (($s) + 31|0); + $4 = ((($s)) + 31|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = $6 ^ $3; @@ -14556,18 +15317,18 @@ function _crypto_sign_ed25519_ref10_ge_precomp_0($h) { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; _crypto_sign_ed25519_ref10_fe_1($h); - $0 = (($h) + 40|0); + $0 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); + $1 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_0($1); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { $h = $h|0; $a = $a|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $carry$04 = 0, $e = 0, $exitcond = 0, $exitcond7 = 0; - var $i$06 = 0, $i$15 = 0, $i$23 = 0, $i$32 = 0, $r = 0, $s = 0, $sext = 0, $sext1 = 0, $t = 0, label = 0, sp = 0; + var $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $carry$04 = 0, $e = 0, $exitcond = 0; + var $exitcond7 = 0, $i$06 = 0, $i$15 = 0, $i$23 = 0, $i$32 = 0, $r = 0, $s = 0, $sext = 0, $sext1 = 0, $t = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 464|0; $e = sp + 400|0; @@ -14613,15 +15374,16 @@ function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { $20 = (($i$15) + 1)|0; $exitcond = ($20|0)==(63); if ($exitcond) { + $$lcssa = $16; break; } else { $carry$04 = $16;$i$15 = $20; } } - $21 = (($e) + 63|0); + $21 = ((($e)) + 63|0); $22 = HEAP8[$21>>0]|0; $23 = $22&255; - $24 = (($23) + ($16))|0; + $24 = (($23) + ($$lcssa))|0; $25 = $24&255; HEAP8[$21>>0] = $25; _crypto_sign_ed25519_ref10_ge_p3_0($h); @@ -14630,7 +15392,7 @@ function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { $26 = (($i$23|0) / 2)&-1; $27 = (($e) + ($i$23)|0); $28 = HEAP8[$27>>0]|0; - _select($t,$26,$28); + _select60($t,$26,$28); _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); $29 = (($i$23) + 2)|0; @@ -14654,7 +15416,7 @@ function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { $31 = (($i$32|0) / 2)&-1; $32 = (($e) + ($i$32)|0); $33 = HEAP8[$32>>0]|0; - _select($t,$31,$33); + _select60($t,$31,$33); _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); $34 = (($i$32) + 2)|0; @@ -14667,7 +15429,7 @@ function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { } STACKTOP = sp;return; } -function _select($t,$pos,$b) { +function _select60($t,$pos,$b) { $t = $t|0; $pos = $pos|0; $b = $b|0; @@ -14685,36 +15447,36 @@ function _select($t,$pos,$b) { $6 = (($1) - ($5))|0; $7 = $6&255; _crypto_sign_ed25519_ref10_ge_precomp_0($t); - $8 = (1120 + (($pos*960)|0)|0); + $8 = (1792 + (($pos*960)|0)|0); $9 = (_equal($7,1)|0); _cmov($t,$8,$9); - $10 = ((1120 + (($pos*960)|0)|0) + 120|0); + $10 = (((1792 + (($pos*960)|0)|0)) + 120|0); $11 = (_equal($7,2)|0); _cmov($t,$10,$11); - $12 = ((1120 + (($pos*960)|0)|0) + 240|0); + $12 = (((1792 + (($pos*960)|0)|0)) + 240|0); $13 = (_equal($7,3)|0); _cmov($t,$12,$13); - $14 = ((1120 + (($pos*960)|0)|0) + 360|0); + $14 = (((1792 + (($pos*960)|0)|0)) + 360|0); $15 = (_equal($7,4)|0); _cmov($t,$14,$15); - $16 = ((1120 + (($pos*960)|0)|0) + 480|0); + $16 = (((1792 + (($pos*960)|0)|0)) + 480|0); $17 = (_equal($7,5)|0); _cmov($t,$16,$17); - $18 = ((1120 + (($pos*960)|0)|0) + 600|0); + $18 = (((1792 + (($pos*960)|0)|0)) + 600|0); $19 = (_equal($7,6)|0); _cmov($t,$18,$19); - $20 = ((1120 + (($pos*960)|0)|0) + 720|0); + $20 = (((1792 + (($pos*960)|0)|0)) + 720|0); $21 = (_equal($7,7)|0); _cmov($t,$20,$21); - $22 = ((1120 + (($pos*960)|0)|0) + 840|0); + $22 = (((1792 + (($pos*960)|0)|0)) + 840|0); $23 = (_equal($7,8)|0); _cmov($t,$22,$23); - $24 = (($t) + 40|0); + $24 = ((($t)) + 40|0); _crypto_sign_ed25519_ref10_fe_copy($minust,$24); - $25 = (($minust) + 40|0); + $25 = ((($minust)) + 40|0); _crypto_sign_ed25519_ref10_fe_copy($25,$t); - $26 = (($minust) + 80|0); - $27 = (($t) + 80|0); + $26 = ((($minust)) + 80|0); + $27 = ((($t)) + 80|0); _crypto_sign_ed25519_ref10_fe_neg($26,$27); _cmov($t,$minust,$0); STACKTOP = sp;return; @@ -14729,7 +15491,7 @@ function _negative($b) { $3 = (_bitshift64Lshr(($0|0),($2|0),63)|0); $4 = tempRet0; $5 = $3&255; - STACKTOP = sp;return ($5|0); + return ($5|0); } function _equal($b,$c) { $b = $b|0; @@ -14741,7 +15503,7 @@ function _equal($b,$c) { $2 = (($1) + -1)|0; $3 = $2 >>> 31; $4 = $3&255; - STACKTOP = sp;return ($4|0); + return ($4|0); } function _cmov($t,$u,$b) { $t = $t|0; @@ -14751,13 +15513,13 @@ function _cmov($t,$u,$b) { sp = STACKTOP; $0 = $b&255; _crypto_sign_ed25519_ref10_fe_cmov($t,$u,$0); - $1 = (($t) + 40|0); - $2 = (($u) + 40|0); + $1 = ((($t)) + 40|0); + $2 = ((($u)) + 40|0); _crypto_sign_ed25519_ref10_fe_cmov($1,$2,$0); - $3 = (($t) + 80|0); - $4 = (($u) + 80|0); + $3 = ((($t)) + 80|0); + $4 = ((($u)) + 80|0); _crypto_sign_ed25519_ref10_fe_cmov($3,$4,$0); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_sub($r,$p,$q) { $r = $r|0; @@ -14767,20 +15529,20 @@ function _crypto_sign_ed25519_ref10_ge_sub($r,$p,$q) { sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $t0 = sp; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($q) + 40|0); + $2 = ((($r)) + 80|0); + $3 = ((($q)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); - $4 = (($r) + 120|0); - $5 = (($q) + 120|0); - $6 = (($p) + 120|0); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 120|0); + $6 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - $8 = (($q) + 80|0); + $7 = ((($p)) + 80|0); + $8 = ((($q)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); @@ -14798,15 +15560,15 @@ function _crypto_sign_ed25519_ref10_ge_tobytes($s,$h) { $recip = sp + 80|0; $x = sp + 40|0; $y = sp; - $0 = (($h) + 80|0); + $0 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_invert($recip,$0); _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); - $1 = (($h) + 40|0); + $1 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); $3 = $2 << 7; - $4 = (($s) + 31|0); + $4 = ((($s)) + 31|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = $6 ^ $3; @@ -14826,9 +15588,9 @@ function _crypto_sign_edwards25519sha512batch_ref10_open($m,$mlen,$sm,$0,$1,$pk) sp = STACKTOP; STACKTOP = STACKTOP + 480|0; $pkcopy1 = sp + 440|0; - $rcopy = sp + 408|0; - $scopy = sp + 376|0; - $h = sp + 312|0; + $rcopy = sp + 344|0; + $scopy = sp + 312|0; + $h = sp + 376|0; $rcheck = sp + 280|0; $A = sp + 120|0; $R = sp; @@ -14838,20 +15600,20 @@ function _crypto_sign_edwards25519sha512batch_ref10_open($m,$mlen,$sm,$0,$1,$pk) $5 = $4 & $3; $6 = $2 | $5; if (!($6)) { - $7 = (($sm) + 63|0); + $7 = ((($sm)) + 63|0); $8 = HEAP8[$7>>0]|0; $9 = ($8&255)>(31); if (!($9)) { $10 = (_crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($A,$pk)|0); $11 = ($10|0)==(0); if ($11) { - dest=$pkcopy1+0|0; src=$pk+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - dest=$rcopy+0|0; src=$sm+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $12 = (($sm) + 32|0); - dest=$scopy+0|0; src=$12+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$pkcopy1; src=$pk; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$rcopy; src=$sm; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $12 = ((($sm)) + 32|0); + dest=$scopy; src=$12; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _memmove(($m|0),($sm|0),($0|0))|0; - $13 = (($m) + 32|0); - dest=$13+0|0; src=$pkcopy1+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $13 = ((($m)) + 32|0); + dest=$13; src=$pkcopy1; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); (_crypto_hash_sha512_ref($h,$m,$0,$1)|0); _crypto_sign_ed25519_ref10_sc_reduce($h); _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($R,$h,$A,$scopy); @@ -14859,13 +15621,13 @@ function _crypto_sign_edwards25519sha512batch_ref10_open($m,$mlen,$sm,$0,$1,$pk) $14 = (_crypto_verify_32_ref($rcheck,$rcopy)|0); $15 = ($14|0)==(0); if ($15) { - $16 = (($m) + 64|0); + $16 = ((($m)) + 64|0); $17 = (_i64Add(($0|0),($1|0),-64,-1)|0); $18 = tempRet0; _memmove(($m|0),($16|0),($17|0))|0; $$sum = (($0) + -64)|0; $19 = (($m) + ($$sum)|0); - dest=$19+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); + dest=$19; stop=dest+64|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); $20 = $mlen; $21 = $20; HEAP32[$21>>2] = $17; @@ -14992,65 +15754,65 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $0 = (_load_347($a)|0); $1 = tempRet0; $2 = $0 & 2097151; - $3 = (($a) + 2|0); + $3 = ((($a)) + 2|0); $4 = (_load_448($3)|0); $5 = tempRet0; $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); $7 = tempRet0; $8 = $6 & 2097151; - $9 = (($a) + 5|0); + $9 = ((($a)) + 5|0); $10 = (_load_347($9)|0); $11 = tempRet0; $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); $13 = tempRet0; $14 = $12 & 2097151; - $15 = (($a) + 7|0); + $15 = ((($a)) + 7|0); $16 = (_load_448($15)|0); $17 = tempRet0; $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); $19 = tempRet0; $20 = $18 & 2097151; - $21 = (($a) + 10|0); + $21 = ((($a)) + 10|0); $22 = (_load_448($21)|0); $23 = tempRet0; $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); $25 = tempRet0; $26 = $24 & 2097151; - $27 = (($a) + 13|0); + $27 = ((($a)) + 13|0); $28 = (_load_347($27)|0); $29 = tempRet0; $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); $31 = tempRet0; $32 = $30 & 2097151; - $33 = (($a) + 15|0); + $33 = ((($a)) + 15|0); $34 = (_load_448($33)|0); $35 = tempRet0; $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); $37 = tempRet0; $38 = $36 & 2097151; - $39 = (($a) + 18|0); + $39 = ((($a)) + 18|0); $40 = (_load_347($39)|0); $41 = tempRet0; $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); $43 = tempRet0; $44 = $42 & 2097151; - $45 = (($a) + 21|0); + $45 = ((($a)) + 21|0); $46 = (_load_347($45)|0); $47 = tempRet0; $48 = $46 & 2097151; - $49 = (($a) + 23|0); + $49 = ((($a)) + 23|0); $50 = (_load_448($49)|0); $51 = tempRet0; $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); $53 = tempRet0; $54 = $52 & 2097151; - $55 = (($a) + 26|0); + $55 = ((($a)) + 26|0); $56 = (_load_347($55)|0); $57 = tempRet0; $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); $59 = tempRet0; $60 = $58 & 2097151; - $61 = (($a) + 28|0); + $61 = ((($a)) + 28|0); $62 = (_load_448($61)|0); $63 = tempRet0; $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); @@ -15058,65 +15820,65 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $66 = (_load_347($b)|0); $67 = tempRet0; $68 = $66 & 2097151; - $69 = (($b) + 2|0); + $69 = ((($b)) + 2|0); $70 = (_load_448($69)|0); $71 = tempRet0; $72 = (_bitshift64Lshr(($70|0),($71|0),5)|0); $73 = tempRet0; $74 = $72 & 2097151; - $75 = (($b) + 5|0); + $75 = ((($b)) + 5|0); $76 = (_load_347($75)|0); $77 = tempRet0; $78 = (_bitshift64Lshr(($76|0),($77|0),2)|0); $79 = tempRet0; $80 = $78 & 2097151; - $81 = (($b) + 7|0); + $81 = ((($b)) + 7|0); $82 = (_load_448($81)|0); $83 = tempRet0; $84 = (_bitshift64Lshr(($82|0),($83|0),7)|0); $85 = tempRet0; $86 = $84 & 2097151; - $87 = (($b) + 10|0); + $87 = ((($b)) + 10|0); $88 = (_load_448($87)|0); $89 = tempRet0; $90 = (_bitshift64Lshr(($88|0),($89|0),4)|0); $91 = tempRet0; $92 = $90 & 2097151; - $93 = (($b) + 13|0); + $93 = ((($b)) + 13|0); $94 = (_load_347($93)|0); $95 = tempRet0; $96 = (_bitshift64Lshr(($94|0),($95|0),1)|0); $97 = tempRet0; $98 = $96 & 2097151; - $99 = (($b) + 15|0); + $99 = ((($b)) + 15|0); $100 = (_load_448($99)|0); $101 = tempRet0; $102 = (_bitshift64Lshr(($100|0),($101|0),6)|0); $103 = tempRet0; $104 = $102 & 2097151; - $105 = (($b) + 18|0); + $105 = ((($b)) + 18|0); $106 = (_load_347($105)|0); $107 = tempRet0; $108 = (_bitshift64Lshr(($106|0),($107|0),3)|0); $109 = tempRet0; $110 = $108 & 2097151; - $111 = (($b) + 21|0); + $111 = ((($b)) + 21|0); $112 = (_load_347($111)|0); $113 = tempRet0; $114 = $112 & 2097151; - $115 = (($b) + 23|0); + $115 = ((($b)) + 23|0); $116 = (_load_448($115)|0); $117 = tempRet0; $118 = (_bitshift64Lshr(($116|0),($117|0),5)|0); $119 = tempRet0; $120 = $118 & 2097151; - $121 = (($b) + 26|0); + $121 = ((($b)) + 26|0); $122 = (_load_347($121)|0); $123 = tempRet0; $124 = (_bitshift64Lshr(($122|0),($123|0),2)|0); $125 = tempRet0; $126 = $124 & 2097151; - $127 = (($b) + 28|0); + $127 = ((($b)) + 28|0); $128 = (_load_448($127)|0); $129 = tempRet0; $130 = (_bitshift64Lshr(($128|0),($129|0),7)|0); @@ -15124,65 +15886,65 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $132 = (_load_347($c)|0); $133 = tempRet0; $134 = $132 & 2097151; - $135 = (($c) + 2|0); + $135 = ((($c)) + 2|0); $136 = (_load_448($135)|0); $137 = tempRet0; $138 = (_bitshift64Lshr(($136|0),($137|0),5)|0); $139 = tempRet0; $140 = $138 & 2097151; - $141 = (($c) + 5|0); + $141 = ((($c)) + 5|0); $142 = (_load_347($141)|0); $143 = tempRet0; $144 = (_bitshift64Lshr(($142|0),($143|0),2)|0); $145 = tempRet0; $146 = $144 & 2097151; - $147 = (($c) + 7|0); + $147 = ((($c)) + 7|0); $148 = (_load_448($147)|0); $149 = tempRet0; $150 = (_bitshift64Lshr(($148|0),($149|0),7)|0); $151 = tempRet0; $152 = $150 & 2097151; - $153 = (($c) + 10|0); + $153 = ((($c)) + 10|0); $154 = (_load_448($153)|0); $155 = tempRet0; $156 = (_bitshift64Lshr(($154|0),($155|0),4)|0); $157 = tempRet0; $158 = $156 & 2097151; - $159 = (($c) + 13|0); + $159 = ((($c)) + 13|0); $160 = (_load_347($159)|0); $161 = tempRet0; $162 = (_bitshift64Lshr(($160|0),($161|0),1)|0); $163 = tempRet0; $164 = $162 & 2097151; - $165 = (($c) + 15|0); + $165 = ((($c)) + 15|0); $166 = (_load_448($165)|0); $167 = tempRet0; $168 = (_bitshift64Lshr(($166|0),($167|0),6)|0); $169 = tempRet0; $170 = $168 & 2097151; - $171 = (($c) + 18|0); + $171 = ((($c)) + 18|0); $172 = (_load_347($171)|0); $173 = tempRet0; $174 = (_bitshift64Lshr(($172|0),($173|0),3)|0); $175 = tempRet0; $176 = $174 & 2097151; - $177 = (($c) + 21|0); + $177 = ((($c)) + 21|0); $178 = (_load_347($177)|0); $179 = tempRet0; $180 = $178 & 2097151; - $181 = (($c) + 23|0); + $181 = ((($c)) + 23|0); $182 = (_load_448($181)|0); $183 = tempRet0; $184 = (_bitshift64Lshr(($182|0),($183|0),5)|0); $185 = tempRet0; $186 = $184 & 2097151; - $187 = (($c) + 26|0); + $187 = ((($c)) + 26|0); $188 = (_load_347($187)|0); $189 = tempRet0; $190 = (_bitshift64Lshr(($188|0),($189|0),2)|0); $191 = tempRet0; $192 = $190 & 2097151; - $193 = (($c) + 28|0); + $193 = ((($c)) + 28|0); $194 = (_load_448($193)|0); $195 = tempRet0; $196 = (_bitshift64Lshr(($194|0),($195|0),7)|0); @@ -15745,721 +16507,721 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $753 = tempRet0; $754 = (_bitshift64Shl(($726|0),($727|0),21)|0); $755 = tempRet0; - $756 = (_i64Add(($466|0),($467|0),1048576,0)|0); + $756 = (_i64Subtract(($400|0),($401|0),($754|0),($755|0))|0); $757 = tempRet0; - $758 = (_bitshift64Ashr(($756|0),($757|0),21)|0); + $758 = (_i64Add(($466|0),($467|0),1048576,0)|0); $759 = tempRet0; - $760 = (_i64Add(($484|0),($485|0),($486|0),($487|0))|0); + $760 = (_bitshift64Ashr(($758|0),($759|0),21)|0); $761 = tempRet0; - $762 = (_i64Add(($760|0),($761|0),($482|0),($483|0))|0); + $762 = (_i64Add(($484|0),($485|0),($486|0),($487|0))|0); $763 = tempRet0; - $764 = (_i64Add(($762|0),($763|0),($480|0),($481|0))|0); + $764 = (_i64Add(($762|0),($763|0),($482|0),($483|0))|0); $765 = tempRet0; - $766 = (_i64Add(($764|0),($765|0),($478|0),($479|0))|0); + $766 = (_i64Add(($764|0),($765|0),($480|0),($481|0))|0); $767 = tempRet0; - $768 = (_i64Add(($766|0),($767|0),($474|0),($475|0))|0); + $768 = (_i64Add(($766|0),($767|0),($478|0),($479|0))|0); $769 = tempRet0; - $770 = (_i64Add(($768|0),($769|0),($476|0),($477|0))|0); + $770 = (_i64Add(($768|0),($769|0),($474|0),($475|0))|0); $771 = tempRet0; - $772 = (_i64Add(($770|0),($771|0),($472|0),($473|0))|0); + $772 = (_i64Add(($770|0),($771|0),($476|0),($477|0))|0); $773 = tempRet0; - $774 = (_i64Add(($772|0),($773|0),($470|0),($471|0))|0); + $774 = (_i64Add(($772|0),($773|0),($472|0),($473|0))|0); $775 = tempRet0; - $776 = (_i64Add(($774|0),($775|0),($468|0),($469|0))|0); + $776 = (_i64Add(($774|0),($775|0),($470|0),($471|0))|0); $777 = tempRet0; - $778 = (_i64Add(($776|0),($777|0),($758|0),($759|0))|0); + $778 = (_i64Add(($776|0),($777|0),($468|0),($469|0))|0); $779 = tempRet0; - $780 = (_bitshift64Shl(($758|0),($759|0),21)|0); + $780 = (_i64Add(($778|0),($779|0),($760|0),($761|0))|0); $781 = tempRet0; - $782 = (_i64Add(($520|0),($521|0),1048576,0)|0); + $782 = (_bitshift64Shl(($760|0),($761|0),21)|0); $783 = tempRet0; - $784 = (_bitshift64Ashr(($782|0),($783|0),21)|0); + $784 = (_i64Subtract(($466|0),($467|0),($782|0),($783|0))|0); $785 = tempRet0; - $786 = (_i64Add(($534|0),($535|0),($536|0),($537|0))|0); + $786 = (_i64Add(($520|0),($521|0),1048576,0)|0); $787 = tempRet0; - $788 = (_i64Add(($786|0),($787|0),($532|0),($533|0))|0); + $788 = (_bitshift64Ashr(($786|0),($787|0),21)|0); $789 = tempRet0; - $790 = (_i64Add(($788|0),($789|0),($528|0),($529|0))|0); + $790 = (_i64Add(($534|0),($535|0),($536|0),($537|0))|0); $791 = tempRet0; - $792 = (_i64Add(($790|0),($791|0),($530|0),($531|0))|0); + $792 = (_i64Add(($790|0),($791|0),($532|0),($533|0))|0); $793 = tempRet0; - $794 = (_i64Add(($792|0),($793|0),($526|0),($527|0))|0); + $794 = (_i64Add(($792|0),($793|0),($528|0),($529|0))|0); $795 = tempRet0; - $796 = (_i64Add(($794|0),($795|0),($524|0),($525|0))|0); + $796 = (_i64Add(($794|0),($795|0),($530|0),($531|0))|0); $797 = tempRet0; - $798 = (_i64Add(($796|0),($797|0),($522|0),($523|0))|0); + $798 = (_i64Add(($796|0),($797|0),($526|0),($527|0))|0); $799 = tempRet0; - $800 = (_i64Add(($798|0),($799|0),($784|0),($785|0))|0); + $800 = (_i64Add(($798|0),($799|0),($524|0),($525|0))|0); $801 = tempRet0; - $802 = (_bitshift64Shl(($784|0),($785|0),21)|0); + $802 = (_i64Add(($800|0),($801|0),($522|0),($523|0))|0); $803 = tempRet0; - $804 = (_i64Add(($562|0),($563|0),1048576,0)|0); + $804 = (_i64Add(($802|0),($803|0),($788|0),($789|0))|0); $805 = tempRet0; - $806 = (_bitshift64Ashr(($804|0),($805|0),21)|0); + $806 = (_bitshift64Shl(($788|0),($789|0),21)|0); $807 = tempRet0; - $808 = (_i64Add(($570|0),($571|0),($574|0),($575|0))|0); + $808 = (_i64Subtract(($520|0),($521|0),($806|0),($807|0))|0); $809 = tempRet0; - $810 = (_i64Add(($808|0),($809|0),($572|0),($573|0))|0); + $810 = (_i64Add(($562|0),($563|0),1048576,0)|0); $811 = tempRet0; - $812 = (_i64Add(($810|0),($811|0),($568|0),($569|0))|0); + $812 = (_bitshift64Ashr(($810|0),($811|0),21)|0); $813 = tempRet0; - $814 = (_i64Add(($812|0),($813|0),($566|0),($567|0))|0); + $814 = (_i64Add(($570|0),($571|0),($574|0),($575|0))|0); $815 = tempRet0; - $816 = (_i64Add(($814|0),($815|0),($564|0),($565|0))|0); + $816 = (_i64Add(($814|0),($815|0),($572|0),($573|0))|0); $817 = tempRet0; - $818 = (_i64Add(($816|0),($817|0),($806|0),($807|0))|0); + $818 = (_i64Add(($816|0),($817|0),($568|0),($569|0))|0); $819 = tempRet0; - $820 = (_bitshift64Shl(($806|0),($807|0),21)|0); + $820 = (_i64Add(($818|0),($819|0),($566|0),($567|0))|0); $821 = tempRet0; - $822 = (_i64Add(($592|0),($593|0),1048576,0)|0); + $822 = (_i64Add(($820|0),($821|0),($564|0),($565|0))|0); $823 = tempRet0; - $824 = (_bitshift64Ashr(($822|0),($823|0),21)|0); + $824 = (_i64Add(($822|0),($823|0),($812|0),($813|0))|0); $825 = tempRet0; - $826 = (_i64Add(($598|0),($599|0),($600|0),($601|0))|0); + $826 = (_bitshift64Shl(($812|0),($813|0),21)|0); $827 = tempRet0; - $828 = (_i64Add(($826|0),($827|0),($596|0),($597|0))|0); + $828 = (_i64Subtract(($562|0),($563|0),($826|0),($827|0))|0); $829 = tempRet0; - $830 = (_i64Add(($828|0),($829|0),($594|0),($595|0))|0); + $830 = (_i64Add(($592|0),($593|0),1048576,0)|0); $831 = tempRet0; - $832 = (_i64Add(($830|0),($831|0),($824|0),($825|0))|0); + $832 = (_bitshift64Ashr(($830|0),($831|0),21)|0); $833 = tempRet0; - $834 = (_bitshift64Shl(($824|0),($825|0),21)|0); + $834 = (_i64Add(($598|0),($599|0),($600|0),($601|0))|0); $835 = tempRet0; - $836 = (_i64Subtract(($592|0),($593|0),($834|0),($835|0))|0); + $836 = (_i64Add(($834|0),($835|0),($596|0),($597|0))|0); $837 = tempRet0; - $838 = (_i64Add(($610|0),($611|0),1048576,0)|0); + $838 = (_i64Add(($836|0),($837|0),($594|0),($595|0))|0); $839 = tempRet0; - $840 = (_bitshift64Lshr(($838|0),($839|0),21)|0); + $840 = (_i64Add(($838|0),($839|0),($832|0),($833|0))|0); $841 = tempRet0; - $842 = (_i64Add(($616|0),($617|0),($840|0),($841|0))|0); + $842 = (_bitshift64Shl(($832|0),($833|0),21)|0); $843 = tempRet0; - $844 = (_bitshift64Shl(($840|0),($841|0),21)|0); + $844 = (_i64Subtract(($592|0),($593|0),($842|0),($843|0))|0); $845 = tempRet0; - $846 = (_i64Subtract(($610|0),($611|0),($844|0),($845|0))|0); + $846 = (_i64Add(($610|0),($611|0),1048576,0)|0); $847 = tempRet0; - $848 = (_i64Add(($618|0),($619|0),1048576,0)|0); + $848 = (_bitshift64Lshr(($846|0),($847|0),21)|0); $849 = tempRet0; - $850 = (_bitshift64Lshr(($848|0),($849|0),21)|0); + $850 = (_i64Add(($616|0),($617|0),($848|0),($849|0))|0); $851 = tempRet0; - $852 = (_bitshift64Shl(($850|0),($851|0),21)|0); + $852 = (_bitshift64Shl(($848|0),($849|0),21)|0); $853 = tempRet0; - $854 = (_i64Subtract(($618|0),($619|0),($852|0),($853|0))|0); + $854 = (_i64Subtract(($610|0),($611|0),($852|0),($853|0))|0); $855 = tempRet0; - $856 = (_i64Add(($628|0),($629|0),1048576,0)|0); + $856 = (_i64Add(($618|0),($619|0),1048576,0)|0); $857 = tempRet0; $858 = (_bitshift64Lshr(($856|0),($857|0),21)|0); $859 = tempRet0; $860 = (_bitshift64Shl(($858|0),($859|0),21)|0); $861 = tempRet0; - $862 = (_i64Subtract(($628|0),($629|0),($860|0),($861|0))|0); + $862 = (_i64Subtract(($618|0),($619|0),($860|0),($861|0))|0); $863 = tempRet0; - $864 = (_i64Add(($646|0),($647|0),1048576,0)|0); + $864 = (_i64Add(($628|0),($629|0),1048576,0)|0); $865 = tempRet0; - $866 = (_bitshift64Ashr(($864|0),($865|0),21)|0); + $866 = (_bitshift64Lshr(($864|0),($865|0),21)|0); $867 = tempRet0; - $868 = (_i64Add(($670|0),($671|0),($866|0),($867|0))|0); + $868 = (_bitshift64Shl(($866|0),($867|0),21)|0); $869 = tempRet0; - $870 = (_bitshift64Shl(($866|0),($867|0),21)|0); + $870 = (_i64Subtract(($628|0),($629|0),($868|0),($869|0))|0); $871 = tempRet0; - $872 = (_i64Subtract(($646|0),($647|0),($870|0),($871|0))|0); + $872 = (_i64Add(($646|0),($647|0),1048576,0)|0); $873 = tempRet0; - $874 = (_i64Add(($666|0),($667|0),1048576,0)|0); + $874 = (_bitshift64Ashr(($872|0),($873|0),21)|0); $875 = tempRet0; - $876 = (_bitshift64Ashr(($874|0),($875|0),21)|0); + $876 = (_i64Add(($874|0),($875|0),($670|0),($671|0))|0); $877 = tempRet0; - $878 = (_bitshift64Shl(($876|0),($877|0),21)|0); + $878 = (_bitshift64Shl(($874|0),($875|0),21)|0); $879 = tempRet0; - $880 = (_i64Subtract(($666|0),($667|0),($878|0),($879|0))|0); + $880 = (_i64Subtract(($646|0),($647|0),($878|0),($879|0))|0); $881 = tempRet0; - $882 = (_i64Add(($692|0),($693|0),1048576,0)|0); + $882 = (_i64Add(($666|0),($667|0),1048576,0)|0); $883 = tempRet0; $884 = (_bitshift64Ashr(($882|0),($883|0),21)|0); $885 = tempRet0; $886 = (_bitshift64Shl(($884|0),($885|0),21)|0); $887 = tempRet0; - $888 = (_i64Add(($720|0),($721|0),1048576,0)|0); + $888 = (_i64Subtract(($666|0),($667|0),($886|0),($887|0))|0); $889 = tempRet0; - $890 = (_bitshift64Ashr(($888|0),($889|0),21)|0); + $890 = (_i64Add(($692|0),($693|0),1048576,0)|0); $891 = tempRet0; - $892 = (_bitshift64Shl(($890|0),($891|0),21)|0); + $892 = (_bitshift64Ashr(($890|0),($891|0),21)|0); $893 = tempRet0; - $894 = (_i64Add(($752|0),($753|0),1048576,0)|0); + $894 = (_bitshift64Shl(($892|0),($893|0),21)|0); $895 = tempRet0; - $896 = (_bitshift64Ashr(($894|0),($895|0),21)|0); + $896 = (_i64Add(($720|0),($721|0),1048576,0)|0); $897 = tempRet0; - $898 = (_bitshift64Shl(($896|0),($897|0),21)|0); + $898 = (_bitshift64Ashr(($896|0),($897|0),21)|0); $899 = tempRet0; - $900 = (_i64Add(($778|0),($779|0),1048576,0)|0); + $900 = (_i64Add(($898|0),($899|0),($756|0),($757|0))|0); $901 = tempRet0; - $902 = (_bitshift64Ashr(($900|0),($901|0),21)|0); + $902 = (_bitshift64Shl(($898|0),($899|0),21)|0); $903 = tempRet0; - $904 = (_bitshift64Shl(($902|0),($903|0),21)|0); + $904 = (_i64Subtract(($720|0),($721|0),($902|0),($903|0))|0); $905 = tempRet0; - $906 = (_i64Add(($800|0),($801|0),1048576,0)|0); + $906 = (_i64Add(($752|0),($753|0),1048576,0)|0); $907 = tempRet0; $908 = (_bitshift64Ashr(($906|0),($907|0),21)|0); $909 = tempRet0; - $910 = (_bitshift64Shl(($908|0),($909|0),21)|0); + $910 = (_i64Add(($784|0),($785|0),($908|0),($909|0))|0); $911 = tempRet0; - $912 = (_i64Add(($818|0),($819|0),1048576,0)|0); + $912 = (_bitshift64Shl(($908|0),($909|0),21)|0); $913 = tempRet0; - $914 = (_bitshift64Ashr(($912|0),($913|0),21)|0); + $914 = (_i64Subtract(($752|0),($753|0),($912|0),($913|0))|0); $915 = tempRet0; - $916 = (_i64Add(($914|0),($915|0),($836|0),($837|0))|0); + $916 = (_i64Add(($780|0),($781|0),1048576,0)|0); $917 = tempRet0; - $918 = (_bitshift64Shl(($914|0),($915|0),21)|0); + $918 = (_bitshift64Ashr(($916|0),($917|0),21)|0); $919 = tempRet0; - $920 = (_i64Subtract(($818|0),($819|0),($918|0),($919|0))|0); + $920 = (_i64Add(($808|0),($809|0),($918|0),($919|0))|0); $921 = tempRet0; - $922 = (_i64Add(($832|0),($833|0),1048576,0)|0); + $922 = (_bitshift64Shl(($918|0),($919|0),21)|0); $923 = tempRet0; - $924 = (_bitshift64Ashr(($922|0),($923|0),21)|0); + $924 = (_i64Subtract(($780|0),($781|0),($922|0),($923|0))|0); $925 = tempRet0; - $926 = (_i64Add(($924|0),($925|0),($846|0),($847|0))|0); + $926 = (_i64Add(($804|0),($805|0),1048576,0)|0); $927 = tempRet0; - $928 = (_bitshift64Shl(($924|0),($925|0),21)|0); + $928 = (_bitshift64Ashr(($926|0),($927|0),21)|0); $929 = tempRet0; - $930 = (_i64Subtract(($832|0),($833|0),($928|0),($929|0))|0); + $930 = (_i64Add(($828|0),($829|0),($928|0),($929|0))|0); $931 = tempRet0; - $932 = (_i64Add(($842|0),($843|0),1048576,0)|0); + $932 = (_bitshift64Shl(($928|0),($929|0),21)|0); $933 = tempRet0; - $934 = (_bitshift64Lshr(($932|0),($933|0),21)|0); + $934 = (_i64Subtract(($804|0),($805|0),($932|0),($933|0))|0); $935 = tempRet0; - $936 = (_i64Add(($934|0),($935|0),($854|0),($855|0))|0); + $936 = (_i64Add(($824|0),($825|0),1048576,0)|0); $937 = tempRet0; - $938 = (_bitshift64Shl(($934|0),($935|0),21)|0); + $938 = (_bitshift64Ashr(($936|0),($937|0),21)|0); $939 = tempRet0; - $940 = (_i64Subtract(($842|0),($843|0),($938|0),($939|0))|0); + $940 = (_i64Add(($938|0),($939|0),($844|0),($845|0))|0); $941 = tempRet0; - $942 = (___muldi3(($850|0),($851|0),666643,0)|0); + $942 = (_bitshift64Shl(($938|0),($939|0),21)|0); $943 = tempRet0; - $944 = (___muldi3(($850|0),($851|0),470296,0)|0); + $944 = (_i64Subtract(($824|0),($825|0),($942|0),($943|0))|0); $945 = tempRet0; - $946 = (___muldi3(($850|0),($851|0),654183,0)|0); + $946 = (_i64Add(($840|0),($841|0),1048576,0)|0); $947 = tempRet0; - $948 = (___muldi3(($850|0),($851|0),-997805,-1)|0); + $948 = (_bitshift64Ashr(($946|0),($947|0),21)|0); $949 = tempRet0; - $950 = (___muldi3(($850|0),($851|0),136657,0)|0); + $950 = (_i64Add(($948|0),($949|0),($854|0),($855|0))|0); $951 = tempRet0; - $952 = (___muldi3(($850|0),($851|0),-683901,-1)|0); + $952 = (_bitshift64Shl(($948|0),($949|0),21)|0); $953 = tempRet0; - $954 = (_i64Add(($952|0),($953|0),($562|0),($563|0))|0); + $954 = (_i64Subtract(($840|0),($841|0),($952|0),($953|0))|0); $955 = tempRet0; - $956 = (_i64Subtract(($954|0),($955|0),($820|0),($821|0))|0); + $956 = (_i64Add(($850|0),($851|0),1048576,0)|0); $957 = tempRet0; - $958 = (_i64Add(($956|0),($957|0),($908|0),($909|0))|0); + $958 = (_bitshift64Lshr(($956|0),($957|0),21)|0); $959 = tempRet0; - $960 = (___muldi3(($936|0),($937|0),666643,0)|0); + $960 = (_i64Add(($958|0),($959|0),($862|0),($863|0))|0); $961 = tempRet0; - $962 = (___muldi3(($936|0),($937|0),470296,0)|0); + $962 = (_bitshift64Shl(($958|0),($959|0),21)|0); $963 = tempRet0; - $964 = (___muldi3(($936|0),($937|0),654183,0)|0); + $964 = (_i64Subtract(($850|0),($851|0),($962|0),($963|0))|0); $965 = tempRet0; - $966 = (___muldi3(($936|0),($937|0),-997805,-1)|0); + $966 = (___muldi3(($858|0),($859|0),666643,0)|0); $967 = tempRet0; - $968 = (___muldi3(($936|0),($937|0),136657,0)|0); + $968 = (_i64Add(($966|0),($967|0),($914|0),($915|0))|0); $969 = tempRet0; - $970 = (___muldi3(($936|0),($937|0),-683901,-1)|0); + $970 = (___muldi3(($858|0),($859|0),470296,0)|0); $971 = tempRet0; - $972 = (___muldi3(($940|0),($941|0),666643,0)|0); + $972 = (_i64Add(($970|0),($971|0),($910|0),($911|0))|0); $973 = tempRet0; - $974 = (___muldi3(($940|0),($941|0),470296,0)|0); + $974 = (___muldi3(($858|0),($859|0),654183,0)|0); $975 = tempRet0; - $976 = (___muldi3(($940|0),($941|0),654183,0)|0); + $976 = (_i64Add(($974|0),($975|0),($924|0),($925|0))|0); $977 = tempRet0; - $978 = (___muldi3(($940|0),($941|0),-997805,-1)|0); + $978 = (___muldi3(($858|0),($859|0),-997805,-1)|0); $979 = tempRet0; - $980 = (___muldi3(($940|0),($941|0),136657,0)|0); + $980 = (_i64Add(($978|0),($979|0),($920|0),($921|0))|0); $981 = tempRet0; - $982 = (___muldi3(($940|0),($941|0),-683901,-1)|0); + $982 = (___muldi3(($858|0),($859|0),136657,0)|0); $983 = tempRet0; - $984 = (_i64Add(($948|0),($949|0),($520|0),($521|0))|0); + $984 = (_i64Add(($982|0),($983|0),($934|0),($935|0))|0); $985 = tempRet0; - $986 = (_i64Subtract(($984|0),($985|0),($802|0),($803|0))|0); + $986 = (___muldi3(($858|0),($859|0),-683901,-1)|0); $987 = tempRet0; - $988 = (_i64Add(($986|0),($987|0),($902|0),($903|0))|0); + $988 = (_i64Add(($930|0),($931|0),($986|0),($987|0))|0); $989 = tempRet0; - $990 = (_i64Add(($988|0),($989|0),($968|0),($969|0))|0); + $990 = (___muldi3(($960|0),($961|0),666643,0)|0); $991 = tempRet0; - $992 = (_i64Add(($990|0),($991|0),($982|0),($983|0))|0); + $992 = (_i64Add(($990|0),($991|0),($900|0),($901|0))|0); $993 = tempRet0; - $994 = (___muldi3(($926|0),($927|0),666643,0)|0); + $994 = (___muldi3(($960|0),($961|0),470296,0)|0); $995 = tempRet0; - $996 = (___muldi3(($926|0),($927|0),470296,0)|0); + $996 = (_i64Add(($994|0),($995|0),($968|0),($969|0))|0); $997 = tempRet0; - $998 = (___muldi3(($926|0),($927|0),654183,0)|0); + $998 = (___muldi3(($960|0),($961|0),654183,0)|0); $999 = tempRet0; - $1000 = (___muldi3(($926|0),($927|0),-997805,-1)|0); + $1000 = (_i64Add(($998|0),($999|0),($972|0),($973|0))|0); $1001 = tempRet0; - $1002 = (___muldi3(($926|0),($927|0),136657,0)|0); + $1002 = (___muldi3(($960|0),($961|0),-997805,-1)|0); $1003 = tempRet0; - $1004 = (___muldi3(($926|0),($927|0),-683901,-1)|0); + $1004 = (_i64Add(($1002|0),($1003|0),($976|0),($977|0))|0); $1005 = tempRet0; - $1006 = (___muldi3(($930|0),($931|0),666643,0)|0); + $1006 = (___muldi3(($960|0),($961|0),136657,0)|0); $1007 = tempRet0; - $1008 = (___muldi3(($930|0),($931|0),470296,0)|0); + $1008 = (_i64Add(($1006|0),($1007|0),($980|0),($981|0))|0); $1009 = tempRet0; - $1010 = (___muldi3(($930|0),($931|0),654183,0)|0); + $1010 = (___muldi3(($960|0),($961|0),-683901,-1)|0); $1011 = tempRet0; - $1012 = (___muldi3(($930|0),($931|0),-997805,-1)|0); + $1012 = (_i64Add(($984|0),($985|0),($1010|0),($1011|0))|0); $1013 = tempRet0; - $1014 = (___muldi3(($930|0),($931|0),136657,0)|0); + $1014 = (___muldi3(($964|0),($965|0),666643,0)|0); $1015 = tempRet0; - $1016 = (___muldi3(($930|0),($931|0),-683901,-1)|0); + $1016 = (_i64Add(($1014|0),($1015|0),($904|0),($905|0))|0); $1017 = tempRet0; - $1018 = (_i64Add(($944|0),($945|0),($466|0),($467|0))|0); + $1018 = (___muldi3(($964|0),($965|0),470296,0)|0); $1019 = tempRet0; - $1020 = (_i64Subtract(($1018|0),($1019|0),($780|0),($781|0))|0); + $1020 = (_i64Add(($1018|0),($1019|0),($992|0),($993|0))|0); $1021 = tempRet0; - $1022 = (_i64Add(($1020|0),($1021|0),($964|0),($965|0))|0); + $1022 = (___muldi3(($964|0),($965|0),654183,0)|0); $1023 = tempRet0; - $1024 = (_i64Add(($1022|0),($1023|0),($1002|0),($1003|0))|0); + $1024 = (_i64Add(($1022|0),($1023|0),($996|0),($997|0))|0); $1025 = tempRet0; - $1026 = (_i64Add(($1024|0),($1025|0),($978|0),($979|0))|0); + $1026 = (___muldi3(($964|0),($965|0),-997805,-1)|0); $1027 = tempRet0; - $1028 = (_i64Add(($1026|0),($1027|0),($1016|0),($1017|0))|0); + $1028 = (_i64Add(($1026|0),($1027|0),($1000|0),($1001|0))|0); $1029 = tempRet0; - $1030 = (_i64Add(($1028|0),($1029|0),($896|0),($897|0))|0); + $1030 = (___muldi3(($964|0),($965|0),136657,0)|0); $1031 = tempRet0; - $1032 = (___muldi3(($916|0),($917|0),666643,0)|0); + $1032 = (_i64Add(($1030|0),($1031|0),($1004|0),($1005|0))|0); $1033 = tempRet0; - $1034 = (_i64Add(($1032|0),($1033|0),($284|0),($285|0))|0); + $1034 = (___muldi3(($964|0),($965|0),-683901,-1)|0); $1035 = tempRet0; - $1036 = (_i64Subtract(($1034|0),($1035|0),($694|0),($695|0))|0); + $1036 = (_i64Add(($1008|0),($1009|0),($1034|0),($1035|0))|0); $1037 = tempRet0; - $1038 = (_i64Add(($1036|0),($1037|0),($876|0),($877|0))|0); + $1038 = (___muldi3(($950|0),($951|0),666643,0)|0); $1039 = tempRet0; - $1040 = (___muldi3(($916|0),($917|0),470296,0)|0); + $1040 = (___muldi3(($950|0),($951|0),470296,0)|0); $1041 = tempRet0; - $1042 = (___muldi3(($916|0),($917|0),654183,0)|0); + $1042 = (_i64Add(($1040|0),($1041|0),($1016|0),($1017|0))|0); $1043 = tempRet0; - $1044 = (_i64Add(($994|0),($995|0),($336|0),($337|0))|0); + $1044 = (___muldi3(($950|0),($951|0),654183,0)|0); $1045 = tempRet0; - $1046 = (_i64Add(($1044|0),($1045|0),($1042|0),($1043|0))|0); + $1046 = (_i64Add(($1044|0),($1045|0),($1020|0),($1021|0))|0); $1047 = tempRet0; - $1048 = (_i64Add(($1046|0),($1047|0),($1008|0),($1009|0))|0); + $1048 = (___muldi3(($950|0),($951|0),-997805,-1)|0); $1049 = tempRet0; - $1050 = (_i64Subtract(($1048|0),($1049|0),($722|0),($723|0))|0); + $1050 = (_i64Add(($1048|0),($1049|0),($1024|0),($1025|0))|0); $1051 = tempRet0; - $1052 = (_i64Add(($1050|0),($1051|0),($884|0),($885|0))|0); + $1052 = (___muldi3(($950|0),($951|0),136657,0)|0); $1053 = tempRet0; - $1054 = (___muldi3(($916|0),($917|0),-997805,-1)|0); + $1054 = (_i64Add(($1052|0),($1053|0),($1028|0),($1029|0))|0); $1055 = tempRet0; - $1056 = (___muldi3(($916|0),($917|0),136657,0)|0); + $1056 = (___muldi3(($950|0),($951|0),-683901,-1)|0); $1057 = tempRet0; - $1058 = (_i64Add(($998|0),($999|0),($960|0),($961|0))|0); + $1058 = (_i64Add(($1032|0),($1033|0),($1056|0),($1057|0))|0); $1059 = tempRet0; - $1060 = (_i64Add(($1058|0),($1059|0),($1056|0),($1057|0))|0); + $1060 = (___muldi3(($954|0),($955|0),666643,0)|0); $1061 = tempRet0; - $1062 = (_i64Add(($1060|0),($1061|0),($974|0),($975|0))|0); + $1062 = (___muldi3(($954|0),($955|0),470296,0)|0); $1063 = tempRet0; - $1064 = (_i64Add(($1062|0),($1063|0),($1012|0),($1013|0))|0); + $1064 = (___muldi3(($954|0),($955|0),654183,0)|0); $1065 = tempRet0; - $1066 = (_i64Add(($1064|0),($1065|0),($400|0),($401|0))|0); + $1066 = (_i64Add(($1064|0),($1065|0),($1042|0),($1043|0))|0); $1067 = tempRet0; - $1068 = (_i64Add(($1066|0),($1067|0),($890|0),($891|0))|0); + $1068 = (___muldi3(($954|0),($955|0),-997805,-1)|0); $1069 = tempRet0; - $1070 = (_i64Subtract(($1068|0),($1069|0),($754|0),($755|0))|0); + $1070 = (_i64Add(($1046|0),($1047|0),($1068|0),($1069|0))|0); $1071 = tempRet0; - $1072 = (___muldi3(($916|0),($917|0),-683901,-1)|0); + $1072 = (___muldi3(($954|0),($955|0),136657,0)|0); $1073 = tempRet0; - $1074 = (_i64Add(($1038|0),($1039|0),1048576,0)|0); + $1074 = (_i64Add(($1072|0),($1073|0),($1050|0),($1051|0))|0); $1075 = tempRet0; - $1076 = (_bitshift64Ashr(($1074|0),($1075|0),21)|0); + $1076 = (___muldi3(($954|0),($955|0),-683901,-1)|0); $1077 = tempRet0; - $1078 = (_i64Add(($1006|0),($1007|0),($1040|0),($1041|0))|0); + $1078 = (_i64Add(($1054|0),($1055|0),($1076|0),($1077|0))|0); $1079 = tempRet0; - $1080 = (_i64Add(($1078|0),($1079|0),($692|0),($693|0))|0); + $1080 = (___muldi3(($940|0),($941|0),666643,0)|0); $1081 = tempRet0; - $1082 = (_i64Subtract(($1080|0),($1081|0),($886|0),($887|0))|0); + $1082 = (_i64Add(($284|0),($285|0),($1080|0),($1081|0))|0); $1083 = tempRet0; - $1084 = (_i64Add(($1082|0),($1083|0),($1076|0),($1077|0))|0); + $1084 = (_i64Add(($1082|0),($1083|0),($884|0),($885|0))|0); $1085 = tempRet0; - $1086 = (_bitshift64Shl(($1076|0),($1077|0),21)|0); + $1086 = (_i64Subtract(($1084|0),($1085|0),($694|0),($695|0))|0); $1087 = tempRet0; - $1088 = (_i64Add(($1052|0),($1053|0),1048576,0)|0); + $1088 = (___muldi3(($940|0),($941|0),470296,0)|0); $1089 = tempRet0; - $1090 = (_bitshift64Ashr(($1088|0),($1089|0),21)|0); + $1090 = (___muldi3(($940|0),($941|0),654183,0)|0); $1091 = tempRet0; - $1092 = (_i64Add(($1054|0),($1055|0),($996|0),($997|0))|0); + $1092 = (_i64Add(($1062|0),($1063|0),($1038|0),($1039|0))|0); $1093 = tempRet0; - $1094 = (_i64Add(($1092|0),($1093|0),($972|0),($973|0))|0); + $1094 = (_i64Add(($1092|0),($1093|0),($1090|0),($1091|0))|0); $1095 = tempRet0; - $1096 = (_i64Add(($1094|0),($1095|0),($1010|0),($1011|0))|0); + $1096 = (_i64Add(($1094|0),($1095|0),($336|0),($337|0))|0); $1097 = tempRet0; - $1098 = (_i64Add(($1096|0),($1097|0),($720|0),($721|0))|0); + $1098 = (_i64Add(($1096|0),($1097|0),($892|0),($893|0))|0); $1099 = tempRet0; - $1100 = (_i64Subtract(($1098|0),($1099|0),($892|0),($893|0))|0); + $1100 = (_i64Subtract(($1098|0),($1099|0),($722|0),($723|0))|0); $1101 = tempRet0; - $1102 = (_i64Add(($1100|0),($1101|0),($1090|0),($1091|0))|0); + $1102 = (___muldi3(($940|0),($941|0),-997805,-1)|0); $1103 = tempRet0; - $1104 = (_bitshift64Shl(($1090|0),($1091|0),21)|0); + $1104 = (_i64Add(($1066|0),($1067|0),($1102|0),($1103|0))|0); $1105 = tempRet0; - $1106 = (_i64Add(($1070|0),($1071|0),1048576,0)|0); + $1106 = (___muldi3(($940|0),($941|0),136657,0)|0); $1107 = tempRet0; - $1108 = (_bitshift64Ashr(($1106|0),($1107|0),21)|0); + $1108 = (_i64Add(($1070|0),($1071|0),($1106|0),($1107|0))|0); $1109 = tempRet0; - $1110 = (_i64Add(($962|0),($963|0),($942|0),($943|0))|0); + $1110 = (___muldi3(($940|0),($941|0),-683901,-1)|0); $1111 = tempRet0; - $1112 = (_i64Add(($1110|0),($1111|0),($1000|0),($1001|0))|0); + $1112 = (_i64Add(($1074|0),($1075|0),($1110|0),($1111|0))|0); $1113 = tempRet0; - $1114 = (_i64Add(($1112|0),($1113|0),($1072|0),($1073|0))|0); + $1114 = (_i64Add(($1086|0),($1087|0),1048576,0)|0); $1115 = tempRet0; - $1116 = (_i64Add(($1114|0),($1115|0),($976|0),($977|0))|0); + $1116 = (_bitshift64Ashr(($1114|0),($1115|0),21)|0); $1117 = tempRet0; - $1118 = (_i64Add(($1116|0),($1117|0),($1014|0),($1015|0))|0); + $1118 = (_i64Add(($1088|0),($1089|0),($1060|0),($1061|0))|0); $1119 = tempRet0; - $1120 = (_i64Add(($1118|0),($1119|0),($752|0),($753|0))|0); + $1120 = (_i64Add(($1118|0),($1119|0),($692|0),($693|0))|0); $1121 = tempRet0; - $1122 = (_i64Subtract(($1120|0),($1121|0),($898|0),($899|0))|0); + $1122 = (_i64Subtract(($1120|0),($1121|0),($894|0),($895|0))|0); $1123 = tempRet0; - $1124 = (_i64Add(($1122|0),($1123|0),($1108|0),($1109|0))|0); + $1124 = (_i64Add(($1122|0),($1123|0),($1116|0),($1117|0))|0); $1125 = tempRet0; - $1126 = (_bitshift64Shl(($1108|0),($1109|0),21)|0); + $1126 = (_bitshift64Shl(($1116|0),($1117|0),21)|0); $1127 = tempRet0; - $1128 = (_i64Add(($1030|0),($1031|0),1048576,0)|0); + $1128 = (_i64Subtract(($1086|0),($1087|0),($1126|0),($1127|0))|0); $1129 = tempRet0; - $1130 = (_bitshift64Ashr(($1128|0),($1129|0),21)|0); + $1130 = (_i64Add(($1100|0),($1101|0),1048576,0)|0); $1131 = tempRet0; - $1132 = (_i64Add(($778|0),($779|0),($946|0),($947|0))|0); + $1132 = (_bitshift64Ashr(($1130|0),($1131|0),21)|0); $1133 = tempRet0; - $1134 = (_i64Subtract(($1132|0),($1133|0),($904|0),($905|0))|0); + $1134 = (_i64Add(($1104|0),($1105|0),($1132|0),($1133|0))|0); $1135 = tempRet0; - $1136 = (_i64Add(($1134|0),($1135|0),($966|0),($967|0))|0); + $1136 = (_bitshift64Shl(($1132|0),($1133|0),21)|0); $1137 = tempRet0; - $1138 = (_i64Add(($1136|0),($1137|0),($1004|0),($1005|0))|0); + $1138 = (_i64Subtract(($1100|0),($1101|0),($1136|0),($1137|0))|0); $1139 = tempRet0; - $1140 = (_i64Add(($1138|0),($1139|0),($980|0),($981|0))|0); + $1140 = (_i64Add(($1108|0),($1109|0),1048576,0)|0); $1141 = tempRet0; - $1142 = (_i64Add(($1140|0),($1141|0),($1130|0),($1131|0))|0); + $1142 = (_bitshift64Ashr(($1140|0),($1141|0),21)|0); $1143 = tempRet0; - $1144 = (_bitshift64Shl(($1130|0),($1131|0),21)|0); + $1144 = (_i64Add(($1112|0),($1113|0),($1142|0),($1143|0))|0); $1145 = tempRet0; - $1146 = (_i64Subtract(($1030|0),($1031|0),($1144|0),($1145|0))|0); + $1146 = (_bitshift64Shl(($1142|0),($1143|0),21)|0); $1147 = tempRet0; - $1148 = (_i64Add(($992|0),($993|0),1048576,0)|0); + $1148 = (_i64Subtract(($1108|0),($1109|0),($1146|0),($1147|0))|0); $1149 = tempRet0; - $1150 = (_bitshift64Ashr(($1148|0),($1149|0),21)|0); + $1150 = (_i64Add(($1078|0),($1079|0),1048576,0)|0); $1151 = tempRet0; - $1152 = (_i64Add(($800|0),($801|0),($950|0),($951|0))|0); + $1152 = (_bitshift64Ashr(($1150|0),($1151|0),21)|0); $1153 = tempRet0; - $1154 = (_i64Subtract(($1152|0),($1153|0),($910|0),($911|0))|0); + $1154 = (_i64Add(($1152|0),($1153|0),($1058|0),($1059|0))|0); $1155 = tempRet0; - $1156 = (_i64Add(($1154|0),($1155|0),($970|0),($971|0))|0); + $1156 = (_bitshift64Shl(($1152|0),($1153|0),21)|0); $1157 = tempRet0; - $1158 = (_i64Add(($1156|0),($1157|0),($1150|0),($1151|0))|0); + $1158 = (_i64Subtract(($1078|0),($1079|0),($1156|0),($1157|0))|0); $1159 = tempRet0; - $1160 = (_bitshift64Shl(($1150|0),($1151|0),21)|0); + $1160 = (_i64Add(($1036|0),($1037|0),1048576,0)|0); $1161 = tempRet0; - $1162 = (_i64Subtract(($992|0),($993|0),($1160|0),($1161|0))|0); + $1162 = (_bitshift64Ashr(($1160|0),($1161|0),21)|0); $1163 = tempRet0; - $1164 = (_i64Add(($958|0),($959|0),1048576,0)|0); + $1164 = (_i64Add(($1162|0),($1163|0),($1012|0),($1013|0))|0); $1165 = tempRet0; - $1166 = (_bitshift64Ashr(($1164|0),($1165|0),21)|0); + $1166 = (_bitshift64Shl(($1162|0),($1163|0),21)|0); $1167 = tempRet0; - $1168 = (_i64Add(($1166|0),($1167|0),($920|0),($921|0))|0); + $1168 = (_i64Subtract(($1036|0),($1037|0),($1166|0),($1167|0))|0); $1169 = tempRet0; - $1170 = (_bitshift64Shl(($1166|0),($1167|0),21)|0); + $1170 = (_i64Add(($988|0),($989|0),1048576,0)|0); $1171 = tempRet0; - $1172 = (_i64Subtract(($958|0),($959|0),($1170|0),($1171|0))|0); + $1172 = (_bitshift64Ashr(($1170|0),($1171|0),21)|0); $1173 = tempRet0; - $1174 = (_i64Add(($1084|0),($1085|0),1048576,0)|0); + $1174 = (_i64Add(($1172|0),($1173|0),($944|0),($945|0))|0); $1175 = tempRet0; - $1176 = (_bitshift64Ashr(($1174|0),($1175|0),21)|0); + $1176 = (_bitshift64Shl(($1172|0),($1173|0),21)|0); $1177 = tempRet0; - $1178 = (_bitshift64Shl(($1176|0),($1177|0),21)|0); + $1178 = (_i64Subtract(($988|0),($989|0),($1176|0),($1177|0))|0); $1179 = tempRet0; - $1180 = (_i64Add(($1102|0),($1103|0),1048576,0)|0); + $1180 = (_i64Add(($1124|0),($1125|0),1048576,0)|0); $1181 = tempRet0; $1182 = (_bitshift64Ashr(($1180|0),($1181|0),21)|0); $1183 = tempRet0; - $1184 = (_bitshift64Shl(($1182|0),($1183|0),21)|0); + $1184 = (_i64Add(($1182|0),($1183|0),($1138|0),($1139|0))|0); $1185 = tempRet0; - $1186 = (_i64Add(($1124|0),($1125|0),1048576,0)|0); + $1186 = (_bitshift64Shl(($1182|0),($1183|0),21)|0); $1187 = tempRet0; - $1188 = (_bitshift64Ashr(($1186|0),($1187|0),21)|0); + $1188 = (_i64Subtract(($1124|0),($1125|0),($1186|0),($1187|0))|0); $1189 = tempRet0; - $1190 = (_i64Add(($1146|0),($1147|0),($1188|0),($1189|0))|0); + $1190 = (_i64Add(($1134|0),($1135|0),1048576,0)|0); $1191 = tempRet0; - $1192 = (_bitshift64Shl(($1188|0),($1189|0),21)|0); + $1192 = (_bitshift64Ashr(($1190|0),($1191|0),21)|0); $1193 = tempRet0; - $1194 = (_i64Subtract(($1124|0),($1125|0),($1192|0),($1193|0))|0); + $1194 = (_i64Add(($1192|0),($1193|0),($1148|0),($1149|0))|0); $1195 = tempRet0; - $1196 = (_i64Add(($1142|0),($1143|0),1048576,0)|0); + $1196 = (_bitshift64Shl(($1192|0),($1193|0),21)|0); $1197 = tempRet0; - $1198 = (_bitshift64Ashr(($1196|0),($1197|0),21)|0); + $1198 = (_i64Subtract(($1134|0),($1135|0),($1196|0),($1197|0))|0); $1199 = tempRet0; - $1200 = (_i64Add(($1198|0),($1199|0),($1162|0),($1163|0))|0); + $1200 = (_i64Add(($1144|0),($1145|0),1048576,0)|0); $1201 = tempRet0; - $1202 = (_bitshift64Shl(($1198|0),($1199|0),21)|0); + $1202 = (_bitshift64Ashr(($1200|0),($1201|0),21)|0); $1203 = tempRet0; - $1204 = (_i64Subtract(($1142|0),($1143|0),($1202|0),($1203|0))|0); + $1204 = (_i64Add(($1202|0),($1203|0),($1158|0),($1159|0))|0); $1205 = tempRet0; - $1206 = (_i64Add(($1158|0),($1159|0),1048576,0)|0); + $1206 = (_bitshift64Shl(($1202|0),($1203|0),21)|0); $1207 = tempRet0; - $1208 = (_bitshift64Ashr(($1206|0),($1207|0),21)|0); + $1208 = (_i64Subtract(($1144|0),($1145|0),($1206|0),($1207|0))|0); $1209 = tempRet0; - $1210 = (_i64Add(($1208|0),($1209|0),($1172|0),($1173|0))|0); + $1210 = (_i64Add(($1154|0),($1155|0),1048576,0)|0); $1211 = tempRet0; - $1212 = (_bitshift64Shl(($1208|0),($1209|0),21)|0); + $1212 = (_bitshift64Ashr(($1210|0),($1211|0),21)|0); $1213 = tempRet0; - $1214 = (_i64Subtract(($1158|0),($1159|0),($1212|0),($1213|0))|0); + $1214 = (_i64Add(($1212|0),($1213|0),($1168|0),($1169|0))|0); $1215 = tempRet0; - $1216 = (___muldi3(($1168|0),($1169|0),666643,0)|0); + $1216 = (_bitshift64Shl(($1212|0),($1213|0),21)|0); $1217 = tempRet0; - $1218 = (_i64Add(($880|0),($881|0),($1216|0),($1217|0))|0); + $1218 = (_i64Subtract(($1154|0),($1155|0),($1216|0),($1217|0))|0); $1219 = tempRet0; - $1220 = (___muldi3(($1168|0),($1169|0),470296,0)|0); + $1220 = (_i64Add(($1164|0),($1165|0),1048576,0)|0); $1221 = tempRet0; - $1222 = (___muldi3(($1168|0),($1169|0),654183,0)|0); + $1222 = (_bitshift64Ashr(($1220|0),($1221|0),21)|0); $1223 = tempRet0; - $1224 = (___muldi3(($1168|0),($1169|0),-997805,-1)|0); + $1224 = (_i64Add(($1222|0),($1223|0),($1178|0),($1179|0))|0); $1225 = tempRet0; - $1226 = (___muldi3(($1168|0),($1169|0),136657,0)|0); + $1226 = (_bitshift64Shl(($1222|0),($1223|0),21)|0); $1227 = tempRet0; - $1228 = (___muldi3(($1168|0),($1169|0),-683901,-1)|0); + $1228 = (_i64Subtract(($1164|0),($1165|0),($1226|0),($1227|0))|0); $1229 = tempRet0; - $1230 = (_i64Add(($1070|0),($1071|0),($1228|0),($1229|0))|0); + $1230 = (___muldi3(($1174|0),($1175|0),666643,0)|0); $1231 = tempRet0; - $1232 = (_i64Subtract(($1230|0),($1231|0),($1126|0),($1127|0))|0); + $1232 = (_i64Add(($888|0),($889|0),($1230|0),($1231|0))|0); $1233 = tempRet0; - $1234 = (_i64Add(($1232|0),($1233|0),($1182|0),($1183|0))|0); + $1234 = (___muldi3(($1174|0),($1175|0),470296,0)|0); $1235 = tempRet0; - $1236 = (___muldi3(($1210|0),($1211|0),666643,0)|0); + $1236 = (_i64Add(($1234|0),($1235|0),($1128|0),($1129|0))|0); $1237 = tempRet0; - $1238 = (_i64Add(($868|0),($869|0),($1236|0),($1237|0))|0); + $1238 = (___muldi3(($1174|0),($1175|0),654183,0)|0); $1239 = tempRet0; - $1240 = (___muldi3(($1210|0),($1211|0),470296,0)|0); + $1240 = (_i64Add(($1238|0),($1239|0),($1188|0),($1189|0))|0); $1241 = tempRet0; - $1242 = (_i64Add(($1218|0),($1219|0),($1240|0),($1241|0))|0); + $1242 = (___muldi3(($1174|0),($1175|0),-997805,-1)|0); $1243 = tempRet0; - $1244 = (___muldi3(($1210|0),($1211|0),654183,0)|0); + $1244 = (_i64Add(($1242|0),($1243|0),($1184|0),($1185|0))|0); $1245 = tempRet0; - $1246 = (___muldi3(($1210|0),($1211|0),-997805,-1)|0); + $1246 = (___muldi3(($1174|0),($1175|0),136657,0)|0); $1247 = tempRet0; - $1248 = (___muldi3(($1210|0),($1211|0),136657,0)|0); + $1248 = (_i64Add(($1246|0),($1247|0),($1198|0),($1199|0))|0); $1249 = tempRet0; - $1250 = (___muldi3(($1210|0),($1211|0),-683901,-1)|0); + $1250 = (___muldi3(($1174|0),($1175|0),-683901,-1)|0); $1251 = tempRet0; - $1252 = (___muldi3(($1214|0),($1215|0),666643,0)|0); + $1252 = (_i64Add(($1194|0),($1195|0),($1250|0),($1251|0))|0); $1253 = tempRet0; - $1254 = (_i64Add(($872|0),($873|0),($1252|0),($1253|0))|0); + $1254 = (___muldi3(($1224|0),($1225|0),666643,0)|0); $1255 = tempRet0; - $1256 = (___muldi3(($1214|0),($1215|0),470296,0)|0); + $1256 = (_i64Add(($876|0),($877|0),($1254|0),($1255|0))|0); $1257 = tempRet0; - $1258 = (_i64Add(($1238|0),($1239|0),($1256|0),($1257|0))|0); + $1258 = (___muldi3(($1224|0),($1225|0),470296,0)|0); $1259 = tempRet0; - $1260 = (___muldi3(($1214|0),($1215|0),654183,0)|0); + $1260 = (_i64Add(($1232|0),($1233|0),($1258|0),($1259|0))|0); $1261 = tempRet0; - $1262 = (_i64Add(($1242|0),($1243|0),($1260|0),($1261|0))|0); + $1262 = (___muldi3(($1224|0),($1225|0),654183,0)|0); $1263 = tempRet0; - $1264 = (___muldi3(($1214|0),($1215|0),-997805,-1)|0); + $1264 = (_i64Add(($1236|0),($1237|0),($1262|0),($1263|0))|0); $1265 = tempRet0; - $1266 = (___muldi3(($1214|0),($1215|0),136657,0)|0); + $1266 = (___muldi3(($1224|0),($1225|0),-997805,-1)|0); $1267 = tempRet0; - $1268 = (___muldi3(($1214|0),($1215|0),-683901,-1)|0); + $1268 = (_i64Add(($1266|0),($1267|0),($1240|0),($1241|0))|0); $1269 = tempRet0; - $1270 = (_i64Add(($1052|0),($1053|0),($1224|0),($1225|0))|0); + $1270 = (___muldi3(($1224|0),($1225|0),136657,0)|0); $1271 = tempRet0; - $1272 = (_i64Subtract(($1270|0),($1271|0),($1104|0),($1105|0))|0); + $1272 = (_i64Add(($1270|0),($1271|0),($1244|0),($1245|0))|0); $1273 = tempRet0; - $1274 = (_i64Add(($1272|0),($1273|0),($1176|0),($1177|0))|0); + $1274 = (___muldi3(($1224|0),($1225|0),-683901,-1)|0); $1275 = tempRet0; - $1276 = (_i64Add(($1274|0),($1275|0),($1248|0),($1249|0))|0); + $1276 = (_i64Add(($1248|0),($1249|0),($1274|0),($1275|0))|0); $1277 = tempRet0; - $1278 = (_i64Add(($1276|0),($1277|0),($1268|0),($1269|0))|0); + $1278 = (___muldi3(($1228|0),($1229|0),666643,0)|0); $1279 = tempRet0; - $1280 = (___muldi3(($1200|0),($1201|0),666643,0)|0); + $1280 = (_i64Add(($880|0),($881|0),($1278|0),($1279|0))|0); $1281 = tempRet0; - $1282 = (___muldi3(($1200|0),($1201|0),470296,0)|0); + $1282 = (___muldi3(($1228|0),($1229|0),470296,0)|0); $1283 = tempRet0; - $1284 = (___muldi3(($1200|0),($1201|0),654183,0)|0); + $1284 = (_i64Add(($1256|0),($1257|0),($1282|0),($1283|0))|0); $1285 = tempRet0; - $1286 = (___muldi3(($1200|0),($1201|0),-997805,-1)|0); + $1286 = (___muldi3(($1228|0),($1229|0),654183,0)|0); $1287 = tempRet0; - $1288 = (___muldi3(($1200|0),($1201|0),136657,0)|0); + $1288 = (_i64Add(($1260|0),($1261|0),($1286|0),($1287|0))|0); $1289 = tempRet0; - $1290 = (___muldi3(($1200|0),($1201|0),-683901,-1)|0); + $1290 = (___muldi3(($1228|0),($1229|0),-997805,-1)|0); $1291 = tempRet0; - $1292 = (___muldi3(($1204|0),($1205|0),666643,0)|0); + $1292 = (_i64Add(($1264|0),($1265|0),($1290|0),($1291|0))|0); $1293 = tempRet0; - $1294 = (___muldi3(($1204|0),($1205|0),470296,0)|0); + $1294 = (___muldi3(($1228|0),($1229|0),136657,0)|0); $1295 = tempRet0; - $1296 = (___muldi3(($1204|0),($1205|0),654183,0)|0); + $1296 = (_i64Add(($1294|0),($1295|0),($1268|0),($1269|0))|0); $1297 = tempRet0; - $1298 = (___muldi3(($1204|0),($1205|0),-997805,-1)|0); + $1298 = (___muldi3(($1228|0),($1229|0),-683901,-1)|0); $1299 = tempRet0; - $1300 = (___muldi3(($1204|0),($1205|0),136657,0)|0); + $1300 = (_i64Add(($1272|0),($1273|0),($1298|0),($1299|0))|0); $1301 = tempRet0; - $1302 = (___muldi3(($1204|0),($1205|0),-683901,-1)|0); + $1302 = (___muldi3(($1214|0),($1215|0),666643,0)|0); $1303 = tempRet0; - $1304 = (_i64Add(($1038|0),($1039|0),($1220|0),($1221|0))|0); + $1304 = (___muldi3(($1214|0),($1215|0),470296,0)|0); $1305 = tempRet0; - $1306 = (_i64Subtract(($1304|0),($1305|0),($1086|0),($1087|0))|0); + $1306 = (_i64Add(($1280|0),($1281|0),($1304|0),($1305|0))|0); $1307 = tempRet0; - $1308 = (_i64Add(($1306|0),($1307|0),($1244|0),($1245|0))|0); + $1308 = (___muldi3(($1214|0),($1215|0),654183,0)|0); $1309 = tempRet0; - $1310 = (_i64Add(($1308|0),($1309|0),($1264|0),($1265|0))|0); + $1310 = (_i64Add(($1284|0),($1285|0),($1308|0),($1309|0))|0); $1311 = tempRet0; - $1312 = (_i64Add(($1310|0),($1311|0),($1288|0),($1289|0))|0); + $1312 = (___muldi3(($1214|0),($1215|0),-997805,-1)|0); $1313 = tempRet0; - $1314 = (_i64Add(($1312|0),($1313|0),($1302|0),($1303|0))|0); + $1314 = (_i64Add(($1288|0),($1289|0),($1312|0),($1313|0))|0); $1315 = tempRet0; - $1316 = (___muldi3(($1190|0),($1191|0),666643,0)|0); + $1316 = (___muldi3(($1214|0),($1215|0),136657,0)|0); $1317 = tempRet0; - $1318 = (_i64Add(($1316|0),($1317|0),($632|0),($633|0))|0); + $1318 = (_i64Add(($1292|0),($1293|0),($1316|0),($1317|0))|0); $1319 = tempRet0; - $1320 = (___muldi3(($1190|0),($1191|0),470296,0)|0); + $1320 = (___muldi3(($1214|0),($1215|0),-683901,-1)|0); $1321 = tempRet0; - $1322 = (___muldi3(($1190|0),($1191|0),654183,0)|0); + $1322 = (_i64Add(($1296|0),($1297|0),($1320|0),($1321|0))|0); $1323 = tempRet0; - $1324 = (_i64Add(($858|0),($859|0),($216|0),($217|0))|0); + $1324 = (___muldi3(($1218|0),($1219|0),666643,0)|0); $1325 = tempRet0; - $1326 = (_i64Subtract(($1324|0),($1325|0),($648|0),($649|0))|0); + $1326 = (___muldi3(($1218|0),($1219|0),470296,0)|0); $1327 = tempRet0; - $1328 = (_i64Add(($1326|0),($1327|0),($1322|0),($1323|0))|0); + $1328 = (___muldi3(($1218|0),($1219|0),654183,0)|0); $1329 = tempRet0; - $1330 = (_i64Add(($1328|0),($1329|0),($1280|0),($1281|0))|0); + $1330 = (_i64Add(($1306|0),($1307|0),($1328|0),($1329|0))|0); $1331 = tempRet0; - $1332 = (_i64Add(($1330|0),($1331|0),($1294|0),($1295|0))|0); + $1332 = (___muldi3(($1218|0),($1219|0),-997805,-1)|0); $1333 = tempRet0; - $1334 = (___muldi3(($1190|0),($1191|0),-997805,-1)|0); + $1334 = (_i64Add(($1310|0),($1311|0),($1332|0),($1333|0))|0); $1335 = tempRet0; - $1336 = (___muldi3(($1190|0),($1191|0),136657,0)|0); + $1336 = (___muldi3(($1218|0),($1219|0),136657,0)|0); $1337 = tempRet0; - $1338 = (_i64Add(($1258|0),($1259|0),($1336|0),($1337|0))|0); + $1338 = (_i64Add(($1314|0),($1315|0),($1336|0),($1337|0))|0); $1339 = tempRet0; - $1340 = (_i64Add(($1338|0),($1339|0),($1284|0),($1285|0))|0); + $1340 = (___muldi3(($1218|0),($1219|0),-683901,-1)|0); $1341 = tempRet0; - $1342 = (_i64Add(($1340|0),($1341|0),($1298|0),($1299|0))|0); + $1342 = (_i64Add(($1318|0),($1319|0),($1340|0),($1341|0))|0); $1343 = tempRet0; - $1344 = (___muldi3(($1190|0),($1191|0),-683901,-1)|0); + $1344 = (___muldi3(($1204|0),($1205|0),666643,0)|0); $1345 = tempRet0; - $1346 = (_i64Add(($1318|0),($1319|0),1048576,0)|0); + $1346 = (_i64Add(($1344|0),($1345|0),($632|0),($633|0))|0); $1347 = tempRet0; - $1348 = (_bitshift64Ashr(($1346|0),($1347|0),21)|0); + $1348 = (___muldi3(($1204|0),($1205|0),470296,0)|0); $1349 = tempRet0; - $1350 = (_i64Add(($862|0),($863|0),($1320|0),($1321|0))|0); + $1350 = (___muldi3(($1204|0),($1205|0),654183,0)|0); $1351 = tempRet0; - $1352 = (_i64Add(($1350|0),($1351|0),($1292|0),($1293|0))|0); + $1352 = (_i64Add(($866|0),($867|0),($216|0),($217|0))|0); $1353 = tempRet0; - $1354 = (_i64Add(($1352|0),($1353|0),($1348|0),($1349|0))|0); + $1354 = (_i64Subtract(($1352|0),($1353|0),($648|0),($649|0))|0); $1355 = tempRet0; - $1356 = (_bitshift64Shl(($1348|0),($1349|0),21)|0); + $1356 = (_i64Add(($1354|0),($1355|0),($1302|0),($1303|0))|0); $1357 = tempRet0; - $1358 = (_i64Subtract(($1318|0),($1319|0),($1356|0),($1357|0))|0); + $1358 = (_i64Add(($1356|0),($1357|0),($1350|0),($1351|0))|0); $1359 = tempRet0; - $1360 = (_i64Add(($1332|0),($1333|0),1048576,0)|0); + $1360 = (_i64Add(($1358|0),($1359|0),($1326|0),($1327|0))|0); $1361 = tempRet0; - $1362 = (_bitshift64Ashr(($1360|0),($1361|0),21)|0); + $1362 = (___muldi3(($1204|0),($1205|0),-997805,-1)|0); $1363 = tempRet0; - $1364 = (_i64Add(($1254|0),($1255|0),($1334|0),($1335|0))|0); + $1364 = (_i64Add(($1330|0),($1331|0),($1362|0),($1363|0))|0); $1365 = tempRet0; - $1366 = (_i64Add(($1364|0),($1365|0),($1282|0),($1283|0))|0); + $1366 = (___muldi3(($1204|0),($1205|0),136657,0)|0); $1367 = tempRet0; - $1368 = (_i64Add(($1366|0),($1367|0),($1296|0),($1297|0))|0); + $1368 = (_i64Add(($1334|0),($1335|0),($1366|0),($1367|0))|0); $1369 = tempRet0; - $1370 = (_i64Add(($1368|0),($1369|0),($1362|0),($1363|0))|0); + $1370 = (___muldi3(($1204|0),($1205|0),-683901,-1)|0); $1371 = tempRet0; - $1372 = (_bitshift64Shl(($1362|0),($1363|0),21)|0); + $1372 = (_i64Add(($1338|0),($1339|0),($1370|0),($1371|0))|0); $1373 = tempRet0; - $1374 = (_i64Add(($1342|0),($1343|0),1048576,0)|0); + $1374 = (_i64Add(($1346|0),($1347|0),1048576,0)|0); $1375 = tempRet0; $1376 = (_bitshift64Ashr(($1374|0),($1375|0),21)|0); $1377 = tempRet0; - $1378 = (_i64Add(($1262|0),($1263|0),($1344|0),($1345|0))|0); + $1378 = (_i64Add(($870|0),($871|0),($1348|0),($1349|0))|0); $1379 = tempRet0; - $1380 = (_i64Add(($1378|0),($1379|0),($1286|0),($1287|0))|0); + $1380 = (_i64Add(($1378|0),($1379|0),($1324|0),($1325|0))|0); $1381 = tempRet0; - $1382 = (_i64Add(($1380|0),($1381|0),($1300|0),($1301|0))|0); + $1382 = (_i64Add(($1380|0),($1381|0),($1376|0),($1377|0))|0); $1383 = tempRet0; - $1384 = (_i64Add(($1382|0),($1383|0),($1376|0),($1377|0))|0); + $1384 = (_bitshift64Shl(($1376|0),($1377|0),21)|0); $1385 = tempRet0; - $1386 = (_bitshift64Shl(($1376|0),($1377|0),21)|0); + $1386 = (_i64Subtract(($1346|0),($1347|0),($1384|0),($1385|0))|0); $1387 = tempRet0; - $1388 = (_i64Add(($1314|0),($1315|0),1048576,0)|0); + $1388 = (_i64Add(($1360|0),($1361|0),1048576,0)|0); $1389 = tempRet0; $1390 = (_bitshift64Ashr(($1388|0),($1389|0),21)|0); $1391 = tempRet0; - $1392 = (_i64Add(($1084|0),($1085|0),($1222|0),($1223|0))|0); + $1392 = (_i64Add(($1390|0),($1391|0),($1364|0),($1365|0))|0); $1393 = tempRet0; - $1394 = (_i64Add(($1392|0),($1393|0),($1246|0),($1247|0))|0); + $1394 = (_bitshift64Shl(($1390|0),($1391|0),21)|0); $1395 = tempRet0; - $1396 = (_i64Subtract(($1394|0),($1395|0),($1178|0),($1179|0))|0); + $1396 = (_i64Add(($1368|0),($1369|0),1048576,0)|0); $1397 = tempRet0; - $1398 = (_i64Add(($1396|0),($1397|0),($1266|0),($1267|0))|0); + $1398 = (_bitshift64Ashr(($1396|0),($1397|0),21)|0); $1399 = tempRet0; - $1400 = (_i64Add(($1398|0),($1399|0),($1290|0),($1291|0))|0); + $1400 = (_i64Add(($1398|0),($1399|0),($1372|0),($1373|0))|0); $1401 = tempRet0; - $1402 = (_i64Add(($1400|0),($1401|0),($1390|0),($1391|0))|0); + $1402 = (_bitshift64Shl(($1398|0),($1399|0),21)|0); $1403 = tempRet0; - $1404 = (_bitshift64Shl(($1390|0),($1391|0),21)|0); + $1404 = (_i64Add(($1342|0),($1343|0),1048576,0)|0); $1405 = tempRet0; - $1406 = (_i64Subtract(($1314|0),($1315|0),($1404|0),($1405|0))|0); + $1406 = (_bitshift64Ashr(($1404|0),($1405|0),21)|0); $1407 = tempRet0; - $1408 = (_i64Add(($1278|0),($1279|0),1048576,0)|0); + $1408 = (_i64Add(($1406|0),($1407|0),($1322|0),($1323|0))|0); $1409 = tempRet0; - $1410 = (_bitshift64Ashr(($1408|0),($1409|0),21)|0); + $1410 = (_bitshift64Shl(($1406|0),($1407|0),21)|0); $1411 = tempRet0; - $1412 = (_i64Add(($1102|0),($1103|0),($1226|0),($1227|0))|0); + $1412 = (_i64Subtract(($1342|0),($1343|0),($1410|0),($1411|0))|0); $1413 = tempRet0; - $1414 = (_i64Add(($1412|0),($1413|0),($1250|0),($1251|0))|0); + $1414 = (_i64Add(($1300|0),($1301|0),1048576,0)|0); $1415 = tempRet0; - $1416 = (_i64Subtract(($1414|0),($1415|0),($1184|0),($1185|0))|0); + $1416 = (_bitshift64Ashr(($1414|0),($1415|0),21)|0); $1417 = tempRet0; - $1418 = (_i64Add(($1416|0),($1417|0),($1410|0),($1411|0))|0); + $1418 = (_i64Add(($1276|0),($1277|0),($1416|0),($1417|0))|0); $1419 = tempRet0; - $1420 = (_bitshift64Shl(($1410|0),($1411|0),21)|0); + $1420 = (_bitshift64Shl(($1416|0),($1417|0),21)|0); $1421 = tempRet0; - $1422 = (_i64Subtract(($1278|0),($1279|0),($1420|0),($1421|0))|0); + $1422 = (_i64Subtract(($1300|0),($1301|0),($1420|0),($1421|0))|0); $1423 = tempRet0; - $1424 = (_i64Add(($1234|0),($1235|0),1048576,0)|0); + $1424 = (_i64Add(($1252|0),($1253|0),1048576,0)|0); $1425 = tempRet0; $1426 = (_bitshift64Ashr(($1424|0),($1425|0),21)|0); $1427 = tempRet0; - $1428 = (_i64Add(($1194|0),($1195|0),($1426|0),($1427|0))|0); + $1428 = (_i64Add(($1208|0),($1209|0),($1426|0),($1427|0))|0); $1429 = tempRet0; $1430 = (_bitshift64Shl(($1426|0),($1427|0),21)|0); $1431 = tempRet0; - $1432 = (_i64Subtract(($1234|0),($1235|0),($1430|0),($1431|0))|0); + $1432 = (_i64Add(($1382|0),($1383|0),1048576,0)|0); $1433 = tempRet0; - $1434 = (_i64Add(($1354|0),($1355|0),1048576,0)|0); + $1434 = (_bitshift64Ashr(($1432|0),($1433|0),21)|0); $1435 = tempRet0; - $1436 = (_bitshift64Ashr(($1434|0),($1435|0),21)|0); + $1436 = (_bitshift64Shl(($1434|0),($1435|0),21)|0); $1437 = tempRet0; - $1438 = (_bitshift64Shl(($1436|0),($1437|0),21)|0); + $1438 = (_i64Add(($1392|0),($1393|0),1048576,0)|0); $1439 = tempRet0; - $1440 = (_i64Add(($1370|0),($1371|0),1048576,0)|0); + $1440 = (_bitshift64Ashr(($1438|0),($1439|0),21)|0); $1441 = tempRet0; - $1442 = (_bitshift64Ashr(($1440|0),($1441|0),21)|0); + $1442 = (_bitshift64Shl(($1440|0),($1441|0),21)|0); $1443 = tempRet0; - $1444 = (_bitshift64Shl(($1442|0),($1443|0),21)|0); + $1444 = (_i64Subtract(($1392|0),($1393|0),($1442|0),($1443|0))|0); $1445 = tempRet0; - $1446 = (_i64Add(($1384|0),($1385|0),1048576,0)|0); + $1446 = (_i64Add(($1400|0),($1401|0),1048576,0)|0); $1447 = tempRet0; $1448 = (_bitshift64Ashr(($1446|0),($1447|0),21)|0); $1449 = tempRet0; - $1450 = (_i64Add(($1406|0),($1407|0),($1448|0),($1449|0))|0); + $1450 = (_i64Add(($1412|0),($1413|0),($1448|0),($1449|0))|0); $1451 = tempRet0; $1452 = (_bitshift64Shl(($1448|0),($1449|0),21)|0); $1453 = tempRet0; - $1454 = (_i64Add(($1402|0),($1403|0),1048576,0)|0); + $1454 = (_i64Subtract(($1400|0),($1401|0),($1452|0),($1453|0))|0); $1455 = tempRet0; - $1456 = (_bitshift64Ashr(($1454|0),($1455|0),21)|0); + $1456 = (_i64Add(($1408|0),($1409|0),1048576,0)|0); $1457 = tempRet0; - $1458 = (_i64Add(($1422|0),($1423|0),($1456|0),($1457|0))|0); + $1458 = (_bitshift64Ashr(($1456|0),($1457|0),21)|0); $1459 = tempRet0; - $1460 = (_bitshift64Shl(($1456|0),($1457|0),21)|0); + $1460 = (_i64Add(($1422|0),($1423|0),($1458|0),($1459|0))|0); $1461 = tempRet0; - $1462 = (_i64Subtract(($1402|0),($1403|0),($1460|0),($1461|0))|0); + $1462 = (_bitshift64Shl(($1458|0),($1459|0),21)|0); $1463 = tempRet0; - $1464 = (_i64Add(($1418|0),($1419|0),1048576,0)|0); + $1464 = (_i64Subtract(($1408|0),($1409|0),($1462|0),($1463|0))|0); $1465 = tempRet0; - $1466 = (_bitshift64Ashr(($1464|0),($1465|0),21)|0); + $1466 = (_i64Add(($1418|0),($1419|0),1048576,0)|0); $1467 = tempRet0; - $1468 = (_i64Add(($1432|0),($1433|0),($1466|0),($1467|0))|0); + $1468 = (_bitshift64Ashr(($1466|0),($1467|0),21)|0); $1469 = tempRet0; - $1470 = (_bitshift64Shl(($1466|0),($1467|0),21)|0); + $1470 = (_bitshift64Shl(($1468|0),($1469|0),21)|0); $1471 = tempRet0; $1472 = (_i64Subtract(($1418|0),($1419|0),($1470|0),($1471|0))|0); $1473 = tempRet0; @@ -16473,7 +17235,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1481 = tempRet0; $1482 = (___muldi3(($1476|0),($1477|0),666643,0)|0); $1483 = tempRet0; - $1484 = (_i64Add(($1358|0),($1359|0),($1482|0),($1483|0))|0); + $1484 = (_i64Add(($1386|0),($1387|0),($1482|0),($1483|0))|0); $1485 = tempRet0; $1486 = (___muldi3(($1476|0),($1477|0),470296,0)|0); $1487 = tempRet0; @@ -16481,55 +17243,55 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1489 = tempRet0; $1490 = (___muldi3(($1476|0),($1477|0),-997805,-1)|0); $1491 = tempRet0; - $1492 = (___muldi3(($1476|0),($1477|0),136657,0)|0); + $1492 = (_i64Add(($1444|0),($1445|0),($1490|0),($1491|0))|0); $1493 = tempRet0; - $1494 = (___muldi3(($1476|0),($1477|0),-683901,-1)|0); + $1494 = (___muldi3(($1476|0),($1477|0),136657,0)|0); $1495 = tempRet0; - $1496 = (_bitshift64Ashr(($1484|0),($1485|0),21)|0); + $1496 = (___muldi3(($1476|0),($1477|0),-683901,-1)|0); $1497 = tempRet0; - $1498 = (_i64Add(($1486|0),($1487|0),($1354|0),($1355|0))|0); + $1498 = (_i64Add(($1454|0),($1455|0),($1496|0),($1497|0))|0); $1499 = tempRet0; - $1500 = (_i64Subtract(($1498|0),($1499|0),($1438|0),($1439|0))|0); + $1500 = (_bitshift64Ashr(($1484|0),($1485|0),21)|0); $1501 = tempRet0; - $1502 = (_i64Add(($1500|0),($1501|0),($1496|0),($1497|0))|0); + $1502 = (_i64Add(($1486|0),($1487|0),($1382|0),($1383|0))|0); $1503 = tempRet0; - $1504 = (_bitshift64Shl(($1496|0),($1497|0),21)|0); + $1504 = (_i64Subtract(($1502|0),($1503|0),($1436|0),($1437|0))|0); $1505 = tempRet0; - $1506 = (_i64Subtract(($1484|0),($1485|0),($1504|0),($1505|0))|0); + $1506 = (_i64Add(($1504|0),($1505|0),($1500|0),($1501|0))|0); $1507 = tempRet0; - $1508 = (_bitshift64Ashr(($1502|0),($1503|0),21)|0); + $1508 = (_bitshift64Shl(($1500|0),($1501|0),21)|0); $1509 = tempRet0; - $1510 = (_i64Add(($1488|0),($1489|0),($1332|0),($1333|0))|0); + $1510 = (_i64Subtract(($1484|0),($1485|0),($1508|0),($1509|0))|0); $1511 = tempRet0; - $1512 = (_i64Subtract(($1510|0),($1511|0),($1372|0),($1373|0))|0); + $1512 = (_bitshift64Ashr(($1506|0),($1507|0),21)|0); $1513 = tempRet0; - $1514 = (_i64Add(($1512|0),($1513|0),($1436|0),($1437|0))|0); + $1514 = (_i64Add(($1488|0),($1489|0),($1360|0),($1361|0))|0); $1515 = tempRet0; - $1516 = (_i64Add(($1514|0),($1515|0),($1508|0),($1509|0))|0); + $1516 = (_i64Subtract(($1514|0),($1515|0),($1394|0),($1395|0))|0); $1517 = tempRet0; - $1518 = (_bitshift64Shl(($1508|0),($1509|0),21)|0); + $1518 = (_i64Add(($1516|0),($1517|0),($1434|0),($1435|0))|0); $1519 = tempRet0; - $1520 = (_i64Subtract(($1502|0),($1503|0),($1518|0),($1519|0))|0); + $1520 = (_i64Add(($1518|0),($1519|0),($1512|0),($1513|0))|0); $1521 = tempRet0; - $1522 = (_bitshift64Ashr(($1516|0),($1517|0),21)|0); + $1522 = (_bitshift64Shl(($1512|0),($1513|0),21)|0); $1523 = tempRet0; - $1524 = (_i64Add(($1370|0),($1371|0),($1490|0),($1491|0))|0); + $1524 = (_i64Subtract(($1506|0),($1507|0),($1522|0),($1523|0))|0); $1525 = tempRet0; - $1526 = (_i64Subtract(($1524|0),($1525|0),($1444|0),($1445|0))|0); + $1526 = (_bitshift64Ashr(($1520|0),($1521|0),21)|0); $1527 = tempRet0; - $1528 = (_i64Add(($1526|0),($1527|0),($1522|0),($1523|0))|0); + $1528 = (_i64Add(($1526|0),($1527|0),($1492|0),($1493|0))|0); $1529 = tempRet0; - $1530 = (_bitshift64Shl(($1522|0),($1523|0),21)|0); + $1530 = (_bitshift64Shl(($1526|0),($1527|0),21)|0); $1531 = tempRet0; - $1532 = (_i64Subtract(($1516|0),($1517|0),($1530|0),($1531|0))|0); + $1532 = (_i64Subtract(($1520|0),($1521|0),($1530|0),($1531|0))|0); $1533 = tempRet0; $1534 = (_bitshift64Ashr(($1528|0),($1529|0),21)|0); $1535 = tempRet0; - $1536 = (_i64Add(($1492|0),($1493|0),($1342|0),($1343|0))|0); + $1536 = (_i64Add(($1494|0),($1495|0),($1368|0),($1369|0))|0); $1537 = tempRet0; - $1538 = (_i64Subtract(($1536|0),($1537|0),($1386|0),($1387|0))|0); + $1538 = (_i64Subtract(($1536|0),($1537|0),($1402|0),($1403|0))|0); $1539 = tempRet0; - $1540 = (_i64Add(($1538|0),($1539|0),($1442|0),($1443|0))|0); + $1540 = (_i64Add(($1538|0),($1539|0),($1440|0),($1441|0))|0); $1541 = tempRet0; $1542 = (_i64Add(($1540|0),($1541|0),($1534|0),($1535|0))|0); $1543 = tempRet0; @@ -16539,55 +17301,55 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1547 = tempRet0; $1548 = (_bitshift64Ashr(($1542|0),($1543|0),21)|0); $1549 = tempRet0; - $1550 = (_i64Add(($1384|0),($1385|0),($1494|0),($1495|0))|0); + $1550 = (_i64Add(($1548|0),($1549|0),($1498|0),($1499|0))|0); $1551 = tempRet0; - $1552 = (_i64Subtract(($1550|0),($1551|0),($1452|0),($1453|0))|0); + $1552 = (_bitshift64Shl(($1548|0),($1549|0),21)|0); $1553 = tempRet0; - $1554 = (_i64Add(($1552|0),($1553|0),($1548|0),($1549|0))|0); + $1554 = (_i64Subtract(($1542|0),($1543|0),($1552|0),($1553|0))|0); $1555 = tempRet0; - $1556 = (_bitshift64Shl(($1548|0),($1549|0),21)|0); + $1556 = (_bitshift64Ashr(($1550|0),($1551|0),21)|0); $1557 = tempRet0; - $1558 = (_i64Subtract(($1542|0),($1543|0),($1556|0),($1557|0))|0); + $1558 = (_i64Add(($1450|0),($1451|0),($1556|0),($1557|0))|0); $1559 = tempRet0; - $1560 = (_bitshift64Ashr(($1554|0),($1555|0),21)|0); + $1560 = (_bitshift64Shl(($1556|0),($1557|0),21)|0); $1561 = tempRet0; - $1562 = (_i64Add(($1450|0),($1451|0),($1560|0),($1561|0))|0); + $1562 = (_i64Subtract(($1550|0),($1551|0),($1560|0),($1561|0))|0); $1563 = tempRet0; - $1564 = (_bitshift64Shl(($1560|0),($1561|0),21)|0); + $1564 = (_bitshift64Ashr(($1558|0),($1559|0),21)|0); $1565 = tempRet0; - $1566 = (_i64Subtract(($1554|0),($1555|0),($1564|0),($1565|0))|0); + $1566 = (_i64Add(($1564|0),($1565|0),($1464|0),($1465|0))|0); $1567 = tempRet0; - $1568 = (_bitshift64Ashr(($1562|0),($1563|0),21)|0); + $1568 = (_bitshift64Shl(($1564|0),($1565|0),21)|0); $1569 = tempRet0; - $1570 = (_i64Add(($1568|0),($1569|0),($1462|0),($1463|0))|0); + $1570 = (_i64Subtract(($1558|0),($1559|0),($1568|0),($1569|0))|0); $1571 = tempRet0; - $1572 = (_bitshift64Shl(($1568|0),($1569|0),21)|0); + $1572 = (_bitshift64Ashr(($1566|0),($1567|0),21)|0); $1573 = tempRet0; - $1574 = (_i64Subtract(($1562|0),($1563|0),($1572|0),($1573|0))|0); + $1574 = (_i64Add(($1460|0),($1461|0),($1572|0),($1573|0))|0); $1575 = tempRet0; - $1576 = (_bitshift64Ashr(($1570|0),($1571|0),21)|0); + $1576 = (_bitshift64Shl(($1572|0),($1573|0),21)|0); $1577 = tempRet0; - $1578 = (_i64Add(($1458|0),($1459|0),($1576|0),($1577|0))|0); + $1578 = (_i64Subtract(($1566|0),($1567|0),($1576|0),($1577|0))|0); $1579 = tempRet0; - $1580 = (_bitshift64Shl(($1576|0),($1577|0),21)|0); + $1580 = (_bitshift64Ashr(($1574|0),($1575|0),21)|0); $1581 = tempRet0; - $1582 = (_i64Subtract(($1570|0),($1571|0),($1580|0),($1581|0))|0); + $1582 = (_i64Add(($1580|0),($1581|0),($1472|0),($1473|0))|0); $1583 = tempRet0; - $1584 = (_bitshift64Ashr(($1578|0),($1579|0),21)|0); + $1584 = (_bitshift64Shl(($1580|0),($1581|0),21)|0); $1585 = tempRet0; - $1586 = (_i64Add(($1584|0),($1585|0),($1472|0),($1473|0))|0); + $1586 = (_i64Subtract(($1574|0),($1575|0),($1584|0),($1585|0))|0); $1587 = tempRet0; - $1588 = (_bitshift64Shl(($1584|0),($1585|0),21)|0); + $1588 = (_bitshift64Ashr(($1582|0),($1583|0),21)|0); $1589 = tempRet0; - $1590 = (_i64Subtract(($1578|0),($1579|0),($1588|0),($1589|0))|0); + $1590 = (_i64Add(($1468|0),($1469|0),($1252|0),($1253|0))|0); $1591 = tempRet0; - $1592 = (_bitshift64Ashr(($1586|0),($1587|0),21)|0); + $1592 = (_i64Subtract(($1590|0),($1591|0),($1430|0),($1431|0))|0); $1593 = tempRet0; - $1594 = (_i64Add(($1468|0),($1469|0),($1592|0),($1593|0))|0); + $1594 = (_i64Add(($1592|0),($1593|0),($1588|0),($1589|0))|0); $1595 = tempRet0; - $1596 = (_bitshift64Shl(($1592|0),($1593|0),21)|0); + $1596 = (_bitshift64Shl(($1588|0),($1589|0),21)|0); $1597 = tempRet0; - $1598 = (_i64Subtract(($1586|0),($1587|0),($1596|0),($1597|0))|0); + $1598 = (_i64Subtract(($1582|0),($1583|0),($1596|0),($1597|0))|0); $1599 = tempRet0; $1600 = (_bitshift64Ashr(($1594|0),($1595|0),21)|0); $1601 = tempRet0; @@ -16605,11 +17367,11 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1613 = tempRet0; $1614 = (___muldi3(($1608|0),($1609|0),666643,0)|0); $1615 = tempRet0; - $1616 = (_i64Add(($1614|0),($1615|0),($1506|0),($1507|0))|0); + $1616 = (_i64Add(($1614|0),($1615|0),($1510|0),($1511|0))|0); $1617 = tempRet0; $1618 = (___muldi3(($1608|0),($1609|0),470296,0)|0); $1619 = tempRet0; - $1620 = (_i64Add(($1520|0),($1521|0),($1618|0),($1619|0))|0); + $1620 = (_i64Add(($1524|0),($1525|0),($1618|0),($1619|0))|0); $1621 = tempRet0; $1622 = (___muldi3(($1608|0),($1609|0),654183,0)|0); $1623 = tempRet0; @@ -16621,11 +17383,11 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1629 = tempRet0; $1630 = (___muldi3(($1608|0),($1609|0),136657,0)|0); $1631 = tempRet0; - $1632 = (_i64Add(($1558|0),($1559|0),($1630|0),($1631|0))|0); + $1632 = (_i64Add(($1554|0),($1555|0),($1630|0),($1631|0))|0); $1633 = tempRet0; $1634 = (___muldi3(($1608|0),($1609|0),-683901,-1)|0); $1635 = tempRet0; - $1636 = (_i64Add(($1566|0),($1567|0),($1634|0),($1635|0))|0); + $1636 = (_i64Add(($1562|0),($1563|0),($1634|0),($1635|0))|0); $1637 = tempRet0; $1638 = (_bitshift64Ashr(($1616|0),($1617|0),21)|0); $1639 = tempRet0; @@ -16645,7 +17407,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1653 = tempRet0; $1654 = (_bitshift64Ashr(($1648|0),($1649|0),21)|0); $1655 = tempRet0; - $1656 = (_i64Add(($1628|0),($1629|0),($1654|0),($1655|0))|0); + $1656 = (_i64Add(($1654|0),($1655|0),($1628|0),($1629|0))|0); $1657 = tempRet0; $1658 = (_bitshift64Shl(($1654|0),($1655|0),21)|0); $1659 = tempRet0; @@ -16661,7 +17423,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1669 = tempRet0; $1670 = (_bitshift64Ashr(($1664|0),($1665|0),21)|0); $1671 = tempRet0; - $1672 = (_i64Add(($1636|0),($1637|0),($1670|0),($1671|0))|0); + $1672 = (_i64Add(($1670|0),($1671|0),($1636|0),($1637|0))|0); $1673 = tempRet0; $1674 = (_bitshift64Shl(($1670|0),($1671|0),21)|0); $1675 = tempRet0; @@ -16669,7 +17431,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1677 = tempRet0; $1678 = (_bitshift64Ashr(($1672|0),($1673|0),21)|0); $1679 = tempRet0; - $1680 = (_i64Add(($1678|0),($1679|0),($1574|0),($1575|0))|0); + $1680 = (_i64Add(($1678|0),($1679|0),($1570|0),($1571|0))|0); $1681 = tempRet0; $1682 = (_bitshift64Shl(($1678|0),($1679|0),21)|0); $1683 = tempRet0; @@ -16677,7 +17439,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1685 = tempRet0; $1686 = (_bitshift64Ashr(($1680|0),($1681|0),21)|0); $1687 = tempRet0; - $1688 = (_i64Add(($1686|0),($1687|0),($1582|0),($1583|0))|0); + $1688 = (_i64Add(($1686|0),($1687|0),($1578|0),($1579|0))|0); $1689 = tempRet0; $1690 = (_bitshift64Shl(($1686|0),($1687|0),21)|0); $1691 = tempRet0; @@ -16685,7 +17447,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1693 = tempRet0; $1694 = (_bitshift64Ashr(($1688|0),($1689|0),21)|0); $1695 = tempRet0; - $1696 = (_i64Add(($1694|0),($1695|0),($1590|0),($1591|0))|0); + $1696 = (_i64Add(($1694|0),($1695|0),($1586|0),($1587|0))|0); $1697 = tempRet0; $1698 = (_bitshift64Shl(($1694|0),($1695|0),21)|0); $1699 = tempRet0; @@ -16720,7 +17482,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1727 = (_bitshift64Lshr(($1644|0),($1645|0),8)|0); $1728 = tempRet0; $1729 = $1727&255; - $1730 = (($s) + 1|0); + $1730 = ((($s)) + 1|0); HEAP8[$1730>>0] = $1729; $1731 = (_bitshift64Lshr(($1644|0),($1645|0),16)|0); $1732 = tempRet0; @@ -16729,17 +17491,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1735 = $1733 | $1731; $1734 | $1732; $1736 = $1735&255; - $1737 = (($s) + 2|0); + $1737 = ((($s)) + 2|0); HEAP8[$1737>>0] = $1736; $1738 = (_bitshift64Lshr(($1652|0),($1653|0),3)|0); $1739 = tempRet0; $1740 = $1738&255; - $1741 = (($s) + 3|0); + $1741 = ((($s)) + 3|0); HEAP8[$1741>>0] = $1740; $1742 = (_bitshift64Lshr(($1652|0),($1653|0),11)|0); $1743 = tempRet0; $1744 = $1742&255; - $1745 = (($s) + 4|0); + $1745 = ((($s)) + 4|0); HEAP8[$1745>>0] = $1744; $1746 = (_bitshift64Lshr(($1652|0),($1653|0),19)|0); $1747 = tempRet0; @@ -16748,12 +17510,12 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1750 = $1748 | $1746; $1749 | $1747; $1751 = $1750&255; - $1752 = (($s) + 5|0); + $1752 = ((($s)) + 5|0); HEAP8[$1752>>0] = $1751; $1753 = (_bitshift64Lshr(($1660|0),($1661|0),6)|0); $1754 = tempRet0; $1755 = $1753&255; - $1756 = (($s) + 6|0); + $1756 = ((($s)) + 6|0); HEAP8[$1756>>0] = $1755; $1757 = (_bitshift64Lshr(($1660|0),($1661|0),14)|0); $1758 = tempRet0; @@ -16762,17 +17524,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1761 = $1759 | $1757; $1760 | $1758; $1762 = $1761&255; - $1763 = (($s) + 7|0); + $1763 = ((($s)) + 7|0); HEAP8[$1763>>0] = $1762; $1764 = (_bitshift64Lshr(($1668|0),($1669|0),1)|0); $1765 = tempRet0; $1766 = $1764&255; - $1767 = (($s) + 8|0); + $1767 = ((($s)) + 8|0); HEAP8[$1767>>0] = $1766; $1768 = (_bitshift64Lshr(($1668|0),($1669|0),9)|0); $1769 = tempRet0; $1770 = $1768&255; - $1771 = (($s) + 9|0); + $1771 = ((($s)) + 9|0); HEAP8[$1771>>0] = $1770; $1772 = (_bitshift64Lshr(($1668|0),($1669|0),17)|0); $1773 = tempRet0; @@ -16781,17 +17543,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1776 = $1774 | $1772; $1775 | $1773; $1777 = $1776&255; - $1778 = (($s) + 10|0); + $1778 = ((($s)) + 10|0); HEAP8[$1778>>0] = $1777; $1779 = (_bitshift64Lshr(($1676|0),($1677|0),4)|0); $1780 = tempRet0; $1781 = $1779&255; - $1782 = (($s) + 11|0); + $1782 = ((($s)) + 11|0); HEAP8[$1782>>0] = $1781; $1783 = (_bitshift64Lshr(($1676|0),($1677|0),12)|0); $1784 = tempRet0; $1785 = $1783&255; - $1786 = (($s) + 12|0); + $1786 = ((($s)) + 12|0); HEAP8[$1786>>0] = $1785; $1787 = (_bitshift64Lshr(($1676|0),($1677|0),20)|0); $1788 = tempRet0; @@ -16800,12 +17562,12 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1791 = $1789 | $1787; $1790 | $1788; $1792 = $1791&255; - $1793 = (($s) + 13|0); + $1793 = ((($s)) + 13|0); HEAP8[$1793>>0] = $1792; $1794 = (_bitshift64Lshr(($1684|0),($1685|0),7)|0); $1795 = tempRet0; $1796 = $1794&255; - $1797 = (($s) + 14|0); + $1797 = ((($s)) + 14|0); HEAP8[$1797>>0] = $1796; $1798 = (_bitshift64Lshr(($1684|0),($1685|0),15)|0); $1799 = tempRet0; @@ -16814,17 +17576,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1802 = $1800 | $1798; $1801 | $1799; $1803 = $1802&255; - $1804 = (($s) + 15|0); + $1804 = ((($s)) + 15|0); HEAP8[$1804>>0] = $1803; $1805 = (_bitshift64Lshr(($1692|0),($1693|0),2)|0); $1806 = tempRet0; $1807 = $1805&255; - $1808 = (($s) + 16|0); + $1808 = ((($s)) + 16|0); HEAP8[$1808>>0] = $1807; $1809 = (_bitshift64Lshr(($1692|0),($1693|0),10)|0); $1810 = tempRet0; $1811 = $1809&255; - $1812 = (($s) + 17|0); + $1812 = ((($s)) + 17|0); HEAP8[$1812>>0] = $1811; $1813 = (_bitshift64Lshr(($1692|0),($1693|0),18)|0); $1814 = tempRet0; @@ -16833,25 +17595,25 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1817 = $1815 | $1813; $1816 | $1814; $1818 = $1817&255; - $1819 = (($s) + 18|0); + $1819 = ((($s)) + 18|0); HEAP8[$1819>>0] = $1818; $1820 = (_bitshift64Lshr(($1700|0),($1701|0),5)|0); $1821 = tempRet0; $1822 = $1820&255; - $1823 = (($s) + 19|0); + $1823 = ((($s)) + 19|0); HEAP8[$1823>>0] = $1822; $1824 = (_bitshift64Lshr(($1700|0),($1701|0),13)|0); $1825 = tempRet0; $1826 = $1824&255; - $1827 = (($s) + 20|0); + $1827 = ((($s)) + 20|0); HEAP8[$1827>>0] = $1826; $1828 = $1708&255; - $1829 = (($s) + 21|0); + $1829 = ((($s)) + 21|0); HEAP8[$1829>>0] = $1828; $1830 = (_bitshift64Lshr(($1708|0),($1709|0),8)|0); $1831 = tempRet0; $1832 = $1830&255; - $1833 = (($s) + 22|0); + $1833 = ((($s)) + 22|0); HEAP8[$1833>>0] = $1832; $1834 = (_bitshift64Lshr(($1708|0),($1709|0),16)|0); $1835 = tempRet0; @@ -16860,17 +17622,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1838 = $1836 | $1834; $1837 | $1835; $1839 = $1838&255; - $1840 = (($s) + 23|0); + $1840 = ((($s)) + 23|0); HEAP8[$1840>>0] = $1839; $1841 = (_bitshift64Lshr(($1716|0),($1717|0),3)|0); $1842 = tempRet0; $1843 = $1841&255; - $1844 = (($s) + 24|0); + $1844 = ((($s)) + 24|0); HEAP8[$1844>>0] = $1843; $1845 = (_bitshift64Lshr(($1716|0),($1717|0),11)|0); $1846 = tempRet0; $1847 = $1845&255; - $1848 = (($s) + 25|0); + $1848 = ((($s)) + 25|0); HEAP8[$1848>>0] = $1847; $1849 = (_bitshift64Lshr(($1716|0),($1717|0),19)|0); $1850 = tempRet0; @@ -16879,12 +17641,12 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1853 = $1851 | $1849; $1852 | $1850; $1854 = $1853&255; - $1855 = (($s) + 26|0); + $1855 = ((($s)) + 26|0); HEAP8[$1855>>0] = $1854; $1856 = (_bitshift64Lshr(($1724|0),($1725|0),6)|0); $1857 = tempRet0; $1858 = $1856&255; - $1859 = (($s) + 27|0); + $1859 = ((($s)) + 27|0); HEAP8[$1859>>0] = $1858; $1860 = (_bitshift64Lshr(($1724|0),($1725|0),14)|0); $1861 = tempRet0; @@ -16893,24 +17655,24 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1864 = $1860 | $1862; $1861 | $1863; $1865 = $1864&255; - $1866 = (($s) + 28|0); + $1866 = ((($s)) + 28|0); HEAP8[$1866>>0] = $1865; $1867 = (_bitshift64Lshr(($1720|0),($1721|0),1)|0); $1868 = tempRet0; $1869 = $1867&255; - $1870 = (($s) + 29|0); + $1870 = ((($s)) + 29|0); HEAP8[$1870>>0] = $1869; $1871 = (_bitshift64Lshr(($1720|0),($1721|0),9)|0); $1872 = tempRet0; $1873 = $1871&255; - $1874 = (($s) + 30|0); + $1874 = ((($s)) + 30|0); HEAP8[$1874>>0] = $1873; $1875 = (_bitshift64Lshr(($1720|0),($1721|0),17)|0); $1876 = tempRet0; $1877 = $1875&255; - $1878 = (($s) + 31|0); + $1878 = ((($s)) + 31|0); HEAP8[$1878>>0] = $1877; - STACKTOP = sp;return; + return; } function _load_347($in) { $in = $in|0; @@ -16918,21 +17680,21 @@ function _load_347($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); + tempRet0 = ($14); + return ($13|0); } function _load_448($in) { $in = $in|0; @@ -16941,28 +17703,28 @@ function _load_448($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - $15 = (($in) + 3|0); + $15 = ((($in)) + 3|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (_bitshift64Shl(($17|0),0,24)|0); $19 = tempRet0; $20 = $13 | $18; $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); + tempRet0 = ($21); + return ($20|0); } function _crypto_sign_ed25519_ref10_sc_reduce($s) { $s = $s|0; @@ -17022,334 +17784,334 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $0 = (_load_351($s)|0); $1 = tempRet0; $2 = $0 & 2097151; - $3 = (($s) + 2|0); + $3 = ((($s)) + 2|0); $4 = (_load_452($3)|0); $5 = tempRet0; $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); $7 = tempRet0; $8 = $6 & 2097151; - $9 = (($s) + 5|0); + $9 = ((($s)) + 5|0); $10 = (_load_351($9)|0); $11 = tempRet0; $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); $13 = tempRet0; $14 = $12 & 2097151; - $15 = (($s) + 7|0); + $15 = ((($s)) + 7|0); $16 = (_load_452($15)|0); $17 = tempRet0; $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); $19 = tempRet0; $20 = $18 & 2097151; - $21 = (($s) + 10|0); + $21 = ((($s)) + 10|0); $22 = (_load_452($21)|0); $23 = tempRet0; $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); $25 = tempRet0; $26 = $24 & 2097151; - $27 = (($s) + 13|0); + $27 = ((($s)) + 13|0); $28 = (_load_351($27)|0); $29 = tempRet0; $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); $31 = tempRet0; $32 = $30 & 2097151; - $33 = (($s) + 15|0); + $33 = ((($s)) + 15|0); $34 = (_load_452($33)|0); $35 = tempRet0; $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); $37 = tempRet0; $38 = $36 & 2097151; - $39 = (($s) + 18|0); + $39 = ((($s)) + 18|0); $40 = (_load_351($39)|0); $41 = tempRet0; $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); $43 = tempRet0; $44 = $42 & 2097151; - $45 = (($s) + 21|0); + $45 = ((($s)) + 21|0); $46 = (_load_351($45)|0); $47 = tempRet0; $48 = $46 & 2097151; - $49 = (($s) + 23|0); + $49 = ((($s)) + 23|0); $50 = (_load_452($49)|0); $51 = tempRet0; $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); $53 = tempRet0; $54 = $52 & 2097151; - $55 = (($s) + 26|0); + $55 = ((($s)) + 26|0); $56 = (_load_351($55)|0); $57 = tempRet0; $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); $59 = tempRet0; $60 = $58 & 2097151; - $61 = (($s) + 28|0); + $61 = ((($s)) + 28|0); $62 = (_load_452($61)|0); $63 = tempRet0; $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); $65 = tempRet0; $66 = $64 & 2097151; - $67 = (($s) + 31|0); + $67 = ((($s)) + 31|0); $68 = (_load_452($67)|0); $69 = tempRet0; $70 = (_bitshift64Lshr(($68|0),($69|0),4)|0); $71 = tempRet0; $72 = $70 & 2097151; - $73 = (($s) + 34|0); + $73 = ((($s)) + 34|0); $74 = (_load_351($73)|0); $75 = tempRet0; $76 = (_bitshift64Lshr(($74|0),($75|0),1)|0); $77 = tempRet0; $78 = $76 & 2097151; - $79 = (($s) + 36|0); + $79 = ((($s)) + 36|0); $80 = (_load_452($79)|0); $81 = tempRet0; $82 = (_bitshift64Lshr(($80|0),($81|0),6)|0); $83 = tempRet0; $84 = $82 & 2097151; - $85 = (($s) + 39|0); + $85 = ((($s)) + 39|0); $86 = (_load_351($85)|0); $87 = tempRet0; $88 = (_bitshift64Lshr(($86|0),($87|0),3)|0); $89 = tempRet0; $90 = $88 & 2097151; - $91 = (($s) + 42|0); + $91 = ((($s)) + 42|0); $92 = (_load_351($91)|0); $93 = tempRet0; $94 = $92 & 2097151; - $95 = (($s) + 44|0); + $95 = ((($s)) + 44|0); $96 = (_load_452($95)|0); $97 = tempRet0; $98 = (_bitshift64Lshr(($96|0),($97|0),5)|0); $99 = tempRet0; $100 = $98 & 2097151; - $101 = (($s) + 47|0); + $101 = ((($s)) + 47|0); $102 = (_load_351($101)|0); $103 = tempRet0; $104 = (_bitshift64Lshr(($102|0),($103|0),2)|0); $105 = tempRet0; $106 = $104 & 2097151; - $107 = (($s) + 49|0); + $107 = ((($s)) + 49|0); $108 = (_load_452($107)|0); $109 = tempRet0; $110 = (_bitshift64Lshr(($108|0),($109|0),7)|0); $111 = tempRet0; $112 = $110 & 2097151; - $113 = (($s) + 52|0); + $113 = ((($s)) + 52|0); $114 = (_load_452($113)|0); $115 = tempRet0; $116 = (_bitshift64Lshr(($114|0),($115|0),4)|0); $117 = tempRet0; $118 = $116 & 2097151; - $119 = (($s) + 55|0); + $119 = ((($s)) + 55|0); $120 = (_load_351($119)|0); $121 = tempRet0; $122 = (_bitshift64Lshr(($120|0),($121|0),1)|0); $123 = tempRet0; $124 = $122 & 2097151; - $125 = (($s) + 57|0); + $125 = ((($s)) + 57|0); $126 = (_load_452($125)|0); $127 = tempRet0; $128 = (_bitshift64Lshr(($126|0),($127|0),6)|0); $129 = tempRet0; $130 = $128 & 2097151; - $131 = (($s) + 60|0); + $131 = ((($s)) + 60|0); $132 = (_load_452($131)|0); $133 = tempRet0; $134 = (_bitshift64Lshr(($132|0),($133|0),3)|0); $135 = tempRet0; $136 = (___muldi3(($134|0),($135|0),666643,0)|0); $137 = tempRet0; - $138 = (___muldi3(($134|0),($135|0),470296,0)|0); + $138 = (_i64Add(($66|0),0,($136|0),($137|0))|0); $139 = tempRet0; - $140 = (___muldi3(($134|0),($135|0),654183,0)|0); + $140 = (___muldi3(($134|0),($135|0),470296,0)|0); $141 = tempRet0; - $142 = (___muldi3(($134|0),($135|0),-997805,-1)|0); + $142 = (_i64Add(($72|0),0,($140|0),($141|0))|0); $143 = tempRet0; - $144 = (___muldi3(($134|0),($135|0),136657,0)|0); + $144 = (___muldi3(($134|0),($135|0),654183,0)|0); $145 = tempRet0; - $146 = (_i64Add(($144|0),($145|0),($90|0),0)|0); + $146 = (_i64Add(($78|0),0,($144|0),($145|0))|0); $147 = tempRet0; - $148 = (___muldi3(($134|0),($135|0),-683901,-1)|0); + $148 = (___muldi3(($134|0),($135|0),-997805,-1)|0); $149 = tempRet0; - $150 = (_i64Add(($148|0),($149|0),($94|0),0)|0); + $150 = (_i64Add(($84|0),0,($148|0),($149|0))|0); $151 = tempRet0; - $152 = (___muldi3(($130|0),0,666643,0)|0); + $152 = (___muldi3(($134|0),($135|0),136657,0)|0); $153 = tempRet0; - $154 = (___muldi3(($130|0),0,470296,0)|0); + $154 = (_i64Add(($90|0),0,($152|0),($153|0))|0); $155 = tempRet0; - $156 = (___muldi3(($130|0),0,654183,0)|0); + $156 = (___muldi3(($134|0),($135|0),-683901,-1)|0); $157 = tempRet0; - $158 = (___muldi3(($130|0),0,-997805,-1)|0); + $158 = (_i64Add(($94|0),0,($156|0),($157|0))|0); $159 = tempRet0; - $160 = (___muldi3(($130|0),0,136657,0)|0); + $160 = (___muldi3(($130|0),0,666643,0)|0); $161 = tempRet0; - $162 = (___muldi3(($130|0),0,-683901,-1)|0); + $162 = (_i64Add(($60|0),0,($160|0),($161|0))|0); $163 = tempRet0; - $164 = (_i64Add(($146|0),($147|0),($162|0),($163|0))|0); + $164 = (___muldi3(($130|0),0,470296,0)|0); $165 = tempRet0; - $166 = (___muldi3(($124|0),0,666643,0)|0); + $166 = (_i64Add(($164|0),($165|0),($138|0),($139|0))|0); $167 = tempRet0; - $168 = (___muldi3(($124|0),0,470296,0)|0); + $168 = (___muldi3(($130|0),0,654183,0)|0); $169 = tempRet0; - $170 = (___muldi3(($124|0),0,654183,0)|0); + $170 = (_i64Add(($168|0),($169|0),($142|0),($143|0))|0); $171 = tempRet0; - $172 = (___muldi3(($124|0),0,-997805,-1)|0); + $172 = (___muldi3(($130|0),0,-997805,-1)|0); $173 = tempRet0; - $174 = (___muldi3(($124|0),0,136657,0)|0); + $174 = (_i64Add(($172|0),($173|0),($146|0),($147|0))|0); $175 = tempRet0; - $176 = (___muldi3(($124|0),0,-683901,-1)|0); + $176 = (___muldi3(($130|0),0,136657,0)|0); $177 = tempRet0; - $178 = (_i64Add(($176|0),($177|0),($84|0),0)|0); + $178 = (_i64Add(($176|0),($177|0),($150|0),($151|0))|0); $179 = tempRet0; - $180 = (_i64Add(($178|0),($179|0),($142|0),($143|0))|0); + $180 = (___muldi3(($130|0),0,-683901,-1)|0); $181 = tempRet0; - $182 = (_i64Add(($180|0),($181|0),($160|0),($161|0))|0); + $182 = (_i64Add(($154|0),($155|0),($180|0),($181|0))|0); $183 = tempRet0; - $184 = (___muldi3(($118|0),0,666643,0)|0); + $184 = (___muldi3(($124|0),0,666643,0)|0); $185 = tempRet0; - $186 = (___muldi3(($118|0),0,470296,0)|0); + $186 = (_i64Add(($54|0),0,($184|0),($185|0))|0); $187 = tempRet0; - $188 = (___muldi3(($118|0),0,654183,0)|0); + $188 = (___muldi3(($124|0),0,470296,0)|0); $189 = tempRet0; - $190 = (___muldi3(($118|0),0,-997805,-1)|0); + $190 = (_i64Add(($188|0),($189|0),($162|0),($163|0))|0); $191 = tempRet0; - $192 = (___muldi3(($118|0),0,136657,0)|0); + $192 = (___muldi3(($124|0),0,654183,0)|0); $193 = tempRet0; - $194 = (___muldi3(($118|0),0,-683901,-1)|0); + $194 = (_i64Add(($192|0),($193|0),($166|0),($167|0))|0); $195 = tempRet0; - $196 = (___muldi3(($112|0),0,666643,0)|0); + $196 = (___muldi3(($124|0),0,-997805,-1)|0); $197 = tempRet0; - $198 = (___muldi3(($112|0),0,470296,0)|0); + $198 = (_i64Add(($196|0),($197|0),($170|0),($171|0))|0); $199 = tempRet0; - $200 = (___muldi3(($112|0),0,654183,0)|0); + $200 = (___muldi3(($124|0),0,136657,0)|0); $201 = tempRet0; - $202 = (___muldi3(($112|0),0,-997805,-1)|0); + $202 = (_i64Add(($200|0),($201|0),($174|0),($175|0))|0); $203 = tempRet0; - $204 = (___muldi3(($112|0),0,136657,0)|0); + $204 = (___muldi3(($124|0),0,-683901,-1)|0); $205 = tempRet0; - $206 = (___muldi3(($112|0),0,-683901,-1)|0); + $206 = (_i64Add(($178|0),($179|0),($204|0),($205|0))|0); $207 = tempRet0; - $208 = (_i64Add(($206|0),($207|0),($72|0),0)|0); + $208 = (___muldi3(($118|0),0,666643,0)|0); $209 = tempRet0; - $210 = (_i64Add(($208|0),($209|0),($192|0),($193|0))|0); + $210 = (___muldi3(($118|0),0,470296,0)|0); $211 = tempRet0; - $212 = (_i64Add(($210|0),($211|0),($172|0),($173|0))|0); + $212 = (_i64Add(($210|0),($211|0),($186|0),($187|0))|0); $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($138|0),($139|0))|0); + $214 = (___muldi3(($118|0),0,654183,0)|0); $215 = tempRet0; - $216 = (_i64Add(($214|0),($215|0),($156|0),($157|0))|0); + $216 = (_i64Add(($214|0),($215|0),($190|0),($191|0))|0); $217 = tempRet0; - $218 = (___muldi3(($106|0),0,666643,0)|0); + $218 = (___muldi3(($118|0),0,-997805,-1)|0); $219 = tempRet0; - $220 = (_i64Add(($218|0),($219|0),($38|0),0)|0); + $220 = (_i64Add(($218|0),($219|0),($194|0),($195|0))|0); $221 = tempRet0; - $222 = (___muldi3(($106|0),0,470296,0)|0); + $222 = (___muldi3(($118|0),0,136657,0)|0); $223 = tempRet0; - $224 = (___muldi3(($106|0),0,654183,0)|0); + $224 = (_i64Add(($222|0),($223|0),($198|0),($199|0))|0); $225 = tempRet0; - $226 = (_i64Add(($224|0),($225|0),($48|0),0)|0); + $226 = (___muldi3(($118|0),0,-683901,-1)|0); $227 = tempRet0; - $228 = (_i64Add(($226|0),($227|0),($198|0),($199|0))|0); + $228 = (_i64Add(($202|0),($203|0),($226|0),($227|0))|0); $229 = tempRet0; - $230 = (_i64Add(($228|0),($229|0),($184|0),($185|0))|0); + $230 = (___muldi3(($112|0),0,666643,0)|0); $231 = tempRet0; - $232 = (___muldi3(($106|0),0,-997805,-1)|0); + $232 = (___muldi3(($112|0),0,470296,0)|0); $233 = tempRet0; - $234 = (___muldi3(($106|0),0,136657,0)|0); + $234 = (___muldi3(($112|0),0,654183,0)|0); $235 = tempRet0; - $236 = (_i64Add(($234|0),($235|0),($60|0),0)|0); + $236 = (_i64Add(($234|0),($235|0),($212|0),($213|0))|0); $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($202|0),($203|0))|0); + $238 = (___muldi3(($112|0),0,-997805,-1)|0); $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($188|0),($189|0))|0); + $240 = (_i64Add(($216|0),($217|0),($238|0),($239|0))|0); $241 = tempRet0; - $242 = (_i64Add(($240|0),($241|0),($168|0),($169|0))|0); + $242 = (___muldi3(($112|0),0,136657,0)|0); $243 = tempRet0; - $244 = (_i64Add(($242|0),($243|0),($152|0),($153|0))|0); + $244 = (_i64Add(($242|0),($243|0),($220|0),($221|0))|0); $245 = tempRet0; - $246 = (___muldi3(($106|0),0,-683901,-1)|0); + $246 = (___muldi3(($112|0),0,-683901,-1)|0); $247 = tempRet0; - $248 = (_i64Add(($220|0),($221|0),1048576,0)|0); + $248 = (_i64Add(($224|0),($225|0),($246|0),($247|0))|0); $249 = tempRet0; - $250 = (_bitshift64Lshr(($248|0),($249|0),21)|0); + $250 = (___muldi3(($106|0),0,666643,0)|0); $251 = tempRet0; - $252 = (_i64Add(($222|0),($223|0),($44|0),0)|0); + $252 = (_i64Add(($250|0),($251|0),($38|0),0)|0); $253 = tempRet0; - $254 = (_i64Add(($252|0),($253|0),($196|0),($197|0))|0); + $254 = (___muldi3(($106|0),0,470296,0)|0); $255 = tempRet0; - $256 = (_i64Add(($254|0),($255|0),($250|0),($251|0))|0); + $256 = (___muldi3(($106|0),0,654183,0)|0); $257 = tempRet0; - $258 = (_bitshift64Shl(($250|0),($251|0),21)|0); + $258 = (_i64Add(($256|0),($257|0),($48|0),0)|0); $259 = tempRet0; - $260 = (_i64Subtract(($220|0),($221|0),($258|0),($259|0))|0); + $260 = (_i64Add(($258|0),($259|0),($232|0),($233|0))|0); $261 = tempRet0; - $262 = (_i64Add(($230|0),($231|0),1048576,0)|0); + $262 = (_i64Add(($260|0),($261|0),($208|0),($209|0))|0); $263 = tempRet0; - $264 = (_bitshift64Lshr(($262|0),($263|0),21)|0); + $264 = (___muldi3(($106|0),0,-997805,-1)|0); $265 = tempRet0; - $266 = (_i64Add(($232|0),($233|0),($54|0),0)|0); + $266 = (_i64Add(($236|0),($237|0),($264|0),($265|0))|0); $267 = tempRet0; - $268 = (_i64Add(($266|0),($267|0),($200|0),($201|0))|0); + $268 = (___muldi3(($106|0),0,136657,0)|0); $269 = tempRet0; - $270 = (_i64Add(($268|0),($269|0),($186|0),($187|0))|0); + $270 = (_i64Add(($240|0),($241|0),($268|0),($269|0))|0); $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($166|0),($167|0))|0); + $272 = (___muldi3(($106|0),0,-683901,-1)|0); $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($264|0),($265|0))|0); + $274 = (_i64Add(($244|0),($245|0),($272|0),($273|0))|0); $275 = tempRet0; - $276 = (_bitshift64Shl(($264|0),($265|0),21)|0); + $276 = (_i64Add(($252|0),($253|0),1048576,0)|0); $277 = tempRet0; - $278 = (_i64Subtract(($230|0),($231|0),($276|0),($277|0))|0); + $278 = (_bitshift64Lshr(($276|0),($277|0),21)|0); $279 = tempRet0; - $280 = (_i64Add(($244|0),($245|0),1048576,0)|0); + $280 = (_i64Add(($254|0),($255|0),($44|0),0)|0); $281 = tempRet0; - $282 = (_bitshift64Ashr(($280|0),($281|0),21)|0); + $282 = (_i64Add(($280|0),($281|0),($230|0),($231|0))|0); $283 = tempRet0; - $284 = (_i64Add(($246|0),($247|0),($66|0),0)|0); + $284 = (_i64Add(($282|0),($283|0),($278|0),($279|0))|0); $285 = tempRet0; - $286 = (_i64Add(($284|0),($285|0),($204|0),($205|0))|0); + $286 = (_bitshift64Shl(($278|0),($279|0),21)|0); $287 = tempRet0; - $288 = (_i64Add(($286|0),($287|0),($190|0),($191|0))|0); + $288 = (_i64Subtract(($252|0),($253|0),($286|0),($287|0))|0); $289 = tempRet0; - $290 = (_i64Add(($288|0),($289|0),($170|0),($171|0))|0); + $290 = (_i64Add(($262|0),($263|0),1048576,0)|0); $291 = tempRet0; - $292 = (_i64Add(($290|0),($291|0),($136|0),($137|0))|0); + $292 = (_bitshift64Lshr(($290|0),($291|0),21)|0); $293 = tempRet0; - $294 = (_i64Add(($292|0),($293|0),($154|0),($155|0))|0); + $294 = (_i64Add(($266|0),($267|0),($292|0),($293|0))|0); $295 = tempRet0; - $296 = (_i64Add(($294|0),($295|0),($282|0),($283|0))|0); + $296 = (_bitshift64Shl(($292|0),($293|0),21)|0); $297 = tempRet0; - $298 = (_bitshift64Shl(($282|0),($283|0),21)|0); + $298 = (_i64Subtract(($262|0),($263|0),($296|0),($297|0))|0); $299 = tempRet0; - $300 = (_i64Subtract(($244|0),($245|0),($298|0),($299|0))|0); + $300 = (_i64Add(($270|0),($271|0),1048576,0)|0); $301 = tempRet0; - $302 = (_i64Add(($216|0),($217|0),1048576,0)|0); + $302 = (_bitshift64Ashr(($300|0),($301|0),21)|0); $303 = tempRet0; - $304 = (_bitshift64Ashr(($302|0),($303|0),21)|0); + $304 = (_i64Add(($302|0),($303|0),($274|0),($275|0))|0); $305 = tempRet0; - $306 = (_i64Add(($194|0),($195|0),($78|0),0)|0); + $306 = (_bitshift64Shl(($302|0),($303|0),21)|0); $307 = tempRet0; - $308 = (_i64Add(($306|0),($307|0),($174|0),($175|0))|0); + $308 = (_i64Subtract(($270|0),($271|0),($306|0),($307|0))|0); $309 = tempRet0; - $310 = (_i64Add(($308|0),($309|0),($140|0),($141|0))|0); + $310 = (_i64Add(($248|0),($249|0),1048576,0)|0); $311 = tempRet0; - $312 = (_i64Add(($310|0),($311|0),($158|0),($159|0))|0); + $312 = (_bitshift64Ashr(($310|0),($311|0),21)|0); $313 = tempRet0; - $314 = (_i64Add(($312|0),($313|0),($304|0),($305|0))|0); + $314 = (_i64Add(($312|0),($313|0),($228|0),($229|0))|0); $315 = tempRet0; - $316 = (_bitshift64Shl(($304|0),($305|0),21)|0); + $316 = (_bitshift64Shl(($312|0),($313|0),21)|0); $317 = tempRet0; - $318 = (_i64Subtract(($216|0),($217|0),($316|0),($317|0))|0); + $318 = (_i64Subtract(($248|0),($249|0),($316|0),($317|0))|0); $319 = tempRet0; - $320 = (_i64Add(($182|0),($183|0),1048576,0)|0); + $320 = (_i64Add(($206|0),($207|0),1048576,0)|0); $321 = tempRet0; $322 = (_bitshift64Ashr(($320|0),($321|0),21)|0); $323 = tempRet0; - $324 = (_i64Add(($164|0),($165|0),($322|0),($323|0))|0); + $324 = (_i64Add(($322|0),($323|0),($182|0),($183|0))|0); $325 = tempRet0; $326 = (_bitshift64Shl(($322|0),($323|0),21)|0); $327 = tempRet0; - $328 = (_i64Subtract(($182|0),($183|0),($326|0),($327|0))|0); + $328 = (_i64Subtract(($206|0),($207|0),($326|0),($327|0))|0); $329 = tempRet0; - $330 = (_i64Add(($150|0),($151|0),1048576,0)|0); + $330 = (_i64Add(($158|0),($159|0),1048576,0)|0); $331 = tempRet0; $332 = (_bitshift64Ashr(($330|0),($331|0),21)|0); $333 = tempRet0; @@ -17357,37 +18119,37 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $335 = tempRet0; $336 = (_bitshift64Shl(($332|0),($333|0),21)|0); $337 = tempRet0; - $338 = (_i64Subtract(($150|0),($151|0),($336|0),($337|0))|0); + $338 = (_i64Subtract(($158|0),($159|0),($336|0),($337|0))|0); $339 = tempRet0; - $340 = (_i64Add(($256|0),($257|0),1048576,0)|0); + $340 = (_i64Add(($284|0),($285|0),1048576,0)|0); $341 = tempRet0; $342 = (_bitshift64Lshr(($340|0),($341|0),21)|0); $343 = tempRet0; - $344 = (_i64Add(($278|0),($279|0),($342|0),($343|0))|0); + $344 = (_i64Add(($342|0),($343|0),($298|0),($299|0))|0); $345 = tempRet0; $346 = (_bitshift64Shl(($342|0),($343|0),21)|0); $347 = tempRet0; - $348 = (_i64Subtract(($256|0),($257|0),($346|0),($347|0))|0); + $348 = (_i64Subtract(($284|0),($285|0),($346|0),($347|0))|0); $349 = tempRet0; - $350 = (_i64Add(($274|0),($275|0),1048576,0)|0); + $350 = (_i64Add(($294|0),($295|0),1048576,0)|0); $351 = tempRet0; $352 = (_bitshift64Ashr(($350|0),($351|0),21)|0); $353 = tempRet0; - $354 = (_i64Add(($300|0),($301|0),($352|0),($353|0))|0); + $354 = (_i64Add(($352|0),($353|0),($308|0),($309|0))|0); $355 = tempRet0; $356 = (_bitshift64Shl(($352|0),($353|0),21)|0); $357 = tempRet0; - $358 = (_i64Subtract(($274|0),($275|0),($356|0),($357|0))|0); + $358 = (_i64Subtract(($294|0),($295|0),($356|0),($357|0))|0); $359 = tempRet0; - $360 = (_i64Add(($296|0),($297|0),1048576,0)|0); + $360 = (_i64Add(($304|0),($305|0),1048576,0)|0); $361 = tempRet0; $362 = (_bitshift64Ashr(($360|0),($361|0),21)|0); $363 = tempRet0; - $364 = (_i64Add(($318|0),($319|0),($362|0),($363|0))|0); + $364 = (_i64Add(($362|0),($363|0),($318|0),($319|0))|0); $365 = tempRet0; $366 = (_bitshift64Shl(($362|0),($363|0),21)|0); $367 = tempRet0; - $368 = (_i64Subtract(($296|0),($297|0),($366|0),($367|0))|0); + $368 = (_i64Subtract(($304|0),($305|0),($366|0),($367|0))|0); $369 = tempRet0; $370 = (_i64Add(($314|0),($315|0),1048576,0)|0); $371 = tempRet0; @@ -17411,11 +18173,11 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $389 = tempRet0; $390 = (___muldi3(($334|0),($335|0),666643,0)|0); $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($32|0),0)|0); + $392 = (_i64Add(($32|0),0,($390|0),($391|0))|0); $393 = tempRet0; $394 = (___muldi3(($334|0),($335|0),470296,0)|0); $395 = tempRet0; - $396 = (_i64Add(($260|0),($261|0),($394|0),($395|0))|0); + $396 = (_i64Add(($288|0),($289|0),($394|0),($395|0))|0); $397 = tempRet0; $398 = (___muldi3(($334|0),($335|0),654183,0)|0); $399 = tempRet0; @@ -17423,11 +18185,11 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $401 = tempRet0; $402 = (___muldi3(($334|0),($335|0),-997805,-1)|0); $403 = tempRet0; - $404 = (_i64Add(($344|0),($345|0),($402|0),($403|0))|0); + $404 = (_i64Add(($402|0),($403|0),($344|0),($345|0))|0); $405 = tempRet0; $406 = (___muldi3(($334|0),($335|0),136657,0)|0); $407 = tempRet0; - $408 = (_i64Add(($358|0),($359|0),($406|0),($407|0))|0); + $408 = (_i64Add(($406|0),($407|0),($358|0),($359|0))|0); $409 = tempRet0; $410 = (___muldi3(($334|0),($335|0),-683901,-1)|0); $411 = tempRet0; @@ -17435,169 +18197,169 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $413 = tempRet0; $414 = (___muldi3(($384|0),($385|0),666643,0)|0); $415 = tempRet0; - $416 = (___muldi3(($384|0),($385|0),470296,0)|0); + $416 = (_i64Add(($26|0),0,($414|0),($415|0))|0); $417 = tempRet0; - $418 = (___muldi3(($384|0),($385|0),654183,0)|0); + $418 = (___muldi3(($384|0),($385|0),470296,0)|0); $419 = tempRet0; - $420 = (_i64Add(($396|0),($397|0),($418|0),($419|0))|0); + $420 = (_i64Add(($392|0),($393|0),($418|0),($419|0))|0); $421 = tempRet0; - $422 = (___muldi3(($384|0),($385|0),-997805,-1)|0); + $422 = (___muldi3(($384|0),($385|0),654183,0)|0); $423 = tempRet0; - $424 = (_i64Add(($400|0),($401|0),($422|0),($423|0))|0); + $424 = (_i64Add(($396|0),($397|0),($422|0),($423|0))|0); $425 = tempRet0; - $426 = (___muldi3(($384|0),($385|0),136657,0)|0); + $426 = (___muldi3(($384|0),($385|0),-997805,-1)|0); $427 = tempRet0; - $428 = (_i64Add(($404|0),($405|0),($426|0),($427|0))|0); + $428 = (_i64Add(($400|0),($401|0),($426|0),($427|0))|0); $429 = tempRet0; - $430 = (___muldi3(($384|0),($385|0),-683901,-1)|0); + $430 = (___muldi3(($384|0),($385|0),136657,0)|0); $431 = tempRet0; - $432 = (_i64Add(($408|0),($409|0),($430|0),($431|0))|0); + $432 = (_i64Add(($404|0),($405|0),($430|0),($431|0))|0); $433 = tempRet0; - $434 = (___muldi3(($388|0),($389|0),666643,0)|0); + $434 = (___muldi3(($384|0),($385|0),-683901,-1)|0); $435 = tempRet0; - $436 = (___muldi3(($388|0),($389|0),470296,0)|0); + $436 = (_i64Add(($408|0),($409|0),($434|0),($435|0))|0); $437 = tempRet0; - $438 = (___muldi3(($388|0),($389|0),654183,0)|0); + $438 = (___muldi3(($388|0),($389|0),666643,0)|0); $439 = tempRet0; - $440 = (___muldi3(($388|0),($389|0),-997805,-1)|0); + $440 = (_i64Add(($20|0),0,($438|0),($439|0))|0); $441 = tempRet0; - $442 = (___muldi3(($388|0),($389|0),136657,0)|0); + $442 = (___muldi3(($388|0),($389|0),470296,0)|0); $443 = tempRet0; - $444 = (___muldi3(($388|0),($389|0),-683901,-1)|0); + $444 = (_i64Add(($416|0),($417|0),($442|0),($443|0))|0); $445 = tempRet0; - $446 = (_i64Add(($428|0),($429|0),($444|0),($445|0))|0); + $446 = (___muldi3(($388|0),($389|0),654183,0)|0); $447 = tempRet0; - $448 = (___muldi3(($374|0),($375|0),666643,0)|0); + $448 = (_i64Add(($420|0),($421|0),($446|0),($447|0))|0); $449 = tempRet0; - $450 = (___muldi3(($374|0),($375|0),470296,0)|0); + $450 = (___muldi3(($388|0),($389|0),-997805,-1)|0); $451 = tempRet0; - $452 = (___muldi3(($374|0),($375|0),654183,0)|0); + $452 = (_i64Add(($424|0),($425|0),($450|0),($451|0))|0); $453 = tempRet0; - $454 = (___muldi3(($374|0),($375|0),-997805,-1)|0); + $454 = (___muldi3(($388|0),($389|0),136657,0)|0); $455 = tempRet0; - $456 = (___muldi3(($374|0),($375|0),136657,0)|0); + $456 = (_i64Add(($428|0),($429|0),($454|0),($455|0))|0); $457 = tempRet0; - $458 = (___muldi3(($374|0),($375|0),-683901,-1)|0); + $458 = (___muldi3(($388|0),($389|0),-683901,-1)|0); $459 = tempRet0; - $460 = (___muldi3(($378|0),($379|0),666643,0)|0); + $460 = (_i64Add(($432|0),($433|0),($458|0),($459|0))|0); $461 = tempRet0; - $462 = (___muldi3(($378|0),($379|0),470296,0)|0); + $462 = (___muldi3(($374|0),($375|0),666643,0)|0); $463 = tempRet0; - $464 = (___muldi3(($378|0),($379|0),654183,0)|0); + $464 = (_i64Add(($462|0),($463|0),($14|0),0)|0); $465 = tempRet0; - $466 = (___muldi3(($378|0),($379|0),-997805,-1)|0); + $466 = (___muldi3(($374|0),($375|0),470296,0)|0); $467 = tempRet0; - $468 = (___muldi3(($378|0),($379|0),136657,0)|0); + $468 = (_i64Add(($440|0),($441|0),($466|0),($467|0))|0); $469 = tempRet0; - $470 = (___muldi3(($378|0),($379|0),-683901,-1)|0); + $470 = (___muldi3(($374|0),($375|0),654183,0)|0); $471 = tempRet0; - $472 = (_i64Add(($420|0),($421|0),($456|0),($457|0))|0); + $472 = (_i64Add(($444|0),($445|0),($470|0),($471|0))|0); $473 = tempRet0; - $474 = (_i64Add(($472|0),($473|0),($440|0),($441|0))|0); + $474 = (___muldi3(($374|0),($375|0),-997805,-1)|0); $475 = tempRet0; - $476 = (_i64Add(($474|0),($475|0),($470|0),($471|0))|0); + $476 = (_i64Add(($448|0),($449|0),($474|0),($475|0))|0); $477 = tempRet0; - $478 = (___muldi3(($364|0),($365|0),666643,0)|0); + $478 = (___muldi3(($374|0),($375|0),136657,0)|0); $479 = tempRet0; - $480 = (_i64Add(($478|0),($479|0),($2|0),0)|0); + $480 = (_i64Add(($452|0),($453|0),($478|0),($479|0))|0); $481 = tempRet0; - $482 = (___muldi3(($364|0),($365|0),470296,0)|0); + $482 = (___muldi3(($374|0),($375|0),-683901,-1)|0); $483 = tempRet0; - $484 = (___muldi3(($364|0),($365|0),654183,0)|0); + $484 = (_i64Add(($456|0),($457|0),($482|0),($483|0))|0); $485 = tempRet0; - $486 = (_i64Add(($484|0),($485|0),($14|0),0)|0); + $486 = (___muldi3(($378|0),($379|0),666643,0)|0); $487 = tempRet0; - $488 = (_i64Add(($486|0),($487|0),($448|0),($449|0))|0); + $488 = (___muldi3(($378|0),($379|0),470296,0)|0); $489 = tempRet0; - $490 = (_i64Add(($488|0),($489|0),($462|0),($463|0))|0); + $490 = (___muldi3(($378|0),($379|0),654183,0)|0); $491 = tempRet0; - $492 = (___muldi3(($364|0),($365|0),-997805,-1)|0); + $492 = (_i64Add(($468|0),($469|0),($490|0),($491|0))|0); $493 = tempRet0; - $494 = (___muldi3(($364|0),($365|0),136657,0)|0); + $494 = (___muldi3(($378|0),($379|0),-997805,-1)|0); $495 = tempRet0; - $496 = (_i64Add(($494|0),($495|0),($26|0),0)|0); + $496 = (_i64Add(($472|0),($473|0),($494|0),($495|0))|0); $497 = tempRet0; - $498 = (_i64Add(($496|0),($497|0),($414|0),($415|0))|0); + $498 = (___muldi3(($378|0),($379|0),136657,0)|0); $499 = tempRet0; - $500 = (_i64Add(($498|0),($499|0),($452|0),($453|0))|0); + $500 = (_i64Add(($476|0),($477|0),($498|0),($499|0))|0); $501 = tempRet0; - $502 = (_i64Add(($500|0),($501|0),($436|0),($437|0))|0); + $502 = (___muldi3(($378|0),($379|0),-683901,-1)|0); $503 = tempRet0; - $504 = (_i64Add(($502|0),($503|0),($466|0),($467|0))|0); + $504 = (_i64Add(($480|0),($481|0),($502|0),($503|0))|0); $505 = tempRet0; - $506 = (___muldi3(($364|0),($365|0),-683901,-1)|0); + $506 = (___muldi3(($364|0),($365|0),666643,0)|0); $507 = tempRet0; - $508 = (_i64Add(($480|0),($481|0),1048576,0)|0); + $508 = (_i64Add(($506|0),($507|0),($2|0),0)|0); $509 = tempRet0; - $510 = (_bitshift64Ashr(($508|0),($509|0),21)|0); + $510 = (___muldi3(($364|0),($365|0),470296,0)|0); $511 = tempRet0; - $512 = (_i64Add(($482|0),($483|0),($8|0),0)|0); + $512 = (___muldi3(($364|0),($365|0),654183,0)|0); $513 = tempRet0; - $514 = (_i64Add(($512|0),($513|0),($460|0),($461|0))|0); + $514 = (_i64Add(($464|0),($465|0),($512|0),($513|0))|0); $515 = tempRet0; - $516 = (_i64Add(($514|0),($515|0),($510|0),($511|0))|0); + $516 = (_i64Add(($514|0),($515|0),($488|0),($489|0))|0); $517 = tempRet0; - $518 = (_bitshift64Shl(($510|0),($511|0),21)|0); + $518 = (___muldi3(($364|0),($365|0),-997805,-1)|0); $519 = tempRet0; - $520 = (_i64Subtract(($480|0),($481|0),($518|0),($519|0))|0); + $520 = (_i64Add(($492|0),($493|0),($518|0),($519|0))|0); $521 = tempRet0; - $522 = (_i64Add(($490|0),($491|0),1048576,0)|0); + $522 = (___muldi3(($364|0),($365|0),136657,0)|0); $523 = tempRet0; - $524 = (_bitshift64Ashr(($522|0),($523|0),21)|0); + $524 = (_i64Add(($496|0),($497|0),($522|0),($523|0))|0); $525 = tempRet0; - $526 = (_i64Add(($492|0),($493|0),($20|0),0)|0); + $526 = (___muldi3(($364|0),($365|0),-683901,-1)|0); $527 = tempRet0; - $528 = (_i64Add(($526|0),($527|0),($450|0),($451|0))|0); + $528 = (_i64Add(($500|0),($501|0),($526|0),($527|0))|0); $529 = tempRet0; - $530 = (_i64Add(($528|0),($529|0),($434|0),($435|0))|0); + $530 = (_i64Add(($508|0),($509|0),1048576,0)|0); $531 = tempRet0; - $532 = (_i64Add(($530|0),($531|0),($464|0),($465|0))|0); + $532 = (_bitshift64Ashr(($530|0),($531|0),21)|0); $533 = tempRet0; - $534 = (_i64Add(($532|0),($533|0),($524|0),($525|0))|0); + $534 = (_i64Add(($510|0),($511|0),($8|0),0)|0); $535 = tempRet0; - $536 = (_bitshift64Shl(($524|0),($525|0),21)|0); + $536 = (_i64Add(($534|0),($535|0),($486|0),($487|0))|0); $537 = tempRet0; - $538 = (_i64Add(($504|0),($505|0),1048576,0)|0); + $538 = (_i64Add(($536|0),($537|0),($532|0),($533|0))|0); $539 = tempRet0; - $540 = (_bitshift64Ashr(($538|0),($539|0),21)|0); + $540 = (_bitshift64Shl(($532|0),($533|0),21)|0); $541 = tempRet0; - $542 = (_i64Add(($392|0),($393|0),($506|0),($507|0))|0); + $542 = (_i64Subtract(($508|0),($509|0),($540|0),($541|0))|0); $543 = tempRet0; - $544 = (_i64Add(($542|0),($543|0),($416|0),($417|0))|0); + $544 = (_i64Add(($516|0),($517|0),1048576,0)|0); $545 = tempRet0; - $546 = (_i64Add(($544|0),($545|0),($454|0),($455|0))|0); + $546 = (_bitshift64Ashr(($544|0),($545|0),21)|0); $547 = tempRet0; - $548 = (_i64Add(($546|0),($547|0),($438|0),($439|0))|0); + $548 = (_i64Add(($546|0),($547|0),($520|0),($521|0))|0); $549 = tempRet0; - $550 = (_i64Add(($548|0),($549|0),($468|0),($469|0))|0); + $550 = (_bitshift64Shl(($546|0),($547|0),21)|0); $551 = tempRet0; - $552 = (_i64Add(($550|0),($551|0),($540|0),($541|0))|0); + $552 = (_i64Add(($524|0),($525|0),1048576,0)|0); $553 = tempRet0; - $554 = (_bitshift64Shl(($540|0),($541|0),21)|0); + $554 = (_bitshift64Ashr(($552|0),($553|0),21)|0); $555 = tempRet0; - $556 = (_i64Add(($476|0),($477|0),1048576,0)|0); + $556 = (_i64Add(($554|0),($555|0),($528|0),($529|0))|0); $557 = tempRet0; - $558 = (_bitshift64Ashr(($556|0),($557|0),21)|0); + $558 = (_bitshift64Shl(($554|0),($555|0),21)|0); $559 = tempRet0; - $560 = (_i64Add(($424|0),($425|0),($458|0),($459|0))|0); + $560 = (_i64Add(($504|0),($505|0),1048576,0)|0); $561 = tempRet0; - $562 = (_i64Add(($560|0),($561|0),($442|0),($443|0))|0); + $562 = (_bitshift64Ashr(($560|0),($561|0),21)|0); $563 = tempRet0; - $564 = (_i64Add(($562|0),($563|0),($558|0),($559|0))|0); + $564 = (_i64Add(($562|0),($563|0),($484|0),($485|0))|0); $565 = tempRet0; - $566 = (_bitshift64Shl(($558|0),($559|0),21)|0); + $566 = (_bitshift64Shl(($562|0),($563|0),21)|0); $567 = tempRet0; - $568 = (_i64Subtract(($476|0),($477|0),($566|0),($567|0))|0); + $568 = (_i64Subtract(($504|0),($505|0),($566|0),($567|0))|0); $569 = tempRet0; - $570 = (_i64Add(($446|0),($447|0),1048576,0)|0); + $570 = (_i64Add(($460|0),($461|0),1048576,0)|0); $571 = tempRet0; $572 = (_bitshift64Ashr(($570|0),($571|0),21)|0); $573 = tempRet0; - $574 = (_i64Add(($432|0),($433|0),($572|0),($573|0))|0); + $574 = (_i64Add(($572|0),($573|0),($436|0),($437|0))|0); $575 = tempRet0; $576 = (_bitshift64Shl(($572|0),($573|0),21)|0); $577 = tempRet0; - $578 = (_i64Subtract(($446|0),($447|0),($576|0),($577|0))|0); + $578 = (_i64Subtract(($460|0),($461|0),($576|0),($577|0))|0); $579 = tempRet0; $580 = (_i64Add(($412|0),($413|0),1048576,0)|0); $581 = tempRet0; @@ -17609,135 +18371,135 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $587 = tempRet0; $588 = (_i64Subtract(($412|0),($413|0),($586|0),($587|0))|0); $589 = tempRet0; - $590 = (_i64Add(($516|0),($517|0),1048576,0)|0); + $590 = (_i64Add(($538|0),($539|0),1048576,0)|0); $591 = tempRet0; $592 = (_bitshift64Ashr(($590|0),($591|0),21)|0); $593 = tempRet0; $594 = (_bitshift64Shl(($592|0),($593|0),21)|0); $595 = tempRet0; - $596 = (_i64Add(($534|0),($535|0),1048576,0)|0); + $596 = (_i64Add(($548|0),($549|0),1048576,0)|0); $597 = tempRet0; $598 = (_bitshift64Ashr(($596|0),($597|0),21)|0); $599 = tempRet0; $600 = (_bitshift64Shl(($598|0),($599|0),21)|0); $601 = tempRet0; - $602 = (_i64Add(($552|0),($553|0),1048576,0)|0); + $602 = (_i64Subtract(($548|0),($549|0),($600|0),($601|0))|0); $603 = tempRet0; - $604 = (_bitshift64Ashr(($602|0),($603|0),21)|0); + $604 = (_i64Add(($556|0),($557|0),1048576,0)|0); $605 = tempRet0; - $606 = (_i64Add(($568|0),($569|0),($604|0),($605|0))|0); + $606 = (_bitshift64Ashr(($604|0),($605|0),21)|0); $607 = tempRet0; - $608 = (_bitshift64Shl(($604|0),($605|0),21)|0); + $608 = (_i64Add(($568|0),($569|0),($606|0),($607|0))|0); $609 = tempRet0; - $610 = (_i64Add(($564|0),($565|0),1048576,0)|0); + $610 = (_bitshift64Shl(($606|0),($607|0),21)|0); $611 = tempRet0; - $612 = (_bitshift64Ashr(($610|0),($611|0),21)|0); + $612 = (_i64Subtract(($556|0),($557|0),($610|0),($611|0))|0); $613 = tempRet0; - $614 = (_i64Add(($578|0),($579|0),($612|0),($613|0))|0); + $614 = (_i64Add(($564|0),($565|0),1048576,0)|0); $615 = tempRet0; - $616 = (_bitshift64Shl(($612|0),($613|0),21)|0); + $616 = (_bitshift64Ashr(($614|0),($615|0),21)|0); $617 = tempRet0; - $618 = (_i64Subtract(($564|0),($565|0),($616|0),($617|0))|0); + $618 = (_i64Add(($578|0),($579|0),($616|0),($617|0))|0); $619 = tempRet0; - $620 = (_i64Add(($574|0),($575|0),1048576,0)|0); + $620 = (_bitshift64Shl(($616|0),($617|0),21)|0); $621 = tempRet0; - $622 = (_bitshift64Ashr(($620|0),($621|0),21)|0); + $622 = (_i64Subtract(($564|0),($565|0),($620|0),($621|0))|0); $623 = tempRet0; - $624 = (_i64Add(($588|0),($589|0),($622|0),($623|0))|0); + $624 = (_i64Add(($574|0),($575|0),1048576,0)|0); $625 = tempRet0; - $626 = (_bitshift64Shl(($622|0),($623|0),21)|0); + $626 = (_bitshift64Ashr(($624|0),($625|0),21)|0); $627 = tempRet0; - $628 = (_i64Subtract(($574|0),($575|0),($626|0),($627|0))|0); + $628 = (_i64Add(($588|0),($589|0),($626|0),($627|0))|0); $629 = tempRet0; - $630 = (_i64Add(($584|0),($585|0),1048576,0)|0); + $630 = (_bitshift64Shl(($626|0),($627|0),21)|0); $631 = tempRet0; - $632 = (_bitshift64Ashr(($630|0),($631|0),21)|0); + $632 = (_i64Subtract(($574|0),($575|0),($630|0),($631|0))|0); $633 = tempRet0; - $634 = (_bitshift64Shl(($632|0),($633|0),21)|0); + $634 = (_i64Add(($584|0),($585|0),1048576,0)|0); $635 = tempRet0; - $636 = (_i64Subtract(($584|0),($585|0),($634|0),($635|0))|0); + $636 = (_bitshift64Ashr(($634|0),($635|0),21)|0); $637 = tempRet0; - $638 = (___muldi3(($632|0),($633|0),666643,0)|0); + $638 = (_bitshift64Shl(($636|0),($637|0),21)|0); $639 = tempRet0; - $640 = (_i64Add(($520|0),($521|0),($638|0),($639|0))|0); + $640 = (_i64Subtract(($584|0),($585|0),($638|0),($639|0))|0); $641 = tempRet0; - $642 = (___muldi3(($632|0),($633|0),470296,0)|0); + $642 = (___muldi3(($636|0),($637|0),666643,0)|0); $643 = tempRet0; - $644 = (___muldi3(($632|0),($633|0),654183,0)|0); + $644 = (_i64Add(($542|0),($543|0),($642|0),($643|0))|0); $645 = tempRet0; - $646 = (___muldi3(($632|0),($633|0),-997805,-1)|0); + $646 = (___muldi3(($636|0),($637|0),470296,0)|0); $647 = tempRet0; - $648 = (___muldi3(($632|0),($633|0),136657,0)|0); + $648 = (___muldi3(($636|0),($637|0),654183,0)|0); $649 = tempRet0; - $650 = (___muldi3(($632|0),($633|0),-683901,-1)|0); + $650 = (___muldi3(($636|0),($637|0),-997805,-1)|0); $651 = tempRet0; - $652 = (_bitshift64Ashr(($640|0),($641|0),21)|0); + $652 = (_i64Add(($602|0),($603|0),($650|0),($651|0))|0); $653 = tempRet0; - $654 = (_i64Add(($642|0),($643|0),($516|0),($517|0))|0); + $654 = (___muldi3(($636|0),($637|0),136657,0)|0); $655 = tempRet0; - $656 = (_i64Subtract(($654|0),($655|0),($594|0),($595|0))|0); + $656 = (___muldi3(($636|0),($637|0),-683901,-1)|0); $657 = tempRet0; - $658 = (_i64Add(($656|0),($657|0),($652|0),($653|0))|0); + $658 = (_i64Add(($612|0),($613|0),($656|0),($657|0))|0); $659 = tempRet0; - $660 = (_bitshift64Shl(($652|0),($653|0),21)|0); + $660 = (_bitshift64Ashr(($644|0),($645|0),21)|0); $661 = tempRet0; - $662 = (_i64Subtract(($640|0),($641|0),($660|0),($661|0))|0); + $662 = (_i64Add(($646|0),($647|0),($538|0),($539|0))|0); $663 = tempRet0; - $664 = (_bitshift64Ashr(($658|0),($659|0),21)|0); + $664 = (_i64Subtract(($662|0),($663|0),($594|0),($595|0))|0); $665 = tempRet0; - $666 = (_i64Add(($644|0),($645|0),($490|0),($491|0))|0); + $666 = (_i64Add(($664|0),($665|0),($660|0),($661|0))|0); $667 = tempRet0; - $668 = (_i64Subtract(($666|0),($667|0),($536|0),($537|0))|0); + $668 = (_bitshift64Shl(($660|0),($661|0),21)|0); $669 = tempRet0; - $670 = (_i64Add(($668|0),($669|0),($592|0),($593|0))|0); + $670 = (_i64Subtract(($644|0),($645|0),($668|0),($669|0))|0); $671 = tempRet0; - $672 = (_i64Add(($670|0),($671|0),($664|0),($665|0))|0); + $672 = (_bitshift64Ashr(($666|0),($667|0),21)|0); $673 = tempRet0; - $674 = (_bitshift64Shl(($664|0),($665|0),21)|0); + $674 = (_i64Add(($648|0),($649|0),($516|0),($517|0))|0); $675 = tempRet0; - $676 = (_i64Subtract(($658|0),($659|0),($674|0),($675|0))|0); + $676 = (_i64Subtract(($674|0),($675|0),($550|0),($551|0))|0); $677 = tempRet0; - $678 = (_bitshift64Ashr(($672|0),($673|0),21)|0); + $678 = (_i64Add(($676|0),($677|0),($592|0),($593|0))|0); $679 = tempRet0; - $680 = (_i64Add(($534|0),($535|0),($646|0),($647|0))|0); + $680 = (_i64Add(($678|0),($679|0),($672|0),($673|0))|0); $681 = tempRet0; - $682 = (_i64Subtract(($680|0),($681|0),($600|0),($601|0))|0); + $682 = (_bitshift64Shl(($672|0),($673|0),21)|0); $683 = tempRet0; - $684 = (_i64Add(($682|0),($683|0),($678|0),($679|0))|0); + $684 = (_i64Subtract(($666|0),($667|0),($682|0),($683|0))|0); $685 = tempRet0; - $686 = (_bitshift64Shl(($678|0),($679|0),21)|0); + $686 = (_bitshift64Ashr(($680|0),($681|0),21)|0); $687 = tempRet0; - $688 = (_i64Subtract(($672|0),($673|0),($686|0),($687|0))|0); + $688 = (_i64Add(($686|0),($687|0),($652|0),($653|0))|0); $689 = tempRet0; - $690 = (_bitshift64Ashr(($684|0),($685|0),21)|0); + $690 = (_bitshift64Shl(($686|0),($687|0),21)|0); $691 = tempRet0; - $692 = (_i64Add(($648|0),($649|0),($504|0),($505|0))|0); + $692 = (_i64Subtract(($680|0),($681|0),($690|0),($691|0))|0); $693 = tempRet0; - $694 = (_i64Subtract(($692|0),($693|0),($554|0),($555|0))|0); + $694 = (_bitshift64Ashr(($688|0),($689|0),21)|0); $695 = tempRet0; - $696 = (_i64Add(($694|0),($695|0),($598|0),($599|0))|0); + $696 = (_i64Add(($654|0),($655|0),($524|0),($525|0))|0); $697 = tempRet0; - $698 = (_i64Add(($696|0),($697|0),($690|0),($691|0))|0); + $698 = (_i64Subtract(($696|0),($697|0),($558|0),($559|0))|0); $699 = tempRet0; - $700 = (_bitshift64Shl(($690|0),($691|0),21)|0); + $700 = (_i64Add(($698|0),($699|0),($598|0),($599|0))|0); $701 = tempRet0; - $702 = (_i64Subtract(($684|0),($685|0),($700|0),($701|0))|0); + $702 = (_i64Add(($700|0),($701|0),($694|0),($695|0))|0); $703 = tempRet0; - $704 = (_bitshift64Ashr(($698|0),($699|0),21)|0); + $704 = (_bitshift64Shl(($694|0),($695|0),21)|0); $705 = tempRet0; - $706 = (_i64Add(($552|0),($553|0),($650|0),($651|0))|0); + $706 = (_i64Subtract(($688|0),($689|0),($704|0),($705|0))|0); $707 = tempRet0; - $708 = (_i64Subtract(($706|0),($707|0),($608|0),($609|0))|0); + $708 = (_bitshift64Ashr(($702|0),($703|0),21)|0); $709 = tempRet0; - $710 = (_i64Add(($708|0),($709|0),($704|0),($705|0))|0); + $710 = (_i64Add(($708|0),($709|0),($658|0),($659|0))|0); $711 = tempRet0; - $712 = (_bitshift64Shl(($704|0),($705|0),21)|0); + $712 = (_bitshift64Shl(($708|0),($709|0),21)|0); $713 = tempRet0; - $714 = (_i64Subtract(($698|0),($699|0),($712|0),($713|0))|0); + $714 = (_i64Subtract(($702|0),($703|0),($712|0),($713|0))|0); $715 = tempRet0; $716 = (_bitshift64Ashr(($710|0),($711|0),21)|0); $717 = tempRet0; - $718 = (_i64Add(($606|0),($607|0),($716|0),($717|0))|0); + $718 = (_i64Add(($608|0),($609|0),($716|0),($717|0))|0); $719 = tempRet0; $720 = (_bitshift64Shl(($716|0),($717|0),21)|0); $721 = tempRet0; @@ -17745,7 +18507,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $723 = tempRet0; $724 = (_bitshift64Ashr(($718|0),($719|0),21)|0); $725 = tempRet0; - $726 = (_i64Add(($724|0),($725|0),($618|0),($619|0))|0); + $726 = (_i64Add(($724|0),($725|0),($622|0),($623|0))|0); $727 = tempRet0; $728 = (_bitshift64Shl(($724|0),($725|0),21)|0); $729 = tempRet0; @@ -17753,7 +18515,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $731 = tempRet0; $732 = (_bitshift64Ashr(($726|0),($727|0),21)|0); $733 = tempRet0; - $734 = (_i64Add(($614|0),($615|0),($732|0),($733|0))|0); + $734 = (_i64Add(($618|0),($619|0),($732|0),($733|0))|0); $735 = tempRet0; $736 = (_bitshift64Shl(($732|0),($733|0),21)|0); $737 = tempRet0; @@ -17761,7 +18523,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $739 = tempRet0; $740 = (_bitshift64Ashr(($734|0),($735|0),21)|0); $741 = tempRet0; - $742 = (_i64Add(($740|0),($741|0),($628|0),($629|0))|0); + $742 = (_i64Add(($740|0),($741|0),($632|0),($633|0))|0); $743 = tempRet0; $744 = (_bitshift64Shl(($740|0),($741|0),21)|0); $745 = tempRet0; @@ -17769,7 +18531,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $747 = tempRet0; $748 = (_bitshift64Ashr(($742|0),($743|0),21)|0); $749 = tempRet0; - $750 = (_i64Add(($624|0),($625|0),($748|0),($749|0))|0); + $750 = (_i64Add(($628|0),($629|0),($748|0),($749|0))|0); $751 = tempRet0; $752 = (_bitshift64Shl(($748|0),($749|0),21)|0); $753 = tempRet0; @@ -17777,7 +18539,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $755 = tempRet0; $756 = (_bitshift64Ashr(($750|0),($751|0),21)|0); $757 = tempRet0; - $758 = (_i64Add(($756|0),($757|0),($636|0),($637|0))|0); + $758 = (_i64Add(($756|0),($757|0),($640|0),($641|0))|0); $759 = tempRet0; $760 = (_bitshift64Shl(($756|0),($757|0),21)|0); $761 = tempRet0; @@ -17791,19 +18553,19 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $769 = tempRet0; $770 = (___muldi3(($764|0),($765|0),666643,0)|0); $771 = tempRet0; - $772 = (_i64Add(($770|0),($771|0),($662|0),($663|0))|0); + $772 = (_i64Add(($770|0),($771|0),($670|0),($671|0))|0); $773 = tempRet0; $774 = (___muldi3(($764|0),($765|0),470296,0)|0); $775 = tempRet0; - $776 = (_i64Add(($676|0),($677|0),($774|0),($775|0))|0); + $776 = (_i64Add(($684|0),($685|0),($774|0),($775|0))|0); $777 = tempRet0; $778 = (___muldi3(($764|0),($765|0),654183,0)|0); $779 = tempRet0; - $780 = (_i64Add(($688|0),($689|0),($778|0),($779|0))|0); + $780 = (_i64Add(($692|0),($693|0),($778|0),($779|0))|0); $781 = tempRet0; $782 = (___muldi3(($764|0),($765|0),-997805,-1)|0); $783 = tempRet0; - $784 = (_i64Add(($702|0),($703|0),($782|0),($783|0))|0); + $784 = (_i64Add(($706|0),($707|0),($782|0),($783|0))|0); $785 = tempRet0; $786 = (___muldi3(($764|0),($765|0),136657,0)|0); $787 = tempRet0; @@ -17831,7 +18593,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $809 = tempRet0; $810 = (_bitshift64Ashr(($804|0),($805|0),21)|0); $811 = tempRet0; - $812 = (_i64Add(($784|0),($785|0),($810|0),($811|0))|0); + $812 = (_i64Add(($810|0),($811|0),($784|0),($785|0))|0); $813 = tempRet0; $814 = (_bitshift64Shl(($810|0),($811|0),21)|0); $815 = tempRet0; @@ -17847,7 +18609,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $825 = tempRet0; $826 = (_bitshift64Ashr(($820|0),($821|0),21)|0); $827 = tempRet0; - $828 = (_i64Add(($792|0),($793|0),($826|0),($827|0))|0); + $828 = (_i64Add(($826|0),($827|0),($792|0),($793|0))|0); $829 = tempRet0; $830 = (_bitshift64Shl(($826|0),($827|0),21)|0); $831 = tempRet0; @@ -17906,7 +18668,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $883 = (_bitshift64Lshr(($800|0),($801|0),8)|0); $884 = tempRet0; $885 = $883&255; - $886 = (($s) + 1|0); + $886 = ((($s)) + 1|0); HEAP8[$886>>0] = $885; $887 = (_bitshift64Lshr(($800|0),($801|0),16)|0); $888 = tempRet0; @@ -17919,12 +18681,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $893 = (_bitshift64Lshr(($808|0),($809|0),3)|0); $894 = tempRet0; $895 = $893&255; - $896 = (($s) + 3|0); + $896 = ((($s)) + 3|0); HEAP8[$896>>0] = $895; $897 = (_bitshift64Lshr(($808|0),($809|0),11)|0); $898 = tempRet0; $899 = $897&255; - $900 = (($s) + 4|0); + $900 = ((($s)) + 4|0); HEAP8[$900>>0] = $899; $901 = (_bitshift64Lshr(($808|0),($809|0),19)|0); $902 = tempRet0; @@ -17937,7 +18699,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $907 = (_bitshift64Lshr(($816|0),($817|0),6)|0); $908 = tempRet0; $909 = $907&255; - $910 = (($s) + 6|0); + $910 = ((($s)) + 6|0); HEAP8[$910>>0] = $909; $911 = (_bitshift64Lshr(($816|0),($817|0),14)|0); $912 = tempRet0; @@ -17950,12 +18712,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $917 = (_bitshift64Lshr(($824|0),($825|0),1)|0); $918 = tempRet0; $919 = $917&255; - $920 = (($s) + 8|0); + $920 = ((($s)) + 8|0); HEAP8[$920>>0] = $919; $921 = (_bitshift64Lshr(($824|0),($825|0),9)|0); $922 = tempRet0; $923 = $921&255; - $924 = (($s) + 9|0); + $924 = ((($s)) + 9|0); HEAP8[$924>>0] = $923; $925 = (_bitshift64Lshr(($824|0),($825|0),17)|0); $926 = tempRet0; @@ -17968,12 +18730,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $931 = (_bitshift64Lshr(($832|0),($833|0),4)|0); $932 = tempRet0; $933 = $931&255; - $934 = (($s) + 11|0); + $934 = ((($s)) + 11|0); HEAP8[$934>>0] = $933; $935 = (_bitshift64Lshr(($832|0),($833|0),12)|0); $936 = tempRet0; $937 = $935&255; - $938 = (($s) + 12|0); + $938 = ((($s)) + 12|0); HEAP8[$938>>0] = $937; $939 = (_bitshift64Lshr(($832|0),($833|0),20)|0); $940 = tempRet0; @@ -17986,7 +18748,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $945 = (_bitshift64Lshr(($840|0),($841|0),7)|0); $946 = tempRet0; $947 = $945&255; - $948 = (($s) + 14|0); + $948 = ((($s)) + 14|0); HEAP8[$948>>0] = $947; $949 = (_bitshift64Lshr(($840|0),($841|0),15)|0); $950 = tempRet0; @@ -17999,12 +18761,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $955 = (_bitshift64Lshr(($848|0),($849|0),2)|0); $956 = tempRet0; $957 = $955&255; - $958 = (($s) + 16|0); + $958 = ((($s)) + 16|0); HEAP8[$958>>0] = $957; $959 = (_bitshift64Lshr(($848|0),($849|0),10)|0); $960 = tempRet0; $961 = $959&255; - $962 = (($s) + 17|0); + $962 = ((($s)) + 17|0); HEAP8[$962>>0] = $961; $963 = (_bitshift64Lshr(($848|0),($849|0),18)|0); $964 = tempRet0; @@ -18017,19 +18779,19 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $969 = (_bitshift64Lshr(($856|0),($857|0),5)|0); $970 = tempRet0; $971 = $969&255; - $972 = (($s) + 19|0); + $972 = ((($s)) + 19|0); HEAP8[$972>>0] = $971; $973 = (_bitshift64Lshr(($856|0),($857|0),13)|0); $974 = tempRet0; $975 = $973&255; - $976 = (($s) + 20|0); + $976 = ((($s)) + 20|0); HEAP8[$976>>0] = $975; $977 = $864&255; HEAP8[$45>>0] = $977; $978 = (_bitshift64Lshr(($864|0),($865|0),8)|0); $979 = tempRet0; $980 = $978&255; - $981 = (($s) + 22|0); + $981 = ((($s)) + 22|0); HEAP8[$981>>0] = $980; $982 = (_bitshift64Lshr(($864|0),($865|0),16)|0); $983 = tempRet0; @@ -18042,12 +18804,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $988 = (_bitshift64Lshr(($872|0),($873|0),3)|0); $989 = tempRet0; $990 = $988&255; - $991 = (($s) + 24|0); + $991 = ((($s)) + 24|0); HEAP8[$991>>0] = $990; $992 = (_bitshift64Lshr(($872|0),($873|0),11)|0); $993 = tempRet0; $994 = $992&255; - $995 = (($s) + 25|0); + $995 = ((($s)) + 25|0); HEAP8[$995>>0] = $994; $996 = (_bitshift64Lshr(($872|0),($873|0),19)|0); $997 = tempRet0; @@ -18060,7 +18822,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $1002 = (_bitshift64Lshr(($880|0),($881|0),6)|0); $1003 = tempRet0; $1004 = $1002&255; - $1005 = (($s) + 27|0); + $1005 = ((($s)) + 27|0); HEAP8[$1005>>0] = $1004; $1006 = (_bitshift64Lshr(($880|0),($881|0),14)|0); $1007 = tempRet0; @@ -18073,18 +18835,18 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $1012 = (_bitshift64Lshr(($876|0),($877|0),1)|0); $1013 = tempRet0; $1014 = $1012&255; - $1015 = (($s) + 29|0); + $1015 = ((($s)) + 29|0); HEAP8[$1015>>0] = $1014; $1016 = (_bitshift64Lshr(($876|0),($877|0),9)|0); $1017 = tempRet0; $1018 = $1016&255; - $1019 = (($s) + 30|0); + $1019 = ((($s)) + 30|0); HEAP8[$1019>>0] = $1018; $1020 = (_bitshift64Lshr(($876|0),($877|0),17)|0); $1021 = tempRet0; $1022 = $1020&255; HEAP8[$67>>0] = $1022; - STACKTOP = sp;return; + return; } function _load_351($in) { $in = $in|0; @@ -18092,21 +18854,21 @@ function _load_351($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); + tempRet0 = ($14); + return ($13|0); } function _load_452($in) { $in = $in|0; @@ -18115,43 +18877,43 @@ function _load_452($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - $15 = (($in) + 3|0); + $15 = ((($in)) + 3|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (_bitshift64Shl(($17|0),0,24)|0); $19 = tempRet0; $20 = $13 | $18; $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); + tempRet0 = ($21); + return ($20|0); } function _sph_sha512_init($cc) { $cc = $cc|0; var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; - $0 = (($cc) + 128|0); - dest=$0+0|0; src=31840+0|0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $1 = (($cc) + 192|0); + $0 = ((($cc)) + 128|0); + dest=$0; src=8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $1 = ((($cc)) + 192|0); $2 = $1; $3 = $2; HEAP32[$3>>2] = 0; $4 = (($2) + 4)|0; $5 = $4; HEAP32[$5>>2] = 0; - STACKTOP = sp;return; + return; } function _sph_sha384($cc,$data,$len) { $cc = $cc|0; @@ -18160,10 +18922,10 @@ function _sph_sha384($cc,$data,$len) { var $$01$ = 0, $$012 = 0, $$03 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $current$04 = 0, $current$1 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($cc) + 192|0); + $0 = ((($cc)) + 192|0); $1 = ($len|0)==(0); if ($1) { - STACKTOP = sp;return; + return; } $2 = $0; $3 = $2; @@ -18172,7 +18934,7 @@ function _sph_sha384($cc,$data,$len) { $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = $4 & 127; - $9 = (($cc) + 128|0); + $9 = ((($cc)) + 128|0); $$012 = $len;$$03 = $data;$current$04 = $8; while(1) { $10 = (128 - ($current$04))|0; @@ -18211,7 +18973,7 @@ function _sph_sha384($cc,$data,$len) { $$012 = $15;$$03 = $13;$current$04 = $current$1; } } - STACKTOP = sp;return; + return; } function _sph_sha512_close($cc,$dst) { $cc = $cc|0; @@ -18220,7 +18982,7 @@ function _sph_sha512_close($cc,$dst) { sp = STACKTOP; _sha384_close($cc,$dst,8); _sph_sha512_init($cc); - STACKTOP = sp;return; + return; } function _sha3_round($data,$r) { $data = $data|0; @@ -18272,8 +19034,8 @@ function _sha3_round($data,$r) { var $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0; var $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0; var $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0; - var $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $W = 0, $exitcond = 0, $exitcond19 = 0, $i$011 = 0, $i$110 = 0, $i$29 = 0; - var label = 0, sp = 0; + var $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0; + var $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $98 = 0, $99 = 0, $W = 0, $exitcond = 0, $exitcond19 = 0, $i$011 = 0, $i$110 = 0, $i$29 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 640|0; $W = sp; @@ -18395,56 +19157,56 @@ function _sha3_round($data,$r) { $93 = (($90) + 4)|0; $94 = $93; $95 = HEAP32[$94>>2]|0; - $96 = (($r) + 8|0); + $96 = ((($r)) + 8|0); $97 = $96; $98 = $97; $99 = HEAP32[$98>>2]|0; $100 = (($97) + 4)|0; $101 = $100; $102 = HEAP32[$101>>2]|0; - $103 = (($r) + 16|0); + $103 = ((($r)) + 16|0); $104 = $103; $105 = $104; $106 = HEAP32[$105>>2]|0; $107 = (($104) + 4)|0; $108 = $107; $109 = HEAP32[$108>>2]|0; - $110 = (($r) + 24|0); + $110 = ((($r)) + 24|0); $111 = $110; $112 = $111; $113 = HEAP32[$112>>2]|0; $114 = (($111) + 4)|0; $115 = $114; $116 = HEAP32[$115>>2]|0; - $117 = (($r) + 32|0); + $117 = ((($r)) + 32|0); $118 = $117; $119 = $118; $120 = HEAP32[$119>>2]|0; $121 = (($118) + 4)|0; $122 = $121; $123 = HEAP32[$122>>2]|0; - $124 = (($r) + 40|0); + $124 = ((($r)) + 40|0); $125 = $124; $126 = $125; $127 = HEAP32[$126>>2]|0; $128 = (($125) + 4)|0; $129 = $128; $130 = HEAP32[$129>>2]|0; - $131 = (($r) + 48|0); + $131 = ((($r)) + 48|0); $132 = $131; $133 = $132; $134 = HEAP32[$133>>2]|0; $135 = (($132) + 4)|0; $136 = $135; $137 = HEAP32[$136>>2]|0; - $138 = (($r) + 56|0); + $138 = ((($r)) + 56|0); $139 = $138; $140 = $139; $141 = HEAP32[$140>>2]|0; $142 = (($139) + 4)|0; $143 = $142; $144 = HEAP32[$143>>2]|0; - $145 = $120;$146 = $123;$170 = $134;$171 = $127;$173 = $137;$174 = $130;$193 = $141;$194 = $144;$203 = $92;$204 = $95;$228 = $99;$230 = $102;$234 = $106;$236 = $109;$241 = $113;$242 = $116;$i$29 = 0; + $145 = $120;$146 = $123;$170 = $127;$171 = $134;$173 = $130;$174 = $137;$193 = $141;$194 = $144;$203 = $92;$204 = $95;$228 = $99;$230 = $102;$234 = $106;$236 = $109;$241 = $113;$242 = $116;$i$29 = 0; while(1) { $147 = (_bitshift64Shl(($145|0),($146|0),50)|0); $148 = tempRet0; @@ -18468,13 +19230,13 @@ function _sha3_round($data,$r) { $166 = $162 | $164; $167 = $159 ^ $165; $168 = $160 ^ $166; - $169 = $171 ^ $170; - $172 = $174 ^ $173; + $169 = $170 ^ $171; + $172 = $173 ^ $174; $175 = $169 & $145; $176 = $172 & $146; - $177 = $175 ^ $170; - $178 = $176 ^ $173; - $179 = (31904 + ($i$29<<3)|0); + $177 = $175 ^ $171; + $178 = $176 ^ $174; + $179 = (72 + ($i$29<<3)|0); $180 = $179; $181 = $180; $182 = HEAP32[$181>>2]|0; @@ -18554,14 +19316,14 @@ function _sha3_round($data,$r) { $266 = $262 | $264; $267 = $259 ^ $265; $268 = $260 ^ $266; - $269 = $145 ^ $171; - $270 = $146 ^ $174; + $269 = $145 ^ $170; + $270 = $146 ^ $173; $271 = $243 & $269; $272 = $244 & $270; - $273 = $271 ^ $171; - $274 = $272 ^ $174; + $273 = $271 ^ $170; + $274 = $272 ^ $173; $275 = $i$29 | 1; - $276 = (31904 + ($275<<3)|0); + $276 = (72 + ($275<<3)|0); $277 = $276; $278 = $277; $279 = HEAP32[$278>>2]|0; @@ -18575,7 +19337,7 @@ function _sha3_round($data,$r) { $287 = (($284) + 4)|0; $288 = $287; $289 = HEAP32[$288>>2]|0; - $290 = (_i64Add(($279|0),($282|0),($170|0),($173|0))|0); + $290 = (_i64Add(($279|0),($282|0),($171|0),($174|0))|0); $291 = tempRet0; $292 = (_i64Add(($290|0),($291|0),($286|0),($289|0))|0); $293 = tempRet0; @@ -18648,7 +19410,7 @@ function _sha3_round($data,$r) { $360 = $358 ^ $145; $361 = $359 ^ $146; $362 = $i$29 | 2; - $363 = (31904 + ($362<<3)|0); + $363 = (72 + ($362<<3)|0); $364 = $363; $365 = $364; $366 = HEAP32[$365>>2]|0; @@ -18662,7 +19424,7 @@ function _sha3_round($data,$r) { $374 = (($371) + 4)|0; $375 = $374; $376 = HEAP32[$375>>2]|0; - $377 = (_i64Add(($366|0),($369|0),($171|0),($174|0))|0); + $377 = (_i64Add(($366|0),($369|0),($170|0),($173|0))|0); $378 = tempRet0; $379 = (_i64Add(($377|0),($378|0),($373|0),($376|0))|0); $380 = tempRet0; @@ -18735,7 +19497,7 @@ function _sha3_round($data,$r) { $447 = $445 ^ $243; $448 = $446 ^ $244; $449 = $i$29 | 3; - $450 = (31904 + ($449<<3)|0); + $450 = (72 + ($449<<3)|0); $451 = $450; $452 = $451; $453 = HEAP32[$452>>2]|0; @@ -18822,7 +19584,7 @@ function _sha3_round($data,$r) { $534 = $532 ^ $330; $535 = $533 ^ $331; $536 = $i$29 | 4; - $537 = (31904 + ($536<<3)|0); + $537 = (72 + ($536<<3)|0); $538 = $537; $539 = $538; $540 = HEAP32[$539>>2]|0; @@ -18909,7 +19671,7 @@ function _sha3_round($data,$r) { $621 = $619 ^ $417; $622 = $620 ^ $418; $623 = $i$29 | 5; - $624 = (31904 + ($623<<3)|0); + $624 = (72 + ($623<<3)|0); $625 = $624; $626 = $625; $627 = HEAP32[$626>>2]|0; @@ -18923,9 +19685,9 @@ function _sha3_round($data,$r) { $635 = (($632) + 4)|0; $636 = $635; $637 = HEAP32[$636>>2]|0; - $638 = (_i64Add(($627|0),($630|0),($330|0),($331|0))|0); + $638 = (_i64Add(($634|0),($637|0),($627|0),($630|0))|0); $639 = tempRet0; - $640 = (_i64Add(($638|0),($639|0),($634|0),($637|0))|0); + $640 = (_i64Add(($638|0),($639|0),($330|0),($331|0))|0); $641 = tempRet0; $642 = (_i64Add(($640|0),($641|0),($621|0),($622|0))|0); $643 = tempRet0; @@ -18996,7 +19758,7 @@ function _sha3_round($data,$r) { $708 = $706 ^ $504; $709 = $707 ^ $505; $710 = $i$29 | 6; - $711 = (31904 + ($710<<3)|0); + $711 = (72 + ($710<<3)|0); $712 = $711; $713 = $712; $714 = HEAP32[$713>>2]|0; @@ -19083,7 +19845,7 @@ function _sha3_round($data,$r) { $795 = $793 ^ $591; $796 = $794 ^ $592; $797 = $i$29 | 7; - $798 = (31904 + ($797<<3)|0); + $798 = (72 + ($797<<3)|0); $799 = $798; $800 = $799; $801 = HEAP32[$800>>2]|0; @@ -19144,8 +19906,9 @@ function _sha3_round($data,$r) { $856 = (($i$29) + 8)|0; $857 = ($856|0)<(80); if ($857) { - $145 = $852;$146 = $853;$170 = $678;$171 = $765;$173 = $679;$174 = $766;$193 = $591;$194 = $592;$203 = $854;$204 = $855;$228 = $767;$230 = $768;$234 = $680;$236 = $681;$241 = $593;$242 = $594;$i$29 = $856; + $145 = $852;$146 = $853;$170 = $765;$171 = $678;$173 = $766;$174 = $679;$193 = $591;$194 = $592;$203 = $854;$204 = $855;$228 = $767;$230 = $768;$234 = $680;$236 = $681;$241 = $593;$242 = $594;$i$29 = $856; } else { + $864 = $854;$865 = $855;$878 = $767;$879 = $768;$892 = $680;$893 = $681;$906 = $593;$907 = $594;$920 = $852;$921 = $853;$934 = $765;$935 = $766;$948 = $678;$949 = $679;$962 = $591;$963 = $592; break; } } @@ -19155,112 +19918,112 @@ function _sha3_round($data,$r) { $861 = (($858) + 4)|0; $862 = $861; $863 = HEAP32[$862>>2]|0; - $864 = (_i64Add(($860|0),($863|0),($854|0),($855|0))|0); - $865 = tempRet0; - $866 = $r; - $867 = $866; - HEAP32[$867>>2] = $864; - $868 = (($866) + 4)|0; + $866 = (_i64Add(($860|0),($863|0),($864|0),($865|0))|0); + $867 = tempRet0; + $868 = $r; $869 = $868; - HEAP32[$869>>2] = $865; - $870 = $96; + HEAP32[$869>>2] = $866; + $870 = (($868) + 4)|0; $871 = $870; - $872 = HEAP32[$871>>2]|0; - $873 = (($870) + 4)|0; - $874 = $873; - $875 = HEAP32[$874>>2]|0; - $876 = (_i64Add(($872|0),($875|0),($767|0),($768|0))|0); - $877 = tempRet0; - $878 = $96; - $879 = $878; - HEAP32[$879>>2] = $876; - $880 = (($878) + 4)|0; - $881 = $880; - HEAP32[$881>>2] = $877; - $882 = $103; + HEAP32[$871>>2] = $867; + $872 = $96; + $873 = $872; + $874 = HEAP32[$873>>2]|0; + $875 = (($872) + 4)|0; + $876 = $875; + $877 = HEAP32[$876>>2]|0; + $880 = (_i64Add(($874|0),($877|0),($878|0),($879|0))|0); + $881 = tempRet0; + $882 = $96; $883 = $882; - $884 = HEAP32[$883>>2]|0; - $885 = (($882) + 4)|0; - $886 = $885; - $887 = HEAP32[$886>>2]|0; - $888 = (_i64Add(($884|0),($887|0),($680|0),($681|0))|0); - $889 = tempRet0; - $890 = $103; - $891 = $890; - HEAP32[$891>>2] = $888; - $892 = (($890) + 4)|0; - $893 = $892; - HEAP32[$893>>2] = $889; - $894 = $110; - $895 = $894; - $896 = HEAP32[$895>>2]|0; - $897 = (($894) + 4)|0; - $898 = $897; - $899 = HEAP32[$898>>2]|0; - $900 = (_i64Add(($896|0),($899|0),($593|0),($594|0))|0); - $901 = tempRet0; - $902 = $110; - $903 = $902; - HEAP32[$903>>2] = $900; - $904 = (($902) + 4)|0; - $905 = $904; - HEAP32[$905>>2] = $901; - $906 = $117; - $907 = $906; - $908 = HEAP32[$907>>2]|0; - $909 = (($906) + 4)|0; - $910 = $909; - $911 = HEAP32[$910>>2]|0; - $912 = (_i64Add(($908|0),($911|0),($852|0),($853|0))|0); - $913 = tempRet0; + HEAP32[$883>>2] = $880; + $884 = (($882) + 4)|0; + $885 = $884; + HEAP32[$885>>2] = $881; + $886 = $103; + $887 = $886; + $888 = HEAP32[$887>>2]|0; + $889 = (($886) + 4)|0; + $890 = $889; + $891 = HEAP32[$890>>2]|0; + $894 = (_i64Add(($888|0),($891|0),($892|0),($893|0))|0); + $895 = tempRet0; + $896 = $103; + $897 = $896; + HEAP32[$897>>2] = $894; + $898 = (($896) + 4)|0; + $899 = $898; + HEAP32[$899>>2] = $895; + $900 = $110; + $901 = $900; + $902 = HEAP32[$901>>2]|0; + $903 = (($900) + 4)|0; + $904 = $903; + $905 = HEAP32[$904>>2]|0; + $908 = (_i64Add(($902|0),($905|0),($906|0),($907|0))|0); + $909 = tempRet0; + $910 = $110; + $911 = $910; + HEAP32[$911>>2] = $908; + $912 = (($910) + 4)|0; + $913 = $912; + HEAP32[$913>>2] = $909; $914 = $117; $915 = $914; - HEAP32[$915>>2] = $912; - $916 = (($914) + 4)|0; - $917 = $916; - HEAP32[$917>>2] = $913; - $918 = $124; - $919 = $918; - $920 = HEAP32[$919>>2]|0; - $921 = (($918) + 4)|0; - $922 = $921; - $923 = HEAP32[$922>>2]|0; - $924 = (_i64Add(($920|0),($923|0),($765|0),($766|0))|0); - $925 = tempRet0; - $926 = $124; + $916 = HEAP32[$915>>2]|0; + $917 = (($914) + 4)|0; + $918 = $917; + $919 = HEAP32[$918>>2]|0; + $922 = (_i64Add(($916|0),($919|0),($920|0),($921|0))|0); + $923 = tempRet0; + $924 = $117; + $925 = $924; + HEAP32[$925>>2] = $922; + $926 = (($924) + 4)|0; $927 = $926; - HEAP32[$927>>2] = $924; - $928 = (($926) + 4)|0; + HEAP32[$927>>2] = $923; + $928 = $124; $929 = $928; - HEAP32[$929>>2] = $925; - $930 = $131; - $931 = $930; - $932 = HEAP32[$931>>2]|0; - $933 = (($930) + 4)|0; - $934 = $933; - $935 = HEAP32[$934>>2]|0; - $936 = (_i64Add(($932|0),($935|0),($678|0),($679|0))|0); + $930 = HEAP32[$929>>2]|0; + $931 = (($928) + 4)|0; + $932 = $931; + $933 = HEAP32[$932>>2]|0; + $936 = (_i64Add(($930|0),($933|0),($934|0),($935|0))|0); $937 = tempRet0; - $938 = $131; + $938 = $124; $939 = $938; HEAP32[$939>>2] = $936; $940 = (($938) + 4)|0; $941 = $940; HEAP32[$941>>2] = $937; - $942 = $138; + $942 = $131; $943 = $942; $944 = HEAP32[$943>>2]|0; $945 = (($942) + 4)|0; $946 = $945; $947 = HEAP32[$946>>2]|0; - $948 = (_i64Add(($944|0),($947|0),($591|0),($592|0))|0); - $949 = tempRet0; - $950 = $138; - $951 = $950; - HEAP32[$951>>2] = $948; - $952 = (($950) + 4)|0; + $950 = (_i64Add(($944|0),($947|0),($948|0),($949|0))|0); + $951 = tempRet0; + $952 = $131; $953 = $952; - HEAP32[$953>>2] = $949; + HEAP32[$953>>2] = $950; + $954 = (($952) + 4)|0; + $955 = $954; + HEAP32[$955>>2] = $951; + $956 = $138; + $957 = $956; + $958 = HEAP32[$957>>2]|0; + $959 = (($956) + 4)|0; + $960 = $959; + $961 = HEAP32[$960>>2]|0; + $964 = (_i64Add(($958|0),($961|0),($962|0),($963|0))|0); + $965 = tempRet0; + $966 = $138; + $967 = $966; + HEAP32[$967>>2] = $964; + $968 = (($966) + 4)|0; + $969 = $968; + HEAP32[$969>>2] = $965; STACKTOP = sp;return; } function _sha384_close($cc,$dst,$rnum) { @@ -19270,7 +20033,7 @@ function _sha384_close($cc,$dst,$rnum) { var label = 0, sp = 0; sp = STACKTOP; _sha384_addbits_and_close($cc,0,0,$dst,$rnum); - STACKTOP = sp;return; + return; } function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { $cc = $cc|0; @@ -19282,7 +20045,7 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $u$01 = 0, dest = 0, label = 0, sp = 0, stop = 0; sp = STACKTOP; - $0 = (($cc) + 192|0); + $0 = ((($cc)) + 192|0); $1 = $0; $2 = $1; $3 = HEAP32[$2>>2]|0; @@ -19303,14 +20066,14 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { if ($15) { $17 = $7 ^ 127; _memset(($16|0),0,($17|0))|0; - $18 = (($cc) + 128|0); + $18 = ((($cc)) + 128|0); _sha3_round($cc,$18); - dest=$cc+0|0; stop=dest+112|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); + dest=$cc; stop=dest+112|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); } else { $19 = (111 - ($7))|0; _memset(($16|0),0,($19|0))|0; } - $20 = (($cc) + 112|0); + $20 = ((($cc)) + 112|0); $21 = $0; $22 = $21; $23 = HEAP32[$22>>2]|0; @@ -19320,7 +20083,7 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { $27 = (_bitshift64Lshr(($23|0),($26|0),61)|0); $28 = tempRet0; _sph_enc64be_aligned($20,$27,$28); - $29 = (($cc) + 120|0); + $29 = ((($cc)) + 120|0); $30 = $0; $31 = $30; $32 = HEAP32[$31>>2]|0; @@ -19332,11 +20095,11 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { $38 = (_i64Add(($36|0),($37|0),($n|0),0)|0); $39 = tempRet0; _sph_enc64be_aligned($29,$38,$39); - $40 = (($cc) + 128|0); + $40 = ((($cc)) + 128|0); _sha3_round($cc,$40); $41 = ($rnum|0)==(0); if ($41) { - STACKTOP = sp;return; + return; } else { $u$01 = 0; } @@ -19359,7 +20122,95 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { $u$01 = $51; } } - STACKTOP = sp;return; + return; +} +function _sph_enc64be_aligned($dst,$0,$1) { + $dst = $dst|0; + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); + $3 = tempRet0; + $4 = $2&255; + HEAP8[$dst>>0] = $4; + $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); + $6 = tempRet0; + $7 = $5&255; + $8 = ((($dst)) + 1|0); + HEAP8[$8>>0] = $7; + $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); + $10 = tempRet0; + $11 = $9&255; + $12 = ((($dst)) + 2|0); + HEAP8[$12>>0] = $11; + $13 = $1&255; + $14 = ((($dst)) + 3|0); + HEAP8[$14>>0] = $13; + $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); + $16 = tempRet0; + $17 = $15&255; + $18 = ((($dst)) + 4|0); + HEAP8[$18>>0] = $17; + $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); + $20 = tempRet0; + $21 = $19&255; + $22 = ((($dst)) + 5|0); + HEAP8[$22>>0] = $21; + $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); + $24 = tempRet0; + $25 = $23&255; + $26 = ((($dst)) + 6|0); + HEAP8[$26>>0] = $25; + $27 = $0&255; + $28 = ((($dst)) + 7|0); + HEAP8[$28>>0] = $27; + return; +} +function _sph_enc64be($dst,$0,$1) { + $dst = $dst|0; + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); + $3 = tempRet0; + $4 = $2&255; + HEAP8[$dst>>0] = $4; + $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); + $6 = tempRet0; + $7 = $5&255; + $8 = ((($dst)) + 1|0); + HEAP8[$8>>0] = $7; + $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); + $10 = tempRet0; + $11 = $9&255; + $12 = ((($dst)) + 2|0); + HEAP8[$12>>0] = $11; + $13 = $1&255; + $14 = ((($dst)) + 3|0); + HEAP8[$14>>0] = $13; + $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); + $16 = tempRet0; + $17 = $15&255; + $18 = ((($dst)) + 4|0); + HEAP8[$18>>0] = $17; + $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); + $20 = tempRet0; + $21 = $19&255; + $22 = ((($dst)) + 5|0); + HEAP8[$22>>0] = $21; + $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); + $24 = tempRet0; + $25 = $23&255; + $26 = ((($dst)) + 6|0); + HEAP8[$26>>0] = $25; + $27 = $0&255; + $28 = ((($dst)) + 7|0); + HEAP8[$28>>0] = $27; + return; } function _sph_dec64be_aligned($src) { $src = $src|0; @@ -19371,233 +20222,538 @@ function _sph_dec64be_aligned($src) { $1 = $0&255; $2 = (_bitshift64Shl(($1|0),0,56)|0); $3 = tempRet0; - $4 = (($src) + 1|0); + $4 = ((($src)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = (_bitshift64Shl(($6|0),0,48)|0); $8 = tempRet0; $9 = $7 | $2; $10 = $8 | $3; - $11 = (($src) + 2|0); + $11 = ((($src)) + 2|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = (_bitshift64Shl(($13|0),0,40)|0); $15 = tempRet0; $16 = $9 | $14; $17 = $10 | $15; - $18 = (($src) + 3|0); + $18 = ((($src)) + 3|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $21 = $17 | $20; - $22 = (($src) + 4|0); + $22 = ((($src)) + 4|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $25 = (_bitshift64Shl(($24|0),0,24)|0); $26 = tempRet0; $27 = $16 | $25; $28 = $21 | $26; - $29 = (($src) + 5|0); + $29 = ((($src)) + 5|0); $30 = HEAP8[$29>>0]|0; $31 = $30&255; $32 = (_bitshift64Shl(($31|0),0,16)|0); $33 = tempRet0; $34 = $27 | $32; $35 = $28 | $33; - $36 = (($src) + 6|0); + $36 = ((($src)) + 6|0); $37 = HEAP8[$36>>0]|0; $38 = $37&255; $39 = (_bitshift64Shl(($38|0),0,8)|0); $40 = tempRet0; $41 = $34 | $39; $42 = $35 | $40; - $43 = (($src) + 7|0); + $43 = ((($src)) + 7|0); $44 = HEAP8[$43>>0]|0; $45 = $44&255; $46 = $41 | $45; - tempRet0 = $42; - STACKTOP = sp;return ($46|0); + tempRet0 = ($42); + return ($46|0); } -function _sph_enc64be_aligned($dst,$0,$1) { - $dst = $dst|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; +function ___errno_location() { + var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; - $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); - $3 = tempRet0; - $4 = $2&255; - HEAP8[$dst>>0] = $4; - $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); - $6 = tempRet0; - $7 = $5&255; - $8 = (($dst) + 1|0); - HEAP8[$8>>0] = $7; - $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); - $10 = tempRet0; - $11 = $9&255; - $12 = (($dst) + 2|0); - HEAP8[$12>>0] = $11; - $13 = $1&255; - $14 = (($dst) + 3|0); - HEAP8[$14>>0] = $13; - $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); - $16 = tempRet0; - $17 = $15&255; - $18 = (($dst) + 4|0); - HEAP8[$18>>0] = $17; - $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); - $20 = tempRet0; - $21 = $19&255; - $22 = (($dst) + 5|0); - HEAP8[$22>>0] = $21; - $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); - $24 = tempRet0; - $25 = $23&255; - $26 = (($dst) + 6|0); - HEAP8[$26>>0] = $25; - $27 = $0&255; - $28 = (($dst) + 7|0); - HEAP8[$28>>0] = $27; - STACKTOP = sp;return; + $0 = HEAP32[32512>>2]|0; + $1 = ($0|0)==(0|0); + if ($1) { + $$0 = 32560; + } else { + $2 = (_pthread_self()|0); + $3 = ((($2)) + 60|0); + $4 = HEAP32[$3>>2]|0; + $$0 = $4; + } + return ($$0|0); } -function _sph_enc64be($dst,$0,$1) { - $dst = $dst|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; +function ___syscall_ret($r) { + $r = $r|0; + var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ($r>>>0)>(4294963200); + if ($0) { + $1 = (0 - ($r))|0; + $2 = (___errno_location()|0); + HEAP32[$2>>2] = $1; + $$0 = -1; + } else { + $$0 = $r; + } + return ($$0|0); +} +function ___lockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function ___unlockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function ___stdio_close($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; + $vararg_buffer = sp; + $0 = ((($f)) + 60|0); + $1 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $1; + $2 = (___syscall6(6,($vararg_buffer|0))|0); + $3 = (___syscall_ret($2)|0); + STACKTOP = sp;return ($3|0); +} +function ___stdio_seek($f,$off,$whence) { + $f = $f|0; + $off = $off|0; + $whence = $whence|0; + var $$pre = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $ret = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr4 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; + $vararg_buffer = sp; + $ret = sp + 20|0; + $0 = ((($f)) + 60|0); + $1 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $1; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 0; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $off; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $ret; + $vararg_ptr4 = ((($vararg_buffer)) + 16|0); + HEAP32[$vararg_ptr4>>2] = $whence; + $2 = (___syscall140(140,($vararg_buffer|0))|0); + $3 = (___syscall_ret($2)|0); + $4 = ($3|0)<(0); + if ($4) { + HEAP32[$ret>>2] = -1; + $5 = -1; + } else { + $$pre = HEAP32[$ret>>2]|0; + $5 = $$pre; + } + STACKTOP = sp;return ($5|0); +} +function ___stdio_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $$0 = 0, $$phi$trans$insert = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cnt$0 = 0, $cnt$1 = 0, $iov$0 = 0, $iov$0$lcssa11 = 0, $iov$1 = 0, $iovcnt$0 = 0; + var $iovcnt$0$lcssa12 = 0, $iovcnt$1 = 0, $iovs = 0, $rem$0 = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $vararg_ptr7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer = sp; + $iovs = sp + 32|0; + $0 = ((($f)) + 28|0); + $1 = HEAP32[$0>>2]|0; + HEAP32[$iovs>>2] = $1; + $2 = ((($iovs)) + 4|0); + $3 = ((($f)) + 20|0); + $4 = HEAP32[$3>>2]|0; + $5 = $4; + $6 = (($5) - ($1))|0; + HEAP32[$2>>2] = $6; + $7 = ((($iovs)) + 8|0); + HEAP32[$7>>2] = $buf; + $8 = ((($iovs)) + 12|0); + HEAP32[$8>>2] = $len; + $9 = (($6) + ($len))|0; + $10 = ((($f)) + 60|0); + $11 = ((($f)) + 44|0); + $iov$0 = $iovs;$iovcnt$0 = 2;$rem$0 = $9; + while(1) { + $12 = HEAP32[32512>>2]|0; + $13 = ($12|0)==(0|0); + if ($13) { + $17 = HEAP32[$10>>2]|0; + HEAP32[$vararg_buffer3>>2] = $17; + $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr6>>2] = $iov$0; + $vararg_ptr7 = ((($vararg_buffer3)) + 8|0); + HEAP32[$vararg_ptr7>>2] = $iovcnt$0; + $18 = (___syscall146(146,($vararg_buffer3|0))|0); + $19 = (___syscall_ret($18)|0); + $cnt$0 = $19; + } else { + _pthread_cleanup_push((1|0),($f|0)); + $14 = HEAP32[$10>>2]|0; + HEAP32[$vararg_buffer>>2] = $14; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $iov$0; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $iovcnt$0; + $15 = (___syscall146(146,($vararg_buffer|0))|0); + $16 = (___syscall_ret($15)|0); + _pthread_cleanup_pop(0); + $cnt$0 = $16; + } + $20 = ($rem$0|0)==($cnt$0|0); + if ($20) { + label = 6; + break; + } + $27 = ($cnt$0|0)<(0); + if ($27) { + $iov$0$lcssa11 = $iov$0;$iovcnt$0$lcssa12 = $iovcnt$0; + label = 8; + break; + } + $35 = (($rem$0) - ($cnt$0))|0; + $36 = ((($iov$0)) + 4|0); + $37 = HEAP32[$36>>2]|0; + $38 = ($cnt$0>>>0)>($37>>>0); + if ($38) { + $39 = HEAP32[$11>>2]|0; + HEAP32[$0>>2] = $39; + HEAP32[$3>>2] = $39; + $40 = (($cnt$0) - ($37))|0; + $41 = ((($iov$0)) + 8|0); + $42 = (($iovcnt$0) + -1)|0; + $$phi$trans$insert = ((($iov$0)) + 12|0); + $$pre = HEAP32[$$phi$trans$insert>>2]|0; + $50 = $$pre;$cnt$1 = $40;$iov$1 = $41;$iovcnt$1 = $42; + } else { + $43 = ($iovcnt$0|0)==(2); + if ($43) { + $44 = HEAP32[$0>>2]|0; + $45 = (($44) + ($cnt$0)|0); + HEAP32[$0>>2] = $45; + $50 = $37;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = 2; + } else { + $50 = $37;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = $iovcnt$0; + } + } + $46 = HEAP32[$iov$1>>2]|0; + $47 = (($46) + ($cnt$1)|0); + HEAP32[$iov$1>>2] = $47; + $48 = ((($iov$1)) + 4|0); + $49 = (($50) - ($cnt$1))|0; + HEAP32[$48>>2] = $49; + $iov$0 = $iov$1;$iovcnt$0 = $iovcnt$1;$rem$0 = $35; + } + if ((label|0) == 6) { + $21 = HEAP32[$11>>2]|0; + $22 = ((($f)) + 48|0); + $23 = HEAP32[$22>>2]|0; + $24 = (($21) + ($23)|0); + $25 = ((($f)) + 16|0); + HEAP32[$25>>2] = $24; + $26 = $21; + HEAP32[$0>>2] = $26; + HEAP32[$3>>2] = $26; + $$0 = $len; + } + else if ((label|0) == 8) { + $28 = ((($f)) + 16|0); + HEAP32[$28>>2] = 0; + HEAP32[$0>>2] = 0; + HEAP32[$3>>2] = 0; + $29 = HEAP32[$f>>2]|0; + $30 = $29 | 32; + HEAP32[$f>>2] = $30; + $31 = ($iovcnt$0$lcssa12|0)==(2); + if ($31) { + $$0 = 0; + } else { + $32 = ((($iov$0$lcssa11)) + 4|0); + $33 = HEAP32[$32>>2]|0; + $34 = (($len) - ($33))|0; + $$0 = $34; + } + } + STACKTOP = sp;return ($$0|0); +} +function ___stdout_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tio = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; + $vararg_buffer = sp; + $tio = sp + 12|0; + $0 = ((($f)) + 36|0); + HEAP32[$0>>2] = 3; + $1 = HEAP32[$f>>2]|0; + $2 = $1 & 64; + $3 = ($2|0)==(0); + if ($3) { + $4 = ((($f)) + 60|0); + $5 = HEAP32[$4>>2]|0; + HEAP32[$vararg_buffer>>2] = $5; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 21505; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $tio; + $6 = (___syscall54(54,($vararg_buffer|0))|0); + $7 = ($6|0)==(0); + if (!($7)) { + $8 = ((($f)) + 75|0); + HEAP8[$8>>0] = -1; + } + } + $9 = (___stdio_write($f,$buf,$len)|0); + STACKTOP = sp;return ($9|0); +} +function _fflush($f) { + $f = $f|0; + var $$0 = 0, $$01 = 0, $$012 = 0, $$014 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, $r$0$lcssa = 0, $r$03 = 0, $r$1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ($f|0)==(0|0); + do { + if ($0) { + $7 = HEAP32[32556>>2]|0; + $8 = ($7|0)==(0|0); + if ($8) { + $27 = 0; + } else { + $9 = HEAP32[32556>>2]|0; + $10 = (_fflush($9)|0); + $27 = $10; + } + ___lock(((32540)|0)); + $$012 = HEAP32[(32536)>>2]|0; + $11 = ($$012|0)==(0|0); + if ($11) { + $r$0$lcssa = $27; + } else { + $$014 = $$012;$r$03 = $27; + while(1) { + $12 = ((($$014)) + 76|0); + $13 = HEAP32[$12>>2]|0; + $14 = ($13|0)>(-1); + if ($14) { + $15 = (___lockfile($$014)|0); + $24 = $15; + } else { + $24 = 0; + } + $16 = ((($$014)) + 20|0); + $17 = HEAP32[$16>>2]|0; + $18 = ((($$014)) + 28|0); + $19 = HEAP32[$18>>2]|0; + $20 = ($17>>>0)>($19>>>0); + if ($20) { + $21 = (___fflush_unlocked($$014)|0); + $22 = $21 | $r$03; + $r$1 = $22; + } else { + $r$1 = $r$03; + } + $23 = ($24|0)==(0); + if (!($23)) { + ___unlockfile($$014); + } + $25 = ((($$014)) + 56|0); + $$01 = HEAP32[$25>>2]|0; + $26 = ($$01|0)==(0|0); + if ($26) { + $r$0$lcssa = $r$1; + break; + } else { + $$014 = $$01;$r$03 = $r$1; + } + } + } + ___unlock(((32540)|0)); + $$0 = $r$0$lcssa; + } else { + $1 = ((($f)) + 76|0); + $2 = HEAP32[$1>>2]|0; + $3 = ($2|0)>(-1); + if (!($3)) { + $4 = (___fflush_unlocked($f)|0); + $$0 = $4; + break; + } + $5 = (___lockfile($f)|0); + $phitmp = ($5|0)==(0); + $6 = (___fflush_unlocked($f)|0); + if ($phitmp) { + $$0 = $6; + } else { + ___unlockfile($f); + $$0 = $6; + } + } + } while(0); + return ($$0|0); +} +function _cleanup392($p) { + $p = $p|0; + var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ((($p)) + 68|0); + $1 = HEAP32[$0>>2]|0; + $2 = ($1|0)==(0); + if ($2) { + ___unlockfile($p); + } + return; +} +function ___fflush_unlocked($f) { + $f = $f|0; + var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, label = 0, sp = 0; sp = STACKTOP; - $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); - $3 = tempRet0; - $4 = $2&255; - HEAP8[$dst>>0] = $4; - $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); - $6 = tempRet0; - $7 = $5&255; - $8 = (($dst) + 1|0); - HEAP8[$8>>0] = $7; - $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); - $10 = tempRet0; - $11 = $9&255; - $12 = (($dst) + 2|0); - HEAP8[$12>>0] = $11; - $13 = $1&255; - $14 = (($dst) + 3|0); - HEAP8[$14>>0] = $13; - $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); - $16 = tempRet0; - $17 = $15&255; - $18 = (($dst) + 4|0); - HEAP8[$18>>0] = $17; - $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); - $20 = tempRet0; - $21 = $19&255; - $22 = (($dst) + 5|0); - HEAP8[$22>>0] = $21; - $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); - $24 = tempRet0; - $25 = $23&255; - $26 = (($dst) + 6|0); - HEAP8[$26>>0] = $25; - $27 = $0&255; - $28 = (($dst) + 7|0); - HEAP8[$28>>0] = $27; - STACKTOP = sp;return; + $0 = ((($f)) + 20|0); + $1 = HEAP32[$0>>2]|0; + $2 = ((($f)) + 28|0); + $3 = HEAP32[$2>>2]|0; + $4 = ($1>>>0)>($3>>>0); + if ($4) { + $5 = ((($f)) + 36|0); + $6 = HEAP32[$5>>2]|0; + (FUNCTION_TABLE_iiii[$6 & 3]($f,0,0)|0); + $7 = HEAP32[$0>>2]|0; + $8 = ($7|0)==(0|0); + if ($8) { + $$0 = -1; + } else { + label = 3; + } + } else { + label = 3; + } + if ((label|0) == 3) { + $9 = ((($f)) + 4|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 8|0); + $12 = HEAP32[$11>>2]|0; + $13 = ($10>>>0)<($12>>>0); + if ($13) { + $14 = ((($f)) + 40|0); + $15 = HEAP32[$14>>2]|0; + $16 = $10; + $17 = $12; + $18 = (($16) - ($17))|0; + (FUNCTION_TABLE_iiii[$15 & 3]($f,$18,1)|0); + } + $19 = ((($f)) + 16|0); + HEAP32[$19>>2] = 0; + HEAP32[$2>>2] = 0; + HEAP32[$0>>2] = 0; + HEAP32[$11>>2] = 0; + HEAP32[$9>>2] = 0; + $$0 = 0; + } + return ($$0|0); } function _malloc($bytes) { $bytes = $bytes|0; - var $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i23$i = 0, $$pre$i25 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i24$iZ2D = 0, $$pre$phi$i26Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phi59$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre105 = 0, $$pre58$i$i = 0, $$rsize$0$i = 0, $$rsize$3$i = 0, $$sum = 0, $$sum$i$i = 0, $$sum$i$i$i = 0, $$sum$i12$i = 0, $$sum$i13$i = 0; - var $$sum$i16$i = 0, $$sum$i19$i = 0, $$sum$i2338 = 0, $$sum$i32 = 0, $$sum$i39 = 0, $$sum1 = 0, $$sum1$i = 0, $$sum1$i$i = 0, $$sum1$i14$i = 0, $$sum1$i20$i = 0, $$sum1$i24 = 0, $$sum10 = 0, $$sum10$i = 0, $$sum10$i$i = 0, $$sum10$pre$i$i = 0, $$sum102$i = 0, $$sum103$i = 0, $$sum104$i = 0, $$sum105$i = 0, $$sum106$i = 0; - var $$sum107$i = 0, $$sum108$i = 0, $$sum109$i = 0, $$sum11$i = 0, $$sum11$i$i = 0, $$sum11$i22$i = 0, $$sum110$i = 0, $$sum111$i = 0, $$sum1112 = 0, $$sum112$i = 0, $$sum113$i = 0, $$sum114$i = 0, $$sum115$i = 0, $$sum12$i = 0, $$sum12$i$i = 0, $$sum13$i = 0, $$sum13$i$i = 0, $$sum14$i$i = 0, $$sum14$pre$i = 0, $$sum15$i = 0; - var $$sum15$i$i = 0, $$sum16$i = 0, $$sum16$i$i = 0, $$sum17$i = 0, $$sum17$i$i = 0, $$sum18$i = 0, $$sum1819$i$i = 0, $$sum2 = 0, $$sum2$i = 0, $$sum2$i$i = 0, $$sum2$i$i$i = 0, $$sum2$i15$i = 0, $$sum2$i17$i = 0, $$sum2$i21$i = 0, $$sum2$pre$i = 0, $$sum20$i$i = 0, $$sum21$i$i = 0, $$sum22$i$i = 0, $$sum23$i$i = 0, $$sum24$i$i = 0; - var $$sum25$i$i = 0, $$sum26$pre$i$i = 0, $$sum27$i$i = 0, $$sum28$i$i = 0, $$sum29$i$i = 0, $$sum3$i = 0, $$sum3$i$i = 0, $$sum3$i27 = 0, $$sum30$i$i = 0, $$sum3132$i$i = 0, $$sum34$i$i = 0, $$sum3536$i$i = 0, $$sum3738$i$i = 0, $$sum39$i$i = 0, $$sum4 = 0, $$sum4$i = 0, $$sum4$i28 = 0, $$sum40$i$i = 0, $$sum41$i$i = 0, $$sum42$i$i = 0; - var $$sum5$i = 0, $$sum5$i$i = 0, $$sum56 = 0, $$sum6$i = 0, $$sum67$i$i = 0, $$sum7$i = 0, $$sum8$i = 0, $$sum8$pre = 0, $$sum9 = 0, $$sum9$i = 0, $$sum9$i$i = 0, $$tsize$1$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0; - var $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0; - var $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0; - var $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0; - var $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $108 = 0; - var $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0; - var $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0; - var $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0; - var $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0; - var $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0; - var $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0; - var $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0; - var $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0; - var $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0; - var $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0; - var $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0; - var $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0; - var $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0; - var $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0; - var $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0; - var $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0; - var $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0; - var $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0; - var $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0; - var $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0; - var $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0; - var $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0; - var $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0; - var $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0; - var $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0; - var $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0; - var $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0; - var $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0; - var $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0; - var $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0; - var $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0; - var $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0; - var $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0; - var $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0; - var $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0; - var $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0; - var $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0; - var $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0; - var $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0; - var $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0; - var $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0; - var $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0; - var $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0; - var $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0; - var $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0; - var $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0; - var $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0; - var $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0; - var $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0; - var $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0, $F5$0$i = 0, $I1$0$c$i$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$027$i = 0, $K2$015$i$i = 0, $K8$053$i$i = 0; - var $R$0$i = 0, $R$0$i$i = 0, $R$0$i18 = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i20 = 0, $RP$0$i = 0, $RP$0$i$i = 0, $RP$0$i17 = 0, $T$0$lcssa$i = 0, $T$0$lcssa$i$i = 0, $T$0$lcssa$i26$i = 0, $T$014$i$i = 0, $T$026$i = 0, $T$052$i$i = 0, $br$0$i = 0, $br$030$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i21 = 0; - var $exitcond$i$i = 0, $i$02$i$i = 0, $idx$0$i = 0, $mem$0 = 0, $nb$0 = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i$i = 0, $or$cond$i27$i = 0, $or$cond$i29 = 0, $or$cond1$i = 0, $or$cond19$i = 0, $or$cond2$i = 0, $or$cond24$i = 0, $or$cond3$i = 0, $or$cond4$i = 0, $or$cond47$i = 0, $or$cond5$i = 0, $or$cond6$i = 0, $or$cond8$i = 0; - var $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i15 = 0, $rsize$1$i = 0, $rsize$2$i = 0, $rsize$3$lcssa$i = 0, $rsize$331$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$073$i = 0, $sp$166$i = 0, $ssize$0$i = 0, $ssize$1$i = 0, $ssize$129$i = 0, $ssize$2$i = 0, $t$0$i = 0, $t$0$i14 = 0; - var $t$1$i = 0, $t$2$ph$i = 0, $t$2$v$3$i = 0, $t$230$i = 0, $tbase$245$i = 0, $tsize$03141$i = 0, $tsize$1$i = 0, $tsize$244$i = 0, $v$0$i = 0, $v$0$i16 = 0, $v$1$i = 0, $v$2$i = 0, $v$3$lcssa$i = 0, $v$332$i = 0, label = 0, sp = 0; + var $$3$i = 0, $$lcssa = 0, $$lcssa211 = 0, $$lcssa215 = 0, $$lcssa216 = 0, $$lcssa217 = 0, $$lcssa219 = 0, $$lcssa222 = 0, $$lcssa224 = 0, $$lcssa226 = 0, $$lcssa228 = 0, $$lcssa230 = 0, $$lcssa232 = 0, $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i22$i = 0, $$pre$i25 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i23$iZ2D = 0; + var $$pre$phi$i26Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phi58$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre105 = 0, $$pre106 = 0, $$pre14$i$i = 0, $$pre43$i = 0, $$pre56$i$i = 0, $$pre57$i$i = 0, $$pre8$i = 0, $$rsize$0$i = 0, $$rsize$3$i = 0, $$sum = 0, $$sum$i$i = 0, $$sum$i$i$i = 0, $$sum$i13$i = 0, $$sum$i14$i = 0, $$sum$i17$i = 0, $$sum$i19$i = 0; + var $$sum$i2334 = 0, $$sum$i32 = 0, $$sum$i35 = 0, $$sum1 = 0, $$sum1$i = 0, $$sum1$i$i = 0, $$sum1$i15$i = 0, $$sum1$i20$i = 0, $$sum1$i24 = 0, $$sum10 = 0, $$sum10$i = 0, $$sum10$i$i = 0, $$sum11$i = 0, $$sum11$i$i = 0, $$sum1112 = 0, $$sum112$i = 0, $$sum113$i = 0, $$sum114$i = 0, $$sum115$i = 0, $$sum116$i = 0; + var $$sum117$i = 0, $$sum118$i = 0, $$sum119$i = 0, $$sum12$i = 0, $$sum12$i$i = 0, $$sum120$i = 0, $$sum121$i = 0, $$sum122$i = 0, $$sum123$i = 0, $$sum124$i = 0, $$sum125$i = 0, $$sum13$i = 0, $$sum13$i$i = 0, $$sum14$i$i = 0, $$sum15$i = 0, $$sum15$i$i = 0, $$sum16$i = 0, $$sum16$i$i = 0, $$sum17$i = 0, $$sum17$i$i = 0; + var $$sum18$i = 0, $$sum1819$i$i = 0, $$sum2 = 0, $$sum2$i = 0, $$sum2$i$i = 0, $$sum2$i$i$i = 0, $$sum2$i16$i = 0, $$sum2$i18$i = 0, $$sum2$i21$i = 0, $$sum20$i$i = 0, $$sum21$i$i = 0, $$sum22$i$i = 0, $$sum23$i$i = 0, $$sum24$i$i = 0, $$sum25$i$i = 0, $$sum27$i$i = 0, $$sum28$i$i = 0, $$sum29$i$i = 0, $$sum3$i = 0, $$sum3$i27 = 0; + var $$sum30$i$i = 0, $$sum3132$i$i = 0, $$sum34$i$i = 0, $$sum3536$i$i = 0, $$sum3738$i$i = 0, $$sum39$i$i = 0, $$sum4 = 0, $$sum4$i = 0, $$sum4$i$i = 0, $$sum4$i28 = 0, $$sum40$i$i = 0, $$sum41$i$i = 0, $$sum42$i$i = 0, $$sum5$i = 0, $$sum5$i$i = 0, $$sum56 = 0, $$sum6$i = 0, $$sum67$i$i = 0, $$sum7$i = 0, $$sum8$i = 0; + var $$sum9 = 0, $$sum9$i = 0, $$sum9$i$i = 0, $$tsize$1$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0; + var $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0; + var $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0; + var $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0; + var $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0; + var $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0; + var $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0; + var $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0; + var $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0; + var $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0; + var $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0; + var $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0; + var $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0; + var $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0; + var $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0; + var $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0; + var $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0; + var $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0; + var $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0; + var $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0; + var $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0; + var $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0; + var $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0; + var $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0; + var $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0; + var $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0; + var $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0; + var $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0; + var $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0; + var $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0; + var $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0; + var $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0; + var $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0; + var $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0; + var $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0; + var $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0; + var $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0; + var $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0; + var $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0; + var $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0; + var $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0; + var $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0; + var $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0; + var $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0; + var $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0; + var $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0; + var $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0; + var $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0; + var $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0; + var $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0; + var $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0; + var $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0; + var $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0; + var $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0; + var $F5$0$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$029$i = 0, $K2$07$i$i = 0, $K8$051$i$i = 0, $R$0$i = 0, $R$0$i$i = 0, $R$0$i$i$lcssa = 0, $R$0$i$lcssa = 0, $R$0$i18 = 0, $R$0$i18$lcssa = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i20 = 0, $RP$0$i = 0, $RP$0$i$i = 0, $RP$0$i$i$lcssa = 0, $RP$0$i$lcssa = 0; + var $RP$0$i17 = 0, $RP$0$i17$lcssa = 0, $T$0$lcssa$i = 0, $T$0$lcssa$i$i = 0, $T$0$lcssa$i25$i = 0, $T$028$i = 0, $T$028$i$lcssa = 0, $T$050$i$i = 0, $T$050$i$i$lcssa = 0, $T$06$i$i = 0, $T$06$i$i$lcssa = 0, $br$0$ph$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i21 = 0, $exitcond$i$i = 0, $i$02$i$i = 0, $idx$0$i = 0, $mem$0 = 0, $nb$0 = 0; + var $not$$i = 0, $not$$i$i = 0, $not$$i26$i = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i30 = 0, $or$cond1$i = 0, $or$cond19$i = 0, $or$cond2$i = 0, $or$cond3$i = 0, $or$cond5$i = 0, $or$cond57$i = 0, $or$cond6$i = 0, $or$cond8$i = 0, $or$cond9$i = 0, $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i$lcssa = 0, $rsize$0$i15 = 0, $rsize$1$i = 0; + var $rsize$2$i = 0, $rsize$3$lcssa$i = 0, $rsize$331$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$084$i = 0, $sp$084$i$lcssa = 0, $sp$183$i = 0, $sp$183$i$lcssa = 0, $ssize$0$$i = 0, $ssize$0$i = 0, $ssize$1$ph$i = 0, $ssize$2$i = 0, $t$0$i = 0, $t$0$i14 = 0, $t$1$i = 0, $t$2$ph$i = 0; + var $t$2$v$3$i = 0, $t$230$i = 0, $tbase$255$i = 0, $tsize$0$ph$i = 0, $tsize$0323944$i = 0, $tsize$1$i = 0, $tsize$254$i = 0, $v$0$i = 0, $v$0$i$lcssa = 0, $v$0$i16 = 0, $v$1$i = 0, $v$2$i = 0, $v$3$lcssa$i = 0, $v$3$ph$i = 0, $v$332$i = 0, label = 0, sp = 0; sp = STACKTOP; $0 = ($bytes>>>0)<(245); do { if ($0) { $1 = ($bytes>>>0)<(11); - if ($1) { - $5 = 16; - } else { - $2 = (($bytes) + 11)|0; - $3 = $2 & -8; - $5 = $3; - } - $4 = $5 >>> 3; - $6 = HEAP32[32544>>2]|0; - $7 = $6 >>> $4; + $2 = (($bytes) + 11)|0; + $3 = $2 & -8; + $4 = $1 ? 16 : $3; + $5 = $4 >>> 3; + $6 = HEAP32[32676>>2]|0; + $7 = $6 >>> $5; $8 = $7 & 3; $9 = ($8|0)==(0); if (!($9)) { $10 = $7 & 1; $11 = $10 ^ 1; - $12 = (($11) + ($4))|0; + $12 = (($11) + ($5))|0; $13 = $12 << 1; - $14 = ((32544 + ($13<<2)|0) + 40|0); + $14 = (32716 + ($13<<2)|0); $$sum10 = (($13) + 2)|0; - $15 = ((32544 + ($$sum10<<2)|0) + 40|0); + $15 = (32716 + ($$sum10<<2)|0); $16 = HEAP32[$15>>2]|0; - $17 = (($16) + 8|0); + $17 = ((($16)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = ($14|0)==($18|0); do { @@ -19605,15 +20761,15 @@ function _malloc($bytes) { $20 = 1 << $12; $21 = $20 ^ -1; $22 = $6 & $21; - HEAP32[32544>>2] = $22; + HEAP32[32676>>2] = $22; } else { - $23 = HEAP32[((32544 + 16|0))>>2]|0; + $23 = HEAP32[(32692)>>2]|0; $24 = ($18>>>0)<($23>>>0); if ($24) { _abort(); // unreachable; } - $25 = (($18) + 12|0); + $25 = ((($18)) + 12|0); $26 = HEAP32[$25>>2]|0; $27 = ($26|0)==($16|0); if ($27) { @@ -19628,7 +20784,7 @@ function _malloc($bytes) { } while(0); $28 = $12 << 3; $29 = $28 | 3; - $30 = (($16) + 4|0); + $30 = ((($16)) + 4|0); HEAP32[$30>>2] = $29; $$sum1112 = $28 | 4; $31 = (($16) + ($$sum1112)|0); @@ -19636,15 +20792,15 @@ function _malloc($bytes) { $33 = $32 | 1; HEAP32[$31>>2] = $33; $mem$0 = $17; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } - $34 = HEAP32[((32544 + 8|0))>>2]|0; - $35 = ($5>>>0)>($34>>>0); + $34 = HEAP32[(32684)>>2]|0; + $35 = ($4>>>0)>($34>>>0); if ($35) { $36 = ($7|0)==(0); if (!($36)) { - $37 = $7 << $4; - $38 = 2 << $4; + $37 = $7 << $5; + $38 = 2 << $5; $39 = (0 - ($38))|0; $40 = $38 | $39; $41 = $37 & $40; @@ -19672,11 +20828,11 @@ function _malloc($bytes) { $63 = $59 >>> $61; $64 = (($62) + ($63))|0; $65 = $64 << 1; - $66 = ((32544 + ($65<<2)|0) + 40|0); + $66 = (32716 + ($65<<2)|0); $$sum4 = (($65) + 2)|0; - $67 = ((32544 + ($$sum4<<2)|0) + 40|0); + $67 = (32716 + ($$sum4<<2)|0); $68 = HEAP32[$67>>2]|0; - $69 = (($68) + 8|0); + $69 = ((($68)) + 8|0); $70 = HEAP32[$69>>2]|0; $71 = ($66|0)==($70|0); do { @@ -19684,23 +20840,23 @@ function _malloc($bytes) { $72 = 1 << $64; $73 = $72 ^ -1; $74 = $6 & $73; - HEAP32[32544>>2] = $74; - $88 = $34; + HEAP32[32676>>2] = $74; + $89 = $34; } else { - $75 = HEAP32[((32544 + 16|0))>>2]|0; + $75 = HEAP32[(32692)>>2]|0; $76 = ($70>>>0)<($75>>>0); if ($76) { _abort(); // unreachable; } - $77 = (($70) + 12|0); + $77 = ((($70)) + 12|0); $78 = HEAP32[$77>>2]|0; $79 = ($78|0)==($68|0); if ($79) { HEAP32[$77>>2] = $66; HEAP32[$67>>2] = $70; - $$pre = HEAP32[((32544 + 8|0))>>2]|0; - $88 = $$pre; + $$pre = HEAP32[(32684)>>2]|0; + $89 = $$pre; break; } else { _abort(); @@ -19709,38 +20865,38 @@ function _malloc($bytes) { } } while(0); $80 = $64 << 3; - $81 = (($80) - ($5))|0; - $82 = $5 | 3; - $83 = (($68) + 4|0); + $81 = (($80) - ($4))|0; + $82 = $4 | 3; + $83 = ((($68)) + 4|0); HEAP32[$83>>2] = $82; - $84 = (($68) + ($5)|0); + $84 = (($68) + ($4)|0); $85 = $81 | 1; - $$sum56 = $5 | 4; + $$sum56 = $4 | 4; $86 = (($68) + ($$sum56)|0); HEAP32[$86>>2] = $85; $87 = (($68) + ($80)|0); HEAP32[$87>>2] = $81; - $89 = ($88|0)==(0); - if (!($89)) { - $90 = HEAP32[((32544 + 20|0))>>2]|0; - $91 = $88 >>> 3; + $88 = ($89|0)==(0); + if (!($88)) { + $90 = HEAP32[(32696)>>2]|0; + $91 = $89 >>> 3; $92 = $91 << 1; - $93 = ((32544 + ($92<<2)|0) + 40|0); - $94 = HEAP32[32544>>2]|0; + $93 = (32716 + ($92<<2)|0); + $94 = HEAP32[32676>>2]|0; $95 = 1 << $91; $96 = $94 & $95; $97 = ($96|0)==(0); if ($97) { $98 = $94 | $95; - HEAP32[32544>>2] = $98; - $$sum8$pre = (($92) + 2)|0; - $$pre105 = ((32544 + ($$sum8$pre<<2)|0) + 40|0); - $$pre$phiZ2D = $$pre105;$F4$0 = $93; + HEAP32[32676>>2] = $98; + $$pre105 = (($92) + 2)|0; + $$pre106 = (32716 + ($$pre105<<2)|0); + $$pre$phiZ2D = $$pre106;$F4$0 = $93; } else { $$sum9 = (($92) + 2)|0; - $99 = ((32544 + ($$sum9<<2)|0) + 40|0); + $99 = (32716 + ($$sum9<<2)|0); $100 = HEAP32[$99>>2]|0; - $101 = HEAP32[((32544 + 16|0))>>2]|0; + $101 = HEAP32[(32692)>>2]|0; $102 = ($100>>>0)<($101>>>0); if ($102) { _abort(); @@ -19750,22 +20906,22 @@ function _malloc($bytes) { } } HEAP32[$$pre$phiZ2D>>2] = $90; - $103 = (($F4$0) + 12|0); + $103 = ((($F4$0)) + 12|0); HEAP32[$103>>2] = $90; - $104 = (($90) + 8|0); + $104 = ((($90)) + 8|0); HEAP32[$104>>2] = $F4$0; - $105 = (($90) + 12|0); + $105 = ((($90)) + 12|0); HEAP32[$105>>2] = $93; } - HEAP32[((32544 + 8|0))>>2] = $81; - HEAP32[((32544 + 20|0))>>2] = $84; + HEAP32[(32684)>>2] = $81; + HEAP32[(32696)>>2] = $84; $mem$0 = $69; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } - $106 = HEAP32[((32544 + 4|0))>>2]|0; + $106 = HEAP32[(32680)>>2]|0; $107 = ($106|0)==(0); if ($107) { - $nb$0 = $5; + $nb$0 = $4; } else { $108 = (0 - ($106))|0; $109 = $106 & $108; @@ -19790,5144 +20946,3495 @@ function _malloc($bytes) { $128 = $124 | $127; $129 = $125 >>> $127; $130 = (($128) + ($129))|0; - $131 = ((32544 + ($130<<2)|0) + 304|0); + $131 = (32980 + ($130<<2)|0); $132 = HEAP32[$131>>2]|0; - $133 = (($132) + 4|0); + $133 = ((($132)) + 4|0); $134 = HEAP32[$133>>2]|0; $135 = $134 & -8; - $136 = (($135) - ($5))|0; + $136 = (($135) - ($4))|0; $rsize$0$i = $136;$t$0$i = $132;$v$0$i = $132; while(1) { - $137 = (($t$0$i) + 16|0); + $137 = ((($t$0$i)) + 16|0); $138 = HEAP32[$137>>2]|0; $139 = ($138|0)==(0|0); if ($139) { - $140 = (($t$0$i) + 20|0); + $140 = ((($t$0$i)) + 20|0); $141 = HEAP32[$140>>2]|0; $142 = ($141|0)==(0|0); if ($142) { - break; - } else { - $144 = $141; - } - } else { - $144 = $138; - } - $143 = (($144) + 4|0); - $145 = HEAP32[$143>>2]|0; - $146 = $145 & -8; - $147 = (($146) - ($5))|0; - $148 = ($147>>>0)<($rsize$0$i>>>0); - $$rsize$0$i = $148 ? $147 : $rsize$0$i; - $$v$0$i = $148 ? $144 : $v$0$i; - $rsize$0$i = $$rsize$0$i;$t$0$i = $144;$v$0$i = $$v$0$i; - } - $149 = HEAP32[((32544 + 16|0))>>2]|0; - $150 = ($v$0$i>>>0)<($149>>>0); - if ($150) { - _abort(); - // unreachable; - } - $151 = (($v$0$i) + ($5)|0); - $152 = ($v$0$i>>>0)<($151>>>0); - if (!($152)) { - _abort(); - // unreachable; - } - $153 = (($v$0$i) + 24|0); - $154 = HEAP32[$153>>2]|0; - $155 = (($v$0$i) + 12|0); - $156 = HEAP32[$155>>2]|0; - $157 = ($156|0)==($v$0$i|0); - do { - if ($157) { - $167 = (($v$0$i) + 20|0); - $168 = HEAP32[$167>>2]|0; - $169 = ($168|0)==(0|0); - if ($169) { - $170 = (($v$0$i) + 16|0); - $171 = HEAP32[$170>>2]|0; - $172 = ($171|0)==(0|0); - if ($172) { - $R$1$i = 0; - break; - } else { - $R$0$i = $171;$RP$0$i = $170; - } - } else { - $R$0$i = $168;$RP$0$i = $167; - } - while(1) { - $173 = (($R$0$i) + 20|0); - $174 = HEAP32[$173>>2]|0; - $175 = ($174|0)==(0|0); - if (!($175)) { - $R$0$i = $174;$RP$0$i = $173; - continue; - } - $176 = (($R$0$i) + 16|0); - $177 = HEAP32[$176>>2]|0; - $178 = ($177|0)==(0|0); - if ($178) { - break; - } else { - $R$0$i = $177;$RP$0$i = $176; - } - } - $179 = ($RP$0$i>>>0)<($149>>>0); - if ($179) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i>>2] = 0; - $R$1$i = $R$0$i; - break; - } - } else { - $158 = (($v$0$i) + 8|0); - $159 = HEAP32[$158>>2]|0; - $160 = ($159>>>0)<($149>>>0); - if ($160) { - _abort(); - // unreachable; - } - $161 = (($159) + 12|0); - $162 = HEAP32[$161>>2]|0; - $163 = ($162|0)==($v$0$i|0); - if (!($163)) { - _abort(); - // unreachable; - } - $164 = (($156) + 8|0); - $165 = HEAP32[$164>>2]|0; - $166 = ($165|0)==($v$0$i|0); - if ($166) { - HEAP32[$161>>2] = $156; - HEAP32[$164>>2] = $159; - $R$1$i = $156; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $180 = ($154|0)==(0|0); - do { - if (!($180)) { - $181 = (($v$0$i) + 28|0); - $182 = HEAP32[$181>>2]|0; - $183 = ((32544 + ($182<<2)|0) + 304|0); - $184 = HEAP32[$183>>2]|0; - $185 = ($v$0$i|0)==($184|0); - if ($185) { - HEAP32[$183>>2] = $R$1$i; - $cond$i = ($R$1$i|0)==(0|0); - if ($cond$i) { - $186 = 1 << $182; - $187 = $186 ^ -1; - $188 = HEAP32[((32544 + 4|0))>>2]|0; - $189 = $188 & $187; - HEAP32[((32544 + 4|0))>>2] = $189; - break; - } - } else { - $190 = HEAP32[((32544 + 16|0))>>2]|0; - $191 = ($154>>>0)<($190>>>0); - if ($191) { - _abort(); - // unreachable; - } - $192 = (($154) + 16|0); - $193 = HEAP32[$192>>2]|0; - $194 = ($193|0)==($v$0$i|0); - if ($194) { - HEAP32[$192>>2] = $R$1$i; - } else { - $195 = (($154) + 20|0); - HEAP32[$195>>2] = $R$1$i; - } - $196 = ($R$1$i|0)==(0|0); - if ($196) { - break; - } - } - $197 = HEAP32[((32544 + 16|0))>>2]|0; - $198 = ($R$1$i>>>0)<($197>>>0); - if ($198) { - _abort(); - // unreachable; - } - $199 = (($R$1$i) + 24|0); - HEAP32[$199>>2] = $154; - $200 = (($v$0$i) + 16|0); - $201 = HEAP32[$200>>2]|0; - $202 = ($201|0)==(0|0); - do { - if (!($202)) { - $203 = ($201>>>0)<($197>>>0); - if ($203) { - _abort(); - // unreachable; - } else { - $204 = (($R$1$i) + 16|0); - HEAP32[$204>>2] = $201; - $205 = (($201) + 24|0); - HEAP32[$205>>2] = $R$1$i; - break; - } - } - } while(0); - $206 = (($v$0$i) + 20|0); - $207 = HEAP32[$206>>2]|0; - $208 = ($207|0)==(0|0); - if (!($208)) { - $209 = HEAP32[((32544 + 16|0))>>2]|0; - $210 = ($207>>>0)<($209>>>0); - if ($210) { - _abort(); - // unreachable; - } else { - $211 = (($R$1$i) + 20|0); - HEAP32[$211>>2] = $207; - $212 = (($207) + 24|0); - HEAP32[$212>>2] = $R$1$i; - break; - } - } - } - } while(0); - $213 = ($rsize$0$i>>>0)<(16); - if ($213) { - $214 = (($rsize$0$i) + ($5))|0; - $215 = $214 | 3; - $216 = (($v$0$i) + 4|0); - HEAP32[$216>>2] = $215; - $$sum4$i = (($214) + 4)|0; - $217 = (($v$0$i) + ($$sum4$i)|0); - $218 = HEAP32[$217>>2]|0; - $219 = $218 | 1; - HEAP32[$217>>2] = $219; - } else { - $220 = $5 | 3; - $221 = (($v$0$i) + 4|0); - HEAP32[$221>>2] = $220; - $222 = $rsize$0$i | 1; - $$sum$i39 = $5 | 4; - $223 = (($v$0$i) + ($$sum$i39)|0); - HEAP32[$223>>2] = $222; - $$sum1$i = (($rsize$0$i) + ($5))|0; - $224 = (($v$0$i) + ($$sum1$i)|0); - HEAP32[$224>>2] = $rsize$0$i; - $225 = HEAP32[((32544 + 8|0))>>2]|0; - $226 = ($225|0)==(0); - if (!($226)) { - $227 = HEAP32[((32544 + 20|0))>>2]|0; - $228 = $225 >>> 3; - $229 = $228 << 1; - $230 = ((32544 + ($229<<2)|0) + 40|0); - $231 = HEAP32[32544>>2]|0; - $232 = 1 << $228; - $233 = $231 & $232; - $234 = ($233|0)==(0); - if ($234) { - $235 = $231 | $232; - HEAP32[32544>>2] = $235; - $$sum2$pre$i = (($229) + 2)|0; - $$pre$i = ((32544 + ($$sum2$pre$i<<2)|0) + 40|0); - $$pre$phi$iZ2D = $$pre$i;$F1$0$i = $230; + $rsize$0$i$lcssa = $rsize$0$i;$v$0$i$lcssa = $v$0$i; + break; } else { - $$sum3$i = (($229) + 2)|0; - $236 = ((32544 + ($$sum3$i<<2)|0) + 40|0); - $237 = HEAP32[$236>>2]|0; - $238 = HEAP32[((32544 + 16|0))>>2]|0; - $239 = ($237>>>0)<($238>>>0); - if ($239) { - _abort(); - // unreachable; - } else { - $$pre$phi$iZ2D = $236;$F1$0$i = $237; - } + $144 = $141; } - HEAP32[$$pre$phi$iZ2D>>2] = $227; - $240 = (($F1$0$i) + 12|0); - HEAP32[$240>>2] = $227; - $241 = (($227) + 8|0); - HEAP32[$241>>2] = $F1$0$i; - $242 = (($227) + 12|0); - HEAP32[$242>>2] = $230; - } - HEAP32[((32544 + 8|0))>>2] = $rsize$0$i; - HEAP32[((32544 + 20|0))>>2] = $151; - } - $243 = (($v$0$i) + 8|0); - $mem$0 = $243; - STACKTOP = sp;return ($mem$0|0); - } - } else { - $nb$0 = $5; - } - } else { - $244 = ($bytes>>>0)>(4294967231); - if ($244) { - $nb$0 = -1; - } else { - $245 = (($bytes) + 11)|0; - $246 = $245 & -8; - $247 = HEAP32[((32544 + 4|0))>>2]|0; - $248 = ($247|0)==(0); - if ($248) { - $nb$0 = $246; - } else { - $249 = (0 - ($246))|0; - $250 = $245 >>> 8; - $251 = ($250|0)==(0); - if ($251) { - $idx$0$i = 0; - } else { - $252 = ($246>>>0)>(16777215); - if ($252) { - $idx$0$i = 31; } else { - $253 = (($250) + 1048320)|0; - $254 = $253 >>> 16; - $255 = $254 & 8; - $256 = $250 << $255; - $257 = (($256) + 520192)|0; - $258 = $257 >>> 16; - $259 = $258 & 4; - $260 = $259 | $255; - $261 = $256 << $259; - $262 = (($261) + 245760)|0; - $263 = $262 >>> 16; - $264 = $263 & 2; - $265 = $260 | $264; - $266 = (14 - ($265))|0; - $267 = $261 << $264; - $268 = $267 >>> 15; - $269 = (($266) + ($268))|0; - $270 = $269 << 1; - $271 = (($269) + 7)|0; - $272 = $246 >>> $271; - $273 = $272 & 1; - $274 = $273 | $270; - $idx$0$i = $274; + $144 = $138; } + $143 = ((($144)) + 4|0); + $145 = HEAP32[$143>>2]|0; + $146 = $145 & -8; + $147 = (($146) - ($4))|0; + $148 = ($147>>>0)<($rsize$0$i>>>0); + $$rsize$0$i = $148 ? $147 : $rsize$0$i; + $$v$0$i = $148 ? $144 : $v$0$i; + $rsize$0$i = $$rsize$0$i;$t$0$i = $144;$v$0$i = $$v$0$i; } - $275 = ((32544 + ($idx$0$i<<2)|0) + 304|0); - $276 = HEAP32[$275>>2]|0; - $277 = ($276|0)==(0|0); - L126: do { - if ($277) { - $rsize$2$i = $249;$t$1$i = 0;$v$2$i = 0; - } else { - $278 = ($idx$0$i|0)==(31); - if ($278) { - $282 = 0; + $149 = HEAP32[(32692)>>2]|0; + $150 = ($v$0$i$lcssa>>>0)<($149>>>0); + if ($150) { + _abort(); + // unreachable; + } + $151 = (($v$0$i$lcssa) + ($4)|0); + $152 = ($v$0$i$lcssa>>>0)<($151>>>0); + if (!($152)) { + _abort(); + // unreachable; + } + $153 = ((($v$0$i$lcssa)) + 24|0); + $154 = HEAP32[$153>>2]|0; + $155 = ((($v$0$i$lcssa)) + 12|0); + $156 = HEAP32[$155>>2]|0; + $157 = ($156|0)==($v$0$i$lcssa|0); + do { + if ($157) { + $167 = ((($v$0$i$lcssa)) + 20|0); + $168 = HEAP32[$167>>2]|0; + $169 = ($168|0)==(0|0); + if ($169) { + $170 = ((($v$0$i$lcssa)) + 16|0); + $171 = HEAP32[$170>>2]|0; + $172 = ($171|0)==(0|0); + if ($172) { + $R$1$i = 0; + break; + } else { + $R$0$i = $171;$RP$0$i = $170; + } } else { - $279 = $idx$0$i >>> 1; - $280 = (25 - ($279))|0; - $282 = $280; + $R$0$i = $168;$RP$0$i = $167; } - $281 = $246 << $282; - $rsize$0$i15 = $249;$rst$0$i = 0;$sizebits$0$i = $281;$t$0$i14 = $276;$v$0$i16 = 0; while(1) { - $283 = (($t$0$i14) + 4|0); - $284 = HEAP32[$283>>2]|0; - $285 = $284 & -8; - $286 = (($285) - ($246))|0; - $287 = ($286>>>0)<($rsize$0$i15>>>0); - if ($287) { - $288 = ($285|0)==($246|0); - if ($288) { - $rsize$2$i = $286;$t$1$i = $t$0$i14;$v$2$i = $t$0$i14; - break L126; - } else { - $rsize$1$i = $286;$v$1$i = $t$0$i14; - } - } else { - $rsize$1$i = $rsize$0$i15;$v$1$i = $v$0$i16; + $173 = ((($R$0$i)) + 20|0); + $174 = HEAP32[$173>>2]|0; + $175 = ($174|0)==(0|0); + if (!($175)) { + $R$0$i = $174;$RP$0$i = $173; + continue; } - $289 = (($t$0$i14) + 20|0); - $290 = HEAP32[$289>>2]|0; - $291 = $sizebits$0$i >>> 31; - $292 = ((($t$0$i14) + ($291<<2)|0) + 16|0); - $293 = HEAP32[$292>>2]|0; - $294 = ($290|0)==(0|0); - $295 = ($290|0)==($293|0); - $or$cond19$i = $294 | $295; - $rst$1$i = $or$cond19$i ? $rst$0$i : $290; - $296 = ($293|0)==(0|0); - $297 = $sizebits$0$i << 1; - if ($296) { - $rsize$2$i = $rsize$1$i;$t$1$i = $rst$1$i;$v$2$i = $v$1$i; + $176 = ((($R$0$i)) + 16|0); + $177 = HEAP32[$176>>2]|0; + $178 = ($177|0)==(0|0); + if ($178) { + $R$0$i$lcssa = $R$0$i;$RP$0$i$lcssa = $RP$0$i; break; } else { - $rsize$0$i15 = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $297;$t$0$i14 = $293;$v$0$i16 = $v$1$i; + $R$0$i = $177;$RP$0$i = $176; } } - } - } while(0); - $298 = ($t$1$i|0)==(0|0); - $299 = ($v$2$i|0)==(0|0); - $or$cond$i = $298 & $299; - if ($or$cond$i) { - $300 = 2 << $idx$0$i; - $301 = (0 - ($300))|0; - $302 = $300 | $301; - $303 = $247 & $302; - $304 = ($303|0)==(0); - if ($304) { - $nb$0 = $246; - break; - } - $305 = (0 - ($303))|0; - $306 = $303 & $305; - $307 = (($306) + -1)|0; - $308 = $307 >>> 12; - $309 = $308 & 16; - $310 = $307 >>> $309; - $311 = $310 >>> 5; - $312 = $311 & 8; - $313 = $312 | $309; - $314 = $310 >>> $312; - $315 = $314 >>> 2; - $316 = $315 & 4; - $317 = $313 | $316; - $318 = $314 >>> $316; - $319 = $318 >>> 1; - $320 = $319 & 2; - $321 = $317 | $320; - $322 = $318 >>> $320; - $323 = $322 >>> 1; - $324 = $323 & 1; - $325 = $321 | $324; - $326 = $322 >>> $324; - $327 = (($325) + ($326))|0; - $328 = ((32544 + ($327<<2)|0) + 304|0); - $329 = HEAP32[$328>>2]|0; - $t$2$ph$i = $329; - } else { - $t$2$ph$i = $t$1$i; - } - $330 = ($t$2$ph$i|0)==(0|0); - if ($330) { - $rsize$3$lcssa$i = $rsize$2$i;$v$3$lcssa$i = $v$2$i; - } else { - $rsize$331$i = $rsize$2$i;$t$230$i = $t$2$ph$i;$v$332$i = $v$2$i; - while(1) { - $331 = (($t$230$i) + 4|0); - $332 = HEAP32[$331>>2]|0; - $333 = $332 & -8; - $334 = (($333) - ($246))|0; - $335 = ($334>>>0)<($rsize$331$i>>>0); - $$rsize$3$i = $335 ? $334 : $rsize$331$i; - $t$2$v$3$i = $335 ? $t$230$i : $v$332$i; - $336 = (($t$230$i) + 16|0); - $337 = HEAP32[$336>>2]|0; - $338 = ($337|0)==(0|0); - if (!($338)) { - $rsize$331$i = $$rsize$3$i;$t$230$i = $337;$v$332$i = $t$2$v$3$i; - continue; - } - $339 = (($t$230$i) + 20|0); - $340 = HEAP32[$339>>2]|0; - $341 = ($340|0)==(0|0); - if ($341) { - $rsize$3$lcssa$i = $$rsize$3$i;$v$3$lcssa$i = $t$2$v$3$i; - break; + $179 = ($RP$0$i$lcssa>>>0)<($149>>>0); + if ($179) { + _abort(); + // unreachable; } else { - $rsize$331$i = $$rsize$3$i;$t$230$i = $340;$v$332$i = $t$2$v$3$i; + HEAP32[$RP$0$i$lcssa>>2] = 0; + $R$1$i = $R$0$i$lcssa; + break; } - } - } - $342 = ($v$3$lcssa$i|0)==(0|0); - if ($342) { - $nb$0 = $246; - } else { - $343 = HEAP32[((32544 + 8|0))>>2]|0; - $344 = (($343) - ($246))|0; - $345 = ($rsize$3$lcssa$i>>>0)<($344>>>0); - if ($345) { - $346 = HEAP32[((32544 + 16|0))>>2]|0; - $347 = ($v$3$lcssa$i>>>0)<($346>>>0); - if ($347) { + } else { + $158 = ((($v$0$i$lcssa)) + 8|0); + $159 = HEAP32[$158>>2]|0; + $160 = ($159>>>0)<($149>>>0); + if ($160) { _abort(); // unreachable; } - $348 = (($v$3$lcssa$i) + ($246)|0); - $349 = ($v$3$lcssa$i>>>0)<($348>>>0); - if (!($349)) { + $161 = ((($159)) + 12|0); + $162 = HEAP32[$161>>2]|0; + $163 = ($162|0)==($v$0$i$lcssa|0); + if (!($163)) { _abort(); // unreachable; } - $350 = (($v$3$lcssa$i) + 24|0); - $351 = HEAP32[$350>>2]|0; - $352 = (($v$3$lcssa$i) + 12|0); - $353 = HEAP32[$352>>2]|0; - $354 = ($353|0)==($v$3$lcssa$i|0); - do { - if ($354) { - $364 = (($v$3$lcssa$i) + 20|0); - $365 = HEAP32[$364>>2]|0; - $366 = ($365|0)==(0|0); - if ($366) { - $367 = (($v$3$lcssa$i) + 16|0); - $368 = HEAP32[$367>>2]|0; - $369 = ($368|0)==(0|0); - if ($369) { - $R$1$i20 = 0; - break; - } else { - $R$0$i18 = $368;$RP$0$i17 = $367; - } - } else { - $R$0$i18 = $365;$RP$0$i17 = $364; - } - while(1) { - $370 = (($R$0$i18) + 20|0); - $371 = HEAP32[$370>>2]|0; - $372 = ($371|0)==(0|0); - if (!($372)) { - $R$0$i18 = $371;$RP$0$i17 = $370; - continue; - } - $373 = (($R$0$i18) + 16|0); - $374 = HEAP32[$373>>2]|0; - $375 = ($374|0)==(0|0); - if ($375) { - break; - } else { - $R$0$i18 = $374;$RP$0$i17 = $373; - } - } - $376 = ($RP$0$i17>>>0)<($346>>>0); - if ($376) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i17>>2] = 0; - $R$1$i20 = $R$0$i18; - break; - } - } else { - $355 = (($v$3$lcssa$i) + 8|0); - $356 = HEAP32[$355>>2]|0; - $357 = ($356>>>0)<($346>>>0); - if ($357) { - _abort(); - // unreachable; - } - $358 = (($356) + 12|0); - $359 = HEAP32[$358>>2]|0; - $360 = ($359|0)==($v$3$lcssa$i|0); - if (!($360)) { - _abort(); - // unreachable; - } - $361 = (($353) + 8|0); - $362 = HEAP32[$361>>2]|0; - $363 = ($362|0)==($v$3$lcssa$i|0); - if ($363) { - HEAP32[$358>>2] = $353; - HEAP32[$361>>2] = $356; - $R$1$i20 = $353; - break; - } else { - _abort(); - // unreachable; - } + $164 = ((($156)) + 8|0); + $165 = HEAP32[$164>>2]|0; + $166 = ($165|0)==($v$0$i$lcssa|0); + if ($166) { + HEAP32[$161>>2] = $156; + HEAP32[$164>>2] = $159; + $R$1$i = $156; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $180 = ($154|0)==(0|0); + do { + if (!($180)) { + $181 = ((($v$0$i$lcssa)) + 28|0); + $182 = HEAP32[$181>>2]|0; + $183 = (32980 + ($182<<2)|0); + $184 = HEAP32[$183>>2]|0; + $185 = ($v$0$i$lcssa|0)==($184|0); + if ($185) { + HEAP32[$183>>2] = $R$1$i; + $cond$i = ($R$1$i|0)==(0|0); + if ($cond$i) { + $186 = 1 << $182; + $187 = $186 ^ -1; + $188 = HEAP32[(32680)>>2]|0; + $189 = $188 & $187; + HEAP32[(32680)>>2] = $189; + break; } - } while(0); - $377 = ($351|0)==(0|0); - do { - if (!($377)) { - $378 = (($v$3$lcssa$i) + 28|0); - $379 = HEAP32[$378>>2]|0; - $380 = ((32544 + ($379<<2)|0) + 304|0); - $381 = HEAP32[$380>>2]|0; - $382 = ($v$3$lcssa$i|0)==($381|0); - if ($382) { - HEAP32[$380>>2] = $R$1$i20; - $cond$i21 = ($R$1$i20|0)==(0|0); - if ($cond$i21) { - $383 = 1 << $379; - $384 = $383 ^ -1; - $385 = HEAP32[((32544 + 4|0))>>2]|0; - $386 = $385 & $384; - HEAP32[((32544 + 4|0))>>2] = $386; - break; - } - } else { - $387 = HEAP32[((32544 + 16|0))>>2]|0; - $388 = ($351>>>0)<($387>>>0); - if ($388) { - _abort(); - // unreachable; - } - $389 = (($351) + 16|0); - $390 = HEAP32[$389>>2]|0; - $391 = ($390|0)==($v$3$lcssa$i|0); - if ($391) { - HEAP32[$389>>2] = $R$1$i20; - } else { - $392 = (($351) + 20|0); - HEAP32[$392>>2] = $R$1$i20; - } - $393 = ($R$1$i20|0)==(0|0); - if ($393) { - break; - } - } - $394 = HEAP32[((32544 + 16|0))>>2]|0; - $395 = ($R$1$i20>>>0)<($394>>>0); - if ($395) { - _abort(); - // unreachable; - } - $396 = (($R$1$i20) + 24|0); - HEAP32[$396>>2] = $351; - $397 = (($v$3$lcssa$i) + 16|0); - $398 = HEAP32[$397>>2]|0; - $399 = ($398|0)==(0|0); - do { - if (!($399)) { - $400 = ($398>>>0)<($394>>>0); - if ($400) { - _abort(); - // unreachable; - } else { - $401 = (($R$1$i20) + 16|0); - HEAP32[$401>>2] = $398; - $402 = (($398) + 24|0); - HEAP32[$402>>2] = $R$1$i20; - break; - } - } - } while(0); - $403 = (($v$3$lcssa$i) + 20|0); - $404 = HEAP32[$403>>2]|0; - $405 = ($404|0)==(0|0); - if (!($405)) { - $406 = HEAP32[((32544 + 16|0))>>2]|0; - $407 = ($404>>>0)<($406>>>0); - if ($407) { - _abort(); - // unreachable; - } else { - $408 = (($R$1$i20) + 20|0); - HEAP32[$408>>2] = $404; - $409 = (($404) + 24|0); - HEAP32[$409>>2] = $R$1$i20; - break; - } - } + } else { + $190 = HEAP32[(32692)>>2]|0; + $191 = ($154>>>0)<($190>>>0); + if ($191) { + _abort(); + // unreachable; } - } while(0); - $410 = ($rsize$3$lcssa$i>>>0)<(16); - L204: do { - if ($410) { - $411 = (($rsize$3$lcssa$i) + ($246))|0; - $412 = $411 | 3; - $413 = (($v$3$lcssa$i) + 4|0); - HEAP32[$413>>2] = $412; - $$sum18$i = (($411) + 4)|0; - $414 = (($v$3$lcssa$i) + ($$sum18$i)|0); - $415 = HEAP32[$414>>2]|0; - $416 = $415 | 1; - HEAP32[$414>>2] = $416; + $192 = ((($154)) + 16|0); + $193 = HEAP32[$192>>2]|0; + $194 = ($193|0)==($v$0$i$lcssa|0); + if ($194) { + HEAP32[$192>>2] = $R$1$i; } else { - $417 = $246 | 3; - $418 = (($v$3$lcssa$i) + 4|0); - HEAP32[$418>>2] = $417; - $419 = $rsize$3$lcssa$i | 1; - $$sum$i2338 = $246 | 4; - $420 = (($v$3$lcssa$i) + ($$sum$i2338)|0); - HEAP32[$420>>2] = $419; - $$sum1$i24 = (($rsize$3$lcssa$i) + ($246))|0; - $421 = (($v$3$lcssa$i) + ($$sum1$i24)|0); - HEAP32[$421>>2] = $rsize$3$lcssa$i; - $422 = $rsize$3$lcssa$i >>> 3; - $423 = ($rsize$3$lcssa$i>>>0)<(256); - if ($423) { - $424 = $422 << 1; - $425 = ((32544 + ($424<<2)|0) + 40|0); - $426 = HEAP32[32544>>2]|0; - $427 = 1 << $422; - $428 = $426 & $427; - $429 = ($428|0)==(0); - do { - if ($429) { - $430 = $426 | $427; - HEAP32[32544>>2] = $430; - $$sum14$pre$i = (($424) + 2)|0; - $$pre$i25 = ((32544 + ($$sum14$pre$i<<2)|0) + 40|0); - $$pre$phi$i26Z2D = $$pre$i25;$F5$0$i = $425; - } else { - $$sum17$i = (($424) + 2)|0; - $431 = ((32544 + ($$sum17$i<<2)|0) + 40|0); - $432 = HEAP32[$431>>2]|0; - $433 = HEAP32[((32544 + 16|0))>>2]|0; - $434 = ($432>>>0)<($433>>>0); - if (!($434)) { - $$pre$phi$i26Z2D = $431;$F5$0$i = $432; - break; - } - _abort(); - // unreachable; - } - } while(0); - HEAP32[$$pre$phi$i26Z2D>>2] = $348; - $435 = (($F5$0$i) + 12|0); - HEAP32[$435>>2] = $348; - $$sum15$i = (($246) + 8)|0; - $436 = (($v$3$lcssa$i) + ($$sum15$i)|0); - HEAP32[$436>>2] = $F5$0$i; - $$sum16$i = (($246) + 12)|0; - $437 = (($v$3$lcssa$i) + ($$sum16$i)|0); - HEAP32[$437>>2] = $425; - break; - } - $438 = $rsize$3$lcssa$i >>> 8; - $439 = ($438|0)==(0); - if ($439) { - $I7$0$i = 0; - } else { - $440 = ($rsize$3$lcssa$i>>>0)>(16777215); - if ($440) { - $I7$0$i = 31; - } else { - $441 = (($438) + 1048320)|0; - $442 = $441 >>> 16; - $443 = $442 & 8; - $444 = $438 << $443; - $445 = (($444) + 520192)|0; - $446 = $445 >>> 16; - $447 = $446 & 4; - $448 = $447 | $443; - $449 = $444 << $447; - $450 = (($449) + 245760)|0; - $451 = $450 >>> 16; - $452 = $451 & 2; - $453 = $448 | $452; - $454 = (14 - ($453))|0; - $455 = $449 << $452; - $456 = $455 >>> 15; - $457 = (($454) + ($456))|0; - $458 = $457 << 1; - $459 = (($457) + 7)|0; - $460 = $rsize$3$lcssa$i >>> $459; - $461 = $460 & 1; - $462 = $461 | $458; - $I7$0$i = $462; - } - } - $463 = ((32544 + ($I7$0$i<<2)|0) + 304|0); - $$sum2$i = (($246) + 28)|0; - $464 = (($v$3$lcssa$i) + ($$sum2$i)|0); - HEAP32[$464>>2] = $I7$0$i; - $$sum3$i27 = (($246) + 16)|0; - $465 = (($v$3$lcssa$i) + ($$sum3$i27)|0); - $$sum4$i28 = (($246) + 20)|0; - $466 = (($v$3$lcssa$i) + ($$sum4$i28)|0); - HEAP32[$466>>2] = 0; - HEAP32[$465>>2] = 0; - $467 = HEAP32[((32544 + 4|0))>>2]|0; - $468 = 1 << $I7$0$i; - $469 = $467 & $468; - $470 = ($469|0)==(0); - if ($470) { - $471 = $467 | $468; - HEAP32[((32544 + 4|0))>>2] = $471; - HEAP32[$463>>2] = $348; - $$sum5$i = (($246) + 24)|0; - $472 = (($v$3$lcssa$i) + ($$sum5$i)|0); - HEAP32[$472>>2] = $463; - $$sum6$i = (($246) + 12)|0; - $473 = (($v$3$lcssa$i) + ($$sum6$i)|0); - HEAP32[$473>>2] = $348; - $$sum7$i = (($246) + 8)|0; - $474 = (($v$3$lcssa$i) + ($$sum7$i)|0); - HEAP32[$474>>2] = $348; - break; - } - $475 = HEAP32[$463>>2]|0; - $476 = ($I7$0$i|0)==(31); - if ($476) { - $484 = 0; - } else { - $477 = $I7$0$i >>> 1; - $478 = (25 - ($477))|0; - $484 = $478; - } - $479 = (($475) + 4|0); - $480 = HEAP32[$479>>2]|0; - $481 = $480 & -8; - $482 = ($481|0)==($rsize$3$lcssa$i|0); - L225: do { - if ($482) { - $T$0$lcssa$i = $475; - } else { - $483 = $rsize$3$lcssa$i << $484; - $K12$027$i = $483;$T$026$i = $475; - while(1) { - $491 = $K12$027$i >>> 31; - $492 = ((($T$026$i) + ($491<<2)|0) + 16|0); - $487 = HEAP32[$492>>2]|0; - $493 = ($487|0)==(0|0); - if ($493) { - break; - } - $485 = $K12$027$i << 1; - $486 = (($487) + 4|0); - $488 = HEAP32[$486>>2]|0; - $489 = $488 & -8; - $490 = ($489|0)==($rsize$3$lcssa$i|0); - if ($490) { - $T$0$lcssa$i = $487; - break L225; - } else { - $K12$027$i = $485;$T$026$i = $487; - } - } - $494 = HEAP32[((32544 + 16|0))>>2]|0; - $495 = ($492>>>0)<($494>>>0); - if ($495) { - _abort(); - // unreachable; - } else { - HEAP32[$492>>2] = $348; - $$sum11$i = (($246) + 24)|0; - $496 = (($v$3$lcssa$i) + ($$sum11$i)|0); - HEAP32[$496>>2] = $T$026$i; - $$sum12$i = (($246) + 12)|0; - $497 = (($v$3$lcssa$i) + ($$sum12$i)|0); - HEAP32[$497>>2] = $348; - $$sum13$i = (($246) + 8)|0; - $498 = (($v$3$lcssa$i) + ($$sum13$i)|0); - HEAP32[$498>>2] = $348; - break L204; - } - } - } while(0); - $499 = (($T$0$lcssa$i) + 8|0); - $500 = HEAP32[$499>>2]|0; - $501 = HEAP32[((32544 + 16|0))>>2]|0; - $502 = ($T$0$lcssa$i>>>0)>=($501>>>0); - $503 = ($500>>>0)>=($501>>>0); - $or$cond24$i = $502 & $503; - if ($or$cond24$i) { - $504 = (($500) + 12|0); - HEAP32[$504>>2] = $348; - HEAP32[$499>>2] = $348; - $$sum8$i = (($246) + 8)|0; - $505 = (($v$3$lcssa$i) + ($$sum8$i)|0); - HEAP32[$505>>2] = $500; - $$sum9$i = (($246) + 12)|0; - $506 = (($v$3$lcssa$i) + ($$sum9$i)|0); - HEAP32[$506>>2] = $T$0$lcssa$i; - $$sum10$i = (($246) + 24)|0; - $507 = (($v$3$lcssa$i) + ($$sum10$i)|0); - HEAP32[$507>>2] = 0; - break; - } else { + $195 = ((($154)) + 20|0); + HEAP32[$195>>2] = $R$1$i; + } + $196 = ($R$1$i|0)==(0|0); + if ($196) { + break; + } + } + $197 = HEAP32[(32692)>>2]|0; + $198 = ($R$1$i>>>0)<($197>>>0); + if ($198) { + _abort(); + // unreachable; + } + $199 = ((($R$1$i)) + 24|0); + HEAP32[$199>>2] = $154; + $200 = ((($v$0$i$lcssa)) + 16|0); + $201 = HEAP32[$200>>2]|0; + $202 = ($201|0)==(0|0); + do { + if (!($202)) { + $203 = ($201>>>0)<($197>>>0); + if ($203) { _abort(); // unreachable; + } else { + $204 = ((($R$1$i)) + 16|0); + HEAP32[$204>>2] = $201; + $205 = ((($201)) + 24|0); + HEAP32[$205>>2] = $R$1$i; + break; } } } while(0); - $508 = (($v$3$lcssa$i) + 8|0); - $mem$0 = $508; - STACKTOP = sp;return ($mem$0|0); - } else { - $nb$0 = $246; + $206 = ((($v$0$i$lcssa)) + 20|0); + $207 = HEAP32[$206>>2]|0; + $208 = ($207|0)==(0|0); + if (!($208)) { + $209 = HEAP32[(32692)>>2]|0; + $210 = ($207>>>0)<($209>>>0); + if ($210) { + _abort(); + // unreachable; + } else { + $211 = ((($R$1$i)) + 20|0); + HEAP32[$211>>2] = $207; + $212 = ((($207)) + 24|0); + HEAP32[$212>>2] = $R$1$i; + break; + } + } + } + } while(0); + $213 = ($rsize$0$i$lcssa>>>0)<(16); + if ($213) { + $214 = (($rsize$0$i$lcssa) + ($4))|0; + $215 = $214 | 3; + $216 = ((($v$0$i$lcssa)) + 4|0); + HEAP32[$216>>2] = $215; + $$sum4$i = (($214) + 4)|0; + $217 = (($v$0$i$lcssa) + ($$sum4$i)|0); + $218 = HEAP32[$217>>2]|0; + $219 = $218 | 1; + HEAP32[$217>>2] = $219; + } else { + $220 = $4 | 3; + $221 = ((($v$0$i$lcssa)) + 4|0); + HEAP32[$221>>2] = $220; + $222 = $rsize$0$i$lcssa | 1; + $$sum$i35 = $4 | 4; + $223 = (($v$0$i$lcssa) + ($$sum$i35)|0); + HEAP32[$223>>2] = $222; + $$sum1$i = (($rsize$0$i$lcssa) + ($4))|0; + $224 = (($v$0$i$lcssa) + ($$sum1$i)|0); + HEAP32[$224>>2] = $rsize$0$i$lcssa; + $225 = HEAP32[(32684)>>2]|0; + $226 = ($225|0)==(0); + if (!($226)) { + $227 = HEAP32[(32696)>>2]|0; + $228 = $225 >>> 3; + $229 = $228 << 1; + $230 = (32716 + ($229<<2)|0); + $231 = HEAP32[32676>>2]|0; + $232 = 1 << $228; + $233 = $231 & $232; + $234 = ($233|0)==(0); + if ($234) { + $235 = $231 | $232; + HEAP32[32676>>2] = $235; + $$pre$i = (($229) + 2)|0; + $$pre8$i = (32716 + ($$pre$i<<2)|0); + $$pre$phi$iZ2D = $$pre8$i;$F1$0$i = $230; + } else { + $$sum3$i = (($229) + 2)|0; + $236 = (32716 + ($$sum3$i<<2)|0); + $237 = HEAP32[$236>>2]|0; + $238 = HEAP32[(32692)>>2]|0; + $239 = ($237>>>0)<($238>>>0); + if ($239) { + _abort(); + // unreachable; + } else { + $$pre$phi$iZ2D = $236;$F1$0$i = $237; + } + } + HEAP32[$$pre$phi$iZ2D>>2] = $227; + $240 = ((($F1$0$i)) + 12|0); + HEAP32[$240>>2] = $227; + $241 = ((($227)) + 8|0); + HEAP32[$241>>2] = $F1$0$i; + $242 = ((($227)) + 12|0); + HEAP32[$242>>2] = $230; } + HEAP32[(32684)>>2] = $rsize$0$i$lcssa; + HEAP32[(32696)>>2] = $151; } + $243 = ((($v$0$i$lcssa)) + 8|0); + $mem$0 = $243; + return ($mem$0|0); } + } else { + $nb$0 = $4; } - } - } while(0); - $509 = HEAP32[((32544 + 8|0))>>2]|0; - $510 = ($509>>>0)<($nb$0>>>0); - if (!($510)) { - $511 = (($509) - ($nb$0))|0; - $512 = HEAP32[((32544 + 20|0))>>2]|0; - $513 = ($511>>>0)>(15); - if ($513) { - $514 = (($512) + ($nb$0)|0); - HEAP32[((32544 + 20|0))>>2] = $514; - HEAP32[((32544 + 8|0))>>2] = $511; - $515 = $511 | 1; - $$sum2 = (($nb$0) + 4)|0; - $516 = (($512) + ($$sum2)|0); - HEAP32[$516>>2] = $515; - $517 = (($512) + ($509)|0); - HEAP32[$517>>2] = $511; - $518 = $nb$0 | 3; - $519 = (($512) + 4|0); - HEAP32[$519>>2] = $518; } else { - HEAP32[((32544 + 8|0))>>2] = 0; - HEAP32[((32544 + 20|0))>>2] = 0; - $520 = $509 | 3; - $521 = (($512) + 4|0); - HEAP32[$521>>2] = $520; - $$sum1 = (($509) + 4)|0; - $522 = (($512) + ($$sum1)|0); - $523 = HEAP32[$522>>2]|0; - $524 = $523 | 1; - HEAP32[$522>>2] = $524; - } - $525 = (($512) + 8|0); - $mem$0 = $525; - STACKTOP = sp;return ($mem$0|0); - } - $526 = HEAP32[((32544 + 12|0))>>2]|0; - $527 = ($526>>>0)>($nb$0>>>0); - if ($527) { - $528 = (($526) - ($nb$0))|0; - HEAP32[((32544 + 12|0))>>2] = $528; - $529 = HEAP32[((32544 + 24|0))>>2]|0; - $530 = (($529) + ($nb$0)|0); - HEAP32[((32544 + 24|0))>>2] = $530; - $531 = $528 | 1; - $$sum = (($nb$0) + 4)|0; - $532 = (($529) + ($$sum)|0); - HEAP32[$532>>2] = $531; - $533 = $nb$0 | 3; - $534 = (($529) + 4|0); - HEAP32[$534>>2] = $533; - $535 = (($529) + 8|0); - $mem$0 = $535; - STACKTOP = sp;return ($mem$0|0); - } - $536 = HEAP32[33016>>2]|0; - $537 = ($536|0)==(0); - do { - if ($537) { - $538 = (_sysconf(30)|0); - $539 = (($538) + -1)|0; - $540 = $539 & $538; - $541 = ($540|0)==(0); - if ($541) { - HEAP32[((33016 + 8|0))>>2] = $538; - HEAP32[((33016 + 4|0))>>2] = $538; - HEAP32[((33016 + 12|0))>>2] = -1; - HEAP32[((33016 + 16|0))>>2] = -1; - HEAP32[((33016 + 20|0))>>2] = 0; - HEAP32[((32544 + 444|0))>>2] = 0; - $542 = (_time((0|0))|0); - $543 = $542 & -16; - $544 = $543 ^ 1431655768; - HEAP32[33016>>2] = $544; - break; + $244 = ($bytes>>>0)>(4294967231); + if ($244) { + $nb$0 = -1; } else { - _abort(); - // unreachable; - } - } - } while(0); - $545 = (($nb$0) + 48)|0; - $546 = HEAP32[((33016 + 8|0))>>2]|0; - $547 = (($nb$0) + 47)|0; - $548 = (($546) + ($547))|0; - $549 = (0 - ($546))|0; - $550 = $548 & $549; - $551 = ($550>>>0)>($nb$0>>>0); - if (!($551)) { - $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); - } - $552 = HEAP32[((32544 + 440|0))>>2]|0; - $553 = ($552|0)==(0); - if (!($553)) { - $554 = HEAP32[((32544 + 432|0))>>2]|0; - $555 = (($554) + ($550))|0; - $556 = ($555>>>0)<=($554>>>0); - $557 = ($555>>>0)>($552>>>0); - $or$cond1$i = $556 | $557; - if ($or$cond1$i) { - $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); - } - } - $558 = HEAP32[((32544 + 444|0))>>2]|0; - $559 = $558 & 4; - $560 = ($559|0)==(0); - L266: do { - if ($560) { - $561 = HEAP32[((32544 + 24|0))>>2]|0; - $562 = ($561|0)==(0|0); - L268: do { - if ($562) { - label = 181; + $245 = (($bytes) + 11)|0; + $246 = $245 & -8; + $247 = HEAP32[(32680)>>2]|0; + $248 = ($247|0)==(0); + if ($248) { + $nb$0 = $246; } else { - $sp$0$i$i = ((32544 + 448|0)); - while(1) { - $563 = HEAP32[$sp$0$i$i>>2]|0; - $564 = ($563>>>0)>($561>>>0); - if (!($564)) { - $565 = (($sp$0$i$i) + 4|0); - $566 = HEAP32[$565>>2]|0; - $567 = (($563) + ($566)|0); - $568 = ($567>>>0)>($561>>>0); - if ($568) { - break; - } - } - $569 = (($sp$0$i$i) + 8|0); - $570 = HEAP32[$569>>2]|0; - $571 = ($570|0)==(0|0); - if ($571) { - label = 181; - break L268; - } else { - $sp$0$i$i = $570; - } - } - $572 = ($sp$0$i$i|0)==(0|0); - if ($572) { - label = 181; + $249 = (0 - ($246))|0; + $250 = $245 >>> 8; + $251 = ($250|0)==(0); + if ($251) { + $idx$0$i = 0; } else { - $595 = HEAP32[((32544 + 12|0))>>2]|0; - $596 = (($548) - ($595))|0; - $597 = $596 & $549; - $598 = ($597>>>0)<(2147483647); - if ($598) { - $599 = (_sbrk(($597|0))|0); - $600 = HEAP32[$sp$0$i$i>>2]|0; - $601 = HEAP32[$565>>2]|0; - $602 = (($600) + ($601)|0); - $603 = ($599|0)==($602|0); - if ($603) { - $br$0$i = $599;$ssize$1$i = $597; - label = 190; - } else { - $br$030$i = $599;$ssize$129$i = $597; - label = 191; - } + $252 = ($246>>>0)>(16777215); + if ($252) { + $idx$0$i = 31; } else { - $tsize$03141$i = 0; + $253 = (($250) + 1048320)|0; + $254 = $253 >>> 16; + $255 = $254 & 8; + $256 = $250 << $255; + $257 = (($256) + 520192)|0; + $258 = $257 >>> 16; + $259 = $258 & 4; + $260 = $259 | $255; + $261 = $256 << $259; + $262 = (($261) + 245760)|0; + $263 = $262 >>> 16; + $264 = $263 & 2; + $265 = $260 | $264; + $266 = (14 - ($265))|0; + $267 = $261 << $264; + $268 = $267 >>> 15; + $269 = (($266) + ($268))|0; + $270 = $269 << 1; + $271 = (($269) + 7)|0; + $272 = $246 >>> $271; + $273 = $272 & 1; + $274 = $273 | $270; + $idx$0$i = $274; } } - } - } while(0); - do { - if ((label|0) == 181) { - $573 = (_sbrk(0)|0); - $574 = ($573|0)==((-1)|0); - if ($574) { - $tsize$03141$i = 0; - } else { - $575 = $573; - $576 = HEAP32[((33016 + 4|0))>>2]|0; - $577 = (($576) + -1)|0; - $578 = $577 & $575; - $579 = ($578|0)==(0); - if ($579) { - $ssize$0$i = $550; + $275 = (32980 + ($idx$0$i<<2)|0); + $276 = HEAP32[$275>>2]|0; + $277 = ($276|0)==(0|0); + L123: do { + if ($277) { + $rsize$2$i = $249;$t$1$i = 0;$v$2$i = 0; + label = 86; } else { - $580 = (($577) + ($575))|0; - $581 = (0 - ($576))|0; - $582 = $580 & $581; - $583 = (($550) - ($575))|0; - $584 = (($583) + ($582))|0; - $ssize$0$i = $584; - } - $585 = HEAP32[((32544 + 432|0))>>2]|0; - $586 = (($585) + ($ssize$0$i))|0; - $587 = ($ssize$0$i>>>0)>($nb$0>>>0); - $588 = ($ssize$0$i>>>0)<(2147483647); - $or$cond$i29 = $587 & $588; - if ($or$cond$i29) { - $589 = HEAP32[((32544 + 440|0))>>2]|0; - $590 = ($589|0)==(0); - if (!($590)) { - $591 = ($586>>>0)<=($585>>>0); - $592 = ($586>>>0)>($589>>>0); - $or$cond2$i = $591 | $592; - if ($or$cond2$i) { - $tsize$03141$i = 0; + $278 = ($idx$0$i|0)==(31); + $279 = $idx$0$i >>> 1; + $280 = (25 - ($279))|0; + $281 = $278 ? 0 : $280; + $282 = $246 << $281; + $rsize$0$i15 = $249;$rst$0$i = 0;$sizebits$0$i = $282;$t$0$i14 = $276;$v$0$i16 = 0; + while(1) { + $283 = ((($t$0$i14)) + 4|0); + $284 = HEAP32[$283>>2]|0; + $285 = $284 & -8; + $286 = (($285) - ($246))|0; + $287 = ($286>>>0)<($rsize$0$i15>>>0); + if ($287) { + $288 = ($285|0)==($246|0); + if ($288) { + $rsize$331$i = $286;$t$230$i = $t$0$i14;$v$332$i = $t$0$i14; + label = 90; + break L123; + } else { + $rsize$1$i = $286;$v$1$i = $t$0$i14; + } + } else { + $rsize$1$i = $rsize$0$i15;$v$1$i = $v$0$i16; + } + $289 = ((($t$0$i14)) + 20|0); + $290 = HEAP32[$289>>2]|0; + $291 = $sizebits$0$i >>> 31; + $292 = (((($t$0$i14)) + 16|0) + ($291<<2)|0); + $293 = HEAP32[$292>>2]|0; + $294 = ($290|0)==(0|0); + $295 = ($290|0)==($293|0); + $or$cond19$i = $294 | $295; + $rst$1$i = $or$cond19$i ? $rst$0$i : $290; + $296 = ($293|0)==(0|0); + $297 = $sizebits$0$i << 1; + if ($296) { + $rsize$2$i = $rsize$1$i;$t$1$i = $rst$1$i;$v$2$i = $v$1$i; + label = 86; break; + } else { + $rsize$0$i15 = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $297;$t$0$i14 = $293;$v$0$i16 = $v$1$i; } } - $593 = (_sbrk(($ssize$0$i|0))|0); - $594 = ($593|0)==($573|0); - if ($594) { - $br$0$i = $573;$ssize$1$i = $ssize$0$i; - label = 190; - } else { - $br$030$i = $593;$ssize$129$i = $ssize$0$i; - label = 191; - } - } else { - $tsize$03141$i = 0; } - } - } - } while(0); - L288: do { - if ((label|0) == 190) { - $604 = ($br$0$i|0)==((-1)|0); - if ($604) { - $tsize$03141$i = $ssize$1$i; - } else { - $tbase$245$i = $br$0$i;$tsize$244$i = $ssize$1$i; - label = 201; - break L266; - } - } - else if ((label|0) == 191) { - $605 = (0 - ($ssize$129$i))|0; - $606 = ($br$030$i|0)!=((-1)|0); - $607 = ($ssize$129$i>>>0)<(2147483647); - $or$cond5$i = $606 & $607; - $608 = ($545>>>0)>($ssize$129$i>>>0); - $or$cond4$i = $or$cond5$i & $608; - do { - if ($or$cond4$i) { - $609 = HEAP32[((33016 + 8|0))>>2]|0; - $610 = (($547) - ($ssize$129$i))|0; - $611 = (($610) + ($609))|0; - $612 = (0 - ($609))|0; - $613 = $611 & $612; - $614 = ($613>>>0)<(2147483647); - if ($614) { - $615 = (_sbrk(($613|0))|0); - $616 = ($615|0)==((-1)|0); - if ($616) { - (_sbrk(($605|0))|0); - $tsize$03141$i = 0; - break L288; - } else { - $617 = (($613) + ($ssize$129$i))|0; - $ssize$2$i = $617; - break; - } - } else { - $ssize$2$i = $ssize$129$i; + } while(0); + if ((label|0) == 86) { + $298 = ($t$1$i|0)==(0|0); + $299 = ($v$2$i|0)==(0|0); + $or$cond$i = $298 & $299; + if ($or$cond$i) { + $300 = 2 << $idx$0$i; + $301 = (0 - ($300))|0; + $302 = $300 | $301; + $303 = $247 & $302; + $304 = ($303|0)==(0); + if ($304) { + $nb$0 = $246; + break; } + $305 = (0 - ($303))|0; + $306 = $303 & $305; + $307 = (($306) + -1)|0; + $308 = $307 >>> 12; + $309 = $308 & 16; + $310 = $307 >>> $309; + $311 = $310 >>> 5; + $312 = $311 & 8; + $313 = $312 | $309; + $314 = $310 >>> $312; + $315 = $314 >>> 2; + $316 = $315 & 4; + $317 = $313 | $316; + $318 = $314 >>> $316; + $319 = $318 >>> 1; + $320 = $319 & 2; + $321 = $317 | $320; + $322 = $318 >>> $320; + $323 = $322 >>> 1; + $324 = $323 & 1; + $325 = $321 | $324; + $326 = $322 >>> $324; + $327 = (($325) + ($326))|0; + $328 = (32980 + ($327<<2)|0); + $329 = HEAP32[$328>>2]|0; + $t$2$ph$i = $329;$v$3$ph$i = 0; } else { - $ssize$2$i = $ssize$129$i; + $t$2$ph$i = $t$1$i;$v$3$ph$i = $v$2$i; + } + $330 = ($t$2$ph$i|0)==(0|0); + if ($330) { + $rsize$3$lcssa$i = $rsize$2$i;$v$3$lcssa$i = $v$3$ph$i; + } else { + $rsize$331$i = $rsize$2$i;$t$230$i = $t$2$ph$i;$v$332$i = $v$3$ph$i; + label = 90; } - } while(0); - $618 = ($br$030$i|0)==((-1)|0); - if ($618) { - $tsize$03141$i = 0; - } else { - $tbase$245$i = $br$030$i;$tsize$244$i = $ssize$2$i; - label = 201; - break L266; - } - } - } while(0); - $619 = HEAP32[((32544 + 444|0))>>2]|0; - $620 = $619 | 4; - HEAP32[((32544 + 444|0))>>2] = $620; - $tsize$1$i = $tsize$03141$i; - label = 198; - } else { - $tsize$1$i = 0; - label = 198; - } - } while(0); - if ((label|0) == 198) { - $621 = ($550>>>0)<(2147483647); - if ($621) { - $622 = (_sbrk(($550|0))|0); - $623 = (_sbrk(0)|0); - $624 = ($622|0)!=((-1)|0); - $625 = ($623|0)!=((-1)|0); - $or$cond3$i = $624 & $625; - $626 = ($622>>>0)<($623>>>0); - $or$cond6$i = $or$cond3$i & $626; - if ($or$cond6$i) { - $627 = $623; - $628 = $622; - $629 = (($627) - ($628))|0; - $630 = (($nb$0) + 40)|0; - $631 = ($629>>>0)>($630>>>0); - $$tsize$1$i = $631 ? $629 : $tsize$1$i; - if ($631) { - $tbase$245$i = $622;$tsize$244$i = $$tsize$1$i; - label = 201; - } - } - } - } - if ((label|0) == 201) { - $632 = HEAP32[((32544 + 432|0))>>2]|0; - $633 = (($632) + ($tsize$244$i))|0; - HEAP32[((32544 + 432|0))>>2] = $633; - $634 = HEAP32[((32544 + 436|0))>>2]|0; - $635 = ($633>>>0)>($634>>>0); - if ($635) { - HEAP32[((32544 + 436|0))>>2] = $633; - } - $636 = HEAP32[((32544 + 24|0))>>2]|0; - $637 = ($636|0)==(0|0); - L308: do { - if ($637) { - $638 = HEAP32[((32544 + 16|0))>>2]|0; - $639 = ($638|0)==(0|0); - $640 = ($tbase$245$i>>>0)<($638>>>0); - $or$cond8$i = $639 | $640; - if ($or$cond8$i) { - HEAP32[((32544 + 16|0))>>2] = $tbase$245$i; - } - HEAP32[((32544 + 448|0))>>2] = $tbase$245$i; - HEAP32[((32544 + 452|0))>>2] = $tsize$244$i; - HEAP32[((32544 + 460|0))>>2] = 0; - $641 = HEAP32[33016>>2]|0; - HEAP32[((32544 + 36|0))>>2] = $641; - HEAP32[((32544 + 32|0))>>2] = -1; - $i$02$i$i = 0; - while(1) { - $642 = $i$02$i$i << 1; - $643 = ((32544 + ($642<<2)|0) + 40|0); - $$sum$i$i = (($642) + 3)|0; - $644 = ((32544 + ($$sum$i$i<<2)|0) + 40|0); - HEAP32[$644>>2] = $643; - $$sum1$i$i = (($642) + 2)|0; - $645 = ((32544 + ($$sum1$i$i<<2)|0) + 40|0); - HEAP32[$645>>2] = $643; - $646 = (($i$02$i$i) + 1)|0; - $exitcond$i$i = ($646|0)==(32); - if ($exitcond$i$i) { - break; - } else { - $i$02$i$i = $646; - } - } - $647 = (($tsize$244$i) + -40)|0; - $648 = (($tbase$245$i) + 8|0); - $649 = $648; - $650 = $649 & 7; - $651 = ($650|0)==(0); - if ($651) { - $655 = 0; - } else { - $652 = (0 - ($649))|0; - $653 = $652 & 7; - $655 = $653; - } - $654 = (($tbase$245$i) + ($655)|0); - $656 = (($647) - ($655))|0; - HEAP32[((32544 + 24|0))>>2] = $654; - HEAP32[((32544 + 12|0))>>2] = $656; - $657 = $656 | 1; - $$sum$i12$i = (($655) + 4)|0; - $658 = (($tbase$245$i) + ($$sum$i12$i)|0); - HEAP32[$658>>2] = $657; - $$sum2$i$i = (($tsize$244$i) + -36)|0; - $659 = (($tbase$245$i) + ($$sum2$i$i)|0); - HEAP32[$659>>2] = 40; - $660 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $660; - } else { - $sp$073$i = ((32544 + 448|0)); - while(1) { - $661 = HEAP32[$sp$073$i>>2]|0; - $662 = (($sp$073$i) + 4|0); - $663 = HEAP32[$662>>2]|0; - $664 = (($661) + ($663)|0); - $665 = ($tbase$245$i|0)==($664|0); - if ($665) { - label = 213; - break; - } - $666 = (($sp$073$i) + 8|0); - $667 = HEAP32[$666>>2]|0; - $668 = ($667|0)==(0|0); - if ($668) { - break; - } else { - $sp$073$i = $667; } - } - if ((label|0) == 213) { - $669 = (($sp$073$i) + 12|0); - $670 = HEAP32[$669>>2]|0; - $671 = $670 & 8; - $672 = ($671|0)==(0); - if ($672) { - $673 = ($636>>>0)>=($661>>>0); - $674 = ($636>>>0)<($tbase$245$i>>>0); - $or$cond47$i = $673 & $674; - if ($or$cond47$i) { - $675 = (($663) + ($tsize$244$i))|0; - HEAP32[$662>>2] = $675; - $676 = HEAP32[((32544 + 12|0))>>2]|0; - $677 = (($676) + ($tsize$244$i))|0; - $678 = (($636) + 8|0); - $679 = $678; - $680 = $679 & 7; - $681 = ($680|0)==(0); - if ($681) { - $685 = 0; + if ((label|0) == 90) { + while(1) { + label = 0; + $331 = ((($t$230$i)) + 4|0); + $332 = HEAP32[$331>>2]|0; + $333 = $332 & -8; + $334 = (($333) - ($246))|0; + $335 = ($334>>>0)<($rsize$331$i>>>0); + $$rsize$3$i = $335 ? $334 : $rsize$331$i; + $t$2$v$3$i = $335 ? $t$230$i : $v$332$i; + $336 = ((($t$230$i)) + 16|0); + $337 = HEAP32[$336>>2]|0; + $338 = ($337|0)==(0|0); + if (!($338)) { + $rsize$331$i = $$rsize$3$i;$t$230$i = $337;$v$332$i = $t$2$v$3$i; + label = 90; + continue; + } + $339 = ((($t$230$i)) + 20|0); + $340 = HEAP32[$339>>2]|0; + $341 = ($340|0)==(0|0); + if ($341) { + $rsize$3$lcssa$i = $$rsize$3$i;$v$3$lcssa$i = $t$2$v$3$i; + break; } else { - $682 = (0 - ($679))|0; - $683 = $682 & 7; - $685 = $683; + $rsize$331$i = $$rsize$3$i;$t$230$i = $340;$v$332$i = $t$2$v$3$i; + label = 90; } - $684 = (($636) + ($685)|0); - $686 = (($677) - ($685))|0; - HEAP32[((32544 + 24|0))>>2] = $684; - HEAP32[((32544 + 12|0))>>2] = $686; - $687 = $686 | 1; - $$sum$i16$i = (($685) + 4)|0; - $688 = (($636) + ($$sum$i16$i)|0); - HEAP32[$688>>2] = $687; - $$sum2$i17$i = (($677) + 4)|0; - $689 = (($636) + ($$sum2$i17$i)|0); - HEAP32[$689>>2] = 40; - $690 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $690; - break; } } - } - $691 = HEAP32[((32544 + 16|0))>>2]|0; - $692 = ($tbase$245$i>>>0)<($691>>>0); - if ($692) { - HEAP32[((32544 + 16|0))>>2] = $tbase$245$i; - $756 = $tbase$245$i; - } else { - $756 = $691; - } - $693 = (($tbase$245$i) + ($tsize$244$i)|0); - $sp$166$i = ((32544 + 448|0)); - while(1) { - $694 = HEAP32[$sp$166$i>>2]|0; - $695 = ($694|0)==($693|0); - if ($695) { - label = 223; - break; - } - $696 = (($sp$166$i) + 8|0); - $697 = HEAP32[$696>>2]|0; - $698 = ($697|0)==(0|0); - if ($698) { - break; + $342 = ($v$3$lcssa$i|0)==(0|0); + if ($342) { + $nb$0 = $246; } else { - $sp$166$i = $697; - } - } - if ((label|0) == 223) { - $699 = (($sp$166$i) + 12|0); - $700 = HEAP32[$699>>2]|0; - $701 = $700 & 8; - $702 = ($701|0)==(0); - if ($702) { - HEAP32[$sp$166$i>>2] = $tbase$245$i; - $703 = (($sp$166$i) + 4|0); - $704 = HEAP32[$703>>2]|0; - $705 = (($704) + ($tsize$244$i))|0; - HEAP32[$703>>2] = $705; - $706 = (($tbase$245$i) + 8|0); - $707 = $706; - $708 = $707 & 7; - $709 = ($708|0)==(0); - if ($709) { - $713 = 0; - } else { - $710 = (0 - ($707))|0; - $711 = $710 & 7; - $713 = $711; - } - $712 = (($tbase$245$i) + ($713)|0); - $$sum102$i = (($tsize$244$i) + 8)|0; - $714 = (($tbase$245$i) + ($$sum102$i)|0); - $715 = $714; - $716 = $715 & 7; - $717 = ($716|0)==(0); - if ($717) { - $720 = 0; - } else { - $718 = (0 - ($715))|0; - $719 = $718 & 7; - $720 = $719; - } - $$sum103$i = (($720) + ($tsize$244$i))|0; - $721 = (($tbase$245$i) + ($$sum103$i)|0); - $722 = $721; - $723 = $712; - $724 = (($722) - ($723))|0; - $$sum$i19$i = (($713) + ($nb$0))|0; - $725 = (($tbase$245$i) + ($$sum$i19$i)|0); - $726 = (($724) - ($nb$0))|0; - $727 = $nb$0 | 3; - $$sum1$i20$i = (($713) + 4)|0; - $728 = (($tbase$245$i) + ($$sum1$i20$i)|0); - HEAP32[$728>>2] = $727; - $729 = ($721|0)==($636|0); - L345: do { - if ($729) { - $730 = HEAP32[((32544 + 12|0))>>2]|0; - $731 = (($730) + ($726))|0; - HEAP32[((32544 + 12|0))>>2] = $731; - HEAP32[((32544 + 24|0))>>2] = $725; - $732 = $731 | 1; - $$sum42$i$i = (($$sum$i19$i) + 4)|0; - $733 = (($tbase$245$i) + ($$sum42$i$i)|0); - HEAP32[$733>>2] = $732; - } else { - $734 = HEAP32[((32544 + 20|0))>>2]|0; - $735 = ($721|0)==($734|0); - if ($735) { - $736 = HEAP32[((32544 + 8|0))>>2]|0; - $737 = (($736) + ($726))|0; - HEAP32[((32544 + 8|0))>>2] = $737; - HEAP32[((32544 + 20|0))>>2] = $725; - $738 = $737 | 1; - $$sum40$i$i = (($$sum$i19$i) + 4)|0; - $739 = (($tbase$245$i) + ($$sum40$i$i)|0); - HEAP32[$739>>2] = $738; - $$sum41$i$i = (($737) + ($$sum$i19$i))|0; - $740 = (($tbase$245$i) + ($$sum41$i$i)|0); - HEAP32[$740>>2] = $737; - break; - } - $$sum2$i21$i = (($tsize$244$i) + 4)|0; - $$sum104$i = (($$sum2$i21$i) + ($720))|0; - $741 = (($tbase$245$i) + ($$sum104$i)|0); - $742 = HEAP32[$741>>2]|0; - $743 = $742 & 3; - $744 = ($743|0)==(1); - if ($744) { - $745 = $742 & -8; - $746 = $742 >>> 3; - $747 = ($742>>>0)<(256); - L353: do { - if ($747) { - $$sum3738$i$i = $720 | 8; - $$sum114$i = (($$sum3738$i$i) + ($tsize$244$i))|0; - $748 = (($tbase$245$i) + ($$sum114$i)|0); - $749 = HEAP32[$748>>2]|0; - $$sum39$i$i = (($tsize$244$i) + 12)|0; - $$sum115$i = (($$sum39$i$i) + ($720))|0; - $750 = (($tbase$245$i) + ($$sum115$i)|0); - $751 = HEAP32[$750>>2]|0; - $752 = $746 << 1; - $753 = ((32544 + ($752<<2)|0) + 40|0); - $754 = ($749|0)==($753|0); - do { - if (!($754)) { - $755 = ($749>>>0)<($756>>>0); - if ($755) { - _abort(); - // unreachable; - } - $757 = (($749) + 12|0); - $758 = HEAP32[$757>>2]|0; - $759 = ($758|0)==($721|0); - if ($759) { - break; - } - _abort(); - // unreachable; - } - } while(0); - $760 = ($751|0)==($749|0); - if ($760) { - $761 = 1 << $746; - $762 = $761 ^ -1; - $763 = HEAP32[32544>>2]|0; - $764 = $763 & $762; - HEAP32[32544>>2] = $764; - break; - } - $765 = ($751|0)==($753|0); - do { - if ($765) { - $$pre58$i$i = (($751) + 8|0); - $$pre$phi59$i$iZ2D = $$pre58$i$i; - } else { - $766 = ($751>>>0)<($756>>>0); - if ($766) { - _abort(); - // unreachable; - } - $767 = (($751) + 8|0); - $768 = HEAP32[$767>>2]|0; - $769 = ($768|0)==($721|0); - if ($769) { - $$pre$phi59$i$iZ2D = $767; - break; - } - _abort(); - // unreachable; - } - } while(0); - $770 = (($749) + 12|0); - HEAP32[$770>>2] = $751; - HEAP32[$$pre$phi59$i$iZ2D>>2] = $749; + $343 = HEAP32[(32684)>>2]|0; + $344 = (($343) - ($246))|0; + $345 = ($rsize$3$lcssa$i>>>0)<($344>>>0); + if ($345) { + $346 = HEAP32[(32692)>>2]|0; + $347 = ($v$3$lcssa$i>>>0)<($346>>>0); + if ($347) { + _abort(); + // unreachable; + } + $348 = (($v$3$lcssa$i) + ($246)|0); + $349 = ($v$3$lcssa$i>>>0)<($348>>>0); + if (!($349)) { + _abort(); + // unreachable; + } + $350 = ((($v$3$lcssa$i)) + 24|0); + $351 = HEAP32[$350>>2]|0; + $352 = ((($v$3$lcssa$i)) + 12|0); + $353 = HEAP32[$352>>2]|0; + $354 = ($353|0)==($v$3$lcssa$i|0); + do { + if ($354) { + $364 = ((($v$3$lcssa$i)) + 20|0); + $365 = HEAP32[$364>>2]|0; + $366 = ($365|0)==(0|0); + if ($366) { + $367 = ((($v$3$lcssa$i)) + 16|0); + $368 = HEAP32[$367>>2]|0; + $369 = ($368|0)==(0|0); + if ($369) { + $R$1$i20 = 0; + break; } else { - $$sum34$i$i = $720 | 24; - $$sum105$i = (($$sum34$i$i) + ($tsize$244$i))|0; - $771 = (($tbase$245$i) + ($$sum105$i)|0); - $772 = HEAP32[$771>>2]|0; - $$sum5$i$i = (($tsize$244$i) + 12)|0; - $$sum106$i = (($$sum5$i$i) + ($720))|0; - $773 = (($tbase$245$i) + ($$sum106$i)|0); - $774 = HEAP32[$773>>2]|0; - $775 = ($774|0)==($721|0); - do { - if ($775) { - $$sum67$i$i = $720 | 16; - $$sum112$i = (($$sum2$i21$i) + ($$sum67$i$i))|0; - $785 = (($tbase$245$i) + ($$sum112$i)|0); - $786 = HEAP32[$785>>2]|0; - $787 = ($786|0)==(0|0); - if ($787) { - $$sum113$i = (($$sum67$i$i) + ($tsize$244$i))|0; - $788 = (($tbase$245$i) + ($$sum113$i)|0); - $789 = HEAP32[$788>>2]|0; - $790 = ($789|0)==(0|0); - if ($790) { - $R$1$i$i = 0; - break; - } else { - $R$0$i$i = $789;$RP$0$i$i = $788; - } - } else { - $R$0$i$i = $786;$RP$0$i$i = $785; - } - while(1) { - $791 = (($R$0$i$i) + 20|0); - $792 = HEAP32[$791>>2]|0; - $793 = ($792|0)==(0|0); - if (!($793)) { - $R$0$i$i = $792;$RP$0$i$i = $791; - continue; - } - $794 = (($R$0$i$i) + 16|0); - $795 = HEAP32[$794>>2]|0; - $796 = ($795|0)==(0|0); - if ($796) { - break; - } else { - $R$0$i$i = $795;$RP$0$i$i = $794; - } - } - $797 = ($RP$0$i$i>>>0)<($756>>>0); - if ($797) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i$i>>2] = 0; - $R$1$i$i = $R$0$i$i; - break; - } - } else { - $$sum3536$i$i = $720 | 8; - $$sum107$i = (($$sum3536$i$i) + ($tsize$244$i))|0; - $776 = (($tbase$245$i) + ($$sum107$i)|0); - $777 = HEAP32[$776>>2]|0; - $778 = ($777>>>0)<($756>>>0); - if ($778) { - _abort(); - // unreachable; - } - $779 = (($777) + 12|0); - $780 = HEAP32[$779>>2]|0; - $781 = ($780|0)==($721|0); - if (!($781)) { - _abort(); - // unreachable; - } - $782 = (($774) + 8|0); - $783 = HEAP32[$782>>2]|0; - $784 = ($783|0)==($721|0); - if ($784) { - HEAP32[$779>>2] = $774; - HEAP32[$782>>2] = $777; - $R$1$i$i = $774; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $798 = ($772|0)==(0|0); - if ($798) { - break; - } - $$sum30$i$i = (($tsize$244$i) + 28)|0; - $$sum108$i = (($$sum30$i$i) + ($720))|0; - $799 = (($tbase$245$i) + ($$sum108$i)|0); - $800 = HEAP32[$799>>2]|0; - $801 = ((32544 + ($800<<2)|0) + 304|0); - $802 = HEAP32[$801>>2]|0; - $803 = ($721|0)==($802|0); - do { - if ($803) { - HEAP32[$801>>2] = $R$1$i$i; - $cond$i$i = ($R$1$i$i|0)==(0|0); - if (!($cond$i$i)) { - break; - } - $804 = 1 << $800; - $805 = $804 ^ -1; - $806 = HEAP32[((32544 + 4|0))>>2]|0; - $807 = $806 & $805; - HEAP32[((32544 + 4|0))>>2] = $807; - break L353; - } else { - $808 = HEAP32[((32544 + 16|0))>>2]|0; - $809 = ($772>>>0)<($808>>>0); - if ($809) { - _abort(); - // unreachable; - } - $810 = (($772) + 16|0); - $811 = HEAP32[$810>>2]|0; - $812 = ($811|0)==($721|0); - if ($812) { - HEAP32[$810>>2] = $R$1$i$i; - } else { - $813 = (($772) + 20|0); - HEAP32[$813>>2] = $R$1$i$i; - } - $814 = ($R$1$i$i|0)==(0|0); - if ($814) { - break L353; - } - } - } while(0); - $815 = HEAP32[((32544 + 16|0))>>2]|0; - $816 = ($R$1$i$i>>>0)<($815>>>0); - if ($816) { - _abort(); - // unreachable; - } - $817 = (($R$1$i$i) + 24|0); - HEAP32[$817>>2] = $772; - $$sum3132$i$i = $720 | 16; - $$sum109$i = (($$sum3132$i$i) + ($tsize$244$i))|0; - $818 = (($tbase$245$i) + ($$sum109$i)|0); - $819 = HEAP32[$818>>2]|0; - $820 = ($819|0)==(0|0); - do { - if (!($820)) { - $821 = ($819>>>0)<($815>>>0); - if ($821) { - _abort(); - // unreachable; - } else { - $822 = (($R$1$i$i) + 16|0); - HEAP32[$822>>2] = $819; - $823 = (($819) + 24|0); - HEAP32[$823>>2] = $R$1$i$i; - break; - } - } - } while(0); - $$sum110$i = (($$sum2$i21$i) + ($$sum3132$i$i))|0; - $824 = (($tbase$245$i) + ($$sum110$i)|0); - $825 = HEAP32[$824>>2]|0; - $826 = ($825|0)==(0|0); - if ($826) { - break; - } - $827 = HEAP32[((32544 + 16|0))>>2]|0; - $828 = ($825>>>0)<($827>>>0); - if ($828) { + $R$0$i18 = $368;$RP$0$i17 = $367; + } + } else { + $R$0$i18 = $365;$RP$0$i17 = $364; + } + while(1) { + $370 = ((($R$0$i18)) + 20|0); + $371 = HEAP32[$370>>2]|0; + $372 = ($371|0)==(0|0); + if (!($372)) { + $R$0$i18 = $371;$RP$0$i17 = $370; + continue; + } + $373 = ((($R$0$i18)) + 16|0); + $374 = HEAP32[$373>>2]|0; + $375 = ($374|0)==(0|0); + if ($375) { + $R$0$i18$lcssa = $R$0$i18;$RP$0$i17$lcssa = $RP$0$i17; + break; + } else { + $R$0$i18 = $374;$RP$0$i17 = $373; + } + } + $376 = ($RP$0$i17$lcssa>>>0)<($346>>>0); + if ($376) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$0$i17$lcssa>>2] = 0; + $R$1$i20 = $R$0$i18$lcssa; + break; + } + } else { + $355 = ((($v$3$lcssa$i)) + 8|0); + $356 = HEAP32[$355>>2]|0; + $357 = ($356>>>0)<($346>>>0); + if ($357) { + _abort(); + // unreachable; + } + $358 = ((($356)) + 12|0); + $359 = HEAP32[$358>>2]|0; + $360 = ($359|0)==($v$3$lcssa$i|0); + if (!($360)) { + _abort(); + // unreachable; + } + $361 = ((($353)) + 8|0); + $362 = HEAP32[$361>>2]|0; + $363 = ($362|0)==($v$3$lcssa$i|0); + if ($363) { + HEAP32[$358>>2] = $353; + HEAP32[$361>>2] = $356; + $R$1$i20 = $353; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $377 = ($351|0)==(0|0); + do { + if (!($377)) { + $378 = ((($v$3$lcssa$i)) + 28|0); + $379 = HEAP32[$378>>2]|0; + $380 = (32980 + ($379<<2)|0); + $381 = HEAP32[$380>>2]|0; + $382 = ($v$3$lcssa$i|0)==($381|0); + if ($382) { + HEAP32[$380>>2] = $R$1$i20; + $cond$i21 = ($R$1$i20|0)==(0|0); + if ($cond$i21) { + $383 = 1 << $379; + $384 = $383 ^ -1; + $385 = HEAP32[(32680)>>2]|0; + $386 = $385 & $384; + HEAP32[(32680)>>2] = $386; + break; + } + } else { + $387 = HEAP32[(32692)>>2]|0; + $388 = ($351>>>0)<($387>>>0); + if ($388) { + _abort(); + // unreachable; + } + $389 = ((($351)) + 16|0); + $390 = HEAP32[$389>>2]|0; + $391 = ($390|0)==($v$3$lcssa$i|0); + if ($391) { + HEAP32[$389>>2] = $R$1$i20; + } else { + $392 = ((($351)) + 20|0); + HEAP32[$392>>2] = $R$1$i20; + } + $393 = ($R$1$i20|0)==(0|0); + if ($393) { + break; + } + } + $394 = HEAP32[(32692)>>2]|0; + $395 = ($R$1$i20>>>0)<($394>>>0); + if ($395) { + _abort(); + // unreachable; + } + $396 = ((($R$1$i20)) + 24|0); + HEAP32[$396>>2] = $351; + $397 = ((($v$3$lcssa$i)) + 16|0); + $398 = HEAP32[$397>>2]|0; + $399 = ($398|0)==(0|0); + do { + if (!($399)) { + $400 = ($398>>>0)<($394>>>0); + if ($400) { _abort(); // unreachable; } else { - $829 = (($R$1$i$i) + 20|0); - HEAP32[$829>>2] = $825; - $830 = (($825) + 24|0); - HEAP32[$830>>2] = $R$1$i$i; + $401 = ((($R$1$i20)) + 16|0); + HEAP32[$401>>2] = $398; + $402 = ((($398)) + 24|0); + HEAP32[$402>>2] = $R$1$i20; break; } } } while(0); - $$sum9$i$i = $745 | $720; - $$sum111$i = (($$sum9$i$i) + ($tsize$244$i))|0; - $831 = (($tbase$245$i) + ($$sum111$i)|0); - $832 = (($745) + ($726))|0; - $oldfirst$0$i$i = $831;$qsize$0$i$i = $832; - } else { - $oldfirst$0$i$i = $721;$qsize$0$i$i = $726; - } - $833 = (($oldfirst$0$i$i) + 4|0); - $834 = HEAP32[$833>>2]|0; - $835 = $834 & -2; - HEAP32[$833>>2] = $835; - $836 = $qsize$0$i$i | 1; - $$sum10$i$i = (($$sum$i19$i) + 4)|0; - $837 = (($tbase$245$i) + ($$sum10$i$i)|0); - HEAP32[$837>>2] = $836; - $$sum11$i22$i = (($qsize$0$i$i) + ($$sum$i19$i))|0; - $838 = (($tbase$245$i) + ($$sum11$i22$i)|0); - HEAP32[$838>>2] = $qsize$0$i$i; - $839 = $qsize$0$i$i >>> 3; - $840 = ($qsize$0$i$i>>>0)<(256); - if ($840) { - $841 = $839 << 1; - $842 = ((32544 + ($841<<2)|0) + 40|0); - $843 = HEAP32[32544>>2]|0; - $844 = 1 << $839; - $845 = $843 & $844; - $846 = ($845|0)==(0); - do { - if ($846) { - $847 = $843 | $844; - HEAP32[32544>>2] = $847; - $$sum26$pre$i$i = (($841) + 2)|0; - $$pre$i23$i = ((32544 + ($$sum26$pre$i$i<<2)|0) + 40|0); - $$pre$phi$i24$iZ2D = $$pre$i23$i;$F4$0$i$i = $842; - } else { - $$sum29$i$i = (($841) + 2)|0; - $848 = ((32544 + ($$sum29$i$i<<2)|0) + 40|0); - $849 = HEAP32[$848>>2]|0; - $850 = HEAP32[((32544 + 16|0))>>2]|0; - $851 = ($849>>>0)<($850>>>0); - if (!($851)) { - $$pre$phi$i24$iZ2D = $848;$F4$0$i$i = $849; - break; - } + $403 = ((($v$3$lcssa$i)) + 20|0); + $404 = HEAP32[$403>>2]|0; + $405 = ($404|0)==(0|0); + if (!($405)) { + $406 = HEAP32[(32692)>>2]|0; + $407 = ($404>>>0)<($406>>>0); + if ($407) { _abort(); // unreachable; - } - } while(0); - HEAP32[$$pre$phi$i24$iZ2D>>2] = $725; - $852 = (($F4$0$i$i) + 12|0); - HEAP32[$852>>2] = $725; - $$sum27$i$i = (($$sum$i19$i) + 8)|0; - $853 = (($tbase$245$i) + ($$sum27$i$i)|0); - HEAP32[$853>>2] = $F4$0$i$i; - $$sum28$i$i = (($$sum$i19$i) + 12)|0; - $854 = (($tbase$245$i) + ($$sum28$i$i)|0); - HEAP32[$854>>2] = $842; - break; - } - $855 = $qsize$0$i$i >>> 8; - $856 = ($855|0)==(0); - do { - if ($856) { - $I7$0$i$i = 0; - } else { - $857 = ($qsize$0$i$i>>>0)>(16777215); - if ($857) { - $I7$0$i$i = 31; + } else { + $408 = ((($R$1$i20)) + 20|0); + HEAP32[$408>>2] = $404; + $409 = ((($404)) + 24|0); + HEAP32[$409>>2] = $R$1$i20; break; } - $858 = (($855) + 1048320)|0; - $859 = $858 >>> 16; - $860 = $859 & 8; - $861 = $855 << $860; - $862 = (($861) + 520192)|0; - $863 = $862 >>> 16; - $864 = $863 & 4; - $865 = $864 | $860; - $866 = $861 << $864; - $867 = (($866) + 245760)|0; - $868 = $867 >>> 16; - $869 = $868 & 2; - $870 = $865 | $869; - $871 = (14 - ($870))|0; - $872 = $866 << $869; - $873 = $872 >>> 15; - $874 = (($871) + ($873))|0; - $875 = $874 << 1; - $876 = (($874) + 7)|0; - $877 = $qsize$0$i$i >>> $876; - $878 = $877 & 1; - $879 = $878 | $875; - $I7$0$i$i = $879; } - } while(0); - $880 = ((32544 + ($I7$0$i$i<<2)|0) + 304|0); - $$sum12$i$i = (($$sum$i19$i) + 28)|0; - $881 = (($tbase$245$i) + ($$sum12$i$i)|0); - HEAP32[$881>>2] = $I7$0$i$i; - $$sum13$i$i = (($$sum$i19$i) + 16)|0; - $882 = (($tbase$245$i) + ($$sum13$i$i)|0); - $$sum14$i$i = (($$sum$i19$i) + 20)|0; - $883 = (($tbase$245$i) + ($$sum14$i$i)|0); - HEAP32[$883>>2] = 0; - HEAP32[$882>>2] = 0; - $884 = HEAP32[((32544 + 4|0))>>2]|0; - $885 = 1 << $I7$0$i$i; - $886 = $884 & $885; - $887 = ($886|0)==(0); - if ($887) { - $888 = $884 | $885; - HEAP32[((32544 + 4|0))>>2] = $888; - HEAP32[$880>>2] = $725; - $$sum15$i$i = (($$sum$i19$i) + 24)|0; - $889 = (($tbase$245$i) + ($$sum15$i$i)|0); - HEAP32[$889>>2] = $880; - $$sum16$i$i = (($$sum$i19$i) + 12)|0; - $890 = (($tbase$245$i) + ($$sum16$i$i)|0); - HEAP32[$890>>2] = $725; - $$sum17$i$i = (($$sum$i19$i) + 8)|0; - $891 = (($tbase$245$i) + ($$sum17$i$i)|0); - HEAP32[$891>>2] = $725; - break; } - $892 = HEAP32[$880>>2]|0; - $893 = ($I7$0$i$i|0)==(31); - if ($893) { - $901 = 0; + } while(0); + $410 = ($rsize$3$lcssa$i>>>0)<(16); + L199: do { + if ($410) { + $411 = (($rsize$3$lcssa$i) + ($246))|0; + $412 = $411 | 3; + $413 = ((($v$3$lcssa$i)) + 4|0); + HEAP32[$413>>2] = $412; + $$sum18$i = (($411) + 4)|0; + $414 = (($v$3$lcssa$i) + ($$sum18$i)|0); + $415 = HEAP32[$414>>2]|0; + $416 = $415 | 1; + HEAP32[$414>>2] = $416; } else { - $894 = $I7$0$i$i >>> 1; - $895 = (25 - ($894))|0; - $901 = $895; - } - $896 = (($892) + 4|0); - $897 = HEAP32[$896>>2]|0; - $898 = $897 & -8; - $899 = ($898|0)==($qsize$0$i$i|0); - L442: do { - if ($899) { - $T$0$lcssa$i26$i = $892; - } else { - $900 = $qsize$0$i$i << $901; - $K8$053$i$i = $900;$T$052$i$i = $892; - while(1) { - $908 = $K8$053$i$i >>> 31; - $909 = ((($T$052$i$i) + ($908<<2)|0) + 16|0); - $904 = HEAP32[$909>>2]|0; - $910 = ($904|0)==(0|0); - if ($910) { - break; - } - $902 = $K8$053$i$i << 1; - $903 = (($904) + 4|0); - $905 = HEAP32[$903>>2]|0; - $906 = $905 & -8; - $907 = ($906|0)==($qsize$0$i$i|0); - if ($907) { - $T$0$lcssa$i26$i = $904; - break L442; + $417 = $246 | 3; + $418 = ((($v$3$lcssa$i)) + 4|0); + HEAP32[$418>>2] = $417; + $419 = $rsize$3$lcssa$i | 1; + $$sum$i2334 = $246 | 4; + $420 = (($v$3$lcssa$i) + ($$sum$i2334)|0); + HEAP32[$420>>2] = $419; + $$sum1$i24 = (($rsize$3$lcssa$i) + ($246))|0; + $421 = (($v$3$lcssa$i) + ($$sum1$i24)|0); + HEAP32[$421>>2] = $rsize$3$lcssa$i; + $422 = $rsize$3$lcssa$i >>> 3; + $423 = ($rsize$3$lcssa$i>>>0)<(256); + if ($423) { + $424 = $422 << 1; + $425 = (32716 + ($424<<2)|0); + $426 = HEAP32[32676>>2]|0; + $427 = 1 << $422; + $428 = $426 & $427; + $429 = ($428|0)==(0); + if ($429) { + $430 = $426 | $427; + HEAP32[32676>>2] = $430; + $$pre$i25 = (($424) + 2)|0; + $$pre43$i = (32716 + ($$pre$i25<<2)|0); + $$pre$phi$i26Z2D = $$pre43$i;$F5$0$i = $425; + } else { + $$sum17$i = (($424) + 2)|0; + $431 = (32716 + ($$sum17$i<<2)|0); + $432 = HEAP32[$431>>2]|0; + $433 = HEAP32[(32692)>>2]|0; + $434 = ($432>>>0)<($433>>>0); + if ($434) { + _abort(); + // unreachable; } else { - $K8$053$i$i = $902;$T$052$i$i = $904; + $$pre$phi$i26Z2D = $431;$F5$0$i = $432; } } - $911 = HEAP32[((32544 + 16|0))>>2]|0; - $912 = ($909>>>0)<($911>>>0); - if ($912) { - _abort(); - // unreachable; + HEAP32[$$pre$phi$i26Z2D>>2] = $348; + $435 = ((($F5$0$i)) + 12|0); + HEAP32[$435>>2] = $348; + $$sum15$i = (($246) + 8)|0; + $436 = (($v$3$lcssa$i) + ($$sum15$i)|0); + HEAP32[$436>>2] = $F5$0$i; + $$sum16$i = (($246) + 12)|0; + $437 = (($v$3$lcssa$i) + ($$sum16$i)|0); + HEAP32[$437>>2] = $425; + break; + } + $438 = $rsize$3$lcssa$i >>> 8; + $439 = ($438|0)==(0); + if ($439) { + $I7$0$i = 0; + } else { + $440 = ($rsize$3$lcssa$i>>>0)>(16777215); + if ($440) { + $I7$0$i = 31; } else { - HEAP32[$909>>2] = $725; - $$sum23$i$i = (($$sum$i19$i) + 24)|0; - $913 = (($tbase$245$i) + ($$sum23$i$i)|0); - HEAP32[$913>>2] = $T$052$i$i; - $$sum24$i$i = (($$sum$i19$i) + 12)|0; - $914 = (($tbase$245$i) + ($$sum24$i$i)|0); - HEAP32[$914>>2] = $725; - $$sum25$i$i = (($$sum$i19$i) + 8)|0; - $915 = (($tbase$245$i) + ($$sum25$i$i)|0); - HEAP32[$915>>2] = $725; - break L345; + $441 = (($438) + 1048320)|0; + $442 = $441 >>> 16; + $443 = $442 & 8; + $444 = $438 << $443; + $445 = (($444) + 520192)|0; + $446 = $445 >>> 16; + $447 = $446 & 4; + $448 = $447 | $443; + $449 = $444 << $447; + $450 = (($449) + 245760)|0; + $451 = $450 >>> 16; + $452 = $451 & 2; + $453 = $448 | $452; + $454 = (14 - ($453))|0; + $455 = $449 << $452; + $456 = $455 >>> 15; + $457 = (($454) + ($456))|0; + $458 = $457 << 1; + $459 = (($457) + 7)|0; + $460 = $rsize$3$lcssa$i >>> $459; + $461 = $460 & 1; + $462 = $461 | $458; + $I7$0$i = $462; } } - } while(0); - $916 = (($T$0$lcssa$i26$i) + 8|0); - $917 = HEAP32[$916>>2]|0; - $918 = HEAP32[((32544 + 16|0))>>2]|0; - $919 = ($T$0$lcssa$i26$i>>>0)>=($918>>>0); - $920 = ($917>>>0)>=($918>>>0); - $or$cond$i27$i = $919 & $920; - if ($or$cond$i27$i) { - $921 = (($917) + 12|0); - HEAP32[$921>>2] = $725; - HEAP32[$916>>2] = $725; - $$sum20$i$i = (($$sum$i19$i) + 8)|0; - $922 = (($tbase$245$i) + ($$sum20$i$i)|0); - HEAP32[$922>>2] = $917; - $$sum21$i$i = (($$sum$i19$i) + 12)|0; - $923 = (($tbase$245$i) + ($$sum21$i$i)|0); - HEAP32[$923>>2] = $T$0$lcssa$i26$i; - $$sum22$i$i = (($$sum$i19$i) + 24)|0; - $924 = (($tbase$245$i) + ($$sum22$i$i)|0); - HEAP32[$924>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $$sum1819$i$i = $713 | 8; - $925 = (($tbase$245$i) + ($$sum1819$i$i)|0); - $mem$0 = $925; - STACKTOP = sp;return ($mem$0|0); - } - } - $sp$0$i$i$i = ((32544 + 448|0)); - while(1) { - $926 = HEAP32[$sp$0$i$i$i>>2]|0; - $927 = ($926>>>0)>($636>>>0); - if (!($927)) { - $928 = (($sp$0$i$i$i) + 4|0); - $929 = HEAP32[$928>>2]|0; - $930 = (($926) + ($929)|0); - $931 = ($930>>>0)>($636>>>0); - if ($931) { - break; - } - } - $932 = (($sp$0$i$i$i) + 8|0); - $933 = HEAP32[$932>>2]|0; - $sp$0$i$i$i = $933; - } - $$sum$i13$i = (($929) + -47)|0; - $$sum1$i14$i = (($929) + -39)|0; - $934 = (($926) + ($$sum1$i14$i)|0); - $935 = $934; - $936 = $935 & 7; - $937 = ($936|0)==(0); - if ($937) { - $940 = 0; - } else { - $938 = (0 - ($935))|0; - $939 = $938 & 7; - $940 = $939; - } - $$sum2$i15$i = (($$sum$i13$i) + ($940))|0; - $941 = (($926) + ($$sum2$i15$i)|0); - $942 = (($636) + 16|0); - $943 = ($941>>>0)<($942>>>0); - $944 = $943 ? $636 : $941; - $945 = (($944) + 8|0); - $946 = (($tsize$244$i) + -40)|0; - $947 = (($tbase$245$i) + 8|0); - $948 = $947; - $949 = $948 & 7; - $950 = ($949|0)==(0); - if ($950) { - $954 = 0; - } else { - $951 = (0 - ($948))|0; - $952 = $951 & 7; - $954 = $952; - } - $953 = (($tbase$245$i) + ($954)|0); - $955 = (($946) - ($954))|0; - HEAP32[((32544 + 24|0))>>2] = $953; - HEAP32[((32544 + 12|0))>>2] = $955; - $956 = $955 | 1; - $$sum$i$i$i = (($954) + 4)|0; - $957 = (($tbase$245$i) + ($$sum$i$i$i)|0); - HEAP32[$957>>2] = $956; - $$sum2$i$i$i = (($tsize$244$i) + -36)|0; - $958 = (($tbase$245$i) + ($$sum2$i$i$i)|0); - HEAP32[$958>>2] = 40; - $959 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $959; - $960 = (($944) + 4|0); - HEAP32[$960>>2] = 27; - ;HEAP32[$945+0>>2]=HEAP32[((32544 + 448|0))+0>>2]|0;HEAP32[$945+4>>2]=HEAP32[((32544 + 448|0))+4>>2]|0;HEAP32[$945+8>>2]=HEAP32[((32544 + 448|0))+8>>2]|0;HEAP32[$945+12>>2]=HEAP32[((32544 + 448|0))+12>>2]|0; - HEAP32[((32544 + 448|0))>>2] = $tbase$245$i; - HEAP32[((32544 + 452|0))>>2] = $tsize$244$i; - HEAP32[((32544 + 460|0))>>2] = 0; - HEAP32[((32544 + 456|0))>>2] = $945; - $961 = (($944) + 28|0); - HEAP32[$961>>2] = 7; - $962 = (($944) + 32|0); - $963 = ($962>>>0)<($930>>>0); - if ($963) { - $965 = $961; - while(1) { - $964 = (($965) + 4|0); - HEAP32[$964>>2] = 7; - $966 = (($965) + 8|0); - $967 = ($966>>>0)<($930>>>0); - if ($967) { - $965 = $964; - } else { - break; - } - } - } - $968 = ($944|0)==($636|0); - if (!($968)) { - $969 = $944; - $970 = $636; - $971 = (($969) - ($970))|0; - $972 = (($636) + ($971)|0); - $$sum3$i$i = (($971) + 4)|0; - $973 = (($636) + ($$sum3$i$i)|0); - $974 = HEAP32[$973>>2]|0; - $975 = $974 & -2; - HEAP32[$973>>2] = $975; - $976 = $971 | 1; - $977 = (($636) + 4|0); - HEAP32[$977>>2] = $976; - HEAP32[$972>>2] = $971; - $978 = $971 >>> 3; - $979 = ($971>>>0)<(256); - if ($979) { - $980 = $978 << 1; - $981 = ((32544 + ($980<<2)|0) + 40|0); - $982 = HEAP32[32544>>2]|0; - $983 = 1 << $978; - $984 = $982 & $983; - $985 = ($984|0)==(0); - do { - if ($985) { - $986 = $982 | $983; - HEAP32[32544>>2] = $986; - $$sum10$pre$i$i = (($980) + 2)|0; - $$pre$i$i = ((32544 + ($$sum10$pre$i$i<<2)|0) + 40|0); - $$pre$phi$i$iZ2D = $$pre$i$i;$F$0$i$i = $981; - } else { - $$sum11$i$i = (($980) + 2)|0; - $987 = ((32544 + ($$sum11$i$i<<2)|0) + 40|0); - $988 = HEAP32[$987>>2]|0; - $989 = HEAP32[((32544 + 16|0))>>2]|0; - $990 = ($988>>>0)<($989>>>0); - if (!($990)) { - $$pre$phi$i$iZ2D = $987;$F$0$i$i = $988; - break; - } - _abort(); - // unreachable; - } - } while(0); - HEAP32[$$pre$phi$i$iZ2D>>2] = $636; - $991 = (($F$0$i$i) + 12|0); - HEAP32[$991>>2] = $636; - $992 = (($636) + 8|0); - HEAP32[$992>>2] = $F$0$i$i; - $993 = (($636) + 12|0); - HEAP32[$993>>2] = $981; - break; - } - $994 = $971 >>> 8; - $995 = ($994|0)==(0); - if ($995) { - $I1$0$i$i = 0; - } else { - $996 = ($971>>>0)>(16777215); - if ($996) { - $I1$0$i$i = 31; - } else { - $997 = (($994) + 1048320)|0; - $998 = $997 >>> 16; - $999 = $998 & 8; - $1000 = $994 << $999; - $1001 = (($1000) + 520192)|0; - $1002 = $1001 >>> 16; - $1003 = $1002 & 4; - $1004 = $1003 | $999; - $1005 = $1000 << $1003; - $1006 = (($1005) + 245760)|0; - $1007 = $1006 >>> 16; - $1008 = $1007 & 2; - $1009 = $1004 | $1008; - $1010 = (14 - ($1009))|0; - $1011 = $1005 << $1008; - $1012 = $1011 >>> 15; - $1013 = (($1010) + ($1012))|0; - $1014 = $1013 << 1; - $1015 = (($1013) + 7)|0; - $1016 = $971 >>> $1015; - $1017 = $1016 & 1; - $1018 = $1017 | $1014; - $I1$0$i$i = $1018; - } - } - $1019 = ((32544 + ($I1$0$i$i<<2)|0) + 304|0); - $1020 = (($636) + 28|0); - $I1$0$c$i$i = $I1$0$i$i; - HEAP32[$1020>>2] = $I1$0$c$i$i; - $1021 = (($636) + 20|0); - HEAP32[$1021>>2] = 0; - $1022 = (($636) + 16|0); - HEAP32[$1022>>2] = 0; - $1023 = HEAP32[((32544 + 4|0))>>2]|0; - $1024 = 1 << $I1$0$i$i; - $1025 = $1023 & $1024; - $1026 = ($1025|0)==(0); - if ($1026) { - $1027 = $1023 | $1024; - HEAP32[((32544 + 4|0))>>2] = $1027; - HEAP32[$1019>>2] = $636; - $1028 = (($636) + 24|0); - HEAP32[$1028>>2] = $1019; - $1029 = (($636) + 12|0); - HEAP32[$1029>>2] = $636; - $1030 = (($636) + 8|0); - HEAP32[$1030>>2] = $636; - break; - } - $1031 = HEAP32[$1019>>2]|0; - $1032 = ($I1$0$i$i|0)==(31); - if ($1032) { - $1040 = 0; - } else { - $1033 = $I1$0$i$i >>> 1; - $1034 = (25 - ($1033))|0; - $1040 = $1034; - } - $1035 = (($1031) + 4|0); - $1036 = HEAP32[$1035>>2]|0; - $1037 = $1036 & -8; - $1038 = ($1037|0)==($971|0); - L493: do { - if ($1038) { - $T$0$lcssa$i$i = $1031; - } else { - $1039 = $971 << $1040; - $K2$015$i$i = $1039;$T$014$i$i = $1031; - while(1) { - $1047 = $K2$015$i$i >>> 31; - $1048 = ((($T$014$i$i) + ($1047<<2)|0) + 16|0); - $1043 = HEAP32[$1048>>2]|0; - $1049 = ($1043|0)==(0|0); - if ($1049) { - break; - } - $1041 = $K2$015$i$i << 1; - $1042 = (($1043) + 4|0); - $1044 = HEAP32[$1042>>2]|0; - $1045 = $1044 & -8; - $1046 = ($1045|0)==($971|0); - if ($1046) { - $T$0$lcssa$i$i = $1043; - break L493; - } else { - $K2$015$i$i = $1041;$T$014$i$i = $1043; + $463 = (32980 + ($I7$0$i<<2)|0); + $$sum2$i = (($246) + 28)|0; + $464 = (($v$3$lcssa$i) + ($$sum2$i)|0); + HEAP32[$464>>2] = $I7$0$i; + $$sum3$i27 = (($246) + 16)|0; + $465 = (($v$3$lcssa$i) + ($$sum3$i27)|0); + $$sum4$i28 = (($246) + 20)|0; + $466 = (($v$3$lcssa$i) + ($$sum4$i28)|0); + HEAP32[$466>>2] = 0; + HEAP32[$465>>2] = 0; + $467 = HEAP32[(32680)>>2]|0; + $468 = 1 << $I7$0$i; + $469 = $467 & $468; + $470 = ($469|0)==(0); + if ($470) { + $471 = $467 | $468; + HEAP32[(32680)>>2] = $471; + HEAP32[$463>>2] = $348; + $$sum5$i = (($246) + 24)|0; + $472 = (($v$3$lcssa$i) + ($$sum5$i)|0); + HEAP32[$472>>2] = $463; + $$sum6$i = (($246) + 12)|0; + $473 = (($v$3$lcssa$i) + ($$sum6$i)|0); + HEAP32[$473>>2] = $348; + $$sum7$i = (($246) + 8)|0; + $474 = (($v$3$lcssa$i) + ($$sum7$i)|0); + HEAP32[$474>>2] = $348; + break; + } + $475 = HEAP32[$463>>2]|0; + $476 = ((($475)) + 4|0); + $477 = HEAP32[$476>>2]|0; + $478 = $477 & -8; + $479 = ($478|0)==($rsize$3$lcssa$i|0); + L217: do { + if ($479) { + $T$0$lcssa$i = $475; + } else { + $480 = ($I7$0$i|0)==(31); + $481 = $I7$0$i >>> 1; + $482 = (25 - ($481))|0; + $483 = $480 ? 0 : $482; + $484 = $rsize$3$lcssa$i << $483; + $K12$029$i = $484;$T$028$i = $475; + while(1) { + $491 = $K12$029$i >>> 31; + $492 = (((($T$028$i)) + 16|0) + ($491<<2)|0); + $487 = HEAP32[$492>>2]|0; + $493 = ($487|0)==(0|0); + if ($493) { + $$lcssa232 = $492;$T$028$i$lcssa = $T$028$i; + break; + } + $485 = $K12$029$i << 1; + $486 = ((($487)) + 4|0); + $488 = HEAP32[$486>>2]|0; + $489 = $488 & -8; + $490 = ($489|0)==($rsize$3$lcssa$i|0); + if ($490) { + $T$0$lcssa$i = $487; + break L217; + } else { + $K12$029$i = $485;$T$028$i = $487; + } + } + $494 = HEAP32[(32692)>>2]|0; + $495 = ($$lcssa232>>>0)<($494>>>0); + if ($495) { + _abort(); + // unreachable; + } else { + HEAP32[$$lcssa232>>2] = $348; + $$sum11$i = (($246) + 24)|0; + $496 = (($v$3$lcssa$i) + ($$sum11$i)|0); + HEAP32[$496>>2] = $T$028$i$lcssa; + $$sum12$i = (($246) + 12)|0; + $497 = (($v$3$lcssa$i) + ($$sum12$i)|0); + HEAP32[$497>>2] = $348; + $$sum13$i = (($246) + 8)|0; + $498 = (($v$3$lcssa$i) + ($$sum13$i)|0); + HEAP32[$498>>2] = $348; + break L199; + } + } + } while(0); + $499 = ((($T$0$lcssa$i)) + 8|0); + $500 = HEAP32[$499>>2]|0; + $501 = HEAP32[(32692)>>2]|0; + $502 = ($500>>>0)>=($501>>>0); + $not$$i = ($T$0$lcssa$i>>>0)>=($501>>>0); + $503 = $502 & $not$$i; + if ($503) { + $504 = ((($500)) + 12|0); + HEAP32[$504>>2] = $348; + HEAP32[$499>>2] = $348; + $$sum8$i = (($246) + 8)|0; + $505 = (($v$3$lcssa$i) + ($$sum8$i)|0); + HEAP32[$505>>2] = $500; + $$sum9$i = (($246) + 12)|0; + $506 = (($v$3$lcssa$i) + ($$sum9$i)|0); + HEAP32[$506>>2] = $T$0$lcssa$i; + $$sum10$i = (($246) + 24)|0; + $507 = (($v$3$lcssa$i) + ($$sum10$i)|0); + HEAP32[$507>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } } - } - $1050 = HEAP32[((32544 + 16|0))>>2]|0; - $1051 = ($1048>>>0)<($1050>>>0); - if ($1051) { - _abort(); - // unreachable; - } else { - HEAP32[$1048>>2] = $636; - $1052 = (($636) + 24|0); - HEAP32[$1052>>2] = $T$014$i$i; - $1053 = (($636) + 12|0); - HEAP32[$1053>>2] = $636; - $1054 = (($636) + 8|0); - HEAP32[$1054>>2] = $636; - break L308; - } - } - } while(0); - $1055 = (($T$0$lcssa$i$i) + 8|0); - $1056 = HEAP32[$1055>>2]|0; - $1057 = HEAP32[((32544 + 16|0))>>2]|0; - $1058 = ($T$0$lcssa$i$i>>>0)>=($1057>>>0); - $1059 = ($1056>>>0)>=($1057>>>0); - $or$cond$i$i = $1058 & $1059; - if ($or$cond$i$i) { - $1060 = (($1056) + 12|0); - HEAP32[$1060>>2] = $636; - HEAP32[$1055>>2] = $636; - $1061 = (($636) + 8|0); - HEAP32[$1061>>2] = $1056; - $1062 = (($636) + 12|0); - HEAP32[$1062>>2] = $T$0$lcssa$i$i; - $1063 = (($636) + 24|0); - HEAP32[$1063>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } - } while(0); - $1064 = HEAP32[((32544 + 12|0))>>2]|0; - $1065 = ($1064>>>0)>($nb$0>>>0); - if ($1065) { - $1066 = (($1064) - ($nb$0))|0; - HEAP32[((32544 + 12|0))>>2] = $1066; - $1067 = HEAP32[((32544 + 24|0))>>2]|0; - $1068 = (($1067) + ($nb$0)|0); - HEAP32[((32544 + 24|0))>>2] = $1068; - $1069 = $1066 | 1; - $$sum$i32 = (($nb$0) + 4)|0; - $1070 = (($1067) + ($$sum$i32)|0); - HEAP32[$1070>>2] = $1069; - $1071 = $nb$0 | 3; - $1072 = (($1067) + 4|0); - HEAP32[$1072>>2] = $1071; - $1073 = (($1067) + 8|0); - $mem$0 = $1073; - STACKTOP = sp;return ($mem$0|0); - } - } - $1074 = (___errno_location()|0); - HEAP32[$1074>>2] = 12; - $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); -} -function _free($mem) { - $mem = $mem|0; - var $$pre = 0, $$pre$phi66Z2D = 0, $$pre$phi68Z2D = 0, $$pre$phiZ2D = 0, $$pre65 = 0, $$pre67 = 0, $$sum = 0, $$sum16$pre = 0, $$sum17 = 0, $$sum18 = 0, $$sum19 = 0, $$sum2 = 0, $$sum20 = 0, $$sum2324 = 0, $$sum25 = 0, $$sum26 = 0, $$sum28 = 0, $$sum29 = 0, $$sum3 = 0, $$sum30 = 0; - var $$sum31 = 0, $$sum32 = 0, $$sum33 = 0, $$sum34 = 0, $$sum35 = 0, $$sum36 = 0, $$sum37 = 0, $$sum5 = 0, $$sum67 = 0, $$sum8 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0; - var $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0; - var $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0; - var $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0; - var $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0; - var $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0; - var $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0; - var $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0; - var $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0; - var $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0; - var $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0; - var $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0; - var $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0; - var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; - var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0; - var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0; - var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F16$0 = 0, $I18$0 = 0, $I18$0$c = 0, $K19$058 = 0, $R$0 = 0, $R$1 = 0, $R7$0 = 0; - var $R7$1 = 0, $RP$0 = 0, $RP9$0 = 0, $T$0$lcssa = 0, $T$057 = 0, $cond = 0, $cond54 = 0, $or$cond = 0, $p$0 = 0, $psize$0 = 0, $psize$1 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($mem|0)==(0|0); - if ($0) { - STACKTOP = sp;return; - } - $1 = (($mem) + -8|0); - $2 = HEAP32[((32544 + 16|0))>>2]|0; - $3 = ($1>>>0)<($2>>>0); - if ($3) { - _abort(); - // unreachable; - } - $4 = (($mem) + -4|0); - $5 = HEAP32[$4>>2]|0; - $6 = $5 & 3; - $7 = ($6|0)==(1); - if ($7) { - _abort(); - // unreachable; - } - $8 = $5 & -8; - $$sum = (($8) + -8)|0; - $9 = (($mem) + ($$sum)|0); - $10 = $5 & 1; - $11 = ($10|0)==(0); - do { - if ($11) { - $12 = HEAP32[$1>>2]|0; - $13 = ($6|0)==(0); - if ($13) { - STACKTOP = sp;return; - } - $$sum2 = (-8 - ($12))|0; - $14 = (($mem) + ($$sum2)|0); - $15 = (($12) + ($8))|0; - $16 = ($14>>>0)<($2>>>0); - if ($16) { - _abort(); - // unreachable; - } - $17 = HEAP32[((32544 + 20|0))>>2]|0; - $18 = ($14|0)==($17|0); - if ($18) { - $$sum3 = (($8) + -4)|0; - $103 = (($mem) + ($$sum3)|0); - $104 = HEAP32[$103>>2]|0; - $105 = $104 & 3; - $106 = ($105|0)==(3); - if (!($106)) { - $p$0 = $14;$psize$0 = $15; - break; - } - HEAP32[((32544 + 8|0))>>2] = $15; - $107 = $104 & -2; - HEAP32[$103>>2] = $107; - $108 = $15 | 1; - $$sum26 = (($$sum2) + 4)|0; - $109 = (($mem) + ($$sum26)|0); - HEAP32[$109>>2] = $108; - HEAP32[$9>>2] = $15; - STACKTOP = sp;return; - } - $19 = $12 >>> 3; - $20 = ($12>>>0)<(256); - if ($20) { - $$sum36 = (($$sum2) + 8)|0; - $21 = (($mem) + ($$sum36)|0); - $22 = HEAP32[$21>>2]|0; - $$sum37 = (($$sum2) + 12)|0; - $23 = (($mem) + ($$sum37)|0); - $24 = HEAP32[$23>>2]|0; - $25 = $19 << 1; - $26 = ((32544 + ($25<<2)|0) + 40|0); - $27 = ($22|0)==($26|0); - if (!($27)) { - $28 = ($22>>>0)<($2>>>0); - if ($28) { - _abort(); - // unreachable; - } - $29 = (($22) + 12|0); - $30 = HEAP32[$29>>2]|0; - $31 = ($30|0)==($14|0); - if (!($31)) { - _abort(); - // unreachable; - } - } - $32 = ($24|0)==($22|0); - if ($32) { - $33 = 1 << $19; - $34 = $33 ^ -1; - $35 = HEAP32[32544>>2]|0; - $36 = $35 & $34; - HEAP32[32544>>2] = $36; - $p$0 = $14;$psize$0 = $15; - break; - } - $37 = ($24|0)==($26|0); - if ($37) { - $$pre67 = (($24) + 8|0); - $$pre$phi68Z2D = $$pre67; - } else { - $38 = ($24>>>0)<($2>>>0); - if ($38) { - _abort(); - // unreachable; - } - $39 = (($24) + 8|0); - $40 = HEAP32[$39>>2]|0; - $41 = ($40|0)==($14|0); - if ($41) { - $$pre$phi68Z2D = $39; - } else { - _abort(); - // unreachable; - } - } - $42 = (($22) + 12|0); - HEAP32[$42>>2] = $24; - HEAP32[$$pre$phi68Z2D>>2] = $22; - $p$0 = $14;$psize$0 = $15; - break; - } - $$sum28 = (($$sum2) + 24)|0; - $43 = (($mem) + ($$sum28)|0); - $44 = HEAP32[$43>>2]|0; - $$sum29 = (($$sum2) + 12)|0; - $45 = (($mem) + ($$sum29)|0); - $46 = HEAP32[$45>>2]|0; - $47 = ($46|0)==($14|0); - do { - if ($47) { - $$sum31 = (($$sum2) + 20)|0; - $57 = (($mem) + ($$sum31)|0); - $58 = HEAP32[$57>>2]|0; - $59 = ($58|0)==(0|0); - if ($59) { - $$sum30 = (($$sum2) + 16)|0; - $60 = (($mem) + ($$sum30)|0); - $61 = HEAP32[$60>>2]|0; - $62 = ($61|0)==(0|0); - if ($62) { - $R$1 = 0; - break; - } else { - $R$0 = $61;$RP$0 = $60; - } - } else { - $R$0 = $58;$RP$0 = $57; - } - while(1) { - $63 = (($R$0) + 20|0); - $64 = HEAP32[$63>>2]|0; - $65 = ($64|0)==(0|0); - if (!($65)) { - $R$0 = $64;$RP$0 = $63; - continue; - } - $66 = (($R$0) + 16|0); - $67 = HEAP32[$66>>2]|0; - $68 = ($67|0)==(0|0); - if ($68) { - break; - } else { - $R$0 = $67;$RP$0 = $66; - } - } - $69 = ($RP$0>>>0)<($2>>>0); - if ($69) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0>>2] = 0; - $R$1 = $R$0; - break; - } - } else { - $$sum35 = (($$sum2) + 8)|0; - $48 = (($mem) + ($$sum35)|0); - $49 = HEAP32[$48>>2]|0; - $50 = ($49>>>0)<($2>>>0); - if ($50) { - _abort(); - // unreachable; - } - $51 = (($49) + 12|0); - $52 = HEAP32[$51>>2]|0; - $53 = ($52|0)==($14|0); - if (!($53)) { - _abort(); - // unreachable; - } - $54 = (($46) + 8|0); - $55 = HEAP32[$54>>2]|0; - $56 = ($55|0)==($14|0); - if ($56) { - HEAP32[$51>>2] = $46; - HEAP32[$54>>2] = $49; - $R$1 = $46; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $70 = ($44|0)==(0|0); - if ($70) { - $p$0 = $14;$psize$0 = $15; - } else { - $$sum32 = (($$sum2) + 28)|0; - $71 = (($mem) + ($$sum32)|0); - $72 = HEAP32[$71>>2]|0; - $73 = ((32544 + ($72<<2)|0) + 304|0); - $74 = HEAP32[$73>>2]|0; - $75 = ($14|0)==($74|0); - if ($75) { - HEAP32[$73>>2] = $R$1; - $cond = ($R$1|0)==(0|0); - if ($cond) { - $76 = 1 << $72; - $77 = $76 ^ -1; - $78 = HEAP32[((32544 + 4|0))>>2]|0; - $79 = $78 & $77; - HEAP32[((32544 + 4|0))>>2] = $79; - $p$0 = $14;$psize$0 = $15; - break; - } - } else { - $80 = HEAP32[((32544 + 16|0))>>2]|0; - $81 = ($44>>>0)<($80>>>0); - if ($81) { - _abort(); - // unreachable; - } - $82 = (($44) + 16|0); - $83 = HEAP32[$82>>2]|0; - $84 = ($83|0)==($14|0); - if ($84) { - HEAP32[$82>>2] = $R$1; - } else { - $85 = (($44) + 20|0); - HEAP32[$85>>2] = $R$1; - } - $86 = ($R$1|0)==(0|0); - if ($86) { - $p$0 = $14;$psize$0 = $15; - break; - } - } - $87 = HEAP32[((32544 + 16|0))>>2]|0; - $88 = ($R$1>>>0)<($87>>>0); - if ($88) { - _abort(); - // unreachable; - } - $89 = (($R$1) + 24|0); - HEAP32[$89>>2] = $44; - $$sum33 = (($$sum2) + 16)|0; - $90 = (($mem) + ($$sum33)|0); - $91 = HEAP32[$90>>2]|0; - $92 = ($91|0)==(0|0); - do { - if (!($92)) { - $93 = ($91>>>0)<($87>>>0); - if ($93) { - _abort(); - // unreachable; + } while(0); + $508 = ((($v$3$lcssa$i)) + 8|0); + $mem$0 = $508; + return ($mem$0|0); } else { - $94 = (($R$1) + 16|0); - HEAP32[$94>>2] = $91; - $95 = (($91) + 24|0); - HEAP32[$95>>2] = $R$1; - break; + $nb$0 = $246; } } - } while(0); - $$sum34 = (($$sum2) + 20)|0; - $96 = (($mem) + ($$sum34)|0); - $97 = HEAP32[$96>>2]|0; - $98 = ($97|0)==(0|0); - if ($98) { - $p$0 = $14;$psize$0 = $15; - } else { - $99 = HEAP32[((32544 + 16|0))>>2]|0; - $100 = ($97>>>0)<($99>>>0); - if ($100) { - _abort(); - // unreachable; - } else { - $101 = (($R$1) + 20|0); - HEAP32[$101>>2] = $97; - $102 = (($97) + 24|0); - HEAP32[$102>>2] = $R$1; - $p$0 = $14;$psize$0 = $15; - break; - } } } - } else { - $p$0 = $1;$psize$0 = $8; } } while(0); - $110 = ($p$0>>>0)<($9>>>0); - if (!($110)) { - _abort(); - // unreachable; - } - $$sum25 = (($8) + -4)|0; - $111 = (($mem) + ($$sum25)|0); - $112 = HEAP32[$111>>2]|0; - $113 = $112 & 1; - $114 = ($113|0)==(0); - if ($114) { - _abort(); - // unreachable; - } - $115 = $112 & 2; - $116 = ($115|0)==(0); - if ($116) { - $117 = HEAP32[((32544 + 24|0))>>2]|0; - $118 = ($9|0)==($117|0); - if ($118) { - $119 = HEAP32[((32544 + 12|0))>>2]|0; - $120 = (($119) + ($psize$0))|0; - HEAP32[((32544 + 12|0))>>2] = $120; - HEAP32[((32544 + 24|0))>>2] = $p$0; - $121 = $120 | 1; - $122 = (($p$0) + 4|0); - HEAP32[$122>>2] = $121; - $123 = HEAP32[((32544 + 20|0))>>2]|0; - $124 = ($p$0|0)==($123|0); - if (!($124)) { - STACKTOP = sp;return; - } - HEAP32[((32544 + 20|0))>>2] = 0; - HEAP32[((32544 + 8|0))>>2] = 0; - STACKTOP = sp;return; - } - $125 = HEAP32[((32544 + 20|0))>>2]|0; - $126 = ($9|0)==($125|0); - if ($126) { - $127 = HEAP32[((32544 + 8|0))>>2]|0; - $128 = (($127) + ($psize$0))|0; - HEAP32[((32544 + 8|0))>>2] = $128; - HEAP32[((32544 + 20|0))>>2] = $p$0; - $129 = $128 | 1; - $130 = (($p$0) + 4|0); - HEAP32[$130>>2] = $129; - $131 = (($p$0) + ($128)|0); - HEAP32[$131>>2] = $128; - STACKTOP = sp;return; - } - $132 = $112 & -8; - $133 = (($132) + ($psize$0))|0; - $134 = $112 >>> 3; - $135 = ($112>>>0)<(256); - do { - if ($135) { - $136 = (($mem) + ($8)|0); - $137 = HEAP32[$136>>2]|0; - $$sum2324 = $8 | 4; - $138 = (($mem) + ($$sum2324)|0); - $139 = HEAP32[$138>>2]|0; - $140 = $134 << 1; - $141 = ((32544 + ($140<<2)|0) + 40|0); - $142 = ($137|0)==($141|0); - if (!($142)) { - $143 = HEAP32[((32544 + 16|0))>>2]|0; - $144 = ($137>>>0)<($143>>>0); - if ($144) { - _abort(); - // unreachable; - } - $145 = (($137) + 12|0); - $146 = HEAP32[$145>>2]|0; - $147 = ($146|0)==($9|0); - if (!($147)) { - _abort(); - // unreachable; - } - } - $148 = ($139|0)==($137|0); - if ($148) { - $149 = 1 << $134; - $150 = $149 ^ -1; - $151 = HEAP32[32544>>2]|0; - $152 = $151 & $150; - HEAP32[32544>>2] = $152; - break; - } - $153 = ($139|0)==($141|0); - if ($153) { - $$pre65 = (($139) + 8|0); - $$pre$phi66Z2D = $$pre65; - } else { - $154 = HEAP32[((32544 + 16|0))>>2]|0; - $155 = ($139>>>0)<($154>>>0); - if ($155) { - _abort(); - // unreachable; - } - $156 = (($139) + 8|0); - $157 = HEAP32[$156>>2]|0; - $158 = ($157|0)==($9|0); - if ($158) { - $$pre$phi66Z2D = $156; - } else { - _abort(); - // unreachable; - } - } - $159 = (($137) + 12|0); - HEAP32[$159>>2] = $139; - HEAP32[$$pre$phi66Z2D>>2] = $137; - } else { - $$sum5 = (($8) + 16)|0; - $160 = (($mem) + ($$sum5)|0); - $161 = HEAP32[$160>>2]|0; - $$sum67 = $8 | 4; - $162 = (($mem) + ($$sum67)|0); - $163 = HEAP32[$162>>2]|0; - $164 = ($163|0)==($9|0); - do { - if ($164) { - $$sum9 = (($8) + 12)|0; - $175 = (($mem) + ($$sum9)|0); - $176 = HEAP32[$175>>2]|0; - $177 = ($176|0)==(0|0); - if ($177) { - $$sum8 = (($8) + 8)|0; - $178 = (($mem) + ($$sum8)|0); - $179 = HEAP32[$178>>2]|0; - $180 = ($179|0)==(0|0); - if ($180) { - $R7$1 = 0; - break; - } else { - $R7$0 = $179;$RP9$0 = $178; - } - } else { - $R7$0 = $176;$RP9$0 = $175; - } - while(1) { - $181 = (($R7$0) + 20|0); - $182 = HEAP32[$181>>2]|0; - $183 = ($182|0)==(0|0); - if (!($183)) { - $R7$0 = $182;$RP9$0 = $181; - continue; - } - $184 = (($R7$0) + 16|0); - $185 = HEAP32[$184>>2]|0; - $186 = ($185|0)==(0|0); - if ($186) { - break; - } else { - $R7$0 = $185;$RP9$0 = $184; - } - } - $187 = HEAP32[((32544 + 16|0))>>2]|0; - $188 = ($RP9$0>>>0)<($187>>>0); - if ($188) { - _abort(); - // unreachable; - } else { - HEAP32[$RP9$0>>2] = 0; - $R7$1 = $R7$0; - break; - } - } else { - $165 = (($mem) + ($8)|0); - $166 = HEAP32[$165>>2]|0; - $167 = HEAP32[((32544 + 16|0))>>2]|0; - $168 = ($166>>>0)<($167>>>0); - if ($168) { - _abort(); - // unreachable; - } - $169 = (($166) + 12|0); - $170 = HEAP32[$169>>2]|0; - $171 = ($170|0)==($9|0); - if (!($171)) { - _abort(); - // unreachable; - } - $172 = (($163) + 8|0); - $173 = HEAP32[$172>>2]|0; - $174 = ($173|0)==($9|0); - if ($174) { - HEAP32[$169>>2] = $163; - HEAP32[$172>>2] = $166; - $R7$1 = $163; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $189 = ($161|0)==(0|0); - if (!($189)) { - $$sum18 = (($8) + 20)|0; - $190 = (($mem) + ($$sum18)|0); - $191 = HEAP32[$190>>2]|0; - $192 = ((32544 + ($191<<2)|0) + 304|0); - $193 = HEAP32[$192>>2]|0; - $194 = ($9|0)==($193|0); - if ($194) { - HEAP32[$192>>2] = $R7$1; - $cond54 = ($R7$1|0)==(0|0); - if ($cond54) { - $195 = 1 << $191; - $196 = $195 ^ -1; - $197 = HEAP32[((32544 + 4|0))>>2]|0; - $198 = $197 & $196; - HEAP32[((32544 + 4|0))>>2] = $198; - break; - } - } else { - $199 = HEAP32[((32544 + 16|0))>>2]|0; - $200 = ($161>>>0)<($199>>>0); - if ($200) { - _abort(); - // unreachable; - } - $201 = (($161) + 16|0); - $202 = HEAP32[$201>>2]|0; - $203 = ($202|0)==($9|0); - if ($203) { - HEAP32[$201>>2] = $R7$1; - } else { - $204 = (($161) + 20|0); - HEAP32[$204>>2] = $R7$1; - } - $205 = ($R7$1|0)==(0|0); - if ($205) { - break; - } - } - $206 = HEAP32[((32544 + 16|0))>>2]|0; - $207 = ($R7$1>>>0)<($206>>>0); - if ($207) { - _abort(); - // unreachable; - } - $208 = (($R7$1) + 24|0); - HEAP32[$208>>2] = $161; - $$sum19 = (($8) + 8)|0; - $209 = (($mem) + ($$sum19)|0); - $210 = HEAP32[$209>>2]|0; - $211 = ($210|0)==(0|0); - do { - if (!($211)) { - $212 = ($210>>>0)<($206>>>0); - if ($212) { - _abort(); - // unreachable; - } else { - $213 = (($R7$1) + 16|0); - HEAP32[$213>>2] = $210; - $214 = (($210) + 24|0); - HEAP32[$214>>2] = $R7$1; - break; - } - } - } while(0); - $$sum20 = (($8) + 12)|0; - $215 = (($mem) + ($$sum20)|0); - $216 = HEAP32[$215>>2]|0; - $217 = ($216|0)==(0|0); - if (!($217)) { - $218 = HEAP32[((32544 + 16|0))>>2]|0; - $219 = ($216>>>0)<($218>>>0); - if ($219) { - _abort(); - // unreachable; - } else { - $220 = (($R7$1) + 20|0); - HEAP32[$220>>2] = $216; - $221 = (($216) + 24|0); - HEAP32[$221>>2] = $R7$1; - break; - } - } - } - } - } while(0); - $222 = $133 | 1; - $223 = (($p$0) + 4|0); - HEAP32[$223>>2] = $222; - $224 = (($p$0) + ($133)|0); - HEAP32[$224>>2] = $133; - $225 = HEAP32[((32544 + 20|0))>>2]|0; - $226 = ($p$0|0)==($225|0); - if ($226) { - HEAP32[((32544 + 8|0))>>2] = $133; - STACKTOP = sp;return; + $509 = HEAP32[(32684)>>2]|0; + $510 = ($509>>>0)<($nb$0>>>0); + if (!($510)) { + $511 = (($509) - ($nb$0))|0; + $512 = HEAP32[(32696)>>2]|0; + $513 = ($511>>>0)>(15); + if ($513) { + $514 = (($512) + ($nb$0)|0); + HEAP32[(32696)>>2] = $514; + HEAP32[(32684)>>2] = $511; + $515 = $511 | 1; + $$sum2 = (($nb$0) + 4)|0; + $516 = (($512) + ($$sum2)|0); + HEAP32[$516>>2] = $515; + $517 = (($512) + ($509)|0); + HEAP32[$517>>2] = $511; + $518 = $nb$0 | 3; + $519 = ((($512)) + 4|0); + HEAP32[$519>>2] = $518; } else { - $psize$1 = $133; + HEAP32[(32684)>>2] = 0; + HEAP32[(32696)>>2] = 0; + $520 = $509 | 3; + $521 = ((($512)) + 4|0); + HEAP32[$521>>2] = $520; + $$sum1 = (($509) + 4)|0; + $522 = (($512) + ($$sum1)|0); + $523 = HEAP32[$522>>2]|0; + $524 = $523 | 1; + HEAP32[$522>>2] = $524; } - } else { - $227 = $112 & -2; - HEAP32[$111>>2] = $227; - $228 = $psize$0 | 1; - $229 = (($p$0) + 4|0); - HEAP32[$229>>2] = $228; - $230 = (($p$0) + ($psize$0)|0); - HEAP32[$230>>2] = $psize$0; - $psize$1 = $psize$0; + $525 = ((($512)) + 8|0); + $mem$0 = $525; + return ($mem$0|0); } - $231 = $psize$1 >>> 3; - $232 = ($psize$1>>>0)<(256); - if ($232) { - $233 = $231 << 1; - $234 = ((32544 + ($233<<2)|0) + 40|0); - $235 = HEAP32[32544>>2]|0; - $236 = 1 << $231; - $237 = $235 & $236; - $238 = ($237|0)==(0); - if ($238) { - $239 = $235 | $236; - HEAP32[32544>>2] = $239; - $$sum16$pre = (($233) + 2)|0; - $$pre = ((32544 + ($$sum16$pre<<2)|0) + 40|0); - $$pre$phiZ2D = $$pre;$F16$0 = $234; - } else { - $$sum17 = (($233) + 2)|0; - $240 = ((32544 + ($$sum17<<2)|0) + 40|0); - $241 = HEAP32[$240>>2]|0; - $242 = HEAP32[((32544 + 16|0))>>2]|0; - $243 = ($241>>>0)<($242>>>0); - if ($243) { + $526 = HEAP32[(32688)>>2]|0; + $527 = ($526>>>0)>($nb$0>>>0); + if ($527) { + $528 = (($526) - ($nb$0))|0; + HEAP32[(32688)>>2] = $528; + $529 = HEAP32[(32700)>>2]|0; + $530 = (($529) + ($nb$0)|0); + HEAP32[(32700)>>2] = $530; + $531 = $528 | 1; + $$sum = (($nb$0) + 4)|0; + $532 = (($529) + ($$sum)|0); + HEAP32[$532>>2] = $531; + $533 = $nb$0 | 3; + $534 = ((($529)) + 4|0); + HEAP32[$534>>2] = $533; + $535 = ((($529)) + 8|0); + $mem$0 = $535; + return ($mem$0|0); + } + $536 = HEAP32[33148>>2]|0; + $537 = ($536|0)==(0); + do { + if ($537) { + $538 = (_sysconf(30)|0); + $539 = (($538) + -1)|0; + $540 = $539 & $538; + $541 = ($540|0)==(0); + if ($541) { + HEAP32[(33156)>>2] = $538; + HEAP32[(33152)>>2] = $538; + HEAP32[(33160)>>2] = -1; + HEAP32[(33164)>>2] = -1; + HEAP32[(33168)>>2] = 0; + HEAP32[(33120)>>2] = 0; + $542 = (_time((0|0))|0); + $543 = $542 & -16; + $544 = $543 ^ 1431655768; + HEAP32[33148>>2] = $544; + break; + } else { _abort(); // unreachable; - } else { - $$pre$phiZ2D = $240;$F16$0 = $241; } } - HEAP32[$$pre$phiZ2D>>2] = $p$0; - $244 = (($F16$0) + 12|0); - HEAP32[$244>>2] = $p$0; - $245 = (($p$0) + 8|0); - HEAP32[$245>>2] = $F16$0; - $246 = (($p$0) + 12|0); - HEAP32[$246>>2] = $234; - STACKTOP = sp;return; + } while(0); + $545 = (($nb$0) + 48)|0; + $546 = HEAP32[(33156)>>2]|0; + $547 = (($nb$0) + 47)|0; + $548 = (($546) + ($547))|0; + $549 = (0 - ($546))|0; + $550 = $548 & $549; + $551 = ($550>>>0)>($nb$0>>>0); + if (!($551)) { + $mem$0 = 0; + return ($mem$0|0); } - $247 = $psize$1 >>> 8; - $248 = ($247|0)==(0); - if ($248) { - $I18$0 = 0; - } else { - $249 = ($psize$1>>>0)>(16777215); - if ($249) { - $I18$0 = 31; - } else { - $250 = (($247) + 1048320)|0; - $251 = $250 >>> 16; - $252 = $251 & 8; - $253 = $247 << $252; - $254 = (($253) + 520192)|0; - $255 = $254 >>> 16; - $256 = $255 & 4; - $257 = $256 | $252; - $258 = $253 << $256; - $259 = (($258) + 245760)|0; - $260 = $259 >>> 16; - $261 = $260 & 2; - $262 = $257 | $261; - $263 = (14 - ($262))|0; - $264 = $258 << $261; - $265 = $264 >>> 15; - $266 = (($263) + ($265))|0; - $267 = $266 << 1; - $268 = (($266) + 7)|0; - $269 = $psize$1 >>> $268; - $270 = $269 & 1; - $271 = $270 | $267; - $I18$0 = $271; + $552 = HEAP32[(33116)>>2]|0; + $553 = ($552|0)==(0); + if (!($553)) { + $554 = HEAP32[(33108)>>2]|0; + $555 = (($554) + ($550))|0; + $556 = ($555>>>0)<=($554>>>0); + $557 = ($555>>>0)>($552>>>0); + $or$cond1$i = $556 | $557; + if ($or$cond1$i) { + $mem$0 = 0; + return ($mem$0|0); } } - $272 = ((32544 + ($I18$0<<2)|0) + 304|0); - $273 = (($p$0) + 28|0); - $I18$0$c = $I18$0; - HEAP32[$273>>2] = $I18$0$c; - $274 = (($p$0) + 20|0); - HEAP32[$274>>2] = 0; - $275 = (($p$0) + 16|0); - HEAP32[$275>>2] = 0; - $276 = HEAP32[((32544 + 4|0))>>2]|0; - $277 = 1 << $I18$0; - $278 = $276 & $277; - $279 = ($278|0)==(0); - L199: do { - if ($279) { - $280 = $276 | $277; - HEAP32[((32544 + 4|0))>>2] = $280; - HEAP32[$272>>2] = $p$0; - $281 = (($p$0) + 24|0); - HEAP32[$281>>2] = $272; - $282 = (($p$0) + 12|0); - HEAP32[$282>>2] = $p$0; - $283 = (($p$0) + 8|0); - HEAP32[$283>>2] = $p$0; - } else { - $284 = HEAP32[$272>>2]|0; - $285 = ($I18$0|0)==(31); - if ($285) { - $293 = 0; - } else { - $286 = $I18$0 >>> 1; - $287 = (25 - ($286))|0; - $293 = $287; - } - $288 = (($284) + 4|0); - $289 = HEAP32[$288>>2]|0; - $290 = $289 & -8; - $291 = ($290|0)==($psize$1|0); - L205: do { - if ($291) { - $T$0$lcssa = $284; + $558 = HEAP32[(33120)>>2]|0; + $559 = $558 & 4; + $560 = ($559|0)==(0); + L258: do { + if ($560) { + $561 = HEAP32[(32700)>>2]|0; + $562 = ($561|0)==(0|0); + L260: do { + if ($562) { + label = 174; } else { - $292 = $psize$1 << $293; - $K19$058 = $292;$T$057 = $284; + $sp$0$i$i = (33124); while(1) { - $300 = $K19$058 >>> 31; - $301 = ((($T$057) + ($300<<2)|0) + 16|0); - $296 = HEAP32[$301>>2]|0; - $302 = ($296|0)==(0|0); - if ($302) { - break; + $563 = HEAP32[$sp$0$i$i>>2]|0; + $564 = ($563>>>0)>($561>>>0); + if (!($564)) { + $565 = ((($sp$0$i$i)) + 4|0); + $566 = HEAP32[$565>>2]|0; + $567 = (($563) + ($566)|0); + $568 = ($567>>>0)>($561>>>0); + if ($568) { + $$lcssa228 = $sp$0$i$i;$$lcssa230 = $565; + break; + } } - $294 = $K19$058 << 1; - $295 = (($296) + 4|0); - $297 = HEAP32[$295>>2]|0; - $298 = $297 & -8; - $299 = ($298|0)==($psize$1|0); - if ($299) { - $T$0$lcssa = $296; - break L205; + $569 = ((($sp$0$i$i)) + 8|0); + $570 = HEAP32[$569>>2]|0; + $571 = ($570|0)==(0|0); + if ($571) { + label = 174; + break L260; } else { - $K19$058 = $294;$T$057 = $296; + $sp$0$i$i = $570; } } - $303 = HEAP32[((32544 + 16|0))>>2]|0; - $304 = ($301>>>0)<($303>>>0); - if ($304) { - _abort(); - // unreachable; + $594 = HEAP32[(32688)>>2]|0; + $595 = (($548) - ($594))|0; + $596 = $595 & $549; + $597 = ($596>>>0)<(2147483647); + if ($597) { + $598 = (_sbrk(($596|0))|0); + $599 = HEAP32[$$lcssa228>>2]|0; + $600 = HEAP32[$$lcssa230>>2]|0; + $601 = (($599) + ($600)|0); + $602 = ($598|0)==($601|0); + $$3$i = $602 ? $596 : 0; + if ($602) { + $603 = ($598|0)==((-1)|0); + if ($603) { + $tsize$0323944$i = $$3$i; + } else { + $tbase$255$i = $598;$tsize$254$i = $$3$i; + label = 194; + break L258; + } + } else { + $br$0$ph$i = $598;$ssize$1$ph$i = $596;$tsize$0$ph$i = $$3$i; + label = 184; + } } else { - HEAP32[$301>>2] = $p$0; - $305 = (($p$0) + 24|0); - HEAP32[$305>>2] = $T$057; - $306 = (($p$0) + 12|0); - HEAP32[$306>>2] = $p$0; - $307 = (($p$0) + 8|0); - HEAP32[$307>>2] = $p$0; - break L199; + $tsize$0323944$i = 0; } } } while(0); - $308 = (($T$0$lcssa) + 8|0); - $309 = HEAP32[$308>>2]|0; - $310 = HEAP32[((32544 + 16|0))>>2]|0; - $311 = ($T$0$lcssa>>>0)>=($310>>>0); - $312 = ($309>>>0)>=($310>>>0); - $or$cond = $311 & $312; - if ($or$cond) { - $313 = (($309) + 12|0); - HEAP32[$313>>2] = $p$0; - HEAP32[$308>>2] = $p$0; - $314 = (($p$0) + 8|0); - HEAP32[$314>>2] = $309; - $315 = (($p$0) + 12|0); - HEAP32[$315>>2] = $T$0$lcssa; - $316 = (($p$0) + 24|0); - HEAP32[$316>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $317 = HEAP32[((32544 + 32|0))>>2]|0; - $318 = (($317) + -1)|0; - HEAP32[((32544 + 32|0))>>2] = $318; - $319 = ($318|0)==(0); - if ($319) { - $sp$0$in$i = ((32544 + 456|0)); - } else { - STACKTOP = sp;return; - } - while(1) { - $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; - $320 = ($sp$0$i|0)==(0|0); - $321 = (($sp$0$i) + 8|0); - if ($320) { - break; - } else { - $sp$0$in$i = $321; - } - } - HEAP32[((32544 + 32|0))>>2] = -1; - STACKTOP = sp;return; -} -function runPostSets() { - -} -function _bitshift64Ashr(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = high >> bits; - return (low >>> bits) | ((high&ander) << (32 - bits)); - } - tempRet0 = (high|0) < 0 ? -1 : 0; - return (high >> (bits - 32))|0; -} -function _i64Subtract(a, b, c, d) { - a = a|0; b = b|0; c = c|0; d = d|0; - var l = 0, h = 0; - l = (a - c)>>>0; - h = (b - d)>>>0; - h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow. - return ((tempRet0 = h,l|0)|0); -} -function _i64Add(a, b, c, d) { - /* - x = a + b*2^32 - y = c + d*2^32 - result = l + h*2^32 - */ - a = a|0; b = b|0; c = c|0; d = d|0; - var l = 0, h = 0; - l = (a + c)>>>0; - h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow. - return ((tempRet0 = h,l|0)|0); -} -function _memset(ptr, value, num) { - ptr = ptr|0; value = value|0; num = num|0; - var stop = 0, value4 = 0, stop4 = 0, unaligned = 0; - stop = (ptr + num)|0; - if ((num|0) >= 20) { - // This is unaligned, but quite large, so work hard to get to aligned settings - value = value & 0xff; - unaligned = ptr & 3; - value4 = value | (value << 8) | (value << 16) | (value << 24); - stop4 = stop & ~3; - if (unaligned) { - unaligned = (ptr + 4 - unaligned)|0; - while ((ptr|0) < (unaligned|0)) { // no need to check for stop, since we have large num - HEAP8[((ptr)>>0)]=value; - ptr = (ptr+1)|0; + do { + if ((label|0) == 174) { + $572 = (_sbrk(0)|0); + $573 = ($572|0)==((-1)|0); + if ($573) { + $tsize$0323944$i = 0; + } else { + $574 = $572; + $575 = HEAP32[(33152)>>2]|0; + $576 = (($575) + -1)|0; + $577 = $576 & $574; + $578 = ($577|0)==(0); + if ($578) { + $ssize$0$i = $550; + } else { + $579 = (($576) + ($574))|0; + $580 = (0 - ($575))|0; + $581 = $579 & $580; + $582 = (($550) - ($574))|0; + $583 = (($582) + ($581))|0; + $ssize$0$i = $583; + } + $584 = HEAP32[(33108)>>2]|0; + $585 = (($584) + ($ssize$0$i))|0; + $586 = ($ssize$0$i>>>0)>($nb$0>>>0); + $587 = ($ssize$0$i>>>0)<(2147483647); + $or$cond$i30 = $586 & $587; + if ($or$cond$i30) { + $588 = HEAP32[(33116)>>2]|0; + $589 = ($588|0)==(0); + if (!($589)) { + $590 = ($585>>>0)<=($584>>>0); + $591 = ($585>>>0)>($588>>>0); + $or$cond2$i = $590 | $591; + if ($or$cond2$i) { + $tsize$0323944$i = 0; + break; } + } + $592 = (_sbrk(($ssize$0$i|0))|0); + $593 = ($592|0)==($572|0); + $ssize$0$$i = $593 ? $ssize$0$i : 0; + if ($593) { + $tbase$255$i = $572;$tsize$254$i = $ssize$0$$i; + label = 194; + break L258; + } else { + $br$0$ph$i = $592;$ssize$1$ph$i = $ssize$0$i;$tsize$0$ph$i = $ssize$0$$i; + label = 184; + } + } else { + $tsize$0323944$i = 0; } - while ((ptr|0) < (stop4|0)) { - HEAP32[((ptr)>>2)]=value4; - ptr = (ptr+4)|0; + } + } + } while(0); + L280: do { + if ((label|0) == 184) { + $604 = (0 - ($ssize$1$ph$i))|0; + $605 = ($br$0$ph$i|0)!=((-1)|0); + $606 = ($ssize$1$ph$i>>>0)<(2147483647); + $or$cond5$i = $606 & $605; + $607 = ($545>>>0)>($ssize$1$ph$i>>>0); + $or$cond6$i = $607 & $or$cond5$i; + do { + if ($or$cond6$i) { + $608 = HEAP32[(33156)>>2]|0; + $609 = (($547) - ($ssize$1$ph$i))|0; + $610 = (($609) + ($608))|0; + $611 = (0 - ($608))|0; + $612 = $610 & $611; + $613 = ($612>>>0)<(2147483647); + if ($613) { + $614 = (_sbrk(($612|0))|0); + $615 = ($614|0)==((-1)|0); + if ($615) { + (_sbrk(($604|0))|0); + $tsize$0323944$i = $tsize$0$ph$i; + break L280; + } else { + $616 = (($612) + ($ssize$1$ph$i))|0; + $ssize$2$i = $616; + break; + } + } else { + $ssize$2$i = $ssize$1$ph$i; + } + } else { + $ssize$2$i = $ssize$1$ph$i; } + } while(0); + $617 = ($br$0$ph$i|0)==((-1)|0); + if ($617) { + $tsize$0323944$i = $tsize$0$ph$i; + } else { + $tbase$255$i = $br$0$ph$i;$tsize$254$i = $ssize$2$i; + label = 194; + break L258; + } } - while ((ptr|0) < (stop|0)) { - HEAP8[((ptr)>>0)]=value; - ptr = (ptr+1)|0; + } while(0); + $618 = HEAP32[(33120)>>2]|0; + $619 = $618 | 4; + HEAP32[(33120)>>2] = $619; + $tsize$1$i = $tsize$0323944$i; + label = 191; + } else { + $tsize$1$i = 0; + label = 191; + } + } while(0); + if ((label|0) == 191) { + $620 = ($550>>>0)<(2147483647); + if ($620) { + $621 = (_sbrk(($550|0))|0); + $622 = (_sbrk(0)|0); + $623 = ($621|0)!=((-1)|0); + $624 = ($622|0)!=((-1)|0); + $or$cond3$i = $623 & $624; + $625 = ($621>>>0)<($622>>>0); + $or$cond8$i = $625 & $or$cond3$i; + if ($or$cond8$i) { + $626 = $622; + $627 = $621; + $628 = (($626) - ($627))|0; + $629 = (($nb$0) + 40)|0; + $630 = ($628>>>0)>($629>>>0); + $$tsize$1$i = $630 ? $628 : $tsize$1$i; + if ($630) { + $tbase$255$i = $621;$tsize$254$i = $$tsize$1$i; + label = 194; } - return (ptr-num)|0; -} -function _bitshift64Lshr(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = high >>> bits; - return (low >>> bits) | ((high&ander) << (32 - bits)); + } + } + } + if ((label|0) == 194) { + $631 = HEAP32[(33108)>>2]|0; + $632 = (($631) + ($tsize$254$i))|0; + HEAP32[(33108)>>2] = $632; + $633 = HEAP32[(33112)>>2]|0; + $634 = ($632>>>0)>($633>>>0); + if ($634) { + HEAP32[(33112)>>2] = $632; + } + $635 = HEAP32[(32700)>>2]|0; + $636 = ($635|0)==(0|0); + L299: do { + if ($636) { + $637 = HEAP32[(32692)>>2]|0; + $638 = ($637|0)==(0|0); + $639 = ($tbase$255$i>>>0)<($637>>>0); + $or$cond9$i = $638 | $639; + if ($or$cond9$i) { + HEAP32[(32692)>>2] = $tbase$255$i; } - tempRet0 = 0; - return (high >>> (bits - 32))|0; -} -function _bitshift64Shl(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits)); - return low << bits; + HEAP32[(33124)>>2] = $tbase$255$i; + HEAP32[(33128)>>2] = $tsize$254$i; + HEAP32[(33136)>>2] = 0; + $640 = HEAP32[33148>>2]|0; + HEAP32[(32712)>>2] = $640; + HEAP32[(32708)>>2] = -1; + $i$02$i$i = 0; + while(1) { + $641 = $i$02$i$i << 1; + $642 = (32716 + ($641<<2)|0); + $$sum$i$i = (($641) + 3)|0; + $643 = (32716 + ($$sum$i$i<<2)|0); + HEAP32[$643>>2] = $642; + $$sum1$i$i = (($641) + 2)|0; + $644 = (32716 + ($$sum1$i$i<<2)|0); + HEAP32[$644>>2] = $642; + $645 = (($i$02$i$i) + 1)|0; + $exitcond$i$i = ($645|0)==(32); + if ($exitcond$i$i) { + break; + } else { + $i$02$i$i = $645; + } } - tempRet0 = low << (bits - 32); - return 0; -} -function _strlen(ptr) { - ptr = ptr|0; - var curr = 0; - curr = ptr; - while (((HEAP8[((curr)>>0)])|0)) { - curr = (curr + 1)|0; + $646 = (($tsize$254$i) + -40)|0; + $647 = ((($tbase$255$i)) + 8|0); + $648 = $647; + $649 = $648 & 7; + $650 = ($649|0)==(0); + $651 = (0 - ($648))|0; + $652 = $651 & 7; + $653 = $650 ? 0 : $652; + $654 = (($tbase$255$i) + ($653)|0); + $655 = (($646) - ($653))|0; + HEAP32[(32700)>>2] = $654; + HEAP32[(32688)>>2] = $655; + $656 = $655 | 1; + $$sum$i13$i = (($653) + 4)|0; + $657 = (($tbase$255$i) + ($$sum$i13$i)|0); + HEAP32[$657>>2] = $656; + $$sum2$i$i = (($tsize$254$i) + -36)|0; + $658 = (($tbase$255$i) + ($$sum2$i$i)|0); + HEAP32[$658>>2] = 40; + $659 = HEAP32[(33164)>>2]|0; + HEAP32[(32704)>>2] = $659; + } else { + $sp$084$i = (33124); + while(1) { + $660 = HEAP32[$sp$084$i>>2]|0; + $661 = ((($sp$084$i)) + 4|0); + $662 = HEAP32[$661>>2]|0; + $663 = (($660) + ($662)|0); + $664 = ($tbase$255$i|0)==($663|0); + if ($664) { + $$lcssa222 = $660;$$lcssa224 = $661;$$lcssa226 = $662;$sp$084$i$lcssa = $sp$084$i; + label = 204; + break; + } + $665 = ((($sp$084$i)) + 8|0); + $666 = HEAP32[$665>>2]|0; + $667 = ($666|0)==(0|0); + if ($667) { + break; + } else { + $sp$084$i = $666; + } } - return (curr - ptr)|0; -} -function _memcpy(dest, src, num) { - - dest = dest|0; src = src|0; num = num|0; - var ret = 0; - if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; - ret = dest|0; - if ((dest&3) == (src&3)) { - while (dest & 3) { - if ((num|0) == 0) return ret|0; - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); - dest = (dest+1)|0; - src = (src+1)|0; - num = (num-1)|0; + if ((label|0) == 204) { + $668 = ((($sp$084$i$lcssa)) + 12|0); + $669 = HEAP32[$668>>2]|0; + $670 = $669 & 8; + $671 = ($670|0)==(0); + if ($671) { + $672 = ($635>>>0)>=($$lcssa222>>>0); + $673 = ($635>>>0)<($tbase$255$i>>>0); + $or$cond57$i = $673 & $672; + if ($or$cond57$i) { + $674 = (($$lcssa226) + ($tsize$254$i))|0; + HEAP32[$$lcssa224>>2] = $674; + $675 = HEAP32[(32688)>>2]|0; + $676 = (($675) + ($tsize$254$i))|0; + $677 = ((($635)) + 8|0); + $678 = $677; + $679 = $678 & 7; + $680 = ($679|0)==(0); + $681 = (0 - ($678))|0; + $682 = $681 & 7; + $683 = $680 ? 0 : $682; + $684 = (($635) + ($683)|0); + $685 = (($676) - ($683))|0; + HEAP32[(32700)>>2] = $684; + HEAP32[(32688)>>2] = $685; + $686 = $685 | 1; + $$sum$i17$i = (($683) + 4)|0; + $687 = (($635) + ($$sum$i17$i)|0); + HEAP32[$687>>2] = $686; + $$sum2$i18$i = (($676) + 4)|0; + $688 = (($635) + ($$sum2$i18$i)|0); + HEAP32[$688>>2] = 40; + $689 = HEAP32[(33164)>>2]|0; + HEAP32[(32704)>>2] = $689; + break; } - while ((num|0) >= 4) { - HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); - dest = (dest+4)|0; - src = (src+4)|0; - num = (num-4)|0; + } + } + $690 = HEAP32[(32692)>>2]|0; + $691 = ($tbase$255$i>>>0)<($690>>>0); + if ($691) { + HEAP32[(32692)>>2] = $tbase$255$i; + $755 = $tbase$255$i; + } else { + $755 = $690; + } + $692 = (($tbase$255$i) + ($tsize$254$i)|0); + $sp$183$i = (33124); + while(1) { + $693 = HEAP32[$sp$183$i>>2]|0; + $694 = ($693|0)==($692|0); + if ($694) { + $$lcssa219 = $sp$183$i;$sp$183$i$lcssa = $sp$183$i; + label = 212; + break; + } + $695 = ((($sp$183$i)) + 8|0); + $696 = HEAP32[$695>>2]|0; + $697 = ($696|0)==(0|0); + if ($697) { + $sp$0$i$i$i = (33124); + break; + } else { + $sp$183$i = $696; + } + } + if ((label|0) == 212) { + $698 = ((($sp$183$i$lcssa)) + 12|0); + $699 = HEAP32[$698>>2]|0; + $700 = $699 & 8; + $701 = ($700|0)==(0); + if ($701) { + HEAP32[$$lcssa219>>2] = $tbase$255$i; + $702 = ((($sp$183$i$lcssa)) + 4|0); + $703 = HEAP32[$702>>2]|0; + $704 = (($703) + ($tsize$254$i))|0; + HEAP32[$702>>2] = $704; + $705 = ((($tbase$255$i)) + 8|0); + $706 = $705; + $707 = $706 & 7; + $708 = ($707|0)==(0); + $709 = (0 - ($706))|0; + $710 = $709 & 7; + $711 = $708 ? 0 : $710; + $712 = (($tbase$255$i) + ($711)|0); + $$sum112$i = (($tsize$254$i) + 8)|0; + $713 = (($tbase$255$i) + ($$sum112$i)|0); + $714 = $713; + $715 = $714 & 7; + $716 = ($715|0)==(0); + $717 = (0 - ($714))|0; + $718 = $717 & 7; + $719 = $716 ? 0 : $718; + $$sum113$i = (($719) + ($tsize$254$i))|0; + $720 = (($tbase$255$i) + ($$sum113$i)|0); + $721 = $720; + $722 = $712; + $723 = (($721) - ($722))|0; + $$sum$i19$i = (($711) + ($nb$0))|0; + $724 = (($tbase$255$i) + ($$sum$i19$i)|0); + $725 = (($723) - ($nb$0))|0; + $726 = $nb$0 | 3; + $$sum1$i20$i = (($711) + 4)|0; + $727 = (($tbase$255$i) + ($$sum1$i20$i)|0); + HEAP32[$727>>2] = $726; + $728 = ($720|0)==($635|0); + L324: do { + if ($728) { + $729 = HEAP32[(32688)>>2]|0; + $730 = (($729) + ($725))|0; + HEAP32[(32688)>>2] = $730; + HEAP32[(32700)>>2] = $724; + $731 = $730 | 1; + $$sum42$i$i = (($$sum$i19$i) + 4)|0; + $732 = (($tbase$255$i) + ($$sum42$i$i)|0); + HEAP32[$732>>2] = $731; + } else { + $733 = HEAP32[(32696)>>2]|0; + $734 = ($720|0)==($733|0); + if ($734) { + $735 = HEAP32[(32684)>>2]|0; + $736 = (($735) + ($725))|0; + HEAP32[(32684)>>2] = $736; + HEAP32[(32696)>>2] = $724; + $737 = $736 | 1; + $$sum40$i$i = (($$sum$i19$i) + 4)|0; + $738 = (($tbase$255$i) + ($$sum40$i$i)|0); + HEAP32[$738>>2] = $737; + $$sum41$i$i = (($736) + ($$sum$i19$i))|0; + $739 = (($tbase$255$i) + ($$sum41$i$i)|0); + HEAP32[$739>>2] = $736; + break; + } + $$sum2$i21$i = (($tsize$254$i) + 4)|0; + $$sum114$i = (($$sum2$i21$i) + ($719))|0; + $740 = (($tbase$255$i) + ($$sum114$i)|0); + $741 = HEAP32[$740>>2]|0; + $742 = $741 & 3; + $743 = ($742|0)==(1); + if ($743) { + $744 = $741 & -8; + $745 = $741 >>> 3; + $746 = ($741>>>0)<(256); + L332: do { + if ($746) { + $$sum3738$i$i = $719 | 8; + $$sum124$i = (($$sum3738$i$i) + ($tsize$254$i))|0; + $747 = (($tbase$255$i) + ($$sum124$i)|0); + $748 = HEAP32[$747>>2]|0; + $$sum39$i$i = (($tsize$254$i) + 12)|0; + $$sum125$i = (($$sum39$i$i) + ($719))|0; + $749 = (($tbase$255$i) + ($$sum125$i)|0); + $750 = HEAP32[$749>>2]|0; + $751 = $745 << 1; + $752 = (32716 + ($751<<2)|0); + $753 = ($748|0)==($752|0); + do { + if (!($753)) { + $754 = ($748>>>0)<($755>>>0); + if ($754) { + _abort(); + // unreachable; + } + $756 = ((($748)) + 12|0); + $757 = HEAP32[$756>>2]|0; + $758 = ($757|0)==($720|0); + if ($758) { + break; + } + _abort(); + // unreachable; + } + } while(0); + $759 = ($750|0)==($748|0); + if ($759) { + $760 = 1 << $745; + $761 = $760 ^ -1; + $762 = HEAP32[32676>>2]|0; + $763 = $762 & $761; + HEAP32[32676>>2] = $763; + break; + } + $764 = ($750|0)==($752|0); + do { + if ($764) { + $$pre57$i$i = ((($750)) + 8|0); + $$pre$phi58$i$iZ2D = $$pre57$i$i; + } else { + $765 = ($750>>>0)<($755>>>0); + if ($765) { + _abort(); + // unreachable; + } + $766 = ((($750)) + 8|0); + $767 = HEAP32[$766>>2]|0; + $768 = ($767|0)==($720|0); + if ($768) { + $$pre$phi58$i$iZ2D = $766; + break; + } + _abort(); + // unreachable; + } + } while(0); + $769 = ((($748)) + 12|0); + HEAP32[$769>>2] = $750; + HEAP32[$$pre$phi58$i$iZ2D>>2] = $748; + } else { + $$sum34$i$i = $719 | 24; + $$sum115$i = (($$sum34$i$i) + ($tsize$254$i))|0; + $770 = (($tbase$255$i) + ($$sum115$i)|0); + $771 = HEAP32[$770>>2]|0; + $$sum5$i$i = (($tsize$254$i) + 12)|0; + $$sum116$i = (($$sum5$i$i) + ($719))|0; + $772 = (($tbase$255$i) + ($$sum116$i)|0); + $773 = HEAP32[$772>>2]|0; + $774 = ($773|0)==($720|0); + do { + if ($774) { + $$sum67$i$i = $719 | 16; + $$sum122$i = (($$sum2$i21$i) + ($$sum67$i$i))|0; + $784 = (($tbase$255$i) + ($$sum122$i)|0); + $785 = HEAP32[$784>>2]|0; + $786 = ($785|0)==(0|0); + if ($786) { + $$sum123$i = (($$sum67$i$i) + ($tsize$254$i))|0; + $787 = (($tbase$255$i) + ($$sum123$i)|0); + $788 = HEAP32[$787>>2]|0; + $789 = ($788|0)==(0|0); + if ($789) { + $R$1$i$i = 0; + break; + } else { + $R$0$i$i = $788;$RP$0$i$i = $787; + } + } else { + $R$0$i$i = $785;$RP$0$i$i = $784; + } + while(1) { + $790 = ((($R$0$i$i)) + 20|0); + $791 = HEAP32[$790>>2]|0; + $792 = ($791|0)==(0|0); + if (!($792)) { + $R$0$i$i = $791;$RP$0$i$i = $790; + continue; + } + $793 = ((($R$0$i$i)) + 16|0); + $794 = HEAP32[$793>>2]|0; + $795 = ($794|0)==(0|0); + if ($795) { + $R$0$i$i$lcssa = $R$0$i$i;$RP$0$i$i$lcssa = $RP$0$i$i; + break; + } else { + $R$0$i$i = $794;$RP$0$i$i = $793; + } + } + $796 = ($RP$0$i$i$lcssa>>>0)<($755>>>0); + if ($796) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$0$i$i$lcssa>>2] = 0; + $R$1$i$i = $R$0$i$i$lcssa; + break; + } + } else { + $$sum3536$i$i = $719 | 8; + $$sum117$i = (($$sum3536$i$i) + ($tsize$254$i))|0; + $775 = (($tbase$255$i) + ($$sum117$i)|0); + $776 = HEAP32[$775>>2]|0; + $777 = ($776>>>0)<($755>>>0); + if ($777) { + _abort(); + // unreachable; + } + $778 = ((($776)) + 12|0); + $779 = HEAP32[$778>>2]|0; + $780 = ($779|0)==($720|0); + if (!($780)) { + _abort(); + // unreachable; + } + $781 = ((($773)) + 8|0); + $782 = HEAP32[$781>>2]|0; + $783 = ($782|0)==($720|0); + if ($783) { + HEAP32[$778>>2] = $773; + HEAP32[$781>>2] = $776; + $R$1$i$i = $773; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $797 = ($771|0)==(0|0); + if ($797) { + break; + } + $$sum30$i$i = (($tsize$254$i) + 28)|0; + $$sum118$i = (($$sum30$i$i) + ($719))|0; + $798 = (($tbase$255$i) + ($$sum118$i)|0); + $799 = HEAP32[$798>>2]|0; + $800 = (32980 + ($799<<2)|0); + $801 = HEAP32[$800>>2]|0; + $802 = ($720|0)==($801|0); + do { + if ($802) { + HEAP32[$800>>2] = $R$1$i$i; + $cond$i$i = ($R$1$i$i|0)==(0|0); + if (!($cond$i$i)) { + break; + } + $803 = 1 << $799; + $804 = $803 ^ -1; + $805 = HEAP32[(32680)>>2]|0; + $806 = $805 & $804; + HEAP32[(32680)>>2] = $806; + break L332; + } else { + $807 = HEAP32[(32692)>>2]|0; + $808 = ($771>>>0)<($807>>>0); + if ($808) { + _abort(); + // unreachable; + } + $809 = ((($771)) + 16|0); + $810 = HEAP32[$809>>2]|0; + $811 = ($810|0)==($720|0); + if ($811) { + HEAP32[$809>>2] = $R$1$i$i; + } else { + $812 = ((($771)) + 20|0); + HEAP32[$812>>2] = $R$1$i$i; + } + $813 = ($R$1$i$i|0)==(0|0); + if ($813) { + break L332; + } + } + } while(0); + $814 = HEAP32[(32692)>>2]|0; + $815 = ($R$1$i$i>>>0)<($814>>>0); + if ($815) { + _abort(); + // unreachable; + } + $816 = ((($R$1$i$i)) + 24|0); + HEAP32[$816>>2] = $771; + $$sum3132$i$i = $719 | 16; + $$sum119$i = (($$sum3132$i$i) + ($tsize$254$i))|0; + $817 = (($tbase$255$i) + ($$sum119$i)|0); + $818 = HEAP32[$817>>2]|0; + $819 = ($818|0)==(0|0); + do { + if (!($819)) { + $820 = ($818>>>0)<($814>>>0); + if ($820) { + _abort(); + // unreachable; + } else { + $821 = ((($R$1$i$i)) + 16|0); + HEAP32[$821>>2] = $818; + $822 = ((($818)) + 24|0); + HEAP32[$822>>2] = $R$1$i$i; + break; + } + } + } while(0); + $$sum120$i = (($$sum2$i21$i) + ($$sum3132$i$i))|0; + $823 = (($tbase$255$i) + ($$sum120$i)|0); + $824 = HEAP32[$823>>2]|0; + $825 = ($824|0)==(0|0); + if ($825) { + break; + } + $826 = HEAP32[(32692)>>2]|0; + $827 = ($824>>>0)<($826>>>0); + if ($827) { + _abort(); + // unreachable; + } else { + $828 = ((($R$1$i$i)) + 20|0); + HEAP32[$828>>2] = $824; + $829 = ((($824)) + 24|0); + HEAP32[$829>>2] = $R$1$i$i; + break; + } + } + } while(0); + $$sum9$i$i = $744 | $719; + $$sum121$i = (($$sum9$i$i) + ($tsize$254$i))|0; + $830 = (($tbase$255$i) + ($$sum121$i)|0); + $831 = (($744) + ($725))|0; + $oldfirst$0$i$i = $830;$qsize$0$i$i = $831; + } else { + $oldfirst$0$i$i = $720;$qsize$0$i$i = $725; + } + $832 = ((($oldfirst$0$i$i)) + 4|0); + $833 = HEAP32[$832>>2]|0; + $834 = $833 & -2; + HEAP32[$832>>2] = $834; + $835 = $qsize$0$i$i | 1; + $$sum10$i$i = (($$sum$i19$i) + 4)|0; + $836 = (($tbase$255$i) + ($$sum10$i$i)|0); + HEAP32[$836>>2] = $835; + $$sum11$i$i = (($qsize$0$i$i) + ($$sum$i19$i))|0; + $837 = (($tbase$255$i) + ($$sum11$i$i)|0); + HEAP32[$837>>2] = $qsize$0$i$i; + $838 = $qsize$0$i$i >>> 3; + $839 = ($qsize$0$i$i>>>0)<(256); + if ($839) { + $840 = $838 << 1; + $841 = (32716 + ($840<<2)|0); + $842 = HEAP32[32676>>2]|0; + $843 = 1 << $838; + $844 = $842 & $843; + $845 = ($844|0)==(0); + do { + if ($845) { + $846 = $842 | $843; + HEAP32[32676>>2] = $846; + $$pre$i22$i = (($840) + 2)|0; + $$pre56$i$i = (32716 + ($$pre$i22$i<<2)|0); + $$pre$phi$i23$iZ2D = $$pre56$i$i;$F4$0$i$i = $841; + } else { + $$sum29$i$i = (($840) + 2)|0; + $847 = (32716 + ($$sum29$i$i<<2)|0); + $848 = HEAP32[$847>>2]|0; + $849 = HEAP32[(32692)>>2]|0; + $850 = ($848>>>0)<($849>>>0); + if (!($850)) { + $$pre$phi$i23$iZ2D = $847;$F4$0$i$i = $848; + break; + } + _abort(); + // unreachable; + } + } while(0); + HEAP32[$$pre$phi$i23$iZ2D>>2] = $724; + $851 = ((($F4$0$i$i)) + 12|0); + HEAP32[$851>>2] = $724; + $$sum27$i$i = (($$sum$i19$i) + 8)|0; + $852 = (($tbase$255$i) + ($$sum27$i$i)|0); + HEAP32[$852>>2] = $F4$0$i$i; + $$sum28$i$i = (($$sum$i19$i) + 12)|0; + $853 = (($tbase$255$i) + ($$sum28$i$i)|0); + HEAP32[$853>>2] = $841; + break; + } + $854 = $qsize$0$i$i >>> 8; + $855 = ($854|0)==(0); + do { + if ($855) { + $I7$0$i$i = 0; + } else { + $856 = ($qsize$0$i$i>>>0)>(16777215); + if ($856) { + $I7$0$i$i = 31; + break; + } + $857 = (($854) + 1048320)|0; + $858 = $857 >>> 16; + $859 = $858 & 8; + $860 = $854 << $859; + $861 = (($860) + 520192)|0; + $862 = $861 >>> 16; + $863 = $862 & 4; + $864 = $863 | $859; + $865 = $860 << $863; + $866 = (($865) + 245760)|0; + $867 = $866 >>> 16; + $868 = $867 & 2; + $869 = $864 | $868; + $870 = (14 - ($869))|0; + $871 = $865 << $868; + $872 = $871 >>> 15; + $873 = (($870) + ($872))|0; + $874 = $873 << 1; + $875 = (($873) + 7)|0; + $876 = $qsize$0$i$i >>> $875; + $877 = $876 & 1; + $878 = $877 | $874; + $I7$0$i$i = $878; + } + } while(0); + $879 = (32980 + ($I7$0$i$i<<2)|0); + $$sum12$i$i = (($$sum$i19$i) + 28)|0; + $880 = (($tbase$255$i) + ($$sum12$i$i)|0); + HEAP32[$880>>2] = $I7$0$i$i; + $$sum13$i$i = (($$sum$i19$i) + 16)|0; + $881 = (($tbase$255$i) + ($$sum13$i$i)|0); + $$sum14$i$i = (($$sum$i19$i) + 20)|0; + $882 = (($tbase$255$i) + ($$sum14$i$i)|0); + HEAP32[$882>>2] = 0; + HEAP32[$881>>2] = 0; + $883 = HEAP32[(32680)>>2]|0; + $884 = 1 << $I7$0$i$i; + $885 = $883 & $884; + $886 = ($885|0)==(0); + if ($886) { + $887 = $883 | $884; + HEAP32[(32680)>>2] = $887; + HEAP32[$879>>2] = $724; + $$sum15$i$i = (($$sum$i19$i) + 24)|0; + $888 = (($tbase$255$i) + ($$sum15$i$i)|0); + HEAP32[$888>>2] = $879; + $$sum16$i$i = (($$sum$i19$i) + 12)|0; + $889 = (($tbase$255$i) + ($$sum16$i$i)|0); + HEAP32[$889>>2] = $724; + $$sum17$i$i = (($$sum$i19$i) + 8)|0; + $890 = (($tbase$255$i) + ($$sum17$i$i)|0); + HEAP32[$890>>2] = $724; + break; + } + $891 = HEAP32[$879>>2]|0; + $892 = ((($891)) + 4|0); + $893 = HEAP32[$892>>2]|0; + $894 = $893 & -8; + $895 = ($894|0)==($qsize$0$i$i|0); + L418: do { + if ($895) { + $T$0$lcssa$i25$i = $891; + } else { + $896 = ($I7$0$i$i|0)==(31); + $897 = $I7$0$i$i >>> 1; + $898 = (25 - ($897))|0; + $899 = $896 ? 0 : $898; + $900 = $qsize$0$i$i << $899; + $K8$051$i$i = $900;$T$050$i$i = $891; + while(1) { + $907 = $K8$051$i$i >>> 31; + $908 = (((($T$050$i$i)) + 16|0) + ($907<<2)|0); + $903 = HEAP32[$908>>2]|0; + $909 = ($903|0)==(0|0); + if ($909) { + $$lcssa = $908;$T$050$i$i$lcssa = $T$050$i$i; + break; + } + $901 = $K8$051$i$i << 1; + $902 = ((($903)) + 4|0); + $904 = HEAP32[$902>>2]|0; + $905 = $904 & -8; + $906 = ($905|0)==($qsize$0$i$i|0); + if ($906) { + $T$0$lcssa$i25$i = $903; + break L418; + } else { + $K8$051$i$i = $901;$T$050$i$i = $903; + } + } + $910 = HEAP32[(32692)>>2]|0; + $911 = ($$lcssa>>>0)<($910>>>0); + if ($911) { + _abort(); + // unreachable; + } else { + HEAP32[$$lcssa>>2] = $724; + $$sum23$i$i = (($$sum$i19$i) + 24)|0; + $912 = (($tbase$255$i) + ($$sum23$i$i)|0); + HEAP32[$912>>2] = $T$050$i$i$lcssa; + $$sum24$i$i = (($$sum$i19$i) + 12)|0; + $913 = (($tbase$255$i) + ($$sum24$i$i)|0); + HEAP32[$913>>2] = $724; + $$sum25$i$i = (($$sum$i19$i) + 8)|0; + $914 = (($tbase$255$i) + ($$sum25$i$i)|0); + HEAP32[$914>>2] = $724; + break L324; + } + } + } while(0); + $915 = ((($T$0$lcssa$i25$i)) + 8|0); + $916 = HEAP32[$915>>2]|0; + $917 = HEAP32[(32692)>>2]|0; + $918 = ($916>>>0)>=($917>>>0); + $not$$i26$i = ($T$0$lcssa$i25$i>>>0)>=($917>>>0); + $919 = $918 & $not$$i26$i; + if ($919) { + $920 = ((($916)) + 12|0); + HEAP32[$920>>2] = $724; + HEAP32[$915>>2] = $724; + $$sum20$i$i = (($$sum$i19$i) + 8)|0; + $921 = (($tbase$255$i) + ($$sum20$i$i)|0); + HEAP32[$921>>2] = $916; + $$sum21$i$i = (($$sum$i19$i) + 12)|0; + $922 = (($tbase$255$i) + ($$sum21$i$i)|0); + HEAP32[$922>>2] = $T$0$lcssa$i25$i; + $$sum22$i$i = (($$sum$i19$i) + 24)|0; + $923 = (($tbase$255$i) + ($$sum22$i$i)|0); + HEAP32[$923>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $$sum1819$i$i = $711 | 8; + $924 = (($tbase$255$i) + ($$sum1819$i$i)|0); + $mem$0 = $924; + return ($mem$0|0); + } else { + $sp$0$i$i$i = (33124); + } + } + while(1) { + $925 = HEAP32[$sp$0$i$i$i>>2]|0; + $926 = ($925>>>0)>($635>>>0); + if (!($926)) { + $927 = ((($sp$0$i$i$i)) + 4|0); + $928 = HEAP32[$927>>2]|0; + $929 = (($925) + ($928)|0); + $930 = ($929>>>0)>($635>>>0); + if ($930) { + $$lcssa215 = $925;$$lcssa216 = $928;$$lcssa217 = $929; + break; } + } + $931 = ((($sp$0$i$i$i)) + 8|0); + $932 = HEAP32[$931>>2]|0; + $sp$0$i$i$i = $932; } - while ((num|0) > 0) { - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); - dest = (dest+1)|0; - src = (src+1)|0; - num = (num-1)|0; + $$sum$i14$i = (($$lcssa216) + -47)|0; + $$sum1$i15$i = (($$lcssa216) + -39)|0; + $933 = (($$lcssa215) + ($$sum1$i15$i)|0); + $934 = $933; + $935 = $934 & 7; + $936 = ($935|0)==(0); + $937 = (0 - ($934))|0; + $938 = $937 & 7; + $939 = $936 ? 0 : $938; + $$sum2$i16$i = (($$sum$i14$i) + ($939))|0; + $940 = (($$lcssa215) + ($$sum2$i16$i)|0); + $941 = ((($635)) + 16|0); + $942 = ($940>>>0)<($941>>>0); + $943 = $942 ? $635 : $940; + $944 = ((($943)) + 8|0); + $945 = (($tsize$254$i) + -40)|0; + $946 = ((($tbase$255$i)) + 8|0); + $947 = $946; + $948 = $947 & 7; + $949 = ($948|0)==(0); + $950 = (0 - ($947))|0; + $951 = $950 & 7; + $952 = $949 ? 0 : $951; + $953 = (($tbase$255$i) + ($952)|0); + $954 = (($945) - ($952))|0; + HEAP32[(32700)>>2] = $953; + HEAP32[(32688)>>2] = $954; + $955 = $954 | 1; + $$sum$i$i$i = (($952) + 4)|0; + $956 = (($tbase$255$i) + ($$sum$i$i$i)|0); + HEAP32[$956>>2] = $955; + $$sum2$i$i$i = (($tsize$254$i) + -36)|0; + $957 = (($tbase$255$i) + ($$sum2$i$i$i)|0); + HEAP32[$957>>2] = 40; + $958 = HEAP32[(33164)>>2]|0; + HEAP32[(32704)>>2] = $958; + $959 = ((($943)) + 4|0); + HEAP32[$959>>2] = 27; + ;HEAP32[$944>>2]=HEAP32[(33124)>>2]|0;HEAP32[$944+4>>2]=HEAP32[(33124)+4>>2]|0;HEAP32[$944+8>>2]=HEAP32[(33124)+8>>2]|0;HEAP32[$944+12>>2]=HEAP32[(33124)+12>>2]|0; + HEAP32[(33124)>>2] = $tbase$255$i; + HEAP32[(33128)>>2] = $tsize$254$i; + HEAP32[(33136)>>2] = 0; + HEAP32[(33132)>>2] = $944; + $960 = ((($943)) + 28|0); + HEAP32[$960>>2] = 7; + $961 = ((($943)) + 32|0); + $962 = ($961>>>0)<($$lcssa217>>>0); + if ($962) { + $964 = $960; + while(1) { + $963 = ((($964)) + 4|0); + HEAP32[$963>>2] = 7; + $965 = ((($964)) + 8|0); + $966 = ($965>>>0)<($$lcssa217>>>0); + if ($966) { + $964 = $963; + } else { + break; + } + } } - return ret|0; -} -function _memmove(dest, src, num) { - dest = dest|0; src = src|0; num = num|0; - var ret = 0; - if (((src|0) < (dest|0)) & ((dest|0) < ((src + num)|0))) { - // Unlikely case: Copy backwards in a safe manner - ret = dest; - src = (src + num)|0; - dest = (dest + num)|0; - while ((num|0) > 0) { - dest = (dest - 1)|0; - src = (src - 1)|0; - num = (num - 1)|0; - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + $967 = ($943|0)==($635|0); + if (!($967)) { + $968 = $943; + $969 = $635; + $970 = (($968) - ($969))|0; + $971 = HEAP32[$959>>2]|0; + $972 = $971 & -2; + HEAP32[$959>>2] = $972; + $973 = $970 | 1; + $974 = ((($635)) + 4|0); + HEAP32[$974>>2] = $973; + HEAP32[$943>>2] = $970; + $975 = $970 >>> 3; + $976 = ($970>>>0)<(256); + if ($976) { + $977 = $975 << 1; + $978 = (32716 + ($977<<2)|0); + $979 = HEAP32[32676>>2]|0; + $980 = 1 << $975; + $981 = $979 & $980; + $982 = ($981|0)==(0); + if ($982) { + $983 = $979 | $980; + HEAP32[32676>>2] = $983; + $$pre$i$i = (($977) + 2)|0; + $$pre14$i$i = (32716 + ($$pre$i$i<<2)|0); + $$pre$phi$i$iZ2D = $$pre14$i$i;$F$0$i$i = $978; + } else { + $$sum4$i$i = (($977) + 2)|0; + $984 = (32716 + ($$sum4$i$i<<2)|0); + $985 = HEAP32[$984>>2]|0; + $986 = HEAP32[(32692)>>2]|0; + $987 = ($985>>>0)<($986>>>0); + if ($987) { + _abort(); + // unreachable; + } else { + $$pre$phi$i$iZ2D = $984;$F$0$i$i = $985; + } } - dest = ret; - } else { - _memcpy(dest, src, num) | 0; + HEAP32[$$pre$phi$i$iZ2D>>2] = $635; + $988 = ((($F$0$i$i)) + 12|0); + HEAP32[$988>>2] = $635; + $989 = ((($635)) + 8|0); + HEAP32[$989>>2] = $F$0$i$i; + $990 = ((($635)) + 12|0); + HEAP32[$990>>2] = $978; + break; + } + $991 = $970 >>> 8; + $992 = ($991|0)==(0); + if ($992) { + $I1$0$i$i = 0; + } else { + $993 = ($970>>>0)>(16777215); + if ($993) { + $I1$0$i$i = 31; + } else { + $994 = (($991) + 1048320)|0; + $995 = $994 >>> 16; + $996 = $995 & 8; + $997 = $991 << $996; + $998 = (($997) + 520192)|0; + $999 = $998 >>> 16; + $1000 = $999 & 4; + $1001 = $1000 | $996; + $1002 = $997 << $1000; + $1003 = (($1002) + 245760)|0; + $1004 = $1003 >>> 16; + $1005 = $1004 & 2; + $1006 = $1001 | $1005; + $1007 = (14 - ($1006))|0; + $1008 = $1002 << $1005; + $1009 = $1008 >>> 15; + $1010 = (($1007) + ($1009))|0; + $1011 = $1010 << 1; + $1012 = (($1010) + 7)|0; + $1013 = $970 >>> $1012; + $1014 = $1013 & 1; + $1015 = $1014 | $1011; + $I1$0$i$i = $1015; + } + } + $1016 = (32980 + ($I1$0$i$i<<2)|0); + $1017 = ((($635)) + 28|0); + HEAP32[$1017>>2] = $I1$0$i$i; + $1018 = ((($635)) + 20|0); + HEAP32[$1018>>2] = 0; + HEAP32[$941>>2] = 0; + $1019 = HEAP32[(32680)>>2]|0; + $1020 = 1 << $I1$0$i$i; + $1021 = $1019 & $1020; + $1022 = ($1021|0)==(0); + if ($1022) { + $1023 = $1019 | $1020; + HEAP32[(32680)>>2] = $1023; + HEAP32[$1016>>2] = $635; + $1024 = ((($635)) + 24|0); + HEAP32[$1024>>2] = $1016; + $1025 = ((($635)) + 12|0); + HEAP32[$1025>>2] = $635; + $1026 = ((($635)) + 8|0); + HEAP32[$1026>>2] = $635; + break; + } + $1027 = HEAP32[$1016>>2]|0; + $1028 = ((($1027)) + 4|0); + $1029 = HEAP32[$1028>>2]|0; + $1030 = $1029 & -8; + $1031 = ($1030|0)==($970|0); + L459: do { + if ($1031) { + $T$0$lcssa$i$i = $1027; + } else { + $1032 = ($I1$0$i$i|0)==(31); + $1033 = $I1$0$i$i >>> 1; + $1034 = (25 - ($1033))|0; + $1035 = $1032 ? 0 : $1034; + $1036 = $970 << $1035; + $K2$07$i$i = $1036;$T$06$i$i = $1027; + while(1) { + $1043 = $K2$07$i$i >>> 31; + $1044 = (((($T$06$i$i)) + 16|0) + ($1043<<2)|0); + $1039 = HEAP32[$1044>>2]|0; + $1045 = ($1039|0)==(0|0); + if ($1045) { + $$lcssa211 = $1044;$T$06$i$i$lcssa = $T$06$i$i; + break; + } + $1037 = $K2$07$i$i << 1; + $1038 = ((($1039)) + 4|0); + $1040 = HEAP32[$1038>>2]|0; + $1041 = $1040 & -8; + $1042 = ($1041|0)==($970|0); + if ($1042) { + $T$0$lcssa$i$i = $1039; + break L459; + } else { + $K2$07$i$i = $1037;$T$06$i$i = $1039; + } + } + $1046 = HEAP32[(32692)>>2]|0; + $1047 = ($$lcssa211>>>0)<($1046>>>0); + if ($1047) { + _abort(); + // unreachable; + } else { + HEAP32[$$lcssa211>>2] = $635; + $1048 = ((($635)) + 24|0); + HEAP32[$1048>>2] = $T$06$i$i$lcssa; + $1049 = ((($635)) + 12|0); + HEAP32[$1049>>2] = $635; + $1050 = ((($635)) + 8|0); + HEAP32[$1050>>2] = $635; + break L299; + } + } + } while(0); + $1051 = ((($T$0$lcssa$i$i)) + 8|0); + $1052 = HEAP32[$1051>>2]|0; + $1053 = HEAP32[(32692)>>2]|0; + $1054 = ($1052>>>0)>=($1053>>>0); + $not$$i$i = ($T$0$lcssa$i$i>>>0)>=($1053>>>0); + $1055 = $1054 & $not$$i$i; + if ($1055) { + $1056 = ((($1052)) + 12|0); + HEAP32[$1056>>2] = $635; + HEAP32[$1051>>2] = $635; + $1057 = ((($635)) + 8|0); + HEAP32[$1057>>2] = $1052; + $1058 = ((($635)) + 12|0); + HEAP32[$1058>>2] = $T$0$lcssa$i$i; + $1059 = ((($635)) + 24|0); + HEAP32[$1059>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } } - return dest | 0; -} -function _llvm_ctlz_i32(x) { - x = x|0; - var ret = 0; - ret = ((HEAP8[(((ctlz_i8)+(x >>> 24))>>0)])|0); - if ((ret|0) < 8) return ret|0; - ret = ((HEAP8[(((ctlz_i8)+((x >> 16)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 8)|0; - ret = ((HEAP8[(((ctlz_i8)+((x >> 8)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 16)|0; - return (((HEAP8[(((ctlz_i8)+(x&0xff))>>0)])|0) + 24)|0; - } - -function _llvm_cttz_i32(x) { - x = x|0; - var ret = 0; - ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0); - if ((ret|0) < 8) return ret|0; - ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 8)|0; - ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 16)|0; - return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0; + } + } while(0); + $1060 = HEAP32[(32688)>>2]|0; + $1061 = ($1060>>>0)>($nb$0>>>0); + if ($1061) { + $1062 = (($1060) - ($nb$0))|0; + HEAP32[(32688)>>2] = $1062; + $1063 = HEAP32[(32700)>>2]|0; + $1064 = (($1063) + ($nb$0)|0); + HEAP32[(32700)>>2] = $1064; + $1065 = $1062 | 1; + $$sum$i32 = (($nb$0) + 4)|0; + $1066 = (($1063) + ($$sum$i32)|0); + HEAP32[$1066>>2] = $1065; + $1067 = $nb$0 | 3; + $1068 = ((($1063)) + 4|0); + HEAP32[$1068>>2] = $1067; + $1069 = ((($1063)) + 8|0); + $mem$0 = $1069; + return ($mem$0|0); } - -// ======== compiled code from system/lib/compiler-rt , see readme therein -function ___muldsi3($a, $b) { - $a = $a | 0; - $b = $b | 0; - var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0; - $1 = $a & 65535; - $2 = $b & 65535; - $3 = Math_imul($2, $1) | 0; - $6 = $a >>> 16; - $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0; - $11 = $b >>> 16; - $12 = Math_imul($11, $1) | 0; - return (tempRet0 = (($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0, 0 | ($8 + $12 << 16 | $3 & 65535)) | 0; -} -function ___divdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $7$0 = 0, $7$1 = 0, $8$0 = 0, $10$0 = 0; - $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; - $4$1 = tempRet0; - $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; - $7$0 = $2$0 ^ $1$0; - $7$1 = $2$1 ^ $1$1; - $8$0 = ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, 0) | 0; - $10$0 = _i64Subtract($8$0 ^ $7$0, tempRet0 ^ $7$1, $7$0, $7$1) | 0; - return (tempRet0 = tempRet0, $10$0) | 0; -} -function ___remdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $rem = 0, $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $10$0 = 0, $10$1 = 0, __stackBase__ = 0; - __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; - $rem = __stackBase__ | 0; - $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; - $4$1 = tempRet0; - $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; - ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, $rem) | 0; - $10$0 = _i64Subtract(HEAP32[$rem >> 2] ^ $1$0, HEAP32[$rem + 4 >> 2] ^ $1$1, $1$0, $1$1) | 0; - $10$1 = tempRet0; - STACKTOP = __stackBase__; - return (tempRet0 = $10$1, $10$0) | 0; -} -function ___muldi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0; - $x_sroa_0_0_extract_trunc = $a$0; - $y_sroa_0_0_extract_trunc = $b$0; - $1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0; - $1$1 = tempRet0; - $2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0; - return (tempRet0 = ((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0, 0 | $1$0 & -1) | 0; -} -function ___udivdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $1$0 = 0; - $1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0; - return (tempRet0 = tempRet0, $1$0) | 0; -} -function ___uremdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $rem = 0, __stackBase__ = 0; - __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; - $rem = __stackBase__ | 0; - ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0; - STACKTOP = __stackBase__; - return (tempRet0 = HEAP32[$rem + 4 >> 2] | 0, HEAP32[$rem >> 2] | 0) | 0; + } + $1070 = (___errno_location()|0); + HEAP32[$1070>>2] = 12; + $mem$0 = 0; + return ($mem$0|0); } -function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - $rem = $rem | 0; - var $n_sroa_0_0_extract_trunc = 0, $n_sroa_1_4_extract_shift$0 = 0, $n_sroa_1_4_extract_trunc = 0, $d_sroa_0_0_extract_trunc = 0, $d_sroa_1_4_extract_shift$0 = 0, $d_sroa_1_4_extract_trunc = 0, $4 = 0, $17 = 0, $37 = 0, $49 = 0, $51 = 0, $57 = 0, $58 = 0, $66 = 0, $78 = 0, $86 = 0, $88 = 0, $89 = 0, $91 = 0, $92 = 0, $95 = 0, $105 = 0, $117 = 0, $119 = 0, $125 = 0, $126 = 0, $130 = 0, $q_sroa_1_1_ph = 0, $q_sroa_0_1_ph = 0, $r_sroa_1_1_ph = 0, $r_sroa_0_1_ph = 0, $sr_1_ph = 0, $d_sroa_0_0_insert_insert99$0 = 0, $d_sroa_0_0_insert_insert99$1 = 0, $137$0 = 0, $137$1 = 0, $carry_0203 = 0, $sr_1202 = 0, $r_sroa_0_1201 = 0, $r_sroa_1_1200 = 0, $q_sroa_0_1199 = 0, $q_sroa_1_1198 = 0, $147 = 0, $149 = 0, $r_sroa_0_0_insert_insert42$0 = 0, $r_sroa_0_0_insert_insert42$1 = 0, $150$1 = 0, $151$0 = 0, $152 = 0, $154$0 = 0, $r_sroa_0_0_extract_trunc = 0, $r_sroa_1_4_extract_trunc = 0, $155 = 0, $carry_0_lcssa$0 = 0, $carry_0_lcssa$1 = 0, $r_sroa_0_1_lcssa = 0, $r_sroa_1_1_lcssa = 0, $q_sroa_0_1_lcssa = 0, $q_sroa_1_1_lcssa = 0, $q_sroa_0_0_insert_ext75$0 = 0, $q_sroa_0_0_insert_ext75$1 = 0, $q_sroa_0_0_insert_insert77$1 = 0, $_0$0 = 0, $_0$1 = 0; - $n_sroa_0_0_extract_trunc = $a$0; - $n_sroa_1_4_extract_shift$0 = $a$1; - $n_sroa_1_4_extract_trunc = $n_sroa_1_4_extract_shift$0; - $d_sroa_0_0_extract_trunc = $b$0; - $d_sroa_1_4_extract_shift$0 = $b$1; - $d_sroa_1_4_extract_trunc = $d_sroa_1_4_extract_shift$0; - if (($n_sroa_1_4_extract_trunc | 0) == 0) { - $4 = ($rem | 0) != 0; - if (($d_sroa_1_4_extract_trunc | 0) == 0) { - if ($4) { - HEAP32[$rem >> 2] = ($n_sroa_0_0_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); - HEAP32[$rem + 4 >> 2] = 0; - } - $_0$1 = 0; - $_0$0 = ($n_sroa_0_0_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; +function _free($mem) { + $mem = $mem|0; + var $$lcssa = 0, $$pre = 0, $$pre$phi59Z2D = 0, $$pre$phi61Z2D = 0, $$pre$phiZ2D = 0, $$pre57 = 0, $$pre58 = 0, $$pre60 = 0, $$sum = 0, $$sum11 = 0, $$sum12 = 0, $$sum13 = 0, $$sum14 = 0, $$sum1718 = 0, $$sum19 = 0, $$sum2 = 0, $$sum20 = 0, $$sum22 = 0, $$sum23 = 0, $$sum24 = 0; + var $$sum25 = 0, $$sum26 = 0, $$sum27 = 0, $$sum28 = 0, $$sum29 = 0, $$sum3 = 0, $$sum30 = 0, $$sum31 = 0, $$sum5 = 0, $$sum67 = 0, $$sum8 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0; + var $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0; + var $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0; + var $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0; + var $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0; + var $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0; + var $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0; + var $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0; + var $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0; + var $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0; + var $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0; + var $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0; + var $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0; + var $321 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0; + var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0; + var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0; + var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F16$0 = 0, $I18$0 = 0, $K19$052 = 0, $R$0 = 0, $R$0$lcssa = 0, $R$1 = 0; + var $R7$0 = 0, $R7$0$lcssa = 0, $R7$1 = 0, $RP$0 = 0, $RP$0$lcssa = 0, $RP9$0 = 0, $RP9$0$lcssa = 0, $T$0$lcssa = 0, $T$051 = 0, $T$051$lcssa = 0, $cond = 0, $cond47 = 0, $not$ = 0, $p$0 = 0, $psize$0 = 0, $psize$1 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ($mem|0)==(0|0); + if ($0) { + return; + } + $1 = ((($mem)) + -8|0); + $2 = HEAP32[(32692)>>2]|0; + $3 = ($1>>>0)<($2>>>0); + if ($3) { + _abort(); + // unreachable; + } + $4 = ((($mem)) + -4|0); + $5 = HEAP32[$4>>2]|0; + $6 = $5 & 3; + $7 = ($6|0)==(1); + if ($7) { + _abort(); + // unreachable; + } + $8 = $5 & -8; + $$sum = (($8) + -8)|0; + $9 = (($mem) + ($$sum)|0); + $10 = $5 & 1; + $11 = ($10|0)==(0); + do { + if ($11) { + $12 = HEAP32[$1>>2]|0; + $13 = ($6|0)==(0); + if ($13) { + return; + } + $$sum2 = (-8 - ($12))|0; + $14 = (($mem) + ($$sum2)|0); + $15 = (($12) + ($8))|0; + $16 = ($14>>>0)<($2>>>0); + if ($16) { + _abort(); + // unreachable; + } + $17 = HEAP32[(32696)>>2]|0; + $18 = ($14|0)==($17|0); + if ($18) { + $$sum3 = (($8) + -4)|0; + $103 = (($mem) + ($$sum3)|0); + $104 = HEAP32[$103>>2]|0; + $105 = $104 & 3; + $106 = ($105|0)==(3); + if (!($106)) { + $p$0 = $14;$psize$0 = $15; + break; + } + HEAP32[(32684)>>2] = $15; + $107 = $104 & -2; + HEAP32[$103>>2] = $107; + $108 = $15 | 1; + $$sum20 = (($$sum2) + 4)|0; + $109 = (($mem) + ($$sum20)|0); + HEAP32[$109>>2] = $108; + HEAP32[$9>>2] = $15; + return; + } + $19 = $12 >>> 3; + $20 = ($12>>>0)<(256); + if ($20) { + $$sum30 = (($$sum2) + 8)|0; + $21 = (($mem) + ($$sum30)|0); + $22 = HEAP32[$21>>2]|0; + $$sum31 = (($$sum2) + 12)|0; + $23 = (($mem) + ($$sum31)|0); + $24 = HEAP32[$23>>2]|0; + $25 = $19 << 1; + $26 = (32716 + ($25<<2)|0); + $27 = ($22|0)==($26|0); + if (!($27)) { + $28 = ($22>>>0)<($2>>>0); + if ($28) { + _abort(); + // unreachable; + } + $29 = ((($22)) + 12|0); + $30 = HEAP32[$29>>2]|0; + $31 = ($30|0)==($14|0); + if (!($31)) { + _abort(); + // unreachable; + } + } + $32 = ($24|0)==($22|0); + if ($32) { + $33 = 1 << $19; + $34 = $33 ^ -1; + $35 = HEAP32[32676>>2]|0; + $36 = $35 & $34; + HEAP32[32676>>2] = $36; + $p$0 = $14;$psize$0 = $15; + break; + } + $37 = ($24|0)==($26|0); + if ($37) { + $$pre60 = ((($24)) + 8|0); + $$pre$phi61Z2D = $$pre60; } else { - if (!$4) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - HEAP32[$rem >> 2] = $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + $38 = ($24>>>0)<($2>>>0); + if ($38) { + _abort(); + // unreachable; + } + $39 = ((($24)) + 8|0); + $40 = HEAP32[$39>>2]|0; + $41 = ($40|0)==($14|0); + if ($41) { + $$pre$phi61Z2D = $39; + } else { + _abort(); + // unreachable; + } } - } - $17 = ($d_sroa_1_4_extract_trunc | 0) == 0; - do { - if (($d_sroa_0_0_extract_trunc | 0) == 0) { - if ($17) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); - HEAP32[$rem + 4 >> 2] = 0; - } - $_0$1 = 0; - $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - if (($n_sroa_0_0_extract_trunc | 0) == 0) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0; - HEAP32[$rem + 4 >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_1_4_extract_trunc >>> 0); - } - $_0$1 = 0; - $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_1_4_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - $37 = $d_sroa_1_4_extract_trunc - 1 | 0; - if (($37 & $d_sroa_1_4_extract_trunc | 0) == 0) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $37 & $n_sroa_1_4_extract_trunc | $a$1 & 0; - } - $_0$1 = 0; - $_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0); - return (tempRet0 = $_0$1, $_0$0) | 0; + $42 = ((($22)) + 12|0); + HEAP32[$42>>2] = $24; + HEAP32[$$pre$phi61Z2D>>2] = $22; + $p$0 = $14;$psize$0 = $15; + break; + } + $$sum22 = (($$sum2) + 24)|0; + $43 = (($mem) + ($$sum22)|0); + $44 = HEAP32[$43>>2]|0; + $$sum23 = (($$sum2) + 12)|0; + $45 = (($mem) + ($$sum23)|0); + $46 = HEAP32[$45>>2]|0; + $47 = ($46|0)==($14|0); + do { + if ($47) { + $$sum25 = (($$sum2) + 20)|0; + $57 = (($mem) + ($$sum25)|0); + $58 = HEAP32[$57>>2]|0; + $59 = ($58|0)==(0|0); + if ($59) { + $$sum24 = (($$sum2) + 16)|0; + $60 = (($mem) + ($$sum24)|0); + $61 = HEAP32[$60>>2]|0; + $62 = ($61|0)==(0|0); + if ($62) { + $R$1 = 0; + break; + } else { + $R$0 = $61;$RP$0 = $60; } - $49 = _llvm_ctlz_i32($d_sroa_1_4_extract_trunc | 0) | 0; - $51 = $49 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - if ($51 >>> 0 <= 30) { - $57 = $51 + 1 | 0; - $58 = 31 - $51 | 0; - $sr_1_ph = $57; - $r_sroa_0_1_ph = $n_sroa_1_4_extract_trunc << $58 | $n_sroa_0_0_extract_trunc >>> ($57 >>> 0); - $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($57 >>> 0); - $q_sroa_0_1_ph = 0; - $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $58; - break; + } else { + $R$0 = $58;$RP$0 = $57; + } + while(1) { + $63 = ((($R$0)) + 20|0); + $64 = HEAP32[$63>>2]|0; + $65 = ($64|0)==(0|0); + if (!($65)) { + $R$0 = $64;$RP$0 = $63; + continue; } - if (($rem | 0) == 0) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + $66 = ((($R$0)) + 16|0); + $67 = HEAP32[$66>>2]|0; + $68 = ($67|0)==(0|0); + if ($68) { + $R$0$lcssa = $R$0;$RP$0$lcssa = $RP$0; + break; + } else { + $R$0 = $67;$RP$0 = $66; } - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + } + $69 = ($RP$0$lcssa>>>0)<($2>>>0); + if ($69) { + _abort(); + // unreachable; + } else { + HEAP32[$RP$0$lcssa>>2] = 0; + $R$1 = $R$0$lcssa; + break; + } } else { - if (!$17) { - $117 = _llvm_ctlz_i32($d_sroa_1_4_extract_trunc | 0) | 0; - $119 = $117 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - if ($119 >>> 0 <= 31) { - $125 = $119 + 1 | 0; - $126 = 31 - $119 | 0; - $130 = $119 - 31 >> 31; - $sr_1_ph = $125; - $r_sroa_0_1_ph = $n_sroa_0_0_extract_trunc >>> ($125 >>> 0) & $130 | $n_sroa_1_4_extract_trunc << $126; - $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($125 >>> 0) & $130; - $q_sroa_0_1_ph = 0; - $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $126; - break; - } - if (($rem | 0) == 0) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - $66 = $d_sroa_0_0_extract_trunc - 1 | 0; - if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) { - $86 = (_llvm_ctlz_i32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0; - $88 = $86 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - $89 = 64 - $88 | 0; - $91 = 32 - $88 | 0; - $92 = $91 >> 31; - $95 = $88 - 32 | 0; - $105 = $95 >> 31; - $sr_1_ph = $88; - $r_sroa_0_1_ph = $91 - 1 >> 31 & $n_sroa_1_4_extract_trunc >>> ($95 >>> 0) | ($n_sroa_1_4_extract_trunc << $91 | $n_sroa_0_0_extract_trunc >>> ($88 >>> 0)) & $105; - $r_sroa_1_1_ph = $105 & $n_sroa_1_4_extract_trunc >>> ($88 >>> 0); - $q_sroa_0_1_ph = $n_sroa_0_0_extract_trunc << $89 & $92; - $q_sroa_1_1_ph = ($n_sroa_1_4_extract_trunc << $89 | $n_sroa_0_0_extract_trunc >>> ($95 >>> 0)) & $92 | $n_sroa_0_0_extract_trunc << $91 & $88 - 33 >> 31; - break; - } - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = $66 & $n_sroa_0_0_extract_trunc; - HEAP32[$rem + 4 >> 2] = 0; - } - if (($d_sroa_0_0_extract_trunc | 0) == 1) { - $_0$1 = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$0 = 0 | $a$0 & -1; - return (tempRet0 = $_0$1, $_0$0) | 0; + $$sum29 = (($$sum2) + 8)|0; + $48 = (($mem) + ($$sum29)|0); + $49 = HEAP32[$48>>2]|0; + $50 = ($49>>>0)<($2>>>0); + if ($50) { + _abort(); + // unreachable; + } + $51 = ((($49)) + 12|0); + $52 = HEAP32[$51>>2]|0; + $53 = ($52|0)==($14|0); + if (!($53)) { + _abort(); + // unreachable; + } + $54 = ((($46)) + 8|0); + $55 = HEAP32[$54>>2]|0; + $56 = ($55|0)==($14|0); + if ($56) { + HEAP32[$51>>2] = $46; + HEAP32[$54>>2] = $49; + $R$1 = $46; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $70 = ($44|0)==(0|0); + if ($70) { + $p$0 = $14;$psize$0 = $15; + } else { + $$sum26 = (($$sum2) + 28)|0; + $71 = (($mem) + ($$sum26)|0); + $72 = HEAP32[$71>>2]|0; + $73 = (32980 + ($72<<2)|0); + $74 = HEAP32[$73>>2]|0; + $75 = ($14|0)==($74|0); + if ($75) { + HEAP32[$73>>2] = $R$1; + $cond = ($R$1|0)==(0|0); + if ($cond) { + $76 = 1 << $72; + $77 = $76 ^ -1; + $78 = HEAP32[(32680)>>2]|0; + $79 = $78 & $77; + HEAP32[(32680)>>2] = $79; + $p$0 = $14;$psize$0 = $15; + break; + } + } else { + $80 = HEAP32[(32692)>>2]|0; + $81 = ($44>>>0)<($80>>>0); + if ($81) { + _abort(); + // unreachable; + } + $82 = ((($44)) + 16|0); + $83 = HEAP32[$82>>2]|0; + $84 = ($83|0)==($14|0); + if ($84) { + HEAP32[$82>>2] = $R$1; + } else { + $85 = ((($44)) + 20|0); + HEAP32[$85>>2] = $R$1; + } + $86 = ($R$1|0)==(0|0); + if ($86) { + $p$0 = $14;$psize$0 = $15; + break; + } + } + $87 = HEAP32[(32692)>>2]|0; + $88 = ($R$1>>>0)<($87>>>0); + if ($88) { + _abort(); + // unreachable; + } + $89 = ((($R$1)) + 24|0); + HEAP32[$89>>2] = $44; + $$sum27 = (($$sum2) + 16)|0; + $90 = (($mem) + ($$sum27)|0); + $91 = HEAP32[$90>>2]|0; + $92 = ($91|0)==(0|0); + do { + if (!($92)) { + $93 = ($91>>>0)<($87>>>0); + if ($93) { + _abort(); + // unreachable; } else { - $78 = _llvm_cttz_i32($d_sroa_0_0_extract_trunc | 0) | 0; - $_0$1 = 0 | $n_sroa_1_4_extract_trunc >>> ($78 >>> 0); - $_0$0 = $n_sroa_1_4_extract_trunc << 32 - $78 | $n_sroa_0_0_extract_trunc >>> ($78 >>> 0) | 0; - return (tempRet0 = $_0$1, $_0$0) | 0; + $94 = ((($R$1)) + 16|0); + HEAP32[$94>>2] = $91; + $95 = ((($91)) + 24|0); + HEAP32[$95>>2] = $R$1; + break; } + } + } while(0); + $$sum28 = (($$sum2) + 20)|0; + $96 = (($mem) + ($$sum28)|0); + $97 = HEAP32[$96>>2]|0; + $98 = ($97|0)==(0|0); + if ($98) { + $p$0 = $14;$psize$0 = $15; + } else { + $99 = HEAP32[(32692)>>2]|0; + $100 = ($97>>>0)<($99>>>0); + if ($100) { + _abort(); + // unreachable; + } else { + $101 = ((($R$1)) + 20|0); + HEAP32[$101>>2] = $97; + $102 = ((($97)) + 24|0); + HEAP32[$102>>2] = $R$1; + $p$0 = $14;$psize$0 = $15; + break; + } } - } while (0); - if (($sr_1_ph | 0) == 0) { - $q_sroa_1_1_lcssa = $q_sroa_1_1_ph; - $q_sroa_0_1_lcssa = $q_sroa_0_1_ph; - $r_sroa_1_1_lcssa = $r_sroa_1_1_ph; - $r_sroa_0_1_lcssa = $r_sroa_0_1_ph; - $carry_0_lcssa$1 = 0; - $carry_0_lcssa$0 = 0; + } } else { - $d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1; - $d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0; - $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0, $d_sroa_0_0_insert_insert99$1, -1, -1) | 0; - $137$1 = tempRet0; - $q_sroa_1_1198 = $q_sroa_1_1_ph; - $q_sroa_0_1199 = $q_sroa_0_1_ph; - $r_sroa_1_1200 = $r_sroa_1_1_ph; - $r_sroa_0_1201 = $r_sroa_0_1_ph; - $sr_1202 = $sr_1_ph; - $carry_0203 = 0; - while (1) { - $147 = $q_sroa_0_1199 >>> 31 | $q_sroa_1_1198 << 1; - $149 = $carry_0203 | $q_sroa_0_1199 << 1; - $r_sroa_0_0_insert_insert42$0 = 0 | ($r_sroa_0_1201 << 1 | $q_sroa_1_1198 >>> 31); - $r_sroa_0_0_insert_insert42$1 = $r_sroa_0_1201 >>> 31 | $r_sroa_1_1200 << 1 | 0; - _i64Subtract($137$0, $137$1, $r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1) | 0; - $150$1 = tempRet0; - $151$0 = $150$1 >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1; - $152 = $151$0 & 1; - $154$0 = _i64Subtract($r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1, $151$0 & $d_sroa_0_0_insert_insert99$0, ((($150$1 | 0) < 0 ? -1 : 0) >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1) & $d_sroa_0_0_insert_insert99$1) | 0; - $r_sroa_0_0_extract_trunc = $154$0; - $r_sroa_1_4_extract_trunc = tempRet0; - $155 = $sr_1202 - 1 | 0; - if (($155 | 0) == 0) { + $p$0 = $1;$psize$0 = $8; + } + } while(0); + $110 = ($p$0>>>0)<($9>>>0); + if (!($110)) { + _abort(); + // unreachable; + } + $$sum19 = (($8) + -4)|0; + $111 = (($mem) + ($$sum19)|0); + $112 = HEAP32[$111>>2]|0; + $113 = $112 & 1; + $114 = ($113|0)==(0); + if ($114) { + _abort(); + // unreachable; + } + $115 = $112 & 2; + $116 = ($115|0)==(0); + if ($116) { + $117 = HEAP32[(32700)>>2]|0; + $118 = ($9|0)==($117|0); + if ($118) { + $119 = HEAP32[(32688)>>2]|0; + $120 = (($119) + ($psize$0))|0; + HEAP32[(32688)>>2] = $120; + HEAP32[(32700)>>2] = $p$0; + $121 = $120 | 1; + $122 = ((($p$0)) + 4|0); + HEAP32[$122>>2] = $121; + $123 = HEAP32[(32696)>>2]|0; + $124 = ($p$0|0)==($123|0); + if (!($124)) { + return; + } + HEAP32[(32696)>>2] = 0; + HEAP32[(32684)>>2] = 0; + return; + } + $125 = HEAP32[(32696)>>2]|0; + $126 = ($9|0)==($125|0); + if ($126) { + $127 = HEAP32[(32684)>>2]|0; + $128 = (($127) + ($psize$0))|0; + HEAP32[(32684)>>2] = $128; + HEAP32[(32696)>>2] = $p$0; + $129 = $128 | 1; + $130 = ((($p$0)) + 4|0); + HEAP32[$130>>2] = $129; + $131 = (($p$0) + ($128)|0); + HEAP32[$131>>2] = $128; + return; + } + $132 = $112 & -8; + $133 = (($132) + ($psize$0))|0; + $134 = $112 >>> 3; + $135 = ($112>>>0)<(256); + do { + if ($135) { + $136 = (($mem) + ($8)|0); + $137 = HEAP32[$136>>2]|0; + $$sum1718 = $8 | 4; + $138 = (($mem) + ($$sum1718)|0); + $139 = HEAP32[$138>>2]|0; + $140 = $134 << 1; + $141 = (32716 + ($140<<2)|0); + $142 = ($137|0)==($141|0); + if (!($142)) { + $143 = HEAP32[(32692)>>2]|0; + $144 = ($137>>>0)<($143>>>0); + if ($144) { + _abort(); + // unreachable; + } + $145 = ((($137)) + 12|0); + $146 = HEAP32[$145>>2]|0; + $147 = ($146|0)==($9|0); + if (!($147)) { + _abort(); + // unreachable; + } + } + $148 = ($139|0)==($137|0); + if ($148) { + $149 = 1 << $134; + $150 = $149 ^ -1; + $151 = HEAP32[32676>>2]|0; + $152 = $151 & $150; + HEAP32[32676>>2] = $152; + break; + } + $153 = ($139|0)==($141|0); + if ($153) { + $$pre58 = ((($139)) + 8|0); + $$pre$phi59Z2D = $$pre58; + } else { + $154 = HEAP32[(32692)>>2]|0; + $155 = ($139>>>0)<($154>>>0); + if ($155) { + _abort(); + // unreachable; + } + $156 = ((($139)) + 8|0); + $157 = HEAP32[$156>>2]|0; + $158 = ($157|0)==($9|0); + if ($158) { + $$pre$phi59Z2D = $156; + } else { + _abort(); + // unreachable; + } + } + $159 = ((($137)) + 12|0); + HEAP32[$159>>2] = $139; + HEAP32[$$pre$phi59Z2D>>2] = $137; + } else { + $$sum5 = (($8) + 16)|0; + $160 = (($mem) + ($$sum5)|0); + $161 = HEAP32[$160>>2]|0; + $$sum67 = $8 | 4; + $162 = (($mem) + ($$sum67)|0); + $163 = HEAP32[$162>>2]|0; + $164 = ($163|0)==($9|0); + do { + if ($164) { + $$sum9 = (($8) + 12)|0; + $175 = (($mem) + ($$sum9)|0); + $176 = HEAP32[$175>>2]|0; + $177 = ($176|0)==(0|0); + if ($177) { + $$sum8 = (($8) + 8)|0; + $178 = (($mem) + ($$sum8)|0); + $179 = HEAP32[$178>>2]|0; + $180 = ($179|0)==(0|0); + if ($180) { + $R7$1 = 0; break; + } else { + $R7$0 = $179;$RP9$0 = $178; + } } else { - $q_sroa_1_1198 = $147; - $q_sroa_0_1199 = $149; - $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc; - $sr_1202 = $155; - $carry_0203 = $152; + $R7$0 = $176;$RP9$0 = $175; } - } - $q_sroa_1_1_lcssa = $147; - $q_sroa_0_1_lcssa = $149; - $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc; - $carry_0_lcssa$1 = 0; - $carry_0_lcssa$0 = $152; - } - $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa; - $q_sroa_0_0_insert_ext75$1 = 0; - $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1; - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa; - HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0; - } - $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1; - $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0; - return (tempRet0 = $_0$1, $_0$0) | 0; -} -// ======================================================================= - - - -// EMSCRIPTEN_END_FUNCS - - - - // EMSCRIPTEN_END_FUNCS - - - return { _curve25519_verify: _curve25519_verify, _crypto_sign_ed25519_ref10_ge_scalarmult_base: _crypto_sign_ed25519_ref10_ge_scalarmult_base, _curve25519_sign: _curve25519_sign, _free: _free, _i64Add: _i64Add, _memmove: _memmove, _bitshift64Ashr: _bitshift64Ashr, _sph_sha512_init: _sph_sha512_init, _curve25519_donna: _curve25519_donna, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, _strlen: _strlen, _bitshift64Lshr: _bitshift64Lshr, _i64Subtract: _i64Subtract, _bitshift64Shl: _bitshift64Shl, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, getTempRet0: getTempRet0 }; -}) -// EMSCRIPTEN_END_ASM -(Module.asmGlobalArg, Module.asmLibraryArg, buffer); -var _curve25519_verify = Module["_curve25519_verify"] = asm["_curve25519_verify"]; -var _crypto_sign_ed25519_ref10_ge_scalarmult_base = Module["_crypto_sign_ed25519_ref10_ge_scalarmult_base"] = asm["_crypto_sign_ed25519_ref10_ge_scalarmult_base"]; -var _curve25519_sign = Module["_curve25519_sign"] = asm["_curve25519_sign"]; -var _free = Module["_free"] = asm["_free"]; -var _i64Add = Module["_i64Add"] = asm["_i64Add"]; -var _memmove = Module["_memmove"] = asm["_memmove"]; -var _bitshift64Ashr = Module["_bitshift64Ashr"] = asm["_bitshift64Ashr"]; -var _sph_sha512_init = Module["_sph_sha512_init"] = asm["_sph_sha512_init"]; -var _curve25519_donna = Module["_curve25519_donna"] = asm["_curve25519_donna"]; -var _memset = Module["_memset"] = asm["_memset"]; -var _malloc = Module["_malloc"] = asm["_malloc"]; -var _memcpy = Module["_memcpy"] = asm["_memcpy"]; -var _strlen = Module["_strlen"] = asm["_strlen"]; -var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"]; -var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"]; -var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"]; -var runPostSets = Module["runPostSets"] = asm["runPostSets"]; - -Runtime.stackAlloc = asm['stackAlloc']; -Runtime.stackSave = asm['stackSave']; -Runtime.stackRestore = asm['stackRestore']; -Runtime.setTempRet0 = asm['setTempRet0']; -Runtime.getTempRet0 = asm['getTempRet0']; - - -// TODO: strip out parts of this we do not need - -//======= begin closure i64 code ======= - -// Copyright 2009 The Closure Library Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Defines a Long class for representing a 64-bit two's-complement - * integer value, which faithfully simulates the behavior of a Java "long". This - * implementation is derived from LongLib in GWT. - * - */ - -var i64Math = (function() { // Emscripten wrapper - var goog = { math: {} }; - - - /** - * Constructs a 64-bit two's-complement integer, given its low and high 32-bit - * values as *signed* integers. See the from* functions below for more - * convenient ways of constructing Longs. - * - * The internal representation of a long is the two given signed, 32-bit values. - * We use 32-bit pieces because these are the size of integers on which - * Javascript performs bit-operations. For operations like addition and - * multiplication, we split each number into 16-bit pieces, which can easily be - * multiplied within Javascript's floating-point representation without overflow - * or change in sign. - * - * In the algorithms below, we frequently reduce the negative case to the - * positive case by negating the input(s) and then post-processing the result. - * Note that we must ALWAYS check specially whether those values are MIN_VALUE - * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as - * a positive number, it overflows back into a negative). Not handling this - * case would often result in infinite recursion. - * - * @param {number} low The low (signed) 32 bits of the long. - * @param {number} high The high (signed) 32 bits of the long. - * @constructor - */ - goog.math.Long = function(low, high) { - /** - * @type {number} - * @private - */ - this.low_ = low | 0; // force into 32 signed bits. - - /** - * @type {number} - * @private - */ - this.high_ = high | 0; // force into 32 signed bits. - }; - - - // NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the - // from* methods on which they depend. - - - /** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @private - */ - goog.math.Long.IntCache_ = {}; - - - /** - * Returns a Long representing the given (32-bit) integer value. - * @param {number} value The 32-bit integer in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromInt = function(value) { - if (-128 <= value && value < 128) { - var cachedObj = goog.math.Long.IntCache_[value]; - if (cachedObj) { - return cachedObj; + while(1) { + $181 = ((($R7$0)) + 20|0); + $182 = HEAP32[$181>>2]|0; + $183 = ($182|0)==(0|0); + if (!($183)) { + $R7$0 = $182;$RP9$0 = $181; + continue; + } + $184 = ((($R7$0)) + 16|0); + $185 = HEAP32[$184>>2]|0; + $186 = ($185|0)==(0|0); + if ($186) { + $R7$0$lcssa = $R7$0;$RP9$0$lcssa = $RP9$0; + break; + } else { + $R7$0 = $185;$RP9$0 = $184; + } } - } - - var obj = new goog.math.Long(value | 0, value < 0 ? -1 : 0); - if (-128 <= value && value < 128) { - goog.math.Long.IntCache_[value] = obj; - } - return obj; - }; - - - /** - * Returns a Long representing the given value, provided that it is a finite - * number. Otherwise, zero is returned. - * @param {number} value The number in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromNumber = function(value) { - if (isNaN(value) || !isFinite(value)) { - return goog.math.Long.ZERO; - } else if (value <= -goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MIN_VALUE; - } else if (value + 1 >= goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MAX_VALUE; - } else if (value < 0) { - return goog.math.Long.fromNumber(-value).negate(); - } else { - return new goog.math.Long( - (value % goog.math.Long.TWO_PWR_32_DBL_) | 0, - (value / goog.math.Long.TWO_PWR_32_DBL_) | 0); - } - }; - - - /** - * Returns a Long representing the 64-bit integer that comes by concatenating - * the given high and low bits. Each is assumed to use 32 bits. - * @param {number} lowBits The low 32-bits. - * @param {number} highBits The high 32-bits. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromBits = function(lowBits, highBits) { - return new goog.math.Long(lowBits, highBits); - }; - - - /** - * Returns a Long representation of the given string, written using the given - * radix. - * @param {string} str The textual representation of the Long. - * @param {number=} opt_radix The radix in which the text is written. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromString = function(str, opt_radix) { - if (str.length == 0) { - throw Error('number format error: empty string'); - } - - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (str.charAt(0) == '-') { - return goog.math.Long.fromString(str.substring(1), radix).negate(); - } else if (str.indexOf('-') >= 0) { - throw Error('number format error: interior "-" character: ' + str); - } - - // Do several (8) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 8)); - - var result = goog.math.Long.ZERO; - for (var i = 0; i < str.length; i += 8) { - var size = Math.min(8, str.length - i); - var value = parseInt(str.substring(i, i + size), radix); - if (size < 8) { - var power = goog.math.Long.fromNumber(Math.pow(radix, size)); - result = result.multiply(power).add(goog.math.Long.fromNumber(value)); + $187 = HEAP32[(32692)>>2]|0; + $188 = ($RP9$0$lcssa>>>0)<($187>>>0); + if ($188) { + _abort(); + // unreachable; } else { - result = result.multiply(radixToPower); - result = result.add(goog.math.Long.fromNumber(value)); + HEAP32[$RP9$0$lcssa>>2] = 0; + $R7$1 = $R7$0$lcssa; + break; } - } - return result; - }; - - - // NOTE: the compiler should inline these constant values below and then remove - // these variables, so there should be no runtime penalty for these. - - - /** - * Number used repeated below in calculations. This must appear before the - * first call to any from* function below. - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_16_DBL_ = 1 << 16; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_24_DBL_ = 1 << 24; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_32_DBL_ = - goog.math.Long.TWO_PWR_16_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_31_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ / 2; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_48_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_64_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_32_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_63_DBL_ = - goog.math.Long.TWO_PWR_64_DBL_ / 2; - - - /** @type {!goog.math.Long} */ - goog.math.Long.ZERO = goog.math.Long.fromInt(0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.ONE = goog.math.Long.fromInt(1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.NEG_ONE = goog.math.Long.fromInt(-1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MAX_VALUE = - goog.math.Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MIN_VALUE = goog.math.Long.fromBits(0, 0x80000000 | 0); - - - /** - * @type {!goog.math.Long} - * @private - */ - goog.math.Long.TWO_PWR_24_ = goog.math.Long.fromInt(1 << 24); - - - /** @return {number} The value, assuming it is a 32-bit integer. */ - goog.math.Long.prototype.toInt = function() { - return this.low_; - }; - - - /** @return {number} The closest floating-point representation to this value. */ - goog.math.Long.prototype.toNumber = function() { - return this.high_ * goog.math.Long.TWO_PWR_32_DBL_ + - this.getLowBitsUnsigned(); - }; - - - /** - * @param {number=} opt_radix The radix in which the text should be written. - * @return {string} The textual representation of this value. - */ - goog.math.Long.prototype.toString = function(opt_radix) { - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (this.isZero()) { - return '0'; - } - - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - // We need to change the Long value before it can be negated, so we remove - // the bottom-most digit in this base and then recurse to do the rest. - var radixLong = goog.math.Long.fromNumber(radix); - var div = this.div(radixLong); - var rem = div.multiply(radixLong).subtract(this); - return div.toString(radix) + rem.toInt().toString(radix); + } else { + $165 = (($mem) + ($8)|0); + $166 = HEAP32[$165>>2]|0; + $167 = HEAP32[(32692)>>2]|0; + $168 = ($166>>>0)<($167>>>0); + if ($168) { + _abort(); + // unreachable; + } + $169 = ((($166)) + 12|0); + $170 = HEAP32[$169>>2]|0; + $171 = ($170|0)==($9|0); + if (!($171)) { + _abort(); + // unreachable; + } + $172 = ((($163)) + 8|0); + $173 = HEAP32[$172>>2]|0; + $174 = ($173|0)==($9|0); + if ($174) { + HEAP32[$169>>2] = $163; + HEAP32[$172>>2] = $166; + $R7$1 = $163; + break; } else { - return '-' + this.negate().toString(radix); + _abort(); + // unreachable; } - } - - // Do several (6) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 6)); - - var rem = this; - var result = ''; - while (true) { - var remDiv = rem.div(radixToPower); - var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt(); - var digits = intval.toString(radix); - - rem = remDiv; - if (rem.isZero()) { - return digits + result; + } + } while(0); + $189 = ($161|0)==(0|0); + if (!($189)) { + $$sum12 = (($8) + 20)|0; + $190 = (($mem) + ($$sum12)|0); + $191 = HEAP32[$190>>2]|0; + $192 = (32980 + ($191<<2)|0); + $193 = HEAP32[$192>>2]|0; + $194 = ($9|0)==($193|0); + if ($194) { + HEAP32[$192>>2] = $R7$1; + $cond47 = ($R7$1|0)==(0|0); + if ($cond47) { + $195 = 1 << $191; + $196 = $195 ^ -1; + $197 = HEAP32[(32680)>>2]|0; + $198 = $197 & $196; + HEAP32[(32680)>>2] = $198; + break; + } + } else { + $199 = HEAP32[(32692)>>2]|0; + $200 = ($161>>>0)<($199>>>0); + if ($200) { + _abort(); + // unreachable; + } + $201 = ((($161)) + 16|0); + $202 = HEAP32[$201>>2]|0; + $203 = ($202|0)==($9|0); + if ($203) { + HEAP32[$201>>2] = $R7$1; } else { - while (digits.length < 6) { - digits = '0' + digits; - } - result = '' + digits + result; + $204 = ((($161)) + 20|0); + HEAP32[$204>>2] = $R7$1; } - } - }; - - - /** @return {number} The high 32-bits as a signed value. */ - goog.math.Long.prototype.getHighBits = function() { - return this.high_; - }; - - - /** @return {number} The low 32-bits as a signed value. */ - goog.math.Long.prototype.getLowBits = function() { - return this.low_; - }; - - - /** @return {number} The low 32-bits as an unsigned value. */ - goog.math.Long.prototype.getLowBitsUnsigned = function() { - return (this.low_ >= 0) ? - this.low_ : goog.math.Long.TWO_PWR_32_DBL_ + this.low_; - }; - - - /** - * @return {number} Returns the number of bits needed to represent the absolute - * value of this Long. - */ - goog.math.Long.prototype.getNumBitsAbs = function() { - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return 64; + $205 = ($R7$1|0)==(0|0); + if ($205) { + break; + } + } + $206 = HEAP32[(32692)>>2]|0; + $207 = ($R7$1>>>0)<($206>>>0); + if ($207) { + _abort(); + // unreachable; + } + $208 = ((($R7$1)) + 24|0); + HEAP32[$208>>2] = $161; + $$sum13 = (($8) + 8)|0; + $209 = (($mem) + ($$sum13)|0); + $210 = HEAP32[$209>>2]|0; + $211 = ($210|0)==(0|0); + do { + if (!($211)) { + $212 = ($210>>>0)<($206>>>0); + if ($212) { + _abort(); + // unreachable; + } else { + $213 = ((($R7$1)) + 16|0); + HEAP32[$213>>2] = $210; + $214 = ((($210)) + 24|0); + HEAP32[$214>>2] = $R7$1; + break; + } + } + } while(0); + $$sum14 = (($8) + 12)|0; + $215 = (($mem) + ($$sum14)|0); + $216 = HEAP32[$215>>2]|0; + $217 = ($216|0)==(0|0); + if (!($217)) { + $218 = HEAP32[(32692)>>2]|0; + $219 = ($216>>>0)<($218>>>0); + if ($219) { + _abort(); + // unreachable; } else { - return this.negate().getNumBitsAbs(); + $220 = ((($R7$1)) + 20|0); + HEAP32[$220>>2] = $216; + $221 = ((($216)) + 24|0); + HEAP32[$221>>2] = $R7$1; + break; } + } + } + } + } while(0); + $222 = $133 | 1; + $223 = ((($p$0)) + 4|0); + HEAP32[$223>>2] = $222; + $224 = (($p$0) + ($133)|0); + HEAP32[$224>>2] = $133; + $225 = HEAP32[(32696)>>2]|0; + $226 = ($p$0|0)==($225|0); + if ($226) { + HEAP32[(32684)>>2] = $133; + return; + } else { + $psize$1 = $133; + } + } else { + $227 = $112 & -2; + HEAP32[$111>>2] = $227; + $228 = $psize$0 | 1; + $229 = ((($p$0)) + 4|0); + HEAP32[$229>>2] = $228; + $230 = (($p$0) + ($psize$0)|0); + HEAP32[$230>>2] = $psize$0; + $psize$1 = $psize$0; + } + $231 = $psize$1 >>> 3; + $232 = ($psize$1>>>0)<(256); + if ($232) { + $233 = $231 << 1; + $234 = (32716 + ($233<<2)|0); + $235 = HEAP32[32676>>2]|0; + $236 = 1 << $231; + $237 = $235 & $236; + $238 = ($237|0)==(0); + if ($238) { + $239 = $235 | $236; + HEAP32[32676>>2] = $239; + $$pre = (($233) + 2)|0; + $$pre57 = (32716 + ($$pre<<2)|0); + $$pre$phiZ2D = $$pre57;$F16$0 = $234; + } else { + $$sum11 = (($233) + 2)|0; + $240 = (32716 + ($$sum11<<2)|0); + $241 = HEAP32[$240>>2]|0; + $242 = HEAP32[(32692)>>2]|0; + $243 = ($241>>>0)<($242>>>0); + if ($243) { + _abort(); + // unreachable; + } else { + $$pre$phiZ2D = $240;$F16$0 = $241; + } + } + HEAP32[$$pre$phiZ2D>>2] = $p$0; + $244 = ((($F16$0)) + 12|0); + HEAP32[$244>>2] = $p$0; + $245 = ((($p$0)) + 8|0); + HEAP32[$245>>2] = $F16$0; + $246 = ((($p$0)) + 12|0); + HEAP32[$246>>2] = $234; + return; + } + $247 = $psize$1 >>> 8; + $248 = ($247|0)==(0); + if ($248) { + $I18$0 = 0; + } else { + $249 = ($psize$1>>>0)>(16777215); + if ($249) { + $I18$0 = 31; + } else { + $250 = (($247) + 1048320)|0; + $251 = $250 >>> 16; + $252 = $251 & 8; + $253 = $247 << $252; + $254 = (($253) + 520192)|0; + $255 = $254 >>> 16; + $256 = $255 & 4; + $257 = $256 | $252; + $258 = $253 << $256; + $259 = (($258) + 245760)|0; + $260 = $259 >>> 16; + $261 = $260 & 2; + $262 = $257 | $261; + $263 = (14 - ($262))|0; + $264 = $258 << $261; + $265 = $264 >>> 15; + $266 = (($263) + ($265))|0; + $267 = $266 << 1; + $268 = (($266) + 7)|0; + $269 = $psize$1 >>> $268; + $270 = $269 & 1; + $271 = $270 | $267; + $I18$0 = $271; + } + } + $272 = (32980 + ($I18$0<<2)|0); + $273 = ((($p$0)) + 28|0); + HEAP32[$273>>2] = $I18$0; + $274 = ((($p$0)) + 16|0); + $275 = ((($p$0)) + 20|0); + HEAP32[$275>>2] = 0; + HEAP32[$274>>2] = 0; + $276 = HEAP32[(32680)>>2]|0; + $277 = 1 << $I18$0; + $278 = $276 & $277; + $279 = ($278|0)==(0); + L199: do { + if ($279) { + $280 = $276 | $277; + HEAP32[(32680)>>2] = $280; + HEAP32[$272>>2] = $p$0; + $281 = ((($p$0)) + 24|0); + HEAP32[$281>>2] = $272; + $282 = ((($p$0)) + 12|0); + HEAP32[$282>>2] = $p$0; + $283 = ((($p$0)) + 8|0); + HEAP32[$283>>2] = $p$0; + } else { + $284 = HEAP32[$272>>2]|0; + $285 = ((($284)) + 4|0); + $286 = HEAP32[$285>>2]|0; + $287 = $286 & -8; + $288 = ($287|0)==($psize$1|0); + L202: do { + if ($288) { + $T$0$lcssa = $284; } else { - var val = this.high_ != 0 ? this.high_ : this.low_; - for (var bit = 31; bit > 0; bit--) { - if ((val & (1 << bit)) != 0) { - break; - } + $289 = ($I18$0|0)==(31); + $290 = $I18$0 >>> 1; + $291 = (25 - ($290))|0; + $292 = $289 ? 0 : $291; + $293 = $psize$1 << $292; + $K19$052 = $293;$T$051 = $284; + while(1) { + $300 = $K19$052 >>> 31; + $301 = (((($T$051)) + 16|0) + ($300<<2)|0); + $296 = HEAP32[$301>>2]|0; + $302 = ($296|0)==(0|0); + if ($302) { + $$lcssa = $301;$T$051$lcssa = $T$051; + break; } - return this.high_ != 0 ? bit + 33 : bit + 1; - } - }; - - - /** @return {boolean} Whether this value is zero. */ - goog.math.Long.prototype.isZero = function() { - return this.high_ == 0 && this.low_ == 0; - }; - - - /** @return {boolean} Whether this value is negative. */ - goog.math.Long.prototype.isNegative = function() { - return this.high_ < 0; - }; - - - /** @return {boolean} Whether this value is odd. */ - goog.math.Long.prototype.isOdd = function() { - return (this.low_ & 1) == 1; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long equals the other. - */ - goog.math.Long.prototype.equals = function(other) { - return (this.high_ == other.high_) && (this.low_ == other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long does not equal the other. - */ - goog.math.Long.prototype.notEquals = function(other) { - return (this.high_ != other.high_) || (this.low_ != other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than the other. - */ - goog.math.Long.prototype.lessThan = function(other) { - return this.compare(other) < 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than or equal to the other. - */ - goog.math.Long.prototype.lessThanOrEqual = function(other) { - return this.compare(other) <= 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than the other. - */ - goog.math.Long.prototype.greaterThan = function(other) { - return this.compare(other) > 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than or equal to the other. - */ - goog.math.Long.prototype.greaterThanOrEqual = function(other) { - return this.compare(other) >= 0; - }; - - - /** - * Compares this Long with the given one. - * @param {goog.math.Long} other Long to compare against. - * @return {number} 0 if they are the same, 1 if the this is greater, and -1 - * if the given one is greater. - */ - goog.math.Long.prototype.compare = function(other) { - if (this.equals(other)) { - return 0; - } - - var thisNeg = this.isNegative(); - var otherNeg = other.isNegative(); - if (thisNeg && !otherNeg) { - return -1; - } - if (!thisNeg && otherNeg) { - return 1; - } - - // at this point, the signs are the same, so subtraction will not overflow - if (this.subtract(other).isNegative()) { - return -1; - } else { - return 1; - } - }; - - - /** @return {!goog.math.Long} The negation of this value. */ - goog.math.Long.prototype.negate = function() { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.MIN_VALUE; - } else { - return this.not().add(goog.math.Long.ONE); - } - }; - - - /** - * Returns the sum of this and the given Long. - * @param {goog.math.Long} other Long to add to this one. - * @return {!goog.math.Long} The sum of this and the given Long. - */ - goog.math.Long.prototype.add = function(other) { - // Divide each number into 4 chunks of 16 bits, and then sum the chunks. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 + b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns the difference of this and the given Long. - * @param {goog.math.Long} other Long to subtract from this. - * @return {!goog.math.Long} The difference of this and the given Long. - */ - goog.math.Long.prototype.subtract = function(other) { - return this.add(other.negate()); - }; - - - /** - * Returns the product of this and the given long. - * @param {goog.math.Long} other Long to multiply with this. - * @return {!goog.math.Long} The product of this and the other. - */ - goog.math.Long.prototype.multiply = function(other) { - if (this.isZero()) { - return goog.math.Long.ZERO; - } else if (other.isZero()) { - return goog.math.Long.ZERO; - } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - return other.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return this.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().multiply(other.negate()); + $294 = $K19$052 << 1; + $295 = ((($296)) + 4|0); + $297 = HEAP32[$295>>2]|0; + $298 = $297 & -8; + $299 = ($298|0)==($psize$1|0); + if ($299) { + $T$0$lcssa = $296; + break L202; } else { - return this.negate().multiply(other).negate(); + $K19$052 = $294;$T$051 = $296; } - } else if (other.isNegative()) { - return this.multiply(other.negate()).negate(); - } - - // If both longs are small, use float multiplication - if (this.lessThan(goog.math.Long.TWO_PWR_24_) && - other.lessThan(goog.math.Long.TWO_PWR_24_)) { - return goog.math.Long.fromNumber(this.toNumber() * other.toNumber()); + } + $303 = HEAP32[(32692)>>2]|0; + $304 = ($$lcssa>>>0)<($303>>>0); + if ($304) { + _abort(); + // unreachable; + } else { + HEAP32[$$lcssa>>2] = $p$0; + $305 = ((($p$0)) + 24|0); + HEAP32[$305>>2] = $T$051$lcssa; + $306 = ((($p$0)) + 12|0); + HEAP32[$306>>2] = $p$0; + $307 = ((($p$0)) + 8|0); + HEAP32[$307>>2] = $p$0; + break L199; + } } - - // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. - // We can skip products that would overflow. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns this Long divided by the given one. - * @param {goog.math.Long} other Long by which to divide. - * @return {!goog.math.Long} This Long divided by the given one. - */ - goog.math.Long.prototype.div = function(other) { - if (other.isZero()) { - throw Error('division by zero'); - } else if (this.isZero()) { - return goog.math.Long.ZERO; + } while(0); + $308 = ((($T$0$lcssa)) + 8|0); + $309 = HEAP32[$308>>2]|0; + $310 = HEAP32[(32692)>>2]|0; + $311 = ($309>>>0)>=($310>>>0); + $not$ = ($T$0$lcssa>>>0)>=($310>>>0); + $312 = $311 & $not$; + if ($312) { + $313 = ((($309)) + 12|0); + HEAP32[$313>>2] = $p$0; + HEAP32[$308>>2] = $p$0; + $314 = ((($p$0)) + 8|0); + HEAP32[$314>>2] = $309; + $315 = ((($p$0)) + 12|0); + HEAP32[$315>>2] = $T$0$lcssa; + $316 = ((($p$0)) + 24|0); + HEAP32[$316>>2] = 0; + break; + } else { + _abort(); + // unreachable; + } + } + } while(0); + $317 = HEAP32[(32708)>>2]|0; + $318 = (($317) + -1)|0; + HEAP32[(32708)>>2] = $318; + $319 = ($318|0)==(0); + if ($319) { + $sp$0$in$i = (33132); + } else { + return; + } + while(1) { + $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; + $320 = ($sp$0$i|0)==(0|0); + $321 = ((($sp$0$i)) + 8|0); + if ($320) { + break; + } else { + $sp$0$in$i = $321; + } + } + HEAP32[(32708)>>2] = -1; + return; +} +function runPostSets() { +} +function _bitshift64Ashr(low, high, bits) { + low = low|0; high = high|0; bits = bits|0; + var ander = 0; + if ((bits|0) < 32) { + ander = ((1 << bits) - 1)|0; + tempRet0 = high >> bits; + return (low >>> bits) | ((high&ander) << (32 - bits)); } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - if (other.equals(goog.math.Long.ONE) || - other.equals(goog.math.Long.NEG_ONE)) { - return goog.math.Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ONE; - } else { - // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. - var halfThis = this.shiftRight(1); - var approx = halfThis.div(other).shiftLeft(1); - if (approx.equals(goog.math.Long.ZERO)) { - return other.isNegative() ? goog.math.Long.ONE : goog.math.Long.NEG_ONE; - } else { - var rem = this.subtract(other.multiply(approx)); - var result = approx.add(rem.div(other)); - return result; + tempRet0 = (high|0) < 0 ? -1 : 0; + return (high >> (bits - 32))|0; +} +function _i64Subtract(a, b, c, d) { + a = a|0; b = b|0; c = c|0; d = d|0; + var l = 0, h = 0; + l = (a - c)>>>0; + h = (b - d)>>>0; + h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow. + return ((tempRet0 = h,l|0)|0); +} +function _i64Add(a, b, c, d) { + /* + x = a + b*2^32 + y = c + d*2^32 + result = l + h*2^32 + */ + a = a|0; b = b|0; c = c|0; d = d|0; + var l = 0, h = 0; + l = (a + c)>>>0; + h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow. + return ((tempRet0 = h,l|0)|0); +} +function _memset(ptr, value, num) { + ptr = ptr|0; value = value|0; num = num|0; + var stop = 0, value4 = 0, stop4 = 0, unaligned = 0; + stop = (ptr + num)|0; + if ((num|0) >= 20) { + // This is unaligned, but quite large, so work hard to get to aligned settings + value = value & 0xff; + unaligned = ptr & 3; + value4 = value | (value << 8) | (value << 16) | (value << 24); + stop4 = stop & ~3; + if (unaligned) { + unaligned = (ptr + 4 - unaligned)|0; + while ((ptr|0) < (unaligned|0)) { // no need to check for stop, since we have large num + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; } } - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().div(other.negate()); - } else { - return this.negate().div(other).negate(); + while ((ptr|0) < (stop4|0)) { + HEAP32[((ptr)>>2)]=value4; + ptr = (ptr+4)|0; } - } else if (other.isNegative()) { - return this.div(other.negate()).negate(); } - - // Repeat the following until the remainder is less than other: find a - // floating-point that approximates remainder / other *from below*, add this - // into the result, and subtract it from the remainder. It is critical that - // the approximate value is less than or equal to the real value so that the - // remainder never becomes negative. - var res = goog.math.Long.ZERO; - var rem = this; - while (rem.greaterThanOrEqual(other)) { - // Approximate the result of division. This may be a little greater or - // smaller than the actual value. - var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber())); - - // We will tweak the approximate result by changing it in the 48-th digit or - // the smallest non-fractional digit, whichever is larger. - var log2 = Math.ceil(Math.log(approx) / Math.LN2); - var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48); - - // Decrease the approximation until it is smaller than the remainder. Note - // that if it is too large, the product overflows and is negative. - var approxRes = goog.math.Long.fromNumber(approx); - var approxRem = approxRes.multiply(other); - while (approxRem.isNegative() || approxRem.greaterThan(rem)) { - approx -= delta; - approxRes = goog.math.Long.fromNumber(approx); - approxRem = approxRes.multiply(other); - } - - // We know the answer can't be zero... and actually, zero would cause - // infinite recursion since we would make no progress. - if (approxRes.isZero()) { - approxRes = goog.math.Long.ONE; - } - - res = res.add(approxRes); - rem = rem.subtract(approxRem); + while ((ptr|0) < (stop|0)) { + HEAP8[((ptr)>>0)]=value; + ptr = (ptr+1)|0; } - return res; - }; - - - /** - * Returns this Long modulo the given one. - * @param {goog.math.Long} other Long by which to mod. - * @return {!goog.math.Long} This Long modulo the given one. - */ - goog.math.Long.prototype.modulo = function(other) { - return this.subtract(this.div(other).multiply(other)); - }; - - - /** @return {!goog.math.Long} The bitwise-NOT of this value. */ - goog.math.Long.prototype.not = function() { - return goog.math.Long.fromBits(~this.low_, ~this.high_); - }; - - - /** - * Returns the bitwise-AND of this Long and the given one. - * @param {goog.math.Long} other The Long with which to AND. - * @return {!goog.math.Long} The bitwise-AND of this and the other. - */ - goog.math.Long.prototype.and = function(other) { - return goog.math.Long.fromBits(this.low_ & other.low_, - this.high_ & other.high_); - }; - - - /** - * Returns the bitwise-OR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to OR. - * @return {!goog.math.Long} The bitwise-OR of this and the other. - */ - goog.math.Long.prototype.or = function(other) { - return goog.math.Long.fromBits(this.low_ | other.low_, - this.high_ | other.high_); - }; - - - /** - * Returns the bitwise-XOR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to XOR. - * @return {!goog.math.Long} The bitwise-XOR of this and the other. - */ - goog.math.Long.prototype.xor = function(other) { - return goog.math.Long.fromBits(this.low_ ^ other.low_, - this.high_ ^ other.high_); - }; - - - /** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the left by the given amount. - */ - goog.math.Long.prototype.shiftLeft = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var low = this.low_; - if (numBits < 32) { - var high = this.high_; - return goog.math.Long.fromBits( - low << numBits, - (high << numBits) | (low >>> (32 - numBits))); - } else { - return goog.math.Long.fromBits(0, low << (numBits - 32)); - } + return (ptr-num)|0; +} +function _bitshift64Lshr(low, high, bits) { + low = low|0; high = high|0; bits = bits|0; + var ander = 0; + if ((bits|0) < 32) { + ander = ((1 << bits) - 1)|0; + tempRet0 = high >>> bits; + return (low >>> bits) | ((high&ander) << (32 - bits)); } - }; - - - /** - * Returns this Long with bits shifted to the right by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount. - */ - goog.math.Long.prototype.shiftRight = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >> numBits); - } else { - return goog.math.Long.fromBits( - high >> (numBits - 32), - high >= 0 ? 0 : -1); - } + tempRet0 = 0; + return (high >>> (bits - 32))|0; +} +function _bitshift64Shl(low, high, bits) { + low = low|0; high = high|0; bits = bits|0; + var ander = 0; + if ((bits|0) < 32) { + ander = ((1 << bits) - 1)|0; + tempRet0 = (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits)); + return low << bits; } - }; - - - /** - * Returns this Long with bits shifted to the right by the given amount, with - * the new top bits matching the current sign bit. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount, with - * zeros placed into the new leading bits. - */ - goog.math.Long.prototype.shiftRightUnsigned = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >>> numBits); - } else if (numBits == 32) { - return goog.math.Long.fromBits(high, 0); - } else { - return goog.math.Long.fromBits(high >>> (numBits - 32), 0); + tempRet0 = low << (bits - 32); + return 0; +} +function _memcpy(dest, src, num) { + dest = dest|0; src = src|0; num = num|0; + var ret = 0; + if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; + ret = dest|0; + if ((dest&3) == (src&3)) { + while (dest & 3) { + if ((num|0) == 0) return ret|0; + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + num = (num-1)|0; + } + while ((num|0) >= 4) { + HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); + dest = (dest+4)|0; + src = (src+4)|0; + num = (num-4)|0; } } - }; - - //======= begin jsbn ======= - - var navigator = { appName: 'Modern Browser' }; // polyfill a little - - // Copyright (c) 2005 Tom Wu - // All Rights Reserved. - // http://www-cs-students.stanford.edu/~tjw/jsbn/ - - /* - * Copyright (c) 2003-2005 Tom Wu - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF - * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * In addition, the following condition applies: - * - * All redistributions must retain an intact copy of this copyright notice - * and disclaimer. - */ - - // Basic JavaScript BN library - subset useful for RSA encryption. - - // Bits per digit - var dbits; - - // JavaScript engine analysis - var canary = 0xdeadbeefcafe; - var j_lm = ((canary&0xffffff)==0xefcafe); - - // (public) Constructor - function BigInteger(a,b,c) { - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); - } - - // return new, unset BigInteger - function nbi() { return new BigInteger(null); } - - // am: Compute w_j += (x*this_i), propagate carries, - // c is initial carry, returns final carry. - // c < 3*dvalue, x < 2*dvalue, this_i < dvalue - // We need to select the fastest one that works in this environment. - - // am1: use a single mult and divide to get the high bits, - // max digit bits should be 26 because - // max internal value = 2*dvalue^2-2*dvalue (< 2^53) - function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this[i++]+w[j]+c; - c = Math.floor(v/0x4000000); - w[j++] = v&0x3ffffff; - } - return c; - } - // am2 avoids a big mult-and-extract completely. - // Max digit bits should be <= 30 because we do bitwise ops - // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this[i]&0x7fff; - var h = this[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w[j++] = l&0x3fffffff; + while ((num|0) > 0) { + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + dest = (dest+1)|0; + src = (src+1)|0; + num = (num-1)|0; } - return c; - } - // Alternately, set max digit bits to 28 since some - // browsers slow down when dealing with 32-bit numbers. - function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this[i]&0x3fff; - var h = this[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w[j++] = l&0xfffffff; + return ret|0; +} +function _memmove(dest, src, num) { + dest = dest|0; src = src|0; num = num|0; + var ret = 0; + if (((src|0) < (dest|0)) & ((dest|0) < ((src + num)|0))) { + // Unlikely case: Copy backwards in a safe manner + ret = dest; + src = (src + num)|0; + dest = (dest + num)|0; + while ((num|0) > 0) { + dest = (dest - 1)|0; + src = (src - 1)|0; + num = (num - 1)|0; + HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); + } + dest = ret; + } else { + _memcpy(dest, src, num) | 0; } - return c; - } - if(j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; - } - else if(j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; - } - else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; - } - - BigInteger.prototype.DB = dbits; - BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; - } - - // (protected) set from integer value x, -DV <= x < DV - function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+DV; - else this.t = 0; + return dest | 0; +} +function _llvm_cttz_i32(x) { + x = x|0; + var ret = 0; + ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0); + if ((ret|0) < 8) return ret|0; + ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0); + if ((ret|0) < 8) return (ret + 8)|0; + ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0); + if ((ret|0) < 8) return (ret + 16)|0; + return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0; } - // return bigint initialized to value - function nbv(i) { var r = nbi(); r.fromInt(i); return r; } - - // (protected) set from string and radix - function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; +// ======== compiled code from system/lib/compiler-rt , see readme therein +function ___muldsi3($a, $b) { + $a = $a | 0; + $b = $b | 0; + var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0; + $1 = $a & 65535; + $2 = $b & 65535; + $3 = Math_imul($2, $1) | 0; + $6 = $a >>> 16; + $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0; + $11 = $b >>> 16; + $12 = Math_imul($11, $1) | 0; + return (tempRet0 = (($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0, 0 | ($8 + $12 << 16 | $3 & 65535)) | 0; +} +function ___divdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $7$0 = 0, $7$1 = 0, $8$0 = 0, $10$0 = 0; + $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; + $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; + $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; + $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; + $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; + $4$1 = tempRet0; + $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; + $7$0 = $2$0 ^ $1$0; + $7$1 = $2$1 ^ $1$1; + $8$0 = ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, 0) | 0; + $10$0 = _i64Subtract($8$0 ^ $7$0, tempRet0 ^ $7$1, $7$0, $7$1) | 0; + return $10$0 | 0; +} +function ___remdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $rem = 0, $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $10$0 = 0, $10$1 = 0, __stackBase__ = 0; + __stackBase__ = STACKTOP; + STACKTOP = STACKTOP + 16 | 0; + $rem = __stackBase__ | 0; + $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; + $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; + $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; + $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; + $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; + $4$1 = tempRet0; + $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; + ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, $rem) | 0; + $10$0 = _i64Subtract(HEAP32[$rem >> 2] ^ $1$0, HEAP32[$rem + 4 >> 2] ^ $1$1, $1$0, $1$1) | 0; + $10$1 = tempRet0; + STACKTOP = __stackBase__; + return (tempRet0 = $10$1, $10$0) | 0; +} +function ___muldi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0; + $x_sroa_0_0_extract_trunc = $a$0; + $y_sroa_0_0_extract_trunc = $b$0; + $1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0; + $1$1 = tempRet0; + $2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0; + return (tempRet0 = ((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0, 0 | $1$0 & -1) | 0; +} +function ___udivdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $1$0 = 0; + $1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0; + return $1$0 | 0; +} +function ___uremdi3($a$0, $a$1, $b$0, $b$1) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + var $rem = 0, __stackBase__ = 0; + __stackBase__ = STACKTOP; + STACKTOP = STACKTOP + 16 | 0; + $rem = __stackBase__ | 0; + ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0; + STACKTOP = __stackBase__; + return (tempRet0 = HEAP32[$rem + 4 >> 2] | 0, HEAP32[$rem >> 2] | 0) | 0; +} +function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { + $a$0 = $a$0 | 0; + $a$1 = $a$1 | 0; + $b$0 = $b$0 | 0; + $b$1 = $b$1 | 0; + $rem = $rem | 0; + var $n_sroa_0_0_extract_trunc = 0, $n_sroa_1_4_extract_shift$0 = 0, $n_sroa_1_4_extract_trunc = 0, $d_sroa_0_0_extract_trunc = 0, $d_sroa_1_4_extract_shift$0 = 0, $d_sroa_1_4_extract_trunc = 0, $4 = 0, $17 = 0, $37 = 0, $49 = 0, $51 = 0, $57 = 0, $58 = 0, $66 = 0, $78 = 0, $86 = 0, $88 = 0, $89 = 0, $91 = 0, $92 = 0, $95 = 0, $105 = 0, $117 = 0, $119 = 0, $125 = 0, $126 = 0, $130 = 0, $q_sroa_1_1_ph = 0, $q_sroa_0_1_ph = 0, $r_sroa_1_1_ph = 0, $r_sroa_0_1_ph = 0, $sr_1_ph = 0, $d_sroa_0_0_insert_insert99$0 = 0, $d_sroa_0_0_insert_insert99$1 = 0, $137$0 = 0, $137$1 = 0, $carry_0203 = 0, $sr_1202 = 0, $r_sroa_0_1201 = 0, $r_sroa_1_1200 = 0, $q_sroa_0_1199 = 0, $q_sroa_1_1198 = 0, $147 = 0, $149 = 0, $r_sroa_0_0_insert_insert42$0 = 0, $r_sroa_0_0_insert_insert42$1 = 0, $150$1 = 0, $151$0 = 0, $152 = 0, $154$0 = 0, $r_sroa_0_0_extract_trunc = 0, $r_sroa_1_4_extract_trunc = 0, $155 = 0, $carry_0_lcssa$0 = 0, $carry_0_lcssa$1 = 0, $r_sroa_0_1_lcssa = 0, $r_sroa_1_1_lcssa = 0, $q_sroa_0_1_lcssa = 0, $q_sroa_1_1_lcssa = 0, $q_sroa_0_0_insert_ext75$0 = 0, $q_sroa_0_0_insert_ext75$1 = 0, $q_sroa_0_0_insert_insert77$1 = 0, $_0$0 = 0, $_0$1 = 0; + $n_sroa_0_0_extract_trunc = $a$0; + $n_sroa_1_4_extract_shift$0 = $a$1; + $n_sroa_1_4_extract_trunc = $n_sroa_1_4_extract_shift$0; + $d_sroa_0_0_extract_trunc = $b$0; + $d_sroa_1_4_extract_shift$0 = $b$1; + $d_sroa_1_4_extract_trunc = $d_sroa_1_4_extract_shift$0; + if (($n_sroa_1_4_extract_trunc | 0) == 0) { + $4 = ($rem | 0) != 0; + if (($d_sroa_1_4_extract_trunc | 0) == 0) { + if ($4) { + HEAP32[$rem >> 2] = ($n_sroa_0_0_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); + HEAP32[$rem + 4 >> 2] = 0; } - mi = false; - if(sh == 0) - this[this.t++] = x; - else if(sh+k > this.DB) { - this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); + $_0$1 = 0; + $_0$0 = ($n_sroa_0_0_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } else { + if (!$4) { + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } - else - this[this.t-1] |= x<= this.DB) sh -= this.DB; - } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)<> 2] = $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $a$1 & 0; + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } - this.clamp(); - if(mi) BigInteger.ZERO.subTo(this,this); - } - - // (protected) clamp off excess high words - function bnpClamp() { - var c = this.s&this.DM; - while(this.t > 0 && this[this.t-1] == c) --this.t; } - - // (public) return string representation in given radix - function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this[i]&((1<>(p+=this.DB-k); + $17 = ($d_sroa_1_4_extract_trunc | 0) == 0; + do { + if (($d_sroa_0_0_extract_trunc | 0) == 0) { + if ($17) { + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); + HEAP32[$rem + 4 >> 2] = 0; + } + $_0$1 = 0; + $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + if (($n_sroa_0_0_extract_trunc | 0) == 0) { + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0; + HEAP32[$rem + 4 >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_1_4_extract_trunc >>> 0); } - else { - d = (this[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } + $_0$1 = 0; + $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_1_4_extract_trunc >>> 0) >>> 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + $37 = $d_sroa_1_4_extract_trunc - 1 | 0; + if (($37 & $d_sroa_1_4_extract_trunc | 0) == 0) { + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0 | $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $37 & $n_sroa_1_4_extract_trunc | $a$1 & 0; } - if(d > 0) m = true; - if(m) r += int2char(d); + $_0$1 = 0; + $_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0); + return (tempRet0 = $_0$1, $_0$0) | 0; } - } - return m?r:"0"; - } - - // (public) -this - function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } - - // (public) |this| - function bnAbs() { return (this.s<0)?this.negate():this; } - - // (public) return + if this > a, - if this < a, 0 if equal - function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; - return 0; - } - - // returns bit length of the integer x - function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; - } - - // (public) return the number of bits in "this" - function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); - } - - // (protected) r = this << n*DB - function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; - for(i = n-1; i >= 0; --i) r[i] = 0; - r.t = this.t+n; - r.s = this.s; - } - - // (protected) r = this >> n*DB - function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r[i-n] = this[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; - } - - // (protected) r = this << n - function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r[i+ds+1] = (this[i]>>cbs)|c; - c = (this[i]&bm)<= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); - } - - // (protected) r = this >> n - function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r[i-ds-1] |= (this[i]&bm)<>bs; - } - if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; + $49 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; + $51 = $49 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + if ($51 >>> 0 <= 30) { + $57 = $51 + 1 | 0; + $58 = 31 - $51 | 0; + $sr_1_ph = $57; + $r_sroa_0_1_ph = $n_sroa_1_4_extract_trunc << $58 | $n_sroa_0_0_extract_trunc >>> ($57 >>> 0); + $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($57 >>> 0); + $q_sroa_0_1_ph = 0; + $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $58; + break; + } + if (($rem | 0) == 0) { + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + HEAP32[$rem >> 2] = 0 | $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } else { + if (!$17) { + $117 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; + $119 = $117 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + if ($119 >>> 0 <= 31) { + $125 = $119 + 1 | 0; + $126 = 31 - $119 | 0; + $130 = $119 - 31 >> 31; + $sr_1_ph = $125; + $r_sroa_0_1_ph = $n_sroa_0_0_extract_trunc >>> ($125 >>> 0) & $130 | $n_sroa_1_4_extract_trunc << $126; + $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($125 >>> 0) & $130; + $q_sroa_0_1_ph = 0; + $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $126; + break; + } + if (($rem | 0) == 0) { + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; + } + HEAP32[$rem >> 2] = 0 | $a$0 & -1; + HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; + $_0$1 = 0; + $_0$0 = 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c -= a[i]; - r[i++] = c&this.DM; - c >>= this.DB; + $66 = $d_sroa_0_0_extract_trunc - 1 | 0; + if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) { + $86 = (Math_clz32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0; + $88 = $86 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + $89 = 64 - $88 | 0; + $91 = 32 - $88 | 0; + $92 = $91 >> 31; + $95 = $88 - 32 | 0; + $105 = $95 >> 31; + $sr_1_ph = $88; + $r_sroa_0_1_ph = $91 - 1 >> 31 & $n_sroa_1_4_extract_trunc >>> ($95 >>> 0) | ($n_sroa_1_4_extract_trunc << $91 | $n_sroa_0_0_extract_trunc >>> ($88 >>> 0)) & $105; + $r_sroa_1_1_ph = $105 & $n_sroa_1_4_extract_trunc >>> ($88 >>> 0); + $q_sroa_0_1_ph = $n_sroa_0_0_extract_trunc << $89 & $92; + $q_sroa_1_1_ph = ($n_sroa_1_4_extract_trunc << $89 | $n_sroa_0_0_extract_trunc >>> ($95 >>> 0)) & $92 | $n_sroa_0_0_extract_trunc << $91 & $88 - 33 >> 31; + break; } - c -= a.s; - } - r.s = (c<0)?-1:0; - if(c < -1) r[i++] = this.DV+c; - else if(c > 0) r[i++] = c; - r.t = i; - r.clamp(); - } - - // (protected) r = this * a, r != this,a (HAC 14.12) - // "this" should be the larger one if appropriate. - function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); - } - - // (protected) r = this^2, r != this (HAC 14.16) - function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x[i],r,2*i,0,1); - if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r[i+x.t] -= x.DV; - r[i+x.t+1] = 1; + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = $66 & $n_sroa_0_0_extract_trunc; + HEAP32[$rem + 4 >> 2] = 0; } - } - if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); - r.s = 0; - r.clamp(); - } - - // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) - // r != q, this != m. q or r may be null. - function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; - } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } - else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r[r.t++] = 1; - r.subTo(t,r); - } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); - if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r[i] < --qd) r.subTo(t,r); + if (($d_sroa_0_0_extract_trunc | 0) == 1) { + $_0$1 = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; + $_0$0 = 0 | $a$0 & -1; + return (tempRet0 = $_0$1, $_0$0) | 0; + } else { + $78 = _llvm_cttz_i32($d_sroa_0_0_extract_trunc | 0) | 0; + $_0$1 = 0 | $n_sroa_1_4_extract_trunc >>> ($78 >>> 0); + $_0$0 = $n_sroa_1_4_extract_trunc << 32 - $78 | $n_sroa_0_0_extract_trunc >>> ($78 >>> 0) | 0; + return (tempRet0 = $_0$1, $_0$0) | 0; } } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); + } while (0); + if (($sr_1_ph | 0) == 0) { + $q_sroa_1_1_lcssa = $q_sroa_1_1_ph; + $q_sroa_0_1_lcssa = $q_sroa_0_1_ph; + $r_sroa_1_1_lcssa = $r_sroa_1_1_ph; + $r_sroa_0_1_lcssa = $r_sroa_0_1_ph; + $carry_0_lcssa$1 = 0; + $carry_0_lcssa$0 = 0; + } else { + $d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1; + $d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0; + $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0 | 0, $d_sroa_0_0_insert_insert99$1 | 0, -1, -1) | 0; + $137$1 = tempRet0; + $q_sroa_1_1198 = $q_sroa_1_1_ph; + $q_sroa_0_1199 = $q_sroa_0_1_ph; + $r_sroa_1_1200 = $r_sroa_1_1_ph; + $r_sroa_0_1201 = $r_sroa_0_1_ph; + $sr_1202 = $sr_1_ph; + $carry_0203 = 0; + while (1) { + $147 = $q_sroa_0_1199 >>> 31 | $q_sroa_1_1198 << 1; + $149 = $carry_0203 | $q_sroa_0_1199 << 1; + $r_sroa_0_0_insert_insert42$0 = 0 | ($r_sroa_0_1201 << 1 | $q_sroa_1_1198 >>> 31); + $r_sroa_0_0_insert_insert42$1 = $r_sroa_0_1201 >>> 31 | $r_sroa_1_1200 << 1 | 0; + _i64Subtract($137$0, $137$1, $r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1) | 0; + $150$1 = tempRet0; + $151$0 = $150$1 >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1; + $152 = $151$0 & 1; + $154$0 = _i64Subtract($r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1, $151$0 & $d_sroa_0_0_insert_insert99$0, ((($150$1 | 0) < 0 ? -1 : 0) >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1) & $d_sroa_0_0_insert_insert99$1) | 0; + $r_sroa_0_0_extract_trunc = $154$0; + $r_sroa_1_4_extract_trunc = tempRet0; + $155 = $sr_1202 - 1 | 0; + if (($155 | 0) == 0) { + break; + } else { + $q_sroa_1_1198 = $147; + $q_sroa_0_1199 = $149; + $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc; + $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc; + $sr_1202 = $155; + $carry_0203 = $152; + } } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); - } - - // (public) this mod a - function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; - } - - // Modular reduction using "classic" algorithm - function Classic(m) { this.m = m; } - function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; - } - function cRevert(x) { return x; } - function cReduce(x) { x.divRemTo(this.m,null,x); } - function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - Classic.prototype.convert = cConvert; - Classic.prototype.revert = cRevert; - Classic.prototype.reduce = cReduce; - Classic.prototype.mulTo = cMulTo; - Classic.prototype.sqrTo = cSqrTo; - - // (protected) return "-1/this % 2^DB"; useful for Mont. reduction - // justification: - // xy == 1 (mod m) - // xy = 1+km - // xy(2-xy) = (1+km)(1-km) - // x[y(2-xy)] = 1-k^2m^2 - // x[y(2-xy)] == 1 (mod m^2) - // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 - // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. - // JS multiply "overflows" differently from C/C++, so care is needed here. - function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; - } - - // Montgomery reduction - function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; - } - - // xR mod m - function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; - } - - // x/R mod m - function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; + $q_sroa_1_1_lcssa = $147; + $q_sroa_0_1_lcssa = $149; + $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc; + $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc; + $carry_0_lcssa$1 = 0; + $carry_0_lcssa$0 = $152; } - - // x = x/R mod m (HAC 14.32) - function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } - } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa; + $q_sroa_0_0_insert_ext75$1 = 0; + $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1; + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa; + HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0; } + $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1; + $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0; + return (tempRet0 = $_0$1, $_0$0) | 0; +} +// ======================================================================= - // r = "x^2/R mod m"; x != r - function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = "xy/R mod m"; x,y != r - function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Montgomery.prototype.convert = montConvert; - Montgomery.prototype.revert = montRevert; - Montgomery.prototype.reduce = montReduce; - Montgomery.prototype.mulTo = montMulTo; - Montgomery.prototype.sqrTo = montSqrTo; - - // (protected) true iff this is even - function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } - - // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } - } - return z.revert(r); - } - // (public) this^e % m, 0 <= e < 2^32 - function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); - } - // protected - BigInteger.prototype.copyTo = bnpCopyTo; - BigInteger.prototype.fromInt = bnpFromInt; - BigInteger.prototype.fromString = bnpFromString; - BigInteger.prototype.clamp = bnpClamp; - BigInteger.prototype.dlShiftTo = bnpDLShiftTo; - BigInteger.prototype.drShiftTo = bnpDRShiftTo; - BigInteger.prototype.lShiftTo = bnpLShiftTo; - BigInteger.prototype.rShiftTo = bnpRShiftTo; - BigInteger.prototype.subTo = bnpSubTo; - BigInteger.prototype.multiplyTo = bnpMultiplyTo; - BigInteger.prototype.squareTo = bnpSquareTo; - BigInteger.prototype.divRemTo = bnpDivRemTo; - BigInteger.prototype.invDigit = bnpInvDigit; - BigInteger.prototype.isEven = bnpIsEven; - BigInteger.prototype.exp = bnpExp; - - // public - BigInteger.prototype.toString = bnToString; - BigInteger.prototype.negate = bnNegate; - BigInteger.prototype.abs = bnAbs; - BigInteger.prototype.compareTo = bnCompareTo; - BigInteger.prototype.bitLength = bnBitLength; - BigInteger.prototype.mod = bnMod; - BigInteger.prototype.modPowInt = bnModPowInt; - - // "constants" - BigInteger.ZERO = nbv(0); - BigInteger.ONE = nbv(1); - - // jsbn2 stuff - - // (protected) convert from radix string - function bnpFromRadix(s,b) { - this.fromInt(0); - if(b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b,cs), mi = false, j = 0, w = 0; - for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } - } - if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); - } - if(mi) BigInteger.ZERO.subTo(this,this); - } + +function dynCall_ii(index,a1) { + index = index|0; + a1=a1|0; + return FUNCTION_TABLE_ii[index&1](a1|0)|0; +} - // (protected) return x s.t. r^x < DV - function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } - // (public) 0 if this == 0, 1 if this > 0 - function bnSigNum() { - if(this.s < 0) return -1; - else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; - } +function dynCall_iiii(index,a1,a2,a3) { + index = index|0; + a1=a1|0; a2=a2|0; a3=a3|0; + return FUNCTION_TABLE_iiii[index&3](a1|0,a2|0,a3|0)|0; +} - // (protected) this *= n, this >= 0, 1 < n < DV - function bnpDMultiply(n) { - this[this.t] = this.am(0,n-1,this,0,0,this.t); - ++this.t; - this.clamp(); - } - // (protected) this += n << w words, this >= 0 - function bnpDAddOffset(n,w) { - if(n == 0) return; - while(this.t <= w) this[this.t++] = 0; - this[w] += n; - while(this[w] >= this.DV) { - this[w] -= this.DV; - if(++w >= this.t) this[this.t++] = 0; - ++this[w]; - } - } +function dynCall_vi(index,a1) { + index = index|0; + a1=a1|0; + FUNCTION_TABLE_vi[index&1](a1|0); +} - // (protected) convert to radix string - function bnpToRadix(b) { - if(b == null) b = 10; - if(this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b,cs); - var d = nbv(a), y = nbi(), z = nbi(), r = ""; - this.divRemTo(d,y,z); - while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); - } - return z.intValue().toString(b) + r; - } +function b0(p0) { + p0 = p0|0; abort(0);return 0; +} +function b1(p0,p1,p2) { + p0 = p0|0;p1 = p1|0;p2 = p2|0; abort(1);return 0; +} +function b2(p0) { + p0 = p0|0; abort(2); +} - // (public) return value as integer - function bnIntValue() { - if(this.s < 0) { - if(this.t == 1) return this[0]-this.DV; - else if(this.t == 0) return -1; - } - else if(this.t == 1) return this[0]; - else if(this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1]&((1<<(32-this.DB))-1))<>= this.DB; - } - if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c += a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c<0)?-1:0; - if(c > 0) r[i++] = c; - else if(c < -1) r[i++] = this.DV+c; - r.t = i; - r.clamp(); - } + return { _curve25519_verify: _curve25519_verify, _crypto_sign_ed25519_ref10_ge_scalarmult_base: _crypto_sign_ed25519_ref10_ge_scalarmult_base, _curve25519_sign: _curve25519_sign, _fflush: _fflush, _i64Add: _i64Add, _memmove: _memmove, _bitshift64Ashr: _bitshift64Ashr, _sph_sha512_init: _sph_sha512_init, _curve25519_donna: _curve25519_donna, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, _bitshift64Lshr: _bitshift64Lshr, _free: _free, _i64Subtract: _i64Subtract, ___errno_location: ___errno_location, _bitshift64Shl: _bitshift64Shl, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, establishStackSpace: establishStackSpace, setThrew: setThrew, setTempRet0: setTempRet0, getTempRet0: getTempRet0, dynCall_ii: dynCall_ii, dynCall_iiii: dynCall_iiii, dynCall_vi: dynCall_vi }; +}) +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg, Module.asmLibraryArg, buffer); +var _curve25519_verify = Module["_curve25519_verify"] = asm["_curve25519_verify"]; +var _crypto_sign_ed25519_ref10_ge_scalarmult_base = Module["_crypto_sign_ed25519_ref10_ge_scalarmult_base"] = asm["_crypto_sign_ed25519_ref10_ge_scalarmult_base"]; +var _curve25519_sign = Module["_curve25519_sign"] = asm["_curve25519_sign"]; +var _fflush = Module["_fflush"] = asm["_fflush"]; +var runPostSets = Module["runPostSets"] = asm["runPostSets"]; +var _i64Add = Module["_i64Add"] = asm["_i64Add"]; +var _memmove = Module["_memmove"] = asm["_memmove"]; +var _bitshift64Ashr = Module["_bitshift64Ashr"] = asm["_bitshift64Ashr"]; +var _sph_sha512_init = Module["_sph_sha512_init"] = asm["_sph_sha512_init"]; +var _curve25519_donna = Module["_curve25519_donna"] = asm["_curve25519_donna"]; +var _memset = Module["_memset"] = asm["_memset"]; +var _malloc = Module["_malloc"] = asm["_malloc"]; +var _memcpy = Module["_memcpy"] = asm["_memcpy"]; +var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"]; +var _free = Module["_free"] = asm["_free"]; +var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"]; +var ___errno_location = Module["___errno_location"] = asm["___errno_location"]; +var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"]; +var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"]; +var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"]; +var dynCall_vi = Module["dynCall_vi"] = asm["dynCall_vi"]; +; - BigInteger.prototype.fromRadix = bnpFromRadix; - BigInteger.prototype.chunkSize = bnpChunkSize; - BigInteger.prototype.signum = bnSigNum; - BigInteger.prototype.dMultiply = bnpDMultiply; - BigInteger.prototype.dAddOffset = bnpDAddOffset; - BigInteger.prototype.toRadix = bnpToRadix; - BigInteger.prototype.intValue = bnIntValue; - BigInteger.prototype.addTo = bnpAddTo; - - //======= end jsbn ======= - - // Emscripten wrapper - var Wrapper = { - abs: function(l, h) { - var x = new goog.math.Long(l, h); - var ret; - if (x.isNegative()) { - ret = x.negate(); - } else { - ret = x; - } - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - }, - ensureTemps: function() { - if (Wrapper.ensuredTemps) return; - Wrapper.ensuredTemps = true; - Wrapper.two32 = new BigInteger(); - Wrapper.two32.fromString('4294967296', 10); - Wrapper.two64 = new BigInteger(); - Wrapper.two64.fromString('18446744073709551616', 10); - Wrapper.temp1 = new BigInteger(); - Wrapper.temp2 = new BigInteger(); - }, - lh2bignum: function(l, h) { - var a = new BigInteger(); - a.fromString(h.toString(), 10); - var b = new BigInteger(); - a.multiplyTo(Wrapper.two32, b); - var c = new BigInteger(); - c.fromString(l.toString(), 10); - var d = new BigInteger(); - c.addTo(b, d); - return d; - }, - stringify: function(l, h, unsigned) { - var ret = new goog.math.Long(l, h).toString(); - if (unsigned && ret[0] == '-') { - // unsign slowly using jsbn bignums - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(ret, 10); - ret = new BigInteger(); - Wrapper.two64.addTo(bignum, ret); - ret = ret.toString(10); - } - return ret; - }, - fromString: function(str, base, min, max, unsigned) { - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(str, base); - var bigmin = new BigInteger(); - bigmin.fromString(min, 10); - var bigmax = new BigInteger(); - bigmax.fromString(max, 10); - if (unsigned && bignum.compareTo(BigInteger.ZERO) < 0) { - var temp = new BigInteger(); - bignum.addTo(Wrapper.two64, temp); - bignum = temp; - } - var error = false; - if (bignum.compareTo(bigmin) < 0) { - bignum = bigmin; - error = true; - } else if (bignum.compareTo(bigmax) > 0) { - bignum = bigmax; - error = true; - } - var ret = goog.math.Long.fromString(bignum.toString()); // min-max checks should have clamped this to a range goog.math.Long can handle well - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - if (error) throw 'range error'; - } - }; - return Wrapper; -})(); +Runtime.stackAlloc = asm['stackAlloc']; +Runtime.stackSave = asm['stackSave']; +Runtime.stackRestore = asm['stackRestore']; +Runtime.establishStackSpace = asm['establishStackSpace']; -//======= end closure i64 code ======= +Runtime.setTempRet0 = asm['setTempRet0']; +Runtime.getTempRet0 = asm['getTempRet0']; // === Auto-generated postamble setup entry stuff === -if (memoryInitializer) { - if (typeof Module['locateFile'] === 'function') { - memoryInitializer = Module['locateFile'](memoryInitializer); - } else if (Module['memoryInitializerPrefixURL']) { - memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; - } - if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { - var data = Module['readBinary'](memoryInitializer); - HEAPU8.set(data, STATIC_BASE); - } else { - addRunDependency('memory initializer'); - Browser.asyncLoad(memoryInitializer, function(data) { - HEAPU8.set(data, STATIC_BASE); - removeRunDependency('memory initializer'); - }, function(data) { - throw 'could not load memory initializer ' + memoryInitializer; - }); - } -} function ExitStatus(status) { this.name = "ExitStatus"; @@ -24943,7 +24450,7 @@ var calledMain = false; dependenciesFulfilled = function runCaller() { // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) - if (!Module['calledRun'] && shouldRunNow) run(); + if (!Module['calledRun']) run(); if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled } @@ -24970,7 +24477,6 @@ Module['callMain'] = Module.callMain = function callMain(args) { argv.push(0); argv = allocate(argv, 'i32', ALLOC_NORMAL); - initialStackTop = STACKTOP; try { @@ -24978,7 +24484,7 @@ Module['callMain'] = Module.callMain = function callMain(args) { // if we're not running an evented main loop, it's time to exit - exit(ret); + exit(ret, /* implicit = */ true); } catch(e) { if (e instanceof ExitStatus) { @@ -25025,9 +24531,6 @@ function run(args) { preMain(); - if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) { - Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms'); - } if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); @@ -25050,17 +24553,22 @@ function run(args) { } Module['run'] = Module.run = run; -function exit(status) { - if (Module['noExitRuntime']) { +function exit(status, implicit) { + if (implicit && Module['noExitRuntime']) { return; } - ABORT = true; - EXITSTATUS = status; - STACKTOP = initialStackTop; + if (Module['noExitRuntime']) { + } else { + + ABORT = true; + EXITSTATUS = status; + STACKTOP = initialStackTop; - // exit the runtime - exitRuntime(); + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } if (ENVIRONMENT_IS_NODE) { // Work around a node.js bug where stdout buffer is not flushed at process exit: @@ -25085,10 +24593,15 @@ function exit(status) { } Module['exit'] = Module.exit = exit; -function abort(text) { - if (text) { - Module.print(text); - Module.printErr(text); +var abortDecorators = []; + +function abort(what) { + if (what !== undefined) { + Module.print(what); + Module.printErr(what); + what = JSON.stringify(what) + } else { + what = ''; } ABORT = true; @@ -25096,7 +24609,13 @@ function abort(text) { var extra = '\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.'; - throw 'abort() at ' + stackTrace() + extra; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; } Module['abort'] = Module.abort = abort; @@ -25129,155 +24648,5 @@ run(); - -/* vim: ts=4:sw=4:expandtab */ -var Internal = Internal || {}; - -(function() { - 'use strict'; - - // Insert some bytes into the emscripten memory and return a pointer - function _allocate(bytes) { - var address = Module._malloc(bytes.length); - Module.HEAPU8.set(bytes, address); - - return address; - } - - function _readBytes(address, length, array) { - array.set(Module.HEAPU8.subarray(address, address + length)); - } - - var basepoint = new Uint8Array(32); - basepoint[0] = 9; - - Internal.curve25519 = { - keyPair: function(privKey) { - var priv = new Uint8Array(privKey); - priv[0] &= 248; - priv[31] &= 127; - priv[31] |= 64; - - // Where to store the result - var publicKey_ptr = Module._malloc(32); - - // Get a pointer to the private key - var privateKey_ptr = _allocate(priv); - - // The basepoint for generating public keys - var basepoint_ptr = _allocate(basepoint); - - // The return value is just 0, the operation is done in place - var err = Module._curve25519_donna(publicKey_ptr, - privateKey_ptr, - basepoint_ptr); - - var res = new Uint8Array(32); - _readBytes(publicKey_ptr, 32, res); - - Module._free(publicKey_ptr); - Module._free(privateKey_ptr); - Module._free(basepoint_ptr); - - return { pubKey: res.buffer, privKey: priv.buffer }; - }, - sharedSecret: function(pubKey, privKey) { - // Where to store the result - var sharedKey_ptr = Module._malloc(32); - - // Get a pointer to our private key - var privateKey_ptr = _allocate(new Uint8Array(privKey)); - - // Get a pointer to their public key, the basepoint when you're - // generating a shared secret - var basepoint_ptr = _allocate(new Uint8Array(pubKey)); - - // Return value is 0 here too of course - var err = Module._curve25519_donna(sharedKey_ptr, - privateKey_ptr, - basepoint_ptr); - - var res = new Uint8Array(32); - _readBytes(sharedKey_ptr, 32, res); - - Module._free(sharedKey_ptr); - Module._free(privateKey_ptr); - Module._free(basepoint_ptr); - - return res.buffer; - }, - sign: function(privKey, message) { - // Where to store the result - var signature_ptr = Module._malloc(64); - - // Get a pointer to our private key - var privateKey_ptr = _allocate(new Uint8Array(privKey)); - - // Get a pointer to the message - var message_ptr = _allocate(new Uint8Array(message)); - - var err = Module._curve25519_sign(signature_ptr, - privateKey_ptr, - message_ptr, - message.byteLength); - - var res = new Uint8Array(64); - _readBytes(signature_ptr, 64, res); - - Module._free(signature_ptr); - Module._free(privateKey_ptr); - Module._free(message_ptr); - - return res.buffer; - }, - verify: function(pubKey, message, sig) { - // Get a pointer to their public key - var publicKey_ptr = _allocate(new Uint8Array(pubKey)); - - // Get a pointer to the signature - var signature_ptr = _allocate(new Uint8Array(sig)); - - // Get a pointer to the message - var message_ptr = _allocate(new Uint8Array(message)); - - var res = Module._curve25519_verify(signature_ptr, - publicKey_ptr, - message_ptr, - message.byteLength); - - Module._free(publicKey_ptr); - Module._free(signature_ptr); - Module._free(message_ptr); - - return res !== 0; - } - }; - - Internal.curve25519_async = { - keyPair: function(privKey) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.keyPair(privKey)); - }); - }, - sharedSecret: function(pubKey, privKey) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.sharedSecret(pubKey, privKey)); - }); - }, - sign: function(privKey, message) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.sign(privKey, message)); - }); - }, - verify: function(pubKey, message, sig) { - return new Promise(function(resolve, reject) { - if (Internal.curve25519.verify(pubKey, message, sig)) { - reject(new Error("Invalid signature")); - } else { - resolve(); - } - }); - }, - }; - -})(); +module.exports = Module; +Module.inspect = function() { return '[Module]'; }; \ No newline at end of file diff --git a/build/protobufs_concat.js b/build/protobufs_concat.js index 295ac7b..9241e5c 100644 --- a/build/protobufs_concat.js +++ b/build/protobufs_concat.js @@ -33,19 +33,24 @@ Internal.protoText = function() { return protoText; }(); /* vim: ts=4:sw=4 */ -var Internal = Internal || {}; -Internal.protobuf = function() { - 'use strict'; +// this is concatinated after ../protos/WhisperTextProtocol.proto +// Internal.protoText is getting passed in from that file +// (see the Gruntfile's `protos_concat` routine) +// here we export the loaded protobuf, an object +// { WhisperMessage, PreKeyWhisperMessage } +module.exports = function protobuf () { + 'use strict'; + var dcodeIO = require('../build/dcodeIO.js'); - function loadProtoBufs(filename) { - return dcodeIO.ProtoBuf.loadProto(Internal.protoText['protos/' + filename]).build('textsecure'); - } + function loadProtoBufs(filename) { + return dcodeIO.loadProto(Internal.protoText['protos/' + filename]).build('textsecure'); + } - var protocolMessages = loadProtoBufs('WhisperTextProtocol.proto'); + var protocolMessages = loadProtoBufs('WhisperTextProtocol.proto'); - return { - WhisperMessage : protocolMessages.WhisperMessage, - PreKeyWhisperMessage : protocolMessages.PreKeyWhisperMessage - }; + return { + WhisperMessage : protocolMessages.WhisperMessage, + PreKeyWhisperMessage : protocolMessages.PreKeyWhisperMessage + }; }(); diff --git a/dist/libsignal-protocol-worker.js b/dist/libsignal-protocol-worker.js deleted file mode 100644 index 2067957..0000000 --- a/dist/libsignal-protocol-worker.js +++ /dev/null @@ -1,25298 +0,0 @@ -;(function(){ -var Internal = {}; -var libsignal = {}; -// The Module object: Our interface to the outside world. We import -// and export values on it, and do the work to get that through -// closure compiler if necessary. There are various ways Module can be used: -// 1. Not defined. We create it here -// 2. A function parameter, function(Module) { ..generated code.. } -// 3. pre-run appended it, var Module = {}; ..generated code.. -// 4. External script tag defines var Module. -// We need to do an eval in order to handle the closure compiler -// case, where this code here is minified but Module was defined -// elsewhere (e.g. case 4 above). We also need to check if Module -// already exists (e.g. case 3 above). -// Note that if you want to run closure, and also to use Module -// after the generated code, you will need to define var Module = {}; -// before the code. Then that object will be used in the code, and you -// can continue to use Module afterwards as well. -var Module; -if (!Module) Module = (typeof Module !== 'undefined' ? Module : null) || {}; - -// Sometimes an existing Module object exists with properties -// meant to overwrite the default module functionality. Here -// we collect those properties and reapply _after_ we configure -// the current environment's defaults to avoid having to be so -// defensive during initialization. -var moduleOverrides = {}; -for (var key in Module) { - if (Module.hasOwnProperty(key)) { - moduleOverrides[key] = Module[key]; - } -} - -// The environment setup code below is customized to use Module. -// *** Environment setup code *** -var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; -var ENVIRONMENT_IS_WEB = typeof window === 'object'; -var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; -var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; - -if (ENVIRONMENT_IS_NODE) { - // Expose functionality in the same simple way that the shells work - // Note that we pollute the global namespace here, otherwise we break in node - if (!Module['print']) Module['print'] = function print(x) { - process['stdout'].write(x + '\n'); - }; - if (!Module['printErr']) Module['printErr'] = function printErr(x) { - process['stderr'].write(x + '\n'); - }; - - var nodeFS = require('fs'); - var nodePath = require('path'); - - Module['read'] = function read(filename, binary) { - filename = nodePath['normalize'](filename); - var ret = nodeFS['readFileSync'](filename); - // The path is absolute if the normalized version is the same as the resolved. - if (!ret && filename != nodePath['resolve'](filename)) { - filename = path.join(__dirname, '..', 'src', filename); - ret = nodeFS['readFileSync'](filename); - } - if (ret && !binary) ret = ret.toString(); - return ret; - }; - - Module['readBinary'] = function readBinary(filename) { return Module['read'](filename, true) }; - - Module['load'] = function load(f) { - globalEval(read(f)); - }; - - if (process['argv'].length > 1) { - Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); - } else { - Module['thisProgram'] = 'unknown-program'; - } - - Module['arguments'] = process['argv'].slice(2); - - if (typeof module !== 'undefined') { - module['exports'] = Module; - } - - process['on']('uncaughtException', function(ex) { - // suppress ExitStatus exceptions from showing an error - if (!(ex instanceof ExitStatus)) { - throw ex; - } - }); -} -else if (ENVIRONMENT_IS_SHELL) { - if (!Module['print']) Module['print'] = print; - if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm - - if (typeof read != 'undefined') { - Module['read'] = read; - } else { - Module['read'] = function read() { throw 'no read() available (jsc?)' }; - } - - Module['readBinary'] = function readBinary(f) { - if (typeof readbuffer === 'function') { - return new Uint8Array(readbuffer(f)); - } - var data = read(f, 'binary'); - assert(typeof data === 'object'); - return data; - }; - - if (typeof scriptArgs != 'undefined') { - Module['arguments'] = scriptArgs; - } else if (typeof arguments != 'undefined') { - Module['arguments'] = arguments; - } - - this['Module'] = Module; - -} -else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { - Module['read'] = function read(url) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, false); - xhr.send(null); - return xhr.responseText; - }; - - if (typeof arguments != 'undefined') { - Module['arguments'] = arguments; - } - - if (typeof console !== 'undefined') { - if (!Module['print']) Module['print'] = function print(x) { - console.log(x); - }; - if (!Module['printErr']) Module['printErr'] = function printErr(x) { - console.log(x); - }; - } else { - // Probably a worker, and without console.log. We can do very little here... - var TRY_USE_DUMP = false; - if (!Module['print']) Module['print'] = (TRY_USE_DUMP && (typeof(dump) !== "undefined") ? (function(x) { - dump(x); - }) : (function(x) { - // self.postMessage(x); // enable this if you want stdout to be sent as messages - })); - } - - if (ENVIRONMENT_IS_WEB) { - window['Module'] = Module; - } else { - Module['load'] = importScripts; - } -} -else { - // Unreachable because SHELL is dependant on the others - throw 'Unknown runtime environment. Where are we?'; -} - -function globalEval(x) { - eval.call(null, x); -} -if (!Module['load'] && Module['read']) { - Module['load'] = function load(f) { - globalEval(Module['read'](f)); - }; -} -if (!Module['print']) { - Module['print'] = function(){}; -} -if (!Module['printErr']) { - Module['printErr'] = Module['print']; -} -if (!Module['arguments']) { - Module['arguments'] = []; -} -if (!Module['thisProgram']) { - Module['thisProgram'] = './this.program'; -} - -// *** Environment setup code *** - -// Closure helpers -Module.print = Module['print']; -Module.printErr = Module['printErr']; - -// Callbacks -Module['preRun'] = []; -Module['postRun'] = []; - -// Merge back in the overrides -for (var key in moduleOverrides) { - if (moduleOverrides.hasOwnProperty(key)) { - Module[key] = moduleOverrides[key]; - } -} - - - -// === Preamble library stuff === - -// Documentation for the public APIs defined in this file must be updated in: -// site/source/docs/api_reference/preamble.js.rst -// A prebuilt local version of the documentation is available at: -// site/build/text/docs/api_reference/preamble.js.txt -// You can also build docs locally as HTML or other formats in site/ -// An online HTML version (which may be of a different version of Emscripten) -// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html - -//======================================== -// Runtime code shared with compiler -//======================================== - -var Runtime = { - setTempRet0: function (value) { - tempRet0 = value; - }, - getTempRet0: function () { - return tempRet0; - }, - stackSave: function () { - return STACKTOP; - }, - stackRestore: function (stackTop) { - STACKTOP = stackTop; - }, - getNativeTypeSize: function (type) { - switch (type) { - case 'i1': case 'i8': return 1; - case 'i16': return 2; - case 'i32': return 4; - case 'i64': return 8; - case 'float': return 4; - case 'double': return 8; - default: { - if (type[type.length-1] === '*') { - return Runtime.QUANTUM_SIZE; // A pointer - } else if (type[0] === 'i') { - var bits = parseInt(type.substr(1)); - assert(bits % 8 === 0); - return bits/8; - } else { - return 0; - } - } - } - }, - getNativeFieldSize: function (type) { - return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE); - }, - STACK_ALIGN: 16, - getAlignSize: function (type, size, vararg) { - // we align i64s and doubles on 64-bit boundaries, unlike x86 - if (!vararg && (type == 'i64' || type == 'double')) return 8; - if (!type) return Math.min(size, 8); // align structures internally to 64 bits - return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE); - }, - dynCall: function (sig, ptr, args) { - if (args && args.length) { - if (!args.splice) args = Array.prototype.slice.call(args); - args.splice(0, 0, ptr); - return Module['dynCall_' + sig].apply(null, args); - } else { - return Module['dynCall_' + sig].call(null, ptr); - } - }, - functionPointers: [], - addFunction: function (func) { - for (var i = 0; i < Runtime.functionPointers.length; i++) { - if (!Runtime.functionPointers[i]) { - Runtime.functionPointers[i] = func; - return 2*(1 + i); - } - } - throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; - }, - removeFunction: function (index) { - Runtime.functionPointers[(index-2)/2] = null; - }, - getAsmConst: function (code, numArgs) { - // code is a constant string on the heap, so we can cache these - if (!Runtime.asmConstCache) Runtime.asmConstCache = {}; - var func = Runtime.asmConstCache[code]; - if (func) return func; - var args = []; - for (var i = 0; i < numArgs; i++) { - args.push(String.fromCharCode(36) + i); // $0, $1 etc - } - var source = Pointer_stringify(code); - if (source[0] === '"') { - // tolerate EM_ASM("..code..") even though EM_ASM(..code..) is correct - if (source.indexOf('"', 1) === source.length-1) { - source = source.substr(1, source.length-2); - } else { - // something invalid happened, e.g. EM_ASM("..code($0)..", input) - abort('invalid EM_ASM input |' + source + '|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)'); - } - } - try { - // Module is the only 'upvar', which we provide directly. We also provide FS for legacy support. - var evalled = eval('(function(Module, FS) { return function(' + args.join(',') + '){ ' + source + ' } })')(Module, typeof FS !== 'undefined' ? FS : null); - } catch(e) { - Module.printErr('error in executing inline EM_ASM code: ' + e + ' on: \n\n' + source + '\n\nwith args |' + args + '| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)'); - throw e; - } - return Runtime.asmConstCache[code] = evalled; - }, - warnOnce: function (text) { - if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {}; - if (!Runtime.warnOnce.shown[text]) { - Runtime.warnOnce.shown[text] = 1; - Module.printErr(text); - } - }, - funcWrappers: {}, - getFuncWrapper: function (func, sig) { - assert(sig); - if (!Runtime.funcWrappers[sig]) { - Runtime.funcWrappers[sig] = {}; - } - var sigCache = Runtime.funcWrappers[sig]; - if (!sigCache[func]) { - sigCache[func] = function dynCall_wrapper() { - return Runtime.dynCall(sig, func, arguments); - }; - } - return sigCache[func]; - }, - UTF8Processor: function () { - var buffer = []; - var needed = 0; - this.processCChar = function (code) { - code = code & 0xFF; - - if (buffer.length == 0) { - if ((code & 0x80) == 0x00) { // 0xxxxxxx - return String.fromCharCode(code); - } - buffer.push(code); - if ((code & 0xE0) == 0xC0) { // 110xxxxx - needed = 1; - } else if ((code & 0xF0) == 0xE0) { // 1110xxxx - needed = 2; - } else { // 11110xxx - needed = 3; - } - return ''; - } - - if (needed) { - buffer.push(code); - needed--; - if (needed > 0) return ''; - } - - var c1 = buffer[0]; - var c2 = buffer[1]; - var c3 = buffer[2]; - var c4 = buffer[3]; - var ret; - if (buffer.length == 2) { - ret = String.fromCharCode(((c1 & 0x1F) << 6) | (c2 & 0x3F)); - } else if (buffer.length == 3) { - ret = String.fromCharCode(((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F)); - } else { - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var codePoint = ((c1 & 0x07) << 18) | ((c2 & 0x3F) << 12) | - ((c3 & 0x3F) << 6) | (c4 & 0x3F); - ret = String.fromCharCode( - (((codePoint - 0x10000) / 0x400)|0) + 0xD800, - (codePoint - 0x10000) % 0x400 + 0xDC00); - } - buffer.length = 0; - return ret; - } - this.processJSString = function processJSString(string) { - /* TODO: use TextEncoder when present, - var encoder = new TextEncoder(); - encoder['encoding'] = "utf-8"; - var utf8Array = encoder['encode'](aMsg.data); - */ - string = unescape(encodeURIComponent(string)); - var ret = []; - for (var i = 0; i < string.length; i++) { - ret.push(string.charCodeAt(i)); - } - return ret; - } - }, - getCompilerSetting: function (name) { - throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work'; - }, - stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+15)&-16); return ret; }, - staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = (((STATICTOP)+15)&-16); return ret; }, - dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; }, - alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 16))*(quantum ? quantum : 16); return ret; }, - makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0))); return ret; }, - GLOBAL_BASE: 8, - QUANTUM_SIZE: 4, - __dummy__: 0 -} - - -Module['Runtime'] = Runtime; - - - - - - - - - -//======================================== -// Runtime essentials -//======================================== - -var __THREW__ = 0; // Used in checking for thrown exceptions. - -var ABORT = false; // whether we are quitting the application. no code should run after this. set in exit() and abort() -var EXITSTATUS = 0; - -var undef = 0; -// tempInt is used for 32-bit signed values or smaller. tempBigInt is used -// for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt -var tempValue, tempInt, tempBigInt, tempInt2, tempBigInt2, tempPair, tempBigIntI, tempBigIntR, tempBigIntS, tempBigIntP, tempBigIntD, tempDouble, tempFloat; -var tempI64, tempI64b; -var tempRet0, tempRet1, tempRet2, tempRet3, tempRet4, tempRet5, tempRet6, tempRet7, tempRet8, tempRet9; - -function assert(condition, text) { - if (!condition) { - abort('Assertion failed: ' + text); - } -} - -var globalScope = this; - -// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) -function getCFunc(ident) { - var func = Module['_' + ident]; // closure exported function - if (!func) { - try { - func = eval('_' + ident); // explicit lookup - } catch(e) {} - } - assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)'); - return func; -} - -var cwrap, ccall; -(function(){ - var JSfuncs = { - // Helpers for cwrap -- it can't refer to Runtime directly because it might - // be renamed by closure, instead it calls JSfuncs['stackSave'].body to find - // out what the minified function name is. - 'stackSave': function() { - Runtime.stackSave() - }, - 'stackRestore': function() { - Runtime.stackRestore() - }, - // type conversion from js to c - 'arrayToC' : function(arr) { - var ret = Runtime.stackAlloc(arr.length); - writeArrayToMemory(arr, ret); - return ret; - }, - 'stringToC' : function(str) { - var ret = 0; - if (str !== null && str !== undefined && str !== 0) { // null string - // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' - ret = Runtime.stackAlloc((str.length << 2) + 1); - writeStringToMemory(str, ret); - } - return ret; - } - }; - // For fast lookup of conversion functions - var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']}; - - // C calling interface. - ccall = function ccallFunc(ident, returnType, argTypes, args) { - var func = getCFunc(ident); - var cArgs = []; - var stack = 0; - if (args) { - for (var i = 0; i < args.length; i++) { - var converter = toC[argTypes[i]]; - if (converter) { - if (stack === 0) stack = Runtime.stackSave(); - cArgs[i] = converter(args[i]); - } else { - cArgs[i] = args[i]; - } - } - } - var ret = func.apply(null, cArgs); - if (returnType === 'string') ret = Pointer_stringify(ret); - if (stack !== 0) Runtime.stackRestore(stack); - return ret; - } - - var sourceRegex = /^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/; - function parseJSFunc(jsfunc) { - // Match the body and the return value of a javascript function source - var parsed = jsfunc.toString().match(sourceRegex).slice(1); - return {arguments : parsed[0], body : parsed[1], returnValue: parsed[2]} - } - var JSsource = {}; - for (var fun in JSfuncs) { - if (JSfuncs.hasOwnProperty(fun)) { - // Elements of toCsource are arrays of three items: - // the code, and the return value - JSsource[fun] = parseJSFunc(JSfuncs[fun]); - } - } - - - cwrap = function cwrap(ident, returnType, argTypes) { - argTypes = argTypes || []; - var cfunc = getCFunc(ident); - // When the function takes numbers and returns a number, we can just return - // the original function - var numericArgs = argTypes.every(function(type){ return type === 'number'}); - var numericRet = (returnType !== 'string'); - if ( numericRet && numericArgs) { - return cfunc; - } - // Creation of the arguments list (["$1","$2",...,"$nargs"]) - var argNames = argTypes.map(function(x,i){return '$'+i}); - var funcstr = "(function(" + argNames.join(',') + ") {"; - var nargs = argTypes.length; - if (!numericArgs) { - // Generate the code needed to convert the arguments from javascript - // values to pointers - funcstr += 'var stack = ' + JSsource['stackSave'].body + ';'; - for (var i = 0; i < nargs; i++) { - var arg = argNames[i], type = argTypes[i]; - if (type === 'number') continue; - var convertCode = JSsource[type + 'ToC']; // [code, return] - funcstr += 'var ' + convertCode.arguments + ' = ' + arg + ';'; - funcstr += convertCode.body + ';'; - funcstr += arg + '=' + convertCode.returnValue + ';'; - } - } - - // When the code is compressed, the name of cfunc is not literally 'cfunc' anymore - var cfuncname = parseJSFunc(function(){return cfunc}).returnValue; - // Call the function - funcstr += 'var ret = ' + cfuncname + '(' + argNames.join(',') + ');'; - if (!numericRet) { // Return type can only by 'string' or 'number' - // Convert the result to a string - var strgfy = parseJSFunc(function(){return Pointer_stringify}).returnValue; - funcstr += 'ret = ' + strgfy + '(ret);'; - } - if (!numericArgs) { - // If we had a stack, restore it - funcstr += JSsource['stackRestore'].body.replace('()', '(stack)') + ';'; - } - funcstr += 'return ret})'; - return eval(funcstr); - }; -})(); -Module["cwrap"] = cwrap; -Module["ccall"] = ccall; - - -function setValue(ptr, value, type, noSafe) { - type = type || 'i8'; - if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit - switch(type) { - case 'i1': HEAP8[((ptr)>>0)]=value; break; - case 'i8': HEAP8[((ptr)>>0)]=value; break; - case 'i16': HEAP16[((ptr)>>1)]=value; break; - case 'i32': HEAP32[((ptr)>>2)]=value; break; - case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; - case 'float': HEAPF32[((ptr)>>2)]=value; break; - case 'double': HEAPF64[((ptr)>>3)]=value; break; - default: abort('invalid type for setValue: ' + type); - } -} -Module['setValue'] = setValue; - - -function getValue(ptr, type, noSafe) { - type = type || 'i8'; - if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit - switch(type) { - case 'i1': return HEAP8[((ptr)>>0)]; - case 'i8': return HEAP8[((ptr)>>0)]; - case 'i16': return HEAP16[((ptr)>>1)]; - case 'i32': return HEAP32[((ptr)>>2)]; - case 'i64': return HEAP32[((ptr)>>2)]; - case 'float': return HEAPF32[((ptr)>>2)]; - case 'double': return HEAPF64[((ptr)>>3)]; - default: abort('invalid type for setValue: ' + type); - } - return null; -} -Module['getValue'] = getValue; - -var ALLOC_NORMAL = 0; // Tries to use _malloc() -var ALLOC_STACK = 1; // Lives for the duration of the current function call -var ALLOC_STATIC = 2; // Cannot be freed -var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk -var ALLOC_NONE = 4; // Do not allocate -Module['ALLOC_NORMAL'] = ALLOC_NORMAL; -Module['ALLOC_STACK'] = ALLOC_STACK; -Module['ALLOC_STATIC'] = ALLOC_STATIC; -Module['ALLOC_DYNAMIC'] = ALLOC_DYNAMIC; -Module['ALLOC_NONE'] = ALLOC_NONE; - -// allocate(): This is for internal use. You can use it yourself as well, but the interface -// is a little tricky (see docs right below). The reason is that it is optimized -// for multiple syntaxes to save space in generated code. So you should -// normally not use allocate(), and instead allocate memory using _malloc(), -// initialize it with setValue(), and so forth. -// @slab: An array of data, or a number. If a number, then the size of the block to allocate, -// in *bytes* (note that this is sometimes confusing: the next parameter does not -// affect this!) -// @types: Either an array of types, one for each byte (or 0 if no type at that position), -// or a single type which is used for the entire block. This only matters if there -// is initial data - if @slab is a number, then this does not matter at all and is -// ignored. -// @allocator: How to allocate memory, see ALLOC_* -function allocate(slab, types, allocator, ptr) { - var zeroinit, size; - if (typeof slab === 'number') { - zeroinit = true; - size = slab; - } else { - zeroinit = false; - size = slab.length; - } - - var singleType = typeof types === 'string' ? types : null; - - var ret; - if (allocator == ALLOC_NONE) { - ret = ptr; - } else { - ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length)); - } - - if (zeroinit) { - var ptr = ret, stop; - assert((ret & 3) == 0); - stop = ret + (size & ~3); - for (; ptr < stop; ptr += 4) { - HEAP32[((ptr)>>2)]=0; - } - stop = ret + size; - while (ptr < stop) { - HEAP8[((ptr++)>>0)]=0; - } - return ret; - } - - if (singleType === 'i8') { - if (slab.subarray || slab.slice) { - HEAPU8.set(slab, ret); - } else { - HEAPU8.set(new Uint8Array(slab), ret); - } - return ret; - } - - var i = 0, type, typeSize, previousType; - while (i < size) { - var curr = slab[i]; - - if (typeof curr === 'function') { - curr = Runtime.getFunctionIndex(curr); - } - - type = singleType || types[i]; - if (type === 0) { - i++; - continue; - } - - if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later - - setValue(ret+i, curr, type); - - // no need to look up size unless type changes, so cache it - if (previousType !== type) { - typeSize = Runtime.getNativeTypeSize(type); - previousType = type; - } - i += typeSize; - } - - return ret; -} -Module['allocate'] = allocate; - -function Pointer_stringify(ptr, /* optional */ length) { - if (length === 0 || !ptr) return ''; - // TODO: use TextDecoder - // Find the length, and check for UTF while doing so - var hasUtf = false; - var t; - var i = 0; - while (1) { - t = HEAPU8[(((ptr)+(i))>>0)]; - if (t >= 128) hasUtf = true; - else if (t == 0 && !length) break; - i++; - if (length && i == length) break; - } - if (!length) length = i; - - var ret = ''; - - if (!hasUtf) { - var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack - var curr; - while (length > 0) { - curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK))); - ret = ret ? ret + curr : curr; - ptr += MAX_CHUNK; - length -= MAX_CHUNK; - } - return ret; - } - - var utf8 = new Runtime.UTF8Processor(); - for (i = 0; i < length; i++) { - t = HEAPU8[(((ptr)+(i))>>0)]; - ret += utf8.processCChar(t); - } - return ret; -} -Module['Pointer_stringify'] = Pointer_stringify; - -function UTF16ToString(ptr) { - var i = 0; - - var str = ''; - while (1) { - var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; - if (codeUnit == 0) - return str; - ++i; - // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. - str += String.fromCharCode(codeUnit); - } -} -Module['UTF16ToString'] = UTF16ToString; - - -function stringToUTF16(str, outPtr) { - for(var i = 0; i < str.length; ++i) { - // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. - var codeUnit = str.charCodeAt(i); // possibly a lead surrogate - HEAP16[(((outPtr)+(i*2))>>1)]=codeUnit; - } - // Null-terminate the pointer to the HEAP. - HEAP16[(((outPtr)+(str.length*2))>>1)]=0; -} -Module['stringToUTF16'] = stringToUTF16; - - -function UTF32ToString(ptr) { - var i = 0; - - var str = ''; - while (1) { - var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; - if (utf32 == 0) - return str; - ++i; - // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. - if (utf32 >= 0x10000) { - var ch = utf32 - 0x10000; - str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); - } else { - str += String.fromCharCode(utf32); - } - } -} -Module['UTF32ToString'] = UTF32ToString; - - -function stringToUTF32(str, outPtr) { - var iChar = 0; - for(var iCodeUnit = 0; iCodeUnit < str.length; ++iCodeUnit) { - // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. - var codeUnit = str.charCodeAt(iCodeUnit); // possibly a lead surrogate - if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { - var trailSurrogate = str.charCodeAt(++iCodeUnit); - codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); - } - HEAP32[(((outPtr)+(iChar*4))>>2)]=codeUnit; - ++iChar; - } - // Null-terminate the pointer to the HEAP. - HEAP32[(((outPtr)+(iChar*4))>>2)]=0; -} -Module['stringToUTF32'] = stringToUTF32; - -function demangle(func) { - var hasLibcxxabi = !!Module['___cxa_demangle']; - if (hasLibcxxabi) { - try { - var buf = _malloc(func.length); - writeStringToMemory(func.substr(1), buf); - var status = _malloc(4); - var ret = Module['___cxa_demangle'](buf, 0, 0, status); - if (getValue(status, 'i32') === 0 && ret) { - return Pointer_stringify(ret); - } - // otherwise, libcxxabi failed, we can try ours which may return a partial result - } catch(e) { - // failure when using libcxxabi, we can try ours which may return a partial result - } finally { - if (buf) _free(buf); - if (status) _free(status); - if (ret) _free(ret); - } - } - var i = 3; - // params, etc. - var basicTypes = { - 'v': 'void', - 'b': 'bool', - 'c': 'char', - 's': 'short', - 'i': 'int', - 'l': 'long', - 'f': 'float', - 'd': 'double', - 'w': 'wchar_t', - 'a': 'signed char', - 'h': 'unsigned char', - 't': 'unsigned short', - 'j': 'unsigned int', - 'm': 'unsigned long', - 'x': 'long long', - 'y': 'unsigned long long', - 'z': '...' - }; - var subs = []; - var first = true; - function dump(x) { - //return; - if (x) Module.print(x); - Module.print(func); - var pre = ''; - for (var a = 0; a < i; a++) pre += ' '; - Module.print (pre + '^'); - } - function parseNested() { - i++; - if (func[i] === 'K') i++; // ignore const - var parts = []; - while (func[i] !== 'E') { - if (func[i] === 'S') { // substitution - i++; - var next = func.indexOf('_', i); - var num = func.substring(i, next) || 0; - parts.push(subs[num] || '?'); - i = next+1; - continue; - } - if (func[i] === 'C') { // constructor - parts.push(parts[parts.length-1]); - i += 2; - continue; - } - var size = parseInt(func.substr(i)); - var pre = size.toString().length; - if (!size || !pre) { i--; break; } // counter i++ below us - var curr = func.substr(i + pre, size); - parts.push(curr); - subs.push(curr); - i += pre + size; - } - i++; // skip E - return parts; - } - function parse(rawList, limit, allowVoid) { // main parser - limit = limit || Infinity; - var ret = '', list = []; - function flushList() { - return '(' + list.join(', ') + ')'; - } - var name; - if (func[i] === 'N') { - // namespaced N-E - name = parseNested().join('::'); - limit--; - if (limit === 0) return rawList ? [name] : name; - } else { - // not namespaced - if (func[i] === 'K' || (first && func[i] === 'L')) i++; // ignore const and first 'L' - var size = parseInt(func.substr(i)); - if (size) { - var pre = size.toString().length; - name = func.substr(i + pre, size); - i += pre + size; - } - } - first = false; - if (func[i] === 'I') { - i++; - var iList = parse(true); - var iRet = parse(true, 1, true); - ret += iRet[0] + ' ' + name + '<' + iList.join(', ') + '>'; - } else { - ret = name; - } - paramLoop: while (i < func.length && limit-- > 0) { - //dump('paramLoop'); - var c = func[i++]; - if (c in basicTypes) { - list.push(basicTypes[c]); - } else { - switch (c) { - case 'P': list.push(parse(true, 1, true)[0] + '*'); break; // pointer - case 'R': list.push(parse(true, 1, true)[0] + '&'); break; // reference - case 'L': { // literal - i++; // skip basic type - var end = func.indexOf('E', i); - var size = end - i; - list.push(func.substr(i, size)); - i += size + 2; // size + 'EE' - break; - } - case 'A': { // array - var size = parseInt(func.substr(i)); - i += size.toString().length; - if (func[i] !== '_') throw '?'; - i++; // skip _ - list.push(parse(true, 1, true)[0] + ' [' + size + ']'); - break; - } - case 'E': break paramLoop; - default: ret += '?' + c; break paramLoop; - } - } - } - if (!allowVoid && list.length === 1 && list[0] === 'void') list = []; // avoid (void) - if (rawList) { - if (ret) { - list.push(ret + '?'); - } - return list; - } else { - return ret + flushList(); - } - } - var parsed = func; - try { - // Special-case the entry point, since its name differs from other name mangling. - if (func == 'Object._main' || func == '_main') { - return 'main()'; - } - if (typeof func === 'number') func = Pointer_stringify(func); - if (func[0] !== '_') return func; - if (func[1] !== '_') return func; // C function - if (func[2] !== 'Z') return func; - switch (func[3]) { - case 'n': return 'operator new()'; - case 'd': return 'operator delete()'; - } - parsed = parse(); - } catch(e) { - parsed += '?'; - } - if (parsed.indexOf('?') >= 0 && !hasLibcxxabi) { - Runtime.warnOnce('warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); - } - return parsed; -} - -function demangleAll(text) { - return text.replace(/__Z[\w\d_]+/g, function(x) { var y = demangle(x); return x === y ? x : (x + ' [' + y + ']') }); -} - -function jsStackTrace() { - var err = new Error(); - if (!err.stack) { - // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, - // so try that as a special-case. - try { - throw new Error(0); - } catch(e) { - err = e; - } - if (!err.stack) { - return '(no stack trace available)'; - } - } - return err.stack.toString(); -} - -function stackTrace() { - return demangleAll(jsStackTrace()); -} -Module['stackTrace'] = stackTrace; - -// Memory management - -var PAGE_SIZE = 4096; -function alignMemoryPage(x) { - return (x+4095)&-4096; -} - -var HEAP; -var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; - -var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area -var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area -var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk - -function enlargeMemory() { - abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.'); -} - - -var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; -var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; -var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152; - -var totalMemory = 64*1024; -while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) { - if (totalMemory < 16*1024*1024) { - totalMemory *= 2; - } else { - totalMemory += 16*1024*1024 - } -} -if (totalMemory !== TOTAL_MEMORY) { - Module.printErr('increasing TOTAL_MEMORY to ' + totalMemory + ' to be compliant with the asm.js spec'); - TOTAL_MEMORY = totalMemory; -} - -// Initialize the runtime's memory -// check for full engine support (use string 'subarray' to avoid closure compiler confusion) -assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']), - 'JS engine does not provide full typed array support'); - -var buffer = new ArrayBuffer(TOTAL_MEMORY); -HEAP8 = new Int8Array(buffer); -HEAP16 = new Int16Array(buffer); -HEAP32 = new Int32Array(buffer); -HEAPU8 = new Uint8Array(buffer); -HEAPU16 = new Uint16Array(buffer); -HEAPU32 = new Uint32Array(buffer); -HEAPF32 = new Float32Array(buffer); -HEAPF64 = new Float64Array(buffer); - -// Endianness check (note: assumes compiler arch was little-endian) -HEAP32[0] = 255; -assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system'); - -Module['HEAP'] = HEAP; -Module['buffer'] = buffer; -Module['HEAP8'] = HEAP8; -Module['HEAP16'] = HEAP16; -Module['HEAP32'] = HEAP32; -Module['HEAPU8'] = HEAPU8; -Module['HEAPU16'] = HEAPU16; -Module['HEAPU32'] = HEAPU32; -Module['HEAPF32'] = HEAPF32; -Module['HEAPF64'] = HEAPF64; - -function callRuntimeCallbacks(callbacks) { - while(callbacks.length > 0) { - var callback = callbacks.shift(); - if (typeof callback == 'function') { - callback(); - continue; - } - var func = callback.func; - if (typeof func === 'number') { - if (callback.arg === undefined) { - Runtime.dynCall('v', func); - } else { - Runtime.dynCall('vi', func, [callback.arg]); - } - } else { - func(callback.arg === undefined ? null : callback.arg); - } - } -} - -var __ATPRERUN__ = []; // functions called before the runtime is initialized -var __ATINIT__ = []; // functions called during startup -var __ATMAIN__ = []; // functions called when main() is to be run -var __ATEXIT__ = []; // functions called during shutdown -var __ATPOSTRUN__ = []; // functions called after the runtime has exited - -var runtimeInitialized = false; -var runtimeExited = false; - -function preRun() { - // compatibility - merge in anything from Module['preRun'] at this time - if (Module['preRun']) { - if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; - while (Module['preRun'].length) { - addOnPreRun(Module['preRun'].shift()); - } - } - callRuntimeCallbacks(__ATPRERUN__); -} - -function ensureInitRuntime() { - if (runtimeInitialized) return; - runtimeInitialized = true; - callRuntimeCallbacks(__ATINIT__); -} - -function preMain() { - callRuntimeCallbacks(__ATMAIN__); -} - -function exitRuntime() { - callRuntimeCallbacks(__ATEXIT__); - runtimeExited = true; -} - -function postRun() { - // compatibility - merge in anything from Module['postRun'] at this time - if (Module['postRun']) { - if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; - while (Module['postRun'].length) { - addOnPostRun(Module['postRun'].shift()); - } - } - callRuntimeCallbacks(__ATPOSTRUN__); -} - -function addOnPreRun(cb) { - __ATPRERUN__.unshift(cb); -} -Module['addOnPreRun'] = Module.addOnPreRun = addOnPreRun; - -function addOnInit(cb) { - __ATINIT__.unshift(cb); -} -Module['addOnInit'] = Module.addOnInit = addOnInit; - -function addOnPreMain(cb) { - __ATMAIN__.unshift(cb); -} -Module['addOnPreMain'] = Module.addOnPreMain = addOnPreMain; - -function addOnExit(cb) { - __ATEXIT__.unshift(cb); -} -Module['addOnExit'] = Module.addOnExit = addOnExit; - -function addOnPostRun(cb) { - __ATPOSTRUN__.unshift(cb); -} -Module['addOnPostRun'] = Module.addOnPostRun = addOnPostRun; - -// Tools - - -function intArrayFromString(stringy, dontAddNull, length /* optional */) { - var ret = (new Runtime.UTF8Processor()).processJSString(stringy); - if (length) { - ret.length = length; - } - if (!dontAddNull) { - ret.push(0); - } - return ret; -} -Module['intArrayFromString'] = intArrayFromString; - -function intArrayToString(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - var chr = array[i]; - if (chr > 0xFF) { - chr &= 0xFF; - } - ret.push(String.fromCharCode(chr)); - } - return ret.join(''); -} -Module['intArrayToString'] = intArrayToString; - -function writeStringToMemory(string, buffer, dontAddNull) { - var array = intArrayFromString(string, dontAddNull); - var i = 0; - while (i < array.length) { - var chr = array[i]; - HEAP8[(((buffer)+(i))>>0)]=chr; - i = i + 1; - } -} -Module['writeStringToMemory'] = writeStringToMemory; - -function writeArrayToMemory(array, buffer) { - for (var i = 0; i < array.length; i++) { - HEAP8[(((buffer)+(i))>>0)]=array[i]; - } -} -Module['writeArrayToMemory'] = writeArrayToMemory; - -function writeAsciiToMemory(str, buffer, dontAddNull) { - for (var i = 0; i < str.length; i++) { - HEAP8[(((buffer)+(i))>>0)]=str.charCodeAt(i); - } - if (!dontAddNull) HEAP8[(((buffer)+(str.length))>>0)]=0; -} -Module['writeAsciiToMemory'] = writeAsciiToMemory; - -function unSign(value, bits, ignore) { - if (value >= 0) { - return value; - } - return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts - : Math.pow(2, bits) + value; -} -function reSign(value, bits, ignore) { - if (value <= 0) { - return value; - } - var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 - : Math.pow(2, bits-1); - if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that - // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors - // TODO: In i64 mode 1, resign the two parts separately and safely - value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts - } - return value; -} - -// check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 ) -if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function imul(a, b) { - var ah = a >>> 16; - var al = a & 0xffff; - var bh = b >>> 16; - var bl = b & 0xffff; - return (al*bl + ((ah*bl + al*bh) << 16))|0; -}; -Math.imul = Math['imul']; - - -var Math_abs = Math.abs; -var Math_cos = Math.cos; -var Math_sin = Math.sin; -var Math_tan = Math.tan; -var Math_acos = Math.acos; -var Math_asin = Math.asin; -var Math_atan = Math.atan; -var Math_atan2 = Math.atan2; -var Math_exp = Math.exp; -var Math_log = Math.log; -var Math_sqrt = Math.sqrt; -var Math_ceil = Math.ceil; -var Math_floor = Math.floor; -var Math_pow = Math.pow; -var Math_imul = Math.imul; -var Math_fround = Math.fround; -var Math_min = Math.min; - -// A counter of dependencies for calling run(). If we need to -// do asynchronous work before running, increment this and -// decrement it. Incrementing must happen in a place like -// PRE_RUN_ADDITIONS (used by emcc to add file preloading). -// Note that you can add dependencies in preRun, even though -// it happens right before run - run will be postponed until -// the dependencies are met. -var runDependencies = 0; -var runDependencyWatcher = null; -var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled - -function addRunDependency(id) { - runDependencies++; - if (Module['monitorRunDependencies']) { - Module['monitorRunDependencies'](runDependencies); - } -} -Module['addRunDependency'] = addRunDependency; -function removeRunDependency(id) { - runDependencies--; - if (Module['monitorRunDependencies']) { - Module['monitorRunDependencies'](runDependencies); - } - if (runDependencies == 0) { - if (runDependencyWatcher !== null) { - clearInterval(runDependencyWatcher); - runDependencyWatcher = null; - } - if (dependenciesFulfilled) { - var callback = dependenciesFulfilled; - dependenciesFulfilled = null; - callback(); // can add another dependenciesFulfilled - } - } -} -Module['removeRunDependency'] = removeRunDependency; - -Module["preloadedImages"] = {}; // maps url to image data -Module["preloadedAudios"] = {}; // maps url to audio data - - -var memoryInitializer = null; - -// === Body === - - - - - -STATIC_BASE = 8; - -STATICTOP = STATIC_BASE + 33040; - /* global initializers */ __ATINIT__.push(); - - -/* memory initializer */ allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,47,99,168,254,170,226,153,255,102,179,216,0,226,141,122,255,122,66,153,254,182,245,134,0,227,228,25,1,214,57,235,255,216,173,56,255,181,231,210,0,119,128,157,255,129,95,136,255,110,126,51,0,2,169,183,255,7,130,98,254,69,176,94,255,116,4,227,1,217,242,145,255,202,173,31,1,105,1,39,255,46,175,69,0,228,47,58,255,215,224,69,254,207,56,69,255,16,254,139,255,23,207,212,255,202,20,126,255,95,213,96,255,9,176,33,0,200,5,207,255,241,42,128,254,35,33,192,255,248,229,196,1,129,17,120,0,251,103,151,255,7,52,112,255,140,56,66,255,40,226,245,255,217,70,37,254,172,214,9,255,72,67,134,1,146,192,214,255,44,38,112,0,68,184,75,255,206,90,251,0,149,235,141,0,181,170,58,0,116,244,239,0,92,157,2,0,102,173,98,0,233,137,96,1,127,49,203,0,5,155,148,0,23,148,9,255,211,122,12,0,34,134,26,255,219,204,136,0,134,8,41,255,224,83,43,254,85,25,247,0,109,127,0,254,169,136,48,0,238,119,219,255,231,173,213,0,206,18,254,254,8,186,7,255,126,9,7,1,111,42,72,0,111,52,236,254,96,63,141,0,147,191,127,254,205,78,192,255,14,106,237,1,187,219,76,0,175,243,187,254,105,89,173,0,85,25,89,1,162,243,148,0,2,118,209,254,33,158,9,0,139,163,46,255,93,70,40,0,108,42,142,254,111,252,142,255,155,223,144,0,51,229,167,255,73,252,155,255,94,116,12,255,152,160,218,255,156,238,37,255,179,234,207,255,197,0,179,255,154,164,141,0,225,196,104,0,10,35,25,254,209,212,242,255,97,253,222,254,184,101,229,0,222,18,127,1,164,136,135,255,30,207,140,254,146,97,243,0,129,192,26,254,201,84,33,255,111,10,78,255,147,81,178,255,4,4,24,0,161,238,215,255,6,141,33,0,53,215,14,255,41,181,208,255,231,139,157,0,179,203,221,255,255,185,113,0,189,226,172,255,113,66,214,255,202,62,45,255,102,64,8,255,78,174,16,254,133,117,68,255,182,120,89,255,133,114,211,0,189,110,21,255,15,10,106,0,41,192,1,0,152,232,121,255,188,60,160,255,153,113,206,255,0,183,226,254,180,13,72,255,176,160,14,254,211,201,134,255,158,24,143,0,127,105,53,0,96,12,189,0,167,215,251,255,159,76,128,254,106,101,225,255,30,252,4,0,146,12,174,0,89,241,178,254,10,229,166,255,123,221,42,254,30,20,212,0,82,128,3,0,48,209,243,0,119,121,64,255,50,227,156,255,0,110,197,1,103,27,144,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,234,113,60,255,37,255,57,255,69,178,182,254,128,208,179,0,118,26,125,254,3,7,214,255,241,50,77,255,85,203,197,255,211,135,250,255,25,48,100,255,187,213,180,254,17,88,105,0,83,209,158,1,5,115,98,0,4,174,60,254,171,55,110,255,217,181,17,255,20,188,170,0,146,156,102,254,87,214,174,255,114,122,155,1,233,44,170,0,127,8,239,1,214,236,234,0,175,5,219,0,49,106,61,255,6,66,208,255,2,106,110,255,81,234,19,255,215,107,192,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,178,9,252,254,100,110,212,0,14,5,167,0,233,239,163,255,28,151,157,1,101,146,10,255,254,158,70,254,71,249,228,0,88,30,50,0,68,58,160,255,191,24,104,1,129,66,129,255,192,50,85,255,8,179,138,255,38,250,201,0,115,80,160,0,131,230,113,0,125,88,147,0,90,68,199,0,253,76,158,0,28,255,118,0,113,250,254,0,66,75,46,0,230,218,43,0,229,120,186,1,148,68,43,0,136,124,238,1,187,107,197,255,84,53,246,255,51,116,254,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,68,113,21,255,222,186,59,255,66,7,241,1,69,6,72,0,86,156,108,254,55,167,89,0,109,52,219,254,13,176,23,255,196,44,106,255,239,149,71,255,164,140,125,255,159,173,1,0,51,41,231,0,145,62,33,0,138,111,93,1,185,83,69,0,144,115,46,0,97,151,16,255,24,228,26,0,49,217,226,0,113,75,234,254,193,153,12,255,182,48,96,255,14,13,26,0,128,195,249,254,69,193,59,0,132,37,81,254,125,106,60,0,214,240,169,1,164,227,66,0,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,143,62,221,0,129,89,214,255,55,139,5,254,68,20,191,255,14,204,178,1,35,195,217,0,47,51,206,1,38,246,165,0,206,27,6,254,158,87,36,0,217,52,146,255,125,123,215,255,85,60,31,255,171,13,7,0,218,245,88,254,252,35,60,0,55,214,160,255,133,101,56,0,224,32,19,254,147,64,234,0,26,145,162,1,114,118,125,0,248,252,250,0,101,94,196,255,198,141,226,254,51,42,182,0,135,12,9,254,109,172,210,255,197,236,194,1,241,65,154,0,48,156,47,255,153,67,55,255,218,165,34,254,74,180,179,0,218,66,71,1,88,122,99,0,212,181,219,255,92,42,231,255,239,0,154,0,245,77,183,255,94,81,170,1,18,213,216,0,171,93,71,0,52,94,248,0,18,151,161,254,197,209,66,255,174,244,15,254,162,48,183,0,49,61,240,254,182,93,195,0,199,228,6,1,200,5,17,255,137,45,237,255,108,148,4,0,90,79,237,255,39,63,77,255,53,82,207,1,142,22,118,255,101,232,18,1,92,26,67,0,5,200,88,255,33,168,138,255,149,225,72,0,2,209,27,255,44,245,168,1,220,237,17,255,30,211,105,254,141,238,221,0,128,80,245,254,111,254,14,0,222,95,190,1,223,9,241,0,146,76,212,255,108,205,104,255,63,117,153,0,144,69,48,0,35,228,111,0,192,33,193,255,112,214,190,254,115,152,151,0,23,102,88,0,51,74,248,0,226,199,143,254,204,162,101,255,208,97,189,1,245,104,18,0,230,246,30,255,23,148,69,0,110,88,52,254,226,181,89,255,208,47,90,254,114,161,80,255,33,116,248,0,179,152,87,255,69,144,177,1,88,238,26,255,58,32,113,1,1,77,69,0,59,121,52,255,152,238,83,0,52,8,193,0,231,39,233,255,199,34,138,0,222,68,173,0,91,57,242,254,220,210,127,255,192,7,246,254,151,35,187,0,195,236,165,0,111,93,206,0,212,247,133,1,154,133,209,255,155,231,10,0,64,78,38,0,122,249,100,1,30,19,97,255,62,91,249,1,248,133,77,0,197,63,168,254,116,10,82,0,184,236,113,254,212,203,194,255,61,100,252,254,36,5,202,255,119,91,153,255,129,79,29,0,103,103,171,254,237,215,111,255,216,53,69,0,239,240,23,0,194,149,221,255,38,225,222,0,232,255,180,254,118,82,133,255,57,209,177,1,139,232,133,0,158,176,46,254,194,115,46,0,88,247,229,1,28,103,191,0,221,222,175,254,149,235,44,0,151,228,25,254,218,105,103,0,142,85,210,0,149,129,190,255,213,65,94,254,117,134,224,255,82,198,117,0,157,221,220,0,163,101,36,0,197,114,37,0,104,172,166,254,11,182,0,0,81,72,188,255,97,188,16,255,69,6,10,0,199,147,145,255,8,9,115,1,65,214,175,255,217,173,209,0,80,127,166,0,247,229,4,254,167,183,124,255,90,28,204,254,175,59,240,255,11,41,248,1,108,40,51,255,144,177,195,254,150,250,126,0,138,91,65,1,120,60,222,255,245,193,239,0,29,214,189,255,128,2,25,0,80,154,162,0,77,220,107,1,234,205,74,255,54,166,103,255,116,72,9,0,228,94,47,255,30,200,25,255,35,214,89,255,61,176,140,255,83,226,163,255,75,130,172,0,128,38,17,0,95,137,152,255,215,124,159,1,79,93,0,0,148,82,157,254,195,130,251,255,40,202,76,255,251,126,224,0,157,99,62,254,207,7,225,255,96,68,195,0,140,186,157,255,131,19,231,255,42,128,254,0,52,219,61,254,102,203,72,0,141,7,11,255,186,164,213,0,31,122,119,0,133,242,145,0,208,252,232,255,91,213,182,255,143,4,250,254,249,215,74,0,165,30,111,1,171,9,223,0,229,123,34,1,92,130,26,255,77,155,45,1,195,139,28,255,59,224,78,0,136,17,247,0,108,121,32,0,79,250,189,255,96,227,252,254,38,241,62,0,62,174,125,255,155,111,93,255,10,230,206,1,97,197,40,255,0,49,57,254,65,250,13,0,18,251,150,255,220,109,210,255,5,174,166,254,44,129,189,0,235,35,147,255,37,247,141,255,72,141,4,255,103,107,255,0,247,90,4,0,53,44,42,0,2,30,240,0,4,59,63,0,88,78,36,0,113,167,180,0,190,71,193,255,199,158,164,255,58,8,172,0,77,33,12,0,65,63,3,0,153,77,33,255,172,254,102,1,228,221,4,255,87,30,254,1,146,41,86,255,138,204,239,254,108,141,17,255,187,242,135,0,210,208,127,0,68,45,14,254,73,96,62,0,81,60,24,255,170,6,36,255,3,249,26,0,35,213,109,0,22,129,54,255,21,35,225,255,234,61,56,255,58,217,6,0,143,124,88,0,236,126,66,0,209,38,183,255,34,238,6,255,174,145,102,0,95,22,211,0,196,15,153,254,46,84,232,255,117,34,146,1,231,250,74,255,27,134,100,1,92,187,195,255,170,198,112,0,120,28,42,0,209,70,67,0,29,81,31,0,29,168,100,1,169,173,160,0,107,35,117,0,62,96,59,255,81,12,69,1,135,239,190,255,220,252,18,0,163,220,58,255,137,137,188,255,83,102,109,0,96,6,76,0,234,222,210,255,185,174,205,1,60,158,213,255,13,241,214,0,172,129,140,0,93,104,242,0,192,156,251,0,43,117,30,0,225,81,158,0,127,232,218,0,226,28,203,0,233,27,151,255,117,43,5,255,242,14,47,255,33,20,6,0,137,251,44,254,27,31,245,255,183,214,125,254,40,121,149,0,186,158,213,255,89,8,227,0,69,88,0,254,203,135,225,0,201,174,203,0,147,71,184,0,18,121,41,254,94,5,78,0,224,214,240,254,36,5,180,0,251,135,231,1,163,138,212,0,210,249,116,254,88,129,187,0,19,8,49,254,62,14,144,255,159,76,211,0,214,51,82,0,109,117,228,254,103,223,203,255,75,252,15,1,154,71,220,255,23,13,91,1,141,168,96,255,181,182,133,0,250,51,55,0,234,234,212,254,175,63,158,0,39,240,52,1,158,189,36,255,213,40,85,1,32,180,247,255,19,102,26,1,84,24,97,255,69,21,222,0,148,139,122,255,220,213,235,1,232,203,255,0,121,57,147,0,227,7,154,0,53,22,147,1,72,1,225,0,82,134,48,254,83,60,157,255,145,72,169,0,34,103,239,0,198,233,47,0,116,19,4,255,184,106,9,255,183,129,83,0,36,176,230,1,34,103,72,0,219,162,134,0,245,42,158,0,32,149,96,254,165,44,144,0,202,239,72,254,215,150,5,0,42,66,36,1,132,215,175,0,86,174,86,255,26,197,156,255,49,232,135,254,103,182,82,0,253,128,176,1,153,178,122,0,245,250,10,0,236,24,178,0,137,106,132,0,40,29,41,0,50,30,152,255,124,105,38,0,230,191,75,0,143,43,170,0,44,131,20,255,44,13,23,255,237,255,155,1,159,109,100,255,112,181,24,255,104,220,108,0,55,211,131,0,99,12,213,255,152,151,145,255,238,5,159,0,97,155,8,0,33,108,81,0,1,3,103,0,62,109,34,255,250,155,180,0,32,71,195,255,38,70,145,1,159,95,245,0,69,229,101,1,136,28,240,0,79,224,25,0,78,110,121,255,248,168,124,0,187,128,247,0,2,147,235,254,79,11,132,0,70,58,12,1,181,8,163,255,79,137,133,255,37,170,11,255,141,243,85,255,176,231,215,255,204,150,164,255,239,215,39,255,46,87,156,254,8,163,88,255,172,34,232,0,66,44,102,255,27,54,41,254,236,99,87,255,41,123,169,1,52,114,43,0,117,134,40,0,155,134,26,0,231,207,91,254,35,132,38,255,19,102,125,254,36,227,133,255,118,3,113,255,29,13,124,0,152,96,74,1,88,146,206,255,167,191,220,254,162,18,88,255,182,100,23,0,31,117,52,0,81,46,106,1,12,2,7,0,69,80,201,1,209,246,172,0,12,48,141,1,224,211,88,0,116,226,159,0,122,98,130,0,65,236,234,1,225,226,9,255,207,226,123,1,89,214,59,0,112,135,88,1,90,244,203,255,49,11,38,1,129,108,186,0,89,112,15,1,101,46,204,255,127,204,45,254,79,255,221,255,51,73,18,255,127,42,101,255,241,21,202,0,160,227,7,0,105,50,236,0,79,52,197,255,104,202,208,1,180,15,16,0,101,197,78,255,98,77,203,0,41,185,241,1,35,193,124,0,35,155,23,255,207,53,192,0,11,125,163,1,249,158,185,255,4,131,48,0,21,93,111,255,61,121,231,1,69,200,36,255,185,48,185,255,111,238,21,255,39,50,25,255,99,215,163,255,87,212,30,255,164,147,5,255,128,6,35,1,108,223,110,255,194,76,178,0,74,101,180,0,243,47,48,0,174,25,43,255,82,173,253,1,54,114,192,255,40,55,91,0,215,108,176,255,11,56,7,0,224,233,76,0,209,98,202,254,242,25,125,0,44,193,93,254,203,8,177,0,135,176,19,0,112,71,213,255,206,59,176,1,4,67,26,0,14,143,213,254,42,55,208,255,60,67,120,0,193,21,163,0,99,164,115,0,10,20,118,0,156,212,222,254,160,7,217,255,114,245,76,1,117,59,123,0,176,194,86,254,213,15,176,0,78,206,207,254,213,129,59,0,233,251,22,1,96,55,152,255,236,255,15,255,197,89,84,255,93,149,133,0,174,160,113,0,234,99,169,255,152,116,88,0,144,164,83,255,95,29,198,255,34,47,15,255,99,120,134,255,5,236,193,0,249,247,126,255,147,187,30,0,50,230,117,255,108,217,219,255,163,81,166,255,72,25,169,254,155,121,79,255,28,155,89,254,7,126,17,0,147,65,33,1,47,234,253,0,26,51,18,0,105,83,199,255,163,196,230,0,113,248,164,0,226,254,218,0,189,209,203,255,164,247,222,254,255,35,165,0,4,188,243,1,127,179,71,0,37,237,254,255,100,186,240,0,5,57,71,254,103,72,73,255,244,18,81,254,229,210,132,255,238,6,180,255,11,229,174,255,227,221,192,1,17,49,28,0,163,215,196,254,9,118,4,255,51,240,71,0,113,129,109,255,76,240,231,0,188,177,127,0,125,71,44,1,26,175,243,0,94,169,25,254,27,230,29,0,15,139,119,1,168,170,186,255,172,197,76,255,252,75,188,0,137,124,196,0,72,22,96,255,45,151,249,1,220,145,100,0,64,192,159,255,120,239,226,0,129,178,146,0,0,192,125,0,235,138,234,0,183,157,146,0,83,199,192,255,184,172,72,255,73,225,128,0,77,6,250,255,186,65,67,0,104,246,207,0,188,32,138,255,218,24,242,0,67,138,81,254,237,129,121,255,20,207,150,1,41,199,16,255,6,20,128,0,159,118,5,0,181,16,143,255,220,38,15,0,23,64,147,254,73,26,13,0,87,228,57,1,204,124,128,0,43,24,223,0,219,99,199,0,22,75,20,255,19,27,126,0,157,62,215,0,110,29,230,0,179,167,255,1,54,252,190,0,221,204,182,254,179,158,65,255,81,157,3,0,194,218,159,0,170,223,0,0,224,11,32,255,38,197,98,0,168,164,37,0,23,88,7,1,164,186,110,0,96,36,134,0,234,242,229,0,250,121,19,0,242,254,112,255,3,47,94,1,9,239,6,255,81,134,153,254,214,253,168,255,67,124,224,0,245,95,74,0,28,30,44,254,1,109,220,255,178,89,89,0,252,36,76,0,24,198,46,255,76,77,111,0,134,234,136,255,39,94,29,0,185,72,234,255,70,68,135,255,231,102,7,254,77,231,140,0,167,47,58,1,148,97,118,255,16,27,225,1,166,206,143,255,110,178,214,255,180,131,162,0,143,141,225,1,13,218,78,255,114,153,33,1,98,104,204,0,175,114,117,1,167,206,75,0,202,196,83,1,58,64,67,0,138,47,111,1,196,247,128,255,137,224,224,254,158,112,207,0,154,100,255,1,134,37,107,0,198,128,79,255,127,209,155,255,163,254,185,254,60,14,243,0,31,219,112,254,29,217,65,0,200,13,116,254,123,60,196,255,224,59,184,254,242,89,196,0,123,16,75,254,149,16,206,0,69,254,48,1,231,116,223,255,209,160,65,1,200,80,98,0,37,194,184,254,148,63,34,0,139,240,65,255,217,144,132,255,56,38,45,254,199,120,210,0,108,177,166,255,160,222,4,0,220,126,119,254,165,107,160,255,82,220,248,1,241,175,136,0,144,141,23,255,169,138,84,0,160,137,78,255,226,118,80,255,52,27,132,255,63,96,139,255,152,250,39,0,188,155,15,0,232,51,150,254,40,15,232,255,240,229,9,255,137,175,27,255,75,73,97,1,218,212,11,0,135,5,162,1,107,185,213,0,2,249,107,255,40,242,70,0,219,200,25,0,25,157,13,0,67,82,80,255,196,249,23,255,145,20,149,0,50,72,146,0,94,76,148,1,24,251,65,0,31,192,23,0,184,212,201,255,123,233,162,1,247,173,72,0,162,87,219,254,126,134,89,0,159,11,12,254,166,105,29,0,73,27,228,1,113,120,183,255,66,163,109,1,212,143,11,255,159,231,168,1,255,128,90,0,57,14,58,254,89,52,10,255,253,8,163,1,0,145,210,255,10,129,85,1,46,181,27,0,103,136,160,254,126,188,209,255,34,35,111,0,215,219,24,255,212,11,214,254,101,5,118,0,232,197,133,255,223,167,109,255,237,80,86,255,70,139,94,0,158,193,191,1,155,15,51,255,15,190,115,0,78,135,207,255,249,10,27,1,181,125,233,0,95,172,13,254,170,213,161,255,39,236,138,255,95,93,87,255,190,128,95,0,125,15,206,0,166,150,159,0,227,15,158,255,206,158,120,255,42,141,128,0,101,178,120,1,156,109,131,0,218,14,44,254,247,168,206,255,212,112,28,0,112,17,228,255,90,16,37,1,197,222,108,0,254,207,83,255,9,90,243,255,243,244,172,0,26,88,115,255,205,116,122,0,191,230,193,0,180,100,11,1,217,37,96,255,154,78,156,0,235,234,31,255,206,178,178,255,149,192,251,0,182,250,135,0,246,22,105,0,124,193,109,255,2,210,149,255,169,17,170,0,0,96,110,255,117,9,8,1,50,123,40,255,193,189,99,0,34,227,160,0,48,80,70,254,211,51,236,0,45,122,245,254,44,174,8,0,173,37,233,255,158,65,171,0,122,69,215,255,90,80,2,255,131,106,96,254,227,114,135,0,205,49,119,254,176,62,64,255,82,51,17,255,241,20,243,255,130,13,8,254,128,217,243,255,162,27,1,254,90,118,241,0,246,198,246,255,55,16,118,255,200,159,157,0,163,17,1,0,140,107,121,0,85,161,118,255,38,0,149,0,156,47,238,0,9,166,166,1,75,98,181,255,50,74,25,0,66,15,47,0,139,225,159,0,76,3,142,255,14,238,184,0,11,207,53,255,183,192,186,1,171,32,174,255,191,76,221,1,247,170,219,0,25,172,50,254,217,9,233,0,203,126,68,255,183,92,48,0,127,167,183,1,65,49,254,0,16,63,127,1,254,21,170,255,59,224,127,254,22,48,63,255,27,78,130,254,40,195,29,0,250,132,112,254,35,203,144,0,104,169,168,0,207,253,30,255,104,40,38,254,94,228,88,0,206,16,128,255,212,55,122,255,223,22,234,0,223,197,127,0,253,181,181,1,145,102,118,0,236,153,36,255,212,217,72,255,20,38,24,254,138,62,62,0,152,140,4,0,230,220,99,255,1,21,212,255,148,201,231,0,244,123,9,254,0,171,210,0,51,58,37,255,1,255,14,255,244,183,145,254,0,242,166,0,22,74,132,0,121,216,41,0,95,195,114,254,133,24,151,255,156,226,231,255,247,5,77,255,246,148,115,254,225,92,81,255,222,80,246,254,170,123,89,255,74,199,141,0,29,20,8,255,138,136,70,255,93,75,92,0,221,147,49,254,52,126,226,0,229,124,23,0,46,9,181,0,205,64,52,1,131,254,28,0,151,158,212,0,131,64,78,0,206,25,171,0,0,230,139,0,191,253,110,254,103,247,167,0,64,40,40,1,42,165,241,255,59,75,228,254,124,243,189,255,196,92,178,255,130,140,86,255,141,89,56,1,147,198,5,255,203,248,158,254,144,162,141,0,11,172,226,0,130,42,21,255,1,167,143,255,144,36,36,255,48,88,164,254,168,170,220,0,98,71,214,0,91,208,79,0,159,76,201,1,166,42,214,255,69,255,0,255,6,128,125,255,190,1,140,0,146,83,218,255,215,238,72,1,122,127,53,0,189,116,165,255,84,8,66,255,214,3,208,255,213,110,133,0,195,168,44,1,158,231,69,0,162,64,200,254,91,58,104,0,182,58,187,254,249,228,136,0,203,134,76,254,99,221,233,0,75,254,214,254,80,69,154,0,64,152,248,254,236,136,202,255,157,105,153,254,149,175,20,0,22,35,19,255,124,121,233,0,186,250,198,254,132,229,139,0,137,80,174,255,165,125,68,0,144,202,148,254,235,239,248,0,135,184,118,0,101,94,17,255,122,72,70,254,69,130,146,0,127,222,248,1,69,127,118,255,30,82,215,254,188,74,19,255,229,167,194,254,117,25,66,255,65,234,56,254,213,22,156,0,151,59,93,254,45,28,27,255,186,126,164,255,32,6,239,0,127,114,99,1,219,52,2,255,99,96,166,254,62,190,126,255,108,222,168,1,75,226,174,0,230,226,199,0,60,117,218,255,252,248,20,1,214,188,204,0,31,194,134,254,123,69,192,255,169,173,36,254,55,98,91,0,223,42,102,254,137,1,102,0,157,90,25,0,239,122,64,255,252,6,233,0,7,54,20,255,82,116,174,0,135,37,54,255,15,186,125,0,227,112,175,255,100,180,225,255,42,237,244,255,244,173,226,254,248,18,33,0,171,99,150,255,74,235,50,255,117,82,32,254,106,168,237,0,207,109,208,1,228,9,186,0,135,60,169,254,179,92,143,0,244,170,104,255,235,45,124,255,70,99,186,0,117,137,183,0,224,31,215,0,40,9,100,0,26,16,95,1,68,217,87,0,8,151,20,255,26,100,58,255,176,165,203,1,52,118,70,0,7,32,254,254,244,254,245,255,167,144,194,255,125,113,23,255,176,121,181,0,136,84,209,0,138,6,30,255,89,48,28,0,33,155,14,255,25,240,154,0,141,205,109,1,70,115,62,255,20,40,107,254,138,154,199,255,94,223,226,255,157,171,38,0,163,177,25,254,45,118,3,255,14,222,23,1,209,190,81,255,118,123,232,1,13,213,101,255,123,55,123,254,27,246,165,0,50,99,76,255,140,214,32,255,97,65,67,255,24,12,28,0,174,86,78,1,64,247,96,0,160,135,67,0,66,55,243,255,147,204,96,255,26,6,33,255,98,51,83,1,153,213,208,255,2,184,54,255,25,218,11,0,49,67,246,254,18,149,72,255,13,25,72,0,42,79,214,0,42,4,38,1,27,139,144,255,149,187,23,0,18,164,132,0,245,84,184,254,120,198,104,255,126,218,96,0,56,117,234,255,13,29,214,254,68,47,10,255,167,154,132,254,152,38,198,0,66,178,89,255,200,46,171,255,13,99,83,255,210,187,253,255,170,45,42,1,138,209,124,0,214,162,141,0,12,230,156,0,102,36,112,254,3,147,67,0,52,215,123,255,233,171,54,255,98,137,62,0,247,218,39,255,231,218,236,0,247,191,127,0,195,146,84,0,165,176,92,255,19,212,94,255,17,74,227,0,88,40,153,1,198,147,1,255,206,67,245,254,240,3,218,255,61,141,213,255,97,183,106,0,195,232,235,254,95,86,154,0,209,48,205,254,118,209,241,255,240,120,223,1,213,29,159,0,163,127,147,255,13,218,93,0,85,24,68,254,70,20,80,255,189,5,140,1,82,97,254,255,99,99,191,255,132,84,133,255,107,218,116,255,112,122,46,0,105,17,32,0,194,160,63,255,68,222,39,1,216,253,92,0,177,105,205,255,149,201,195,0,42,225,11,255,40,162,115,0,9,7,81,0,165,218,219,0,180,22,0,254,29,146,252,255,146,207,225,1,180,135,96,0,31,163,112,0,177,11,219,255,133,12,193,254,43,78,50,0,65,113,121,1,59,217,6,255,110,94,24,1,112,172,111,0,7,15,96,0,36,85,123,0,71,150,21,255,208,73,188,0,192,11,167,1,213,245,34,0,9,230,92,0,162,142,39,255,215,90,27,0,98,97,89,0,94,79,211,0,90,157,240,0,95,220,126,1,102,176,226,0,36,30,224,254,35,31,127,0,231,232,115,1,85,83,130,0,210,73,245,255,47,143,114,255,68,65,197,0,59,72,62,255,183,133,173,254,93,121,118,255,59,177,81,255,234,69,173,255,205,128,177,0,220,244,51,0,26,244,209,1,73,222,77,255,163,8,96,254,150,149,211,0,158,254,203,1,54,127,139,0,161,224,59,0,4,109,22,255,222,42,45,255,208,146,102,255,236,142,187,0,50,205,245,255,10,74,89,254,48,79,142,0,222,76,130,255,30,166,63,0,236,12,13,255,49,184,244,0,187,113,102,0,218,101,253,0,153,57,182,254,32,150,42,0,25,198,146,1,237,241,56,0,140,68,5,0,91,164,172,255,78,145,186,254,67,52,205,0,219,207,129,1,109,115,17,0,54,143,58,1,21,248,120,255,179,255,30,0,193,236,66,255,1,255,7,255,253,192,48,255,19,69,217,1,3,214,0,255,64,101,146,1,223,125,35,255,235,73,179,255,249,167,226,0,225,175,10,1,97,162,58,0,106,112,171,1,84,172,5,255,133,140,178,255,134,245,142,0,97,90,125,255,186,203,185,255,223,77,23,255,192,92,106,0,15,198,115,255,217,152,248,0,171,178,120,255,228,134,53,0,176,54,193,1,250,251,53,0,213,10,100,1,34,199,106,0,151,31,244,254,172,224,87,255,14,237,23,255,253,85,26,255,127,39,116,255,172,104,100,0,251,14,70,255,212,208,138,255,253,211,250,0,176,49,165,0,15,76,123,255,37,218,160,255,92,135,16,1,10,126,114,255,70,5,224,255,247,249,141,0,68,20,60,1,241,210,189,255,195,217,187,1,151,3,113,0,151,92,174,0,231,62,178,255,219,183,225,0,23,23,33,255,205,181,80,0,57,184,248,255,67,180,1,255,90,123,93,255,39,0,162,255,96,248,52,255,84,66,140,0,34,127,228,255,194,138,7,1,166,110,188,0,21,17,155,1,154,190,198,255,214,80,59,255,18,7,143,0,72,29,226,1,199,217,249,0,232,161,71,1,149,190,201,0,217,175,95,254,113,147,67,255,138,143,199,255,127,204,1,0,29,182,83,1,206,230,155,255,186,204,60,0,10,125,85,255,232,96,25,255,255,89,247,255,213,254,175,1,232,193,81,0,28,43,156,254,12,69,8,0,147,24,248,0,18,198,49,0,134,60,35,0,118,246,18,255,49,88,254,254,228,21,186,255,182,65,112,1,219,22,1,255,22,126,52,255,189,53,49,255,112,25,143,0,38,127,55,255,226,101,163,254,208,133,61,255,137,69,174,1,190,118,145,255,60,98,219,255,217,13,245,255,250,136,10,0,84,254,226,0,201,31,125,1,240,51,251,255,31,131,130,255,2,138,50,255,215,215,177,1,223,12,238,255,252,149,56,255,124,91,68,255,72,126,170,254,119,255,100,0,130,135,232,255,14,79,178,0,250,131,197,0,138,198,208,0,121,216,139,254,119,18,36,255,29,193,122,0,16,42,45,255,213,240,235,1,230,190,169,255,198,35,228,254,110,173,72,0,214,221,241,255,56,148,135,0,192,117,78,254,141,93,207,255,143,65,149,0,21,18,98,255,95,44,244,1,106,191,77,0,254,85,8,254,214,110,176,255,73,173,19,254,160,196,199,255,237,90,144,0,193,172,113,255,200,155,136,254,228,90,221,0,137,49,74,1,164,221,215,255,209,189,5,255,105,236,55,255,42,31,129,1,193,255,236,0,46,217,60,0,138,88,187,255,226,82,236,255,81,69,151,255,142,190,16,1,13,134,8,0,127,122,48,255,81,64,156,0,171,243,139,0,237,35,246,0,122,143,193,254,212,122,146,0,95,41,255,1,87,132,77,0,4,212,31,0,17,31,78,0,39,45,173,254,24,142,217,255,95,9,6,255,227,83,6,0,98,59,130,254,62,30,33,0,8,115,211,1,162,97,128,255,7,184,23,254,116,28,168,255,248,138,151,255,98,244,240,0,186,118,130,0,114,248,235,255,105,173,200,1,160,124,71,255,94,36,164,1,175,65,146,255,238,241,170,254,202,198,197,0,228,71,138,254,45,246,109,255,194,52,158,0,133,187,176,0,83,252,154,254,89,189,221,255,170,73,252,0,148,58,125,0,36,68,51,254,42,69,177,255,168,76,86,255,38,100,204,255,38,53,35,0,175,19,97,0,225,238,253,255,81,81,135,0,210,27,255,254,235,73,107,0,8,207,115,0,82,127,136,0,84,99,21,254,207,19,136,0,100,164,101,0,80,208,77,255,132,207,237,255,15,3,15,255,33,166,110,0,156,95,85,255,37,185,111,1,150,106,35,255,166,151,76,0,114,87,135,255,159,194,64,0,12,122,31,255,232,7,101,254,173,119,98,0,154,71,220,254,191,57,53,255,168,232,160,255,224,32,99,255,218,156,165,0,151,153,163,0,217,13,148,1,197,113,89,0,149,28,161,254,207,23,30,0,105,132,227,255,54,230,94,255,133,173,204,255,92,183,157,255,88,144,252,254,102,33,90,0,159,97,3,0,181,218,155,255,240,114,119,0,106,214,53,255,165,190,115,1,152,91,225,255,88,106,44,255,208,61,113,0,151,52,124,0,191,27,156,255,110,54,236,1,14,30,166,255,39,127,207,1,229,199,28,0,188,228,188,254,100,157,235,0,246,218,183,1,107,22,193,255,206,160,95,0,76,239,147,0,207,161,117,0,51,166,2,255,52,117,10,254,73,56,227,255,152,193,225,0,132,94,136,255,101,191,209,0,32,107,229,255,198,43,180,1,100,210,118,0,114,67,153,255,23,88,26,255,89,154,92,1,220,120,140,255,144,114,207,255,252,115,250,255,34,206,72,0,138,133,127,255,8,178,124,1,87,75,97,0,15,229,92,254,240,67,131,255,118,123,227,254,146,120,104,255,145,213,255,1,129,187,70,255,219,119,54,0,1,19,173,0,45,150,148,1,248,83,72,0,203,233,169,1,142,107,56,0,247,249,38,1,45,242,80,255,30,233,103,0,96,82,70,0,23,201,111,0,81,39,30,255,161,183,78,255,194,234,33,255,68,227,140,254,216,206,116,0,70,27,235,255,104,144,79,0,164,230,93,254,214,135,156,0,154,187,242,254,188,20,131,255,36,109,174,0,159,112,241,0,5,110,149,1,36,165,218,0,166,29,19,1,178,46,73,0,93,43,32,254,248,189,237,0,102,155,141,0,201,93,195,255,241,139,253,255,15,111,98,255,108,65,163,254,155,79,190,255,73,174,193,254,246,40,48,255,107,88,11,254,202,97,85,255,253,204,18,255,113,242,66,0,110,160,194,254,208,18,186,0,81,21,60,0,188,104,167,255,124,166,97,254,210,133,142,0,56,242,137,254,41,111,130,0,111,151,58,1,111,213,141,255,183,172,241,255,38,6,196,255,185,7,123,255,46,11,246,0,245,105,119,1,15,2,161,255,8,206,45,255,18,202,74,255,83,124,115,1,212,141,157,0,83,8,209,254,139,15,232,255,172,54,173,254,50,247,132,0,214,189,213,0,144,184,105,0,223,254,248,0,255,147,240,255,23,188,72,0,7,51,54,0,188,25,180,254,220,180,0,255,83,160,20,0,163,189,243,255,58,209,194,255,87,73,60,0,106,24,49,0,245,249,220,0,22,173,167,0,118,11,195,255,19,126,237,0,110,159,37,255,59,82,47,0,180,187,86,0,188,148,208,1,100,37,133,255,7,112,193,0,129,188,156,255,84,106,129,255,133,225,202,0,14,236,111,255,40,20,101,0,172,172,49,254,51,54,74,255,251,185,184,255,93,155,224,255,180,249,224,1,230,178,146,0,72,57,54,254,178,62,184,0,119,205,72,0,185,239,253,255,61,15,218,0,196,67,56,255,234,32,171,1,46,219,228,0,208,108,234,255,20,63,232,255,165,53,199,1,133,228,5,255,52,205,107,0,74,238,140,255,150,156,219,254,239,172,178,255,251,189,223,254,32,142,211,255,218,15,138,1,241,196,80,0,28,36,98,254,22,234,199,0,61,237,220,255,246,57,37,0,142,17,142,255,157,62,26,0,43,238,95,254,3,217,6,255,213,25,240,1,39,220,174,255,154,205,48,254,19,13,192,255,244,34,54,254,140,16,155,0,240,181,5,254,155,193,60,0,166,128,4,255,36,145,56,255,150,240,219,0,120,51,145,0,82,153,42,1,140,236,146,0,107,92,248,1,189,10,3,0,63,136,242,0,211,39,24,0,19,202,161,1,173,27,186,255,210,204,239,254,41,209,162,255,182,254,159,255,172,116,52,0,195,103,222,254,205,69,59,0,53,22,41,1,218,48,194,0,80,210,242,0,210,188,207,0,187,161,161,254,216,17,1,0,136,225,113,0,250,184,63,0,223,30,98,254,77,168,162,0,59,53,175,0,19,201,10,255,139,224,194,0,147,193,154,255,212,189,12,254,1,200,174,255,50,133,113,1,94,179,90,0,173,182,135,0,94,177,113,0,43,89,215,255,136,252,106,255,123,134,83,254,5,245,66,255,82,49,39,1,220,2,224,0,97,129,177,0,77,59,89,0,61,29,155,1,203,171,220,255,92,78,139,0,145,33,181,255,169,24,141,1,55,150,179,0,139,60,80,255,218,39,97,0,2,147,107,255,60,248,72,0,173,230,47,1,6,83,182,255,16,105,162,254,137,212,81,255,180,184,134,1,39,222,164,255,221,105,251,1,239,112,125,0,63,7,97,0,63,104,227,255,148,58,12,0,90,60,224,255,84,212,252,0,79,215,168,0,248,221,199,1,115,121,1,0,36,172,120,0,32,162,187,255,57,107,49,255,147,42,21,0,106,198,43,1,57,74,87,0,126,203,81,255,129,135,195,0,140,31,177,0,221,139,194,0,3,222,215,0,131,68,231,0,177,86,178,254,124,151,180,0,184,124,38,1,70,163,17,0,249,251,181,1,42,55,227,0,226,161,44,0,23,236,110,0,51,149,142,1,93,5,236,0,218,183,106,254,67,24,77,0,40,245,209,255,222,121,153,0,165,57,30,0,83,125,60,0,70,38,82,1,229,6,188,0,109,222,157,255,55,118,63,255,205,151,186,0,227,33,149,255,254,176,246,1,227,177,227,0,34,106,163,254,176,43,79,0,106,95,78,1,185,241,122,255,185,14,61,0,36,1,202,0,13,178,162,255,247,11,132,0,161,230,92,1,65,1,185,255,212,50,165,1,141,146,64,255,158,242,218,0,21,164,125,0,213,139,122,1,67,71,87,0,203,158,178,1,151,92,43,0,152,111,5,255,39,3,239,255,217,255,250,255,176,63,71,255,74,245,77,1,250,174,18,255,34,49,227,255,246,46,251,255,154,35,48,1,125,157,61,255,106,36,78,255,97,236,153,0,136,187,120,255,113,134,171,255,19,213,217,254,216,94,209,255,252,5,61,0,94,3,202,0,3,26,183,255,64,191,43,255,30,23,21,0,129,141,77,255,102,120,7,1,194,76,140,0,188,175,52,255,17,81,148,0,232,86,55,1,225,48,172,0,134,42,42,255,238,50,47,0,169,18,254,0,20,147,87,255,14,195,239,255,69,247,23,0,238,229,128,255,177,49,112,0,168,98,251,255,121,71,248,0,243,8,145,254,246,227,153,255,219,169,177,254,251,139,165,255,12,163,185,255,164,40,171,255,153,159,27,254,243,109,91,255,222,24,112,1,18,214,231,0,107,157,181,254,195,147,0,255,194,99,104,255,89,140,190,255,177,66,126,254,106,185,66,0,49,218,31,0,252,174,158,0,188,79,230,1,238,41,224,0,212,234,8,1,136,11,181,0,166,117,83,255,68,195,94,0,46,132,201,0,240,152,88,0,164,57,69,254,160,224,42,255,59,215,67,255,119,195,141,255,36,180,121,254,207,47,8,255,174,210,223,0,101,197,68,255,255,82,141,1,250,137,233,0,97,86,133,1,16,80,69,0,132,131,159,0,116,93,100,0,45,141,139,0,152,172,157,255,90,43,91,0,71,153,46,0,39,16,112,255,217,136,97,255,220,198,25,254,177,53,49,0,222,88,134,255,128,15,60,0,207,192,169,255,192,116,209,255,106,78,211,1,200,213,183,255,7,12,122,254,222,203,60,255,33,110,199,254,251,106,117,0,228,225,4,1,120,58,7,255,221,193,84,254,112,133,27,0,189,200,201,255,139,135,150,0,234,55,176,255,61,50,65,0,152,108,169,255,220,85,1,255,112,135,227,0,162,26,186,0,207,96,185,254,244,136,107,0,93,153,50,1,198,97,151,0,110,11,86,255,143,117,174,255,115,212,200,0,5,202,183,0,237,164,10,254,185,239,62,0,236,120,18,254,98,123,99,255,168,201,194,254,46,234,214,0,191,133,49,255,99,169,119,0,190,187,35,1,115,21,45,255,249,131,72,0,112,6,123,255,214,49,181,254,166,233,34,0,92,197,102,254,253,228,205,255,3,59,201,1,42,98,46,0,219,37,35,255,169,195,38,0,94,124,193,1,156,43,223,0,95,72,133,254,120,206,191,0,122,197,239,255,177,187,79,255,254,46,2,1,250,167,190,0,84,129,19,0,203,113,166,255,249,31,189,254,72,157,202,255,208,71,73,255,207,24,72,0,10,16,18,1,210,81,76,255,88,208,192,255,126,243,107,255,238,141,120,255,199,121,234,255,137,12,59,255,36,220,123,255,148,179,60,254,240,12,29,0,66,0,97,1,36,30,38,255,115,1,93,255,96,103,231,255,197,158,59,1,192,164,240,0,202,202,57,255,24,174,48,0,89,77,155,1,42,76,215,0,244,151,233,0,23,48,81,0,239,127,52,254,227,130,37,255,248,116,93,1,124,132,118,0,173,254,192,1,6,235,83,255,110,175,231,1,251,28,182,0,129,249,93,254,84,184,128,0,76,181,62,0,175,128,186,0,100,53,136,254,109,29,226,0,221,233,58,1,20,99,74,0,0,22,160,0,134,13,21,0,9,52,55,255,17,89,140,0,175,34,59,0,84,165,119,255,224,226,234,255,7,72,166,255,123,115,255,1,18,214,246,0,250,7,71,1,217,220,185,0,212,35,76,255,38,125,175,0,189,97,210,0,114,238,44,255,41,188,169,254,45,186,154,0,81,92,22,0,132,160,193,0,121,208,98,255,13,81,44,255,203,156,82,0,71,58,21,255,208,114,191,254,50,38,147,0,154,216,195,0,101,25,18,0,60,250,215,255,233,132,235,255,103,175,142,1,16,14,92,0,141,31,110,254,238,241,45,255,153,217,239,1,97,168,47,255,249,85,16,1,28,175,62,255,57,254,54,0,222,231,126,0,166,45,117,254,18,189,96,255,228,76,50,0,200,244,94,0,198,152,120,1,68,34,69,255,12,65,160,254,101,19,90,0,167,197,120,255,68,54,185,255,41,218,188,0,113,168,48,0,88,105,189,1,26,82,32,255,185,93,164,1,228,240,237,255,66,182,53,0,171,197,92,255,107,9,233,1,199,120,144,255,78,49,10,255,109,170,105,255,90,4,31,255,28,244,113,255,74,58,11,0,62,220,246,255,121,154,200,254,144,210,178,255,126,57,129,1,43,250,14,255,101,111,28,1,47,86,241,255,61,70,150,255,53,73,5,255,30,26,158,0,209,26,86,0,138,237,74,0,164,95,188,0,142,60,29,254,162,116,248,255,187,175,160,0,151,18,16,0,209,111,65,254,203,134,39,255,88,108,49,255,131,26,71,255,221,27,215,254,104,105,93,255,31,236,31,254,135,0,211,255,143,127,110,1,212,73,229,0,233,67,167,254,195,1,208,255,132,17,221,255,51,217,90,0,67,235,50,255,223,210,143,0,179,53,130,1,233,106,198,0,217,173,220,255,112,229,24,255,175,154,93,254,71,203,246,255,48,66,133,255,3,136,230,255,23,221,113,254,235,111,213,0,170,120,95,254,251,221,2,0,45,130,158,254,105,94,217,255,242,52,180,254,213,68,45,255,104,38,28,0,244,158,76,0,161,200,96,255,207,53,13,255,187,67,148,0,170,54,248,0,119,162,178,255,83,20,11,0,42,42,192,1,146,159,163,255,183,232,111,0,77,229,21,255,71,53,143,0,27,76,34,0,246,136,47,255,219,39,182,255,92,224,201,1,19,142,14,255,69,182,241,255,163,118,245,0,9,109,106,1,170,181,247,255,78,47,238,255,84,210,176,255,213,107,139,0,39,38,11,0,72,21,150,0,72,130,69,0,205,77,155,254,142,133,21], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); -/* memory initializer */ allocate([71,111,172,254,226,42,59,255,179,0,215,1,33,128,241,0,234,252,13,1,184,79,8,0,110,30,73,255,246,141,189,0,170,207,218,1,74,154,69,255,138,246,49,255,155,32,100,0,125,74,105,255,90,85,61,255,35,229,177,255,62,125,193,255,153,86,188,1,73,120,212,0,209,123,246,254,135,209,38,255,151,58,44,1,92,69,214,255,14,12,88,255,252,153,166,255,253,207,112,255,60,78,83,255,227,124,110,0,180,96,252,255,53,117,33,254,164,220,82,255,41,1,27,255,38,164,166,255,164,99,169,254,61,144,70,255,192,166,18,0,107,250,66,0,197,65,50,0,1,179,18,255,255,104,1,255,43,153,35,255,80,111,168,0,110,175,168,0,41,105,45,255,219,14,205,255,164,233,140,254,43,1,118,0,233,67,195,0,178,82,159,255,138,87,122,255,212,238,90,255,144,35,124,254,25,140,164,0,251,215,44,254,133,70,107,255,101,227,80,254,92,169,55,0,215,42,49,0,114,180,85,255,33,232,27,1,172,213,25,0,62,176,123,254,32,133,24,255,225,191,62,0,93,70,153,0,181,42,104,1,22,191,224,255,200,200,140,255,249,234,37,0,149,57,141,0,195,56,208,255,254,130,70,255,32,173,240,255,29,220,199,0,110,100,115,255,132,229,249,0,228,233,223,255,37,216,209,254,178,177,209,255,183,45,165,254,224,97,114,0,137,97,168,255,225,222,172,0,165,13,49,1,210,235,204,255,252,4,28,254,70,160,151,0,232,190,52,254,83,248,93,255,62,215,77,1,175,175,179,255,160,50,66,0,121,48,208,0,63,169,209,255,0,210,200,0,224,187,44,1,73,162,82,0,9,176,143,255,19,76,193,255,29,59,167,1,24,43,154,0,28,190,190,0,141,188,129,0,232,235,203,255,234,0,109,255,54,65,159,0,60,88,232,255,121,253,150,254,252,233,131,255,198,110,41,1,83,77,71,255,200,22,59,254,106,253,242,255,21,12,207,255,237,66,189,0,90,198,202,1,225,172,127,0,53,22,202,0,56,230,132,0,1,86,183,0,109,190,42,0,243,68,174,1,109,228,154,0,200,177,122,1,35,160,183,255,177,48,85,255,90,218,169,255,248,152,78,0,202,254,110,0,6,52,43,0,142,98,65,255,63,145,22,0,70,106,93,0,232,138,107,1,110,179,61,255,211,129,218,1,242,209,92,0,35,90,217,1,182,143,106,255,116,101,217,255,114,250,221,255,173,204,6,0,60,150,163,0,73,172,44,255,239,110,80,255,237,76,153,254,161,140,249,0,149,232,229,0,133,31,40,255,174,164,119,0,113,51,214,0,129,228,2,254,64,34,243,0,107,227,244,255,174,106,200,255,84,153,70,1,50,35,16,0,250,74,216,254,236,189,66,255,153,249,13,0,230,178,4,255,221,41,238,0,118,227,121,255,94,87,140,254,254,119,92,0,73,239,246,254,117,87,128,0,19,211,145,255,177,46,252,0,229,91,246,1,69,128,247,255,202,77,54,1,8,11,9,255,153,96,166,0,217,214,173,255,134,192,2,1,0,207,0,0,189,174,107,1,140,134,100,0,158,193,243,1,182,102,171,0,235,154,51,0,142,5,123,255,60,168,89,1,217,14,92,255,19,214,5,1,211,167,254,0,44,6,202,254,120,18,236,255,15,113,184,255,184,223,139,0,40,177,119,254,182,123,90,255,176,165,176,0,247,77,194,0,27,234,120,0,231,0,214,255,59,39,30,0,125,99,145,255,150,68,68,1,141,222,248,0,153,123,210,255,110,127,152,255,229,33,214,1,135,221,197,0,137,97,2,0,12,143,204,255,81,41,188,0,115,79,130,255,94,3,132,0,152,175,187,255,124,141,10,255,126,192,179,255,11,103,198,0,149,6,45,0,219,85,187,1,230,18,178,255,72,182,152,0,3,198,184,255,128,112,224,1,97,161,230,0,254,99,38,255,58,159,197,0,151,66,219,0,59,69,143,255,185,112,249,0,119,136,47,255,123,130,132,0,168,71,95,255,113,176,40,1,232,185,173,0,207,93,117,1,68,157,108,255,102,5,147,254,49,97,33,0,89,65,111,254,247,30,163,255,124,217,221,1,102,250,216,0,198,174,75,254,57,55,18,0,227,5,236,1,229,213,173,0,201,109,218,1,49,233,239,0,30,55,158,1,25,178,106,0,155,111,188,1,94,126,140,0,215,31,238,1,77,240,16,0,213,242,25,1,38,71,168,0,205,186,93,254,49,211,140,255,219,0,180,255,134,118,165,0,160,147,134,255,110,186,35,255,198,243,42,0,243,146,119,0,134,235,163,1,4,241,135,255,193,46,193,254,103,180,79,255,225,4,184,254,242,118,130,0,146,135,176,1,234,111,30,0,69,66,213,254,41,96,123,0,121,94,42,255,178,191,195,255,46,130,42,0,117,84,8,255,233,49,214,254,238,122,109,0,6,71,89,1,236,211,123,0,244,13,48,254,119,148,14,0,114,28,86,255,75,237,25,255,145,229,16,254,129,100,53,255,134,150,120,254,168,157,50,0,23,72,104,255,224,49,14,0,255,123,22,255,151,185,151,255,170,80,184,1,134,182,20,0,41,100,101,1,153,33,16,0,76,154,111,1,86,206,234,255,192,160,164,254,165,123,93,255,1,216,164,254,67,17,175,255,169,11,59,255,158,41,61,255,73,188,14,255,195,6,137,255,22,147,29,255,20,103,3,255,246,130,227,255,122,40,128,0,226,47,24,254,35,36,32,0,152,186,183,255,69,202,20,0,195,133,195,0,222,51,247,0,169,171,94,1,183,0,160,255,64,205,18,1,156,83,15,255,197,58,249,254,251,89,110,255,50,10,88,254,51,43,216,0,98,242,198,1,245,151,113,0,171,236,194,1,197,31,199,255,229,81,38,1,41,59,20,0,253,104,230,0,152,93,14,255,246,242,146,254,214,169,240,255,240,102,108,254,160,167,236,0,154,218,188,0,150,233,202,255,27,19,250,1,2,71,133,255,175,12,63,1,145,183,198,0,104,120,115,255,130,251,247,0,17,212,167,255,62,123,132,255,247,100,189,0,155,223,152,0,143,197,33,0,155,59,44,255,150,93,240,1,127,3,87,255,95,71,207,1,167,85,1,255,188,152,116,255,10,23,23,0,137,195,93,1,54,98,97,0,240,0,168,255,148,188,127,0,134,107,151,0,76,253,171,0,90,132,192,0,146,22,54,0,224,66,54,254,230,186,229,255,39,182,196,0,148,251,130,255,65,131,108,254,128,1,160,0,169,49,167,254,199,254,148,255,251,6,131,0,187,254,129,255,85,82,62,0,178,23,58,255,254,132,5,0,164,213,39,0,134,252,146,254,37,53,81,255,155,134,82,0,205,167,238,255,94,45,180,255,132,40,161,0,254,111,112,1,54,75,217,0,179,230,221,1,235,94,191,255,23,243,48,1,202,145,203,255,39,118,42,255,117,141,253,0,254,0,222,0,43,251,50,0,54,169,234,1,80,68,208,0,148,203,243,254,145,7,135,0,6,254,0,0,252,185,127,0,98,8,129,255,38,35,72,255,211,36,220,1,40,26,89,0,168,64,197,254,3,222,239,255,2,83,215,254,180,159,105,0,58,115,194,0,186,116,106,255,229,247,219,255,129,118,193,0,202,174,183,1,166,161,72,0,201,107,147,254,237,136,74,0,233,230,106,1,105,111,168,0,64,224,30,1,1,229,3,0,102,151,175,255,194,238,228,255,254,250,212,0,187,237,121,0,67,251,96,1,197,30,11,0,183,95,204,0,205,89,138,0,64,221,37,1,255,223,30,255,178,48,211,255,241,200,90,255,167,209,96,255,57,130,221,0,46,114,200,255,61,184,66,0,55,182,24,254,110,182,33,0,171,190,232,255,114,94,31,0,18,221,8,0,47,231,254,0,255,112,83,0,118,15,215,255,173,25,40,254,192,193,31,255,238,21,146,255,171,193,118,255,101,234,53,254,131,212,112,0,89,192,107,1,8,208,27,0,181,217,15,255,231,149,232,0,140,236,126,0,144,9,199,255,12,79,181,254,147,182,202,255,19,109,182,255,49,212,225,0,74,163,203,0,175,233,148,0,26,112,51,0,193,193,9,255,15,135,249,0,150,227,130,0,204,0,219,1,24,242,205,0,238,208,117,255,22,244,112,0,26,229,34,0,37,80,188,255,38,45,206,254,240,90,225,255,29,3,47,255,42,224,76,0,186,243,167,0,32,132,15,255,5,51,125,0,139,135,24,0,6,241,219,0,172,229,133,255,246,214,50,0,231,11,207,255,191,126,83,1,180,163,170,255,245,56,24,1,178,164,211,255,3,16,202,1,98,57,118,255,141,131,89,254,33,51,24,0,243,149,91,255,253,52,14,0,35,169,67,254,49,30,88,255,179,27,36,255,165,140,183,0,58,189,151,0,88,31,0,0,75,169,66,0,66,101,199,255,24,216,199,1,121,196,26,255,14,79,203,254,240,226,81,255,94,28,10,255,83,193,240,255,204,193,131,255,94,15,86,0,218,40,157,0,51,193,209,0,0,242,177,0,102,185,247,0,158,109,116,0,38,135,91,0,223,175,149,0,220,66,1,255,86,60,232,0,25,96,37,255,225,122,162,1,215,187,168,255,158,157,46,0,56,171,162,0,232,240,101,1,122,22,9,0,51,9,21,255,53,25,238,255,217,30,232,254,125,169,148,0,13,232,102,0,148,9,37,0,165,97,141,1,228,131,41,0,222,15,243,255,254,18,17,0,6,60,237,1,106,3,113,0,59,132,189,0,92,112,30,0,105,208,213,0,48,84,179,255,187,121,231,254,27,216,109,255,162,221,107,254,73,239,195,255,250,31,57,255,149,135,89,255,185,23,115,1,3,163,157,255,18,112,250,0,25,57,187,255,161,96,164,0,47,16,243,0,12,141,251,254,67,234,184,255,41,18,161,0,175,6,96,255,160,172,52,254,24,176,183,255,198,193,85,1,124,121,137,255,151,50,114,255,220,203,60,255,207,239,5,1,0,38,107,255,55,238,94,254,70,152,94,0,213,220,77,1,120,17,69,255,85,164,190,255,203,234,81,0,38,49,37,254,61,144,124,0,137,78,49,254,168,247,48,0,95,164,252,0,105,169,135,0,253,228,134,0,64,166,75,0,81,73,20,255,207,210,10,0,234,106,150,255,94,34,90,255,254,159,57,254,220,133,99,0,139,147,180,254,24,23,185,0,41,57,30,255,189,97,76,0,65,187,223,255,224,172,37,255,34,62,95,1,231,144,240,0,77,106,126,254,64,152,91,0,29,98,155,0,226,251,53,255,234,211,5,255,144,203,222,255,164,176,221,254,5,231,24,0,179,122,205,0,36,1,134,255,125,70,151,254,97,228,252,0,172,129,23,254,48,90,209,255,150,224,82,1,84,134,30,0,241,196,46,0,103,113,234,255,46,101,121,254,40,124,250,255,135,45,242,254,9,249,168,255,140,108,131,255,143,163,171,0,50,173,199,255,88,222,142,255,200,95,158,0,142,192,163,255,7,117,135,0,111,124,22,0,236,12,65,254,68,38,65,255,227,174,254,0,244,245,38,0,240,50,208,255,161,63,250,0,60,209,239,0,122,35,19,0,14,33,230,254,2,159,113,0,106,20,127,255,228,205,96,0,137,210,174,254,180,212,144,255,89,98,154,1,34,88,139,0,167,162,112,1,65,110,197,0,241,37,169,0,66,56,131,255,10,201,83,254,133,253,187,255,177,112,45,254,196,251,0,0,196,250,151,255,238,232,214,255,150,209,205,0,28,240,118,0,71,76,83,1,236,99,91,0,42,250,131,1,96,18,64,255,118,222,35,0,113,214,203,255,122,119,184,255,66,19,36,0,204,64,249,0,146,89,139,0,134,62,135,1,104,233,101,0,188,84,26,0,49,249,129,0,208,214,75,255,207,130,77,255,115,175,235,0,171,2,137,255,175,145,186,1,55,245,135,255,154,86,181,1,100,58,246,255,109,199,60,255,82,204,134,255,215,49,230,1,140,229,192,255,222,193,251,255,81,136,15,255,179,149,162,255,23,39,29,255,7,95,75,254,191,81,222,0,241,81,90,255,107,49,201,255,244,211,157,0,222,140,149,255,65,219,56,254,189,246,90,255,178,59,157,1,48,219,52,0,98,34,215,0,28,17,187,255,175,169,24,0,92,79,161,255,236,200,194,1,147,143,234,0,229,225,7,1,197,168,14,0,235,51,53,1,253,120,174,0,197,6,168,255,202,117,171,0,163,21,206,0,114,85,90,255,15,41,10,255,194,19,99,0,65,55,216,254,162,146,116,0,50,206,212,255,64,146,29,255,158,158,131,1,100,165,130,255,172,23,129,255,125,53,9,255,15,193,18,1,26,49,11,255,181,174,201,1,135,201,14,255,100,19,149,0,219,98,79,0,42,99,143,254,96,0,48,255,197,249,83,254,104,149,79,255,235,110,136,254,82,128,44,255,65,41,36,254,88,211,10,0,187,121,187,0,98,134,199,0,171,188,179,254,210,11,238,255,66,123,130,254,52,234,61,0,48,113,23,254,6,86,120,255,119,178,245,0,87,129,201,0,242,141,209,0,202,114,85,0,148,22,161,0,103,195,48,0,25,49,171,255,138,67,130,0,182,73,122,254,148,24,130,0,211,229,154,0,32,155,158,0,84,105,61,0,177,194,9,255,166,89,86,1,54,83,187,0,249,40,117,255,109,3,215,255,53,146,44,1,63,47,179,0,194,216,3,254,14,84,136,0,136,177,13,255,72,243,186,255,117,17,125,255,211,58,211,255,93,79,223,0,90,88,245,255,139,209,111,255,70,222,47,0,10,246,79,255,198,217,178,0,227,225,11,1,78,126,179,255,62,43,126,0,103,148,35,0,129,8,165,254,245,240,148,0,61,51,142,0,81,208,134,0,15,137,115,255,211,119,236,255,159,245,248,255,2,134,136,255,230,139,58,1,160,164,254,0,114,85,141,255,49,166,182,255,144,70,84,1,85,182,7,0,46,53,93,0,9,166,161,255,55,162,178,255,45,184,188,0,146,28,44,254,169,90,49,0,120,178,241,1,14,123,127,255,7,241,199,1,189,66,50,255,198,143,101,254,189,243,135,255,141,24,24,254,75,97,87,0,118,251,154,1,237,54,156,0,171,146,207,255,131,196,246,255,136,64,113,1,151,232,57,0,240,218,115,0,49,61,27,255,64,129,73,1,252,169,27,255,40,132,10,1,90,201,193,255,252,121,240,1,186,206,41,0,43,198,97,0,145,100,183,0,204,216,80,254,172,150,65,0,249,229,196,254,104,123,73,255,77,104,96,254,130,180,8,0,104,123,57,0,220,202,229,255,102,249,211,0,86,14,232,255,182,78,209,0,239,225,164,0,106,13,32,255,120,73,17,255,134,67,233,0,83,254,181,0,183,236,112,1,48,64,131,255,241,216,243,255,65,193,226,0,206,241,100,254,100,134,166,255,237,202,197,0,55,13,81,0,32,124,102,255,40,228,177,0,118,181,31,1,231,160,134,255,119,187,202,0,0,142,60,255,128,38,189,255,166,201,150,0,207,120,26,1,54,184,172,0,12,242,204,254,133,66,230,0,34,38,31,1,184,112,80,0,32,51,165,254,191,243,55,0,58,73,146,254,155,167,205,255,100,104,152,255,197,254,207,255,173,19,247,0,238,10,202,0,239,151,242,0,94,59,39,255,240,29,102,255,10,92,154,255,229,84,219,255,161,129,80,0,208,90,204,1,240,219,174,255,158,102,145,1,53,178,76,255,52,108,168,1,83,222,107,0,211,36,109,0,118,58,56,0,8,29,22,0,237,160,199,0,170,209,157,0,137,71,47,0,143,86,32,0,198,242,2,0,212,48,136,1,92,172,186,0,230,151,105,1,96,191,229,0,138,80,191,254,240,216,130,255,98,43,6,254,168,196,49,0,253,18,91,1,144,73,121,0,61,146,39,1,63,104,24,255,184,165,112,254,126,235,98,0,80,213,98,255,123,60,87,255,82,140,245,1,223,120,173,255,15,198,134,1,206,60,239,0,231,234,92,255,33,238,19,255,165,113,142,1,176,119,38,0,160,43,166,254,239,91,105,0,107,61,194,1,25,4,68,0,15,139,51,0,164,132,106,255,34,116,46,254,168,95,197,0,137,212,23,0,72,156,58,0,137,112,69,254,150,105,154,255,236,201,157,0,23,212,154,255,136,82,227,254,226,59,221,255,95,149,192,0,81,118,52,255,33,43,215,1,14,147,75,255,89,156,121,254,14,18,79,0,147,208,139,1,151,218,62,255,156,88,8,1,210,184,98,255,20,175,123,255,102,83,229,0,220,65,116,1,150,250,4,255,92,142,220,255,34,247,66,255,204,225,179,254,151,81,151,0,71,40,236,255,138,63,62,0,6,79,240,255,183,185,181,0,118,50,27,0,63,227,192,0,123,99,58,1,50,224,155,255,17,225,223,254,220,224,77,255,14,44,123,1,141,128,175,0,248,212,200,0,150,59,183,255,147,97,29,0,150,204,181,0,253,37,71,0,145,85,119,0,154,200,186,0,2,128,249,255,83,24,124,0,14,87,143,0,168,51,245,1,124,151,231,255,208,240,197,1,124,190,185,0,48,58,246,0,20,233,232,0,125,18,98,255,13,254,31,255,245,177,130,255,108,142,35,0,171,125,242,254,140,12,34,255,165,161,162,0,206,205,101,0,247,25,34,1,100,145,57,0,39,70,57,0,118,204,203,255,242,0,162,0,165,244,30,0,198,116,226,0,128,111,153,255,140,54,182,1,60,122,15,255,155,58,57,1,54,50,198,0,171,211,29,255,107,138,167,255,173,107,199,255,109,161,193,0,89,72,242,255,206,115,89,255,250,254,142,254,177,202,94,255,81,89,50,0,7,105,66,255,25,254,255,254,203,64,23,255,79,222,108,255,39,249,75,0,241,124,50,0,239,152,133,0,221,241,105,0,147,151,98,0,213,161,121,254,242,49,137,0,233,37,249,254,42,183,27,0,184,119,230,255,217,32,163,255,208,251,228,1,137,62,131,255,79,64,9,254,94,48,113,0,17,138,50,254,193,255,22,0,247,18,197,1,67,55,104,0,16,205,95,255,48,37,66,0,55,156,63,1,64,82,74,255,200,53,71,254,239,67,125,0,26,224,222,0,223,137,93,255,30,224,202,255,9,220,132,0,198,38,235,1,102,141,86,0,60,43,81,1,136,28,26,0,233,36,8,254,207,242,148,0,164,162,63,0,51,46,224,255,114,48,79,255,9,175,226,0,222,3,193,255,47,160,232,255,255,93,105,254,14,42,230,0,26,138,82,1,208,43,244,0,27,39,38,255,98,208,127,255,64,149,182,255,5,250,209,0,187,60,28,254,49,25,218,255,169,116,205,255,119,18,120,0,156,116,147,255,132,53,109,255,13,10,202,0,110,83,167,0,157,219,137,255,6,3,130,255,50,167,30,255,60,159,47,255,129,128,157,254,94,3,189,0,3,166,68,0,83,223,215,0,150,90,194,1,15,168,65,0,227,83,51,255,205,171,66,255,54,187,60,1,152,102,45,255,119,154,225,0,240,247,136,0,100,197,178,255,139,71,223,255,204,82,16,1,41,206,42,255,156,192,221,255,216,123,244,255,218,218,185,255,187,186,239,255,252,172,160,255,195,52,22,0,144,174,181,254,187,100,115,255,211,78,176,255,27,7,193,0,147,213,104,255,90,201,10,255,80,123,66,1,22,33,186,0,1,7,99,254,30,206,10,0,229,234,5,0,53,30,210,0,138,8,220,254,71,55,167,0,72,225,86,1,118,190,188,0,254,193,101,1,171,249,172,255,94,158,183,254,93,2,108,255,176,93,76,255,73,99,79,255,74,64,129,254,246,46,65,0,99,241,127,254,246,151,102,255,44,53,208,254,59,102,234,0,154,175,164,255,88,242,32,0,111,38,1,0,255,182,190,255,115,176,15,254,169,60,129,0,122,237,241,0,90,76,63,0,62,74,120,255,122,195,110,0,119,4,178,0,222,242,210,0,130,33,46,254,156,40,41,0,167,146,112,1,49,163,111,255,121,176,235,0,76,207,14,255,3,25,198,1,41,235,213,0,85,36,214,1,49,92,109,255,200,24,30,254,168,236,195,0,145,39,124,1,236,195,149,0,90,36,184,255,67,85,170,255,38,35,26,254,131,124,68,255,239,155,35,255,54,201,164,0,196,22,117,255,49,15,205,0,24,224,29,1,126,113,144,0,117,21,182,0,203,159,141,0,223,135,77,0,176,230,176,255,190,229,215,255,99,37,181,255,51,21,138,255,25,189,89,255,49,48,165,254,152,45,247,0,170,108,222,0,80,202,5,0,27,69,103,254,204,22,129,255,180,252,62,254,210,1,91,255,146,110,254,255,219,162,28,0,223,252,213,1,59,8,33,0,206,16,244,0,129,211,48,0,107,160,208,0,112,59,209,0,109,77,216,254,34,21,185,255,246,99,56,255,179,139,19,255,185,29,50,255,84,89,19,0,74,250,98,255,225,42,200,255,192,217,205,255,210,16,167,0,99,132,95,1,43,230,57,0,254,11,203,255,99,188,63,255,119,193,251,254,80,105,54,0,232,181,189,1,183,69,112,255,208,171,165,255,47,109,180,255,123,83,165,0,146,162,52,255,154,11,4,255,151,227,90,255,146,137,97,254,61,233,41,255,94,42,55,255,108,164,236,0,152,68,254,0,10,140,131,255,10,106,79,254,243,158,137,0,67,178,66,254,177,123,198,255,15,62,34,0,197,88,42,255,149,95,177,255,152,0,198,255,149,254,113,255,225,90,163,255,125,217,247,0,18,17,224,0,128,66,120,254,192,25,9,255,50,221,205,0,49,212,70,0,233,255,164,0,2,209,9,0,221,52,219,254,172,224,244,255,94,56,206,1,242,179,2,255,31,91,164,1,230,46,138,255,189,230,220,0,57,47,61,255,111,11,157,0,177,91,152,0,28,230,98,0,97,87,126,0,198,89,145,255,167,79,107,0,249,77,160,1,29,233,230,255,150,21,86,254,60,11,193,0,151,37,36,254,185,150,243,255,228,212,83,1,172,151,180,0,201,169,155,0,244,60,234,0,142,235,4,1,67,218,60,0,192,113,75,1,116,243,207,255,65,172,155,0,81,30,156,255,80,72,33,254,18,231,109,255,142,107,21,254,125,26,132,255,176,16,59,255,150,201,58,0,206,169,201,0,208,121,226,0,40,172,14,255,150,61,94,255,56,57,156,255,141,60,145,255,45,108,149,255,238,145,155,255,209,85,31,254,192,12,210,0,99,98,93,254,152,16,151,0,225,185,220,0,141,235,44,255,160,172,21,254,71,26,31,255,13,64,93,254,28,56,198,0,177,62,248,1,182,8,241,0,166,101,148,255,78,81,133,255,129,222,215,1,188,169,129,255,232,7,97,0,49,112,60,255,217,229,251,0,119,108,138,0,39,19,123,254,131,49,235,0,132,84,145,0,130,230,148,255,25,74,187,0,5,245,54,255,185,219,241,1,18,194,228,255,241,202,102,0,105,113,202,0,155,235,79,0,21,9,178,255,156,1,239,0,200,148,61,0,115,247,210,255,49,221,135,0,58,189,8,1,35,46,9,0,81,65,5,255,52,158,185,255,125,116,46,255,74,140,13,255,210,92,172,254,147,23,71,0,217,224,253,254,115,108,180,255,145,58,48,254,219,177,24,255,156,255,60,1,154,147,242,0,253,134,87,0,53,75,229,0,48,195,222,255,31,175,50,255,156,210,120,255,208,35,222,255,18,248,179,1,2,10,101,255,157,194,248,255,158,204,101,255,104,254,197,255,79,62,4,0,178,172,101,1,96,146,251,255,65,10,156,0,2,137,165,255,116,4,231,0,242,215,1,0,19,35,29,255,43,161,79,0,59,149,246,1,251,66,176,0,200,33,3,255,80,110,142,255,195,161,17,1,228,56,66,255,123,47,145,254,132,4,164,0,67,174,172,0,25,253,114,0,87,97,87,1,250,220,84,0,96,91,200,255,37,125,59,0,19,65,118,0,161,52,241,255,237,172,6,255,176,191,255,255,1,65,130,254,223,190,230,0,101,253,231,255,146,35,109,0,250,29,77,1,49,0,19,0,123,90,155,1,22,86,32,255,218,213,65,0,111,93,127,0,60,93,169,255,8,127,182,0,17,186,14,254,253,137,246,255,213,25,48,254,76,238,0,255,248,92,70,255,99,224,139,0,184,9,255,1,7,164,208,0,205,131,198,1,87,214,199,0,130,214,95,0,221,149,222,0,23,38,171,254,197,110,213,0,43,115,140,254,215,177,118,0,96,52,66,1,117,158,237,0,14,64,182,255,46,63,174,255,158,95,190,255,225,205,177,255,43,5,142,255,172,99,212,255,244,187,147,0,29,51,153,255,228,116,24,254,30,101,207,0,19,246,150,255,134,231,5,0,125,134,226,1,77,65,98,0,236,130,33,255,5,110,62,0,69,108,127,255,7,113,22,0,145,20,83,254,194,161,231,255,131,181,60,0,217,209,177,255,229,148,212,254,3,131,184,0,117,177,187,1,28,14,31,255,176,102,80,0,50,84,151,255,125,31,54,255,21,157,133,255,19,179,139,1,224,232,26,0,34,117,170,255,167,252,171,255,73,141,206,254,129,250,35,0,72,79,236,1,220,229,20,255,41,202,173,255,99,76,238,255,198,22,224,255,108,198,195,255,36,141,96,1,236,158,59,255,106,100,87,0,110,226,2,0,227,234,222,0,154,93,119,255,74,112,164,255,67,91,2,255,21,145,33,255,102,214,137,255,175,230,103,254,163,246,166,0,93,247,116,254,167,224,28,255,220,2,57,1,171,206,84,0,123,228,17,255,27,120,119,0,119,11,147,1,180,47,225,255,104,200,185,254,165,2,114,0,77,78,212,0,45,154,177,255,24,196,121,254,82,157,182,0,90,16,190,1,12,147,197,0,95,239,152,255,11,235,71,0,86,146,119,255,172,134,214,0,60,131,196,0,161,225,129,0,31,130,120,254,95,200,51,0,105,231,210,255,58,9,148,255,43,168,221,255,124,237,142,0,198,211,50,254,46,245,103,0,164,248,84,0,152,70,208,255,180,117,177,0,70,79,185,0,243,74,32,0,149,156,207,0,197,196,161,1,245,53,239,0,15,93,246,254,139,240,49,255,196,88,36,255,162,38,123,0,128,200,157,1,174,76,103,255,173,169,34,254,216,1,171,255,114,51,17,0,136,228,194,0,110,150,56,254,106,246,159,0,19,184,79,255,150,77,240,255,155,80,162,0,0,53,169,255,29,151,86,0,68,94,16,0,92,7,110,254,98,117,149,255,249,77,230,255,253,10,140,0,214,124,92,254,35,118,235,0,89,48,57,1,22,53,166,0,184,144,61,255,179,255,194,0,214,248,61,254,59,110,246,0,121,21,81,254,166,3,228,0,106,64,26,255,69,232,134,255,242,220,53,254,46,220,85,0,113,149,247,255,97,179,103,255,190,127,11,0,135,209,182,0,95,52,129,1,170,144,206,255,122,200,204,255,168,100,146,0,60,144,149,254,70,60,40,0,122,52,177,255,246,211,101,255,174,237,8,0,7,51,120,0,19,31,173,0,126,239,156,255,143,189,203,0,196,128,88,255,233,133,226,255,30,125,173,255,201,108,50,0,123,100,59,255,254,163,3,1,221,148,181,255,214,136,57,254,222,180,137,255,207,88,54,255,28,33,251,255,67,214,52,1,210,208,100,0,81,170,94,0,145,40,53,0,224,111,231,254,35,28,244,255,226,199,195,254,238,17,230,0,217,217,164,254,169,157,221,0,218,46,162,1,199,207,163,255,108,115,162,1,14,96,187,255,118,60,76,0,184,159,152,0,209,231,71,254,42,164,186,255,186,153,51,254,221,171,182,255,162,142,173,0,235,47,193,0,7,139,16,1,95,164,64,255,16,221,166,0,219,197,16,0,132,29,44,255,100,69,117,255,60,235,88,254,40,81,173,0,71,190,61,255,187,88,157,0,231,11,23,0,237,117,164,0,225,168,223,255,154,114,116,255,163,152,242,1,24,32,170,0,125,98,113,254,168,19,76,0,17,157,220,254,155,52,5,0,19,111,161,255,71,90,252,255,173,110,240,0,10,198,121,255,253,255,240,255,66,123,210,0,221,194,215,254,121,163,17,255,225,7,99,0,190,49,182,0,115,9,133,1,232,26,138,255,213,68,132,0,44,119,122,255,179,98,51,0,149,90,106,0,71,50,230,255,10,153,118,255,177,70,25,0,165,87,205,0,55,138,234,0,238,30,97,0,113,155,207,0,98,153,127,0,34,107,219,254,117,114,172,255,76,180,255,254,242,57,179,255,221,34,172,254,56,162,49,255,83,3,255,255,113,221,189,255,188,25,228,254,16,88,89,255,71,28,198,254,22,17,149,255,243,121,254,255,107,202,99,255,9,206,14,1,220,47,153,0,107,137,39,1,97,49,194,255,149,51,197,254,186,58,11,255,107,43,232,1,200,6,14,255,181,133,65,254,221,228,171,255,123,62,231,1,227,234,179,255,34,189,212,254,244,187,249,0,190,13,80,1,130,89,1,0,223,133,173,0,9,222,198,255,66,127,74,0,167,216,93,255,155,168,198,1,66,145,0,0,68,102,46,1,172,90,154,0,216,128,75,255,160,40,51,0,158,17,27,1,124,240,49,0,236,202,176,255,151,124,192,255,38,193,190,0,95,182,61,0,163,147,124,255,255,165,51,255,28,40,17,254,215,96,78,0,86,145,218,254,31,36,202,255,86,9,5,0,111,41,200,255,237,108,97,0,57,62,44,0,117,184,15,1,45,241,116,0,152,1,220,255,157,165,188,0,250,15,131,1,60,44,125,255,65,220,251,255,75,50,184,0,53,90,128,255,231,80,194,255,136,129,127,1,21,18,187,255,45,58,161,255,71,147,34,0,174,249,11,254,35,141,29,0,239,68,177,255,115,110,58,0,238,190,177,1,87,245,166,255,190,49,247,255,146,83,184,255,173,14,39,255,146,215,104,0,142,223,120,0,149,200,155,255,212,207,145,1,16,181,217,0,173,32,87,255,255,35,181,0,119,223,161,1,200,223,94,255,70,6,186,255,192,67,85,255,50,169,152,0,144,26,123,255,56,243,179,254,20,68,136,0,39,140,188,254,253,208,5,255,200,115,135,1,43,172,229,255,156,104,187,0,151,251,167,0,52,135,23,0,151,153,72,0,147,197,107,254,148,158,5,255,238,143,206,0,126,153,137,255,88,152,197,254,7,68,167,0,252,159,165,255,239,78,54,255,24,63,55,255,38,222,94,0,237,183,12,255,206,204,210,0,19,39,246,254,30,74,231,0,135,108,29,1,179,115,0,0,117,118,116,1,132,6,252,255,145,129,161,1,105,67,141,0,82,37,226,255,238,226,228,255,204,214,129,254,162,123,100,255,185,121,234,0,45,108,231,0,66,8,56,255,132,136,128,0,172,224,66,254,175,157,188,0,230,223,226,254,242,219,69,0,184,14,119,1,82,162,56,0,114,123,20,0,162,103,85,255,49,239,99,254,156,135,215,0,111,255,167,254,39,196,214,0,144,38,79,1,249,168,125,0,155,97,156,255,23,52,219,255,150,22,144,0,44,149,165,255,40,127,183,0,196,77,233,255,118,129,210,255,170,135,230,255,214,119,198,0,233,240,35,0,253,52,7,255,117,102,48,255,21,204,154,255,179,136,177,255,23,2,3,1,149,130,89,255,252,17,159,1,70,60,26,0,144,107,17,0,180,190,60,255,56,182,59,255,110,71,54,255,198,18,129,255,149,224,87,255,223,21,152,255,138,22,182,255,250,156,205,0,236,45,208,255,79,148,242,1,101,70,209,0,103,78,174,0,101,144,172,255,152,136,237,1,191,194,136,0,113,80,125,1,152,4,141,0,155,150,53,255,196,116,245,0,239,114,73,254,19,82,17,255,124,125,234,255,40,52,191,0,42,210,158,255,155,132,165,0,178,5,42,1,64,92,40,255,36,85,77,255,178,228,118,0,137,66,96,254,115,226,66,0,110,240,69,254,151,111,80,0,167,174,236,255,227,108,107,255,188,242,65,255,183,81,255,0,57,206,181,255,47,34,181,255,213,240,158,1,71,75,95,0,156,40,24,255,102,210,81,0,171,199,228,255,154,34,41,0,227,175,75,0,21,239,195,0,138,229,95,1,76,192,49,0,117,123,87,1,227,225,130,0,125,62,63,255,2,198,171,0,254,36,13,254,145,186,206,0,148,255,244,255,35,0,166,0,30,150,219,1,92,228,212,0,92,198,60,254,62,133,200,255,201,41,59,0,125,238,109,255,180,163,238,1,140,122,82,0,9,22,88,255,197,157,47,255,153,94,57,0,88,30,182,0,84,161,85,0,178,146,124,0,166,166,7,255,21,208,223,0,156,182,242,0,155,121,185,0,83,156,174,254,154,16,118,255,186,83,232,1,223,58,121,255,29,23,88,0,35,125,127,255,170,5,149,254,164,12,130,255,155,196,29,0,161,96,136,0,7,35,29,1,162,37,251,0,3,46,242,255,0,217,188,0,57,174,226,1,206,233,2,0,57,187,136,254,123,189,9,255,201,117,127,255,186,36,204,0,231,25,216,0,80,78,105,0,19,134,129,255,148,203,68,0,141,81,125,254,248,165,200,255,214,144,135,0,151,55,166,255,38,235,91,0,21,46,154,0,223,254,150,255,35,153,180,255,125,176,29,1,43,98,30,255,216,122,230,255,233,160,12,0,57,185,12,254,240,113,7,255,5,9,16,254,26,91,108,0,109,198,203,0,8,147,40,0,129,134,228,255,124,186,40,255,114,98,132,254,166,132,23,0,99,69,44,0,9,242,238,255,184,53,59,0,132,129,102,255,52,32,243,254,147,223,200,255,123,83,179,254,135,144,201,255,141,37,56,1,151,60,227,255,90,73,156,1,203,172,187,0,80,151,47,255,94,137,231,255,36,191,59,255,225,209,181,255,74,215,213,254,6,118,179,255,153,54,193,1,50,0,231,0,104,157,72,1,140,227,154,255,182,226,16,254,96,225,92,255,115,20,170,254,6,250,78,0,248,75,173,255,53,89,6,255,0,180,118,0,72,173,1,0,64,8,206,1,174,133,223,0,185,62,133,255,214,11,98,0,197,31,208,0,171,167,244,255,22,231,181,1,150,218,185,0,247,169,97,1,165,139,247,255,47,120,149,1,103,248,51,0,60,69,28,254,25,179,196,0,124,7,218,254,58,107,81,0,184,233,156,255,252,74,36,0,118,188,67,0,141,95,53,255,222,94,165,254,46,61,53,0,206,59,115,255,47,236,250,255,74,5,32,1,129,154,238,255,106,32,226,0,121,187,61,255,3,166,241,254,67,170,172,255,29,216,178,255,23,201,252,0,253,110,243,0,200,125,57,0,109,192,96,255,52,115,238,0,38,121,243,255,201,56,33,0,194,118,130,0,75,96,25,255,170,30,230,254,39,63,253,0,36,45,250,255,251,1,239,0,160,212,92,1,45,209,237,0,243,33,87,254,237,84,201,255,212,18,157,254,212,99,127,255,217,98,16,254,139,172,239,0,168,201,130,255,143,193,169,255,238,151,193,1,215,104,41,0,239,61,165,254,2,3,242,0,22,203,177,254,177,204,22,0,149,129,213,254,31,11,41,255,0,159,121,254,160,25,114,255,162,80,200,0,157,151,11,0,154,134,78,1,216,54,252,0,48,103,133,0,105,220,197,0,253,168,77,254,53,179,23,0,24,121,240,1,255,46,96,255,107,60,135,254,98,205,249,255,63,249,119,255,120,59,211,255,114,180,55,254,91,85,237,0,149,212,77,1,56,73,49,0,86,198,150,0,93,209,160,0,69,205,182,255,244,90,43,0,20,36,176,0,122,116,221,0,51,167,39,1,231,1,63,255,13,197,134,0,3,209,34,255,135,59,202,0,167,100,78,0,47,223,76,0,185,60,62,0,178,166,123,1,132,12,161,255,61,174,43,0,195,69,144,0,127,47,191,1,34,44,78,0,57,234,52,1,255,22,40,255,246,94,146,0,83,228,128,0,60,78,224,255,0,96,210,255,153,175,236,0,159,21,73,0,180,115,196,254,131,225,106,0,255,167,134,0,159,8,112,255,120,68,194,255,176,196,198,255,118,48,168,255,93,169,1,0,112,200,102,1,74,24,254,0,19,141,4,254,142,62,63,0,131,179,187,255,77,156,155,255,119,86,164,0,170,208,146,255,208,133,154,255,148,155,58,255,162,120,232,254,252,213,155,0,241,13,42,0,94,50,131,0,179,170,112,0,140,83,151,255,55,119,84,1,140,35,239,255,153,45,67,1,236,175,39,0,54,151,103,255,158,42,65,255,196,239,135,254,86,53,203,0,149,97,47,254,216,35,17,255,70,3,70,1,103,36,90,255,40,26,173,0,184,48,13,0,163,219,217,255,81,6,1,255,221,170,108,254,233,208,93,0,100,201,249,254,86,36,35,255,209,154,30,1,227,201,251,255,2,189,167,254,100,57,3,0,13,128,41,0,197,100,75,0,150,204,235,255,145,174,59,0,120,248,149,255,85,55,225,0,114,210,53,254,199,204,119,0,14,247,74,1,63,251,129,0,67,104,151,1,135,130,80,0,79,89,55,255,117,230,157,255,25,96,143,0,213,145,5,0,69,241,120,1,149,243,95,255,114,42,20,0,131,72,2,0,154,53,20,255,73,62,109,0,196,102,152,0,41,12,204,255,122,38,11,1,250,10,145,0,207,125,148,0,246,244,222,255,41,32,85,1,112,213,126,0,162,249,86,1,71,198,127,255,81,9,21,1,98,39,4,255,204,71,45,1,75,111,137,0,234,59,231,0,32,48,95,255,204,31,114,1,29,196,181,255,51,241,167,254,93,109,142,0,104,144,45,0,235,12,181,255,52,112,164,0,76,254,202,255,174,14,162,0,61,235,147,255,43,64,185,254,233,125,217,0,243,88,167,254,74,49,8,0,156,204,66,0,124,214,123,0,38,221,118,1,146,112,236,0,114,98,177,0,151,89,199,0,87,197,112,0,185,149,161,0,44,96,165,0,248,179,20,255,188,219,216,254,40,62,13,0,243,142,141,0,229,227,206,255,172,202,35,255,117,176,225,255,82,110,38,1,42,245,14,255,20,83,97,0,49,171,10,0,242,119,120,0,25,232,61,0,212,240,147,255,4,115,56,255,145,17,239,254,202,17,251,255,249,18,245,255,99,117,239,0,184,4,179,255,246,237,51,255,37,239,137,255,166,112,166,255,81,188,33,255,185,250,142,255,54,187,173,0,208,112,201,0,246,43,228,1,104,184,88,255,212,52,196,255,51,117,108,255,254,117,155,0,46,91,15,255,87,14,144,255,87,227,204,0,83,26,83,1,159,76,227,0,159,27,213,1,24,151,108,0,117,144,179,254,137,209,82,0,38,159,10,0,115,133,201,0,223,182,156,1,110,196,93,255,57,60,233,0,5,167,105,255,154,197,164,0,96,34,186,255,147,133,37,1,220,99,190,0,1,167,84,255,20,145,171,0,194,197,251,254,95,78,133,255,252,248,243,255,225,93,131,255,187,134,196,255,216,153,170,0,20,118,158,254,140,1,118,0,86,158,15,1,45,211,41,255,147,1,100,254,113,116,76,255,211,127,108,1,103,15,48,0,193,16,102,1,69,51,95,255,107,128,157,0,137,171,233,0,90,124,144,1,106,161,182,0,175,76,236,1,200,141,172,255,163,58,104,0,233,180,52,255,240,253,14,255,162,113,254,255,38,239,138,254,52,46,166,0,241,101,33,254,131,186,156,0,111,208,62,255,124,94,160,255,31,172,254,0,112,174,56,255,188,99,27,255,67,138,251,0,125,58,128,1,156,152,174,255,178,12,247,255,252,84,158,0,82,197,14,254,172,200,83,255,37,39,46,1,106,207,167,0,24,189,34,0,131,178,144,0,206,213,4,0,161,226,210,0,72,51,105,255,97,45,187,255,78,184,223,255,176,29,251,0,79,160,86,255,116,37,178,0,82,77,213,1,82,84,141,255,226,101,212,1,175,88,199,255,245,94,247,1,172,118,109,255,166,185,190,0,131,181,120,0,87,254,93,255,134,240,73,255,32,245,143,255,139,162,103,255,179,98,18,254,217,204,112,0,147,223,120,255,53,10,243,0,166,140,150,0,125,80,200,255,14,109,219,255,91,218,1,255,252,252,47,254,109,156,116,255,115,49,127,1,204,87,211,255,148,202,217,255,26,85,249,255,14,245,134,1,76,89,169,255,242,45,230,0,59,98,172,255,114,73,132,254,78,155,49,255,158,126,84,0,49,175,43,255,16,182,84,255,157,103,35,0,104,193,109,255,67,221,154,0,201,172,1,254,8,162,88,0,165,1,29,255,125,155,229,255,30,154,220,1,103,239,92,0,220,1,109,255,202,198,1,0,94,2,142,1,36,54,44,0,235,226,158,255,170,251,214,255,185,77,9,0,97,74,242,0,219,163,149,255,240,35,118,255,223,114,88,254,192,199,3,0,106,37,24,255,201,161,118,255,97,89,99,1,224,58,103,255,101,199,147,254,222,60,99,0,234,25,59,1,52,135,27,0,102,3,91,254,168,216,235,0,229,232,136,0,104,60,129,0,46,168,238,0,39,191,67,0,75,163,47,0,143,97,98,255,56,216,168,1,168,233,252,255,35,111,22,255,92,84,43,0,26,200,87,1,91,253,152,0,202,56,70,0,142,8,77,0,80,10,175,1,252,199,76,0,22,110,82,255,129,1,194,0,11,128,61,1,87,14,145,255,253,222,190,1,15,72,174,0,85,163,86,254,58,99,44,255,45,24,188,254,26,205,15,0,19,229,210,254,248,67,195,0,99,71,184,0,154,199,37,255,151,243,121,255,38,51,75,255,201,85,130,254,44,65,250,0,57,147,243,254,146,43,59,255,89,28,53,0,33,84,24,255,179,51,18,254,189,70,83,0,11,156,179,1,98,134,119,0,158,111,111,0,119,154,73,255,200,63,140,254,45,13,13,255,154,192,2,254,81,72,42,0,46,160,185,254,44,112,6,0,146,215,149,1,26,176,104,0,68,28,87,1,236,50,153,255,179,128,250,254,206,193,191,255,166,92,137,254,53,40,239,0,210,1,204,254,168,173,35,0,141,243,45,1,36,50,109,255,15,242,194,255,227,159,122,255,176,175,202,254,70,57,72,0,40,223,56,0,208,162,58,255,183,98,93,0,15,111,12,0,30,8,76,255,132,127,246,255,45,242,103,0,69,181,15,255,10,209,30,0,3,179,121,0,241,232,218,1,123,199,88,255,2,210,202,1,188,130,81,255,94,101,208,1,103,36,45,0,76,193,24,1,95,26,241,255,165,162,187,0,36,114,140,0,202,66,5,255,37,56,147,0,152,11,243,1,127,85,232,255,250,135,212,1,185,177,113,0,90,220,75,255,69,248,146,0,50,111,50,0,92,22,80,0,244,36,115,254,163,100,82,255,25,193,6,1,127,61,36,0,253,67,30,254,65,236,170,255,161,17,215,254,63,175,140,0,55,127,4,0,79,112,233,0,109,160,40,0,143,83,7,255,65,26,238,255,217,169,140,255,78,94,189,255,0,147,190,255,147,71,186,254,106,77,127,255,233,157,233,1,135,87,237,255,208,13,236,1,155,109,36,255,180,100,218,0,180,163,18,0,190,110,9,1,17,63,123,255,179,136,180,255,165,123,123,255,144,188,81,254,71,240,108,255,25,112,11,255,227,218,51,255,167,50,234,255,114,79,108,255,31,19,115,255,183,240,99,0,227,87,143,255,72,217,248,255,102,169,95,1,129,149,149,0,238,133,12,1,227,204,35,0,208,115,26,1,102,8,234,0,112,88,143,1,144,249,14,0,240,158,172,254,100,112,119,0,194,141,153,254,40,56,83,255,121,176,46,0,42,53,76,255,158,191,154,0,91,209,92,0,173,13,16,1,5,72,226,255,204,254,149,0,80,184,207,0,100,9,122,254,118,101,171,255,252,203,0,254,160,207,54,0,56,72,249,1,56,140,13,255,10,64,107,254,91,101,52,255,225,181,248,1,139,255,132,0,230,145,17,0,233,56,23,0,119,1,241,255,213,169,151,255,99,99,9,254,185,15,191,255,173,103,109,1,174,13,251,255,178,88,7,254,27,59,68,255,10,33,2,255,248,97,59,0,26,30,146,1,176,147,10,0,95,121,207,1,188,88,24,0,185,94,254,254,115,55,201,0,24,50,70,0,120,53,6,0,142,66,146,0,228,226,249,255,104,192,222,1,173,68,219,0,162,184,36,255,143,102,137,255,157,11,23,0,125,45,98,0,235,93,225,254,56,112,160,255,70,116,243,1,153,249,55,255,129,39,17,1,241,80,244,0,87,69,21,1,94,228,73,255,78,66,65,255,194,227,231,0,61,146,87,255,173,155,23,255,112,116,219,254,216,38,11,255,131,186,133,0,94,212,187,0,100,47,91,0,204,254,175,255,222,18,215,254,173,68,108,255,227,228,79,255,38,221,213,0,163,227,150,254,31,190,18,0,160,179,11,1,10,90,94,255,220,174,88,0,163,211,229,255,199,136,52,0,130,95,221,255,140,188,231,254,139,113,128,255,117,171,236,254,49,220,20,255,59,20,171,255,228,109,188,0,20,225,32,254,195,16,174,0,227,254,136,1,135,39,105,0,150,77,206,255,210,238,226,0,55,212,132,254,239,57,124,0,170,194,93,255,249,16,247,255,24,151,62,255,10,151,10,0,79,139,178,255,120,242,202,0,26,219,213,0,62,125,35,255,144,2,108,255,230,33,83,255,81,45,216,1,224,62,17,0,214,217,125,0,98,153,153,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); -/* memory initializer */ allocate([179,176,106,254,131,93,138,255,109,62,36,255,178,121,32,255,120,252,70,0,220,248,37,0,204,88,103,1,128,220,251,255,236,227,7,1,106,49,198,255,60,56,107,0,99,114,238,0,220,204,94,1,73,187,1,0,89,154,34,0,78,217,165,255,14,195,249,255,9,230,253,255,205,135,245,0,26,252,7,255,84,205,27,1,134,2,112,0,37,158,32,0,231,91,237,255,191,170,204,255,152,7,222,0,109,192,49,0,193,166,146,255,232,19,181,255,105,142,52,255,103,16,27,1,253,200,165,0,195,217,4,255,52,189,144,255,123,155,160,254,87,130,54,255,78,120,61,255,14,56,41,0,25,41,125,255,87,168,245,0,214,165,70,0,212,169,6,255,219,211,194,254,72,93,164,255,197,33,103,255,43,142,141,0,131,225,172,0,244,105,28,0,68,68,225,0,136,84,13,255,130,57,40,254,139,77,56,0,84,150,53,0,54,95,157,0,144,13,177,254,95,115,186,0,117,23,118,255,244,166,241,255,11,186,135,0,178,106,203,255,97,218,93,0,43,253,45,0,164,152,4,0,139,118,239,0,96,1,24,254,235,153,211,255,168,110,20,255,50,239,176,0,114,41,232,0,193,250,53,0,254,160,111,254,136,122,41,255,97,108,67,0,215,152,23,255,140,209,212,0,42,189,163,0,202,42,50,255,106,106,189,255,190,68,217,255,233,58,117,0,229,220,243,1,197,3,4,0,37,120,54,254,4,156,134,255,36,61,171,254,165,136,100,255,212,232,14,0,90,174,10,0,216,198,65,255,12,3,64,0,116,113,115,255,248,103,8,0,231,125,18,255,160,28,197,0,30,184,35,1,223,73,249,255,123,20,46,254,135,56,37,255,173,13,229,1,119,161,34,255,245,61,73,0,205,125,112,0,137,104,134,0,217,246,30,255,237,142,143,0,65,159,102,255,108,164,190,0,219,117,173,255,34,37,120,254,200,69,80,0,31,124,218,254,74,27,160,255,186,154,199,255,71,199,252,0,104,81,159,1,17,200,39,0,211,61,192,1,26,238,91,0,148,217,12,0,59,91,213,255,11,81,183,255,129,230,122,255,114,203,145,1,119,180,66,255,72,138,180,0,224,149,106,0,119,82,104,255,208,140,43,0,98,9,182,255,205,101,134,255,18,101,38,0,95,197,166,255,203,241,147,0,62,208,145,255,133,246,251,0,2,169,14,0,13,247,184,0,142,7,254,0,36,200,23,255,88,205,223,0,91,129,52,255,21,186,30,0,143,228,210,1,247,234,248,255,230,69,31,254,176,186,135,255,238,205,52,1,139,79,43,0,17,176,217,254,32,243,67,0,242,111,233,0,44,35,9,255,227,114,81,1,4,71,12,255,38,105,191,0,7,117,50,255,81,79,16,0,63,68,65,255,157,36,110,255,77,241,3,255,226,45,251,1,142,25,206,0,120,123,209,1,28,254,238,255,5,128,126,255,91,222,215,255,162,15,191,0,86,240,73,0,135,185,81,254,44,241,163,0,212,219,210,255,112,162,155,0,207,101,118,0,168,72,56,255,196,5,52,0,72,172,242,255,126,22,157,255,146,96,59,255,162,121,152,254,140,16,95,0,195,254,200,254,82,150,162,0,119,43,145,254,204,172,78,255,166,224,159,0,104,19,237,255,245,126,208,255,226,59,213,0,117,217,197,0,152,72,237,0,220,31,23,254,14,90,231,255,188,212,64,1,60,101,246,255,85,24,86,0,1,177,109,0,146,83,32,1,75,182,192,0,119,241,224,0,185,237,27,255,184,101,82,1,235,37,77,255,253,134,19,0,232,246,122,0,60,106,179,0,195,11,12,0,109,66,235,1,125,113,59,0,61,40,164,0,175,104,240,0,2,47,187,255,50,12,141,0,194,139,181,255,135,250,104,0,97,92,222,255,217,149,201,255,203,241,118,255,79,151,67,0,122,142,218,255,149,245,239,0,138,42,200,254,80,37,97,255,124,112,167,255,36,138,87,255,130,29,147,255,241,87,78,255,204,97,19,1,177,209,22,255,247,227,127,254,99,119,83,255,212,25,198,1,16,179,179,0,145,77,172,254,89,153,14,255,218,189,167,0,107,233,59,255,35,33,243,254,44,112,112,255,161,127,79,1,204,175,10,0,40,21,138,254,104,116,228,0,199,95,137,255,133,190,168,255,146,165,234,1,183,99,39,0,183,220,54,254,255,222,133,0,162,219,121,254,63,239,6,0,225,102,54,255,251,18,246,0,4,34,129,1,135,36,131,0,206,50,59,1,15,97,183,0,171,216,135,255,101,152,43,255,150,251,91,0,38,145,95,0,34,204,38,254,178,140,83,255,25,129,243,255,76,144,37,0,106,36,26,254,118,144,172,255,68,186,229,255,107,161,213,255,46,163,68,255,149,170,253,0,187,17,15,0,218,160,165,255,171,35,246,1,96,13,19,0,165,203,117,0,214,107,192,255,244,123,177,1,100,3,104,0,178,242,97,255,251,76,130,255,211,77,42,1,250,79,70,255,63,244,80,1,105,101,246,0,61,136,58,1,238,91,213,0,14,59,98,255,167,84,77,0,17,132,46,254,57,175,197,255,185,62,184,0,76,64,207,0,172,175,208,254,175,74,37,0,138,27,211,254,148,125,194,0,10,89,81,0,168,203,101,255,43,213,209,1,235,245,54,0,30,35,226,255,9,126,70,0,226,125,94,254,156,117,20,255,57,248,112,1,230,48,64,255,164,92,166,1,224,214,230,255,36,120,143,0,55,8,43,255,251,1,245,1,106,98,165,0,74,107,106,254,53,4,54,255,90,178,150,1,3,120,123,255,244,5,89,1,114,250,61,255,254,153,82,1,77,15,17,0,57,238,90,1,95,223,230,0,236,52,47,254,103,148,164,255,121,207,36,1,18,16,185,255,75,20,74,0,187,11,101,0,46,48,129,255,22,239,210,255,77,236,129,255,111,77,204,255,61,72,97,255,199,217,251,255,42,215,204,0,133,145,201,255,57,230,146,1,235,100,198,0,146,73,35,254,108,198,20,255,182,79,210,255,82,103,136,0,246,108,176,0,34,17,60,255,19,74,114,254,168,170,78,255,157,239,20,255,149,41,168,0,58,121,28,0,79,179,134,255,231,121,135,255,174,209,98,255,243,122,190,0,171,166,205,0,212,116,48,0,29,108,66,255,162,222,182,1,14,119,21,0,213,39,249,255,254,223,228,255,183,165,198,0,133,190,48,0,124,208,109,255,119,175,85,255,9,209,121,1,48,171,189,255,195,71,134,1,136,219,51,255,182,91,141,254,49,159,72,0,35,118,245,255,112,186,227,255,59,137,31,0,137,44,163,0,114,103,60,254,8,213,150,0,162,10,113,255,194,104,72,0,220,131,116,255,178,79,92,0,203,250,213,254,93,193,189,255,130,255,34,254,212,188,151,0,136,17,20,255,20,101,83,255,212,206,166,0,229,238,73,255,151,74,3,255,168,87,215,0,155,188,133,255,166,129,73,0,240,79,133,255,178,211,81,255,203,72,163,254,193,168,165,0,14,164,199,254,30,255,204,0,65,72,91,1,166,74,102,255,200,42,0,255,194,113,227,255,66,23,208,0,229,216,100,255,24,239,26,0,10,233,62,255,123,10,178,1,26,36,174,255,119,219,199,1,45,163,190,0,16,168,42,0,166,57,198,255,28,26,26,0,126,165,231,0,251,108,100,255,61,229,121,255,58,118,138,0,76,207,17,0,13,34,112,254,89,16,168,0,37,208,105,255,35,201,215,255,40,106,101,254,6,239,114,0,40,103,226,254,246,127,110,255,63,167,58,0,132,240,142,0,5,158,88,255,129,73,158,255,94,89,146,0,230,54,146,0,8,45,173,0,79,169,1,0,115,186,247,0,84,64,131,0,67,224,253,255,207,189,64,0,154,28,81,1,45,184,54,255,87,212,224,255,0,96,73,255,129,33,235,1,52,66,80,255,251,174,155,255,4,179,37,0,234,164,93,254,93,175,253,0,198,69,87,255,224,106,46,0,99,29,210,0,62,188,114,255,44,234,8,0,169,175,247,255,23,109,137,255,229,182,39,0,192,165,94,254,245,101,217,0,191,88,96,0,196,94,99,255,106,238,11,254,53,126,243,0,94,1,101,255,46,147,2,0,201,124,124,255,141,12,218,0,13,166,157,1,48,251,237,255,155,250,124,255,106,148,146,255,182,13,202,0,28,61,167,0,217,152,8,254,220,130,45,255,200,230,255,1,55,65,87,255,93,191,97,254,114,251,14,0,32,105,92,1,26,207,141,0,24,207,13,254,21,50,48,255,186,148,116,255,211,43,225,0,37,34,162,254,164,210,42,255,68,23,96,255,182,214,8,255,245,117,137,255,66,195,50,0,75,12,83,254,80,140,164,0,9,165,36,1,228,110,227,0,241,17,90,1,25,52,212,0,6,223,12,255,139,243,57,0,12,113,75,1,246,183,191,255,213,191,69,255,230,15,142,0,1,195,196,255,138,171,47,255,64,63,106,1,16,169,214,255,207,174,56,1,88,73,133,255,182,133,140,0,177,14,25,255,147,184,53,255,10,227,161,255,120,216,244,255,73,77,233,0,157,238,139,1,59,65,233,0,70,251,216,1,41,184,153,255,32,203,112,0,146,147,253,0,87,101,109,1,44,82,133,255,244,150,53,255,94,152,232,255,59,93,39,255,88,147,220,255,78,81,13,1,32,47,252,255,160,19,114,255,93,107,39,255,118,16,211,1,185,119,209,255,227,219,127,254,88,105,236,255,162,110,23,255,36,166,110,255,91,236,221,255,66,234,116,0,111,19,244,254,10,233,26,0,32,183,6,254,2,191,242,0,218,156,53,254,41,60,70,255,168,236,111,0,121,185,126,255,238,142,207,255,55,126,52,0,220,129,208,254,80,204,164,255,67,23,144,254,218,40,108,255,127,202,164,0,203,33,3,255,2,158,0,0,37,96,188,255,192,49,74,0,109,4,0,0,111,167,10,254,91,218,135,255,203,66,173,255,150,194,226,0,201,253,6,255,174,102,121,0,205,191,110,0,53,194,4,0,81,40,45,254,35,102,143,255,12,108,198,255,16,27,232,255,252,71,186,1,176,110,114,0,142,3,117,1,113,77,142,0,19,156,197,1,92,47,252,0,53,232,22,1,54,18,235,0,46,35,189,255,236,212,129,0,2,96,208,254,200,238,199,255,59,175,164,255,146,43,231,0,194,217,52,255,3,223,12,0,138,54,178,254,85,235,207,0,232,207,34,0,49,52,50,255,166,113,89,255,10,45,216,255,62,173,28,0,111,165,246,0,118,115,91,255,128,84,60,0,167,144,203,0,87,13,243,0,22,30,228,1,177,113,146,255,129,170,230,254,252,153,129,255,145,225,43,0,70,231,5,255,122,105,126,254,86,246,148,255,110,37,154,254,209,3,91,0,68,145,62,0,228,16,165,255,55,221,249,254,178,210,91,0,83,146,226,254,69,146,186,0,93,210,104,254,16,25,173,0,231,186,38,0,189,122,140,255,251,13,112,255,105,110,93,0,251,72,170,0,192,23,223,255,24,3,202,1,225,93,228,0,153,147,199,254,109,170,22,0,248,101,246,255,178,124,12,255,178,254,102,254,55,4,65,0,125,214,180,0,183,96,147,0,45,117,23,254,132,191,249,0,143,176,203,254,136,183,54,255,146,234,177,0,146,101,86,255,44,123,143,1,33,209,152,0,192,90,41,254,83,15,125,255,213,172,82,0,215,169,144,0,16,13,34,0,32,209,100,255,84,18,249,1,197,17,236,255,217,186,230,0,49,160,176,255,111,118,97,255,237,104,235,0,79,59,92,254,69,249,11,255,35,172,74,1,19,118,68,0,222,124,165,255,180,66,35,255,86,174,246,0,43,74,111,255,126,144,86,255,228,234,91,0,242,213,24,254,69,44,235,255,220,180,35,0,8,248,7,255,102,47,92,255,240,205,102,255,113,230,171,1,31,185,201,255,194,246,70,255,122,17,187,0,134,70,199,255,149,3,150,255,117,63,103,0,65,104,123,255,212,54,19,1,6,141,88,0,83,134,243,255,136,53,103,0,169,27,180,0,177,49,24,0,111,54,167,0,195,61,215,255,31,1,108,1,60,42,70,0,185,3,162,255,194,149,40,255,246,127,38,254,190,119,38,255,61,119,8,1,96,161,219,255,42,203,221,1,177,242,164,255,245,159,10,0,116,196,0,0,5,93,205,254,128,127,179,0,125,237,246,255,149,162,217,255,87,37,20,254,140,238,192,0,9,9,193,0,97,1,226,0,29,38,10,0,0,136,63,255,229,72,210,254,38,134,92,255,78,218,208,1,104,36,84,255,12,5,193,255,242,175,61,255,191,169,46,1,179,147,147,255,113,190,139,254,125,172,31,0,3,75,252,254,215,36,15,0,193,27,24,1,255,69,149,255,110,129,118,0,203,93,249,0,138,137,64,254,38,70,6,0,153,116,222,0,161,74,123,0,193,99,79,255,118,59,94,255,61,12,43,1,146,177,157,0,46,147,191,0,16,255,38,0,11,51,31,1,60,58,98,255,111,194,77,1,154,91,244,0,140,40,144,1,173,10,251,0,203,209,50,254,108,130,78,0,228,180,90,0,174,7,250,0,31,174,60,0,41,171,30,0,116,99,82,255,118,193,139,255,187,173,198,254,218,111,56,0,185,123,216,0,249,158,52,0,52,180,93,255,201,9,91,255,56,45,166,254,132,155,203,255,58,232,110,0,52,211,89,255,253,0,162,1,9,87,183,0,145,136,44,1,94,122,245,0,85,188,171,1,147,92,198,0,0,8,104,0,30,95,174,0,221,230,52,1,247,247,235,255,137,174,53,255,35,21,204,255,71,227,214,1,232,82,194,0,11,48,227,255,170,73,184,255,198,251,252,254,44,112,34,0,131,101,131,255,72,168,187,0,132,135,125,255,138,104,97,255,238,184,168,255,243,104,84,255,135,216,226,255,139,144,237,0,188,137,150,1,80,56,140,255,86,169,167,255,194,78,25,255,220,17,180,255,17,13,193,0,117,137,212,255,141,224,151,0,49,244,175,0,193,99,175,255,19,99,154,1,255,65,62,255,156,210,55,255,242,244,3,255,250,14,149,0,158,88,217,255,157,207,134,254,251,232,28,0,46,156,251,255,171,56,184,255,239,51,234,0,142,138,131,255,25,254,243,1,10,201,194,0,63,97,75,0,210,239,162,0,192,200,31,1,117,214,243,0,24,71,222,254,54,40,232,255,76,183,111,254,144,14,87,255,214,79,136,255,216,196,212,0,132,27,140,254,131,5,253,0,124,108,19,255,28,215,75,0,76,222,55,254,233,182,63,0,68,171,191,254,52,111,222,255,10,105,77,255,80,170,235,0,143,24,88,255,45,231,121,0,148,129,224,1,61,246,84,0,253,46,219,255,239,76,33,0,49,148,18,254,230,37,69,0,67,134,22,254,142,155,94,0,31,157,211,254,213,42,30,255,4,228,247,254,252,176,13,255,39,0,31,254,241,244,255,255,170,45,10,254,253,222,249,0,222,114,132,0,255,47,6,255,180,163,179,1,84,94,151,255,89,209,82,254,229,52,169,255,213,236,0,1,214,56,228,255,135,119,151,255,112,201,193,0,83,160,53,254,6,151,66,0,18,162,17,0,233,97,91,0,131,5,78,1,181,120,53,255,117,95,63,255,237,117,185,0,191,126,136,255,144,119,233,0,183,57,97,1,47,201,187,255,167,165,119,1,45,100,126,0,21,98,6,254,145,150,95,255,120,54,152,0,209,98,104,0,143,111,30,254,184,148,249,0,235,216,46,0,248,202,148,255,57,95,22,0,242,225,163,0,233,247,232,255,71,171,19,255,103,244,49,255,84,103,93,255,68,121,244,1,82,224,13,0,41,79,43,255,249,206,167,255,215,52,21,254,192,32,22,255,247,111,60,0,101,74,38,255,22,91,84,254,29,28,13,255,198,231,215,254,244,154,200,0,223,137,237,0,211,132,14,0,95,64,206,255,17,62,247,255,233,131,121,1,93,23,77,0,205,204,52,254,81,189,136,0,180,219,138,1,143,18,94,0,204,43,140,254,188,175,219,0,111,98,143,255,151,63,162,255,211,50,71,254,19,146,53,0,146,45,83,254,178,82,238,255,16,133,84,255,226,198,93,255,201,97,20,255,120,118,35,255,114,50,231,255,162,229,156,255,211,26,12,0,114,39,115,255,206,212,134,0,197,217,160,255,116,129,94,254,199,215,219,255,75,223,249,1,253,116,181,255,232,215,104,255,228,130,246,255,185,117,86,0,14,5,8,0,239,29,61,1,237,87,133,255,125,146,137,254,204,168,223,0,46,168,245,0,154,105,22,0,220,212,161,255,107,69,24,255,137,218,181,255,241,84,198,255,130,122,211,255,141,8,153,255,190,177,118,0,96,89,178,0,255,16,48,254,122,96,105,255,117,54,232,255,34,126,105,255,204,67,166,0,232,52,138,255,211,147,12,0,25,54,7,0,44,15,215,254,51,236,45,0,190,68,129,1,106,147,225,0,28,93,45,254,236,141,15,255,17,61,161,0,220,115,192,0,236,145,24,254,111,168,169,0,224,58,63,255,127,164,188,0,82,234,75,1,224,158,134,0,209,68,110,1,217,166,217,0,70,225,166,1,187,193,143,255,16,7,88,255,10,205,140,0,117,192,156,1,17,56,38,0,27,124,108,1,171,215,55,255,95,253,212,0,155,135,168,255,246,178,153,254,154,68,74,0,232,61,96,254,105,132,59,0,33,76,199,1,189,176,130,255,9,104,25,254,75,198,102,255,233,1,112,0,108,220,20,255,114,230,70,0,140,194,133,255,57,158,164,254,146,6,80,255,169,196,97,1,85,183,130,0,70,158,222,1,59,237,234,255,96,25,26,255,232,175,97,255,11,121,248,254,88,35,194,0,219,180,252,254,74,8,227,0,195,227,73,1,184,110,161,255,49,233,164,1,128,53,47,0,82,14,121,255,193,190,58,0,48,174,117,255,132,23,32,0,40,10,134,1,22,51,25,255,240,11,176,255,110,57,146,0,117,143,239,1,157,101,118,255,54,84,76,0,205,184,18,255,47,4,72,255,78,112,85,255,193,50,66,1,93,16,52,255,8,105,134,0,12,109,72,255,58,156,251,0,144,35,204,0,44,160,117,254,50,107,194,0,1,68,165,255,111,110,162,0,158,83,40,254,76,214,234,0,58,216,205,255,171,96,147,255,40,227,114,1,176,227,241,0,70,249,183,1,136,84,139,255,60,122,247,254,143,9,117,255,177,174,137,254,73,247,143,0,236,185,126,255,62,25,247,255,45,64,56,255,161,244,6,0,34,57,56,1,105,202,83,0,128,147,208,0,6,103,10,255,74,138,65,255,97,80,100,255,214,174,33,255,50,134,74,255,110,151,130,254,111,84,172,0,84,199,75,254,248,59,112,255,8,216,178,1,9,183,95,0,238,27,8,254,170,205,220,0,195,229,135,0,98,76,237,255,226,91,26,1,82,219,39,255,225,190,199,1,217,200,121,255,81,179,8,255,140,65,206,0,178,207,87,254,250,252,46,255,104,89,110,1,253,189,158,255,144,214,158,255,160,245,54,255,53,183,92,1,21,200,194,255,146,33,113,1,209,1,255,0,235,106,43,255,167,52,232,0,157,229,221,0,51,30,25,0,250,221,27,1,65,147,87,255,79,123,196,0,65,196,223,255,76,44,17,1,85,241,68,0,202,183,249,255,65,212,212,255,9,33,154,1,71,59,80,0,175,194,59,255,141,72,9,0,100,160,244,0,230,208,56,0,59,25,75,254,80,194,194,0,18,3,200,254,160,159,115,0,132,143,247,1,111,93,57,255,58,237,11,1,134,222,135,255,122,163,108,1,123,43,190,255,251,189,206,254,80,182,72,255,208,246,224,1,17,60,9,0,161,207,38,0,141,109,91,0,216,15,211,255,136,78,110,0,98,163,104,255,21,80,121,255,173,178,183,1,127,143,4,0,104,60,82,254,214,16,13,255,96,238,33,1,158,148,230,255,127,129,62,255,51,255,210,255,62,141,236,254,157,55,224,255,114,39,244,0,192,188,250,255,228,76,53,0,98,84,81,255,173,203,61,254,147,50,55,255,204,235,191,0,52,197,244,0,88,43,211,254,27,191,119,0,188,231,154,0,66,81,161,0,92,193,160,1,250,227,120,0,123,55,226,0,184,17,72,0,133,168,10,254,22,135,156,255,41,25,103,255,48,202,58,0,186,149,81,255,188,134,239,0,235,181,189,254,217,139,188,255,74,48,82,0,46,218,229,0,189,253,251,0,50,229,12,255,211,141,191,1,128,244,25,255,169,231,122,254,86,47,189,255,132,183,23,255,37,178,150,255,51,137,253,0,200,78,31,0,22,105,50,0,130,60,0,0,132,163,91,254,23,231,187,0,192,79,239,0,157,102,164,255,192,82,20,1,24,181,103,255,240,9,234,0,1,123,164,255,133,233,0,255,202,242,242,0,60,186,245,0,241,16,199,255,224,116,158,254,191,125,91,255,224,86,207,0,121,37,231,255,227,9,198,255,15,153,239,255,121,232,217,254,75,112,82,0,95,12,57,254,51,214,105,255,148,220,97,1,199,98,36,0,156,209,12,254,10,212,52,0,217,180,55,254,212,170,232,255,216,20,84,255,157,250,135,0,157,99,127,254,1,206,41,0,149,36,70,1,54,196,201,255,87,116,0,254,235,171,150,0,27,163,234,0,202,135,180,0,208,95,0,254,123,156,93,0,183,62,75,0,137,235,182,0,204,225,255,255,214,139,210,255,2,115,8,255,29,12,111,0,52,156,1,0,253,21,251,255,37,165,31,254,12,130,211,0,106,18,53,254,42,99,154,0,14,217,61,254,216,11,92,255,200,197,112,254,147,38,199,0,36,252,120,254,107,169,77,0,1,123,159,255,207,75,102,0,163,175,196,0,44,1,240,0,120,186,176,254,13,98,76,255,237,124,241,255,232,146,188,255,200,96,224,0,204,31,41,0,208,200,13,0,21,225,96,255,175,156,196,0,247,208,126,0,62,184,244,254,2,171,81,0,85,115,158,0,54,64,45,255,19,138,114,0,135,71,205,0,227,47,147,1,218,231,66,0,253,209,28,0,244,15,173,255,6,15,118,254,16,150,208,255,185,22,50,255,86,112,207,255,75,113,215,1,63,146,43,255,4,225,19,254,227,23,62,255,14,255,214,254,45,8,205,255,87,197,151,254,210,82,215,255,245,248,247,255,128,248,70,0,225,247,87,0,90,120,70,0,213,245,92,0,13,133,226,0,47,181,5,1,92,163,105,255,6,30,133,254,232,178,61,255,230,149,24,255,18,49,158,0,228,100,61,254,116,243,251,255,77,75,92,1,81,219,147,255,76,163,254,254,141,213,246,0,232,37,152,254,97,44,100,0,201,37,50,1,212,244,57,0,174,171,183,255,249,74,112,0,166,156,30,0,222,221,97,255,243,93,73,254,251,101,100,255,216,217,93,255,254,138,187,255,142,190,52,255,59,203,177,255,200,94,52,0,115,114,158,255,165,152,104,1,126,99,226,255,118,157,244,1,107,200,16,0,193,90,229,0,121,6,88,0,156,32,93,254,125,241,211,255,14,237,157,255,165,154,21,255,184,224,22,255,250,24,152,255,113,77,31,0,247,171,23,255,237,177,204,255,52,137,145,255,194,182,114,0,224,234,149,0,10,111,103,1,201,129,4,0,238,142,78,0,52,6,40,255,110,213,165,254,60,207,253,0,62,215,69,0,96,97,0,255,49,45,202,0,120,121,22,255,235,139,48,1,198,45,34,255,182,50,27,1,131,210,91,255,46,54,128,0,175,123,105,255,198,141,78,254,67,244,239,255,245,54,103,254,78,38,242,255,2,92,249,254,251,174,87,255,139,63,144,0,24,108,27,255,34,102,18,1,34,22,152,0,66,229,118,254,50,143,99,0,144,169,149,1,118,30,152,0,178,8,121,1,8,159,18,0,90,101,230,255,129,29,119,0,68,36,11,1,232,183,55,0,23,255,96,255,161,41,193,255,63,139,222,0,15,179,243,0,255,100,15,255,82,53,135,0,137,57,149,1,99,240,170,255,22,230,228,254,49,180,82,255,61,82,43,0,110,245,217,0,199,125,61,0,46,253,52,0,141,197,219,0,211,159,193,0,55,121,105,254,183,20,129,0,169,119,170,255,203,178,139,255,135,40,182,255,172,13,202,255,65,178,148,0,8,207,43,0,122,53,127,1,74,161,48,0,227,214,128,254,86,11,243,255,100,86,7,1,245,68,134,255,61,43,21,1,152,84,94,255,190,60,250,254,239,118,232,255,214,136,37,1,113,76,107,255,93,104,100,1,144,206,23,255,110,150,154,1,228,103,185,0,218,49,50,254,135,77,139,255,185,1,78,0,0,161,148,255,97,29,233,255,207,148,149,255,160,168,0,0,91,128,171,255,6,28,19,254,11,111,247,0,39,187,150,255,138,232,149,0,117,62,68,255,63,216,188,255,235,234,32,254,29,57,160,255,25,12,241,1,169,60,191,0,32,131,141,255,237,159,123,255,94,197,94,254,116,254,3,255,92,179,97,254,121,97,92,255,170,112,14,0,21,149,248,0,248,227,3,0,80,96,109,0,75,192,74,1,12,90,226,255,161,106,68,1,208,114,127,255,114,42,255,254,74,26,74,255,247,179,150,254,121,140,60,0,147,70,200,255,214,40,161,255,161,188,201,255,141,65,135,255,242,115,252,0,62,47,202,0,180,149,255,254,130,55,237,0,165,17,186,255,10,169,194,0,156,109,218,255,112,140,123,255,104,128,223,254,177,142,108,255,121,37,219,255,128,77,18,255,111,108,23,1,91,192,75,0,174,245,22,255,4,236,62,255,43,64,153,1,227,173,254,0,237,122,132,1,127,89,186,255,142,82,128,254,252,84,174,0,90,179,177,1,243,214,87,255,103,60,162,255,208,130,14,255,11,130,139,0,206,129,219,255,94,217,157,255,239,230,230,255,116,115,159,254,164,107,95,0,51,218,2,1,216,125,198,255,140,202,128,254,11,95,68,255,55,9,93,254,174,153,6,255,204,172,96,0,69,160,110,0,213,38,49,254,27,80,213,0,118,125,114,0,70,70,67,255,15,142,73,255,131,122,185,255,243,20,50,254,130,237,40,0,210,159,140,1,197,151,65,255,84,153,66,0,195,126,90,0,16,238,236,1,118,187,102,255,3,24,133,255,187,69,230,0,56,197,92,1,213,69,94,255,80,138,229,1,206,7,230,0,222,111,230,1,91,233,119,255,9,89,7,1,2,98,1,0,148,74,133,255,51,246,180,255,228,177,112,1,58,189,108,255,194,203,237,254,21,209,195,0,147,10,35,1,86,157,226,0,31,163,139,254,56,7,75,255,62,90,116,0,181,60,169,0,138,162,212,254,81,167,31,0,205,90,112,255,33,112,227,0,83,151,117,1,177,224,73,255,174,144,217,255,230,204,79,255,22,77,232,255,114,78,234,0,224,57,126,254,9,49,141,0,242,147,165,1,104,182,140,255,167,132,12,1,123,68,127,0,225,87,39,1,251,108,8,0,198,193,143,1,121,135,207,255,172,22,70,0,50,68,116,255,101,175,40,255,248,105,233,0,166,203,7,0,110,197,218,0,215,254,26,254,168,226,253,0,31,143,96,0,11,103,41,0,183,129,203,254,100,247,74,255,213,126,132,0,210,147,44,0,199,234,27,1,148,47,181,0,155,91,158,1,54,105,175,255,2,78,145,254,102,154,95,0,128,207,127,254,52,124,236,255,130,84,71,0,221,243,211,0,152,170,207,0,222,106,199,0,183,84,94,254,92,200,56,255,138,182,115,1,142,96,146,0,133,136,228,0,97,18,150,0,55,251,66,0,140,102,4,0,202,103,151,0,30,19,248,255,51,184,207,0,202,198,89,0,55,197,225,254,169,95,249,255,66,65,68,255,188,234,126,0,166,223,100,1,112,239,244,0,144,23,194,0,58,39,182,0,244,44,24,254,175,68,179,255,152,118,154,1,176,162,130,0,217,114,204,254,173,126,78,255,33,222,30,255,36,2,91,255,2,143,243,0,9,235,215,0,3,171,151,1,24,215,245,255,168,47,164,254,241,146,207,0,69,129,180,0,68,243,113,0,144,53,72,254,251,45,14,0,23,110,168,0,68,68,79,255,110,70,95,254,174,91,144,255,33,206,95,255,137,41,7,255,19,187,153,254,35,255,112,255,9,145,185,254,50,157,37,0,11,112,49,1,102,8,190,255,234,243,169,1,60,85,23,0,74,39,189,0,116,49,239,0,173,213,210,0,46,161,108,255,159,150,37,0,196,120,185,255,34,98,6,255,153,195,62,255,97,230,71,255,102,61,76,0,26,212,236,255,164,97,16,0,198,59,146,0,163,23,196,0,56,24,61,0,181,98,193,0,251,147,229,255,98,189,24,255,46,54,206,255,234,82,246,0,183,103,38,1,109,62,204,0,10,240,224,0,146,22,117,255,142,154,120,0,69,212,35,0,208,99,118,1,121,255,3,255,72,6,194,0,117,17,197,255,125,15,23,0,154,79,153,0,214,94,197,255,185,55,147,255,62,254,78,254,127,82,153,0,110,102,63,255,108,82,161,255,105,187,212,1,80,138,39,0,60,255,93,255,72,12,186,0,210,251,31,1,190,167,144,255,228,44,19,254,128,67,232,0,214,249,107,254,136,145,86,255,132,46,176,0,189,187,227,255,208,22,140,0,217,211,116,0,50,81,186,254,139,250,31,0,30,64,198,1,135,155,100,0,160,206,23,254,187,162,211,255,16,188,63,0,254,208,49,0,85,84,191,0,241,192,242,255,153,126,145,1,234,162,162,255,230,97,216,1,64,135,126,0,190,148,223,1,52,0,43,255,28,39,189,1,64,136,238,0,175,196,185,0,98,226,213,255,127,159,244,1,226,175,60,0,160,233,142,1,180,243,207,255,69,152,89,1,31,101,21,0,144,25,164,254,139,191,209,0,91,25,121,0,32,147,5,0,39,186,123,255,63,115,230,255,93,167,198,255,143,213,220,255,179,156,19,255,25,66,122,0,214,160,217,255,2,45,62,255,106,79,146,254,51,137,99,255,87,100,231,255,175,145,232,255,101,184,1,255,174,9,125,0,82,37,161,1,36,114,141,255,48,222,142,255,245,186,154,0,5,174,221,254,63,114,155,255,135,55,160,1,80,31,135,0,126,250,179,1,236,218,45,0,20,28,145,1,16,147,73,0,249,189,132,1,17,189,192,255,223,142,198,255,72,20,15,255,250,53,237,254,15,11,18,0,27,211,113,254,213,107,56,255,174,147,146,255,96,126,48,0,23,193,109,1,37,162,94,0,199,157,249,254,24,128,187,255,205,49,178,254,93,164,42,255,43,119,235,1,88,183,237,255,218,210,1,255,107,254,42,0,230,10,99,255,162,0,226,0,219,237,91,0,129,178,203,0,208,50,95,254,206,208,95,255,247,191,89,254,110,234,79,255,165,61,243,0,20,122,112,255,246,246,185,254,103,4,123,0,233,99,230,1,219,91,252,255,199,222,22,255,179,245,233,255,211,241,234,0,111,250,192,255,85,84,136,0,101,58,50,255,131,173,156,254,119,45,51,255,118,233,16,254,242,90,214,0,94,159,219,1,3,3,234,255,98,76,92,254,80,54,230,0,5,228,231,254,53,24,223,255,113,56,118,1,20,132,1,255,171,210,236,0,56,241,158,255,186,115,19,255,8,229,174,0,48,44,0,1,114,114,166,255,6,73,226,255,205,89,244,0,137,227,75,1,248,173,56,0,74,120,246,254,119,3,11,255,81,120,198,255,136,122,98,255,146,241,221,1,109,194,78,255,223,241,70,1,214,200,169,255,97,190,47,255,47,103,174,255,99,92,72,254,118,233,180,255,193,35,233,254,26,229,32,255,222,252,198,0,204,43,71,255,199,84,172,0,134,102,190,0,111,238,97,254,230,40,230,0,227,205,64,254,200,12,225,0,166,25,222,0,113,69,51,255,143,159,24,0,167,184,74,0,29,224,116,254,158,208,233,0,193,116,126,255,212,11,133,255,22,58,140,1,204,36,51,255,232,30,43,0,235,70,181,255,64,56,146,254,169,18,84,255,226,1,13,255,200,50,176,255,52,213,245,254,168,209,97,0,191,71,55,0,34,78,156,0,232,144,58,1,185,74,189,0,186,142,149,254,64,69,127,255,161,203,147,255,176,151,191,0,136,231,203,254,163,182,137,0,161,126,251,254,233,32,66,0,68,207,66,0,30,28,37,0,93,114,96,1,254,92,247,255,44,171,69,0,202,119,11,255,188,118,50,1,255,83,136,255,71,82,26,0,70,227,2,0,32,235,121,1,181,41,154,0,71,134,229,254,202,255,36,0,41,152,5,0,154,63,73,255,34,182,124,0,121,221,150,255,26,204,213,1,41,172,87,0,90,157,146,255,109,130,20,0,71,107,200,255,243,102,189,0,1,195,145,254,46,88,117,0,8,206,227,0,191,110,253,255,109,128,20,254,134,85,51,255,137,177,112,1,216,34,22,255,131,16,208,255,121,149,170,0,114,19,23,1,166,80,31,255,113,240,122,0,232,179,250,0,68,110,180,254,210,170,119,0,223,108,164,255,207,79,233,255,27,229,226,254,209,98,81,255,79,68,7,0,131,185,100,0,170,29,162,255,17,162,107,255,57,21,11,1,100,200,181,255,127,65,166,1,165,134,204,0,104,167,168,0,1,164,79,0,146,135,59,1,70,50,128,255,102,119,13,254,227,6,135,0,162,142,179,255,160,100,222,0,27,224,219,1,158,93,195,255,234,141,137,0,16,24,125,255,238,206,47,255,97,17,98,255,116,110,12,255,96,115,77,0,91,227,232,255,248,254,79,255,92,229,6,254,88,198,139,0,206,75,129,0,250,77,206,255,141,244,123,1,138,69,220,0,32,151,6,1,131,167,22,255,237,68,167,254,199,189,150,0,163,171,138,255,51,188,6,255,95,29,137,254,148,226,179,0,181,107,208,255,134,31,82,255,151,101,45,255,129,202,225,0,224,72,147,0,48,138,151,255,195,64,206,254,237,218,158,0,106,29,137,254,253,189,233,255,103,15,17,255,194,97,255,0,178,45,169,254,198,225,155,0,39,48,117,255,135,106,115,0,97,38,181,0,150,47,65,255,83,130,229,254,246,38,129,0,92,239,154,254,91,99,127,0,161,111,33,255,238,217,242,255,131,185,195,255,213,191,158,255,41,150,218,0,132,169,131,0,89,84,252,1,171,70,128,255,163,248,203,254,1,50,180,255,124,76,85,1,251,111,80,0,99,66,239,255,154,237,182,255,221,126,133,254,74,204,99,255,65,147,119,255,99,56,167,255,79,248,149,255,116,155,228,255,237,43,14,254,69,137,11,255,22,250,241,1,91,122,143,255,205,249,243,0,212,26,60,255,48,182,176,1,48,23,191,255,203,121,152,254,45,74,213,255,62,90,18,254,245,163,230,255,185,106,116,255,83,35,159,0,12,33,2,255,80,34,62,0,16,87,174,255,173,101,85,0,202,36,81,254,160,69,204,255,64,225,187,0,58,206,94,0,86,144,47,0,229,86,245,0,63,145,190,1,37,5,39,0,109,251,26,0,137,147,234,0,162,121,145,255,144,116,206,255,197,232,185,255,183,190,140,255,73,12,254,255,139,20,242,255,170,90,239,255,97,66,187,255,245,181,135,254,222,136,52,0,245,5,51,254,203,47,78,0,152,101,216,0,73,23,125,0,254,96,33,1,235,210,73,255,43,209,88,1,7,129,109,0,122,104,228,254,170,242,203,0,242,204,135,255,202,28,233,255,65,6,127,0,159,144,71,0,100,140,95,0,78,150,13,0,251,107,118,1,182,58,125,255,1,38,108,255,141,189,209,255,8,155,125,1,113,163,91,255,121,79,190,255,134,239,108,255,76,47,248,0,163,228,239,0,17,111,10,0,88,149,75,255,215,235,239,0,167,159,24,255,47,151,108,255,107,209,188,0,233,231,99,254,28,202,148,255,174,35,138,255,110,24,68,255,2,69,181,0,107,102,82,0,102,237,7,0,92,36,237,255,221,162,83,1,55,202,6,255,135,234,135,255,24,250,222,0,65,94,168,254,245,248,210,255,167,108,201,254,255,161,111,0,205,8,254,0,136,13,116,0,100,176,132,255,43,215,126,255,177,133,130,255,158,79,148,0,67,224,37,1,12,206,21,255,62,34,110,1,237,104,175,255,80,132,111,255,142,174,72,0,84,229,180,254,105,179,140,0,64,248,15,255,233,138,16,0,245,67,123,254,218,121,212,255,63,95,218,1,213,133,137,255,143,182,82,255,48,28,11,0,244,114,141,1,209,175,76,255,157,181,150,255,186,229,3,255,164,157,111,1,231,189,139,0,119,202,190,255,218,106,64,255,68,235,63,254,96,26,172,255,187,47,11,1,215,18,251,255,81,84,89,0,68,58,128,0,94,113,5,1,92,129,208,255,97,15,83,254,9,28,188,0,239,9,164,0,60,205,152,0,192,163,98,255,184,18,60,0,217,182,139,0,109,59,120,255,4,192,251,0,169,210,240,255,37,172,92,254,148,211,245,255,179,65,52,0,253,13,115,0,185,174,206,1,114,188,149,255,237,90,173,0,43,199,192,255,88,108,113,0,52,35,76,0,66,25,148,255,221,4,7,255,151,241,114,255,190,209,232,0,98,50,199,0,151,150,213,255,18,74,36,1,53,40,7,0,19,135,65,255,26,172,69,0,174,237,85,0,99,95,41,0,3,56,16,0,39,160,177,255,200,106,218,254,185,68,84,255,91,186,61,254,67,143,141,255,13,244,166,255,99,114,198,0,199,110,163,255,193,18,186,0,124,239,246,1,110,68,22,0,2,235,46,1,212,60,107,0,105,42,105,1,14,230,152,0,7,5,131,0,141,104,154,255,213,3,6,0,131,228,162,255,179,100,28,1,231,123,85,255,206,14,223,1,253,96,230,0,38,152,149,1,98,137,122,0,214,205,3,255,226,152,179,255,6,133,137,0,158,69,140,255,113,162,154,255,180,243,172,255,27,189,115,255,143,46,220,255,213,134,225,255,126,29,69,0,188,43,137,1,242,70,9,0,90,204,255,255,231,170,147,0,23,56,19,254,56,125,157,255,48,179,218,255,79,182,253,255,38,212,191,1,41,235,124,0,96,151,28,0,135,148,190,0,205,249,39,254,52,96,136,255,212,44,136,255,67,209,131,255,252,130,23,255,219,128,20,255,198,129,118,0,108,101,11,0,178,5,146,1,62,7,100,255,181,236,94,254,28,26,164,0,76,22,112,255,120,102,79,0,202,192,229,1,200,176,215,0,41,64,244,255,206,184,78,0,167,45,63,1,160,35,0,255,59,12,142,255,204,9,144,255,219,94,229,1,122,27,112,0,189,105,109,255,64,208,74,255,251,127,55,1,2,226,198,0,44,76,209,0,151,152,77,255,210,23,46,1,201,171,69,255,44,211,231,0,190,37,224,255,245,196,62,255,169,181,222,255,34,211,17,0,119,241,197,255,229,35,152,1,21,69,40,255,178,226,161,0,148,179,193,0,219,194,254,1,40,206,51,255,231,92,250,1,67,153,170,0,21,148,241,0,170,69,82,255,121,18,231,255,92,114,3,0,184,62,230,0,225,201,87,255,146,96,162,255,181,242,220,0,173,187,221,1,226,62,170,255,56,126,217,1,117,13,227,255,179,44,239,0,157,141,155,255,144,221,83,0,235,209,208,0,42,17,165,1,251,81,133,0,124,245,201,254,97,211,24,255,83,214,166,0,154,36,9,255,248,47,127,0,90,219,140,255,161,217,38,254,212,147,63,255,66,84,148,1,207,3,1,0,230,134,89,1,127,78,122,255,224,155,1,255,82,136,74,0,178,156,208,255,186,25,49,255,222,3,210,1,229,150,190,255,85,162,52,255,41,84,141,255,73,123,84,254,93,17,150,0,119,19,28,1,32,22,215,255,28,23,204,255,142,241,52,255,228,52,125,0,29,76,207,0,215,167,250,254,175,164,230,0,55,207,105,1,109,187,245,255,161,44,220,1,41,101,128,255,167,16,94,0,93,214,107,255,118,72,0,254,80,61,234,255,121,175,125,0,139,169,251,0,97,39,147,254,250,196,49,255,165,179,110,254,223,70,187,255,22,142,125,1,154,179,138,255,118,176,42,1,10,174,153,0,156,92,102,0,168,13,161,255,143,16,32,0,250,197,180,255,203,163,44,1,87,32,36,0,161,153,20,255,123,252,15,0,25,227,80,0,60,88,142,0,17,22,201,1,154,205,77,255,39,63,47,0,8,122,141,0,128,23,182,254,204,39,19,255,4,112,29,255,23,36,140,255,210,234,116,254,53,50,63,255,121,171,104,255,160,219,94,0,87,82,14,254,231,42,5,0,165,139,127,254,86,78,38,0,130,60,66,254,203,30,45,255,46,196,122,1,249,53,162,255,136,143,103,254,215,210,114,0,231,7,160,254,169,152,42,255,111,45,246,0,142,131,135,255,131,71,204,255,36,226,11,0,0,28,242,255,225,138,213,255,247,46,216,254,245,3,183,0,108,252,74,1,206,26,48,255,205,54,246,255,211,198,36,255,121,35,50,0,52,216,202,255,38,139,129,254,242,73,148,0,67,231,141,255,42,47,204,0,78,116,25,1,4,225,191,255,6,147,228,0,58,88,177,0,122,165,229,255,252,83,201,255,224,167,96,1,177,184,158,255,242,105,179,1,248,198,240,0,133,66,203,1,254,36,47,0,45,24,115,255,119,62,254,0,196,225,186,254,123,141,172,0,26,85,41,255,226,111,183,0,213,231,151,0,4,59,7,255,238,138,148,0,66,147,33,255,31,246,141,255,209,141,116,255,104,112,31,0,88,161,172,0,83,215,230,254,47,111,151,0,45,38,52,1,132,45,204,0,138,128,109,254,233,117,134,255,243,190,173,254,241,236,240,0,82,127,236,254,40,223,161,255,110,182,225,255,123,174,239,0,135,242,145,1,51,209,154,0,150,3,115,254,217,164,252,255,55,156,69,1,84,94,255,255,232,73,45,1,20,19,212,255,96,197,59,254,96,251,33,0,38,199,73,1,64,172,247,255,117,116,56,255,228,17,18,0,62,138,103,1,246,229,164,255,244,118,201,254,86,32,159,255,109,34,137,1,85,211,186,0,10,193,193,254,122,194,177,0,122,238,102,255,162,218,171,0,108,217,161,1,158,170,34,0,176,47,155,1,181,228,11,255,8,156,0,0,16,75,93,0,206,98,255,1,58,154,35,0,12,243,184,254,67,117,66,255,230,229,123,0,201,42,110,0,134,228,178,254,186,108,118,255,58,19,154,255,82,169,62,255,114,143,115,1,239,196,50,255,173,48,193,255,147,2,84,255,150,134,147,254,95,232,73,0,109,227,52,254,191,137,10,0,40,204,30,254,76,52,97,255,164,235,126,0,254,124,188,0,74,182,21,1,121,29,35,255,241,30,7,254,85,218,214,255,7,84,150,254,81,27,117,255,160,159,152,254,66,24,221,255,227,10,60,1,141,135,102,0,208,189,150,1,117,179,92,0,132,22,136,255,120,199,28,0,21,129,79,254,182,9,65,0,218,163,169,0,246,147,198,255,107,38,144,1,78,175,205,255,214,5,250,254,47,88,29,255,164,47,204,255,43,55,6,255,131,134,207,254,116,100,214,0,96,140,75,1,106,220,144,0,195,32,28,1,172,81,5,255,199,179,52,255,37,84,203,0,170,112,174,0,11,4,91,0,69,244,27,1,117,131,92,0,33,152,175,255,140,153,107,255,251,135,43,254,87,138,4,255,198,234,147,254,121,152,84,255,205,101,155,1,157,9,25,0,72,106,17,254,108,153,0,255,189,229,186,0,193,8,176,255,174,149,209,0,238,130,29,0,233,214,126,1,61,226,102,0,57,163,4,1,198,111,51,255,45,79,78,1,115,210,10,255,218,9,25,255,158,139,198,255,211,82,187,254,80,133,83,0,157,129,230,1,243,133,134,255,40,136,16,0,77,107,79,255,183,85,92,1,177,204,202,0,163,71,147,255,152,69,190,0,172,51,188,1,250,210,172,255,211,242,113,1,89,89,26,255,64,66,111,254,116,152,42,0,161,39,27,255,54,80,254,0,106,209,115,1,103,124,97,0,221,230,98,255,31,231,6,0,178,192,120,254,15,217,203,255,124,158,79,0,112,145,247,0,92,250,48,1,163,181,193,255,37,47,142,254,144,189,165,255,46,146,240,0,6,75,128,0,41,157,200,254,87,121,213,0,1,113,236,0,5,45,250,0,144,12,82,0,31,108,231,0,225,239,119,255,167,7,189,255,187,228,132,255,110,189,34,0,94,44,204,1,162,52,197,0,78,188,241,254,57,20,141,0,244,146,47,1,206,100,51,0,125,107,148,254,27,195,77,0,152,253,90,1,7,143,144,255,51,37,31,0,34,119,38,255,7,197,118,0,153,188,211,0,151,20,116,254,245,65,52,255,180,253,110,1,47,177,209,0,161,99,17,255,118,222,202,0,125,179,252,1,123,54,126,255,145,57,191,0,55,186,121,0,10,243,138,0,205,211,229,255,125,156,241,254,148,156,185,255,227,19,188,255,124,41,32,255,31,34,206,254,17,57,83,0,204,22,37,255,42,96,98,0,119,102,184,1,3,190,28,0,110,82,218,255,200,204,192,255,201,145,118,0,117,204,146,0,132,32,98,1,192,194,121,0,106,161,248,1,237,88,124,0,23,212,26,0,205,171,90,255,248,48,216,1,141,37,230,255,124,203,0,254,158,168,30,255,214,248,21,0,112,187,7,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+20480); -/* memory initializer */ allocate([75,133,239,255,74,227,243,255,250,147,70,0,214,120,162,0,167,9,179,255,22,158,18,0,218,77,209,1,97,109,81,255,244,33,179,255,57,52,57,255,65,172,210,255,249,71,209,255,142,169,238,0,158,189,153,255,174,254,103,254,98,33,14,0,141,76,230,255,113,139,52,255,15,58,212,0,168,215,201,255,248,204,215,1,223,68,160,255,57,154,183,254,47,231,121,0,106,166,137,0,81,136,138,0,165,43,51,0,231,139,61,0,57,95,59,254,118,98,25,255,151,63,236,1,94,190,250,255,169,185,114,1,5,250,58,255,75,105,97,1,215,223,134,0,113,99,163,1,128,62,112,0,99,106,147,0,163,195,10,0,33,205,182,0,214,14,174,255,129,38,231,255,53,182,223,0,98,42,159,255,247,13,40,0,188,210,177,1,6,21,0,255,255,61,148,254,137,45,129,255,89,26,116,254,126,38,114,0,251,50,242,254,121,134,128,255,204,249,167,254,165,235,215,0,202,177,243,0,133,141,62,0,240,130,190,1,110,175,255,0,0,20,146,1,37,210,121,255,7,39,130,0,142,250,84,255,141,200,207,0,9,95,104,255,11,244,174,0,134,232,126,0,167,1,123,254,16,193,149,255,232,233,239,1,213,70,112,255,252,116,160,254,242,222,220,255,205,85,227,0,7,185,58,0,118,247,63,1,116,77,177,255,62,245,200,254,63,18,37,255,107,53,232,254,50,221,211,0,162,219,7,254,2,94,43,0,182,62,182,254,160,78,200,255,135,140,170,0,235,184,228,0,175,53,138,254,80,58,77,255,152,201,2,1,63,196,34,0,5,30,184,0,171,176,154,0,121,59,206,0,38,99,39,0,172,80,77,254,0,134,151,0,186,33,241,254,94,253,223,255,44,114,252,0,108,126,57,255,201,40,13,255,39,229,27,255,39,239,23,1,151,121,51,255,153,150,248,0,10,234,174,255,118,246,4,254,200,245,38,0,69,161,242,1,16,178,150,0,113,56,130,0,171,31,105,0,26,88,108,255,49,42,106,0,251,169,66,0,69,93,149,0,20,57,254,0,164,25,111,0,90,188,90,255,204,4,197,0,40,213,50,1,212,96,132,255,88,138,180,254,228,146,124,255,184,246,247,0,65,117,86,255,253,102,210,254,254,121,36,0,137,115,3,255,60,24,216,0,134,18,29,0,59,226,97,0,176,142,71,0,7,209,161,0,189,84,51,254,155,250,72,0,213,84,235,255,45,222,224,0,238,148,143,255,170,42,53,255,78,167,117,0,186,0,40,255,125,177,103,255,69,225,66,0,227,7,88,1,75,172,6,0,169,45,227,1,16,36,70,255,50,2,9,255,139,193,22,0,143,183,231,254,218,69,50,0,236,56,161,1,213,131,42,0,138,145,44,254,136,229,40,255,49,63,35,255,61,145,245,255,101,192,2,254,232,167,113,0,152,104,38,1,121,185,218,0,121,139,211,254,119,240,35,0,65,189,217,254,187,179,162,255,160,187,230,0,62,248,14,255,60,78,97,0,255,247,163,255,225,59,91,255,107,71,58,255,241,47,33,1,50,117,236,0,219,177,63,254,244,90,179,0,35,194,215,255,189,67,50,255,23,135,129,0,104,189,37,255,185,57,194,0,35,62,231,255,220,248,108,0,12,231,178,0,143,80,91,1,131,93,101,255,144,39,2,1,255,250,178,0,5,17,236,254,139,32,46,0,204,188,38,254,245,115,52,255,191,113,73,254,191,108,69,255,22,69,245,1,23,203,178,0,170,99,170,0,65,248,111,0,37,108,153,255,64,37,69,0,0,88,62,254,89,148,144,255,191,68,224,1,241,39,53,0,41,203,237,255,145,126,194,255,221,42,253,255,25,99,151,0,97,253,223,1,74,115,49,255,6,175,72,255,59,176,203,0,124,183,249,1,228,228,99,0,129,12,207,254,168,192,195,255,204,176,16,254,152,234,171,0,77,37,85,255,33,120,135,255,142,194,227,1,31,214,58,0,213,187,125,255,232,46,60,255,190,116,42,254,151,178,19,255,51,62,237,254,204,236,193,0,194,232,60,0,172,34,157,255,189,16,184,254,103,3,95,255,141,233,36,254,41,25,11,255,21,195,166,0,118,245,45,0,67,213,149,255,159,12,18,255,187,164,227,1,160,25,5,0,12,78,195,1,43,197,225,0,48,142,41,254,196,155,60,255,223,199,18,1,145,136,156,0,252,117,169,254,145,226,238,0,239,23,107,0,109,181,188,255,230,112,49,254,73,170,237,255,231,183,227,255,80,220,20,0,194,107,127,1,127,205,101,0,46,52,197,1,210,171,36,255,88,3,90,255,56,151,141,0,96,187,255,255,42,78,200,0,254,70,70,1,244,125,168,0,204,68,138,1,124,215,70,0,102,66,200,254,17,52,228,0,117,220,143,254,203,248,123,0,56,18,174,255,186,151,164,255,51,232,208,1,160,228,43,255,249,29,25,1,68,190,63,0,8,201,188,243,103,230,9,106,59,167,202,132,133,174,103,187,43,248,148,254,114,243,110,60,241,54,29,95,58,245,79,165,209,130,230,173,127,82,14,81,31,108,62,43,140,104,5,155,107,189,65,251,171,217,131,31,121,33,126,19,25,205,224,91,34,174,40,215,152,47,138,66,205,101,239,35,145,68,55,113,47,59,77,236,207,251,192,181,188,219,137,129,165,219,181,233,56,181,72,243,91,194,86,57,25,208,5,182,241,17,241,89,155,79,25,175,164,130,63,146,24,129,109,218,213,94,28,171,66,2,3,163,152,170,7,216,190,111,112,69,1,91,131,18,140,178,228,78,190,133,49,36,226,180,255,213,195,125,12,85,111,137,123,242,116,93,190,114,177,150,22,59,254,177,222,128,53,18,199,37,167,6,220,155,148,38,105,207,116,241,155,193,210,74,241,158,193,105,155,228,227,37,79,56,134,71,190,239,181,213,140,139,198,157,193,15,101,156,172,119,204,161,12,36,117,2,43,89,111,44,233,45,131,228,166,110,170,132,116,74,212,251,65,189,220,169,176,92,181,83,17,131,218,136,249,118,171,223,102,238,82,81,62,152,16,50,180,45,109,198,49,168,63,33,251,152,200,39,3,176,228,14,239,190,199,127,89,191,194,143,168,61,243,11,224,198,37,167,10,147,71,145,167,213,111,130,3,224,81,99,202,6,112,110,14,10,103,41,41,20,252,47,210,70,133,10,183,39,38,201,38,92,56,33,27,46,237,42,196,90,252,109,44,77,223,179,149,157,19,13,56,83,222,99,175,139,84,115,10,101,168,178,119,60,187,10,106,118,230,174,237,71,46,201,194,129,59,53,130,20,133,44,114,146,100,3,241,76,161,232,191,162,1,48,66,188,75,102,26,168,145,151,248,208,112,139,75,194,48,190,84,6,163,81,108,199,24,82,239,214,25,232,146,209,16,169,101,85,36,6,153,214,42,32,113,87,133,53,14,244,184,209,187,50,112,160,106,16,200,208,210,184,22,193,164,25,83,171,65,81,8,108,55,30,153,235,142,223,76,119,72,39,168,72,155,225,181,188,176,52,99,90,201,197,179,12,28,57,203,138,65,227,74,170,216,78,115,227,99,119,79,202,156,91,163,184,178,214,243,111,46,104,252,178,239,93,238,130,143,116,96,47,23,67,111,99,165,120,114,171,240,161,20,120,200,132,236,57,100,26,8,2,199,140,40,30,99,35,250,255,190,144,233,189,130,222,235,108,80,164,21,121,198,178,247,163,249,190,43,83,114,227,242,120,113,198,156,97,38,234,206,62,39,202,7,194,192,33,199,184,134,209,30,235,224,205,214,125,218,234,120,209,110,238,127,79,125,245,186,111,23,114,170,103,240,6,166,152,200,162,197,125,99,10,174,13,249,190,4,152,63,17,27,71,28,19,53,11,113,27,132,125,4,35,245,119,219,40,147,36,199,64,123,171,202,50,188,190,201,21,10,190,158,60,76,13,16,156,196,103,29,67,182,66,62,203,190,212,197,76,42,126,101,252,156,41,127,89,236,250,214,58,171,111,203,95,23,88,71,74,140,25,68,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+30720); - - - - -var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8); - -assert(tempDoublePtr % 8 == 0); - -function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much - - HEAP8[tempDoublePtr] = HEAP8[ptr]; - - HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; - - HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; - - HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; - -} - -function copyTempDouble(ptr) { - - HEAP8[tempDoublePtr] = HEAP8[ptr]; - - HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; - - HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; - - HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; - - HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; - - HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; - - HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; - - HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; - -} - - - - Module["_bitshift64Ashr"] = _bitshift64Ashr; - - - Module["_i64Subtract"] = _i64Subtract; - - - Module["_i64Add"] = _i64Add; - - - Module["_memset"] = _memset; - - - Module["_bitshift64Lshr"] = _bitshift64Lshr; - - - Module["_bitshift64Shl"] = _bitshift64Shl; - - function _abort() { - Module['abort'](); - } - - - Module["_strlen"] = _strlen; - - - function _emscripten_memcpy_big(dest, src, num) { - HEAPU8.set(HEAPU8.subarray(src, src+num), dest); - return dest; - } - Module["_memcpy"] = _memcpy; - - - - var ___errno_state=0;function ___setErrNo(value) { - // For convenient setting and returning of errno. - HEAP32[((___errno_state)>>2)]=value; - return value; - } - - var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(name) { - // long sysconf(int name); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html - switch(name) { - case 30: return PAGE_SIZE; - case 132: - case 133: - case 12: - case 137: - case 138: - case 15: - case 235: - case 16: - case 17: - case 18: - case 19: - case 20: - case 149: - case 13: - case 10: - case 236: - case 153: - case 9: - case 21: - case 22: - case 159: - case 154: - case 14: - case 77: - case 78: - case 139: - case 80: - case 81: - case 79: - case 82: - case 68: - case 67: - case 164: - case 11: - case 29: - case 47: - case 48: - case 95: - case 52: - case 51: - case 46: - return 200809; - case 27: - case 246: - case 127: - case 128: - case 23: - case 24: - case 160: - case 161: - case 181: - case 182: - case 242: - case 183: - case 184: - case 243: - case 244: - case 245: - case 165: - case 178: - case 179: - case 49: - case 50: - case 168: - case 169: - case 175: - case 170: - case 171: - case 172: - case 97: - case 76: - case 32: - case 173: - case 35: - return -1; - case 176: - case 177: - case 7: - case 155: - case 8: - case 157: - case 125: - case 126: - case 92: - case 93: - case 129: - case 130: - case 131: - case 94: - case 91: - return 1; - case 74: - case 60: - case 69: - case 70: - case 4: - return 1024; - case 31: - case 42: - case 72: - return 32; - case 87: - case 26: - case 33: - return 2147483647; - case 34: - case 1: - return 47839; - case 38: - case 36: - return 99; - case 43: - case 37: - return 2048; - case 0: return 2097152; - case 3: return 65536; - case 28: return 32768; - case 44: return 32767; - case 75: return 16384; - case 39: return 1000; - case 89: return 700; - case 71: return 256; - case 40: return 255; - case 2: return 100; - case 180: return 64; - case 25: return 20; - case 5: return 16; - case 6: return 6; - case 73: return 4; - case 84: { - if (typeof navigator === 'object') return navigator['hardwareConcurrency'] || 1; - return 1; - } - } - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } - - function _sbrk(bytes) { - // Implement a Linux-like 'memory area' for our 'process'. - // Changes the size of the memory area by |bytes|; returns the - // address of the previous top ('break') of the memory area - // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP - var self = _sbrk; - if (!self.called) { - DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned - self.called = true; - assert(Runtime.dynamicAlloc); - self.alloc = Runtime.dynamicAlloc; - Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; - } - var ret = DYNAMICTOP; - if (bytes != 0) self.alloc(bytes); - return ret; // Previous break location. - } - - - Module["_memmove"] = _memmove; - - function ___errno_location() { - return ___errno_state; - } - - - - - var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; - - var TTY={ttys:[],init:function () { - // https://github.com/kripken/emscripten/pull/1555 - // if (ENVIRONMENT_IS_NODE) { - // // currently, FS.init does not distinguish if process.stdin is a file or TTY - // // device, it always assumes it's a TTY device. because of this, we're forcing - // // process.stdin to UTF8 encoding to at least make stdin reading compatible - // // with text files until FS.init can be refactored. - // process['stdin']['setEncoding']('utf8'); - // } - },shutdown:function () { - // https://github.com/kripken/emscripten/pull/1555 - // if (ENVIRONMENT_IS_NODE) { - // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? - // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation - // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? - // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle - // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call - // process['stdin']['pause'](); - // } - },register:function (dev, ops) { - TTY.ttys[dev] = { input: [], output: [], ops: ops }; - FS.registerDevice(dev, TTY.stream_ops); - },stream_ops:{open:function (stream) { - var tty = TTY.ttys[stream.node.rdev]; - if (!tty) { - throw new FS.ErrnoError(ERRNO_CODES.ENODEV); - } - stream.tty = tty; - stream.seekable = false; - },close:function (stream) { - // flush any pending line data - stream.tty.ops.flush(stream.tty); - },flush:function (stream) { - stream.tty.ops.flush(stream.tty); - },read:function (stream, buffer, offset, length, pos /* ignored */) { - if (!stream.tty || !stream.tty.ops.get_char) { - throw new FS.ErrnoError(ERRNO_CODES.ENXIO); - } - var bytesRead = 0; - for (var i = 0; i < length; i++) { - var result; - try { - result = stream.tty.ops.get_char(stream.tty); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - if (result === undefined && bytesRead === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); - } - if (result === null || result === undefined) break; - bytesRead++; - buffer[offset+i] = result; - } - if (bytesRead) { - stream.node.timestamp = Date.now(); - } - return bytesRead; - },write:function (stream, buffer, offset, length, pos) { - if (!stream.tty || !stream.tty.ops.put_char) { - throw new FS.ErrnoError(ERRNO_CODES.ENXIO); - } - for (var i = 0; i < length; i++) { - try { - stream.tty.ops.put_char(stream.tty, buffer[offset+i]); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - } - if (length) { - stream.node.timestamp = Date.now(); - } - return i; - }},default_tty_ops:{get_char:function (tty) { - if (!tty.input.length) { - var result = null; - if (ENVIRONMENT_IS_NODE) { - result = process['stdin']['read'](); - if (!result) { - if (process['stdin']['_readableState'] && process['stdin']['_readableState']['ended']) { - return null; // EOF - } - return undefined; // no data available - } - } else if (typeof window != 'undefined' && - typeof window.prompt == 'function') { - // Browser. - result = window.prompt('Input: '); // returns null on cancel - if (result !== null) { - result += '\n'; - } - } else if (typeof readline == 'function') { - // Command line. - result = readline(); - if (result !== null) { - result += '\n'; - } - } - if (!result) { - return null; - } - tty.input = intArrayFromString(result, true); - } - return tty.input.shift(); - },flush:function (tty) { - if (tty.output && tty.output.length > 0) { - Module['print'](tty.output.join('')); - tty.output = []; - } - },put_char:function (tty, val) { - if (val === null || val === 10) { - Module['print'](tty.output.join('')); - tty.output = []; - } else { - tty.output.push(TTY.utf8.processCChar(val)); - } - }},default_tty1_ops:{put_char:function (tty, val) { - if (val === null || val === 10) { - Module['printErr'](tty.output.join('')); - tty.output = []; - } else { - tty.output.push(TTY.utf8.processCChar(val)); - } - },flush:function (tty) { - if (tty.output && tty.output.length > 0) { - Module['printErr'](tty.output.join('')); - tty.output = []; - } - }}}; - - var MEMFS={ops_table:null,mount:function (mount) { - return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); - },createNode:function (parent, name, mode, dev) { - if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { - // no supported - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (!MEMFS.ops_table) { - MEMFS.ops_table = { - dir: { - node: { - getattr: MEMFS.node_ops.getattr, - setattr: MEMFS.node_ops.setattr, - lookup: MEMFS.node_ops.lookup, - mknod: MEMFS.node_ops.mknod, - rename: MEMFS.node_ops.rename, - unlink: MEMFS.node_ops.unlink, - rmdir: MEMFS.node_ops.rmdir, - readdir: MEMFS.node_ops.readdir, - symlink: MEMFS.node_ops.symlink - }, - stream: { - llseek: MEMFS.stream_ops.llseek - } - }, - file: { - node: { - getattr: MEMFS.node_ops.getattr, - setattr: MEMFS.node_ops.setattr - }, - stream: { - llseek: MEMFS.stream_ops.llseek, - read: MEMFS.stream_ops.read, - write: MEMFS.stream_ops.write, - allocate: MEMFS.stream_ops.allocate, - mmap: MEMFS.stream_ops.mmap - } - }, - link: { - node: { - getattr: MEMFS.node_ops.getattr, - setattr: MEMFS.node_ops.setattr, - readlink: MEMFS.node_ops.readlink - }, - stream: {} - }, - chrdev: { - node: { - getattr: MEMFS.node_ops.getattr, - setattr: MEMFS.node_ops.setattr - }, - stream: FS.chrdev_stream_ops - } - }; - } - var node = FS.createNode(parent, name, mode, dev); - if (FS.isDir(node.mode)) { - node.node_ops = MEMFS.ops_table.dir.node; - node.stream_ops = MEMFS.ops_table.dir.stream; - node.contents = {}; - } else if (FS.isFile(node.mode)) { - node.node_ops = MEMFS.ops_table.file.node; - node.stream_ops = MEMFS.ops_table.file.stream; - node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.buffer.byteLength which gives the whole capacity. - // 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 - // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size - // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. - node.contents = null; - } else if (FS.isLink(node.mode)) { - node.node_ops = MEMFS.ops_table.link.node; - node.stream_ops = MEMFS.ops_table.link.stream; - } else if (FS.isChrdev(node.mode)) { - node.node_ops = MEMFS.ops_table.chrdev.node; - node.stream_ops = MEMFS.ops_table.chrdev.stream; - } - node.timestamp = Date.now(); - // add the new node to the parent - if (parent) { - parent.contents[name] = node; - } - return node; - },getFileDataAsRegularArray:function (node) { - if (node.contents && node.contents.subarray) { - var arr = []; - for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); - return arr; // Returns a copy of the original data. - } - return node.contents; // No-op, the file contents are already in a JS array. Return as-is. - },getFileDataAsTypedArray:function (node) { - if (!node.contents) return new Uint8Array; - if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. - return new Uint8Array(node.contents); - },expandFileStorage:function (node, newCapacity) { - - // If we are asked to expand the size of a file that already exists, revert to using a standard JS array to store the file - // instead of a typed array. This makes resizing the array more flexible because we can just .push() elements at the back to - // increase the size. - if (node.contents && node.contents.subarray && newCapacity > node.contents.length) { - node.contents = MEMFS.getFileDataAsRegularArray(node); - node.usedBytes = node.contents.length; // We might be writing to a lazy-loaded file which had overridden this property, so force-reset it. - } - - if (!node.contents || node.contents.subarray) { // Keep using a typed array if creating a new storage, or if old one was a typed array as well. - var prevCapacity = node.contents ? node.contents.buffer.byteLength : 0; - if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. - // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. - // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to - // avoid overshooting the allocation cap by a very large margin. - var CAPACITY_DOUBLING_MAX = 1024 * 1024; - newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0); - if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. - var oldContents = node.contents; - node.contents = new Uint8Array(newCapacity); // Allocate new storage. - if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. - return; - } - // Not using a typed array to back the file storage. Use a standard JS array instead. - if (!node.contents && newCapacity > 0) node.contents = []; - while (node.contents.length < newCapacity) node.contents.push(0); - },resizeFileStorage:function (node, newSize) { - if (node.usedBytes == newSize) return; - if (newSize == 0) { - node.contents = null; // Fully decommit when requesting a resize to zero. - node.usedBytes = 0; - return; - } - - if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. - var oldContents = node.contents; - node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. - if (oldContents) { - node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. - } - node.usedBytes = newSize; - return; - } - // Backing with a JS array. - if (!node.contents) node.contents = []; - if (node.contents.length > newSize) node.contents.length = newSize; - else while (node.contents.length < newSize) node.contents.push(0); - node.usedBytes = newSize; - },node_ops:{getattr:function (node) { - var attr = {}; - // device numbers reuse inode numbers. - attr.dev = FS.isChrdev(node.mode) ? node.id : 1; - attr.ino = node.id; - attr.mode = node.mode; - attr.nlink = 1; - attr.uid = 0; - attr.gid = 0; - attr.rdev = node.rdev; - if (FS.isDir(node.mode)) { - attr.size = 4096; - } else if (FS.isFile(node.mode)) { - attr.size = node.usedBytes; - } else if (FS.isLink(node.mode)) { - attr.size = node.link.length; - } else { - attr.size = 0; - } - attr.atime = new Date(node.timestamp); - attr.mtime = new Date(node.timestamp); - attr.ctime = new Date(node.timestamp); - // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), - // but this is not required by the standard. - attr.blksize = 4096; - attr.blocks = Math.ceil(attr.size / attr.blksize); - return attr; - },setattr:function (node, attr) { - if (attr.mode !== undefined) { - node.mode = attr.mode; - } - if (attr.timestamp !== undefined) { - node.timestamp = attr.timestamp; - } - if (attr.size !== undefined) { - MEMFS.resizeFileStorage(node, attr.size); - } - },lookup:function (parent, name) { - throw FS.genericErrors[ERRNO_CODES.ENOENT]; - },mknod:function (parent, name, mode, dev) { - return MEMFS.createNode(parent, name, mode, dev); - },rename:function (old_node, new_dir, new_name) { - // if we're overwriting a directory at new_name, make sure it's empty. - if (FS.isDir(old_node.mode)) { - var new_node; - try { - new_node = FS.lookupNode(new_dir, new_name); - } catch (e) { - } - if (new_node) { - for (var i in new_node.contents) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); - } - } - } - // do the internal rewiring - delete old_node.parent.contents[old_node.name]; - old_node.name = new_name; - new_dir.contents[new_name] = old_node; - old_node.parent = new_dir; - },unlink:function (parent, name) { - delete parent.contents[name]; - },rmdir:function (parent, name) { - var node = FS.lookupNode(parent, name); - for (var i in node.contents) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); - } - delete parent.contents[name]; - },readdir:function (node) { - var entries = ['.', '..'] - for (var key in node.contents) { - if (!node.contents.hasOwnProperty(key)) { - continue; - } - entries.push(key); - } - return entries; - },symlink:function (parent, newname, oldpath) { - var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); - node.link = oldpath; - return node; - },readlink:function (node) { - if (!FS.isLink(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - return node.link; - }},stream_ops:{read:function (stream, buffer, offset, length, position) { - var contents = stream.node.contents; - if (position >= stream.node.usedBytes) return 0; - var size = Math.min(stream.node.usedBytes - position, length); - assert(size >= 0); - if (size > 8 && contents.subarray) { // non-trivial, and typed array - buffer.set(contents.subarray(position, position + size), offset); - } else - { - for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; - } - return size; - },write:function (stream, buffer, offset, length, position, canOwn) { - if (!length) return 0; - var node = stream.node; - node.timestamp = Date.now(); - - if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? - if (canOwn) { // Can we just reuse the buffer we are given? - node.contents = buffer.subarray(offset, offset + length); - node.usedBytes = length; - return length; - } 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. - node.contents = new Uint8Array(buffer.subarray(offset, offset + length)); - node.usedBytes = length; - return length; - } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? - node.contents.set(buffer.subarray(offset, offset + length), position); - return length; - } - } - // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. - MEMFS.expandFileStorage(node, position+length); - if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. - else - for (var i = 0; i < length; i++) { - node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. - } - node.usedBytes = Math.max(node.usedBytes, position+length); - return length; - },llseek:function (stream, offset, whence) { - var position = offset; - if (whence === 1) { // SEEK_CUR. - position += stream.position; - } else if (whence === 2) { // SEEK_END. - if (FS.isFile(stream.node.mode)) { - position += stream.node.usedBytes; - } - } - if (position < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - return position; - },allocate:function (stream, offset, length) { - MEMFS.expandFileStorage(stream.node, offset + length); - stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); - },mmap:function (stream, buffer, offset, length, position, prot, flags) { - if (!FS.isFile(stream.node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.ENODEV); - } - var ptr; - var allocated; - var contents = stream.node.contents; - // Only make a new copy when MAP_PRIVATE is specified. - if ( !(flags & 2) && - (contents.buffer === buffer || contents.buffer === buffer.buffer) ) { - // We can't emulate MAP_SHARED when the file is not backed by the buffer - // we're mapping to (e.g. the HEAP buffer). - allocated = false; - ptr = contents.byteOffset; - } else { - // Try to avoid unnecessary slices. - if (position > 0 || position + length < stream.node.usedBytes) { - if (contents.subarray) { - contents = contents.subarray(position, position + length); - } else { - contents = Array.prototype.slice.call(contents, position, position + length); - } - } - allocated = true; - ptr = _malloc(length); - if (!ptr) { - throw new FS.ErrnoError(ERRNO_CODES.ENOMEM); - } - buffer.set(contents, ptr); - } - return { ptr: ptr, allocated: allocated }; - }}}; - - var IDBFS={dbs:{},indexedDB:function () { - if (typeof indexedDB !== 'undefined') return indexedDB; - var ret = null; - if (typeof window === 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; - assert(ret, 'IDBFS used, but indexedDB not supported'); - return ret; - },DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function (mount) { - // reuse all of the core MEMFS functionality - return MEMFS.mount.apply(null, arguments); - },syncfs:function (mount, populate, callback) { - IDBFS.getLocalSet(mount, function(err, local) { - if (err) return callback(err); - - IDBFS.getRemoteSet(mount, function(err, remote) { - if (err) return callback(err); - - var src = populate ? remote : local; - var dst = populate ? local : remote; - - IDBFS.reconcile(src, dst, callback); - }); - }); - },getDB:function (name, callback) { - // check the cache first - var db = IDBFS.dbs[name]; - if (db) { - return callback(null, db); - } - - var req; - try { - req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); - } catch (e) { - return callback(e); - } - req.onupgradeneeded = function(e) { - var db = e.target.result; - var transaction = e.target.transaction; - - var fileStore; - - if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { - fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); - } else { - fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); - } - - fileStore.createIndex('timestamp', 'timestamp', { unique: false }); - }; - req.onsuccess = function() { - db = req.result; - - // add to the cache - IDBFS.dbs[name] = db; - callback(null, db); - }; - req.onerror = function() { - callback(this.error); - }; - },getLocalSet:function (mount, callback) { - var entries = {}; - - function isRealDir(p) { - return p !== '.' && p !== '..'; - }; - function toAbsolute(root) { - return function(p) { - return PATH.join2(root, p); - } - }; - - var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); - - while (check.length) { - var path = check.pop(); - var stat; - - try { - stat = FS.stat(path); - } catch (e) { - return callback(e); - } - - if (FS.isDir(stat.mode)) { - check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))); - } - - entries[path] = { timestamp: stat.mtime }; - } - - return callback(null, { type: 'local', entries: entries }); - },getRemoteSet:function (mount, callback) { - var entries = {}; - - IDBFS.getDB(mount.mountpoint, function(err, db) { - if (err) return callback(err); - - var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); - transaction.onerror = function() { callback(this.error); }; - - var store = transaction.objectStore(IDBFS.DB_STORE_NAME); - var index = store.index('timestamp'); - - index.openKeyCursor().onsuccess = function(event) { - var cursor = event.target.result; - - if (!cursor) { - return callback(null, { type: 'remote', db: db, entries: entries }); - } - - entries[cursor.primaryKey] = { timestamp: cursor.key }; - - cursor.continue(); - }; - }); - },loadLocalEntry:function (path, callback) { - var stat, node; - - try { - var lookup = FS.lookupPath(path); - node = lookup.node; - stat = FS.stat(path); - } catch (e) { - return callback(e); - } - - if (FS.isDir(stat.mode)) { - return callback(null, { timestamp: stat.mtime, mode: stat.mode }); - } else if (FS.isFile(stat.mode)) { - // Performance consideration: storing a normal JavaScript array to a IndexedDB is much slower than storing a typed array. - // Therefore always convert the file contents to a typed array first before writing the data to IndexedDB. - node.contents = MEMFS.getFileDataAsTypedArray(node); - return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents }); - } else { - return callback(new Error('node type not supported')); - } - },storeLocalEntry:function (path, entry, callback) { - try { - if (FS.isDir(entry.mode)) { - FS.mkdir(path, entry.mode); - } else if (FS.isFile(entry.mode)) { - FS.writeFile(path, entry.contents, { encoding: 'binary', canOwn: true }); - } else { - return callback(new Error('node type not supported')); - } - - FS.chmod(path, entry.mode); - FS.utime(path, entry.timestamp, entry.timestamp); - } catch (e) { - return callback(e); - } - - callback(null); - },removeLocalEntry:function (path, callback) { - try { - var lookup = FS.lookupPath(path); - var stat = FS.stat(path); - - if (FS.isDir(stat.mode)) { - FS.rmdir(path); - } else if (FS.isFile(stat.mode)) { - FS.unlink(path); - } - } catch (e) { - return callback(e); - } - - callback(null); - },loadRemoteEntry:function (store, path, callback) { - var req = store.get(path); - req.onsuccess = function(event) { callback(null, event.target.result); }; - req.onerror = function() { callback(this.error); }; - },storeRemoteEntry:function (store, path, entry, callback) { - var req = store.put(entry, path); - req.onsuccess = function() { callback(null); }; - req.onerror = function() { callback(this.error); }; - },removeRemoteEntry:function (store, path, callback) { - var req = store.delete(path); - req.onsuccess = function() { callback(null); }; - req.onerror = function() { callback(this.error); }; - },reconcile:function (src, dst, callback) { - var total = 0; - - var create = []; - Object.keys(src.entries).forEach(function (key) { - var e = src.entries[key]; - var e2 = dst.entries[key]; - if (!e2 || e.timestamp > e2.timestamp) { - create.push(key); - total++; - } - }); - - var remove = []; - Object.keys(dst.entries).forEach(function (key) { - var e = dst.entries[key]; - var e2 = src.entries[key]; - if (!e2) { - remove.push(key); - total++; - } - }); - - if (!total) { - return callback(null); - } - - var errored = false; - var completed = 0; - var db = src.type === 'remote' ? src.db : dst.db; - var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); - var store = transaction.objectStore(IDBFS.DB_STORE_NAME); - - function done(err) { - if (err) { - if (!done.errored) { - done.errored = true; - return callback(err); - } - return; - } - if (++completed >= total) { - return callback(null); - } - }; - - transaction.onerror = function() { done(this.error); }; - - // sort paths in ascending order so directory entries are created - // before the files inside them - create.sort().forEach(function (path) { - if (dst.type === 'local') { - IDBFS.loadRemoteEntry(store, path, function (err, entry) { - if (err) return done(err); - IDBFS.storeLocalEntry(path, entry, done); - }); - } else { - IDBFS.loadLocalEntry(path, function (err, entry) { - if (err) return done(err); - IDBFS.storeRemoteEntry(store, path, entry, done); - }); - } - }); - - // sort paths in descending order so files are deleted before their - // parent directories - remove.sort().reverse().forEach(function(path) { - if (dst.type === 'local') { - IDBFS.removeLocalEntry(path, done); - } else { - IDBFS.removeRemoteEntry(store, path, done); - } - }); - }}; - - var NODEFS={isWindows:false,staticInit:function () { - NODEFS.isWindows = !!process.platform.match(/^win/); - },mount:function (mount) { - assert(ENVIRONMENT_IS_NODE); - return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0); - },createNode:function (parent, name, mode, dev) { - if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var node = FS.createNode(parent, name, mode); - node.node_ops = NODEFS.node_ops; - node.stream_ops = NODEFS.stream_ops; - return node; - },getMode:function (path) { - var stat; - try { - stat = fs.lstatSync(path); - if (NODEFS.isWindows) { - // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so - // propagate write bits to execute bits. - stat.mode = stat.mode | ((stat.mode & 146) >> 1); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - return stat.mode; - },realPath:function (node) { - var parts = []; - while (node.parent !== node) { - parts.push(node.name); - node = node.parent; - } - parts.push(node.mount.opts.root); - parts.reverse(); - return PATH.join.apply(null, parts); - },flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function (flags) { - if (flags in NODEFS.flagsToPermissionStringMap) { - return NODEFS.flagsToPermissionStringMap[flags]; - } else { - return flags; - } - },node_ops:{getattr:function (node) { - var path = NODEFS.realPath(node); - var stat; - try { - stat = fs.lstatSync(path); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - // node.js v0.10.20 doesn't report blksize and blocks on Windows. Fake them with default blksize of 4096. - // See http://support.microsoft.com/kb/140365 - if (NODEFS.isWindows && !stat.blksize) { - stat.blksize = 4096; - } - if (NODEFS.isWindows && !stat.blocks) { - stat.blocks = (stat.size+stat.blksize-1)/stat.blksize|0; - } - return { - dev: stat.dev, - ino: stat.ino, - mode: stat.mode, - nlink: stat.nlink, - uid: stat.uid, - gid: stat.gid, - rdev: stat.rdev, - size: stat.size, - atime: stat.atime, - mtime: stat.mtime, - ctime: stat.ctime, - blksize: stat.blksize, - blocks: stat.blocks - }; - },setattr:function (node, attr) { - var path = NODEFS.realPath(node); - try { - if (attr.mode !== undefined) { - fs.chmodSync(path, attr.mode); - // update the common node structure mode as well - node.mode = attr.mode; - } - if (attr.timestamp !== undefined) { - var date = new Date(attr.timestamp); - fs.utimesSync(path, date, date); - } - if (attr.size !== undefined) { - fs.truncateSync(path, attr.size); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },lookup:function (parent, name) { - var path = PATH.join2(NODEFS.realPath(parent), name); - var mode = NODEFS.getMode(path); - return NODEFS.createNode(parent, name, mode); - },mknod:function (parent, name, mode, dev) { - var node = NODEFS.createNode(parent, name, mode, dev); - // create the backing node for this in the fs root as well - var path = NODEFS.realPath(node); - try { - if (FS.isDir(node.mode)) { - fs.mkdirSync(path, node.mode); - } else { - fs.writeFileSync(path, '', { mode: node.mode }); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - return node; - },rename:function (oldNode, newDir, newName) { - var oldPath = NODEFS.realPath(oldNode); - var newPath = PATH.join2(NODEFS.realPath(newDir), newName); - try { - fs.renameSync(oldPath, newPath); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },unlink:function (parent, name) { - var path = PATH.join2(NODEFS.realPath(parent), name); - try { - fs.unlinkSync(path); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },rmdir:function (parent, name) { - var path = PATH.join2(NODEFS.realPath(parent), name); - try { - fs.rmdirSync(path); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },readdir:function (node) { - var path = NODEFS.realPath(node); - try { - return fs.readdirSync(path); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },symlink:function (parent, newName, oldPath) { - var newPath = PATH.join2(NODEFS.realPath(parent), newName); - try { - fs.symlinkSync(oldPath, newPath); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },readlink:function (node) { - var path = NODEFS.realPath(node); - try { - return fs.readlinkSync(path); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - }},stream_ops:{open:function (stream) { - var path = NODEFS.realPath(stream.node); - try { - if (FS.isFile(stream.node.mode)) { - stream.nfd = fs.openSync(path, NODEFS.flagsToPermissionString(stream.flags)); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },close:function (stream) { - try { - if (FS.isFile(stream.node.mode) && stream.nfd) { - fs.closeSync(stream.nfd); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },read:function (stream, buffer, offset, length, position) { - if (length === 0) return 0; // node errors on 0 length reads - // FIXME this is terrible. - var nbuffer = new Buffer(length); - var res; - try { - res = fs.readSync(stream.nfd, nbuffer, 0, length, position); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - if (res > 0) { - for (var i = 0; i < res; i++) { - buffer[offset + i] = nbuffer[i]; - } - } - return res; - },write:function (stream, buffer, offset, length, position) { - // FIXME this is terrible. - var nbuffer = new Buffer(buffer.subarray(offset, offset + length)); - var res; - try { - res = fs.writeSync(stream.nfd, nbuffer, 0, length, position); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - return res; - },llseek:function (stream, offset, whence) { - var position = offset; - if (whence === 1) { // SEEK_CUR. - position += stream.position; - } else if (whence === 2) { // SEEK_END. - if (FS.isFile(stream.node.mode)) { - try { - var stat = fs.fstatSync(stream.nfd); - position += stat.size; - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - } - } - - if (position < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - - return position; - }}}; - - var _stdin=allocate(1, "i32*", ALLOC_STATIC); - - var _stdout=allocate(1, "i32*", ALLOC_STATIC); - - var _stderr=allocate(1, "i32*", ALLOC_STATIC); - - function _fflush(stream) { - // int fflush(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fflush.html - - /* - // Disabled, see https://github.com/kripken/emscripten/issues/2770 - stream = FS.getStreamFromPtr(stream); - if (stream.stream_ops.flush) { - stream.stream_ops.flush(stream); - } - */ - }var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},handleFSError:function (e) { - if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); - return ___setErrNo(e.errno); - },lookupPath:function (path, opts) { - path = PATH.resolve(FS.cwd(), path); - opts = opts || {}; - - if (!path) return { path: '', node: null }; - - var defaults = { - follow_mount: true, - recurse_count: 0 - }; - for (var key in defaults) { - if (opts[key] === undefined) { - opts[key] = defaults[key]; - } - } - - if (opts.recurse_count > 8) { // max recursive lookup of 8 - throw new FS.ErrnoError(ERRNO_CODES.ELOOP); - } - - // split the path - var parts = PATH.normalizeArray(path.split('/').filter(function(p) { - return !!p; - }), false); - - // start at the root - var current = FS.root; - var current_path = '/'; - - for (var i = 0; i < parts.length; i++) { - var islast = (i === parts.length-1); - if (islast && opts.parent) { - // stop resolving - break; - } - - current = FS.lookupNode(current, parts[i]); - current_path = PATH.join2(current_path, parts[i]); - - // jump to the mount's root node if this is a mountpoint - if (FS.isMountpoint(current)) { - if (!islast || (islast && opts.follow_mount)) { - current = current.mounted.root; - } - } - - // by default, lookupPath will not follow a symlink if it is the final path component. - // setting opts.follow = true will override this behavior. - if (!islast || opts.follow) { - var count = 0; - while (FS.isLink(current.mode)) { - var link = FS.readlink(current_path); - current_path = PATH.resolve(PATH.dirname(current_path), link); - - var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); - current = lookup.node; - - if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). - throw new FS.ErrnoError(ERRNO_CODES.ELOOP); - } - } - } - } - - return { path: current_path, node: current }; - },getPath:function (node) { - var path; - while (true) { - if (FS.isRoot(node)) { - var mount = node.mount.mountpoint; - if (!path) return mount; - return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; - } - path = path ? node.name + '/' + path : node.name; - node = node.parent; - } - },hashName:function (parentid, name) { - var hash = 0; - - - for (var i = 0; i < name.length; i++) { - hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; - } - return ((parentid + hash) >>> 0) % FS.nameTable.length; - },hashAddNode:function (node) { - var hash = FS.hashName(node.parent.id, node.name); - node.name_next = FS.nameTable[hash]; - FS.nameTable[hash] = node; - },hashRemoveNode:function (node) { - var hash = FS.hashName(node.parent.id, node.name); - if (FS.nameTable[hash] === node) { - FS.nameTable[hash] = node.name_next; - } else { - var current = FS.nameTable[hash]; - while (current) { - if (current.name_next === node) { - current.name_next = node.name_next; - break; - } - current = current.name_next; - } - } - },lookupNode:function (parent, name) { - var err = FS.mayLookup(parent); - if (err) { - throw new FS.ErrnoError(err, parent); - } - var hash = FS.hashName(parent.id, name); - for (var node = FS.nameTable[hash]; node; node = node.name_next) { - var nodeName = node.name; - if (node.parent.id === parent.id && nodeName === name) { - return node; - } - } - // if we failed to find it in the cache, call into the VFS - return FS.lookup(parent, name); - },createNode:function (parent, name, mode, rdev) { - if (!FS.FSNode) { - FS.FSNode = function(parent, name, mode, rdev) { - if (!parent) { - parent = this; // root node sets parent to itself - } - this.parent = parent; - this.mount = parent.mount; - this.mounted = null; - this.id = FS.nextInode++; - this.name = name; - this.mode = mode; - this.node_ops = {}; - this.stream_ops = {}; - this.rdev = rdev; - }; - - FS.FSNode.prototype = {}; - - // compatibility - var readMode = 292 | 73; - var writeMode = 146; - - // NOTE we must use Object.defineProperties instead of individual calls to - // Object.defineProperty in order to make closure compiler happy - Object.defineProperties(FS.FSNode.prototype, { - read: { - get: function() { return (this.mode & readMode) === readMode; }, - set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; } - }, - write: { - get: function() { return (this.mode & writeMode) === writeMode; }, - set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } - }, - isFolder: { - get: function() { return FS.isDir(this.mode); } - }, - isDevice: { - get: function() { return FS.isChrdev(this.mode); } - } - }); - } - - var node = new FS.FSNode(parent, name, mode, rdev); - - FS.hashAddNode(node); - - return node; - },destroyNode:function (node) { - FS.hashRemoveNode(node); - },isRoot:function (node) { - return node === node.parent; - },isMountpoint:function (node) { - return !!node.mounted; - },isFile:function (mode) { - return (mode & 61440) === 32768; - },isDir:function (mode) { - return (mode & 61440) === 16384; - },isLink:function (mode) { - return (mode & 61440) === 40960; - },isChrdev:function (mode) { - return (mode & 61440) === 8192; - },isBlkdev:function (mode) { - return (mode & 61440) === 24576; - },isFIFO:function (mode) { - return (mode & 61440) === 4096; - },isSocket:function (mode) { - return (mode & 49152) === 49152; - },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function (str) { - var flags = FS.flagModes[str]; - if (typeof flags === 'undefined') { - throw new Error('Unknown file open mode: ' + str); - } - return flags; - },flagsToPermissionString:function (flag) { - var accmode = flag & 2097155; - var perms = ['r', 'w', 'rw'][accmode]; - if ((flag & 512)) { - perms += 'w'; - } - return perms; - },nodePermissions:function (node, perms) { - if (FS.ignorePermissions) { - return 0; - } - // return 0 if any user, group or owner bits are set. - if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { - return ERRNO_CODES.EACCES; - } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { - return ERRNO_CODES.EACCES; - } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { - return ERRNO_CODES.EACCES; - } - return 0; - },mayLookup:function (dir) { - var err = FS.nodePermissions(dir, 'x'); - if (err) return err; - if (!dir.node_ops.lookup) return ERRNO_CODES.EACCES; - return 0; - },mayCreate:function (dir, name) { - try { - var node = FS.lookupNode(dir, name); - return ERRNO_CODES.EEXIST; - } catch (e) { - } - return FS.nodePermissions(dir, 'wx'); - },mayDelete:function (dir, name, isdir) { - var node; - try { - node = FS.lookupNode(dir, name); - } catch (e) { - return e.errno; - } - var err = FS.nodePermissions(dir, 'wx'); - if (err) { - return err; - } - if (isdir) { - if (!FS.isDir(node.mode)) { - return ERRNO_CODES.ENOTDIR; - } - if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { - return ERRNO_CODES.EBUSY; - } - } else { - if (FS.isDir(node.mode)) { - return ERRNO_CODES.EISDIR; - } - } - return 0; - },mayOpen:function (node, flags) { - if (!node) { - return ERRNO_CODES.ENOENT; - } - if (FS.isLink(node.mode)) { - return ERRNO_CODES.ELOOP; - } else if (FS.isDir(node.mode)) { - if ((flags & 2097155) !== 0 || // opening for write - (flags & 512)) { - return ERRNO_CODES.EISDIR; - } - } - return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); - },MAX_OPEN_FDS:4096,nextfd:function (fd_start, fd_end) { - fd_start = fd_start || 0; - fd_end = fd_end || FS.MAX_OPEN_FDS; - for (var fd = fd_start; fd <= fd_end; fd++) { - if (!FS.streams[fd]) { - return fd; - } - } - throw new FS.ErrnoError(ERRNO_CODES.EMFILE); - },getStream:function (fd) { - return FS.streams[fd]; - },createStream:function (stream, fd_start, fd_end) { - if (!FS.FSStream) { - FS.FSStream = function(){}; - FS.FSStream.prototype = {}; - // compatibility - Object.defineProperties(FS.FSStream.prototype, { - object: { - get: function() { return this.node; }, - set: function(val) { this.node = val; } - }, - isRead: { - get: function() { return (this.flags & 2097155) !== 1; } - }, - isWrite: { - get: function() { return (this.flags & 2097155) !== 0; } - }, - isAppend: { - get: function() { return (this.flags & 1024); } - } - }); - } - // clone it, so we can return an instance of FSStream - var newStream = new FS.FSStream(); - for (var p in stream) { - newStream[p] = stream[p]; - } - stream = newStream; - var fd = FS.nextfd(fd_start, fd_end); - stream.fd = fd; - FS.streams[fd] = stream; - return stream; - },closeStream:function (fd) { - FS.streams[fd] = null; - },getStreamFromPtr:function (ptr) { - return FS.streams[ptr - 1]; - },getPtrForStream:function (stream) { - return stream ? stream.fd + 1 : 0; - },chrdev_stream_ops:{open:function (stream) { - var device = FS.getDevice(stream.node.rdev); - // override node's stream ops with the device's - stream.stream_ops = device.stream_ops; - // forward the open call - if (stream.stream_ops.open) { - stream.stream_ops.open(stream); - } - },llseek:function () { - throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); - }},major:function (dev) { - return ((dev) >> 8); - },minor:function (dev) { - return ((dev) & 0xff); - },makedev:function (ma, mi) { - return ((ma) << 8 | (mi)); - },registerDevice:function (dev, ops) { - FS.devices[dev] = { stream_ops: ops }; - },getDevice:function (dev) { - return FS.devices[dev]; - },getMounts:function (mount) { - var mounts = []; - var check = [mount]; - - while (check.length) { - var m = check.pop(); - - mounts.push(m); - - check.push.apply(check, m.mounts); - } - - return mounts; - },syncfs:function (populate, callback) { - if (typeof(populate) === 'function') { - callback = populate; - populate = false; - } - - var mounts = FS.getMounts(FS.root.mount); - var completed = 0; - - function done(err) { - if (err) { - if (!done.errored) { - done.errored = true; - return callback(err); - } - return; - } - if (++completed >= mounts.length) { - callback(null); - } - }; - - // sync all mounts - mounts.forEach(function (mount) { - if (!mount.type.syncfs) { - return done(null); - } - mount.type.syncfs(mount, populate, done); - }); - },mount:function (type, opts, mountpoint) { - var root = mountpoint === '/'; - var pseudo = !mountpoint; - var node; - - if (root && FS.root) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } else if (!root && !pseudo) { - var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); - - mountpoint = lookup.path; // use the absolute path - node = lookup.node; - - if (FS.isMountpoint(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - - if (!FS.isDir(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); - } - } - - var mount = { - type: type, - opts: opts, - mountpoint: mountpoint, - mounts: [] - }; - - // create a root node for the fs - var mountRoot = type.mount(mount); - mountRoot.mount = mount; - mount.root = mountRoot; - - if (root) { - FS.root = mountRoot; - } else if (node) { - // set as a mountpoint - node.mounted = mount; - - // add the new mount to the current mount's children - if (node.mount) { - node.mount.mounts.push(mount); - } - } - - return mountRoot; - },unmount:function (mountpoint) { - var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); - - if (!FS.isMountpoint(lookup.node)) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - - // destroy the nodes for this mount, and all its child mounts - var node = lookup.node; - var mount = node.mounted; - var mounts = FS.getMounts(mount); - - Object.keys(FS.nameTable).forEach(function (hash) { - var current = FS.nameTable[hash]; - - while (current) { - var next = current.name_next; - - if (mounts.indexOf(current.mount) !== -1) { - FS.destroyNode(current); - } - - current = next; - } - }); - - // no longer a mountpoint - node.mounted = null; - - // remove this mount from the child mounts - var idx = node.mount.mounts.indexOf(mount); - assert(idx !== -1); - node.mount.mounts.splice(idx, 1); - },lookup:function (parent, name) { - return parent.node_ops.lookup(parent, name); - },mknod:function (path, mode, dev) { - var lookup = FS.lookupPath(path, { parent: true }); - var parent = lookup.node; - var name = PATH.basename(path); - if (!name || name === '.' || name === '..') { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var err = FS.mayCreate(parent, name); - if (err) { - throw new FS.ErrnoError(err); - } - if (!parent.node_ops.mknod) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - return parent.node_ops.mknod(parent, name, mode, dev); - },create:function (path, mode) { - mode = mode !== undefined ? mode : 438 /* 0666 */; - mode &= 4095; - mode |= 32768; - return FS.mknod(path, mode, 0); - },mkdir:function (path, mode) { - mode = mode !== undefined ? mode : 511 /* 0777 */; - mode &= 511 | 512; - mode |= 16384; - return FS.mknod(path, mode, 0); - },mkdev:function (path, mode, dev) { - if (typeof(dev) === 'undefined') { - dev = mode; - mode = 438 /* 0666 */; - } - mode |= 8192; - return FS.mknod(path, mode, dev); - },symlink:function (oldpath, newpath) { - if (!PATH.resolve(oldpath)) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - var lookup = FS.lookupPath(newpath, { parent: true }); - var parent = lookup.node; - if (!parent) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - var newname = PATH.basename(newpath); - var err = FS.mayCreate(parent, newname); - if (err) { - throw new FS.ErrnoError(err); - } - if (!parent.node_ops.symlink) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - return parent.node_ops.symlink(parent, newname, oldpath); - },rename:function (old_path, new_path) { - var old_dirname = PATH.dirname(old_path); - var new_dirname = PATH.dirname(new_path); - var old_name = PATH.basename(old_path); - var new_name = PATH.basename(new_path); - // parents must exist - var lookup, old_dir, new_dir; - try { - lookup = FS.lookupPath(old_path, { parent: true }); - old_dir = lookup.node; - lookup = FS.lookupPath(new_path, { parent: true }); - new_dir = lookup.node; - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - if (!old_dir || !new_dir) throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - // need to be part of the same mount - if (old_dir.mount !== new_dir.mount) { - throw new FS.ErrnoError(ERRNO_CODES.EXDEV); - } - // source must exist - var old_node = FS.lookupNode(old_dir, old_name); - // old path should not be an ancestor of the new path - var relative = PATH.relative(old_path, new_dirname); - if (relative.charAt(0) !== '.') { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - // new path should not be an ancestor of the old path - relative = PATH.relative(new_path, old_dirname); - if (relative.charAt(0) !== '.') { - throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); - } - // see if the new path already exists - var new_node; - try { - new_node = FS.lookupNode(new_dir, new_name); - } catch (e) { - // not fatal - } - // early out if nothing needs to change - if (old_node === new_node) { - return; - } - // we'll need to delete the old entry - var isdir = FS.isDir(old_node.mode); - var err = FS.mayDelete(old_dir, old_name, isdir); - if (err) { - throw new FS.ErrnoError(err); - } - // need delete permissions if we'll be overwriting. - // need create permissions if new doesn't already exist. - err = new_node ? - FS.mayDelete(new_dir, new_name, isdir) : - FS.mayCreate(new_dir, new_name); - if (err) { - throw new FS.ErrnoError(err); - } - if (!old_dir.node_ops.rename) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - // if we are going to change the parent, check write permissions - if (new_dir !== old_dir) { - err = FS.nodePermissions(old_dir, 'w'); - if (err) { - throw new FS.ErrnoError(err); - } - } - try { - if (FS.trackingDelegate['willMovePath']) { - FS.trackingDelegate['willMovePath'](old_path, new_path); - } - } catch(e) { - console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); - } - // remove the node from the lookup hash - FS.hashRemoveNode(old_node); - // do the underlying fs rename - try { - old_dir.node_ops.rename(old_node, new_dir, new_name); - } catch (e) { - throw e; - } finally { - // add the node back to the hash (in case node_ops.rename - // changed its name) - FS.hashAddNode(old_node); - } - try { - if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); - } catch(e) { - console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); - } - },rmdir:function (path) { - var lookup = FS.lookupPath(path, { parent: true }); - var parent = lookup.node; - var name = PATH.basename(path); - var node = FS.lookupNode(parent, name); - var err = FS.mayDelete(parent, name, true); - if (err) { - throw new FS.ErrnoError(err); - } - if (!parent.node_ops.rmdir) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (FS.isMountpoint(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - try { - if (FS.trackingDelegate['willDeletePath']) { - FS.trackingDelegate['willDeletePath'](path); - } - } catch(e) { - console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); - } - parent.node_ops.rmdir(parent, name); - FS.destroyNode(node); - try { - if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); - } catch(e) { - console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); - } - },readdir:function (path) { - var lookup = FS.lookupPath(path, { follow: true }); - var node = lookup.node; - if (!node.node_ops.readdir) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); - } - return node.node_ops.readdir(node); - },unlink:function (path) { - var lookup = FS.lookupPath(path, { parent: true }); - var parent = lookup.node; - var name = PATH.basename(path); - var node = FS.lookupNode(parent, name); - var err = FS.mayDelete(parent, name, false); - if (err) { - // POSIX says unlink should set EPERM, not EISDIR - if (err === ERRNO_CODES.EISDIR) err = ERRNO_CODES.EPERM; - throw new FS.ErrnoError(err); - } - if (!parent.node_ops.unlink) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (FS.isMountpoint(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - try { - if (FS.trackingDelegate['willDeletePath']) { - FS.trackingDelegate['willDeletePath'](path); - } - } catch(e) { - console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); - } - parent.node_ops.unlink(parent, name); - FS.destroyNode(node); - try { - if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); - } catch(e) { - console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); - } - },readlink:function (path) { - var lookup = FS.lookupPath(path); - var link = lookup.node; - if (!link) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - if (!link.node_ops.readlink) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - return link.node_ops.readlink(link); - },stat:function (path, dontFollow) { - var lookup = FS.lookupPath(path, { follow: !dontFollow }); - var node = lookup.node; - if (!node) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - if (!node.node_ops.getattr) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - return node.node_ops.getattr(node); - },lstat:function (path) { - return FS.stat(path, true); - },chmod:function (path, mode, dontFollow) { - var node; - if (typeof path === 'string') { - var lookup = FS.lookupPath(path, { follow: !dontFollow }); - node = lookup.node; - } else { - node = path; - } - if (!node.node_ops.setattr) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - node.node_ops.setattr(node, { - mode: (mode & 4095) | (node.mode & ~4095), - timestamp: Date.now() - }); - },lchmod:function (path, mode) { - FS.chmod(path, mode, true); - },fchmod:function (fd, mode) { - var stream = FS.getStream(fd); - if (!stream) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - FS.chmod(stream.node, mode); - },chown:function (path, uid, gid, dontFollow) { - var node; - if (typeof path === 'string') { - var lookup = FS.lookupPath(path, { follow: !dontFollow }); - node = lookup.node; - } else { - node = path; - } - if (!node.node_ops.setattr) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - node.node_ops.setattr(node, { - timestamp: Date.now() - // we ignore the uid / gid for now - }); - },lchown:function (path, uid, gid) { - FS.chown(path, uid, gid, true); - },fchown:function (fd, uid, gid) { - var stream = FS.getStream(fd); - if (!stream) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - FS.chown(stream.node, uid, gid); - },truncate:function (path, len) { - if (len < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var node; - if (typeof path === 'string') { - var lookup = FS.lookupPath(path, { follow: true }); - node = lookup.node; - } else { - node = path; - } - if (!node.node_ops.setattr) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (FS.isDir(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EISDIR); - } - if (!FS.isFile(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var err = FS.nodePermissions(node, 'w'); - if (err) { - throw new FS.ErrnoError(err); - } - node.node_ops.setattr(node, { - size: len, - timestamp: Date.now() - }); - },ftruncate:function (fd, len) { - var stream = FS.getStream(fd); - if (!stream) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - if ((stream.flags & 2097155) === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - FS.truncate(stream.node, len); - },utime:function (path, atime, mtime) { - var lookup = FS.lookupPath(path, { follow: true }); - var node = lookup.node; - node.node_ops.setattr(node, { - timestamp: Math.max(atime, mtime) - }); - },open:function (path, flags, mode, fd_start, fd_end) { - if (path === "") { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; - mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; - if ((flags & 64)) { - mode = (mode & 4095) | 32768; - } else { - mode = 0; - } - var node; - if (typeof path === 'object') { - node = path; - } else { - path = PATH.normalize(path); - try { - var lookup = FS.lookupPath(path, { - follow: !(flags & 131072) - }); - node = lookup.node; - } catch (e) { - // ignore - } - } - // perhaps we need to create the node - var created = false; - if ((flags & 64)) { - if (node) { - // if O_CREAT and O_EXCL are set, error out if the node already exists - if ((flags & 128)) { - throw new FS.ErrnoError(ERRNO_CODES.EEXIST); - } - } else { - // node doesn't exist, try to create it - node = FS.mknod(path, mode, 0); - created = true; - } - } - if (!node) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - // can't truncate a device - if (FS.isChrdev(node.mode)) { - flags &= ~512; - } - // check permissions, if this is not a file we just created now (it is ok to - // create and write to a file with read-only permissions; it is read-only - // for later use) - if (!created) { - var err = FS.mayOpen(node, flags); - if (err) { - throw new FS.ErrnoError(err); - } - } - // do truncation if necessary - if ((flags & 512)) { - FS.truncate(node, 0); - } - // we've already handled these, don't pass down to the underlying vfs - flags &= ~(128 | 512); - - // register the stream with the filesystem - var stream = FS.createStream({ - node: node, - path: FS.getPath(node), // we want the absolute path to the node - flags: flags, - seekable: true, - position: 0, - stream_ops: node.stream_ops, - // used by the file family libc calls (fopen, fwrite, ferror, etc.) - ungotten: [], - error: false - }, fd_start, fd_end); - // call the new stream's open function - if (stream.stream_ops.open) { - stream.stream_ops.open(stream); - } - if (Module['logReadFiles'] && !(flags & 1)) { - if (!FS.readFiles) FS.readFiles = {}; - if (!(path in FS.readFiles)) { - FS.readFiles[path] = 1; - Module['printErr']('read file: ' + path); - } - } - try { - if (FS.trackingDelegate['onOpenFile']) { - var trackingFlags = 0; - if ((flags & 2097155) !== 1) { - trackingFlags |= FS.tracking.openFlags.READ; - } - if ((flags & 2097155) !== 0) { - trackingFlags |= FS.tracking.openFlags.WRITE; - } - FS.trackingDelegate['onOpenFile'](path, trackingFlags); - } - } catch(e) { - console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message); - } - return stream; - },close:function (stream) { - try { - if (stream.stream_ops.close) { - stream.stream_ops.close(stream); - } - } catch (e) { - throw e; - } finally { - FS.closeStream(stream.fd); - } - },llseek:function (stream, offset, whence) { - if (!stream.seekable || !stream.stream_ops.llseek) { - throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); - } - stream.position = stream.stream_ops.llseek(stream, offset, whence); - stream.ungotten = []; - return stream.position; - },read:function (stream, buffer, offset, length, position) { - if (length < 0 || position < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - if ((stream.flags & 2097155) === 1) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - if (FS.isDir(stream.node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EISDIR); - } - if (!stream.stream_ops.read) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var seeking = true; - if (typeof position === 'undefined') { - position = stream.position; - seeking = false; - } else if (!stream.seekable) { - throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); - } - var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); - if (!seeking) stream.position += bytesRead; - return bytesRead; - },write:function (stream, buffer, offset, length, position, canOwn) { - if (length < 0 || position < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - if ((stream.flags & 2097155) === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - if (FS.isDir(stream.node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EISDIR); - } - if (!stream.stream_ops.write) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - if (stream.flags & 1024) { - // seek to the end before writing in append mode - FS.llseek(stream, 0, 2); - } - var seeking = true; - if (typeof position === 'undefined') { - position = stream.position; - seeking = false; - } else if (!stream.seekable) { - throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); - } - var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); - if (!seeking) stream.position += bytesWritten; - try { - if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); - } catch(e) { - console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: " + e.message); - } - return bytesWritten; - },allocate:function (stream, offset, length) { - if (offset < 0 || length <= 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - if ((stream.flags & 2097155) === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - if (!FS.isFile(stream.node.mode) && !FS.isDir(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.ENODEV); - } - if (!stream.stream_ops.allocate) { - throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP); - } - stream.stream_ops.allocate(stream, offset, length); - },mmap:function (stream, buffer, offset, length, position, prot, flags) { - // TODO if PROT is PROT_WRITE, make sure we have write access - if ((stream.flags & 2097155) === 1) { - throw new FS.ErrnoError(ERRNO_CODES.EACCES); - } - if (!stream.stream_ops.mmap) { - throw new FS.ErrnoError(ERRNO_CODES.ENODEV); - } - return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); - },ioctl:function (stream, cmd, arg) { - if (!stream.stream_ops.ioctl) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTTY); - } - return stream.stream_ops.ioctl(stream, cmd, arg); - },readFile:function (path, opts) { - opts = opts || {}; - opts.flags = opts.flags || 'r'; - opts.encoding = opts.encoding || 'binary'; - if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { - throw new Error('Invalid encoding type "' + opts.encoding + '"'); - } - var ret; - var stream = FS.open(path, opts.flags); - var stat = FS.stat(path); - var length = stat.size; - var buf = new Uint8Array(length); - FS.read(stream, buf, 0, length, 0); - if (opts.encoding === 'utf8') { - ret = ''; - var utf8 = new Runtime.UTF8Processor(); - for (var i = 0; i < length; i++) { - ret += utf8.processCChar(buf[i]); - } - } else if (opts.encoding === 'binary') { - ret = buf; - } - FS.close(stream); - return ret; - },writeFile:function (path, data, opts) { - opts = opts || {}; - opts.flags = opts.flags || 'w'; - opts.encoding = opts.encoding || 'utf8'; - if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { - throw new Error('Invalid encoding type "' + opts.encoding + '"'); - } - var stream = FS.open(path, opts.flags, opts.mode); - if (opts.encoding === 'utf8') { - var utf8 = new Runtime.UTF8Processor(); - var buf = new Uint8Array(utf8.processJSString(data)); - FS.write(stream, buf, 0, buf.length, 0, opts.canOwn); - } else if (opts.encoding === 'binary') { - FS.write(stream, data, 0, data.length, 0, opts.canOwn); - } - FS.close(stream); - },cwd:function () { - return FS.currentPath; - },chdir:function (path) { - var lookup = FS.lookupPath(path, { follow: true }); - if (!FS.isDir(lookup.node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); - } - var err = FS.nodePermissions(lookup.node, 'x'); - if (err) { - throw new FS.ErrnoError(err); - } - FS.currentPath = lookup.path; - },createDefaultDirectories:function () { - FS.mkdir('/tmp'); - FS.mkdir('/home'); - FS.mkdir('/home/web_user'); - },createDefaultDevices:function () { - // create /dev - FS.mkdir('/dev'); - // setup /dev/null - FS.registerDevice(FS.makedev(1, 3), { - read: function() { return 0; }, - write: function() { return 0; } - }); - FS.mkdev('/dev/null', FS.makedev(1, 3)); - // setup /dev/tty and /dev/tty1 - // stderr needs to print output using Module['printErr'] - // so we register a second tty just for it. - TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); - TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); - FS.mkdev('/dev/tty', FS.makedev(5, 0)); - FS.mkdev('/dev/tty1', FS.makedev(6, 0)); - // setup /dev/[u]random - var random_device; - if (typeof crypto !== 'undefined') { - // for modern web browsers - var randomBuffer = new Uint8Array(1); - random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; - } else if (ENVIRONMENT_IS_NODE) { - // for nodejs - random_device = function() { return require('crypto').randomBytes(1)[0]; }; - } else { - // default for ES5 platforms - random_device = function() { return (Math.random()*256)|0; }; - } - FS.createDevice('/dev', 'random', random_device); - FS.createDevice('/dev', 'urandom', random_device); - // we're not going to emulate the actual shm device, - // just create the tmp dirs that reside in it commonly - FS.mkdir('/dev/shm'); - FS.mkdir('/dev/shm/tmp'); - },createStandardStreams:function () { - // TODO deprecate the old functionality of a single - // input / output callback and that utilizes FS.createDevice - // and instead require a unique set of stream ops - - // by default, we symlink the standard streams to the - // default tty devices. however, if the standard streams - // have been overwritten we create a unique device for - // them instead. - if (Module['stdin']) { - FS.createDevice('/dev', 'stdin', Module['stdin']); - } else { - FS.symlink('/dev/tty', '/dev/stdin'); - } - if (Module['stdout']) { - FS.createDevice('/dev', 'stdout', null, Module['stdout']); - } else { - FS.symlink('/dev/tty', '/dev/stdout'); - } - if (Module['stderr']) { - FS.createDevice('/dev', 'stderr', null, Module['stderr']); - } else { - FS.symlink('/dev/tty1', '/dev/stderr'); - } - - // open default streams for the stdin, stdout and stderr devices - var stdin = FS.open('/dev/stdin', 'r'); - HEAP32[((_stdin)>>2)]=FS.getPtrForStream(stdin); - assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); - - var stdout = FS.open('/dev/stdout', 'w'); - HEAP32[((_stdout)>>2)]=FS.getPtrForStream(stdout); - assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); - - var stderr = FS.open('/dev/stderr', 'w'); - HEAP32[((_stderr)>>2)]=FS.getPtrForStream(stderr); - assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); - },ensureErrnoError:function () { - if (FS.ErrnoError) return; - FS.ErrnoError = function ErrnoError(errno, node) { - this.node = node; - this.setErrno = function(errno) { - this.errno = errno; - for (var key in ERRNO_CODES) { - if (ERRNO_CODES[key] === errno) { - this.code = key; - break; - } - } - }; - this.setErrno(errno); - this.message = ERRNO_MESSAGES[errno]; - }; - FS.ErrnoError.prototype = new Error(); - FS.ErrnoError.prototype.constructor = FS.ErrnoError; - // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) - [ERRNO_CODES.ENOENT].forEach(function(code) { - FS.genericErrors[code] = new FS.ErrnoError(code); - FS.genericErrors[code].stack = ''; - }); - },staticInit:function () { - FS.ensureErrnoError(); - - FS.nameTable = new Array(4096); - - FS.mount(MEMFS, {}, '/'); - - FS.createDefaultDirectories(); - FS.createDefaultDevices(); - },init:function (input, output, error) { - assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); - FS.init.initialized = true; - - FS.ensureErrnoError(); - - // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here - Module['stdin'] = input || Module['stdin']; - Module['stdout'] = output || Module['stdout']; - Module['stderr'] = error || Module['stderr']; - - FS.createStandardStreams(); - },quit:function () { - FS.init.initialized = false; - for (var i = 0; i < FS.streams.length; i++) { - var stream = FS.streams[i]; - if (!stream) { - continue; - } - FS.close(stream); - } - },getMode:function (canRead, canWrite) { - var mode = 0; - if (canRead) mode |= 292 | 73; - if (canWrite) mode |= 146; - return mode; - },joinPath:function (parts, forceRelative) { - var path = PATH.join.apply(null, parts); - if (forceRelative && path[0] == '/') path = path.substr(1); - return path; - },absolutePath:function (relative, base) { - return PATH.resolve(base, relative); - },standardizePath:function (path) { - return PATH.normalize(path); - },findObject:function (path, dontResolveLastLink) { - var ret = FS.analyzePath(path, dontResolveLastLink); - if (ret.exists) { - return ret.object; - } else { - ___setErrNo(ret.error); - return null; - } - },analyzePath:function (path, dontResolveLastLink) { - // operate from within the context of the symlink's target - try { - var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); - path = lookup.path; - } catch (e) { - } - var ret = { - isRoot: false, exists: false, error: 0, name: null, path: null, object: null, - parentExists: false, parentPath: null, parentObject: null - }; - try { - var lookup = FS.lookupPath(path, { parent: true }); - ret.parentExists = true; - ret.parentPath = lookup.path; - ret.parentObject = lookup.node; - ret.name = PATH.basename(path); - lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); - ret.exists = true; - ret.path = lookup.path; - ret.object = lookup.node; - ret.name = lookup.node.name; - ret.isRoot = lookup.path === '/'; - } catch (e) { - ret.error = e.errno; - }; - return ret; - },createFolder:function (parent, name, canRead, canWrite) { - var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); - var mode = FS.getMode(canRead, canWrite); - return FS.mkdir(path, mode); - },createPath:function (parent, path, canRead, canWrite) { - parent = typeof parent === 'string' ? parent : FS.getPath(parent); - var parts = path.split('/').reverse(); - while (parts.length) { - var part = parts.pop(); - if (!part) continue; - var current = PATH.join2(parent, part); - try { - FS.mkdir(current); - } catch (e) { - // ignore EEXIST - } - parent = current; - } - return current; - },createFile:function (parent, name, properties, canRead, canWrite) { - var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); - var mode = FS.getMode(canRead, canWrite); - return FS.create(path, mode); - },createDataFile:function (parent, name, data, canRead, canWrite, canOwn) { - var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; - var mode = FS.getMode(canRead, canWrite); - var node = FS.create(path, mode); - if (data) { - if (typeof data === 'string') { - var arr = new Array(data.length); - for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); - data = arr; - } - // make sure we can write to the file - FS.chmod(node, mode | 146); - var stream = FS.open(node, 'w'); - FS.write(stream, data, 0, data.length, 0, canOwn); - FS.close(stream); - FS.chmod(node, mode); - } - return node; - },createDevice:function (parent, name, input, output) { - var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); - var mode = FS.getMode(!!input, !!output); - if (!FS.createDevice.major) FS.createDevice.major = 64; - var dev = FS.makedev(FS.createDevice.major++, 0); - // Create a fake device that a set of stream ops to emulate - // the old behavior. - FS.registerDevice(dev, { - open: function(stream) { - stream.seekable = false; - }, - close: function(stream) { - // flush any pending line data - if (output && output.buffer && output.buffer.length) { - output(10); - } - }, - read: function(stream, buffer, offset, length, pos /* ignored */) { - var bytesRead = 0; - for (var i = 0; i < length; i++) { - var result; - try { - result = input(); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - if (result === undefined && bytesRead === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); - } - if (result === null || result === undefined) break; - bytesRead++; - buffer[offset+i] = result; - } - if (bytesRead) { - stream.node.timestamp = Date.now(); - } - return bytesRead; - }, - write: function(stream, buffer, offset, length, pos) { - for (var i = 0; i < length; i++) { - try { - output(buffer[offset+i]); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - } - if (length) { - stream.node.timestamp = Date.now(); - } - return i; - } - }); - return FS.mkdev(path, mode, dev); - },createLink:function (parent, name, target, canRead, canWrite) { - var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); - return FS.symlink(target, path); - },forceLoadFile:function (obj) { - if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; - var success = true; - if (typeof XMLHttpRequest !== 'undefined') { - throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); - } else if (Module['read']) { - // Command-line. - try { - // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as - // read() will try to parse UTF8. - obj.contents = intArrayFromString(Module['read'](obj.url), true); - obj.usedBytes = obj.contents.length; - } catch (e) { - success = false; - } - } else { - throw new Error('Cannot load without read() or XMLHttpRequest.'); - } - if (!success) ___setErrNo(ERRNO_CODES.EIO); - return success; - },createLazyFile:function (parent, name, url, canRead, canWrite) { - // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. - function LazyUint8Array() { - this.lengthKnown = false; - this.chunks = []; // Loaded chunks. Index is the chunk number - } - LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { - if (idx > this.length-1 || idx < 0) { - return undefined; - } - var chunkOffset = idx % this.chunkSize; - var chunkNum = (idx / this.chunkSize)|0; - return this.getter(chunkNum)[chunkOffset]; - } - LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { - this.getter = getter; - } - LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { - // Find length - var xhr = new XMLHttpRequest(); - xhr.open('HEAD', url, false); - xhr.send(null); - if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); - var datalength = Number(xhr.getResponseHeader("Content-length")); - var header; - var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; - var chunkSize = 1024*1024; // Chunk size in bytes - - if (!hasByteServing) chunkSize = datalength; - - // Function to get a range from the remote URL. - var doXHR = (function(from, to) { - if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); - if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); - - // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, false); - if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); - - // Some hints to the browser that we want binary data. - if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; - if (xhr.overrideMimeType) { - xhr.overrideMimeType('text/plain; charset=x-user-defined'); - } - - xhr.send(null); - if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); - if (xhr.response !== undefined) { - return new Uint8Array(xhr.response || []); - } else { - return intArrayFromString(xhr.responseText || '', true); - } - }); - var lazyArray = this; - lazyArray.setDataGetter(function(chunkNum) { - var start = chunkNum * chunkSize; - var end = (chunkNum+1) * chunkSize - 1; // including this byte - end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block - if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { - lazyArray.chunks[chunkNum] = doXHR(start, end); - } - if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); - return lazyArray.chunks[chunkNum]; - }); - - this._length = datalength; - this._chunkSize = chunkSize; - this.lengthKnown = true; - } - if (typeof XMLHttpRequest !== 'undefined') { - if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; - var lazyArray = new LazyUint8Array(); - Object.defineProperty(lazyArray, "length", { - get: function() { - if(!this.lengthKnown) { - this.cacheLength(); - } - return this._length; - } - }); - Object.defineProperty(lazyArray, "chunkSize", { - get: function() { - if(!this.lengthKnown) { - this.cacheLength(); - } - return this._chunkSize; - } - }); - - var properties = { isDevice: false, contents: lazyArray }; - } else { - var properties = { isDevice: false, url: url }; - } - - var node = FS.createFile(parent, name, properties, canRead, canWrite); - // This is a total hack, but I want to get this lazy file code out of the - // core of MEMFS. If we want to keep this lazy file concept I feel it should - // be its own thin LAZYFS proxying calls to MEMFS. - if (properties.contents) { - node.contents = properties.contents; - } else if (properties.url) { - node.contents = null; - node.url = properties.url; - } - // Add a function that defers querying the file size until it is asked the first time. - Object.defineProperty(node, "usedBytes", { - get: function() { return this.contents.length; } - }); - // override each stream op with one that tries to force load the lazy file first - var stream_ops = {}; - var keys = Object.keys(node.stream_ops); - keys.forEach(function(key) { - var fn = node.stream_ops[key]; - stream_ops[key] = function forceLoadLazyFile() { - if (!FS.forceLoadFile(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - return fn.apply(null, arguments); - }; - }); - // use a custom read function - stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { - if (!FS.forceLoadFile(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - var contents = stream.node.contents; - if (position >= contents.length) - return 0; - var size = Math.min(contents.length - position, length); - assert(size >= 0); - if (contents.slice) { // normal array - for (var i = 0; i < size; i++) { - buffer[offset + i] = contents[position + i]; - } - } else { - for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR - buffer[offset + i] = contents.get(position + i); - } - } - return size; - }; - node.stream_ops = stream_ops; - return node; - },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn) { - Browser.init(); - // TODO we should allow people to just pass in a complete filename instead - // of parent and name being that we just join them anyways - var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent; - function processData(byteArray) { - function finish(byteArray) { - if (!dontCreateFile) { - FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); - } - if (onload) onload(); - removeRunDependency('cp ' + fullname); - } - var handled = false; - Module['preloadPlugins'].forEach(function(plugin) { - if (handled) return; - if (plugin['canHandle'](fullname)) { - plugin['handle'](byteArray, fullname, finish, function() { - if (onerror) onerror(); - removeRunDependency('cp ' + fullname); - }); - handled = true; - } - }); - if (!handled) finish(byteArray); - } - addRunDependency('cp ' + fullname); - if (typeof url == 'string') { - Browser.asyncLoad(url, function(byteArray) { - processData(byteArray); - }, onerror); - } else { - processData(url); - } - },indexedDB:function () { - return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; - },DB_NAME:function () { - return 'EM_FS_' + window.location.pathname; - },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function (paths, onload, onerror) { - onload = onload || function(){}; - onerror = onerror || function(){}; - var indexedDB = FS.indexedDB(); - try { - var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); - } catch (e) { - return onerror(e); - } - openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { - console.log('creating db'); - var db = openRequest.result; - db.createObjectStore(FS.DB_STORE_NAME); - }; - openRequest.onsuccess = function openRequest_onsuccess() { - var db = openRequest.result; - var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); - var files = transaction.objectStore(FS.DB_STORE_NAME); - var ok = 0, fail = 0, total = paths.length; - function finish() { - if (fail == 0) onload(); else onerror(); - } - paths.forEach(function(path) { - var putRequest = files.put(FS.analyzePath(path).object.contents, path); - putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; - putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; - }); - transaction.onerror = onerror; - }; - openRequest.onerror = onerror; - },loadFilesFromDB:function (paths, onload, onerror) { - onload = onload || function(){}; - onerror = onerror || function(){}; - var indexedDB = FS.indexedDB(); - try { - var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); - } catch (e) { - return onerror(e); - } - openRequest.onupgradeneeded = onerror; // no database to load from - openRequest.onsuccess = function openRequest_onsuccess() { - var db = openRequest.result; - try { - var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); - } catch(e) { - onerror(e); - return; - } - var files = transaction.objectStore(FS.DB_STORE_NAME); - var ok = 0, fail = 0, total = paths.length; - function finish() { - if (fail == 0) onload(); else onerror(); - } - paths.forEach(function(path) { - var getRequest = files.get(path); - getRequest.onsuccess = function getRequest_onsuccess() { - if (FS.analyzePath(path).exists) { - FS.unlink(path); - } - FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); - ok++; - if (ok + fail == total) finish(); - }; - getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; - }); - transaction.onerror = onerror; - }; - openRequest.onerror = onerror; - }};var PATH={splitPath:function (filename) { - var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; - return splitPathRe.exec(filename).slice(1); - },normalizeArray:function (parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - return parts; - },normalize:function (path) { - var isAbsolute = path.charAt(0) === '/', - trailingSlash = path.substr(-1) === '/'; - // Normalize the path - path = PATH.normalizeArray(path.split('/').filter(function(p) { - return !!p; - }), !isAbsolute).join('/'); - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - return (isAbsolute ? '/' : '') + path; - },dirname:function (path) { - var result = PATH.splitPath(path), - root = result[0], - dir = result[1]; - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - return root + dir; - },basename:function (path) { - // EMSCRIPTEN return '/'' for '/', not an empty string - if (path === '/') return '/'; - var lastSlash = path.lastIndexOf('/'); - if (lastSlash === -1) return path; - return path.substr(lastSlash+1); - },extname:function (path) { - return PATH.splitPath(path)[3]; - },join:function () { - var paths = Array.prototype.slice.call(arguments, 0); - return PATH.normalize(paths.join('/')); - },join2:function (l, r) { - return PATH.normalize(l + '/' + r); - },resolve:function () { - var resolvedPath = '', - resolvedAbsolute = false; - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : FS.cwd(); - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - return ''; // an invalid portion invalidates the whole thing - } - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; - },relative:function (from, to) { - from = PATH.resolve(from).substr(1); - to = PATH.resolve(to).substr(1); - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - return outputParts.join('/'); - }}; - - - function _emscripten_set_main_loop_timing(mode, value) { - Browser.mainLoop.timingMode = mode; - Browser.mainLoop.timingValue = value; - - if (!Browser.mainLoop.func) { - return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. - } - - if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { - setTimeout(Browser.mainLoop.runner, value); // doing this each time means that on exception, we stop - }; - Browser.mainLoop.method = 'timeout'; - } else if (mode == 1 /*EM_TIMING_RAF*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { - Browser.requestAnimationFrame(Browser.mainLoop.runner); - }; - Browser.mainLoop.method = 'rAF'; - } - return 0; - }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg) { - Module['noExitRuntime'] = true; - - assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); - - Browser.mainLoop.func = func; - Browser.mainLoop.arg = arg; - - var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; - - Browser.mainLoop.runner = function Browser_mainLoop_runner() { - if (ABORT) return; - if (Browser.mainLoop.queue.length > 0) { - var start = Date.now(); - var blocker = Browser.mainLoop.queue.shift(); - blocker.func(blocker.arg); - if (Browser.mainLoop.remainingBlockers) { - var remaining = Browser.mainLoop.remainingBlockers; - var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining); - if (blocker.counted) { - Browser.mainLoop.remainingBlockers = next; - } else { - // not counted, but move the progress along a tiny bit - next = next + 0.5; // do not steal all the next one's progress - Browser.mainLoop.remainingBlockers = (8*remaining + next)/9; - } - } - console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers); - Browser.mainLoop.updateStatus(); - setTimeout(Browser.mainLoop.runner, 0); - return; - } - - // catch pauses from non-main loop sources - if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; - - // Implement very basic swap interval control - Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; - if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { - // Not the scheduled time to render this frame - skip. - Browser.mainLoop.scheduler(); - return; - } - - // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize - // VBO double-buffering and reduce GPU stalls. - - if (Browser.mainLoop.method === 'timeout' && Module.ctx) { - Module.printErr('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!'); - Browser.mainLoop.method = ''; // just warn once per call to set main loop - } - - Browser.mainLoop.runIter(function() { - if (typeof arg !== 'undefined') { - Runtime.dynCall('vi', func, [arg]); - } else { - Runtime.dynCall('v', func); - } - }); - - // catch pauses from the main loop itself - if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; - - // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able - // to queue the newest produced audio samples. - // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData() - // do not need to be hardcoded into this function, but can be more generic. - if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData(); - - Browser.mainLoop.scheduler(); - } - - if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); - else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) - - Browser.mainLoop.scheduler(); - - if (simulateInfiniteLoop) { - throw 'SimulateInfiniteLoop'; - } - }var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function () { - Browser.mainLoop.scheduler = null; - Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return. - },resume:function () { - Browser.mainLoop.currentlyRunningMainloop++; - var timingMode = Browser.mainLoop.timingMode; - var timingValue = Browser.mainLoop.timingValue; - var func = Browser.mainLoop.func; - Browser.mainLoop.func = null; - _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg); - _emscripten_set_main_loop_timing(timingMode, timingValue); - },updateStatus:function () { - if (Module['setStatus']) { - var message = Module['statusMessage'] || 'Please wait...'; - var remaining = Browser.mainLoop.remainingBlockers; - var expected = Browser.mainLoop.expectedBlockers; - if (remaining) { - if (remaining < expected) { - Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); - } else { - Module['setStatus'](message); - } - } else { - Module['setStatus'](''); - } - } - },runIter:function (func) { - if (ABORT) return; - if (Module['preMainLoop']) { - var preRet = Module['preMainLoop'](); - if (preRet === false) { - return; // |return false| skips a frame - } - } - try { - func(); - } catch (e) { - if (e instanceof ExitStatus) { - return; - } else { - if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]); - throw e; - } - } - if (Module['postMainLoop']) Module['postMainLoop'](); - }},isFullScreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function () { - if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers - - if (Browser.initted) return; - Browser.initted = true; - - try { - new Blob(); - Browser.hasBlobConstructor = true; - } catch(e) { - Browser.hasBlobConstructor = false; - console.log("warning: no blob constructor, cannot create blobs with mimetypes"); - } - Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); - Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; - if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') { - console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); - Module.noImageDecoding = true; - } - - // Support for plugins that can process preloaded files. You can add more of these to - // your app by creating and appending to Module.preloadPlugins. - // - // Each plugin is asked if it can handle a file based on the file's name. If it can, - // it is given the file's raw data. When it is done, it calls a callback with the file's - // (possibly modified) data. For example, a plugin might decompress a file, or it - // might create some side data structure for use later (like an Image element, etc.). - - var imagePlugin = {}; - imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { - return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); - }; - imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { - var b = null; - if (Browser.hasBlobConstructor) { - try { - b = new Blob([byteArray], { type: Browser.getMimetype(name) }); - if (b.size !== byteArray.length) { // Safari bug #118630 - // Safari's Blob can only take an ArrayBuffer - b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); - } - } catch(e) { - Runtime.warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); - } - } - if (!b) { - var bb = new Browser.BlobBuilder(); - bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range - b = bb.getBlob(); - } - var url = Browser.URLObject.createObjectURL(b); - var img = new Image(); - img.onload = function img_onload() { - assert(img.complete, 'Image ' + name + ' could not be decoded'); - var canvas = document.createElement('canvas'); - canvas.width = img.width; - canvas.height = img.height; - var ctx = canvas.getContext('2d'); - ctx.drawImage(img, 0, 0); - Module["preloadedImages"][name] = canvas; - Browser.URLObject.revokeObjectURL(url); - if (onload) onload(byteArray); - }; - img.onerror = function img_onerror(event) { - console.log('Image ' + url + ' could not be decoded'); - if (onerror) onerror(); - }; - img.src = url; - }; - Module['preloadPlugins'].push(imagePlugin); - - var audioPlugin = {}; - audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { - return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; - }; - audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { - var done = false; - function finish(audio) { - if (done) return; - done = true; - Module["preloadedAudios"][name] = audio; - if (onload) onload(byteArray); - } - function fail() { - if (done) return; - done = true; - Module["preloadedAudios"][name] = new Audio(); // empty shim - if (onerror) onerror(); - } - if (Browser.hasBlobConstructor) { - try { - var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); - } catch(e) { - return fail(); - } - var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! - var audio = new Audio(); - audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 - audio.onerror = function audio_onerror(event) { - if (done) return; - console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); - function encode64(data) { - var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - var PAD = '='; - var ret = ''; - var leftchar = 0; - var leftbits = 0; - for (var i = 0; i < data.length; i++) { - leftchar = (leftchar << 8) | data[i]; - leftbits += 8; - while (leftbits >= 6) { - var curr = (leftchar >> (leftbits-6)) & 0x3f; - leftbits -= 6; - ret += BASE[curr]; - } - } - if (leftbits == 2) { - ret += BASE[(leftchar&3) << 4]; - ret += PAD + PAD; - } else if (leftbits == 4) { - ret += BASE[(leftchar&0xf) << 2]; - ret += PAD; - } - return ret; - } - audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); - finish(audio); // we don't wait for confirmation this worked - but it's worth trying - }; - audio.src = url; - // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror - Browser.safeSetTimeout(function() { - finish(audio); // try to use it even though it is not necessarily ready to play - }, 10000); - } else { - return fail(); - } - }; - Module['preloadPlugins'].push(audioPlugin); - - // Canvas event setup - - var canvas = Module['canvas']; - function pointerLockChange() { - Browser.pointerLock = document['pointerLockElement'] === canvas || - document['mozPointerLockElement'] === canvas || - document['webkitPointerLockElement'] === canvas || - document['msPointerLockElement'] === canvas; - } - if (canvas) { - // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module - // Module['forcedAspectRatio'] = 4 / 3; - - canvas.requestPointerLock = canvas['requestPointerLock'] || - canvas['mozRequestPointerLock'] || - canvas['webkitRequestPointerLock'] || - canvas['msRequestPointerLock'] || - function(){}; - canvas.exitPointerLock = document['exitPointerLock'] || - document['mozExitPointerLock'] || - document['webkitExitPointerLock'] || - document['msExitPointerLock'] || - function(){}; // no-op if function does not exist - canvas.exitPointerLock = canvas.exitPointerLock.bind(document); - - - document.addEventListener('pointerlockchange', pointerLockChange, false); - document.addEventListener('mozpointerlockchange', pointerLockChange, false); - document.addEventListener('webkitpointerlockchange', pointerLockChange, false); - document.addEventListener('mspointerlockchange', pointerLockChange, false); - - if (Module['elementPointerLock']) { - canvas.addEventListener("click", function(ev) { - if (!Browser.pointerLock && canvas.requestPointerLock) { - canvas.requestPointerLock(); - ev.preventDefault(); - } - }, false); - } - } - },createContext:function (canvas, useWebGL, setInModule, webGLContextAttributes) { - if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas. - - var ctx; - var contextHandle; - if (useWebGL) { - // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults. - var contextAttributes = { - antialias: false, - alpha: false - }; - - if (webGLContextAttributes) { - for (var attribute in webGLContextAttributes) { - contextAttributes[attribute] = webGLContextAttributes[attribute]; - } - } - - contextHandle = GL.createContext(canvas, contextAttributes); - if (contextHandle) { - ctx = GL.getContext(contextHandle).GLctx; - } - // Set the background of the WebGL canvas to black - canvas.style.backgroundColor = "black"; - } else { - ctx = canvas.getContext('2d'); - } - - if (!ctx) return null; - - if (setInModule) { - if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'); - - Module.ctx = ctx; - if (useWebGL) GL.makeContextCurrent(contextHandle); - Module.useWebGL = useWebGL; - Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); - Browser.init(); - } - return ctx; - },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas) { - Browser.lockPointer = lockPointer; - Browser.resizeCanvas = resizeCanvas; - if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; - if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; - - var canvas = Module['canvas']; - function fullScreenChange() { - Browser.isFullScreen = false; - var canvasContainer = canvas.parentNode; - if ((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] || - document['mozFullScreenElement'] || document['mozFullscreenElement'] || - document['fullScreenElement'] || document['fullscreenElement'] || - document['msFullScreenElement'] || document['msFullscreenElement'] || - document['webkitCurrentFullScreenElement']) === canvasContainer) { - canvas.cancelFullScreen = document['cancelFullScreen'] || - document['mozCancelFullScreen'] || - document['webkitCancelFullScreen'] || - document['msExitFullscreen'] || - document['exitFullscreen'] || - function() {}; - canvas.cancelFullScreen = canvas.cancelFullScreen.bind(document); - if (Browser.lockPointer) canvas.requestPointerLock(); - Browser.isFullScreen = true; - if (Browser.resizeCanvas) Browser.setFullScreenCanvasSize(); - } else { - - // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen - canvasContainer.parentNode.insertBefore(canvas, canvasContainer); - canvasContainer.parentNode.removeChild(canvasContainer); - - if (Browser.resizeCanvas) Browser.setWindowedCanvasSize(); - } - if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullScreen); - Browser.updateCanvasDimensions(canvas); - } - - if (!Browser.fullScreenHandlersInstalled) { - Browser.fullScreenHandlersInstalled = true; - document.addEventListener('fullscreenchange', fullScreenChange, false); - document.addEventListener('mozfullscreenchange', fullScreenChange, false); - document.addEventListener('webkitfullscreenchange', fullScreenChange, false); - document.addEventListener('MSFullscreenChange', fullScreenChange, false); - } - - // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root - var canvasContainer = document.createElement("div"); - canvas.parentNode.insertBefore(canvasContainer, canvas); - canvasContainer.appendChild(canvas); - - // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) - canvasContainer.requestFullScreen = canvasContainer['requestFullScreen'] || - canvasContainer['mozRequestFullScreen'] || - canvasContainer['msRequestFullscreen'] || - (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); - canvasContainer.requestFullScreen(); - },nextRAF:0,fakeRequestAnimationFrame:function (func) { - // try to keep 60fps between calls to here - var now = Date.now(); - if (Browser.nextRAF === 0) { - Browser.nextRAF = now + 1000/60; - } else { - while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0 - Browser.nextRAF += 1000/60; - } - } - var delay = Math.max(Browser.nextRAF - now, 0); - setTimeout(func, delay); - },requestAnimationFrame:function requestAnimationFrame(func) { - if (typeof window === 'undefined') { // Provide fallback to setTimeout if window is undefined (e.g. in Node.js) - Browser.fakeRequestAnimationFrame(func); - } else { - if (!window.requestAnimationFrame) { - window.requestAnimationFrame = window['requestAnimationFrame'] || - window['mozRequestAnimationFrame'] || - window['webkitRequestAnimationFrame'] || - window['msRequestAnimationFrame'] || - window['oRequestAnimationFrame'] || - Browser.fakeRequestAnimationFrame; - } - window.requestAnimationFrame(func); - } - },safeCallback:function (func) { - return function() { - if (!ABORT) return func.apply(null, arguments); - }; - },safeRequestAnimationFrame:function (func) { - return Browser.requestAnimationFrame(function() { - if (!ABORT) func(); - }); - },safeSetTimeout:function (func, timeout) { - Module['noExitRuntime'] = true; - return setTimeout(function() { - if (!ABORT) func(); - }, timeout); - },safeSetInterval:function (func, timeout) { - Module['noExitRuntime'] = true; - return setInterval(function() { - if (!ABORT) func(); - }, timeout); - },getMimetype:function (name) { - return { - 'jpg': 'image/jpeg', - 'jpeg': 'image/jpeg', - 'png': 'image/png', - 'bmp': 'image/bmp', - 'ogg': 'audio/ogg', - 'wav': 'audio/wav', - 'mp3': 'audio/mpeg' - }[name.substr(name.lastIndexOf('.')+1)]; - },getUserMedia:function (func) { - if(!window.getUserMedia) { - window.getUserMedia = navigator['getUserMedia'] || - navigator['mozGetUserMedia']; - } - window.getUserMedia(func); - },getMovementX:function (event) { - return event['movementX'] || - event['mozMovementX'] || - event['webkitMovementX'] || - 0; - },getMovementY:function (event) { - return event['movementY'] || - event['mozMovementY'] || - event['webkitMovementY'] || - 0; - },getMouseWheelDelta:function (event) { - var delta = 0; - switch (event.type) { - case 'DOMMouseScroll': - delta = event.detail; - break; - case 'mousewheel': - delta = event.wheelDelta; - break; - case 'wheel': - delta = event['deltaY']; - break; - default: - throw 'unrecognized mouse wheel event: ' + event.type; - } - return delta; - },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function (event) { // event should be mousemove, mousedown or mouseup - if (Browser.pointerLock) { - // When the pointer is locked, calculate the coordinates - // based on the movement of the mouse. - // Workaround for Firefox bug 764498 - if (event.type != 'mousemove' && - ('mozMovementX' in event)) { - Browser.mouseMovementX = Browser.mouseMovementY = 0; - } else { - Browser.mouseMovementX = Browser.getMovementX(event); - Browser.mouseMovementY = Browser.getMovementY(event); - } - - // check if SDL is available - if (typeof SDL != "undefined") { - Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; - Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; - } else { - // just add the mouse delta to the current absolut mouse position - // FIXME: ideally this should be clamped against the canvas size and zero - Browser.mouseX += Browser.mouseMovementX; - Browser.mouseY += Browser.mouseMovementY; - } - } else { - // Otherwise, calculate the movement based on the changes - // in the coordinates. - var rect = Module["canvas"].getBoundingClientRect(); - var cw = Module["canvas"].width; - var ch = Module["canvas"].height; - - // Neither .scrollX or .pageXOffset are defined in a spec, but - // we prefer .scrollX because it is currently in a spec draft. - // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) - var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); - var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); - - if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') { - var touch = event.touch; - if (touch === undefined) { - return; // the "touch" property is only defined in SDL - - } - var adjustedX = touch.pageX - (scrollX + rect.left); - var adjustedY = touch.pageY - (scrollY + rect.top); - - adjustedX = adjustedX * (cw / rect.width); - adjustedY = adjustedY * (ch / rect.height); - - var coords = { x: adjustedX, y: adjustedY }; - - if (event.type === 'touchstart') { - Browser.lastTouches[touch.identifier] = coords; - Browser.touches[touch.identifier] = coords; - } else if (event.type === 'touchend' || event.type === 'touchmove') { - Browser.lastTouches[touch.identifier] = Browser.touches[touch.identifier]; - Browser.touches[touch.identifier] = { x: adjustedX, y: adjustedY }; - } - return; - } - - var x = event.pageX - (scrollX + rect.left); - var y = event.pageY - (scrollY + rect.top); - - // the canvas might be CSS-scaled compared to its backbuffer; - // SDL-using content will want mouse coordinates in terms - // of backbuffer units. - x = x * (cw / rect.width); - y = y * (ch / rect.height); - - Browser.mouseMovementX = x - Browser.mouseX; - Browser.mouseMovementY = y - Browser.mouseY; - Browser.mouseX = x; - Browser.mouseY = y; - } - },xhrLoad:function (url, onload, onerror) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.responseType = 'arraybuffer'; - xhr.onload = function xhr_onload() { - if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 - onload(xhr.response); - } else { - onerror(); - } - }; - xhr.onerror = onerror; - xhr.send(null); - },asyncLoad:function (url, onload, onerror, noRunDep) { - Browser.xhrLoad(url, function(arrayBuffer) { - assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); - onload(new Uint8Array(arrayBuffer)); - if (!noRunDep) removeRunDependency('al ' + url); - }, function(event) { - if (onerror) { - onerror(); - } else { - throw 'Loading data file "' + url + '" failed.'; - } - }); - if (!noRunDep) addRunDependency('al ' + url); - },resizeListeners:[],updateResizeListeners:function () { - var canvas = Module['canvas']; - Browser.resizeListeners.forEach(function(listener) { - listener(canvas.width, canvas.height); - }); - },setCanvasSize:function (width, height, noUpdates) { - var canvas = Module['canvas']; - Browser.updateCanvasDimensions(canvas, width, height); - if (!noUpdates) Browser.updateResizeListeners(); - },windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function () { - // check if SDL is available - if (typeof SDL != "undefined") { - var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; - flags = flags | 0x00800000; // set SDL_FULLSCREEN flag - HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags - } - Browser.updateResizeListeners(); - },setWindowedCanvasSize:function () { - // check if SDL is available - if (typeof SDL != "undefined") { - var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; - flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag - HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags - } - Browser.updateResizeListeners(); - },updateCanvasDimensions:function (canvas, wNative, hNative) { - if (wNative && hNative) { - canvas.widthNative = wNative; - canvas.heightNative = hNative; - } else { - wNative = canvas.widthNative; - hNative = canvas.heightNative; - } - var w = wNative; - var h = hNative; - if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) { - if (w/h < Module['forcedAspectRatio']) { - w = Math.round(h * Module['forcedAspectRatio']); - } else { - h = Math.round(w / Module['forcedAspectRatio']); - } - } - if (((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] || - document['mozFullScreenElement'] || document['mozFullscreenElement'] || - document['fullScreenElement'] || document['fullscreenElement'] || - document['msFullScreenElement'] || document['msFullscreenElement'] || - document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { - var factor = Math.min(screen.width / w, screen.height / h); - w = Math.round(w * factor); - h = Math.round(h * factor); - } - if (Browser.resizeCanvas) { - if (canvas.width != w) canvas.width = w; - if (canvas.height != h) canvas.height = h; - if (typeof canvas.style != 'undefined') { - canvas.style.removeProperty( "width"); - canvas.style.removeProperty("height"); - } - } else { - if (canvas.width != wNative) canvas.width = wNative; - if (canvas.height != hNative) canvas.height = hNative; - if (typeof canvas.style != 'undefined') { - if (w != wNative || h != hNative) { - canvas.style.setProperty( "width", w + "px", "important"); - canvas.style.setProperty("height", h + "px", "important"); - } else { - canvas.style.removeProperty( "width"); - canvas.style.removeProperty("height"); - } - } - } - },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function () { - var handle = Browser.nextWgetRequestHandle; - Browser.nextWgetRequestHandle++; - return handle; - }}; - - function _time(ptr) { - var ret = (Date.now()/1000)|0; - if (ptr) { - HEAP32[((ptr)>>2)]=ret; - } - return ret; - } -___errno_state = Runtime.staticAlloc(4); HEAP32[((___errno_state)>>2)]=0; -Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas) { Browser.requestFullScreen(lockPointer, resizeCanvas) }; - Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; - Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; - Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; - Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; - Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } -FS.staticInit();__ATINIT__.unshift({ func: function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() } });__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });__ATEXIT__.push({ func: function() { FS.quit() } });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice; -__ATINIT__.unshift({ func: function() { TTY.init() } });__ATEXIT__.push({ func: function() { TTY.shutdown() } });TTY.utf8 = new Runtime.UTF8Processor(); -if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); NODEFS.staticInit(); } -STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP); - -staticSealed = true; // seal the static portion of memory - -STACK_MAX = STACK_BASE + TOTAL_STACK; - -DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX); - -assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack"); - - var ctlz_i8 = allocate([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_DYNAMIC); - var cttz_i8 = allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0], "i8", ALLOC_DYNAMIC); - - -Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }; -Module.asmLibraryArg = { "abort": abort, "assert": assert, "min": Math_min, "_fflush": _fflush, "_sysconf": _sysconf, "_abort": _abort, "___setErrNo": ___setErrNo, "_sbrk": _sbrk, "_time": _time, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_emscripten_set_main_loop": _emscripten_set_main_loop, "___errno_location": ___errno_location, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8, "ctlz_i8": ctlz_i8, "NaN": NaN, "Infinity": Infinity }; -// EMSCRIPTEN_START_ASM -var asm = (function(global, env, buffer) { - 'use asm'; - - var HEAP8 = new global.Int8Array(buffer); - var HEAP16 = new global.Int16Array(buffer); - var HEAP32 = new global.Int32Array(buffer); - var HEAPU8 = new global.Uint8Array(buffer); - var HEAPU16 = new global.Uint16Array(buffer); - var HEAPU32 = new global.Uint32Array(buffer); - var HEAPF32 = new global.Float32Array(buffer); - var HEAPF64 = new global.Float64Array(buffer); - - - var STACKTOP=env.STACKTOP|0; - var STACK_MAX=env.STACK_MAX|0; - var tempDoublePtr=env.tempDoublePtr|0; - var ABORT=env.ABORT|0; - var cttz_i8=env.cttz_i8|0; - var ctlz_i8=env.ctlz_i8|0; - - var __THREW__ = 0; - var threwValue = 0; - var setjmpId = 0; - var undef = 0; - var nan = +env.NaN, inf = +env.Infinity; - var tempInt = 0, tempBigInt = 0, tempBigIntP = 0, tempBigIntS = 0, tempBigIntR = 0.0, tempBigIntI = 0, tempBigIntD = 0, tempValue = 0, tempDouble = 0.0; - - var tempRet0 = 0; - var tempRet1 = 0; - var tempRet2 = 0; - var tempRet3 = 0; - var tempRet4 = 0; - var tempRet5 = 0; - var tempRet6 = 0; - var tempRet7 = 0; - var tempRet8 = 0; - var tempRet9 = 0; - var Math_floor=global.Math.floor; - var Math_abs=global.Math.abs; - var Math_sqrt=global.Math.sqrt; - var Math_pow=global.Math.pow; - var Math_cos=global.Math.cos; - var Math_sin=global.Math.sin; - var Math_tan=global.Math.tan; - var Math_acos=global.Math.acos; - var Math_asin=global.Math.asin; - var Math_atan=global.Math.atan; - var Math_atan2=global.Math.atan2; - var Math_exp=global.Math.exp; - var Math_log=global.Math.log; - var Math_ceil=global.Math.ceil; - var Math_imul=global.Math.imul; - var abort=env.abort; - var assert=env.assert; - var Math_min=env.min; - var _fflush=env._fflush; - var _sysconf=env._sysconf; - var _abort=env._abort; - var ___setErrNo=env.___setErrNo; - var _sbrk=env._sbrk; - var _time=env._time; - var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing; - var _emscripten_memcpy_big=env._emscripten_memcpy_big; - var _emscripten_set_main_loop=env._emscripten_set_main_loop; - var ___errno_location=env.___errno_location; - var tempFloat = 0.0; - -// EMSCRIPTEN_START_FUNCS -function stackAlloc(size) { - size = size|0; - var ret = 0; - ret = STACKTOP; - STACKTOP = (STACKTOP + size)|0; -STACKTOP = (STACKTOP + 15)&-16; - - return ret|0; -} -function stackSave() { - return STACKTOP|0; -} -function stackRestore(top) { - top = top|0; - STACKTOP = top; -} - -function setThrew(threw, value) { - threw = threw|0; - value = value|0; - if ((__THREW__|0) == 0) { - __THREW__ = threw; - threwValue = value; - } -} -function copyTempFloat(ptr) { - ptr = ptr|0; - HEAP8[tempDoublePtr>>0] = HEAP8[ptr>>0]; - HEAP8[tempDoublePtr+1>>0] = HEAP8[ptr+1>>0]; - HEAP8[tempDoublePtr+2>>0] = HEAP8[ptr+2>>0]; - HEAP8[tempDoublePtr+3>>0] = HEAP8[ptr+3>>0]; -} -function copyTempDouble(ptr) { - ptr = ptr|0; - HEAP8[tempDoublePtr>>0] = HEAP8[ptr>>0]; - HEAP8[tempDoublePtr+1>>0] = HEAP8[ptr+1>>0]; - HEAP8[tempDoublePtr+2>>0] = HEAP8[ptr+2>>0]; - HEAP8[tempDoublePtr+3>>0] = HEAP8[ptr+3>>0]; - HEAP8[tempDoublePtr+4>>0] = HEAP8[ptr+4>>0]; - HEAP8[tempDoublePtr+5>>0] = HEAP8[ptr+5>>0]; - HEAP8[tempDoublePtr+6>>0] = HEAP8[ptr+6>>0]; - HEAP8[tempDoublePtr+7>>0] = HEAP8[ptr+7>>0]; -} -function setTempRet0(value) { - value = value|0; - tempRet0 = value; -} -function getTempRet0() { - return tempRet0|0; -} - -function _crypto_verify_32_ref($x,$y) { - $x = $x|0; - $y = $y|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0; - var $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0; - var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0; - var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0; - var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$x>>0]|0; - $1 = HEAP8[$y>>0]|0; - $2 = $1 ^ $0; - $3 = (($x) + 1|0); - $4 = HEAP8[$3>>0]|0; - $5 = (($y) + 1|0); - $6 = HEAP8[$5>>0]|0; - $7 = $6 ^ $4; - $8 = $7 | $2; - $9 = (($x) + 2|0); - $10 = HEAP8[$9>>0]|0; - $11 = (($y) + 2|0); - $12 = HEAP8[$11>>0]|0; - $13 = $12 ^ $10; - $14 = $8 | $13; - $15 = (($x) + 3|0); - $16 = HEAP8[$15>>0]|0; - $17 = (($y) + 3|0); - $18 = HEAP8[$17>>0]|0; - $19 = $18 ^ $16; - $20 = $14 | $19; - $21 = (($x) + 4|0); - $22 = HEAP8[$21>>0]|0; - $23 = (($y) + 4|0); - $24 = HEAP8[$23>>0]|0; - $25 = $24 ^ $22; - $26 = $20 | $25; - $27 = (($x) + 5|0); - $28 = HEAP8[$27>>0]|0; - $29 = (($y) + 5|0); - $30 = HEAP8[$29>>0]|0; - $31 = $30 ^ $28; - $32 = $26 | $31; - $33 = (($x) + 6|0); - $34 = HEAP8[$33>>0]|0; - $35 = (($y) + 6|0); - $36 = HEAP8[$35>>0]|0; - $37 = $36 ^ $34; - $38 = $32 | $37; - $39 = (($x) + 7|0); - $40 = HEAP8[$39>>0]|0; - $41 = (($y) + 7|0); - $42 = HEAP8[$41>>0]|0; - $43 = $42 ^ $40; - $44 = $38 | $43; - $45 = (($x) + 8|0); - $46 = HEAP8[$45>>0]|0; - $47 = (($y) + 8|0); - $48 = HEAP8[$47>>0]|0; - $49 = $48 ^ $46; - $50 = $44 | $49; - $51 = (($x) + 9|0); - $52 = HEAP8[$51>>0]|0; - $53 = (($y) + 9|0); - $54 = HEAP8[$53>>0]|0; - $55 = $54 ^ $52; - $56 = $50 | $55; - $57 = (($x) + 10|0); - $58 = HEAP8[$57>>0]|0; - $59 = (($y) + 10|0); - $60 = HEAP8[$59>>0]|0; - $61 = $60 ^ $58; - $62 = $56 | $61; - $63 = (($x) + 11|0); - $64 = HEAP8[$63>>0]|0; - $65 = (($y) + 11|0); - $66 = HEAP8[$65>>0]|0; - $67 = $66 ^ $64; - $68 = $62 | $67; - $69 = (($x) + 12|0); - $70 = HEAP8[$69>>0]|0; - $71 = (($y) + 12|0); - $72 = HEAP8[$71>>0]|0; - $73 = $72 ^ $70; - $74 = $68 | $73; - $75 = (($x) + 13|0); - $76 = HEAP8[$75>>0]|0; - $77 = (($y) + 13|0); - $78 = HEAP8[$77>>0]|0; - $79 = $78 ^ $76; - $80 = $74 | $79; - $81 = (($x) + 14|0); - $82 = HEAP8[$81>>0]|0; - $83 = (($y) + 14|0); - $84 = HEAP8[$83>>0]|0; - $85 = $84 ^ $82; - $86 = $80 | $85; - $87 = (($x) + 15|0); - $88 = HEAP8[$87>>0]|0; - $89 = (($y) + 15|0); - $90 = HEAP8[$89>>0]|0; - $91 = $90 ^ $88; - $92 = $86 | $91; - $93 = (($x) + 16|0); - $94 = HEAP8[$93>>0]|0; - $95 = (($y) + 16|0); - $96 = HEAP8[$95>>0]|0; - $97 = $96 ^ $94; - $98 = $92 | $97; - $99 = (($x) + 17|0); - $100 = HEAP8[$99>>0]|0; - $101 = (($y) + 17|0); - $102 = HEAP8[$101>>0]|0; - $103 = $102 ^ $100; - $104 = $98 | $103; - $105 = (($x) + 18|0); - $106 = HEAP8[$105>>0]|0; - $107 = (($y) + 18|0); - $108 = HEAP8[$107>>0]|0; - $109 = $108 ^ $106; - $110 = $104 | $109; - $111 = (($x) + 19|0); - $112 = HEAP8[$111>>0]|0; - $113 = (($y) + 19|0); - $114 = HEAP8[$113>>0]|0; - $115 = $114 ^ $112; - $116 = $110 | $115; - $117 = (($x) + 20|0); - $118 = HEAP8[$117>>0]|0; - $119 = (($y) + 20|0); - $120 = HEAP8[$119>>0]|0; - $121 = $120 ^ $118; - $122 = $116 | $121; - $123 = (($x) + 21|0); - $124 = HEAP8[$123>>0]|0; - $125 = (($y) + 21|0); - $126 = HEAP8[$125>>0]|0; - $127 = $126 ^ $124; - $128 = $122 | $127; - $129 = (($x) + 22|0); - $130 = HEAP8[$129>>0]|0; - $131 = (($y) + 22|0); - $132 = HEAP8[$131>>0]|0; - $133 = $132 ^ $130; - $134 = $128 | $133; - $135 = (($x) + 23|0); - $136 = HEAP8[$135>>0]|0; - $137 = (($y) + 23|0); - $138 = HEAP8[$137>>0]|0; - $139 = $138 ^ $136; - $140 = $134 | $139; - $141 = (($x) + 24|0); - $142 = HEAP8[$141>>0]|0; - $143 = (($y) + 24|0); - $144 = HEAP8[$143>>0]|0; - $145 = $144 ^ $142; - $146 = $140 | $145; - $147 = (($x) + 25|0); - $148 = HEAP8[$147>>0]|0; - $149 = (($y) + 25|0); - $150 = HEAP8[$149>>0]|0; - $151 = $150 ^ $148; - $152 = $146 | $151; - $153 = (($x) + 26|0); - $154 = HEAP8[$153>>0]|0; - $155 = (($y) + 26|0); - $156 = HEAP8[$155>>0]|0; - $157 = $156 ^ $154; - $158 = $152 | $157; - $159 = (($x) + 27|0); - $160 = HEAP8[$159>>0]|0; - $161 = (($y) + 27|0); - $162 = HEAP8[$161>>0]|0; - $163 = $162 ^ $160; - $164 = $158 | $163; - $165 = (($x) + 28|0); - $166 = HEAP8[$165>>0]|0; - $167 = (($y) + 28|0); - $168 = HEAP8[$167>>0]|0; - $169 = $168 ^ $166; - $170 = $164 | $169; - $171 = (($x) + 29|0); - $172 = HEAP8[$171>>0]|0; - $173 = (($y) + 29|0); - $174 = HEAP8[$173>>0]|0; - $175 = $174 ^ $172; - $176 = $170 | $175; - $177 = (($x) + 30|0); - $178 = HEAP8[$177>>0]|0; - $179 = (($y) + 30|0); - $180 = HEAP8[$179>>0]|0; - $181 = $180 ^ $178; - $182 = $176 | $181; - $183 = (($x) + 31|0); - $184 = HEAP8[$183>>0]|0; - $185 = (($y) + 31|0); - $186 = HEAP8[$185>>0]|0; - $187 = $186 ^ $184; - $188 = $182 | $187; - $189 = $188&255; - $190 = (($189) + 511)|0; - $191 = $190 >>> 8; - $192 = $191 & 1; - $193 = (($192) + -1)|0; - STACKTOP = sp;return ($193|0); -} -function _curve25519_sign($signature_out,$curve25519_privkey,$msg,$msg_len) { - $signature_out = $signature_out|0; - $curve25519_privkey = $curve25519_privkey|0; - $msg = $msg|0; - $msg_len = $msg_len|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_keypair = 0, $ed_pubkey_point = 0, $sigbuf_out_len = 0, dest = 0; - var label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 240|0; - $ed_pubkey_point = sp + 8|0; - $ed_keypair = sp + 168|0; - $sigbuf_out_len = sp; - $0 = (($msg_len) + 64)|0; - $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; - $2 = $sigbuf_out_len; - $3 = $2; - HEAP32[$3>>2] = 0; - $4 = (($2) + 4)|0; - $5 = $4; - HEAP32[$5>>2] = 0; - dest=$ed_keypair+0|0; src=$curve25519_privkey+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - _crypto_sign_ed25519_ref10_ge_scalarmult_base($ed_pubkey_point,$curve25519_privkey); - $6 = (($ed_keypair) + 32|0); - _crypto_sign_ed25519_ref10_ge_p3_tobytes($6,$ed_pubkey_point); - $7 = (($ed_keypair) + 63|0); - $8 = HEAP8[$7>>0]|0; - $9 = $8&255; - $10 = $9 & 128; - (_crypto_sign_modified($1,$sigbuf_out_len,$msg,$msg_len,0,$ed_keypair)|0); - dest=$signature_out+0|0; src=$1+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $11 = (($signature_out) + 63|0); - $12 = HEAP8[$11>>0]|0; - $13 = $12&255; - $14 = $13 | $10; - $15 = $14&255; - HEAP8[$11>>0] = $15; - STACKTOP = sp;return; -} -function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { - $signature = $signature|0; - $curve25519_pubkey = $curve25519_pubkey|0; - $msg = $msg|0; - $msg_len = $msg_len|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_pubkey = 0, $ed_y = 0; - var $inv_mont_x_plus_one = 0, $mont_x = 0, $mont_x_minus_one = 0, $mont_x_plus_one = 0, $one = 0, $some_retval = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 288|0; - $mont_x = sp + 208|0; - $mont_x_minus_one = sp + 168|0; - $mont_x_plus_one = sp + 128|0; - $inv_mont_x_plus_one = sp + 88|0; - $one = sp + 48|0; - $ed_y = sp + 8|0; - $ed_pubkey = sp + 248|0; - $some_retval = sp; - $0 = (($msg_len) + 64)|0; - $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; - $2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; - _crypto_sign_ed25519_ref10_fe_frombytes($mont_x,$curve25519_pubkey); - _crypto_sign_ed25519_ref10_fe_1($one); - _crypto_sign_ed25519_ref10_fe_sub($mont_x_minus_one,$mont_x,$one); - _crypto_sign_ed25519_ref10_fe_add($mont_x_plus_one,$mont_x,$one); - _crypto_sign_ed25519_ref10_fe_invert($inv_mont_x_plus_one,$mont_x_plus_one); - _crypto_sign_ed25519_ref10_fe_mul($ed_y,$mont_x_minus_one,$inv_mont_x_plus_one); - _crypto_sign_ed25519_ref10_fe_tobytes($ed_pubkey,$ed_y); - $3 = (($signature) + 63|0); - $4 = HEAP8[$3>>0]|0; - $5 = $4&255; - $6 = $5 & 128; - $7 = (($ed_pubkey) + 31|0); - $8 = HEAP8[$7>>0]|0; - $9 = $8&255; - $10 = $9 | $6; - $11 = $10&255; - HEAP8[$7>>0] = $11; - $12 = HEAP8[$3>>0]|0; - $13 = $12&255; - $14 = $13 & 127; - $15 = $14&255; - HEAP8[$3>>0] = $15; - dest=$1+0|0; src=$signature+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $16 = (($1) + 64|0); - _memcpy(($16|0),($msg|0),($msg_len|0))|0; - $17 = (_crypto_sign_edwards25519sha512batch_ref10_open($2,$some_retval,$1,$0,0,$ed_pubkey)|0); - STACKTOP = sp;return ($17|0); -} -function _crypto_hash_sha512_ref($output,$input,$0,$1) { - $output = $output|0; - $input = $input|0; - $0 = $0|0; - $1 = $1|0; - var $ctx = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 208|0; - $ctx = sp; - _sph_sha512_init($ctx); - _sph_sha384($ctx,$input,$0); - _sph_sha512_close($ctx,$output); - STACKTOP = sp;return 0; -} -function _crypto_sign_modified($sm,$smlen,$m,$0,$1,$sk) { - $sm = $sm|0; - $smlen = $smlen|0; - $m = $m|0; - $0 = $0|0; - $1 = $1|0; - $sk = $sk|0; - var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $R = 0, $hram = 0, $nonce = 0, $pk1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 320|0; - $pk1 = sp + 288|0; - $nonce = sp + 224|0; - $hram = sp + 160|0; - $R = sp; - $2 = (($sk) + 32|0); - dest=$pk1+0|0; src=$2+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $3 = (_i64Add(($0|0),($1|0),64,0)|0); - $4 = tempRet0; - $5 = $smlen; - $6 = $5; - HEAP32[$6>>2] = $3; - $7 = (($5) + 4)|0; - $8 = $7; - HEAP32[$8>>2] = $4; - $9 = (($sm) + 64|0); - _memmove(($9|0),($m|0),($0|0))|0; - $10 = (($sm) + 32|0); - _memmove(($10|0),($sk|0),32)|0; - $11 = (_i64Add(($0|0),($1|0),32,0)|0); - $12 = tempRet0; - (_crypto_hash_sha512_ref($nonce,$10,$11,$12)|0); - dest=$10+0|0; src=$pk1+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - _crypto_sign_ed25519_ref10_sc_reduce($nonce); - _crypto_sign_ed25519_ref10_ge_scalarmult_base($R,$nonce); - _crypto_sign_ed25519_ref10_ge_p3_tobytes($sm,$R); - (_crypto_hash_sha512_ref($hram,$sm,$3,$4)|0); - _crypto_sign_ed25519_ref10_sc_reduce($hram); - _crypto_sign_ed25519_ref10_sc_muladd($10,$hram,$sk,$nonce); - STACKTOP = sp;return 0; -} -function _curve25519_donna($mypublic,$secret,$basepoint) { - $mypublic = $mypublic|0; - $secret = $secret|0; - $basepoint = $basepoint|0; - var $bp = 0, $e = 0, $x = 0, $z = 0, $zmone = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 368|0; - $bp = sp + 248|0; - $x = sp + 168|0; - $z = sp + 80|0; - $zmone = sp; - $e = sp + 328|0; - dest=$e+0|0; src=$secret+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - _fexpand($bp,$basepoint); - _cmult($x,$z,$e,$bp); - _crecip($zmone,$z); - _fmul($z,$x,$zmone); - _fcontract($mypublic,$z); - STACKTOP = sp;return 0; -} -function _fexpand($output,$input) { - $output = $output|0; - $input = $input|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $3 = 0, $30 = 0, $31 = 0; - var $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0; - var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0; - var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0; - var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$input>>0]|0; - $1 = $0&255; - $2 = (($input) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($input) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - $15 = (($input) + 3|0); - $16 = HEAP8[$15>>0]|0; - $17 = $16&255; - $18 = (_bitshift64Shl(($17|0),0,24)|0); - $19 = tempRet0; - $20 = $18 & 50331648; - $21 = $13 | $20; - $22 = $output; - $23 = $22; - HEAP32[$23>>2] = $21; - $24 = (($22) + 4)|0; - $25 = $24; - HEAP32[$25>>2] = $14; - $26 = HEAP8[$15>>0]|0; - $27 = $26&255; - $28 = (($input) + 4|0); - $29 = HEAP8[$28>>0]|0; - $30 = $29&255; - $31 = (_bitshift64Shl(($30|0),0,8)|0); - $32 = tempRet0; - $33 = $31 | $27; - $34 = (($input) + 5|0); - $35 = HEAP8[$34>>0]|0; - $36 = $35&255; - $37 = (_bitshift64Shl(($36|0),0,16)|0); - $38 = tempRet0; - $39 = $33 | $37; - $40 = $32 | $38; - $41 = (($input) + 6|0); - $42 = HEAP8[$41>>0]|0; - $43 = $42&255; - $44 = (_bitshift64Shl(($43|0),0,24)|0); - $45 = tempRet0; - $46 = $39 | $44; - $47 = $40 | $45; - $48 = (_bitshift64Lshr(($46|0),($47|0),2)|0); - $49 = tempRet0; - $50 = $48 & 33554431; - $51 = (($output) + 8|0); - $52 = $51; - $53 = $52; - HEAP32[$53>>2] = $50; - $54 = (($52) + 4)|0; - $55 = $54; - HEAP32[$55>>2] = 0; - $56 = HEAP8[$41>>0]|0; - $57 = $56&255; - $58 = (($input) + 7|0); - $59 = HEAP8[$58>>0]|0; - $60 = $59&255; - $61 = (_bitshift64Shl(($60|0),0,8)|0); - $62 = tempRet0; - $63 = $61 | $57; - $64 = (($input) + 8|0); - $65 = HEAP8[$64>>0]|0; - $66 = $65&255; - $67 = (_bitshift64Shl(($66|0),0,16)|0); - $68 = tempRet0; - $69 = $63 | $67; - $70 = $62 | $68; - $71 = (($input) + 9|0); - $72 = HEAP8[$71>>0]|0; - $73 = $72&255; - $74 = (_bitshift64Shl(($73|0),0,24)|0); - $75 = tempRet0; - $76 = $69 | $74; - $77 = $70 | $75; - $78 = (_bitshift64Lshr(($76|0),($77|0),3)|0); - $79 = tempRet0; - $80 = $78 & 67108863; - $81 = (($output) + 16|0); - $82 = $81; - $83 = $82; - HEAP32[$83>>2] = $80; - $84 = (($82) + 4)|0; - $85 = $84; - HEAP32[$85>>2] = 0; - $86 = HEAP8[$71>>0]|0; - $87 = $86&255; - $88 = (($input) + 10|0); - $89 = HEAP8[$88>>0]|0; - $90 = $89&255; - $91 = (_bitshift64Shl(($90|0),0,8)|0); - $92 = tempRet0; - $93 = $91 | $87; - $94 = (($input) + 11|0); - $95 = HEAP8[$94>>0]|0; - $96 = $95&255; - $97 = (_bitshift64Shl(($96|0),0,16)|0); - $98 = tempRet0; - $99 = $93 | $97; - $100 = $92 | $98; - $101 = (($input) + 12|0); - $102 = HEAP8[$101>>0]|0; - $103 = $102&255; - $104 = (_bitshift64Shl(($103|0),0,24)|0); - $105 = tempRet0; - $106 = $99 | $104; - $107 = $100 | $105; - $108 = (_bitshift64Lshr(($106|0),($107|0),5)|0); - $109 = tempRet0; - $110 = $108 & 33554431; - $111 = (($output) + 24|0); - $112 = $111; - $113 = $112; - HEAP32[$113>>2] = $110; - $114 = (($112) + 4)|0; - $115 = $114; - HEAP32[$115>>2] = 0; - $116 = HEAP8[$101>>0]|0; - $117 = $116&255; - $118 = (($input) + 13|0); - $119 = HEAP8[$118>>0]|0; - $120 = $119&255; - $121 = (_bitshift64Shl(($120|0),0,8)|0); - $122 = tempRet0; - $123 = $121 | $117; - $124 = (($input) + 14|0); - $125 = HEAP8[$124>>0]|0; - $126 = $125&255; - $127 = (_bitshift64Shl(($126|0),0,16)|0); - $128 = tempRet0; - $129 = $123 | $127; - $130 = $122 | $128; - $131 = (($input) + 15|0); - $132 = HEAP8[$131>>0]|0; - $133 = $132&255; - $134 = (_bitshift64Shl(($133|0),0,24)|0); - $135 = tempRet0; - $136 = $129 | $134; - $137 = $130 | $135; - $138 = (_bitshift64Lshr(($136|0),($137|0),6)|0); - $139 = tempRet0; - $140 = $138 & 67108863; - $141 = (($output) + 32|0); - $142 = $141; - $143 = $142; - HEAP32[$143>>2] = $140; - $144 = (($142) + 4)|0; - $145 = $144; - HEAP32[$145>>2] = 0; - $146 = (($input) + 16|0); - $147 = HEAP8[$146>>0]|0; - $148 = $147&255; - $149 = (($input) + 17|0); - $150 = HEAP8[$149>>0]|0; - $151 = $150&255; - $152 = (_bitshift64Shl(($151|0),0,8)|0); - $153 = tempRet0; - $154 = $152 | $148; - $155 = (($input) + 18|0); - $156 = HEAP8[$155>>0]|0; - $157 = $156&255; - $158 = (_bitshift64Shl(($157|0),0,16)|0); - $159 = tempRet0; - $160 = $154 | $158; - $161 = $153 | $159; - $162 = (($input) + 19|0); - $163 = HEAP8[$162>>0]|0; - $164 = $163&255; - $165 = (_bitshift64Shl(($164|0),0,24)|0); - $166 = tempRet0; - $167 = $165 & 16777216; - $168 = $160 | $167; - $169 = (($output) + 40|0); - $170 = $169; - $171 = $170; - HEAP32[$171>>2] = $168; - $172 = (($170) + 4)|0; - $173 = $172; - HEAP32[$173>>2] = $161; - $174 = HEAP8[$162>>0]|0; - $175 = $174&255; - $176 = (($input) + 20|0); - $177 = HEAP8[$176>>0]|0; - $178 = $177&255; - $179 = (_bitshift64Shl(($178|0),0,8)|0); - $180 = tempRet0; - $181 = $179 | $175; - $182 = (($input) + 21|0); - $183 = HEAP8[$182>>0]|0; - $184 = $183&255; - $185 = (_bitshift64Shl(($184|0),0,16)|0); - $186 = tempRet0; - $187 = $181 | $185; - $188 = $180 | $186; - $189 = (($input) + 22|0); - $190 = HEAP8[$189>>0]|0; - $191 = $190&255; - $192 = (_bitshift64Shl(($191|0),0,24)|0); - $193 = tempRet0; - $194 = $187 | $192; - $195 = $188 | $193; - $196 = (_bitshift64Lshr(($194|0),($195|0),1)|0); - $197 = tempRet0; - $198 = $196 & 67108863; - $199 = (($output) + 48|0); - $200 = $199; - $201 = $200; - HEAP32[$201>>2] = $198; - $202 = (($200) + 4)|0; - $203 = $202; - HEAP32[$203>>2] = 0; - $204 = HEAP8[$189>>0]|0; - $205 = $204&255; - $206 = (($input) + 23|0); - $207 = HEAP8[$206>>0]|0; - $208 = $207&255; - $209 = (_bitshift64Shl(($208|0),0,8)|0); - $210 = tempRet0; - $211 = $209 | $205; - $212 = (($input) + 24|0); - $213 = HEAP8[$212>>0]|0; - $214 = $213&255; - $215 = (_bitshift64Shl(($214|0),0,16)|0); - $216 = tempRet0; - $217 = $211 | $215; - $218 = $210 | $216; - $219 = (($input) + 25|0); - $220 = HEAP8[$219>>0]|0; - $221 = $220&255; - $222 = (_bitshift64Shl(($221|0),0,24)|0); - $223 = tempRet0; - $224 = $217 | $222; - $225 = $218 | $223; - $226 = (_bitshift64Lshr(($224|0),($225|0),3)|0); - $227 = tempRet0; - $228 = $226 & 33554431; - $229 = (($output) + 56|0); - $230 = $229; - $231 = $230; - HEAP32[$231>>2] = $228; - $232 = (($230) + 4)|0; - $233 = $232; - HEAP32[$233>>2] = 0; - $234 = HEAP8[$219>>0]|0; - $235 = $234&255; - $236 = (($input) + 26|0); - $237 = HEAP8[$236>>0]|0; - $238 = $237&255; - $239 = (_bitshift64Shl(($238|0),0,8)|0); - $240 = tempRet0; - $241 = $239 | $235; - $242 = (($input) + 27|0); - $243 = HEAP8[$242>>0]|0; - $244 = $243&255; - $245 = (_bitshift64Shl(($244|0),0,16)|0); - $246 = tempRet0; - $247 = $241 | $245; - $248 = $240 | $246; - $249 = (($input) + 28|0); - $250 = HEAP8[$249>>0]|0; - $251 = $250&255; - $252 = (_bitshift64Shl(($251|0),0,24)|0); - $253 = tempRet0; - $254 = $247 | $252; - $255 = $248 | $253; - $256 = (_bitshift64Lshr(($254|0),($255|0),4)|0); - $257 = tempRet0; - $258 = $256 & 67108863; - $259 = (($output) + 64|0); - $260 = $259; - $261 = $260; - HEAP32[$261>>2] = $258; - $262 = (($260) + 4)|0; - $263 = $262; - HEAP32[$263>>2] = 0; - $264 = HEAP8[$249>>0]|0; - $265 = $264&255; - $266 = (($input) + 29|0); - $267 = HEAP8[$266>>0]|0; - $268 = $267&255; - $269 = (_bitshift64Shl(($268|0),0,8)|0); - $270 = tempRet0; - $271 = $269 | $265; - $272 = (($input) + 30|0); - $273 = HEAP8[$272>>0]|0; - $274 = $273&255; - $275 = (_bitshift64Shl(($274|0),0,16)|0); - $276 = tempRet0; - $277 = $271 | $275; - $278 = $270 | $276; - $279 = (($input) + 31|0); - $280 = HEAP8[$279>>0]|0; - $281 = $280&255; - $282 = (_bitshift64Shl(($281|0),0,24)|0); - $283 = tempRet0; - $284 = $277 | $282; - $285 = $278 | $283; - $286 = (_bitshift64Lshr(($284|0),($285|0),6)|0); - $287 = tempRet0; - $288 = $286 & 33554431; - $289 = (($output) + 72|0); - $290 = $289; - $291 = $290; - HEAP32[$291>>2] = $288; - $292 = (($290) + 4)|0; - $293 = $292; - HEAP32[$293>>2] = 0; - STACKTOP = sp;return; -} -function _cmult($resultx,$resultz,$n,$q) { - $resultx = $resultx|0; - $resultz = $resultz|0; - $n = $n|0; - $q = $q|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0; - var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $b = 0, $byte$09 = 0, $c = 0, $d = 0, $e = 0, $exitcond = 0, $exitcond20 = 0, $f = 0, $g = 0, $h = 0, $i$018 = 0, $j$08 = 0, $nqpqx$019 = 0, $nqpqx$110 = 0; - var $nqpqx$110$phi = 0, $nqpqx2$014 = 0, $nqpqx2$14 = 0, $nqpqx2$14$phi = 0, $nqpqz$013 = 0, $nqpqz$13 = 0, $nqpqz$13$phi = 0, $nqpqz2$015 = 0, $nqpqz2$15 = 0, $nqpqz2$15$phi = 0, $nqx$011 = 0, $nqx$11 = 0, $nqx$11$phi = 0, $nqx2$016 = 0, $nqx2$16 = 0, $nqx2$16$phi = 0, $nqz$012 = 0, $nqz$12 = 0, $nqz$12$phi = 0, $nqz2$017 = 0; - var $nqz2$17 = 0, $nqz2$17$phi = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 1216|0; - $a = sp + 1064|0; - $b = sp + 912|0; - $c = sp + 760|0; - $d = sp + 608|0; - $e = sp + 456|0; - $f = sp + 304|0; - $g = sp + 152|0; - $h = sp; - _memset(($a|0),0,152)|0; - _memset(($b|0),0,152)|0; - $0 = $b; - $1 = $0; - HEAP32[$1>>2] = 1; - $2 = (($0) + 4)|0; - $3 = $2; - HEAP32[$3>>2] = 0; - _memset(($c|0),0,152)|0; - $4 = $c; - $5 = $4; - HEAP32[$5>>2] = 1; - $6 = (($4) + 4)|0; - $7 = $6; - HEAP32[$7>>2] = 0; - _memset(($d|0),0,152)|0; - _memset(($e|0),0,152)|0; - _memset(($f|0),0,152)|0; - $8 = $f; - $9 = $8; - HEAP32[$9>>2] = 1; - $10 = (($8) + 4)|0; - $11 = $10; - HEAP32[$11>>2] = 0; - _memset(($g|0),0,152)|0; - _memset(($h|0),0,152)|0; - $12 = $h; - $13 = $12; - HEAP32[$13>>2] = 1; - $14 = (($12) + 4)|0; - $15 = $14; - HEAP32[$15>>2] = 0; - dest=$a+0|0; src=$q+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $i$018 = 0;$nqpqx$019 = $a;$nqpqx2$014 = $e;$nqpqz$013 = $b;$nqpqz2$015 = $f;$nqx$011 = $c;$nqx2$016 = $g;$nqz$012 = $d;$nqz2$017 = $h; - while(1) { - $16 = (31 - ($i$018))|0; - $17 = (($n) + ($16)|0); - $18 = HEAP8[$17>>0]|0; - $byte$09 = $18;$j$08 = 0;$nqpqx$110 = $nqpqx$019;$nqpqx2$14 = $nqpqx2$014;$nqpqz$13 = $nqpqz$013;$nqpqz2$15 = $nqpqz2$015;$nqx$11 = $nqx$011;$nqx2$16 = $nqx2$016;$nqz$12 = $nqz$012;$nqz2$17 = $nqz2$017; - while(1) { - $19 = $byte$09&255; - $20 = $19 >>> 7; - _swap_conditional($nqx$11,$nqpqx$110,$20,0); - _swap_conditional($nqz$12,$nqpqz$13,$20,0); - _fmonty($nqx2$16,$nqz2$17,$nqpqx2$14,$nqpqz2$15,$nqx$11,$nqz$12,$nqpqx$110,$nqpqz$13,$q); - _swap_conditional($nqx2$16,$nqpqx2$14,$20,0); - _swap_conditional($nqz2$17,$nqpqz2$15,$20,0); - $21 = $19 << 1; - $22 = $21&255; - $23 = (($j$08) + 1)|0; - $exitcond = ($23|0)==(8); - if ($exitcond) { - break; - } else { - $nqz2$17$phi = $nqz$12;$nqz$12$phi = $nqz2$17;$nqx2$16$phi = $nqx$11;$nqx$11$phi = $nqx2$16;$nqpqz2$15$phi = $nqpqz$13;$nqpqz$13$phi = $nqpqz2$15;$nqpqx2$14$phi = $nqpqx$110;$nqpqx$110$phi = $nqpqx2$14;$byte$09 = $22;$j$08 = $23;$nqz2$17 = $nqz2$17$phi;$nqz$12 = $nqz$12$phi;$nqx2$16 = $nqx2$16$phi;$nqx$11 = $nqx$11$phi;$nqpqz2$15 = $nqpqz2$15$phi;$nqpqz$13 = $nqpqz$13$phi;$nqpqx2$14 = $nqpqx2$14$phi;$nqpqx$110 = $nqpqx$110$phi; - } - } - $24 = (($i$018) + 1)|0; - $exitcond20 = ($24|0)==(32); - if ($exitcond20) { - break; - } else { - $i$018 = $24;$nqpqx$019 = $nqpqx2$14;$nqpqx2$014 = $nqpqx$110;$nqpqz$013 = $nqpqz2$15;$nqpqz2$015 = $nqpqz$13;$nqx$011 = $nqx2$16;$nqx2$016 = $nqx$11;$nqz$012 = $nqz2$17;$nqz2$017 = $nqz$12; - } - } - dest=$resultx+0|0; src=$nqx2$16+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$resultz+0|0; src=$nqz2$17+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _crecip($out,$z) { - $out = $out|0; - $z = $z|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $i$33 = 0, $i$42 = 0, $i$51 = 0, $t0 = 0, $t1 = 0, $z11 = 0, $z2 = 0, $z2_100_0 = 0, $z2_10_0 = 0, $z2_20_0 = 0, $z2_50_0 = 0, $z2_5_0 = 0, $z9 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 800|0; - $z2 = sp + 720|0; - $z9 = sp + 640|0; - $z11 = sp + 560|0; - $z2_5_0 = sp + 480|0; - $z2_10_0 = sp + 400|0; - $z2_20_0 = sp + 320|0; - $z2_50_0 = sp + 240|0; - $z2_100_0 = sp + 160|0; - $t0 = sp + 80|0; - $t1 = sp; - _fsquare($z2,$z); - _fsquare($t1,$z2); - _fsquare($t0,$t1); - _fmul($z9,$t0,$z); - _fmul($z11,$z9,$z2); - _fsquare($t0,$z11); - _fmul($z2_5_0,$t0,$z9); - _fsquare($t0,$z2_5_0); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fmul($z2_10_0,$t0,$z2_5_0); - _fsquare($t0,$z2_10_0); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fmul($z2_20_0,$t1,$z2_10_0); - _fsquare($t0,$z2_20_0); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fmul($t0,$t1,$z2_20_0); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fmul($z2_50_0,$t0,$z2_10_0); - _fsquare($t0,$z2_50_0); - _fsquare($t1,$t0); - $i$33 = 2; - while(1) { - _fsquare($t0,$t1); - _fsquare($t1,$t0); - $0 = (($i$33) + 2)|0; - $1 = ($0|0)<(50); - if ($1) { - $i$33 = $0; - } else { - break; - } - } - _fmul($z2_100_0,$t1,$z2_50_0); - _fsquare($t1,$z2_100_0); - _fsquare($t0,$t1); - $i$42 = 2; - while(1) { - _fsquare($t1,$t0); - _fsquare($t0,$t1); - $2 = (($i$42) + 2)|0; - $3 = ($2|0)<(100); - if ($3) { - $i$42 = $2; - } else { - break; - } - } - _fmul($t1,$t0,$z2_100_0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - $i$51 = 2; - while(1) { - _fsquare($t0,$t1); - _fsquare($t1,$t0); - $4 = (($i$51) + 2)|0; - $5 = ($4|0)<(50); - if ($5) { - $i$51 = $4; - } else { - break; - } - } - _fmul($t0,$t1,$z2_50_0); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fsquare($t0,$t1); - _fsquare($t1,$t0); - _fmul($out,$t1,$z11); - STACKTOP = sp;return; -} -function _fmul($output,$in,$in2) { - $output = $output|0; - $in = $in|0; - $in2 = $in2|0; - var $t = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 160|0; - $t = sp; - _fproduct($t,$in,$in2); - _freduce_degree($t); - _freduce_coefficients($t); - dest=$output+0|0; src=$t+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _fcontract($output,$input_limbs) { - $output = $output|0; - $input_limbs = $input_limbs|0; - var $$pn = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; - var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; - var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; - var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0; - var $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0; - var $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0; - var $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0; - var $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0; - var $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0; - var $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0; - var $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0; - var $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0; - var $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0; - var $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0; - var $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0; - var $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0; - var $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0; - var $403 = 0, $404 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; - var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; - var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0; - var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond11 = 0, $exitcond11$1 = 0, $exitcond14 = 0, $exitcond14$1 = 0, $i$17 = 0, $i$17$1 = 0, $i$24 = 0, $i$24$1 = 0, $i$33 = 0, $input = 0, $mask$02 = 0, $mask$1 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $input = sp; - $0 = $input_limbs; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - HEAP32[$input>>2] = $2; - $6 = (($input_limbs) + 8|0); - $7 = $6; - $8 = $7; - $9 = HEAP32[$8>>2]|0; - $10 = (($7) + 4)|0; - $11 = $10; - $12 = HEAP32[$11>>2]|0; - $13 = (($input) + 4|0); - HEAP32[$13>>2] = $9; - $14 = (($input_limbs) + 16|0); - $15 = $14; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = (($15) + 4)|0; - $19 = $18; - $20 = HEAP32[$19>>2]|0; - $21 = (($input) + 8|0); - HEAP32[$21>>2] = $17; - $22 = (($input_limbs) + 24|0); - $23 = $22; - $24 = $23; - $25 = HEAP32[$24>>2]|0; - $26 = (($23) + 4)|0; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (($input) + 12|0); - HEAP32[$29>>2] = $25; - $30 = (($input_limbs) + 32|0); - $31 = $30; - $32 = $31; - $33 = HEAP32[$32>>2]|0; - $34 = (($31) + 4)|0; - $35 = $34; - $36 = HEAP32[$35>>2]|0; - $37 = (($input) + 16|0); - HEAP32[$37>>2] = $33; - $38 = (($input_limbs) + 40|0); - $39 = $38; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (($39) + 4)|0; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($input) + 20|0); - HEAP32[$45>>2] = $41; - $46 = (($input_limbs) + 48|0); - $47 = $46; - $48 = $47; - $49 = HEAP32[$48>>2]|0; - $50 = (($47) + 4)|0; - $51 = $50; - $52 = HEAP32[$51>>2]|0; - $53 = (($input) + 24|0); - HEAP32[$53>>2] = $49; - $54 = (($input_limbs) + 56|0); - $55 = $54; - $56 = $55; - $57 = HEAP32[$56>>2]|0; - $58 = (($55) + 4)|0; - $59 = $58; - $60 = HEAP32[$59>>2]|0; - $61 = (($input) + 28|0); - HEAP32[$61>>2] = $57; - $62 = (($input_limbs) + 64|0); - $63 = $62; - $64 = $63; - $65 = HEAP32[$64>>2]|0; - $66 = (($63) + 4)|0; - $67 = $66; - $68 = HEAP32[$67>>2]|0; - $69 = (($input) + 32|0); - HEAP32[$69>>2] = $65; - $70 = (($input_limbs) + 72|0); - $71 = $70; - $72 = $71; - $73 = HEAP32[$72>>2]|0; - $74 = (($71) + 4)|0; - $75 = $74; - $76 = HEAP32[$75>>2]|0; - $77 = (($input) + 36|0); - HEAP32[$77>>2] = $73; - $78 = (($input) + 36|0); - $i$17 = 0; - while(1) { - $79 = $i$17 & 1; - $80 = ($79|0)==(0); - $81 = (($input) + ($i$17<<2)|0); - $82 = HEAP32[$81>>2]|0; - $83 = $82 >> 31; - $84 = $83 & $82; - if ($80) { - $92 = $84 >> 26; - $93 = Math_imul($92, -67108864)|0; - $94 = (($93) + ($82))|0; - HEAP32[$81>>2] = $94; - $95 = (($i$17) + 1)|0; - $96 = (($input) + ($95<<2)|0); - $97 = HEAP32[$96>>2]|0; - $98 = (($97) + ($92))|0; - HEAP32[$96>>2] = $98; - } else { - $85 = $84 >> 25; - $86 = Math_imul($85, -33554432)|0; - $87 = (($86) + ($82))|0; - HEAP32[$81>>2] = $87; - $88 = (($i$17) + 1)|0; - $89 = (($input) + ($88<<2)|0); - $90 = HEAP32[$89>>2]|0; - $91 = (($90) + ($85))|0; - HEAP32[$89>>2] = $91; - } - $99 = (($i$17) + 1)|0; - $exitcond14 = ($99|0)==(9); - if ($exitcond14) { - break; - } else { - $i$17 = $99; - } - } - $100 = HEAP32[$78>>2]|0; - $101 = $100 >> 31; - $102 = $101 & $100; - $103 = $102 >> 25; - $104 = Math_imul($103, -33554432)|0; - $105 = (($104) + ($100))|0; - HEAP32[$78>>2] = $105; - $106 = HEAP32[$input>>2]|0; - $107 = ($103*19)|0; - $108 = (($107) + ($106))|0; - HEAP32[$input>>2] = $108; - $i$17$1 = 0; - while(1) { - $384 = $i$17$1 & 1; - $385 = ($384|0)==(0); - $386 = (($input) + ($i$17$1<<2)|0); - $387 = HEAP32[$386>>2]|0; - $388 = $387 >> 31; - $389 = $388 & $387; - if ($385) { - $397 = $389 >> 26; - $398 = Math_imul($397, -67108864)|0; - $399 = (($398) + ($387))|0; - HEAP32[$386>>2] = $399; - $400 = (($i$17$1) + 1)|0; - $401 = (($input) + ($400<<2)|0); - $402 = HEAP32[$401>>2]|0; - $403 = (($402) + ($397))|0; - HEAP32[$401>>2] = $403; - } else { - $390 = $389 >> 25; - $391 = Math_imul($390, -33554432)|0; - $392 = (($391) + ($387))|0; - HEAP32[$386>>2] = $392; - $393 = (($i$17$1) + 1)|0; - $394 = (($input) + ($393<<2)|0); - $395 = HEAP32[$394>>2]|0; - $396 = (($395) + ($390))|0; - HEAP32[$394>>2] = $396; - } - $404 = (($i$17$1) + 1)|0; - $exitcond14$1 = ($404|0)==(9); - if ($exitcond14$1) { - break; - } else { - $i$17$1 = $404; - } - } - $109 = HEAP32[$78>>2]|0; - $110 = $109 >> 31; - $111 = $110 & $109; - $112 = $111 >> 25; - $113 = Math_imul($112, -33554432)|0; - $114 = (($113) + ($109))|0; - HEAP32[$78>>2] = $114; - $115 = HEAP32[$input>>2]|0; - $116 = ($112*19)|0; - $117 = (($116) + ($115))|0; - $118 = $117 >> 31; - $119 = $118 & $117; - $120 = $119 >> 26; - $121 = Math_imul($120, -67108864)|0; - $122 = (($121) + ($117))|0; - HEAP32[$input>>2] = $122; - $123 = (($input) + 4|0); - $124 = HEAP32[$123>>2]|0; - $125 = (($120) + ($124))|0; - HEAP32[$123>>2] = $125; - $126 = (($input) + 36|0); - $i$24 = 0; - while(1) { - $127 = $i$24 & 1; - $128 = ($127|0)==(0); - $129 = (($input) + ($i$24<<2)|0); - $130 = HEAP32[$129>>2]|0; - if ($128) { - $137 = $130 >> 26; - $138 = $130 & 67108863; - HEAP32[$129>>2] = $138; - $139 = (($i$24) + 1)|0; - $140 = (($input) + ($139<<2)|0); - $141 = HEAP32[$140>>2]|0; - $142 = (($141) + ($137))|0; - HEAP32[$140>>2] = $142; - } else { - $131 = $130 >> 25; - $132 = $130 & 33554431; - HEAP32[$129>>2] = $132; - $133 = (($i$24) + 1)|0; - $134 = (($input) + ($133<<2)|0); - $135 = HEAP32[$134>>2]|0; - $136 = (($135) + ($131))|0; - HEAP32[$134>>2] = $136; - } - $143 = (($i$24) + 1)|0; - $exitcond11 = ($143|0)==(9); - if ($exitcond11) { - break; - } else { - $i$24 = $143; - } - } - $144 = HEAP32[$126>>2]|0; - $145 = $144 >> 25; - $146 = $144 & 33554431; - HEAP32[$126>>2] = $146; - $147 = ($145*19)|0; - $148 = HEAP32[$input>>2]|0; - $149 = (($147) + ($148))|0; - HEAP32[$input>>2] = $149; - $i$24$1 = 0; - while(1) { - $360 = $i$24$1 & 1; - $361 = ($360|0)==(0); - $362 = (($input) + ($i$24$1<<2)|0); - $363 = HEAP32[$362>>2]|0; - if ($361) { - $370 = $363 >> 26; - $371 = $363 & 67108863; - HEAP32[$362>>2] = $371; - $372 = (($i$24$1) + 1)|0; - $373 = (($input) + ($372<<2)|0); - $374 = HEAP32[$373>>2]|0; - $375 = (($374) + ($370))|0; - HEAP32[$373>>2] = $375; - } else { - $364 = $363 >> 25; - $365 = $363 & 33554431; - HEAP32[$362>>2] = $365; - $366 = (($i$24$1) + 1)|0; - $367 = (($input) + ($366<<2)|0); - $368 = HEAP32[$367>>2]|0; - $369 = (($368) + ($364))|0; - HEAP32[$367>>2] = $369; - } - $376 = (($i$24$1) + 1)|0; - $exitcond11$1 = ($376|0)==(9); - if ($exitcond11$1) { - break; - } else { - $i$24$1 = $376; - } - } - $377 = HEAP32[$126>>2]|0; - $378 = $377 >> 25; - $379 = $377 & 33554431; - HEAP32[$126>>2] = $379; - $380 = ($378*19)|0; - $381 = HEAP32[$input>>2]|0; - $382 = (($380) + ($381))|0; - HEAP32[$input>>2] = $382; - $383 = (_s32_gte($382)|0); - $i$33 = 1;$mask$02 = $383; - while(1) { - $150 = $i$33 & 1; - $151 = ($150|0)==(0); - $152 = (($input) + ($i$33<<2)|0); - $153 = HEAP32[$152>>2]|0; - if ($151) { - $155 = (_s32_eq($153,67108863)|0); - $$pn = $155; - } else { - $154 = (_s32_eq($153,33554431)|0); - $$pn = $154; - } - $mask$1 = $$pn & $mask$02; - $156 = (($i$33) + 1)|0; - $exitcond = ($156|0)==(10); - if ($exitcond) { - break; - } else { - $i$33 = $156;$mask$02 = $mask$1; - } - } - $157 = $mask$1 & 67108845; - $158 = HEAP32[$input>>2]|0; - $159 = (($158) - ($157))|0; - HEAP32[$input>>2] = $159; - $160 = $mask$1 & 67108863; - $161 = $mask$1 & 33554431; - $162 = (($input) + 4|0); - $163 = HEAP32[$162>>2]|0; - $164 = (($163) - ($161))|0; - HEAP32[$162>>2] = $164; - $165 = (($input) + 8|0); - $166 = HEAP32[$165>>2]|0; - $167 = (($166) - ($160))|0; - HEAP32[$165>>2] = $167; - $168 = (($input) + 12|0); - $169 = HEAP32[$168>>2]|0; - $170 = (($169) - ($161))|0; - HEAP32[$168>>2] = $170; - $171 = (($input) + 16|0); - $172 = HEAP32[$171>>2]|0; - $173 = (($172) - ($160))|0; - HEAP32[$171>>2] = $173; - $174 = (($input) + 20|0); - $175 = HEAP32[$174>>2]|0; - $176 = (($175) - ($161))|0; - HEAP32[$174>>2] = $176; - $177 = (($input) + 24|0); - $178 = HEAP32[$177>>2]|0; - $179 = (($178) - ($160))|0; - HEAP32[$177>>2] = $179; - $180 = (($input) + 28|0); - $181 = HEAP32[$180>>2]|0; - $182 = (($181) - ($161))|0; - HEAP32[$180>>2] = $182; - $183 = (($input) + 32|0); - $184 = HEAP32[$183>>2]|0; - $185 = (($184) - ($160))|0; - HEAP32[$183>>2] = $185; - $186 = (($input) + 36|0); - $187 = HEAP32[$186>>2]|0; - $188 = (($187) - ($161))|0; - HEAP32[$186>>2] = $188; - $189 = HEAP32[$123>>2]|0; - $190 = $189 << 2; - HEAP32[$123>>2] = $190; - $191 = (($input) + 8|0); - $192 = HEAP32[$191>>2]|0; - $193 = $192 << 3; - HEAP32[$191>>2] = $193; - $194 = (($input) + 12|0); - $195 = HEAP32[$194>>2]|0; - $196 = $195 << 5; - HEAP32[$194>>2] = $196; - $197 = (($input) + 16|0); - $198 = HEAP32[$197>>2]|0; - $199 = $198 << 6; - HEAP32[$197>>2] = $199; - $200 = (($input) + 24|0); - $201 = HEAP32[$200>>2]|0; - $202 = $201 << 1; - HEAP32[$200>>2] = $202; - $203 = (($input) + 28|0); - $204 = HEAP32[$203>>2]|0; - $205 = $204 << 3; - HEAP32[$203>>2] = $205; - $206 = (($input) + 32|0); - $207 = HEAP32[$206>>2]|0; - $208 = $207 << 4; - HEAP32[$206>>2] = $208; - $209 = (($input) + 36|0); - $210 = HEAP32[$209>>2]|0; - $211 = $210 << 6; - HEAP32[$209>>2] = $211; - HEAP8[$output>>0] = 0; - $212 = (($output) + 16|0); - HEAP8[$212>>0] = 0; - $213 = HEAP32[$input>>2]|0; - $214 = HEAP8[$output>>0]|0; - $215 = $214&255; - $216 = $215 | $213; - $217 = $216&255; - HEAP8[$output>>0] = $217; - $218 = HEAP32[$input>>2]|0; - $219 = $218 >>> 8; - $220 = $219&255; - $221 = (($output) + 1|0); - HEAP8[$221>>0] = $220; - $222 = HEAP32[$input>>2]|0; - $223 = $222 >>> 16; - $224 = $223&255; - $225 = (($output) + 2|0); - HEAP8[$225>>0] = $224; - $226 = HEAP32[$input>>2]|0; - $227 = $226 >>> 24; - $228 = (($output) + 3|0); - $229 = HEAP32[$123>>2]|0; - $230 = $227 | $229; - $231 = $230&255; - HEAP8[$228>>0] = $231; - $232 = HEAP32[$123>>2]|0; - $233 = $232 >>> 8; - $234 = $233&255; - $235 = (($output) + 4|0); - HEAP8[$235>>0] = $234; - $236 = HEAP32[$123>>2]|0; - $237 = $236 >>> 16; - $238 = $237&255; - $239 = (($output) + 5|0); - HEAP8[$239>>0] = $238; - $240 = HEAP32[$123>>2]|0; - $241 = $240 >>> 24; - $242 = (($output) + 6|0); - $243 = HEAP32[$191>>2]|0; - $244 = $241 | $243; - $245 = $244&255; - HEAP8[$242>>0] = $245; - $246 = HEAP32[$191>>2]|0; - $247 = $246 >>> 8; - $248 = $247&255; - $249 = (($output) + 7|0); - HEAP8[$249>>0] = $248; - $250 = HEAP32[$191>>2]|0; - $251 = $250 >>> 16; - $252 = $251&255; - $253 = (($output) + 8|0); - HEAP8[$253>>0] = $252; - $254 = HEAP32[$191>>2]|0; - $255 = $254 >>> 24; - $256 = (($output) + 9|0); - $257 = HEAP32[$194>>2]|0; - $258 = $255 | $257; - $259 = $258&255; - HEAP8[$256>>0] = $259; - $260 = HEAP32[$194>>2]|0; - $261 = $260 >>> 8; - $262 = $261&255; - $263 = (($output) + 10|0); - HEAP8[$263>>0] = $262; - $264 = HEAP32[$194>>2]|0; - $265 = $264 >>> 16; - $266 = $265&255; - $267 = (($output) + 11|0); - HEAP8[$267>>0] = $266; - $268 = HEAP32[$194>>2]|0; - $269 = $268 >>> 24; - $270 = (($output) + 12|0); - $271 = HEAP32[$197>>2]|0; - $272 = $269 | $271; - $273 = $272&255; - HEAP8[$270>>0] = $273; - $274 = HEAP32[$197>>2]|0; - $275 = $274 >>> 8; - $276 = $275&255; - $277 = (($output) + 13|0); - HEAP8[$277>>0] = $276; - $278 = HEAP32[$197>>2]|0; - $279 = $278 >>> 16; - $280 = $279&255; - $281 = (($output) + 14|0); - HEAP8[$281>>0] = $280; - $282 = HEAP32[$197>>2]|0; - $283 = $282 >>> 24; - $284 = $283&255; - $285 = (($output) + 15|0); - HEAP8[$285>>0] = $284; - $286 = (($input) + 20|0); - $287 = HEAP32[$286>>2]|0; - $288 = HEAP8[$212>>0]|0; - $289 = $288&255; - $290 = $289 | $287; - $291 = $290&255; - HEAP8[$212>>0] = $291; - $292 = HEAP32[$286>>2]|0; - $293 = $292 >>> 8; - $294 = $293&255; - $295 = (($output) + 17|0); - HEAP8[$295>>0] = $294; - $296 = HEAP32[$286>>2]|0; - $297 = $296 >>> 16; - $298 = $297&255; - $299 = (($output) + 18|0); - HEAP8[$299>>0] = $298; - $300 = HEAP32[$286>>2]|0; - $301 = $300 >>> 24; - $302 = (($output) + 19|0); - $303 = HEAP32[$200>>2]|0; - $304 = $301 | $303; - $305 = $304&255; - HEAP8[$302>>0] = $305; - $306 = HEAP32[$200>>2]|0; - $307 = $306 >>> 8; - $308 = $307&255; - $309 = (($output) + 20|0); - HEAP8[$309>>0] = $308; - $310 = HEAP32[$200>>2]|0; - $311 = $310 >>> 16; - $312 = $311&255; - $313 = (($output) + 21|0); - HEAP8[$313>>0] = $312; - $314 = HEAP32[$200>>2]|0; - $315 = $314 >>> 24; - $316 = (($output) + 22|0); - $317 = HEAP32[$203>>2]|0; - $318 = $315 | $317; - $319 = $318&255; - HEAP8[$316>>0] = $319; - $320 = HEAP32[$203>>2]|0; - $321 = $320 >>> 8; - $322 = $321&255; - $323 = (($output) + 23|0); - HEAP8[$323>>0] = $322; - $324 = HEAP32[$203>>2]|0; - $325 = $324 >>> 16; - $326 = $325&255; - $327 = (($output) + 24|0); - HEAP8[$327>>0] = $326; - $328 = HEAP32[$203>>2]|0; - $329 = $328 >>> 24; - $330 = (($output) + 25|0); - $331 = HEAP32[$206>>2]|0; - $332 = $329 | $331; - $333 = $332&255; - HEAP8[$330>>0] = $333; - $334 = HEAP32[$206>>2]|0; - $335 = $334 >>> 8; - $336 = $335&255; - $337 = (($output) + 26|0); - HEAP8[$337>>0] = $336; - $338 = HEAP32[$206>>2]|0; - $339 = $338 >>> 16; - $340 = $339&255; - $341 = (($output) + 27|0); - HEAP8[$341>>0] = $340; - $342 = HEAP32[$206>>2]|0; - $343 = $342 >>> 24; - $344 = (($output) + 28|0); - $345 = HEAP32[$209>>2]|0; - $346 = $343 | $345; - $347 = $346&255; - HEAP8[$344>>0] = $347; - $348 = HEAP32[$209>>2]|0; - $349 = $348 >>> 8; - $350 = $349&255; - $351 = (($output) + 29|0); - HEAP8[$351>>0] = $350; - $352 = HEAP32[$209>>2]|0; - $353 = $352 >>> 16; - $354 = $353&255; - $355 = (($output) + 30|0); - HEAP8[$355>>0] = $354; - $356 = HEAP32[$209>>2]|0; - $357 = $356 >>> 24; - $358 = $357&255; - $359 = (($output) + 31|0); - HEAP8[$359>>0] = $358; - STACKTOP = sp;return; -} -function _swap_conditional($a,$b,$0,$1) { - $a = $a|0; - $b = $b|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; - var $9 = 0, $exitcond = 0, $i$02 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_i64Subtract(0,0,($0|0),($1|0))|0); - $3 = tempRet0; - $i$02 = 0; - while(1) { - $4 = (($a) + ($i$02<<3)|0); - $5 = $4; - $6 = $5; - $7 = HEAP32[$6>>2]|0; - $8 = (($5) + 4)|0; - $9 = $8; - $10 = HEAP32[$9>>2]|0; - $11 = (($b) + ($i$02<<3)|0); - $12 = $11; - $13 = $12; - $14 = HEAP32[$13>>2]|0; - $15 = (($12) + 4)|0; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = $14 ^ $7; - $19 = $17 ^ $10; - $20 = $18 & $2; - $21 = $19 & $3; - $22 = $20 ^ $7; - $21 ^ $10; - $23 = (_bitshift64Ashr(0,($22|0),32)|0); - $24 = tempRet0; - $25 = $4; - $26 = $25; - HEAP32[$26>>2] = $23; - $27 = (($25) + 4)|0; - $28 = $27; - HEAP32[$28>>2] = $24; - $29 = $11; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (($29) + 4)|0; - $33 = $32; - $34 = HEAP32[$33>>2]|0; - $35 = $20 ^ $31; - $21 ^ $34; - $36 = (_bitshift64Ashr(0,($35|0),32)|0); - $37 = tempRet0; - $38 = $11; - $39 = $38; - HEAP32[$39>>2] = $36; - $40 = (($38) + 4)|0; - $41 = $40; - HEAP32[$41>>2] = $37; - $42 = (($i$02) + 1)|0; - $exitcond = ($42|0)==(10); - if ($exitcond) { - break; - } else { - $i$02 = $42; - } - } - STACKTOP = sp;return; -} -function _fmonty($x2,$z2,$x3,$z3,$x,$z,$xprime,$zprime,$qmqp) { - $x2 = $x2|0; - $z2 = $z2|0; - $x3 = $x3|0; - $z3 = $z3|0; - $x = $x|0; - $z = $z|0; - $xprime = $xprime|0; - $zprime = $zprime|0; - $qmqp = $qmqp|0; - var $0 = 0, $origx = 0, $origxprime = 0, $xx = 0, $xxprime = 0, $xxxprime = 0, $zz = 0, $zzprime = 0, $zzz = 0, $zzzprime = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 1232|0; - $origx = sp + 1144|0; - $origxprime = sp + 1064|0; - $zzz = sp + 912|0; - $xx = sp + 760|0; - $zz = sp + 608|0; - $xxprime = sp + 456|0; - $zzprime = sp + 304|0; - $zzzprime = sp + 152|0; - $xxxprime = sp; - dest=$origx+0|0; src=$x+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($x,$z); - _fdifference($z,$origx); - dest=$origxprime+0|0; src=$xprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($xprime,$zprime); - _fdifference($zprime,$origxprime); - _fproduct($xxprime,$xprime,$z); - _fproduct($zzprime,$x,$zprime); - _freduce_degree($xxprime); - _freduce_coefficients($xxprime); - _freduce_degree($zzprime); - _freduce_coefficients($zzprime); - dest=$origxprime+0|0; src=$xxprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($xxprime,$zzprime); - _fdifference($zzprime,$origxprime); - _fsquare($xxxprime,$xxprime); - _fsquare($zzzprime,$zzprime); - _fproduct($zzprime,$zzzprime,$qmqp); - _freduce_degree($zzprime); - _freduce_coefficients($zzprime); - dest=$x3+0|0; src=$xxxprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$z3+0|0; src=$zzprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsquare($xx,$x); - _fsquare($zz,$z); - _fproduct($x2,$xx,$zz); - _freduce_degree($x2); - _freduce_coefficients($x2); - _fdifference($zz,$xx); - $0 = (($zzz) + 80|0); - dest=$0+0|0; stop=dest+72|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - _fscalar_product($zzz,$zz); - _freduce_coefficients($zzz); - _fsum($zzz,$xx); - _fproduct($z2,$zz,$zzz); - _freduce_degree($z2); - _freduce_coefficients($z2); - STACKTOP = sp;return; -} -function _fsquare($output,$in) { - $output = $output|0; - $in = $in|0; - var $t = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 160|0; - $t = sp; - _fsquare_inner($t,$in); - _freduce_degree($t); - _freduce_coefficients($t); - dest=$output+0|0; src=$t+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _fproduct($output,$in2,$in) { - $output = $output|0; - $in2 = $in2|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; - var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; - var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; - var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; - var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; - var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; - var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0; - var $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0; - var $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0; - var $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0; - var $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0; - var $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0; - var $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0, $123 = 0, $1230 = 0; - var $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0, $1248 = 0, $1249 = 0; - var $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0, $1266 = 0, $1267 = 0; - var $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $1274 = 0, $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0, $1283 = 0, $1284 = 0, $1285 = 0; - var $1286 = 0, $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0, $1291 = 0, $1292 = 0, $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0, $1300 = 0, $1301 = 0, $1302 = 0; - var $1303 = 0, $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0, $1309 = 0, $131 = 0, $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0, $1319 = 0, $132 = 0, $1320 = 0; - var $1321 = 0, $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0, $1327 = 0, $1328 = 0, $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0, $1337 = 0, $1338 = 0, $1339 = 0; - var $134 = 0, $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0, $1345 = 0, $1346 = 0, $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0, $1355 = 0, $1356 = 0, $1357 = 0; - var $1358 = 0, $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0, $1363 = 0, $1364 = 0, $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0, $1373 = 0, $1374 = 0, $1375 = 0; - var $1376 = 0, $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0, $1381 = 0, $1382 = 0, $1383 = 0, $1384 = 0, $1385 = 0, $1386 = 0, $1387 = 0, $1388 = 0, $1389 = 0, $139 = 0, $1390 = 0, $1391 = 0, $1392 = 0, $1393 = 0; - var $1394 = 0, $1395 = 0, $1396 = 0, $1397 = 0, $1398 = 0, $1399 = 0, $14 = 0, $140 = 0, $1400 = 0, $1401 = 0, $1402 = 0, $1403 = 0, $1404 = 0, $1405 = 0, $1406 = 0, $1407 = 0, $1408 = 0, $1409 = 0, $141 = 0, $1410 = 0; - var $1411 = 0, $1412 = 0, $1413 = 0, $1414 = 0, $1415 = 0, $1416 = 0, $1417 = 0, $1418 = 0, $1419 = 0, $142 = 0, $1420 = 0, $1421 = 0, $1422 = 0, $1423 = 0, $1424 = 0, $1425 = 0, $1426 = 0, $1427 = 0, $1428 = 0, $1429 = 0; - var $143 = 0, $1430 = 0, $1431 = 0, $1432 = 0, $1433 = 0, $1434 = 0, $1435 = 0, $1436 = 0, $1437 = 0, $1438 = 0, $1439 = 0, $144 = 0, $1440 = 0, $1441 = 0, $1442 = 0, $1443 = 0, $1444 = 0, $1445 = 0, $1446 = 0, $1447 = 0; - var $1448 = 0, $1449 = 0, $145 = 0, $1450 = 0, $1451 = 0, $1452 = 0, $1453 = 0, $1454 = 0, $1455 = 0, $1456 = 0, $1457 = 0, $1458 = 0, $1459 = 0, $146 = 0, $1460 = 0, $1461 = 0, $1462 = 0, $1463 = 0, $1464 = 0, $1465 = 0; - var $1466 = 0, $1467 = 0, $1468 = 0, $1469 = 0, $147 = 0, $1470 = 0, $1471 = 0, $1472 = 0, $1473 = 0, $1474 = 0, $1475 = 0, $1476 = 0, $1477 = 0, $1478 = 0, $1479 = 0, $148 = 0, $1480 = 0, $1481 = 0, $1482 = 0, $1483 = 0; - var $1484 = 0, $1485 = 0, $1486 = 0, $1487 = 0, $1488 = 0, $1489 = 0, $149 = 0, $1490 = 0, $1491 = 0, $1492 = 0, $1493 = 0, $1494 = 0, $1495 = 0, $1496 = 0, $1497 = 0, $1498 = 0, $1499 = 0, $15 = 0, $150 = 0, $1500 = 0; - var $1501 = 0, $1502 = 0, $1503 = 0, $1504 = 0, $1505 = 0, $1506 = 0, $1507 = 0, $1508 = 0, $1509 = 0, $151 = 0, $1510 = 0, $1511 = 0, $1512 = 0, $1513 = 0, $1514 = 0, $1515 = 0, $1516 = 0, $1517 = 0, $1518 = 0, $1519 = 0; - var $152 = 0, $1520 = 0, $1521 = 0, $1522 = 0, $1523 = 0, $1524 = 0, $1525 = 0, $1526 = 0, $1527 = 0, $1528 = 0, $1529 = 0, $153 = 0, $1530 = 0, $1531 = 0, $1532 = 0, $1533 = 0, $1534 = 0, $1535 = 0, $1536 = 0, $1537 = 0; - var $1538 = 0, $1539 = 0, $154 = 0, $1540 = 0, $1541 = 0, $1542 = 0, $1543 = 0, $1544 = 0, $1545 = 0, $1546 = 0, $1547 = 0, $1548 = 0, $1549 = 0, $155 = 0, $1550 = 0, $1551 = 0, $1552 = 0, $1553 = 0, $1554 = 0, $1555 = 0; - var $1556 = 0, $1557 = 0, $1558 = 0, $1559 = 0, $156 = 0, $1560 = 0, $1561 = 0, $1562 = 0, $1563 = 0, $1564 = 0, $1565 = 0, $1566 = 0, $1567 = 0, $1568 = 0, $1569 = 0, $157 = 0, $1570 = 0, $1571 = 0, $1572 = 0, $1573 = 0; - var $1574 = 0, $1575 = 0, $1576 = 0, $1577 = 0, $1578 = 0, $1579 = 0, $158 = 0, $1580 = 0, $1581 = 0, $1582 = 0, $1583 = 0, $1584 = 0, $1585 = 0, $1586 = 0, $1587 = 0, $1588 = 0, $1589 = 0, $159 = 0, $1590 = 0, $1591 = 0; - var $1592 = 0, $1593 = 0, $1594 = 0, $1595 = 0, $1596 = 0, $1597 = 0, $1598 = 0, $1599 = 0, $16 = 0, $160 = 0, $1600 = 0, $1601 = 0, $1602 = 0, $1603 = 0, $1604 = 0, $1605 = 0, $1606 = 0, $1607 = 0, $1608 = 0, $1609 = 0; - var $161 = 0, $1610 = 0, $1611 = 0, $1612 = 0, $1613 = 0, $1614 = 0, $1615 = 0, $1616 = 0, $1617 = 0, $1618 = 0, $1619 = 0, $162 = 0, $1620 = 0, $1621 = 0, $1622 = 0, $1623 = 0, $1624 = 0, $1625 = 0, $1626 = 0, $1627 = 0; - var $1628 = 0, $1629 = 0, $163 = 0, $1630 = 0, $1631 = 0, $1632 = 0, $1633 = 0, $1634 = 0, $1635 = 0, $1636 = 0, $1637 = 0, $1638 = 0, $1639 = 0, $164 = 0, $1640 = 0, $1641 = 0, $1642 = 0, $1643 = 0, $1644 = 0, $1645 = 0; - var $1646 = 0, $1647 = 0, $1648 = 0, $1649 = 0, $165 = 0, $1650 = 0, $1651 = 0, $1652 = 0, $1653 = 0, $1654 = 0, $1655 = 0, $1656 = 0, $1657 = 0, $1658 = 0, $1659 = 0, $166 = 0, $1660 = 0, $1661 = 0, $1662 = 0, $1663 = 0; - var $1664 = 0, $1665 = 0, $1666 = 0, $1667 = 0, $1668 = 0, $1669 = 0, $167 = 0, $1670 = 0, $1671 = 0, $1672 = 0, $1673 = 0, $1674 = 0, $1675 = 0, $1676 = 0, $1677 = 0, $1678 = 0, $1679 = 0, $168 = 0, $1680 = 0, $1681 = 0; - var $1682 = 0, $1683 = 0, $1684 = 0, $1685 = 0, $1686 = 0, $1687 = 0, $1688 = 0, $1689 = 0, $169 = 0, $1690 = 0, $1691 = 0, $1692 = 0, $1693 = 0, $1694 = 0, $1695 = 0, $1696 = 0, $1697 = 0, $1698 = 0, $1699 = 0, $17 = 0; - var $170 = 0, $1700 = 0, $1701 = 0, $1702 = 0, $1703 = 0, $1704 = 0, $1705 = 0, $1706 = 0, $1707 = 0, $1708 = 0, $1709 = 0, $171 = 0, $1710 = 0, $1711 = 0, $1712 = 0, $1713 = 0, $1714 = 0, $1715 = 0, $1716 = 0, $1717 = 0; - var $1718 = 0, $1719 = 0, $172 = 0, $1720 = 0, $1721 = 0, $1722 = 0, $1723 = 0, $1724 = 0, $1725 = 0, $1726 = 0, $1727 = 0, $1728 = 0, $1729 = 0, $173 = 0, $1730 = 0, $1731 = 0, $1732 = 0, $1733 = 0, $1734 = 0, $1735 = 0; - var $1736 = 0, $1737 = 0, $1738 = 0, $1739 = 0, $174 = 0, $1740 = 0, $1741 = 0, $1742 = 0, $1743 = 0, $1744 = 0, $1745 = 0, $1746 = 0, $1747 = 0, $1748 = 0, $1749 = 0, $175 = 0, $1750 = 0, $1751 = 0, $1752 = 0, $1753 = 0; - var $1754 = 0, $1755 = 0, $1756 = 0, $1757 = 0, $1758 = 0, $1759 = 0, $176 = 0, $1760 = 0, $1761 = 0, $1762 = 0, $1763 = 0, $1764 = 0, $1765 = 0, $1766 = 0, $1767 = 0, $1768 = 0, $1769 = 0, $177 = 0, $1770 = 0, $1771 = 0; - var $1772 = 0, $1773 = 0, $1774 = 0, $1775 = 0, $1776 = 0, $1777 = 0, $1778 = 0, $1779 = 0, $178 = 0, $1780 = 0, $1781 = 0, $1782 = 0, $1783 = 0, $1784 = 0, $1785 = 0, $1786 = 0, $1787 = 0, $1788 = 0, $1789 = 0, $179 = 0; - var $1790 = 0, $1791 = 0, $1792 = 0, $1793 = 0, $1794 = 0, $1795 = 0, $1796 = 0, $1797 = 0, $1798 = 0, $1799 = 0, $18 = 0, $180 = 0, $1800 = 0, $1801 = 0, $1802 = 0, $1803 = 0, $1804 = 0, $1805 = 0, $1806 = 0, $1807 = 0; - var $1808 = 0, $1809 = 0, $181 = 0, $1810 = 0, $1811 = 0, $1812 = 0, $1813 = 0, $1814 = 0, $1815 = 0, $1816 = 0, $1817 = 0, $1818 = 0, $1819 = 0, $182 = 0, $1820 = 0, $1821 = 0, $1822 = 0, $1823 = 0, $1824 = 0, $1825 = 0; - var $1826 = 0, $1827 = 0, $1828 = 0, $1829 = 0, $183 = 0, $1830 = 0, $1831 = 0, $1832 = 0, $1833 = 0, $1834 = 0, $1835 = 0, $1836 = 0, $1837 = 0, $1838 = 0, $1839 = 0, $184 = 0, $1840 = 0, $1841 = 0, $1842 = 0, $1843 = 0; - var $1844 = 0, $1845 = 0, $1846 = 0, $1847 = 0, $1848 = 0, $1849 = 0, $185 = 0, $1850 = 0, $1851 = 0, $1852 = 0, $1853 = 0, $1854 = 0, $1855 = 0, $1856 = 0, $1857 = 0, $1858 = 0, $1859 = 0, $186 = 0, $1860 = 0, $1861 = 0; - var $1862 = 0, $1863 = 0, $1864 = 0, $1865 = 0, $1866 = 0, $1867 = 0, $1868 = 0, $1869 = 0, $187 = 0, $1870 = 0, $1871 = 0, $1872 = 0, $1873 = 0, $1874 = 0, $1875 = 0, $1876 = 0, $1877 = 0, $1878 = 0, $1879 = 0, $188 = 0; - var $1880 = 0, $1881 = 0, $1882 = 0, $1883 = 0, $1884 = 0, $1885 = 0, $1886 = 0, $1887 = 0, $1888 = 0, $1889 = 0, $189 = 0, $1890 = 0, $1891 = 0, $1892 = 0, $1893 = 0, $1894 = 0, $1895 = 0, $1896 = 0, $1897 = 0, $1898 = 0; - var $1899 = 0, $19 = 0, $190 = 0, $1900 = 0, $1901 = 0, $1902 = 0, $1903 = 0, $1904 = 0, $1905 = 0, $1906 = 0, $1907 = 0, $1908 = 0, $1909 = 0, $191 = 0, $1910 = 0, $1911 = 0, $1912 = 0, $1913 = 0, $1914 = 0, $1915 = 0; - var $1916 = 0, $1917 = 0, $1918 = 0, $1919 = 0, $192 = 0, $1920 = 0, $1921 = 0, $1922 = 0, $1923 = 0, $1924 = 0, $1925 = 0, $1926 = 0, $1927 = 0, $1928 = 0, $1929 = 0, $193 = 0, $1930 = 0, $1931 = 0, $1932 = 0, $1933 = 0; - var $1934 = 0, $1935 = 0, $1936 = 0, $1937 = 0, $1938 = 0, $1939 = 0, $194 = 0, $1940 = 0, $1941 = 0, $1942 = 0, $1943 = 0, $1944 = 0, $1945 = 0, $1946 = 0, $1947 = 0, $1948 = 0, $1949 = 0, $195 = 0, $1950 = 0, $1951 = 0; - var $1952 = 0, $1953 = 0, $1954 = 0, $1955 = 0, $1956 = 0, $1957 = 0, $1958 = 0, $1959 = 0, $196 = 0, $1960 = 0, $1961 = 0, $1962 = 0, $1963 = 0, $1964 = 0, $1965 = 0, $1966 = 0, $1967 = 0, $1968 = 0, $1969 = 0, $197 = 0; - var $1970 = 0, $1971 = 0, $1972 = 0, $1973 = 0, $1974 = 0, $1975 = 0, $1976 = 0, $1977 = 0, $1978 = 0, $1979 = 0, $198 = 0, $1980 = 0, $1981 = 0, $1982 = 0, $1983 = 0, $1984 = 0, $1985 = 0, $1986 = 0, $1987 = 0, $1988 = 0; - var $1989 = 0, $199 = 0, $1990 = 0, $1991 = 0, $1992 = 0, $1993 = 0, $1994 = 0, $1995 = 0, $1996 = 0, $1997 = 0, $1998 = 0, $1999 = 0, $2 = 0, $20 = 0, $200 = 0, $2000 = 0, $2001 = 0, $2002 = 0, $2003 = 0, $2004 = 0; - var $2005 = 0, $2006 = 0, $2007 = 0, $2008 = 0, $2009 = 0, $201 = 0, $2010 = 0, $2011 = 0, $2012 = 0, $2013 = 0, $2014 = 0, $2015 = 0, $2016 = 0, $2017 = 0, $2018 = 0, $2019 = 0, $202 = 0, $2020 = 0, $2021 = 0, $2022 = 0; - var $2023 = 0, $2024 = 0, $2025 = 0, $2026 = 0, $2027 = 0, $2028 = 0, $2029 = 0, $203 = 0, $2030 = 0, $2031 = 0, $2032 = 0, $2033 = 0, $2034 = 0, $2035 = 0, $2036 = 0, $2037 = 0, $2038 = 0, $2039 = 0, $204 = 0, $2040 = 0; - var $2041 = 0, $2042 = 0, $2043 = 0, $2044 = 0, $2045 = 0, $2046 = 0, $2047 = 0, $2048 = 0, $2049 = 0, $205 = 0, $2050 = 0, $2051 = 0, $2052 = 0, $2053 = 0, $2054 = 0, $2055 = 0, $2056 = 0, $2057 = 0, $2058 = 0, $2059 = 0; - var $206 = 0, $2060 = 0, $2061 = 0, $2062 = 0, $2063 = 0, $2064 = 0, $2065 = 0, $2066 = 0, $2067 = 0, $2068 = 0, $2069 = 0, $207 = 0, $2070 = 0, $2071 = 0, $2072 = 0, $2073 = 0, $2074 = 0, $2075 = 0, $2076 = 0, $2077 = 0; - var $2078 = 0, $2079 = 0, $208 = 0, $2080 = 0, $2081 = 0, $2082 = 0, $2083 = 0, $2084 = 0, $2085 = 0, $2086 = 0, $2087 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0; - var $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0; - var $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0; - var $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0; - var $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0; - var $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0; - var $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0; - var $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0; - var $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0; - var $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0; - var $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0; - var $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0; - var $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0; - var $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0; - var $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0; - var $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0; - var $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0; - var $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0; - var $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0; - var $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0; - var $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0; - var $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0; - var $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0; - var $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0; - var $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0; - var $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0; - var $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0; - var $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0; - var $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0; - var $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0; - var $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0; - var $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0; - var $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0; - var $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0; - var $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0; - var $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0; - var $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0; - var $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0; - var $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0; - var $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0; - var $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0; - var $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0; - var $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0; - var $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0; - var $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $in2; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = (_bitshift64Ashr(0,($2|0),32)|0); - $7 = tempRet0; - $8 = $in; - $9 = $8; - $10 = HEAP32[$9>>2]|0; - $11 = (($8) + 4)|0; - $12 = $11; - $13 = HEAP32[$12>>2]|0; - $14 = (_bitshift64Ashr(0,($10|0),32)|0); - $15 = tempRet0; - $16 = (___muldi3(($14|0),($15|0),($6|0),($7|0))|0); - $17 = tempRet0; - $18 = $output; - $19 = $18; - HEAP32[$19>>2] = $16; - $20 = (($18) + 4)|0; - $21 = $20; - HEAP32[$21>>2] = $17; - $22 = $in2; - $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($22) + 4)|0; - $26 = $25; - $27 = HEAP32[$26>>2]|0; - $28 = (_bitshift64Ashr(0,($24|0),32)|0); - $29 = tempRet0; - $30 = (($in) + 8|0); - $31 = $30; - $32 = $31; - $33 = HEAP32[$32>>2]|0; - $34 = (($31) + 4)|0; - $35 = $34; - $36 = HEAP32[$35>>2]|0; - $37 = (_bitshift64Ashr(0,($33|0),32)|0); - $38 = tempRet0; - $39 = (___muldi3(($37|0),($38|0),($28|0),($29|0))|0); - $40 = tempRet0; - $41 = (($in2) + 8|0); - $42 = $41; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($42) + 4)|0; - $46 = $45; - $47 = HEAP32[$46>>2]|0; - $48 = (_bitshift64Ashr(0,($44|0),32)|0); - $49 = tempRet0; - $50 = $in; - $51 = $50; - $52 = HEAP32[$51>>2]|0; - $53 = (($50) + 4)|0; - $54 = $53; - $55 = HEAP32[$54>>2]|0; - $56 = (_bitshift64Ashr(0,($52|0),32)|0); - $57 = tempRet0; - $58 = (___muldi3(($56|0),($57|0),($48|0),($49|0))|0); - $59 = tempRet0; - $60 = (_i64Add(($58|0),($59|0),($39|0),($40|0))|0); - $61 = tempRet0; - $62 = (($output) + 8|0); - $63 = $62; - $64 = $63; - HEAP32[$64>>2] = $60; - $65 = (($63) + 4)|0; - $66 = $65; - HEAP32[$66>>2] = $61; - $67 = $41; - $68 = $67; - $69 = HEAP32[$68>>2]|0; - $70 = (($67) + 4)|0; - $71 = $70; - $72 = HEAP32[$71>>2]|0; - $73 = (_bitshift64Ashr(0,($69|0),31)|0); - $74 = tempRet0; - $75 = $30; - $76 = $75; - $77 = HEAP32[$76>>2]|0; - $78 = (($75) + 4)|0; - $79 = $78; - $80 = HEAP32[$79>>2]|0; - $81 = (_bitshift64Ashr(0,($77|0),32)|0); - $82 = tempRet0; - $83 = (___muldi3(($81|0),($82|0),($73|0),($74|0))|0); - $84 = tempRet0; - $85 = $in2; - $86 = $85; - $87 = HEAP32[$86>>2]|0; - $88 = (($85) + 4)|0; - $89 = $88; - $90 = HEAP32[$89>>2]|0; - $91 = (_bitshift64Ashr(0,($87|0),32)|0); - $92 = tempRet0; - $93 = (($in) + 16|0); - $94 = $93; - $95 = $94; - $96 = HEAP32[$95>>2]|0; - $97 = (($94) + 4)|0; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (_bitshift64Ashr(0,($96|0),32)|0); - $101 = tempRet0; - $102 = (___muldi3(($100|0),($101|0),($91|0),($92|0))|0); - $103 = tempRet0; - $104 = (_i64Add(($102|0),($103|0),($83|0),($84|0))|0); - $105 = tempRet0; - $106 = (($in2) + 16|0); - $107 = $106; - $108 = $107; - $109 = HEAP32[$108>>2]|0; - $110 = (($107) + 4)|0; - $111 = $110; - $112 = HEAP32[$111>>2]|0; - $113 = (_bitshift64Ashr(0,($109|0),32)|0); - $114 = tempRet0; - $115 = $in; - $116 = $115; - $117 = HEAP32[$116>>2]|0; - $118 = (($115) + 4)|0; - $119 = $118; - $120 = HEAP32[$119>>2]|0; - $121 = (_bitshift64Ashr(0,($117|0),32)|0); - $122 = tempRet0; - $123 = (___muldi3(($121|0),($122|0),($113|0),($114|0))|0); - $124 = tempRet0; - $125 = (_i64Add(($104|0),($105|0),($123|0),($124|0))|0); - $126 = tempRet0; - $127 = (($output) + 16|0); - $128 = $127; - $129 = $128; - HEAP32[$129>>2] = $125; - $130 = (($128) + 4)|0; - $131 = $130; - HEAP32[$131>>2] = $126; - $132 = $41; - $133 = $132; - $134 = HEAP32[$133>>2]|0; - $135 = (($132) + 4)|0; - $136 = $135; - $137 = HEAP32[$136>>2]|0; - $138 = (_bitshift64Ashr(0,($134|0),32)|0); - $139 = tempRet0; - $140 = $93; - $141 = $140; - $142 = HEAP32[$141>>2]|0; - $143 = (($140) + 4)|0; - $144 = $143; - $145 = HEAP32[$144>>2]|0; - $146 = (_bitshift64Ashr(0,($142|0),32)|0); - $147 = tempRet0; - $148 = (___muldi3(($146|0),($147|0),($138|0),($139|0))|0); - $149 = tempRet0; - $150 = $106; - $151 = $150; - $152 = HEAP32[$151>>2]|0; - $153 = (($150) + 4)|0; - $154 = $153; - $155 = HEAP32[$154>>2]|0; - $156 = (_bitshift64Ashr(0,($152|0),32)|0); - $157 = tempRet0; - $158 = $30; - $159 = $158; - $160 = HEAP32[$159>>2]|0; - $161 = (($158) + 4)|0; - $162 = $161; - $163 = HEAP32[$162>>2]|0; - $164 = (_bitshift64Ashr(0,($160|0),32)|0); - $165 = tempRet0; - $166 = (___muldi3(($164|0),($165|0),($156|0),($157|0))|0); - $167 = tempRet0; - $168 = (_i64Add(($166|0),($167|0),($148|0),($149|0))|0); - $169 = tempRet0; - $170 = $in2; - $171 = $170; - $172 = HEAP32[$171>>2]|0; - $173 = (($170) + 4)|0; - $174 = $173; - $175 = HEAP32[$174>>2]|0; - $176 = (_bitshift64Ashr(0,($172|0),32)|0); - $177 = tempRet0; - $178 = (($in) + 24|0); - $179 = $178; - $180 = $179; - $181 = HEAP32[$180>>2]|0; - $182 = (($179) + 4)|0; - $183 = $182; - $184 = HEAP32[$183>>2]|0; - $185 = (_bitshift64Ashr(0,($181|0),32)|0); - $186 = tempRet0; - $187 = (___muldi3(($185|0),($186|0),($176|0),($177|0))|0); - $188 = tempRet0; - $189 = (_i64Add(($168|0),($169|0),($187|0),($188|0))|0); - $190 = tempRet0; - $191 = (($in2) + 24|0); - $192 = $191; - $193 = $192; - $194 = HEAP32[$193>>2]|0; - $195 = (($192) + 4)|0; - $196 = $195; - $197 = HEAP32[$196>>2]|0; - $198 = (_bitshift64Ashr(0,($194|0),32)|0); - $199 = tempRet0; - $200 = $in; - $201 = $200; - $202 = HEAP32[$201>>2]|0; - $203 = (($200) + 4)|0; - $204 = $203; - $205 = HEAP32[$204>>2]|0; - $206 = (_bitshift64Ashr(0,($202|0),32)|0); - $207 = tempRet0; - $208 = (___muldi3(($206|0),($207|0),($198|0),($199|0))|0); - $209 = tempRet0; - $210 = (_i64Add(($189|0),($190|0),($208|0),($209|0))|0); - $211 = tempRet0; - $212 = (($output) + 24|0); - $213 = $212; - $214 = $213; - HEAP32[$214>>2] = $210; - $215 = (($213) + 4)|0; - $216 = $215; - HEAP32[$216>>2] = $211; - $217 = $106; - $218 = $217; - $219 = HEAP32[$218>>2]|0; - $220 = (($217) + 4)|0; - $221 = $220; - $222 = HEAP32[$221>>2]|0; - $223 = (_bitshift64Ashr(0,($219|0),32)|0); - $224 = tempRet0; - $225 = $93; - $226 = $225; - $227 = HEAP32[$226>>2]|0; - $228 = (($225) + 4)|0; - $229 = $228; - $230 = HEAP32[$229>>2]|0; - $231 = (_bitshift64Ashr(0,($227|0),32)|0); - $232 = tempRet0; - $233 = (___muldi3(($231|0),($232|0),($223|0),($224|0))|0); - $234 = tempRet0; - $235 = $41; - $236 = $235; - $237 = HEAP32[$236>>2]|0; - $238 = (($235) + 4)|0; - $239 = $238; - $240 = HEAP32[$239>>2]|0; - $241 = (_bitshift64Ashr(0,($237|0),32)|0); - $242 = tempRet0; - $243 = $178; - $244 = $243; - $245 = HEAP32[$244>>2]|0; - $246 = (($243) + 4)|0; - $247 = $246; - $248 = HEAP32[$247>>2]|0; - $249 = (_bitshift64Ashr(0,($245|0),32)|0); - $250 = tempRet0; - $251 = (___muldi3(($249|0),($250|0),($241|0),($242|0))|0); - $252 = tempRet0; - $253 = $191; - $254 = $253; - $255 = HEAP32[$254>>2]|0; - $256 = (($253) + 4)|0; - $257 = $256; - $258 = HEAP32[$257>>2]|0; - $259 = (_bitshift64Ashr(0,($255|0),32)|0); - $260 = tempRet0; - $261 = $30; - $262 = $261; - $263 = HEAP32[$262>>2]|0; - $264 = (($261) + 4)|0; - $265 = $264; - $266 = HEAP32[$265>>2]|0; - $267 = (_bitshift64Ashr(0,($263|0),32)|0); - $268 = tempRet0; - $269 = (___muldi3(($267|0),($268|0),($259|0),($260|0))|0); - $270 = tempRet0; - $271 = (_i64Add(($269|0),($270|0),($251|0),($252|0))|0); - $272 = tempRet0; - $273 = (_bitshift64Shl(($271|0),($272|0),1)|0); - $274 = tempRet0; - $275 = (_i64Add(($273|0),($274|0),($233|0),($234|0))|0); - $276 = tempRet0; - $277 = $in2; - $278 = $277; - $279 = HEAP32[$278>>2]|0; - $280 = (($277) + 4)|0; - $281 = $280; - $282 = HEAP32[$281>>2]|0; - $283 = (_bitshift64Ashr(0,($279|0),32)|0); - $284 = tempRet0; - $285 = (($in) + 32|0); - $286 = $285; - $287 = $286; - $288 = HEAP32[$287>>2]|0; - $289 = (($286) + 4)|0; - $290 = $289; - $291 = HEAP32[$290>>2]|0; - $292 = (_bitshift64Ashr(0,($288|0),32)|0); - $293 = tempRet0; - $294 = (___muldi3(($292|0),($293|0),($283|0),($284|0))|0); - $295 = tempRet0; - $296 = (_i64Add(($275|0),($276|0),($294|0),($295|0))|0); - $297 = tempRet0; - $298 = (($in2) + 32|0); - $299 = $298; - $300 = $299; - $301 = HEAP32[$300>>2]|0; - $302 = (($299) + 4)|0; - $303 = $302; - $304 = HEAP32[$303>>2]|0; - $305 = (_bitshift64Ashr(0,($301|0),32)|0); - $306 = tempRet0; - $307 = $in; - $308 = $307; - $309 = HEAP32[$308>>2]|0; - $310 = (($307) + 4)|0; - $311 = $310; - $312 = HEAP32[$311>>2]|0; - $313 = (_bitshift64Ashr(0,($309|0),32)|0); - $314 = tempRet0; - $315 = (___muldi3(($313|0),($314|0),($305|0),($306|0))|0); - $316 = tempRet0; - $317 = (_i64Add(($296|0),($297|0),($315|0),($316|0))|0); - $318 = tempRet0; - $319 = (($output) + 32|0); - $320 = $319; - $321 = $320; - HEAP32[$321>>2] = $317; - $322 = (($320) + 4)|0; - $323 = $322; - HEAP32[$323>>2] = $318; - $324 = $106; - $325 = $324; - $326 = HEAP32[$325>>2]|0; - $327 = (($324) + 4)|0; - $328 = $327; - $329 = HEAP32[$328>>2]|0; - $330 = (_bitshift64Ashr(0,($326|0),32)|0); - $331 = tempRet0; - $332 = $178; - $333 = $332; - $334 = HEAP32[$333>>2]|0; - $335 = (($332) + 4)|0; - $336 = $335; - $337 = HEAP32[$336>>2]|0; - $338 = (_bitshift64Ashr(0,($334|0),32)|0); - $339 = tempRet0; - $340 = (___muldi3(($338|0),($339|0),($330|0),($331|0))|0); - $341 = tempRet0; - $342 = $191; - $343 = $342; - $344 = HEAP32[$343>>2]|0; - $345 = (($342) + 4)|0; - $346 = $345; - $347 = HEAP32[$346>>2]|0; - $348 = (_bitshift64Ashr(0,($344|0),32)|0); - $349 = tempRet0; - $350 = $93; - $351 = $350; - $352 = HEAP32[$351>>2]|0; - $353 = (($350) + 4)|0; - $354 = $353; - $355 = HEAP32[$354>>2]|0; - $356 = (_bitshift64Ashr(0,($352|0),32)|0); - $357 = tempRet0; - $358 = (___muldi3(($356|0),($357|0),($348|0),($349|0))|0); - $359 = tempRet0; - $360 = (_i64Add(($358|0),($359|0),($340|0),($341|0))|0); - $361 = tempRet0; - $362 = $41; - $363 = $362; - $364 = HEAP32[$363>>2]|0; - $365 = (($362) + 4)|0; - $366 = $365; - $367 = HEAP32[$366>>2]|0; - $368 = (_bitshift64Ashr(0,($364|0),32)|0); - $369 = tempRet0; - $370 = $285; - $371 = $370; - $372 = HEAP32[$371>>2]|0; - $373 = (($370) + 4)|0; - $374 = $373; - $375 = HEAP32[$374>>2]|0; - $376 = (_bitshift64Ashr(0,($372|0),32)|0); - $377 = tempRet0; - $378 = (___muldi3(($376|0),($377|0),($368|0),($369|0))|0); - $379 = tempRet0; - $380 = (_i64Add(($360|0),($361|0),($378|0),($379|0))|0); - $381 = tempRet0; - $382 = $298; - $383 = $382; - $384 = HEAP32[$383>>2]|0; - $385 = (($382) + 4)|0; - $386 = $385; - $387 = HEAP32[$386>>2]|0; - $388 = (_bitshift64Ashr(0,($384|0),32)|0); - $389 = tempRet0; - $390 = $30; - $391 = $390; - $392 = HEAP32[$391>>2]|0; - $393 = (($390) + 4)|0; - $394 = $393; - $395 = HEAP32[$394>>2]|0; - $396 = (_bitshift64Ashr(0,($392|0),32)|0); - $397 = tempRet0; - $398 = (___muldi3(($396|0),($397|0),($388|0),($389|0))|0); - $399 = tempRet0; - $400 = (_i64Add(($380|0),($381|0),($398|0),($399|0))|0); - $401 = tempRet0; - $402 = $in2; - $403 = $402; - $404 = HEAP32[$403>>2]|0; - $405 = (($402) + 4)|0; - $406 = $405; - $407 = HEAP32[$406>>2]|0; - $408 = (_bitshift64Ashr(0,($404|0),32)|0); - $409 = tempRet0; - $410 = (($in) + 40|0); - $411 = $410; - $412 = $411; - $413 = HEAP32[$412>>2]|0; - $414 = (($411) + 4)|0; - $415 = $414; - $416 = HEAP32[$415>>2]|0; - $417 = (_bitshift64Ashr(0,($413|0),32)|0); - $418 = tempRet0; - $419 = (___muldi3(($417|0),($418|0),($408|0),($409|0))|0); - $420 = tempRet0; - $421 = (_i64Add(($400|0),($401|0),($419|0),($420|0))|0); - $422 = tempRet0; - $423 = (($in2) + 40|0); - $424 = $423; - $425 = $424; - $426 = HEAP32[$425>>2]|0; - $427 = (($424) + 4)|0; - $428 = $427; - $429 = HEAP32[$428>>2]|0; - $430 = (_bitshift64Ashr(0,($426|0),32)|0); - $431 = tempRet0; - $432 = $in; - $433 = $432; - $434 = HEAP32[$433>>2]|0; - $435 = (($432) + 4)|0; - $436 = $435; - $437 = HEAP32[$436>>2]|0; - $438 = (_bitshift64Ashr(0,($434|0),32)|0); - $439 = tempRet0; - $440 = (___muldi3(($438|0),($439|0),($430|0),($431|0))|0); - $441 = tempRet0; - $442 = (_i64Add(($421|0),($422|0),($440|0),($441|0))|0); - $443 = tempRet0; - $444 = (($output) + 40|0); - $445 = $444; - $446 = $445; - HEAP32[$446>>2] = $442; - $447 = (($445) + 4)|0; - $448 = $447; - HEAP32[$448>>2] = $443; - $449 = $191; - $450 = $449; - $451 = HEAP32[$450>>2]|0; - $452 = (($449) + 4)|0; - $453 = $452; - $454 = HEAP32[$453>>2]|0; - $455 = (_bitshift64Ashr(0,($451|0),32)|0); - $456 = tempRet0; - $457 = $178; - $458 = $457; - $459 = HEAP32[$458>>2]|0; - $460 = (($457) + 4)|0; - $461 = $460; - $462 = HEAP32[$461>>2]|0; - $463 = (_bitshift64Ashr(0,($459|0),32)|0); - $464 = tempRet0; - $465 = (___muldi3(($463|0),($464|0),($455|0),($456|0))|0); - $466 = tempRet0; - $467 = $41; - $468 = $467; - $469 = HEAP32[$468>>2]|0; - $470 = (($467) + 4)|0; - $471 = $470; - $472 = HEAP32[$471>>2]|0; - $473 = (_bitshift64Ashr(0,($469|0),32)|0); - $474 = tempRet0; - $475 = $410; - $476 = $475; - $477 = HEAP32[$476>>2]|0; - $478 = (($475) + 4)|0; - $479 = $478; - $480 = HEAP32[$479>>2]|0; - $481 = (_bitshift64Ashr(0,($477|0),32)|0); - $482 = tempRet0; - $483 = (___muldi3(($481|0),($482|0),($473|0),($474|0))|0); - $484 = tempRet0; - $485 = (_i64Add(($483|0),($484|0),($465|0),($466|0))|0); - $486 = tempRet0; - $487 = $423; - $488 = $487; - $489 = HEAP32[$488>>2]|0; - $490 = (($487) + 4)|0; - $491 = $490; - $492 = HEAP32[$491>>2]|0; - $493 = (_bitshift64Ashr(0,($489|0),32)|0); - $494 = tempRet0; - $495 = $30; - $496 = $495; - $497 = HEAP32[$496>>2]|0; - $498 = (($495) + 4)|0; - $499 = $498; - $500 = HEAP32[$499>>2]|0; - $501 = (_bitshift64Ashr(0,($497|0),32)|0); - $502 = tempRet0; - $503 = (___muldi3(($501|0),($502|0),($493|0),($494|0))|0); - $504 = tempRet0; - $505 = (_i64Add(($485|0),($486|0),($503|0),($504|0))|0); - $506 = tempRet0; - $507 = (_bitshift64Shl(($505|0),($506|0),1)|0); - $508 = tempRet0; - $509 = $106; - $510 = $509; - $511 = HEAP32[$510>>2]|0; - $512 = (($509) + 4)|0; - $513 = $512; - $514 = HEAP32[$513>>2]|0; - $515 = (_bitshift64Ashr(0,($511|0),32)|0); - $516 = tempRet0; - $517 = $285; - $518 = $517; - $519 = HEAP32[$518>>2]|0; - $520 = (($517) + 4)|0; - $521 = $520; - $522 = HEAP32[$521>>2]|0; - $523 = (_bitshift64Ashr(0,($519|0),32)|0); - $524 = tempRet0; - $525 = (___muldi3(($523|0),($524|0),($515|0),($516|0))|0); - $526 = tempRet0; - $527 = (_i64Add(($507|0),($508|0),($525|0),($526|0))|0); - $528 = tempRet0; - $529 = $298; - $530 = $529; - $531 = HEAP32[$530>>2]|0; - $532 = (($529) + 4)|0; - $533 = $532; - $534 = HEAP32[$533>>2]|0; - $535 = (_bitshift64Ashr(0,($531|0),32)|0); - $536 = tempRet0; - $537 = $93; - $538 = $537; - $539 = HEAP32[$538>>2]|0; - $540 = (($537) + 4)|0; - $541 = $540; - $542 = HEAP32[$541>>2]|0; - $543 = (_bitshift64Ashr(0,($539|0),32)|0); - $544 = tempRet0; - $545 = (___muldi3(($543|0),($544|0),($535|0),($536|0))|0); - $546 = tempRet0; - $547 = (_i64Add(($527|0),($528|0),($545|0),($546|0))|0); - $548 = tempRet0; - $549 = $in2; - $550 = $549; - $551 = HEAP32[$550>>2]|0; - $552 = (($549) + 4)|0; - $553 = $552; - $554 = HEAP32[$553>>2]|0; - $555 = (_bitshift64Ashr(0,($551|0),32)|0); - $556 = tempRet0; - $557 = (($in) + 48|0); - $558 = $557; - $559 = $558; - $560 = HEAP32[$559>>2]|0; - $561 = (($558) + 4)|0; - $562 = $561; - $563 = HEAP32[$562>>2]|0; - $564 = (_bitshift64Ashr(0,($560|0),32)|0); - $565 = tempRet0; - $566 = (___muldi3(($564|0),($565|0),($555|0),($556|0))|0); - $567 = tempRet0; - $568 = (_i64Add(($547|0),($548|0),($566|0),($567|0))|0); - $569 = tempRet0; - $570 = (($in2) + 48|0); - $571 = $570; - $572 = $571; - $573 = HEAP32[$572>>2]|0; - $574 = (($571) + 4)|0; - $575 = $574; - $576 = HEAP32[$575>>2]|0; - $577 = (_bitshift64Ashr(0,($573|0),32)|0); - $578 = tempRet0; - $579 = $in; - $580 = $579; - $581 = HEAP32[$580>>2]|0; - $582 = (($579) + 4)|0; - $583 = $582; - $584 = HEAP32[$583>>2]|0; - $585 = (_bitshift64Ashr(0,($581|0),32)|0); - $586 = tempRet0; - $587 = (___muldi3(($585|0),($586|0),($577|0),($578|0))|0); - $588 = tempRet0; - $589 = (_i64Add(($568|0),($569|0),($587|0),($588|0))|0); - $590 = tempRet0; - $591 = (($output) + 48|0); - $592 = $591; - $593 = $592; - HEAP32[$593>>2] = $589; - $594 = (($592) + 4)|0; - $595 = $594; - HEAP32[$595>>2] = $590; - $596 = $191; - $597 = $596; - $598 = HEAP32[$597>>2]|0; - $599 = (($596) + 4)|0; - $600 = $599; - $601 = HEAP32[$600>>2]|0; - $602 = (_bitshift64Ashr(0,($598|0),32)|0); - $603 = tempRet0; - $604 = $285; - $605 = $604; - $606 = HEAP32[$605>>2]|0; - $607 = (($604) + 4)|0; - $608 = $607; - $609 = HEAP32[$608>>2]|0; - $610 = (_bitshift64Ashr(0,($606|0),32)|0); - $611 = tempRet0; - $612 = (___muldi3(($610|0),($611|0),($602|0),($603|0))|0); - $613 = tempRet0; - $614 = $298; - $615 = $614; - $616 = HEAP32[$615>>2]|0; - $617 = (($614) + 4)|0; - $618 = $617; - $619 = HEAP32[$618>>2]|0; - $620 = (_bitshift64Ashr(0,($616|0),32)|0); - $621 = tempRet0; - $622 = $178; - $623 = $622; - $624 = HEAP32[$623>>2]|0; - $625 = (($622) + 4)|0; - $626 = $625; - $627 = HEAP32[$626>>2]|0; - $628 = (_bitshift64Ashr(0,($624|0),32)|0); - $629 = tempRet0; - $630 = (___muldi3(($628|0),($629|0),($620|0),($621|0))|0); - $631 = tempRet0; - $632 = (_i64Add(($630|0),($631|0),($612|0),($613|0))|0); - $633 = tempRet0; - $634 = $106; - $635 = $634; - $636 = HEAP32[$635>>2]|0; - $637 = (($634) + 4)|0; - $638 = $637; - $639 = HEAP32[$638>>2]|0; - $640 = (_bitshift64Ashr(0,($636|0),32)|0); - $641 = tempRet0; - $642 = $410; - $643 = $642; - $644 = HEAP32[$643>>2]|0; - $645 = (($642) + 4)|0; - $646 = $645; - $647 = HEAP32[$646>>2]|0; - $648 = (_bitshift64Ashr(0,($644|0),32)|0); - $649 = tempRet0; - $650 = (___muldi3(($648|0),($649|0),($640|0),($641|0))|0); - $651 = tempRet0; - $652 = (_i64Add(($632|0),($633|0),($650|0),($651|0))|0); - $653 = tempRet0; - $654 = $423; - $655 = $654; - $656 = HEAP32[$655>>2]|0; - $657 = (($654) + 4)|0; - $658 = $657; - $659 = HEAP32[$658>>2]|0; - $660 = (_bitshift64Ashr(0,($656|0),32)|0); - $661 = tempRet0; - $662 = $93; - $663 = $662; - $664 = HEAP32[$663>>2]|0; - $665 = (($662) + 4)|0; - $666 = $665; - $667 = HEAP32[$666>>2]|0; - $668 = (_bitshift64Ashr(0,($664|0),32)|0); - $669 = tempRet0; - $670 = (___muldi3(($668|0),($669|0),($660|0),($661|0))|0); - $671 = tempRet0; - $672 = (_i64Add(($652|0),($653|0),($670|0),($671|0))|0); - $673 = tempRet0; - $674 = $41; - $675 = $674; - $676 = HEAP32[$675>>2]|0; - $677 = (($674) + 4)|0; - $678 = $677; - $679 = HEAP32[$678>>2]|0; - $680 = (_bitshift64Ashr(0,($676|0),32)|0); - $681 = tempRet0; - $682 = $557; - $683 = $682; - $684 = HEAP32[$683>>2]|0; - $685 = (($682) + 4)|0; - $686 = $685; - $687 = HEAP32[$686>>2]|0; - $688 = (_bitshift64Ashr(0,($684|0),32)|0); - $689 = tempRet0; - $690 = (___muldi3(($688|0),($689|0),($680|0),($681|0))|0); - $691 = tempRet0; - $692 = (_i64Add(($672|0),($673|0),($690|0),($691|0))|0); - $693 = tempRet0; - $694 = $570; - $695 = $694; - $696 = HEAP32[$695>>2]|0; - $697 = (($694) + 4)|0; - $698 = $697; - $699 = HEAP32[$698>>2]|0; - $700 = (_bitshift64Ashr(0,($696|0),32)|0); - $701 = tempRet0; - $702 = $30; - $703 = $702; - $704 = HEAP32[$703>>2]|0; - $705 = (($702) + 4)|0; - $706 = $705; - $707 = HEAP32[$706>>2]|0; - $708 = (_bitshift64Ashr(0,($704|0),32)|0); - $709 = tempRet0; - $710 = (___muldi3(($708|0),($709|0),($700|0),($701|0))|0); - $711 = tempRet0; - $712 = (_i64Add(($692|0),($693|0),($710|0),($711|0))|0); - $713 = tempRet0; - $714 = $in2; - $715 = $714; - $716 = HEAP32[$715>>2]|0; - $717 = (($714) + 4)|0; - $718 = $717; - $719 = HEAP32[$718>>2]|0; - $720 = (_bitshift64Ashr(0,($716|0),32)|0); - $721 = tempRet0; - $722 = (($in) + 56|0); - $723 = $722; - $724 = $723; - $725 = HEAP32[$724>>2]|0; - $726 = (($723) + 4)|0; - $727 = $726; - $728 = HEAP32[$727>>2]|0; - $729 = (_bitshift64Ashr(0,($725|0),32)|0); - $730 = tempRet0; - $731 = (___muldi3(($729|0),($730|0),($720|0),($721|0))|0); - $732 = tempRet0; - $733 = (_i64Add(($712|0),($713|0),($731|0),($732|0))|0); - $734 = tempRet0; - $735 = (($in2) + 56|0); - $736 = $735; - $737 = $736; - $738 = HEAP32[$737>>2]|0; - $739 = (($736) + 4)|0; - $740 = $739; - $741 = HEAP32[$740>>2]|0; - $742 = (_bitshift64Ashr(0,($738|0),32)|0); - $743 = tempRet0; - $744 = $in; - $745 = $744; - $746 = HEAP32[$745>>2]|0; - $747 = (($744) + 4)|0; - $748 = $747; - $749 = HEAP32[$748>>2]|0; - $750 = (_bitshift64Ashr(0,($746|0),32)|0); - $751 = tempRet0; - $752 = (___muldi3(($750|0),($751|0),($742|0),($743|0))|0); - $753 = tempRet0; - $754 = (_i64Add(($733|0),($734|0),($752|0),($753|0))|0); - $755 = tempRet0; - $756 = (($output) + 56|0); - $757 = $756; - $758 = $757; - HEAP32[$758>>2] = $754; - $759 = (($757) + 4)|0; - $760 = $759; - HEAP32[$760>>2] = $755; - $761 = $298; - $762 = $761; - $763 = HEAP32[$762>>2]|0; - $764 = (($761) + 4)|0; - $765 = $764; - $766 = HEAP32[$765>>2]|0; - $767 = (_bitshift64Ashr(0,($763|0),32)|0); - $768 = tempRet0; - $769 = $285; - $770 = $769; - $771 = HEAP32[$770>>2]|0; - $772 = (($769) + 4)|0; - $773 = $772; - $774 = HEAP32[$773>>2]|0; - $775 = (_bitshift64Ashr(0,($771|0),32)|0); - $776 = tempRet0; - $777 = (___muldi3(($775|0),($776|0),($767|0),($768|0))|0); - $778 = tempRet0; - $779 = $191; - $780 = $779; - $781 = HEAP32[$780>>2]|0; - $782 = (($779) + 4)|0; - $783 = $782; - $784 = HEAP32[$783>>2]|0; - $785 = (_bitshift64Ashr(0,($781|0),32)|0); - $786 = tempRet0; - $787 = $410; - $788 = $787; - $789 = HEAP32[$788>>2]|0; - $790 = (($787) + 4)|0; - $791 = $790; - $792 = HEAP32[$791>>2]|0; - $793 = (_bitshift64Ashr(0,($789|0),32)|0); - $794 = tempRet0; - $795 = (___muldi3(($793|0),($794|0),($785|0),($786|0))|0); - $796 = tempRet0; - $797 = $423; - $798 = $797; - $799 = HEAP32[$798>>2]|0; - $800 = (($797) + 4)|0; - $801 = $800; - $802 = HEAP32[$801>>2]|0; - $803 = (_bitshift64Ashr(0,($799|0),32)|0); - $804 = tempRet0; - $805 = $178; - $806 = $805; - $807 = HEAP32[$806>>2]|0; - $808 = (($805) + 4)|0; - $809 = $808; - $810 = HEAP32[$809>>2]|0; - $811 = (_bitshift64Ashr(0,($807|0),32)|0); - $812 = tempRet0; - $813 = (___muldi3(($811|0),($812|0),($803|0),($804|0))|0); - $814 = tempRet0; - $815 = (_i64Add(($813|0),($814|0),($795|0),($796|0))|0); - $816 = tempRet0; - $817 = $41; - $818 = $817; - $819 = HEAP32[$818>>2]|0; - $820 = (($817) + 4)|0; - $821 = $820; - $822 = HEAP32[$821>>2]|0; - $823 = (_bitshift64Ashr(0,($819|0),32)|0); - $824 = tempRet0; - $825 = $722; - $826 = $825; - $827 = HEAP32[$826>>2]|0; - $828 = (($825) + 4)|0; - $829 = $828; - $830 = HEAP32[$829>>2]|0; - $831 = (_bitshift64Ashr(0,($827|0),32)|0); - $832 = tempRet0; - $833 = (___muldi3(($831|0),($832|0),($823|0),($824|0))|0); - $834 = tempRet0; - $835 = (_i64Add(($815|0),($816|0),($833|0),($834|0))|0); - $836 = tempRet0; - $837 = $735; - $838 = $837; - $839 = HEAP32[$838>>2]|0; - $840 = (($837) + 4)|0; - $841 = $840; - $842 = HEAP32[$841>>2]|0; - $843 = (_bitshift64Ashr(0,($839|0),32)|0); - $844 = tempRet0; - $845 = $30; - $846 = $845; - $847 = HEAP32[$846>>2]|0; - $848 = (($845) + 4)|0; - $849 = $848; - $850 = HEAP32[$849>>2]|0; - $851 = (_bitshift64Ashr(0,($847|0),32)|0); - $852 = tempRet0; - $853 = (___muldi3(($851|0),($852|0),($843|0),($844|0))|0); - $854 = tempRet0; - $855 = (_i64Add(($835|0),($836|0),($853|0),($854|0))|0); - $856 = tempRet0; - $857 = (_bitshift64Shl(($855|0),($856|0),1)|0); - $858 = tempRet0; - $859 = (_i64Add(($857|0),($858|0),($777|0),($778|0))|0); - $860 = tempRet0; - $861 = $106; - $862 = $861; - $863 = HEAP32[$862>>2]|0; - $864 = (($861) + 4)|0; - $865 = $864; - $866 = HEAP32[$865>>2]|0; - $867 = (_bitshift64Ashr(0,($863|0),32)|0); - $868 = tempRet0; - $869 = $557; - $870 = $869; - $871 = HEAP32[$870>>2]|0; - $872 = (($869) + 4)|0; - $873 = $872; - $874 = HEAP32[$873>>2]|0; - $875 = (_bitshift64Ashr(0,($871|0),32)|0); - $876 = tempRet0; - $877 = (___muldi3(($875|0),($876|0),($867|0),($868|0))|0); - $878 = tempRet0; - $879 = (_i64Add(($859|0),($860|0),($877|0),($878|0))|0); - $880 = tempRet0; - $881 = $570; - $882 = $881; - $883 = HEAP32[$882>>2]|0; - $884 = (($881) + 4)|0; - $885 = $884; - $886 = HEAP32[$885>>2]|0; - $887 = (_bitshift64Ashr(0,($883|0),32)|0); - $888 = tempRet0; - $889 = $93; - $890 = $889; - $891 = HEAP32[$890>>2]|0; - $892 = (($889) + 4)|0; - $893 = $892; - $894 = HEAP32[$893>>2]|0; - $895 = (_bitshift64Ashr(0,($891|0),32)|0); - $896 = tempRet0; - $897 = (___muldi3(($895|0),($896|0),($887|0),($888|0))|0); - $898 = tempRet0; - $899 = (_i64Add(($879|0),($880|0),($897|0),($898|0))|0); - $900 = tempRet0; - $901 = $in2; - $902 = $901; - $903 = HEAP32[$902>>2]|0; - $904 = (($901) + 4)|0; - $905 = $904; - $906 = HEAP32[$905>>2]|0; - $907 = (_bitshift64Ashr(0,($903|0),32)|0); - $908 = tempRet0; - $909 = (($in) + 64|0); - $910 = $909; - $911 = $910; - $912 = HEAP32[$911>>2]|0; - $913 = (($910) + 4)|0; - $914 = $913; - $915 = HEAP32[$914>>2]|0; - $916 = (_bitshift64Ashr(0,($912|0),32)|0); - $917 = tempRet0; - $918 = (___muldi3(($916|0),($917|0),($907|0),($908|0))|0); - $919 = tempRet0; - $920 = (_i64Add(($899|0),($900|0),($918|0),($919|0))|0); - $921 = tempRet0; - $922 = (($in2) + 64|0); - $923 = $922; - $924 = $923; - $925 = HEAP32[$924>>2]|0; - $926 = (($923) + 4)|0; - $927 = $926; - $928 = HEAP32[$927>>2]|0; - $929 = (_bitshift64Ashr(0,($925|0),32)|0); - $930 = tempRet0; - $931 = $in; - $932 = $931; - $933 = HEAP32[$932>>2]|0; - $934 = (($931) + 4)|0; - $935 = $934; - $936 = HEAP32[$935>>2]|0; - $937 = (_bitshift64Ashr(0,($933|0),32)|0); - $938 = tempRet0; - $939 = (___muldi3(($937|0),($938|0),($929|0),($930|0))|0); - $940 = tempRet0; - $941 = (_i64Add(($920|0),($921|0),($939|0),($940|0))|0); - $942 = tempRet0; - $943 = (($output) + 64|0); - $944 = $943; - $945 = $944; - HEAP32[$945>>2] = $941; - $946 = (($944) + 4)|0; - $947 = $946; - HEAP32[$947>>2] = $942; - $948 = $298; - $949 = $948; - $950 = HEAP32[$949>>2]|0; - $951 = (($948) + 4)|0; - $952 = $951; - $953 = HEAP32[$952>>2]|0; - $954 = (_bitshift64Ashr(0,($950|0),32)|0); - $955 = tempRet0; - $956 = $410; - $957 = $956; - $958 = HEAP32[$957>>2]|0; - $959 = (($956) + 4)|0; - $960 = $959; - $961 = HEAP32[$960>>2]|0; - $962 = (_bitshift64Ashr(0,($958|0),32)|0); - $963 = tempRet0; - $964 = (___muldi3(($962|0),($963|0),($954|0),($955|0))|0); - $965 = tempRet0; - $966 = $423; - $967 = $966; - $968 = HEAP32[$967>>2]|0; - $969 = (($966) + 4)|0; - $970 = $969; - $971 = HEAP32[$970>>2]|0; - $972 = (_bitshift64Ashr(0,($968|0),32)|0); - $973 = tempRet0; - $974 = $285; - $975 = $974; - $976 = HEAP32[$975>>2]|0; - $977 = (($974) + 4)|0; - $978 = $977; - $979 = HEAP32[$978>>2]|0; - $980 = (_bitshift64Ashr(0,($976|0),32)|0); - $981 = tempRet0; - $982 = (___muldi3(($980|0),($981|0),($972|0),($973|0))|0); - $983 = tempRet0; - $984 = (_i64Add(($982|0),($983|0),($964|0),($965|0))|0); - $985 = tempRet0; - $986 = $191; - $987 = $986; - $988 = HEAP32[$987>>2]|0; - $989 = (($986) + 4)|0; - $990 = $989; - $991 = HEAP32[$990>>2]|0; - $992 = (_bitshift64Ashr(0,($988|0),32)|0); - $993 = tempRet0; - $994 = $557; - $995 = $994; - $996 = HEAP32[$995>>2]|0; - $997 = (($994) + 4)|0; - $998 = $997; - $999 = HEAP32[$998>>2]|0; - $1000 = (_bitshift64Ashr(0,($996|0),32)|0); - $1001 = tempRet0; - $1002 = (___muldi3(($1000|0),($1001|0),($992|0),($993|0))|0); - $1003 = tempRet0; - $1004 = (_i64Add(($984|0),($985|0),($1002|0),($1003|0))|0); - $1005 = tempRet0; - $1006 = $570; - $1007 = $1006; - $1008 = HEAP32[$1007>>2]|0; - $1009 = (($1006) + 4)|0; - $1010 = $1009; - $1011 = HEAP32[$1010>>2]|0; - $1012 = (_bitshift64Ashr(0,($1008|0),32)|0); - $1013 = tempRet0; - $1014 = $178; - $1015 = $1014; - $1016 = HEAP32[$1015>>2]|0; - $1017 = (($1014) + 4)|0; - $1018 = $1017; - $1019 = HEAP32[$1018>>2]|0; - $1020 = (_bitshift64Ashr(0,($1016|0),32)|0); - $1021 = tempRet0; - $1022 = (___muldi3(($1020|0),($1021|0),($1012|0),($1013|0))|0); - $1023 = tempRet0; - $1024 = (_i64Add(($1004|0),($1005|0),($1022|0),($1023|0))|0); - $1025 = tempRet0; - $1026 = $106; - $1027 = $1026; - $1028 = HEAP32[$1027>>2]|0; - $1029 = (($1026) + 4)|0; - $1030 = $1029; - $1031 = HEAP32[$1030>>2]|0; - $1032 = (_bitshift64Ashr(0,($1028|0),32)|0); - $1033 = tempRet0; - $1034 = $722; - $1035 = $1034; - $1036 = HEAP32[$1035>>2]|0; - $1037 = (($1034) + 4)|0; - $1038 = $1037; - $1039 = HEAP32[$1038>>2]|0; - $1040 = (_bitshift64Ashr(0,($1036|0),32)|0); - $1041 = tempRet0; - $1042 = (___muldi3(($1040|0),($1041|0),($1032|0),($1033|0))|0); - $1043 = tempRet0; - $1044 = (_i64Add(($1024|0),($1025|0),($1042|0),($1043|0))|0); - $1045 = tempRet0; - $1046 = $735; - $1047 = $1046; - $1048 = HEAP32[$1047>>2]|0; - $1049 = (($1046) + 4)|0; - $1050 = $1049; - $1051 = HEAP32[$1050>>2]|0; - $1052 = (_bitshift64Ashr(0,($1048|0),32)|0); - $1053 = tempRet0; - $1054 = $93; - $1055 = $1054; - $1056 = HEAP32[$1055>>2]|0; - $1057 = (($1054) + 4)|0; - $1058 = $1057; - $1059 = HEAP32[$1058>>2]|0; - $1060 = (_bitshift64Ashr(0,($1056|0),32)|0); - $1061 = tempRet0; - $1062 = (___muldi3(($1060|0),($1061|0),($1052|0),($1053|0))|0); - $1063 = tempRet0; - $1064 = (_i64Add(($1044|0),($1045|0),($1062|0),($1063|0))|0); - $1065 = tempRet0; - $1066 = $41; - $1067 = $1066; - $1068 = HEAP32[$1067>>2]|0; - $1069 = (($1066) + 4)|0; - $1070 = $1069; - $1071 = HEAP32[$1070>>2]|0; - $1072 = (_bitshift64Ashr(0,($1068|0),32)|0); - $1073 = tempRet0; - $1074 = $909; - $1075 = $1074; - $1076 = HEAP32[$1075>>2]|0; - $1077 = (($1074) + 4)|0; - $1078 = $1077; - $1079 = HEAP32[$1078>>2]|0; - $1080 = (_bitshift64Ashr(0,($1076|0),32)|0); - $1081 = tempRet0; - $1082 = (___muldi3(($1080|0),($1081|0),($1072|0),($1073|0))|0); - $1083 = tempRet0; - $1084 = (_i64Add(($1064|0),($1065|0),($1082|0),($1083|0))|0); - $1085 = tempRet0; - $1086 = $922; - $1087 = $1086; - $1088 = HEAP32[$1087>>2]|0; - $1089 = (($1086) + 4)|0; - $1090 = $1089; - $1091 = HEAP32[$1090>>2]|0; - $1092 = (_bitshift64Ashr(0,($1088|0),32)|0); - $1093 = tempRet0; - $1094 = $30; - $1095 = $1094; - $1096 = HEAP32[$1095>>2]|0; - $1097 = (($1094) + 4)|0; - $1098 = $1097; - $1099 = HEAP32[$1098>>2]|0; - $1100 = (_bitshift64Ashr(0,($1096|0),32)|0); - $1101 = tempRet0; - $1102 = (___muldi3(($1100|0),($1101|0),($1092|0),($1093|0))|0); - $1103 = tempRet0; - $1104 = (_i64Add(($1084|0),($1085|0),($1102|0),($1103|0))|0); - $1105 = tempRet0; - $1106 = $in2; - $1107 = $1106; - $1108 = HEAP32[$1107>>2]|0; - $1109 = (($1106) + 4)|0; - $1110 = $1109; - $1111 = HEAP32[$1110>>2]|0; - $1112 = (_bitshift64Ashr(0,($1108|0),32)|0); - $1113 = tempRet0; - $1114 = (($in) + 72|0); - $1115 = $1114; - $1116 = $1115; - $1117 = HEAP32[$1116>>2]|0; - $1118 = (($1115) + 4)|0; - $1119 = $1118; - $1120 = HEAP32[$1119>>2]|0; - $1121 = (_bitshift64Ashr(0,($1117|0),32)|0); - $1122 = tempRet0; - $1123 = (___muldi3(($1121|0),($1122|0),($1112|0),($1113|0))|0); - $1124 = tempRet0; - $1125 = (_i64Add(($1104|0),($1105|0),($1123|0),($1124|0))|0); - $1126 = tempRet0; - $1127 = (($in2) + 72|0); - $1128 = $1127; - $1129 = $1128; - $1130 = HEAP32[$1129>>2]|0; - $1131 = (($1128) + 4)|0; - $1132 = $1131; - $1133 = HEAP32[$1132>>2]|0; - $1134 = (_bitshift64Ashr(0,($1130|0),32)|0); - $1135 = tempRet0; - $1136 = $in; - $1137 = $1136; - $1138 = HEAP32[$1137>>2]|0; - $1139 = (($1136) + 4)|0; - $1140 = $1139; - $1141 = HEAP32[$1140>>2]|0; - $1142 = (_bitshift64Ashr(0,($1138|0),32)|0); - $1143 = tempRet0; - $1144 = (___muldi3(($1142|0),($1143|0),($1134|0),($1135|0))|0); - $1145 = tempRet0; - $1146 = (_i64Add(($1125|0),($1126|0),($1144|0),($1145|0))|0); - $1147 = tempRet0; - $1148 = (($output) + 72|0); - $1149 = $1148; - $1150 = $1149; - HEAP32[$1150>>2] = $1146; - $1151 = (($1149) + 4)|0; - $1152 = $1151; - HEAP32[$1152>>2] = $1147; - $1153 = $423; - $1154 = $1153; - $1155 = HEAP32[$1154>>2]|0; - $1156 = (($1153) + 4)|0; - $1157 = $1156; - $1158 = HEAP32[$1157>>2]|0; - $1159 = (_bitshift64Ashr(0,($1155|0),32)|0); - $1160 = tempRet0; - $1161 = $410; - $1162 = $1161; - $1163 = HEAP32[$1162>>2]|0; - $1164 = (($1161) + 4)|0; - $1165 = $1164; - $1166 = HEAP32[$1165>>2]|0; - $1167 = (_bitshift64Ashr(0,($1163|0),32)|0); - $1168 = tempRet0; - $1169 = (___muldi3(($1167|0),($1168|0),($1159|0),($1160|0))|0); - $1170 = tempRet0; - $1171 = $191; - $1172 = $1171; - $1173 = HEAP32[$1172>>2]|0; - $1174 = (($1171) + 4)|0; - $1175 = $1174; - $1176 = HEAP32[$1175>>2]|0; - $1177 = (_bitshift64Ashr(0,($1173|0),32)|0); - $1178 = tempRet0; - $1179 = $722; - $1180 = $1179; - $1181 = HEAP32[$1180>>2]|0; - $1182 = (($1179) + 4)|0; - $1183 = $1182; - $1184 = HEAP32[$1183>>2]|0; - $1185 = (_bitshift64Ashr(0,($1181|0),32)|0); - $1186 = tempRet0; - $1187 = (___muldi3(($1185|0),($1186|0),($1177|0),($1178|0))|0); - $1188 = tempRet0; - $1189 = (_i64Add(($1187|0),($1188|0),($1169|0),($1170|0))|0); - $1190 = tempRet0; - $1191 = $735; - $1192 = $1191; - $1193 = HEAP32[$1192>>2]|0; - $1194 = (($1191) + 4)|0; - $1195 = $1194; - $1196 = HEAP32[$1195>>2]|0; - $1197 = (_bitshift64Ashr(0,($1193|0),32)|0); - $1198 = tempRet0; - $1199 = $178; - $1200 = $1199; - $1201 = HEAP32[$1200>>2]|0; - $1202 = (($1199) + 4)|0; - $1203 = $1202; - $1204 = HEAP32[$1203>>2]|0; - $1205 = (_bitshift64Ashr(0,($1201|0),32)|0); - $1206 = tempRet0; - $1207 = (___muldi3(($1205|0),($1206|0),($1197|0),($1198|0))|0); - $1208 = tempRet0; - $1209 = (_i64Add(($1189|0),($1190|0),($1207|0),($1208|0))|0); - $1210 = tempRet0; - $1211 = $41; - $1212 = $1211; - $1213 = HEAP32[$1212>>2]|0; - $1214 = (($1211) + 4)|0; - $1215 = $1214; - $1216 = HEAP32[$1215>>2]|0; - $1217 = (_bitshift64Ashr(0,($1213|0),32)|0); - $1218 = tempRet0; - $1219 = $1114; - $1220 = $1219; - $1221 = HEAP32[$1220>>2]|0; - $1222 = (($1219) + 4)|0; - $1223 = $1222; - $1224 = HEAP32[$1223>>2]|0; - $1225 = (_bitshift64Ashr(0,($1221|0),32)|0); - $1226 = tempRet0; - $1227 = (___muldi3(($1225|0),($1226|0),($1217|0),($1218|0))|0); - $1228 = tempRet0; - $1229 = (_i64Add(($1209|0),($1210|0),($1227|0),($1228|0))|0); - $1230 = tempRet0; - $1231 = $1127; - $1232 = $1231; - $1233 = HEAP32[$1232>>2]|0; - $1234 = (($1231) + 4)|0; - $1235 = $1234; - $1236 = HEAP32[$1235>>2]|0; - $1237 = (_bitshift64Ashr(0,($1233|0),32)|0); - $1238 = tempRet0; - $1239 = $30; - $1240 = $1239; - $1241 = HEAP32[$1240>>2]|0; - $1242 = (($1239) + 4)|0; - $1243 = $1242; - $1244 = HEAP32[$1243>>2]|0; - $1245 = (_bitshift64Ashr(0,($1241|0),32)|0); - $1246 = tempRet0; - $1247 = (___muldi3(($1245|0),($1246|0),($1237|0),($1238|0))|0); - $1248 = tempRet0; - $1249 = (_i64Add(($1229|0),($1230|0),($1247|0),($1248|0))|0); - $1250 = tempRet0; - $1251 = (_bitshift64Shl(($1249|0),($1250|0),1)|0); - $1252 = tempRet0; - $1253 = $298; - $1254 = $1253; - $1255 = HEAP32[$1254>>2]|0; - $1256 = (($1253) + 4)|0; - $1257 = $1256; - $1258 = HEAP32[$1257>>2]|0; - $1259 = (_bitshift64Ashr(0,($1255|0),32)|0); - $1260 = tempRet0; - $1261 = $557; - $1262 = $1261; - $1263 = HEAP32[$1262>>2]|0; - $1264 = (($1261) + 4)|0; - $1265 = $1264; - $1266 = HEAP32[$1265>>2]|0; - $1267 = (_bitshift64Ashr(0,($1263|0),32)|0); - $1268 = tempRet0; - $1269 = (___muldi3(($1267|0),($1268|0),($1259|0),($1260|0))|0); - $1270 = tempRet0; - $1271 = (_i64Add(($1251|0),($1252|0),($1269|0),($1270|0))|0); - $1272 = tempRet0; - $1273 = $570; - $1274 = $1273; - $1275 = HEAP32[$1274>>2]|0; - $1276 = (($1273) + 4)|0; - $1277 = $1276; - $1278 = HEAP32[$1277>>2]|0; - $1279 = (_bitshift64Ashr(0,($1275|0),32)|0); - $1280 = tempRet0; - $1281 = $285; - $1282 = $1281; - $1283 = HEAP32[$1282>>2]|0; - $1284 = (($1281) + 4)|0; - $1285 = $1284; - $1286 = HEAP32[$1285>>2]|0; - $1287 = (_bitshift64Ashr(0,($1283|0),32)|0); - $1288 = tempRet0; - $1289 = (___muldi3(($1287|0),($1288|0),($1279|0),($1280|0))|0); - $1290 = tempRet0; - $1291 = (_i64Add(($1271|0),($1272|0),($1289|0),($1290|0))|0); - $1292 = tempRet0; - $1293 = $106; - $1294 = $1293; - $1295 = HEAP32[$1294>>2]|0; - $1296 = (($1293) + 4)|0; - $1297 = $1296; - $1298 = HEAP32[$1297>>2]|0; - $1299 = (_bitshift64Ashr(0,($1295|0),32)|0); - $1300 = tempRet0; - $1301 = $909; - $1302 = $1301; - $1303 = HEAP32[$1302>>2]|0; - $1304 = (($1301) + 4)|0; - $1305 = $1304; - $1306 = HEAP32[$1305>>2]|0; - $1307 = (_bitshift64Ashr(0,($1303|0),32)|0); - $1308 = tempRet0; - $1309 = (___muldi3(($1307|0),($1308|0),($1299|0),($1300|0))|0); - $1310 = tempRet0; - $1311 = (_i64Add(($1291|0),($1292|0),($1309|0),($1310|0))|0); - $1312 = tempRet0; - $1313 = $922; - $1314 = $1313; - $1315 = HEAP32[$1314>>2]|0; - $1316 = (($1313) + 4)|0; - $1317 = $1316; - $1318 = HEAP32[$1317>>2]|0; - $1319 = (_bitshift64Ashr(0,($1315|0),32)|0); - $1320 = tempRet0; - $1321 = $93; - $1322 = $1321; - $1323 = HEAP32[$1322>>2]|0; - $1324 = (($1321) + 4)|0; - $1325 = $1324; - $1326 = HEAP32[$1325>>2]|0; - $1327 = (_bitshift64Ashr(0,($1323|0),32)|0); - $1328 = tempRet0; - $1329 = (___muldi3(($1327|0),($1328|0),($1319|0),($1320|0))|0); - $1330 = tempRet0; - $1331 = (_i64Add(($1311|0),($1312|0),($1329|0),($1330|0))|0); - $1332 = tempRet0; - $1333 = (($output) + 80|0); - $1334 = $1333; - $1335 = $1334; - HEAP32[$1335>>2] = $1331; - $1336 = (($1334) + 4)|0; - $1337 = $1336; - HEAP32[$1337>>2] = $1332; - $1338 = $423; - $1339 = $1338; - $1340 = HEAP32[$1339>>2]|0; - $1341 = (($1338) + 4)|0; - $1342 = $1341; - $1343 = HEAP32[$1342>>2]|0; - $1344 = (_bitshift64Ashr(0,($1340|0),32)|0); - $1345 = tempRet0; - $1346 = $557; - $1347 = $1346; - $1348 = HEAP32[$1347>>2]|0; - $1349 = (($1346) + 4)|0; - $1350 = $1349; - $1351 = HEAP32[$1350>>2]|0; - $1352 = (_bitshift64Ashr(0,($1348|0),32)|0); - $1353 = tempRet0; - $1354 = (___muldi3(($1352|0),($1353|0),($1344|0),($1345|0))|0); - $1355 = tempRet0; - $1356 = $570; - $1357 = $1356; - $1358 = HEAP32[$1357>>2]|0; - $1359 = (($1356) + 4)|0; - $1360 = $1359; - $1361 = HEAP32[$1360>>2]|0; - $1362 = (_bitshift64Ashr(0,($1358|0),32)|0); - $1363 = tempRet0; - $1364 = $410; - $1365 = $1364; - $1366 = HEAP32[$1365>>2]|0; - $1367 = (($1364) + 4)|0; - $1368 = $1367; - $1369 = HEAP32[$1368>>2]|0; - $1370 = (_bitshift64Ashr(0,($1366|0),32)|0); - $1371 = tempRet0; - $1372 = (___muldi3(($1370|0),($1371|0),($1362|0),($1363|0))|0); - $1373 = tempRet0; - $1374 = (_i64Add(($1372|0),($1373|0),($1354|0),($1355|0))|0); - $1375 = tempRet0; - $1376 = $298; - $1377 = $1376; - $1378 = HEAP32[$1377>>2]|0; - $1379 = (($1376) + 4)|0; - $1380 = $1379; - $1381 = HEAP32[$1380>>2]|0; - $1382 = (_bitshift64Ashr(0,($1378|0),32)|0); - $1383 = tempRet0; - $1384 = $722; - $1385 = $1384; - $1386 = HEAP32[$1385>>2]|0; - $1387 = (($1384) + 4)|0; - $1388 = $1387; - $1389 = HEAP32[$1388>>2]|0; - $1390 = (_bitshift64Ashr(0,($1386|0),32)|0); - $1391 = tempRet0; - $1392 = (___muldi3(($1390|0),($1391|0),($1382|0),($1383|0))|0); - $1393 = tempRet0; - $1394 = (_i64Add(($1374|0),($1375|0),($1392|0),($1393|0))|0); - $1395 = tempRet0; - $1396 = $735; - $1397 = $1396; - $1398 = HEAP32[$1397>>2]|0; - $1399 = (($1396) + 4)|0; - $1400 = $1399; - $1401 = HEAP32[$1400>>2]|0; - $1402 = (_bitshift64Ashr(0,($1398|0),32)|0); - $1403 = tempRet0; - $1404 = $285; - $1405 = $1404; - $1406 = HEAP32[$1405>>2]|0; - $1407 = (($1404) + 4)|0; - $1408 = $1407; - $1409 = HEAP32[$1408>>2]|0; - $1410 = (_bitshift64Ashr(0,($1406|0),32)|0); - $1411 = tempRet0; - $1412 = (___muldi3(($1410|0),($1411|0),($1402|0),($1403|0))|0); - $1413 = tempRet0; - $1414 = (_i64Add(($1394|0),($1395|0),($1412|0),($1413|0))|0); - $1415 = tempRet0; - $1416 = $191; - $1417 = $1416; - $1418 = HEAP32[$1417>>2]|0; - $1419 = (($1416) + 4)|0; - $1420 = $1419; - $1421 = HEAP32[$1420>>2]|0; - $1422 = (_bitshift64Ashr(0,($1418|0),32)|0); - $1423 = tempRet0; - $1424 = $909; - $1425 = $1424; - $1426 = HEAP32[$1425>>2]|0; - $1427 = (($1424) + 4)|0; - $1428 = $1427; - $1429 = HEAP32[$1428>>2]|0; - $1430 = (_bitshift64Ashr(0,($1426|0),32)|0); - $1431 = tempRet0; - $1432 = (___muldi3(($1430|0),($1431|0),($1422|0),($1423|0))|0); - $1433 = tempRet0; - $1434 = (_i64Add(($1414|0),($1415|0),($1432|0),($1433|0))|0); - $1435 = tempRet0; - $1436 = $922; - $1437 = $1436; - $1438 = HEAP32[$1437>>2]|0; - $1439 = (($1436) + 4)|0; - $1440 = $1439; - $1441 = HEAP32[$1440>>2]|0; - $1442 = (_bitshift64Ashr(0,($1438|0),32)|0); - $1443 = tempRet0; - $1444 = $178; - $1445 = $1444; - $1446 = HEAP32[$1445>>2]|0; - $1447 = (($1444) + 4)|0; - $1448 = $1447; - $1449 = HEAP32[$1448>>2]|0; - $1450 = (_bitshift64Ashr(0,($1446|0),32)|0); - $1451 = tempRet0; - $1452 = (___muldi3(($1450|0),($1451|0),($1442|0),($1443|0))|0); - $1453 = tempRet0; - $1454 = (_i64Add(($1434|0),($1435|0),($1452|0),($1453|0))|0); - $1455 = tempRet0; - $1456 = $106; - $1457 = $1456; - $1458 = HEAP32[$1457>>2]|0; - $1459 = (($1456) + 4)|0; - $1460 = $1459; - $1461 = HEAP32[$1460>>2]|0; - $1462 = (_bitshift64Ashr(0,($1458|0),32)|0); - $1463 = tempRet0; - $1464 = $1114; - $1465 = $1464; - $1466 = HEAP32[$1465>>2]|0; - $1467 = (($1464) + 4)|0; - $1468 = $1467; - $1469 = HEAP32[$1468>>2]|0; - $1470 = (_bitshift64Ashr(0,($1466|0),32)|0); - $1471 = tempRet0; - $1472 = (___muldi3(($1470|0),($1471|0),($1462|0),($1463|0))|0); - $1473 = tempRet0; - $1474 = (_i64Add(($1454|0),($1455|0),($1472|0),($1473|0))|0); - $1475 = tempRet0; - $1476 = $1127; - $1477 = $1476; - $1478 = HEAP32[$1477>>2]|0; - $1479 = (($1476) + 4)|0; - $1480 = $1479; - $1481 = HEAP32[$1480>>2]|0; - $1482 = (_bitshift64Ashr(0,($1478|0),32)|0); - $1483 = tempRet0; - $1484 = $93; - $1485 = $1484; - $1486 = HEAP32[$1485>>2]|0; - $1487 = (($1484) + 4)|0; - $1488 = $1487; - $1489 = HEAP32[$1488>>2]|0; - $1490 = (_bitshift64Ashr(0,($1486|0),32)|0); - $1491 = tempRet0; - $1492 = (___muldi3(($1490|0),($1491|0),($1482|0),($1483|0))|0); - $1493 = tempRet0; - $1494 = (_i64Add(($1474|0),($1475|0),($1492|0),($1493|0))|0); - $1495 = tempRet0; - $1496 = (($output) + 88|0); - $1497 = $1496; - $1498 = $1497; - HEAP32[$1498>>2] = $1494; - $1499 = (($1497) + 4)|0; - $1500 = $1499; - HEAP32[$1500>>2] = $1495; - $1501 = $570; - $1502 = $1501; - $1503 = HEAP32[$1502>>2]|0; - $1504 = (($1501) + 4)|0; - $1505 = $1504; - $1506 = HEAP32[$1505>>2]|0; - $1507 = (_bitshift64Ashr(0,($1503|0),32)|0); - $1508 = tempRet0; - $1509 = $557; - $1510 = $1509; - $1511 = HEAP32[$1510>>2]|0; - $1512 = (($1509) + 4)|0; - $1513 = $1512; - $1514 = HEAP32[$1513>>2]|0; - $1515 = (_bitshift64Ashr(0,($1511|0),32)|0); - $1516 = tempRet0; - $1517 = (___muldi3(($1515|0),($1516|0),($1507|0),($1508|0))|0); - $1518 = tempRet0; - $1519 = $423; - $1520 = $1519; - $1521 = HEAP32[$1520>>2]|0; - $1522 = (($1519) + 4)|0; - $1523 = $1522; - $1524 = HEAP32[$1523>>2]|0; - $1525 = (_bitshift64Ashr(0,($1521|0),32)|0); - $1526 = tempRet0; - $1527 = $722; - $1528 = $1527; - $1529 = HEAP32[$1528>>2]|0; - $1530 = (($1527) + 4)|0; - $1531 = $1530; - $1532 = HEAP32[$1531>>2]|0; - $1533 = (_bitshift64Ashr(0,($1529|0),32)|0); - $1534 = tempRet0; - $1535 = (___muldi3(($1533|0),($1534|0),($1525|0),($1526|0))|0); - $1536 = tempRet0; - $1537 = $735; - $1538 = $1537; - $1539 = HEAP32[$1538>>2]|0; - $1540 = (($1537) + 4)|0; - $1541 = $1540; - $1542 = HEAP32[$1541>>2]|0; - $1543 = (_bitshift64Ashr(0,($1539|0),32)|0); - $1544 = tempRet0; - $1545 = $410; - $1546 = $1545; - $1547 = HEAP32[$1546>>2]|0; - $1548 = (($1545) + 4)|0; - $1549 = $1548; - $1550 = HEAP32[$1549>>2]|0; - $1551 = (_bitshift64Ashr(0,($1547|0),32)|0); - $1552 = tempRet0; - $1553 = (___muldi3(($1551|0),($1552|0),($1543|0),($1544|0))|0); - $1554 = tempRet0; - $1555 = (_i64Add(($1553|0),($1554|0),($1535|0),($1536|0))|0); - $1556 = tempRet0; - $1557 = $191; - $1558 = $1557; - $1559 = HEAP32[$1558>>2]|0; - $1560 = (($1557) + 4)|0; - $1561 = $1560; - $1562 = HEAP32[$1561>>2]|0; - $1563 = (_bitshift64Ashr(0,($1559|0),32)|0); - $1564 = tempRet0; - $1565 = $1114; - $1566 = $1565; - $1567 = HEAP32[$1566>>2]|0; - $1568 = (($1565) + 4)|0; - $1569 = $1568; - $1570 = HEAP32[$1569>>2]|0; - $1571 = (_bitshift64Ashr(0,($1567|0),32)|0); - $1572 = tempRet0; - $1573 = (___muldi3(($1571|0),($1572|0),($1563|0),($1564|0))|0); - $1574 = tempRet0; - $1575 = (_i64Add(($1555|0),($1556|0),($1573|0),($1574|0))|0); - $1576 = tempRet0; - $1577 = $1127; - $1578 = $1577; - $1579 = HEAP32[$1578>>2]|0; - $1580 = (($1577) + 4)|0; - $1581 = $1580; - $1582 = HEAP32[$1581>>2]|0; - $1583 = (_bitshift64Ashr(0,($1579|0),32)|0); - $1584 = tempRet0; - $1585 = $178; - $1586 = $1585; - $1587 = HEAP32[$1586>>2]|0; - $1588 = (($1585) + 4)|0; - $1589 = $1588; - $1590 = HEAP32[$1589>>2]|0; - $1591 = (_bitshift64Ashr(0,($1587|0),32)|0); - $1592 = tempRet0; - $1593 = (___muldi3(($1591|0),($1592|0),($1583|0),($1584|0))|0); - $1594 = tempRet0; - $1595 = (_i64Add(($1575|0),($1576|0),($1593|0),($1594|0))|0); - $1596 = tempRet0; - $1597 = (_bitshift64Shl(($1595|0),($1596|0),1)|0); - $1598 = tempRet0; - $1599 = (_i64Add(($1597|0),($1598|0),($1517|0),($1518|0))|0); - $1600 = tempRet0; - $1601 = $298; - $1602 = $1601; - $1603 = HEAP32[$1602>>2]|0; - $1604 = (($1601) + 4)|0; - $1605 = $1604; - $1606 = HEAP32[$1605>>2]|0; - $1607 = (_bitshift64Ashr(0,($1603|0),32)|0); - $1608 = tempRet0; - $1609 = $909; - $1610 = $1609; - $1611 = HEAP32[$1610>>2]|0; - $1612 = (($1609) + 4)|0; - $1613 = $1612; - $1614 = HEAP32[$1613>>2]|0; - $1615 = (_bitshift64Ashr(0,($1611|0),32)|0); - $1616 = tempRet0; - $1617 = (___muldi3(($1615|0),($1616|0),($1607|0),($1608|0))|0); - $1618 = tempRet0; - $1619 = (_i64Add(($1599|0),($1600|0),($1617|0),($1618|0))|0); - $1620 = tempRet0; - $1621 = $922; - $1622 = $1621; - $1623 = HEAP32[$1622>>2]|0; - $1624 = (($1621) + 4)|0; - $1625 = $1624; - $1626 = HEAP32[$1625>>2]|0; - $1627 = (_bitshift64Ashr(0,($1623|0),32)|0); - $1628 = tempRet0; - $1629 = $285; - $1630 = $1629; - $1631 = HEAP32[$1630>>2]|0; - $1632 = (($1629) + 4)|0; - $1633 = $1632; - $1634 = HEAP32[$1633>>2]|0; - $1635 = (_bitshift64Ashr(0,($1631|0),32)|0); - $1636 = tempRet0; - $1637 = (___muldi3(($1635|0),($1636|0),($1627|0),($1628|0))|0); - $1638 = tempRet0; - $1639 = (_i64Add(($1619|0),($1620|0),($1637|0),($1638|0))|0); - $1640 = tempRet0; - $1641 = (($output) + 96|0); - $1642 = $1641; - $1643 = $1642; - HEAP32[$1643>>2] = $1639; - $1644 = (($1642) + 4)|0; - $1645 = $1644; - HEAP32[$1645>>2] = $1640; - $1646 = $570; - $1647 = $1646; - $1648 = HEAP32[$1647>>2]|0; - $1649 = (($1646) + 4)|0; - $1650 = $1649; - $1651 = HEAP32[$1650>>2]|0; - $1652 = (_bitshift64Ashr(0,($1648|0),32)|0); - $1653 = tempRet0; - $1654 = $722; - $1655 = $1654; - $1656 = HEAP32[$1655>>2]|0; - $1657 = (($1654) + 4)|0; - $1658 = $1657; - $1659 = HEAP32[$1658>>2]|0; - $1660 = (_bitshift64Ashr(0,($1656|0),32)|0); - $1661 = tempRet0; - $1662 = (___muldi3(($1660|0),($1661|0),($1652|0),($1653|0))|0); - $1663 = tempRet0; - $1664 = $735; - $1665 = $1664; - $1666 = HEAP32[$1665>>2]|0; - $1667 = (($1664) + 4)|0; - $1668 = $1667; - $1669 = HEAP32[$1668>>2]|0; - $1670 = (_bitshift64Ashr(0,($1666|0),32)|0); - $1671 = tempRet0; - $1672 = $557; - $1673 = $1672; - $1674 = HEAP32[$1673>>2]|0; - $1675 = (($1672) + 4)|0; - $1676 = $1675; - $1677 = HEAP32[$1676>>2]|0; - $1678 = (_bitshift64Ashr(0,($1674|0),32)|0); - $1679 = tempRet0; - $1680 = (___muldi3(($1678|0),($1679|0),($1670|0),($1671|0))|0); - $1681 = tempRet0; - $1682 = (_i64Add(($1680|0),($1681|0),($1662|0),($1663|0))|0); - $1683 = tempRet0; - $1684 = $423; - $1685 = $1684; - $1686 = HEAP32[$1685>>2]|0; - $1687 = (($1684) + 4)|0; - $1688 = $1687; - $1689 = HEAP32[$1688>>2]|0; - $1690 = (_bitshift64Ashr(0,($1686|0),32)|0); - $1691 = tempRet0; - $1692 = $909; - $1693 = $1692; - $1694 = HEAP32[$1693>>2]|0; - $1695 = (($1692) + 4)|0; - $1696 = $1695; - $1697 = HEAP32[$1696>>2]|0; - $1698 = (_bitshift64Ashr(0,($1694|0),32)|0); - $1699 = tempRet0; - $1700 = (___muldi3(($1698|0),($1699|0),($1690|0),($1691|0))|0); - $1701 = tempRet0; - $1702 = (_i64Add(($1682|0),($1683|0),($1700|0),($1701|0))|0); - $1703 = tempRet0; - $1704 = $922; - $1705 = $1704; - $1706 = HEAP32[$1705>>2]|0; - $1707 = (($1704) + 4)|0; - $1708 = $1707; - $1709 = HEAP32[$1708>>2]|0; - $1710 = (_bitshift64Ashr(0,($1706|0),32)|0); - $1711 = tempRet0; - $1712 = $410; - $1713 = $1712; - $1714 = HEAP32[$1713>>2]|0; - $1715 = (($1712) + 4)|0; - $1716 = $1715; - $1717 = HEAP32[$1716>>2]|0; - $1718 = (_bitshift64Ashr(0,($1714|0),32)|0); - $1719 = tempRet0; - $1720 = (___muldi3(($1718|0),($1719|0),($1710|0),($1711|0))|0); - $1721 = tempRet0; - $1722 = (_i64Add(($1702|0),($1703|0),($1720|0),($1721|0))|0); - $1723 = tempRet0; - $1724 = $298; - $1725 = $1724; - $1726 = HEAP32[$1725>>2]|0; - $1727 = (($1724) + 4)|0; - $1728 = $1727; - $1729 = HEAP32[$1728>>2]|0; - $1730 = (_bitshift64Ashr(0,($1726|0),32)|0); - $1731 = tempRet0; - $1732 = $1114; - $1733 = $1732; - $1734 = HEAP32[$1733>>2]|0; - $1735 = (($1732) + 4)|0; - $1736 = $1735; - $1737 = HEAP32[$1736>>2]|0; - $1738 = (_bitshift64Ashr(0,($1734|0),32)|0); - $1739 = tempRet0; - $1740 = (___muldi3(($1738|0),($1739|0),($1730|0),($1731|0))|0); - $1741 = tempRet0; - $1742 = (_i64Add(($1722|0),($1723|0),($1740|0),($1741|0))|0); - $1743 = tempRet0; - $1744 = $1127; - $1745 = $1744; - $1746 = HEAP32[$1745>>2]|0; - $1747 = (($1744) + 4)|0; - $1748 = $1747; - $1749 = HEAP32[$1748>>2]|0; - $1750 = (_bitshift64Ashr(0,($1746|0),32)|0); - $1751 = tempRet0; - $1752 = $285; - $1753 = $1752; - $1754 = HEAP32[$1753>>2]|0; - $1755 = (($1752) + 4)|0; - $1756 = $1755; - $1757 = HEAP32[$1756>>2]|0; - $1758 = (_bitshift64Ashr(0,($1754|0),32)|0); - $1759 = tempRet0; - $1760 = (___muldi3(($1758|0),($1759|0),($1750|0),($1751|0))|0); - $1761 = tempRet0; - $1762 = (_i64Add(($1742|0),($1743|0),($1760|0),($1761|0))|0); - $1763 = tempRet0; - $1764 = (($output) + 104|0); - $1765 = $1764; - $1766 = $1765; - HEAP32[$1766>>2] = $1762; - $1767 = (($1765) + 4)|0; - $1768 = $1767; - HEAP32[$1768>>2] = $1763; - $1769 = $735; - $1770 = $1769; - $1771 = HEAP32[$1770>>2]|0; - $1772 = (($1769) + 4)|0; - $1773 = $1772; - $1774 = HEAP32[$1773>>2]|0; - $1775 = (_bitshift64Ashr(0,($1771|0),32)|0); - $1776 = tempRet0; - $1777 = $722; - $1778 = $1777; - $1779 = HEAP32[$1778>>2]|0; - $1780 = (($1777) + 4)|0; - $1781 = $1780; - $1782 = HEAP32[$1781>>2]|0; - $1783 = (_bitshift64Ashr(0,($1779|0),32)|0); - $1784 = tempRet0; - $1785 = (___muldi3(($1783|0),($1784|0),($1775|0),($1776|0))|0); - $1786 = tempRet0; - $1787 = $423; - $1788 = $1787; - $1789 = HEAP32[$1788>>2]|0; - $1790 = (($1787) + 4)|0; - $1791 = $1790; - $1792 = HEAP32[$1791>>2]|0; - $1793 = (_bitshift64Ashr(0,($1789|0),32)|0); - $1794 = tempRet0; - $1795 = $1114; - $1796 = $1795; - $1797 = HEAP32[$1796>>2]|0; - $1798 = (($1795) + 4)|0; - $1799 = $1798; - $1800 = HEAP32[$1799>>2]|0; - $1801 = (_bitshift64Ashr(0,($1797|0),32)|0); - $1802 = tempRet0; - $1803 = (___muldi3(($1801|0),($1802|0),($1793|0),($1794|0))|0); - $1804 = tempRet0; - $1805 = (_i64Add(($1803|0),($1804|0),($1785|0),($1786|0))|0); - $1806 = tempRet0; - $1807 = $1127; - $1808 = $1807; - $1809 = HEAP32[$1808>>2]|0; - $1810 = (($1807) + 4)|0; - $1811 = $1810; - $1812 = HEAP32[$1811>>2]|0; - $1813 = (_bitshift64Ashr(0,($1809|0),32)|0); - $1814 = tempRet0; - $1815 = $410; - $1816 = $1815; - $1817 = HEAP32[$1816>>2]|0; - $1818 = (($1815) + 4)|0; - $1819 = $1818; - $1820 = HEAP32[$1819>>2]|0; - $1821 = (_bitshift64Ashr(0,($1817|0),32)|0); - $1822 = tempRet0; - $1823 = (___muldi3(($1821|0),($1822|0),($1813|0),($1814|0))|0); - $1824 = tempRet0; - $1825 = (_i64Add(($1805|0),($1806|0),($1823|0),($1824|0))|0); - $1826 = tempRet0; - $1827 = (_bitshift64Shl(($1825|0),($1826|0),1)|0); - $1828 = tempRet0; - $1829 = $570; - $1830 = $1829; - $1831 = HEAP32[$1830>>2]|0; - $1832 = (($1829) + 4)|0; - $1833 = $1832; - $1834 = HEAP32[$1833>>2]|0; - $1835 = (_bitshift64Ashr(0,($1831|0),32)|0); - $1836 = tempRet0; - $1837 = $909; - $1838 = $1837; - $1839 = HEAP32[$1838>>2]|0; - $1840 = (($1837) + 4)|0; - $1841 = $1840; - $1842 = HEAP32[$1841>>2]|0; - $1843 = (_bitshift64Ashr(0,($1839|0),32)|0); - $1844 = tempRet0; - $1845 = (___muldi3(($1843|0),($1844|0),($1835|0),($1836|0))|0); - $1846 = tempRet0; - $1847 = (_i64Add(($1827|0),($1828|0),($1845|0),($1846|0))|0); - $1848 = tempRet0; - $1849 = $922; - $1850 = $1849; - $1851 = HEAP32[$1850>>2]|0; - $1852 = (($1849) + 4)|0; - $1853 = $1852; - $1854 = HEAP32[$1853>>2]|0; - $1855 = (_bitshift64Ashr(0,($1851|0),32)|0); - $1856 = tempRet0; - $1857 = $557; - $1858 = $1857; - $1859 = HEAP32[$1858>>2]|0; - $1860 = (($1857) + 4)|0; - $1861 = $1860; - $1862 = HEAP32[$1861>>2]|0; - $1863 = (_bitshift64Ashr(0,($1859|0),32)|0); - $1864 = tempRet0; - $1865 = (___muldi3(($1863|0),($1864|0),($1855|0),($1856|0))|0); - $1866 = tempRet0; - $1867 = (_i64Add(($1847|0),($1848|0),($1865|0),($1866|0))|0); - $1868 = tempRet0; - $1869 = (($output) + 112|0); - $1870 = $1869; - $1871 = $1870; - HEAP32[$1871>>2] = $1867; - $1872 = (($1870) + 4)|0; - $1873 = $1872; - HEAP32[$1873>>2] = $1868; - $1874 = $735; - $1875 = $1874; - $1876 = HEAP32[$1875>>2]|0; - $1877 = (($1874) + 4)|0; - $1878 = $1877; - $1879 = HEAP32[$1878>>2]|0; - $1880 = (_bitshift64Ashr(0,($1876|0),32)|0); - $1881 = tempRet0; - $1882 = $909; - $1883 = $1882; - $1884 = HEAP32[$1883>>2]|0; - $1885 = (($1882) + 4)|0; - $1886 = $1885; - $1887 = HEAP32[$1886>>2]|0; - $1888 = (_bitshift64Ashr(0,($1884|0),32)|0); - $1889 = tempRet0; - $1890 = (___muldi3(($1888|0),($1889|0),($1880|0),($1881|0))|0); - $1891 = tempRet0; - $1892 = $922; - $1893 = $1892; - $1894 = HEAP32[$1893>>2]|0; - $1895 = (($1892) + 4)|0; - $1896 = $1895; - $1897 = HEAP32[$1896>>2]|0; - $1898 = (_bitshift64Ashr(0,($1894|0),32)|0); - $1899 = tempRet0; - $1900 = $722; - $1901 = $1900; - $1902 = HEAP32[$1901>>2]|0; - $1903 = (($1900) + 4)|0; - $1904 = $1903; - $1905 = HEAP32[$1904>>2]|0; - $1906 = (_bitshift64Ashr(0,($1902|0),32)|0); - $1907 = tempRet0; - $1908 = (___muldi3(($1906|0),($1907|0),($1898|0),($1899|0))|0); - $1909 = tempRet0; - $1910 = (_i64Add(($1908|0),($1909|0),($1890|0),($1891|0))|0); - $1911 = tempRet0; - $1912 = $570; - $1913 = $1912; - $1914 = HEAP32[$1913>>2]|0; - $1915 = (($1912) + 4)|0; - $1916 = $1915; - $1917 = HEAP32[$1916>>2]|0; - $1918 = (_bitshift64Ashr(0,($1914|0),32)|0); - $1919 = tempRet0; - $1920 = $1114; - $1921 = $1920; - $1922 = HEAP32[$1921>>2]|0; - $1923 = (($1920) + 4)|0; - $1924 = $1923; - $1925 = HEAP32[$1924>>2]|0; - $1926 = (_bitshift64Ashr(0,($1922|0),32)|0); - $1927 = tempRet0; - $1928 = (___muldi3(($1926|0),($1927|0),($1918|0),($1919|0))|0); - $1929 = tempRet0; - $1930 = (_i64Add(($1910|0),($1911|0),($1928|0),($1929|0))|0); - $1931 = tempRet0; - $1932 = $1127; - $1933 = $1932; - $1934 = HEAP32[$1933>>2]|0; - $1935 = (($1932) + 4)|0; - $1936 = $1935; - $1937 = HEAP32[$1936>>2]|0; - $1938 = (_bitshift64Ashr(0,($1934|0),32)|0); - $1939 = tempRet0; - $1940 = $557; - $1941 = $1940; - $1942 = HEAP32[$1941>>2]|0; - $1943 = (($1940) + 4)|0; - $1944 = $1943; - $1945 = HEAP32[$1944>>2]|0; - $1946 = (_bitshift64Ashr(0,($1942|0),32)|0); - $1947 = tempRet0; - $1948 = (___muldi3(($1946|0),($1947|0),($1938|0),($1939|0))|0); - $1949 = tempRet0; - $1950 = (_i64Add(($1930|0),($1931|0),($1948|0),($1949|0))|0); - $1951 = tempRet0; - $1952 = (($output) + 120|0); - $1953 = $1952; - $1954 = $1953; - HEAP32[$1954>>2] = $1950; - $1955 = (($1953) + 4)|0; - $1956 = $1955; - HEAP32[$1956>>2] = $1951; - $1957 = $922; - $1958 = $1957; - $1959 = HEAP32[$1958>>2]|0; - $1960 = (($1957) + 4)|0; - $1961 = $1960; - $1962 = HEAP32[$1961>>2]|0; - $1963 = (_bitshift64Ashr(0,($1959|0),32)|0); - $1964 = tempRet0; - $1965 = $909; - $1966 = $1965; - $1967 = HEAP32[$1966>>2]|0; - $1968 = (($1965) + 4)|0; - $1969 = $1968; - $1970 = HEAP32[$1969>>2]|0; - $1971 = (_bitshift64Ashr(0,($1967|0),32)|0); - $1972 = tempRet0; - $1973 = (___muldi3(($1971|0),($1972|0),($1963|0),($1964|0))|0); - $1974 = tempRet0; - $1975 = $735; - $1976 = $1975; - $1977 = HEAP32[$1976>>2]|0; - $1978 = (($1975) + 4)|0; - $1979 = $1978; - $1980 = HEAP32[$1979>>2]|0; - $1981 = (_bitshift64Ashr(0,($1977|0),32)|0); - $1982 = tempRet0; - $1983 = $1114; - $1984 = $1983; - $1985 = HEAP32[$1984>>2]|0; - $1986 = (($1983) + 4)|0; - $1987 = $1986; - $1988 = HEAP32[$1987>>2]|0; - $1989 = (_bitshift64Ashr(0,($1985|0),32)|0); - $1990 = tempRet0; - $1991 = (___muldi3(($1989|0),($1990|0),($1981|0),($1982|0))|0); - $1992 = tempRet0; - $1993 = $1127; - $1994 = $1993; - $1995 = HEAP32[$1994>>2]|0; - $1996 = (($1993) + 4)|0; - $1997 = $1996; - $1998 = HEAP32[$1997>>2]|0; - $1999 = (_bitshift64Ashr(0,($1995|0),32)|0); - $2000 = tempRet0; - $2001 = $722; - $2002 = $2001; - $2003 = HEAP32[$2002>>2]|0; - $2004 = (($2001) + 4)|0; - $2005 = $2004; - $2006 = HEAP32[$2005>>2]|0; - $2007 = (_bitshift64Ashr(0,($2003|0),32)|0); - $2008 = tempRet0; - $2009 = (___muldi3(($2007|0),($2008|0),($1999|0),($2000|0))|0); - $2010 = tempRet0; - $2011 = (_i64Add(($2009|0),($2010|0),($1991|0),($1992|0))|0); - $2012 = tempRet0; - $2013 = (_bitshift64Shl(($2011|0),($2012|0),1)|0); - $2014 = tempRet0; - $2015 = (_i64Add(($2013|0),($2014|0),($1973|0),($1974|0))|0); - $2016 = tempRet0; - $2017 = (($output) + 128|0); - $2018 = $2017; - $2019 = $2018; - HEAP32[$2019>>2] = $2015; - $2020 = (($2018) + 4)|0; - $2021 = $2020; - HEAP32[$2021>>2] = $2016; - $2022 = $922; - $2023 = $2022; - $2024 = HEAP32[$2023>>2]|0; - $2025 = (($2022) + 4)|0; - $2026 = $2025; - $2027 = HEAP32[$2026>>2]|0; - $2028 = (_bitshift64Ashr(0,($2024|0),32)|0); - $2029 = tempRet0; - $2030 = $1114; - $2031 = $2030; - $2032 = HEAP32[$2031>>2]|0; - $2033 = (($2030) + 4)|0; - $2034 = $2033; - $2035 = HEAP32[$2034>>2]|0; - $2036 = (_bitshift64Ashr(0,($2032|0),32)|0); - $2037 = tempRet0; - $2038 = (___muldi3(($2036|0),($2037|0),($2028|0),($2029|0))|0); - $2039 = tempRet0; - $2040 = $1127; - $2041 = $2040; - $2042 = HEAP32[$2041>>2]|0; - $2043 = (($2040) + 4)|0; - $2044 = $2043; - $2045 = HEAP32[$2044>>2]|0; - $2046 = (_bitshift64Ashr(0,($2042|0),32)|0); - $2047 = tempRet0; - $2048 = $909; - $2049 = $2048; - $2050 = HEAP32[$2049>>2]|0; - $2051 = (($2048) + 4)|0; - $2052 = $2051; - $2053 = HEAP32[$2052>>2]|0; - $2054 = (_bitshift64Ashr(0,($2050|0),32)|0); - $2055 = tempRet0; - $2056 = (___muldi3(($2054|0),($2055|0),($2046|0),($2047|0))|0); - $2057 = tempRet0; - $2058 = (_i64Add(($2056|0),($2057|0),($2038|0),($2039|0))|0); - $2059 = tempRet0; - $2060 = (($output) + 136|0); - $2061 = $2060; - $2062 = $2061; - HEAP32[$2062>>2] = $2058; - $2063 = (($2061) + 4)|0; - $2064 = $2063; - HEAP32[$2064>>2] = $2059; - $2065 = $1127; - $2066 = $2065; - $2067 = HEAP32[$2066>>2]|0; - $2068 = (($2065) + 4)|0; - $2069 = $2068; - $2070 = HEAP32[$2069>>2]|0; - $2071 = (_bitshift64Ashr(0,($2067|0),31)|0); - $2072 = tempRet0; - $2073 = $1114; - $2074 = $2073; - $2075 = HEAP32[$2074>>2]|0; - $2076 = (($2073) + 4)|0; - $2077 = $2076; - $2078 = HEAP32[$2077>>2]|0; - $2079 = (_bitshift64Ashr(0,($2075|0),32)|0); - $2080 = tempRet0; - $2081 = (___muldi3(($2079|0),($2080|0),($2071|0),($2072|0))|0); - $2082 = tempRet0; - $2083 = (($output) + 144|0); - $2084 = $2083; - $2085 = $2084; - HEAP32[$2085>>2] = $2081; - $2086 = (($2084) + 4)|0; - $2087 = $2086; - HEAP32[$2087>>2] = $2082; - STACKTOP = sp;return; -} -function _freduce_degree($output) { - $output = $output|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; - var $297 = 0, $298 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; - var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; - var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; - var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = (($output) + 144|0); - $1 = $0; - $2 = $1; - $3 = HEAP32[$2>>2]|0; - $4 = (($1) + 4)|0; - $5 = $4; - $6 = HEAP32[$5>>2]|0; - $7 = (_bitshift64Shl(($3|0),($6|0),4)|0); - $8 = tempRet0; - $9 = (($output) + 64|0); - $10 = $9; - $11 = $10; - $12 = HEAP32[$11>>2]|0; - $13 = (($10) + 4)|0; - $14 = $13; - $15 = HEAP32[$14>>2]|0; - $16 = (_i64Add(($12|0),($15|0),($7|0),($8|0))|0); - $17 = tempRet0; - $18 = (_bitshift64Shl(($3|0),($6|0),1)|0); - $19 = tempRet0; - $20 = (_i64Add(($18|0),($19|0),($16|0),($17|0))|0); - $21 = tempRet0; - $22 = $0; - $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($22) + 4)|0; - $26 = $25; - $27 = HEAP32[$26>>2]|0; - $28 = (_i64Add(($20|0),($21|0),($24|0),($27|0))|0); - $29 = tempRet0; - $30 = $9; - $31 = $30; - HEAP32[$31>>2] = $28; - $32 = (($30) + 4)|0; - $33 = $32; - HEAP32[$33>>2] = $29; - $34 = (($output) + 136|0); - $35 = $34; - $36 = $35; - $37 = HEAP32[$36>>2]|0; - $38 = (($35) + 4)|0; - $39 = $38; - $40 = HEAP32[$39>>2]|0; - $41 = (_bitshift64Shl(($37|0),($40|0),4)|0); - $42 = tempRet0; - $43 = (($output) + 56|0); - $44 = $43; - $45 = $44; - $46 = HEAP32[$45>>2]|0; - $47 = (($44) + 4)|0; - $48 = $47; - $49 = HEAP32[$48>>2]|0; - $50 = (_i64Add(($46|0),($49|0),($41|0),($42|0))|0); - $51 = tempRet0; - $52 = (_bitshift64Shl(($37|0),($40|0),1)|0); - $53 = tempRet0; - $54 = (_i64Add(($52|0),($53|0),($50|0),($51|0))|0); - $55 = tempRet0; - $56 = $34; - $57 = $56; - $58 = HEAP32[$57>>2]|0; - $59 = (($56) + 4)|0; - $60 = $59; - $61 = HEAP32[$60>>2]|0; - $62 = (_i64Add(($54|0),($55|0),($58|0),($61|0))|0); - $63 = tempRet0; - $64 = $43; - $65 = $64; - HEAP32[$65>>2] = $62; - $66 = (($64) + 4)|0; - $67 = $66; - HEAP32[$67>>2] = $63; - $68 = (($output) + 128|0); - $69 = $68; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (($69) + 4)|0; - $73 = $72; - $74 = HEAP32[$73>>2]|0; - $75 = (_bitshift64Shl(($71|0),($74|0),4)|0); - $76 = tempRet0; - $77 = (($output) + 48|0); - $78 = $77; - $79 = $78; - $80 = HEAP32[$79>>2]|0; - $81 = (($78) + 4)|0; - $82 = $81; - $83 = HEAP32[$82>>2]|0; - $84 = (_i64Add(($80|0),($83|0),($75|0),($76|0))|0); - $85 = tempRet0; - $86 = (_bitshift64Shl(($71|0),($74|0),1)|0); - $87 = tempRet0; - $88 = (_i64Add(($86|0),($87|0),($84|0),($85|0))|0); - $89 = tempRet0; - $90 = $68; - $91 = $90; - $92 = HEAP32[$91>>2]|0; - $93 = (($90) + 4)|0; - $94 = $93; - $95 = HEAP32[$94>>2]|0; - $96 = (_i64Add(($88|0),($89|0),($92|0),($95|0))|0); - $97 = tempRet0; - $98 = $77; - $99 = $98; - HEAP32[$99>>2] = $96; - $100 = (($98) + 4)|0; - $101 = $100; - HEAP32[$101>>2] = $97; - $102 = (($output) + 120|0); - $103 = $102; - $104 = $103; - $105 = HEAP32[$104>>2]|0; - $106 = (($103) + 4)|0; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (_bitshift64Shl(($105|0),($108|0),4)|0); - $110 = tempRet0; - $111 = (($output) + 40|0); - $112 = $111; - $113 = $112; - $114 = HEAP32[$113>>2]|0; - $115 = (($112) + 4)|0; - $116 = $115; - $117 = HEAP32[$116>>2]|0; - $118 = (_i64Add(($114|0),($117|0),($109|0),($110|0))|0); - $119 = tempRet0; - $120 = (_bitshift64Shl(($105|0),($108|0),1)|0); - $121 = tempRet0; - $122 = (_i64Add(($120|0),($121|0),($118|0),($119|0))|0); - $123 = tempRet0; - $124 = $102; - $125 = $124; - $126 = HEAP32[$125>>2]|0; - $127 = (($124) + 4)|0; - $128 = $127; - $129 = HEAP32[$128>>2]|0; - $130 = (_i64Add(($122|0),($123|0),($126|0),($129|0))|0); - $131 = tempRet0; - $132 = $111; - $133 = $132; - HEAP32[$133>>2] = $130; - $134 = (($132) + 4)|0; - $135 = $134; - HEAP32[$135>>2] = $131; - $136 = (($output) + 112|0); - $137 = $136; - $138 = $137; - $139 = HEAP32[$138>>2]|0; - $140 = (($137) + 4)|0; - $141 = $140; - $142 = HEAP32[$141>>2]|0; - $143 = (_bitshift64Shl(($139|0),($142|0),4)|0); - $144 = tempRet0; - $145 = (($output) + 32|0); - $146 = $145; - $147 = $146; - $148 = HEAP32[$147>>2]|0; - $149 = (($146) + 4)|0; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (_i64Add(($148|0),($151|0),($143|0),($144|0))|0); - $153 = tempRet0; - $154 = (_bitshift64Shl(($139|0),($142|0),1)|0); - $155 = tempRet0; - $156 = (_i64Add(($154|0),($155|0),($152|0),($153|0))|0); - $157 = tempRet0; - $158 = $136; - $159 = $158; - $160 = HEAP32[$159>>2]|0; - $161 = (($158) + 4)|0; - $162 = $161; - $163 = HEAP32[$162>>2]|0; - $164 = (_i64Add(($156|0),($157|0),($160|0),($163|0))|0); - $165 = tempRet0; - $166 = $145; - $167 = $166; - HEAP32[$167>>2] = $164; - $168 = (($166) + 4)|0; - $169 = $168; - HEAP32[$169>>2] = $165; - $170 = (($output) + 104|0); - $171 = $170; - $172 = $171; - $173 = HEAP32[$172>>2]|0; - $174 = (($171) + 4)|0; - $175 = $174; - $176 = HEAP32[$175>>2]|0; - $177 = (_bitshift64Shl(($173|0),($176|0),4)|0); - $178 = tempRet0; - $179 = (($output) + 24|0); - $180 = $179; - $181 = $180; - $182 = HEAP32[$181>>2]|0; - $183 = (($180) + 4)|0; - $184 = $183; - $185 = HEAP32[$184>>2]|0; - $186 = (_i64Add(($182|0),($185|0),($177|0),($178|0))|0); - $187 = tempRet0; - $188 = (_bitshift64Shl(($173|0),($176|0),1)|0); - $189 = tempRet0; - $190 = (_i64Add(($188|0),($189|0),($186|0),($187|0))|0); - $191 = tempRet0; - $192 = $170; - $193 = $192; - $194 = HEAP32[$193>>2]|0; - $195 = (($192) + 4)|0; - $196 = $195; - $197 = HEAP32[$196>>2]|0; - $198 = (_i64Add(($190|0),($191|0),($194|0),($197|0))|0); - $199 = tempRet0; - $200 = $179; - $201 = $200; - HEAP32[$201>>2] = $198; - $202 = (($200) + 4)|0; - $203 = $202; - HEAP32[$203>>2] = $199; - $204 = (($output) + 96|0); - $205 = $204; - $206 = $205; - $207 = HEAP32[$206>>2]|0; - $208 = (($205) + 4)|0; - $209 = $208; - $210 = HEAP32[$209>>2]|0; - $211 = (_bitshift64Shl(($207|0),($210|0),4)|0); - $212 = tempRet0; - $213 = (($output) + 16|0); - $214 = $213; - $215 = $214; - $216 = HEAP32[$215>>2]|0; - $217 = (($214) + 4)|0; - $218 = $217; - $219 = HEAP32[$218>>2]|0; - $220 = (_i64Add(($216|0),($219|0),($211|0),($212|0))|0); - $221 = tempRet0; - $222 = (_bitshift64Shl(($207|0),($210|0),1)|0); - $223 = tempRet0; - $224 = (_i64Add(($222|0),($223|0),($220|0),($221|0))|0); - $225 = tempRet0; - $226 = $204; - $227 = $226; - $228 = HEAP32[$227>>2]|0; - $229 = (($226) + 4)|0; - $230 = $229; - $231 = HEAP32[$230>>2]|0; - $232 = (_i64Add(($224|0),($225|0),($228|0),($231|0))|0); - $233 = tempRet0; - $234 = $213; - $235 = $234; - HEAP32[$235>>2] = $232; - $236 = (($234) + 4)|0; - $237 = $236; - HEAP32[$237>>2] = $233; - $238 = (($output) + 88|0); - $239 = $238; - $240 = $239; - $241 = HEAP32[$240>>2]|0; - $242 = (($239) + 4)|0; - $243 = $242; - $244 = HEAP32[$243>>2]|0; - $245 = (_bitshift64Shl(($241|0),($244|0),4)|0); - $246 = tempRet0; - $247 = (($output) + 8|0); - $248 = $247; - $249 = $248; - $250 = HEAP32[$249>>2]|0; - $251 = (($248) + 4)|0; - $252 = $251; - $253 = HEAP32[$252>>2]|0; - $254 = (_i64Add(($250|0),($253|0),($245|0),($246|0))|0); - $255 = tempRet0; - $256 = (_bitshift64Shl(($241|0),($244|0),1)|0); - $257 = tempRet0; - $258 = (_i64Add(($256|0),($257|0),($254|0),($255|0))|0); - $259 = tempRet0; - $260 = $238; - $261 = $260; - $262 = HEAP32[$261>>2]|0; - $263 = (($260) + 4)|0; - $264 = $263; - $265 = HEAP32[$264>>2]|0; - $266 = (_i64Add(($258|0),($259|0),($262|0),($265|0))|0); - $267 = tempRet0; - $268 = $247; - $269 = $268; - HEAP32[$269>>2] = $266; - $270 = (($268) + 4)|0; - $271 = $270; - HEAP32[$271>>2] = $267; - $272 = (($output) + 80|0); - $273 = $272; - $274 = $273; - $275 = HEAP32[$274>>2]|0; - $276 = (($273) + 4)|0; - $277 = $276; - $278 = HEAP32[$277>>2]|0; - $279 = (_bitshift64Shl(($275|0),($278|0),4)|0); - $280 = tempRet0; - $281 = $output; - $282 = $281; - $283 = HEAP32[$282>>2]|0; - $284 = (($281) + 4)|0; - $285 = $284; - $286 = HEAP32[$285>>2]|0; - $287 = (_i64Add(($283|0),($286|0),($279|0),($280|0))|0); - $288 = tempRet0; - $289 = (_bitshift64Shl(($275|0),($278|0),1)|0); - $290 = tempRet0; - $291 = (_i64Add(($289|0),($290|0),($287|0),($288|0))|0); - $292 = tempRet0; - $293 = (_i64Add(($291|0),($292|0),($275|0),($278|0))|0); - $294 = tempRet0; - $295 = $output; - $296 = $295; - HEAP32[$296>>2] = $293; - $297 = (($295) + 4)|0; - $298 = $297; - HEAP32[$298>>2] = $294; - STACKTOP = sp;return; -} -function _freduce_coefficients($output) { - $output = $output|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0; - var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0; - var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0; - var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0; - var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i$01 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($output) + 80|0); - $1 = $0; - $2 = $1; - HEAP32[$2>>2] = 0; - $3 = (($1) + 4)|0; - $4 = $3; - HEAP32[$4>>2] = 0; - $i$01 = 0; - while(1) { - $5 = (($output) + ($i$01<<3)|0); - $6 = $5; - $7 = $6; - $8 = HEAP32[$7>>2]|0; - $9 = (($6) + 4)|0; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (_div_by_2_26($8,$11)|0); - $13 = tempRet0; - $14 = (_bitshift64Shl(($12|0),($13|0),26)|0); - $15 = tempRet0; - $16 = (_i64Subtract(($8|0),($11|0),($14|0),($15|0))|0); - $17 = tempRet0; - $18 = $5; - $19 = $18; - HEAP32[$19>>2] = $16; - $20 = (($18) + 4)|0; - $21 = $20; - HEAP32[$21>>2] = $17; - $22 = $i$01 | 1; - $23 = (($output) + ($22<<3)|0); - $24 = $23; - $25 = $24; - $26 = HEAP32[$25>>2]|0; - $27 = (($24) + 4)|0; - $28 = $27; - $29 = HEAP32[$28>>2]|0; - $30 = (_i64Add(($26|0),($29|0),($12|0),($13|0))|0); - $31 = tempRet0; - $32 = (_div_by_2_25($30,$31)|0); - $33 = tempRet0; - $34 = (_bitshift64Shl(($32|0),($33|0),25)|0); - $35 = tempRet0; - $36 = (_i64Subtract(($30|0),($31|0),($34|0),($35|0))|0); - $37 = tempRet0; - $38 = $23; - $39 = $38; - HEAP32[$39>>2] = $36; - $40 = (($38) + 4)|0; - $41 = $40; - HEAP32[$41>>2] = $37; - $42 = (($i$01) + 2)|0; - $43 = (($output) + ($42<<3)|0); - $44 = $43; - $45 = $44; - $46 = HEAP32[$45>>2]|0; - $47 = (($44) + 4)|0; - $48 = $47; - $49 = HEAP32[$48>>2]|0; - $50 = (_i64Add(($46|0),($49|0),($32|0),($33|0))|0); - $51 = tempRet0; - $52 = $43; - $53 = $52; - HEAP32[$53>>2] = $50; - $54 = (($52) + 4)|0; - $55 = $54; - HEAP32[$55>>2] = $51; - $56 = ($42>>>0)<(10); - if ($56) { - $i$01 = $42; - } else { - break; - } - } - $57 = $0; - $58 = $57; - $59 = HEAP32[$58>>2]|0; - $60 = (($57) + 4)|0; - $61 = $60; - $62 = HEAP32[$61>>2]|0; - $63 = (_bitshift64Shl(($59|0),($62|0),4)|0); - $64 = tempRet0; - $65 = $output; - $66 = $65; - $67 = HEAP32[$66>>2]|0; - $68 = (($65) + 4)|0; - $69 = $68; - $70 = HEAP32[$69>>2]|0; - $71 = (_i64Add(($67|0),($70|0),($63|0),($64|0))|0); - $72 = tempRet0; - $73 = (_bitshift64Shl(($59|0),($62|0),1)|0); - $74 = tempRet0; - $75 = (_i64Add(($73|0),($74|0),($71|0),($72|0))|0); - $76 = tempRet0; - $77 = (_i64Add(($75|0),($76|0),($59|0),($62|0))|0); - $78 = tempRet0; - $79 = $output; - $80 = $79; - HEAP32[$80>>2] = $77; - $81 = (($79) + 4)|0; - $82 = $81; - HEAP32[$82>>2] = $78; - $83 = $0; - $84 = $83; - HEAP32[$84>>2] = 0; - $85 = (($83) + 4)|0; - $86 = $85; - HEAP32[$86>>2] = 0; - $87 = $output; - $88 = $87; - $89 = HEAP32[$88>>2]|0; - $90 = (($87) + 4)|0; - $91 = $90; - $92 = HEAP32[$91>>2]|0; - $93 = (_div_by_2_26($89,$92)|0); - $94 = tempRet0; - $95 = (_bitshift64Shl(($93|0),($94|0),26)|0); - $96 = tempRet0; - $97 = (_i64Subtract(($89|0),($92|0),($95|0),($96|0))|0); - $98 = tempRet0; - $99 = $output; - $100 = $99; - HEAP32[$100>>2] = $97; - $101 = (($99) + 4)|0; - $102 = $101; - HEAP32[$102>>2] = $98; - $103 = (($output) + 8|0); - $104 = $103; - $105 = $104; - $106 = HEAP32[$105>>2]|0; - $107 = (($104) + 4)|0; - $108 = $107; - $109 = HEAP32[$108>>2]|0; - $110 = (_i64Add(($106|0),($109|0),($93|0),($94|0))|0); - $111 = tempRet0; - $112 = $103; - $113 = $112; - HEAP32[$113>>2] = $110; - $114 = (($112) + 4)|0; - $115 = $114; - HEAP32[$115>>2] = $111; - STACKTOP = sp;return; -} -function _s32_eq($a,$b) { - $a = $a|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $a ^ -1; - $1 = $0 ^ $b; - $2 = $1 << 16; - $3 = $2 & $1; - $4 = $3 << 8; - $5 = $4 & $3; - $6 = $5 << 4; - $7 = $6 & $5; - $8 = $7 << 2; - $9 = $8 & $7; - $10 = $9 << 1; - $11 = $10 & $9; - $12 = $11 >> 31; - STACKTOP = sp;return ($12|0); -} -function _s32_gte($a) { - $a = $a|0; - var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($a) + -67108845)|0; - $1 = $0 >> 31; - $2 = $1 ^ -1; - STACKTOP = sp;return ($2|0); -} -function _fsum($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $output; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = $in; - $7 = $6; - $8 = HEAP32[$7>>2]|0; - $9 = (($6) + 4)|0; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (_i64Add(($8|0),($11|0),($2|0),($5|0))|0); - $13 = tempRet0; - $14 = $output; - $15 = $14; - HEAP32[$15>>2] = $12; - $16 = (($14) + 4)|0; - $17 = $16; - HEAP32[$17>>2] = $13; - $18 = (($output) + 8|0); - $19 = $18; - $20 = $19; - $21 = HEAP32[$20>>2]|0; - $22 = (($19) + 4)|0; - $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($in) + 8|0); - $26 = $25; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (($26) + 4)|0; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (_i64Add(($28|0),($31|0),($21|0),($24|0))|0); - $33 = tempRet0; - $34 = $18; - $35 = $34; - HEAP32[$35>>2] = $32; - $36 = (($34) + 4)|0; - $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($output) + 16|0); - $39 = $38; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (($39) + 4)|0; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($in) + 16|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_i64Add(($48|0),($51|0),($41|0),($44|0))|0); - $53 = tempRet0; - $54 = $38; - $55 = $54; - HEAP32[$55>>2] = $52; - $56 = (($54) + 4)|0; - $57 = $56; - HEAP32[$57>>2] = $53; - $58 = (($output) + 24|0); - $59 = $58; - $60 = $59; - $61 = HEAP32[$60>>2]|0; - $62 = (($59) + 4)|0; - $63 = $62; - $64 = HEAP32[$63>>2]|0; - $65 = (($in) + 24|0); - $66 = $65; - $67 = $66; - $68 = HEAP32[$67>>2]|0; - $69 = (($66) + 4)|0; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (_i64Add(($68|0),($71|0),($61|0),($64|0))|0); - $73 = tempRet0; - $74 = $58; - $75 = $74; - HEAP32[$75>>2] = $72; - $76 = (($74) + 4)|0; - $77 = $76; - HEAP32[$77>>2] = $73; - $78 = (($output) + 32|0); - $79 = $78; - $80 = $79; - $81 = HEAP32[$80>>2]|0; - $82 = (($79) + 4)|0; - $83 = $82; - $84 = HEAP32[$83>>2]|0; - $85 = (($in) + 32|0); - $86 = $85; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (($86) + 4)|0; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (_i64Add(($88|0),($91|0),($81|0),($84|0))|0); - $93 = tempRet0; - $94 = $78; - $95 = $94; - HEAP32[$95>>2] = $92; - $96 = (($94) + 4)|0; - $97 = $96; - HEAP32[$97>>2] = $93; - $98 = (($output) + 40|0); - $99 = $98; - $100 = $99; - $101 = HEAP32[$100>>2]|0; - $102 = (($99) + 4)|0; - $103 = $102; - $104 = HEAP32[$103>>2]|0; - $105 = (($in) + 40|0); - $106 = $105; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (($106) + 4)|0; - $110 = $109; - $111 = HEAP32[$110>>2]|0; - $112 = (_i64Add(($108|0),($111|0),($101|0),($104|0))|0); - $113 = tempRet0; - $114 = $98; - $115 = $114; - HEAP32[$115>>2] = $112; - $116 = (($114) + 4)|0; - $117 = $116; - HEAP32[$117>>2] = $113; - $118 = (($output) + 48|0); - $119 = $118; - $120 = $119; - $121 = HEAP32[$120>>2]|0; - $122 = (($119) + 4)|0; - $123 = $122; - $124 = HEAP32[$123>>2]|0; - $125 = (($in) + 48|0); - $126 = $125; - $127 = $126; - $128 = HEAP32[$127>>2]|0; - $129 = (($126) + 4)|0; - $130 = $129; - $131 = HEAP32[$130>>2]|0; - $132 = (_i64Add(($128|0),($131|0),($121|0),($124|0))|0); - $133 = tempRet0; - $134 = $118; - $135 = $134; - HEAP32[$135>>2] = $132; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $133; - $138 = (($output) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = (($in) + 56|0); - $146 = $145; - $147 = $146; - $148 = HEAP32[$147>>2]|0; - $149 = (($146) + 4)|0; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (_i64Add(($148|0),($151|0),($141|0),($144|0))|0); - $153 = tempRet0; - $154 = $138; - $155 = $154; - HEAP32[$155>>2] = $152; - $156 = (($154) + 4)|0; - $157 = $156; - HEAP32[$157>>2] = $153; - $158 = (($output) + 64|0); - $159 = $158; - $160 = $159; - $161 = HEAP32[$160>>2]|0; - $162 = (($159) + 4)|0; - $163 = $162; - $164 = HEAP32[$163>>2]|0; - $165 = (($in) + 64|0); - $166 = $165; - $167 = $166; - $168 = HEAP32[$167>>2]|0; - $169 = (($166) + 4)|0; - $170 = $169; - $171 = HEAP32[$170>>2]|0; - $172 = (_i64Add(($168|0),($171|0),($161|0),($164|0))|0); - $173 = tempRet0; - $174 = $158; - $175 = $174; - HEAP32[$175>>2] = $172; - $176 = (($174) + 4)|0; - $177 = $176; - HEAP32[$177>>2] = $173; - $178 = (($output) + 72|0); - $179 = $178; - $180 = $179; - $181 = HEAP32[$180>>2]|0; - $182 = (($179) + 4)|0; - $183 = $182; - $184 = HEAP32[$183>>2]|0; - $185 = (($in) + 72|0); - $186 = $185; - $187 = $186; - $188 = HEAP32[$187>>2]|0; - $189 = (($186) + 4)|0; - $190 = $189; - $191 = HEAP32[$190>>2]|0; - $192 = (_i64Add(($188|0),($191|0),($181|0),($184|0))|0); - $193 = tempRet0; - $194 = $178; - $195 = $194; - HEAP32[$195>>2] = $192; - $196 = (($194) + 4)|0; - $197 = $196; - HEAP32[$197>>2] = $193; - STACKTOP = sp;return; -} -function _fdifference($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = $output; - $7 = $6; - $8 = HEAP32[$7>>2]|0; - $9 = (($6) + 4)|0; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (_i64Subtract(($2|0),($5|0),($8|0),($11|0))|0); - $13 = tempRet0; - $14 = $output; - $15 = $14; - HEAP32[$15>>2] = $12; - $16 = (($14) + 4)|0; - $17 = $16; - HEAP32[$17>>2] = $13; - $18 = (($in) + 8|0); - $19 = $18; - $20 = $19; - $21 = HEAP32[$20>>2]|0; - $22 = (($19) + 4)|0; - $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($output) + 8|0); - $26 = $25; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (($26) + 4)|0; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (_i64Subtract(($21|0),($24|0),($28|0),($31|0))|0); - $33 = tempRet0; - $34 = $25; - $35 = $34; - HEAP32[$35>>2] = $32; - $36 = (($34) + 4)|0; - $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($in) + 16|0); - $39 = $38; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (($39) + 4)|0; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($output) + 16|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_i64Subtract(($41|0),($44|0),($48|0),($51|0))|0); - $53 = tempRet0; - $54 = $45; - $55 = $54; - HEAP32[$55>>2] = $52; - $56 = (($54) + 4)|0; - $57 = $56; - HEAP32[$57>>2] = $53; - $58 = (($in) + 24|0); - $59 = $58; - $60 = $59; - $61 = HEAP32[$60>>2]|0; - $62 = (($59) + 4)|0; - $63 = $62; - $64 = HEAP32[$63>>2]|0; - $65 = (($output) + 24|0); - $66 = $65; - $67 = $66; - $68 = HEAP32[$67>>2]|0; - $69 = (($66) + 4)|0; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (_i64Subtract(($61|0),($64|0),($68|0),($71|0))|0); - $73 = tempRet0; - $74 = $65; - $75 = $74; - HEAP32[$75>>2] = $72; - $76 = (($74) + 4)|0; - $77 = $76; - HEAP32[$77>>2] = $73; - $78 = (($in) + 32|0); - $79 = $78; - $80 = $79; - $81 = HEAP32[$80>>2]|0; - $82 = (($79) + 4)|0; - $83 = $82; - $84 = HEAP32[$83>>2]|0; - $85 = (($output) + 32|0); - $86 = $85; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (($86) + 4)|0; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (_i64Subtract(($81|0),($84|0),($88|0),($91|0))|0); - $93 = tempRet0; - $94 = $85; - $95 = $94; - HEAP32[$95>>2] = $92; - $96 = (($94) + 4)|0; - $97 = $96; - HEAP32[$97>>2] = $93; - $98 = (($in) + 40|0); - $99 = $98; - $100 = $99; - $101 = HEAP32[$100>>2]|0; - $102 = (($99) + 4)|0; - $103 = $102; - $104 = HEAP32[$103>>2]|0; - $105 = (($output) + 40|0); - $106 = $105; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (($106) + 4)|0; - $110 = $109; - $111 = HEAP32[$110>>2]|0; - $112 = (_i64Subtract(($101|0),($104|0),($108|0),($111|0))|0); - $113 = tempRet0; - $114 = $105; - $115 = $114; - HEAP32[$115>>2] = $112; - $116 = (($114) + 4)|0; - $117 = $116; - HEAP32[$117>>2] = $113; - $118 = (($in) + 48|0); - $119 = $118; - $120 = $119; - $121 = HEAP32[$120>>2]|0; - $122 = (($119) + 4)|0; - $123 = $122; - $124 = HEAP32[$123>>2]|0; - $125 = (($output) + 48|0); - $126 = $125; - $127 = $126; - $128 = HEAP32[$127>>2]|0; - $129 = (($126) + 4)|0; - $130 = $129; - $131 = HEAP32[$130>>2]|0; - $132 = (_i64Subtract(($121|0),($124|0),($128|0),($131|0))|0); - $133 = tempRet0; - $134 = $125; - $135 = $134; - HEAP32[$135>>2] = $132; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $133; - $138 = (($in) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = (($output) + 56|0); - $146 = $145; - $147 = $146; - $148 = HEAP32[$147>>2]|0; - $149 = (($146) + 4)|0; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (_i64Subtract(($141|0),($144|0),($148|0),($151|0))|0); - $153 = tempRet0; - $154 = $145; - $155 = $154; - HEAP32[$155>>2] = $152; - $156 = (($154) + 4)|0; - $157 = $156; - HEAP32[$157>>2] = $153; - $158 = (($in) + 64|0); - $159 = $158; - $160 = $159; - $161 = HEAP32[$160>>2]|0; - $162 = (($159) + 4)|0; - $163 = $162; - $164 = HEAP32[$163>>2]|0; - $165 = (($output) + 64|0); - $166 = $165; - $167 = $166; - $168 = HEAP32[$167>>2]|0; - $169 = (($166) + 4)|0; - $170 = $169; - $171 = HEAP32[$170>>2]|0; - $172 = (_i64Subtract(($161|0),($164|0),($168|0),($171|0))|0); - $173 = tempRet0; - $174 = $165; - $175 = $174; - HEAP32[$175>>2] = $172; - $176 = (($174) + 4)|0; - $177 = $176; - HEAP32[$177>>2] = $173; - $178 = (($in) + 72|0); - $179 = $178; - $180 = $179; - $181 = HEAP32[$180>>2]|0; - $182 = (($179) + 4)|0; - $183 = $182; - $184 = HEAP32[$183>>2]|0; - $185 = (($output) + 72|0); - $186 = $185; - $187 = $186; - $188 = HEAP32[$187>>2]|0; - $189 = (($186) + 4)|0; - $190 = $189; - $191 = HEAP32[$190>>2]|0; - $192 = (_i64Subtract(($181|0),($184|0),($188|0),($191|0))|0); - $193 = tempRet0; - $194 = $185; - $195 = $194; - HEAP32[$195>>2] = $192; - $196 = (($194) + 4)|0; - $197 = $196; - HEAP32[$197>>2] = $193; - STACKTOP = sp;return; -} -function _fscalar_product($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = (___muldi3(($2|0),($5|0),121665,0)|0); - $7 = tempRet0; - $8 = $output; - $9 = $8; - HEAP32[$9>>2] = $6; - $10 = (($8) + 4)|0; - $11 = $10; - HEAP32[$11>>2] = $7; - $12 = (($in) + 8|0); - $13 = $12; - $14 = $13; - $15 = HEAP32[$14>>2]|0; - $16 = (($13) + 4)|0; - $17 = $16; - $18 = HEAP32[$17>>2]|0; - $19 = (___muldi3(($15|0),($18|0),121665,0)|0); - $20 = tempRet0; - $21 = (($output) + 8|0); - $22 = $21; - $23 = $22; - HEAP32[$23>>2] = $19; - $24 = (($22) + 4)|0; - $25 = $24; - HEAP32[$25>>2] = $20; - $26 = (($in) + 16|0); - $27 = $26; - $28 = $27; - $29 = HEAP32[$28>>2]|0; - $30 = (($27) + 4)|0; - $31 = $30; - $32 = HEAP32[$31>>2]|0; - $33 = (___muldi3(($29|0),($32|0),121665,0)|0); - $34 = tempRet0; - $35 = (($output) + 16|0); - $36 = $35; - $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($36) + 4)|0; - $39 = $38; - HEAP32[$39>>2] = $34; - $40 = (($in) + 24|0); - $41 = $40; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (($41) + 4)|0; - $45 = $44; - $46 = HEAP32[$45>>2]|0; - $47 = (___muldi3(($43|0),($46|0),121665,0)|0); - $48 = tempRet0; - $49 = (($output) + 24|0); - $50 = $49; - $51 = $50; - HEAP32[$51>>2] = $47; - $52 = (($50) + 4)|0; - $53 = $52; - HEAP32[$53>>2] = $48; - $54 = (($in) + 32|0); - $55 = $54; - $56 = $55; - $57 = HEAP32[$56>>2]|0; - $58 = (($55) + 4)|0; - $59 = $58; - $60 = HEAP32[$59>>2]|0; - $61 = (___muldi3(($57|0),($60|0),121665,0)|0); - $62 = tempRet0; - $63 = (($output) + 32|0); - $64 = $63; - $65 = $64; - HEAP32[$65>>2] = $61; - $66 = (($64) + 4)|0; - $67 = $66; - HEAP32[$67>>2] = $62; - $68 = (($in) + 40|0); - $69 = $68; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (($69) + 4)|0; - $73 = $72; - $74 = HEAP32[$73>>2]|0; - $75 = (___muldi3(($71|0),($74|0),121665,0)|0); - $76 = tempRet0; - $77 = (($output) + 40|0); - $78 = $77; - $79 = $78; - HEAP32[$79>>2] = $75; - $80 = (($78) + 4)|0; - $81 = $80; - HEAP32[$81>>2] = $76; - $82 = (($in) + 48|0); - $83 = $82; - $84 = $83; - $85 = HEAP32[$84>>2]|0; - $86 = (($83) + 4)|0; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (___muldi3(($85|0),($88|0),121665,0)|0); - $90 = tempRet0; - $91 = (($output) + 48|0); - $92 = $91; - $93 = $92; - HEAP32[$93>>2] = $89; - $94 = (($92) + 4)|0; - $95 = $94; - HEAP32[$95>>2] = $90; - $96 = (($in) + 56|0); - $97 = $96; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (($97) + 4)|0; - $101 = $100; - $102 = HEAP32[$101>>2]|0; - $103 = (___muldi3(($99|0),($102|0),121665,0)|0); - $104 = tempRet0; - $105 = (($output) + 56|0); - $106 = $105; - $107 = $106; - HEAP32[$107>>2] = $103; - $108 = (($106) + 4)|0; - $109 = $108; - HEAP32[$109>>2] = $104; - $110 = (($in) + 64|0); - $111 = $110; - $112 = $111; - $113 = HEAP32[$112>>2]|0; - $114 = (($111) + 4)|0; - $115 = $114; - $116 = HEAP32[$115>>2]|0; - $117 = (___muldi3(($113|0),($116|0),121665,0)|0); - $118 = tempRet0; - $119 = (($output) + 64|0); - $120 = $119; - $121 = $120; - HEAP32[$121>>2] = $117; - $122 = (($120) + 4)|0; - $123 = $122; - HEAP32[$123>>2] = $118; - $124 = (($in) + 72|0); - $125 = $124; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (($125) + 4)|0; - $129 = $128; - $130 = HEAP32[$129>>2]|0; - $131 = (___muldi3(($127|0),($130|0),121665,0)|0); - $132 = tempRet0; - $133 = (($output) + 72|0); - $134 = $133; - $135 = $134; - HEAP32[$135>>2] = $131; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $132; - STACKTOP = sp;return; -} -function _fsquare_inner($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; - var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; - var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; - var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; - var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; - var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; - var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; - var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; - var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; - var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; - var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; - var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; - var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; - var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; - var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; - var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; - var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; - var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; - var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; - var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; - var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; - var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; - var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; - var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; - var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; - var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; - var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; - var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; - var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; - var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; - var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; - var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; - var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; - var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; - var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; - var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; - var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; - var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; - var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; - var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; - var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; - var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; - var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; - var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; - var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; - var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; - var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; - var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; - var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; - var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; - var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; - var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; - var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; - var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; - var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; - var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = (_bitshift64Ashr(0,($2|0),32)|0); - $7 = tempRet0; - $8 = (___muldi3(($6|0),($7|0),($6|0),($7|0))|0); - $9 = tempRet0; - $10 = $output; - $11 = $10; - HEAP32[$11>>2] = $8; - $12 = (($10) + 4)|0; - $13 = $12; - HEAP32[$13>>2] = $9; - $14 = $in; - $15 = $14; - $16 = HEAP32[$15>>2]|0; - $17 = (($14) + 4)|0; - $18 = $17; - $19 = HEAP32[$18>>2]|0; - $20 = (_bitshift64Ashr(0,($16|0),31)|0); - $21 = tempRet0; - $22 = (($in) + 8|0); - $23 = $22; - $24 = $23; - $25 = HEAP32[$24>>2]|0; - $26 = (($23) + 4)|0; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (_bitshift64Ashr(0,($25|0),32)|0); - $30 = tempRet0; - $31 = (___muldi3(($29|0),($30|0),($20|0),($21|0))|0); - $32 = tempRet0; - $33 = (($output) + 8|0); - $34 = $33; - $35 = $34; - HEAP32[$35>>2] = $31; - $36 = (($34) + 4)|0; - $37 = $36; - HEAP32[$37>>2] = $32; - $38 = $22; - $39 = $38; - $40 = HEAP32[$39>>2]|0; - $41 = (($38) + 4)|0; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (_bitshift64Ashr(0,($40|0),32)|0); - $45 = tempRet0; - $46 = (___muldi3(($44|0),($45|0),($44|0),($45|0))|0); - $47 = tempRet0; - $48 = $in; - $49 = $48; - $50 = HEAP32[$49>>2]|0; - $51 = (($48) + 4)|0; - $52 = $51; - $53 = HEAP32[$52>>2]|0; - $54 = (_bitshift64Ashr(0,($50|0),32)|0); - $55 = tempRet0; - $56 = (($in) + 16|0); - $57 = $56; - $58 = $57; - $59 = HEAP32[$58>>2]|0; - $60 = (($57) + 4)|0; - $61 = $60; - $62 = HEAP32[$61>>2]|0; - $63 = (_bitshift64Ashr(0,($59|0),32)|0); - $64 = tempRet0; - $65 = (___muldi3(($63|0),($64|0),($54|0),($55|0))|0); - $66 = tempRet0; - $67 = (_i64Add(($65|0),($66|0),($46|0),($47|0))|0); - $68 = tempRet0; - $69 = (_bitshift64Shl(($67|0),($68|0),1)|0); - $70 = tempRet0; - $71 = (($output) + 16|0); - $72 = $71; - $73 = $72; - HEAP32[$73>>2] = $69; - $74 = (($72) + 4)|0; - $75 = $74; - HEAP32[$75>>2] = $70; - $76 = $22; - $77 = $76; - $78 = HEAP32[$77>>2]|0; - $79 = (($76) + 4)|0; - $80 = $79; - $81 = HEAP32[$80>>2]|0; - $82 = (_bitshift64Ashr(0,($78|0),32)|0); - $83 = tempRet0; - $84 = $56; - $85 = $84; - $86 = HEAP32[$85>>2]|0; - $87 = (($84) + 4)|0; - $88 = $87; - $89 = HEAP32[$88>>2]|0; - $90 = (_bitshift64Ashr(0,($86|0),32)|0); - $91 = tempRet0; - $92 = (___muldi3(($90|0),($91|0),($82|0),($83|0))|0); - $93 = tempRet0; - $94 = $in; - $95 = $94; - $96 = HEAP32[$95>>2]|0; - $97 = (($94) + 4)|0; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (_bitshift64Ashr(0,($96|0),32)|0); - $101 = tempRet0; - $102 = (($in) + 24|0); - $103 = $102; - $104 = $103; - $105 = HEAP32[$104>>2]|0; - $106 = (($103) + 4)|0; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (_bitshift64Ashr(0,($105|0),32)|0); - $110 = tempRet0; - $111 = (___muldi3(($109|0),($110|0),($100|0),($101|0))|0); - $112 = tempRet0; - $113 = (_i64Add(($111|0),($112|0),($92|0),($93|0))|0); - $114 = tempRet0; - $115 = (_bitshift64Shl(($113|0),($114|0),1)|0); - $116 = tempRet0; - $117 = (($output) + 24|0); - $118 = $117; - $119 = $118; - HEAP32[$119>>2] = $115; - $120 = (($118) + 4)|0; - $121 = $120; - HEAP32[$121>>2] = $116; - $122 = $56; - $123 = $122; - $124 = HEAP32[$123>>2]|0; - $125 = (($122) + 4)|0; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (_bitshift64Ashr(0,($124|0),32)|0); - $129 = tempRet0; - $130 = (___muldi3(($128|0),($129|0),($128|0),($129|0))|0); - $131 = tempRet0; - $132 = $22; - $133 = $132; - $134 = HEAP32[$133>>2]|0; - $135 = (($132) + 4)|0; - $136 = $135; - $137 = HEAP32[$136>>2]|0; - $138 = (_bitshift64Ashr(0,($134|0),30)|0); - $139 = tempRet0; - $140 = $102; - $141 = $140; - $142 = HEAP32[$141>>2]|0; - $143 = (($140) + 4)|0; - $144 = $143; - $145 = HEAP32[$144>>2]|0; - $146 = (_bitshift64Ashr(0,($142|0),32)|0); - $147 = tempRet0; - $148 = (___muldi3(($146|0),($147|0),($138|0),($139|0))|0); - $149 = tempRet0; - $150 = (_i64Add(($148|0),($149|0),($130|0),($131|0))|0); - $151 = tempRet0; - $152 = $in; - $153 = $152; - $154 = HEAP32[$153>>2]|0; - $155 = (($152) + 4)|0; - $156 = $155; - $157 = HEAP32[$156>>2]|0; - $158 = (_bitshift64Ashr(0,($154|0),31)|0); - $159 = tempRet0; - $160 = (($in) + 32|0); - $161 = $160; - $162 = $161; - $163 = HEAP32[$162>>2]|0; - $164 = (($161) + 4)|0; - $165 = $164; - $166 = HEAP32[$165>>2]|0; - $167 = (_bitshift64Ashr(0,($163|0),32)|0); - $168 = tempRet0; - $169 = (___muldi3(($167|0),($168|0),($158|0),($159|0))|0); - $170 = tempRet0; - $171 = (_i64Add(($150|0),($151|0),($169|0),($170|0))|0); - $172 = tempRet0; - $173 = (($output) + 32|0); - $174 = $173; - $175 = $174; - HEAP32[$175>>2] = $171; - $176 = (($174) + 4)|0; - $177 = $176; - HEAP32[$177>>2] = $172; - $178 = $56; - $179 = $178; - $180 = HEAP32[$179>>2]|0; - $181 = (($178) + 4)|0; - $182 = $181; - $183 = HEAP32[$182>>2]|0; - $184 = (_bitshift64Ashr(0,($180|0),32)|0); - $185 = tempRet0; - $186 = $102; - $187 = $186; - $188 = HEAP32[$187>>2]|0; - $189 = (($186) + 4)|0; - $190 = $189; - $191 = HEAP32[$190>>2]|0; - $192 = (_bitshift64Ashr(0,($188|0),32)|0); - $193 = tempRet0; - $194 = (___muldi3(($192|0),($193|0),($184|0),($185|0))|0); - $195 = tempRet0; - $196 = $22; - $197 = $196; - $198 = HEAP32[$197>>2]|0; - $199 = (($196) + 4)|0; - $200 = $199; - $201 = HEAP32[$200>>2]|0; - $202 = (_bitshift64Ashr(0,($198|0),32)|0); - $203 = tempRet0; - $204 = $160; - $205 = $204; - $206 = HEAP32[$205>>2]|0; - $207 = (($204) + 4)|0; - $208 = $207; - $209 = HEAP32[$208>>2]|0; - $210 = (_bitshift64Ashr(0,($206|0),32)|0); - $211 = tempRet0; - $212 = (___muldi3(($210|0),($211|0),($202|0),($203|0))|0); - $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($194|0),($195|0))|0); - $215 = tempRet0; - $216 = $in; - $217 = $216; - $218 = HEAP32[$217>>2]|0; - $219 = (($216) + 4)|0; - $220 = $219; - $221 = HEAP32[$220>>2]|0; - $222 = (_bitshift64Ashr(0,($218|0),32)|0); - $223 = tempRet0; - $224 = (($in) + 40|0); - $225 = $224; - $226 = $225; - $227 = HEAP32[$226>>2]|0; - $228 = (($225) + 4)|0; - $229 = $228; - $230 = HEAP32[$229>>2]|0; - $231 = (_bitshift64Ashr(0,($227|0),32)|0); - $232 = tempRet0; - $233 = (___muldi3(($231|0),($232|0),($222|0),($223|0))|0); - $234 = tempRet0; - $235 = (_i64Add(($214|0),($215|0),($233|0),($234|0))|0); - $236 = tempRet0; - $237 = (_bitshift64Shl(($235|0),($236|0),1)|0); - $238 = tempRet0; - $239 = (($output) + 40|0); - $240 = $239; - $241 = $240; - HEAP32[$241>>2] = $237; - $242 = (($240) + 4)|0; - $243 = $242; - HEAP32[$243>>2] = $238; - $244 = $102; - $245 = $244; - $246 = HEAP32[$245>>2]|0; - $247 = (($244) + 4)|0; - $248 = $247; - $249 = HEAP32[$248>>2]|0; - $250 = (_bitshift64Ashr(0,($246|0),32)|0); - $251 = tempRet0; - $252 = (___muldi3(($250|0),($251|0),($250|0),($251|0))|0); - $253 = tempRet0; - $254 = $56; - $255 = $254; - $256 = HEAP32[$255>>2]|0; - $257 = (($254) + 4)|0; - $258 = $257; - $259 = HEAP32[$258>>2]|0; - $260 = (_bitshift64Ashr(0,($256|0),32)|0); - $261 = tempRet0; - $262 = $160; - $263 = $262; - $264 = HEAP32[$263>>2]|0; - $265 = (($262) + 4)|0; - $266 = $265; - $267 = HEAP32[$266>>2]|0; - $268 = (_bitshift64Ashr(0,($264|0),32)|0); - $269 = tempRet0; - $270 = (___muldi3(($268|0),($269|0),($260|0),($261|0))|0); - $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($252|0),($253|0))|0); - $273 = tempRet0; - $274 = $in; - $275 = $274; - $276 = HEAP32[$275>>2]|0; - $277 = (($274) + 4)|0; - $278 = $277; - $279 = HEAP32[$278>>2]|0; - $280 = (_bitshift64Ashr(0,($276|0),32)|0); - $281 = tempRet0; - $282 = (($in) + 48|0); - $283 = $282; - $284 = $283; - $285 = HEAP32[$284>>2]|0; - $286 = (($283) + 4)|0; - $287 = $286; - $288 = HEAP32[$287>>2]|0; - $289 = (_bitshift64Ashr(0,($285|0),32)|0); - $290 = tempRet0; - $291 = (___muldi3(($289|0),($290|0),($280|0),($281|0))|0); - $292 = tempRet0; - $293 = (_i64Add(($272|0),($273|0),($291|0),($292|0))|0); - $294 = tempRet0; - $295 = $22; - $296 = $295; - $297 = HEAP32[$296>>2]|0; - $298 = (($295) + 4)|0; - $299 = $298; - $300 = HEAP32[$299>>2]|0; - $301 = (_bitshift64Ashr(0,($297|0),31)|0); - $302 = tempRet0; - $303 = $224; - $304 = $303; - $305 = HEAP32[$304>>2]|0; - $306 = (($303) + 4)|0; - $307 = $306; - $308 = HEAP32[$307>>2]|0; - $309 = (_bitshift64Ashr(0,($305|0),32)|0); - $310 = tempRet0; - $311 = (___muldi3(($309|0),($310|0),($301|0),($302|0))|0); - $312 = tempRet0; - $313 = (_i64Add(($293|0),($294|0),($311|0),($312|0))|0); - $314 = tempRet0; - $315 = (_bitshift64Shl(($313|0),($314|0),1)|0); - $316 = tempRet0; - $317 = (($output) + 48|0); - $318 = $317; - $319 = $318; - HEAP32[$319>>2] = $315; - $320 = (($318) + 4)|0; - $321 = $320; - HEAP32[$321>>2] = $316; - $322 = $102; - $323 = $322; - $324 = HEAP32[$323>>2]|0; - $325 = (($322) + 4)|0; - $326 = $325; - $327 = HEAP32[$326>>2]|0; - $328 = (_bitshift64Ashr(0,($324|0),32)|0); - $329 = tempRet0; - $330 = $160; - $331 = $330; - $332 = HEAP32[$331>>2]|0; - $333 = (($330) + 4)|0; - $334 = $333; - $335 = HEAP32[$334>>2]|0; - $336 = (_bitshift64Ashr(0,($332|0),32)|0); - $337 = tempRet0; - $338 = (___muldi3(($336|0),($337|0),($328|0),($329|0))|0); - $339 = tempRet0; - $340 = $56; - $341 = $340; - $342 = HEAP32[$341>>2]|0; - $343 = (($340) + 4)|0; - $344 = $343; - $345 = HEAP32[$344>>2]|0; - $346 = (_bitshift64Ashr(0,($342|0),32)|0); - $347 = tempRet0; - $348 = $224; - $349 = $348; - $350 = HEAP32[$349>>2]|0; - $351 = (($348) + 4)|0; - $352 = $351; - $353 = HEAP32[$352>>2]|0; - $354 = (_bitshift64Ashr(0,($350|0),32)|0); - $355 = tempRet0; - $356 = (___muldi3(($354|0),($355|0),($346|0),($347|0))|0); - $357 = tempRet0; - $358 = (_i64Add(($356|0),($357|0),($338|0),($339|0))|0); - $359 = tempRet0; - $360 = $22; - $361 = $360; - $362 = HEAP32[$361>>2]|0; - $363 = (($360) + 4)|0; - $364 = $363; - $365 = HEAP32[$364>>2]|0; - $366 = (_bitshift64Ashr(0,($362|0),32)|0); - $367 = tempRet0; - $368 = $282; - $369 = $368; - $370 = HEAP32[$369>>2]|0; - $371 = (($368) + 4)|0; - $372 = $371; - $373 = HEAP32[$372>>2]|0; - $374 = (_bitshift64Ashr(0,($370|0),32)|0); - $375 = tempRet0; - $376 = (___muldi3(($374|0),($375|0),($366|0),($367|0))|0); - $377 = tempRet0; - $378 = (_i64Add(($358|0),($359|0),($376|0),($377|0))|0); - $379 = tempRet0; - $380 = $in; - $381 = $380; - $382 = HEAP32[$381>>2]|0; - $383 = (($380) + 4)|0; - $384 = $383; - $385 = HEAP32[$384>>2]|0; - $386 = (_bitshift64Ashr(0,($382|0),32)|0); - $387 = tempRet0; - $388 = (($in) + 56|0); - $389 = $388; - $390 = $389; - $391 = HEAP32[$390>>2]|0; - $392 = (($389) + 4)|0; - $393 = $392; - $394 = HEAP32[$393>>2]|0; - $395 = (_bitshift64Ashr(0,($391|0),32)|0); - $396 = tempRet0; - $397 = (___muldi3(($395|0),($396|0),($386|0),($387|0))|0); - $398 = tempRet0; - $399 = (_i64Add(($378|0),($379|0),($397|0),($398|0))|0); - $400 = tempRet0; - $401 = (_bitshift64Shl(($399|0),($400|0),1)|0); - $402 = tempRet0; - $403 = (($output) + 56|0); - $404 = $403; - $405 = $404; - HEAP32[$405>>2] = $401; - $406 = (($404) + 4)|0; - $407 = $406; - HEAP32[$407>>2] = $402; - $408 = $160; - $409 = $408; - $410 = HEAP32[$409>>2]|0; - $411 = (($408) + 4)|0; - $412 = $411; - $413 = HEAP32[$412>>2]|0; - $414 = (_bitshift64Ashr(0,($410|0),32)|0); - $415 = tempRet0; - $416 = (___muldi3(($414|0),($415|0),($414|0),($415|0))|0); - $417 = tempRet0; - $418 = $56; - $419 = $418; - $420 = HEAP32[$419>>2]|0; - $421 = (($418) + 4)|0; - $422 = $421; - $423 = HEAP32[$422>>2]|0; - $424 = (_bitshift64Ashr(0,($420|0),32)|0); - $425 = tempRet0; - $426 = $282; - $427 = $426; - $428 = HEAP32[$427>>2]|0; - $429 = (($426) + 4)|0; - $430 = $429; - $431 = HEAP32[$430>>2]|0; - $432 = (_bitshift64Ashr(0,($428|0),32)|0); - $433 = tempRet0; - $434 = (___muldi3(($432|0),($433|0),($424|0),($425|0))|0); - $435 = tempRet0; - $436 = $in; - $437 = $436; - $438 = HEAP32[$437>>2]|0; - $439 = (($436) + 4)|0; - $440 = $439; - $441 = HEAP32[$440>>2]|0; - $442 = (_bitshift64Ashr(0,($438|0),32)|0); - $443 = tempRet0; - $444 = (($in) + 64|0); - $445 = $444; - $446 = $445; - $447 = HEAP32[$446>>2]|0; - $448 = (($445) + 4)|0; - $449 = $448; - $450 = HEAP32[$449>>2]|0; - $451 = (_bitshift64Ashr(0,($447|0),32)|0); - $452 = tempRet0; - $453 = (___muldi3(($451|0),($452|0),($442|0),($443|0))|0); - $454 = tempRet0; - $455 = (_i64Add(($453|0),($454|0),($434|0),($435|0))|0); - $456 = tempRet0; - $457 = $22; - $458 = $457; - $459 = HEAP32[$458>>2]|0; - $460 = (($457) + 4)|0; - $461 = $460; - $462 = HEAP32[$461>>2]|0; - $463 = (_bitshift64Ashr(0,($459|0),32)|0); - $464 = tempRet0; - $465 = $388; - $466 = $465; - $467 = HEAP32[$466>>2]|0; - $468 = (($465) + 4)|0; - $469 = $468; - $470 = HEAP32[$469>>2]|0; - $471 = (_bitshift64Ashr(0,($467|0),32)|0); - $472 = tempRet0; - $473 = (___muldi3(($471|0),($472|0),($463|0),($464|0))|0); - $474 = tempRet0; - $475 = $102; - $476 = $475; - $477 = HEAP32[$476>>2]|0; - $478 = (($475) + 4)|0; - $479 = $478; - $480 = HEAP32[$479>>2]|0; - $481 = (_bitshift64Ashr(0,($477|0),32)|0); - $482 = tempRet0; - $483 = $224; - $484 = $483; - $485 = HEAP32[$484>>2]|0; - $486 = (($483) + 4)|0; - $487 = $486; - $488 = HEAP32[$487>>2]|0; - $489 = (_bitshift64Ashr(0,($485|0),32)|0); - $490 = tempRet0; - $491 = (___muldi3(($489|0),($490|0),($481|0),($482|0))|0); - $492 = tempRet0; - $493 = (_i64Add(($491|0),($492|0),($473|0),($474|0))|0); - $494 = tempRet0; - $495 = (_bitshift64Shl(($493|0),($494|0),1)|0); - $496 = tempRet0; - $497 = (_i64Add(($455|0),($456|0),($495|0),($496|0))|0); - $498 = tempRet0; - $499 = (_bitshift64Shl(($497|0),($498|0),1)|0); - $500 = tempRet0; - $501 = (_i64Add(($499|0),($500|0),($416|0),($417|0))|0); - $502 = tempRet0; - $503 = (($output) + 64|0); - $504 = $503; - $505 = $504; - HEAP32[$505>>2] = $501; - $506 = (($504) + 4)|0; - $507 = $506; - HEAP32[$507>>2] = $502; - $508 = $160; - $509 = $508; - $510 = HEAP32[$509>>2]|0; - $511 = (($508) + 4)|0; - $512 = $511; - $513 = HEAP32[$512>>2]|0; - $514 = (_bitshift64Ashr(0,($510|0),32)|0); - $515 = tempRet0; - $516 = $224; - $517 = $516; - $518 = HEAP32[$517>>2]|0; - $519 = (($516) + 4)|0; - $520 = $519; - $521 = HEAP32[$520>>2]|0; - $522 = (_bitshift64Ashr(0,($518|0),32)|0); - $523 = tempRet0; - $524 = (___muldi3(($522|0),($523|0),($514|0),($515|0))|0); - $525 = tempRet0; - $526 = $102; - $527 = $526; - $528 = HEAP32[$527>>2]|0; - $529 = (($526) + 4)|0; - $530 = $529; - $531 = HEAP32[$530>>2]|0; - $532 = (_bitshift64Ashr(0,($528|0),32)|0); - $533 = tempRet0; - $534 = $282; - $535 = $534; - $536 = HEAP32[$535>>2]|0; - $537 = (($534) + 4)|0; - $538 = $537; - $539 = HEAP32[$538>>2]|0; - $540 = (_bitshift64Ashr(0,($536|0),32)|0); - $541 = tempRet0; - $542 = (___muldi3(($540|0),($541|0),($532|0),($533|0))|0); - $543 = tempRet0; - $544 = (_i64Add(($542|0),($543|0),($524|0),($525|0))|0); - $545 = tempRet0; - $546 = $56; - $547 = $546; - $548 = HEAP32[$547>>2]|0; - $549 = (($546) + 4)|0; - $550 = $549; - $551 = HEAP32[$550>>2]|0; - $552 = (_bitshift64Ashr(0,($548|0),32)|0); - $553 = tempRet0; - $554 = $388; - $555 = $554; - $556 = HEAP32[$555>>2]|0; - $557 = (($554) + 4)|0; - $558 = $557; - $559 = HEAP32[$558>>2]|0; - $560 = (_bitshift64Ashr(0,($556|0),32)|0); - $561 = tempRet0; - $562 = (___muldi3(($560|0),($561|0),($552|0),($553|0))|0); - $563 = tempRet0; - $564 = (_i64Add(($544|0),($545|0),($562|0),($563|0))|0); - $565 = tempRet0; - $566 = $22; - $567 = $566; - $568 = HEAP32[$567>>2]|0; - $569 = (($566) + 4)|0; - $570 = $569; - $571 = HEAP32[$570>>2]|0; - $572 = (_bitshift64Ashr(0,($568|0),32)|0); - $573 = tempRet0; - $574 = $444; - $575 = $574; - $576 = HEAP32[$575>>2]|0; - $577 = (($574) + 4)|0; - $578 = $577; - $579 = HEAP32[$578>>2]|0; - $580 = (_bitshift64Ashr(0,($576|0),32)|0); - $581 = tempRet0; - $582 = (___muldi3(($580|0),($581|0),($572|0),($573|0))|0); - $583 = tempRet0; - $584 = (_i64Add(($564|0),($565|0),($582|0),($583|0))|0); - $585 = tempRet0; - $586 = $in; - $587 = $586; - $588 = HEAP32[$587>>2]|0; - $589 = (($586) + 4)|0; - $590 = $589; - $591 = HEAP32[$590>>2]|0; - $592 = (_bitshift64Ashr(0,($588|0),32)|0); - $593 = tempRet0; - $594 = (($in) + 72|0); - $595 = $594; - $596 = $595; - $597 = HEAP32[$596>>2]|0; - $598 = (($595) + 4)|0; - $599 = $598; - $600 = HEAP32[$599>>2]|0; - $601 = (_bitshift64Ashr(0,($597|0),32)|0); - $602 = tempRet0; - $603 = (___muldi3(($601|0),($602|0),($592|0),($593|0))|0); - $604 = tempRet0; - $605 = (_i64Add(($584|0),($585|0),($603|0),($604|0))|0); - $606 = tempRet0; - $607 = (_bitshift64Shl(($605|0),($606|0),1)|0); - $608 = tempRet0; - $609 = (($output) + 72|0); - $610 = $609; - $611 = $610; - HEAP32[$611>>2] = $607; - $612 = (($610) + 4)|0; - $613 = $612; - HEAP32[$613>>2] = $608; - $614 = $224; - $615 = $614; - $616 = HEAP32[$615>>2]|0; - $617 = (($614) + 4)|0; - $618 = $617; - $619 = HEAP32[$618>>2]|0; - $620 = (_bitshift64Ashr(0,($616|0),32)|0); - $621 = tempRet0; - $622 = (___muldi3(($620|0),($621|0),($620|0),($621|0))|0); - $623 = tempRet0; - $624 = $160; - $625 = $624; - $626 = HEAP32[$625>>2]|0; - $627 = (($624) + 4)|0; - $628 = $627; - $629 = HEAP32[$628>>2]|0; - $630 = (_bitshift64Ashr(0,($626|0),32)|0); - $631 = tempRet0; - $632 = $282; - $633 = $632; - $634 = HEAP32[$633>>2]|0; - $635 = (($632) + 4)|0; - $636 = $635; - $637 = HEAP32[$636>>2]|0; - $638 = (_bitshift64Ashr(0,($634|0),32)|0); - $639 = tempRet0; - $640 = (___muldi3(($638|0),($639|0),($630|0),($631|0))|0); - $641 = tempRet0; - $642 = (_i64Add(($640|0),($641|0),($622|0),($623|0))|0); - $643 = tempRet0; - $644 = $56; - $645 = $644; - $646 = HEAP32[$645>>2]|0; - $647 = (($644) + 4)|0; - $648 = $647; - $649 = HEAP32[$648>>2]|0; - $650 = (_bitshift64Ashr(0,($646|0),32)|0); - $651 = tempRet0; - $652 = $444; - $653 = $652; - $654 = HEAP32[$653>>2]|0; - $655 = (($652) + 4)|0; - $656 = $655; - $657 = HEAP32[$656>>2]|0; - $658 = (_bitshift64Ashr(0,($654|0),32)|0); - $659 = tempRet0; - $660 = (___muldi3(($658|0),($659|0),($650|0),($651|0))|0); - $661 = tempRet0; - $662 = (_i64Add(($642|0),($643|0),($660|0),($661|0))|0); - $663 = tempRet0; - $664 = $102; - $665 = $664; - $666 = HEAP32[$665>>2]|0; - $667 = (($664) + 4)|0; - $668 = $667; - $669 = HEAP32[$668>>2]|0; - $670 = (_bitshift64Ashr(0,($666|0),32)|0); - $671 = tempRet0; - $672 = $388; - $673 = $672; - $674 = HEAP32[$673>>2]|0; - $675 = (($672) + 4)|0; - $676 = $675; - $677 = HEAP32[$676>>2]|0; - $678 = (_bitshift64Ashr(0,($674|0),32)|0); - $679 = tempRet0; - $680 = (___muldi3(($678|0),($679|0),($670|0),($671|0))|0); - $681 = tempRet0; - $682 = $22; - $683 = $682; - $684 = HEAP32[$683>>2]|0; - $685 = (($682) + 4)|0; - $686 = $685; - $687 = HEAP32[$686>>2]|0; - $688 = (_bitshift64Ashr(0,($684|0),32)|0); - $689 = tempRet0; - $690 = $594; - $691 = $690; - $692 = HEAP32[$691>>2]|0; - $693 = (($690) + 4)|0; - $694 = $693; - $695 = HEAP32[$694>>2]|0; - $696 = (_bitshift64Ashr(0,($692|0),32)|0); - $697 = tempRet0; - $698 = (___muldi3(($696|0),($697|0),($688|0),($689|0))|0); - $699 = tempRet0; - $700 = (_i64Add(($698|0),($699|0),($680|0),($681|0))|0); - $701 = tempRet0; - $702 = (_bitshift64Shl(($700|0),($701|0),1)|0); - $703 = tempRet0; - $704 = (_i64Add(($662|0),($663|0),($702|0),($703|0))|0); - $705 = tempRet0; - $706 = (_bitshift64Shl(($704|0),($705|0),1)|0); - $707 = tempRet0; - $708 = (($output) + 80|0); - $709 = $708; - $710 = $709; - HEAP32[$710>>2] = $706; - $711 = (($709) + 4)|0; - $712 = $711; - HEAP32[$712>>2] = $707; - $713 = $224; - $714 = $713; - $715 = HEAP32[$714>>2]|0; - $716 = (($713) + 4)|0; - $717 = $716; - $718 = HEAP32[$717>>2]|0; - $719 = (_bitshift64Ashr(0,($715|0),32)|0); - $720 = tempRet0; - $721 = $282; - $722 = $721; - $723 = HEAP32[$722>>2]|0; - $724 = (($721) + 4)|0; - $725 = $724; - $726 = HEAP32[$725>>2]|0; - $727 = (_bitshift64Ashr(0,($723|0),32)|0); - $728 = tempRet0; - $729 = (___muldi3(($727|0),($728|0),($719|0),($720|0))|0); - $730 = tempRet0; - $731 = $160; - $732 = $731; - $733 = HEAP32[$732>>2]|0; - $734 = (($731) + 4)|0; - $735 = $734; - $736 = HEAP32[$735>>2]|0; - $737 = (_bitshift64Ashr(0,($733|0),32)|0); - $738 = tempRet0; - $739 = $388; - $740 = $739; - $741 = HEAP32[$740>>2]|0; - $742 = (($739) + 4)|0; - $743 = $742; - $744 = HEAP32[$743>>2]|0; - $745 = (_bitshift64Ashr(0,($741|0),32)|0); - $746 = tempRet0; - $747 = (___muldi3(($745|0),($746|0),($737|0),($738|0))|0); - $748 = tempRet0; - $749 = (_i64Add(($747|0),($748|0),($729|0),($730|0))|0); - $750 = tempRet0; - $751 = $102; - $752 = $751; - $753 = HEAP32[$752>>2]|0; - $754 = (($751) + 4)|0; - $755 = $754; - $756 = HEAP32[$755>>2]|0; - $757 = (_bitshift64Ashr(0,($753|0),32)|0); - $758 = tempRet0; - $759 = $444; - $760 = $759; - $761 = HEAP32[$760>>2]|0; - $762 = (($759) + 4)|0; - $763 = $762; - $764 = HEAP32[$763>>2]|0; - $765 = (_bitshift64Ashr(0,($761|0),32)|0); - $766 = tempRet0; - $767 = (___muldi3(($765|0),($766|0),($757|0),($758|0))|0); - $768 = tempRet0; - $769 = (_i64Add(($749|0),($750|0),($767|0),($768|0))|0); - $770 = tempRet0; - $771 = $56; - $772 = $771; - $773 = HEAP32[$772>>2]|0; - $774 = (($771) + 4)|0; - $775 = $774; - $776 = HEAP32[$775>>2]|0; - $777 = (_bitshift64Ashr(0,($773|0),32)|0); - $778 = tempRet0; - $779 = $594; - $780 = $779; - $781 = HEAP32[$780>>2]|0; - $782 = (($779) + 4)|0; - $783 = $782; - $784 = HEAP32[$783>>2]|0; - $785 = (_bitshift64Ashr(0,($781|0),32)|0); - $786 = tempRet0; - $787 = (___muldi3(($785|0),($786|0),($777|0),($778|0))|0); - $788 = tempRet0; - $789 = (_i64Add(($769|0),($770|0),($787|0),($788|0))|0); - $790 = tempRet0; - $791 = (_bitshift64Shl(($789|0),($790|0),1)|0); - $792 = tempRet0; - $793 = (($output) + 88|0); - $794 = $793; - $795 = $794; - HEAP32[$795>>2] = $791; - $796 = (($794) + 4)|0; - $797 = $796; - HEAP32[$797>>2] = $792; - $798 = $282; - $799 = $798; - $800 = HEAP32[$799>>2]|0; - $801 = (($798) + 4)|0; - $802 = $801; - $803 = HEAP32[$802>>2]|0; - $804 = (_bitshift64Ashr(0,($800|0),32)|0); - $805 = tempRet0; - $806 = (___muldi3(($804|0),($805|0),($804|0),($805|0))|0); - $807 = tempRet0; - $808 = $160; - $809 = $808; - $810 = HEAP32[$809>>2]|0; - $811 = (($808) + 4)|0; - $812 = $811; - $813 = HEAP32[$812>>2]|0; - $814 = (_bitshift64Ashr(0,($810|0),32)|0); - $815 = tempRet0; - $816 = $444; - $817 = $816; - $818 = HEAP32[$817>>2]|0; - $819 = (($816) + 4)|0; - $820 = $819; - $821 = HEAP32[$820>>2]|0; - $822 = (_bitshift64Ashr(0,($818|0),32)|0); - $823 = tempRet0; - $824 = (___muldi3(($822|0),($823|0),($814|0),($815|0))|0); - $825 = tempRet0; - $826 = $224; - $827 = $826; - $828 = HEAP32[$827>>2]|0; - $829 = (($826) + 4)|0; - $830 = $829; - $831 = HEAP32[$830>>2]|0; - $832 = (_bitshift64Ashr(0,($828|0),32)|0); - $833 = tempRet0; - $834 = $388; - $835 = $834; - $836 = HEAP32[$835>>2]|0; - $837 = (($834) + 4)|0; - $838 = $837; - $839 = HEAP32[$838>>2]|0; - $840 = (_bitshift64Ashr(0,($836|0),32)|0); - $841 = tempRet0; - $842 = (___muldi3(($840|0),($841|0),($832|0),($833|0))|0); - $843 = tempRet0; - $844 = $102; - $845 = $844; - $846 = HEAP32[$845>>2]|0; - $847 = (($844) + 4)|0; - $848 = $847; - $849 = HEAP32[$848>>2]|0; - $850 = (_bitshift64Ashr(0,($846|0),32)|0); - $851 = tempRet0; - $852 = $594; - $853 = $852; - $854 = HEAP32[$853>>2]|0; - $855 = (($852) + 4)|0; - $856 = $855; - $857 = HEAP32[$856>>2]|0; - $858 = (_bitshift64Ashr(0,($854|0),32)|0); - $859 = tempRet0; - $860 = (___muldi3(($858|0),($859|0),($850|0),($851|0))|0); - $861 = tempRet0; - $862 = (_i64Add(($860|0),($861|0),($842|0),($843|0))|0); - $863 = tempRet0; - $864 = (_bitshift64Shl(($862|0),($863|0),1)|0); - $865 = tempRet0; - $866 = (_i64Add(($864|0),($865|0),($824|0),($825|0))|0); - $867 = tempRet0; - $868 = (_bitshift64Shl(($866|0),($867|0),1)|0); - $869 = tempRet0; - $870 = (_i64Add(($868|0),($869|0),($806|0),($807|0))|0); - $871 = tempRet0; - $872 = (($output) + 96|0); - $873 = $872; - $874 = $873; - HEAP32[$874>>2] = $870; - $875 = (($873) + 4)|0; - $876 = $875; - HEAP32[$876>>2] = $871; - $877 = $282; - $878 = $877; - $879 = HEAP32[$878>>2]|0; - $880 = (($877) + 4)|0; - $881 = $880; - $882 = HEAP32[$881>>2]|0; - $883 = (_bitshift64Ashr(0,($879|0),32)|0); - $884 = tempRet0; - $885 = $388; - $886 = $885; - $887 = HEAP32[$886>>2]|0; - $888 = (($885) + 4)|0; - $889 = $888; - $890 = HEAP32[$889>>2]|0; - $891 = (_bitshift64Ashr(0,($887|0),32)|0); - $892 = tempRet0; - $893 = (___muldi3(($891|0),($892|0),($883|0),($884|0))|0); - $894 = tempRet0; - $895 = $224; - $896 = $895; - $897 = HEAP32[$896>>2]|0; - $898 = (($895) + 4)|0; - $899 = $898; - $900 = HEAP32[$899>>2]|0; - $901 = (_bitshift64Ashr(0,($897|0),32)|0); - $902 = tempRet0; - $903 = $444; - $904 = $903; - $905 = HEAP32[$904>>2]|0; - $906 = (($903) + 4)|0; - $907 = $906; - $908 = HEAP32[$907>>2]|0; - $909 = (_bitshift64Ashr(0,($905|0),32)|0); - $910 = tempRet0; - $911 = (___muldi3(($909|0),($910|0),($901|0),($902|0))|0); - $912 = tempRet0; - $913 = (_i64Add(($911|0),($912|0),($893|0),($894|0))|0); - $914 = tempRet0; - $915 = $160; - $916 = $915; - $917 = HEAP32[$916>>2]|0; - $918 = (($915) + 4)|0; - $919 = $918; - $920 = HEAP32[$919>>2]|0; - $921 = (_bitshift64Ashr(0,($917|0),32)|0); - $922 = tempRet0; - $923 = $594; - $924 = $923; - $925 = HEAP32[$924>>2]|0; - $926 = (($923) + 4)|0; - $927 = $926; - $928 = HEAP32[$927>>2]|0; - $929 = (_bitshift64Ashr(0,($925|0),32)|0); - $930 = tempRet0; - $931 = (___muldi3(($929|0),($930|0),($921|0),($922|0))|0); - $932 = tempRet0; - $933 = (_i64Add(($913|0),($914|0),($931|0),($932|0))|0); - $934 = tempRet0; - $935 = (_bitshift64Shl(($933|0),($934|0),1)|0); - $936 = tempRet0; - $937 = (($output) + 104|0); - $938 = $937; - $939 = $938; - HEAP32[$939>>2] = $935; - $940 = (($938) + 4)|0; - $941 = $940; - HEAP32[$941>>2] = $936; - $942 = $388; - $943 = $942; - $944 = HEAP32[$943>>2]|0; - $945 = (($942) + 4)|0; - $946 = $945; - $947 = HEAP32[$946>>2]|0; - $948 = (_bitshift64Ashr(0,($944|0),32)|0); - $949 = tempRet0; - $950 = (___muldi3(($948|0),($949|0),($948|0),($949|0))|0); - $951 = tempRet0; - $952 = $282; - $953 = $952; - $954 = HEAP32[$953>>2]|0; - $955 = (($952) + 4)|0; - $956 = $955; - $957 = HEAP32[$956>>2]|0; - $958 = (_bitshift64Ashr(0,($954|0),32)|0); - $959 = tempRet0; - $960 = $444; - $961 = $960; - $962 = HEAP32[$961>>2]|0; - $963 = (($960) + 4)|0; - $964 = $963; - $965 = HEAP32[$964>>2]|0; - $966 = (_bitshift64Ashr(0,($962|0),32)|0); - $967 = tempRet0; - $968 = (___muldi3(($966|0),($967|0),($958|0),($959|0))|0); - $969 = tempRet0; - $970 = (_i64Add(($968|0),($969|0),($950|0),($951|0))|0); - $971 = tempRet0; - $972 = $224; - $973 = $972; - $974 = HEAP32[$973>>2]|0; - $975 = (($972) + 4)|0; - $976 = $975; - $977 = HEAP32[$976>>2]|0; - $978 = (_bitshift64Ashr(0,($974|0),31)|0); - $979 = tempRet0; - $980 = $594; - $981 = $980; - $982 = HEAP32[$981>>2]|0; - $983 = (($980) + 4)|0; - $984 = $983; - $985 = HEAP32[$984>>2]|0; - $986 = (_bitshift64Ashr(0,($982|0),32)|0); - $987 = tempRet0; - $988 = (___muldi3(($986|0),($987|0),($978|0),($979|0))|0); - $989 = tempRet0; - $990 = (_i64Add(($970|0),($971|0),($988|0),($989|0))|0); - $991 = tempRet0; - $992 = (_bitshift64Shl(($990|0),($991|0),1)|0); - $993 = tempRet0; - $994 = (($output) + 112|0); - $995 = $994; - $996 = $995; - HEAP32[$996>>2] = $992; - $997 = (($995) + 4)|0; - $998 = $997; - HEAP32[$998>>2] = $993; - $999 = $388; - $1000 = $999; - $1001 = HEAP32[$1000>>2]|0; - $1002 = (($999) + 4)|0; - $1003 = $1002; - $1004 = HEAP32[$1003>>2]|0; - $1005 = (_bitshift64Ashr(0,($1001|0),32)|0); - $1006 = tempRet0; - $1007 = $444; - $1008 = $1007; - $1009 = HEAP32[$1008>>2]|0; - $1010 = (($1007) + 4)|0; - $1011 = $1010; - $1012 = HEAP32[$1011>>2]|0; - $1013 = (_bitshift64Ashr(0,($1009|0),32)|0); - $1014 = tempRet0; - $1015 = (___muldi3(($1013|0),($1014|0),($1005|0),($1006|0))|0); - $1016 = tempRet0; - $1017 = $282; - $1018 = $1017; - $1019 = HEAP32[$1018>>2]|0; - $1020 = (($1017) + 4)|0; - $1021 = $1020; - $1022 = HEAP32[$1021>>2]|0; - $1023 = (_bitshift64Ashr(0,($1019|0),32)|0); - $1024 = tempRet0; - $1025 = $594; - $1026 = $1025; - $1027 = HEAP32[$1026>>2]|0; - $1028 = (($1025) + 4)|0; - $1029 = $1028; - $1030 = HEAP32[$1029>>2]|0; - $1031 = (_bitshift64Ashr(0,($1027|0),32)|0); - $1032 = tempRet0; - $1033 = (___muldi3(($1031|0),($1032|0),($1023|0),($1024|0))|0); - $1034 = tempRet0; - $1035 = (_i64Add(($1033|0),($1034|0),($1015|0),($1016|0))|0); - $1036 = tempRet0; - $1037 = (_bitshift64Shl(($1035|0),($1036|0),1)|0); - $1038 = tempRet0; - $1039 = (($output) + 120|0); - $1040 = $1039; - $1041 = $1040; - HEAP32[$1041>>2] = $1037; - $1042 = (($1040) + 4)|0; - $1043 = $1042; - HEAP32[$1043>>2] = $1038; - $1044 = $444; - $1045 = $1044; - $1046 = HEAP32[$1045>>2]|0; - $1047 = (($1044) + 4)|0; - $1048 = $1047; - $1049 = HEAP32[$1048>>2]|0; - $1050 = (_bitshift64Ashr(0,($1046|0),32)|0); - $1051 = tempRet0; - $1052 = (___muldi3(($1050|0),($1051|0),($1050|0),($1051|0))|0); - $1053 = tempRet0; - $1054 = $388; - $1055 = $1054; - $1056 = HEAP32[$1055>>2]|0; - $1057 = (($1054) + 4)|0; - $1058 = $1057; - $1059 = HEAP32[$1058>>2]|0; - $1060 = (_bitshift64Ashr(0,($1056|0),30)|0); - $1061 = tempRet0; - $1062 = $594; - $1063 = $1062; - $1064 = HEAP32[$1063>>2]|0; - $1065 = (($1062) + 4)|0; - $1066 = $1065; - $1067 = HEAP32[$1066>>2]|0; - $1068 = (_bitshift64Ashr(0,($1064|0),32)|0); - $1069 = tempRet0; - $1070 = (___muldi3(($1068|0),($1069|0),($1060|0),($1061|0))|0); - $1071 = tempRet0; - $1072 = (_i64Add(($1070|0),($1071|0),($1052|0),($1053|0))|0); - $1073 = tempRet0; - $1074 = (($output) + 128|0); - $1075 = $1074; - $1076 = $1075; - HEAP32[$1076>>2] = $1072; - $1077 = (($1075) + 4)|0; - $1078 = $1077; - HEAP32[$1078>>2] = $1073; - $1079 = $444; - $1080 = $1079; - $1081 = HEAP32[$1080>>2]|0; - $1082 = (($1079) + 4)|0; - $1083 = $1082; - $1084 = HEAP32[$1083>>2]|0; - $1085 = (_bitshift64Ashr(0,($1081|0),31)|0); - $1086 = tempRet0; - $1087 = $594; - $1088 = $1087; - $1089 = HEAP32[$1088>>2]|0; - $1090 = (($1087) + 4)|0; - $1091 = $1090; - $1092 = HEAP32[$1091>>2]|0; - $1093 = (_bitshift64Ashr(0,($1089|0),32)|0); - $1094 = tempRet0; - $1095 = (___muldi3(($1093|0),($1094|0),($1085|0),($1086|0))|0); - $1096 = tempRet0; - $1097 = (($output) + 136|0); - $1098 = $1097; - $1099 = $1098; - HEAP32[$1099>>2] = $1095; - $1100 = (($1098) + 4)|0; - $1101 = $1100; - HEAP32[$1101>>2] = $1096; - $1102 = $594; - $1103 = $1102; - $1104 = HEAP32[$1103>>2]|0; - $1105 = (($1102) + 4)|0; - $1106 = $1105; - $1107 = HEAP32[$1106>>2]|0; - $1108 = (_bitshift64Ashr(0,($1104|0),32)|0); - $1109 = tempRet0; - $1110 = (_bitshift64Ashr(0,($1104|0),31)|0); - $1111 = tempRet0; - $1112 = (___muldi3(($1110|0),($1111|0),($1108|0),($1109|0))|0); - $1113 = tempRet0; - $1114 = (($output) + 144|0); - $1115 = $1114; - $1116 = $1115; - HEAP32[$1116>>2] = $1112; - $1117 = (($1115) + 4)|0; - $1118 = $1117; - HEAP32[$1118>>2] = $1113; - STACKTOP = sp;return; -} -function _div_by_2_26($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = $1 >> 31; - $3 = $2 >>> 6; - $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); - $5 = tempRet0; - $6 = (_bitshift64Ashr(($4|0),($5|0),26)|0); - $7 = tempRet0; - tempRet0 = $7; - STACKTOP = sp;return ($6|0); -} -function _div_by_2_25($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = $1 >> 31; - $3 = $2 >>> 7; - $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); - $5 = tempRet0; - $6 = (_bitshift64Ashr(($4|0),($5|0),25)|0); - $7 = tempRet0; - tempRet0 = $7; - STACKTOP = sp;return ($6|0); -} -function _crypto_sign_ed25519_ref10_fe_0($h) { - $h = $h|0; - var dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - dest=$h+0|0; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_1($h) { - $h = $h|0; - var $0 = 0, dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - HEAP32[$h>>2] = 1; - $0 = (($h) + 4|0); - dest=$0+0|0; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_add($h,$f,$g) { - $h = $h|0; - $f = $f|0; - $g = $g|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); - $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); - $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); - $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); - $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); - $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); - $37 = HEAP32[$36>>2]|0; - $38 = (($19) + ($0))|0; - $39 = (($21) + ($2))|0; - $40 = (($23) + ($4))|0; - $41 = (($25) + ($6))|0; - $42 = (($27) + ($8))|0; - $43 = (($29) + ($10))|0; - $44 = (($31) + ($12))|0; - $45 = (($33) + ($14))|0; - $46 = (($35) + ($16))|0; - $47 = (($37) + ($18))|0; - HEAP32[$h>>2] = $38; - $48 = (($h) + 4|0); - HEAP32[$48>>2] = $39; - $49 = (($h) + 8|0); - HEAP32[$49>>2] = $40; - $50 = (($h) + 12|0); - HEAP32[$50>>2] = $41; - $51 = (($h) + 16|0); - HEAP32[$51>>2] = $42; - $52 = (($h) + 20|0); - HEAP32[$52>>2] = $43; - $53 = (($h) + 24|0); - HEAP32[$53>>2] = $44; - $54 = (($h) + 28|0); - HEAP32[$54>>2] = $45; - $55 = (($h) + 32|0); - HEAP32[$55>>2] = $46; - $56 = (($h) + 36|0); - HEAP32[$56>>2] = $47; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_cmov($f,$g,$b) { - $f = $f|0; - $g = $g|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; - var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); - $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); - $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); - $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); - $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); - $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); - $37 = HEAP32[$36>>2]|0; - $38 = $19 ^ $0; - $39 = $21 ^ $2; - $40 = $23 ^ $4; - $41 = $25 ^ $6; - $42 = $27 ^ $8; - $43 = $29 ^ $10; - $44 = $31 ^ $12; - $45 = $33 ^ $14; - $46 = $35 ^ $16; - $47 = $37 ^ $18; - $48 = (0 - ($b))|0; - $49 = $38 & $48; - $50 = $39 & $48; - $51 = $40 & $48; - $52 = $41 & $48; - $53 = $42 & $48; - $54 = $43 & $48; - $55 = $44 & $48; - $56 = $45 & $48; - $57 = $46 & $48; - $58 = $47 & $48; - $59 = $49 ^ $0; - HEAP32[$f>>2] = $59; - $60 = $50 ^ $2; - HEAP32[$1>>2] = $60; - $61 = $51 ^ $4; - HEAP32[$3>>2] = $61; - $62 = $52 ^ $6; - HEAP32[$5>>2] = $62; - $63 = $53 ^ $8; - HEAP32[$7>>2] = $63; - $64 = $54 ^ $10; - HEAP32[$9>>2] = $64; - $65 = $55 ^ $12; - HEAP32[$11>>2] = $65; - $66 = $56 ^ $14; - HEAP32[$13>>2] = $66; - $67 = $57 ^ $16; - HEAP32[$15>>2] = $67; - $68 = $58 ^ $18; - HEAP32[$17>>2] = $68; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_copy($h,$f) { - $h = $h|0; - $f = $f|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - HEAP32[$h>>2] = $0; - $19 = (($h) + 4|0); - HEAP32[$19>>2] = $2; - $20 = (($h) + 8|0); - HEAP32[$20>>2] = $4; - $21 = (($h) + 12|0); - HEAP32[$21>>2] = $6; - $22 = (($h) + 16|0); - HEAP32[$22>>2] = $8; - $23 = (($h) + 20|0); - HEAP32[$23>>2] = $10; - $24 = (($h) + 24|0); - HEAP32[$24>>2] = $12; - $25 = (($h) + 28|0); - HEAP32[$25>>2] = $14; - $26 = (($h) + 32|0); - HEAP32[$26>>2] = $16; - $27 = (($h) + 36|0); - HEAP32[$27>>2] = $18; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_frombytes($h,$s) { - $h = $h|0; - $s = $s|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; - var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; - var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; - var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; - var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_load_4($s)|0); - $1 = tempRet0; - $2 = (($s) + 4|0); - $3 = (_load_3($2)|0); - $4 = tempRet0; - $5 = (_bitshift64Shl(($3|0),($4|0),6)|0); - $6 = tempRet0; - $7 = (($s) + 7|0); - $8 = (_load_3($7)|0); - $9 = tempRet0; - $10 = (_bitshift64Shl(($8|0),($9|0),5)|0); - $11 = tempRet0; - $12 = (($s) + 10|0); - $13 = (_load_3($12)|0); - $14 = tempRet0; - $15 = (_bitshift64Shl(($13|0),($14|0),3)|0); - $16 = tempRet0; - $17 = (($s) + 13|0); - $18 = (_load_3($17)|0); - $19 = tempRet0; - $20 = (_bitshift64Shl(($18|0),($19|0),2)|0); - $21 = tempRet0; - $22 = (($s) + 16|0); - $23 = (_load_4($22)|0); - $24 = tempRet0; - $25 = (($s) + 20|0); - $26 = (_load_3($25)|0); - $27 = tempRet0; - $28 = (_bitshift64Shl(($26|0),($27|0),7)|0); - $29 = tempRet0; - $30 = (($s) + 23|0); - $31 = (_load_3($30)|0); - $32 = tempRet0; - $33 = (_bitshift64Shl(($31|0),($32|0),5)|0); - $34 = tempRet0; - $35 = (($s) + 26|0); - $36 = (_load_3($35)|0); - $37 = tempRet0; - $38 = (_bitshift64Shl(($36|0),($37|0),4)|0); - $39 = tempRet0; - $40 = (($s) + 29|0); - $41 = (_load_3($40)|0); - $42 = tempRet0; - $43 = (_bitshift64Shl(($41|0),($42|0),2)|0); - $44 = tempRet0; - $45 = $43 & 33554428; - $46 = (_i64Add(($45|0),0,16777216,0)|0); - $47 = tempRet0; - $48 = (_bitshift64Lshr(($46|0),($47|0),25)|0); - $49 = tempRet0; - $50 = (___muldi3(($48|0),($49|0),19,0)|0); - $51 = tempRet0; - $52 = (_i64Add(($50|0),($51|0),($0|0),($1|0))|0); - $53 = tempRet0; - $54 = (_bitshift64Shl(($48|0),($49|0),25)|0); - $55 = tempRet0; - $56 = (_i64Add(($5|0),($6|0),16777216,0)|0); - $57 = tempRet0; - $58 = (_bitshift64Ashr(($56|0),($57|0),25)|0); - $59 = tempRet0; - $60 = (_i64Add(($58|0),($59|0),($10|0),($11|0))|0); - $61 = tempRet0; - $62 = (_bitshift64Shl(($58|0),($59|0),25)|0); - $63 = tempRet0; - $64 = (_i64Subtract(($5|0),($6|0),($62|0),($63|0))|0); - $65 = tempRet0; - $66 = (_i64Add(($15|0),($16|0),16777216,0)|0); - $67 = tempRet0; - $68 = (_bitshift64Ashr(($66|0),($67|0),25)|0); - $69 = tempRet0; - $70 = (_i64Add(($68|0),($69|0),($20|0),($21|0))|0); - $71 = tempRet0; - $72 = (_bitshift64Shl(($68|0),($69|0),25)|0); - $73 = tempRet0; - $74 = (_i64Subtract(($15|0),($16|0),($72|0),($73|0))|0); - $75 = tempRet0; - $76 = (_i64Add(($23|0),($24|0),16777216,0)|0); - $77 = tempRet0; - $78 = (_bitshift64Ashr(($76|0),($77|0),25)|0); - $79 = tempRet0; - $80 = (_i64Add(($28|0),($29|0),($78|0),($79|0))|0); - $81 = tempRet0; - $82 = (_bitshift64Shl(($78|0),($79|0),25)|0); - $83 = tempRet0; - $84 = (_i64Subtract(($23|0),($24|0),($82|0),($83|0))|0); - $85 = tempRet0; - $86 = (_i64Add(($33|0),($34|0),16777216,0)|0); - $87 = tempRet0; - $88 = (_bitshift64Ashr(($86|0),($87|0),25)|0); - $89 = tempRet0; - $90 = (_i64Add(($88|0),($89|0),($38|0),($39|0))|0); - $91 = tempRet0; - $92 = (_bitshift64Shl(($88|0),($89|0),25)|0); - $93 = tempRet0; - $94 = (_i64Add(($52|0),($53|0),33554432,0)|0); - $95 = tempRet0; - $96 = (_bitshift64Ashr(($94|0),($95|0),26)|0); - $97 = tempRet0; - $98 = (_i64Add(($64|0),($65|0),($96|0),($97|0))|0); - $99 = tempRet0; - $100 = (_bitshift64Shl(($96|0),($97|0),26)|0); - $101 = tempRet0; - $102 = (_i64Subtract(($52|0),($53|0),($100|0),($101|0))|0); - $103 = tempRet0; - $104 = (_i64Add(($60|0),($61|0),33554432,0)|0); - $105 = tempRet0; - $106 = (_bitshift64Ashr(($104|0),($105|0),26)|0); - $107 = tempRet0; - $108 = (_i64Add(($74|0),($75|0),($106|0),($107|0))|0); - $109 = tempRet0; - $110 = (_bitshift64Shl(($106|0),($107|0),26)|0); - $111 = tempRet0; - $112 = (_i64Subtract(($60|0),($61|0),($110|0),($111|0))|0); - $113 = tempRet0; - $114 = (_i64Add(($70|0),($71|0),33554432,0)|0); - $115 = tempRet0; - $116 = (_bitshift64Ashr(($114|0),($115|0),26)|0); - $117 = tempRet0; - $118 = (_i64Add(($84|0),($85|0),($116|0),($117|0))|0); - $119 = tempRet0; - $120 = (_bitshift64Shl(($116|0),($117|0),26)|0); - $121 = tempRet0; - $122 = (_i64Subtract(($70|0),($71|0),($120|0),($121|0))|0); - $123 = tempRet0; - $124 = (_i64Add(($80|0),($81|0),33554432,0)|0); - $125 = tempRet0; - $126 = (_bitshift64Ashr(($124|0),($125|0),26)|0); - $127 = tempRet0; - $128 = (_i64Add(($126|0),($127|0),($33|0),($34|0))|0); - $129 = tempRet0; - $130 = (_i64Subtract(($128|0),($129|0),($92|0),($93|0))|0); - $131 = tempRet0; - $132 = (_bitshift64Shl(($126|0),($127|0),26)|0); - $133 = tempRet0; - $134 = (_i64Subtract(($80|0),($81|0),($132|0),($133|0))|0); - $135 = tempRet0; - $136 = (_i64Add(($90|0),($91|0),33554432,0)|0); - $137 = tempRet0; - $138 = (_bitshift64Ashr(($136|0),($137|0),26)|0); - $139 = tempRet0; - $140 = (_i64Add(($138|0),($139|0),($45|0),0)|0); - $141 = tempRet0; - $142 = (_i64Subtract(($140|0),($141|0),($54|0),($55|0))|0); - $143 = tempRet0; - $144 = (_bitshift64Shl(($138|0),($139|0),26)|0); - $145 = tempRet0; - $146 = (_i64Subtract(($90|0),($91|0),($144|0),($145|0))|0); - $147 = tempRet0; - HEAP32[$h>>2] = $102; - $148 = (($h) + 4|0); - HEAP32[$148>>2] = $98; - $149 = (($h) + 8|0); - HEAP32[$149>>2] = $112; - $150 = (($h) + 12|0); - HEAP32[$150>>2] = $108; - $151 = (($h) + 16|0); - HEAP32[$151>>2] = $122; - $152 = (($h) + 20|0); - HEAP32[$152>>2] = $118; - $153 = (($h) + 24|0); - HEAP32[$153>>2] = $134; - $154 = (($h) + 28|0); - HEAP32[$154>>2] = $130; - $155 = (($h) + 32|0); - HEAP32[$155>>2] = $146; - $156 = (($h) + 36|0); - HEAP32[$156>>2] = $142; - STACKTOP = sp;return; -} -function _load_4($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - $15 = (($in) + 3|0); - $16 = HEAP8[$15>>0]|0; - $17 = $16&255; - $18 = (_bitshift64Shl(($17|0),0,24)|0); - $19 = tempRet0; - $20 = $13 | $18; - $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); -} -function _load_3($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); -} -function _crypto_sign_ed25519_ref10_fe_invert($out,$z) { - $out = $out|0; - $z = $z|0; - var $0 = 0, $1 = 0, $2 = 0, $exitcond = 0, $exitcond10 = 0, $exitcond11 = 0, $i$74 = 0, $i$83 = 0, $i$92 = 0, $t0 = 0, $t1 = 0, $t2 = 0, $t3 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 160|0; - $t0 = sp + 120|0; - $t1 = sp + 80|0; - $t2 = sp + 40|0; - $t3 = sp; - _crypto_sign_ed25519_ref10_fe_sq($t0,$z); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t1,$z,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t0,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t0); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t1,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_mul($t2,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - _crypto_sign_ed25519_ref10_fe_mul($t2,$t3,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - $i$74 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - $0 = (($i$74) + 1)|0; - $exitcond11 = ($0|0)==(50); - if ($exitcond11) { - break; - } else { - $i$74 = $0; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t2,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t3,$t2); - $i$83 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t3,$t3); - $1 = (($i$83) + 1)|0; - $exitcond10 = ($1|0)==(100); - if ($exitcond10) { - break; - } else { - $i$83 = $1; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t2,$t3,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - $i$92 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - $2 = (($i$92) + 1)|0; - $exitcond = ($2|0)==(50); - if ($exitcond) { - break; - } else { - $i$92 = $2; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($out,$t1,$t0); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_isnegative($f) { - $f = $f|0; - var $0 = 0, $1 = 0, $2 = 0, $s = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; - $s = sp; - _crypto_sign_ed25519_ref10_fe_tobytes($s,$f); - $0 = HEAP8[$s>>0]|0; - $1 = $0&255; - $2 = $1 & 1; - STACKTOP = sp;return ($2|0); -} -function _crypto_sign_ed25519_ref10_fe_isnonzero($f) { - $f = $f|0; - var $0 = 0, $s = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; - $s = sp; - _crypto_sign_ed25519_ref10_fe_tobytes($s,$f); - $0 = (_crypto_verify_32_ref($s,8)|0); - STACKTOP = sp;return ($0|0); -} -function _crypto_sign_ed25519_ref10_fe_mul($h,$f,$g) { - $h = $h|0; - $f = $f|0; - $g = $g|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; - var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; - var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; - var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; - var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; - var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; - var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; - var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; - var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0; - var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0; - var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0; - var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0; - var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0; - var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0; - var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0; - var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0; - var $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0; - var $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0; - var $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0; - var $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; - var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; - var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); - $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); - $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); - $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); - $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); - $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); - $37 = HEAP32[$36>>2]|0; - $38 = ($21*19)|0; - $39 = ($23*19)|0; - $40 = ($25*19)|0; - $41 = ($27*19)|0; - $42 = ($29*19)|0; - $43 = ($31*19)|0; - $44 = ($33*19)|0; - $45 = ($35*19)|0; - $46 = ($37*19)|0; - $47 = $2 << 1; - $48 = $6 << 1; - $49 = $10 << 1; - $50 = $14 << 1; - $51 = $18 << 1; - $52 = ($0|0)<(0); - $53 = $52 << 31 >> 31; - $54 = ($19|0)<(0); - $55 = $54 << 31 >> 31; - $56 = (___muldi3(($19|0),($55|0),($0|0),($53|0))|0); - $57 = tempRet0; - $58 = ($21|0)<(0); - $59 = $58 << 31 >> 31; - $60 = (___muldi3(($21|0),($59|0),($0|0),($53|0))|0); - $61 = tempRet0; - $62 = ($23|0)<(0); - $63 = $62 << 31 >> 31; - $64 = (___muldi3(($23|0),($63|0),($0|0),($53|0))|0); - $65 = tempRet0; - $66 = ($25|0)<(0); - $67 = $66 << 31 >> 31; - $68 = (___muldi3(($25|0),($67|0),($0|0),($53|0))|0); - $69 = tempRet0; - $70 = ($27|0)<(0); - $71 = $70 << 31 >> 31; - $72 = (___muldi3(($27|0),($71|0),($0|0),($53|0))|0); - $73 = tempRet0; - $74 = ($29|0)<(0); - $75 = $74 << 31 >> 31; - $76 = (___muldi3(($29|0),($75|0),($0|0),($53|0))|0); - $77 = tempRet0; - $78 = ($31|0)<(0); - $79 = $78 << 31 >> 31; - $80 = (___muldi3(($31|0),($79|0),($0|0),($53|0))|0); - $81 = tempRet0; - $82 = ($33|0)<(0); - $83 = $82 << 31 >> 31; - $84 = (___muldi3(($33|0),($83|0),($0|0),($53|0))|0); - $85 = tempRet0; - $86 = ($35|0)<(0); - $87 = $86 << 31 >> 31; - $88 = (___muldi3(($35|0),($87|0),($0|0),($53|0))|0); - $89 = tempRet0; - $90 = ($37|0)<(0); - $91 = $90 << 31 >> 31; - $92 = (___muldi3(($37|0),($91|0),($0|0),($53|0))|0); - $93 = tempRet0; - $94 = ($2|0)<(0); - $95 = $94 << 31 >> 31; - $96 = (___muldi3(($19|0),($55|0),($2|0),($95|0))|0); - $97 = tempRet0; - $98 = ($47|0)<(0); - $99 = $98 << 31 >> 31; - $100 = (___muldi3(($21|0),($59|0),($47|0),($99|0))|0); - $101 = tempRet0; - $102 = (___muldi3(($23|0),($63|0),($2|0),($95|0))|0); - $103 = tempRet0; - $104 = (___muldi3(($25|0),($67|0),($47|0),($99|0))|0); - $105 = tempRet0; - $106 = (___muldi3(($27|0),($71|0),($2|0),($95|0))|0); - $107 = tempRet0; - $108 = (___muldi3(($29|0),($75|0),($47|0),($99|0))|0); - $109 = tempRet0; - $110 = (___muldi3(($31|0),($79|0),($2|0),($95|0))|0); - $111 = tempRet0; - $112 = (___muldi3(($33|0),($83|0),($47|0),($99|0))|0); - $113 = tempRet0; - $114 = (___muldi3(($35|0),($87|0),($2|0),($95|0))|0); - $115 = tempRet0; - $116 = ($46|0)<(0); - $117 = $116 << 31 >> 31; - $118 = (___muldi3(($46|0),($117|0),($47|0),($99|0))|0); - $119 = tempRet0; - $120 = ($4|0)<(0); - $121 = $120 << 31 >> 31; - $122 = (___muldi3(($19|0),($55|0),($4|0),($121|0))|0); - $123 = tempRet0; - $124 = (___muldi3(($21|0),($59|0),($4|0),($121|0))|0); - $125 = tempRet0; - $126 = (___muldi3(($23|0),($63|0),($4|0),($121|0))|0); - $127 = tempRet0; - $128 = (___muldi3(($25|0),($67|0),($4|0),($121|0))|0); - $129 = tempRet0; - $130 = (___muldi3(($27|0),($71|0),($4|0),($121|0))|0); - $131 = tempRet0; - $132 = (___muldi3(($29|0),($75|0),($4|0),($121|0))|0); - $133 = tempRet0; - $134 = (___muldi3(($31|0),($79|0),($4|0),($121|0))|0); - $135 = tempRet0; - $136 = (___muldi3(($33|0),($83|0),($4|0),($121|0))|0); - $137 = tempRet0; - $138 = ($45|0)<(0); - $139 = $138 << 31 >> 31; - $140 = (___muldi3(($45|0),($139|0),($4|0),($121|0))|0); - $141 = tempRet0; - $142 = (___muldi3(($46|0),($117|0),($4|0),($121|0))|0); - $143 = tempRet0; - $144 = ($6|0)<(0); - $145 = $144 << 31 >> 31; - $146 = (___muldi3(($19|0),($55|0),($6|0),($145|0))|0); - $147 = tempRet0; - $148 = ($48|0)<(0); - $149 = $148 << 31 >> 31; - $150 = (___muldi3(($21|0),($59|0),($48|0),($149|0))|0); - $151 = tempRet0; - $152 = (___muldi3(($23|0),($63|0),($6|0),($145|0))|0); - $153 = tempRet0; - $154 = (___muldi3(($25|0),($67|0),($48|0),($149|0))|0); - $155 = tempRet0; - $156 = (___muldi3(($27|0),($71|0),($6|0),($145|0))|0); - $157 = tempRet0; - $158 = (___muldi3(($29|0),($75|0),($48|0),($149|0))|0); - $159 = tempRet0; - $160 = (___muldi3(($31|0),($79|0),($6|0),($145|0))|0); - $161 = tempRet0; - $162 = ($44|0)<(0); - $163 = $162 << 31 >> 31; - $164 = (___muldi3(($44|0),($163|0),($48|0),($149|0))|0); - $165 = tempRet0; - $166 = (___muldi3(($45|0),($139|0),($6|0),($145|0))|0); - $167 = tempRet0; - $168 = (___muldi3(($46|0),($117|0),($48|0),($149|0))|0); - $169 = tempRet0; - $170 = ($8|0)<(0); - $171 = $170 << 31 >> 31; - $172 = (___muldi3(($19|0),($55|0),($8|0),($171|0))|0); - $173 = tempRet0; - $174 = (___muldi3(($21|0),($59|0),($8|0),($171|0))|0); - $175 = tempRet0; - $176 = (___muldi3(($23|0),($63|0),($8|0),($171|0))|0); - $177 = tempRet0; - $178 = (___muldi3(($25|0),($67|0),($8|0),($171|0))|0); - $179 = tempRet0; - $180 = (___muldi3(($27|0),($71|0),($8|0),($171|0))|0); - $181 = tempRet0; - $182 = (___muldi3(($29|0),($75|0),($8|0),($171|0))|0); - $183 = tempRet0; - $184 = ($43|0)<(0); - $185 = $184 << 31 >> 31; - $186 = (___muldi3(($43|0),($185|0),($8|0),($171|0))|0); - $187 = tempRet0; - $188 = (___muldi3(($44|0),($163|0),($8|0),($171|0))|0); - $189 = tempRet0; - $190 = (___muldi3(($45|0),($139|0),($8|0),($171|0))|0); - $191 = tempRet0; - $192 = (___muldi3(($46|0),($117|0),($8|0),($171|0))|0); - $193 = tempRet0; - $194 = ($10|0)<(0); - $195 = $194 << 31 >> 31; - $196 = (___muldi3(($19|0),($55|0),($10|0),($195|0))|0); - $197 = tempRet0; - $198 = ($49|0)<(0); - $199 = $198 << 31 >> 31; - $200 = (___muldi3(($21|0),($59|0),($49|0),($199|0))|0); - $201 = tempRet0; - $202 = (___muldi3(($23|0),($63|0),($10|0),($195|0))|0); - $203 = tempRet0; - $204 = (___muldi3(($25|0),($67|0),($49|0),($199|0))|0); - $205 = tempRet0; - $206 = (___muldi3(($27|0),($71|0),($10|0),($195|0))|0); - $207 = tempRet0; - $208 = ($42|0)<(0); - $209 = $208 << 31 >> 31; - $210 = (___muldi3(($42|0),($209|0),($49|0),($199|0))|0); - $211 = tempRet0; - $212 = (___muldi3(($43|0),($185|0),($10|0),($195|0))|0); - $213 = tempRet0; - $214 = (___muldi3(($44|0),($163|0),($49|0),($199|0))|0); - $215 = tempRet0; - $216 = (___muldi3(($45|0),($139|0),($10|0),($195|0))|0); - $217 = tempRet0; - $218 = (___muldi3(($46|0),($117|0),($49|0),($199|0))|0); - $219 = tempRet0; - $220 = ($12|0)<(0); - $221 = $220 << 31 >> 31; - $222 = (___muldi3(($19|0),($55|0),($12|0),($221|0))|0); - $223 = tempRet0; - $224 = (___muldi3(($21|0),($59|0),($12|0),($221|0))|0); - $225 = tempRet0; - $226 = (___muldi3(($23|0),($63|0),($12|0),($221|0))|0); - $227 = tempRet0; - $228 = (___muldi3(($25|0),($67|0),($12|0),($221|0))|0); - $229 = tempRet0; - $230 = ($41|0)<(0); - $231 = $230 << 31 >> 31; - $232 = (___muldi3(($41|0),($231|0),($12|0),($221|0))|0); - $233 = tempRet0; - $234 = (___muldi3(($42|0),($209|0),($12|0),($221|0))|0); - $235 = tempRet0; - $236 = (___muldi3(($43|0),($185|0),($12|0),($221|0))|0); - $237 = tempRet0; - $238 = (___muldi3(($44|0),($163|0),($12|0),($221|0))|0); - $239 = tempRet0; - $240 = (___muldi3(($45|0),($139|0),($12|0),($221|0))|0); - $241 = tempRet0; - $242 = (___muldi3(($46|0),($117|0),($12|0),($221|0))|0); - $243 = tempRet0; - $244 = ($14|0)<(0); - $245 = $244 << 31 >> 31; - $246 = (___muldi3(($19|0),($55|0),($14|0),($245|0))|0); - $247 = tempRet0; - $248 = ($50|0)<(0); - $249 = $248 << 31 >> 31; - $250 = (___muldi3(($21|0),($59|0),($50|0),($249|0))|0); - $251 = tempRet0; - $252 = (___muldi3(($23|0),($63|0),($14|0),($245|0))|0); - $253 = tempRet0; - $254 = ($40|0)<(0); - $255 = $254 << 31 >> 31; - $256 = (___muldi3(($40|0),($255|0),($50|0),($249|0))|0); - $257 = tempRet0; - $258 = (___muldi3(($41|0),($231|0),($14|0),($245|0))|0); - $259 = tempRet0; - $260 = (___muldi3(($42|0),($209|0),($50|0),($249|0))|0); - $261 = tempRet0; - $262 = (___muldi3(($43|0),($185|0),($14|0),($245|0))|0); - $263 = tempRet0; - $264 = (___muldi3(($44|0),($163|0),($50|0),($249|0))|0); - $265 = tempRet0; - $266 = (___muldi3(($45|0),($139|0),($14|0),($245|0))|0); - $267 = tempRet0; - $268 = (___muldi3(($46|0),($117|0),($50|0),($249|0))|0); - $269 = tempRet0; - $270 = ($16|0)<(0); - $271 = $270 << 31 >> 31; - $272 = (___muldi3(($19|0),($55|0),($16|0),($271|0))|0); - $273 = tempRet0; - $274 = (___muldi3(($21|0),($59|0),($16|0),($271|0))|0); - $275 = tempRet0; - $276 = ($39|0)<(0); - $277 = $276 << 31 >> 31; - $278 = (___muldi3(($39|0),($277|0),($16|0),($271|0))|0); - $279 = tempRet0; - $280 = (___muldi3(($40|0),($255|0),($16|0),($271|0))|0); - $281 = tempRet0; - $282 = (___muldi3(($41|0),($231|0),($16|0),($271|0))|0); - $283 = tempRet0; - $284 = (___muldi3(($42|0),($209|0),($16|0),($271|0))|0); - $285 = tempRet0; - $286 = (___muldi3(($43|0),($185|0),($16|0),($271|0))|0); - $287 = tempRet0; - $288 = (___muldi3(($44|0),($163|0),($16|0),($271|0))|0); - $289 = tempRet0; - $290 = (___muldi3(($45|0),($139|0),($16|0),($271|0))|0); - $291 = tempRet0; - $292 = (___muldi3(($46|0),($117|0),($16|0),($271|0))|0); - $293 = tempRet0; - $294 = ($18|0)<(0); - $295 = $294 << 31 >> 31; - $296 = (___muldi3(($19|0),($55|0),($18|0),($295|0))|0); - $297 = tempRet0; - $298 = ($51|0)<(0); - $299 = $298 << 31 >> 31; - $300 = ($38|0)<(0); - $301 = $300 << 31 >> 31; - $302 = (___muldi3(($38|0),($301|0),($51|0),($299|0))|0); - $303 = tempRet0; - $304 = (___muldi3(($39|0),($277|0),($18|0),($295|0))|0); - $305 = tempRet0; - $306 = (___muldi3(($40|0),($255|0),($51|0),($299|0))|0); - $307 = tempRet0; - $308 = (___muldi3(($41|0),($231|0),($18|0),($295|0))|0); - $309 = tempRet0; - $310 = (___muldi3(($42|0),($209|0),($51|0),($299|0))|0); - $311 = tempRet0; - $312 = (___muldi3(($43|0),($185|0),($18|0),($295|0))|0); - $313 = tempRet0; - $314 = (___muldi3(($44|0),($163|0),($51|0),($299|0))|0); - $315 = tempRet0; - $316 = (___muldi3(($45|0),($139|0),($18|0),($295|0))|0); - $317 = tempRet0; - $318 = (___muldi3(($46|0),($117|0),($51|0),($299|0))|0); - $319 = tempRet0; - $320 = (_i64Add(($302|0),($303|0),($56|0),($57|0))|0); - $321 = tempRet0; - $322 = (_i64Add(($320|0),($321|0),($278|0),($279|0))|0); - $323 = tempRet0; - $324 = (_i64Add(($322|0),($323|0),($256|0),($257|0))|0); - $325 = tempRet0; - $326 = (_i64Add(($324|0),($325|0),($232|0),($233|0))|0); - $327 = tempRet0; - $328 = (_i64Add(($326|0),($327|0),($210|0),($211|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($328|0),($329|0),($186|0),($187|0))|0); - $331 = tempRet0; - $332 = (_i64Add(($330|0),($331|0),($164|0),($165|0))|0); - $333 = tempRet0; - $334 = (_i64Add(($332|0),($333|0),($140|0),($141|0))|0); - $335 = tempRet0; - $336 = (_i64Add(($334|0),($335|0),($118|0),($119|0))|0); - $337 = tempRet0; - $338 = (_i64Add(($60|0),($61|0),($96|0),($97|0))|0); - $339 = tempRet0; - $340 = (_i64Add(($150|0),($151|0),($172|0),($173|0))|0); - $341 = tempRet0; - $342 = (_i64Add(($340|0),($341|0),($126|0),($127|0))|0); - $343 = tempRet0; - $344 = (_i64Add(($342|0),($343|0),($104|0),($105|0))|0); - $345 = tempRet0; - $346 = (_i64Add(($344|0),($345|0),($72|0),($73|0))|0); - $347 = tempRet0; - $348 = (_i64Add(($346|0),($347|0),($310|0),($311|0))|0); - $349 = tempRet0; - $350 = (_i64Add(($348|0),($349|0),($286|0),($287|0))|0); - $351 = tempRet0; - $352 = (_i64Add(($350|0),($351|0),($264|0),($265|0))|0); - $353 = tempRet0; - $354 = (_i64Add(($352|0),($353|0),($240|0),($241|0))|0); - $355 = tempRet0; - $356 = (_i64Add(($354|0),($355|0),($218|0),($219|0))|0); - $357 = tempRet0; - $358 = (_i64Add(($336|0),($337|0),33554432,0)|0); - $359 = tempRet0; - $360 = (_bitshift64Ashr(($358|0),($359|0),26)|0); - $361 = tempRet0; - $362 = (_i64Add(($338|0),($339|0),($304|0),($305|0))|0); - $363 = tempRet0; - $364 = (_i64Add(($362|0),($363|0),($280|0),($281|0))|0); - $365 = tempRet0; - $366 = (_i64Add(($364|0),($365|0),($258|0),($259|0))|0); - $367 = tempRet0; - $368 = (_i64Add(($366|0),($367|0),($234|0),($235|0))|0); - $369 = tempRet0; - $370 = (_i64Add(($368|0),($369|0),($212|0),($213|0))|0); - $371 = tempRet0; - $372 = (_i64Add(($370|0),($371|0),($188|0),($189|0))|0); - $373 = tempRet0; - $374 = (_i64Add(($372|0),($373|0),($166|0),($167|0))|0); - $375 = tempRet0; - $376 = (_i64Add(($374|0),($375|0),($142|0),($143|0))|0); - $377 = tempRet0; - $378 = (_i64Add(($376|0),($377|0),($360|0),($361|0))|0); - $379 = tempRet0; - $380 = (_bitshift64Shl(($360|0),($361|0),26)|0); - $381 = tempRet0; - $382 = (_i64Subtract(($336|0),($337|0),($380|0),($381|0))|0); - $383 = tempRet0; - $384 = (_i64Add(($356|0),($357|0),33554432,0)|0); - $385 = tempRet0; - $386 = (_bitshift64Ashr(($384|0),($385|0),26)|0); - $387 = tempRet0; - $388 = (_i64Add(($174|0),($175|0),($196|0),($197|0))|0); - $389 = tempRet0; - $390 = (_i64Add(($388|0),($389|0),($152|0),($153|0))|0); - $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($128|0),($129|0))|0); - $393 = tempRet0; - $394 = (_i64Add(($392|0),($393|0),($106|0),($107|0))|0); - $395 = tempRet0; - $396 = (_i64Add(($394|0),($395|0),($76|0),($77|0))|0); - $397 = tempRet0; - $398 = (_i64Add(($396|0),($397|0),($312|0),($313|0))|0); - $399 = tempRet0; - $400 = (_i64Add(($398|0),($399|0),($288|0),($289|0))|0); - $401 = tempRet0; - $402 = (_i64Add(($400|0),($401|0),($266|0),($267|0))|0); - $403 = tempRet0; - $404 = (_i64Add(($402|0),($403|0),($242|0),($243|0))|0); - $405 = tempRet0; - $406 = (_i64Add(($404|0),($405|0),($386|0),($387|0))|0); - $407 = tempRet0; - $408 = (_bitshift64Shl(($386|0),($387|0),26)|0); - $409 = tempRet0; - $410 = (_i64Subtract(($356|0),($357|0),($408|0),($409|0))|0); - $411 = tempRet0; - $412 = (_i64Add(($378|0),($379|0),16777216,0)|0); - $413 = tempRet0; - $414 = (_bitshift64Ashr(($412|0),($413|0),25)|0); - $415 = tempRet0; - $416 = (_i64Add(($100|0),($101|0),($122|0),($123|0))|0); - $417 = tempRet0; - $418 = (_i64Add(($416|0),($417|0),($64|0),($65|0))|0); - $419 = tempRet0; - $420 = (_i64Add(($418|0),($419|0),($306|0),($307|0))|0); - $421 = tempRet0; - $422 = (_i64Add(($420|0),($421|0),($282|0),($283|0))|0); - $423 = tempRet0; - $424 = (_i64Add(($422|0),($423|0),($260|0),($261|0))|0); - $425 = tempRet0; - $426 = (_i64Add(($424|0),($425|0),($236|0),($237|0))|0); - $427 = tempRet0; - $428 = (_i64Add(($426|0),($427|0),($214|0),($215|0))|0); - $429 = tempRet0; - $430 = (_i64Add(($428|0),($429|0),($190|0),($191|0))|0); - $431 = tempRet0; - $432 = (_i64Add(($430|0),($431|0),($168|0),($169|0))|0); - $433 = tempRet0; - $434 = (_i64Add(($432|0),($433|0),($414|0),($415|0))|0); - $435 = tempRet0; - $436 = (_bitshift64Shl(($414|0),($415|0),25)|0); - $437 = tempRet0; - $438 = (_i64Subtract(($378|0),($379|0),($436|0),($437|0))|0); - $439 = tempRet0; - $440 = (_i64Add(($406|0),($407|0),16777216,0)|0); - $441 = tempRet0; - $442 = (_bitshift64Ashr(($440|0),($441|0),25)|0); - $443 = tempRet0; - $444 = (_i64Add(($200|0),($201|0),($222|0),($223|0))|0); - $445 = tempRet0; - $446 = (_i64Add(($444|0),($445|0),($176|0),($177|0))|0); - $447 = tempRet0; - $448 = (_i64Add(($446|0),($447|0),($154|0),($155|0))|0); - $449 = tempRet0; - $450 = (_i64Add(($448|0),($449|0),($130|0),($131|0))|0); - $451 = tempRet0; - $452 = (_i64Add(($450|0),($451|0),($108|0),($109|0))|0); - $453 = tempRet0; - $454 = (_i64Add(($452|0),($453|0),($80|0),($81|0))|0); - $455 = tempRet0; - $456 = (_i64Add(($454|0),($455|0),($314|0),($315|0))|0); - $457 = tempRet0; - $458 = (_i64Add(($456|0),($457|0),($290|0),($291|0))|0); - $459 = tempRet0; - $460 = (_i64Add(($458|0),($459|0),($268|0),($269|0))|0); - $461 = tempRet0; - $462 = (_i64Add(($460|0),($461|0),($442|0),($443|0))|0); - $463 = tempRet0; - $464 = (_bitshift64Shl(($442|0),($443|0),25)|0); - $465 = tempRet0; - $466 = (_i64Subtract(($406|0),($407|0),($464|0),($465|0))|0); - $467 = tempRet0; - $468 = (_i64Add(($434|0),($435|0),33554432,0)|0); - $469 = tempRet0; - $470 = (_bitshift64Ashr(($468|0),($469|0),26)|0); - $471 = tempRet0; - $472 = (_i64Add(($124|0),($125|0),($146|0),($147|0))|0); - $473 = tempRet0; - $474 = (_i64Add(($472|0),($473|0),($102|0),($103|0))|0); - $475 = tempRet0; - $476 = (_i64Add(($474|0),($475|0),($68|0),($69|0))|0); - $477 = tempRet0; - $478 = (_i64Add(($476|0),($477|0),($308|0),($309|0))|0); - $479 = tempRet0; - $480 = (_i64Add(($478|0),($479|0),($284|0),($285|0))|0); - $481 = tempRet0; - $482 = (_i64Add(($480|0),($481|0),($262|0),($263|0))|0); - $483 = tempRet0; - $484 = (_i64Add(($482|0),($483|0),($238|0),($239|0))|0); - $485 = tempRet0; - $486 = (_i64Add(($484|0),($485|0),($216|0),($217|0))|0); - $487 = tempRet0; - $488 = (_i64Add(($486|0),($487|0),($192|0),($193|0))|0); - $489 = tempRet0; - $490 = (_i64Add(($488|0),($489|0),($470|0),($471|0))|0); - $491 = tempRet0; - $492 = (_bitshift64Shl(($470|0),($471|0),26)|0); - $493 = tempRet0; - $494 = (_i64Subtract(($434|0),($435|0),($492|0),($493|0))|0); - $495 = tempRet0; - $496 = (_i64Add(($462|0),($463|0),33554432,0)|0); - $497 = tempRet0; - $498 = (_bitshift64Ashr(($496|0),($497|0),26)|0); - $499 = tempRet0; - $500 = (_i64Add(($224|0),($225|0),($246|0),($247|0))|0); - $501 = tempRet0; - $502 = (_i64Add(($500|0),($501|0),($202|0),($203|0))|0); - $503 = tempRet0; - $504 = (_i64Add(($502|0),($503|0),($178|0),($179|0))|0); - $505 = tempRet0; - $506 = (_i64Add(($504|0),($505|0),($156|0),($157|0))|0); - $507 = tempRet0; - $508 = (_i64Add(($506|0),($507|0),($132|0),($133|0))|0); - $509 = tempRet0; - $510 = (_i64Add(($508|0),($509|0),($110|0),($111|0))|0); - $511 = tempRet0; - $512 = (_i64Add(($510|0),($511|0),($84|0),($85|0))|0); - $513 = tempRet0; - $514 = (_i64Add(($512|0),($513|0),($316|0),($317|0))|0); - $515 = tempRet0; - $516 = (_i64Add(($514|0),($515|0),($292|0),($293|0))|0); - $517 = tempRet0; - $518 = (_i64Add(($516|0),($517|0),($498|0),($499|0))|0); - $519 = tempRet0; - $520 = (_bitshift64Shl(($498|0),($499|0),26)|0); - $521 = tempRet0; - $522 = (_i64Subtract(($462|0),($463|0),($520|0),($521|0))|0); - $523 = tempRet0; - $524 = (_i64Add(($490|0),($491|0),16777216,0)|0); - $525 = tempRet0; - $526 = (_bitshift64Ashr(($524|0),($525|0),25)|0); - $527 = tempRet0; - $528 = (_i64Add(($526|0),($527|0),($410|0),($411|0))|0); - $529 = tempRet0; - $530 = (_bitshift64Shl(($526|0),($527|0),25)|0); - $531 = tempRet0; - $532 = (_i64Subtract(($490|0),($491|0),($530|0),($531|0))|0); - $533 = tempRet0; - $534 = (_i64Add(($518|0),($519|0),16777216,0)|0); - $535 = tempRet0; - $536 = (_bitshift64Ashr(($534|0),($535|0),25)|0); - $537 = tempRet0; - $538 = (_i64Add(($250|0),($251|0),($272|0),($273|0))|0); - $539 = tempRet0; - $540 = (_i64Add(($538|0),($539|0),($226|0),($227|0))|0); - $541 = tempRet0; - $542 = (_i64Add(($540|0),($541|0),($204|0),($205|0))|0); - $543 = tempRet0; - $544 = (_i64Add(($542|0),($543|0),($180|0),($181|0))|0); - $545 = tempRet0; - $546 = (_i64Add(($544|0),($545|0),($158|0),($159|0))|0); - $547 = tempRet0; - $548 = (_i64Add(($546|0),($547|0),($134|0),($135|0))|0); - $549 = tempRet0; - $550 = (_i64Add(($548|0),($549|0),($112|0),($113|0))|0); - $551 = tempRet0; - $552 = (_i64Add(($550|0),($551|0),($88|0),($89|0))|0); - $553 = tempRet0; - $554 = (_i64Add(($552|0),($553|0),($318|0),($319|0))|0); - $555 = tempRet0; - $556 = (_i64Add(($554|0),($555|0),($536|0),($537|0))|0); - $557 = tempRet0; - $558 = (_bitshift64Shl(($536|0),($537|0),25)|0); - $559 = tempRet0; - $560 = (_i64Subtract(($518|0),($519|0),($558|0),($559|0))|0); - $561 = tempRet0; - $562 = (_i64Add(($528|0),($529|0),33554432,0)|0); - $563 = tempRet0; - $564 = (_bitshift64Ashr(($562|0),($563|0),26)|0); - $565 = tempRet0; - $566 = (_i64Add(($466|0),($467|0),($564|0),($565|0))|0); - $567 = tempRet0; - $568 = (_bitshift64Shl(($564|0),($565|0),26)|0); - $569 = tempRet0; - $570 = (_i64Subtract(($528|0),($529|0),($568|0),($569|0))|0); - $571 = tempRet0; - $572 = (_i64Add(($556|0),($557|0),33554432,0)|0); - $573 = tempRet0; - $574 = (_bitshift64Ashr(($572|0),($573|0),26)|0); - $575 = tempRet0; - $576 = (_i64Add(($274|0),($275|0),($296|0),($297|0))|0); - $577 = tempRet0; - $578 = (_i64Add(($576|0),($577|0),($252|0),($253|0))|0); - $579 = tempRet0; - $580 = (_i64Add(($578|0),($579|0),($228|0),($229|0))|0); - $581 = tempRet0; - $582 = (_i64Add(($580|0),($581|0),($206|0),($207|0))|0); - $583 = tempRet0; - $584 = (_i64Add(($582|0),($583|0),($182|0),($183|0))|0); - $585 = tempRet0; - $586 = (_i64Add(($584|0),($585|0),($160|0),($161|0))|0); - $587 = tempRet0; - $588 = (_i64Add(($586|0),($587|0),($136|0),($137|0))|0); - $589 = tempRet0; - $590 = (_i64Add(($588|0),($589|0),($114|0),($115|0))|0); - $591 = tempRet0; - $592 = (_i64Add(($590|0),($591|0),($92|0),($93|0))|0); - $593 = tempRet0; - $594 = (_i64Add(($592|0),($593|0),($574|0),($575|0))|0); - $595 = tempRet0; - $596 = (_bitshift64Shl(($574|0),($575|0),26)|0); - $597 = tempRet0; - $598 = (_i64Subtract(($556|0),($557|0),($596|0),($597|0))|0); - $599 = tempRet0; - $600 = (_i64Add(($594|0),($595|0),16777216,0)|0); - $601 = tempRet0; - $602 = (_bitshift64Ashr(($600|0),($601|0),25)|0); - $603 = tempRet0; - $604 = (___muldi3(($602|0),($603|0),19,0)|0); - $605 = tempRet0; - $606 = (_i64Add(($604|0),($605|0),($382|0),($383|0))|0); - $607 = tempRet0; - $608 = (_bitshift64Shl(($602|0),($603|0),25)|0); - $609 = tempRet0; - $610 = (_i64Subtract(($594|0),($595|0),($608|0),($609|0))|0); - $611 = tempRet0; - $612 = (_i64Add(($606|0),($607|0),33554432,0)|0); - $613 = tempRet0; - $614 = (_bitshift64Ashr(($612|0),($613|0),26)|0); - $615 = tempRet0; - $616 = (_i64Add(($438|0),($439|0),($614|0),($615|0))|0); - $617 = tempRet0; - $618 = (_bitshift64Shl(($614|0),($615|0),26)|0); - $619 = tempRet0; - $620 = (_i64Subtract(($606|0),($607|0),($618|0),($619|0))|0); - $621 = tempRet0; - HEAP32[$h>>2] = $620; - $622 = (($h) + 4|0); - HEAP32[$622>>2] = $616; - $623 = (($h) + 8|0); - HEAP32[$623>>2] = $494; - $624 = (($h) + 12|0); - HEAP32[$624>>2] = $532; - $625 = (($h) + 16|0); - HEAP32[$625>>2] = $570; - $626 = (($h) + 20|0); - HEAP32[$626>>2] = $566; - $627 = (($h) + 24|0); - HEAP32[$627>>2] = $522; - $628 = (($h) + 28|0); - HEAP32[$628>>2] = $560; - $629 = (($h) + 32|0); - HEAP32[$629>>2] = $598; - $630 = (($h) + 36|0); - HEAP32[$630>>2] = $610; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_neg($h,$f) { - $h = $h|0; - $f = $f|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = (0 - ($0))|0; - $20 = (0 - ($2))|0; - $21 = (0 - ($4))|0; - $22 = (0 - ($6))|0; - $23 = (0 - ($8))|0; - $24 = (0 - ($10))|0; - $25 = (0 - ($12))|0; - $26 = (0 - ($14))|0; - $27 = (0 - ($16))|0; - $28 = (0 - ($18))|0; - HEAP32[$h>>2] = $19; - $29 = (($h) + 4|0); - HEAP32[$29>>2] = $20; - $30 = (($h) + 8|0); - HEAP32[$30>>2] = $21; - $31 = (($h) + 12|0); - HEAP32[$31>>2] = $22; - $32 = (($h) + 16|0); - HEAP32[$32>>2] = $23; - $33 = (($h) + 20|0); - HEAP32[$33>>2] = $24; - $34 = (($h) + 24|0); - HEAP32[$34>>2] = $25; - $35 = (($h) + 28|0); - HEAP32[$35>>2] = $26; - $36 = (($h) + 32|0); - HEAP32[$36>>2] = $27; - $37 = (($h) + 36|0); - HEAP32[$37>>2] = $28; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_pow22523($out,$z) { - $out = $out|0; - $z = $z|0; - var $0 = 0, $1 = 0, $2 = 0, $exitcond = 0, $exitcond10 = 0, $exitcond11 = 0, $i$74 = 0, $i$83 = 0, $i$92 = 0, $t0 = 0, $t1 = 0, $t2 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $t0 = sp + 80|0; - $t1 = sp + 40|0; - $t2 = sp; - _crypto_sign_ed25519_ref10_fe_sq($t0,$z); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t1,$z,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t0,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t0,$t0); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t0); - $i$74 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - $0 = (($i$74) + 1)|0; - $exitcond11 = ($0|0)==(50); - if ($exitcond11) { - break; - } else { - $i$74 = $0; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t1,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t2,$t1); - $i$83 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t2,$t2); - $1 = (($i$83) + 1)|0; - $exitcond10 = ($1|0)==(100); - if ($exitcond10) { - break; - } else { - $i$83 = $1; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t1,$t2,$t1); - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - $i$92 = 1; - while(1) { - _crypto_sign_ed25519_ref10_fe_sq($t1,$t1); - $2 = (($i$92) + 1)|0; - $exitcond = ($2|0)==(50); - if ($exitcond) { - break; - } else { - $i$92 = $2; - } - } - _crypto_sign_ed25519_ref10_fe_mul($t0,$t1,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t0,$t0); - _crypto_sign_ed25519_ref10_fe_sq($t0,$t0); - _crypto_sign_ed25519_ref10_fe_mul($out,$t0,$z); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_sq($h,$f) { - $h = $h|0; - $f = $f|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; - var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; - var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; - var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; - var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; - var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; - var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; - var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; - var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; - var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; - var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = $0 << 1; - $20 = $2 << 1; - $21 = $4 << 1; - $22 = $6 << 1; - $23 = $8 << 1; - $24 = $10 << 1; - $25 = $12 << 1; - $26 = $14 << 1; - $27 = ($10*38)|0; - $28 = ($12*19)|0; - $29 = ($14*38)|0; - $30 = ($16*19)|0; - $31 = ($18*38)|0; - $32 = ($0|0)<(0); - $33 = $32 << 31 >> 31; - $34 = (___muldi3(($0|0),($33|0),($0|0),($33|0))|0); - $35 = tempRet0; - $36 = ($19|0)<(0); - $37 = $36 << 31 >> 31; - $38 = ($2|0)<(0); - $39 = $38 << 31 >> 31; - $40 = (___muldi3(($19|0),($37|0),($2|0),($39|0))|0); - $41 = tempRet0; - $42 = ($4|0)<(0); - $43 = $42 << 31 >> 31; - $44 = (___muldi3(($4|0),($43|0),($19|0),($37|0))|0); - $45 = tempRet0; - $46 = ($6|0)<(0); - $47 = $46 << 31 >> 31; - $48 = (___muldi3(($6|0),($47|0),($19|0),($37|0))|0); - $49 = tempRet0; - $50 = ($8|0)<(0); - $51 = $50 << 31 >> 31; - $52 = (___muldi3(($8|0),($51|0),($19|0),($37|0))|0); - $53 = tempRet0; - $54 = ($10|0)<(0); - $55 = $54 << 31 >> 31; - $56 = (___muldi3(($10|0),($55|0),($19|0),($37|0))|0); - $57 = tempRet0; - $58 = ($12|0)<(0); - $59 = $58 << 31 >> 31; - $60 = (___muldi3(($12|0),($59|0),($19|0),($37|0))|0); - $61 = tempRet0; - $62 = ($14|0)<(0); - $63 = $62 << 31 >> 31; - $64 = (___muldi3(($14|0),($63|0),($19|0),($37|0))|0); - $65 = tempRet0; - $66 = ($16|0)<(0); - $67 = $66 << 31 >> 31; - $68 = (___muldi3(($16|0),($67|0),($19|0),($37|0))|0); - $69 = tempRet0; - $70 = ($18|0)<(0); - $71 = $70 << 31 >> 31; - $72 = (___muldi3(($18|0),($71|0),($19|0),($37|0))|0); - $73 = tempRet0; - $74 = ($20|0)<(0); - $75 = $74 << 31 >> 31; - $76 = (___muldi3(($20|0),($75|0),($2|0),($39|0))|0); - $77 = tempRet0; - $78 = (___muldi3(($20|0),($75|0),($4|0),($43|0))|0); - $79 = tempRet0; - $80 = ($22|0)<(0); - $81 = $80 << 31 >> 31; - $82 = (___muldi3(($22|0),($81|0),($20|0),($75|0))|0); - $83 = tempRet0; - $84 = (___muldi3(($8|0),($51|0),($20|0),($75|0))|0); - $85 = tempRet0; - $86 = ($24|0)<(0); - $87 = $86 << 31 >> 31; - $88 = (___muldi3(($24|0),($87|0),($20|0),($75|0))|0); - $89 = tempRet0; - $90 = (___muldi3(($12|0),($59|0),($20|0),($75|0))|0); - $91 = tempRet0; - $92 = ($26|0)<(0); - $93 = $92 << 31 >> 31; - $94 = (___muldi3(($26|0),($93|0),($20|0),($75|0))|0); - $95 = tempRet0; - $96 = (___muldi3(($16|0),($67|0),($20|0),($75|0))|0); - $97 = tempRet0; - $98 = ($31|0)<(0); - $99 = $98 << 31 >> 31; - $100 = (___muldi3(($31|0),($99|0),($20|0),($75|0))|0); - $101 = tempRet0; - $102 = (___muldi3(($4|0),($43|0),($4|0),($43|0))|0); - $103 = tempRet0; - $104 = ($21|0)<(0); - $105 = $104 << 31 >> 31; - $106 = (___muldi3(($21|0),($105|0),($6|0),($47|0))|0); - $107 = tempRet0; - $108 = (___muldi3(($8|0),($51|0),($21|0),($105|0))|0); - $109 = tempRet0; - $110 = (___muldi3(($10|0),($55|0),($21|0),($105|0))|0); - $111 = tempRet0; - $112 = (___muldi3(($12|0),($59|0),($21|0),($105|0))|0); - $113 = tempRet0; - $114 = (___muldi3(($14|0),($63|0),($21|0),($105|0))|0); - $115 = tempRet0; - $116 = ($30|0)<(0); - $117 = $116 << 31 >> 31; - $118 = (___muldi3(($30|0),($117|0),($21|0),($105|0))|0); - $119 = tempRet0; - $120 = (___muldi3(($31|0),($99|0),($4|0),($43|0))|0); - $121 = tempRet0; - $122 = (___muldi3(($22|0),($81|0),($6|0),($47|0))|0); - $123 = tempRet0; - $124 = (___muldi3(($22|0),($81|0),($8|0),($51|0))|0); - $125 = tempRet0; - $126 = (___muldi3(($24|0),($87|0),($22|0),($81|0))|0); - $127 = tempRet0; - $128 = (___muldi3(($12|0),($59|0),($22|0),($81|0))|0); - $129 = tempRet0; - $130 = ($29|0)<(0); - $131 = $130 << 31 >> 31; - $132 = (___muldi3(($29|0),($131|0),($22|0),($81|0))|0); - $133 = tempRet0; - $134 = (___muldi3(($30|0),($117|0),($22|0),($81|0))|0); - $135 = tempRet0; - $136 = (___muldi3(($31|0),($99|0),($22|0),($81|0))|0); - $137 = tempRet0; - $138 = (___muldi3(($8|0),($51|0),($8|0),($51|0))|0); - $139 = tempRet0; - $140 = ($23|0)<(0); - $141 = $140 << 31 >> 31; - $142 = (___muldi3(($23|0),($141|0),($10|0),($55|0))|0); - $143 = tempRet0; - $144 = ($28|0)<(0); - $145 = $144 << 31 >> 31; - $146 = (___muldi3(($28|0),($145|0),($23|0),($141|0))|0); - $147 = tempRet0; - $148 = (___muldi3(($29|0),($131|0),($8|0),($51|0))|0); - $149 = tempRet0; - $150 = (___muldi3(($30|0),($117|0),($23|0),($141|0))|0); - $151 = tempRet0; - $152 = (___muldi3(($31|0),($99|0),($8|0),($51|0))|0); - $153 = tempRet0; - $154 = ($27|0)<(0); - $155 = $154 << 31 >> 31; - $156 = (___muldi3(($27|0),($155|0),($10|0),($55|0))|0); - $157 = tempRet0; - $158 = (___muldi3(($28|0),($145|0),($24|0),($87|0))|0); - $159 = tempRet0; - $160 = (___muldi3(($29|0),($131|0),($24|0),($87|0))|0); - $161 = tempRet0; - $162 = (___muldi3(($30|0),($117|0),($24|0),($87|0))|0); - $163 = tempRet0; - $164 = (___muldi3(($31|0),($99|0),($24|0),($87|0))|0); - $165 = tempRet0; - $166 = (___muldi3(($28|0),($145|0),($12|0),($59|0))|0); - $167 = tempRet0; - $168 = (___muldi3(($29|0),($131|0),($12|0),($59|0))|0); - $169 = tempRet0; - $170 = ($25|0)<(0); - $171 = $170 << 31 >> 31; - $172 = (___muldi3(($30|0),($117|0),($25|0),($171|0))|0); - $173 = tempRet0; - $174 = (___muldi3(($31|0),($99|0),($12|0),($59|0))|0); - $175 = tempRet0; - $176 = (___muldi3(($29|0),($131|0),($14|0),($63|0))|0); - $177 = tempRet0; - $178 = (___muldi3(($30|0),($117|0),($26|0),($93|0))|0); - $179 = tempRet0; - $180 = (___muldi3(($31|0),($99|0),($26|0),($93|0))|0); - $181 = tempRet0; - $182 = (___muldi3(($30|0),($117|0),($16|0),($67|0))|0); - $183 = tempRet0; - $184 = (___muldi3(($31|0),($99|0),($16|0),($67|0))|0); - $185 = tempRet0; - $186 = (___muldi3(($31|0),($99|0),($18|0),($71|0))|0); - $187 = tempRet0; - $188 = (_i64Add(($156|0),($157|0),($34|0),($35|0))|0); - $189 = tempRet0; - $190 = (_i64Add(($188|0),($189|0),($146|0),($147|0))|0); - $191 = tempRet0; - $192 = (_i64Add(($190|0),($191|0),($132|0),($133|0))|0); - $193 = tempRet0; - $194 = (_i64Add(($192|0),($193|0),($118|0),($119|0))|0); - $195 = tempRet0; - $196 = (_i64Add(($194|0),($195|0),($100|0),($101|0))|0); - $197 = tempRet0; - $198 = (_i64Add(($44|0),($45|0),($76|0),($77|0))|0); - $199 = tempRet0; - $200 = (_i64Add(($48|0),($49|0),($78|0),($79|0))|0); - $201 = tempRet0; - $202 = (_i64Add(($82|0),($83|0),($102|0),($103|0))|0); - $203 = tempRet0; - $204 = (_i64Add(($202|0),($203|0),($52|0),($53|0))|0); - $205 = tempRet0; - $206 = (_i64Add(($204|0),($205|0),($176|0),($177|0))|0); - $207 = tempRet0; - $208 = (_i64Add(($206|0),($207|0),($172|0),($173|0))|0); - $209 = tempRet0; - $210 = (_i64Add(($208|0),($209|0),($164|0),($165|0))|0); - $211 = tempRet0; - $212 = (_i64Add(($196|0),($197|0),33554432,0)|0); - $213 = tempRet0; - $214 = (_bitshift64Ashr(($212|0),($213|0),26)|0); - $215 = tempRet0; - $216 = (_i64Add(($158|0),($159|0),($40|0),($41|0))|0); - $217 = tempRet0; - $218 = (_i64Add(($216|0),($217|0),($148|0),($149|0))|0); - $219 = tempRet0; - $220 = (_i64Add(($218|0),($219|0),($134|0),($135|0))|0); - $221 = tempRet0; - $222 = (_i64Add(($220|0),($221|0),($120|0),($121|0))|0); - $223 = tempRet0; - $224 = (_i64Add(($222|0),($223|0),($214|0),($215|0))|0); - $225 = tempRet0; - $226 = (_bitshift64Shl(($214|0),($215|0),26)|0); - $227 = tempRet0; - $228 = (_i64Subtract(($196|0),($197|0),($226|0),($227|0))|0); - $229 = tempRet0; - $230 = (_i64Add(($210|0),($211|0),33554432,0)|0); - $231 = tempRet0; - $232 = (_bitshift64Ashr(($230|0),($231|0),26)|0); - $233 = tempRet0; - $234 = (_i64Add(($84|0),($85|0),($106|0),($107|0))|0); - $235 = tempRet0; - $236 = (_i64Add(($234|0),($235|0),($56|0),($57|0))|0); - $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($178|0),($179|0))|0); - $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($174|0),($175|0))|0); - $241 = tempRet0; - $242 = (_i64Add(($240|0),($241|0),($232|0),($233|0))|0); - $243 = tempRet0; - $244 = (_bitshift64Shl(($232|0),($233|0),26)|0); - $245 = tempRet0; - $246 = (_i64Subtract(($210|0),($211|0),($244|0),($245|0))|0); - $247 = tempRet0; - $248 = (_i64Add(($224|0),($225|0),16777216,0)|0); - $249 = tempRet0; - $250 = (_bitshift64Ashr(($248|0),($249|0),25)|0); - $251 = tempRet0; - $252 = (_i64Add(($198|0),($199|0),($166|0),($167|0))|0); - $253 = tempRet0; - $254 = (_i64Add(($252|0),($253|0),($160|0),($161|0))|0); - $255 = tempRet0; - $256 = (_i64Add(($254|0),($255|0),($150|0),($151|0))|0); - $257 = tempRet0; - $258 = (_i64Add(($256|0),($257|0),($136|0),($137|0))|0); - $259 = tempRet0; - $260 = (_i64Add(($258|0),($259|0),($250|0),($251|0))|0); - $261 = tempRet0; - $262 = (_bitshift64Shl(($250|0),($251|0),25)|0); - $263 = tempRet0; - $264 = (_i64Subtract(($224|0),($225|0),($262|0),($263|0))|0); - $265 = tempRet0; - $266 = (_i64Add(($242|0),($243|0),16777216,0)|0); - $267 = tempRet0; - $268 = (_bitshift64Ashr(($266|0),($267|0),25)|0); - $269 = tempRet0; - $270 = (_i64Add(($122|0),($123|0),($108|0),($109|0))|0); - $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($88|0),($89|0))|0); - $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($60|0),($61|0))|0); - $275 = tempRet0; - $276 = (_i64Add(($274|0),($275|0),($182|0),($183|0))|0); - $277 = tempRet0; - $278 = (_i64Add(($276|0),($277|0),($180|0),($181|0))|0); - $279 = tempRet0; - $280 = (_i64Add(($278|0),($279|0),($268|0),($269|0))|0); - $281 = tempRet0; - $282 = (_bitshift64Shl(($268|0),($269|0),25)|0); - $283 = tempRet0; - $284 = (_i64Subtract(($242|0),($243|0),($282|0),($283|0))|0); - $285 = tempRet0; - $286 = (_i64Add(($260|0),($261|0),33554432,0)|0); - $287 = tempRet0; - $288 = (_bitshift64Ashr(($286|0),($287|0),26)|0); - $289 = tempRet0; - $290 = (_i64Add(($200|0),($201|0),($168|0),($169|0))|0); - $291 = tempRet0; - $292 = (_i64Add(($290|0),($291|0),($162|0),($163|0))|0); - $293 = tempRet0; - $294 = (_i64Add(($292|0),($293|0),($152|0),($153|0))|0); - $295 = tempRet0; - $296 = (_i64Add(($294|0),($295|0),($288|0),($289|0))|0); - $297 = tempRet0; - $298 = (_bitshift64Shl(($288|0),($289|0),26)|0); - $299 = tempRet0; - $300 = (_i64Subtract(($260|0),($261|0),($298|0),($299|0))|0); - $301 = tempRet0; - $302 = (_i64Add(($280|0),($281|0),33554432,0)|0); - $303 = tempRet0; - $304 = (_bitshift64Ashr(($302|0),($303|0),26)|0); - $305 = tempRet0; - $306 = (_i64Add(($110|0),($111|0),($124|0),($125|0))|0); - $307 = tempRet0; - $308 = (_i64Add(($306|0),($307|0),($90|0),($91|0))|0); - $309 = tempRet0; - $310 = (_i64Add(($308|0),($309|0),($64|0),($65|0))|0); - $311 = tempRet0; - $312 = (_i64Add(($310|0),($311|0),($184|0),($185|0))|0); - $313 = tempRet0; - $314 = (_i64Add(($312|0),($313|0),($304|0),($305|0))|0); - $315 = tempRet0; - $316 = (_bitshift64Shl(($304|0),($305|0),26)|0); - $317 = tempRet0; - $318 = (_i64Subtract(($280|0),($281|0),($316|0),($317|0))|0); - $319 = tempRet0; - $320 = (_i64Add(($296|0),($297|0),16777216,0)|0); - $321 = tempRet0; - $322 = (_bitshift64Ashr(($320|0),($321|0),25)|0); - $323 = tempRet0; - $324 = (_i64Add(($322|0),($323|0),($246|0),($247|0))|0); - $325 = tempRet0; - $326 = (_bitshift64Shl(($322|0),($323|0),25)|0); - $327 = tempRet0; - $328 = (_i64Subtract(($296|0),($297|0),($326|0),($327|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($314|0),($315|0),16777216,0)|0); - $331 = tempRet0; - $332 = (_bitshift64Ashr(($330|0),($331|0),25)|0); - $333 = tempRet0; - $334 = (_i64Add(($112|0),($113|0),($138|0),($139|0))|0); - $335 = tempRet0; - $336 = (_i64Add(($334|0),($335|0),($126|0),($127|0))|0); - $337 = tempRet0; - $338 = (_i64Add(($336|0),($337|0),($94|0),($95|0))|0); - $339 = tempRet0; - $340 = (_i64Add(($338|0),($339|0),($68|0),($69|0))|0); - $341 = tempRet0; - $342 = (_i64Add(($340|0),($341|0),($186|0),($187|0))|0); - $343 = tempRet0; - $344 = (_i64Add(($342|0),($343|0),($332|0),($333|0))|0); - $345 = tempRet0; - $346 = (_bitshift64Shl(($332|0),($333|0),25)|0); - $347 = tempRet0; - $348 = (_i64Subtract(($314|0),($315|0),($346|0),($347|0))|0); - $349 = tempRet0; - $350 = (_i64Add(($324|0),($325|0),33554432,0)|0); - $351 = tempRet0; - $352 = (_bitshift64Ashr(($350|0),($351|0),26)|0); - $353 = tempRet0; - $354 = (_i64Add(($284|0),($285|0),($352|0),($353|0))|0); - $355 = tempRet0; - $356 = (_bitshift64Shl(($352|0),($353|0),26)|0); - $357 = tempRet0; - $358 = (_i64Subtract(($324|0),($325|0),($356|0),($357|0))|0); - $359 = tempRet0; - $360 = (_i64Add(($344|0),($345|0),33554432,0)|0); - $361 = tempRet0; - $362 = (_bitshift64Ashr(($360|0),($361|0),26)|0); - $363 = tempRet0; - $364 = (_i64Add(($128|0),($129|0),($142|0),($143|0))|0); - $365 = tempRet0; - $366 = (_i64Add(($364|0),($365|0),($114|0),($115|0))|0); - $367 = tempRet0; - $368 = (_i64Add(($366|0),($367|0),($96|0),($97|0))|0); - $369 = tempRet0; - $370 = (_i64Add(($368|0),($369|0),($72|0),($73|0))|0); - $371 = tempRet0; - $372 = (_i64Add(($370|0),($371|0),($362|0),($363|0))|0); - $373 = tempRet0; - $374 = (_bitshift64Shl(($362|0),($363|0),26)|0); - $375 = tempRet0; - $376 = (_i64Subtract(($344|0),($345|0),($374|0),($375|0))|0); - $377 = tempRet0; - $378 = (_i64Add(($372|0),($373|0),16777216,0)|0); - $379 = tempRet0; - $380 = (_bitshift64Ashr(($378|0),($379|0),25)|0); - $381 = tempRet0; - $382 = (___muldi3(($380|0),($381|0),19,0)|0); - $383 = tempRet0; - $384 = (_i64Add(($382|0),($383|0),($228|0),($229|0))|0); - $385 = tempRet0; - $386 = (_bitshift64Shl(($380|0),($381|0),25)|0); - $387 = tempRet0; - $388 = (_i64Subtract(($372|0),($373|0),($386|0),($387|0))|0); - $389 = tempRet0; - $390 = (_i64Add(($384|0),($385|0),33554432,0)|0); - $391 = tempRet0; - $392 = (_bitshift64Ashr(($390|0),($391|0),26)|0); - $393 = tempRet0; - $394 = (_i64Add(($264|0),($265|0),($392|0),($393|0))|0); - $395 = tempRet0; - $396 = (_bitshift64Shl(($392|0),($393|0),26)|0); - $397 = tempRet0; - $398 = (_i64Subtract(($384|0),($385|0),($396|0),($397|0))|0); - $399 = tempRet0; - HEAP32[$h>>2] = $398; - $400 = (($h) + 4|0); - HEAP32[$400>>2] = $394; - $401 = (($h) + 8|0); - HEAP32[$401>>2] = $300; - $402 = (($h) + 12|0); - HEAP32[$402>>2] = $328; - $403 = (($h) + 16|0); - HEAP32[$403>>2] = $358; - $404 = (($h) + 20|0); - HEAP32[$404>>2] = $354; - $405 = (($h) + 24|0); - HEAP32[$405>>2] = $318; - $406 = (($h) + 28|0); - HEAP32[$406>>2] = $348; - $407 = (($h) + 32|0); - HEAP32[$407>>2] = $376; - $408 = (($h) + 36|0); - HEAP32[$408>>2] = $388; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_sq2($h,$f) { - $h = $h|0; - $f = $f|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; - var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; - var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; - var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; - var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; - var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; - var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; - var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; - var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; - var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; - var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; - var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = $0 << 1; - $20 = $2 << 1; - $21 = $4 << 1; - $22 = $6 << 1; - $23 = $8 << 1; - $24 = $10 << 1; - $25 = $12 << 1; - $26 = $14 << 1; - $27 = ($10*38)|0; - $28 = ($12*19)|0; - $29 = ($14*38)|0; - $30 = ($16*19)|0; - $31 = ($18*38)|0; - $32 = ($0|0)<(0); - $33 = $32 << 31 >> 31; - $34 = (___muldi3(($0|0),($33|0),($0|0),($33|0))|0); - $35 = tempRet0; - $36 = ($19|0)<(0); - $37 = $36 << 31 >> 31; - $38 = ($2|0)<(0); - $39 = $38 << 31 >> 31; - $40 = (___muldi3(($19|0),($37|0),($2|0),($39|0))|0); - $41 = tempRet0; - $42 = ($4|0)<(0); - $43 = $42 << 31 >> 31; - $44 = (___muldi3(($4|0),($43|0),($19|0),($37|0))|0); - $45 = tempRet0; - $46 = ($6|0)<(0); - $47 = $46 << 31 >> 31; - $48 = (___muldi3(($6|0),($47|0),($19|0),($37|0))|0); - $49 = tempRet0; - $50 = ($8|0)<(0); - $51 = $50 << 31 >> 31; - $52 = (___muldi3(($8|0),($51|0),($19|0),($37|0))|0); - $53 = tempRet0; - $54 = ($10|0)<(0); - $55 = $54 << 31 >> 31; - $56 = (___muldi3(($10|0),($55|0),($19|0),($37|0))|0); - $57 = tempRet0; - $58 = ($12|0)<(0); - $59 = $58 << 31 >> 31; - $60 = (___muldi3(($12|0),($59|0),($19|0),($37|0))|0); - $61 = tempRet0; - $62 = ($14|0)<(0); - $63 = $62 << 31 >> 31; - $64 = (___muldi3(($14|0),($63|0),($19|0),($37|0))|0); - $65 = tempRet0; - $66 = ($16|0)<(0); - $67 = $66 << 31 >> 31; - $68 = (___muldi3(($16|0),($67|0),($19|0),($37|0))|0); - $69 = tempRet0; - $70 = ($18|0)<(0); - $71 = $70 << 31 >> 31; - $72 = (___muldi3(($18|0),($71|0),($19|0),($37|0))|0); - $73 = tempRet0; - $74 = ($20|0)<(0); - $75 = $74 << 31 >> 31; - $76 = (___muldi3(($20|0),($75|0),($2|0),($39|0))|0); - $77 = tempRet0; - $78 = (___muldi3(($20|0),($75|0),($4|0),($43|0))|0); - $79 = tempRet0; - $80 = ($22|0)<(0); - $81 = $80 << 31 >> 31; - $82 = (___muldi3(($22|0),($81|0),($20|0),($75|0))|0); - $83 = tempRet0; - $84 = (___muldi3(($8|0),($51|0),($20|0),($75|0))|0); - $85 = tempRet0; - $86 = ($24|0)<(0); - $87 = $86 << 31 >> 31; - $88 = (___muldi3(($24|0),($87|0),($20|0),($75|0))|0); - $89 = tempRet0; - $90 = (___muldi3(($12|0),($59|0),($20|0),($75|0))|0); - $91 = tempRet0; - $92 = ($26|0)<(0); - $93 = $92 << 31 >> 31; - $94 = (___muldi3(($26|0),($93|0),($20|0),($75|0))|0); - $95 = tempRet0; - $96 = (___muldi3(($16|0),($67|0),($20|0),($75|0))|0); - $97 = tempRet0; - $98 = ($31|0)<(0); - $99 = $98 << 31 >> 31; - $100 = (___muldi3(($31|0),($99|0),($20|0),($75|0))|0); - $101 = tempRet0; - $102 = (___muldi3(($4|0),($43|0),($4|0),($43|0))|0); - $103 = tempRet0; - $104 = ($21|0)<(0); - $105 = $104 << 31 >> 31; - $106 = (___muldi3(($21|0),($105|0),($6|0),($47|0))|0); - $107 = tempRet0; - $108 = (___muldi3(($8|0),($51|0),($21|0),($105|0))|0); - $109 = tempRet0; - $110 = (___muldi3(($10|0),($55|0),($21|0),($105|0))|0); - $111 = tempRet0; - $112 = (___muldi3(($12|0),($59|0),($21|0),($105|0))|0); - $113 = tempRet0; - $114 = (___muldi3(($14|0),($63|0),($21|0),($105|0))|0); - $115 = tempRet0; - $116 = ($30|0)<(0); - $117 = $116 << 31 >> 31; - $118 = (___muldi3(($30|0),($117|0),($21|0),($105|0))|0); - $119 = tempRet0; - $120 = (___muldi3(($31|0),($99|0),($4|0),($43|0))|0); - $121 = tempRet0; - $122 = (___muldi3(($22|0),($81|0),($6|0),($47|0))|0); - $123 = tempRet0; - $124 = (___muldi3(($22|0),($81|0),($8|0),($51|0))|0); - $125 = tempRet0; - $126 = (___muldi3(($24|0),($87|0),($22|0),($81|0))|0); - $127 = tempRet0; - $128 = (___muldi3(($12|0),($59|0),($22|0),($81|0))|0); - $129 = tempRet0; - $130 = ($29|0)<(0); - $131 = $130 << 31 >> 31; - $132 = (___muldi3(($29|0),($131|0),($22|0),($81|0))|0); - $133 = tempRet0; - $134 = (___muldi3(($30|0),($117|0),($22|0),($81|0))|0); - $135 = tempRet0; - $136 = (___muldi3(($31|0),($99|0),($22|0),($81|0))|0); - $137 = tempRet0; - $138 = (___muldi3(($8|0),($51|0),($8|0),($51|0))|0); - $139 = tempRet0; - $140 = ($23|0)<(0); - $141 = $140 << 31 >> 31; - $142 = (___muldi3(($23|0),($141|0),($10|0),($55|0))|0); - $143 = tempRet0; - $144 = ($28|0)<(0); - $145 = $144 << 31 >> 31; - $146 = (___muldi3(($28|0),($145|0),($23|0),($141|0))|0); - $147 = tempRet0; - $148 = (___muldi3(($29|0),($131|0),($8|0),($51|0))|0); - $149 = tempRet0; - $150 = (___muldi3(($30|0),($117|0),($23|0),($141|0))|0); - $151 = tempRet0; - $152 = (___muldi3(($31|0),($99|0),($8|0),($51|0))|0); - $153 = tempRet0; - $154 = ($27|0)<(0); - $155 = $154 << 31 >> 31; - $156 = (___muldi3(($27|0),($155|0),($10|0),($55|0))|0); - $157 = tempRet0; - $158 = (___muldi3(($28|0),($145|0),($24|0),($87|0))|0); - $159 = tempRet0; - $160 = (___muldi3(($29|0),($131|0),($24|0),($87|0))|0); - $161 = tempRet0; - $162 = (___muldi3(($30|0),($117|0),($24|0),($87|0))|0); - $163 = tempRet0; - $164 = (___muldi3(($31|0),($99|0),($24|0),($87|0))|0); - $165 = tempRet0; - $166 = (___muldi3(($28|0),($145|0),($12|0),($59|0))|0); - $167 = tempRet0; - $168 = (___muldi3(($29|0),($131|0),($12|0),($59|0))|0); - $169 = tempRet0; - $170 = ($25|0)<(0); - $171 = $170 << 31 >> 31; - $172 = (___muldi3(($30|0),($117|0),($25|0),($171|0))|0); - $173 = tempRet0; - $174 = (___muldi3(($31|0),($99|0),($12|0),($59|0))|0); - $175 = tempRet0; - $176 = (___muldi3(($29|0),($131|0),($14|0),($63|0))|0); - $177 = tempRet0; - $178 = (___muldi3(($30|0),($117|0),($26|0),($93|0))|0); - $179 = tempRet0; - $180 = (___muldi3(($31|0),($99|0),($26|0),($93|0))|0); - $181 = tempRet0; - $182 = (___muldi3(($30|0),($117|0),($16|0),($67|0))|0); - $183 = tempRet0; - $184 = (___muldi3(($31|0),($99|0),($16|0),($67|0))|0); - $185 = tempRet0; - $186 = (___muldi3(($31|0),($99|0),($18|0),($71|0))|0); - $187 = tempRet0; - $188 = (_i64Add(($156|0),($157|0),($34|0),($35|0))|0); - $189 = tempRet0; - $190 = (_i64Add(($188|0),($189|0),($146|0),($147|0))|0); - $191 = tempRet0; - $192 = (_i64Add(($190|0),($191|0),($132|0),($133|0))|0); - $193 = tempRet0; - $194 = (_i64Add(($192|0),($193|0),($118|0),($119|0))|0); - $195 = tempRet0; - $196 = (_i64Add(($194|0),($195|0),($100|0),($101|0))|0); - $197 = tempRet0; - $198 = (_i64Add(($158|0),($159|0),($40|0),($41|0))|0); - $199 = tempRet0; - $200 = (_i64Add(($198|0),($199|0),($148|0),($149|0))|0); - $201 = tempRet0; - $202 = (_i64Add(($200|0),($201|0),($134|0),($135|0))|0); - $203 = tempRet0; - $204 = (_i64Add(($202|0),($203|0),($120|0),($121|0))|0); - $205 = tempRet0; - $206 = (_i64Add(($44|0),($45|0),($76|0),($77|0))|0); - $207 = tempRet0; - $208 = (_i64Add(($206|0),($207|0),($166|0),($167|0))|0); - $209 = tempRet0; - $210 = (_i64Add(($208|0),($209|0),($160|0),($161|0))|0); - $211 = tempRet0; - $212 = (_i64Add(($210|0),($211|0),($150|0),($151|0))|0); - $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($136|0),($137|0))|0); - $215 = tempRet0; - $216 = (_i64Add(($48|0),($49|0),($78|0),($79|0))|0); - $217 = tempRet0; - $218 = (_i64Add(($216|0),($217|0),($168|0),($169|0))|0); - $219 = tempRet0; - $220 = (_i64Add(($218|0),($219|0),($162|0),($163|0))|0); - $221 = tempRet0; - $222 = (_i64Add(($220|0),($221|0),($152|0),($153|0))|0); - $223 = tempRet0; - $224 = (_i64Add(($82|0),($83|0),($102|0),($103|0))|0); - $225 = tempRet0; - $226 = (_i64Add(($224|0),($225|0),($52|0),($53|0))|0); - $227 = tempRet0; - $228 = (_i64Add(($226|0),($227|0),($176|0),($177|0))|0); - $229 = tempRet0; - $230 = (_i64Add(($228|0),($229|0),($172|0),($173|0))|0); - $231 = tempRet0; - $232 = (_i64Add(($230|0),($231|0),($164|0),($165|0))|0); - $233 = tempRet0; - $234 = (_i64Add(($84|0),($85|0),($106|0),($107|0))|0); - $235 = tempRet0; - $236 = (_i64Add(($234|0),($235|0),($56|0),($57|0))|0); - $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($178|0),($179|0))|0); - $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($174|0),($175|0))|0); - $241 = tempRet0; - $242 = (_i64Add(($122|0),($123|0),($108|0),($109|0))|0); - $243 = tempRet0; - $244 = (_i64Add(($242|0),($243|0),($88|0),($89|0))|0); - $245 = tempRet0; - $246 = (_i64Add(($244|0),($245|0),($60|0),($61|0))|0); - $247 = tempRet0; - $248 = (_i64Add(($246|0),($247|0),($182|0),($183|0))|0); - $249 = tempRet0; - $250 = (_i64Add(($248|0),($249|0),($180|0),($181|0))|0); - $251 = tempRet0; - $252 = (_i64Add(($110|0),($111|0),($124|0),($125|0))|0); - $253 = tempRet0; - $254 = (_i64Add(($252|0),($253|0),($90|0),($91|0))|0); - $255 = tempRet0; - $256 = (_i64Add(($254|0),($255|0),($64|0),($65|0))|0); - $257 = tempRet0; - $258 = (_i64Add(($256|0),($257|0),($184|0),($185|0))|0); - $259 = tempRet0; - $260 = (_i64Add(($112|0),($113|0),($138|0),($139|0))|0); - $261 = tempRet0; - $262 = (_i64Add(($260|0),($261|0),($126|0),($127|0))|0); - $263 = tempRet0; - $264 = (_i64Add(($262|0),($263|0),($94|0),($95|0))|0); - $265 = tempRet0; - $266 = (_i64Add(($264|0),($265|0),($68|0),($69|0))|0); - $267 = tempRet0; - $268 = (_i64Add(($266|0),($267|0),($186|0),($187|0))|0); - $269 = tempRet0; - $270 = (_i64Add(($128|0),($129|0),($142|0),($143|0))|0); - $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($114|0),($115|0))|0); - $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($96|0),($97|0))|0); - $275 = tempRet0; - $276 = (_i64Add(($274|0),($275|0),($72|0),($73|0))|0); - $277 = tempRet0; - $278 = (_bitshift64Shl(($196|0),($197|0),1)|0); - $279 = tempRet0; - $280 = (_bitshift64Shl(($204|0),($205|0),1)|0); - $281 = tempRet0; - $282 = (_bitshift64Shl(($214|0),($215|0),1)|0); - $283 = tempRet0; - $284 = (_bitshift64Shl(($222|0),($223|0),1)|0); - $285 = tempRet0; - $286 = (_bitshift64Shl(($232|0),($233|0),1)|0); - $287 = tempRet0; - $288 = (_bitshift64Shl(($240|0),($241|0),1)|0); - $289 = tempRet0; - $290 = (_bitshift64Shl(($250|0),($251|0),1)|0); - $291 = tempRet0; - $292 = (_bitshift64Shl(($258|0),($259|0),1)|0); - $293 = tempRet0; - $294 = (_bitshift64Shl(($268|0),($269|0),1)|0); - $295 = tempRet0; - $296 = (_bitshift64Shl(($276|0),($277|0),1)|0); - $297 = tempRet0; - $298 = (_i64Add(($278|0),($279|0),33554432,0)|0); - $299 = tempRet0; - $300 = (_bitshift64Ashr(($298|0),($299|0),26)|0); - $301 = tempRet0; - $302 = (_i64Add(($300|0),($301|0),($280|0),($281|0))|0); - $303 = tempRet0; - $304 = (_bitshift64Shl(($300|0),($301|0),26)|0); - $305 = tempRet0; - $306 = (_i64Subtract(($278|0),($279|0),($304|0),($305|0))|0); - $307 = tempRet0; - $308 = (_i64Add(($286|0),($287|0),33554432,0)|0); - $309 = tempRet0; - $310 = (_bitshift64Ashr(($308|0),($309|0),26)|0); - $311 = tempRet0; - $312 = (_i64Add(($310|0),($311|0),($288|0),($289|0))|0); - $313 = tempRet0; - $314 = (_bitshift64Shl(($310|0),($311|0),26)|0); - $315 = tempRet0; - $316 = (_i64Subtract(($286|0),($287|0),($314|0),($315|0))|0); - $317 = tempRet0; - $318 = (_i64Add(($302|0),($303|0),16777216,0)|0); - $319 = tempRet0; - $320 = (_bitshift64Ashr(($318|0),($319|0),25)|0); - $321 = tempRet0; - $322 = (_i64Add(($320|0),($321|0),($282|0),($283|0))|0); - $323 = tempRet0; - $324 = (_bitshift64Shl(($320|0),($321|0),25)|0); - $325 = tempRet0; - $326 = (_i64Subtract(($302|0),($303|0),($324|0),($325|0))|0); - $327 = tempRet0; - $328 = (_i64Add(($312|0),($313|0),16777216,0)|0); - $329 = tempRet0; - $330 = (_bitshift64Ashr(($328|0),($329|0),25)|0); - $331 = tempRet0; - $332 = (_i64Add(($330|0),($331|0),($290|0),($291|0))|0); - $333 = tempRet0; - $334 = (_bitshift64Shl(($330|0),($331|0),25)|0); - $335 = tempRet0; - $336 = (_i64Subtract(($312|0),($313|0),($334|0),($335|0))|0); - $337 = tempRet0; - $338 = (_i64Add(($322|0),($323|0),33554432,0)|0); - $339 = tempRet0; - $340 = (_bitshift64Ashr(($338|0),($339|0),26)|0); - $341 = tempRet0; - $342 = (_i64Add(($340|0),($341|0),($284|0),($285|0))|0); - $343 = tempRet0; - $344 = (_bitshift64Shl(($340|0),($341|0),26)|0); - $345 = tempRet0; - $346 = (_i64Subtract(($322|0),($323|0),($344|0),($345|0))|0); - $347 = tempRet0; - $348 = (_i64Add(($332|0),($333|0),33554432,0)|0); - $349 = tempRet0; - $350 = (_bitshift64Ashr(($348|0),($349|0),26)|0); - $351 = tempRet0; - $352 = (_i64Add(($350|0),($351|0),($292|0),($293|0))|0); - $353 = tempRet0; - $354 = (_bitshift64Shl(($350|0),($351|0),26)|0); - $355 = tempRet0; - $356 = (_i64Subtract(($332|0),($333|0),($354|0),($355|0))|0); - $357 = tempRet0; - $358 = (_i64Add(($342|0),($343|0),16777216,0)|0); - $359 = tempRet0; - $360 = (_bitshift64Ashr(($358|0),($359|0),25)|0); - $361 = tempRet0; - $362 = (_i64Add(($360|0),($361|0),($316|0),($317|0))|0); - $363 = tempRet0; - $364 = (_bitshift64Shl(($360|0),($361|0),25)|0); - $365 = tempRet0; - $366 = (_i64Subtract(($342|0),($343|0),($364|0),($365|0))|0); - $367 = tempRet0; - $368 = (_i64Add(($352|0),($353|0),16777216,0)|0); - $369 = tempRet0; - $370 = (_bitshift64Ashr(($368|0),($369|0),25)|0); - $371 = tempRet0; - $372 = (_i64Add(($370|0),($371|0),($294|0),($295|0))|0); - $373 = tempRet0; - $374 = (_bitshift64Shl(($370|0),($371|0),25)|0); - $375 = tempRet0; - $376 = (_i64Subtract(($352|0),($353|0),($374|0),($375|0))|0); - $377 = tempRet0; - $378 = (_i64Add(($362|0),($363|0),33554432,0)|0); - $379 = tempRet0; - $380 = (_bitshift64Ashr(($378|0),($379|0),26)|0); - $381 = tempRet0; - $382 = (_i64Add(($336|0),($337|0),($380|0),($381|0))|0); - $383 = tempRet0; - $384 = (_bitshift64Shl(($380|0),($381|0),26)|0); - $385 = tempRet0; - $386 = (_i64Subtract(($362|0),($363|0),($384|0),($385|0))|0); - $387 = tempRet0; - $388 = (_i64Add(($372|0),($373|0),33554432,0)|0); - $389 = tempRet0; - $390 = (_bitshift64Ashr(($388|0),($389|0),26)|0); - $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($296|0),($297|0))|0); - $393 = tempRet0; - $394 = (_bitshift64Shl(($390|0),($391|0),26)|0); - $395 = tempRet0; - $396 = (_i64Subtract(($372|0),($373|0),($394|0),($395|0))|0); - $397 = tempRet0; - $398 = (_i64Add(($392|0),($393|0),16777216,0)|0); - $399 = tempRet0; - $400 = (_bitshift64Ashr(($398|0),($399|0),25)|0); - $401 = tempRet0; - $402 = (___muldi3(($400|0),($401|0),19,0)|0); - $403 = tempRet0; - $404 = (_i64Add(($402|0),($403|0),($306|0),($307|0))|0); - $405 = tempRet0; - $406 = (_bitshift64Shl(($400|0),($401|0),25)|0); - $407 = tempRet0; - $408 = (_i64Subtract(($392|0),($393|0),($406|0),($407|0))|0); - $409 = tempRet0; - $410 = (_i64Add(($404|0),($405|0),33554432,0)|0); - $411 = tempRet0; - $412 = (_bitshift64Ashr(($410|0),($411|0),26)|0); - $413 = tempRet0; - $414 = (_i64Add(($326|0),($327|0),($412|0),($413|0))|0); - $415 = tempRet0; - $416 = (_bitshift64Shl(($412|0),($413|0),26)|0); - $417 = tempRet0; - $418 = (_i64Subtract(($404|0),($405|0),($416|0),($417|0))|0); - $419 = tempRet0; - HEAP32[$h>>2] = $418; - $420 = (($h) + 4|0); - HEAP32[$420>>2] = $414; - $421 = (($h) + 8|0); - HEAP32[$421>>2] = $346; - $422 = (($h) + 12|0); - HEAP32[$422>>2] = $366; - $423 = (($h) + 16|0); - HEAP32[$423>>2] = $386; - $424 = (($h) + 20|0); - HEAP32[$424>>2] = $382; - $425 = (($h) + 24|0); - HEAP32[$425>>2] = $356; - $426 = (($h) + 28|0); - HEAP32[$426>>2] = $376; - $427 = (($h) + 32|0); - HEAP32[$427>>2] = $396; - $428 = (($h) + 36|0); - HEAP32[$428>>2] = $408; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_sub($h,$f,$g) { - $h = $h|0; - $f = $f|0; - $g = $g|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); - $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); - $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); - $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); - $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); - $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); - $37 = HEAP32[$36>>2]|0; - $38 = (($0) - ($19))|0; - $39 = (($2) - ($21))|0; - $40 = (($4) - ($23))|0; - $41 = (($6) - ($25))|0; - $42 = (($8) - ($27))|0; - $43 = (($10) - ($29))|0; - $44 = (($12) - ($31))|0; - $45 = (($14) - ($33))|0; - $46 = (($16) - ($35))|0; - $47 = (($18) - ($37))|0; - HEAP32[$h>>2] = $38; - $48 = (($h) + 4|0); - HEAP32[$48>>2] = $39; - $49 = (($h) + 8|0); - HEAP32[$49>>2] = $40; - $50 = (($h) + 12|0); - HEAP32[$50>>2] = $41; - $51 = (($h) + 16|0); - HEAP32[$51>>2] = $42; - $52 = (($h) + 20|0); - HEAP32[$52>>2] = $43; - $53 = (($h) + 24|0); - HEAP32[$53>>2] = $44; - $54 = (($h) + 28|0); - HEAP32[$54>>2] = $45; - $55 = (($h) + 32|0); - HEAP32[$55>>2] = $46; - $56 = (($h) + 36|0); - HEAP32[$56>>2] = $47; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_fe_tobytes($s,$h) { - $s = $s|0; - $h = $h|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; - var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; - var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; - var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; - var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[$h>>2]|0; - $1 = (($h) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($h) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($h) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($h) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = (($h) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($h) + 24|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($h) + 28|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($h) + 32|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($h) + 36|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($18*19)|0; - $20 = (($19) + 16777216)|0; - $21 = $20 >> 25; - $22 = (($21) + ($0))|0; - $23 = $22 >> 26; - $24 = (($23) + ($2))|0; - $25 = $24 >> 25; - $26 = (($25) + ($4))|0; - $27 = $26 >> 26; - $28 = (($27) + ($6))|0; - $29 = $28 >> 25; - $30 = (($29) + ($8))|0; - $31 = $30 >> 26; - $32 = (($31) + ($10))|0; - $33 = $32 >> 25; - $34 = (($33) + ($12))|0; - $35 = $34 >> 26; - $36 = (($35) + ($14))|0; - $37 = $36 >> 25; - $38 = (($37) + ($16))|0; - $39 = $38 >> 26; - $40 = (($39) + ($18))|0; - $41 = $40 >> 25; - $42 = ($41*19)|0; - $43 = (($42) + ($0))|0; - $44 = $43 >> 26; - $45 = (($44) + ($2))|0; - $46 = $44 << 26; - $47 = (($43) - ($46))|0; - $48 = $45 >> 25; - $49 = (($48) + ($4))|0; - $50 = $48 << 25; - $51 = (($45) - ($50))|0; - $52 = $49 >> 26; - $53 = (($52) + ($6))|0; - $54 = $52 << 26; - $55 = (($49) - ($54))|0; - $56 = $53 >> 25; - $57 = (($56) + ($8))|0; - $58 = $56 << 25; - $59 = (($53) - ($58))|0; - $60 = $57 >> 26; - $61 = (($60) + ($10))|0; - $62 = $60 << 26; - $63 = (($57) - ($62))|0; - $64 = $61 >> 25; - $65 = (($64) + ($12))|0; - $66 = $64 << 25; - $67 = (($61) - ($66))|0; - $68 = $65 >> 26; - $69 = (($68) + ($14))|0; - $70 = $68 << 26; - $71 = (($65) - ($70))|0; - $72 = $69 >> 25; - $73 = (($72) + ($16))|0; - $74 = $72 << 25; - $75 = (($69) - ($74))|0; - $76 = $73 >> 26; - $77 = (($76) + ($18))|0; - $78 = $76 << 26; - $79 = (($73) - ($78))|0; - $80 = $77 & 33554431; - $81 = $47&255; - HEAP8[$s>>0] = $81; - $82 = $47 >>> 8; - $83 = $82&255; - $84 = (($s) + 1|0); - HEAP8[$84>>0] = $83; - $85 = $47 >>> 16; - $86 = $85&255; - $87 = (($s) + 2|0); - HEAP8[$87>>0] = $86; - $88 = $47 >>> 24; - $89 = $51 << 2; - $90 = $89 | $88; - $91 = $90&255; - $92 = (($s) + 3|0); - HEAP8[$92>>0] = $91; - $93 = $51 >>> 6; - $94 = $93&255; - $95 = (($s) + 4|0); - HEAP8[$95>>0] = $94; - $96 = $51 >>> 14; - $97 = $96&255; - $98 = (($s) + 5|0); - HEAP8[$98>>0] = $97; - $99 = $51 >>> 22; - $100 = $55 << 3; - $101 = $100 | $99; - $102 = $101&255; - $103 = (($s) + 6|0); - HEAP8[$103>>0] = $102; - $104 = $55 >>> 5; - $105 = $104&255; - $106 = (($s) + 7|0); - HEAP8[$106>>0] = $105; - $107 = $55 >>> 13; - $108 = $107&255; - $109 = (($s) + 8|0); - HEAP8[$109>>0] = $108; - $110 = $55 >>> 21; - $111 = $59 << 5; - $112 = $111 | $110; - $113 = $112&255; - $114 = (($s) + 9|0); - HEAP8[$114>>0] = $113; - $115 = $59 >>> 3; - $116 = $115&255; - $117 = (($s) + 10|0); - HEAP8[$117>>0] = $116; - $118 = $59 >>> 11; - $119 = $118&255; - $120 = (($s) + 11|0); - HEAP8[$120>>0] = $119; - $121 = $59 >>> 19; - $122 = $63 << 6; - $123 = $122 | $121; - $124 = $123&255; - $125 = (($s) + 12|0); - HEAP8[$125>>0] = $124; - $126 = $63 >>> 2; - $127 = $126&255; - $128 = (($s) + 13|0); - HEAP8[$128>>0] = $127; - $129 = $63 >>> 10; - $130 = $129&255; - $131 = (($s) + 14|0); - HEAP8[$131>>0] = $130; - $132 = $63 >>> 18; - $133 = $132&255; - $134 = (($s) + 15|0); - HEAP8[$134>>0] = $133; - $135 = $67&255; - $136 = (($s) + 16|0); - HEAP8[$136>>0] = $135; - $137 = $67 >>> 8; - $138 = $137&255; - $139 = (($s) + 17|0); - HEAP8[$139>>0] = $138; - $140 = $67 >>> 16; - $141 = $140&255; - $142 = (($s) + 18|0); - HEAP8[$142>>0] = $141; - $143 = $67 >>> 24; - $144 = $71 << 1; - $145 = $144 | $143; - $146 = $145&255; - $147 = (($s) + 19|0); - HEAP8[$147>>0] = $146; - $148 = $71 >>> 7; - $149 = $148&255; - $150 = (($s) + 20|0); - HEAP8[$150>>0] = $149; - $151 = $71 >>> 15; - $152 = $151&255; - $153 = (($s) + 21|0); - HEAP8[$153>>0] = $152; - $154 = $71 >>> 23; - $155 = $75 << 3; - $156 = $155 | $154; - $157 = $156&255; - $158 = (($s) + 22|0); - HEAP8[$158>>0] = $157; - $159 = $75 >>> 5; - $160 = $159&255; - $161 = (($s) + 23|0); - HEAP8[$161>>0] = $160; - $162 = $75 >>> 13; - $163 = $162&255; - $164 = (($s) + 24|0); - HEAP8[$164>>0] = $163; - $165 = $75 >>> 21; - $166 = $79 << 4; - $167 = $166 | $165; - $168 = $167&255; - $169 = (($s) + 25|0); - HEAP8[$169>>0] = $168; - $170 = $79 >>> 4; - $171 = $170&255; - $172 = (($s) + 26|0); - HEAP8[$172>>0] = $171; - $173 = $79 >>> 12; - $174 = $173&255; - $175 = (($s) + 27|0); - HEAP8[$175>>0] = $174; - $176 = $79 >>> 20; - $177 = $80 << 6; - $178 = $176 | $177; - $179 = $178&255; - $180 = (($s) + 28|0); - HEAP8[$180>>0] = $179; - $181 = $77 >>> 2; - $182 = $181&255; - $183 = (($s) + 29|0); - HEAP8[$183>>0] = $182; - $184 = $77 >>> 10; - $185 = $184&255; - $186 = (($s) + 30|0); - HEAP8[$186>>0] = $185; - $187 = $80 >>> 18; - $188 = $187&255; - $189 = (($s) + 31|0); - HEAP8[$189>>0] = $188; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_add($r,$p,$q) { - $r = $r|0; - $p = $p|0; - $q = $q|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); - $3 = (($q) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); - $4 = (($r) + 120|0); - $5 = (($q) + 120|0); - $6 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - $8 = (($q) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); - _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); - _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($2,$t0,$4); - _crypto_sign_ed25519_ref10_fe_sub($4,$t0,$4); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { - $r = $r|0; - $a = $a|0; - $A = $A|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, $A2 = 0, $Ai = 0, $aslide = 0, $bslide = 0, $i$0$lcssa = 0, $i$02 = 0, $i$11 = 0, $t = 0, $u = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2272|0; - $aslide = sp + 2016|0; - $bslide = sp + 1760|0; - $Ai = sp + 480|0; - $t = sp + 320|0; - $u = sp + 160|0; - $A2 = sp; - _slide($aslide,$a); - _slide($bslide,$b); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($Ai,$A); - _crypto_sign_ed25519_ref10_ge_p3_dbl($t,$A); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($A2,$t); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$Ai); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $0 = (($Ai) + 160|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($0,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$0); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $1 = (($Ai) + 320|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($1,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$1); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $2 = (($Ai) + 480|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($2,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$2); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $3 = (($Ai) + 640|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($3,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$3); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $4 = (($Ai) + 800|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($4,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$4); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $5 = (($Ai) + 960|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($5,$u); - _crypto_sign_ed25519_ref10_ge_add($t,$A2,$5); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $6 = (($Ai) + 1120|0); - _crypto_sign_ed25519_ref10_ge_p3_to_cached($6,$u); - _crypto_sign_ed25519_ref10_ge_p2_0($r); - $i$02 = 255; - while(1) { - $8 = (($aslide) + ($i$02)|0); - $9 = HEAP8[$8>>0]|0; - $10 = ($9<<24>>24)==(0); - if (!($10)) { - $i$0$lcssa = $i$02; - break; - } - $11 = (($bslide) + ($i$02)|0); - $12 = HEAP8[$11>>0]|0; - $13 = ($12<<24>>24)==(0); - $14 = (($i$02) + -1)|0; - if (!($13)) { - $i$0$lcssa = $i$02; - break; - } - $7 = ($i$02|0)>(0); - if ($7) { - $i$02 = $14; - } else { - $i$0$lcssa = $14; - break; - } - } - $15 = ($i$0$lcssa|0)>(-1); - if ($15) { - $i$11 = $i$0$lcssa; - } else { - STACKTOP = sp;return; - } - while(1) { - _crypto_sign_ed25519_ref10_ge_p2_dbl($t,$r); - $16 = (($aslide) + ($i$11)|0); - $17 = HEAP8[$16>>0]|0; - $18 = ($17<<24>>24)>(0); - if ($18) { - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $19 = HEAP8[$16>>0]|0; - $20 = $19 << 24 >> 24; - $21 = (($20|0) / 2)&-1; - $22 = (($Ai) + (($21*160)|0)|0); - _crypto_sign_ed25519_ref10_ge_add($t,$u,$22); - } else { - $23 = ($17<<24>>24)<(0); - if ($23) { - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $24 = HEAP8[$16>>0]|0; - $25 = $24 << 24 >> 24; - $26 = (($25|0) / -2)&-1; - $27 = (($Ai) + (($26*160)|0)|0); - _crypto_sign_ed25519_ref10_ge_sub($t,$u,$27); - } - } - $28 = (($bslide) + ($i$11)|0); - $29 = HEAP8[$28>>0]|0; - $30 = ($29<<24>>24)>(0); - if ($30) { - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $31 = HEAP8[$28>>0]|0; - $32 = $31 << 24 >> 24; - $33 = (($32|0) / 2)&-1; - $34 = (40 + (($33*120)|0)|0); - _crypto_sign_ed25519_ref10_ge_madd($t,$u,$34); - } else { - $35 = ($29<<24>>24)<(0); - if ($35) { - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $36 = HEAP8[$28>>0]|0; - $37 = $36 << 24 >> 24; - $38 = (($37|0) / -2)&-1; - $39 = (40 + (($38*120)|0)|0); - _crypto_sign_ed25519_ref10_ge_msub($t,$u,$39); - } - } - _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($r,$t); - $40 = (($i$11) + -1)|0; - $41 = ($i$11|0)>(0); - if ($41) { - $i$11 = $40; - } else { - break; - } - } - STACKTOP = sp;return; -} -function _slide($r,$a) { - $r = $r|0; - $a = $a|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$03 = 0, $exitcond = 0, $exitcond10 = 0; - var $i$08 = 0, $i$15 = 0, $k$01 = 0, label = 0, sp = 0; - sp = STACKTOP; - $i$08 = 0; - while(1) { - $0 = $i$08 >> 3; - $1 = (($a) + ($0)|0); - $2 = HEAP8[$1>>0]|0; - $3 = $2&255; - $4 = $i$08 & 7; - $5 = $3 >>> $4; - $6 = $5 & 1; - $7 = $6&255; - $8 = (($r) + ($i$08)|0); - HEAP8[$8>>0] = $7; - $9 = (($i$08) + 1)|0; - $exitcond10 = ($9|0)==(256); - if ($exitcond10) { - $i$15 = 0; - break; - } else { - $i$08 = $9; - } - } - while(1) { - $10 = (($r) + ($i$15)|0); - $11 = HEAP8[$10>>0]|0; - $12 = ($11<<24>>24)==(0); - L5: do { - if (!($12)) { - $b$03 = 1; - while(1) { - $13 = (($b$03) + ($i$15))|0; - $14 = ($13|0)<(256); - if (!($14)) { - break L5; - } - $15 = (($r) + ($13)|0); - $16 = HEAP8[$15>>0]|0; - $17 = ($16<<24>>24)==(0); - L9: do { - if (!($17)) { - $18 = HEAP8[$10>>0]|0; - $19 = $18 << 24 >> 24; - $20 = $16 << 24 >> 24; - $21 = $20 << $b$03; - $22 = (($19) + ($21))|0; - $23 = ($22|0)<(16); - if ($23) { - $24 = $22&255; - HEAP8[$10>>0] = $24; - HEAP8[$15>>0] = 0; - break; - } - $25 = (($19) - ($21))|0; - $26 = ($25|0)>(-16); - if (!($26)) { - break L5; - } - $27 = $25&255; - HEAP8[$10>>0] = $27; - $28 = ($13|0)<(256); - if ($28) { - $k$01 = $13; - while(1) { - $29 = (($r) + ($k$01)|0); - $30 = HEAP8[$29>>0]|0; - $31 = ($30<<24>>24)==(0); - if ($31) { - break; - } - HEAP8[$29>>0] = 0; - $32 = (($k$01) + 1)|0; - $33 = ($32|0)<(256); - if ($33) { - $k$01 = $32; - } else { - break L9; - } - } - HEAP8[$29>>0] = 1; - } - } - } while(0); - $34 = (($b$03) + 1)|0; - $35 = ($34|0)<(7); - if ($35) { - $b$03 = $34; - } else { - break; - } - } - } - } while(0); - $36 = (($i$15) + 1)|0; - $exitcond = ($36|0)==(256); - if ($exitcond) { - break; - } else { - $i$15 = $36; - } - } - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { - $h = $h|0; - $s = $s|0; - var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $check = 0, $u = 0, $v = 0, $v3 = 0, $vxx = 0, label = 0; - var sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 208|0; - $u = sp + 160|0; - $v = sp + 120|0; - $v3 = sp + 80|0; - $vxx = sp + 40|0; - $check = sp; - $0 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_frombytes($0,$s); - $1 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_1($1); - _crypto_sign_ed25519_ref10_fe_sq($u,$0); - _crypto_sign_ed25519_ref10_fe_mul($v,$u,1000); - _crypto_sign_ed25519_ref10_fe_sub($u,$u,$1); - _crypto_sign_ed25519_ref10_fe_add($v,$v,$1); - _crypto_sign_ed25519_ref10_fe_sq($v3,$v); - _crypto_sign_ed25519_ref10_fe_mul($v3,$v3,$v); - _crypto_sign_ed25519_ref10_fe_sq($h,$v3); - _crypto_sign_ed25519_ref10_fe_mul($h,$h,$v); - _crypto_sign_ed25519_ref10_fe_mul($h,$h,$u); - _crypto_sign_ed25519_ref10_fe_pow22523($h,$h); - _crypto_sign_ed25519_ref10_fe_mul($h,$h,$v3); - _crypto_sign_ed25519_ref10_fe_mul($h,$h,$u); - _crypto_sign_ed25519_ref10_fe_sq($vxx,$h); - _crypto_sign_ed25519_ref10_fe_mul($vxx,$vxx,$v); - _crypto_sign_ed25519_ref10_fe_sub($check,$vxx,$u); - $2 = (_crypto_sign_ed25519_ref10_fe_isnonzero($check)|0); - $3 = ($2|0)==(0); - do { - if (!($3)) { - _crypto_sign_ed25519_ref10_fe_add($check,$vxx,$u); - $4 = (_crypto_sign_ed25519_ref10_fe_isnonzero($check)|0); - $5 = ($4|0)==(0); - if ($5) { - _crypto_sign_ed25519_ref10_fe_mul($h,$h,1040); - break; - } else { - $$0 = -1; - STACKTOP = sp;return ($$0|0); - } - } - } while(0); - $6 = (_crypto_sign_ed25519_ref10_fe_isnegative($h)|0); - $7 = (($s) + 31|0); - $8 = HEAP8[$7>>0]|0; - $9 = $8&255; - $10 = $9 >>> 7; - $11 = ($6|0)==($10|0); - if ($11) { - _crypto_sign_ed25519_ref10_fe_neg($h,$h); - } - $12 = (($h) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($12,$h,$0); - $$0 = 0; - STACKTOP = sp;return ($$0|0); -} -function _crypto_sign_ed25519_ref10_ge_madd($r,$p,$q) { - $r = $r|0; - $p = $p|0; - $q = $q|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); - $3 = (($q) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); - $4 = (($r) + 120|0); - $5 = (($q) + 80|0); - $6 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); - _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($2,$t0,$4); - _crypto_sign_ed25519_ref10_fe_sub($4,$t0,$4); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_msub($r,$p,$q) { - $r = $r|0; - $p = $p|0; - $q = $q|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($q) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); - _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); - $4 = (($r) + 120|0); - $5 = (($q) + 80|0); - $6 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); - _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); - _crypto_sign_ed25519_ref10_fe_sub($2,$t0,$4); - _crypto_sign_ed25519_ref10_fe_add($4,$t0,$4); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); - $1 = (($r) + 40|0); - $2 = (($p) + 40|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); - $4 = (($r) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); - $1 = (($r) + 40|0); - $2 = (($p) + 40|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); - $4 = (($r) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); - $5 = (($r) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($5,$p,$2); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p2_0($h) { - $h = $h|0; - var $0 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - _crypto_sign_ed25519_ref10_fe_0($h); - $0 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_1($1); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - _crypto_sign_ed25519_ref10_fe_sq($r,$p); - $0 = (($r) + 80|0); - $1 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_sq($0,$1); - $2 = (($r) + 120|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_sq2($2,$3); - $4 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($4,$p,$1); - _crypto_sign_ed25519_ref10_fe_sq($t0,$4); - _crypto_sign_ed25519_ref10_fe_add($4,$0,$r); - _crypto_sign_ed25519_ref10_fe_sub($0,$0,$r); - _crypto_sign_ed25519_ref10_fe_sub($r,$t0,$4); - _crypto_sign_ed25519_ref10_fe_sub($2,$2,$0); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_0($h) { - $h = $h|0; - var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - _crypto_sign_ed25519_ref10_fe_0($h); - $0 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_1($1); - $2 = (($h) + 120|0); - _crypto_sign_ed25519_ref10_fe_0($2); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_dbl($r,$p) { - $r = $r|0; - $p = $p|0; - var $q = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $q = sp; - _crypto_sign_ed25519_ref10_ge_p3_to_p2($q,$p); - _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$q); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_to_cached($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_copy($2,$3); - $4 = (($r) + 120|0); - $5 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,1080); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_to_p2($r,$p) { - $r = $r|0; - $p = $p|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - _crypto_sign_ed25519_ref10_fe_copy($r,$p); - $0 = (($r) + 40|0); - $1 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_copy($0,$1); - $2 = (($r) + 80|0); - $3 = (($p) + 80|0); - _crypto_sign_ed25519_ref10_fe_copy($2,$3); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_p3_tobytes($s,$h) { - $s = $s|0; - $h = $h|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $recip = 0, $x = 0, $y = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $recip = sp + 80|0; - $x = sp + 40|0; - $y = sp; - $0 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_invert($recip,$0); - _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); - $1 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); - _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); - $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); - $3 = $2 << 7; - $4 = (($s) + 31|0); - $5 = HEAP8[$4>>0]|0; - $6 = $5&255; - $7 = $6 ^ $3; - $8 = $7&255; - HEAP8[$4>>0] = $8; - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_precomp_0($h) { - $h = $h|0; - var $0 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - _crypto_sign_ed25519_ref10_fe_1($h); - $0 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_0($1); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { - $h = $h|0; - $a = $a|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $carry$04 = 0, $e = 0, $exitcond = 0, $exitcond7 = 0; - var $i$06 = 0, $i$15 = 0, $i$23 = 0, $i$32 = 0, $r = 0, $s = 0, $sext = 0, $sext1 = 0, $t = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 464|0; - $e = sp + 400|0; - $r = sp + 240|0; - $s = sp + 120|0; - $t = sp; - $i$06 = 0; - while(1) { - $0 = (($a) + ($i$06)|0); - $1 = HEAP8[$0>>0]|0; - $2 = $1&255; - $3 = $2 & 15; - $4 = $3&255; - $5 = $i$06 << 1; - $6 = (($e) + ($5)|0); - HEAP8[$6>>0] = $4; - $7 = HEAP8[$0>>0]|0; - $8 = ($7&255) >>> 4; - $9 = $5 | 1; - $10 = (($e) + ($9)|0); - HEAP8[$10>>0] = $8; - $11 = (($i$06) + 1)|0; - $exitcond7 = ($11|0)==(32); - if ($exitcond7) { - $carry$04 = 0;$i$15 = 0; - break; - } else { - $i$06 = $11; - } - } - while(1) { - $12 = (($e) + ($i$15)|0); - $13 = HEAP8[$12>>0]|0; - $14 = $13&255; - $15 = (($14) + ($carry$04))|0; - $sext = $15 << 24; - $sext1 = (($sext) + 134217728)|0; - $16 = $sext1 >> 28; - $17 = $16 << 4; - $18 = (($15) - ($17))|0; - $19 = $18&255; - HEAP8[$12>>0] = $19; - $20 = (($i$15) + 1)|0; - $exitcond = ($20|0)==(63); - if ($exitcond) { - break; - } else { - $carry$04 = $16;$i$15 = $20; - } - } - $21 = (($e) + 63|0); - $22 = HEAP8[$21>>0]|0; - $23 = $22&255; - $24 = (($23) + ($16))|0; - $25 = $24&255; - HEAP8[$21>>0] = $25; - _crypto_sign_ed25519_ref10_ge_p3_0($h); - $i$23 = 1; - while(1) { - $26 = (($i$23|0) / 2)&-1; - $27 = (($e) + ($i$23)|0); - $28 = HEAP8[$27>>0]|0; - _select($t,$26,$28); - _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); - $29 = (($i$23) + 2)|0; - $30 = ($29|0)<(64); - if ($30) { - $i$23 = $29; - } else { - break; - } - } - _crypto_sign_ed25519_ref10_ge_p3_dbl($r,$h); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($s,$r); - _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$s); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($s,$r); - _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$s); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($s,$r); - _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$s); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); - $i$32 = 0; - while(1) { - $31 = (($i$32|0) / 2)&-1; - $32 = (($e) + ($i$32)|0); - $33 = HEAP8[$32>>0]|0; - _select($t,$31,$33); - _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); - _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); - $34 = (($i$32) + 2)|0; - $35 = ($34|0)<(64); - if ($35) { - $i$32 = $34; - } else { - break; - } - } - STACKTOP = sp;return; -} -function _select($t,$pos,$b) { - $t = $t|0; - $pos = $pos|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $minust = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $minust = sp; - $0 = (_negative($b)|0); - $1 = $b << 24 >> 24; - $2 = $0&255; - $3 = (0 - ($2))|0; - $4 = $1 & $3; - $5 = $4 << 1; - $6 = (($1) - ($5))|0; - $7 = $6&255; - _crypto_sign_ed25519_ref10_ge_precomp_0($t); - $8 = (1120 + (($pos*960)|0)|0); - $9 = (_equal($7,1)|0); - _cmov($t,$8,$9); - $10 = ((1120 + (($pos*960)|0)|0) + 120|0); - $11 = (_equal($7,2)|0); - _cmov($t,$10,$11); - $12 = ((1120 + (($pos*960)|0)|0) + 240|0); - $13 = (_equal($7,3)|0); - _cmov($t,$12,$13); - $14 = ((1120 + (($pos*960)|0)|0) + 360|0); - $15 = (_equal($7,4)|0); - _cmov($t,$14,$15); - $16 = ((1120 + (($pos*960)|0)|0) + 480|0); - $17 = (_equal($7,5)|0); - _cmov($t,$16,$17); - $18 = ((1120 + (($pos*960)|0)|0) + 600|0); - $19 = (_equal($7,6)|0); - _cmov($t,$18,$19); - $20 = ((1120 + (($pos*960)|0)|0) + 720|0); - $21 = (_equal($7,7)|0); - _cmov($t,$20,$21); - $22 = ((1120 + (($pos*960)|0)|0) + 840|0); - $23 = (_equal($7,8)|0); - _cmov($t,$22,$23); - $24 = (($t) + 40|0); - _crypto_sign_ed25519_ref10_fe_copy($minust,$24); - $25 = (($minust) + 40|0); - _crypto_sign_ed25519_ref10_fe_copy($25,$t); - $26 = (($minust) + 80|0); - $27 = (($t) + 80|0); - _crypto_sign_ed25519_ref10_fe_neg($26,$27); - _cmov($t,$minust,$0); - STACKTOP = sp;return; -} -function _negative($b) { - $b = $b|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $b << 24 >> 24; - $1 = ($0|0)<(0); - $2 = $1 << 31 >> 31; - $3 = (_bitshift64Lshr(($0|0),($2|0),63)|0); - $4 = tempRet0; - $5 = $3&255; - STACKTOP = sp;return ($5|0); -} -function _equal($b,$c) { - $b = $b|0; - $c = $c|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $c ^ $b; - $1 = $0&255; - $2 = (($1) + -1)|0; - $3 = $2 >>> 31; - $4 = $3&255; - STACKTOP = sp;return ($4|0); -} -function _cmov($t,$u,$b) { - $t = $t|0; - $u = $u|0; - $b = $b|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $b&255; - _crypto_sign_ed25519_ref10_fe_cmov($t,$u,$0); - $1 = (($t) + 40|0); - $2 = (($u) + 40|0); - _crypto_sign_ed25519_ref10_fe_cmov($1,$2,$0); - $3 = (($t) + 80|0); - $4 = (($u) + 80|0); - _crypto_sign_ed25519_ref10_fe_cmov($3,$4,$0); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_sub($r,$p,$q) { - $r = $r|0; - $p = $p|0; - $q = $q|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $t0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; - $t0 = sp; - $0 = (($p) + 40|0); - _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); - _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($q) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); - _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); - $4 = (($r) + 120|0); - $5 = (($q) + 120|0); - $6 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - $8 = (($q) + 80|0); - _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); - _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); - _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); - _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); - _crypto_sign_ed25519_ref10_fe_sub($2,$t0,$4); - _crypto_sign_ed25519_ref10_fe_add($4,$t0,$4); - STACKTOP = sp;return; -} -function _crypto_sign_ed25519_ref10_ge_tobytes($s,$h) { - $s = $s|0; - $h = $h|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $recip = 0, $x = 0, $y = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $recip = sp + 80|0; - $x = sp + 40|0; - $y = sp; - $0 = (($h) + 80|0); - _crypto_sign_ed25519_ref10_fe_invert($recip,$0); - _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); - $1 = (($h) + 40|0); - _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); - _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); - $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); - $3 = $2 << 7; - $4 = (($s) + 31|0); - $5 = HEAP8[$4>>0]|0; - $6 = $5&255; - $7 = $6 ^ $3; - $8 = $7&255; - HEAP8[$4>>0] = $8; - STACKTOP = sp;return; -} -function _crypto_sign_edwards25519sha512batch_ref10_open($m,$mlen,$sm,$0,$1,$pk) { - $m = $m|0; - $mlen = $mlen|0; - $sm = $sm|0; - $0 = $0|0; - $1 = $1|0; - $pk = $pk|0; - var $$0 = 0, $$sum = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $A = 0, $R = 0, $h = 0, $pkcopy1 = 0, $rcheck = 0, $rcopy = 0, $scopy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 480|0; - $pkcopy1 = sp + 440|0; - $rcopy = sp + 408|0; - $scopy = sp + 376|0; - $h = sp + 312|0; - $rcheck = sp + 280|0; - $A = sp + 120|0; - $R = sp; - $2 = ($1>>>0)<(0); - $3 = ($0>>>0)<(64); - $4 = ($1|0)==(0); - $5 = $4 & $3; - $6 = $2 | $5; - if (!($6)) { - $7 = (($sm) + 63|0); - $8 = HEAP8[$7>>0]|0; - $9 = ($8&255)>(31); - if (!($9)) { - $10 = (_crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($A,$pk)|0); - $11 = ($10|0)==(0); - if ($11) { - dest=$pkcopy1+0|0; src=$pk+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - dest=$rcopy+0|0; src=$sm+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $12 = (($sm) + 32|0); - dest=$scopy+0|0; src=$12+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - _memmove(($m|0),($sm|0),($0|0))|0; - $13 = (($m) + 32|0); - dest=$13+0|0; src=$pkcopy1+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - (_crypto_hash_sha512_ref($h,$m,$0,$1)|0); - _crypto_sign_ed25519_ref10_sc_reduce($h); - _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($R,$h,$A,$scopy); - _crypto_sign_ed25519_ref10_ge_tobytes($rcheck,$R); - $14 = (_crypto_verify_32_ref($rcheck,$rcopy)|0); - $15 = ($14|0)==(0); - if ($15) { - $16 = (($m) + 64|0); - $17 = (_i64Add(($0|0),($1|0),-64,-1)|0); - $18 = tempRet0; - _memmove(($m|0),($16|0),($17|0))|0; - $$sum = (($0) + -64)|0; - $19 = (($m) + ($$sum)|0); - dest=$19+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); - $20 = $mlen; - $21 = $20; - HEAP32[$21>>2] = $17; - $22 = (($20) + 4)|0; - $23 = $22; - HEAP32[$23>>2] = $18; - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - } - } - } - $24 = $mlen; - $25 = $24; - HEAP32[$25>>2] = -1; - $26 = (($24) + 4)|0; - $27 = $26; - HEAP32[$27>>2] = -1; - _memset(($m|0),0,($0|0))|0; - $$0 = -1; - STACKTOP = sp;return ($$0|0); -} -function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { - $s = $s|0; - $a = $a|0; - $b = $b|0; - $c = $c|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; - var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; - var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; - var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; - var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; - var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; - var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0; - var $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0; - var $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0; - var $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0; - var $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0; - var $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0; - var $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0, $123 = 0, $1230 = 0; - var $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0, $1248 = 0, $1249 = 0; - var $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0, $1266 = 0, $1267 = 0; - var $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $1274 = 0, $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0, $1283 = 0, $1284 = 0, $1285 = 0; - var $1286 = 0, $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0, $1291 = 0, $1292 = 0, $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0, $1300 = 0, $1301 = 0, $1302 = 0; - var $1303 = 0, $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0, $1309 = 0, $131 = 0, $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0, $1319 = 0, $132 = 0, $1320 = 0; - var $1321 = 0, $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0, $1327 = 0, $1328 = 0, $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0, $1337 = 0, $1338 = 0, $1339 = 0; - var $134 = 0, $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0, $1345 = 0, $1346 = 0, $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0, $1355 = 0, $1356 = 0, $1357 = 0; - var $1358 = 0, $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0, $1363 = 0, $1364 = 0, $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0, $1373 = 0, $1374 = 0, $1375 = 0; - var $1376 = 0, $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0, $1381 = 0, $1382 = 0, $1383 = 0, $1384 = 0, $1385 = 0, $1386 = 0, $1387 = 0, $1388 = 0, $1389 = 0, $139 = 0, $1390 = 0, $1391 = 0, $1392 = 0, $1393 = 0; - var $1394 = 0, $1395 = 0, $1396 = 0, $1397 = 0, $1398 = 0, $1399 = 0, $14 = 0, $140 = 0, $1400 = 0, $1401 = 0, $1402 = 0, $1403 = 0, $1404 = 0, $1405 = 0, $1406 = 0, $1407 = 0, $1408 = 0, $1409 = 0, $141 = 0, $1410 = 0; - var $1411 = 0, $1412 = 0, $1413 = 0, $1414 = 0, $1415 = 0, $1416 = 0, $1417 = 0, $1418 = 0, $1419 = 0, $142 = 0, $1420 = 0, $1421 = 0, $1422 = 0, $1423 = 0, $1424 = 0, $1425 = 0, $1426 = 0, $1427 = 0, $1428 = 0, $1429 = 0; - var $143 = 0, $1430 = 0, $1431 = 0, $1432 = 0, $1433 = 0, $1434 = 0, $1435 = 0, $1436 = 0, $1437 = 0, $1438 = 0, $1439 = 0, $144 = 0, $1440 = 0, $1441 = 0, $1442 = 0, $1443 = 0, $1444 = 0, $1445 = 0, $1446 = 0, $1447 = 0; - var $1448 = 0, $1449 = 0, $145 = 0, $1450 = 0, $1451 = 0, $1452 = 0, $1453 = 0, $1454 = 0, $1455 = 0, $1456 = 0, $1457 = 0, $1458 = 0, $1459 = 0, $146 = 0, $1460 = 0, $1461 = 0, $1462 = 0, $1463 = 0, $1464 = 0, $1465 = 0; - var $1466 = 0, $1467 = 0, $1468 = 0, $1469 = 0, $147 = 0, $1470 = 0, $1471 = 0, $1472 = 0, $1473 = 0, $1474 = 0, $1475 = 0, $1476 = 0, $1477 = 0, $1478 = 0, $1479 = 0, $148 = 0, $1480 = 0, $1481 = 0, $1482 = 0, $1483 = 0; - var $1484 = 0, $1485 = 0, $1486 = 0, $1487 = 0, $1488 = 0, $1489 = 0, $149 = 0, $1490 = 0, $1491 = 0, $1492 = 0, $1493 = 0, $1494 = 0, $1495 = 0, $1496 = 0, $1497 = 0, $1498 = 0, $1499 = 0, $15 = 0, $150 = 0, $1500 = 0; - var $1501 = 0, $1502 = 0, $1503 = 0, $1504 = 0, $1505 = 0, $1506 = 0, $1507 = 0, $1508 = 0, $1509 = 0, $151 = 0, $1510 = 0, $1511 = 0, $1512 = 0, $1513 = 0, $1514 = 0, $1515 = 0, $1516 = 0, $1517 = 0, $1518 = 0, $1519 = 0; - var $152 = 0, $1520 = 0, $1521 = 0, $1522 = 0, $1523 = 0, $1524 = 0, $1525 = 0, $1526 = 0, $1527 = 0, $1528 = 0, $1529 = 0, $153 = 0, $1530 = 0, $1531 = 0, $1532 = 0, $1533 = 0, $1534 = 0, $1535 = 0, $1536 = 0, $1537 = 0; - var $1538 = 0, $1539 = 0, $154 = 0, $1540 = 0, $1541 = 0, $1542 = 0, $1543 = 0, $1544 = 0, $1545 = 0, $1546 = 0, $1547 = 0, $1548 = 0, $1549 = 0, $155 = 0, $1550 = 0, $1551 = 0, $1552 = 0, $1553 = 0, $1554 = 0, $1555 = 0; - var $1556 = 0, $1557 = 0, $1558 = 0, $1559 = 0, $156 = 0, $1560 = 0, $1561 = 0, $1562 = 0, $1563 = 0, $1564 = 0, $1565 = 0, $1566 = 0, $1567 = 0, $1568 = 0, $1569 = 0, $157 = 0, $1570 = 0, $1571 = 0, $1572 = 0, $1573 = 0; - var $1574 = 0, $1575 = 0, $1576 = 0, $1577 = 0, $1578 = 0, $1579 = 0, $158 = 0, $1580 = 0, $1581 = 0, $1582 = 0, $1583 = 0, $1584 = 0, $1585 = 0, $1586 = 0, $1587 = 0, $1588 = 0, $1589 = 0, $159 = 0, $1590 = 0, $1591 = 0; - var $1592 = 0, $1593 = 0, $1594 = 0, $1595 = 0, $1596 = 0, $1597 = 0, $1598 = 0, $1599 = 0, $16 = 0, $160 = 0, $1600 = 0, $1601 = 0, $1602 = 0, $1603 = 0, $1604 = 0, $1605 = 0, $1606 = 0, $1607 = 0, $1608 = 0, $1609 = 0; - var $161 = 0, $1610 = 0, $1611 = 0, $1612 = 0, $1613 = 0, $1614 = 0, $1615 = 0, $1616 = 0, $1617 = 0, $1618 = 0, $1619 = 0, $162 = 0, $1620 = 0, $1621 = 0, $1622 = 0, $1623 = 0, $1624 = 0, $1625 = 0, $1626 = 0, $1627 = 0; - var $1628 = 0, $1629 = 0, $163 = 0, $1630 = 0, $1631 = 0, $1632 = 0, $1633 = 0, $1634 = 0, $1635 = 0, $1636 = 0, $1637 = 0, $1638 = 0, $1639 = 0, $164 = 0, $1640 = 0, $1641 = 0, $1642 = 0, $1643 = 0, $1644 = 0, $1645 = 0; - var $1646 = 0, $1647 = 0, $1648 = 0, $1649 = 0, $165 = 0, $1650 = 0, $1651 = 0, $1652 = 0, $1653 = 0, $1654 = 0, $1655 = 0, $1656 = 0, $1657 = 0, $1658 = 0, $1659 = 0, $166 = 0, $1660 = 0, $1661 = 0, $1662 = 0, $1663 = 0; - var $1664 = 0, $1665 = 0, $1666 = 0, $1667 = 0, $1668 = 0, $1669 = 0, $167 = 0, $1670 = 0, $1671 = 0, $1672 = 0, $1673 = 0, $1674 = 0, $1675 = 0, $1676 = 0, $1677 = 0, $1678 = 0, $1679 = 0, $168 = 0, $1680 = 0, $1681 = 0; - var $1682 = 0, $1683 = 0, $1684 = 0, $1685 = 0, $1686 = 0, $1687 = 0, $1688 = 0, $1689 = 0, $169 = 0, $1690 = 0, $1691 = 0, $1692 = 0, $1693 = 0, $1694 = 0, $1695 = 0, $1696 = 0, $1697 = 0, $1698 = 0, $1699 = 0, $17 = 0; - var $170 = 0, $1700 = 0, $1701 = 0, $1702 = 0, $1703 = 0, $1704 = 0, $1705 = 0, $1706 = 0, $1707 = 0, $1708 = 0, $1709 = 0, $171 = 0, $1710 = 0, $1711 = 0, $1712 = 0, $1713 = 0, $1714 = 0, $1715 = 0, $1716 = 0, $1717 = 0; - var $1718 = 0, $1719 = 0, $172 = 0, $1720 = 0, $1721 = 0, $1722 = 0, $1723 = 0, $1724 = 0, $1725 = 0, $1726 = 0, $1727 = 0, $1728 = 0, $1729 = 0, $173 = 0, $1730 = 0, $1731 = 0, $1732 = 0, $1733 = 0, $1734 = 0, $1735 = 0; - var $1736 = 0, $1737 = 0, $1738 = 0, $1739 = 0, $174 = 0, $1740 = 0, $1741 = 0, $1742 = 0, $1743 = 0, $1744 = 0, $1745 = 0, $1746 = 0, $1747 = 0, $1748 = 0, $1749 = 0, $175 = 0, $1750 = 0, $1751 = 0, $1752 = 0, $1753 = 0; - var $1754 = 0, $1755 = 0, $1756 = 0, $1757 = 0, $1758 = 0, $1759 = 0, $176 = 0, $1760 = 0, $1761 = 0, $1762 = 0, $1763 = 0, $1764 = 0, $1765 = 0, $1766 = 0, $1767 = 0, $1768 = 0, $1769 = 0, $177 = 0, $1770 = 0, $1771 = 0; - var $1772 = 0, $1773 = 0, $1774 = 0, $1775 = 0, $1776 = 0, $1777 = 0, $1778 = 0, $1779 = 0, $178 = 0, $1780 = 0, $1781 = 0, $1782 = 0, $1783 = 0, $1784 = 0, $1785 = 0, $1786 = 0, $1787 = 0, $1788 = 0, $1789 = 0, $179 = 0; - var $1790 = 0, $1791 = 0, $1792 = 0, $1793 = 0, $1794 = 0, $1795 = 0, $1796 = 0, $1797 = 0, $1798 = 0, $1799 = 0, $18 = 0, $180 = 0, $1800 = 0, $1801 = 0, $1802 = 0, $1803 = 0, $1804 = 0, $1805 = 0, $1806 = 0, $1807 = 0; - var $1808 = 0, $1809 = 0, $181 = 0, $1810 = 0, $1811 = 0, $1812 = 0, $1813 = 0, $1814 = 0, $1815 = 0, $1816 = 0, $1817 = 0, $1818 = 0, $1819 = 0, $182 = 0, $1820 = 0, $1821 = 0, $1822 = 0, $1823 = 0, $1824 = 0, $1825 = 0; - var $1826 = 0, $1827 = 0, $1828 = 0, $1829 = 0, $183 = 0, $1830 = 0, $1831 = 0, $1832 = 0, $1833 = 0, $1834 = 0, $1835 = 0, $1836 = 0, $1837 = 0, $1838 = 0, $1839 = 0, $184 = 0, $1840 = 0, $1841 = 0, $1842 = 0, $1843 = 0; - var $1844 = 0, $1845 = 0, $1846 = 0, $1847 = 0, $1848 = 0, $1849 = 0, $185 = 0, $1850 = 0, $1851 = 0, $1852 = 0, $1853 = 0, $1854 = 0, $1855 = 0, $1856 = 0, $1857 = 0, $1858 = 0, $1859 = 0, $186 = 0, $1860 = 0, $1861 = 0; - var $1862 = 0, $1863 = 0, $1864 = 0, $1865 = 0, $1866 = 0, $1867 = 0, $1868 = 0, $1869 = 0, $187 = 0, $1870 = 0, $1871 = 0, $1872 = 0, $1873 = 0, $1874 = 0, $1875 = 0, $1876 = 0, $1877 = 0, $1878 = 0, $188 = 0, $189 = 0; - var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; - var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; - var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; - var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; - var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; - var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; - var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; - var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; - var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; - var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; - var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; - var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; - var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; - var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; - var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; - var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; - var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; - var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; - var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; - var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; - var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; - var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; - var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; - var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; - var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; - var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; - var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; - var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; - var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; - var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; - var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; - var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; - var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; - var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; - var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; - var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; - var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; - var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; - var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; - var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; - var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; - var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; - var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; - var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; - var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = (_load_347($a)|0); - $1 = tempRet0; - $2 = $0 & 2097151; - $3 = (($a) + 2|0); - $4 = (_load_448($3)|0); - $5 = tempRet0; - $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); - $7 = tempRet0; - $8 = $6 & 2097151; - $9 = (($a) + 5|0); - $10 = (_load_347($9)|0); - $11 = tempRet0; - $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); - $13 = tempRet0; - $14 = $12 & 2097151; - $15 = (($a) + 7|0); - $16 = (_load_448($15)|0); - $17 = tempRet0; - $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); - $19 = tempRet0; - $20 = $18 & 2097151; - $21 = (($a) + 10|0); - $22 = (_load_448($21)|0); - $23 = tempRet0; - $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); - $25 = tempRet0; - $26 = $24 & 2097151; - $27 = (($a) + 13|0); - $28 = (_load_347($27)|0); - $29 = tempRet0; - $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); - $31 = tempRet0; - $32 = $30 & 2097151; - $33 = (($a) + 15|0); - $34 = (_load_448($33)|0); - $35 = tempRet0; - $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); - $37 = tempRet0; - $38 = $36 & 2097151; - $39 = (($a) + 18|0); - $40 = (_load_347($39)|0); - $41 = tempRet0; - $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); - $43 = tempRet0; - $44 = $42 & 2097151; - $45 = (($a) + 21|0); - $46 = (_load_347($45)|0); - $47 = tempRet0; - $48 = $46 & 2097151; - $49 = (($a) + 23|0); - $50 = (_load_448($49)|0); - $51 = tempRet0; - $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); - $53 = tempRet0; - $54 = $52 & 2097151; - $55 = (($a) + 26|0); - $56 = (_load_347($55)|0); - $57 = tempRet0; - $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); - $59 = tempRet0; - $60 = $58 & 2097151; - $61 = (($a) + 28|0); - $62 = (_load_448($61)|0); - $63 = tempRet0; - $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); - $65 = tempRet0; - $66 = (_load_347($b)|0); - $67 = tempRet0; - $68 = $66 & 2097151; - $69 = (($b) + 2|0); - $70 = (_load_448($69)|0); - $71 = tempRet0; - $72 = (_bitshift64Lshr(($70|0),($71|0),5)|0); - $73 = tempRet0; - $74 = $72 & 2097151; - $75 = (($b) + 5|0); - $76 = (_load_347($75)|0); - $77 = tempRet0; - $78 = (_bitshift64Lshr(($76|0),($77|0),2)|0); - $79 = tempRet0; - $80 = $78 & 2097151; - $81 = (($b) + 7|0); - $82 = (_load_448($81)|0); - $83 = tempRet0; - $84 = (_bitshift64Lshr(($82|0),($83|0),7)|0); - $85 = tempRet0; - $86 = $84 & 2097151; - $87 = (($b) + 10|0); - $88 = (_load_448($87)|0); - $89 = tempRet0; - $90 = (_bitshift64Lshr(($88|0),($89|0),4)|0); - $91 = tempRet0; - $92 = $90 & 2097151; - $93 = (($b) + 13|0); - $94 = (_load_347($93)|0); - $95 = tempRet0; - $96 = (_bitshift64Lshr(($94|0),($95|0),1)|0); - $97 = tempRet0; - $98 = $96 & 2097151; - $99 = (($b) + 15|0); - $100 = (_load_448($99)|0); - $101 = tempRet0; - $102 = (_bitshift64Lshr(($100|0),($101|0),6)|0); - $103 = tempRet0; - $104 = $102 & 2097151; - $105 = (($b) + 18|0); - $106 = (_load_347($105)|0); - $107 = tempRet0; - $108 = (_bitshift64Lshr(($106|0),($107|0),3)|0); - $109 = tempRet0; - $110 = $108 & 2097151; - $111 = (($b) + 21|0); - $112 = (_load_347($111)|0); - $113 = tempRet0; - $114 = $112 & 2097151; - $115 = (($b) + 23|0); - $116 = (_load_448($115)|0); - $117 = tempRet0; - $118 = (_bitshift64Lshr(($116|0),($117|0),5)|0); - $119 = tempRet0; - $120 = $118 & 2097151; - $121 = (($b) + 26|0); - $122 = (_load_347($121)|0); - $123 = tempRet0; - $124 = (_bitshift64Lshr(($122|0),($123|0),2)|0); - $125 = tempRet0; - $126 = $124 & 2097151; - $127 = (($b) + 28|0); - $128 = (_load_448($127)|0); - $129 = tempRet0; - $130 = (_bitshift64Lshr(($128|0),($129|0),7)|0); - $131 = tempRet0; - $132 = (_load_347($c)|0); - $133 = tempRet0; - $134 = $132 & 2097151; - $135 = (($c) + 2|0); - $136 = (_load_448($135)|0); - $137 = tempRet0; - $138 = (_bitshift64Lshr(($136|0),($137|0),5)|0); - $139 = tempRet0; - $140 = $138 & 2097151; - $141 = (($c) + 5|0); - $142 = (_load_347($141)|0); - $143 = tempRet0; - $144 = (_bitshift64Lshr(($142|0),($143|0),2)|0); - $145 = tempRet0; - $146 = $144 & 2097151; - $147 = (($c) + 7|0); - $148 = (_load_448($147)|0); - $149 = tempRet0; - $150 = (_bitshift64Lshr(($148|0),($149|0),7)|0); - $151 = tempRet0; - $152 = $150 & 2097151; - $153 = (($c) + 10|0); - $154 = (_load_448($153)|0); - $155 = tempRet0; - $156 = (_bitshift64Lshr(($154|0),($155|0),4)|0); - $157 = tempRet0; - $158 = $156 & 2097151; - $159 = (($c) + 13|0); - $160 = (_load_347($159)|0); - $161 = tempRet0; - $162 = (_bitshift64Lshr(($160|0),($161|0),1)|0); - $163 = tempRet0; - $164 = $162 & 2097151; - $165 = (($c) + 15|0); - $166 = (_load_448($165)|0); - $167 = tempRet0; - $168 = (_bitshift64Lshr(($166|0),($167|0),6)|0); - $169 = tempRet0; - $170 = $168 & 2097151; - $171 = (($c) + 18|0); - $172 = (_load_347($171)|0); - $173 = tempRet0; - $174 = (_bitshift64Lshr(($172|0),($173|0),3)|0); - $175 = tempRet0; - $176 = $174 & 2097151; - $177 = (($c) + 21|0); - $178 = (_load_347($177)|0); - $179 = tempRet0; - $180 = $178 & 2097151; - $181 = (($c) + 23|0); - $182 = (_load_448($181)|0); - $183 = tempRet0; - $184 = (_bitshift64Lshr(($182|0),($183|0),5)|0); - $185 = tempRet0; - $186 = $184 & 2097151; - $187 = (($c) + 26|0); - $188 = (_load_347($187)|0); - $189 = tempRet0; - $190 = (_bitshift64Lshr(($188|0),($189|0),2)|0); - $191 = tempRet0; - $192 = $190 & 2097151; - $193 = (($c) + 28|0); - $194 = (_load_448($193)|0); - $195 = tempRet0; - $196 = (_bitshift64Lshr(($194|0),($195|0),7)|0); - $197 = tempRet0; - $198 = (___muldi3(($68|0),0,($2|0),0)|0); - $199 = tempRet0; - $200 = (_i64Add(($134|0),0,($198|0),($199|0))|0); - $201 = tempRet0; - $202 = (___muldi3(($74|0),0,($2|0),0)|0); - $203 = tempRet0; - $204 = (___muldi3(($68|0),0,($8|0),0)|0); - $205 = tempRet0; - $206 = (___muldi3(($80|0),0,($2|0),0)|0); - $207 = tempRet0; - $208 = (___muldi3(($74|0),0,($8|0),0)|0); - $209 = tempRet0; - $210 = (___muldi3(($68|0),0,($14|0),0)|0); - $211 = tempRet0; - $212 = (_i64Add(($208|0),($209|0),($210|0),($211|0))|0); - $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($206|0),($207|0))|0); - $215 = tempRet0; - $216 = (_i64Add(($214|0),($215|0),($146|0),0)|0); - $217 = tempRet0; - $218 = (___muldi3(($86|0),0,($2|0),0)|0); - $219 = tempRet0; - $220 = (___muldi3(($80|0),0,($8|0),0)|0); - $221 = tempRet0; - $222 = (___muldi3(($74|0),0,($14|0),0)|0); - $223 = tempRet0; - $224 = (___muldi3(($68|0),0,($20|0),0)|0); - $225 = tempRet0; - $226 = (___muldi3(($92|0),0,($2|0),0)|0); - $227 = tempRet0; - $228 = (___muldi3(($86|0),0,($8|0),0)|0); - $229 = tempRet0; - $230 = (___muldi3(($80|0),0,($14|0),0)|0); - $231 = tempRet0; - $232 = (___muldi3(($74|0),0,($20|0),0)|0); - $233 = tempRet0; - $234 = (___muldi3(($68|0),0,($26|0),0)|0); - $235 = tempRet0; - $236 = (_i64Add(($232|0),($233|0),($234|0),($235|0))|0); - $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($230|0),($231|0))|0); - $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($228|0),($229|0))|0); - $241 = tempRet0; - $242 = (_i64Add(($240|0),($241|0),($226|0),($227|0))|0); - $243 = tempRet0; - $244 = (_i64Add(($242|0),($243|0),($158|0),0)|0); - $245 = tempRet0; - $246 = (___muldi3(($98|0),0,($2|0),0)|0); - $247 = tempRet0; - $248 = (___muldi3(($92|0),0,($8|0),0)|0); - $249 = tempRet0; - $250 = (___muldi3(($86|0),0,($14|0),0)|0); - $251 = tempRet0; - $252 = (___muldi3(($80|0),0,($20|0),0)|0); - $253 = tempRet0; - $254 = (___muldi3(($74|0),0,($26|0),0)|0); - $255 = tempRet0; - $256 = (___muldi3(($68|0),0,($32|0),0)|0); - $257 = tempRet0; - $258 = (___muldi3(($104|0),0,($2|0),0)|0); - $259 = tempRet0; - $260 = (___muldi3(($98|0),0,($8|0),0)|0); - $261 = tempRet0; - $262 = (___muldi3(($92|0),0,($14|0),0)|0); - $263 = tempRet0; - $264 = (___muldi3(($86|0),0,($20|0),0)|0); - $265 = tempRet0; - $266 = (___muldi3(($80|0),0,($26|0),0)|0); - $267 = tempRet0; - $268 = (___muldi3(($74|0),0,($32|0),0)|0); - $269 = tempRet0; - $270 = (___muldi3(($68|0),0,($38|0),0)|0); - $271 = tempRet0; - $272 = (_i64Add(($268|0),($269|0),($270|0),($271|0))|0); - $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($266|0),($267|0))|0); - $275 = tempRet0; - $276 = (_i64Add(($274|0),($275|0),($264|0),($265|0))|0); - $277 = tempRet0; - $278 = (_i64Add(($276|0),($277|0),($262|0),($263|0))|0); - $279 = tempRet0; - $280 = (_i64Add(($278|0),($279|0),($260|0),($261|0))|0); - $281 = tempRet0; - $282 = (_i64Add(($280|0),($281|0),($258|0),($259|0))|0); - $283 = tempRet0; - $284 = (_i64Add(($282|0),($283|0),($170|0),0)|0); - $285 = tempRet0; - $286 = (___muldi3(($110|0),0,($2|0),0)|0); - $287 = tempRet0; - $288 = (___muldi3(($104|0),0,($8|0),0)|0); - $289 = tempRet0; - $290 = (___muldi3(($98|0),0,($14|0),0)|0); - $291 = tempRet0; - $292 = (___muldi3(($92|0),0,($20|0),0)|0); - $293 = tempRet0; - $294 = (___muldi3(($86|0),0,($26|0),0)|0); - $295 = tempRet0; - $296 = (___muldi3(($80|0),0,($32|0),0)|0); - $297 = tempRet0; - $298 = (___muldi3(($74|0),0,($38|0),0)|0); - $299 = tempRet0; - $300 = (___muldi3(($68|0),0,($44|0),0)|0); - $301 = tempRet0; - $302 = (___muldi3(($114|0),0,($2|0),0)|0); - $303 = tempRet0; - $304 = (___muldi3(($110|0),0,($8|0),0)|0); - $305 = tempRet0; - $306 = (___muldi3(($104|0),0,($14|0),0)|0); - $307 = tempRet0; - $308 = (___muldi3(($98|0),0,($20|0),0)|0); - $309 = tempRet0; - $310 = (___muldi3(($92|0),0,($26|0),0)|0); - $311 = tempRet0; - $312 = (___muldi3(($86|0),0,($32|0),0)|0); - $313 = tempRet0; - $314 = (___muldi3(($80|0),0,($38|0),0)|0); - $315 = tempRet0; - $316 = (___muldi3(($74|0),0,($44|0),0)|0); - $317 = tempRet0; - $318 = (___muldi3(($68|0),0,($48|0),0)|0); - $319 = tempRet0; - $320 = (_i64Add(($316|0),($317|0),($318|0),($319|0))|0); - $321 = tempRet0; - $322 = (_i64Add(($320|0),($321|0),($314|0),($315|0))|0); - $323 = tempRet0; - $324 = (_i64Add(($322|0),($323|0),($312|0),($313|0))|0); - $325 = tempRet0; - $326 = (_i64Add(($324|0),($325|0),($310|0),($311|0))|0); - $327 = tempRet0; - $328 = (_i64Add(($326|0),($327|0),($308|0),($309|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($328|0),($329|0),($306|0),($307|0))|0); - $331 = tempRet0; - $332 = (_i64Add(($330|0),($331|0),($302|0),($303|0))|0); - $333 = tempRet0; - $334 = (_i64Add(($332|0),($333|0),($304|0),($305|0))|0); - $335 = tempRet0; - $336 = (_i64Add(($334|0),($335|0),($180|0),0)|0); - $337 = tempRet0; - $338 = (___muldi3(($120|0),0,($2|0),0)|0); - $339 = tempRet0; - $340 = (___muldi3(($114|0),0,($8|0),0)|0); - $341 = tempRet0; - $342 = (___muldi3(($110|0),0,($14|0),0)|0); - $343 = tempRet0; - $344 = (___muldi3(($104|0),0,($20|0),0)|0); - $345 = tempRet0; - $346 = (___muldi3(($98|0),0,($26|0),0)|0); - $347 = tempRet0; - $348 = (___muldi3(($92|0),0,($32|0),0)|0); - $349 = tempRet0; - $350 = (___muldi3(($86|0),0,($38|0),0)|0); - $351 = tempRet0; - $352 = (___muldi3(($80|0),0,($44|0),0)|0); - $353 = tempRet0; - $354 = (___muldi3(($74|0),0,($48|0),0)|0); - $355 = tempRet0; - $356 = (___muldi3(($68|0),0,($54|0),0)|0); - $357 = tempRet0; - $358 = (___muldi3(($126|0),0,($2|0),0)|0); - $359 = tempRet0; - $360 = (___muldi3(($120|0),0,($8|0),0)|0); - $361 = tempRet0; - $362 = (___muldi3(($114|0),0,($14|0),0)|0); - $363 = tempRet0; - $364 = (___muldi3(($110|0),0,($20|0),0)|0); - $365 = tempRet0; - $366 = (___muldi3(($104|0),0,($26|0),0)|0); - $367 = tempRet0; - $368 = (___muldi3(($98|0),0,($32|0),0)|0); - $369 = tempRet0; - $370 = (___muldi3(($92|0),0,($38|0),0)|0); - $371 = tempRet0; - $372 = (___muldi3(($86|0),0,($44|0),0)|0); - $373 = tempRet0; - $374 = (___muldi3(($80|0),0,($48|0),0)|0); - $375 = tempRet0; - $376 = (___muldi3(($74|0),0,($54|0),0)|0); - $377 = tempRet0; - $378 = (___muldi3(($68|0),0,($60|0),0)|0); - $379 = tempRet0; - $380 = (_i64Add(($376|0),($377|0),($378|0),($379|0))|0); - $381 = tempRet0; - $382 = (_i64Add(($380|0),($381|0),($374|0),($375|0))|0); - $383 = tempRet0; - $384 = (_i64Add(($382|0),($383|0),($372|0),($373|0))|0); - $385 = tempRet0; - $386 = (_i64Add(($384|0),($385|0),($370|0),($371|0))|0); - $387 = tempRet0; - $388 = (_i64Add(($386|0),($387|0),($368|0),($369|0))|0); - $389 = tempRet0; - $390 = (_i64Add(($388|0),($389|0),($366|0),($367|0))|0); - $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($362|0),($363|0))|0); - $393 = tempRet0; - $394 = (_i64Add(($392|0),($393|0),($364|0),($365|0))|0); - $395 = tempRet0; - $396 = (_i64Add(($394|0),($395|0),($360|0),($361|0))|0); - $397 = tempRet0; - $398 = (_i64Add(($396|0),($397|0),($358|0),($359|0))|0); - $399 = tempRet0; - $400 = (_i64Add(($398|0),($399|0),($192|0),0)|0); - $401 = tempRet0; - $402 = (___muldi3(($130|0),($131|0),($2|0),0)|0); - $403 = tempRet0; - $404 = (___muldi3(($126|0),0,($8|0),0)|0); - $405 = tempRet0; - $406 = (___muldi3(($120|0),0,($14|0),0)|0); - $407 = tempRet0; - $408 = (___muldi3(($114|0),0,($20|0),0)|0); - $409 = tempRet0; - $410 = (___muldi3(($110|0),0,($26|0),0)|0); - $411 = tempRet0; - $412 = (___muldi3(($104|0),0,($32|0),0)|0); - $413 = tempRet0; - $414 = (___muldi3(($98|0),0,($38|0),0)|0); - $415 = tempRet0; - $416 = (___muldi3(($92|0),0,($44|0),0)|0); - $417 = tempRet0; - $418 = (___muldi3(($86|0),0,($48|0),0)|0); - $419 = tempRet0; - $420 = (___muldi3(($80|0),0,($54|0),0)|0); - $421 = tempRet0; - $422 = (___muldi3(($74|0),0,($60|0),0)|0); - $423 = tempRet0; - $424 = (___muldi3(($68|0),0,($64|0),($65|0))|0); - $425 = tempRet0; - $426 = (___muldi3(($130|0),($131|0),($8|0),0)|0); - $427 = tempRet0; - $428 = (___muldi3(($126|0),0,($14|0),0)|0); - $429 = tempRet0; - $430 = (___muldi3(($120|0),0,($20|0),0)|0); - $431 = tempRet0; - $432 = (___muldi3(($114|0),0,($26|0),0)|0); - $433 = tempRet0; - $434 = (___muldi3(($110|0),0,($32|0),0)|0); - $435 = tempRet0; - $436 = (___muldi3(($104|0),0,($38|0),0)|0); - $437 = tempRet0; - $438 = (___muldi3(($98|0),0,($44|0),0)|0); - $439 = tempRet0; - $440 = (___muldi3(($92|0),0,($48|0),0)|0); - $441 = tempRet0; - $442 = (___muldi3(($86|0),0,($54|0),0)|0); - $443 = tempRet0; - $444 = (___muldi3(($80|0),0,($60|0),0)|0); - $445 = tempRet0; - $446 = (___muldi3(($74|0),0,($64|0),($65|0))|0); - $447 = tempRet0; - $448 = (_i64Add(($444|0),($445|0),($446|0),($447|0))|0); - $449 = tempRet0; - $450 = (_i64Add(($448|0),($449|0),($442|0),($443|0))|0); - $451 = tempRet0; - $452 = (_i64Add(($450|0),($451|0),($440|0),($441|0))|0); - $453 = tempRet0; - $454 = (_i64Add(($452|0),($453|0),($438|0),($439|0))|0); - $455 = tempRet0; - $456 = (_i64Add(($454|0),($455|0),($436|0),($437|0))|0); - $457 = tempRet0; - $458 = (_i64Add(($456|0),($457|0),($432|0),($433|0))|0); - $459 = tempRet0; - $460 = (_i64Add(($458|0),($459|0),($434|0),($435|0))|0); - $461 = tempRet0; - $462 = (_i64Add(($460|0),($461|0),($430|0),($431|0))|0); - $463 = tempRet0; - $464 = (_i64Add(($462|0),($463|0),($428|0),($429|0))|0); - $465 = tempRet0; - $466 = (_i64Add(($464|0),($465|0),($426|0),($427|0))|0); - $467 = tempRet0; - $468 = (___muldi3(($130|0),($131|0),($14|0),0)|0); - $469 = tempRet0; - $470 = (___muldi3(($126|0),0,($20|0),0)|0); - $471 = tempRet0; - $472 = (___muldi3(($120|0),0,($26|0),0)|0); - $473 = tempRet0; - $474 = (___muldi3(($114|0),0,($32|0),0)|0); - $475 = tempRet0; - $476 = (___muldi3(($110|0),0,($38|0),0)|0); - $477 = tempRet0; - $478 = (___muldi3(($104|0),0,($44|0),0)|0); - $479 = tempRet0; - $480 = (___muldi3(($98|0),0,($48|0),0)|0); - $481 = tempRet0; - $482 = (___muldi3(($92|0),0,($54|0),0)|0); - $483 = tempRet0; - $484 = (___muldi3(($86|0),0,($60|0),0)|0); - $485 = tempRet0; - $486 = (___muldi3(($80|0),0,($64|0),($65|0))|0); - $487 = tempRet0; - $488 = (___muldi3(($130|0),($131|0),($20|0),0)|0); - $489 = tempRet0; - $490 = (___muldi3(($126|0),0,($26|0),0)|0); - $491 = tempRet0; - $492 = (___muldi3(($120|0),0,($32|0),0)|0); - $493 = tempRet0; - $494 = (___muldi3(($114|0),0,($38|0),0)|0); - $495 = tempRet0; - $496 = (___muldi3(($110|0),0,($44|0),0)|0); - $497 = tempRet0; - $498 = (___muldi3(($104|0),0,($48|0),0)|0); - $499 = tempRet0; - $500 = (___muldi3(($98|0),0,($54|0),0)|0); - $501 = tempRet0; - $502 = (___muldi3(($92|0),0,($60|0),0)|0); - $503 = tempRet0; - $504 = (___muldi3(($86|0),0,($64|0),($65|0))|0); - $505 = tempRet0; - $506 = (_i64Add(($502|0),($503|0),($504|0),($505|0))|0); - $507 = tempRet0; - $508 = (_i64Add(($506|0),($507|0),($500|0),($501|0))|0); - $509 = tempRet0; - $510 = (_i64Add(($508|0),($509|0),($498|0),($499|0))|0); - $511 = tempRet0; - $512 = (_i64Add(($510|0),($511|0),($494|0),($495|0))|0); - $513 = tempRet0; - $514 = (_i64Add(($512|0),($513|0),($496|0),($497|0))|0); - $515 = tempRet0; - $516 = (_i64Add(($514|0),($515|0),($492|0),($493|0))|0); - $517 = tempRet0; - $518 = (_i64Add(($516|0),($517|0),($490|0),($491|0))|0); - $519 = tempRet0; - $520 = (_i64Add(($518|0),($519|0),($488|0),($489|0))|0); - $521 = tempRet0; - $522 = (___muldi3(($130|0),($131|0),($26|0),0)|0); - $523 = tempRet0; - $524 = (___muldi3(($126|0),0,($32|0),0)|0); - $525 = tempRet0; - $526 = (___muldi3(($120|0),0,($38|0),0)|0); - $527 = tempRet0; - $528 = (___muldi3(($114|0),0,($44|0),0)|0); - $529 = tempRet0; - $530 = (___muldi3(($110|0),0,($48|0),0)|0); - $531 = tempRet0; - $532 = (___muldi3(($104|0),0,($54|0),0)|0); - $533 = tempRet0; - $534 = (___muldi3(($98|0),0,($60|0),0)|0); - $535 = tempRet0; - $536 = (___muldi3(($92|0),0,($64|0),($65|0))|0); - $537 = tempRet0; - $538 = (___muldi3(($130|0),($131|0),($32|0),0)|0); - $539 = tempRet0; - $540 = (___muldi3(($126|0),0,($38|0),0)|0); - $541 = tempRet0; - $542 = (___muldi3(($120|0),0,($44|0),0)|0); - $543 = tempRet0; - $544 = (___muldi3(($114|0),0,($48|0),0)|0); - $545 = tempRet0; - $546 = (___muldi3(($110|0),0,($54|0),0)|0); - $547 = tempRet0; - $548 = (___muldi3(($104|0),0,($60|0),0)|0); - $549 = tempRet0; - $550 = (___muldi3(($98|0),0,($64|0),($65|0))|0); - $551 = tempRet0; - $552 = (_i64Add(($548|0),($549|0),($550|0),($551|0))|0); - $553 = tempRet0; - $554 = (_i64Add(($552|0),($553|0),($544|0),($545|0))|0); - $555 = tempRet0; - $556 = (_i64Add(($554|0),($555|0),($546|0),($547|0))|0); - $557 = tempRet0; - $558 = (_i64Add(($556|0),($557|0),($542|0),($543|0))|0); - $559 = tempRet0; - $560 = (_i64Add(($558|0),($559|0),($540|0),($541|0))|0); - $561 = tempRet0; - $562 = (_i64Add(($560|0),($561|0),($538|0),($539|0))|0); - $563 = tempRet0; - $564 = (___muldi3(($130|0),($131|0),($38|0),0)|0); - $565 = tempRet0; - $566 = (___muldi3(($126|0),0,($44|0),0)|0); - $567 = tempRet0; - $568 = (___muldi3(($120|0),0,($48|0),0)|0); - $569 = tempRet0; - $570 = (___muldi3(($114|0),0,($54|0),0)|0); - $571 = tempRet0; - $572 = (___muldi3(($110|0),0,($60|0),0)|0); - $573 = tempRet0; - $574 = (___muldi3(($104|0),0,($64|0),($65|0))|0); - $575 = tempRet0; - $576 = (___muldi3(($130|0),($131|0),($44|0),0)|0); - $577 = tempRet0; - $578 = (___muldi3(($126|0),0,($48|0),0)|0); - $579 = tempRet0; - $580 = (___muldi3(($120|0),0,($54|0),0)|0); - $581 = tempRet0; - $582 = (___muldi3(($114|0),0,($60|0),0)|0); - $583 = tempRet0; - $584 = (___muldi3(($110|0),0,($64|0),($65|0))|0); - $585 = tempRet0; - $586 = (_i64Add(($584|0),($585|0),($582|0),($583|0))|0); - $587 = tempRet0; - $588 = (_i64Add(($586|0),($587|0),($580|0),($581|0))|0); - $589 = tempRet0; - $590 = (_i64Add(($588|0),($589|0),($578|0),($579|0))|0); - $591 = tempRet0; - $592 = (_i64Add(($590|0),($591|0),($576|0),($577|0))|0); - $593 = tempRet0; - $594 = (___muldi3(($130|0),($131|0),($48|0),0)|0); - $595 = tempRet0; - $596 = (___muldi3(($126|0),0,($54|0),0)|0); - $597 = tempRet0; - $598 = (___muldi3(($120|0),0,($60|0),0)|0); - $599 = tempRet0; - $600 = (___muldi3(($114|0),0,($64|0),($65|0))|0); - $601 = tempRet0; - $602 = (___muldi3(($130|0),($131|0),($54|0),0)|0); - $603 = tempRet0; - $604 = (___muldi3(($126|0),0,($60|0),0)|0); - $605 = tempRet0; - $606 = (___muldi3(($120|0),0,($64|0),($65|0))|0); - $607 = tempRet0; - $608 = (_i64Add(($604|0),($605|0),($606|0),($607|0))|0); - $609 = tempRet0; - $610 = (_i64Add(($608|0),($609|0),($602|0),($603|0))|0); - $611 = tempRet0; - $612 = (___muldi3(($130|0),($131|0),($60|0),0)|0); - $613 = tempRet0; - $614 = (___muldi3(($126|0),0,($64|0),($65|0))|0); - $615 = tempRet0; - $616 = (_i64Add(($612|0),($613|0),($614|0),($615|0))|0); - $617 = tempRet0; - $618 = (___muldi3(($130|0),($131|0),($64|0),($65|0))|0); - $619 = tempRet0; - $620 = (_i64Add(($200|0),($201|0),1048576,0)|0); - $621 = tempRet0; - $622 = (_bitshift64Lshr(($620|0),($621|0),21)|0); - $623 = tempRet0; - $624 = (_i64Add(($202|0),($203|0),($204|0),($205|0))|0); - $625 = tempRet0; - $626 = (_i64Add(($624|0),($625|0),($140|0),0)|0); - $627 = tempRet0; - $628 = (_i64Add(($626|0),($627|0),($622|0),($623|0))|0); - $629 = tempRet0; - $630 = (_bitshift64Shl(($622|0),($623|0),21)|0); - $631 = tempRet0; - $632 = (_i64Subtract(($200|0),($201|0),($630|0),($631|0))|0); - $633 = tempRet0; - $634 = (_i64Add(($216|0),($217|0),1048576,0)|0); - $635 = tempRet0; - $636 = (_bitshift64Lshr(($634|0),($635|0),21)|0); - $637 = tempRet0; - $638 = (_i64Add(($222|0),($223|0),($224|0),($225|0))|0); - $639 = tempRet0; - $640 = (_i64Add(($638|0),($639|0),($220|0),($221|0))|0); - $641 = tempRet0; - $642 = (_i64Add(($640|0),($641|0),($218|0),($219|0))|0); - $643 = tempRet0; - $644 = (_i64Add(($642|0),($643|0),($152|0),0)|0); - $645 = tempRet0; - $646 = (_i64Add(($644|0),($645|0),($636|0),($637|0))|0); - $647 = tempRet0; - $648 = (_bitshift64Shl(($636|0),($637|0),21)|0); - $649 = tempRet0; - $650 = (_i64Add(($244|0),($245|0),1048576,0)|0); - $651 = tempRet0; - $652 = (_bitshift64Ashr(($650|0),($651|0),21)|0); - $653 = tempRet0; - $654 = (_i64Add(($254|0),($255|0),($256|0),($257|0))|0); - $655 = tempRet0; - $656 = (_i64Add(($654|0),($655|0),($252|0),($253|0))|0); - $657 = tempRet0; - $658 = (_i64Add(($656|0),($657|0),($250|0),($251|0))|0); - $659 = tempRet0; - $660 = (_i64Add(($658|0),($659|0),($248|0),($249|0))|0); - $661 = tempRet0; - $662 = (_i64Add(($660|0),($661|0),($246|0),($247|0))|0); - $663 = tempRet0; - $664 = (_i64Add(($662|0),($663|0),($164|0),0)|0); - $665 = tempRet0; - $666 = (_i64Add(($664|0),($665|0),($652|0),($653|0))|0); - $667 = tempRet0; - $668 = (_bitshift64Shl(($652|0),($653|0),21)|0); - $669 = tempRet0; - $670 = (_i64Subtract(($244|0),($245|0),($668|0),($669|0))|0); - $671 = tempRet0; - $672 = (_i64Add(($284|0),($285|0),1048576,0)|0); - $673 = tempRet0; - $674 = (_bitshift64Ashr(($672|0),($673|0),21)|0); - $675 = tempRet0; - $676 = (_i64Add(($298|0),($299|0),($300|0),($301|0))|0); - $677 = tempRet0; - $678 = (_i64Add(($676|0),($677|0),($296|0),($297|0))|0); - $679 = tempRet0; - $680 = (_i64Add(($678|0),($679|0),($294|0),($295|0))|0); - $681 = tempRet0; - $682 = (_i64Add(($680|0),($681|0),($292|0),($293|0))|0); - $683 = tempRet0; - $684 = (_i64Add(($682|0),($683|0),($290|0),($291|0))|0); - $685 = tempRet0; - $686 = (_i64Add(($684|0),($685|0),($288|0),($289|0))|0); - $687 = tempRet0; - $688 = (_i64Add(($686|0),($687|0),($286|0),($287|0))|0); - $689 = tempRet0; - $690 = (_i64Add(($688|0),($689|0),($176|0),0)|0); - $691 = tempRet0; - $692 = (_i64Add(($690|0),($691|0),($674|0),($675|0))|0); - $693 = tempRet0; - $694 = (_bitshift64Shl(($674|0),($675|0),21)|0); - $695 = tempRet0; - $696 = (_i64Add(($336|0),($337|0),1048576,0)|0); - $697 = tempRet0; - $698 = (_bitshift64Ashr(($696|0),($697|0),21)|0); - $699 = tempRet0; - $700 = (_i64Add(($354|0),($355|0),($356|0),($357|0))|0); - $701 = tempRet0; - $702 = (_i64Add(($700|0),($701|0),($352|0),($353|0))|0); - $703 = tempRet0; - $704 = (_i64Add(($702|0),($703|0),($350|0),($351|0))|0); - $705 = tempRet0; - $706 = (_i64Add(($704|0),($705|0),($348|0),($349|0))|0); - $707 = tempRet0; - $708 = (_i64Add(($706|0),($707|0),($346|0),($347|0))|0); - $709 = tempRet0; - $710 = (_i64Add(($708|0),($709|0),($344|0),($345|0))|0); - $711 = tempRet0; - $712 = (_i64Add(($710|0),($711|0),($340|0),($341|0))|0); - $713 = tempRet0; - $714 = (_i64Add(($712|0),($713|0),($342|0),($343|0))|0); - $715 = tempRet0; - $716 = (_i64Add(($714|0),($715|0),($338|0),($339|0))|0); - $717 = tempRet0; - $718 = (_i64Add(($716|0),($717|0),($186|0),0)|0); - $719 = tempRet0; - $720 = (_i64Add(($718|0),($719|0),($698|0),($699|0))|0); - $721 = tempRet0; - $722 = (_bitshift64Shl(($698|0),($699|0),21)|0); - $723 = tempRet0; - $724 = (_i64Add(($400|0),($401|0),1048576,0)|0); - $725 = tempRet0; - $726 = (_bitshift64Ashr(($724|0),($725|0),21)|0); - $727 = tempRet0; - $728 = (_i64Add(($422|0),($423|0),($424|0),($425|0))|0); - $729 = tempRet0; - $730 = (_i64Add(($728|0),($729|0),($420|0),($421|0))|0); - $731 = tempRet0; - $732 = (_i64Add(($730|0),($731|0),($418|0),($419|0))|0); - $733 = tempRet0; - $734 = (_i64Add(($732|0),($733|0),($416|0),($417|0))|0); - $735 = tempRet0; - $736 = (_i64Add(($734|0),($735|0),($414|0),($415|0))|0); - $737 = tempRet0; - $738 = (_i64Add(($736|0),($737|0),($412|0),($413|0))|0); - $739 = tempRet0; - $740 = (_i64Add(($738|0),($739|0),($408|0),($409|0))|0); - $741 = tempRet0; - $742 = (_i64Add(($740|0),($741|0),($410|0),($411|0))|0); - $743 = tempRet0; - $744 = (_i64Add(($742|0),($743|0),($406|0),($407|0))|0); - $745 = tempRet0; - $746 = (_i64Add(($744|0),($745|0),($402|0),($403|0))|0); - $747 = tempRet0; - $748 = (_i64Add(($746|0),($747|0),($404|0),($405|0))|0); - $749 = tempRet0; - $750 = (_i64Add(($748|0),($749|0),($196|0),($197|0))|0); - $751 = tempRet0; - $752 = (_i64Add(($750|0),($751|0),($726|0),($727|0))|0); - $753 = tempRet0; - $754 = (_bitshift64Shl(($726|0),($727|0),21)|0); - $755 = tempRet0; - $756 = (_i64Add(($466|0),($467|0),1048576,0)|0); - $757 = tempRet0; - $758 = (_bitshift64Ashr(($756|0),($757|0),21)|0); - $759 = tempRet0; - $760 = (_i64Add(($484|0),($485|0),($486|0),($487|0))|0); - $761 = tempRet0; - $762 = (_i64Add(($760|0),($761|0),($482|0),($483|0))|0); - $763 = tempRet0; - $764 = (_i64Add(($762|0),($763|0),($480|0),($481|0))|0); - $765 = tempRet0; - $766 = (_i64Add(($764|0),($765|0),($478|0),($479|0))|0); - $767 = tempRet0; - $768 = (_i64Add(($766|0),($767|0),($474|0),($475|0))|0); - $769 = tempRet0; - $770 = (_i64Add(($768|0),($769|0),($476|0),($477|0))|0); - $771 = tempRet0; - $772 = (_i64Add(($770|0),($771|0),($472|0),($473|0))|0); - $773 = tempRet0; - $774 = (_i64Add(($772|0),($773|0),($470|0),($471|0))|0); - $775 = tempRet0; - $776 = (_i64Add(($774|0),($775|0),($468|0),($469|0))|0); - $777 = tempRet0; - $778 = (_i64Add(($776|0),($777|0),($758|0),($759|0))|0); - $779 = tempRet0; - $780 = (_bitshift64Shl(($758|0),($759|0),21)|0); - $781 = tempRet0; - $782 = (_i64Add(($520|0),($521|0),1048576,0)|0); - $783 = tempRet0; - $784 = (_bitshift64Ashr(($782|0),($783|0),21)|0); - $785 = tempRet0; - $786 = (_i64Add(($534|0),($535|0),($536|0),($537|0))|0); - $787 = tempRet0; - $788 = (_i64Add(($786|0),($787|0),($532|0),($533|0))|0); - $789 = tempRet0; - $790 = (_i64Add(($788|0),($789|0),($528|0),($529|0))|0); - $791 = tempRet0; - $792 = (_i64Add(($790|0),($791|0),($530|0),($531|0))|0); - $793 = tempRet0; - $794 = (_i64Add(($792|0),($793|0),($526|0),($527|0))|0); - $795 = tempRet0; - $796 = (_i64Add(($794|0),($795|0),($524|0),($525|0))|0); - $797 = tempRet0; - $798 = (_i64Add(($796|0),($797|0),($522|0),($523|0))|0); - $799 = tempRet0; - $800 = (_i64Add(($798|0),($799|0),($784|0),($785|0))|0); - $801 = tempRet0; - $802 = (_bitshift64Shl(($784|0),($785|0),21)|0); - $803 = tempRet0; - $804 = (_i64Add(($562|0),($563|0),1048576,0)|0); - $805 = tempRet0; - $806 = (_bitshift64Ashr(($804|0),($805|0),21)|0); - $807 = tempRet0; - $808 = (_i64Add(($570|0),($571|0),($574|0),($575|0))|0); - $809 = tempRet0; - $810 = (_i64Add(($808|0),($809|0),($572|0),($573|0))|0); - $811 = tempRet0; - $812 = (_i64Add(($810|0),($811|0),($568|0),($569|0))|0); - $813 = tempRet0; - $814 = (_i64Add(($812|0),($813|0),($566|0),($567|0))|0); - $815 = tempRet0; - $816 = (_i64Add(($814|0),($815|0),($564|0),($565|0))|0); - $817 = tempRet0; - $818 = (_i64Add(($816|0),($817|0),($806|0),($807|0))|0); - $819 = tempRet0; - $820 = (_bitshift64Shl(($806|0),($807|0),21)|0); - $821 = tempRet0; - $822 = (_i64Add(($592|0),($593|0),1048576,0)|0); - $823 = tempRet0; - $824 = (_bitshift64Ashr(($822|0),($823|0),21)|0); - $825 = tempRet0; - $826 = (_i64Add(($598|0),($599|0),($600|0),($601|0))|0); - $827 = tempRet0; - $828 = (_i64Add(($826|0),($827|0),($596|0),($597|0))|0); - $829 = tempRet0; - $830 = (_i64Add(($828|0),($829|0),($594|0),($595|0))|0); - $831 = tempRet0; - $832 = (_i64Add(($830|0),($831|0),($824|0),($825|0))|0); - $833 = tempRet0; - $834 = (_bitshift64Shl(($824|0),($825|0),21)|0); - $835 = tempRet0; - $836 = (_i64Subtract(($592|0),($593|0),($834|0),($835|0))|0); - $837 = tempRet0; - $838 = (_i64Add(($610|0),($611|0),1048576,0)|0); - $839 = tempRet0; - $840 = (_bitshift64Lshr(($838|0),($839|0),21)|0); - $841 = tempRet0; - $842 = (_i64Add(($616|0),($617|0),($840|0),($841|0))|0); - $843 = tempRet0; - $844 = (_bitshift64Shl(($840|0),($841|0),21)|0); - $845 = tempRet0; - $846 = (_i64Subtract(($610|0),($611|0),($844|0),($845|0))|0); - $847 = tempRet0; - $848 = (_i64Add(($618|0),($619|0),1048576,0)|0); - $849 = tempRet0; - $850 = (_bitshift64Lshr(($848|0),($849|0),21)|0); - $851 = tempRet0; - $852 = (_bitshift64Shl(($850|0),($851|0),21)|0); - $853 = tempRet0; - $854 = (_i64Subtract(($618|0),($619|0),($852|0),($853|0))|0); - $855 = tempRet0; - $856 = (_i64Add(($628|0),($629|0),1048576,0)|0); - $857 = tempRet0; - $858 = (_bitshift64Lshr(($856|0),($857|0),21)|0); - $859 = tempRet0; - $860 = (_bitshift64Shl(($858|0),($859|0),21)|0); - $861 = tempRet0; - $862 = (_i64Subtract(($628|0),($629|0),($860|0),($861|0))|0); - $863 = tempRet0; - $864 = (_i64Add(($646|0),($647|0),1048576,0)|0); - $865 = tempRet0; - $866 = (_bitshift64Ashr(($864|0),($865|0),21)|0); - $867 = tempRet0; - $868 = (_i64Add(($670|0),($671|0),($866|0),($867|0))|0); - $869 = tempRet0; - $870 = (_bitshift64Shl(($866|0),($867|0),21)|0); - $871 = tempRet0; - $872 = (_i64Subtract(($646|0),($647|0),($870|0),($871|0))|0); - $873 = tempRet0; - $874 = (_i64Add(($666|0),($667|0),1048576,0)|0); - $875 = tempRet0; - $876 = (_bitshift64Ashr(($874|0),($875|0),21)|0); - $877 = tempRet0; - $878 = (_bitshift64Shl(($876|0),($877|0),21)|0); - $879 = tempRet0; - $880 = (_i64Subtract(($666|0),($667|0),($878|0),($879|0))|0); - $881 = tempRet0; - $882 = (_i64Add(($692|0),($693|0),1048576,0)|0); - $883 = tempRet0; - $884 = (_bitshift64Ashr(($882|0),($883|0),21)|0); - $885 = tempRet0; - $886 = (_bitshift64Shl(($884|0),($885|0),21)|0); - $887 = tempRet0; - $888 = (_i64Add(($720|0),($721|0),1048576,0)|0); - $889 = tempRet0; - $890 = (_bitshift64Ashr(($888|0),($889|0),21)|0); - $891 = tempRet0; - $892 = (_bitshift64Shl(($890|0),($891|0),21)|0); - $893 = tempRet0; - $894 = (_i64Add(($752|0),($753|0),1048576,0)|0); - $895 = tempRet0; - $896 = (_bitshift64Ashr(($894|0),($895|0),21)|0); - $897 = tempRet0; - $898 = (_bitshift64Shl(($896|0),($897|0),21)|0); - $899 = tempRet0; - $900 = (_i64Add(($778|0),($779|0),1048576,0)|0); - $901 = tempRet0; - $902 = (_bitshift64Ashr(($900|0),($901|0),21)|0); - $903 = tempRet0; - $904 = (_bitshift64Shl(($902|0),($903|0),21)|0); - $905 = tempRet0; - $906 = (_i64Add(($800|0),($801|0),1048576,0)|0); - $907 = tempRet0; - $908 = (_bitshift64Ashr(($906|0),($907|0),21)|0); - $909 = tempRet0; - $910 = (_bitshift64Shl(($908|0),($909|0),21)|0); - $911 = tempRet0; - $912 = (_i64Add(($818|0),($819|0),1048576,0)|0); - $913 = tempRet0; - $914 = (_bitshift64Ashr(($912|0),($913|0),21)|0); - $915 = tempRet0; - $916 = (_i64Add(($914|0),($915|0),($836|0),($837|0))|0); - $917 = tempRet0; - $918 = (_bitshift64Shl(($914|0),($915|0),21)|0); - $919 = tempRet0; - $920 = (_i64Subtract(($818|0),($819|0),($918|0),($919|0))|0); - $921 = tempRet0; - $922 = (_i64Add(($832|0),($833|0),1048576,0)|0); - $923 = tempRet0; - $924 = (_bitshift64Ashr(($922|0),($923|0),21)|0); - $925 = tempRet0; - $926 = (_i64Add(($924|0),($925|0),($846|0),($847|0))|0); - $927 = tempRet0; - $928 = (_bitshift64Shl(($924|0),($925|0),21)|0); - $929 = tempRet0; - $930 = (_i64Subtract(($832|0),($833|0),($928|0),($929|0))|0); - $931 = tempRet0; - $932 = (_i64Add(($842|0),($843|0),1048576,0)|0); - $933 = tempRet0; - $934 = (_bitshift64Lshr(($932|0),($933|0),21)|0); - $935 = tempRet0; - $936 = (_i64Add(($934|0),($935|0),($854|0),($855|0))|0); - $937 = tempRet0; - $938 = (_bitshift64Shl(($934|0),($935|0),21)|0); - $939 = tempRet0; - $940 = (_i64Subtract(($842|0),($843|0),($938|0),($939|0))|0); - $941 = tempRet0; - $942 = (___muldi3(($850|0),($851|0),666643,0)|0); - $943 = tempRet0; - $944 = (___muldi3(($850|0),($851|0),470296,0)|0); - $945 = tempRet0; - $946 = (___muldi3(($850|0),($851|0),654183,0)|0); - $947 = tempRet0; - $948 = (___muldi3(($850|0),($851|0),-997805,-1)|0); - $949 = tempRet0; - $950 = (___muldi3(($850|0),($851|0),136657,0)|0); - $951 = tempRet0; - $952 = (___muldi3(($850|0),($851|0),-683901,-1)|0); - $953 = tempRet0; - $954 = (_i64Add(($952|0),($953|0),($562|0),($563|0))|0); - $955 = tempRet0; - $956 = (_i64Subtract(($954|0),($955|0),($820|0),($821|0))|0); - $957 = tempRet0; - $958 = (_i64Add(($956|0),($957|0),($908|0),($909|0))|0); - $959 = tempRet0; - $960 = (___muldi3(($936|0),($937|0),666643,0)|0); - $961 = tempRet0; - $962 = (___muldi3(($936|0),($937|0),470296,0)|0); - $963 = tempRet0; - $964 = (___muldi3(($936|0),($937|0),654183,0)|0); - $965 = tempRet0; - $966 = (___muldi3(($936|0),($937|0),-997805,-1)|0); - $967 = tempRet0; - $968 = (___muldi3(($936|0),($937|0),136657,0)|0); - $969 = tempRet0; - $970 = (___muldi3(($936|0),($937|0),-683901,-1)|0); - $971 = tempRet0; - $972 = (___muldi3(($940|0),($941|0),666643,0)|0); - $973 = tempRet0; - $974 = (___muldi3(($940|0),($941|0),470296,0)|0); - $975 = tempRet0; - $976 = (___muldi3(($940|0),($941|0),654183,0)|0); - $977 = tempRet0; - $978 = (___muldi3(($940|0),($941|0),-997805,-1)|0); - $979 = tempRet0; - $980 = (___muldi3(($940|0),($941|0),136657,0)|0); - $981 = tempRet0; - $982 = (___muldi3(($940|0),($941|0),-683901,-1)|0); - $983 = tempRet0; - $984 = (_i64Add(($948|0),($949|0),($520|0),($521|0))|0); - $985 = tempRet0; - $986 = (_i64Subtract(($984|0),($985|0),($802|0),($803|0))|0); - $987 = tempRet0; - $988 = (_i64Add(($986|0),($987|0),($902|0),($903|0))|0); - $989 = tempRet0; - $990 = (_i64Add(($988|0),($989|0),($968|0),($969|0))|0); - $991 = tempRet0; - $992 = (_i64Add(($990|0),($991|0),($982|0),($983|0))|0); - $993 = tempRet0; - $994 = (___muldi3(($926|0),($927|0),666643,0)|0); - $995 = tempRet0; - $996 = (___muldi3(($926|0),($927|0),470296,0)|0); - $997 = tempRet0; - $998 = (___muldi3(($926|0),($927|0),654183,0)|0); - $999 = tempRet0; - $1000 = (___muldi3(($926|0),($927|0),-997805,-1)|0); - $1001 = tempRet0; - $1002 = (___muldi3(($926|0),($927|0),136657,0)|0); - $1003 = tempRet0; - $1004 = (___muldi3(($926|0),($927|0),-683901,-1)|0); - $1005 = tempRet0; - $1006 = (___muldi3(($930|0),($931|0),666643,0)|0); - $1007 = tempRet0; - $1008 = (___muldi3(($930|0),($931|0),470296,0)|0); - $1009 = tempRet0; - $1010 = (___muldi3(($930|0),($931|0),654183,0)|0); - $1011 = tempRet0; - $1012 = (___muldi3(($930|0),($931|0),-997805,-1)|0); - $1013 = tempRet0; - $1014 = (___muldi3(($930|0),($931|0),136657,0)|0); - $1015 = tempRet0; - $1016 = (___muldi3(($930|0),($931|0),-683901,-1)|0); - $1017 = tempRet0; - $1018 = (_i64Add(($944|0),($945|0),($466|0),($467|0))|0); - $1019 = tempRet0; - $1020 = (_i64Subtract(($1018|0),($1019|0),($780|0),($781|0))|0); - $1021 = tempRet0; - $1022 = (_i64Add(($1020|0),($1021|0),($964|0),($965|0))|0); - $1023 = tempRet0; - $1024 = (_i64Add(($1022|0),($1023|0),($1002|0),($1003|0))|0); - $1025 = tempRet0; - $1026 = (_i64Add(($1024|0),($1025|0),($978|0),($979|0))|0); - $1027 = tempRet0; - $1028 = (_i64Add(($1026|0),($1027|0),($1016|0),($1017|0))|0); - $1029 = tempRet0; - $1030 = (_i64Add(($1028|0),($1029|0),($896|0),($897|0))|0); - $1031 = tempRet0; - $1032 = (___muldi3(($916|0),($917|0),666643,0)|0); - $1033 = tempRet0; - $1034 = (_i64Add(($1032|0),($1033|0),($284|0),($285|0))|0); - $1035 = tempRet0; - $1036 = (_i64Subtract(($1034|0),($1035|0),($694|0),($695|0))|0); - $1037 = tempRet0; - $1038 = (_i64Add(($1036|0),($1037|0),($876|0),($877|0))|0); - $1039 = tempRet0; - $1040 = (___muldi3(($916|0),($917|0),470296,0)|0); - $1041 = tempRet0; - $1042 = (___muldi3(($916|0),($917|0),654183,0)|0); - $1043 = tempRet0; - $1044 = (_i64Add(($994|0),($995|0),($336|0),($337|0))|0); - $1045 = tempRet0; - $1046 = (_i64Add(($1044|0),($1045|0),($1042|0),($1043|0))|0); - $1047 = tempRet0; - $1048 = (_i64Add(($1046|0),($1047|0),($1008|0),($1009|0))|0); - $1049 = tempRet0; - $1050 = (_i64Subtract(($1048|0),($1049|0),($722|0),($723|0))|0); - $1051 = tempRet0; - $1052 = (_i64Add(($1050|0),($1051|0),($884|0),($885|0))|0); - $1053 = tempRet0; - $1054 = (___muldi3(($916|0),($917|0),-997805,-1)|0); - $1055 = tempRet0; - $1056 = (___muldi3(($916|0),($917|0),136657,0)|0); - $1057 = tempRet0; - $1058 = (_i64Add(($998|0),($999|0),($960|0),($961|0))|0); - $1059 = tempRet0; - $1060 = (_i64Add(($1058|0),($1059|0),($1056|0),($1057|0))|0); - $1061 = tempRet0; - $1062 = (_i64Add(($1060|0),($1061|0),($974|0),($975|0))|0); - $1063 = tempRet0; - $1064 = (_i64Add(($1062|0),($1063|0),($1012|0),($1013|0))|0); - $1065 = tempRet0; - $1066 = (_i64Add(($1064|0),($1065|0),($400|0),($401|0))|0); - $1067 = tempRet0; - $1068 = (_i64Add(($1066|0),($1067|0),($890|0),($891|0))|0); - $1069 = tempRet0; - $1070 = (_i64Subtract(($1068|0),($1069|0),($754|0),($755|0))|0); - $1071 = tempRet0; - $1072 = (___muldi3(($916|0),($917|0),-683901,-1)|0); - $1073 = tempRet0; - $1074 = (_i64Add(($1038|0),($1039|0),1048576,0)|0); - $1075 = tempRet0; - $1076 = (_bitshift64Ashr(($1074|0),($1075|0),21)|0); - $1077 = tempRet0; - $1078 = (_i64Add(($1006|0),($1007|0),($1040|0),($1041|0))|0); - $1079 = tempRet0; - $1080 = (_i64Add(($1078|0),($1079|0),($692|0),($693|0))|0); - $1081 = tempRet0; - $1082 = (_i64Subtract(($1080|0),($1081|0),($886|0),($887|0))|0); - $1083 = tempRet0; - $1084 = (_i64Add(($1082|0),($1083|0),($1076|0),($1077|0))|0); - $1085 = tempRet0; - $1086 = (_bitshift64Shl(($1076|0),($1077|0),21)|0); - $1087 = tempRet0; - $1088 = (_i64Add(($1052|0),($1053|0),1048576,0)|0); - $1089 = tempRet0; - $1090 = (_bitshift64Ashr(($1088|0),($1089|0),21)|0); - $1091 = tempRet0; - $1092 = (_i64Add(($1054|0),($1055|0),($996|0),($997|0))|0); - $1093 = tempRet0; - $1094 = (_i64Add(($1092|0),($1093|0),($972|0),($973|0))|0); - $1095 = tempRet0; - $1096 = (_i64Add(($1094|0),($1095|0),($1010|0),($1011|0))|0); - $1097 = tempRet0; - $1098 = (_i64Add(($1096|0),($1097|0),($720|0),($721|0))|0); - $1099 = tempRet0; - $1100 = (_i64Subtract(($1098|0),($1099|0),($892|0),($893|0))|0); - $1101 = tempRet0; - $1102 = (_i64Add(($1100|0),($1101|0),($1090|0),($1091|0))|0); - $1103 = tempRet0; - $1104 = (_bitshift64Shl(($1090|0),($1091|0),21)|0); - $1105 = tempRet0; - $1106 = (_i64Add(($1070|0),($1071|0),1048576,0)|0); - $1107 = tempRet0; - $1108 = (_bitshift64Ashr(($1106|0),($1107|0),21)|0); - $1109 = tempRet0; - $1110 = (_i64Add(($962|0),($963|0),($942|0),($943|0))|0); - $1111 = tempRet0; - $1112 = (_i64Add(($1110|0),($1111|0),($1000|0),($1001|0))|0); - $1113 = tempRet0; - $1114 = (_i64Add(($1112|0),($1113|0),($1072|0),($1073|0))|0); - $1115 = tempRet0; - $1116 = (_i64Add(($1114|0),($1115|0),($976|0),($977|0))|0); - $1117 = tempRet0; - $1118 = (_i64Add(($1116|0),($1117|0),($1014|0),($1015|0))|0); - $1119 = tempRet0; - $1120 = (_i64Add(($1118|0),($1119|0),($752|0),($753|0))|0); - $1121 = tempRet0; - $1122 = (_i64Subtract(($1120|0),($1121|0),($898|0),($899|0))|0); - $1123 = tempRet0; - $1124 = (_i64Add(($1122|0),($1123|0),($1108|0),($1109|0))|0); - $1125 = tempRet0; - $1126 = (_bitshift64Shl(($1108|0),($1109|0),21)|0); - $1127 = tempRet0; - $1128 = (_i64Add(($1030|0),($1031|0),1048576,0)|0); - $1129 = tempRet0; - $1130 = (_bitshift64Ashr(($1128|0),($1129|0),21)|0); - $1131 = tempRet0; - $1132 = (_i64Add(($778|0),($779|0),($946|0),($947|0))|0); - $1133 = tempRet0; - $1134 = (_i64Subtract(($1132|0),($1133|0),($904|0),($905|0))|0); - $1135 = tempRet0; - $1136 = (_i64Add(($1134|0),($1135|0),($966|0),($967|0))|0); - $1137 = tempRet0; - $1138 = (_i64Add(($1136|0),($1137|0),($1004|0),($1005|0))|0); - $1139 = tempRet0; - $1140 = (_i64Add(($1138|0),($1139|0),($980|0),($981|0))|0); - $1141 = tempRet0; - $1142 = (_i64Add(($1140|0),($1141|0),($1130|0),($1131|0))|0); - $1143 = tempRet0; - $1144 = (_bitshift64Shl(($1130|0),($1131|0),21)|0); - $1145 = tempRet0; - $1146 = (_i64Subtract(($1030|0),($1031|0),($1144|0),($1145|0))|0); - $1147 = tempRet0; - $1148 = (_i64Add(($992|0),($993|0),1048576,0)|0); - $1149 = tempRet0; - $1150 = (_bitshift64Ashr(($1148|0),($1149|0),21)|0); - $1151 = tempRet0; - $1152 = (_i64Add(($800|0),($801|0),($950|0),($951|0))|0); - $1153 = tempRet0; - $1154 = (_i64Subtract(($1152|0),($1153|0),($910|0),($911|0))|0); - $1155 = tempRet0; - $1156 = (_i64Add(($1154|0),($1155|0),($970|0),($971|0))|0); - $1157 = tempRet0; - $1158 = (_i64Add(($1156|0),($1157|0),($1150|0),($1151|0))|0); - $1159 = tempRet0; - $1160 = (_bitshift64Shl(($1150|0),($1151|0),21)|0); - $1161 = tempRet0; - $1162 = (_i64Subtract(($992|0),($993|0),($1160|0),($1161|0))|0); - $1163 = tempRet0; - $1164 = (_i64Add(($958|0),($959|0),1048576,0)|0); - $1165 = tempRet0; - $1166 = (_bitshift64Ashr(($1164|0),($1165|0),21)|0); - $1167 = tempRet0; - $1168 = (_i64Add(($1166|0),($1167|0),($920|0),($921|0))|0); - $1169 = tempRet0; - $1170 = (_bitshift64Shl(($1166|0),($1167|0),21)|0); - $1171 = tempRet0; - $1172 = (_i64Subtract(($958|0),($959|0),($1170|0),($1171|0))|0); - $1173 = tempRet0; - $1174 = (_i64Add(($1084|0),($1085|0),1048576,0)|0); - $1175 = tempRet0; - $1176 = (_bitshift64Ashr(($1174|0),($1175|0),21)|0); - $1177 = tempRet0; - $1178 = (_bitshift64Shl(($1176|0),($1177|0),21)|0); - $1179 = tempRet0; - $1180 = (_i64Add(($1102|0),($1103|0),1048576,0)|0); - $1181 = tempRet0; - $1182 = (_bitshift64Ashr(($1180|0),($1181|0),21)|0); - $1183 = tempRet0; - $1184 = (_bitshift64Shl(($1182|0),($1183|0),21)|0); - $1185 = tempRet0; - $1186 = (_i64Add(($1124|0),($1125|0),1048576,0)|0); - $1187 = tempRet0; - $1188 = (_bitshift64Ashr(($1186|0),($1187|0),21)|0); - $1189 = tempRet0; - $1190 = (_i64Add(($1146|0),($1147|0),($1188|0),($1189|0))|0); - $1191 = tempRet0; - $1192 = (_bitshift64Shl(($1188|0),($1189|0),21)|0); - $1193 = tempRet0; - $1194 = (_i64Subtract(($1124|0),($1125|0),($1192|0),($1193|0))|0); - $1195 = tempRet0; - $1196 = (_i64Add(($1142|0),($1143|0),1048576,0)|0); - $1197 = tempRet0; - $1198 = (_bitshift64Ashr(($1196|0),($1197|0),21)|0); - $1199 = tempRet0; - $1200 = (_i64Add(($1198|0),($1199|0),($1162|0),($1163|0))|0); - $1201 = tempRet0; - $1202 = (_bitshift64Shl(($1198|0),($1199|0),21)|0); - $1203 = tempRet0; - $1204 = (_i64Subtract(($1142|0),($1143|0),($1202|0),($1203|0))|0); - $1205 = tempRet0; - $1206 = (_i64Add(($1158|0),($1159|0),1048576,0)|0); - $1207 = tempRet0; - $1208 = (_bitshift64Ashr(($1206|0),($1207|0),21)|0); - $1209 = tempRet0; - $1210 = (_i64Add(($1208|0),($1209|0),($1172|0),($1173|0))|0); - $1211 = tempRet0; - $1212 = (_bitshift64Shl(($1208|0),($1209|0),21)|0); - $1213 = tempRet0; - $1214 = (_i64Subtract(($1158|0),($1159|0),($1212|0),($1213|0))|0); - $1215 = tempRet0; - $1216 = (___muldi3(($1168|0),($1169|0),666643,0)|0); - $1217 = tempRet0; - $1218 = (_i64Add(($880|0),($881|0),($1216|0),($1217|0))|0); - $1219 = tempRet0; - $1220 = (___muldi3(($1168|0),($1169|0),470296,0)|0); - $1221 = tempRet0; - $1222 = (___muldi3(($1168|0),($1169|0),654183,0)|0); - $1223 = tempRet0; - $1224 = (___muldi3(($1168|0),($1169|0),-997805,-1)|0); - $1225 = tempRet0; - $1226 = (___muldi3(($1168|0),($1169|0),136657,0)|0); - $1227 = tempRet0; - $1228 = (___muldi3(($1168|0),($1169|0),-683901,-1)|0); - $1229 = tempRet0; - $1230 = (_i64Add(($1070|0),($1071|0),($1228|0),($1229|0))|0); - $1231 = tempRet0; - $1232 = (_i64Subtract(($1230|0),($1231|0),($1126|0),($1127|0))|0); - $1233 = tempRet0; - $1234 = (_i64Add(($1232|0),($1233|0),($1182|0),($1183|0))|0); - $1235 = tempRet0; - $1236 = (___muldi3(($1210|0),($1211|0),666643,0)|0); - $1237 = tempRet0; - $1238 = (_i64Add(($868|0),($869|0),($1236|0),($1237|0))|0); - $1239 = tempRet0; - $1240 = (___muldi3(($1210|0),($1211|0),470296,0)|0); - $1241 = tempRet0; - $1242 = (_i64Add(($1218|0),($1219|0),($1240|0),($1241|0))|0); - $1243 = tempRet0; - $1244 = (___muldi3(($1210|0),($1211|0),654183,0)|0); - $1245 = tempRet0; - $1246 = (___muldi3(($1210|0),($1211|0),-997805,-1)|0); - $1247 = tempRet0; - $1248 = (___muldi3(($1210|0),($1211|0),136657,0)|0); - $1249 = tempRet0; - $1250 = (___muldi3(($1210|0),($1211|0),-683901,-1)|0); - $1251 = tempRet0; - $1252 = (___muldi3(($1214|0),($1215|0),666643,0)|0); - $1253 = tempRet0; - $1254 = (_i64Add(($872|0),($873|0),($1252|0),($1253|0))|0); - $1255 = tempRet0; - $1256 = (___muldi3(($1214|0),($1215|0),470296,0)|0); - $1257 = tempRet0; - $1258 = (_i64Add(($1238|0),($1239|0),($1256|0),($1257|0))|0); - $1259 = tempRet0; - $1260 = (___muldi3(($1214|0),($1215|0),654183,0)|0); - $1261 = tempRet0; - $1262 = (_i64Add(($1242|0),($1243|0),($1260|0),($1261|0))|0); - $1263 = tempRet0; - $1264 = (___muldi3(($1214|0),($1215|0),-997805,-1)|0); - $1265 = tempRet0; - $1266 = (___muldi3(($1214|0),($1215|0),136657,0)|0); - $1267 = tempRet0; - $1268 = (___muldi3(($1214|0),($1215|0),-683901,-1)|0); - $1269 = tempRet0; - $1270 = (_i64Add(($1052|0),($1053|0),($1224|0),($1225|0))|0); - $1271 = tempRet0; - $1272 = (_i64Subtract(($1270|0),($1271|0),($1104|0),($1105|0))|0); - $1273 = tempRet0; - $1274 = (_i64Add(($1272|0),($1273|0),($1176|0),($1177|0))|0); - $1275 = tempRet0; - $1276 = (_i64Add(($1274|0),($1275|0),($1248|0),($1249|0))|0); - $1277 = tempRet0; - $1278 = (_i64Add(($1276|0),($1277|0),($1268|0),($1269|0))|0); - $1279 = tempRet0; - $1280 = (___muldi3(($1200|0),($1201|0),666643,0)|0); - $1281 = tempRet0; - $1282 = (___muldi3(($1200|0),($1201|0),470296,0)|0); - $1283 = tempRet0; - $1284 = (___muldi3(($1200|0),($1201|0),654183,0)|0); - $1285 = tempRet0; - $1286 = (___muldi3(($1200|0),($1201|0),-997805,-1)|0); - $1287 = tempRet0; - $1288 = (___muldi3(($1200|0),($1201|0),136657,0)|0); - $1289 = tempRet0; - $1290 = (___muldi3(($1200|0),($1201|0),-683901,-1)|0); - $1291 = tempRet0; - $1292 = (___muldi3(($1204|0),($1205|0),666643,0)|0); - $1293 = tempRet0; - $1294 = (___muldi3(($1204|0),($1205|0),470296,0)|0); - $1295 = tempRet0; - $1296 = (___muldi3(($1204|0),($1205|0),654183,0)|0); - $1297 = tempRet0; - $1298 = (___muldi3(($1204|0),($1205|0),-997805,-1)|0); - $1299 = tempRet0; - $1300 = (___muldi3(($1204|0),($1205|0),136657,0)|0); - $1301 = tempRet0; - $1302 = (___muldi3(($1204|0),($1205|0),-683901,-1)|0); - $1303 = tempRet0; - $1304 = (_i64Add(($1038|0),($1039|0),($1220|0),($1221|0))|0); - $1305 = tempRet0; - $1306 = (_i64Subtract(($1304|0),($1305|0),($1086|0),($1087|0))|0); - $1307 = tempRet0; - $1308 = (_i64Add(($1306|0),($1307|0),($1244|0),($1245|0))|0); - $1309 = tempRet0; - $1310 = (_i64Add(($1308|0),($1309|0),($1264|0),($1265|0))|0); - $1311 = tempRet0; - $1312 = (_i64Add(($1310|0),($1311|0),($1288|0),($1289|0))|0); - $1313 = tempRet0; - $1314 = (_i64Add(($1312|0),($1313|0),($1302|0),($1303|0))|0); - $1315 = tempRet0; - $1316 = (___muldi3(($1190|0),($1191|0),666643,0)|0); - $1317 = tempRet0; - $1318 = (_i64Add(($1316|0),($1317|0),($632|0),($633|0))|0); - $1319 = tempRet0; - $1320 = (___muldi3(($1190|0),($1191|0),470296,0)|0); - $1321 = tempRet0; - $1322 = (___muldi3(($1190|0),($1191|0),654183,0)|0); - $1323 = tempRet0; - $1324 = (_i64Add(($858|0),($859|0),($216|0),($217|0))|0); - $1325 = tempRet0; - $1326 = (_i64Subtract(($1324|0),($1325|0),($648|0),($649|0))|0); - $1327 = tempRet0; - $1328 = (_i64Add(($1326|0),($1327|0),($1322|0),($1323|0))|0); - $1329 = tempRet0; - $1330 = (_i64Add(($1328|0),($1329|0),($1280|0),($1281|0))|0); - $1331 = tempRet0; - $1332 = (_i64Add(($1330|0),($1331|0),($1294|0),($1295|0))|0); - $1333 = tempRet0; - $1334 = (___muldi3(($1190|0),($1191|0),-997805,-1)|0); - $1335 = tempRet0; - $1336 = (___muldi3(($1190|0),($1191|0),136657,0)|0); - $1337 = tempRet0; - $1338 = (_i64Add(($1258|0),($1259|0),($1336|0),($1337|0))|0); - $1339 = tempRet0; - $1340 = (_i64Add(($1338|0),($1339|0),($1284|0),($1285|0))|0); - $1341 = tempRet0; - $1342 = (_i64Add(($1340|0),($1341|0),($1298|0),($1299|0))|0); - $1343 = tempRet0; - $1344 = (___muldi3(($1190|0),($1191|0),-683901,-1)|0); - $1345 = tempRet0; - $1346 = (_i64Add(($1318|0),($1319|0),1048576,0)|0); - $1347 = tempRet0; - $1348 = (_bitshift64Ashr(($1346|0),($1347|0),21)|0); - $1349 = tempRet0; - $1350 = (_i64Add(($862|0),($863|0),($1320|0),($1321|0))|0); - $1351 = tempRet0; - $1352 = (_i64Add(($1350|0),($1351|0),($1292|0),($1293|0))|0); - $1353 = tempRet0; - $1354 = (_i64Add(($1352|0),($1353|0),($1348|0),($1349|0))|0); - $1355 = tempRet0; - $1356 = (_bitshift64Shl(($1348|0),($1349|0),21)|0); - $1357 = tempRet0; - $1358 = (_i64Subtract(($1318|0),($1319|0),($1356|0),($1357|0))|0); - $1359 = tempRet0; - $1360 = (_i64Add(($1332|0),($1333|0),1048576,0)|0); - $1361 = tempRet0; - $1362 = (_bitshift64Ashr(($1360|0),($1361|0),21)|0); - $1363 = tempRet0; - $1364 = (_i64Add(($1254|0),($1255|0),($1334|0),($1335|0))|0); - $1365 = tempRet0; - $1366 = (_i64Add(($1364|0),($1365|0),($1282|0),($1283|0))|0); - $1367 = tempRet0; - $1368 = (_i64Add(($1366|0),($1367|0),($1296|0),($1297|0))|0); - $1369 = tempRet0; - $1370 = (_i64Add(($1368|0),($1369|0),($1362|0),($1363|0))|0); - $1371 = tempRet0; - $1372 = (_bitshift64Shl(($1362|0),($1363|0),21)|0); - $1373 = tempRet0; - $1374 = (_i64Add(($1342|0),($1343|0),1048576,0)|0); - $1375 = tempRet0; - $1376 = (_bitshift64Ashr(($1374|0),($1375|0),21)|0); - $1377 = tempRet0; - $1378 = (_i64Add(($1262|0),($1263|0),($1344|0),($1345|0))|0); - $1379 = tempRet0; - $1380 = (_i64Add(($1378|0),($1379|0),($1286|0),($1287|0))|0); - $1381 = tempRet0; - $1382 = (_i64Add(($1380|0),($1381|0),($1300|0),($1301|0))|0); - $1383 = tempRet0; - $1384 = (_i64Add(($1382|0),($1383|0),($1376|0),($1377|0))|0); - $1385 = tempRet0; - $1386 = (_bitshift64Shl(($1376|0),($1377|0),21)|0); - $1387 = tempRet0; - $1388 = (_i64Add(($1314|0),($1315|0),1048576,0)|0); - $1389 = tempRet0; - $1390 = (_bitshift64Ashr(($1388|0),($1389|0),21)|0); - $1391 = tempRet0; - $1392 = (_i64Add(($1084|0),($1085|0),($1222|0),($1223|0))|0); - $1393 = tempRet0; - $1394 = (_i64Add(($1392|0),($1393|0),($1246|0),($1247|0))|0); - $1395 = tempRet0; - $1396 = (_i64Subtract(($1394|0),($1395|0),($1178|0),($1179|0))|0); - $1397 = tempRet0; - $1398 = (_i64Add(($1396|0),($1397|0),($1266|0),($1267|0))|0); - $1399 = tempRet0; - $1400 = (_i64Add(($1398|0),($1399|0),($1290|0),($1291|0))|0); - $1401 = tempRet0; - $1402 = (_i64Add(($1400|0),($1401|0),($1390|0),($1391|0))|0); - $1403 = tempRet0; - $1404 = (_bitshift64Shl(($1390|0),($1391|0),21)|0); - $1405 = tempRet0; - $1406 = (_i64Subtract(($1314|0),($1315|0),($1404|0),($1405|0))|0); - $1407 = tempRet0; - $1408 = (_i64Add(($1278|0),($1279|0),1048576,0)|0); - $1409 = tempRet0; - $1410 = (_bitshift64Ashr(($1408|0),($1409|0),21)|0); - $1411 = tempRet0; - $1412 = (_i64Add(($1102|0),($1103|0),($1226|0),($1227|0))|0); - $1413 = tempRet0; - $1414 = (_i64Add(($1412|0),($1413|0),($1250|0),($1251|0))|0); - $1415 = tempRet0; - $1416 = (_i64Subtract(($1414|0),($1415|0),($1184|0),($1185|0))|0); - $1417 = tempRet0; - $1418 = (_i64Add(($1416|0),($1417|0),($1410|0),($1411|0))|0); - $1419 = tempRet0; - $1420 = (_bitshift64Shl(($1410|0),($1411|0),21)|0); - $1421 = tempRet0; - $1422 = (_i64Subtract(($1278|0),($1279|0),($1420|0),($1421|0))|0); - $1423 = tempRet0; - $1424 = (_i64Add(($1234|0),($1235|0),1048576,0)|0); - $1425 = tempRet0; - $1426 = (_bitshift64Ashr(($1424|0),($1425|0),21)|0); - $1427 = tempRet0; - $1428 = (_i64Add(($1194|0),($1195|0),($1426|0),($1427|0))|0); - $1429 = tempRet0; - $1430 = (_bitshift64Shl(($1426|0),($1427|0),21)|0); - $1431 = tempRet0; - $1432 = (_i64Subtract(($1234|0),($1235|0),($1430|0),($1431|0))|0); - $1433 = tempRet0; - $1434 = (_i64Add(($1354|0),($1355|0),1048576,0)|0); - $1435 = tempRet0; - $1436 = (_bitshift64Ashr(($1434|0),($1435|0),21)|0); - $1437 = tempRet0; - $1438 = (_bitshift64Shl(($1436|0),($1437|0),21)|0); - $1439 = tempRet0; - $1440 = (_i64Add(($1370|0),($1371|0),1048576,0)|0); - $1441 = tempRet0; - $1442 = (_bitshift64Ashr(($1440|0),($1441|0),21)|0); - $1443 = tempRet0; - $1444 = (_bitshift64Shl(($1442|0),($1443|0),21)|0); - $1445 = tempRet0; - $1446 = (_i64Add(($1384|0),($1385|0),1048576,0)|0); - $1447 = tempRet0; - $1448 = (_bitshift64Ashr(($1446|0),($1447|0),21)|0); - $1449 = tempRet0; - $1450 = (_i64Add(($1406|0),($1407|0),($1448|0),($1449|0))|0); - $1451 = tempRet0; - $1452 = (_bitshift64Shl(($1448|0),($1449|0),21)|0); - $1453 = tempRet0; - $1454 = (_i64Add(($1402|0),($1403|0),1048576,0)|0); - $1455 = tempRet0; - $1456 = (_bitshift64Ashr(($1454|0),($1455|0),21)|0); - $1457 = tempRet0; - $1458 = (_i64Add(($1422|0),($1423|0),($1456|0),($1457|0))|0); - $1459 = tempRet0; - $1460 = (_bitshift64Shl(($1456|0),($1457|0),21)|0); - $1461 = tempRet0; - $1462 = (_i64Subtract(($1402|0),($1403|0),($1460|0),($1461|0))|0); - $1463 = tempRet0; - $1464 = (_i64Add(($1418|0),($1419|0),1048576,0)|0); - $1465 = tempRet0; - $1466 = (_bitshift64Ashr(($1464|0),($1465|0),21)|0); - $1467 = tempRet0; - $1468 = (_i64Add(($1432|0),($1433|0),($1466|0),($1467|0))|0); - $1469 = tempRet0; - $1470 = (_bitshift64Shl(($1466|0),($1467|0),21)|0); - $1471 = tempRet0; - $1472 = (_i64Subtract(($1418|0),($1419|0),($1470|0),($1471|0))|0); - $1473 = tempRet0; - $1474 = (_i64Add(($1428|0),($1429|0),1048576,0)|0); - $1475 = tempRet0; - $1476 = (_bitshift64Ashr(($1474|0),($1475|0),21)|0); - $1477 = tempRet0; - $1478 = (_bitshift64Shl(($1476|0),($1477|0),21)|0); - $1479 = tempRet0; - $1480 = (_i64Subtract(($1428|0),($1429|0),($1478|0),($1479|0))|0); - $1481 = tempRet0; - $1482 = (___muldi3(($1476|0),($1477|0),666643,0)|0); - $1483 = tempRet0; - $1484 = (_i64Add(($1358|0),($1359|0),($1482|0),($1483|0))|0); - $1485 = tempRet0; - $1486 = (___muldi3(($1476|0),($1477|0),470296,0)|0); - $1487 = tempRet0; - $1488 = (___muldi3(($1476|0),($1477|0),654183,0)|0); - $1489 = tempRet0; - $1490 = (___muldi3(($1476|0),($1477|0),-997805,-1)|0); - $1491 = tempRet0; - $1492 = (___muldi3(($1476|0),($1477|0),136657,0)|0); - $1493 = tempRet0; - $1494 = (___muldi3(($1476|0),($1477|0),-683901,-1)|0); - $1495 = tempRet0; - $1496 = (_bitshift64Ashr(($1484|0),($1485|0),21)|0); - $1497 = tempRet0; - $1498 = (_i64Add(($1486|0),($1487|0),($1354|0),($1355|0))|0); - $1499 = tempRet0; - $1500 = (_i64Subtract(($1498|0),($1499|0),($1438|0),($1439|0))|0); - $1501 = tempRet0; - $1502 = (_i64Add(($1500|0),($1501|0),($1496|0),($1497|0))|0); - $1503 = tempRet0; - $1504 = (_bitshift64Shl(($1496|0),($1497|0),21)|0); - $1505 = tempRet0; - $1506 = (_i64Subtract(($1484|0),($1485|0),($1504|0),($1505|0))|0); - $1507 = tempRet0; - $1508 = (_bitshift64Ashr(($1502|0),($1503|0),21)|0); - $1509 = tempRet0; - $1510 = (_i64Add(($1488|0),($1489|0),($1332|0),($1333|0))|0); - $1511 = tempRet0; - $1512 = (_i64Subtract(($1510|0),($1511|0),($1372|0),($1373|0))|0); - $1513 = tempRet0; - $1514 = (_i64Add(($1512|0),($1513|0),($1436|0),($1437|0))|0); - $1515 = tempRet0; - $1516 = (_i64Add(($1514|0),($1515|0),($1508|0),($1509|0))|0); - $1517 = tempRet0; - $1518 = (_bitshift64Shl(($1508|0),($1509|0),21)|0); - $1519 = tempRet0; - $1520 = (_i64Subtract(($1502|0),($1503|0),($1518|0),($1519|0))|0); - $1521 = tempRet0; - $1522 = (_bitshift64Ashr(($1516|0),($1517|0),21)|0); - $1523 = tempRet0; - $1524 = (_i64Add(($1370|0),($1371|0),($1490|0),($1491|0))|0); - $1525 = tempRet0; - $1526 = (_i64Subtract(($1524|0),($1525|0),($1444|0),($1445|0))|0); - $1527 = tempRet0; - $1528 = (_i64Add(($1526|0),($1527|0),($1522|0),($1523|0))|0); - $1529 = tempRet0; - $1530 = (_bitshift64Shl(($1522|0),($1523|0),21)|0); - $1531 = tempRet0; - $1532 = (_i64Subtract(($1516|0),($1517|0),($1530|0),($1531|0))|0); - $1533 = tempRet0; - $1534 = (_bitshift64Ashr(($1528|0),($1529|0),21)|0); - $1535 = tempRet0; - $1536 = (_i64Add(($1492|0),($1493|0),($1342|0),($1343|0))|0); - $1537 = tempRet0; - $1538 = (_i64Subtract(($1536|0),($1537|0),($1386|0),($1387|0))|0); - $1539 = tempRet0; - $1540 = (_i64Add(($1538|0),($1539|0),($1442|0),($1443|0))|0); - $1541 = tempRet0; - $1542 = (_i64Add(($1540|0),($1541|0),($1534|0),($1535|0))|0); - $1543 = tempRet0; - $1544 = (_bitshift64Shl(($1534|0),($1535|0),21)|0); - $1545 = tempRet0; - $1546 = (_i64Subtract(($1528|0),($1529|0),($1544|0),($1545|0))|0); - $1547 = tempRet0; - $1548 = (_bitshift64Ashr(($1542|0),($1543|0),21)|0); - $1549 = tempRet0; - $1550 = (_i64Add(($1384|0),($1385|0),($1494|0),($1495|0))|0); - $1551 = tempRet0; - $1552 = (_i64Subtract(($1550|0),($1551|0),($1452|0),($1453|0))|0); - $1553 = tempRet0; - $1554 = (_i64Add(($1552|0),($1553|0),($1548|0),($1549|0))|0); - $1555 = tempRet0; - $1556 = (_bitshift64Shl(($1548|0),($1549|0),21)|0); - $1557 = tempRet0; - $1558 = (_i64Subtract(($1542|0),($1543|0),($1556|0),($1557|0))|0); - $1559 = tempRet0; - $1560 = (_bitshift64Ashr(($1554|0),($1555|0),21)|0); - $1561 = tempRet0; - $1562 = (_i64Add(($1450|0),($1451|0),($1560|0),($1561|0))|0); - $1563 = tempRet0; - $1564 = (_bitshift64Shl(($1560|0),($1561|0),21)|0); - $1565 = tempRet0; - $1566 = (_i64Subtract(($1554|0),($1555|0),($1564|0),($1565|0))|0); - $1567 = tempRet0; - $1568 = (_bitshift64Ashr(($1562|0),($1563|0),21)|0); - $1569 = tempRet0; - $1570 = (_i64Add(($1568|0),($1569|0),($1462|0),($1463|0))|0); - $1571 = tempRet0; - $1572 = (_bitshift64Shl(($1568|0),($1569|0),21)|0); - $1573 = tempRet0; - $1574 = (_i64Subtract(($1562|0),($1563|0),($1572|0),($1573|0))|0); - $1575 = tempRet0; - $1576 = (_bitshift64Ashr(($1570|0),($1571|0),21)|0); - $1577 = tempRet0; - $1578 = (_i64Add(($1458|0),($1459|0),($1576|0),($1577|0))|0); - $1579 = tempRet0; - $1580 = (_bitshift64Shl(($1576|0),($1577|0),21)|0); - $1581 = tempRet0; - $1582 = (_i64Subtract(($1570|0),($1571|0),($1580|0),($1581|0))|0); - $1583 = tempRet0; - $1584 = (_bitshift64Ashr(($1578|0),($1579|0),21)|0); - $1585 = tempRet0; - $1586 = (_i64Add(($1584|0),($1585|0),($1472|0),($1473|0))|0); - $1587 = tempRet0; - $1588 = (_bitshift64Shl(($1584|0),($1585|0),21)|0); - $1589 = tempRet0; - $1590 = (_i64Subtract(($1578|0),($1579|0),($1588|0),($1589|0))|0); - $1591 = tempRet0; - $1592 = (_bitshift64Ashr(($1586|0),($1587|0),21)|0); - $1593 = tempRet0; - $1594 = (_i64Add(($1468|0),($1469|0),($1592|0),($1593|0))|0); - $1595 = tempRet0; - $1596 = (_bitshift64Shl(($1592|0),($1593|0),21)|0); - $1597 = tempRet0; - $1598 = (_i64Subtract(($1586|0),($1587|0),($1596|0),($1597|0))|0); - $1599 = tempRet0; - $1600 = (_bitshift64Ashr(($1594|0),($1595|0),21)|0); - $1601 = tempRet0; - $1602 = (_i64Add(($1600|0),($1601|0),($1480|0),($1481|0))|0); - $1603 = tempRet0; - $1604 = (_bitshift64Shl(($1600|0),($1601|0),21)|0); - $1605 = tempRet0; - $1606 = (_i64Subtract(($1594|0),($1595|0),($1604|0),($1605|0))|0); - $1607 = tempRet0; - $1608 = (_bitshift64Ashr(($1602|0),($1603|0),21)|0); - $1609 = tempRet0; - $1610 = (_bitshift64Shl(($1608|0),($1609|0),21)|0); - $1611 = tempRet0; - $1612 = (_i64Subtract(($1602|0),($1603|0),($1610|0),($1611|0))|0); - $1613 = tempRet0; - $1614 = (___muldi3(($1608|0),($1609|0),666643,0)|0); - $1615 = tempRet0; - $1616 = (_i64Add(($1614|0),($1615|0),($1506|0),($1507|0))|0); - $1617 = tempRet0; - $1618 = (___muldi3(($1608|0),($1609|0),470296,0)|0); - $1619 = tempRet0; - $1620 = (_i64Add(($1520|0),($1521|0),($1618|0),($1619|0))|0); - $1621 = tempRet0; - $1622 = (___muldi3(($1608|0),($1609|0),654183,0)|0); - $1623 = tempRet0; - $1624 = (_i64Add(($1532|0),($1533|0),($1622|0),($1623|0))|0); - $1625 = tempRet0; - $1626 = (___muldi3(($1608|0),($1609|0),-997805,-1)|0); - $1627 = tempRet0; - $1628 = (_i64Add(($1546|0),($1547|0),($1626|0),($1627|0))|0); - $1629 = tempRet0; - $1630 = (___muldi3(($1608|0),($1609|0),136657,0)|0); - $1631 = tempRet0; - $1632 = (_i64Add(($1558|0),($1559|0),($1630|0),($1631|0))|0); - $1633 = tempRet0; - $1634 = (___muldi3(($1608|0),($1609|0),-683901,-1)|0); - $1635 = tempRet0; - $1636 = (_i64Add(($1566|0),($1567|0),($1634|0),($1635|0))|0); - $1637 = tempRet0; - $1638 = (_bitshift64Ashr(($1616|0),($1617|0),21)|0); - $1639 = tempRet0; - $1640 = (_i64Add(($1620|0),($1621|0),($1638|0),($1639|0))|0); - $1641 = tempRet0; - $1642 = (_bitshift64Shl(($1638|0),($1639|0),21)|0); - $1643 = tempRet0; - $1644 = (_i64Subtract(($1616|0),($1617|0),($1642|0),($1643|0))|0); - $1645 = tempRet0; - $1646 = (_bitshift64Ashr(($1640|0),($1641|0),21)|0); - $1647 = tempRet0; - $1648 = (_i64Add(($1624|0),($1625|0),($1646|0),($1647|0))|0); - $1649 = tempRet0; - $1650 = (_bitshift64Shl(($1646|0),($1647|0),21)|0); - $1651 = tempRet0; - $1652 = (_i64Subtract(($1640|0),($1641|0),($1650|0),($1651|0))|0); - $1653 = tempRet0; - $1654 = (_bitshift64Ashr(($1648|0),($1649|0),21)|0); - $1655 = tempRet0; - $1656 = (_i64Add(($1628|0),($1629|0),($1654|0),($1655|0))|0); - $1657 = tempRet0; - $1658 = (_bitshift64Shl(($1654|0),($1655|0),21)|0); - $1659 = tempRet0; - $1660 = (_i64Subtract(($1648|0),($1649|0),($1658|0),($1659|0))|0); - $1661 = tempRet0; - $1662 = (_bitshift64Ashr(($1656|0),($1657|0),21)|0); - $1663 = tempRet0; - $1664 = (_i64Add(($1632|0),($1633|0),($1662|0),($1663|0))|0); - $1665 = tempRet0; - $1666 = (_bitshift64Shl(($1662|0),($1663|0),21)|0); - $1667 = tempRet0; - $1668 = (_i64Subtract(($1656|0),($1657|0),($1666|0),($1667|0))|0); - $1669 = tempRet0; - $1670 = (_bitshift64Ashr(($1664|0),($1665|0),21)|0); - $1671 = tempRet0; - $1672 = (_i64Add(($1636|0),($1637|0),($1670|0),($1671|0))|0); - $1673 = tempRet0; - $1674 = (_bitshift64Shl(($1670|0),($1671|0),21)|0); - $1675 = tempRet0; - $1676 = (_i64Subtract(($1664|0),($1665|0),($1674|0),($1675|0))|0); - $1677 = tempRet0; - $1678 = (_bitshift64Ashr(($1672|0),($1673|0),21)|0); - $1679 = tempRet0; - $1680 = (_i64Add(($1678|0),($1679|0),($1574|0),($1575|0))|0); - $1681 = tempRet0; - $1682 = (_bitshift64Shl(($1678|0),($1679|0),21)|0); - $1683 = tempRet0; - $1684 = (_i64Subtract(($1672|0),($1673|0),($1682|0),($1683|0))|0); - $1685 = tempRet0; - $1686 = (_bitshift64Ashr(($1680|0),($1681|0),21)|0); - $1687 = tempRet0; - $1688 = (_i64Add(($1686|0),($1687|0),($1582|0),($1583|0))|0); - $1689 = tempRet0; - $1690 = (_bitshift64Shl(($1686|0),($1687|0),21)|0); - $1691 = tempRet0; - $1692 = (_i64Subtract(($1680|0),($1681|0),($1690|0),($1691|0))|0); - $1693 = tempRet0; - $1694 = (_bitshift64Ashr(($1688|0),($1689|0),21)|0); - $1695 = tempRet0; - $1696 = (_i64Add(($1694|0),($1695|0),($1590|0),($1591|0))|0); - $1697 = tempRet0; - $1698 = (_bitshift64Shl(($1694|0),($1695|0),21)|0); - $1699 = tempRet0; - $1700 = (_i64Subtract(($1688|0),($1689|0),($1698|0),($1699|0))|0); - $1701 = tempRet0; - $1702 = (_bitshift64Ashr(($1696|0),($1697|0),21)|0); - $1703 = tempRet0; - $1704 = (_i64Add(($1702|0),($1703|0),($1598|0),($1599|0))|0); - $1705 = tempRet0; - $1706 = (_bitshift64Shl(($1702|0),($1703|0),21)|0); - $1707 = tempRet0; - $1708 = (_i64Subtract(($1696|0),($1697|0),($1706|0),($1707|0))|0); - $1709 = tempRet0; - $1710 = (_bitshift64Ashr(($1704|0),($1705|0),21)|0); - $1711 = tempRet0; - $1712 = (_i64Add(($1710|0),($1711|0),($1606|0),($1607|0))|0); - $1713 = tempRet0; - $1714 = (_bitshift64Shl(($1710|0),($1711|0),21)|0); - $1715 = tempRet0; - $1716 = (_i64Subtract(($1704|0),($1705|0),($1714|0),($1715|0))|0); - $1717 = tempRet0; - $1718 = (_bitshift64Ashr(($1712|0),($1713|0),21)|0); - $1719 = tempRet0; - $1720 = (_i64Add(($1718|0),($1719|0),($1612|0),($1613|0))|0); - $1721 = tempRet0; - $1722 = (_bitshift64Shl(($1718|0),($1719|0),21)|0); - $1723 = tempRet0; - $1724 = (_i64Subtract(($1712|0),($1713|0),($1722|0),($1723|0))|0); - $1725 = tempRet0; - $1726 = $1644&255; - HEAP8[$s>>0] = $1726; - $1727 = (_bitshift64Lshr(($1644|0),($1645|0),8)|0); - $1728 = tempRet0; - $1729 = $1727&255; - $1730 = (($s) + 1|0); - HEAP8[$1730>>0] = $1729; - $1731 = (_bitshift64Lshr(($1644|0),($1645|0),16)|0); - $1732 = tempRet0; - $1733 = (_bitshift64Shl(($1652|0),($1653|0),5)|0); - $1734 = tempRet0; - $1735 = $1733 | $1731; - $1734 | $1732; - $1736 = $1735&255; - $1737 = (($s) + 2|0); - HEAP8[$1737>>0] = $1736; - $1738 = (_bitshift64Lshr(($1652|0),($1653|0),3)|0); - $1739 = tempRet0; - $1740 = $1738&255; - $1741 = (($s) + 3|0); - HEAP8[$1741>>0] = $1740; - $1742 = (_bitshift64Lshr(($1652|0),($1653|0),11)|0); - $1743 = tempRet0; - $1744 = $1742&255; - $1745 = (($s) + 4|0); - HEAP8[$1745>>0] = $1744; - $1746 = (_bitshift64Lshr(($1652|0),($1653|0),19)|0); - $1747 = tempRet0; - $1748 = (_bitshift64Shl(($1660|0),($1661|0),2)|0); - $1749 = tempRet0; - $1750 = $1748 | $1746; - $1749 | $1747; - $1751 = $1750&255; - $1752 = (($s) + 5|0); - HEAP8[$1752>>0] = $1751; - $1753 = (_bitshift64Lshr(($1660|0),($1661|0),6)|0); - $1754 = tempRet0; - $1755 = $1753&255; - $1756 = (($s) + 6|0); - HEAP8[$1756>>0] = $1755; - $1757 = (_bitshift64Lshr(($1660|0),($1661|0),14)|0); - $1758 = tempRet0; - $1759 = (_bitshift64Shl(($1668|0),($1669|0),7)|0); - $1760 = tempRet0; - $1761 = $1759 | $1757; - $1760 | $1758; - $1762 = $1761&255; - $1763 = (($s) + 7|0); - HEAP8[$1763>>0] = $1762; - $1764 = (_bitshift64Lshr(($1668|0),($1669|0),1)|0); - $1765 = tempRet0; - $1766 = $1764&255; - $1767 = (($s) + 8|0); - HEAP8[$1767>>0] = $1766; - $1768 = (_bitshift64Lshr(($1668|0),($1669|0),9)|0); - $1769 = tempRet0; - $1770 = $1768&255; - $1771 = (($s) + 9|0); - HEAP8[$1771>>0] = $1770; - $1772 = (_bitshift64Lshr(($1668|0),($1669|0),17)|0); - $1773 = tempRet0; - $1774 = (_bitshift64Shl(($1676|0),($1677|0),4)|0); - $1775 = tempRet0; - $1776 = $1774 | $1772; - $1775 | $1773; - $1777 = $1776&255; - $1778 = (($s) + 10|0); - HEAP8[$1778>>0] = $1777; - $1779 = (_bitshift64Lshr(($1676|0),($1677|0),4)|0); - $1780 = tempRet0; - $1781 = $1779&255; - $1782 = (($s) + 11|0); - HEAP8[$1782>>0] = $1781; - $1783 = (_bitshift64Lshr(($1676|0),($1677|0),12)|0); - $1784 = tempRet0; - $1785 = $1783&255; - $1786 = (($s) + 12|0); - HEAP8[$1786>>0] = $1785; - $1787 = (_bitshift64Lshr(($1676|0),($1677|0),20)|0); - $1788 = tempRet0; - $1789 = (_bitshift64Shl(($1684|0),($1685|0),1)|0); - $1790 = tempRet0; - $1791 = $1789 | $1787; - $1790 | $1788; - $1792 = $1791&255; - $1793 = (($s) + 13|0); - HEAP8[$1793>>0] = $1792; - $1794 = (_bitshift64Lshr(($1684|0),($1685|0),7)|0); - $1795 = tempRet0; - $1796 = $1794&255; - $1797 = (($s) + 14|0); - HEAP8[$1797>>0] = $1796; - $1798 = (_bitshift64Lshr(($1684|0),($1685|0),15)|0); - $1799 = tempRet0; - $1800 = (_bitshift64Shl(($1692|0),($1693|0),6)|0); - $1801 = tempRet0; - $1802 = $1800 | $1798; - $1801 | $1799; - $1803 = $1802&255; - $1804 = (($s) + 15|0); - HEAP8[$1804>>0] = $1803; - $1805 = (_bitshift64Lshr(($1692|0),($1693|0),2)|0); - $1806 = tempRet0; - $1807 = $1805&255; - $1808 = (($s) + 16|0); - HEAP8[$1808>>0] = $1807; - $1809 = (_bitshift64Lshr(($1692|0),($1693|0),10)|0); - $1810 = tempRet0; - $1811 = $1809&255; - $1812 = (($s) + 17|0); - HEAP8[$1812>>0] = $1811; - $1813 = (_bitshift64Lshr(($1692|0),($1693|0),18)|0); - $1814 = tempRet0; - $1815 = (_bitshift64Shl(($1700|0),($1701|0),3)|0); - $1816 = tempRet0; - $1817 = $1815 | $1813; - $1816 | $1814; - $1818 = $1817&255; - $1819 = (($s) + 18|0); - HEAP8[$1819>>0] = $1818; - $1820 = (_bitshift64Lshr(($1700|0),($1701|0),5)|0); - $1821 = tempRet0; - $1822 = $1820&255; - $1823 = (($s) + 19|0); - HEAP8[$1823>>0] = $1822; - $1824 = (_bitshift64Lshr(($1700|0),($1701|0),13)|0); - $1825 = tempRet0; - $1826 = $1824&255; - $1827 = (($s) + 20|0); - HEAP8[$1827>>0] = $1826; - $1828 = $1708&255; - $1829 = (($s) + 21|0); - HEAP8[$1829>>0] = $1828; - $1830 = (_bitshift64Lshr(($1708|0),($1709|0),8)|0); - $1831 = tempRet0; - $1832 = $1830&255; - $1833 = (($s) + 22|0); - HEAP8[$1833>>0] = $1832; - $1834 = (_bitshift64Lshr(($1708|0),($1709|0),16)|0); - $1835 = tempRet0; - $1836 = (_bitshift64Shl(($1716|0),($1717|0),5)|0); - $1837 = tempRet0; - $1838 = $1836 | $1834; - $1837 | $1835; - $1839 = $1838&255; - $1840 = (($s) + 23|0); - HEAP8[$1840>>0] = $1839; - $1841 = (_bitshift64Lshr(($1716|0),($1717|0),3)|0); - $1842 = tempRet0; - $1843 = $1841&255; - $1844 = (($s) + 24|0); - HEAP8[$1844>>0] = $1843; - $1845 = (_bitshift64Lshr(($1716|0),($1717|0),11)|0); - $1846 = tempRet0; - $1847 = $1845&255; - $1848 = (($s) + 25|0); - HEAP8[$1848>>0] = $1847; - $1849 = (_bitshift64Lshr(($1716|0),($1717|0),19)|0); - $1850 = tempRet0; - $1851 = (_bitshift64Shl(($1724|0),($1725|0),2)|0); - $1852 = tempRet0; - $1853 = $1851 | $1849; - $1852 | $1850; - $1854 = $1853&255; - $1855 = (($s) + 26|0); - HEAP8[$1855>>0] = $1854; - $1856 = (_bitshift64Lshr(($1724|0),($1725|0),6)|0); - $1857 = tempRet0; - $1858 = $1856&255; - $1859 = (($s) + 27|0); - HEAP8[$1859>>0] = $1858; - $1860 = (_bitshift64Lshr(($1724|0),($1725|0),14)|0); - $1861 = tempRet0; - $1862 = (_bitshift64Shl(($1720|0),($1721|0),7)|0); - $1863 = tempRet0; - $1864 = $1860 | $1862; - $1861 | $1863; - $1865 = $1864&255; - $1866 = (($s) + 28|0); - HEAP8[$1866>>0] = $1865; - $1867 = (_bitshift64Lshr(($1720|0),($1721|0),1)|0); - $1868 = tempRet0; - $1869 = $1867&255; - $1870 = (($s) + 29|0); - HEAP8[$1870>>0] = $1869; - $1871 = (_bitshift64Lshr(($1720|0),($1721|0),9)|0); - $1872 = tempRet0; - $1873 = $1871&255; - $1874 = (($s) + 30|0); - HEAP8[$1874>>0] = $1873; - $1875 = (_bitshift64Lshr(($1720|0),($1721|0),17)|0); - $1876 = tempRet0; - $1877 = $1875&255; - $1878 = (($s) + 31|0); - HEAP8[$1878>>0] = $1877; - STACKTOP = sp;return; -} -function _load_347($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); -} -function _load_448($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - $15 = (($in) + 3|0); - $16 = HEAP8[$15>>0]|0; - $17 = $16&255; - $18 = (_bitshift64Shl(($17|0),0,24)|0); - $19 = tempRet0; - $20 = $13 | $18; - $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); -} -function _crypto_sign_ed25519_ref10_sc_reduce($s) { - $s = $s|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; - var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0; - var $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0; - var $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0; - var $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0; - var $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0; - var $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0; - var $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0; - var $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0; - var $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0; - var $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0; - var $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0; - var $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0; - var $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0; - var $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0; - var $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0; - var $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0; - var $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0; - var $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0; - var $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0; - var $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0; - var $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0; - var $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0; - var $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0; - var $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0; - var $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0; - var $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0; - var $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0; - var $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0; - var $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0; - var $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0; - var $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0; - var $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0; - var $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0; - var $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0; - var $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0; - var $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0; - var $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0; - var $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0; - var $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0; - var $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0; - var $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0; - var $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0; - var $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0; - var $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0; - var $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0; - var $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0; - var $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0; - var $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0; - var $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0; - var $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0; - var $997 = 0, $998 = 0, $999 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_load_351($s)|0); - $1 = tempRet0; - $2 = $0 & 2097151; - $3 = (($s) + 2|0); - $4 = (_load_452($3)|0); - $5 = tempRet0; - $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); - $7 = tempRet0; - $8 = $6 & 2097151; - $9 = (($s) + 5|0); - $10 = (_load_351($9)|0); - $11 = tempRet0; - $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); - $13 = tempRet0; - $14 = $12 & 2097151; - $15 = (($s) + 7|0); - $16 = (_load_452($15)|0); - $17 = tempRet0; - $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); - $19 = tempRet0; - $20 = $18 & 2097151; - $21 = (($s) + 10|0); - $22 = (_load_452($21)|0); - $23 = tempRet0; - $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); - $25 = tempRet0; - $26 = $24 & 2097151; - $27 = (($s) + 13|0); - $28 = (_load_351($27)|0); - $29 = tempRet0; - $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); - $31 = tempRet0; - $32 = $30 & 2097151; - $33 = (($s) + 15|0); - $34 = (_load_452($33)|0); - $35 = tempRet0; - $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); - $37 = tempRet0; - $38 = $36 & 2097151; - $39 = (($s) + 18|0); - $40 = (_load_351($39)|0); - $41 = tempRet0; - $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); - $43 = tempRet0; - $44 = $42 & 2097151; - $45 = (($s) + 21|0); - $46 = (_load_351($45)|0); - $47 = tempRet0; - $48 = $46 & 2097151; - $49 = (($s) + 23|0); - $50 = (_load_452($49)|0); - $51 = tempRet0; - $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); - $53 = tempRet0; - $54 = $52 & 2097151; - $55 = (($s) + 26|0); - $56 = (_load_351($55)|0); - $57 = tempRet0; - $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); - $59 = tempRet0; - $60 = $58 & 2097151; - $61 = (($s) + 28|0); - $62 = (_load_452($61)|0); - $63 = tempRet0; - $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); - $65 = tempRet0; - $66 = $64 & 2097151; - $67 = (($s) + 31|0); - $68 = (_load_452($67)|0); - $69 = tempRet0; - $70 = (_bitshift64Lshr(($68|0),($69|0),4)|0); - $71 = tempRet0; - $72 = $70 & 2097151; - $73 = (($s) + 34|0); - $74 = (_load_351($73)|0); - $75 = tempRet0; - $76 = (_bitshift64Lshr(($74|0),($75|0),1)|0); - $77 = tempRet0; - $78 = $76 & 2097151; - $79 = (($s) + 36|0); - $80 = (_load_452($79)|0); - $81 = tempRet0; - $82 = (_bitshift64Lshr(($80|0),($81|0),6)|0); - $83 = tempRet0; - $84 = $82 & 2097151; - $85 = (($s) + 39|0); - $86 = (_load_351($85)|0); - $87 = tempRet0; - $88 = (_bitshift64Lshr(($86|0),($87|0),3)|0); - $89 = tempRet0; - $90 = $88 & 2097151; - $91 = (($s) + 42|0); - $92 = (_load_351($91)|0); - $93 = tempRet0; - $94 = $92 & 2097151; - $95 = (($s) + 44|0); - $96 = (_load_452($95)|0); - $97 = tempRet0; - $98 = (_bitshift64Lshr(($96|0),($97|0),5)|0); - $99 = tempRet0; - $100 = $98 & 2097151; - $101 = (($s) + 47|0); - $102 = (_load_351($101)|0); - $103 = tempRet0; - $104 = (_bitshift64Lshr(($102|0),($103|0),2)|0); - $105 = tempRet0; - $106 = $104 & 2097151; - $107 = (($s) + 49|0); - $108 = (_load_452($107)|0); - $109 = tempRet0; - $110 = (_bitshift64Lshr(($108|0),($109|0),7)|0); - $111 = tempRet0; - $112 = $110 & 2097151; - $113 = (($s) + 52|0); - $114 = (_load_452($113)|0); - $115 = tempRet0; - $116 = (_bitshift64Lshr(($114|0),($115|0),4)|0); - $117 = tempRet0; - $118 = $116 & 2097151; - $119 = (($s) + 55|0); - $120 = (_load_351($119)|0); - $121 = tempRet0; - $122 = (_bitshift64Lshr(($120|0),($121|0),1)|0); - $123 = tempRet0; - $124 = $122 & 2097151; - $125 = (($s) + 57|0); - $126 = (_load_452($125)|0); - $127 = tempRet0; - $128 = (_bitshift64Lshr(($126|0),($127|0),6)|0); - $129 = tempRet0; - $130 = $128 & 2097151; - $131 = (($s) + 60|0); - $132 = (_load_452($131)|0); - $133 = tempRet0; - $134 = (_bitshift64Lshr(($132|0),($133|0),3)|0); - $135 = tempRet0; - $136 = (___muldi3(($134|0),($135|0),666643,0)|0); - $137 = tempRet0; - $138 = (___muldi3(($134|0),($135|0),470296,0)|0); - $139 = tempRet0; - $140 = (___muldi3(($134|0),($135|0),654183,0)|0); - $141 = tempRet0; - $142 = (___muldi3(($134|0),($135|0),-997805,-1)|0); - $143 = tempRet0; - $144 = (___muldi3(($134|0),($135|0),136657,0)|0); - $145 = tempRet0; - $146 = (_i64Add(($144|0),($145|0),($90|0),0)|0); - $147 = tempRet0; - $148 = (___muldi3(($134|0),($135|0),-683901,-1)|0); - $149 = tempRet0; - $150 = (_i64Add(($148|0),($149|0),($94|0),0)|0); - $151 = tempRet0; - $152 = (___muldi3(($130|0),0,666643,0)|0); - $153 = tempRet0; - $154 = (___muldi3(($130|0),0,470296,0)|0); - $155 = tempRet0; - $156 = (___muldi3(($130|0),0,654183,0)|0); - $157 = tempRet0; - $158 = (___muldi3(($130|0),0,-997805,-1)|0); - $159 = tempRet0; - $160 = (___muldi3(($130|0),0,136657,0)|0); - $161 = tempRet0; - $162 = (___muldi3(($130|0),0,-683901,-1)|0); - $163 = tempRet0; - $164 = (_i64Add(($146|0),($147|0),($162|0),($163|0))|0); - $165 = tempRet0; - $166 = (___muldi3(($124|0),0,666643,0)|0); - $167 = tempRet0; - $168 = (___muldi3(($124|0),0,470296,0)|0); - $169 = tempRet0; - $170 = (___muldi3(($124|0),0,654183,0)|0); - $171 = tempRet0; - $172 = (___muldi3(($124|0),0,-997805,-1)|0); - $173 = tempRet0; - $174 = (___muldi3(($124|0),0,136657,0)|0); - $175 = tempRet0; - $176 = (___muldi3(($124|0),0,-683901,-1)|0); - $177 = tempRet0; - $178 = (_i64Add(($176|0),($177|0),($84|0),0)|0); - $179 = tempRet0; - $180 = (_i64Add(($178|0),($179|0),($142|0),($143|0))|0); - $181 = tempRet0; - $182 = (_i64Add(($180|0),($181|0),($160|0),($161|0))|0); - $183 = tempRet0; - $184 = (___muldi3(($118|0),0,666643,0)|0); - $185 = tempRet0; - $186 = (___muldi3(($118|0),0,470296,0)|0); - $187 = tempRet0; - $188 = (___muldi3(($118|0),0,654183,0)|0); - $189 = tempRet0; - $190 = (___muldi3(($118|0),0,-997805,-1)|0); - $191 = tempRet0; - $192 = (___muldi3(($118|0),0,136657,0)|0); - $193 = tempRet0; - $194 = (___muldi3(($118|0),0,-683901,-1)|0); - $195 = tempRet0; - $196 = (___muldi3(($112|0),0,666643,0)|0); - $197 = tempRet0; - $198 = (___muldi3(($112|0),0,470296,0)|0); - $199 = tempRet0; - $200 = (___muldi3(($112|0),0,654183,0)|0); - $201 = tempRet0; - $202 = (___muldi3(($112|0),0,-997805,-1)|0); - $203 = tempRet0; - $204 = (___muldi3(($112|0),0,136657,0)|0); - $205 = tempRet0; - $206 = (___muldi3(($112|0),0,-683901,-1)|0); - $207 = tempRet0; - $208 = (_i64Add(($206|0),($207|0),($72|0),0)|0); - $209 = tempRet0; - $210 = (_i64Add(($208|0),($209|0),($192|0),($193|0))|0); - $211 = tempRet0; - $212 = (_i64Add(($210|0),($211|0),($172|0),($173|0))|0); - $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($138|0),($139|0))|0); - $215 = tempRet0; - $216 = (_i64Add(($214|0),($215|0),($156|0),($157|0))|0); - $217 = tempRet0; - $218 = (___muldi3(($106|0),0,666643,0)|0); - $219 = tempRet0; - $220 = (_i64Add(($218|0),($219|0),($38|0),0)|0); - $221 = tempRet0; - $222 = (___muldi3(($106|0),0,470296,0)|0); - $223 = tempRet0; - $224 = (___muldi3(($106|0),0,654183,0)|0); - $225 = tempRet0; - $226 = (_i64Add(($224|0),($225|0),($48|0),0)|0); - $227 = tempRet0; - $228 = (_i64Add(($226|0),($227|0),($198|0),($199|0))|0); - $229 = tempRet0; - $230 = (_i64Add(($228|0),($229|0),($184|0),($185|0))|0); - $231 = tempRet0; - $232 = (___muldi3(($106|0),0,-997805,-1)|0); - $233 = tempRet0; - $234 = (___muldi3(($106|0),0,136657,0)|0); - $235 = tempRet0; - $236 = (_i64Add(($234|0),($235|0),($60|0),0)|0); - $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($202|0),($203|0))|0); - $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($188|0),($189|0))|0); - $241 = tempRet0; - $242 = (_i64Add(($240|0),($241|0),($168|0),($169|0))|0); - $243 = tempRet0; - $244 = (_i64Add(($242|0),($243|0),($152|0),($153|0))|0); - $245 = tempRet0; - $246 = (___muldi3(($106|0),0,-683901,-1)|0); - $247 = tempRet0; - $248 = (_i64Add(($220|0),($221|0),1048576,0)|0); - $249 = tempRet0; - $250 = (_bitshift64Lshr(($248|0),($249|0),21)|0); - $251 = tempRet0; - $252 = (_i64Add(($222|0),($223|0),($44|0),0)|0); - $253 = tempRet0; - $254 = (_i64Add(($252|0),($253|0),($196|0),($197|0))|0); - $255 = tempRet0; - $256 = (_i64Add(($254|0),($255|0),($250|0),($251|0))|0); - $257 = tempRet0; - $258 = (_bitshift64Shl(($250|0),($251|0),21)|0); - $259 = tempRet0; - $260 = (_i64Subtract(($220|0),($221|0),($258|0),($259|0))|0); - $261 = tempRet0; - $262 = (_i64Add(($230|0),($231|0),1048576,0)|0); - $263 = tempRet0; - $264 = (_bitshift64Lshr(($262|0),($263|0),21)|0); - $265 = tempRet0; - $266 = (_i64Add(($232|0),($233|0),($54|0),0)|0); - $267 = tempRet0; - $268 = (_i64Add(($266|0),($267|0),($200|0),($201|0))|0); - $269 = tempRet0; - $270 = (_i64Add(($268|0),($269|0),($186|0),($187|0))|0); - $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($166|0),($167|0))|0); - $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($264|0),($265|0))|0); - $275 = tempRet0; - $276 = (_bitshift64Shl(($264|0),($265|0),21)|0); - $277 = tempRet0; - $278 = (_i64Subtract(($230|0),($231|0),($276|0),($277|0))|0); - $279 = tempRet0; - $280 = (_i64Add(($244|0),($245|0),1048576,0)|0); - $281 = tempRet0; - $282 = (_bitshift64Ashr(($280|0),($281|0),21)|0); - $283 = tempRet0; - $284 = (_i64Add(($246|0),($247|0),($66|0),0)|0); - $285 = tempRet0; - $286 = (_i64Add(($284|0),($285|0),($204|0),($205|0))|0); - $287 = tempRet0; - $288 = (_i64Add(($286|0),($287|0),($190|0),($191|0))|0); - $289 = tempRet0; - $290 = (_i64Add(($288|0),($289|0),($170|0),($171|0))|0); - $291 = tempRet0; - $292 = (_i64Add(($290|0),($291|0),($136|0),($137|0))|0); - $293 = tempRet0; - $294 = (_i64Add(($292|0),($293|0),($154|0),($155|0))|0); - $295 = tempRet0; - $296 = (_i64Add(($294|0),($295|0),($282|0),($283|0))|0); - $297 = tempRet0; - $298 = (_bitshift64Shl(($282|0),($283|0),21)|0); - $299 = tempRet0; - $300 = (_i64Subtract(($244|0),($245|0),($298|0),($299|0))|0); - $301 = tempRet0; - $302 = (_i64Add(($216|0),($217|0),1048576,0)|0); - $303 = tempRet0; - $304 = (_bitshift64Ashr(($302|0),($303|0),21)|0); - $305 = tempRet0; - $306 = (_i64Add(($194|0),($195|0),($78|0),0)|0); - $307 = tempRet0; - $308 = (_i64Add(($306|0),($307|0),($174|0),($175|0))|0); - $309 = tempRet0; - $310 = (_i64Add(($308|0),($309|0),($140|0),($141|0))|0); - $311 = tempRet0; - $312 = (_i64Add(($310|0),($311|0),($158|0),($159|0))|0); - $313 = tempRet0; - $314 = (_i64Add(($312|0),($313|0),($304|0),($305|0))|0); - $315 = tempRet0; - $316 = (_bitshift64Shl(($304|0),($305|0),21)|0); - $317 = tempRet0; - $318 = (_i64Subtract(($216|0),($217|0),($316|0),($317|0))|0); - $319 = tempRet0; - $320 = (_i64Add(($182|0),($183|0),1048576,0)|0); - $321 = tempRet0; - $322 = (_bitshift64Ashr(($320|0),($321|0),21)|0); - $323 = tempRet0; - $324 = (_i64Add(($164|0),($165|0),($322|0),($323|0))|0); - $325 = tempRet0; - $326 = (_bitshift64Shl(($322|0),($323|0),21)|0); - $327 = tempRet0; - $328 = (_i64Subtract(($182|0),($183|0),($326|0),($327|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($150|0),($151|0),1048576,0)|0); - $331 = tempRet0; - $332 = (_bitshift64Ashr(($330|0),($331|0),21)|0); - $333 = tempRet0; - $334 = (_i64Add(($332|0),($333|0),($100|0),0)|0); - $335 = tempRet0; - $336 = (_bitshift64Shl(($332|0),($333|0),21)|0); - $337 = tempRet0; - $338 = (_i64Subtract(($150|0),($151|0),($336|0),($337|0))|0); - $339 = tempRet0; - $340 = (_i64Add(($256|0),($257|0),1048576,0)|0); - $341 = tempRet0; - $342 = (_bitshift64Lshr(($340|0),($341|0),21)|0); - $343 = tempRet0; - $344 = (_i64Add(($278|0),($279|0),($342|0),($343|0))|0); - $345 = tempRet0; - $346 = (_bitshift64Shl(($342|0),($343|0),21)|0); - $347 = tempRet0; - $348 = (_i64Subtract(($256|0),($257|0),($346|0),($347|0))|0); - $349 = tempRet0; - $350 = (_i64Add(($274|0),($275|0),1048576,0)|0); - $351 = tempRet0; - $352 = (_bitshift64Ashr(($350|0),($351|0),21)|0); - $353 = tempRet0; - $354 = (_i64Add(($300|0),($301|0),($352|0),($353|0))|0); - $355 = tempRet0; - $356 = (_bitshift64Shl(($352|0),($353|0),21)|0); - $357 = tempRet0; - $358 = (_i64Subtract(($274|0),($275|0),($356|0),($357|0))|0); - $359 = tempRet0; - $360 = (_i64Add(($296|0),($297|0),1048576,0)|0); - $361 = tempRet0; - $362 = (_bitshift64Ashr(($360|0),($361|0),21)|0); - $363 = tempRet0; - $364 = (_i64Add(($318|0),($319|0),($362|0),($363|0))|0); - $365 = tempRet0; - $366 = (_bitshift64Shl(($362|0),($363|0),21)|0); - $367 = tempRet0; - $368 = (_i64Subtract(($296|0),($297|0),($366|0),($367|0))|0); - $369 = tempRet0; - $370 = (_i64Add(($314|0),($315|0),1048576,0)|0); - $371 = tempRet0; - $372 = (_bitshift64Ashr(($370|0),($371|0),21)|0); - $373 = tempRet0; - $374 = (_i64Add(($372|0),($373|0),($328|0),($329|0))|0); - $375 = tempRet0; - $376 = (_bitshift64Shl(($372|0),($373|0),21)|0); - $377 = tempRet0; - $378 = (_i64Subtract(($314|0),($315|0),($376|0),($377|0))|0); - $379 = tempRet0; - $380 = (_i64Add(($324|0),($325|0),1048576,0)|0); - $381 = tempRet0; - $382 = (_bitshift64Ashr(($380|0),($381|0),21)|0); - $383 = tempRet0; - $384 = (_i64Add(($382|0),($383|0),($338|0),($339|0))|0); - $385 = tempRet0; - $386 = (_bitshift64Shl(($382|0),($383|0),21)|0); - $387 = tempRet0; - $388 = (_i64Subtract(($324|0),($325|0),($386|0),($387|0))|0); - $389 = tempRet0; - $390 = (___muldi3(($334|0),($335|0),666643,0)|0); - $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($32|0),0)|0); - $393 = tempRet0; - $394 = (___muldi3(($334|0),($335|0),470296,0)|0); - $395 = tempRet0; - $396 = (_i64Add(($260|0),($261|0),($394|0),($395|0))|0); - $397 = tempRet0; - $398 = (___muldi3(($334|0),($335|0),654183,0)|0); - $399 = tempRet0; - $400 = (_i64Add(($348|0),($349|0),($398|0),($399|0))|0); - $401 = tempRet0; - $402 = (___muldi3(($334|0),($335|0),-997805,-1)|0); - $403 = tempRet0; - $404 = (_i64Add(($344|0),($345|0),($402|0),($403|0))|0); - $405 = tempRet0; - $406 = (___muldi3(($334|0),($335|0),136657,0)|0); - $407 = tempRet0; - $408 = (_i64Add(($358|0),($359|0),($406|0),($407|0))|0); - $409 = tempRet0; - $410 = (___muldi3(($334|0),($335|0),-683901,-1)|0); - $411 = tempRet0; - $412 = (_i64Add(($354|0),($355|0),($410|0),($411|0))|0); - $413 = tempRet0; - $414 = (___muldi3(($384|0),($385|0),666643,0)|0); - $415 = tempRet0; - $416 = (___muldi3(($384|0),($385|0),470296,0)|0); - $417 = tempRet0; - $418 = (___muldi3(($384|0),($385|0),654183,0)|0); - $419 = tempRet0; - $420 = (_i64Add(($396|0),($397|0),($418|0),($419|0))|0); - $421 = tempRet0; - $422 = (___muldi3(($384|0),($385|0),-997805,-1)|0); - $423 = tempRet0; - $424 = (_i64Add(($400|0),($401|0),($422|0),($423|0))|0); - $425 = tempRet0; - $426 = (___muldi3(($384|0),($385|0),136657,0)|0); - $427 = tempRet0; - $428 = (_i64Add(($404|0),($405|0),($426|0),($427|0))|0); - $429 = tempRet0; - $430 = (___muldi3(($384|0),($385|0),-683901,-1)|0); - $431 = tempRet0; - $432 = (_i64Add(($408|0),($409|0),($430|0),($431|0))|0); - $433 = tempRet0; - $434 = (___muldi3(($388|0),($389|0),666643,0)|0); - $435 = tempRet0; - $436 = (___muldi3(($388|0),($389|0),470296,0)|0); - $437 = tempRet0; - $438 = (___muldi3(($388|0),($389|0),654183,0)|0); - $439 = tempRet0; - $440 = (___muldi3(($388|0),($389|0),-997805,-1)|0); - $441 = tempRet0; - $442 = (___muldi3(($388|0),($389|0),136657,0)|0); - $443 = tempRet0; - $444 = (___muldi3(($388|0),($389|0),-683901,-1)|0); - $445 = tempRet0; - $446 = (_i64Add(($428|0),($429|0),($444|0),($445|0))|0); - $447 = tempRet0; - $448 = (___muldi3(($374|0),($375|0),666643,0)|0); - $449 = tempRet0; - $450 = (___muldi3(($374|0),($375|0),470296,0)|0); - $451 = tempRet0; - $452 = (___muldi3(($374|0),($375|0),654183,0)|0); - $453 = tempRet0; - $454 = (___muldi3(($374|0),($375|0),-997805,-1)|0); - $455 = tempRet0; - $456 = (___muldi3(($374|0),($375|0),136657,0)|0); - $457 = tempRet0; - $458 = (___muldi3(($374|0),($375|0),-683901,-1)|0); - $459 = tempRet0; - $460 = (___muldi3(($378|0),($379|0),666643,0)|0); - $461 = tempRet0; - $462 = (___muldi3(($378|0),($379|0),470296,0)|0); - $463 = tempRet0; - $464 = (___muldi3(($378|0),($379|0),654183,0)|0); - $465 = tempRet0; - $466 = (___muldi3(($378|0),($379|0),-997805,-1)|0); - $467 = tempRet0; - $468 = (___muldi3(($378|0),($379|0),136657,0)|0); - $469 = tempRet0; - $470 = (___muldi3(($378|0),($379|0),-683901,-1)|0); - $471 = tempRet0; - $472 = (_i64Add(($420|0),($421|0),($456|0),($457|0))|0); - $473 = tempRet0; - $474 = (_i64Add(($472|0),($473|0),($440|0),($441|0))|0); - $475 = tempRet0; - $476 = (_i64Add(($474|0),($475|0),($470|0),($471|0))|0); - $477 = tempRet0; - $478 = (___muldi3(($364|0),($365|0),666643,0)|0); - $479 = tempRet0; - $480 = (_i64Add(($478|0),($479|0),($2|0),0)|0); - $481 = tempRet0; - $482 = (___muldi3(($364|0),($365|0),470296,0)|0); - $483 = tempRet0; - $484 = (___muldi3(($364|0),($365|0),654183,0)|0); - $485 = tempRet0; - $486 = (_i64Add(($484|0),($485|0),($14|0),0)|0); - $487 = tempRet0; - $488 = (_i64Add(($486|0),($487|0),($448|0),($449|0))|0); - $489 = tempRet0; - $490 = (_i64Add(($488|0),($489|0),($462|0),($463|0))|0); - $491 = tempRet0; - $492 = (___muldi3(($364|0),($365|0),-997805,-1)|0); - $493 = tempRet0; - $494 = (___muldi3(($364|0),($365|0),136657,0)|0); - $495 = tempRet0; - $496 = (_i64Add(($494|0),($495|0),($26|0),0)|0); - $497 = tempRet0; - $498 = (_i64Add(($496|0),($497|0),($414|0),($415|0))|0); - $499 = tempRet0; - $500 = (_i64Add(($498|0),($499|0),($452|0),($453|0))|0); - $501 = tempRet0; - $502 = (_i64Add(($500|0),($501|0),($436|0),($437|0))|0); - $503 = tempRet0; - $504 = (_i64Add(($502|0),($503|0),($466|0),($467|0))|0); - $505 = tempRet0; - $506 = (___muldi3(($364|0),($365|0),-683901,-1)|0); - $507 = tempRet0; - $508 = (_i64Add(($480|0),($481|0),1048576,0)|0); - $509 = tempRet0; - $510 = (_bitshift64Ashr(($508|0),($509|0),21)|0); - $511 = tempRet0; - $512 = (_i64Add(($482|0),($483|0),($8|0),0)|0); - $513 = tempRet0; - $514 = (_i64Add(($512|0),($513|0),($460|0),($461|0))|0); - $515 = tempRet0; - $516 = (_i64Add(($514|0),($515|0),($510|0),($511|0))|0); - $517 = tempRet0; - $518 = (_bitshift64Shl(($510|0),($511|0),21)|0); - $519 = tempRet0; - $520 = (_i64Subtract(($480|0),($481|0),($518|0),($519|0))|0); - $521 = tempRet0; - $522 = (_i64Add(($490|0),($491|0),1048576,0)|0); - $523 = tempRet0; - $524 = (_bitshift64Ashr(($522|0),($523|0),21)|0); - $525 = tempRet0; - $526 = (_i64Add(($492|0),($493|0),($20|0),0)|0); - $527 = tempRet0; - $528 = (_i64Add(($526|0),($527|0),($450|0),($451|0))|0); - $529 = tempRet0; - $530 = (_i64Add(($528|0),($529|0),($434|0),($435|0))|0); - $531 = tempRet0; - $532 = (_i64Add(($530|0),($531|0),($464|0),($465|0))|0); - $533 = tempRet0; - $534 = (_i64Add(($532|0),($533|0),($524|0),($525|0))|0); - $535 = tempRet0; - $536 = (_bitshift64Shl(($524|0),($525|0),21)|0); - $537 = tempRet0; - $538 = (_i64Add(($504|0),($505|0),1048576,0)|0); - $539 = tempRet0; - $540 = (_bitshift64Ashr(($538|0),($539|0),21)|0); - $541 = tempRet0; - $542 = (_i64Add(($392|0),($393|0),($506|0),($507|0))|0); - $543 = tempRet0; - $544 = (_i64Add(($542|0),($543|0),($416|0),($417|0))|0); - $545 = tempRet0; - $546 = (_i64Add(($544|0),($545|0),($454|0),($455|0))|0); - $547 = tempRet0; - $548 = (_i64Add(($546|0),($547|0),($438|0),($439|0))|0); - $549 = tempRet0; - $550 = (_i64Add(($548|0),($549|0),($468|0),($469|0))|0); - $551 = tempRet0; - $552 = (_i64Add(($550|0),($551|0),($540|0),($541|0))|0); - $553 = tempRet0; - $554 = (_bitshift64Shl(($540|0),($541|0),21)|0); - $555 = tempRet0; - $556 = (_i64Add(($476|0),($477|0),1048576,0)|0); - $557 = tempRet0; - $558 = (_bitshift64Ashr(($556|0),($557|0),21)|0); - $559 = tempRet0; - $560 = (_i64Add(($424|0),($425|0),($458|0),($459|0))|0); - $561 = tempRet0; - $562 = (_i64Add(($560|0),($561|0),($442|0),($443|0))|0); - $563 = tempRet0; - $564 = (_i64Add(($562|0),($563|0),($558|0),($559|0))|0); - $565 = tempRet0; - $566 = (_bitshift64Shl(($558|0),($559|0),21)|0); - $567 = tempRet0; - $568 = (_i64Subtract(($476|0),($477|0),($566|0),($567|0))|0); - $569 = tempRet0; - $570 = (_i64Add(($446|0),($447|0),1048576,0)|0); - $571 = tempRet0; - $572 = (_bitshift64Ashr(($570|0),($571|0),21)|0); - $573 = tempRet0; - $574 = (_i64Add(($432|0),($433|0),($572|0),($573|0))|0); - $575 = tempRet0; - $576 = (_bitshift64Shl(($572|0),($573|0),21)|0); - $577 = tempRet0; - $578 = (_i64Subtract(($446|0),($447|0),($576|0),($577|0))|0); - $579 = tempRet0; - $580 = (_i64Add(($412|0),($413|0),1048576,0)|0); - $581 = tempRet0; - $582 = (_bitshift64Ashr(($580|0),($581|0),21)|0); - $583 = tempRet0; - $584 = (_i64Add(($582|0),($583|0),($368|0),($369|0))|0); - $585 = tempRet0; - $586 = (_bitshift64Shl(($582|0),($583|0),21)|0); - $587 = tempRet0; - $588 = (_i64Subtract(($412|0),($413|0),($586|0),($587|0))|0); - $589 = tempRet0; - $590 = (_i64Add(($516|0),($517|0),1048576,0)|0); - $591 = tempRet0; - $592 = (_bitshift64Ashr(($590|0),($591|0),21)|0); - $593 = tempRet0; - $594 = (_bitshift64Shl(($592|0),($593|0),21)|0); - $595 = tempRet0; - $596 = (_i64Add(($534|0),($535|0),1048576,0)|0); - $597 = tempRet0; - $598 = (_bitshift64Ashr(($596|0),($597|0),21)|0); - $599 = tempRet0; - $600 = (_bitshift64Shl(($598|0),($599|0),21)|0); - $601 = tempRet0; - $602 = (_i64Add(($552|0),($553|0),1048576,0)|0); - $603 = tempRet0; - $604 = (_bitshift64Ashr(($602|0),($603|0),21)|0); - $605 = tempRet0; - $606 = (_i64Add(($568|0),($569|0),($604|0),($605|0))|0); - $607 = tempRet0; - $608 = (_bitshift64Shl(($604|0),($605|0),21)|0); - $609 = tempRet0; - $610 = (_i64Add(($564|0),($565|0),1048576,0)|0); - $611 = tempRet0; - $612 = (_bitshift64Ashr(($610|0),($611|0),21)|0); - $613 = tempRet0; - $614 = (_i64Add(($578|0),($579|0),($612|0),($613|0))|0); - $615 = tempRet0; - $616 = (_bitshift64Shl(($612|0),($613|0),21)|0); - $617 = tempRet0; - $618 = (_i64Subtract(($564|0),($565|0),($616|0),($617|0))|0); - $619 = tempRet0; - $620 = (_i64Add(($574|0),($575|0),1048576,0)|0); - $621 = tempRet0; - $622 = (_bitshift64Ashr(($620|0),($621|0),21)|0); - $623 = tempRet0; - $624 = (_i64Add(($588|0),($589|0),($622|0),($623|0))|0); - $625 = tempRet0; - $626 = (_bitshift64Shl(($622|0),($623|0),21)|0); - $627 = tempRet0; - $628 = (_i64Subtract(($574|0),($575|0),($626|0),($627|0))|0); - $629 = tempRet0; - $630 = (_i64Add(($584|0),($585|0),1048576,0)|0); - $631 = tempRet0; - $632 = (_bitshift64Ashr(($630|0),($631|0),21)|0); - $633 = tempRet0; - $634 = (_bitshift64Shl(($632|0),($633|0),21)|0); - $635 = tempRet0; - $636 = (_i64Subtract(($584|0),($585|0),($634|0),($635|0))|0); - $637 = tempRet0; - $638 = (___muldi3(($632|0),($633|0),666643,0)|0); - $639 = tempRet0; - $640 = (_i64Add(($520|0),($521|0),($638|0),($639|0))|0); - $641 = tempRet0; - $642 = (___muldi3(($632|0),($633|0),470296,0)|0); - $643 = tempRet0; - $644 = (___muldi3(($632|0),($633|0),654183,0)|0); - $645 = tempRet0; - $646 = (___muldi3(($632|0),($633|0),-997805,-1)|0); - $647 = tempRet0; - $648 = (___muldi3(($632|0),($633|0),136657,0)|0); - $649 = tempRet0; - $650 = (___muldi3(($632|0),($633|0),-683901,-1)|0); - $651 = tempRet0; - $652 = (_bitshift64Ashr(($640|0),($641|0),21)|0); - $653 = tempRet0; - $654 = (_i64Add(($642|0),($643|0),($516|0),($517|0))|0); - $655 = tempRet0; - $656 = (_i64Subtract(($654|0),($655|0),($594|0),($595|0))|0); - $657 = tempRet0; - $658 = (_i64Add(($656|0),($657|0),($652|0),($653|0))|0); - $659 = tempRet0; - $660 = (_bitshift64Shl(($652|0),($653|0),21)|0); - $661 = tempRet0; - $662 = (_i64Subtract(($640|0),($641|0),($660|0),($661|0))|0); - $663 = tempRet0; - $664 = (_bitshift64Ashr(($658|0),($659|0),21)|0); - $665 = tempRet0; - $666 = (_i64Add(($644|0),($645|0),($490|0),($491|0))|0); - $667 = tempRet0; - $668 = (_i64Subtract(($666|0),($667|0),($536|0),($537|0))|0); - $669 = tempRet0; - $670 = (_i64Add(($668|0),($669|0),($592|0),($593|0))|0); - $671 = tempRet0; - $672 = (_i64Add(($670|0),($671|0),($664|0),($665|0))|0); - $673 = tempRet0; - $674 = (_bitshift64Shl(($664|0),($665|0),21)|0); - $675 = tempRet0; - $676 = (_i64Subtract(($658|0),($659|0),($674|0),($675|0))|0); - $677 = tempRet0; - $678 = (_bitshift64Ashr(($672|0),($673|0),21)|0); - $679 = tempRet0; - $680 = (_i64Add(($534|0),($535|0),($646|0),($647|0))|0); - $681 = tempRet0; - $682 = (_i64Subtract(($680|0),($681|0),($600|0),($601|0))|0); - $683 = tempRet0; - $684 = (_i64Add(($682|0),($683|0),($678|0),($679|0))|0); - $685 = tempRet0; - $686 = (_bitshift64Shl(($678|0),($679|0),21)|0); - $687 = tempRet0; - $688 = (_i64Subtract(($672|0),($673|0),($686|0),($687|0))|0); - $689 = tempRet0; - $690 = (_bitshift64Ashr(($684|0),($685|0),21)|0); - $691 = tempRet0; - $692 = (_i64Add(($648|0),($649|0),($504|0),($505|0))|0); - $693 = tempRet0; - $694 = (_i64Subtract(($692|0),($693|0),($554|0),($555|0))|0); - $695 = tempRet0; - $696 = (_i64Add(($694|0),($695|0),($598|0),($599|0))|0); - $697 = tempRet0; - $698 = (_i64Add(($696|0),($697|0),($690|0),($691|0))|0); - $699 = tempRet0; - $700 = (_bitshift64Shl(($690|0),($691|0),21)|0); - $701 = tempRet0; - $702 = (_i64Subtract(($684|0),($685|0),($700|0),($701|0))|0); - $703 = tempRet0; - $704 = (_bitshift64Ashr(($698|0),($699|0),21)|0); - $705 = tempRet0; - $706 = (_i64Add(($552|0),($553|0),($650|0),($651|0))|0); - $707 = tempRet0; - $708 = (_i64Subtract(($706|0),($707|0),($608|0),($609|0))|0); - $709 = tempRet0; - $710 = (_i64Add(($708|0),($709|0),($704|0),($705|0))|0); - $711 = tempRet0; - $712 = (_bitshift64Shl(($704|0),($705|0),21)|0); - $713 = tempRet0; - $714 = (_i64Subtract(($698|0),($699|0),($712|0),($713|0))|0); - $715 = tempRet0; - $716 = (_bitshift64Ashr(($710|0),($711|0),21)|0); - $717 = tempRet0; - $718 = (_i64Add(($606|0),($607|0),($716|0),($717|0))|0); - $719 = tempRet0; - $720 = (_bitshift64Shl(($716|0),($717|0),21)|0); - $721 = tempRet0; - $722 = (_i64Subtract(($710|0),($711|0),($720|0),($721|0))|0); - $723 = tempRet0; - $724 = (_bitshift64Ashr(($718|0),($719|0),21)|0); - $725 = tempRet0; - $726 = (_i64Add(($724|0),($725|0),($618|0),($619|0))|0); - $727 = tempRet0; - $728 = (_bitshift64Shl(($724|0),($725|0),21)|0); - $729 = tempRet0; - $730 = (_i64Subtract(($718|0),($719|0),($728|0),($729|0))|0); - $731 = tempRet0; - $732 = (_bitshift64Ashr(($726|0),($727|0),21)|0); - $733 = tempRet0; - $734 = (_i64Add(($614|0),($615|0),($732|0),($733|0))|0); - $735 = tempRet0; - $736 = (_bitshift64Shl(($732|0),($733|0),21)|0); - $737 = tempRet0; - $738 = (_i64Subtract(($726|0),($727|0),($736|0),($737|0))|0); - $739 = tempRet0; - $740 = (_bitshift64Ashr(($734|0),($735|0),21)|0); - $741 = tempRet0; - $742 = (_i64Add(($740|0),($741|0),($628|0),($629|0))|0); - $743 = tempRet0; - $744 = (_bitshift64Shl(($740|0),($741|0),21)|0); - $745 = tempRet0; - $746 = (_i64Subtract(($734|0),($735|0),($744|0),($745|0))|0); - $747 = tempRet0; - $748 = (_bitshift64Ashr(($742|0),($743|0),21)|0); - $749 = tempRet0; - $750 = (_i64Add(($624|0),($625|0),($748|0),($749|0))|0); - $751 = tempRet0; - $752 = (_bitshift64Shl(($748|0),($749|0),21)|0); - $753 = tempRet0; - $754 = (_i64Subtract(($742|0),($743|0),($752|0),($753|0))|0); - $755 = tempRet0; - $756 = (_bitshift64Ashr(($750|0),($751|0),21)|0); - $757 = tempRet0; - $758 = (_i64Add(($756|0),($757|0),($636|0),($637|0))|0); - $759 = tempRet0; - $760 = (_bitshift64Shl(($756|0),($757|0),21)|0); - $761 = tempRet0; - $762 = (_i64Subtract(($750|0),($751|0),($760|0),($761|0))|0); - $763 = tempRet0; - $764 = (_bitshift64Ashr(($758|0),($759|0),21)|0); - $765 = tempRet0; - $766 = (_bitshift64Shl(($764|0),($765|0),21)|0); - $767 = tempRet0; - $768 = (_i64Subtract(($758|0),($759|0),($766|0),($767|0))|0); - $769 = tempRet0; - $770 = (___muldi3(($764|0),($765|0),666643,0)|0); - $771 = tempRet0; - $772 = (_i64Add(($770|0),($771|0),($662|0),($663|0))|0); - $773 = tempRet0; - $774 = (___muldi3(($764|0),($765|0),470296,0)|0); - $775 = tempRet0; - $776 = (_i64Add(($676|0),($677|0),($774|0),($775|0))|0); - $777 = tempRet0; - $778 = (___muldi3(($764|0),($765|0),654183,0)|0); - $779 = tempRet0; - $780 = (_i64Add(($688|0),($689|0),($778|0),($779|0))|0); - $781 = tempRet0; - $782 = (___muldi3(($764|0),($765|0),-997805,-1)|0); - $783 = tempRet0; - $784 = (_i64Add(($702|0),($703|0),($782|0),($783|0))|0); - $785 = tempRet0; - $786 = (___muldi3(($764|0),($765|0),136657,0)|0); - $787 = tempRet0; - $788 = (_i64Add(($714|0),($715|0),($786|0),($787|0))|0); - $789 = tempRet0; - $790 = (___muldi3(($764|0),($765|0),-683901,-1)|0); - $791 = tempRet0; - $792 = (_i64Add(($722|0),($723|0),($790|0),($791|0))|0); - $793 = tempRet0; - $794 = (_bitshift64Ashr(($772|0),($773|0),21)|0); - $795 = tempRet0; - $796 = (_i64Add(($776|0),($777|0),($794|0),($795|0))|0); - $797 = tempRet0; - $798 = (_bitshift64Shl(($794|0),($795|0),21)|0); - $799 = tempRet0; - $800 = (_i64Subtract(($772|0),($773|0),($798|0),($799|0))|0); - $801 = tempRet0; - $802 = (_bitshift64Ashr(($796|0),($797|0),21)|0); - $803 = tempRet0; - $804 = (_i64Add(($780|0),($781|0),($802|0),($803|0))|0); - $805 = tempRet0; - $806 = (_bitshift64Shl(($802|0),($803|0),21)|0); - $807 = tempRet0; - $808 = (_i64Subtract(($796|0),($797|0),($806|0),($807|0))|0); - $809 = tempRet0; - $810 = (_bitshift64Ashr(($804|0),($805|0),21)|0); - $811 = tempRet0; - $812 = (_i64Add(($784|0),($785|0),($810|0),($811|0))|0); - $813 = tempRet0; - $814 = (_bitshift64Shl(($810|0),($811|0),21)|0); - $815 = tempRet0; - $816 = (_i64Subtract(($804|0),($805|0),($814|0),($815|0))|0); - $817 = tempRet0; - $818 = (_bitshift64Ashr(($812|0),($813|0),21)|0); - $819 = tempRet0; - $820 = (_i64Add(($788|0),($789|0),($818|0),($819|0))|0); - $821 = tempRet0; - $822 = (_bitshift64Shl(($818|0),($819|0),21)|0); - $823 = tempRet0; - $824 = (_i64Subtract(($812|0),($813|0),($822|0),($823|0))|0); - $825 = tempRet0; - $826 = (_bitshift64Ashr(($820|0),($821|0),21)|0); - $827 = tempRet0; - $828 = (_i64Add(($792|0),($793|0),($826|0),($827|0))|0); - $829 = tempRet0; - $830 = (_bitshift64Shl(($826|0),($827|0),21)|0); - $831 = tempRet0; - $832 = (_i64Subtract(($820|0),($821|0),($830|0),($831|0))|0); - $833 = tempRet0; - $834 = (_bitshift64Ashr(($828|0),($829|0),21)|0); - $835 = tempRet0; - $836 = (_i64Add(($834|0),($835|0),($730|0),($731|0))|0); - $837 = tempRet0; - $838 = (_bitshift64Shl(($834|0),($835|0),21)|0); - $839 = tempRet0; - $840 = (_i64Subtract(($828|0),($829|0),($838|0),($839|0))|0); - $841 = tempRet0; - $842 = (_bitshift64Ashr(($836|0),($837|0),21)|0); - $843 = tempRet0; - $844 = (_i64Add(($842|0),($843|0),($738|0),($739|0))|0); - $845 = tempRet0; - $846 = (_bitshift64Shl(($842|0),($843|0),21)|0); - $847 = tempRet0; - $848 = (_i64Subtract(($836|0),($837|0),($846|0),($847|0))|0); - $849 = tempRet0; - $850 = (_bitshift64Ashr(($844|0),($845|0),21)|0); - $851 = tempRet0; - $852 = (_i64Add(($850|0),($851|0),($746|0),($747|0))|0); - $853 = tempRet0; - $854 = (_bitshift64Shl(($850|0),($851|0),21)|0); - $855 = tempRet0; - $856 = (_i64Subtract(($844|0),($845|0),($854|0),($855|0))|0); - $857 = tempRet0; - $858 = (_bitshift64Ashr(($852|0),($853|0),21)|0); - $859 = tempRet0; - $860 = (_i64Add(($858|0),($859|0),($754|0),($755|0))|0); - $861 = tempRet0; - $862 = (_bitshift64Shl(($858|0),($859|0),21)|0); - $863 = tempRet0; - $864 = (_i64Subtract(($852|0),($853|0),($862|0),($863|0))|0); - $865 = tempRet0; - $866 = (_bitshift64Ashr(($860|0),($861|0),21)|0); - $867 = tempRet0; - $868 = (_i64Add(($866|0),($867|0),($762|0),($763|0))|0); - $869 = tempRet0; - $870 = (_bitshift64Shl(($866|0),($867|0),21)|0); - $871 = tempRet0; - $872 = (_i64Subtract(($860|0),($861|0),($870|0),($871|0))|0); - $873 = tempRet0; - $874 = (_bitshift64Ashr(($868|0),($869|0),21)|0); - $875 = tempRet0; - $876 = (_i64Add(($874|0),($875|0),($768|0),($769|0))|0); - $877 = tempRet0; - $878 = (_bitshift64Shl(($874|0),($875|0),21)|0); - $879 = tempRet0; - $880 = (_i64Subtract(($868|0),($869|0),($878|0),($879|0))|0); - $881 = tempRet0; - $882 = $800&255; - HEAP8[$s>>0] = $882; - $883 = (_bitshift64Lshr(($800|0),($801|0),8)|0); - $884 = tempRet0; - $885 = $883&255; - $886 = (($s) + 1|0); - HEAP8[$886>>0] = $885; - $887 = (_bitshift64Lshr(($800|0),($801|0),16)|0); - $888 = tempRet0; - $889 = (_bitshift64Shl(($808|0),($809|0),5)|0); - $890 = tempRet0; - $891 = $889 | $887; - $890 | $888; - $892 = $891&255; - HEAP8[$3>>0] = $892; - $893 = (_bitshift64Lshr(($808|0),($809|0),3)|0); - $894 = tempRet0; - $895 = $893&255; - $896 = (($s) + 3|0); - HEAP8[$896>>0] = $895; - $897 = (_bitshift64Lshr(($808|0),($809|0),11)|0); - $898 = tempRet0; - $899 = $897&255; - $900 = (($s) + 4|0); - HEAP8[$900>>0] = $899; - $901 = (_bitshift64Lshr(($808|0),($809|0),19)|0); - $902 = tempRet0; - $903 = (_bitshift64Shl(($816|0),($817|0),2)|0); - $904 = tempRet0; - $905 = $903 | $901; - $904 | $902; - $906 = $905&255; - HEAP8[$9>>0] = $906; - $907 = (_bitshift64Lshr(($816|0),($817|0),6)|0); - $908 = tempRet0; - $909 = $907&255; - $910 = (($s) + 6|0); - HEAP8[$910>>0] = $909; - $911 = (_bitshift64Lshr(($816|0),($817|0),14)|0); - $912 = tempRet0; - $913 = (_bitshift64Shl(($824|0),($825|0),7)|0); - $914 = tempRet0; - $915 = $913 | $911; - $914 | $912; - $916 = $915&255; - HEAP8[$15>>0] = $916; - $917 = (_bitshift64Lshr(($824|0),($825|0),1)|0); - $918 = tempRet0; - $919 = $917&255; - $920 = (($s) + 8|0); - HEAP8[$920>>0] = $919; - $921 = (_bitshift64Lshr(($824|0),($825|0),9)|0); - $922 = tempRet0; - $923 = $921&255; - $924 = (($s) + 9|0); - HEAP8[$924>>0] = $923; - $925 = (_bitshift64Lshr(($824|0),($825|0),17)|0); - $926 = tempRet0; - $927 = (_bitshift64Shl(($832|0),($833|0),4)|0); - $928 = tempRet0; - $929 = $927 | $925; - $928 | $926; - $930 = $929&255; - HEAP8[$21>>0] = $930; - $931 = (_bitshift64Lshr(($832|0),($833|0),4)|0); - $932 = tempRet0; - $933 = $931&255; - $934 = (($s) + 11|0); - HEAP8[$934>>0] = $933; - $935 = (_bitshift64Lshr(($832|0),($833|0),12)|0); - $936 = tempRet0; - $937 = $935&255; - $938 = (($s) + 12|0); - HEAP8[$938>>0] = $937; - $939 = (_bitshift64Lshr(($832|0),($833|0),20)|0); - $940 = tempRet0; - $941 = (_bitshift64Shl(($840|0),($841|0),1)|0); - $942 = tempRet0; - $943 = $941 | $939; - $942 | $940; - $944 = $943&255; - HEAP8[$27>>0] = $944; - $945 = (_bitshift64Lshr(($840|0),($841|0),7)|0); - $946 = tempRet0; - $947 = $945&255; - $948 = (($s) + 14|0); - HEAP8[$948>>0] = $947; - $949 = (_bitshift64Lshr(($840|0),($841|0),15)|0); - $950 = tempRet0; - $951 = (_bitshift64Shl(($848|0),($849|0),6)|0); - $952 = tempRet0; - $953 = $951 | $949; - $952 | $950; - $954 = $953&255; - HEAP8[$33>>0] = $954; - $955 = (_bitshift64Lshr(($848|0),($849|0),2)|0); - $956 = tempRet0; - $957 = $955&255; - $958 = (($s) + 16|0); - HEAP8[$958>>0] = $957; - $959 = (_bitshift64Lshr(($848|0),($849|0),10)|0); - $960 = tempRet0; - $961 = $959&255; - $962 = (($s) + 17|0); - HEAP8[$962>>0] = $961; - $963 = (_bitshift64Lshr(($848|0),($849|0),18)|0); - $964 = tempRet0; - $965 = (_bitshift64Shl(($856|0),($857|0),3)|0); - $966 = tempRet0; - $967 = $965 | $963; - $966 | $964; - $968 = $967&255; - HEAP8[$39>>0] = $968; - $969 = (_bitshift64Lshr(($856|0),($857|0),5)|0); - $970 = tempRet0; - $971 = $969&255; - $972 = (($s) + 19|0); - HEAP8[$972>>0] = $971; - $973 = (_bitshift64Lshr(($856|0),($857|0),13)|0); - $974 = tempRet0; - $975 = $973&255; - $976 = (($s) + 20|0); - HEAP8[$976>>0] = $975; - $977 = $864&255; - HEAP8[$45>>0] = $977; - $978 = (_bitshift64Lshr(($864|0),($865|0),8)|0); - $979 = tempRet0; - $980 = $978&255; - $981 = (($s) + 22|0); - HEAP8[$981>>0] = $980; - $982 = (_bitshift64Lshr(($864|0),($865|0),16)|0); - $983 = tempRet0; - $984 = (_bitshift64Shl(($872|0),($873|0),5)|0); - $985 = tempRet0; - $986 = $984 | $982; - $985 | $983; - $987 = $986&255; - HEAP8[$49>>0] = $987; - $988 = (_bitshift64Lshr(($872|0),($873|0),3)|0); - $989 = tempRet0; - $990 = $988&255; - $991 = (($s) + 24|0); - HEAP8[$991>>0] = $990; - $992 = (_bitshift64Lshr(($872|0),($873|0),11)|0); - $993 = tempRet0; - $994 = $992&255; - $995 = (($s) + 25|0); - HEAP8[$995>>0] = $994; - $996 = (_bitshift64Lshr(($872|0),($873|0),19)|0); - $997 = tempRet0; - $998 = (_bitshift64Shl(($880|0),($881|0),2)|0); - $999 = tempRet0; - $1000 = $998 | $996; - $999 | $997; - $1001 = $1000&255; - HEAP8[$55>>0] = $1001; - $1002 = (_bitshift64Lshr(($880|0),($881|0),6)|0); - $1003 = tempRet0; - $1004 = $1002&255; - $1005 = (($s) + 27|0); - HEAP8[$1005>>0] = $1004; - $1006 = (_bitshift64Lshr(($880|0),($881|0),14)|0); - $1007 = tempRet0; - $1008 = (_bitshift64Shl(($876|0),($877|0),7)|0); - $1009 = tempRet0; - $1010 = $1006 | $1008; - $1007 | $1009; - $1011 = $1010&255; - HEAP8[$61>>0] = $1011; - $1012 = (_bitshift64Lshr(($876|0),($877|0),1)|0); - $1013 = tempRet0; - $1014 = $1012&255; - $1015 = (($s) + 29|0); - HEAP8[$1015>>0] = $1014; - $1016 = (_bitshift64Lshr(($876|0),($877|0),9)|0); - $1017 = tempRet0; - $1018 = $1016&255; - $1019 = (($s) + 30|0); - HEAP8[$1019>>0] = $1018; - $1020 = (_bitshift64Lshr(($876|0),($877|0),17)|0); - $1021 = tempRet0; - $1022 = $1020&255; - HEAP8[$67>>0] = $1022; - STACKTOP = sp;return; -} -function _load_351($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); -} -function _load_452($in) { - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$in>>0]|0; - $1 = $0&255; - $2 = (($in) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (_bitshift64Shl(($4|0),0,8)|0); - $6 = tempRet0; - $7 = $5 | $1; - $8 = (($in) + 2|0); - $9 = HEAP8[$8>>0]|0; - $10 = $9&255; - $11 = (_bitshift64Shl(($10|0),0,16)|0); - $12 = tempRet0; - $13 = $7 | $11; - $14 = $6 | $12; - $15 = (($in) + 3|0); - $16 = HEAP8[$15>>0]|0; - $17 = $16&255; - $18 = (_bitshift64Shl(($17|0),0,24)|0); - $19 = tempRet0; - $20 = $13 | $18; - $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); -} -function _sph_sha512_init($cc) { - $cc = $cc|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - $0 = (($cc) + 128|0); - dest=$0+0|0; src=31840+0|0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $1 = (($cc) + 192|0); - $2 = $1; - $3 = $2; - HEAP32[$3>>2] = 0; - $4 = (($2) + 4)|0; - $5 = $4; - HEAP32[$5>>2] = 0; - STACKTOP = sp;return; -} -function _sph_sha384($cc,$data,$len) { - $cc = $cc|0; - $data = $data|0; - $len = $len|0; - var $$01$ = 0, $$012 = 0, $$03 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $current$04 = 0, $current$1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($cc) + 192|0); - $1 = ($len|0)==(0); - if ($1) { - STACKTOP = sp;return; - } - $2 = $0; - $3 = $2; - $4 = HEAP32[$3>>2]|0; - $5 = (($2) + 4)|0; - $6 = $5; - $7 = HEAP32[$6>>2]|0; - $8 = $4 & 127; - $9 = (($cc) + 128|0); - $$012 = $len;$$03 = $data;$current$04 = $8; - while(1) { - $10 = (128 - ($current$04))|0; - $11 = ($10>>>0)>($$012>>>0); - $$01$ = $11 ? $$012 : $10; - $12 = (($cc) + ($current$04)|0); - _memcpy(($12|0),($$03|0),($$01$|0))|0; - $13 = (($$03) + ($$01$)|0); - $14 = (($$01$) + ($current$04))|0; - $15 = (($$012) - ($$01$))|0; - $16 = ($14|0)==(128); - if ($16) { - _sha3_round($cc,$9); - $current$1 = 0; - } else { - $current$1 = $14; - } - $17 = $0; - $18 = $17; - $19 = HEAP32[$18>>2]|0; - $20 = (($17) + 4)|0; - $21 = $20; - $22 = HEAP32[$21>>2]|0; - $23 = (_i64Add(($19|0),($22|0),($$01$|0),0)|0); - $24 = tempRet0; - $25 = $0; - $26 = $25; - HEAP32[$26>>2] = $23; - $27 = (($25) + 4)|0; - $28 = $27; - HEAP32[$28>>2] = $24; - $29 = ($$012|0)==($$01$|0); - if ($29) { - break; - } else { - $$012 = $15;$$03 = $13;$current$04 = $current$1; - } - } - STACKTOP = sp;return; -} -function _sph_sha512_close($cc,$dst) { - $cc = $cc|0; - $dst = $dst|0; - var label = 0, sp = 0; - sp = STACKTOP; - _sha384_close($cc,$dst,8); - _sph_sha512_init($cc); - STACKTOP = sp;return; -} -function _sha3_round($data,$r) { - $data = $data|0; - $r = $r|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; - var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; - var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; - var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; - var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; - var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; - var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; - var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; - var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; - var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0; - var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0; - var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0; - var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0; - var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0; - var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0; - var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0; - var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0; - var $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0; - var $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0; - var $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0; - var $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0; - var $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0; - var $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0; - var $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0; - var $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0; - var $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0; - var $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0; - var $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0; - var $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0; - var $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0; - var $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0; - var $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0; - var $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0; - var $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0; - var $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0; - var $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0; - var $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0; - var $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0; - var $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $W = 0, $exitcond = 0, $exitcond19 = 0, $i$011 = 0, $i$110 = 0, $i$29 = 0; - var label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 640|0; - $W = sp; - $i$011 = 0; - while(1) { - $0 = $i$011 << 3; - $1 = (($data) + ($0)|0); - $2 = (_sph_dec64be_aligned($1)|0); - $3 = tempRet0; - $4 = (($W) + ($i$011<<3)|0); - $5 = $4; - $6 = $5; - HEAP32[$6>>2] = $2; - $7 = (($5) + 4)|0; - $8 = $7; - HEAP32[$8>>2] = $3; - $9 = (($i$011) + 1)|0; - $exitcond19 = ($9|0)==(16); - if ($exitcond19) { - $i$110 = 16; - break; - } else { - $i$011 = $9; - } - } - while(1) { - $10 = (($i$110) + -2)|0; - $11 = (($W) + ($10<<3)|0); - $12 = $11; - $13 = $12; - $14 = HEAP32[$13>>2]|0; - $15 = (($12) + 4)|0; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = (_bitshift64Shl(($14|0),($17|0),45)|0); - $19 = tempRet0; - $20 = (_bitshift64Lshr(($14|0),($17|0),19)|0); - $21 = tempRet0; - $22 = $18 | $20; - $23 = $19 | $21; - $24 = (_bitshift64Shl(($14|0),($17|0),3)|0); - $25 = tempRet0; - $26 = (_bitshift64Lshr(($14|0),($17|0),61)|0); - $27 = tempRet0; - $28 = $24 | $26; - $29 = $25 | $27; - $30 = (_bitshift64Lshr(($14|0),($17|0),6)|0); - $31 = tempRet0; - $32 = $28 ^ $30; - $33 = $29 ^ $31; - $34 = $32 ^ $22; - $35 = $33 ^ $23; - $36 = (($i$110) + -7)|0; - $37 = (($W) + ($36<<3)|0); - $38 = $37; - $39 = $38; - $40 = HEAP32[$39>>2]|0; - $41 = (($38) + 4)|0; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (($i$110) + -15)|0; - $45 = (($W) + ($44<<3)|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_bitshift64Shl(($48|0),($51|0),63)|0); - $53 = tempRet0; - $54 = (_bitshift64Lshr(($48|0),($51|0),1)|0); - $55 = tempRet0; - $56 = $52 | $54; - $57 = $53 | $55; - $58 = (_bitshift64Shl(($48|0),($51|0),56)|0); - $59 = tempRet0; - $60 = (_bitshift64Lshr(($48|0),($51|0),8)|0); - $61 = tempRet0; - $62 = $58 | $60; - $63 = $59 | $61; - $64 = (_bitshift64Lshr(($48|0),($51|0),7)|0); - $65 = tempRet0; - $66 = $62 ^ $64; - $67 = $63 ^ $65; - $68 = $66 ^ $56; - $69 = $67 ^ $57; - $70 = (($i$110) + -16)|0; - $71 = (($W) + ($70<<3)|0); - $72 = $71; - $73 = $72; - $74 = HEAP32[$73>>2]|0; - $75 = (($72) + 4)|0; - $76 = $75; - $77 = HEAP32[$76>>2]|0; - $78 = (_i64Add(($74|0),($77|0),($40|0),($43|0))|0); - $79 = tempRet0; - $80 = (_i64Add(($78|0),($79|0),($34|0),($35|0))|0); - $81 = tempRet0; - $82 = (_i64Add(($80|0),($81|0),($68|0),($69|0))|0); - $83 = tempRet0; - $84 = (($W) + ($i$110<<3)|0); - $85 = $84; - $86 = $85; - HEAP32[$86>>2] = $82; - $87 = (($85) + 4)|0; - $88 = $87; - HEAP32[$88>>2] = $83; - $89 = (($i$110) + 1)|0; - $exitcond = ($89|0)==(80); - if ($exitcond) { - break; - } else { - $i$110 = $89; - } - } - $90 = $r; - $91 = $90; - $92 = HEAP32[$91>>2]|0; - $93 = (($90) + 4)|0; - $94 = $93; - $95 = HEAP32[$94>>2]|0; - $96 = (($r) + 8|0); - $97 = $96; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (($97) + 4)|0; - $101 = $100; - $102 = HEAP32[$101>>2]|0; - $103 = (($r) + 16|0); - $104 = $103; - $105 = $104; - $106 = HEAP32[$105>>2]|0; - $107 = (($104) + 4)|0; - $108 = $107; - $109 = HEAP32[$108>>2]|0; - $110 = (($r) + 24|0); - $111 = $110; - $112 = $111; - $113 = HEAP32[$112>>2]|0; - $114 = (($111) + 4)|0; - $115 = $114; - $116 = HEAP32[$115>>2]|0; - $117 = (($r) + 32|0); - $118 = $117; - $119 = $118; - $120 = HEAP32[$119>>2]|0; - $121 = (($118) + 4)|0; - $122 = $121; - $123 = HEAP32[$122>>2]|0; - $124 = (($r) + 40|0); - $125 = $124; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (($125) + 4)|0; - $129 = $128; - $130 = HEAP32[$129>>2]|0; - $131 = (($r) + 48|0); - $132 = $131; - $133 = $132; - $134 = HEAP32[$133>>2]|0; - $135 = (($132) + 4)|0; - $136 = $135; - $137 = HEAP32[$136>>2]|0; - $138 = (($r) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = $120;$146 = $123;$170 = $134;$171 = $127;$173 = $137;$174 = $130;$193 = $141;$194 = $144;$203 = $92;$204 = $95;$228 = $99;$230 = $102;$234 = $106;$236 = $109;$241 = $113;$242 = $116;$i$29 = 0; - while(1) { - $147 = (_bitshift64Shl(($145|0),($146|0),50)|0); - $148 = tempRet0; - $149 = (_bitshift64Lshr(($145|0),($146|0),14)|0); - $150 = tempRet0; - $151 = $147 | $149; - $152 = $148 | $150; - $153 = (_bitshift64Shl(($145|0),($146|0),46)|0); - $154 = tempRet0; - $155 = (_bitshift64Lshr(($145|0),($146|0),18)|0); - $156 = tempRet0; - $157 = $153 | $155; - $158 = $154 | $156; - $159 = $151 ^ $157; - $160 = $152 ^ $158; - $161 = (_bitshift64Shl(($145|0),($146|0),23)|0); - $162 = tempRet0; - $163 = (_bitshift64Lshr(($145|0),($146|0),41)|0); - $164 = tempRet0; - $165 = $161 | $163; - $166 = $162 | $164; - $167 = $159 ^ $165; - $168 = $160 ^ $166; - $169 = $171 ^ $170; - $172 = $174 ^ $173; - $175 = $169 & $145; - $176 = $172 & $146; - $177 = $175 ^ $170; - $178 = $176 ^ $173; - $179 = (31904 + ($i$29<<3)|0); - $180 = $179; - $181 = $180; - $182 = HEAP32[$181>>2]|0; - $183 = (($180) + 4)|0; - $184 = $183; - $185 = HEAP32[$184>>2]|0; - $186 = (($W) + ($i$29<<3)|0); - $187 = $186; - $188 = $187; - $189 = HEAP32[$188>>2]|0; - $190 = (($187) + 4)|0; - $191 = $190; - $192 = HEAP32[$191>>2]|0; - $195 = (_i64Add(($177|0),($178|0),($193|0),($194|0))|0); - $196 = tempRet0; - $197 = (_i64Add(($195|0),($196|0),($167|0),($168|0))|0); - $198 = tempRet0; - $199 = (_i64Add(($197|0),($198|0),($182|0),($185|0))|0); - $200 = tempRet0; - $201 = (_i64Add(($199|0),($200|0),($189|0),($192|0))|0); - $202 = tempRet0; - $205 = (_bitshift64Shl(($203|0),($204|0),36)|0); - $206 = tempRet0; - $207 = (_bitshift64Lshr(($203|0),($204|0),28)|0); - $208 = tempRet0; - $209 = $205 | $207; - $210 = $206 | $208; - $211 = (_bitshift64Shl(($203|0),($204|0),30)|0); - $212 = tempRet0; - $213 = (_bitshift64Lshr(($203|0),($204|0),34)|0); - $214 = tempRet0; - $215 = $211 | $213; - $216 = $212 | $214; - $217 = $209 ^ $215; - $218 = $210 ^ $216; - $219 = (_bitshift64Shl(($203|0),($204|0),25)|0); - $220 = tempRet0; - $221 = (_bitshift64Lshr(($203|0),($204|0),39)|0); - $222 = tempRet0; - $223 = $219 | $221; - $224 = $220 | $222; - $225 = $217 ^ $223; - $226 = $218 ^ $224; - $227 = $203 & $228; - $229 = $204 & $230; - $231 = $203 | $228; - $232 = $204 | $230; - $233 = $231 & $234; - $235 = $232 & $236; - $237 = $233 | $227; - $238 = $235 | $229; - $239 = (_i64Add(($225|0),($226|0),($237|0),($238|0))|0); - $240 = tempRet0; - $243 = (_i64Add(($201|0),($202|0),($241|0),($242|0))|0); - $244 = tempRet0; - $245 = (_i64Add(($239|0),($240|0),($201|0),($202|0))|0); - $246 = tempRet0; - $247 = (_bitshift64Shl(($243|0),($244|0),50)|0); - $248 = tempRet0; - $249 = (_bitshift64Lshr(($243|0),($244|0),14)|0); - $250 = tempRet0; - $251 = $247 | $249; - $252 = $248 | $250; - $253 = (_bitshift64Shl(($243|0),($244|0),46)|0); - $254 = tempRet0; - $255 = (_bitshift64Lshr(($243|0),($244|0),18)|0); - $256 = tempRet0; - $257 = $253 | $255; - $258 = $254 | $256; - $259 = $251 ^ $257; - $260 = $252 ^ $258; - $261 = (_bitshift64Shl(($243|0),($244|0),23)|0); - $262 = tempRet0; - $263 = (_bitshift64Lshr(($243|0),($244|0),41)|0); - $264 = tempRet0; - $265 = $261 | $263; - $266 = $262 | $264; - $267 = $259 ^ $265; - $268 = $260 ^ $266; - $269 = $145 ^ $171; - $270 = $146 ^ $174; - $271 = $243 & $269; - $272 = $244 & $270; - $273 = $271 ^ $171; - $274 = $272 ^ $174; - $275 = $i$29 | 1; - $276 = (31904 + ($275<<3)|0); - $277 = $276; - $278 = $277; - $279 = HEAP32[$278>>2]|0; - $280 = (($277) + 4)|0; - $281 = $280; - $282 = HEAP32[$281>>2]|0; - $283 = (($W) + ($275<<3)|0); - $284 = $283; - $285 = $284; - $286 = HEAP32[$285>>2]|0; - $287 = (($284) + 4)|0; - $288 = $287; - $289 = HEAP32[$288>>2]|0; - $290 = (_i64Add(($279|0),($282|0),($170|0),($173|0))|0); - $291 = tempRet0; - $292 = (_i64Add(($290|0),($291|0),($286|0),($289|0))|0); - $293 = tempRet0; - $294 = (_i64Add(($292|0),($293|0),($273|0),($274|0))|0); - $295 = tempRet0; - $296 = (_i64Add(($294|0),($295|0),($267|0),($268|0))|0); - $297 = tempRet0; - $298 = (_bitshift64Shl(($245|0),($246|0),36)|0); - $299 = tempRet0; - $300 = (_bitshift64Lshr(($245|0),($246|0),28)|0); - $301 = tempRet0; - $302 = $298 | $300; - $303 = $299 | $301; - $304 = (_bitshift64Shl(($245|0),($246|0),30)|0); - $305 = tempRet0; - $306 = (_bitshift64Lshr(($245|0),($246|0),34)|0); - $307 = tempRet0; - $308 = $304 | $306; - $309 = $305 | $307; - $310 = $302 ^ $308; - $311 = $303 ^ $309; - $312 = (_bitshift64Shl(($245|0),($246|0),25)|0); - $313 = tempRet0; - $314 = (_bitshift64Lshr(($245|0),($246|0),39)|0); - $315 = tempRet0; - $316 = $312 | $314; - $317 = $313 | $315; - $318 = $310 ^ $316; - $319 = $311 ^ $317; - $320 = $245 & $203; - $321 = $246 & $204; - $322 = $245 | $203; - $323 = $246 | $204; - $324 = $322 & $228; - $325 = $323 & $230; - $326 = $324 | $320; - $327 = $325 | $321; - $328 = (_i64Add(($318|0),($319|0),($326|0),($327|0))|0); - $329 = tempRet0; - $330 = (_i64Add(($296|0),($297|0),($234|0),($236|0))|0); - $331 = tempRet0; - $332 = (_i64Add(($328|0),($329|0),($296|0),($297|0))|0); - $333 = tempRet0; - $334 = (_bitshift64Shl(($330|0),($331|0),50)|0); - $335 = tempRet0; - $336 = (_bitshift64Lshr(($330|0),($331|0),14)|0); - $337 = tempRet0; - $338 = $334 | $336; - $339 = $335 | $337; - $340 = (_bitshift64Shl(($330|0),($331|0),46)|0); - $341 = tempRet0; - $342 = (_bitshift64Lshr(($330|0),($331|0),18)|0); - $343 = tempRet0; - $344 = $340 | $342; - $345 = $341 | $343; - $346 = $338 ^ $344; - $347 = $339 ^ $345; - $348 = (_bitshift64Shl(($330|0),($331|0),23)|0); - $349 = tempRet0; - $350 = (_bitshift64Lshr(($330|0),($331|0),41)|0); - $351 = tempRet0; - $352 = $348 | $350; - $353 = $349 | $351; - $354 = $346 ^ $352; - $355 = $347 ^ $353; - $356 = $243 ^ $145; - $357 = $244 ^ $146; - $358 = $330 & $356; - $359 = $331 & $357; - $360 = $358 ^ $145; - $361 = $359 ^ $146; - $362 = $i$29 | 2; - $363 = (31904 + ($362<<3)|0); - $364 = $363; - $365 = $364; - $366 = HEAP32[$365>>2]|0; - $367 = (($364) + 4)|0; - $368 = $367; - $369 = HEAP32[$368>>2]|0; - $370 = (($W) + ($362<<3)|0); - $371 = $370; - $372 = $371; - $373 = HEAP32[$372>>2]|0; - $374 = (($371) + 4)|0; - $375 = $374; - $376 = HEAP32[$375>>2]|0; - $377 = (_i64Add(($366|0),($369|0),($171|0),($174|0))|0); - $378 = tempRet0; - $379 = (_i64Add(($377|0),($378|0),($373|0),($376|0))|0); - $380 = tempRet0; - $381 = (_i64Add(($379|0),($380|0),($360|0),($361|0))|0); - $382 = tempRet0; - $383 = (_i64Add(($381|0),($382|0),($354|0),($355|0))|0); - $384 = tempRet0; - $385 = (_bitshift64Shl(($332|0),($333|0),36)|0); - $386 = tempRet0; - $387 = (_bitshift64Lshr(($332|0),($333|0),28)|0); - $388 = tempRet0; - $389 = $385 | $387; - $390 = $386 | $388; - $391 = (_bitshift64Shl(($332|0),($333|0),30)|0); - $392 = tempRet0; - $393 = (_bitshift64Lshr(($332|0),($333|0),34)|0); - $394 = tempRet0; - $395 = $391 | $393; - $396 = $392 | $394; - $397 = $389 ^ $395; - $398 = $390 ^ $396; - $399 = (_bitshift64Shl(($332|0),($333|0),25)|0); - $400 = tempRet0; - $401 = (_bitshift64Lshr(($332|0),($333|0),39)|0); - $402 = tempRet0; - $403 = $399 | $401; - $404 = $400 | $402; - $405 = $397 ^ $403; - $406 = $398 ^ $404; - $407 = $332 & $245; - $408 = $333 & $246; - $409 = $332 | $245; - $410 = $333 | $246; - $411 = $409 & $203; - $412 = $410 & $204; - $413 = $411 | $407; - $414 = $412 | $408; - $415 = (_i64Add(($405|0),($406|0),($413|0),($414|0))|0); - $416 = tempRet0; - $417 = (_i64Add(($383|0),($384|0),($228|0),($230|0))|0); - $418 = tempRet0; - $419 = (_i64Add(($415|0),($416|0),($383|0),($384|0))|0); - $420 = tempRet0; - $421 = (_bitshift64Shl(($417|0),($418|0),50)|0); - $422 = tempRet0; - $423 = (_bitshift64Lshr(($417|0),($418|0),14)|0); - $424 = tempRet0; - $425 = $421 | $423; - $426 = $422 | $424; - $427 = (_bitshift64Shl(($417|0),($418|0),46)|0); - $428 = tempRet0; - $429 = (_bitshift64Lshr(($417|0),($418|0),18)|0); - $430 = tempRet0; - $431 = $427 | $429; - $432 = $428 | $430; - $433 = $425 ^ $431; - $434 = $426 ^ $432; - $435 = (_bitshift64Shl(($417|0),($418|0),23)|0); - $436 = tempRet0; - $437 = (_bitshift64Lshr(($417|0),($418|0),41)|0); - $438 = tempRet0; - $439 = $435 | $437; - $440 = $436 | $438; - $441 = $433 ^ $439; - $442 = $434 ^ $440; - $443 = $330 ^ $243; - $444 = $331 ^ $244; - $445 = $417 & $443; - $446 = $418 & $444; - $447 = $445 ^ $243; - $448 = $446 ^ $244; - $449 = $i$29 | 3; - $450 = (31904 + ($449<<3)|0); - $451 = $450; - $452 = $451; - $453 = HEAP32[$452>>2]|0; - $454 = (($451) + 4)|0; - $455 = $454; - $456 = HEAP32[$455>>2]|0; - $457 = (($W) + ($449<<3)|0); - $458 = $457; - $459 = $458; - $460 = HEAP32[$459>>2]|0; - $461 = (($458) + 4)|0; - $462 = $461; - $463 = HEAP32[$462>>2]|0; - $464 = (_i64Add(($453|0),($456|0),($145|0),($146|0))|0); - $465 = tempRet0; - $466 = (_i64Add(($464|0),($465|0),($460|0),($463|0))|0); - $467 = tempRet0; - $468 = (_i64Add(($466|0),($467|0),($447|0),($448|0))|0); - $469 = tempRet0; - $470 = (_i64Add(($468|0),($469|0),($441|0),($442|0))|0); - $471 = tempRet0; - $472 = (_bitshift64Shl(($419|0),($420|0),36)|0); - $473 = tempRet0; - $474 = (_bitshift64Lshr(($419|0),($420|0),28)|0); - $475 = tempRet0; - $476 = $472 | $474; - $477 = $473 | $475; - $478 = (_bitshift64Shl(($419|0),($420|0),30)|0); - $479 = tempRet0; - $480 = (_bitshift64Lshr(($419|0),($420|0),34)|0); - $481 = tempRet0; - $482 = $478 | $480; - $483 = $479 | $481; - $484 = $476 ^ $482; - $485 = $477 ^ $483; - $486 = (_bitshift64Shl(($419|0),($420|0),25)|0); - $487 = tempRet0; - $488 = (_bitshift64Lshr(($419|0),($420|0),39)|0); - $489 = tempRet0; - $490 = $486 | $488; - $491 = $487 | $489; - $492 = $484 ^ $490; - $493 = $485 ^ $491; - $494 = $419 & $332; - $495 = $420 & $333; - $496 = $419 | $332; - $497 = $420 | $333; - $498 = $496 & $245; - $499 = $497 & $246; - $500 = $498 | $494; - $501 = $499 | $495; - $502 = (_i64Add(($492|0),($493|0),($500|0),($501|0))|0); - $503 = tempRet0; - $504 = (_i64Add(($470|0),($471|0),($203|0),($204|0))|0); - $505 = tempRet0; - $506 = (_i64Add(($502|0),($503|0),($470|0),($471|0))|0); - $507 = tempRet0; - $508 = (_bitshift64Shl(($504|0),($505|0),50)|0); - $509 = tempRet0; - $510 = (_bitshift64Lshr(($504|0),($505|0),14)|0); - $511 = tempRet0; - $512 = $508 | $510; - $513 = $509 | $511; - $514 = (_bitshift64Shl(($504|0),($505|0),46)|0); - $515 = tempRet0; - $516 = (_bitshift64Lshr(($504|0),($505|0),18)|0); - $517 = tempRet0; - $518 = $514 | $516; - $519 = $515 | $517; - $520 = $512 ^ $518; - $521 = $513 ^ $519; - $522 = (_bitshift64Shl(($504|0),($505|0),23)|0); - $523 = tempRet0; - $524 = (_bitshift64Lshr(($504|0),($505|0),41)|0); - $525 = tempRet0; - $526 = $522 | $524; - $527 = $523 | $525; - $528 = $520 ^ $526; - $529 = $521 ^ $527; - $530 = $417 ^ $330; - $531 = $418 ^ $331; - $532 = $504 & $530; - $533 = $505 & $531; - $534 = $532 ^ $330; - $535 = $533 ^ $331; - $536 = $i$29 | 4; - $537 = (31904 + ($536<<3)|0); - $538 = $537; - $539 = $538; - $540 = HEAP32[$539>>2]|0; - $541 = (($538) + 4)|0; - $542 = $541; - $543 = HEAP32[$542>>2]|0; - $544 = (($W) + ($536<<3)|0); - $545 = $544; - $546 = $545; - $547 = HEAP32[$546>>2]|0; - $548 = (($545) + 4)|0; - $549 = $548; - $550 = HEAP32[$549>>2]|0; - $551 = (_i64Add(($540|0),($543|0),($243|0),($244|0))|0); - $552 = tempRet0; - $553 = (_i64Add(($551|0),($552|0),($547|0),($550|0))|0); - $554 = tempRet0; - $555 = (_i64Add(($553|0),($554|0),($534|0),($535|0))|0); - $556 = tempRet0; - $557 = (_i64Add(($555|0),($556|0),($528|0),($529|0))|0); - $558 = tempRet0; - $559 = (_bitshift64Shl(($506|0),($507|0),36)|0); - $560 = tempRet0; - $561 = (_bitshift64Lshr(($506|0),($507|0),28)|0); - $562 = tempRet0; - $563 = $559 | $561; - $564 = $560 | $562; - $565 = (_bitshift64Shl(($506|0),($507|0),30)|0); - $566 = tempRet0; - $567 = (_bitshift64Lshr(($506|0),($507|0),34)|0); - $568 = tempRet0; - $569 = $565 | $567; - $570 = $566 | $568; - $571 = $563 ^ $569; - $572 = $564 ^ $570; - $573 = (_bitshift64Shl(($506|0),($507|0),25)|0); - $574 = tempRet0; - $575 = (_bitshift64Lshr(($506|0),($507|0),39)|0); - $576 = tempRet0; - $577 = $573 | $575; - $578 = $574 | $576; - $579 = $571 ^ $577; - $580 = $572 ^ $578; - $581 = $506 & $419; - $582 = $507 & $420; - $583 = $506 | $419; - $584 = $507 | $420; - $585 = $583 & $332; - $586 = $584 & $333; - $587 = $585 | $581; - $588 = $586 | $582; - $589 = (_i64Add(($579|0),($580|0),($587|0),($588|0))|0); - $590 = tempRet0; - $591 = (_i64Add(($557|0),($558|0),($245|0),($246|0))|0); - $592 = tempRet0; - $593 = (_i64Add(($589|0),($590|0),($557|0),($558|0))|0); - $594 = tempRet0; - $595 = (_bitshift64Shl(($591|0),($592|0),50)|0); - $596 = tempRet0; - $597 = (_bitshift64Lshr(($591|0),($592|0),14)|0); - $598 = tempRet0; - $599 = $595 | $597; - $600 = $596 | $598; - $601 = (_bitshift64Shl(($591|0),($592|0),46)|0); - $602 = tempRet0; - $603 = (_bitshift64Lshr(($591|0),($592|0),18)|0); - $604 = tempRet0; - $605 = $601 | $603; - $606 = $602 | $604; - $607 = $599 ^ $605; - $608 = $600 ^ $606; - $609 = (_bitshift64Shl(($591|0),($592|0),23)|0); - $610 = tempRet0; - $611 = (_bitshift64Lshr(($591|0),($592|0),41)|0); - $612 = tempRet0; - $613 = $609 | $611; - $614 = $610 | $612; - $615 = $607 ^ $613; - $616 = $608 ^ $614; - $617 = $504 ^ $417; - $618 = $505 ^ $418; - $619 = $591 & $617; - $620 = $592 & $618; - $621 = $619 ^ $417; - $622 = $620 ^ $418; - $623 = $i$29 | 5; - $624 = (31904 + ($623<<3)|0); - $625 = $624; - $626 = $625; - $627 = HEAP32[$626>>2]|0; - $628 = (($625) + 4)|0; - $629 = $628; - $630 = HEAP32[$629>>2]|0; - $631 = (($W) + ($623<<3)|0); - $632 = $631; - $633 = $632; - $634 = HEAP32[$633>>2]|0; - $635 = (($632) + 4)|0; - $636 = $635; - $637 = HEAP32[$636>>2]|0; - $638 = (_i64Add(($627|0),($630|0),($330|0),($331|0))|0); - $639 = tempRet0; - $640 = (_i64Add(($638|0),($639|0),($634|0),($637|0))|0); - $641 = tempRet0; - $642 = (_i64Add(($640|0),($641|0),($621|0),($622|0))|0); - $643 = tempRet0; - $644 = (_i64Add(($642|0),($643|0),($615|0),($616|0))|0); - $645 = tempRet0; - $646 = (_bitshift64Shl(($593|0),($594|0),36)|0); - $647 = tempRet0; - $648 = (_bitshift64Lshr(($593|0),($594|0),28)|0); - $649 = tempRet0; - $650 = $646 | $648; - $651 = $647 | $649; - $652 = (_bitshift64Shl(($593|0),($594|0),30)|0); - $653 = tempRet0; - $654 = (_bitshift64Lshr(($593|0),($594|0),34)|0); - $655 = tempRet0; - $656 = $652 | $654; - $657 = $653 | $655; - $658 = $650 ^ $656; - $659 = $651 ^ $657; - $660 = (_bitshift64Shl(($593|0),($594|0),25)|0); - $661 = tempRet0; - $662 = (_bitshift64Lshr(($593|0),($594|0),39)|0); - $663 = tempRet0; - $664 = $660 | $662; - $665 = $661 | $663; - $666 = $658 ^ $664; - $667 = $659 ^ $665; - $668 = $593 & $506; - $669 = $594 & $507; - $670 = $593 | $506; - $671 = $594 | $507; - $672 = $670 & $419; - $673 = $671 & $420; - $674 = $672 | $668; - $675 = $673 | $669; - $676 = (_i64Add(($666|0),($667|0),($674|0),($675|0))|0); - $677 = tempRet0; - $678 = (_i64Add(($644|0),($645|0),($332|0),($333|0))|0); - $679 = tempRet0; - $680 = (_i64Add(($676|0),($677|0),($644|0),($645|0))|0); - $681 = tempRet0; - $682 = (_bitshift64Shl(($678|0),($679|0),50)|0); - $683 = tempRet0; - $684 = (_bitshift64Lshr(($678|0),($679|0),14)|0); - $685 = tempRet0; - $686 = $682 | $684; - $687 = $683 | $685; - $688 = (_bitshift64Shl(($678|0),($679|0),46)|0); - $689 = tempRet0; - $690 = (_bitshift64Lshr(($678|0),($679|0),18)|0); - $691 = tempRet0; - $692 = $688 | $690; - $693 = $689 | $691; - $694 = $686 ^ $692; - $695 = $687 ^ $693; - $696 = (_bitshift64Shl(($678|0),($679|0),23)|0); - $697 = tempRet0; - $698 = (_bitshift64Lshr(($678|0),($679|0),41)|0); - $699 = tempRet0; - $700 = $696 | $698; - $701 = $697 | $699; - $702 = $694 ^ $700; - $703 = $695 ^ $701; - $704 = $591 ^ $504; - $705 = $592 ^ $505; - $706 = $678 & $704; - $707 = $679 & $705; - $708 = $706 ^ $504; - $709 = $707 ^ $505; - $710 = $i$29 | 6; - $711 = (31904 + ($710<<3)|0); - $712 = $711; - $713 = $712; - $714 = HEAP32[$713>>2]|0; - $715 = (($712) + 4)|0; - $716 = $715; - $717 = HEAP32[$716>>2]|0; - $718 = (($W) + ($710<<3)|0); - $719 = $718; - $720 = $719; - $721 = HEAP32[$720>>2]|0; - $722 = (($719) + 4)|0; - $723 = $722; - $724 = HEAP32[$723>>2]|0; - $725 = (_i64Add(($721|0),($724|0),($714|0),($717|0))|0); - $726 = tempRet0; - $727 = (_i64Add(($725|0),($726|0),($417|0),($418|0))|0); - $728 = tempRet0; - $729 = (_i64Add(($727|0),($728|0),($708|0),($709|0))|0); - $730 = tempRet0; - $731 = (_i64Add(($729|0),($730|0),($702|0),($703|0))|0); - $732 = tempRet0; - $733 = (_bitshift64Shl(($680|0),($681|0),36)|0); - $734 = tempRet0; - $735 = (_bitshift64Lshr(($680|0),($681|0),28)|0); - $736 = tempRet0; - $737 = $733 | $735; - $738 = $734 | $736; - $739 = (_bitshift64Shl(($680|0),($681|0),30)|0); - $740 = tempRet0; - $741 = (_bitshift64Lshr(($680|0),($681|0),34)|0); - $742 = tempRet0; - $743 = $739 | $741; - $744 = $740 | $742; - $745 = $737 ^ $743; - $746 = $738 ^ $744; - $747 = (_bitshift64Shl(($680|0),($681|0),25)|0); - $748 = tempRet0; - $749 = (_bitshift64Lshr(($680|0),($681|0),39)|0); - $750 = tempRet0; - $751 = $747 | $749; - $752 = $748 | $750; - $753 = $745 ^ $751; - $754 = $746 ^ $752; - $755 = $680 & $593; - $756 = $681 & $594; - $757 = $680 | $593; - $758 = $681 | $594; - $759 = $757 & $506; - $760 = $758 & $507; - $761 = $759 | $755; - $762 = $760 | $756; - $763 = (_i64Add(($753|0),($754|0),($761|0),($762|0))|0); - $764 = tempRet0; - $765 = (_i64Add(($731|0),($732|0),($419|0),($420|0))|0); - $766 = tempRet0; - $767 = (_i64Add(($763|0),($764|0),($731|0),($732|0))|0); - $768 = tempRet0; - $769 = (_bitshift64Shl(($765|0),($766|0),50)|0); - $770 = tempRet0; - $771 = (_bitshift64Lshr(($765|0),($766|0),14)|0); - $772 = tempRet0; - $773 = $769 | $771; - $774 = $770 | $772; - $775 = (_bitshift64Shl(($765|0),($766|0),46)|0); - $776 = tempRet0; - $777 = (_bitshift64Lshr(($765|0),($766|0),18)|0); - $778 = tempRet0; - $779 = $775 | $777; - $780 = $776 | $778; - $781 = $773 ^ $779; - $782 = $774 ^ $780; - $783 = (_bitshift64Shl(($765|0),($766|0),23)|0); - $784 = tempRet0; - $785 = (_bitshift64Lshr(($765|0),($766|0),41)|0); - $786 = tempRet0; - $787 = $783 | $785; - $788 = $784 | $786; - $789 = $781 ^ $787; - $790 = $782 ^ $788; - $791 = $678 ^ $591; - $792 = $679 ^ $592; - $793 = $765 & $791; - $794 = $766 & $792; - $795 = $793 ^ $591; - $796 = $794 ^ $592; - $797 = $i$29 | 7; - $798 = (31904 + ($797<<3)|0); - $799 = $798; - $800 = $799; - $801 = HEAP32[$800>>2]|0; - $802 = (($799) + 4)|0; - $803 = $802; - $804 = HEAP32[$803>>2]|0; - $805 = (($W) + ($797<<3)|0); - $806 = $805; - $807 = $806; - $808 = HEAP32[$807>>2]|0; - $809 = (($806) + 4)|0; - $810 = $809; - $811 = HEAP32[$810>>2]|0; - $812 = (_i64Add(($808|0),($811|0),($801|0),($804|0))|0); - $813 = tempRet0; - $814 = (_i64Add(($812|0),($813|0),($504|0),($505|0))|0); - $815 = tempRet0; - $816 = (_i64Add(($814|0),($815|0),($795|0),($796|0))|0); - $817 = tempRet0; - $818 = (_i64Add(($816|0),($817|0),($789|0),($790|0))|0); - $819 = tempRet0; - $820 = (_bitshift64Shl(($767|0),($768|0),36)|0); - $821 = tempRet0; - $822 = (_bitshift64Lshr(($767|0),($768|0),28)|0); - $823 = tempRet0; - $824 = $820 | $822; - $825 = $821 | $823; - $826 = (_bitshift64Shl(($767|0),($768|0),30)|0); - $827 = tempRet0; - $828 = (_bitshift64Lshr(($767|0),($768|0),34)|0); - $829 = tempRet0; - $830 = $826 | $828; - $831 = $827 | $829; - $832 = $824 ^ $830; - $833 = $825 ^ $831; - $834 = (_bitshift64Shl(($767|0),($768|0),25)|0); - $835 = tempRet0; - $836 = (_bitshift64Lshr(($767|0),($768|0),39)|0); - $837 = tempRet0; - $838 = $834 | $836; - $839 = $835 | $837; - $840 = $832 ^ $838; - $841 = $833 ^ $839; - $842 = $767 & $680; - $843 = $768 & $681; - $844 = $767 | $680; - $845 = $768 | $681; - $846 = $844 & $593; - $847 = $845 & $594; - $848 = $846 | $842; - $849 = $847 | $843; - $850 = (_i64Add(($840|0),($841|0),($848|0),($849|0))|0); - $851 = tempRet0; - $852 = (_i64Add(($818|0),($819|0),($506|0),($507|0))|0); - $853 = tempRet0; - $854 = (_i64Add(($850|0),($851|0),($818|0),($819|0))|0); - $855 = tempRet0; - $856 = (($i$29) + 8)|0; - $857 = ($856|0)<(80); - if ($857) { - $145 = $852;$146 = $853;$170 = $678;$171 = $765;$173 = $679;$174 = $766;$193 = $591;$194 = $592;$203 = $854;$204 = $855;$228 = $767;$230 = $768;$234 = $680;$236 = $681;$241 = $593;$242 = $594;$i$29 = $856; - } else { - break; - } - } - $858 = $r; - $859 = $858; - $860 = HEAP32[$859>>2]|0; - $861 = (($858) + 4)|0; - $862 = $861; - $863 = HEAP32[$862>>2]|0; - $864 = (_i64Add(($860|0),($863|0),($854|0),($855|0))|0); - $865 = tempRet0; - $866 = $r; - $867 = $866; - HEAP32[$867>>2] = $864; - $868 = (($866) + 4)|0; - $869 = $868; - HEAP32[$869>>2] = $865; - $870 = $96; - $871 = $870; - $872 = HEAP32[$871>>2]|0; - $873 = (($870) + 4)|0; - $874 = $873; - $875 = HEAP32[$874>>2]|0; - $876 = (_i64Add(($872|0),($875|0),($767|0),($768|0))|0); - $877 = tempRet0; - $878 = $96; - $879 = $878; - HEAP32[$879>>2] = $876; - $880 = (($878) + 4)|0; - $881 = $880; - HEAP32[$881>>2] = $877; - $882 = $103; - $883 = $882; - $884 = HEAP32[$883>>2]|0; - $885 = (($882) + 4)|0; - $886 = $885; - $887 = HEAP32[$886>>2]|0; - $888 = (_i64Add(($884|0),($887|0),($680|0),($681|0))|0); - $889 = tempRet0; - $890 = $103; - $891 = $890; - HEAP32[$891>>2] = $888; - $892 = (($890) + 4)|0; - $893 = $892; - HEAP32[$893>>2] = $889; - $894 = $110; - $895 = $894; - $896 = HEAP32[$895>>2]|0; - $897 = (($894) + 4)|0; - $898 = $897; - $899 = HEAP32[$898>>2]|0; - $900 = (_i64Add(($896|0),($899|0),($593|0),($594|0))|0); - $901 = tempRet0; - $902 = $110; - $903 = $902; - HEAP32[$903>>2] = $900; - $904 = (($902) + 4)|0; - $905 = $904; - HEAP32[$905>>2] = $901; - $906 = $117; - $907 = $906; - $908 = HEAP32[$907>>2]|0; - $909 = (($906) + 4)|0; - $910 = $909; - $911 = HEAP32[$910>>2]|0; - $912 = (_i64Add(($908|0),($911|0),($852|0),($853|0))|0); - $913 = tempRet0; - $914 = $117; - $915 = $914; - HEAP32[$915>>2] = $912; - $916 = (($914) + 4)|0; - $917 = $916; - HEAP32[$917>>2] = $913; - $918 = $124; - $919 = $918; - $920 = HEAP32[$919>>2]|0; - $921 = (($918) + 4)|0; - $922 = $921; - $923 = HEAP32[$922>>2]|0; - $924 = (_i64Add(($920|0),($923|0),($765|0),($766|0))|0); - $925 = tempRet0; - $926 = $124; - $927 = $926; - HEAP32[$927>>2] = $924; - $928 = (($926) + 4)|0; - $929 = $928; - HEAP32[$929>>2] = $925; - $930 = $131; - $931 = $930; - $932 = HEAP32[$931>>2]|0; - $933 = (($930) + 4)|0; - $934 = $933; - $935 = HEAP32[$934>>2]|0; - $936 = (_i64Add(($932|0),($935|0),($678|0),($679|0))|0); - $937 = tempRet0; - $938 = $131; - $939 = $938; - HEAP32[$939>>2] = $936; - $940 = (($938) + 4)|0; - $941 = $940; - HEAP32[$941>>2] = $937; - $942 = $138; - $943 = $942; - $944 = HEAP32[$943>>2]|0; - $945 = (($942) + 4)|0; - $946 = $945; - $947 = HEAP32[$946>>2]|0; - $948 = (_i64Add(($944|0),($947|0),($591|0),($592|0))|0); - $949 = tempRet0; - $950 = $138; - $951 = $950; - HEAP32[$951>>2] = $948; - $952 = (($950) + 4)|0; - $953 = $952; - HEAP32[$953>>2] = $949; - STACKTOP = sp;return; -} -function _sha384_close($cc,$dst,$rnum) { - $cc = $cc|0; - $dst = $dst|0; - $rnum = $rnum|0; - var label = 0, sp = 0; - sp = STACKTOP; - _sha384_addbits_and_close($cc,0,0,$dst,$rnum); - STACKTOP = sp;return; -} -function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { - $cc = $cc|0; - $ub = $ub|0; - $n = $n|0; - $dst = $dst|0; - $rnum = $rnum|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $u$01 = 0, dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - $0 = (($cc) + 192|0); - $1 = $0; - $2 = $1; - $3 = HEAP32[$2>>2]|0; - $4 = (($1) + 4)|0; - $5 = $4; - $6 = HEAP32[$5>>2]|0; - $7 = $3 & 127; - $8 = 128 >>> $n; - $9 = (0 - ($8))|0; - $10 = $9 & $ub; - $11 = $10 | $8; - $12 = $11&255; - $13 = (($7) + 1)|0; - $14 = (($cc) + ($7)|0); - HEAP8[$14>>0] = $12; - $15 = ($13>>>0)>(112); - $16 = (($cc) + ($13)|0); - if ($15) { - $17 = $7 ^ 127; - _memset(($16|0),0,($17|0))|0; - $18 = (($cc) + 128|0); - _sha3_round($cc,$18); - dest=$cc+0|0; stop=dest+112|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); - } else { - $19 = (111 - ($7))|0; - _memset(($16|0),0,($19|0))|0; - } - $20 = (($cc) + 112|0); - $21 = $0; - $22 = $21; - $23 = HEAP32[$22>>2]|0; - $24 = (($21) + 4)|0; - $25 = $24; - $26 = HEAP32[$25>>2]|0; - $27 = (_bitshift64Lshr(($23|0),($26|0),61)|0); - $28 = tempRet0; - _sph_enc64be_aligned($20,$27,$28); - $29 = (($cc) + 120|0); - $30 = $0; - $31 = $30; - $32 = HEAP32[$31>>2]|0; - $33 = (($30) + 4)|0; - $34 = $33; - $35 = HEAP32[$34>>2]|0; - $36 = (_bitshift64Shl(($32|0),($35|0),3)|0); - $37 = tempRet0; - $38 = (_i64Add(($36|0),($37|0),($n|0),0)|0); - $39 = tempRet0; - _sph_enc64be_aligned($29,$38,$39); - $40 = (($cc) + 128|0); - _sha3_round($cc,$40); - $41 = ($rnum|0)==(0); - if ($41) { - STACKTOP = sp;return; - } else { - $u$01 = 0; - } - while(1) { - $42 = $u$01 << 3; - $43 = (($dst) + ($42)|0); - $44 = (($40) + ($u$01<<3)|0); - $45 = $44; - $46 = $45; - $47 = HEAP32[$46>>2]|0; - $48 = (($45) + 4)|0; - $49 = $48; - $50 = HEAP32[$49>>2]|0; - _sph_enc64be($43,$47,$50); - $51 = (($u$01) + 1)|0; - $exitcond = ($51|0)==($rnum|0); - if ($exitcond) { - break; - } else { - $u$01 = $51; - } - } - STACKTOP = sp;return; -} -function _sph_dec64be_aligned($src) { - $src = $src|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP8[$src>>0]|0; - $1 = $0&255; - $2 = (_bitshift64Shl(($1|0),0,56)|0); - $3 = tempRet0; - $4 = (($src) + 1|0); - $5 = HEAP8[$4>>0]|0; - $6 = $5&255; - $7 = (_bitshift64Shl(($6|0),0,48)|0); - $8 = tempRet0; - $9 = $7 | $2; - $10 = $8 | $3; - $11 = (($src) + 2|0); - $12 = HEAP8[$11>>0]|0; - $13 = $12&255; - $14 = (_bitshift64Shl(($13|0),0,40)|0); - $15 = tempRet0; - $16 = $9 | $14; - $17 = $10 | $15; - $18 = (($src) + 3|0); - $19 = HEAP8[$18>>0]|0; - $20 = $19&255; - $21 = $17 | $20; - $22 = (($src) + 4|0); - $23 = HEAP8[$22>>0]|0; - $24 = $23&255; - $25 = (_bitshift64Shl(($24|0),0,24)|0); - $26 = tempRet0; - $27 = $16 | $25; - $28 = $21 | $26; - $29 = (($src) + 5|0); - $30 = HEAP8[$29>>0]|0; - $31 = $30&255; - $32 = (_bitshift64Shl(($31|0),0,16)|0); - $33 = tempRet0; - $34 = $27 | $32; - $35 = $28 | $33; - $36 = (($src) + 6|0); - $37 = HEAP8[$36>>0]|0; - $38 = $37&255; - $39 = (_bitshift64Shl(($38|0),0,8)|0); - $40 = tempRet0; - $41 = $34 | $39; - $42 = $35 | $40; - $43 = (($src) + 7|0); - $44 = HEAP8[$43>>0]|0; - $45 = $44&255; - $46 = $41 | $45; - tempRet0 = $42; - STACKTOP = sp;return ($46|0); -} -function _sph_enc64be_aligned($dst,$0,$1) { - $dst = $dst|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); - $3 = tempRet0; - $4 = $2&255; - HEAP8[$dst>>0] = $4; - $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); - $6 = tempRet0; - $7 = $5&255; - $8 = (($dst) + 1|0); - HEAP8[$8>>0] = $7; - $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); - $10 = tempRet0; - $11 = $9&255; - $12 = (($dst) + 2|0); - HEAP8[$12>>0] = $11; - $13 = $1&255; - $14 = (($dst) + 3|0); - HEAP8[$14>>0] = $13; - $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); - $16 = tempRet0; - $17 = $15&255; - $18 = (($dst) + 4|0); - HEAP8[$18>>0] = $17; - $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); - $20 = tempRet0; - $21 = $19&255; - $22 = (($dst) + 5|0); - HEAP8[$22>>0] = $21; - $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); - $24 = tempRet0; - $25 = $23&255; - $26 = (($dst) + 6|0); - HEAP8[$26>>0] = $25; - $27 = $0&255; - $28 = (($dst) + 7|0); - HEAP8[$28>>0] = $27; - STACKTOP = sp;return; -} -function _sph_enc64be($dst,$0,$1) { - $dst = $dst|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); - $3 = tempRet0; - $4 = $2&255; - HEAP8[$dst>>0] = $4; - $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); - $6 = tempRet0; - $7 = $5&255; - $8 = (($dst) + 1|0); - HEAP8[$8>>0] = $7; - $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); - $10 = tempRet0; - $11 = $9&255; - $12 = (($dst) + 2|0); - HEAP8[$12>>0] = $11; - $13 = $1&255; - $14 = (($dst) + 3|0); - HEAP8[$14>>0] = $13; - $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); - $16 = tempRet0; - $17 = $15&255; - $18 = (($dst) + 4|0); - HEAP8[$18>>0] = $17; - $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); - $20 = tempRet0; - $21 = $19&255; - $22 = (($dst) + 5|0); - HEAP8[$22>>0] = $21; - $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); - $24 = tempRet0; - $25 = $23&255; - $26 = (($dst) + 6|0); - HEAP8[$26>>0] = $25; - $27 = $0&255; - $28 = (($dst) + 7|0); - HEAP8[$28>>0] = $27; - STACKTOP = sp;return; -} -function _malloc($bytes) { - $bytes = $bytes|0; - var $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i23$i = 0, $$pre$i25 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i24$iZ2D = 0, $$pre$phi$i26Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phi59$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre105 = 0, $$pre58$i$i = 0, $$rsize$0$i = 0, $$rsize$3$i = 0, $$sum = 0, $$sum$i$i = 0, $$sum$i$i$i = 0, $$sum$i12$i = 0, $$sum$i13$i = 0; - var $$sum$i16$i = 0, $$sum$i19$i = 0, $$sum$i2338 = 0, $$sum$i32 = 0, $$sum$i39 = 0, $$sum1 = 0, $$sum1$i = 0, $$sum1$i$i = 0, $$sum1$i14$i = 0, $$sum1$i20$i = 0, $$sum1$i24 = 0, $$sum10 = 0, $$sum10$i = 0, $$sum10$i$i = 0, $$sum10$pre$i$i = 0, $$sum102$i = 0, $$sum103$i = 0, $$sum104$i = 0, $$sum105$i = 0, $$sum106$i = 0; - var $$sum107$i = 0, $$sum108$i = 0, $$sum109$i = 0, $$sum11$i = 0, $$sum11$i$i = 0, $$sum11$i22$i = 0, $$sum110$i = 0, $$sum111$i = 0, $$sum1112 = 0, $$sum112$i = 0, $$sum113$i = 0, $$sum114$i = 0, $$sum115$i = 0, $$sum12$i = 0, $$sum12$i$i = 0, $$sum13$i = 0, $$sum13$i$i = 0, $$sum14$i$i = 0, $$sum14$pre$i = 0, $$sum15$i = 0; - var $$sum15$i$i = 0, $$sum16$i = 0, $$sum16$i$i = 0, $$sum17$i = 0, $$sum17$i$i = 0, $$sum18$i = 0, $$sum1819$i$i = 0, $$sum2 = 0, $$sum2$i = 0, $$sum2$i$i = 0, $$sum2$i$i$i = 0, $$sum2$i15$i = 0, $$sum2$i17$i = 0, $$sum2$i21$i = 0, $$sum2$pre$i = 0, $$sum20$i$i = 0, $$sum21$i$i = 0, $$sum22$i$i = 0, $$sum23$i$i = 0, $$sum24$i$i = 0; - var $$sum25$i$i = 0, $$sum26$pre$i$i = 0, $$sum27$i$i = 0, $$sum28$i$i = 0, $$sum29$i$i = 0, $$sum3$i = 0, $$sum3$i$i = 0, $$sum3$i27 = 0, $$sum30$i$i = 0, $$sum3132$i$i = 0, $$sum34$i$i = 0, $$sum3536$i$i = 0, $$sum3738$i$i = 0, $$sum39$i$i = 0, $$sum4 = 0, $$sum4$i = 0, $$sum4$i28 = 0, $$sum40$i$i = 0, $$sum41$i$i = 0, $$sum42$i$i = 0; - var $$sum5$i = 0, $$sum5$i$i = 0, $$sum56 = 0, $$sum6$i = 0, $$sum67$i$i = 0, $$sum7$i = 0, $$sum8$i = 0, $$sum8$pre = 0, $$sum9 = 0, $$sum9$i = 0, $$sum9$i$i = 0, $$tsize$1$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0; - var $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0; - var $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0; - var $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0; - var $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $108 = 0; - var $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0; - var $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0; - var $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0; - var $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0; - var $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0; - var $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0; - var $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0; - var $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0; - var $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0; - var $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0; - var $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0; - var $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0; - var $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0; - var $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0; - var $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0; - var $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0; - var $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0; - var $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0; - var $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0; - var $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0; - var $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0; - var $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0; - var $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0; - var $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0; - var $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0; - var $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0; - var $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0; - var $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0; - var $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0; - var $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0; - var $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0; - var $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0; - var $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0; - var $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0; - var $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0; - var $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0; - var $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0; - var $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0; - var $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0; - var $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0; - var $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0; - var $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0; - var $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0; - var $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0; - var $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0; - var $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0; - var $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0; - var $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0; - var $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0; - var $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0, $F5$0$i = 0, $I1$0$c$i$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$027$i = 0, $K2$015$i$i = 0, $K8$053$i$i = 0; - var $R$0$i = 0, $R$0$i$i = 0, $R$0$i18 = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i20 = 0, $RP$0$i = 0, $RP$0$i$i = 0, $RP$0$i17 = 0, $T$0$lcssa$i = 0, $T$0$lcssa$i$i = 0, $T$0$lcssa$i26$i = 0, $T$014$i$i = 0, $T$026$i = 0, $T$052$i$i = 0, $br$0$i = 0, $br$030$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i21 = 0; - var $exitcond$i$i = 0, $i$02$i$i = 0, $idx$0$i = 0, $mem$0 = 0, $nb$0 = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i$i = 0, $or$cond$i27$i = 0, $or$cond$i29 = 0, $or$cond1$i = 0, $or$cond19$i = 0, $or$cond2$i = 0, $or$cond24$i = 0, $or$cond3$i = 0, $or$cond4$i = 0, $or$cond47$i = 0, $or$cond5$i = 0, $or$cond6$i = 0, $or$cond8$i = 0; - var $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i15 = 0, $rsize$1$i = 0, $rsize$2$i = 0, $rsize$3$lcssa$i = 0, $rsize$331$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$073$i = 0, $sp$166$i = 0, $ssize$0$i = 0, $ssize$1$i = 0, $ssize$129$i = 0, $ssize$2$i = 0, $t$0$i = 0, $t$0$i14 = 0; - var $t$1$i = 0, $t$2$ph$i = 0, $t$2$v$3$i = 0, $t$230$i = 0, $tbase$245$i = 0, $tsize$03141$i = 0, $tsize$1$i = 0, $tsize$244$i = 0, $v$0$i = 0, $v$0$i16 = 0, $v$1$i = 0, $v$2$i = 0, $v$3$lcssa$i = 0, $v$332$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($bytes>>>0)<(245); - do { - if ($0) { - $1 = ($bytes>>>0)<(11); - if ($1) { - $5 = 16; - } else { - $2 = (($bytes) + 11)|0; - $3 = $2 & -8; - $5 = $3; - } - $4 = $5 >>> 3; - $6 = HEAP32[32544>>2]|0; - $7 = $6 >>> $4; - $8 = $7 & 3; - $9 = ($8|0)==(0); - if (!($9)) { - $10 = $7 & 1; - $11 = $10 ^ 1; - $12 = (($11) + ($4))|0; - $13 = $12 << 1; - $14 = ((32544 + ($13<<2)|0) + 40|0); - $$sum10 = (($13) + 2)|0; - $15 = ((32544 + ($$sum10<<2)|0) + 40|0); - $16 = HEAP32[$15>>2]|0; - $17 = (($16) + 8|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($14|0)==($18|0); - do { - if ($19) { - $20 = 1 << $12; - $21 = $20 ^ -1; - $22 = $6 & $21; - HEAP32[32544>>2] = $22; - } else { - $23 = HEAP32[((32544 + 16|0))>>2]|0; - $24 = ($18>>>0)<($23>>>0); - if ($24) { - _abort(); - // unreachable; - } - $25 = (($18) + 12|0); - $26 = HEAP32[$25>>2]|0; - $27 = ($26|0)==($16|0); - if ($27) { - HEAP32[$25>>2] = $14; - HEAP32[$15>>2] = $18; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $28 = $12 << 3; - $29 = $28 | 3; - $30 = (($16) + 4|0); - HEAP32[$30>>2] = $29; - $$sum1112 = $28 | 4; - $31 = (($16) + ($$sum1112)|0); - $32 = HEAP32[$31>>2]|0; - $33 = $32 | 1; - HEAP32[$31>>2] = $33; - $mem$0 = $17; - STACKTOP = sp;return ($mem$0|0); - } - $34 = HEAP32[((32544 + 8|0))>>2]|0; - $35 = ($5>>>0)>($34>>>0); - if ($35) { - $36 = ($7|0)==(0); - if (!($36)) { - $37 = $7 << $4; - $38 = 2 << $4; - $39 = (0 - ($38))|0; - $40 = $38 | $39; - $41 = $37 & $40; - $42 = (0 - ($41))|0; - $43 = $41 & $42; - $44 = (($43) + -1)|0; - $45 = $44 >>> 12; - $46 = $45 & 16; - $47 = $44 >>> $46; - $48 = $47 >>> 5; - $49 = $48 & 8; - $50 = $49 | $46; - $51 = $47 >>> $49; - $52 = $51 >>> 2; - $53 = $52 & 4; - $54 = $50 | $53; - $55 = $51 >>> $53; - $56 = $55 >>> 1; - $57 = $56 & 2; - $58 = $54 | $57; - $59 = $55 >>> $57; - $60 = $59 >>> 1; - $61 = $60 & 1; - $62 = $58 | $61; - $63 = $59 >>> $61; - $64 = (($62) + ($63))|0; - $65 = $64 << 1; - $66 = ((32544 + ($65<<2)|0) + 40|0); - $$sum4 = (($65) + 2)|0; - $67 = ((32544 + ($$sum4<<2)|0) + 40|0); - $68 = HEAP32[$67>>2]|0; - $69 = (($68) + 8|0); - $70 = HEAP32[$69>>2]|0; - $71 = ($66|0)==($70|0); - do { - if ($71) { - $72 = 1 << $64; - $73 = $72 ^ -1; - $74 = $6 & $73; - HEAP32[32544>>2] = $74; - $88 = $34; - } else { - $75 = HEAP32[((32544 + 16|0))>>2]|0; - $76 = ($70>>>0)<($75>>>0); - if ($76) { - _abort(); - // unreachable; - } - $77 = (($70) + 12|0); - $78 = HEAP32[$77>>2]|0; - $79 = ($78|0)==($68|0); - if ($79) { - HEAP32[$77>>2] = $66; - HEAP32[$67>>2] = $70; - $$pre = HEAP32[((32544 + 8|0))>>2]|0; - $88 = $$pre; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $80 = $64 << 3; - $81 = (($80) - ($5))|0; - $82 = $5 | 3; - $83 = (($68) + 4|0); - HEAP32[$83>>2] = $82; - $84 = (($68) + ($5)|0); - $85 = $81 | 1; - $$sum56 = $5 | 4; - $86 = (($68) + ($$sum56)|0); - HEAP32[$86>>2] = $85; - $87 = (($68) + ($80)|0); - HEAP32[$87>>2] = $81; - $89 = ($88|0)==(0); - if (!($89)) { - $90 = HEAP32[((32544 + 20|0))>>2]|0; - $91 = $88 >>> 3; - $92 = $91 << 1; - $93 = ((32544 + ($92<<2)|0) + 40|0); - $94 = HEAP32[32544>>2]|0; - $95 = 1 << $91; - $96 = $94 & $95; - $97 = ($96|0)==(0); - if ($97) { - $98 = $94 | $95; - HEAP32[32544>>2] = $98; - $$sum8$pre = (($92) + 2)|0; - $$pre105 = ((32544 + ($$sum8$pre<<2)|0) + 40|0); - $$pre$phiZ2D = $$pre105;$F4$0 = $93; - } else { - $$sum9 = (($92) + 2)|0; - $99 = ((32544 + ($$sum9<<2)|0) + 40|0); - $100 = HEAP32[$99>>2]|0; - $101 = HEAP32[((32544 + 16|0))>>2]|0; - $102 = ($100>>>0)<($101>>>0); - if ($102) { - _abort(); - // unreachable; - } else { - $$pre$phiZ2D = $99;$F4$0 = $100; - } - } - HEAP32[$$pre$phiZ2D>>2] = $90; - $103 = (($F4$0) + 12|0); - HEAP32[$103>>2] = $90; - $104 = (($90) + 8|0); - HEAP32[$104>>2] = $F4$0; - $105 = (($90) + 12|0); - HEAP32[$105>>2] = $93; - } - HEAP32[((32544 + 8|0))>>2] = $81; - HEAP32[((32544 + 20|0))>>2] = $84; - $mem$0 = $69; - STACKTOP = sp;return ($mem$0|0); - } - $106 = HEAP32[((32544 + 4|0))>>2]|0; - $107 = ($106|0)==(0); - if ($107) { - $nb$0 = $5; - } else { - $108 = (0 - ($106))|0; - $109 = $106 & $108; - $110 = (($109) + -1)|0; - $111 = $110 >>> 12; - $112 = $111 & 16; - $113 = $110 >>> $112; - $114 = $113 >>> 5; - $115 = $114 & 8; - $116 = $115 | $112; - $117 = $113 >>> $115; - $118 = $117 >>> 2; - $119 = $118 & 4; - $120 = $116 | $119; - $121 = $117 >>> $119; - $122 = $121 >>> 1; - $123 = $122 & 2; - $124 = $120 | $123; - $125 = $121 >>> $123; - $126 = $125 >>> 1; - $127 = $126 & 1; - $128 = $124 | $127; - $129 = $125 >>> $127; - $130 = (($128) + ($129))|0; - $131 = ((32544 + ($130<<2)|0) + 304|0); - $132 = HEAP32[$131>>2]|0; - $133 = (($132) + 4|0); - $134 = HEAP32[$133>>2]|0; - $135 = $134 & -8; - $136 = (($135) - ($5))|0; - $rsize$0$i = $136;$t$0$i = $132;$v$0$i = $132; - while(1) { - $137 = (($t$0$i) + 16|0); - $138 = HEAP32[$137>>2]|0; - $139 = ($138|0)==(0|0); - if ($139) { - $140 = (($t$0$i) + 20|0); - $141 = HEAP32[$140>>2]|0; - $142 = ($141|0)==(0|0); - if ($142) { - break; - } else { - $144 = $141; - } - } else { - $144 = $138; - } - $143 = (($144) + 4|0); - $145 = HEAP32[$143>>2]|0; - $146 = $145 & -8; - $147 = (($146) - ($5))|0; - $148 = ($147>>>0)<($rsize$0$i>>>0); - $$rsize$0$i = $148 ? $147 : $rsize$0$i; - $$v$0$i = $148 ? $144 : $v$0$i; - $rsize$0$i = $$rsize$0$i;$t$0$i = $144;$v$0$i = $$v$0$i; - } - $149 = HEAP32[((32544 + 16|0))>>2]|0; - $150 = ($v$0$i>>>0)<($149>>>0); - if ($150) { - _abort(); - // unreachable; - } - $151 = (($v$0$i) + ($5)|0); - $152 = ($v$0$i>>>0)<($151>>>0); - if (!($152)) { - _abort(); - // unreachable; - } - $153 = (($v$0$i) + 24|0); - $154 = HEAP32[$153>>2]|0; - $155 = (($v$0$i) + 12|0); - $156 = HEAP32[$155>>2]|0; - $157 = ($156|0)==($v$0$i|0); - do { - if ($157) { - $167 = (($v$0$i) + 20|0); - $168 = HEAP32[$167>>2]|0; - $169 = ($168|0)==(0|0); - if ($169) { - $170 = (($v$0$i) + 16|0); - $171 = HEAP32[$170>>2]|0; - $172 = ($171|0)==(0|0); - if ($172) { - $R$1$i = 0; - break; - } else { - $R$0$i = $171;$RP$0$i = $170; - } - } else { - $R$0$i = $168;$RP$0$i = $167; - } - while(1) { - $173 = (($R$0$i) + 20|0); - $174 = HEAP32[$173>>2]|0; - $175 = ($174|0)==(0|0); - if (!($175)) { - $R$0$i = $174;$RP$0$i = $173; - continue; - } - $176 = (($R$0$i) + 16|0); - $177 = HEAP32[$176>>2]|0; - $178 = ($177|0)==(0|0); - if ($178) { - break; - } else { - $R$0$i = $177;$RP$0$i = $176; - } - } - $179 = ($RP$0$i>>>0)<($149>>>0); - if ($179) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i>>2] = 0; - $R$1$i = $R$0$i; - break; - } - } else { - $158 = (($v$0$i) + 8|0); - $159 = HEAP32[$158>>2]|0; - $160 = ($159>>>0)<($149>>>0); - if ($160) { - _abort(); - // unreachable; - } - $161 = (($159) + 12|0); - $162 = HEAP32[$161>>2]|0; - $163 = ($162|0)==($v$0$i|0); - if (!($163)) { - _abort(); - // unreachable; - } - $164 = (($156) + 8|0); - $165 = HEAP32[$164>>2]|0; - $166 = ($165|0)==($v$0$i|0); - if ($166) { - HEAP32[$161>>2] = $156; - HEAP32[$164>>2] = $159; - $R$1$i = $156; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $180 = ($154|0)==(0|0); - do { - if (!($180)) { - $181 = (($v$0$i) + 28|0); - $182 = HEAP32[$181>>2]|0; - $183 = ((32544 + ($182<<2)|0) + 304|0); - $184 = HEAP32[$183>>2]|0; - $185 = ($v$0$i|0)==($184|0); - if ($185) { - HEAP32[$183>>2] = $R$1$i; - $cond$i = ($R$1$i|0)==(0|0); - if ($cond$i) { - $186 = 1 << $182; - $187 = $186 ^ -1; - $188 = HEAP32[((32544 + 4|0))>>2]|0; - $189 = $188 & $187; - HEAP32[((32544 + 4|0))>>2] = $189; - break; - } - } else { - $190 = HEAP32[((32544 + 16|0))>>2]|0; - $191 = ($154>>>0)<($190>>>0); - if ($191) { - _abort(); - // unreachable; - } - $192 = (($154) + 16|0); - $193 = HEAP32[$192>>2]|0; - $194 = ($193|0)==($v$0$i|0); - if ($194) { - HEAP32[$192>>2] = $R$1$i; - } else { - $195 = (($154) + 20|0); - HEAP32[$195>>2] = $R$1$i; - } - $196 = ($R$1$i|0)==(0|0); - if ($196) { - break; - } - } - $197 = HEAP32[((32544 + 16|0))>>2]|0; - $198 = ($R$1$i>>>0)<($197>>>0); - if ($198) { - _abort(); - // unreachable; - } - $199 = (($R$1$i) + 24|0); - HEAP32[$199>>2] = $154; - $200 = (($v$0$i) + 16|0); - $201 = HEAP32[$200>>2]|0; - $202 = ($201|0)==(0|0); - do { - if (!($202)) { - $203 = ($201>>>0)<($197>>>0); - if ($203) { - _abort(); - // unreachable; - } else { - $204 = (($R$1$i) + 16|0); - HEAP32[$204>>2] = $201; - $205 = (($201) + 24|0); - HEAP32[$205>>2] = $R$1$i; - break; - } - } - } while(0); - $206 = (($v$0$i) + 20|0); - $207 = HEAP32[$206>>2]|0; - $208 = ($207|0)==(0|0); - if (!($208)) { - $209 = HEAP32[((32544 + 16|0))>>2]|0; - $210 = ($207>>>0)<($209>>>0); - if ($210) { - _abort(); - // unreachable; - } else { - $211 = (($R$1$i) + 20|0); - HEAP32[$211>>2] = $207; - $212 = (($207) + 24|0); - HEAP32[$212>>2] = $R$1$i; - break; - } - } - } - } while(0); - $213 = ($rsize$0$i>>>0)<(16); - if ($213) { - $214 = (($rsize$0$i) + ($5))|0; - $215 = $214 | 3; - $216 = (($v$0$i) + 4|0); - HEAP32[$216>>2] = $215; - $$sum4$i = (($214) + 4)|0; - $217 = (($v$0$i) + ($$sum4$i)|0); - $218 = HEAP32[$217>>2]|0; - $219 = $218 | 1; - HEAP32[$217>>2] = $219; - } else { - $220 = $5 | 3; - $221 = (($v$0$i) + 4|0); - HEAP32[$221>>2] = $220; - $222 = $rsize$0$i | 1; - $$sum$i39 = $5 | 4; - $223 = (($v$0$i) + ($$sum$i39)|0); - HEAP32[$223>>2] = $222; - $$sum1$i = (($rsize$0$i) + ($5))|0; - $224 = (($v$0$i) + ($$sum1$i)|0); - HEAP32[$224>>2] = $rsize$0$i; - $225 = HEAP32[((32544 + 8|0))>>2]|0; - $226 = ($225|0)==(0); - if (!($226)) { - $227 = HEAP32[((32544 + 20|0))>>2]|0; - $228 = $225 >>> 3; - $229 = $228 << 1; - $230 = ((32544 + ($229<<2)|0) + 40|0); - $231 = HEAP32[32544>>2]|0; - $232 = 1 << $228; - $233 = $231 & $232; - $234 = ($233|0)==(0); - if ($234) { - $235 = $231 | $232; - HEAP32[32544>>2] = $235; - $$sum2$pre$i = (($229) + 2)|0; - $$pre$i = ((32544 + ($$sum2$pre$i<<2)|0) + 40|0); - $$pre$phi$iZ2D = $$pre$i;$F1$0$i = $230; - } else { - $$sum3$i = (($229) + 2)|0; - $236 = ((32544 + ($$sum3$i<<2)|0) + 40|0); - $237 = HEAP32[$236>>2]|0; - $238 = HEAP32[((32544 + 16|0))>>2]|0; - $239 = ($237>>>0)<($238>>>0); - if ($239) { - _abort(); - // unreachable; - } else { - $$pre$phi$iZ2D = $236;$F1$0$i = $237; - } - } - HEAP32[$$pre$phi$iZ2D>>2] = $227; - $240 = (($F1$0$i) + 12|0); - HEAP32[$240>>2] = $227; - $241 = (($227) + 8|0); - HEAP32[$241>>2] = $F1$0$i; - $242 = (($227) + 12|0); - HEAP32[$242>>2] = $230; - } - HEAP32[((32544 + 8|0))>>2] = $rsize$0$i; - HEAP32[((32544 + 20|0))>>2] = $151; - } - $243 = (($v$0$i) + 8|0); - $mem$0 = $243; - STACKTOP = sp;return ($mem$0|0); - } - } else { - $nb$0 = $5; - } - } else { - $244 = ($bytes>>>0)>(4294967231); - if ($244) { - $nb$0 = -1; - } else { - $245 = (($bytes) + 11)|0; - $246 = $245 & -8; - $247 = HEAP32[((32544 + 4|0))>>2]|0; - $248 = ($247|0)==(0); - if ($248) { - $nb$0 = $246; - } else { - $249 = (0 - ($246))|0; - $250 = $245 >>> 8; - $251 = ($250|0)==(0); - if ($251) { - $idx$0$i = 0; - } else { - $252 = ($246>>>0)>(16777215); - if ($252) { - $idx$0$i = 31; - } else { - $253 = (($250) + 1048320)|0; - $254 = $253 >>> 16; - $255 = $254 & 8; - $256 = $250 << $255; - $257 = (($256) + 520192)|0; - $258 = $257 >>> 16; - $259 = $258 & 4; - $260 = $259 | $255; - $261 = $256 << $259; - $262 = (($261) + 245760)|0; - $263 = $262 >>> 16; - $264 = $263 & 2; - $265 = $260 | $264; - $266 = (14 - ($265))|0; - $267 = $261 << $264; - $268 = $267 >>> 15; - $269 = (($266) + ($268))|0; - $270 = $269 << 1; - $271 = (($269) + 7)|0; - $272 = $246 >>> $271; - $273 = $272 & 1; - $274 = $273 | $270; - $idx$0$i = $274; - } - } - $275 = ((32544 + ($idx$0$i<<2)|0) + 304|0); - $276 = HEAP32[$275>>2]|0; - $277 = ($276|0)==(0|0); - L126: do { - if ($277) { - $rsize$2$i = $249;$t$1$i = 0;$v$2$i = 0; - } else { - $278 = ($idx$0$i|0)==(31); - if ($278) { - $282 = 0; - } else { - $279 = $idx$0$i >>> 1; - $280 = (25 - ($279))|0; - $282 = $280; - } - $281 = $246 << $282; - $rsize$0$i15 = $249;$rst$0$i = 0;$sizebits$0$i = $281;$t$0$i14 = $276;$v$0$i16 = 0; - while(1) { - $283 = (($t$0$i14) + 4|0); - $284 = HEAP32[$283>>2]|0; - $285 = $284 & -8; - $286 = (($285) - ($246))|0; - $287 = ($286>>>0)<($rsize$0$i15>>>0); - if ($287) { - $288 = ($285|0)==($246|0); - if ($288) { - $rsize$2$i = $286;$t$1$i = $t$0$i14;$v$2$i = $t$0$i14; - break L126; - } else { - $rsize$1$i = $286;$v$1$i = $t$0$i14; - } - } else { - $rsize$1$i = $rsize$0$i15;$v$1$i = $v$0$i16; - } - $289 = (($t$0$i14) + 20|0); - $290 = HEAP32[$289>>2]|0; - $291 = $sizebits$0$i >>> 31; - $292 = ((($t$0$i14) + ($291<<2)|0) + 16|0); - $293 = HEAP32[$292>>2]|0; - $294 = ($290|0)==(0|0); - $295 = ($290|0)==($293|0); - $or$cond19$i = $294 | $295; - $rst$1$i = $or$cond19$i ? $rst$0$i : $290; - $296 = ($293|0)==(0|0); - $297 = $sizebits$0$i << 1; - if ($296) { - $rsize$2$i = $rsize$1$i;$t$1$i = $rst$1$i;$v$2$i = $v$1$i; - break; - } else { - $rsize$0$i15 = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $297;$t$0$i14 = $293;$v$0$i16 = $v$1$i; - } - } - } - } while(0); - $298 = ($t$1$i|0)==(0|0); - $299 = ($v$2$i|0)==(0|0); - $or$cond$i = $298 & $299; - if ($or$cond$i) { - $300 = 2 << $idx$0$i; - $301 = (0 - ($300))|0; - $302 = $300 | $301; - $303 = $247 & $302; - $304 = ($303|0)==(0); - if ($304) { - $nb$0 = $246; - break; - } - $305 = (0 - ($303))|0; - $306 = $303 & $305; - $307 = (($306) + -1)|0; - $308 = $307 >>> 12; - $309 = $308 & 16; - $310 = $307 >>> $309; - $311 = $310 >>> 5; - $312 = $311 & 8; - $313 = $312 | $309; - $314 = $310 >>> $312; - $315 = $314 >>> 2; - $316 = $315 & 4; - $317 = $313 | $316; - $318 = $314 >>> $316; - $319 = $318 >>> 1; - $320 = $319 & 2; - $321 = $317 | $320; - $322 = $318 >>> $320; - $323 = $322 >>> 1; - $324 = $323 & 1; - $325 = $321 | $324; - $326 = $322 >>> $324; - $327 = (($325) + ($326))|0; - $328 = ((32544 + ($327<<2)|0) + 304|0); - $329 = HEAP32[$328>>2]|0; - $t$2$ph$i = $329; - } else { - $t$2$ph$i = $t$1$i; - } - $330 = ($t$2$ph$i|0)==(0|0); - if ($330) { - $rsize$3$lcssa$i = $rsize$2$i;$v$3$lcssa$i = $v$2$i; - } else { - $rsize$331$i = $rsize$2$i;$t$230$i = $t$2$ph$i;$v$332$i = $v$2$i; - while(1) { - $331 = (($t$230$i) + 4|0); - $332 = HEAP32[$331>>2]|0; - $333 = $332 & -8; - $334 = (($333) - ($246))|0; - $335 = ($334>>>0)<($rsize$331$i>>>0); - $$rsize$3$i = $335 ? $334 : $rsize$331$i; - $t$2$v$3$i = $335 ? $t$230$i : $v$332$i; - $336 = (($t$230$i) + 16|0); - $337 = HEAP32[$336>>2]|0; - $338 = ($337|0)==(0|0); - if (!($338)) { - $rsize$331$i = $$rsize$3$i;$t$230$i = $337;$v$332$i = $t$2$v$3$i; - continue; - } - $339 = (($t$230$i) + 20|0); - $340 = HEAP32[$339>>2]|0; - $341 = ($340|0)==(0|0); - if ($341) { - $rsize$3$lcssa$i = $$rsize$3$i;$v$3$lcssa$i = $t$2$v$3$i; - break; - } else { - $rsize$331$i = $$rsize$3$i;$t$230$i = $340;$v$332$i = $t$2$v$3$i; - } - } - } - $342 = ($v$3$lcssa$i|0)==(0|0); - if ($342) { - $nb$0 = $246; - } else { - $343 = HEAP32[((32544 + 8|0))>>2]|0; - $344 = (($343) - ($246))|0; - $345 = ($rsize$3$lcssa$i>>>0)<($344>>>0); - if ($345) { - $346 = HEAP32[((32544 + 16|0))>>2]|0; - $347 = ($v$3$lcssa$i>>>0)<($346>>>0); - if ($347) { - _abort(); - // unreachable; - } - $348 = (($v$3$lcssa$i) + ($246)|0); - $349 = ($v$3$lcssa$i>>>0)<($348>>>0); - if (!($349)) { - _abort(); - // unreachable; - } - $350 = (($v$3$lcssa$i) + 24|0); - $351 = HEAP32[$350>>2]|0; - $352 = (($v$3$lcssa$i) + 12|0); - $353 = HEAP32[$352>>2]|0; - $354 = ($353|0)==($v$3$lcssa$i|0); - do { - if ($354) { - $364 = (($v$3$lcssa$i) + 20|0); - $365 = HEAP32[$364>>2]|0; - $366 = ($365|0)==(0|0); - if ($366) { - $367 = (($v$3$lcssa$i) + 16|0); - $368 = HEAP32[$367>>2]|0; - $369 = ($368|0)==(0|0); - if ($369) { - $R$1$i20 = 0; - break; - } else { - $R$0$i18 = $368;$RP$0$i17 = $367; - } - } else { - $R$0$i18 = $365;$RP$0$i17 = $364; - } - while(1) { - $370 = (($R$0$i18) + 20|0); - $371 = HEAP32[$370>>2]|0; - $372 = ($371|0)==(0|0); - if (!($372)) { - $R$0$i18 = $371;$RP$0$i17 = $370; - continue; - } - $373 = (($R$0$i18) + 16|0); - $374 = HEAP32[$373>>2]|0; - $375 = ($374|0)==(0|0); - if ($375) { - break; - } else { - $R$0$i18 = $374;$RP$0$i17 = $373; - } - } - $376 = ($RP$0$i17>>>0)<($346>>>0); - if ($376) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i17>>2] = 0; - $R$1$i20 = $R$0$i18; - break; - } - } else { - $355 = (($v$3$lcssa$i) + 8|0); - $356 = HEAP32[$355>>2]|0; - $357 = ($356>>>0)<($346>>>0); - if ($357) { - _abort(); - // unreachable; - } - $358 = (($356) + 12|0); - $359 = HEAP32[$358>>2]|0; - $360 = ($359|0)==($v$3$lcssa$i|0); - if (!($360)) { - _abort(); - // unreachable; - } - $361 = (($353) + 8|0); - $362 = HEAP32[$361>>2]|0; - $363 = ($362|0)==($v$3$lcssa$i|0); - if ($363) { - HEAP32[$358>>2] = $353; - HEAP32[$361>>2] = $356; - $R$1$i20 = $353; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $377 = ($351|0)==(0|0); - do { - if (!($377)) { - $378 = (($v$3$lcssa$i) + 28|0); - $379 = HEAP32[$378>>2]|0; - $380 = ((32544 + ($379<<2)|0) + 304|0); - $381 = HEAP32[$380>>2]|0; - $382 = ($v$3$lcssa$i|0)==($381|0); - if ($382) { - HEAP32[$380>>2] = $R$1$i20; - $cond$i21 = ($R$1$i20|0)==(0|0); - if ($cond$i21) { - $383 = 1 << $379; - $384 = $383 ^ -1; - $385 = HEAP32[((32544 + 4|0))>>2]|0; - $386 = $385 & $384; - HEAP32[((32544 + 4|0))>>2] = $386; - break; - } - } else { - $387 = HEAP32[((32544 + 16|0))>>2]|0; - $388 = ($351>>>0)<($387>>>0); - if ($388) { - _abort(); - // unreachable; - } - $389 = (($351) + 16|0); - $390 = HEAP32[$389>>2]|0; - $391 = ($390|0)==($v$3$lcssa$i|0); - if ($391) { - HEAP32[$389>>2] = $R$1$i20; - } else { - $392 = (($351) + 20|0); - HEAP32[$392>>2] = $R$1$i20; - } - $393 = ($R$1$i20|0)==(0|0); - if ($393) { - break; - } - } - $394 = HEAP32[((32544 + 16|0))>>2]|0; - $395 = ($R$1$i20>>>0)<($394>>>0); - if ($395) { - _abort(); - // unreachable; - } - $396 = (($R$1$i20) + 24|0); - HEAP32[$396>>2] = $351; - $397 = (($v$3$lcssa$i) + 16|0); - $398 = HEAP32[$397>>2]|0; - $399 = ($398|0)==(0|0); - do { - if (!($399)) { - $400 = ($398>>>0)<($394>>>0); - if ($400) { - _abort(); - // unreachable; - } else { - $401 = (($R$1$i20) + 16|0); - HEAP32[$401>>2] = $398; - $402 = (($398) + 24|0); - HEAP32[$402>>2] = $R$1$i20; - break; - } - } - } while(0); - $403 = (($v$3$lcssa$i) + 20|0); - $404 = HEAP32[$403>>2]|0; - $405 = ($404|0)==(0|0); - if (!($405)) { - $406 = HEAP32[((32544 + 16|0))>>2]|0; - $407 = ($404>>>0)<($406>>>0); - if ($407) { - _abort(); - // unreachable; - } else { - $408 = (($R$1$i20) + 20|0); - HEAP32[$408>>2] = $404; - $409 = (($404) + 24|0); - HEAP32[$409>>2] = $R$1$i20; - break; - } - } - } - } while(0); - $410 = ($rsize$3$lcssa$i>>>0)<(16); - L204: do { - if ($410) { - $411 = (($rsize$3$lcssa$i) + ($246))|0; - $412 = $411 | 3; - $413 = (($v$3$lcssa$i) + 4|0); - HEAP32[$413>>2] = $412; - $$sum18$i = (($411) + 4)|0; - $414 = (($v$3$lcssa$i) + ($$sum18$i)|0); - $415 = HEAP32[$414>>2]|0; - $416 = $415 | 1; - HEAP32[$414>>2] = $416; - } else { - $417 = $246 | 3; - $418 = (($v$3$lcssa$i) + 4|0); - HEAP32[$418>>2] = $417; - $419 = $rsize$3$lcssa$i | 1; - $$sum$i2338 = $246 | 4; - $420 = (($v$3$lcssa$i) + ($$sum$i2338)|0); - HEAP32[$420>>2] = $419; - $$sum1$i24 = (($rsize$3$lcssa$i) + ($246))|0; - $421 = (($v$3$lcssa$i) + ($$sum1$i24)|0); - HEAP32[$421>>2] = $rsize$3$lcssa$i; - $422 = $rsize$3$lcssa$i >>> 3; - $423 = ($rsize$3$lcssa$i>>>0)<(256); - if ($423) { - $424 = $422 << 1; - $425 = ((32544 + ($424<<2)|0) + 40|0); - $426 = HEAP32[32544>>2]|0; - $427 = 1 << $422; - $428 = $426 & $427; - $429 = ($428|0)==(0); - do { - if ($429) { - $430 = $426 | $427; - HEAP32[32544>>2] = $430; - $$sum14$pre$i = (($424) + 2)|0; - $$pre$i25 = ((32544 + ($$sum14$pre$i<<2)|0) + 40|0); - $$pre$phi$i26Z2D = $$pre$i25;$F5$0$i = $425; - } else { - $$sum17$i = (($424) + 2)|0; - $431 = ((32544 + ($$sum17$i<<2)|0) + 40|0); - $432 = HEAP32[$431>>2]|0; - $433 = HEAP32[((32544 + 16|0))>>2]|0; - $434 = ($432>>>0)<($433>>>0); - if (!($434)) { - $$pre$phi$i26Z2D = $431;$F5$0$i = $432; - break; - } - _abort(); - // unreachable; - } - } while(0); - HEAP32[$$pre$phi$i26Z2D>>2] = $348; - $435 = (($F5$0$i) + 12|0); - HEAP32[$435>>2] = $348; - $$sum15$i = (($246) + 8)|0; - $436 = (($v$3$lcssa$i) + ($$sum15$i)|0); - HEAP32[$436>>2] = $F5$0$i; - $$sum16$i = (($246) + 12)|0; - $437 = (($v$3$lcssa$i) + ($$sum16$i)|0); - HEAP32[$437>>2] = $425; - break; - } - $438 = $rsize$3$lcssa$i >>> 8; - $439 = ($438|0)==(0); - if ($439) { - $I7$0$i = 0; - } else { - $440 = ($rsize$3$lcssa$i>>>0)>(16777215); - if ($440) { - $I7$0$i = 31; - } else { - $441 = (($438) + 1048320)|0; - $442 = $441 >>> 16; - $443 = $442 & 8; - $444 = $438 << $443; - $445 = (($444) + 520192)|0; - $446 = $445 >>> 16; - $447 = $446 & 4; - $448 = $447 | $443; - $449 = $444 << $447; - $450 = (($449) + 245760)|0; - $451 = $450 >>> 16; - $452 = $451 & 2; - $453 = $448 | $452; - $454 = (14 - ($453))|0; - $455 = $449 << $452; - $456 = $455 >>> 15; - $457 = (($454) + ($456))|0; - $458 = $457 << 1; - $459 = (($457) + 7)|0; - $460 = $rsize$3$lcssa$i >>> $459; - $461 = $460 & 1; - $462 = $461 | $458; - $I7$0$i = $462; - } - } - $463 = ((32544 + ($I7$0$i<<2)|0) + 304|0); - $$sum2$i = (($246) + 28)|0; - $464 = (($v$3$lcssa$i) + ($$sum2$i)|0); - HEAP32[$464>>2] = $I7$0$i; - $$sum3$i27 = (($246) + 16)|0; - $465 = (($v$3$lcssa$i) + ($$sum3$i27)|0); - $$sum4$i28 = (($246) + 20)|0; - $466 = (($v$3$lcssa$i) + ($$sum4$i28)|0); - HEAP32[$466>>2] = 0; - HEAP32[$465>>2] = 0; - $467 = HEAP32[((32544 + 4|0))>>2]|0; - $468 = 1 << $I7$0$i; - $469 = $467 & $468; - $470 = ($469|0)==(0); - if ($470) { - $471 = $467 | $468; - HEAP32[((32544 + 4|0))>>2] = $471; - HEAP32[$463>>2] = $348; - $$sum5$i = (($246) + 24)|0; - $472 = (($v$3$lcssa$i) + ($$sum5$i)|0); - HEAP32[$472>>2] = $463; - $$sum6$i = (($246) + 12)|0; - $473 = (($v$3$lcssa$i) + ($$sum6$i)|0); - HEAP32[$473>>2] = $348; - $$sum7$i = (($246) + 8)|0; - $474 = (($v$3$lcssa$i) + ($$sum7$i)|0); - HEAP32[$474>>2] = $348; - break; - } - $475 = HEAP32[$463>>2]|0; - $476 = ($I7$0$i|0)==(31); - if ($476) { - $484 = 0; - } else { - $477 = $I7$0$i >>> 1; - $478 = (25 - ($477))|0; - $484 = $478; - } - $479 = (($475) + 4|0); - $480 = HEAP32[$479>>2]|0; - $481 = $480 & -8; - $482 = ($481|0)==($rsize$3$lcssa$i|0); - L225: do { - if ($482) { - $T$0$lcssa$i = $475; - } else { - $483 = $rsize$3$lcssa$i << $484; - $K12$027$i = $483;$T$026$i = $475; - while(1) { - $491 = $K12$027$i >>> 31; - $492 = ((($T$026$i) + ($491<<2)|0) + 16|0); - $487 = HEAP32[$492>>2]|0; - $493 = ($487|0)==(0|0); - if ($493) { - break; - } - $485 = $K12$027$i << 1; - $486 = (($487) + 4|0); - $488 = HEAP32[$486>>2]|0; - $489 = $488 & -8; - $490 = ($489|0)==($rsize$3$lcssa$i|0); - if ($490) { - $T$0$lcssa$i = $487; - break L225; - } else { - $K12$027$i = $485;$T$026$i = $487; - } - } - $494 = HEAP32[((32544 + 16|0))>>2]|0; - $495 = ($492>>>0)<($494>>>0); - if ($495) { - _abort(); - // unreachable; - } else { - HEAP32[$492>>2] = $348; - $$sum11$i = (($246) + 24)|0; - $496 = (($v$3$lcssa$i) + ($$sum11$i)|0); - HEAP32[$496>>2] = $T$026$i; - $$sum12$i = (($246) + 12)|0; - $497 = (($v$3$lcssa$i) + ($$sum12$i)|0); - HEAP32[$497>>2] = $348; - $$sum13$i = (($246) + 8)|0; - $498 = (($v$3$lcssa$i) + ($$sum13$i)|0); - HEAP32[$498>>2] = $348; - break L204; - } - } - } while(0); - $499 = (($T$0$lcssa$i) + 8|0); - $500 = HEAP32[$499>>2]|0; - $501 = HEAP32[((32544 + 16|0))>>2]|0; - $502 = ($T$0$lcssa$i>>>0)>=($501>>>0); - $503 = ($500>>>0)>=($501>>>0); - $or$cond24$i = $502 & $503; - if ($or$cond24$i) { - $504 = (($500) + 12|0); - HEAP32[$504>>2] = $348; - HEAP32[$499>>2] = $348; - $$sum8$i = (($246) + 8)|0; - $505 = (($v$3$lcssa$i) + ($$sum8$i)|0); - HEAP32[$505>>2] = $500; - $$sum9$i = (($246) + 12)|0; - $506 = (($v$3$lcssa$i) + ($$sum9$i)|0); - HEAP32[$506>>2] = $T$0$lcssa$i; - $$sum10$i = (($246) + 24)|0; - $507 = (($v$3$lcssa$i) + ($$sum10$i)|0); - HEAP32[$507>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $508 = (($v$3$lcssa$i) + 8|0); - $mem$0 = $508; - STACKTOP = sp;return ($mem$0|0); - } else { - $nb$0 = $246; - } - } - } - } - } - } while(0); - $509 = HEAP32[((32544 + 8|0))>>2]|0; - $510 = ($509>>>0)<($nb$0>>>0); - if (!($510)) { - $511 = (($509) - ($nb$0))|0; - $512 = HEAP32[((32544 + 20|0))>>2]|0; - $513 = ($511>>>0)>(15); - if ($513) { - $514 = (($512) + ($nb$0)|0); - HEAP32[((32544 + 20|0))>>2] = $514; - HEAP32[((32544 + 8|0))>>2] = $511; - $515 = $511 | 1; - $$sum2 = (($nb$0) + 4)|0; - $516 = (($512) + ($$sum2)|0); - HEAP32[$516>>2] = $515; - $517 = (($512) + ($509)|0); - HEAP32[$517>>2] = $511; - $518 = $nb$0 | 3; - $519 = (($512) + 4|0); - HEAP32[$519>>2] = $518; - } else { - HEAP32[((32544 + 8|0))>>2] = 0; - HEAP32[((32544 + 20|0))>>2] = 0; - $520 = $509 | 3; - $521 = (($512) + 4|0); - HEAP32[$521>>2] = $520; - $$sum1 = (($509) + 4)|0; - $522 = (($512) + ($$sum1)|0); - $523 = HEAP32[$522>>2]|0; - $524 = $523 | 1; - HEAP32[$522>>2] = $524; - } - $525 = (($512) + 8|0); - $mem$0 = $525; - STACKTOP = sp;return ($mem$0|0); - } - $526 = HEAP32[((32544 + 12|0))>>2]|0; - $527 = ($526>>>0)>($nb$0>>>0); - if ($527) { - $528 = (($526) - ($nb$0))|0; - HEAP32[((32544 + 12|0))>>2] = $528; - $529 = HEAP32[((32544 + 24|0))>>2]|0; - $530 = (($529) + ($nb$0)|0); - HEAP32[((32544 + 24|0))>>2] = $530; - $531 = $528 | 1; - $$sum = (($nb$0) + 4)|0; - $532 = (($529) + ($$sum)|0); - HEAP32[$532>>2] = $531; - $533 = $nb$0 | 3; - $534 = (($529) + 4|0); - HEAP32[$534>>2] = $533; - $535 = (($529) + 8|0); - $mem$0 = $535; - STACKTOP = sp;return ($mem$0|0); - } - $536 = HEAP32[33016>>2]|0; - $537 = ($536|0)==(0); - do { - if ($537) { - $538 = (_sysconf(30)|0); - $539 = (($538) + -1)|0; - $540 = $539 & $538; - $541 = ($540|0)==(0); - if ($541) { - HEAP32[((33016 + 8|0))>>2] = $538; - HEAP32[((33016 + 4|0))>>2] = $538; - HEAP32[((33016 + 12|0))>>2] = -1; - HEAP32[((33016 + 16|0))>>2] = -1; - HEAP32[((33016 + 20|0))>>2] = 0; - HEAP32[((32544 + 444|0))>>2] = 0; - $542 = (_time((0|0))|0); - $543 = $542 & -16; - $544 = $543 ^ 1431655768; - HEAP32[33016>>2] = $544; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $545 = (($nb$0) + 48)|0; - $546 = HEAP32[((33016 + 8|0))>>2]|0; - $547 = (($nb$0) + 47)|0; - $548 = (($546) + ($547))|0; - $549 = (0 - ($546))|0; - $550 = $548 & $549; - $551 = ($550>>>0)>($nb$0>>>0); - if (!($551)) { - $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); - } - $552 = HEAP32[((32544 + 440|0))>>2]|0; - $553 = ($552|0)==(0); - if (!($553)) { - $554 = HEAP32[((32544 + 432|0))>>2]|0; - $555 = (($554) + ($550))|0; - $556 = ($555>>>0)<=($554>>>0); - $557 = ($555>>>0)>($552>>>0); - $or$cond1$i = $556 | $557; - if ($or$cond1$i) { - $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); - } - } - $558 = HEAP32[((32544 + 444|0))>>2]|0; - $559 = $558 & 4; - $560 = ($559|0)==(0); - L266: do { - if ($560) { - $561 = HEAP32[((32544 + 24|0))>>2]|0; - $562 = ($561|0)==(0|0); - L268: do { - if ($562) { - label = 181; - } else { - $sp$0$i$i = ((32544 + 448|0)); - while(1) { - $563 = HEAP32[$sp$0$i$i>>2]|0; - $564 = ($563>>>0)>($561>>>0); - if (!($564)) { - $565 = (($sp$0$i$i) + 4|0); - $566 = HEAP32[$565>>2]|0; - $567 = (($563) + ($566)|0); - $568 = ($567>>>0)>($561>>>0); - if ($568) { - break; - } - } - $569 = (($sp$0$i$i) + 8|0); - $570 = HEAP32[$569>>2]|0; - $571 = ($570|0)==(0|0); - if ($571) { - label = 181; - break L268; - } else { - $sp$0$i$i = $570; - } - } - $572 = ($sp$0$i$i|0)==(0|0); - if ($572) { - label = 181; - } else { - $595 = HEAP32[((32544 + 12|0))>>2]|0; - $596 = (($548) - ($595))|0; - $597 = $596 & $549; - $598 = ($597>>>0)<(2147483647); - if ($598) { - $599 = (_sbrk(($597|0))|0); - $600 = HEAP32[$sp$0$i$i>>2]|0; - $601 = HEAP32[$565>>2]|0; - $602 = (($600) + ($601)|0); - $603 = ($599|0)==($602|0); - if ($603) { - $br$0$i = $599;$ssize$1$i = $597; - label = 190; - } else { - $br$030$i = $599;$ssize$129$i = $597; - label = 191; - } - } else { - $tsize$03141$i = 0; - } - } - } - } while(0); - do { - if ((label|0) == 181) { - $573 = (_sbrk(0)|0); - $574 = ($573|0)==((-1)|0); - if ($574) { - $tsize$03141$i = 0; - } else { - $575 = $573; - $576 = HEAP32[((33016 + 4|0))>>2]|0; - $577 = (($576) + -1)|0; - $578 = $577 & $575; - $579 = ($578|0)==(0); - if ($579) { - $ssize$0$i = $550; - } else { - $580 = (($577) + ($575))|0; - $581 = (0 - ($576))|0; - $582 = $580 & $581; - $583 = (($550) - ($575))|0; - $584 = (($583) + ($582))|0; - $ssize$0$i = $584; - } - $585 = HEAP32[((32544 + 432|0))>>2]|0; - $586 = (($585) + ($ssize$0$i))|0; - $587 = ($ssize$0$i>>>0)>($nb$0>>>0); - $588 = ($ssize$0$i>>>0)<(2147483647); - $or$cond$i29 = $587 & $588; - if ($or$cond$i29) { - $589 = HEAP32[((32544 + 440|0))>>2]|0; - $590 = ($589|0)==(0); - if (!($590)) { - $591 = ($586>>>0)<=($585>>>0); - $592 = ($586>>>0)>($589>>>0); - $or$cond2$i = $591 | $592; - if ($or$cond2$i) { - $tsize$03141$i = 0; - break; - } - } - $593 = (_sbrk(($ssize$0$i|0))|0); - $594 = ($593|0)==($573|0); - if ($594) { - $br$0$i = $573;$ssize$1$i = $ssize$0$i; - label = 190; - } else { - $br$030$i = $593;$ssize$129$i = $ssize$0$i; - label = 191; - } - } else { - $tsize$03141$i = 0; - } - } - } - } while(0); - L288: do { - if ((label|0) == 190) { - $604 = ($br$0$i|0)==((-1)|0); - if ($604) { - $tsize$03141$i = $ssize$1$i; - } else { - $tbase$245$i = $br$0$i;$tsize$244$i = $ssize$1$i; - label = 201; - break L266; - } - } - else if ((label|0) == 191) { - $605 = (0 - ($ssize$129$i))|0; - $606 = ($br$030$i|0)!=((-1)|0); - $607 = ($ssize$129$i>>>0)<(2147483647); - $or$cond5$i = $606 & $607; - $608 = ($545>>>0)>($ssize$129$i>>>0); - $or$cond4$i = $or$cond5$i & $608; - do { - if ($or$cond4$i) { - $609 = HEAP32[((33016 + 8|0))>>2]|0; - $610 = (($547) - ($ssize$129$i))|0; - $611 = (($610) + ($609))|0; - $612 = (0 - ($609))|0; - $613 = $611 & $612; - $614 = ($613>>>0)<(2147483647); - if ($614) { - $615 = (_sbrk(($613|0))|0); - $616 = ($615|0)==((-1)|0); - if ($616) { - (_sbrk(($605|0))|0); - $tsize$03141$i = 0; - break L288; - } else { - $617 = (($613) + ($ssize$129$i))|0; - $ssize$2$i = $617; - break; - } - } else { - $ssize$2$i = $ssize$129$i; - } - } else { - $ssize$2$i = $ssize$129$i; - } - } while(0); - $618 = ($br$030$i|0)==((-1)|0); - if ($618) { - $tsize$03141$i = 0; - } else { - $tbase$245$i = $br$030$i;$tsize$244$i = $ssize$2$i; - label = 201; - break L266; - } - } - } while(0); - $619 = HEAP32[((32544 + 444|0))>>2]|0; - $620 = $619 | 4; - HEAP32[((32544 + 444|0))>>2] = $620; - $tsize$1$i = $tsize$03141$i; - label = 198; - } else { - $tsize$1$i = 0; - label = 198; - } - } while(0); - if ((label|0) == 198) { - $621 = ($550>>>0)<(2147483647); - if ($621) { - $622 = (_sbrk(($550|0))|0); - $623 = (_sbrk(0)|0); - $624 = ($622|0)!=((-1)|0); - $625 = ($623|0)!=((-1)|0); - $or$cond3$i = $624 & $625; - $626 = ($622>>>0)<($623>>>0); - $or$cond6$i = $or$cond3$i & $626; - if ($or$cond6$i) { - $627 = $623; - $628 = $622; - $629 = (($627) - ($628))|0; - $630 = (($nb$0) + 40)|0; - $631 = ($629>>>0)>($630>>>0); - $$tsize$1$i = $631 ? $629 : $tsize$1$i; - if ($631) { - $tbase$245$i = $622;$tsize$244$i = $$tsize$1$i; - label = 201; - } - } - } - } - if ((label|0) == 201) { - $632 = HEAP32[((32544 + 432|0))>>2]|0; - $633 = (($632) + ($tsize$244$i))|0; - HEAP32[((32544 + 432|0))>>2] = $633; - $634 = HEAP32[((32544 + 436|0))>>2]|0; - $635 = ($633>>>0)>($634>>>0); - if ($635) { - HEAP32[((32544 + 436|0))>>2] = $633; - } - $636 = HEAP32[((32544 + 24|0))>>2]|0; - $637 = ($636|0)==(0|0); - L308: do { - if ($637) { - $638 = HEAP32[((32544 + 16|0))>>2]|0; - $639 = ($638|0)==(0|0); - $640 = ($tbase$245$i>>>0)<($638>>>0); - $or$cond8$i = $639 | $640; - if ($or$cond8$i) { - HEAP32[((32544 + 16|0))>>2] = $tbase$245$i; - } - HEAP32[((32544 + 448|0))>>2] = $tbase$245$i; - HEAP32[((32544 + 452|0))>>2] = $tsize$244$i; - HEAP32[((32544 + 460|0))>>2] = 0; - $641 = HEAP32[33016>>2]|0; - HEAP32[((32544 + 36|0))>>2] = $641; - HEAP32[((32544 + 32|0))>>2] = -1; - $i$02$i$i = 0; - while(1) { - $642 = $i$02$i$i << 1; - $643 = ((32544 + ($642<<2)|0) + 40|0); - $$sum$i$i = (($642) + 3)|0; - $644 = ((32544 + ($$sum$i$i<<2)|0) + 40|0); - HEAP32[$644>>2] = $643; - $$sum1$i$i = (($642) + 2)|0; - $645 = ((32544 + ($$sum1$i$i<<2)|0) + 40|0); - HEAP32[$645>>2] = $643; - $646 = (($i$02$i$i) + 1)|0; - $exitcond$i$i = ($646|0)==(32); - if ($exitcond$i$i) { - break; - } else { - $i$02$i$i = $646; - } - } - $647 = (($tsize$244$i) + -40)|0; - $648 = (($tbase$245$i) + 8|0); - $649 = $648; - $650 = $649 & 7; - $651 = ($650|0)==(0); - if ($651) { - $655 = 0; - } else { - $652 = (0 - ($649))|0; - $653 = $652 & 7; - $655 = $653; - } - $654 = (($tbase$245$i) + ($655)|0); - $656 = (($647) - ($655))|0; - HEAP32[((32544 + 24|0))>>2] = $654; - HEAP32[((32544 + 12|0))>>2] = $656; - $657 = $656 | 1; - $$sum$i12$i = (($655) + 4)|0; - $658 = (($tbase$245$i) + ($$sum$i12$i)|0); - HEAP32[$658>>2] = $657; - $$sum2$i$i = (($tsize$244$i) + -36)|0; - $659 = (($tbase$245$i) + ($$sum2$i$i)|0); - HEAP32[$659>>2] = 40; - $660 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $660; - } else { - $sp$073$i = ((32544 + 448|0)); - while(1) { - $661 = HEAP32[$sp$073$i>>2]|0; - $662 = (($sp$073$i) + 4|0); - $663 = HEAP32[$662>>2]|0; - $664 = (($661) + ($663)|0); - $665 = ($tbase$245$i|0)==($664|0); - if ($665) { - label = 213; - break; - } - $666 = (($sp$073$i) + 8|0); - $667 = HEAP32[$666>>2]|0; - $668 = ($667|0)==(0|0); - if ($668) { - break; - } else { - $sp$073$i = $667; - } - } - if ((label|0) == 213) { - $669 = (($sp$073$i) + 12|0); - $670 = HEAP32[$669>>2]|0; - $671 = $670 & 8; - $672 = ($671|0)==(0); - if ($672) { - $673 = ($636>>>0)>=($661>>>0); - $674 = ($636>>>0)<($tbase$245$i>>>0); - $or$cond47$i = $673 & $674; - if ($or$cond47$i) { - $675 = (($663) + ($tsize$244$i))|0; - HEAP32[$662>>2] = $675; - $676 = HEAP32[((32544 + 12|0))>>2]|0; - $677 = (($676) + ($tsize$244$i))|0; - $678 = (($636) + 8|0); - $679 = $678; - $680 = $679 & 7; - $681 = ($680|0)==(0); - if ($681) { - $685 = 0; - } else { - $682 = (0 - ($679))|0; - $683 = $682 & 7; - $685 = $683; - } - $684 = (($636) + ($685)|0); - $686 = (($677) - ($685))|0; - HEAP32[((32544 + 24|0))>>2] = $684; - HEAP32[((32544 + 12|0))>>2] = $686; - $687 = $686 | 1; - $$sum$i16$i = (($685) + 4)|0; - $688 = (($636) + ($$sum$i16$i)|0); - HEAP32[$688>>2] = $687; - $$sum2$i17$i = (($677) + 4)|0; - $689 = (($636) + ($$sum2$i17$i)|0); - HEAP32[$689>>2] = 40; - $690 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $690; - break; - } - } - } - $691 = HEAP32[((32544 + 16|0))>>2]|0; - $692 = ($tbase$245$i>>>0)<($691>>>0); - if ($692) { - HEAP32[((32544 + 16|0))>>2] = $tbase$245$i; - $756 = $tbase$245$i; - } else { - $756 = $691; - } - $693 = (($tbase$245$i) + ($tsize$244$i)|0); - $sp$166$i = ((32544 + 448|0)); - while(1) { - $694 = HEAP32[$sp$166$i>>2]|0; - $695 = ($694|0)==($693|0); - if ($695) { - label = 223; - break; - } - $696 = (($sp$166$i) + 8|0); - $697 = HEAP32[$696>>2]|0; - $698 = ($697|0)==(0|0); - if ($698) { - break; - } else { - $sp$166$i = $697; - } - } - if ((label|0) == 223) { - $699 = (($sp$166$i) + 12|0); - $700 = HEAP32[$699>>2]|0; - $701 = $700 & 8; - $702 = ($701|0)==(0); - if ($702) { - HEAP32[$sp$166$i>>2] = $tbase$245$i; - $703 = (($sp$166$i) + 4|0); - $704 = HEAP32[$703>>2]|0; - $705 = (($704) + ($tsize$244$i))|0; - HEAP32[$703>>2] = $705; - $706 = (($tbase$245$i) + 8|0); - $707 = $706; - $708 = $707 & 7; - $709 = ($708|0)==(0); - if ($709) { - $713 = 0; - } else { - $710 = (0 - ($707))|0; - $711 = $710 & 7; - $713 = $711; - } - $712 = (($tbase$245$i) + ($713)|0); - $$sum102$i = (($tsize$244$i) + 8)|0; - $714 = (($tbase$245$i) + ($$sum102$i)|0); - $715 = $714; - $716 = $715 & 7; - $717 = ($716|0)==(0); - if ($717) { - $720 = 0; - } else { - $718 = (0 - ($715))|0; - $719 = $718 & 7; - $720 = $719; - } - $$sum103$i = (($720) + ($tsize$244$i))|0; - $721 = (($tbase$245$i) + ($$sum103$i)|0); - $722 = $721; - $723 = $712; - $724 = (($722) - ($723))|0; - $$sum$i19$i = (($713) + ($nb$0))|0; - $725 = (($tbase$245$i) + ($$sum$i19$i)|0); - $726 = (($724) - ($nb$0))|0; - $727 = $nb$0 | 3; - $$sum1$i20$i = (($713) + 4)|0; - $728 = (($tbase$245$i) + ($$sum1$i20$i)|0); - HEAP32[$728>>2] = $727; - $729 = ($721|0)==($636|0); - L345: do { - if ($729) { - $730 = HEAP32[((32544 + 12|0))>>2]|0; - $731 = (($730) + ($726))|0; - HEAP32[((32544 + 12|0))>>2] = $731; - HEAP32[((32544 + 24|0))>>2] = $725; - $732 = $731 | 1; - $$sum42$i$i = (($$sum$i19$i) + 4)|0; - $733 = (($tbase$245$i) + ($$sum42$i$i)|0); - HEAP32[$733>>2] = $732; - } else { - $734 = HEAP32[((32544 + 20|0))>>2]|0; - $735 = ($721|0)==($734|0); - if ($735) { - $736 = HEAP32[((32544 + 8|0))>>2]|0; - $737 = (($736) + ($726))|0; - HEAP32[((32544 + 8|0))>>2] = $737; - HEAP32[((32544 + 20|0))>>2] = $725; - $738 = $737 | 1; - $$sum40$i$i = (($$sum$i19$i) + 4)|0; - $739 = (($tbase$245$i) + ($$sum40$i$i)|0); - HEAP32[$739>>2] = $738; - $$sum41$i$i = (($737) + ($$sum$i19$i))|0; - $740 = (($tbase$245$i) + ($$sum41$i$i)|0); - HEAP32[$740>>2] = $737; - break; - } - $$sum2$i21$i = (($tsize$244$i) + 4)|0; - $$sum104$i = (($$sum2$i21$i) + ($720))|0; - $741 = (($tbase$245$i) + ($$sum104$i)|0); - $742 = HEAP32[$741>>2]|0; - $743 = $742 & 3; - $744 = ($743|0)==(1); - if ($744) { - $745 = $742 & -8; - $746 = $742 >>> 3; - $747 = ($742>>>0)<(256); - L353: do { - if ($747) { - $$sum3738$i$i = $720 | 8; - $$sum114$i = (($$sum3738$i$i) + ($tsize$244$i))|0; - $748 = (($tbase$245$i) + ($$sum114$i)|0); - $749 = HEAP32[$748>>2]|0; - $$sum39$i$i = (($tsize$244$i) + 12)|0; - $$sum115$i = (($$sum39$i$i) + ($720))|0; - $750 = (($tbase$245$i) + ($$sum115$i)|0); - $751 = HEAP32[$750>>2]|0; - $752 = $746 << 1; - $753 = ((32544 + ($752<<2)|0) + 40|0); - $754 = ($749|0)==($753|0); - do { - if (!($754)) { - $755 = ($749>>>0)<($756>>>0); - if ($755) { - _abort(); - // unreachable; - } - $757 = (($749) + 12|0); - $758 = HEAP32[$757>>2]|0; - $759 = ($758|0)==($721|0); - if ($759) { - break; - } - _abort(); - // unreachable; - } - } while(0); - $760 = ($751|0)==($749|0); - if ($760) { - $761 = 1 << $746; - $762 = $761 ^ -1; - $763 = HEAP32[32544>>2]|0; - $764 = $763 & $762; - HEAP32[32544>>2] = $764; - break; - } - $765 = ($751|0)==($753|0); - do { - if ($765) { - $$pre58$i$i = (($751) + 8|0); - $$pre$phi59$i$iZ2D = $$pre58$i$i; - } else { - $766 = ($751>>>0)<($756>>>0); - if ($766) { - _abort(); - // unreachable; - } - $767 = (($751) + 8|0); - $768 = HEAP32[$767>>2]|0; - $769 = ($768|0)==($721|0); - if ($769) { - $$pre$phi59$i$iZ2D = $767; - break; - } - _abort(); - // unreachable; - } - } while(0); - $770 = (($749) + 12|0); - HEAP32[$770>>2] = $751; - HEAP32[$$pre$phi59$i$iZ2D>>2] = $749; - } else { - $$sum34$i$i = $720 | 24; - $$sum105$i = (($$sum34$i$i) + ($tsize$244$i))|0; - $771 = (($tbase$245$i) + ($$sum105$i)|0); - $772 = HEAP32[$771>>2]|0; - $$sum5$i$i = (($tsize$244$i) + 12)|0; - $$sum106$i = (($$sum5$i$i) + ($720))|0; - $773 = (($tbase$245$i) + ($$sum106$i)|0); - $774 = HEAP32[$773>>2]|0; - $775 = ($774|0)==($721|0); - do { - if ($775) { - $$sum67$i$i = $720 | 16; - $$sum112$i = (($$sum2$i21$i) + ($$sum67$i$i))|0; - $785 = (($tbase$245$i) + ($$sum112$i)|0); - $786 = HEAP32[$785>>2]|0; - $787 = ($786|0)==(0|0); - if ($787) { - $$sum113$i = (($$sum67$i$i) + ($tsize$244$i))|0; - $788 = (($tbase$245$i) + ($$sum113$i)|0); - $789 = HEAP32[$788>>2]|0; - $790 = ($789|0)==(0|0); - if ($790) { - $R$1$i$i = 0; - break; - } else { - $R$0$i$i = $789;$RP$0$i$i = $788; - } - } else { - $R$0$i$i = $786;$RP$0$i$i = $785; - } - while(1) { - $791 = (($R$0$i$i) + 20|0); - $792 = HEAP32[$791>>2]|0; - $793 = ($792|0)==(0|0); - if (!($793)) { - $R$0$i$i = $792;$RP$0$i$i = $791; - continue; - } - $794 = (($R$0$i$i) + 16|0); - $795 = HEAP32[$794>>2]|0; - $796 = ($795|0)==(0|0); - if ($796) { - break; - } else { - $R$0$i$i = $795;$RP$0$i$i = $794; - } - } - $797 = ($RP$0$i$i>>>0)<($756>>>0); - if ($797) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i$i>>2] = 0; - $R$1$i$i = $R$0$i$i; - break; - } - } else { - $$sum3536$i$i = $720 | 8; - $$sum107$i = (($$sum3536$i$i) + ($tsize$244$i))|0; - $776 = (($tbase$245$i) + ($$sum107$i)|0); - $777 = HEAP32[$776>>2]|0; - $778 = ($777>>>0)<($756>>>0); - if ($778) { - _abort(); - // unreachable; - } - $779 = (($777) + 12|0); - $780 = HEAP32[$779>>2]|0; - $781 = ($780|0)==($721|0); - if (!($781)) { - _abort(); - // unreachable; - } - $782 = (($774) + 8|0); - $783 = HEAP32[$782>>2]|0; - $784 = ($783|0)==($721|0); - if ($784) { - HEAP32[$779>>2] = $774; - HEAP32[$782>>2] = $777; - $R$1$i$i = $774; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $798 = ($772|0)==(0|0); - if ($798) { - break; - } - $$sum30$i$i = (($tsize$244$i) + 28)|0; - $$sum108$i = (($$sum30$i$i) + ($720))|0; - $799 = (($tbase$245$i) + ($$sum108$i)|0); - $800 = HEAP32[$799>>2]|0; - $801 = ((32544 + ($800<<2)|0) + 304|0); - $802 = HEAP32[$801>>2]|0; - $803 = ($721|0)==($802|0); - do { - if ($803) { - HEAP32[$801>>2] = $R$1$i$i; - $cond$i$i = ($R$1$i$i|0)==(0|0); - if (!($cond$i$i)) { - break; - } - $804 = 1 << $800; - $805 = $804 ^ -1; - $806 = HEAP32[((32544 + 4|0))>>2]|0; - $807 = $806 & $805; - HEAP32[((32544 + 4|0))>>2] = $807; - break L353; - } else { - $808 = HEAP32[((32544 + 16|0))>>2]|0; - $809 = ($772>>>0)<($808>>>0); - if ($809) { - _abort(); - // unreachable; - } - $810 = (($772) + 16|0); - $811 = HEAP32[$810>>2]|0; - $812 = ($811|0)==($721|0); - if ($812) { - HEAP32[$810>>2] = $R$1$i$i; - } else { - $813 = (($772) + 20|0); - HEAP32[$813>>2] = $R$1$i$i; - } - $814 = ($R$1$i$i|0)==(0|0); - if ($814) { - break L353; - } - } - } while(0); - $815 = HEAP32[((32544 + 16|0))>>2]|0; - $816 = ($R$1$i$i>>>0)<($815>>>0); - if ($816) { - _abort(); - // unreachable; - } - $817 = (($R$1$i$i) + 24|0); - HEAP32[$817>>2] = $772; - $$sum3132$i$i = $720 | 16; - $$sum109$i = (($$sum3132$i$i) + ($tsize$244$i))|0; - $818 = (($tbase$245$i) + ($$sum109$i)|0); - $819 = HEAP32[$818>>2]|0; - $820 = ($819|0)==(0|0); - do { - if (!($820)) { - $821 = ($819>>>0)<($815>>>0); - if ($821) { - _abort(); - // unreachable; - } else { - $822 = (($R$1$i$i) + 16|0); - HEAP32[$822>>2] = $819; - $823 = (($819) + 24|0); - HEAP32[$823>>2] = $R$1$i$i; - break; - } - } - } while(0); - $$sum110$i = (($$sum2$i21$i) + ($$sum3132$i$i))|0; - $824 = (($tbase$245$i) + ($$sum110$i)|0); - $825 = HEAP32[$824>>2]|0; - $826 = ($825|0)==(0|0); - if ($826) { - break; - } - $827 = HEAP32[((32544 + 16|0))>>2]|0; - $828 = ($825>>>0)<($827>>>0); - if ($828) { - _abort(); - // unreachable; - } else { - $829 = (($R$1$i$i) + 20|0); - HEAP32[$829>>2] = $825; - $830 = (($825) + 24|0); - HEAP32[$830>>2] = $R$1$i$i; - break; - } - } - } while(0); - $$sum9$i$i = $745 | $720; - $$sum111$i = (($$sum9$i$i) + ($tsize$244$i))|0; - $831 = (($tbase$245$i) + ($$sum111$i)|0); - $832 = (($745) + ($726))|0; - $oldfirst$0$i$i = $831;$qsize$0$i$i = $832; - } else { - $oldfirst$0$i$i = $721;$qsize$0$i$i = $726; - } - $833 = (($oldfirst$0$i$i) + 4|0); - $834 = HEAP32[$833>>2]|0; - $835 = $834 & -2; - HEAP32[$833>>2] = $835; - $836 = $qsize$0$i$i | 1; - $$sum10$i$i = (($$sum$i19$i) + 4)|0; - $837 = (($tbase$245$i) + ($$sum10$i$i)|0); - HEAP32[$837>>2] = $836; - $$sum11$i22$i = (($qsize$0$i$i) + ($$sum$i19$i))|0; - $838 = (($tbase$245$i) + ($$sum11$i22$i)|0); - HEAP32[$838>>2] = $qsize$0$i$i; - $839 = $qsize$0$i$i >>> 3; - $840 = ($qsize$0$i$i>>>0)<(256); - if ($840) { - $841 = $839 << 1; - $842 = ((32544 + ($841<<2)|0) + 40|0); - $843 = HEAP32[32544>>2]|0; - $844 = 1 << $839; - $845 = $843 & $844; - $846 = ($845|0)==(0); - do { - if ($846) { - $847 = $843 | $844; - HEAP32[32544>>2] = $847; - $$sum26$pre$i$i = (($841) + 2)|0; - $$pre$i23$i = ((32544 + ($$sum26$pre$i$i<<2)|0) + 40|0); - $$pre$phi$i24$iZ2D = $$pre$i23$i;$F4$0$i$i = $842; - } else { - $$sum29$i$i = (($841) + 2)|0; - $848 = ((32544 + ($$sum29$i$i<<2)|0) + 40|0); - $849 = HEAP32[$848>>2]|0; - $850 = HEAP32[((32544 + 16|0))>>2]|0; - $851 = ($849>>>0)<($850>>>0); - if (!($851)) { - $$pre$phi$i24$iZ2D = $848;$F4$0$i$i = $849; - break; - } - _abort(); - // unreachable; - } - } while(0); - HEAP32[$$pre$phi$i24$iZ2D>>2] = $725; - $852 = (($F4$0$i$i) + 12|0); - HEAP32[$852>>2] = $725; - $$sum27$i$i = (($$sum$i19$i) + 8)|0; - $853 = (($tbase$245$i) + ($$sum27$i$i)|0); - HEAP32[$853>>2] = $F4$0$i$i; - $$sum28$i$i = (($$sum$i19$i) + 12)|0; - $854 = (($tbase$245$i) + ($$sum28$i$i)|0); - HEAP32[$854>>2] = $842; - break; - } - $855 = $qsize$0$i$i >>> 8; - $856 = ($855|0)==(0); - do { - if ($856) { - $I7$0$i$i = 0; - } else { - $857 = ($qsize$0$i$i>>>0)>(16777215); - if ($857) { - $I7$0$i$i = 31; - break; - } - $858 = (($855) + 1048320)|0; - $859 = $858 >>> 16; - $860 = $859 & 8; - $861 = $855 << $860; - $862 = (($861) + 520192)|0; - $863 = $862 >>> 16; - $864 = $863 & 4; - $865 = $864 | $860; - $866 = $861 << $864; - $867 = (($866) + 245760)|0; - $868 = $867 >>> 16; - $869 = $868 & 2; - $870 = $865 | $869; - $871 = (14 - ($870))|0; - $872 = $866 << $869; - $873 = $872 >>> 15; - $874 = (($871) + ($873))|0; - $875 = $874 << 1; - $876 = (($874) + 7)|0; - $877 = $qsize$0$i$i >>> $876; - $878 = $877 & 1; - $879 = $878 | $875; - $I7$0$i$i = $879; - } - } while(0); - $880 = ((32544 + ($I7$0$i$i<<2)|0) + 304|0); - $$sum12$i$i = (($$sum$i19$i) + 28)|0; - $881 = (($tbase$245$i) + ($$sum12$i$i)|0); - HEAP32[$881>>2] = $I7$0$i$i; - $$sum13$i$i = (($$sum$i19$i) + 16)|0; - $882 = (($tbase$245$i) + ($$sum13$i$i)|0); - $$sum14$i$i = (($$sum$i19$i) + 20)|0; - $883 = (($tbase$245$i) + ($$sum14$i$i)|0); - HEAP32[$883>>2] = 0; - HEAP32[$882>>2] = 0; - $884 = HEAP32[((32544 + 4|0))>>2]|0; - $885 = 1 << $I7$0$i$i; - $886 = $884 & $885; - $887 = ($886|0)==(0); - if ($887) { - $888 = $884 | $885; - HEAP32[((32544 + 4|0))>>2] = $888; - HEAP32[$880>>2] = $725; - $$sum15$i$i = (($$sum$i19$i) + 24)|0; - $889 = (($tbase$245$i) + ($$sum15$i$i)|0); - HEAP32[$889>>2] = $880; - $$sum16$i$i = (($$sum$i19$i) + 12)|0; - $890 = (($tbase$245$i) + ($$sum16$i$i)|0); - HEAP32[$890>>2] = $725; - $$sum17$i$i = (($$sum$i19$i) + 8)|0; - $891 = (($tbase$245$i) + ($$sum17$i$i)|0); - HEAP32[$891>>2] = $725; - break; - } - $892 = HEAP32[$880>>2]|0; - $893 = ($I7$0$i$i|0)==(31); - if ($893) { - $901 = 0; - } else { - $894 = $I7$0$i$i >>> 1; - $895 = (25 - ($894))|0; - $901 = $895; - } - $896 = (($892) + 4|0); - $897 = HEAP32[$896>>2]|0; - $898 = $897 & -8; - $899 = ($898|0)==($qsize$0$i$i|0); - L442: do { - if ($899) { - $T$0$lcssa$i26$i = $892; - } else { - $900 = $qsize$0$i$i << $901; - $K8$053$i$i = $900;$T$052$i$i = $892; - while(1) { - $908 = $K8$053$i$i >>> 31; - $909 = ((($T$052$i$i) + ($908<<2)|0) + 16|0); - $904 = HEAP32[$909>>2]|0; - $910 = ($904|0)==(0|0); - if ($910) { - break; - } - $902 = $K8$053$i$i << 1; - $903 = (($904) + 4|0); - $905 = HEAP32[$903>>2]|0; - $906 = $905 & -8; - $907 = ($906|0)==($qsize$0$i$i|0); - if ($907) { - $T$0$lcssa$i26$i = $904; - break L442; - } else { - $K8$053$i$i = $902;$T$052$i$i = $904; - } - } - $911 = HEAP32[((32544 + 16|0))>>2]|0; - $912 = ($909>>>0)<($911>>>0); - if ($912) { - _abort(); - // unreachable; - } else { - HEAP32[$909>>2] = $725; - $$sum23$i$i = (($$sum$i19$i) + 24)|0; - $913 = (($tbase$245$i) + ($$sum23$i$i)|0); - HEAP32[$913>>2] = $T$052$i$i; - $$sum24$i$i = (($$sum$i19$i) + 12)|0; - $914 = (($tbase$245$i) + ($$sum24$i$i)|0); - HEAP32[$914>>2] = $725; - $$sum25$i$i = (($$sum$i19$i) + 8)|0; - $915 = (($tbase$245$i) + ($$sum25$i$i)|0); - HEAP32[$915>>2] = $725; - break L345; - } - } - } while(0); - $916 = (($T$0$lcssa$i26$i) + 8|0); - $917 = HEAP32[$916>>2]|0; - $918 = HEAP32[((32544 + 16|0))>>2]|0; - $919 = ($T$0$lcssa$i26$i>>>0)>=($918>>>0); - $920 = ($917>>>0)>=($918>>>0); - $or$cond$i27$i = $919 & $920; - if ($or$cond$i27$i) { - $921 = (($917) + 12|0); - HEAP32[$921>>2] = $725; - HEAP32[$916>>2] = $725; - $$sum20$i$i = (($$sum$i19$i) + 8)|0; - $922 = (($tbase$245$i) + ($$sum20$i$i)|0); - HEAP32[$922>>2] = $917; - $$sum21$i$i = (($$sum$i19$i) + 12)|0; - $923 = (($tbase$245$i) + ($$sum21$i$i)|0); - HEAP32[$923>>2] = $T$0$lcssa$i26$i; - $$sum22$i$i = (($$sum$i19$i) + 24)|0; - $924 = (($tbase$245$i) + ($$sum22$i$i)|0); - HEAP32[$924>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $$sum1819$i$i = $713 | 8; - $925 = (($tbase$245$i) + ($$sum1819$i$i)|0); - $mem$0 = $925; - STACKTOP = sp;return ($mem$0|0); - } - } - $sp$0$i$i$i = ((32544 + 448|0)); - while(1) { - $926 = HEAP32[$sp$0$i$i$i>>2]|0; - $927 = ($926>>>0)>($636>>>0); - if (!($927)) { - $928 = (($sp$0$i$i$i) + 4|0); - $929 = HEAP32[$928>>2]|0; - $930 = (($926) + ($929)|0); - $931 = ($930>>>0)>($636>>>0); - if ($931) { - break; - } - } - $932 = (($sp$0$i$i$i) + 8|0); - $933 = HEAP32[$932>>2]|0; - $sp$0$i$i$i = $933; - } - $$sum$i13$i = (($929) + -47)|0; - $$sum1$i14$i = (($929) + -39)|0; - $934 = (($926) + ($$sum1$i14$i)|0); - $935 = $934; - $936 = $935 & 7; - $937 = ($936|0)==(0); - if ($937) { - $940 = 0; - } else { - $938 = (0 - ($935))|0; - $939 = $938 & 7; - $940 = $939; - } - $$sum2$i15$i = (($$sum$i13$i) + ($940))|0; - $941 = (($926) + ($$sum2$i15$i)|0); - $942 = (($636) + 16|0); - $943 = ($941>>>0)<($942>>>0); - $944 = $943 ? $636 : $941; - $945 = (($944) + 8|0); - $946 = (($tsize$244$i) + -40)|0; - $947 = (($tbase$245$i) + 8|0); - $948 = $947; - $949 = $948 & 7; - $950 = ($949|0)==(0); - if ($950) { - $954 = 0; - } else { - $951 = (0 - ($948))|0; - $952 = $951 & 7; - $954 = $952; - } - $953 = (($tbase$245$i) + ($954)|0); - $955 = (($946) - ($954))|0; - HEAP32[((32544 + 24|0))>>2] = $953; - HEAP32[((32544 + 12|0))>>2] = $955; - $956 = $955 | 1; - $$sum$i$i$i = (($954) + 4)|0; - $957 = (($tbase$245$i) + ($$sum$i$i$i)|0); - HEAP32[$957>>2] = $956; - $$sum2$i$i$i = (($tsize$244$i) + -36)|0; - $958 = (($tbase$245$i) + ($$sum2$i$i$i)|0); - HEAP32[$958>>2] = 40; - $959 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $959; - $960 = (($944) + 4|0); - HEAP32[$960>>2] = 27; - ;HEAP32[$945+0>>2]=HEAP32[((32544 + 448|0))+0>>2]|0;HEAP32[$945+4>>2]=HEAP32[((32544 + 448|0))+4>>2]|0;HEAP32[$945+8>>2]=HEAP32[((32544 + 448|0))+8>>2]|0;HEAP32[$945+12>>2]=HEAP32[((32544 + 448|0))+12>>2]|0; - HEAP32[((32544 + 448|0))>>2] = $tbase$245$i; - HEAP32[((32544 + 452|0))>>2] = $tsize$244$i; - HEAP32[((32544 + 460|0))>>2] = 0; - HEAP32[((32544 + 456|0))>>2] = $945; - $961 = (($944) + 28|0); - HEAP32[$961>>2] = 7; - $962 = (($944) + 32|0); - $963 = ($962>>>0)<($930>>>0); - if ($963) { - $965 = $961; - while(1) { - $964 = (($965) + 4|0); - HEAP32[$964>>2] = 7; - $966 = (($965) + 8|0); - $967 = ($966>>>0)<($930>>>0); - if ($967) { - $965 = $964; - } else { - break; - } - } - } - $968 = ($944|0)==($636|0); - if (!($968)) { - $969 = $944; - $970 = $636; - $971 = (($969) - ($970))|0; - $972 = (($636) + ($971)|0); - $$sum3$i$i = (($971) + 4)|0; - $973 = (($636) + ($$sum3$i$i)|0); - $974 = HEAP32[$973>>2]|0; - $975 = $974 & -2; - HEAP32[$973>>2] = $975; - $976 = $971 | 1; - $977 = (($636) + 4|0); - HEAP32[$977>>2] = $976; - HEAP32[$972>>2] = $971; - $978 = $971 >>> 3; - $979 = ($971>>>0)<(256); - if ($979) { - $980 = $978 << 1; - $981 = ((32544 + ($980<<2)|0) + 40|0); - $982 = HEAP32[32544>>2]|0; - $983 = 1 << $978; - $984 = $982 & $983; - $985 = ($984|0)==(0); - do { - if ($985) { - $986 = $982 | $983; - HEAP32[32544>>2] = $986; - $$sum10$pre$i$i = (($980) + 2)|0; - $$pre$i$i = ((32544 + ($$sum10$pre$i$i<<2)|0) + 40|0); - $$pre$phi$i$iZ2D = $$pre$i$i;$F$0$i$i = $981; - } else { - $$sum11$i$i = (($980) + 2)|0; - $987 = ((32544 + ($$sum11$i$i<<2)|0) + 40|0); - $988 = HEAP32[$987>>2]|0; - $989 = HEAP32[((32544 + 16|0))>>2]|0; - $990 = ($988>>>0)<($989>>>0); - if (!($990)) { - $$pre$phi$i$iZ2D = $987;$F$0$i$i = $988; - break; - } - _abort(); - // unreachable; - } - } while(0); - HEAP32[$$pre$phi$i$iZ2D>>2] = $636; - $991 = (($F$0$i$i) + 12|0); - HEAP32[$991>>2] = $636; - $992 = (($636) + 8|0); - HEAP32[$992>>2] = $F$0$i$i; - $993 = (($636) + 12|0); - HEAP32[$993>>2] = $981; - break; - } - $994 = $971 >>> 8; - $995 = ($994|0)==(0); - if ($995) { - $I1$0$i$i = 0; - } else { - $996 = ($971>>>0)>(16777215); - if ($996) { - $I1$0$i$i = 31; - } else { - $997 = (($994) + 1048320)|0; - $998 = $997 >>> 16; - $999 = $998 & 8; - $1000 = $994 << $999; - $1001 = (($1000) + 520192)|0; - $1002 = $1001 >>> 16; - $1003 = $1002 & 4; - $1004 = $1003 | $999; - $1005 = $1000 << $1003; - $1006 = (($1005) + 245760)|0; - $1007 = $1006 >>> 16; - $1008 = $1007 & 2; - $1009 = $1004 | $1008; - $1010 = (14 - ($1009))|0; - $1011 = $1005 << $1008; - $1012 = $1011 >>> 15; - $1013 = (($1010) + ($1012))|0; - $1014 = $1013 << 1; - $1015 = (($1013) + 7)|0; - $1016 = $971 >>> $1015; - $1017 = $1016 & 1; - $1018 = $1017 | $1014; - $I1$0$i$i = $1018; - } - } - $1019 = ((32544 + ($I1$0$i$i<<2)|0) + 304|0); - $1020 = (($636) + 28|0); - $I1$0$c$i$i = $I1$0$i$i; - HEAP32[$1020>>2] = $I1$0$c$i$i; - $1021 = (($636) + 20|0); - HEAP32[$1021>>2] = 0; - $1022 = (($636) + 16|0); - HEAP32[$1022>>2] = 0; - $1023 = HEAP32[((32544 + 4|0))>>2]|0; - $1024 = 1 << $I1$0$i$i; - $1025 = $1023 & $1024; - $1026 = ($1025|0)==(0); - if ($1026) { - $1027 = $1023 | $1024; - HEAP32[((32544 + 4|0))>>2] = $1027; - HEAP32[$1019>>2] = $636; - $1028 = (($636) + 24|0); - HEAP32[$1028>>2] = $1019; - $1029 = (($636) + 12|0); - HEAP32[$1029>>2] = $636; - $1030 = (($636) + 8|0); - HEAP32[$1030>>2] = $636; - break; - } - $1031 = HEAP32[$1019>>2]|0; - $1032 = ($I1$0$i$i|0)==(31); - if ($1032) { - $1040 = 0; - } else { - $1033 = $I1$0$i$i >>> 1; - $1034 = (25 - ($1033))|0; - $1040 = $1034; - } - $1035 = (($1031) + 4|0); - $1036 = HEAP32[$1035>>2]|0; - $1037 = $1036 & -8; - $1038 = ($1037|0)==($971|0); - L493: do { - if ($1038) { - $T$0$lcssa$i$i = $1031; - } else { - $1039 = $971 << $1040; - $K2$015$i$i = $1039;$T$014$i$i = $1031; - while(1) { - $1047 = $K2$015$i$i >>> 31; - $1048 = ((($T$014$i$i) + ($1047<<2)|0) + 16|0); - $1043 = HEAP32[$1048>>2]|0; - $1049 = ($1043|0)==(0|0); - if ($1049) { - break; - } - $1041 = $K2$015$i$i << 1; - $1042 = (($1043) + 4|0); - $1044 = HEAP32[$1042>>2]|0; - $1045 = $1044 & -8; - $1046 = ($1045|0)==($971|0); - if ($1046) { - $T$0$lcssa$i$i = $1043; - break L493; - } else { - $K2$015$i$i = $1041;$T$014$i$i = $1043; - } - } - $1050 = HEAP32[((32544 + 16|0))>>2]|0; - $1051 = ($1048>>>0)<($1050>>>0); - if ($1051) { - _abort(); - // unreachable; - } else { - HEAP32[$1048>>2] = $636; - $1052 = (($636) + 24|0); - HEAP32[$1052>>2] = $T$014$i$i; - $1053 = (($636) + 12|0); - HEAP32[$1053>>2] = $636; - $1054 = (($636) + 8|0); - HEAP32[$1054>>2] = $636; - break L308; - } - } - } while(0); - $1055 = (($T$0$lcssa$i$i) + 8|0); - $1056 = HEAP32[$1055>>2]|0; - $1057 = HEAP32[((32544 + 16|0))>>2]|0; - $1058 = ($T$0$lcssa$i$i>>>0)>=($1057>>>0); - $1059 = ($1056>>>0)>=($1057>>>0); - $or$cond$i$i = $1058 & $1059; - if ($or$cond$i$i) { - $1060 = (($1056) + 12|0); - HEAP32[$1060>>2] = $636; - HEAP32[$1055>>2] = $636; - $1061 = (($636) + 8|0); - HEAP32[$1061>>2] = $1056; - $1062 = (($636) + 12|0); - HEAP32[$1062>>2] = $T$0$lcssa$i$i; - $1063 = (($636) + 24|0); - HEAP32[$1063>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } - } while(0); - $1064 = HEAP32[((32544 + 12|0))>>2]|0; - $1065 = ($1064>>>0)>($nb$0>>>0); - if ($1065) { - $1066 = (($1064) - ($nb$0))|0; - HEAP32[((32544 + 12|0))>>2] = $1066; - $1067 = HEAP32[((32544 + 24|0))>>2]|0; - $1068 = (($1067) + ($nb$0)|0); - HEAP32[((32544 + 24|0))>>2] = $1068; - $1069 = $1066 | 1; - $$sum$i32 = (($nb$0) + 4)|0; - $1070 = (($1067) + ($$sum$i32)|0); - HEAP32[$1070>>2] = $1069; - $1071 = $nb$0 | 3; - $1072 = (($1067) + 4|0); - HEAP32[$1072>>2] = $1071; - $1073 = (($1067) + 8|0); - $mem$0 = $1073; - STACKTOP = sp;return ($mem$0|0); - } - } - $1074 = (___errno_location()|0); - HEAP32[$1074>>2] = 12; - $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); -} -function _free($mem) { - $mem = $mem|0; - var $$pre = 0, $$pre$phi66Z2D = 0, $$pre$phi68Z2D = 0, $$pre$phiZ2D = 0, $$pre65 = 0, $$pre67 = 0, $$sum = 0, $$sum16$pre = 0, $$sum17 = 0, $$sum18 = 0, $$sum19 = 0, $$sum2 = 0, $$sum20 = 0, $$sum2324 = 0, $$sum25 = 0, $$sum26 = 0, $$sum28 = 0, $$sum29 = 0, $$sum3 = 0, $$sum30 = 0; - var $$sum31 = 0, $$sum32 = 0, $$sum33 = 0, $$sum34 = 0, $$sum35 = 0, $$sum36 = 0, $$sum37 = 0, $$sum5 = 0, $$sum67 = 0, $$sum8 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0; - var $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0; - var $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0; - var $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0; - var $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0; - var $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0; - var $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0; - var $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0; - var $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0; - var $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0; - var $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0; - var $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0; - var $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0; - var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; - var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0; - var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0; - var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F16$0 = 0, $I18$0 = 0, $I18$0$c = 0, $K19$058 = 0, $R$0 = 0, $R$1 = 0, $R7$0 = 0; - var $R7$1 = 0, $RP$0 = 0, $RP9$0 = 0, $T$0$lcssa = 0, $T$057 = 0, $cond = 0, $cond54 = 0, $or$cond = 0, $p$0 = 0, $psize$0 = 0, $psize$1 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($mem|0)==(0|0); - if ($0) { - STACKTOP = sp;return; - } - $1 = (($mem) + -8|0); - $2 = HEAP32[((32544 + 16|0))>>2]|0; - $3 = ($1>>>0)<($2>>>0); - if ($3) { - _abort(); - // unreachable; - } - $4 = (($mem) + -4|0); - $5 = HEAP32[$4>>2]|0; - $6 = $5 & 3; - $7 = ($6|0)==(1); - if ($7) { - _abort(); - // unreachable; - } - $8 = $5 & -8; - $$sum = (($8) + -8)|0; - $9 = (($mem) + ($$sum)|0); - $10 = $5 & 1; - $11 = ($10|0)==(0); - do { - if ($11) { - $12 = HEAP32[$1>>2]|0; - $13 = ($6|0)==(0); - if ($13) { - STACKTOP = sp;return; - } - $$sum2 = (-8 - ($12))|0; - $14 = (($mem) + ($$sum2)|0); - $15 = (($12) + ($8))|0; - $16 = ($14>>>0)<($2>>>0); - if ($16) { - _abort(); - // unreachable; - } - $17 = HEAP32[((32544 + 20|0))>>2]|0; - $18 = ($14|0)==($17|0); - if ($18) { - $$sum3 = (($8) + -4)|0; - $103 = (($mem) + ($$sum3)|0); - $104 = HEAP32[$103>>2]|0; - $105 = $104 & 3; - $106 = ($105|0)==(3); - if (!($106)) { - $p$0 = $14;$psize$0 = $15; - break; - } - HEAP32[((32544 + 8|0))>>2] = $15; - $107 = $104 & -2; - HEAP32[$103>>2] = $107; - $108 = $15 | 1; - $$sum26 = (($$sum2) + 4)|0; - $109 = (($mem) + ($$sum26)|0); - HEAP32[$109>>2] = $108; - HEAP32[$9>>2] = $15; - STACKTOP = sp;return; - } - $19 = $12 >>> 3; - $20 = ($12>>>0)<(256); - if ($20) { - $$sum36 = (($$sum2) + 8)|0; - $21 = (($mem) + ($$sum36)|0); - $22 = HEAP32[$21>>2]|0; - $$sum37 = (($$sum2) + 12)|0; - $23 = (($mem) + ($$sum37)|0); - $24 = HEAP32[$23>>2]|0; - $25 = $19 << 1; - $26 = ((32544 + ($25<<2)|0) + 40|0); - $27 = ($22|0)==($26|0); - if (!($27)) { - $28 = ($22>>>0)<($2>>>0); - if ($28) { - _abort(); - // unreachable; - } - $29 = (($22) + 12|0); - $30 = HEAP32[$29>>2]|0; - $31 = ($30|0)==($14|0); - if (!($31)) { - _abort(); - // unreachable; - } - } - $32 = ($24|0)==($22|0); - if ($32) { - $33 = 1 << $19; - $34 = $33 ^ -1; - $35 = HEAP32[32544>>2]|0; - $36 = $35 & $34; - HEAP32[32544>>2] = $36; - $p$0 = $14;$psize$0 = $15; - break; - } - $37 = ($24|0)==($26|0); - if ($37) { - $$pre67 = (($24) + 8|0); - $$pre$phi68Z2D = $$pre67; - } else { - $38 = ($24>>>0)<($2>>>0); - if ($38) { - _abort(); - // unreachable; - } - $39 = (($24) + 8|0); - $40 = HEAP32[$39>>2]|0; - $41 = ($40|0)==($14|0); - if ($41) { - $$pre$phi68Z2D = $39; - } else { - _abort(); - // unreachable; - } - } - $42 = (($22) + 12|0); - HEAP32[$42>>2] = $24; - HEAP32[$$pre$phi68Z2D>>2] = $22; - $p$0 = $14;$psize$0 = $15; - break; - } - $$sum28 = (($$sum2) + 24)|0; - $43 = (($mem) + ($$sum28)|0); - $44 = HEAP32[$43>>2]|0; - $$sum29 = (($$sum2) + 12)|0; - $45 = (($mem) + ($$sum29)|0); - $46 = HEAP32[$45>>2]|0; - $47 = ($46|0)==($14|0); - do { - if ($47) { - $$sum31 = (($$sum2) + 20)|0; - $57 = (($mem) + ($$sum31)|0); - $58 = HEAP32[$57>>2]|0; - $59 = ($58|0)==(0|0); - if ($59) { - $$sum30 = (($$sum2) + 16)|0; - $60 = (($mem) + ($$sum30)|0); - $61 = HEAP32[$60>>2]|0; - $62 = ($61|0)==(0|0); - if ($62) { - $R$1 = 0; - break; - } else { - $R$0 = $61;$RP$0 = $60; - } - } else { - $R$0 = $58;$RP$0 = $57; - } - while(1) { - $63 = (($R$0) + 20|0); - $64 = HEAP32[$63>>2]|0; - $65 = ($64|0)==(0|0); - if (!($65)) { - $R$0 = $64;$RP$0 = $63; - continue; - } - $66 = (($R$0) + 16|0); - $67 = HEAP32[$66>>2]|0; - $68 = ($67|0)==(0|0); - if ($68) { - break; - } else { - $R$0 = $67;$RP$0 = $66; - } - } - $69 = ($RP$0>>>0)<($2>>>0); - if ($69) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0>>2] = 0; - $R$1 = $R$0; - break; - } - } else { - $$sum35 = (($$sum2) + 8)|0; - $48 = (($mem) + ($$sum35)|0); - $49 = HEAP32[$48>>2]|0; - $50 = ($49>>>0)<($2>>>0); - if ($50) { - _abort(); - // unreachable; - } - $51 = (($49) + 12|0); - $52 = HEAP32[$51>>2]|0; - $53 = ($52|0)==($14|0); - if (!($53)) { - _abort(); - // unreachable; - } - $54 = (($46) + 8|0); - $55 = HEAP32[$54>>2]|0; - $56 = ($55|0)==($14|0); - if ($56) { - HEAP32[$51>>2] = $46; - HEAP32[$54>>2] = $49; - $R$1 = $46; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $70 = ($44|0)==(0|0); - if ($70) { - $p$0 = $14;$psize$0 = $15; - } else { - $$sum32 = (($$sum2) + 28)|0; - $71 = (($mem) + ($$sum32)|0); - $72 = HEAP32[$71>>2]|0; - $73 = ((32544 + ($72<<2)|0) + 304|0); - $74 = HEAP32[$73>>2]|0; - $75 = ($14|0)==($74|0); - if ($75) { - HEAP32[$73>>2] = $R$1; - $cond = ($R$1|0)==(0|0); - if ($cond) { - $76 = 1 << $72; - $77 = $76 ^ -1; - $78 = HEAP32[((32544 + 4|0))>>2]|0; - $79 = $78 & $77; - HEAP32[((32544 + 4|0))>>2] = $79; - $p$0 = $14;$psize$0 = $15; - break; - } - } else { - $80 = HEAP32[((32544 + 16|0))>>2]|0; - $81 = ($44>>>0)<($80>>>0); - if ($81) { - _abort(); - // unreachable; - } - $82 = (($44) + 16|0); - $83 = HEAP32[$82>>2]|0; - $84 = ($83|0)==($14|0); - if ($84) { - HEAP32[$82>>2] = $R$1; - } else { - $85 = (($44) + 20|0); - HEAP32[$85>>2] = $R$1; - } - $86 = ($R$1|0)==(0|0); - if ($86) { - $p$0 = $14;$psize$0 = $15; - break; - } - } - $87 = HEAP32[((32544 + 16|0))>>2]|0; - $88 = ($R$1>>>0)<($87>>>0); - if ($88) { - _abort(); - // unreachable; - } - $89 = (($R$1) + 24|0); - HEAP32[$89>>2] = $44; - $$sum33 = (($$sum2) + 16)|0; - $90 = (($mem) + ($$sum33)|0); - $91 = HEAP32[$90>>2]|0; - $92 = ($91|0)==(0|0); - do { - if (!($92)) { - $93 = ($91>>>0)<($87>>>0); - if ($93) { - _abort(); - // unreachable; - } else { - $94 = (($R$1) + 16|0); - HEAP32[$94>>2] = $91; - $95 = (($91) + 24|0); - HEAP32[$95>>2] = $R$1; - break; - } - } - } while(0); - $$sum34 = (($$sum2) + 20)|0; - $96 = (($mem) + ($$sum34)|0); - $97 = HEAP32[$96>>2]|0; - $98 = ($97|0)==(0|0); - if ($98) { - $p$0 = $14;$psize$0 = $15; - } else { - $99 = HEAP32[((32544 + 16|0))>>2]|0; - $100 = ($97>>>0)<($99>>>0); - if ($100) { - _abort(); - // unreachable; - } else { - $101 = (($R$1) + 20|0); - HEAP32[$101>>2] = $97; - $102 = (($97) + 24|0); - HEAP32[$102>>2] = $R$1; - $p$0 = $14;$psize$0 = $15; - break; - } - } - } - } else { - $p$0 = $1;$psize$0 = $8; - } - } while(0); - $110 = ($p$0>>>0)<($9>>>0); - if (!($110)) { - _abort(); - // unreachable; - } - $$sum25 = (($8) + -4)|0; - $111 = (($mem) + ($$sum25)|0); - $112 = HEAP32[$111>>2]|0; - $113 = $112 & 1; - $114 = ($113|0)==(0); - if ($114) { - _abort(); - // unreachable; - } - $115 = $112 & 2; - $116 = ($115|0)==(0); - if ($116) { - $117 = HEAP32[((32544 + 24|0))>>2]|0; - $118 = ($9|0)==($117|0); - if ($118) { - $119 = HEAP32[((32544 + 12|0))>>2]|0; - $120 = (($119) + ($psize$0))|0; - HEAP32[((32544 + 12|0))>>2] = $120; - HEAP32[((32544 + 24|0))>>2] = $p$0; - $121 = $120 | 1; - $122 = (($p$0) + 4|0); - HEAP32[$122>>2] = $121; - $123 = HEAP32[((32544 + 20|0))>>2]|0; - $124 = ($p$0|0)==($123|0); - if (!($124)) { - STACKTOP = sp;return; - } - HEAP32[((32544 + 20|0))>>2] = 0; - HEAP32[((32544 + 8|0))>>2] = 0; - STACKTOP = sp;return; - } - $125 = HEAP32[((32544 + 20|0))>>2]|0; - $126 = ($9|0)==($125|0); - if ($126) { - $127 = HEAP32[((32544 + 8|0))>>2]|0; - $128 = (($127) + ($psize$0))|0; - HEAP32[((32544 + 8|0))>>2] = $128; - HEAP32[((32544 + 20|0))>>2] = $p$0; - $129 = $128 | 1; - $130 = (($p$0) + 4|0); - HEAP32[$130>>2] = $129; - $131 = (($p$0) + ($128)|0); - HEAP32[$131>>2] = $128; - STACKTOP = sp;return; - } - $132 = $112 & -8; - $133 = (($132) + ($psize$0))|0; - $134 = $112 >>> 3; - $135 = ($112>>>0)<(256); - do { - if ($135) { - $136 = (($mem) + ($8)|0); - $137 = HEAP32[$136>>2]|0; - $$sum2324 = $8 | 4; - $138 = (($mem) + ($$sum2324)|0); - $139 = HEAP32[$138>>2]|0; - $140 = $134 << 1; - $141 = ((32544 + ($140<<2)|0) + 40|0); - $142 = ($137|0)==($141|0); - if (!($142)) { - $143 = HEAP32[((32544 + 16|0))>>2]|0; - $144 = ($137>>>0)<($143>>>0); - if ($144) { - _abort(); - // unreachable; - } - $145 = (($137) + 12|0); - $146 = HEAP32[$145>>2]|0; - $147 = ($146|0)==($9|0); - if (!($147)) { - _abort(); - // unreachable; - } - } - $148 = ($139|0)==($137|0); - if ($148) { - $149 = 1 << $134; - $150 = $149 ^ -1; - $151 = HEAP32[32544>>2]|0; - $152 = $151 & $150; - HEAP32[32544>>2] = $152; - break; - } - $153 = ($139|0)==($141|0); - if ($153) { - $$pre65 = (($139) + 8|0); - $$pre$phi66Z2D = $$pre65; - } else { - $154 = HEAP32[((32544 + 16|0))>>2]|0; - $155 = ($139>>>0)<($154>>>0); - if ($155) { - _abort(); - // unreachable; - } - $156 = (($139) + 8|0); - $157 = HEAP32[$156>>2]|0; - $158 = ($157|0)==($9|0); - if ($158) { - $$pre$phi66Z2D = $156; - } else { - _abort(); - // unreachable; - } - } - $159 = (($137) + 12|0); - HEAP32[$159>>2] = $139; - HEAP32[$$pre$phi66Z2D>>2] = $137; - } else { - $$sum5 = (($8) + 16)|0; - $160 = (($mem) + ($$sum5)|0); - $161 = HEAP32[$160>>2]|0; - $$sum67 = $8 | 4; - $162 = (($mem) + ($$sum67)|0); - $163 = HEAP32[$162>>2]|0; - $164 = ($163|0)==($9|0); - do { - if ($164) { - $$sum9 = (($8) + 12)|0; - $175 = (($mem) + ($$sum9)|0); - $176 = HEAP32[$175>>2]|0; - $177 = ($176|0)==(0|0); - if ($177) { - $$sum8 = (($8) + 8)|0; - $178 = (($mem) + ($$sum8)|0); - $179 = HEAP32[$178>>2]|0; - $180 = ($179|0)==(0|0); - if ($180) { - $R7$1 = 0; - break; - } else { - $R7$0 = $179;$RP9$0 = $178; - } - } else { - $R7$0 = $176;$RP9$0 = $175; - } - while(1) { - $181 = (($R7$0) + 20|0); - $182 = HEAP32[$181>>2]|0; - $183 = ($182|0)==(0|0); - if (!($183)) { - $R7$0 = $182;$RP9$0 = $181; - continue; - } - $184 = (($R7$0) + 16|0); - $185 = HEAP32[$184>>2]|0; - $186 = ($185|0)==(0|0); - if ($186) { - break; - } else { - $R7$0 = $185;$RP9$0 = $184; - } - } - $187 = HEAP32[((32544 + 16|0))>>2]|0; - $188 = ($RP9$0>>>0)<($187>>>0); - if ($188) { - _abort(); - // unreachable; - } else { - HEAP32[$RP9$0>>2] = 0; - $R7$1 = $R7$0; - break; - } - } else { - $165 = (($mem) + ($8)|0); - $166 = HEAP32[$165>>2]|0; - $167 = HEAP32[((32544 + 16|0))>>2]|0; - $168 = ($166>>>0)<($167>>>0); - if ($168) { - _abort(); - // unreachable; - } - $169 = (($166) + 12|0); - $170 = HEAP32[$169>>2]|0; - $171 = ($170|0)==($9|0); - if (!($171)) { - _abort(); - // unreachable; - } - $172 = (($163) + 8|0); - $173 = HEAP32[$172>>2]|0; - $174 = ($173|0)==($9|0); - if ($174) { - HEAP32[$169>>2] = $163; - HEAP32[$172>>2] = $166; - $R7$1 = $163; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $189 = ($161|0)==(0|0); - if (!($189)) { - $$sum18 = (($8) + 20)|0; - $190 = (($mem) + ($$sum18)|0); - $191 = HEAP32[$190>>2]|0; - $192 = ((32544 + ($191<<2)|0) + 304|0); - $193 = HEAP32[$192>>2]|0; - $194 = ($9|0)==($193|0); - if ($194) { - HEAP32[$192>>2] = $R7$1; - $cond54 = ($R7$1|0)==(0|0); - if ($cond54) { - $195 = 1 << $191; - $196 = $195 ^ -1; - $197 = HEAP32[((32544 + 4|0))>>2]|0; - $198 = $197 & $196; - HEAP32[((32544 + 4|0))>>2] = $198; - break; - } - } else { - $199 = HEAP32[((32544 + 16|0))>>2]|0; - $200 = ($161>>>0)<($199>>>0); - if ($200) { - _abort(); - // unreachable; - } - $201 = (($161) + 16|0); - $202 = HEAP32[$201>>2]|0; - $203 = ($202|0)==($9|0); - if ($203) { - HEAP32[$201>>2] = $R7$1; - } else { - $204 = (($161) + 20|0); - HEAP32[$204>>2] = $R7$1; - } - $205 = ($R7$1|0)==(0|0); - if ($205) { - break; - } - } - $206 = HEAP32[((32544 + 16|0))>>2]|0; - $207 = ($R7$1>>>0)<($206>>>0); - if ($207) { - _abort(); - // unreachable; - } - $208 = (($R7$1) + 24|0); - HEAP32[$208>>2] = $161; - $$sum19 = (($8) + 8)|0; - $209 = (($mem) + ($$sum19)|0); - $210 = HEAP32[$209>>2]|0; - $211 = ($210|0)==(0|0); - do { - if (!($211)) { - $212 = ($210>>>0)<($206>>>0); - if ($212) { - _abort(); - // unreachable; - } else { - $213 = (($R7$1) + 16|0); - HEAP32[$213>>2] = $210; - $214 = (($210) + 24|0); - HEAP32[$214>>2] = $R7$1; - break; - } - } - } while(0); - $$sum20 = (($8) + 12)|0; - $215 = (($mem) + ($$sum20)|0); - $216 = HEAP32[$215>>2]|0; - $217 = ($216|0)==(0|0); - if (!($217)) { - $218 = HEAP32[((32544 + 16|0))>>2]|0; - $219 = ($216>>>0)<($218>>>0); - if ($219) { - _abort(); - // unreachable; - } else { - $220 = (($R7$1) + 20|0); - HEAP32[$220>>2] = $216; - $221 = (($216) + 24|0); - HEAP32[$221>>2] = $R7$1; - break; - } - } - } - } - } while(0); - $222 = $133 | 1; - $223 = (($p$0) + 4|0); - HEAP32[$223>>2] = $222; - $224 = (($p$0) + ($133)|0); - HEAP32[$224>>2] = $133; - $225 = HEAP32[((32544 + 20|0))>>2]|0; - $226 = ($p$0|0)==($225|0); - if ($226) { - HEAP32[((32544 + 8|0))>>2] = $133; - STACKTOP = sp;return; - } else { - $psize$1 = $133; - } - } else { - $227 = $112 & -2; - HEAP32[$111>>2] = $227; - $228 = $psize$0 | 1; - $229 = (($p$0) + 4|0); - HEAP32[$229>>2] = $228; - $230 = (($p$0) + ($psize$0)|0); - HEAP32[$230>>2] = $psize$0; - $psize$1 = $psize$0; - } - $231 = $psize$1 >>> 3; - $232 = ($psize$1>>>0)<(256); - if ($232) { - $233 = $231 << 1; - $234 = ((32544 + ($233<<2)|0) + 40|0); - $235 = HEAP32[32544>>2]|0; - $236 = 1 << $231; - $237 = $235 & $236; - $238 = ($237|0)==(0); - if ($238) { - $239 = $235 | $236; - HEAP32[32544>>2] = $239; - $$sum16$pre = (($233) + 2)|0; - $$pre = ((32544 + ($$sum16$pre<<2)|0) + 40|0); - $$pre$phiZ2D = $$pre;$F16$0 = $234; - } else { - $$sum17 = (($233) + 2)|0; - $240 = ((32544 + ($$sum17<<2)|0) + 40|0); - $241 = HEAP32[$240>>2]|0; - $242 = HEAP32[((32544 + 16|0))>>2]|0; - $243 = ($241>>>0)<($242>>>0); - if ($243) { - _abort(); - // unreachable; - } else { - $$pre$phiZ2D = $240;$F16$0 = $241; - } - } - HEAP32[$$pre$phiZ2D>>2] = $p$0; - $244 = (($F16$0) + 12|0); - HEAP32[$244>>2] = $p$0; - $245 = (($p$0) + 8|0); - HEAP32[$245>>2] = $F16$0; - $246 = (($p$0) + 12|0); - HEAP32[$246>>2] = $234; - STACKTOP = sp;return; - } - $247 = $psize$1 >>> 8; - $248 = ($247|0)==(0); - if ($248) { - $I18$0 = 0; - } else { - $249 = ($psize$1>>>0)>(16777215); - if ($249) { - $I18$0 = 31; - } else { - $250 = (($247) + 1048320)|0; - $251 = $250 >>> 16; - $252 = $251 & 8; - $253 = $247 << $252; - $254 = (($253) + 520192)|0; - $255 = $254 >>> 16; - $256 = $255 & 4; - $257 = $256 | $252; - $258 = $253 << $256; - $259 = (($258) + 245760)|0; - $260 = $259 >>> 16; - $261 = $260 & 2; - $262 = $257 | $261; - $263 = (14 - ($262))|0; - $264 = $258 << $261; - $265 = $264 >>> 15; - $266 = (($263) + ($265))|0; - $267 = $266 << 1; - $268 = (($266) + 7)|0; - $269 = $psize$1 >>> $268; - $270 = $269 & 1; - $271 = $270 | $267; - $I18$0 = $271; - } - } - $272 = ((32544 + ($I18$0<<2)|0) + 304|0); - $273 = (($p$0) + 28|0); - $I18$0$c = $I18$0; - HEAP32[$273>>2] = $I18$0$c; - $274 = (($p$0) + 20|0); - HEAP32[$274>>2] = 0; - $275 = (($p$0) + 16|0); - HEAP32[$275>>2] = 0; - $276 = HEAP32[((32544 + 4|0))>>2]|0; - $277 = 1 << $I18$0; - $278 = $276 & $277; - $279 = ($278|0)==(0); - L199: do { - if ($279) { - $280 = $276 | $277; - HEAP32[((32544 + 4|0))>>2] = $280; - HEAP32[$272>>2] = $p$0; - $281 = (($p$0) + 24|0); - HEAP32[$281>>2] = $272; - $282 = (($p$0) + 12|0); - HEAP32[$282>>2] = $p$0; - $283 = (($p$0) + 8|0); - HEAP32[$283>>2] = $p$0; - } else { - $284 = HEAP32[$272>>2]|0; - $285 = ($I18$0|0)==(31); - if ($285) { - $293 = 0; - } else { - $286 = $I18$0 >>> 1; - $287 = (25 - ($286))|0; - $293 = $287; - } - $288 = (($284) + 4|0); - $289 = HEAP32[$288>>2]|0; - $290 = $289 & -8; - $291 = ($290|0)==($psize$1|0); - L205: do { - if ($291) { - $T$0$lcssa = $284; - } else { - $292 = $psize$1 << $293; - $K19$058 = $292;$T$057 = $284; - while(1) { - $300 = $K19$058 >>> 31; - $301 = ((($T$057) + ($300<<2)|0) + 16|0); - $296 = HEAP32[$301>>2]|0; - $302 = ($296|0)==(0|0); - if ($302) { - break; - } - $294 = $K19$058 << 1; - $295 = (($296) + 4|0); - $297 = HEAP32[$295>>2]|0; - $298 = $297 & -8; - $299 = ($298|0)==($psize$1|0); - if ($299) { - $T$0$lcssa = $296; - break L205; - } else { - $K19$058 = $294;$T$057 = $296; - } - } - $303 = HEAP32[((32544 + 16|0))>>2]|0; - $304 = ($301>>>0)<($303>>>0); - if ($304) { - _abort(); - // unreachable; - } else { - HEAP32[$301>>2] = $p$0; - $305 = (($p$0) + 24|0); - HEAP32[$305>>2] = $T$057; - $306 = (($p$0) + 12|0); - HEAP32[$306>>2] = $p$0; - $307 = (($p$0) + 8|0); - HEAP32[$307>>2] = $p$0; - break L199; - } - } - } while(0); - $308 = (($T$0$lcssa) + 8|0); - $309 = HEAP32[$308>>2]|0; - $310 = HEAP32[((32544 + 16|0))>>2]|0; - $311 = ($T$0$lcssa>>>0)>=($310>>>0); - $312 = ($309>>>0)>=($310>>>0); - $or$cond = $311 & $312; - if ($or$cond) { - $313 = (($309) + 12|0); - HEAP32[$313>>2] = $p$0; - HEAP32[$308>>2] = $p$0; - $314 = (($p$0) + 8|0); - HEAP32[$314>>2] = $309; - $315 = (($p$0) + 12|0); - HEAP32[$315>>2] = $T$0$lcssa; - $316 = (($p$0) + 24|0); - HEAP32[$316>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $317 = HEAP32[((32544 + 32|0))>>2]|0; - $318 = (($317) + -1)|0; - HEAP32[((32544 + 32|0))>>2] = $318; - $319 = ($318|0)==(0); - if ($319) { - $sp$0$in$i = ((32544 + 456|0)); - } else { - STACKTOP = sp;return; - } - while(1) { - $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; - $320 = ($sp$0$i|0)==(0|0); - $321 = (($sp$0$i) + 8|0); - if ($320) { - break; - } else { - $sp$0$in$i = $321; - } - } - HEAP32[((32544 + 32|0))>>2] = -1; - STACKTOP = sp;return; -} -function runPostSets() { - -} -function _bitshift64Ashr(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = high >> bits; - return (low >>> bits) | ((high&ander) << (32 - bits)); - } - tempRet0 = (high|0) < 0 ? -1 : 0; - return (high >> (bits - 32))|0; -} -function _i64Subtract(a, b, c, d) { - a = a|0; b = b|0; c = c|0; d = d|0; - var l = 0, h = 0; - l = (a - c)>>>0; - h = (b - d)>>>0; - h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow. - return ((tempRet0 = h,l|0)|0); -} -function _i64Add(a, b, c, d) { - /* - x = a + b*2^32 - y = c + d*2^32 - result = l + h*2^32 - */ - a = a|0; b = b|0; c = c|0; d = d|0; - var l = 0, h = 0; - l = (a + c)>>>0; - h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow. - return ((tempRet0 = h,l|0)|0); -} -function _memset(ptr, value, num) { - ptr = ptr|0; value = value|0; num = num|0; - var stop = 0, value4 = 0, stop4 = 0, unaligned = 0; - stop = (ptr + num)|0; - if ((num|0) >= 20) { - // This is unaligned, but quite large, so work hard to get to aligned settings - value = value & 0xff; - unaligned = ptr & 3; - value4 = value | (value << 8) | (value << 16) | (value << 24); - stop4 = stop & ~3; - if (unaligned) { - unaligned = (ptr + 4 - unaligned)|0; - while ((ptr|0) < (unaligned|0)) { // no need to check for stop, since we have large num - HEAP8[((ptr)>>0)]=value; - ptr = (ptr+1)|0; - } - } - while ((ptr|0) < (stop4|0)) { - HEAP32[((ptr)>>2)]=value4; - ptr = (ptr+4)|0; - } - } - while ((ptr|0) < (stop|0)) { - HEAP8[((ptr)>>0)]=value; - ptr = (ptr+1)|0; - } - return (ptr-num)|0; -} -function _bitshift64Lshr(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = high >>> bits; - return (low >>> bits) | ((high&ander) << (32 - bits)); - } - tempRet0 = 0; - return (high >>> (bits - 32))|0; -} -function _bitshift64Shl(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits)); - return low << bits; - } - tempRet0 = low << (bits - 32); - return 0; -} -function _strlen(ptr) { - ptr = ptr|0; - var curr = 0; - curr = ptr; - while (((HEAP8[((curr)>>0)])|0)) { - curr = (curr + 1)|0; - } - return (curr - ptr)|0; -} -function _memcpy(dest, src, num) { - - dest = dest|0; src = src|0; num = num|0; - var ret = 0; - if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; - ret = dest|0; - if ((dest&3) == (src&3)) { - while (dest & 3) { - if ((num|0) == 0) return ret|0; - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); - dest = (dest+1)|0; - src = (src+1)|0; - num = (num-1)|0; - } - while ((num|0) >= 4) { - HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0); - dest = (dest+4)|0; - src = (src+4)|0; - num = (num-4)|0; - } - } - while ((num|0) > 0) { - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); - dest = (dest+1)|0; - src = (src+1)|0; - num = (num-1)|0; - } - return ret|0; -} -function _memmove(dest, src, num) { - dest = dest|0; src = src|0; num = num|0; - var ret = 0; - if (((src|0) < (dest|0)) & ((dest|0) < ((src + num)|0))) { - // Unlikely case: Copy backwards in a safe manner - ret = dest; - src = (src + num)|0; - dest = (dest + num)|0; - while ((num|0) > 0) { - dest = (dest - 1)|0; - src = (src - 1)|0; - num = (num - 1)|0; - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); - } - dest = ret; - } else { - _memcpy(dest, src, num) | 0; - } - return dest | 0; -} -function _llvm_ctlz_i32(x) { - x = x|0; - var ret = 0; - ret = ((HEAP8[(((ctlz_i8)+(x >>> 24))>>0)])|0); - if ((ret|0) < 8) return ret|0; - ret = ((HEAP8[(((ctlz_i8)+((x >> 16)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 8)|0; - ret = ((HEAP8[(((ctlz_i8)+((x >> 8)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 16)|0; - return (((HEAP8[(((ctlz_i8)+(x&0xff))>>0)])|0) + 24)|0; - } - -function _llvm_cttz_i32(x) { - x = x|0; - var ret = 0; - ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0); - if ((ret|0) < 8) return ret|0; - ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 8)|0; - ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 16)|0; - return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0; - } - -// ======== compiled code from system/lib/compiler-rt , see readme therein -function ___muldsi3($a, $b) { - $a = $a | 0; - $b = $b | 0; - var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0; - $1 = $a & 65535; - $2 = $b & 65535; - $3 = Math_imul($2, $1) | 0; - $6 = $a >>> 16; - $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0; - $11 = $b >>> 16; - $12 = Math_imul($11, $1) | 0; - return (tempRet0 = (($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0, 0 | ($8 + $12 << 16 | $3 & 65535)) | 0; -} -function ___divdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $7$0 = 0, $7$1 = 0, $8$0 = 0, $10$0 = 0; - $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; - $4$1 = tempRet0; - $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; - $7$0 = $2$0 ^ $1$0; - $7$1 = $2$1 ^ $1$1; - $8$0 = ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, 0) | 0; - $10$0 = _i64Subtract($8$0 ^ $7$0, tempRet0 ^ $7$1, $7$0, $7$1) | 0; - return (tempRet0 = tempRet0, $10$0) | 0; -} -function ___remdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $rem = 0, $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $10$0 = 0, $10$1 = 0, __stackBase__ = 0; - __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; - $rem = __stackBase__ | 0; - $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; - $4$1 = tempRet0; - $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; - ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, $rem) | 0; - $10$0 = _i64Subtract(HEAP32[$rem >> 2] ^ $1$0, HEAP32[$rem + 4 >> 2] ^ $1$1, $1$0, $1$1) | 0; - $10$1 = tempRet0; - STACKTOP = __stackBase__; - return (tempRet0 = $10$1, $10$0) | 0; -} -function ___muldi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0; - $x_sroa_0_0_extract_trunc = $a$0; - $y_sroa_0_0_extract_trunc = $b$0; - $1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0; - $1$1 = tempRet0; - $2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0; - return (tempRet0 = ((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0, 0 | $1$0 & -1) | 0; -} -function ___udivdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $1$0 = 0; - $1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0; - return (tempRet0 = tempRet0, $1$0) | 0; -} -function ___uremdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $rem = 0, __stackBase__ = 0; - __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; - $rem = __stackBase__ | 0; - ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0; - STACKTOP = __stackBase__; - return (tempRet0 = HEAP32[$rem + 4 >> 2] | 0, HEAP32[$rem >> 2] | 0) | 0; -} -function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - $rem = $rem | 0; - var $n_sroa_0_0_extract_trunc = 0, $n_sroa_1_4_extract_shift$0 = 0, $n_sroa_1_4_extract_trunc = 0, $d_sroa_0_0_extract_trunc = 0, $d_sroa_1_4_extract_shift$0 = 0, $d_sroa_1_4_extract_trunc = 0, $4 = 0, $17 = 0, $37 = 0, $49 = 0, $51 = 0, $57 = 0, $58 = 0, $66 = 0, $78 = 0, $86 = 0, $88 = 0, $89 = 0, $91 = 0, $92 = 0, $95 = 0, $105 = 0, $117 = 0, $119 = 0, $125 = 0, $126 = 0, $130 = 0, $q_sroa_1_1_ph = 0, $q_sroa_0_1_ph = 0, $r_sroa_1_1_ph = 0, $r_sroa_0_1_ph = 0, $sr_1_ph = 0, $d_sroa_0_0_insert_insert99$0 = 0, $d_sroa_0_0_insert_insert99$1 = 0, $137$0 = 0, $137$1 = 0, $carry_0203 = 0, $sr_1202 = 0, $r_sroa_0_1201 = 0, $r_sroa_1_1200 = 0, $q_sroa_0_1199 = 0, $q_sroa_1_1198 = 0, $147 = 0, $149 = 0, $r_sroa_0_0_insert_insert42$0 = 0, $r_sroa_0_0_insert_insert42$1 = 0, $150$1 = 0, $151$0 = 0, $152 = 0, $154$0 = 0, $r_sroa_0_0_extract_trunc = 0, $r_sroa_1_4_extract_trunc = 0, $155 = 0, $carry_0_lcssa$0 = 0, $carry_0_lcssa$1 = 0, $r_sroa_0_1_lcssa = 0, $r_sroa_1_1_lcssa = 0, $q_sroa_0_1_lcssa = 0, $q_sroa_1_1_lcssa = 0, $q_sroa_0_0_insert_ext75$0 = 0, $q_sroa_0_0_insert_ext75$1 = 0, $q_sroa_0_0_insert_insert77$1 = 0, $_0$0 = 0, $_0$1 = 0; - $n_sroa_0_0_extract_trunc = $a$0; - $n_sroa_1_4_extract_shift$0 = $a$1; - $n_sroa_1_4_extract_trunc = $n_sroa_1_4_extract_shift$0; - $d_sroa_0_0_extract_trunc = $b$0; - $d_sroa_1_4_extract_shift$0 = $b$1; - $d_sroa_1_4_extract_trunc = $d_sroa_1_4_extract_shift$0; - if (($n_sroa_1_4_extract_trunc | 0) == 0) { - $4 = ($rem | 0) != 0; - if (($d_sroa_1_4_extract_trunc | 0) == 0) { - if ($4) { - HEAP32[$rem >> 2] = ($n_sroa_0_0_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); - HEAP32[$rem + 4 >> 2] = 0; - } - $_0$1 = 0; - $_0$0 = ($n_sroa_0_0_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } else { - if (!$4) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - HEAP32[$rem >> 2] = $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - } - $17 = ($d_sroa_1_4_extract_trunc | 0) == 0; - do { - if (($d_sroa_0_0_extract_trunc | 0) == 0) { - if ($17) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); - HEAP32[$rem + 4 >> 2] = 0; - } - $_0$1 = 0; - $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - if (($n_sroa_0_0_extract_trunc | 0) == 0) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0; - HEAP32[$rem + 4 >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_1_4_extract_trunc >>> 0); - } - $_0$1 = 0; - $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_1_4_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - $37 = $d_sroa_1_4_extract_trunc - 1 | 0; - if (($37 & $d_sroa_1_4_extract_trunc | 0) == 0) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $37 & $n_sroa_1_4_extract_trunc | $a$1 & 0; - } - $_0$1 = 0; - $_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0); - return (tempRet0 = $_0$1, $_0$0) | 0; - } - $49 = _llvm_ctlz_i32($d_sroa_1_4_extract_trunc | 0) | 0; - $51 = $49 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - if ($51 >>> 0 <= 30) { - $57 = $51 + 1 | 0; - $58 = 31 - $51 | 0; - $sr_1_ph = $57; - $r_sroa_0_1_ph = $n_sroa_1_4_extract_trunc << $58 | $n_sroa_0_0_extract_trunc >>> ($57 >>> 0); - $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($57 >>> 0); - $q_sroa_0_1_ph = 0; - $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $58; - break; - } - if (($rem | 0) == 0) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } else { - if (!$17) { - $117 = _llvm_ctlz_i32($d_sroa_1_4_extract_trunc | 0) | 0; - $119 = $117 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - if ($119 >>> 0 <= 31) { - $125 = $119 + 1 | 0; - $126 = 31 - $119 | 0; - $130 = $119 - 31 >> 31; - $sr_1_ph = $125; - $r_sroa_0_1_ph = $n_sroa_0_0_extract_trunc >>> ($125 >>> 0) & $130 | $n_sroa_1_4_extract_trunc << $126; - $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($125 >>> 0) & $130; - $q_sroa_0_1_ph = 0; - $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $126; - break; - } - if (($rem | 0) == 0) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - $66 = $d_sroa_0_0_extract_trunc - 1 | 0; - if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) { - $86 = (_llvm_ctlz_i32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0; - $88 = $86 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - $89 = 64 - $88 | 0; - $91 = 32 - $88 | 0; - $92 = $91 >> 31; - $95 = $88 - 32 | 0; - $105 = $95 >> 31; - $sr_1_ph = $88; - $r_sroa_0_1_ph = $91 - 1 >> 31 & $n_sroa_1_4_extract_trunc >>> ($95 >>> 0) | ($n_sroa_1_4_extract_trunc << $91 | $n_sroa_0_0_extract_trunc >>> ($88 >>> 0)) & $105; - $r_sroa_1_1_ph = $105 & $n_sroa_1_4_extract_trunc >>> ($88 >>> 0); - $q_sroa_0_1_ph = $n_sroa_0_0_extract_trunc << $89 & $92; - $q_sroa_1_1_ph = ($n_sroa_1_4_extract_trunc << $89 | $n_sroa_0_0_extract_trunc >>> ($95 >>> 0)) & $92 | $n_sroa_0_0_extract_trunc << $91 & $88 - 33 >> 31; - break; - } - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = $66 & $n_sroa_0_0_extract_trunc; - HEAP32[$rem + 4 >> 2] = 0; - } - if (($d_sroa_0_0_extract_trunc | 0) == 1) { - $_0$1 = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$0 = 0 | $a$0 & -1; - return (tempRet0 = $_0$1, $_0$0) | 0; - } else { - $78 = _llvm_cttz_i32($d_sroa_0_0_extract_trunc | 0) | 0; - $_0$1 = 0 | $n_sroa_1_4_extract_trunc >>> ($78 >>> 0); - $_0$0 = $n_sroa_1_4_extract_trunc << 32 - $78 | $n_sroa_0_0_extract_trunc >>> ($78 >>> 0) | 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - } - } while (0); - if (($sr_1_ph | 0) == 0) { - $q_sroa_1_1_lcssa = $q_sroa_1_1_ph; - $q_sroa_0_1_lcssa = $q_sroa_0_1_ph; - $r_sroa_1_1_lcssa = $r_sroa_1_1_ph; - $r_sroa_0_1_lcssa = $r_sroa_0_1_ph; - $carry_0_lcssa$1 = 0; - $carry_0_lcssa$0 = 0; - } else { - $d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1; - $d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0; - $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0, $d_sroa_0_0_insert_insert99$1, -1, -1) | 0; - $137$1 = tempRet0; - $q_sroa_1_1198 = $q_sroa_1_1_ph; - $q_sroa_0_1199 = $q_sroa_0_1_ph; - $r_sroa_1_1200 = $r_sroa_1_1_ph; - $r_sroa_0_1201 = $r_sroa_0_1_ph; - $sr_1202 = $sr_1_ph; - $carry_0203 = 0; - while (1) { - $147 = $q_sroa_0_1199 >>> 31 | $q_sroa_1_1198 << 1; - $149 = $carry_0203 | $q_sroa_0_1199 << 1; - $r_sroa_0_0_insert_insert42$0 = 0 | ($r_sroa_0_1201 << 1 | $q_sroa_1_1198 >>> 31); - $r_sroa_0_0_insert_insert42$1 = $r_sroa_0_1201 >>> 31 | $r_sroa_1_1200 << 1 | 0; - _i64Subtract($137$0, $137$1, $r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1) | 0; - $150$1 = tempRet0; - $151$0 = $150$1 >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1; - $152 = $151$0 & 1; - $154$0 = _i64Subtract($r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1, $151$0 & $d_sroa_0_0_insert_insert99$0, ((($150$1 | 0) < 0 ? -1 : 0) >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1) & $d_sroa_0_0_insert_insert99$1) | 0; - $r_sroa_0_0_extract_trunc = $154$0; - $r_sroa_1_4_extract_trunc = tempRet0; - $155 = $sr_1202 - 1 | 0; - if (($155 | 0) == 0) { - break; - } else { - $q_sroa_1_1198 = $147; - $q_sroa_0_1199 = $149; - $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc; - $sr_1202 = $155; - $carry_0203 = $152; - } - } - $q_sroa_1_1_lcssa = $147; - $q_sroa_0_1_lcssa = $149; - $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc; - $carry_0_lcssa$1 = 0; - $carry_0_lcssa$0 = $152; - } - $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa; - $q_sroa_0_0_insert_ext75$1 = 0; - $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1; - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa; - HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0; - } - $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1; - $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0; - return (tempRet0 = $_0$1, $_0$0) | 0; -} -// ======================================================================= - - - -// EMSCRIPTEN_END_FUNCS - - - - // EMSCRIPTEN_END_FUNCS - - - return { _curve25519_verify: _curve25519_verify, _crypto_sign_ed25519_ref10_ge_scalarmult_base: _crypto_sign_ed25519_ref10_ge_scalarmult_base, _curve25519_sign: _curve25519_sign, _free: _free, _i64Add: _i64Add, _memmove: _memmove, _bitshift64Ashr: _bitshift64Ashr, _sph_sha512_init: _sph_sha512_init, _curve25519_donna: _curve25519_donna, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, _strlen: _strlen, _bitshift64Lshr: _bitshift64Lshr, _i64Subtract: _i64Subtract, _bitshift64Shl: _bitshift64Shl, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, getTempRet0: getTempRet0 }; -}) -// EMSCRIPTEN_END_ASM -(Module.asmGlobalArg, Module.asmLibraryArg, buffer); -var _curve25519_verify = Module["_curve25519_verify"] = asm["_curve25519_verify"]; -var _crypto_sign_ed25519_ref10_ge_scalarmult_base = Module["_crypto_sign_ed25519_ref10_ge_scalarmult_base"] = asm["_crypto_sign_ed25519_ref10_ge_scalarmult_base"]; -var _curve25519_sign = Module["_curve25519_sign"] = asm["_curve25519_sign"]; -var _free = Module["_free"] = asm["_free"]; -var _i64Add = Module["_i64Add"] = asm["_i64Add"]; -var _memmove = Module["_memmove"] = asm["_memmove"]; -var _bitshift64Ashr = Module["_bitshift64Ashr"] = asm["_bitshift64Ashr"]; -var _sph_sha512_init = Module["_sph_sha512_init"] = asm["_sph_sha512_init"]; -var _curve25519_donna = Module["_curve25519_donna"] = asm["_curve25519_donna"]; -var _memset = Module["_memset"] = asm["_memset"]; -var _malloc = Module["_malloc"] = asm["_malloc"]; -var _memcpy = Module["_memcpy"] = asm["_memcpy"]; -var _strlen = Module["_strlen"] = asm["_strlen"]; -var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"]; -var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"]; -var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"]; -var runPostSets = Module["runPostSets"] = asm["runPostSets"]; - -Runtime.stackAlloc = asm['stackAlloc']; -Runtime.stackSave = asm['stackSave']; -Runtime.stackRestore = asm['stackRestore']; -Runtime.setTempRet0 = asm['setTempRet0']; -Runtime.getTempRet0 = asm['getTempRet0']; - - -// TODO: strip out parts of this we do not need - -//======= begin closure i64 code ======= - -// Copyright 2009 The Closure Library Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Defines a Long class for representing a 64-bit two's-complement - * integer value, which faithfully simulates the behavior of a Java "long". This - * implementation is derived from LongLib in GWT. - * - */ - -var i64Math = (function() { // Emscripten wrapper - var goog = { math: {} }; - - - /** - * Constructs a 64-bit two's-complement integer, given its low and high 32-bit - * values as *signed* integers. See the from* functions below for more - * convenient ways of constructing Longs. - * - * The internal representation of a long is the two given signed, 32-bit values. - * We use 32-bit pieces because these are the size of integers on which - * Javascript performs bit-operations. For operations like addition and - * multiplication, we split each number into 16-bit pieces, which can easily be - * multiplied within Javascript's floating-point representation without overflow - * or change in sign. - * - * In the algorithms below, we frequently reduce the negative case to the - * positive case by negating the input(s) and then post-processing the result. - * Note that we must ALWAYS check specially whether those values are MIN_VALUE - * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as - * a positive number, it overflows back into a negative). Not handling this - * case would often result in infinite recursion. - * - * @param {number} low The low (signed) 32 bits of the long. - * @param {number} high The high (signed) 32 bits of the long. - * @constructor - */ - goog.math.Long = function(low, high) { - /** - * @type {number} - * @private - */ - this.low_ = low | 0; // force into 32 signed bits. - - /** - * @type {number} - * @private - */ - this.high_ = high | 0; // force into 32 signed bits. - }; - - - // NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the - // from* methods on which they depend. - - - /** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @private - */ - goog.math.Long.IntCache_ = {}; - - - /** - * Returns a Long representing the given (32-bit) integer value. - * @param {number} value The 32-bit integer in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromInt = function(value) { - if (-128 <= value && value < 128) { - var cachedObj = goog.math.Long.IntCache_[value]; - if (cachedObj) { - return cachedObj; - } - } - - var obj = new goog.math.Long(value | 0, value < 0 ? -1 : 0); - if (-128 <= value && value < 128) { - goog.math.Long.IntCache_[value] = obj; - } - return obj; - }; - - - /** - * Returns a Long representing the given value, provided that it is a finite - * number. Otherwise, zero is returned. - * @param {number} value The number in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromNumber = function(value) { - if (isNaN(value) || !isFinite(value)) { - return goog.math.Long.ZERO; - } else if (value <= -goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MIN_VALUE; - } else if (value + 1 >= goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MAX_VALUE; - } else if (value < 0) { - return goog.math.Long.fromNumber(-value).negate(); - } else { - return new goog.math.Long( - (value % goog.math.Long.TWO_PWR_32_DBL_) | 0, - (value / goog.math.Long.TWO_PWR_32_DBL_) | 0); - } - }; - - - /** - * Returns a Long representing the 64-bit integer that comes by concatenating - * the given high and low bits. Each is assumed to use 32 bits. - * @param {number} lowBits The low 32-bits. - * @param {number} highBits The high 32-bits. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromBits = function(lowBits, highBits) { - return new goog.math.Long(lowBits, highBits); - }; - - - /** - * Returns a Long representation of the given string, written using the given - * radix. - * @param {string} str The textual representation of the Long. - * @param {number=} opt_radix The radix in which the text is written. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromString = function(str, opt_radix) { - if (str.length == 0) { - throw Error('number format error: empty string'); - } - - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (str.charAt(0) == '-') { - return goog.math.Long.fromString(str.substring(1), radix).negate(); - } else if (str.indexOf('-') >= 0) { - throw Error('number format error: interior "-" character: ' + str); - } - - // Do several (8) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 8)); - - var result = goog.math.Long.ZERO; - for (var i = 0; i < str.length; i += 8) { - var size = Math.min(8, str.length - i); - var value = parseInt(str.substring(i, i + size), radix); - if (size < 8) { - var power = goog.math.Long.fromNumber(Math.pow(radix, size)); - result = result.multiply(power).add(goog.math.Long.fromNumber(value)); - } else { - result = result.multiply(radixToPower); - result = result.add(goog.math.Long.fromNumber(value)); - } - } - return result; - }; - - - // NOTE: the compiler should inline these constant values below and then remove - // these variables, so there should be no runtime penalty for these. - - - /** - * Number used repeated below in calculations. This must appear before the - * first call to any from* function below. - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_16_DBL_ = 1 << 16; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_24_DBL_ = 1 << 24; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_32_DBL_ = - goog.math.Long.TWO_PWR_16_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_31_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ / 2; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_48_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_64_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_32_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_63_DBL_ = - goog.math.Long.TWO_PWR_64_DBL_ / 2; - - - /** @type {!goog.math.Long} */ - goog.math.Long.ZERO = goog.math.Long.fromInt(0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.ONE = goog.math.Long.fromInt(1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.NEG_ONE = goog.math.Long.fromInt(-1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MAX_VALUE = - goog.math.Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MIN_VALUE = goog.math.Long.fromBits(0, 0x80000000 | 0); - - - /** - * @type {!goog.math.Long} - * @private - */ - goog.math.Long.TWO_PWR_24_ = goog.math.Long.fromInt(1 << 24); - - - /** @return {number} The value, assuming it is a 32-bit integer. */ - goog.math.Long.prototype.toInt = function() { - return this.low_; - }; - - - /** @return {number} The closest floating-point representation to this value. */ - goog.math.Long.prototype.toNumber = function() { - return this.high_ * goog.math.Long.TWO_PWR_32_DBL_ + - this.getLowBitsUnsigned(); - }; - - - /** - * @param {number=} opt_radix The radix in which the text should be written. - * @return {string} The textual representation of this value. - */ - goog.math.Long.prototype.toString = function(opt_radix) { - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (this.isZero()) { - return '0'; - } - - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - // We need to change the Long value before it can be negated, so we remove - // the bottom-most digit in this base and then recurse to do the rest. - var radixLong = goog.math.Long.fromNumber(radix); - var div = this.div(radixLong); - var rem = div.multiply(radixLong).subtract(this); - return div.toString(radix) + rem.toInt().toString(radix); - } else { - return '-' + this.negate().toString(radix); - } - } - - // Do several (6) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 6)); - - var rem = this; - var result = ''; - while (true) { - var remDiv = rem.div(radixToPower); - var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt(); - var digits = intval.toString(radix); - - rem = remDiv; - if (rem.isZero()) { - return digits + result; - } else { - while (digits.length < 6) { - digits = '0' + digits; - } - result = '' + digits + result; - } - } - }; - - - /** @return {number} The high 32-bits as a signed value. */ - goog.math.Long.prototype.getHighBits = function() { - return this.high_; - }; - - - /** @return {number} The low 32-bits as a signed value. */ - goog.math.Long.prototype.getLowBits = function() { - return this.low_; - }; - - - /** @return {number} The low 32-bits as an unsigned value. */ - goog.math.Long.prototype.getLowBitsUnsigned = function() { - return (this.low_ >= 0) ? - this.low_ : goog.math.Long.TWO_PWR_32_DBL_ + this.low_; - }; - - - /** - * @return {number} Returns the number of bits needed to represent the absolute - * value of this Long. - */ - goog.math.Long.prototype.getNumBitsAbs = function() { - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return 64; - } else { - return this.negate().getNumBitsAbs(); - } - } else { - var val = this.high_ != 0 ? this.high_ : this.low_; - for (var bit = 31; bit > 0; bit--) { - if ((val & (1 << bit)) != 0) { - break; - } - } - return this.high_ != 0 ? bit + 33 : bit + 1; - } - }; - - - /** @return {boolean} Whether this value is zero. */ - goog.math.Long.prototype.isZero = function() { - return this.high_ == 0 && this.low_ == 0; - }; - - - /** @return {boolean} Whether this value is negative. */ - goog.math.Long.prototype.isNegative = function() { - return this.high_ < 0; - }; - - - /** @return {boolean} Whether this value is odd. */ - goog.math.Long.prototype.isOdd = function() { - return (this.low_ & 1) == 1; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long equals the other. - */ - goog.math.Long.prototype.equals = function(other) { - return (this.high_ == other.high_) && (this.low_ == other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long does not equal the other. - */ - goog.math.Long.prototype.notEquals = function(other) { - return (this.high_ != other.high_) || (this.low_ != other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than the other. - */ - goog.math.Long.prototype.lessThan = function(other) { - return this.compare(other) < 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than or equal to the other. - */ - goog.math.Long.prototype.lessThanOrEqual = function(other) { - return this.compare(other) <= 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than the other. - */ - goog.math.Long.prototype.greaterThan = function(other) { - return this.compare(other) > 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than or equal to the other. - */ - goog.math.Long.prototype.greaterThanOrEqual = function(other) { - return this.compare(other) >= 0; - }; - - - /** - * Compares this Long with the given one. - * @param {goog.math.Long} other Long to compare against. - * @return {number} 0 if they are the same, 1 if the this is greater, and -1 - * if the given one is greater. - */ - goog.math.Long.prototype.compare = function(other) { - if (this.equals(other)) { - return 0; - } - - var thisNeg = this.isNegative(); - var otherNeg = other.isNegative(); - if (thisNeg && !otherNeg) { - return -1; - } - if (!thisNeg && otherNeg) { - return 1; - } - - // at this point, the signs are the same, so subtraction will not overflow - if (this.subtract(other).isNegative()) { - return -1; - } else { - return 1; - } - }; - - - /** @return {!goog.math.Long} The negation of this value. */ - goog.math.Long.prototype.negate = function() { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.MIN_VALUE; - } else { - return this.not().add(goog.math.Long.ONE); - } - }; - - - /** - * Returns the sum of this and the given Long. - * @param {goog.math.Long} other Long to add to this one. - * @return {!goog.math.Long} The sum of this and the given Long. - */ - goog.math.Long.prototype.add = function(other) { - // Divide each number into 4 chunks of 16 bits, and then sum the chunks. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 + b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns the difference of this and the given Long. - * @param {goog.math.Long} other Long to subtract from this. - * @return {!goog.math.Long} The difference of this and the given Long. - */ - goog.math.Long.prototype.subtract = function(other) { - return this.add(other.negate()); - }; - - - /** - * Returns the product of this and the given long. - * @param {goog.math.Long} other Long to multiply with this. - * @return {!goog.math.Long} The product of this and the other. - */ - goog.math.Long.prototype.multiply = function(other) { - if (this.isZero()) { - return goog.math.Long.ZERO; - } else if (other.isZero()) { - return goog.math.Long.ZERO; - } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - return other.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return this.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().multiply(other.negate()); - } else { - return this.negate().multiply(other).negate(); - } - } else if (other.isNegative()) { - return this.multiply(other.negate()).negate(); - } - - // If both longs are small, use float multiplication - if (this.lessThan(goog.math.Long.TWO_PWR_24_) && - other.lessThan(goog.math.Long.TWO_PWR_24_)) { - return goog.math.Long.fromNumber(this.toNumber() * other.toNumber()); - } - - // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. - // We can skip products that would overflow. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns this Long divided by the given one. - * @param {goog.math.Long} other Long by which to divide. - * @return {!goog.math.Long} This Long divided by the given one. - */ - goog.math.Long.prototype.div = function(other) { - if (other.isZero()) { - throw Error('division by zero'); - } else if (this.isZero()) { - return goog.math.Long.ZERO; - } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - if (other.equals(goog.math.Long.ONE) || - other.equals(goog.math.Long.NEG_ONE)) { - return goog.math.Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ONE; - } else { - // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. - var halfThis = this.shiftRight(1); - var approx = halfThis.div(other).shiftLeft(1); - if (approx.equals(goog.math.Long.ZERO)) { - return other.isNegative() ? goog.math.Long.ONE : goog.math.Long.NEG_ONE; - } else { - var rem = this.subtract(other.multiply(approx)); - var result = approx.add(rem.div(other)); - return result; - } - } - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().div(other.negate()); - } else { - return this.negate().div(other).negate(); - } - } else if (other.isNegative()) { - return this.div(other.negate()).negate(); - } - - // Repeat the following until the remainder is less than other: find a - // floating-point that approximates remainder / other *from below*, add this - // into the result, and subtract it from the remainder. It is critical that - // the approximate value is less than or equal to the real value so that the - // remainder never becomes negative. - var res = goog.math.Long.ZERO; - var rem = this; - while (rem.greaterThanOrEqual(other)) { - // Approximate the result of division. This may be a little greater or - // smaller than the actual value. - var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber())); - - // We will tweak the approximate result by changing it in the 48-th digit or - // the smallest non-fractional digit, whichever is larger. - var log2 = Math.ceil(Math.log(approx) / Math.LN2); - var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48); - - // Decrease the approximation until it is smaller than the remainder. Note - // that if it is too large, the product overflows and is negative. - var approxRes = goog.math.Long.fromNumber(approx); - var approxRem = approxRes.multiply(other); - while (approxRem.isNegative() || approxRem.greaterThan(rem)) { - approx -= delta; - approxRes = goog.math.Long.fromNumber(approx); - approxRem = approxRes.multiply(other); - } - - // We know the answer can't be zero... and actually, zero would cause - // infinite recursion since we would make no progress. - if (approxRes.isZero()) { - approxRes = goog.math.Long.ONE; - } - - res = res.add(approxRes); - rem = rem.subtract(approxRem); - } - return res; - }; - - - /** - * Returns this Long modulo the given one. - * @param {goog.math.Long} other Long by which to mod. - * @return {!goog.math.Long} This Long modulo the given one. - */ - goog.math.Long.prototype.modulo = function(other) { - return this.subtract(this.div(other).multiply(other)); - }; - - - /** @return {!goog.math.Long} The bitwise-NOT of this value. */ - goog.math.Long.prototype.not = function() { - return goog.math.Long.fromBits(~this.low_, ~this.high_); - }; - - - /** - * Returns the bitwise-AND of this Long and the given one. - * @param {goog.math.Long} other The Long with which to AND. - * @return {!goog.math.Long} The bitwise-AND of this and the other. - */ - goog.math.Long.prototype.and = function(other) { - return goog.math.Long.fromBits(this.low_ & other.low_, - this.high_ & other.high_); - }; - - - /** - * Returns the bitwise-OR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to OR. - * @return {!goog.math.Long} The bitwise-OR of this and the other. - */ - goog.math.Long.prototype.or = function(other) { - return goog.math.Long.fromBits(this.low_ | other.low_, - this.high_ | other.high_); - }; - - - /** - * Returns the bitwise-XOR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to XOR. - * @return {!goog.math.Long} The bitwise-XOR of this and the other. - */ - goog.math.Long.prototype.xor = function(other) { - return goog.math.Long.fromBits(this.low_ ^ other.low_, - this.high_ ^ other.high_); - }; - - - /** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the left by the given amount. - */ - goog.math.Long.prototype.shiftLeft = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var low = this.low_; - if (numBits < 32) { - var high = this.high_; - return goog.math.Long.fromBits( - low << numBits, - (high << numBits) | (low >>> (32 - numBits))); - } else { - return goog.math.Long.fromBits(0, low << (numBits - 32)); - } - } - }; - - - /** - * Returns this Long with bits shifted to the right by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount. - */ - goog.math.Long.prototype.shiftRight = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >> numBits); - } else { - return goog.math.Long.fromBits( - high >> (numBits - 32), - high >= 0 ? 0 : -1); - } - } - }; - - - /** - * Returns this Long with bits shifted to the right by the given amount, with - * the new top bits matching the current sign bit. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount, with - * zeros placed into the new leading bits. - */ - goog.math.Long.prototype.shiftRightUnsigned = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >>> numBits); - } else if (numBits == 32) { - return goog.math.Long.fromBits(high, 0); - } else { - return goog.math.Long.fromBits(high >>> (numBits - 32), 0); - } - } - }; - - //======= begin jsbn ======= - - var navigator = { appName: 'Modern Browser' }; // polyfill a little - - // Copyright (c) 2005 Tom Wu - // All Rights Reserved. - // http://www-cs-students.stanford.edu/~tjw/jsbn/ - - /* - * Copyright (c) 2003-2005 Tom Wu - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF - * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * In addition, the following condition applies: - * - * All redistributions must retain an intact copy of this copyright notice - * and disclaimer. - */ - - // Basic JavaScript BN library - subset useful for RSA encryption. - - // Bits per digit - var dbits; - - // JavaScript engine analysis - var canary = 0xdeadbeefcafe; - var j_lm = ((canary&0xffffff)==0xefcafe); - - // (public) Constructor - function BigInteger(a,b,c) { - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); - } - - // return new, unset BigInteger - function nbi() { return new BigInteger(null); } - - // am: Compute w_j += (x*this_i), propagate carries, - // c is initial carry, returns final carry. - // c < 3*dvalue, x < 2*dvalue, this_i < dvalue - // We need to select the fastest one that works in this environment. - - // am1: use a single mult and divide to get the high bits, - // max digit bits should be 26 because - // max internal value = 2*dvalue^2-2*dvalue (< 2^53) - function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this[i++]+w[j]+c; - c = Math.floor(v/0x4000000); - w[j++] = v&0x3ffffff; - } - return c; - } - // am2 avoids a big mult-and-extract completely. - // Max digit bits should be <= 30 because we do bitwise ops - // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this[i]&0x7fff; - var h = this[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w[j++] = l&0x3fffffff; - } - return c; - } - // Alternately, set max digit bits to 28 since some - // browsers slow down when dealing with 32-bit numbers. - function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this[i]&0x3fff; - var h = this[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w[j++] = l&0xfffffff; - } - return c; - } - if(j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; - } - else if(j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; - } - else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; - } - - BigInteger.prototype.DB = dbits; - BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; - } - - // (protected) set from integer value x, -DV <= x < DV - function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+DV; - else this.t = 0; - } - - // return bigint initialized to value - function nbv(i) { var r = nbi(); r.fromInt(i); return r; } - - // (protected) set from string and radix - function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; - } - mi = false; - if(sh == 0) - this[this.t++] = x; - else if(sh+k > this.DB) { - this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); - } - else - this[this.t-1] |= x<= this.DB) sh -= this.DB; - } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; - } - - // (public) return string representation in given radix - function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this[i]&((1<>(p+=this.DB-k); - } - else { - d = (this[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } - } - if(d > 0) m = true; - if(m) r += int2char(d); - } - } - return m?r:"0"; - } - - // (public) -this - function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } - - // (public) |this| - function bnAbs() { return (this.s<0)?this.negate():this; } - - // (public) return + if this > a, - if this < a, 0 if equal - function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; - return 0; - } - - // returns bit length of the integer x - function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; - } - - // (public) return the number of bits in "this" - function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); - } - - // (protected) r = this << n*DB - function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; - for(i = n-1; i >= 0; --i) r[i] = 0; - r.t = this.t+n; - r.s = this.s; - } - - // (protected) r = this >> n*DB - function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r[i-n] = this[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; - } - - // (protected) r = this << n - function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r[i+ds+1] = (this[i]>>cbs)|c; - c = (this[i]&bm)<= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); - } - - // (protected) r = this >> n - function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r[i-ds-1] |= (this[i]&bm)<>bs; - } - if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c -= a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c -= a.s; - } - r.s = (c<0)?-1:0; - if(c < -1) r[i++] = this.DV+c; - else if(c > 0) r[i++] = c; - r.t = i; - r.clamp(); - } - - // (protected) r = this * a, r != this,a (HAC 14.12) - // "this" should be the larger one if appropriate. - function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); - } - - // (protected) r = this^2, r != this (HAC 14.16) - function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x[i],r,2*i,0,1); - if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r[i+x.t] -= x.DV; - r[i+x.t+1] = 1; - } - } - if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); - r.s = 0; - r.clamp(); - } - - // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) - // r != q, this != m. q or r may be null. - function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; - } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } - else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r[r.t++] = 1; - r.subTo(t,r); - } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); - if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r[i] < --qd) r.subTo(t,r); - } - } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); - } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); - } - - // (public) this mod a - function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; - } - - // Modular reduction using "classic" algorithm - function Classic(m) { this.m = m; } - function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; - } - function cRevert(x) { return x; } - function cReduce(x) { x.divRemTo(this.m,null,x); } - function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - Classic.prototype.convert = cConvert; - Classic.prototype.revert = cRevert; - Classic.prototype.reduce = cReduce; - Classic.prototype.mulTo = cMulTo; - Classic.prototype.sqrTo = cSqrTo; - - // (protected) return "-1/this % 2^DB"; useful for Mont. reduction - // justification: - // xy == 1 (mod m) - // xy = 1+km - // xy(2-xy) = (1+km)(1-km) - // x[y(2-xy)] = 1-k^2m^2 - // x[y(2-xy)] == 1 (mod m^2) - // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 - // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. - // JS multiply "overflows" differently from C/C++, so care is needed here. - function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; - } - - // Montgomery reduction - function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; - } - - // xR mod m - function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; - } - - // x/R mod m - function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; - } - - // x = x/R mod m (HAC 14.32) - function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } - } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = "x^2/R mod m"; x != r - function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = "xy/R mod m"; x,y != r - function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Montgomery.prototype.convert = montConvert; - Montgomery.prototype.revert = montRevert; - Montgomery.prototype.reduce = montReduce; - Montgomery.prototype.mulTo = montMulTo; - Montgomery.prototype.sqrTo = montSqrTo; - - // (protected) true iff this is even - function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } - - // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } - } - return z.revert(r); - } - - // (public) this^e % m, 0 <= e < 2^32 - function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); - } - - // protected - BigInteger.prototype.copyTo = bnpCopyTo; - BigInteger.prototype.fromInt = bnpFromInt; - BigInteger.prototype.fromString = bnpFromString; - BigInteger.prototype.clamp = bnpClamp; - BigInteger.prototype.dlShiftTo = bnpDLShiftTo; - BigInteger.prototype.drShiftTo = bnpDRShiftTo; - BigInteger.prototype.lShiftTo = bnpLShiftTo; - BigInteger.prototype.rShiftTo = bnpRShiftTo; - BigInteger.prototype.subTo = bnpSubTo; - BigInteger.prototype.multiplyTo = bnpMultiplyTo; - BigInteger.prototype.squareTo = bnpSquareTo; - BigInteger.prototype.divRemTo = bnpDivRemTo; - BigInteger.prototype.invDigit = bnpInvDigit; - BigInteger.prototype.isEven = bnpIsEven; - BigInteger.prototype.exp = bnpExp; - - // public - BigInteger.prototype.toString = bnToString; - BigInteger.prototype.negate = bnNegate; - BigInteger.prototype.abs = bnAbs; - BigInteger.prototype.compareTo = bnCompareTo; - BigInteger.prototype.bitLength = bnBitLength; - BigInteger.prototype.mod = bnMod; - BigInteger.prototype.modPowInt = bnModPowInt; - - // "constants" - BigInteger.ZERO = nbv(0); - BigInteger.ONE = nbv(1); - - // jsbn2 stuff - - // (protected) convert from radix string - function bnpFromRadix(s,b) { - this.fromInt(0); - if(b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b,cs), mi = false, j = 0, w = 0; - for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } - } - if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); - } - if(mi) BigInteger.ZERO.subTo(this,this); - } - - // (protected) return x s.t. r^x < DV - function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } - - // (public) 0 if this == 0, 1 if this > 0 - function bnSigNum() { - if(this.s < 0) return -1; - else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; - } - - // (protected) this *= n, this >= 0, 1 < n < DV - function bnpDMultiply(n) { - this[this.t] = this.am(0,n-1,this,0,0,this.t); - ++this.t; - this.clamp(); - } - - // (protected) this += n << w words, this >= 0 - function bnpDAddOffset(n,w) { - if(n == 0) return; - while(this.t <= w) this[this.t++] = 0; - this[w] += n; - while(this[w] >= this.DV) { - this[w] -= this.DV; - if(++w >= this.t) this[this.t++] = 0; - ++this[w]; - } - } - - // (protected) convert to radix string - function bnpToRadix(b) { - if(b == null) b = 10; - if(this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b,cs); - var d = nbv(a), y = nbi(), z = nbi(), r = ""; - this.divRemTo(d,y,z); - while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); - } - return z.intValue().toString(b) + r; - } - - // (public) return value as integer - function bnIntValue() { - if(this.s < 0) { - if(this.t == 1) return this[0]-this.DV; - else if(this.t == 0) return -1; - } - else if(this.t == 1) return this[0]; - else if(this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1]&((1<<(32-this.DB))-1))<>= this.DB; - } - if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c += a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c<0)?-1:0; - if(c > 0) r[i++] = c; - else if(c < -1) r[i++] = this.DV+c; - r.t = i; - r.clamp(); - } - - BigInteger.prototype.fromRadix = bnpFromRadix; - BigInteger.prototype.chunkSize = bnpChunkSize; - BigInteger.prototype.signum = bnSigNum; - BigInteger.prototype.dMultiply = bnpDMultiply; - BigInteger.prototype.dAddOffset = bnpDAddOffset; - BigInteger.prototype.toRadix = bnpToRadix; - BigInteger.prototype.intValue = bnIntValue; - BigInteger.prototype.addTo = bnpAddTo; - - //======= end jsbn ======= - - // Emscripten wrapper - var Wrapper = { - abs: function(l, h) { - var x = new goog.math.Long(l, h); - var ret; - if (x.isNegative()) { - ret = x.negate(); - } else { - ret = x; - } - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - }, - ensureTemps: function() { - if (Wrapper.ensuredTemps) return; - Wrapper.ensuredTemps = true; - Wrapper.two32 = new BigInteger(); - Wrapper.two32.fromString('4294967296', 10); - Wrapper.two64 = new BigInteger(); - Wrapper.two64.fromString('18446744073709551616', 10); - Wrapper.temp1 = new BigInteger(); - Wrapper.temp2 = new BigInteger(); - }, - lh2bignum: function(l, h) { - var a = new BigInteger(); - a.fromString(h.toString(), 10); - var b = new BigInteger(); - a.multiplyTo(Wrapper.two32, b); - var c = new BigInteger(); - c.fromString(l.toString(), 10); - var d = new BigInteger(); - c.addTo(b, d); - return d; - }, - stringify: function(l, h, unsigned) { - var ret = new goog.math.Long(l, h).toString(); - if (unsigned && ret[0] == '-') { - // unsign slowly using jsbn bignums - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(ret, 10); - ret = new BigInteger(); - Wrapper.two64.addTo(bignum, ret); - ret = ret.toString(10); - } - return ret; - }, - fromString: function(str, base, min, max, unsigned) { - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(str, base); - var bigmin = new BigInteger(); - bigmin.fromString(min, 10); - var bigmax = new BigInteger(); - bigmax.fromString(max, 10); - if (unsigned && bignum.compareTo(BigInteger.ZERO) < 0) { - var temp = new BigInteger(); - bignum.addTo(Wrapper.two64, temp); - bignum = temp; - } - var error = false; - if (bignum.compareTo(bigmin) < 0) { - bignum = bigmin; - error = true; - } else if (bignum.compareTo(bigmax) > 0) { - bignum = bigmax; - error = true; - } - var ret = goog.math.Long.fromString(bignum.toString()); // min-max checks should have clamped this to a range goog.math.Long can handle well - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - if (error) throw 'range error'; - } - }; - return Wrapper; -})(); - -//======= end closure i64 code ======= - - - -// === Auto-generated postamble setup entry stuff === - -if (memoryInitializer) { - if (typeof Module['locateFile'] === 'function') { - memoryInitializer = Module['locateFile'](memoryInitializer); - } else if (Module['memoryInitializerPrefixURL']) { - memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; - } - if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { - var data = Module['readBinary'](memoryInitializer); - HEAPU8.set(data, STATIC_BASE); - } else { - addRunDependency('memory initializer'); - Browser.asyncLoad(memoryInitializer, function(data) { - HEAPU8.set(data, STATIC_BASE); - removeRunDependency('memory initializer'); - }, function(data) { - throw 'could not load memory initializer ' + memoryInitializer; - }); - } -} - -function ExitStatus(status) { - this.name = "ExitStatus"; - this.message = "Program terminated with exit(" + status + ")"; - this.status = status; -}; -ExitStatus.prototype = new Error(); -ExitStatus.prototype.constructor = ExitStatus; - -var initialStackTop; -var preloadStartTime = null; -var calledMain = false; - -dependenciesFulfilled = function runCaller() { - // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) - if (!Module['calledRun'] && shouldRunNow) run(); - if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled -} - -Module['callMain'] = Module.callMain = function callMain(args) { - assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)'); - assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); - - args = args || []; - - ensureInitRuntime(); - - var argc = args.length+1; - function pad() { - for (var i = 0; i < 4-1; i++) { - argv.push(0); - } - } - var argv = [allocate(intArrayFromString(Module['thisProgram']), 'i8', ALLOC_NORMAL) ]; - pad(); - for (var i = 0; i < argc-1; i = i + 1) { - argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL)); - pad(); - } - argv.push(0); - argv = allocate(argv, 'i32', ALLOC_NORMAL); - - initialStackTop = STACKTOP; - - try { - - var ret = Module['_main'](argc, argv, 0); - - - // if we're not running an evented main loop, it's time to exit - exit(ret); - } - catch(e) { - if (e instanceof ExitStatus) { - // exit() throws this once it's done to make sure execution - // has been stopped completely - return; - } else if (e == 'SimulateInfiniteLoop') { - // running an evented main loop, don't immediately exit - Module['noExitRuntime'] = true; - return; - } else { - if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]); - throw e; - } - } finally { - calledMain = true; - } -} - - - - -function run(args) { - args = args || Module['arguments']; - - if (preloadStartTime === null) preloadStartTime = Date.now(); - - if (runDependencies > 0) { - return; - } - - preRun(); - - if (runDependencies > 0) return; // a preRun added a dependency, run will be called later - if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame - - function doRun() { - if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening - Module['calledRun'] = true; - - if (ABORT) return; - - ensureInitRuntime(); - - preMain(); - - if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) { - Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms'); - } - - if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); - - if (Module['_main'] && shouldRunNow) Module['callMain'](args); - - postRun(); - } - - if (Module['setStatus']) { - Module['setStatus']('Running...'); - setTimeout(function() { - setTimeout(function() { - Module['setStatus'](''); - }, 1); - doRun(); - }, 1); - } else { - doRun(); - } -} -Module['run'] = Module.run = run; - -function exit(status) { - if (Module['noExitRuntime']) { - return; - } - - ABORT = true; - EXITSTATUS = status; - STACKTOP = initialStackTop; - - // exit the runtime - exitRuntime(); - - if (ENVIRONMENT_IS_NODE) { - // Work around a node.js bug where stdout buffer is not flushed at process exit: - // Instead of process.exit() directly, wait for stdout flush event. - // See https://github.com/joyent/node/issues/1669 and https://github.com/kripken/emscripten/issues/2582 - // Workaround is based on https://github.com/RReverser/acorn/commit/50ab143cecc9ed71a2d66f78b4aec3bb2e9844f6 - process['stdout']['once']('drain', function () { - process['exit'](status); - }); - console.log(' '); // Make sure to print something to force the drain event to occur, in case the stdout buffer was empty. - // Work around another node bug where sometimes 'drain' is never fired - make another effort - // to emit the exit status, after a significant delay (if node hasn't fired drain by then, give up) - setTimeout(function() { - process['exit'](status); - }, 500); - } else - if (ENVIRONMENT_IS_SHELL && typeof quit === 'function') { - quit(status); - } - // if we reach here, we must throw an exception to halt the current execution - throw new ExitStatus(status); -} -Module['exit'] = Module.exit = exit; - -function abort(text) { - if (text) { - Module.print(text); - Module.printErr(text); - } - - ABORT = true; - EXITSTATUS = 1; - - var extra = '\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.'; - - throw 'abort() at ' + stackTrace() + extra; -} -Module['abort'] = Module.abort = abort; - -// {{PRE_RUN_ADDITIONS}} - -if (Module['preInit']) { - if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; - while (Module['preInit'].length > 0) { - Module['preInit'].pop()(); - } -} - -// shouldRunNow refers to calling main(), not run(). -var shouldRunNow = true; -if (Module['noInitialRun']) { - shouldRunNow = false; -} - - -run(); - -// {{POST_RUN_ADDITIONS}} - - - - - - -// {{MODULE_ADDITIONS}} - - - - -/* vim: ts=4:sw=4:expandtab */ -var Internal = Internal || {}; - -(function() { - 'use strict'; - - // Insert some bytes into the emscripten memory and return a pointer - function _allocate(bytes) { - var address = Module._malloc(bytes.length); - Module.HEAPU8.set(bytes, address); - - return address; - } - - function _readBytes(address, length, array) { - array.set(Module.HEAPU8.subarray(address, address + length)); - } - - var basepoint = new Uint8Array(32); - basepoint[0] = 9; - - Internal.curve25519 = { - keyPair: function(privKey) { - var priv = new Uint8Array(privKey); - priv[0] &= 248; - priv[31] &= 127; - priv[31] |= 64; - - // Where to store the result - var publicKey_ptr = Module._malloc(32); - - // Get a pointer to the private key - var privateKey_ptr = _allocate(priv); - - // The basepoint for generating public keys - var basepoint_ptr = _allocate(basepoint); - - // The return value is just 0, the operation is done in place - var err = Module._curve25519_donna(publicKey_ptr, - privateKey_ptr, - basepoint_ptr); - - var res = new Uint8Array(32); - _readBytes(publicKey_ptr, 32, res); - - Module._free(publicKey_ptr); - Module._free(privateKey_ptr); - Module._free(basepoint_ptr); - - return { pubKey: res.buffer, privKey: priv.buffer }; - }, - sharedSecret: function(pubKey, privKey) { - // Where to store the result - var sharedKey_ptr = Module._malloc(32); - - // Get a pointer to our private key - var privateKey_ptr = _allocate(new Uint8Array(privKey)); - - // Get a pointer to their public key, the basepoint when you're - // generating a shared secret - var basepoint_ptr = _allocate(new Uint8Array(pubKey)); - - // Return value is 0 here too of course - var err = Module._curve25519_donna(sharedKey_ptr, - privateKey_ptr, - basepoint_ptr); - - var res = new Uint8Array(32); - _readBytes(sharedKey_ptr, 32, res); - - Module._free(sharedKey_ptr); - Module._free(privateKey_ptr); - Module._free(basepoint_ptr); - - return res.buffer; - }, - sign: function(privKey, message) { - // Where to store the result - var signature_ptr = Module._malloc(64); - - // Get a pointer to our private key - var privateKey_ptr = _allocate(new Uint8Array(privKey)); - - // Get a pointer to the message - var message_ptr = _allocate(new Uint8Array(message)); - - var err = Module._curve25519_sign(signature_ptr, - privateKey_ptr, - message_ptr, - message.byteLength); - - var res = new Uint8Array(64); - _readBytes(signature_ptr, 64, res); - - Module._free(signature_ptr); - Module._free(privateKey_ptr); - Module._free(message_ptr); - - return res.buffer; - }, - verify: function(pubKey, message, sig) { - // Get a pointer to their public key - var publicKey_ptr = _allocate(new Uint8Array(pubKey)); - - // Get a pointer to the signature - var signature_ptr = _allocate(new Uint8Array(sig)); - - // Get a pointer to the message - var message_ptr = _allocate(new Uint8Array(message)); - - var res = Module._curve25519_verify(signature_ptr, - publicKey_ptr, - message_ptr, - message.byteLength); - - Module._free(publicKey_ptr); - Module._free(signature_ptr); - Module._free(message_ptr); - - return res !== 0; - } - }; - - Internal.curve25519_async = { - keyPair: function(privKey) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.keyPair(privKey)); - }); - }, - sharedSecret: function(pubKey, privKey) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.sharedSecret(pubKey, privKey)); - }); - }, - sign: function(privKey, message) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.sign(privKey, message)); - }); - }, - verify: function(pubKey, message, sig) { - return new Promise(function(resolve, reject) { - if (Internal.curve25519.verify(pubKey, message, sig)) { - reject(new Error("Invalid signature")); - } else { - resolve(); - } - }); - }, - }; - -})(); - -var Internal = Internal || {}; -// I am the worker -this.onmessage = function(e) { - Internal.curve25519_async[e.data.methodName].apply(null, e.data.args).then(function(result) { - postMessage({ id: e.data.id, result: result }); - }).catch(function(error) { - postMessage({ id: e.data.id, error: error.message }); - }); -}; - -})(); \ No newline at end of file diff --git a/dist/libsignal-protocol.js b/dist/libsignal.js similarity index 51% rename from dist/libsignal-protocol.js rename to dist/libsignal.js index 2541f17..c2d9a9e 100644 --- a/dist/libsignal-protocol.js +++ b/dist/libsignal.js @@ -1,6 +1,5 @@ -;(function(){ -var Internal = {}; -window.libsignal = {}; +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1) { - Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); - } else { - Module['thisProgram'] = 'unknown-program'; + if (!Module['thisProgram']) { + if (process['argv'].length > 1) { + Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); + } else { + Module['thisProgram'] = 'unknown-program'; + } } Module['arguments'] = process['argv'].slice(2); @@ -87,6 +99,8 @@ if (ENVIRONMENT_IS_NODE) { throw ex; } }); + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; } else if (ENVIRONMENT_IS_SHELL) { if (!Module['print']) Module['print'] = print; @@ -113,8 +127,6 @@ else if (ENVIRONMENT_IS_SHELL) { Module['arguments'] = arguments; } - this['Module'] = Module; - } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { Module['read'] = function read(url) { @@ -145,11 +157,13 @@ else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { })); } - if (ENVIRONMENT_IS_WEB) { - window['Module'] = Module; - } else { + if (ENVIRONMENT_IS_WORKER) { Module['load'] = importScripts; } + + if (typeof Module['setWindowTitle'] === 'undefined') { + Module['setWindowTitle'] = function(title) { document.title = title }; + } } else { // Unreachable because SHELL is dependant on the others @@ -248,6 +262,18 @@ var Runtime = { return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE); }, STACK_ALIGN: 16, + prepVararg: function (ptr, type) { + if (type === 'double' || type === 'i64') { + // move so the load is aligned + if (ptr & 7) { + assert((ptr & 7) === 4); + ptr += 4; + } + } else { + assert((ptr & 3) === 0); + } + return ptr; + }, getAlignSize: function (type, size, vararg) { // we align i64s and doubles on 64-bit boundaries, unlike x86 if (!vararg && (type == 'i64' || type == 'double')) return 8; @@ -276,34 +302,6 @@ var Runtime = { removeFunction: function (index) { Runtime.functionPointers[(index-2)/2] = null; }, - getAsmConst: function (code, numArgs) { - // code is a constant string on the heap, so we can cache these - if (!Runtime.asmConstCache) Runtime.asmConstCache = {}; - var func = Runtime.asmConstCache[code]; - if (func) return func; - var args = []; - for (var i = 0; i < numArgs; i++) { - args.push(String.fromCharCode(36) + i); // $0, $1 etc - } - var source = Pointer_stringify(code); - if (source[0] === '"') { - // tolerate EM_ASM("..code..") even though EM_ASM(..code..) is correct - if (source.indexOf('"', 1) === source.length-1) { - source = source.substr(1, source.length-2); - } else { - // something invalid happened, e.g. EM_ASM("..code($0)..", input) - abort('invalid EM_ASM input |' + source + '|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)'); - } - } - try { - // Module is the only 'upvar', which we provide directly. We also provide FS for legacy support. - var evalled = eval('(function(Module, FS) { return function(' + args.join(',') + '){ ' + source + ' } })')(Module, typeof FS !== 'undefined' ? FS : null); - } catch(e) { - Module.printErr('error in executing inline EM_ASM code: ' + e + ' on: \n\n' + source + '\n\nwith args |' + args + '| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)'); - throw e; - } - return Runtime.asmConstCache[code] = evalled; - }, warnOnce: function (text) { if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {}; if (!Runtime.warnOnce.shown[text]) { @@ -325,73 +323,12 @@ var Runtime = { } return sigCache[func]; }, - UTF8Processor: function () { - var buffer = []; - var needed = 0; - this.processCChar = function (code) { - code = code & 0xFF; - - if (buffer.length == 0) { - if ((code & 0x80) == 0x00) { // 0xxxxxxx - return String.fromCharCode(code); - } - buffer.push(code); - if ((code & 0xE0) == 0xC0) { // 110xxxxx - needed = 1; - } else if ((code & 0xF0) == 0xE0) { // 1110xxxx - needed = 2; - } else { // 11110xxx - needed = 3; - } - return ''; - } - - if (needed) { - buffer.push(code); - needed--; - if (needed > 0) return ''; - } - - var c1 = buffer[0]; - var c2 = buffer[1]; - var c3 = buffer[2]; - var c4 = buffer[3]; - var ret; - if (buffer.length == 2) { - ret = String.fromCharCode(((c1 & 0x1F) << 6) | (c2 & 0x3F)); - } else if (buffer.length == 3) { - ret = String.fromCharCode(((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F)); - } else { - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var codePoint = ((c1 & 0x07) << 18) | ((c2 & 0x3F) << 12) | - ((c3 & 0x3F) << 6) | (c4 & 0x3F); - ret = String.fromCharCode( - (((codePoint - 0x10000) / 0x400)|0) + 0xD800, - (codePoint - 0x10000) % 0x400 + 0xDC00); - } - buffer.length = 0; - return ret; - } - this.processJSString = function processJSString(string) { - /* TODO: use TextEncoder when present, - var encoder = new TextEncoder(); - encoder['encoding'] = "utf-8"; - var utf8Array = encoder['encode'](aMsg.data); - */ - string = unescape(encodeURIComponent(string)); - var ret = []; - for (var i = 0; i < string.length; i++) { - ret.push(string.charCodeAt(i)); - } - return ret; - } - }, getCompilerSetting: function (name) { throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work'; }, stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+15)&-16); return ret; }, staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = (((STATICTOP)+15)&-16); return ret; }, - dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; }, + dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) { var success = enlargeMemory(); if (!success) { DYNAMICTOP = ret; return 0; } }; return ret; }, alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 16))*(quantum ? quantum : 16); return ret; }, makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0))); return ret; }, GLOBAL_BASE: 8, @@ -400,13 +337,8 @@ var Runtime = { } -Module['Runtime'] = Runtime; - - - - - +Module["Runtime"] = Runtime; @@ -478,7 +410,7 @@ var cwrap, ccall; var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']}; // C calling interface. - ccall = function ccallFunc(ident, returnType, argTypes, args) { + ccall = function ccallFunc(ident, returnType, argTypes, args, opts) { var func = getCFunc(ident); var cArgs = []; var stack = 0; @@ -495,7 +427,15 @@ var cwrap, ccall; } var ret = func.apply(null, cArgs); if (returnType === 'string') ret = Pointer_stringify(ret); - if (stack !== 0) Runtime.stackRestore(stack); + if (stack !== 0) { + if (opts && opts.async) { + EmterpreterAsync.asyncFinalizers.push(function() { + Runtime.stackRestore(stack); + }); + return; + } + Runtime.stackRestore(stack); + } return ret; } @@ -560,9 +500,8 @@ var cwrap, ccall; return eval(funcstr); }; })(); -Module["cwrap"] = cwrap; Module["ccall"] = ccall; - +Module["cwrap"] = cwrap; function setValue(ptr, value, type, noSafe) { type = type || 'i8'; @@ -578,7 +517,7 @@ function setValue(ptr, value, type, noSafe) { default: abort('invalid type for setValue: ' + type); } } -Module['setValue'] = setValue; +Module["setValue"] = setValue; function getValue(ptr, type, noSafe) { @@ -596,18 +535,18 @@ function getValue(ptr, type, noSafe) { } return null; } -Module['getValue'] = getValue; +Module["getValue"] = getValue; var ALLOC_NORMAL = 0; // Tries to use _malloc() var ALLOC_STACK = 1; // Lives for the duration of the current function call var ALLOC_STATIC = 2; // Cannot be freed var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk var ALLOC_NONE = 4; // Do not allocate -Module['ALLOC_NORMAL'] = ALLOC_NORMAL; -Module['ALLOC_STACK'] = ALLOC_STACK; -Module['ALLOC_STATIC'] = ALLOC_STATIC; -Module['ALLOC_DYNAMIC'] = ALLOC_DYNAMIC; -Module['ALLOC_NONE'] = ALLOC_NONE; +Module["ALLOC_NORMAL"] = ALLOC_NORMAL; +Module["ALLOC_STACK"] = ALLOC_STACK; +Module["ALLOC_STATIC"] = ALLOC_STATIC; +Module["ALLOC_DYNAMIC"] = ALLOC_DYNAMIC; +Module["ALLOC_NONE"] = ALLOC_NONE; // allocate(): This is for internal use. You can use it yourself as well, but the interface // is a little tricky (see docs right below). The reason is that it is optimized @@ -692,19 +631,27 @@ function allocate(slab, types, allocator, ptr) { return ret; } -Module['allocate'] = allocate; +Module["allocate"] = allocate; + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!staticSealed) return Runtime.staticAlloc(size); + if ((typeof _sbrk !== 'undefined' && !_sbrk.called) || !runtimeInitialized) return Runtime.dynamicAlloc(size); + return _malloc(size); +} +Module["getMemory"] = getMemory; function Pointer_stringify(ptr, /* optional */ length) { if (length === 0 || !ptr) return ''; // TODO: use TextDecoder // Find the length, and check for UTF while doing so - var hasUtf = false; + var hasUtf = 0; var t; var i = 0; while (1) { t = HEAPU8[(((ptr)+(i))>>0)]; - if (t >= 128) hasUtf = true; - else if (t == 0 && !length) break; + hasUtf |= t; + if (t == 0 && !length) break; i++; if (length && i == length) break; } @@ -712,7 +659,7 @@ function Pointer_stringify(ptr, /* optional */ length) { var ret = ''; - if (!hasUtf) { + if (hasUtf < 128) { var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack var curr; while (length > 0) { @@ -723,15 +670,184 @@ function Pointer_stringify(ptr, /* optional */ length) { } return ret; } + return Module['UTF8ToString'](ptr); +} +Module["Pointer_stringify"] = Pointer_stringify; - var utf8 = new Runtime.UTF8Processor(); - for (i = 0; i < length; i++) { - t = HEAPU8[(((ptr)+(i))>>0)]; - ret += utf8.processCChar(t); +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAP8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); } - return ret; } -Module['Pointer_stringify'] = Pointer_stringify; +Module["AsciiToString"] = AsciiToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} +Module["stringToAscii"] = stringToAscii; + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +function UTF8ArrayToString(u8Array, idx) { + var u0, u1, u2, u3, u4, u5; + + var str = ''; + while (1) { + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + u0 = u8Array[idx++]; + if (!u0) return str; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + u3 = u8Array[idx++] & 63; + if ((u0 & 0xF8) == 0xF0) { + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3; + } else { + u4 = u8Array[idx++] & 63; + if ((u0 & 0xFC) == 0xF8) { + u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4; + } else { + u5 = u8Array[idx++] & 63; + u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5; + } + } + } + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } +} +Module["UTF8ArrayToString"] = UTF8ArrayToString; + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function UTF8ToString(ptr) { + return UTF8ArrayToString(HEAPU8,ptr); +} +Module["UTF8ToString"] = UTF8ToString; + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x1FFFFF) { + if (outIdx + 3 >= endIdx) break; + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x3FFFFFF) { + if (outIdx + 4 >= endIdx) break; + outU8Array[outIdx++] = 0xF8 | (u >> 24); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 5 >= endIdx) break; + outU8Array[outIdx++] = 0xFC | (u >> 30); + outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} +Module["stringToUTF8Array"] = stringToUTF8Array; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} +Module["stringToUTF8"] = stringToUTF8; + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + ++len; + } else if (u <= 0x7FF) { + len += 2; + } else if (u <= 0xFFFF) { + len += 3; + } else if (u <= 0x1FFFFF) { + len += 4; + } else if (u <= 0x3FFFFFF) { + len += 5; + } else { + len += 6; + } + } + return len; +} +Module["lengthBytesUTF8"] = lengthBytesUTF8; + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. function UTF16ToString(ptr) { var i = 0; @@ -746,20 +862,46 @@ function UTF16ToString(ptr) { str += String.fromCharCode(codeUnit); } } -Module['UTF16ToString'] = UTF16ToString; - - -function stringToUTF16(str, outPtr) { - for(var i = 0; i < str.length; ++i) { +Module["UTF16ToString"] = UTF16ToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. var codeUnit = str.charCodeAt(i); // possibly a lead surrogate - HEAP16[(((outPtr)+(i*2))>>1)]=codeUnit; + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; } // Null-terminate the pointer to the HEAP. - HEAP16[(((outPtr)+(str.length*2))>>1)]=0; + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; } -Module['stringToUTF16'] = stringToUTF16; +Module["stringToUTF16"] = stringToUTF16; + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. +function lengthBytesUTF16(str) { + return str.length*2; +} +Module["lengthBytesUTF16"] = lengthBytesUTF16; function UTF32ToString(ptr) { var i = 0; @@ -771,6 +913,7 @@ function UTF32ToString(ptr) { return str; ++i; // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 if (utf32 >= 0x10000) { var ch = utf32 - 0x10000; str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); @@ -779,25 +922,60 @@ function UTF32ToString(ptr) { } } } -Module['UTF32ToString'] = UTF32ToString; - - -function stringToUTF32(str, outPtr) { - var iChar = 0; - for(var iCodeUnit = 0; iCodeUnit < str.length; ++iCodeUnit) { +Module["UTF32ToString"] = UTF32ToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. - var codeUnit = str.charCodeAt(iCodeUnit); // possibly a lead surrogate + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { - var trailSurrogate = str.charCodeAt(++iCodeUnit); + var trailSurrogate = str.charCodeAt(++i); codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); } - HEAP32[(((outPtr)+(iChar*4))>>2)]=codeUnit; - ++iChar; + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; } // Null-terminate the pointer to the HEAP. - HEAP32[(((outPtr)+(iChar*4))>>2)]=0; + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; } -Module['stringToUTF32'] = stringToUTF32; +Module["stringToUTF32"] = stringToUTF32; + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} +Module["lengthBytesUTF32"] = lengthBytesUTF32; function demangle(func) { var hasLibcxxabi = !!Module['___cxa_demangle']; @@ -998,13 +1176,17 @@ function jsStackTrace() { function stackTrace() { return demangleAll(jsStackTrace()); } -Module['stackTrace'] = stackTrace; +Module["stackTrace"] = stackTrace; // Memory management var PAGE_SIZE = 4096; + function alignMemoryPage(x) { - return (x+4095)&-4096; + if (x % 4096 > 0) { + x += (4096 - (x % 4096)); + } + return x; } var HEAP; @@ -1014,14 +1196,18 @@ var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk + +function abortOnCannotGrowMemory() { + abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); +} + function enlargeMemory() { - abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.'); + abortOnCannotGrowMemory(); } var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; -var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152; var totalMemory = 64*1024; while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) { @@ -1032,7 +1218,6 @@ while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) { } } if (totalMemory !== TOTAL_MEMORY) { - Module.printErr('increasing TOTAL_MEMORY to ' + totalMemory + ' to be compliant with the asm.js spec'); TOTAL_MEMORY = totalMemory; } @@ -1041,7 +1226,11 @@ if (totalMemory !== TOTAL_MEMORY) { assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']), 'JS engine does not provide full typed array support'); -var buffer = new ArrayBuffer(TOTAL_MEMORY); +var buffer; + + + +buffer = new ArrayBuffer(TOTAL_MEMORY); HEAP8 = new Int8Array(buffer); HEAP16 = new Int16Array(buffer); HEAP32 = new Int32Array(buffer); @@ -1051,6 +1240,7 @@ HEAPU32 = new Uint32Array(buffer); HEAPF32 = new Float32Array(buffer); HEAPF64 = new Float64Array(buffer); + // Endianness check (note: assumes compiler arch was little-endian) HEAP32[0] = 255; assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system'); @@ -1095,6 +1285,7 @@ var __ATPOSTRUN__ = []; // functions called after the runtime has exited var runtimeInitialized = false; var runtimeExited = false; + function preRun() { // compatibility - merge in anything from Module['preRun'] at this time if (Module['preRun']) { @@ -1135,42 +1326,39 @@ function postRun() { function addOnPreRun(cb) { __ATPRERUN__.unshift(cb); } -Module['addOnPreRun'] = Module.addOnPreRun = addOnPreRun; +Module["addOnPreRun"] = addOnPreRun; function addOnInit(cb) { __ATINIT__.unshift(cb); } -Module['addOnInit'] = Module.addOnInit = addOnInit; +Module["addOnInit"] = addOnInit; function addOnPreMain(cb) { __ATMAIN__.unshift(cb); } -Module['addOnPreMain'] = Module.addOnPreMain = addOnPreMain; +Module["addOnPreMain"] = addOnPreMain; function addOnExit(cb) { __ATEXIT__.unshift(cb); } -Module['addOnExit'] = Module.addOnExit = addOnExit; +Module["addOnExit"] = addOnExit; function addOnPostRun(cb) { __ATPOSTRUN__.unshift(cb); } -Module['addOnPostRun'] = Module.addOnPostRun = addOnPostRun; +Module["addOnPostRun"] = addOnPostRun; // Tools function intArrayFromString(stringy, dontAddNull, length /* optional */) { - var ret = (new Runtime.UTF8Processor()).processJSString(stringy); - if (length) { - ret.length = length; - } - if (!dontAddNull) { - ret.push(0); - } - return ret; + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; } -Module['intArrayFromString'] = intArrayFromString; +Module["intArrayFromString"] = intArrayFromString; function intArrayToString(array) { var ret = []; @@ -1183,7 +1371,7 @@ function intArrayToString(array) { } return ret.join(''); } -Module['intArrayToString'] = intArrayToString; +Module["intArrayToString"] = intArrayToString; function writeStringToMemory(string, buffer, dontAddNull) { var array = intArrayFromString(string, dontAddNull); @@ -1194,22 +1382,23 @@ function writeStringToMemory(string, buffer, dontAddNull) { i = i + 1; } } -Module['writeStringToMemory'] = writeStringToMemory; +Module["writeStringToMemory"] = writeStringToMemory; function writeArrayToMemory(array, buffer) { for (var i = 0; i < array.length; i++) { - HEAP8[(((buffer)+(i))>>0)]=array[i]; + HEAP8[((buffer++)>>0)]=array[i]; } } -Module['writeArrayToMemory'] = writeArrayToMemory; +Module["writeArrayToMemory"] = writeArrayToMemory; function writeAsciiToMemory(str, buffer, dontAddNull) { - for (var i = 0; i < str.length; i++) { - HEAP8[(((buffer)+(i))>>0)]=str.charCodeAt(i); + for (var i = 0; i < str.length; ++i) { + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); } - if (!dontAddNull) HEAP8[(((buffer)+(str.length))>>0)]=0; + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; } -Module['writeAsciiToMemory'] = writeAsciiToMemory; +Module["writeAsciiToMemory"] = writeAsciiToMemory; function unSign(value, bits, ignore) { if (value >= 0) { @@ -1232,6 +1421,7 @@ function reSign(value, bits, ignore) { return value; } + // check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 ) if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function imul(a, b) { var ah = a >>> 16; @@ -1243,6 +1433,15 @@ if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function Math.imul = Math['imul']; +if (!Math['clz32']) Math['clz32'] = function(x) { + x = x >>> 0; + for (var i = 0; i < 32; i++) { + if (x & (1 << (31 - i))) return i; + } + return 32; +}; +Math.clz32 = Math['clz32'] + var Math_abs = Math.abs; var Math_cos = Math.cos; var Math_sin = Math.sin; @@ -1260,6 +1459,7 @@ var Math_pow = Math.pow; var Math_imul = Math.imul; var Math_fround = Math.fround; var Math_min = Math.min; +var Math_clz32 = Math.clz32; // A counter of dependencies for calling run(). If we need to // do asynchronous work before running, increment this and @@ -1272,13 +1472,18 @@ var runDependencies = 0; var runDependencyWatcher = null; var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +function getUniqueRunDependency(id) { + return id; +} + function addRunDependency(id) { runDependencies++; if (Module['monitorRunDependencies']) { Module['monitorRunDependencies'](runDependencies); } } -Module['addRunDependency'] = addRunDependency; +Module["addRunDependency"] = addRunDependency; + function removeRunDependency(id) { runDependencies--; if (Module['monitorRunDependencies']) { @@ -1296,34 +1501,40 @@ function removeRunDependency(id) { } } } -Module['removeRunDependency'] = removeRunDependency; +Module["removeRunDependency"] = removeRunDependency; Module["preloadedImages"] = {}; // maps url to image data Module["preloadedAudios"] = {}; // maps url to audio data + var memoryInitializer = null; + + // === Body === +var ASM_CONSTS = []; STATIC_BASE = 8; -STATICTOP = STATIC_BASE + 33040; - /* global initializers */ __ATINIT__.push(); +STATICTOP = STATIC_BASE + 34240; + /* global initializers */ __ATINIT__.push(); -/* memory initializer */ allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,47,99,168,254,170,226,153,255,102,179,216,0,226,141,122,255,122,66,153,254,182,245,134,0,227,228,25,1,214,57,235,255,216,173,56,255,181,231,210,0,119,128,157,255,129,95,136,255,110,126,51,0,2,169,183,255,7,130,98,254,69,176,94,255,116,4,227,1,217,242,145,255,202,173,31,1,105,1,39,255,46,175,69,0,228,47,58,255,215,224,69,254,207,56,69,255,16,254,139,255,23,207,212,255,202,20,126,255,95,213,96,255,9,176,33,0,200,5,207,255,241,42,128,254,35,33,192,255,248,229,196,1,129,17,120,0,251,103,151,255,7,52,112,255,140,56,66,255,40,226,245,255,217,70,37,254,172,214,9,255,72,67,134,1,146,192,214,255,44,38,112,0,68,184,75,255,206,90,251,0,149,235,141,0,181,170,58,0,116,244,239,0,92,157,2,0,102,173,98,0,233,137,96,1,127,49,203,0,5,155,148,0,23,148,9,255,211,122,12,0,34,134,26,255,219,204,136,0,134,8,41,255,224,83,43,254,85,25,247,0,109,127,0,254,169,136,48,0,238,119,219,255,231,173,213,0,206,18,254,254,8,186,7,255,126,9,7,1,111,42,72,0,111,52,236,254,96,63,141,0,147,191,127,254,205,78,192,255,14,106,237,1,187,219,76,0,175,243,187,254,105,89,173,0,85,25,89,1,162,243,148,0,2,118,209,254,33,158,9,0,139,163,46,255,93,70,40,0,108,42,142,254,111,252,142,255,155,223,144,0,51,229,167,255,73,252,155,255,94,116,12,255,152,160,218,255,156,238,37,255,179,234,207,255,197,0,179,255,154,164,141,0,225,196,104,0,10,35,25,254,209,212,242,255,97,253,222,254,184,101,229,0,222,18,127,1,164,136,135,255,30,207,140,254,146,97,243,0,129,192,26,254,201,84,33,255,111,10,78,255,147,81,178,255,4,4,24,0,161,238,215,255,6,141,33,0,53,215,14,255,41,181,208,255,231,139,157,0,179,203,221,255,255,185,113,0,189,226,172,255,113,66,214,255,202,62,45,255,102,64,8,255,78,174,16,254,133,117,68,255,182,120,89,255,133,114,211,0,189,110,21,255,15,10,106,0,41,192,1,0,152,232,121,255,188,60,160,255,153,113,206,255,0,183,226,254,180,13,72,255,176,160,14,254,211,201,134,255,158,24,143,0,127,105,53,0,96,12,189,0,167,215,251,255,159,76,128,254,106,101,225,255,30,252,4,0,146,12,174,0,89,241,178,254,10,229,166,255,123,221,42,254,30,20,212,0,82,128,3,0,48,209,243,0,119,121,64,255,50,227,156,255,0,110,197,1,103,27,144,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,234,113,60,255,37,255,57,255,69,178,182,254,128,208,179,0,118,26,125,254,3,7,214,255,241,50,77,255,85,203,197,255,211,135,250,255,25,48,100,255,187,213,180,254,17,88,105,0,83,209,158,1,5,115,98,0,4,174,60,254,171,55,110,255,217,181,17,255,20,188,170,0,146,156,102,254,87,214,174,255,114,122,155,1,233,44,170,0,127,8,239,1,214,236,234,0,175,5,219,0,49,106,61,255,6,66,208,255,2,106,110,255,81,234,19,255,215,107,192,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,178,9,252,254,100,110,212,0,14,5,167,0,233,239,163,255,28,151,157,1,101,146,10,255,254,158,70,254,71,249,228,0,88,30,50,0,68,58,160,255,191,24,104,1,129,66,129,255,192,50,85,255,8,179,138,255,38,250,201,0,115,80,160,0,131,230,113,0,125,88,147,0,90,68,199,0,253,76,158,0,28,255,118,0,113,250,254,0,66,75,46,0,230,218,43,0,229,120,186,1,148,68,43,0,136,124,238,1,187,107,197,255,84,53,246,255,51,116,254,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,68,113,21,255,222,186,59,255,66,7,241,1,69,6,72,0,86,156,108,254,55,167,89,0,109,52,219,254,13,176,23,255,196,44,106,255,239,149,71,255,164,140,125,255,159,173,1,0,51,41,231,0,145,62,33,0,138,111,93,1,185,83,69,0,144,115,46,0,97,151,16,255,24,228,26,0,49,217,226,0,113,75,234,254,193,153,12,255,182,48,96,255,14,13,26,0,128,195,249,254,69,193,59,0,132,37,81,254,125,106,60,0,214,240,169,1,164,227,66,0,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,143,62,221,0,129,89,214,255,55,139,5,254,68,20,191,255,14,204,178,1,35,195,217,0,47,51,206,1,38,246,165,0,206,27,6,254,158,87,36,0,217,52,146,255,125,123,215,255,85,60,31,255,171,13,7,0,218,245,88,254,252,35,60,0,55,214,160,255,133,101,56,0,224,32,19,254,147,64,234,0,26,145,162,1,114,118,125,0,248,252,250,0,101,94,196,255,198,141,226,254,51,42,182,0,135,12,9,254,109,172,210,255,197,236,194,1,241,65,154,0,48,156,47,255,153,67,55,255,218,165,34,254,74,180,179,0,218,66,71,1,88,122,99,0,212,181,219,255,92,42,231,255,239,0,154,0,245,77,183,255,94,81,170,1,18,213,216,0,171,93,71,0,52,94,248,0,18,151,161,254,197,209,66,255,174,244,15,254,162,48,183,0,49,61,240,254,182,93,195,0,199,228,6,1,200,5,17,255,137,45,237,255,108,148,4,0,90,79,237,255,39,63,77,255,53,82,207,1,142,22,118,255,101,232,18,1,92,26,67,0,5,200,88,255,33,168,138,255,149,225,72,0,2,209,27,255,44,245,168,1,220,237,17,255,30,211,105,254,141,238,221,0,128,80,245,254,111,254,14,0,222,95,190,1,223,9,241,0,146,76,212,255,108,205,104,255,63,117,153,0,144,69,48,0,35,228,111,0,192,33,193,255,112,214,190,254,115,152,151,0,23,102,88,0,51,74,248,0,226,199,143,254,204,162,101,255,208,97,189,1,245,104,18,0,230,246,30,255,23,148,69,0,110,88,52,254,226,181,89,255,208,47,90,254,114,161,80,255,33,116,248,0,179,152,87,255,69,144,177,1,88,238,26,255,58,32,113,1,1,77,69,0,59,121,52,255,152,238,83,0,52,8,193,0,231,39,233,255,199,34,138,0,222,68,173,0,91,57,242,254,220,210,127,255,192,7,246,254,151,35,187,0,195,236,165,0,111,93,206,0,212,247,133,1,154,133,209,255,155,231,10,0,64,78,38,0,122,249,100,1,30,19,97,255,62,91,249,1,248,133,77,0,197,63,168,254,116,10,82,0,184,236,113,254,212,203,194,255,61,100,252,254,36,5,202,255,119,91,153,255,129,79,29,0,103,103,171,254,237,215,111,255,216,53,69,0,239,240,23,0,194,149,221,255,38,225,222,0,232,255,180,254,118,82,133,255,57,209,177,1,139,232,133,0,158,176,46,254,194,115,46,0,88,247,229,1,28,103,191,0,221,222,175,254,149,235,44,0,151,228,25,254,218,105,103,0,142,85,210,0,149,129,190,255,213,65,94,254,117,134,224,255,82,198,117,0,157,221,220,0,163,101,36,0,197,114,37,0,104,172,166,254,11,182,0,0,81,72,188,255,97,188,16,255,69,6,10,0,199,147,145,255,8,9,115,1,65,214,175,255,217,173,209,0,80,127,166,0,247,229,4,254,167,183,124,255,90,28,204,254,175,59,240,255,11,41,248,1,108,40,51,255,144,177,195,254,150,250,126,0,138,91,65,1,120,60,222,255,245,193,239,0,29,214,189,255,128,2,25,0,80,154,162,0,77,220,107,1,234,205,74,255,54,166,103,255,116,72,9,0,228,94,47,255,30,200,25,255,35,214,89,255,61,176,140,255,83,226,163,255,75,130,172,0,128,38,17,0,95,137,152,255,215,124,159,1,79,93,0,0,148,82,157,254,195,130,251,255,40,202,76,255,251,126,224,0,157,99,62,254,207,7,225,255,96,68,195,0,140,186,157,255,131,19,231,255,42,128,254,0,52,219,61,254,102,203,72,0,141,7,11,255,186,164,213,0,31,122,119,0,133,242,145,0,208,252,232,255,91,213,182,255,143,4,250,254,249,215,74,0,165,30,111,1,171,9,223,0,229,123,34,1,92,130,26,255,77,155,45,1,195,139,28,255,59,224,78,0,136,17,247,0,108,121,32,0,79,250,189,255,96,227,252,254,38,241,62,0,62,174,125,255,155,111,93,255,10,230,206,1,97,197,40,255,0,49,57,254,65,250,13,0,18,251,150,255,220,109,210,255,5,174,166,254,44,129,189,0,235,35,147,255,37,247,141,255,72,141,4,255,103,107,255,0,247,90,4,0,53,44,42,0,2,30,240,0,4,59,63,0,88,78,36,0,113,167,180,0,190,71,193,255,199,158,164,255,58,8,172,0,77,33,12,0,65,63,3,0,153,77,33,255,172,254,102,1,228,221,4,255,87,30,254,1,146,41,86,255,138,204,239,254,108,141,17,255,187,242,135,0,210,208,127,0,68,45,14,254,73,96,62,0,81,60,24,255,170,6,36,255,3,249,26,0,35,213,109,0,22,129,54,255,21,35,225,255,234,61,56,255,58,217,6,0,143,124,88,0,236,126,66,0,209,38,183,255,34,238,6,255,174,145,102,0,95,22,211,0,196,15,153,254,46,84,232,255,117,34,146,1,231,250,74,255,27,134,100,1,92,187,195,255,170,198,112,0,120,28,42,0,209,70,67,0,29,81,31,0,29,168,100,1,169,173,160,0,107,35,117,0,62,96,59,255,81,12,69,1,135,239,190,255,220,252,18,0,163,220,58,255,137,137,188,255,83,102,109,0,96,6,76,0,234,222,210,255,185,174,205,1,60,158,213,255,13,241,214,0,172,129,140,0,93,104,242,0,192,156,251,0,43,117,30,0,225,81,158,0,127,232,218,0,226,28,203,0,233,27,151,255,117,43,5,255,242,14,47,255,33,20,6,0,137,251,44,254,27,31,245,255,183,214,125,254,40,121,149,0,186,158,213,255,89,8,227,0,69,88,0,254,203,135,225,0,201,174,203,0,147,71,184,0,18,121,41,254,94,5,78,0,224,214,240,254,36,5,180,0,251,135,231,1,163,138,212,0,210,249,116,254,88,129,187,0,19,8,49,254,62,14,144,255,159,76,211,0,214,51,82,0,109,117,228,254,103,223,203,255,75,252,15,1,154,71,220,255,23,13,91,1,141,168,96,255,181,182,133,0,250,51,55,0,234,234,212,254,175,63,158,0,39,240,52,1,158,189,36,255,213,40,85,1,32,180,247,255,19,102,26,1,84,24,97,255,69,21,222,0,148,139,122,255,220,213,235,1,232,203,255,0,121,57,147,0,227,7,154,0,53,22,147,1,72,1,225,0,82,134,48,254,83,60,157,255,145,72,169,0,34,103,239,0,198,233,47,0,116,19,4,255,184,106,9,255,183,129,83,0,36,176,230,1,34,103,72,0,219,162,134,0,245,42,158,0,32,149,96,254,165,44,144,0,202,239,72,254,215,150,5,0,42,66,36,1,132,215,175,0,86,174,86,255,26,197,156,255,49,232,135,254,103,182,82,0,253,128,176,1,153,178,122,0,245,250,10,0,236,24,178,0,137,106,132,0,40,29,41,0,50,30,152,255,124,105,38,0,230,191,75,0,143,43,170,0,44,131,20,255,44,13,23,255,237,255,155,1,159,109,100,255,112,181,24,255,104,220,108,0,55,211,131,0,99,12,213,255,152,151,145,255,238,5,159,0,97,155,8,0,33,108,81,0,1,3,103,0,62,109,34,255,250,155,180,0,32,71,195,255,38,70,145,1,159,95,245,0,69,229,101,1,136,28,240,0,79,224,25,0,78,110,121,255,248,168,124,0,187,128,247,0,2,147,235,254,79,11,132,0,70,58,12,1,181,8,163,255,79,137,133,255,37,170,11,255,141,243,85,255,176,231,215,255,204,150,164,255,239,215,39,255,46,87,156,254,8,163,88,255,172,34,232,0,66,44,102,255,27,54,41,254,236,99,87,255,41,123,169,1,52,114,43,0,117,134,40,0,155,134,26,0,231,207,91,254,35,132,38,255,19,102,125,254,36,227,133,255,118,3,113,255,29,13,124,0,152,96,74,1,88,146,206,255,167,191,220,254,162,18,88,255,182,100,23,0,31,117,52,0,81,46,106,1,12,2,7,0,69,80,201,1,209,246,172,0,12,48,141,1,224,211,88,0,116,226,159,0,122,98,130,0,65,236,234,1,225,226,9,255,207,226,123,1,89,214,59,0,112,135,88,1,90,244,203,255,49,11,38,1,129,108,186,0,89,112,15,1,101,46,204,255,127,204,45,254,79,255,221,255,51,73,18,255,127,42,101,255,241,21,202,0,160,227,7,0,105,50,236,0,79,52,197,255,104,202,208,1,180,15,16,0,101,197,78,255,98,77,203,0,41,185,241,1,35,193,124,0,35,155,23,255,207,53,192,0,11,125,163,1,249,158,185,255,4,131,48,0,21,93,111,255,61,121,231,1,69,200,36,255,185,48,185,255,111,238,21,255,39,50,25,255,99,215,163,255,87,212,30,255,164,147,5,255,128,6,35,1,108,223,110,255,194,76,178,0,74,101,180,0,243,47,48,0,174,25,43,255,82,173,253,1,54,114,192,255,40,55,91,0,215,108,176,255,11,56,7,0,224,233,76,0,209,98,202,254,242,25,125,0,44,193,93,254,203,8,177,0,135,176,19,0,112,71,213,255,206,59,176,1,4,67,26,0,14,143,213,254,42,55,208,255,60,67,120,0,193,21,163,0,99,164,115,0,10,20,118,0,156,212,222,254,160,7,217,255,114,245,76,1,117,59,123,0,176,194,86,254,213,15,176,0,78,206,207,254,213,129,59,0,233,251,22,1,96,55,152,255,236,255,15,255,197,89,84,255,93,149,133,0,174,160,113,0,234,99,169,255,152,116,88,0,144,164,83,255,95,29,198,255,34,47,15,255,99,120,134,255,5,236,193,0,249,247,126,255,147,187,30,0,50,230,117,255,108,217,219,255,163,81,166,255,72,25,169,254,155,121,79,255,28,155,89,254,7,126,17,0,147,65,33,1,47,234,253,0,26,51,18,0,105,83,199,255,163,196,230,0,113,248,164,0,226,254,218,0,189,209,203,255,164,247,222,254,255,35,165,0,4,188,243,1,127,179,71,0,37,237,254,255,100,186,240,0,5,57,71,254,103,72,73,255,244,18,81,254,229,210,132,255,238,6,180,255,11,229,174,255,227,221,192,1,17,49,28,0,163,215,196,254,9,118,4,255,51,240,71,0,113,129,109,255,76,240,231,0,188,177,127,0,125,71,44,1,26,175,243,0,94,169,25,254,27,230,29,0,15,139,119,1,168,170,186,255,172,197,76,255,252,75,188,0,137,124,196,0,72,22,96,255,45,151,249,1,220,145,100,0,64,192,159,255,120,239,226,0,129,178,146,0,0,192,125,0,235,138,234,0,183,157,146,0,83,199,192,255,184,172,72,255,73,225,128,0,77,6,250,255,186,65,67,0,104,246,207,0,188,32,138,255,218,24,242,0,67,138,81,254,237,129,121,255,20,207,150,1,41,199,16,255,6,20,128,0,159,118,5,0,181,16,143,255,220,38,15,0,23,64,147,254,73,26,13,0,87,228,57,1,204,124,128,0,43,24,223,0,219,99,199,0,22,75,20,255,19,27,126,0,157,62,215,0,110,29,230,0,179,167,255,1,54,252,190,0,221,204,182,254,179,158,65,255,81,157,3,0,194,218,159,0,170,223,0,0,224,11,32,255,38,197,98,0,168,164,37,0,23,88,7,1,164,186,110,0,96,36,134,0,234,242,229,0,250,121,19,0,242,254,112,255,3,47,94,1,9,239,6,255,81,134,153,254,214,253,168,255,67,124,224,0,245,95,74,0,28,30,44,254,1,109,220,255,178,89,89,0,252,36,76,0,24,198,46,255,76,77,111,0,134,234,136,255,39,94,29,0,185,72,234,255,70,68,135,255,231,102,7,254,77,231,140,0,167,47,58,1,148,97,118,255,16,27,225,1,166,206,143,255,110,178,214,255,180,131,162,0,143,141,225,1,13,218,78,255,114,153,33,1,98,104,204,0,175,114,117,1,167,206,75,0,202,196,83,1,58,64,67,0,138,47,111,1,196,247,128,255,137,224,224,254,158,112,207,0,154,100,255,1,134,37,107,0,198,128,79,255,127,209,155,255,163,254,185,254,60,14,243,0,31,219,112,254,29,217,65,0,200,13,116,254,123,60,196,255,224,59,184,254,242,89,196,0,123,16,75,254,149,16,206,0,69,254,48,1,231,116,223,255,209,160,65,1,200,80,98,0,37,194,184,254,148,63,34,0,139,240,65,255,217,144,132,255,56,38,45,254,199,120,210,0,108,177,166,255,160,222,4,0,220,126,119,254,165,107,160,255,82,220,248,1,241,175,136,0,144,141,23,255,169,138,84,0,160,137,78,255,226,118,80,255,52,27,132,255,63,96,139,255,152,250,39,0,188,155,15,0,232,51,150,254,40,15,232,255,240,229,9,255,137,175,27,255,75,73,97,1,218,212,11,0,135,5,162,1,107,185,213,0,2,249,107,255,40,242,70,0,219,200,25,0,25,157,13,0,67,82,80,255,196,249,23,255,145,20,149,0,50,72,146,0,94,76,148,1,24,251,65,0,31,192,23,0,184,212,201,255,123,233,162,1,247,173,72,0,162,87,219,254,126,134,89,0,159,11,12,254,166,105,29,0,73,27,228,1,113,120,183,255,66,163,109,1,212,143,11,255,159,231,168,1,255,128,90,0,57,14,58,254,89,52,10,255,253,8,163,1,0,145,210,255,10,129,85,1,46,181,27,0,103,136,160,254,126,188,209,255,34,35,111,0,215,219,24,255,212,11,214,254,101,5,118,0,232,197,133,255,223,167,109,255,237,80,86,255,70,139,94,0,158,193,191,1,155,15,51,255,15,190,115,0,78,135,207,255,249,10,27,1,181,125,233,0,95,172,13,254,170,213,161,255,39,236,138,255,95,93,87,255,190,128,95,0,125,15,206,0,166,150,159,0,227,15,158,255,206,158,120,255,42,141,128,0,101,178,120,1,156,109,131,0,218,14,44,254,247,168,206,255,212,112,28,0,112,17,228,255,90,16,37,1,197,222,108,0,254,207,83,255,9,90,243,255,243,244,172,0,26,88,115,255,205,116,122,0,191,230,193,0,180,100,11,1,217,37,96,255,154,78,156,0,235,234,31,255,206,178,178,255,149,192,251,0,182,250,135,0,246,22,105,0,124,193,109,255,2,210,149,255,169,17,170,0,0,96,110,255,117,9,8,1,50,123,40,255,193,189,99,0,34,227,160,0,48,80,70,254,211,51,236,0,45,122,245,254,44,174,8,0,173,37,233,255,158,65,171,0,122,69,215,255,90,80,2,255,131,106,96,254,227,114,135,0,205,49,119,254,176,62,64,255,82,51,17,255,241,20,243,255,130,13,8,254,128,217,243,255,162,27,1,254,90,118,241,0,246,198,246,255,55,16,118,255,200,159,157,0,163,17,1,0,140,107,121,0,85,161,118,255,38,0,149,0,156,47,238,0,9,166,166,1,75,98,181,255,50,74,25,0,66,15,47,0,139,225,159,0,76,3,142,255,14,238,184,0,11,207,53,255,183,192,186,1,171,32,174,255,191,76,221,1,247,170,219,0,25,172,50,254,217,9,233,0,203,126,68,255,183,92,48,0,127,167,183,1,65,49,254,0,16,63,127,1,254,21,170,255,59,224,127,254,22,48,63,255,27,78,130,254,40,195,29,0,250,132,112,254,35,203,144,0,104,169,168,0,207,253,30,255,104,40,38,254,94,228,88,0,206,16,128,255,212,55,122,255,223,22,234,0,223,197,127,0,253,181,181,1,145,102,118,0,236,153,36,255,212,217,72,255,20,38,24,254,138,62,62,0,152,140,4,0,230,220,99,255,1,21,212,255,148,201,231,0,244,123,9,254,0,171,210,0,51,58,37,255,1,255,14,255,244,183,145,254,0,242,166,0,22,74,132,0,121,216,41,0,95,195,114,254,133,24,151,255,156,226,231,255,247,5,77,255,246,148,115,254,225,92,81,255,222,80,246,254,170,123,89,255,74,199,141,0,29,20,8,255,138,136,70,255,93,75,92,0,221,147,49,254,52,126,226,0,229,124,23,0,46,9,181,0,205,64,52,1,131,254,28,0,151,158,212,0,131,64,78,0,206,25,171,0,0,230,139,0,191,253,110,254,103,247,167,0,64,40,40,1,42,165,241,255,59,75,228,254,124,243,189,255,196,92,178,255,130,140,86,255,141,89,56,1,147,198,5,255,203,248,158,254,144,162,141,0,11,172,226,0,130,42,21,255,1,167,143,255,144,36,36,255,48,88,164,254,168,170,220,0,98,71,214,0,91,208,79,0,159,76,201,1,166,42,214,255,69,255,0,255,6,128,125,255,190,1,140,0,146,83,218,255,215,238,72,1,122,127,53,0,189,116,165,255,84,8,66,255,214,3,208,255,213,110,133,0,195,168,44,1,158,231,69,0,162,64,200,254,91,58,104,0,182,58,187,254,249,228,136,0,203,134,76,254,99,221,233,0,75,254,214,254,80,69,154,0,64,152,248,254,236,136,202,255,157,105,153,254,149,175,20,0,22,35,19,255,124,121,233,0,186,250,198,254,132,229,139,0,137,80,174,255,165,125,68,0,144,202,148,254,235,239,248,0,135,184,118,0,101,94,17,255,122,72,70,254,69,130,146,0,127,222,248,1,69,127,118,255,30,82,215,254,188,74,19,255,229,167,194,254,117,25,66,255,65,234,56,254,213,22,156,0,151,59,93,254,45,28,27,255,186,126,164,255,32,6,239,0,127,114,99,1,219,52,2,255,99,96,166,254,62,190,126,255,108,222,168,1,75,226,174,0,230,226,199,0,60,117,218,255,252,248,20,1,214,188,204,0,31,194,134,254,123,69,192,255,169,173,36,254,55,98,91,0,223,42,102,254,137,1,102,0,157,90,25,0,239,122,64,255,252,6,233,0,7,54,20,255,82,116,174,0,135,37,54,255,15,186,125,0,227,112,175,255,100,180,225,255,42,237,244,255,244,173,226,254,248,18,33,0,171,99,150,255,74,235,50,255,117,82,32,254,106,168,237,0,207,109,208,1,228,9,186,0,135,60,169,254,179,92,143,0,244,170,104,255,235,45,124,255,70,99,186,0,117,137,183,0,224,31,215,0,40,9,100,0,26,16,95,1,68,217,87,0,8,151,20,255,26,100,58,255,176,165,203,1,52,118,70,0,7,32,254,254,244,254,245,255,167,144,194,255,125,113,23,255,176,121,181,0,136,84,209,0,138,6,30,255,89,48,28,0,33,155,14,255,25,240,154,0,141,205,109,1,70,115,62,255,20,40,107,254,138,154,199,255,94,223,226,255,157,171,38,0,163,177,25,254,45,118,3,255,14,222,23,1,209,190,81,255,118,123,232,1,13,213,101,255,123,55,123,254,27,246,165,0,50,99,76,255,140,214,32,255,97,65,67,255,24,12,28,0,174,86,78,1,64,247,96,0,160,135,67,0,66,55,243,255,147,204,96,255,26,6,33,255,98,51,83,1,153,213,208,255,2,184,54,255,25,218,11,0,49,67,246,254,18,149,72,255,13,25,72,0,42,79,214,0,42,4,38,1,27,139,144,255,149,187,23,0,18,164,132,0,245,84,184,254,120,198,104,255,126,218,96,0,56,117,234,255,13,29,214,254,68,47,10,255,167,154,132,254,152,38,198,0,66,178,89,255,200,46,171,255,13,99,83,255,210,187,253,255,170,45,42,1,138,209,124,0,214,162,141,0,12,230,156,0,102,36,112,254,3,147,67,0,52,215,123,255,233,171,54,255,98,137,62,0,247,218,39,255,231,218,236,0,247,191,127,0,195,146,84,0,165,176,92,255,19,212,94,255,17,74,227,0,88,40,153,1,198,147,1,255,206,67,245,254,240,3,218,255,61,141,213,255,97,183,106,0,195,232,235,254,95,86,154,0,209,48,205,254,118,209,241,255,240,120,223,1,213,29,159,0,163,127,147,255,13,218,93,0,85,24,68,254,70,20,80,255,189,5,140,1,82,97,254,255,99,99,191,255,132,84,133,255,107,218,116,255,112,122,46,0,105,17,32,0,194,160,63,255,68,222,39,1,216,253,92,0,177,105,205,255,149,201,195,0,42,225,11,255,40,162,115,0,9,7,81,0,165,218,219,0,180,22,0,254,29,146,252,255,146,207,225,1,180,135,96,0,31,163,112,0,177,11,219,255,133,12,193,254,43,78,50,0,65,113,121,1,59,217,6,255,110,94,24,1,112,172,111,0,7,15,96,0,36,85,123,0,71,150,21,255,208,73,188,0,192,11,167,1,213,245,34,0,9,230,92,0,162,142,39,255,215,90,27,0,98,97,89,0,94,79,211,0,90,157,240,0,95,220,126,1,102,176,226,0,36,30,224,254,35,31,127,0,231,232,115,1,85,83,130,0,210,73,245,255,47,143,114,255,68,65,197,0,59,72,62,255,183,133,173,254,93,121,118,255,59,177,81,255,234,69,173,255,205,128,177,0,220,244,51,0,26,244,209,1,73,222,77,255,163,8,96,254,150,149,211,0,158,254,203,1,54,127,139,0,161,224,59,0,4,109,22,255,222,42,45,255,208,146,102,255,236,142,187,0,50,205,245,255,10,74,89,254,48,79,142,0,222,76,130,255,30,166,63,0,236,12,13,255,49,184,244,0,187,113,102,0,218,101,253,0,153,57,182,254,32,150,42,0,25,198,146,1,237,241,56,0,140,68,5,0,91,164,172,255,78,145,186,254,67,52,205,0,219,207,129,1,109,115,17,0,54,143,58,1,21,248,120,255,179,255,30,0,193,236,66,255,1,255,7,255,253,192,48,255,19,69,217,1,3,214,0,255,64,101,146,1,223,125,35,255,235,73,179,255,249,167,226,0,225,175,10,1,97,162,58,0,106,112,171,1,84,172,5,255,133,140,178,255,134,245,142,0,97,90,125,255,186,203,185,255,223,77,23,255,192,92,106,0,15,198,115,255,217,152,248,0,171,178,120,255,228,134,53,0,176,54,193,1,250,251,53,0,213,10,100,1,34,199,106,0,151,31,244,254,172,224,87,255,14,237,23,255,253,85,26,255,127,39,116,255,172,104,100,0,251,14,70,255,212,208,138,255,253,211,250,0,176,49,165,0,15,76,123,255,37,218,160,255,92,135,16,1,10,126,114,255,70,5,224,255,247,249,141,0,68,20,60,1,241,210,189,255,195,217,187,1,151,3,113,0,151,92,174,0,231,62,178,255,219,183,225,0,23,23,33,255,205,181,80,0,57,184,248,255,67,180,1,255,90,123,93,255,39,0,162,255,96,248,52,255,84,66,140,0,34,127,228,255,194,138,7,1,166,110,188,0,21,17,155,1,154,190,198,255,214,80,59,255,18,7,143,0,72,29,226,1,199,217,249,0,232,161,71,1,149,190,201,0,217,175,95,254,113,147,67,255,138,143,199,255,127,204,1,0,29,182,83,1,206,230,155,255,186,204,60,0,10,125,85,255,232,96,25,255,255,89,247,255,213,254,175,1,232,193,81,0,28,43,156,254,12,69,8,0,147,24,248,0,18,198,49,0,134,60,35,0,118,246,18,255,49,88,254,254,228,21,186,255,182,65,112,1,219,22,1,255,22,126,52,255,189,53,49,255,112,25,143,0,38,127,55,255,226,101,163,254,208,133,61,255,137,69,174,1,190,118,145,255,60,98,219,255,217,13,245,255,250,136,10,0,84,254,226,0,201,31,125,1,240,51,251,255,31,131,130,255,2,138,50,255,215,215,177,1,223,12,238,255,252,149,56,255,124,91,68,255,72,126,170,254,119,255,100,0,130,135,232,255,14,79,178,0,250,131,197,0,138,198,208,0,121,216,139,254,119,18,36,255,29,193,122,0,16,42,45,255,213,240,235,1,230,190,169,255,198,35,228,254,110,173,72,0,214,221,241,255,56,148,135,0,192,117,78,254,141,93,207,255,143,65,149,0,21,18,98,255,95,44,244,1,106,191,77,0,254,85,8,254,214,110,176,255,73,173,19,254,160,196,199,255,237,90,144,0,193,172,113,255,200,155,136,254,228,90,221,0,137,49,74,1,164,221,215,255,209,189,5,255,105,236,55,255,42,31,129,1,193,255,236,0,46,217,60,0,138,88,187,255,226,82,236,255,81,69,151,255,142,190,16,1,13,134,8,0,127,122,48,255,81,64,156,0,171,243,139,0,237,35,246,0,122,143,193,254,212,122,146,0,95,41,255,1,87,132,77,0,4,212,31,0,17,31,78,0,39,45,173,254,24,142,217,255,95,9,6,255,227,83,6,0,98,59,130,254,62,30,33,0,8,115,211,1,162,97,128,255,7,184,23,254,116,28,168,255,248,138,151,255,98,244,240,0,186,118,130,0,114,248,235,255,105,173,200,1,160,124,71,255,94,36,164,1,175,65,146,255,238,241,170,254,202,198,197,0,228,71,138,254,45,246,109,255,194,52,158,0,133,187,176,0,83,252,154,254,89,189,221,255,170,73,252,0,148,58,125,0,36,68,51,254,42,69,177,255,168,76,86,255,38,100,204,255,38,53,35,0,175,19,97,0,225,238,253,255,81,81,135,0,210,27,255,254,235,73,107,0,8,207,115,0,82,127,136,0,84,99,21,254,207,19,136,0,100,164,101,0,80,208,77,255,132,207,237,255,15,3,15,255,33,166,110,0,156,95,85,255,37,185,111,1,150,106,35,255,166,151,76,0,114,87,135,255,159,194,64,0,12,122,31,255,232,7,101,254,173,119,98,0,154,71,220,254,191,57,53,255,168,232,160,255,224,32,99,255,218,156,165,0,151,153,163,0,217,13,148,1,197,113,89,0,149,28,161,254,207,23,30,0,105,132,227,255,54,230,94,255,133,173,204,255,92,183,157,255,88,144,252,254,102,33,90,0,159,97,3,0,181,218,155,255,240,114,119,0,106,214,53,255,165,190,115,1,152,91,225,255,88,106,44,255,208,61,113,0,151,52,124,0,191,27,156,255,110,54,236,1,14,30,166,255,39,127,207,1,229,199,28,0,188,228,188,254,100,157,235,0,246,218,183,1,107,22,193,255,206,160,95,0,76,239,147,0,207,161,117,0,51,166,2,255,52,117,10,254,73,56,227,255,152,193,225,0,132,94,136,255,101,191,209,0,32,107,229,255,198,43,180,1,100,210,118,0,114,67,153,255,23,88,26,255,89,154,92,1,220,120,140,255,144,114,207,255,252,115,250,255,34,206,72,0,138,133,127,255,8,178,124,1,87,75,97,0,15,229,92,254,240,67,131,255,118,123,227,254,146,120,104,255,145,213,255,1,129,187,70,255,219,119,54,0,1,19,173,0,45,150,148,1,248,83,72,0,203,233,169,1,142,107,56,0,247,249,38,1,45,242,80,255,30,233,103,0,96,82,70,0,23,201,111,0,81,39,30,255,161,183,78,255,194,234,33,255,68,227,140,254,216,206,116,0,70,27,235,255,104,144,79,0,164,230,93,254,214,135,156,0,154,187,242,254,188,20,131,255,36,109,174,0,159,112,241,0,5,110,149,1,36,165,218,0,166,29,19,1,178,46,73,0,93,43,32,254,248,189,237,0,102,155,141,0,201,93,195,255,241,139,253,255,15,111,98,255,108,65,163,254,155,79,190,255,73,174,193,254,246,40,48,255,107,88,11,254,202,97,85,255,253,204,18,255,113,242,66,0,110,160,194,254,208,18,186,0,81,21,60,0,188,104,167,255,124,166,97,254,210,133,142,0,56,242,137,254,41,111,130,0,111,151,58,1,111,213,141,255,183,172,241,255,38,6,196,255,185,7,123,255,46,11,246,0,245,105,119,1,15,2,161,255,8,206,45,255,18,202,74,255,83,124,115,1,212,141,157,0,83,8,209,254,139,15,232,255,172,54,173,254,50,247,132,0,214,189,213,0,144,184,105,0,223,254,248,0,255,147,240,255,23,188,72,0,7,51,54,0,188,25,180,254,220,180,0,255,83,160,20,0,163,189,243,255,58,209,194,255,87,73,60,0,106,24,49,0,245,249,220,0,22,173,167,0,118,11,195,255,19,126,237,0,110,159,37,255,59,82,47,0,180,187,86,0,188,148,208,1,100,37,133,255,7,112,193,0,129,188,156,255,84,106,129,255,133,225,202,0,14,236,111,255,40,20,101,0,172,172,49,254,51,54,74,255,251,185,184,255,93,155,224,255,180,249,224,1,230,178,146,0,72,57,54,254,178,62,184,0,119,205,72,0,185,239,253,255,61,15,218,0,196,67,56,255,234,32,171,1,46,219,228,0,208,108,234,255,20,63,232,255,165,53,199,1,133,228,5,255,52,205,107,0,74,238,140,255,150,156,219,254,239,172,178,255,251,189,223,254,32,142,211,255,218,15,138,1,241,196,80,0,28,36,98,254,22,234,199,0,61,237,220,255,246,57,37,0,142,17,142,255,157,62,26,0,43,238,95,254,3,217,6,255,213,25,240,1,39,220,174,255,154,205,48,254,19,13,192,255,244,34,54,254,140,16,155,0,240,181,5,254,155,193,60,0,166,128,4,255,36,145,56,255,150,240,219,0,120,51,145,0,82,153,42,1,140,236,146,0,107,92,248,1,189,10,3,0,63,136,242,0,211,39,24,0,19,202,161,1,173,27,186,255,210,204,239,254,41,209,162,255,182,254,159,255,172,116,52,0,195,103,222,254,205,69,59,0,53,22,41,1,218,48,194,0,80,210,242,0,210,188,207,0,187,161,161,254,216,17,1,0,136,225,113,0,250,184,63,0,223,30,98,254,77,168,162,0,59,53,175,0,19,201,10,255,139,224,194,0,147,193,154,255,212,189,12,254,1,200,174,255,50,133,113,1,94,179,90,0,173,182,135,0,94,177,113,0,43,89,215,255,136,252,106,255,123,134,83,254,5,245,66,255,82,49,39,1,220,2,224,0,97,129,177,0,77,59,89,0,61,29,155,1,203,171,220,255,92,78,139,0,145,33,181,255,169,24,141,1,55,150,179,0,139,60,80,255,218,39,97,0,2,147,107,255,60,248,72,0,173,230,47,1,6,83,182,255,16,105,162,254,137,212,81,255,180,184,134,1,39,222,164,255,221,105,251,1,239,112,125,0,63,7,97,0,63,104,227,255,148,58,12,0,90,60,224,255,84,212,252,0,79,215,168,0,248,221,199,1,115,121,1,0,36,172,120,0,32,162,187,255,57,107,49,255,147,42,21,0,106,198,43,1,57,74,87,0,126,203,81,255,129,135,195,0,140,31,177,0,221,139,194,0,3,222,215,0,131,68,231,0,177,86,178,254,124,151,180,0,184,124,38,1,70,163,17,0,249,251,181,1,42,55,227,0,226,161,44,0,23,236,110,0,51,149,142,1,93,5,236,0,218,183,106,254,67,24,77,0,40,245,209,255,222,121,153,0,165,57,30,0,83,125,60,0,70,38,82,1,229,6,188,0,109,222,157,255,55,118,63,255,205,151,186,0,227,33,149,255,254,176,246,1,227,177,227,0,34,106,163,254,176,43,79,0,106,95,78,1,185,241,122,255,185,14,61,0,36,1,202,0,13,178,162,255,247,11,132,0,161,230,92,1,65,1,185,255,212,50,165,1,141,146,64,255,158,242,218,0,21,164,125,0,213,139,122,1,67,71,87,0,203,158,178,1,151,92,43,0,152,111,5,255,39,3,239,255,217,255,250,255,176,63,71,255,74,245,77,1,250,174,18,255,34,49,227,255,246,46,251,255,154,35,48,1,125,157,61,255,106,36,78,255,97,236,153,0,136,187,120,255,113,134,171,255,19,213,217,254,216,94,209,255,252,5,61,0,94,3,202,0,3,26,183,255,64,191,43,255,30,23,21,0,129,141,77,255,102,120,7,1,194,76,140,0,188,175,52,255,17,81,148,0,232,86,55,1,225,48,172,0,134,42,42,255,238,50,47,0,169,18,254,0,20,147,87,255,14,195,239,255,69,247,23,0,238,229,128,255,177,49,112,0,168,98,251,255,121,71,248,0,243,8,145,254,246,227,153,255,219,169,177,254,251,139,165,255,12,163,185,255,164,40,171,255,153,159,27,254,243,109,91,255,222,24,112,1,18,214,231,0,107,157,181,254,195,147,0,255,194,99,104,255,89,140,190,255,177,66,126,254,106,185,66,0,49,218,31,0,252,174,158,0,188,79,230,1,238,41,224,0,212,234,8,1,136,11,181,0,166,117,83,255,68,195,94,0,46,132,201,0,240,152,88,0,164,57,69,254,160,224,42,255,59,215,67,255,119,195,141,255,36,180,121,254,207,47,8,255,174,210,223,0,101,197,68,255,255,82,141,1,250,137,233,0,97,86,133,1,16,80,69,0,132,131,159,0,116,93,100,0,45,141,139,0,152,172,157,255,90,43,91,0,71,153,46,0,39,16,112,255,217,136,97,255,220,198,25,254,177,53,49,0,222,88,134,255,128,15,60,0,207,192,169,255,192,116,209,255,106,78,211,1,200,213,183,255,7,12,122,254,222,203,60,255,33,110,199,254,251,106,117,0,228,225,4,1,120,58,7,255,221,193,84,254,112,133,27,0,189,200,201,255,139,135,150,0,234,55,176,255,61,50,65,0,152,108,169,255,220,85,1,255,112,135,227,0,162,26,186,0,207,96,185,254,244,136,107,0,93,153,50,1,198,97,151,0,110,11,86,255,143,117,174,255,115,212,200,0,5,202,183,0,237,164,10,254,185,239,62,0,236,120,18,254,98,123,99,255,168,201,194,254,46,234,214,0,191,133,49,255,99,169,119,0,190,187,35,1,115,21,45,255,249,131,72,0,112,6,123,255,214,49,181,254,166,233,34,0,92,197,102,254,253,228,205,255,3,59,201,1,42,98,46,0,219,37,35,255,169,195,38,0,94,124,193,1,156,43,223,0,95,72,133,254,120,206,191,0,122,197,239,255,177,187,79,255,254,46,2,1,250,167,190,0,84,129,19,0,203,113,166,255,249,31,189,254,72,157,202,255,208,71,73,255,207,24,72,0,10,16,18,1,210,81,76,255,88,208,192,255,126,243,107,255,238,141,120,255,199,121,234,255,137,12,59,255,36,220,123,255,148,179,60,254,240,12,29,0,66,0,97,1,36,30,38,255,115,1,93,255,96,103,231,255,197,158,59,1,192,164,240,0,202,202,57,255,24,174,48,0,89,77,155,1,42,76,215,0,244,151,233,0,23,48,81,0,239,127,52,254,227,130,37,255,248,116,93,1,124,132,118,0,173,254,192,1,6,235,83,255,110,175,231,1,251,28,182,0,129,249,93,254,84,184,128,0,76,181,62,0,175,128,186,0,100,53,136,254,109,29,226,0,221,233,58,1,20,99,74,0,0,22,160,0,134,13,21,0,9,52,55,255,17,89,140,0,175,34,59,0,84,165,119,255,224,226,234,255,7,72,166,255,123,115,255,1,18,214,246,0,250,7,71,1,217,220,185,0,212,35,76,255,38,125,175,0,189,97,210,0,114,238,44,255,41,188,169,254,45,186,154,0,81,92,22,0,132,160,193,0,121,208,98,255,13,81,44,255,203,156,82,0,71,58,21,255,208,114,191,254,50,38,147,0,154,216,195,0,101,25,18,0,60,250,215,255,233,132,235,255,103,175,142,1,16,14,92,0,141,31,110,254,238,241,45,255,153,217,239,1,97,168,47,255,249,85,16,1,28,175,62,255,57,254,54,0,222,231,126,0,166,45,117,254,18,189,96,255,228,76,50,0,200,244,94,0,198,152,120,1,68,34,69,255,12,65,160,254,101,19,90,0,167,197,120,255,68,54,185,255,41,218,188,0,113,168,48,0,88,105,189,1,26,82,32,255,185,93,164,1,228,240,237,255,66,182,53,0,171,197,92,255,107,9,233,1,199,120,144,255,78,49,10,255,109,170,105,255,90,4,31,255,28,244,113,255,74,58,11,0,62,220,246,255,121,154,200,254,144,210,178,255,126,57,129,1,43,250,14,255,101,111,28,1,47,86,241,255,61,70,150,255,53,73,5,255,30,26,158,0,209,26,86,0,138,237,74,0,164,95,188,0,142,60,29,254,162,116,248,255,187,175,160,0,151,18,16,0,209,111,65,254,203,134,39,255,88,108,49,255,131,26,71,255,221,27,215,254,104,105,93,255,31,236,31,254,135,0,211,255,143,127,110,1,212,73,229,0,233,67,167,254,195,1,208,255,132,17,221,255,51,217,90,0,67,235,50,255,223,210,143,0,179,53,130,1,233,106,198,0,217,173,220,255,112,229,24,255,175,154,93,254,71,203,246,255,48,66,133,255,3,136,230,255,23,221,113,254,235,111,213,0,170,120,95,254,251,221,2,0,45,130,158,254,105,94,217,255,242,52,180,254,213,68,45,255,104,38,28,0,244,158,76,0,161,200,96,255,207,53,13,255,187,67,148,0,170,54,248,0,119,162,178,255,83,20,11,0,42,42,192,1,146,159,163,255,183,232,111,0,77,229,21,255,71,53,143,0,27,76,34,0,246,136,47,255,219,39,182,255,92,224,201,1,19,142,14,255,69,182,241,255,163,118,245,0,9,109,106,1,170,181,247,255,78,47,238,255,84,210,176,255,213,107,139,0,39,38,11,0,72,21,150,0,72,130,69,0,205,77,155,254,142,133,21], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); -/* memory initializer */ allocate([71,111,172,254,226,42,59,255,179,0,215,1,33,128,241,0,234,252,13,1,184,79,8,0,110,30,73,255,246,141,189,0,170,207,218,1,74,154,69,255,138,246,49,255,155,32,100,0,125,74,105,255,90,85,61,255,35,229,177,255,62,125,193,255,153,86,188,1,73,120,212,0,209,123,246,254,135,209,38,255,151,58,44,1,92,69,214,255,14,12,88,255,252,153,166,255,253,207,112,255,60,78,83,255,227,124,110,0,180,96,252,255,53,117,33,254,164,220,82,255,41,1,27,255,38,164,166,255,164,99,169,254,61,144,70,255,192,166,18,0,107,250,66,0,197,65,50,0,1,179,18,255,255,104,1,255,43,153,35,255,80,111,168,0,110,175,168,0,41,105,45,255,219,14,205,255,164,233,140,254,43,1,118,0,233,67,195,0,178,82,159,255,138,87,122,255,212,238,90,255,144,35,124,254,25,140,164,0,251,215,44,254,133,70,107,255,101,227,80,254,92,169,55,0,215,42,49,0,114,180,85,255,33,232,27,1,172,213,25,0,62,176,123,254,32,133,24,255,225,191,62,0,93,70,153,0,181,42,104,1,22,191,224,255,200,200,140,255,249,234,37,0,149,57,141,0,195,56,208,255,254,130,70,255,32,173,240,255,29,220,199,0,110,100,115,255,132,229,249,0,228,233,223,255,37,216,209,254,178,177,209,255,183,45,165,254,224,97,114,0,137,97,168,255,225,222,172,0,165,13,49,1,210,235,204,255,252,4,28,254,70,160,151,0,232,190,52,254,83,248,93,255,62,215,77,1,175,175,179,255,160,50,66,0,121,48,208,0,63,169,209,255,0,210,200,0,224,187,44,1,73,162,82,0,9,176,143,255,19,76,193,255,29,59,167,1,24,43,154,0,28,190,190,0,141,188,129,0,232,235,203,255,234,0,109,255,54,65,159,0,60,88,232,255,121,253,150,254,252,233,131,255,198,110,41,1,83,77,71,255,200,22,59,254,106,253,242,255,21,12,207,255,237,66,189,0,90,198,202,1,225,172,127,0,53,22,202,0,56,230,132,0,1,86,183,0,109,190,42,0,243,68,174,1,109,228,154,0,200,177,122,1,35,160,183,255,177,48,85,255,90,218,169,255,248,152,78,0,202,254,110,0,6,52,43,0,142,98,65,255,63,145,22,0,70,106,93,0,232,138,107,1,110,179,61,255,211,129,218,1,242,209,92,0,35,90,217,1,182,143,106,255,116,101,217,255,114,250,221,255,173,204,6,0,60,150,163,0,73,172,44,255,239,110,80,255,237,76,153,254,161,140,249,0,149,232,229,0,133,31,40,255,174,164,119,0,113,51,214,0,129,228,2,254,64,34,243,0,107,227,244,255,174,106,200,255,84,153,70,1,50,35,16,0,250,74,216,254,236,189,66,255,153,249,13,0,230,178,4,255,221,41,238,0,118,227,121,255,94,87,140,254,254,119,92,0,73,239,246,254,117,87,128,0,19,211,145,255,177,46,252,0,229,91,246,1,69,128,247,255,202,77,54,1,8,11,9,255,153,96,166,0,217,214,173,255,134,192,2,1,0,207,0,0,189,174,107,1,140,134,100,0,158,193,243,1,182,102,171,0,235,154,51,0,142,5,123,255,60,168,89,1,217,14,92,255,19,214,5,1,211,167,254,0,44,6,202,254,120,18,236,255,15,113,184,255,184,223,139,0,40,177,119,254,182,123,90,255,176,165,176,0,247,77,194,0,27,234,120,0,231,0,214,255,59,39,30,0,125,99,145,255,150,68,68,1,141,222,248,0,153,123,210,255,110,127,152,255,229,33,214,1,135,221,197,0,137,97,2,0,12,143,204,255,81,41,188,0,115,79,130,255,94,3,132,0,152,175,187,255,124,141,10,255,126,192,179,255,11,103,198,0,149,6,45,0,219,85,187,1,230,18,178,255,72,182,152,0,3,198,184,255,128,112,224,1,97,161,230,0,254,99,38,255,58,159,197,0,151,66,219,0,59,69,143,255,185,112,249,0,119,136,47,255,123,130,132,0,168,71,95,255,113,176,40,1,232,185,173,0,207,93,117,1,68,157,108,255,102,5,147,254,49,97,33,0,89,65,111,254,247,30,163,255,124,217,221,1,102,250,216,0,198,174,75,254,57,55,18,0,227,5,236,1,229,213,173,0,201,109,218,1,49,233,239,0,30,55,158,1,25,178,106,0,155,111,188,1,94,126,140,0,215,31,238,1,77,240,16,0,213,242,25,1,38,71,168,0,205,186,93,254,49,211,140,255,219,0,180,255,134,118,165,0,160,147,134,255,110,186,35,255,198,243,42,0,243,146,119,0,134,235,163,1,4,241,135,255,193,46,193,254,103,180,79,255,225,4,184,254,242,118,130,0,146,135,176,1,234,111,30,0,69,66,213,254,41,96,123,0,121,94,42,255,178,191,195,255,46,130,42,0,117,84,8,255,233,49,214,254,238,122,109,0,6,71,89,1,236,211,123,0,244,13,48,254,119,148,14,0,114,28,86,255,75,237,25,255,145,229,16,254,129,100,53,255,134,150,120,254,168,157,50,0,23,72,104,255,224,49,14,0,255,123,22,255,151,185,151,255,170,80,184,1,134,182,20,0,41,100,101,1,153,33,16,0,76,154,111,1,86,206,234,255,192,160,164,254,165,123,93,255,1,216,164,254,67,17,175,255,169,11,59,255,158,41,61,255,73,188,14,255,195,6,137,255,22,147,29,255,20,103,3,255,246,130,227,255,122,40,128,0,226,47,24,254,35,36,32,0,152,186,183,255,69,202,20,0,195,133,195,0,222,51,247,0,169,171,94,1,183,0,160,255,64,205,18,1,156,83,15,255,197,58,249,254,251,89,110,255,50,10,88,254,51,43,216,0,98,242,198,1,245,151,113,0,171,236,194,1,197,31,199,255,229,81,38,1,41,59,20,0,253,104,230,0,152,93,14,255,246,242,146,254,214,169,240,255,240,102,108,254,160,167,236,0,154,218,188,0,150,233,202,255,27,19,250,1,2,71,133,255,175,12,63,1,145,183,198,0,104,120,115,255,130,251,247,0,17,212,167,255,62,123,132,255,247,100,189,0,155,223,152,0,143,197,33,0,155,59,44,255,150,93,240,1,127,3,87,255,95,71,207,1,167,85,1,255,188,152,116,255,10,23,23,0,137,195,93,1,54,98,97,0,240,0,168,255,148,188,127,0,134,107,151,0,76,253,171,0,90,132,192,0,146,22,54,0,224,66,54,254,230,186,229,255,39,182,196,0,148,251,130,255,65,131,108,254,128,1,160,0,169,49,167,254,199,254,148,255,251,6,131,0,187,254,129,255,85,82,62,0,178,23,58,255,254,132,5,0,164,213,39,0,134,252,146,254,37,53,81,255,155,134,82,0,205,167,238,255,94,45,180,255,132,40,161,0,254,111,112,1,54,75,217,0,179,230,221,1,235,94,191,255,23,243,48,1,202,145,203,255,39,118,42,255,117,141,253,0,254,0,222,0,43,251,50,0,54,169,234,1,80,68,208,0,148,203,243,254,145,7,135,0,6,254,0,0,252,185,127,0,98,8,129,255,38,35,72,255,211,36,220,1,40,26,89,0,168,64,197,254,3,222,239,255,2,83,215,254,180,159,105,0,58,115,194,0,186,116,106,255,229,247,219,255,129,118,193,0,202,174,183,1,166,161,72,0,201,107,147,254,237,136,74,0,233,230,106,1,105,111,168,0,64,224,30,1,1,229,3,0,102,151,175,255,194,238,228,255,254,250,212,0,187,237,121,0,67,251,96,1,197,30,11,0,183,95,204,0,205,89,138,0,64,221,37,1,255,223,30,255,178,48,211,255,241,200,90,255,167,209,96,255,57,130,221,0,46,114,200,255,61,184,66,0,55,182,24,254,110,182,33,0,171,190,232,255,114,94,31,0,18,221,8,0,47,231,254,0,255,112,83,0,118,15,215,255,173,25,40,254,192,193,31,255,238,21,146,255,171,193,118,255,101,234,53,254,131,212,112,0,89,192,107,1,8,208,27,0,181,217,15,255,231,149,232,0,140,236,126,0,144,9,199,255,12,79,181,254,147,182,202,255,19,109,182,255,49,212,225,0,74,163,203,0,175,233,148,0,26,112,51,0,193,193,9,255,15,135,249,0,150,227,130,0,204,0,219,1,24,242,205,0,238,208,117,255,22,244,112,0,26,229,34,0,37,80,188,255,38,45,206,254,240,90,225,255,29,3,47,255,42,224,76,0,186,243,167,0,32,132,15,255,5,51,125,0,139,135,24,0,6,241,219,0,172,229,133,255,246,214,50,0,231,11,207,255,191,126,83,1,180,163,170,255,245,56,24,1,178,164,211,255,3,16,202,1,98,57,118,255,141,131,89,254,33,51,24,0,243,149,91,255,253,52,14,0,35,169,67,254,49,30,88,255,179,27,36,255,165,140,183,0,58,189,151,0,88,31,0,0,75,169,66,0,66,101,199,255,24,216,199,1,121,196,26,255,14,79,203,254,240,226,81,255,94,28,10,255,83,193,240,255,204,193,131,255,94,15,86,0,218,40,157,0,51,193,209,0,0,242,177,0,102,185,247,0,158,109,116,0,38,135,91,0,223,175,149,0,220,66,1,255,86,60,232,0,25,96,37,255,225,122,162,1,215,187,168,255,158,157,46,0,56,171,162,0,232,240,101,1,122,22,9,0,51,9,21,255,53,25,238,255,217,30,232,254,125,169,148,0,13,232,102,0,148,9,37,0,165,97,141,1,228,131,41,0,222,15,243,255,254,18,17,0,6,60,237,1,106,3,113,0,59,132,189,0,92,112,30,0,105,208,213,0,48,84,179,255,187,121,231,254,27,216,109,255,162,221,107,254,73,239,195,255,250,31,57,255,149,135,89,255,185,23,115,1,3,163,157,255,18,112,250,0,25,57,187,255,161,96,164,0,47,16,243,0,12,141,251,254,67,234,184,255,41,18,161,0,175,6,96,255,160,172,52,254,24,176,183,255,198,193,85,1,124,121,137,255,151,50,114,255,220,203,60,255,207,239,5,1,0,38,107,255,55,238,94,254,70,152,94,0,213,220,77,1,120,17,69,255,85,164,190,255,203,234,81,0,38,49,37,254,61,144,124,0,137,78,49,254,168,247,48,0,95,164,252,0,105,169,135,0,253,228,134,0,64,166,75,0,81,73,20,255,207,210,10,0,234,106,150,255,94,34,90,255,254,159,57,254,220,133,99,0,139,147,180,254,24,23,185,0,41,57,30,255,189,97,76,0,65,187,223,255,224,172,37,255,34,62,95,1,231,144,240,0,77,106,126,254,64,152,91,0,29,98,155,0,226,251,53,255,234,211,5,255,144,203,222,255,164,176,221,254,5,231,24,0,179,122,205,0,36,1,134,255,125,70,151,254,97,228,252,0,172,129,23,254,48,90,209,255,150,224,82,1,84,134,30,0,241,196,46,0,103,113,234,255,46,101,121,254,40,124,250,255,135,45,242,254,9,249,168,255,140,108,131,255,143,163,171,0,50,173,199,255,88,222,142,255,200,95,158,0,142,192,163,255,7,117,135,0,111,124,22,0,236,12,65,254,68,38,65,255,227,174,254,0,244,245,38,0,240,50,208,255,161,63,250,0,60,209,239,0,122,35,19,0,14,33,230,254,2,159,113,0,106,20,127,255,228,205,96,0,137,210,174,254,180,212,144,255,89,98,154,1,34,88,139,0,167,162,112,1,65,110,197,0,241,37,169,0,66,56,131,255,10,201,83,254,133,253,187,255,177,112,45,254,196,251,0,0,196,250,151,255,238,232,214,255,150,209,205,0,28,240,118,0,71,76,83,1,236,99,91,0,42,250,131,1,96,18,64,255,118,222,35,0,113,214,203,255,122,119,184,255,66,19,36,0,204,64,249,0,146,89,139,0,134,62,135,1,104,233,101,0,188,84,26,0,49,249,129,0,208,214,75,255,207,130,77,255,115,175,235,0,171,2,137,255,175,145,186,1,55,245,135,255,154,86,181,1,100,58,246,255,109,199,60,255,82,204,134,255,215,49,230,1,140,229,192,255,222,193,251,255,81,136,15,255,179,149,162,255,23,39,29,255,7,95,75,254,191,81,222,0,241,81,90,255,107,49,201,255,244,211,157,0,222,140,149,255,65,219,56,254,189,246,90,255,178,59,157,1,48,219,52,0,98,34,215,0,28,17,187,255,175,169,24,0,92,79,161,255,236,200,194,1,147,143,234,0,229,225,7,1,197,168,14,0,235,51,53,1,253,120,174,0,197,6,168,255,202,117,171,0,163,21,206,0,114,85,90,255,15,41,10,255,194,19,99,0,65,55,216,254,162,146,116,0,50,206,212,255,64,146,29,255,158,158,131,1,100,165,130,255,172,23,129,255,125,53,9,255,15,193,18,1,26,49,11,255,181,174,201,1,135,201,14,255,100,19,149,0,219,98,79,0,42,99,143,254,96,0,48,255,197,249,83,254,104,149,79,255,235,110,136,254,82,128,44,255,65,41,36,254,88,211,10,0,187,121,187,0,98,134,199,0,171,188,179,254,210,11,238,255,66,123,130,254,52,234,61,0,48,113,23,254,6,86,120,255,119,178,245,0,87,129,201,0,242,141,209,0,202,114,85,0,148,22,161,0,103,195,48,0,25,49,171,255,138,67,130,0,182,73,122,254,148,24,130,0,211,229,154,0,32,155,158,0,84,105,61,0,177,194,9,255,166,89,86,1,54,83,187,0,249,40,117,255,109,3,215,255,53,146,44,1,63,47,179,0,194,216,3,254,14,84,136,0,136,177,13,255,72,243,186,255,117,17,125,255,211,58,211,255,93,79,223,0,90,88,245,255,139,209,111,255,70,222,47,0,10,246,79,255,198,217,178,0,227,225,11,1,78,126,179,255,62,43,126,0,103,148,35,0,129,8,165,254,245,240,148,0,61,51,142,0,81,208,134,0,15,137,115,255,211,119,236,255,159,245,248,255,2,134,136,255,230,139,58,1,160,164,254,0,114,85,141,255,49,166,182,255,144,70,84,1,85,182,7,0,46,53,93,0,9,166,161,255,55,162,178,255,45,184,188,0,146,28,44,254,169,90,49,0,120,178,241,1,14,123,127,255,7,241,199,1,189,66,50,255,198,143,101,254,189,243,135,255,141,24,24,254,75,97,87,0,118,251,154,1,237,54,156,0,171,146,207,255,131,196,246,255,136,64,113,1,151,232,57,0,240,218,115,0,49,61,27,255,64,129,73,1,252,169,27,255,40,132,10,1,90,201,193,255,252,121,240,1,186,206,41,0,43,198,97,0,145,100,183,0,204,216,80,254,172,150,65,0,249,229,196,254,104,123,73,255,77,104,96,254,130,180,8,0,104,123,57,0,220,202,229,255,102,249,211,0,86,14,232,255,182,78,209,0,239,225,164,0,106,13,32,255,120,73,17,255,134,67,233,0,83,254,181,0,183,236,112,1,48,64,131,255,241,216,243,255,65,193,226,0,206,241,100,254,100,134,166,255,237,202,197,0,55,13,81,0,32,124,102,255,40,228,177,0,118,181,31,1,231,160,134,255,119,187,202,0,0,142,60,255,128,38,189,255,166,201,150,0,207,120,26,1,54,184,172,0,12,242,204,254,133,66,230,0,34,38,31,1,184,112,80,0,32,51,165,254,191,243,55,0,58,73,146,254,155,167,205,255,100,104,152,255,197,254,207,255,173,19,247,0,238,10,202,0,239,151,242,0,94,59,39,255,240,29,102,255,10,92,154,255,229,84,219,255,161,129,80,0,208,90,204,1,240,219,174,255,158,102,145,1,53,178,76,255,52,108,168,1,83,222,107,0,211,36,109,0,118,58,56,0,8,29,22,0,237,160,199,0,170,209,157,0,137,71,47,0,143,86,32,0,198,242,2,0,212,48,136,1,92,172,186,0,230,151,105,1,96,191,229,0,138,80,191,254,240,216,130,255,98,43,6,254,168,196,49,0,253,18,91,1,144,73,121,0,61,146,39,1,63,104,24,255,184,165,112,254,126,235,98,0,80,213,98,255,123,60,87,255,82,140,245,1,223,120,173,255,15,198,134,1,206,60,239,0,231,234,92,255,33,238,19,255,165,113,142,1,176,119,38,0,160,43,166,254,239,91,105,0,107,61,194,1,25,4,68,0,15,139,51,0,164,132,106,255,34,116,46,254,168,95,197,0,137,212,23,0,72,156,58,0,137,112,69,254,150,105,154,255,236,201,157,0,23,212,154,255,136,82,227,254,226,59,221,255,95,149,192,0,81,118,52,255,33,43,215,1,14,147,75,255,89,156,121,254,14,18,79,0,147,208,139,1,151,218,62,255,156,88,8,1,210,184,98,255,20,175,123,255,102,83,229,0,220,65,116,1,150,250,4,255,92,142,220,255,34,247,66,255,204,225,179,254,151,81,151,0,71,40,236,255,138,63,62,0,6,79,240,255,183,185,181,0,118,50,27,0,63,227,192,0,123,99,58,1,50,224,155,255,17,225,223,254,220,224,77,255,14,44,123,1,141,128,175,0,248,212,200,0,150,59,183,255,147,97,29,0,150,204,181,0,253,37,71,0,145,85,119,0,154,200,186,0,2,128,249,255,83,24,124,0,14,87,143,0,168,51,245,1,124,151,231,255,208,240,197,1,124,190,185,0,48,58,246,0,20,233,232,0,125,18,98,255,13,254,31,255,245,177,130,255,108,142,35,0,171,125,242,254,140,12,34,255,165,161,162,0,206,205,101,0,247,25,34,1,100,145,57,0,39,70,57,0,118,204,203,255,242,0,162,0,165,244,30,0,198,116,226,0,128,111,153,255,140,54,182,1,60,122,15,255,155,58,57,1,54,50,198,0,171,211,29,255,107,138,167,255,173,107,199,255,109,161,193,0,89,72,242,255,206,115,89,255,250,254,142,254,177,202,94,255,81,89,50,0,7,105,66,255,25,254,255,254,203,64,23,255,79,222,108,255,39,249,75,0,241,124,50,0,239,152,133,0,221,241,105,0,147,151,98,0,213,161,121,254,242,49,137,0,233,37,249,254,42,183,27,0,184,119,230,255,217,32,163,255,208,251,228,1,137,62,131,255,79,64,9,254,94,48,113,0,17,138,50,254,193,255,22,0,247,18,197,1,67,55,104,0,16,205,95,255,48,37,66,0,55,156,63,1,64,82,74,255,200,53,71,254,239,67,125,0,26,224,222,0,223,137,93,255,30,224,202,255,9,220,132,0,198,38,235,1,102,141,86,0,60,43,81,1,136,28,26,0,233,36,8,254,207,242,148,0,164,162,63,0,51,46,224,255,114,48,79,255,9,175,226,0,222,3,193,255,47,160,232,255,255,93,105,254,14,42,230,0,26,138,82,1,208,43,244,0,27,39,38,255,98,208,127,255,64,149,182,255,5,250,209,0,187,60,28,254,49,25,218,255,169,116,205,255,119,18,120,0,156,116,147,255,132,53,109,255,13,10,202,0,110,83,167,0,157,219,137,255,6,3,130,255,50,167,30,255,60,159,47,255,129,128,157,254,94,3,189,0,3,166,68,0,83,223,215,0,150,90,194,1,15,168,65,0,227,83,51,255,205,171,66,255,54,187,60,1,152,102,45,255,119,154,225,0,240,247,136,0,100,197,178,255,139,71,223,255,204,82,16,1,41,206,42,255,156,192,221,255,216,123,244,255,218,218,185,255,187,186,239,255,252,172,160,255,195,52,22,0,144,174,181,254,187,100,115,255,211,78,176,255,27,7,193,0,147,213,104,255,90,201,10,255,80,123,66,1,22,33,186,0,1,7,99,254,30,206,10,0,229,234,5,0,53,30,210,0,138,8,220,254,71,55,167,0,72,225,86,1,118,190,188,0,254,193,101,1,171,249,172,255,94,158,183,254,93,2,108,255,176,93,76,255,73,99,79,255,74,64,129,254,246,46,65,0,99,241,127,254,246,151,102,255,44,53,208,254,59,102,234,0,154,175,164,255,88,242,32,0,111,38,1,0,255,182,190,255,115,176,15,254,169,60,129,0,122,237,241,0,90,76,63,0,62,74,120,255,122,195,110,0,119,4,178,0,222,242,210,0,130,33,46,254,156,40,41,0,167,146,112,1,49,163,111,255,121,176,235,0,76,207,14,255,3,25,198,1,41,235,213,0,85,36,214,1,49,92,109,255,200,24,30,254,168,236,195,0,145,39,124,1,236,195,149,0,90,36,184,255,67,85,170,255,38,35,26,254,131,124,68,255,239,155,35,255,54,201,164,0,196,22,117,255,49,15,205,0,24,224,29,1,126,113,144,0,117,21,182,0,203,159,141,0,223,135,77,0,176,230,176,255,190,229,215,255,99,37,181,255,51,21,138,255,25,189,89,255,49,48,165,254,152,45,247,0,170,108,222,0,80,202,5,0,27,69,103,254,204,22,129,255,180,252,62,254,210,1,91,255,146,110,254,255,219,162,28,0,223,252,213,1,59,8,33,0,206,16,244,0,129,211,48,0,107,160,208,0,112,59,209,0,109,77,216,254,34,21,185,255,246,99,56,255,179,139,19,255,185,29,50,255,84,89,19,0,74,250,98,255,225,42,200,255,192,217,205,255,210,16,167,0,99,132,95,1,43,230,57,0,254,11,203,255,99,188,63,255,119,193,251,254,80,105,54,0,232,181,189,1,183,69,112,255,208,171,165,255,47,109,180,255,123,83,165,0,146,162,52,255,154,11,4,255,151,227,90,255,146,137,97,254,61,233,41,255,94,42,55,255,108,164,236,0,152,68,254,0,10,140,131,255,10,106,79,254,243,158,137,0,67,178,66,254,177,123,198,255,15,62,34,0,197,88,42,255,149,95,177,255,152,0,198,255,149,254,113,255,225,90,163,255,125,217,247,0,18,17,224,0,128,66,120,254,192,25,9,255,50,221,205,0,49,212,70,0,233,255,164,0,2,209,9,0,221,52,219,254,172,224,244,255,94,56,206,1,242,179,2,255,31,91,164,1,230,46,138,255,189,230,220,0,57,47,61,255,111,11,157,0,177,91,152,0,28,230,98,0,97,87,126,0,198,89,145,255,167,79,107,0,249,77,160,1,29,233,230,255,150,21,86,254,60,11,193,0,151,37,36,254,185,150,243,255,228,212,83,1,172,151,180,0,201,169,155,0,244,60,234,0,142,235,4,1,67,218,60,0,192,113,75,1,116,243,207,255,65,172,155,0,81,30,156,255,80,72,33,254,18,231,109,255,142,107,21,254,125,26,132,255,176,16,59,255,150,201,58,0,206,169,201,0,208,121,226,0,40,172,14,255,150,61,94,255,56,57,156,255,141,60,145,255,45,108,149,255,238,145,155,255,209,85,31,254,192,12,210,0,99,98,93,254,152,16,151,0,225,185,220,0,141,235,44,255,160,172,21,254,71,26,31,255,13,64,93,254,28,56,198,0,177,62,248,1,182,8,241,0,166,101,148,255,78,81,133,255,129,222,215,1,188,169,129,255,232,7,97,0,49,112,60,255,217,229,251,0,119,108,138,0,39,19,123,254,131,49,235,0,132,84,145,0,130,230,148,255,25,74,187,0,5,245,54,255,185,219,241,1,18,194,228,255,241,202,102,0,105,113,202,0,155,235,79,0,21,9,178,255,156,1,239,0,200,148,61,0,115,247,210,255,49,221,135,0,58,189,8,1,35,46,9,0,81,65,5,255,52,158,185,255,125,116,46,255,74,140,13,255,210,92,172,254,147,23,71,0,217,224,253,254,115,108,180,255,145,58,48,254,219,177,24,255,156,255,60,1,154,147,242,0,253,134,87,0,53,75,229,0,48,195,222,255,31,175,50,255,156,210,120,255,208,35,222,255,18,248,179,1,2,10,101,255,157,194,248,255,158,204,101,255,104,254,197,255,79,62,4,0,178,172,101,1,96,146,251,255,65,10,156,0,2,137,165,255,116,4,231,0,242,215,1,0,19,35,29,255,43,161,79,0,59,149,246,1,251,66,176,0,200,33,3,255,80,110,142,255,195,161,17,1,228,56,66,255,123,47,145,254,132,4,164,0,67,174,172,0,25,253,114,0,87,97,87,1,250,220,84,0,96,91,200,255,37,125,59,0,19,65,118,0,161,52,241,255,237,172,6,255,176,191,255,255,1,65,130,254,223,190,230,0,101,253,231,255,146,35,109,0,250,29,77,1,49,0,19,0,123,90,155,1,22,86,32,255,218,213,65,0,111,93,127,0,60,93,169,255,8,127,182,0,17,186,14,254,253,137,246,255,213,25,48,254,76,238,0,255,248,92,70,255,99,224,139,0,184,9,255,1,7,164,208,0,205,131,198,1,87,214,199,0,130,214,95,0,221,149,222,0,23,38,171,254,197,110,213,0,43,115,140,254,215,177,118,0,96,52,66,1,117,158,237,0,14,64,182,255,46,63,174,255,158,95,190,255,225,205,177,255,43,5,142,255,172,99,212,255,244,187,147,0,29,51,153,255,228,116,24,254,30,101,207,0,19,246,150,255,134,231,5,0,125,134,226,1,77,65,98,0,236,130,33,255,5,110,62,0,69,108,127,255,7,113,22,0,145,20,83,254,194,161,231,255,131,181,60,0,217,209,177,255,229,148,212,254,3,131,184,0,117,177,187,1,28,14,31,255,176,102,80,0,50,84,151,255,125,31,54,255,21,157,133,255,19,179,139,1,224,232,26,0,34,117,170,255,167,252,171,255,73,141,206,254,129,250,35,0,72,79,236,1,220,229,20,255,41,202,173,255,99,76,238,255,198,22,224,255,108,198,195,255,36,141,96,1,236,158,59,255,106,100,87,0,110,226,2,0,227,234,222,0,154,93,119,255,74,112,164,255,67,91,2,255,21,145,33,255,102,214,137,255,175,230,103,254,163,246,166,0,93,247,116,254,167,224,28,255,220,2,57,1,171,206,84,0,123,228,17,255,27,120,119,0,119,11,147,1,180,47,225,255,104,200,185,254,165,2,114,0,77,78,212,0,45,154,177,255,24,196,121,254,82,157,182,0,90,16,190,1,12,147,197,0,95,239,152,255,11,235,71,0,86,146,119,255,172,134,214,0,60,131,196,0,161,225,129,0,31,130,120,254,95,200,51,0,105,231,210,255,58,9,148,255,43,168,221,255,124,237,142,0,198,211,50,254,46,245,103,0,164,248,84,0,152,70,208,255,180,117,177,0,70,79,185,0,243,74,32,0,149,156,207,0,197,196,161,1,245,53,239,0,15,93,246,254,139,240,49,255,196,88,36,255,162,38,123,0,128,200,157,1,174,76,103,255,173,169,34,254,216,1,171,255,114,51,17,0,136,228,194,0,110,150,56,254,106,246,159,0,19,184,79,255,150,77,240,255,155,80,162,0,0,53,169,255,29,151,86,0,68,94,16,0,92,7,110,254,98,117,149,255,249,77,230,255,253,10,140,0,214,124,92,254,35,118,235,0,89,48,57,1,22,53,166,0,184,144,61,255,179,255,194,0,214,248,61,254,59,110,246,0,121,21,81,254,166,3,228,0,106,64,26,255,69,232,134,255,242,220,53,254,46,220,85,0,113,149,247,255,97,179,103,255,190,127,11,0,135,209,182,0,95,52,129,1,170,144,206,255,122,200,204,255,168,100,146,0,60,144,149,254,70,60,40,0,122,52,177,255,246,211,101,255,174,237,8,0,7,51,120,0,19,31,173,0,126,239,156,255,143,189,203,0,196,128,88,255,233,133,226,255,30,125,173,255,201,108,50,0,123,100,59,255,254,163,3,1,221,148,181,255,214,136,57,254,222,180,137,255,207,88,54,255,28,33,251,255,67,214,52,1,210,208,100,0,81,170,94,0,145,40,53,0,224,111,231,254,35,28,244,255,226,199,195,254,238,17,230,0,217,217,164,254,169,157,221,0,218,46,162,1,199,207,163,255,108,115,162,1,14,96,187,255,118,60,76,0,184,159,152,0,209,231,71,254,42,164,186,255,186,153,51,254,221,171,182,255,162,142,173,0,235,47,193,0,7,139,16,1,95,164,64,255,16,221,166,0,219,197,16,0,132,29,44,255,100,69,117,255,60,235,88,254,40,81,173,0,71,190,61,255,187,88,157,0,231,11,23,0,237,117,164,0,225,168,223,255,154,114,116,255,163,152,242,1,24,32,170,0,125,98,113,254,168,19,76,0,17,157,220,254,155,52,5,0,19,111,161,255,71,90,252,255,173,110,240,0,10,198,121,255,253,255,240,255,66,123,210,0,221,194,215,254,121,163,17,255,225,7,99,0,190,49,182,0,115,9,133,1,232,26,138,255,213,68,132,0,44,119,122,255,179,98,51,0,149,90,106,0,71,50,230,255,10,153,118,255,177,70,25,0,165,87,205,0,55,138,234,0,238,30,97,0,113,155,207,0,98,153,127,0,34,107,219,254,117,114,172,255,76,180,255,254,242,57,179,255,221,34,172,254,56,162,49,255,83,3,255,255,113,221,189,255,188,25,228,254,16,88,89,255,71,28,198,254,22,17,149,255,243,121,254,255,107,202,99,255,9,206,14,1,220,47,153,0,107,137,39,1,97,49,194,255,149,51,197,254,186,58,11,255,107,43,232,1,200,6,14,255,181,133,65,254,221,228,171,255,123,62,231,1,227,234,179,255,34,189,212,254,244,187,249,0,190,13,80,1,130,89,1,0,223,133,173,0,9,222,198,255,66,127,74,0,167,216,93,255,155,168,198,1,66,145,0,0,68,102,46,1,172,90,154,0,216,128,75,255,160,40,51,0,158,17,27,1,124,240,49,0,236,202,176,255,151,124,192,255,38,193,190,0,95,182,61,0,163,147,124,255,255,165,51,255,28,40,17,254,215,96,78,0,86,145,218,254,31,36,202,255,86,9,5,0,111,41,200,255,237,108,97,0,57,62,44,0,117,184,15,1,45,241,116,0,152,1,220,255,157,165,188,0,250,15,131,1,60,44,125,255,65,220,251,255,75,50,184,0,53,90,128,255,231,80,194,255,136,129,127,1,21,18,187,255,45,58,161,255,71,147,34,0,174,249,11,254,35,141,29,0,239,68,177,255,115,110,58,0,238,190,177,1,87,245,166,255,190,49,247,255,146,83,184,255,173,14,39,255,146,215,104,0,142,223,120,0,149,200,155,255,212,207,145,1,16,181,217,0,173,32,87,255,255,35,181,0,119,223,161,1,200,223,94,255,70,6,186,255,192,67,85,255,50,169,152,0,144,26,123,255,56,243,179,254,20,68,136,0,39,140,188,254,253,208,5,255,200,115,135,1,43,172,229,255,156,104,187,0,151,251,167,0,52,135,23,0,151,153,72,0,147,197,107,254,148,158,5,255,238,143,206,0,126,153,137,255,88,152,197,254,7,68,167,0,252,159,165,255,239,78,54,255,24,63,55,255,38,222,94,0,237,183,12,255,206,204,210,0,19,39,246,254,30,74,231,0,135,108,29,1,179,115,0,0,117,118,116,1,132,6,252,255,145,129,161,1,105,67,141,0,82,37,226,255,238,226,228,255,204,214,129,254,162,123,100,255,185,121,234,0,45,108,231,0,66,8,56,255,132,136,128,0,172,224,66,254,175,157,188,0,230,223,226,254,242,219,69,0,184,14,119,1,82,162,56,0,114,123,20,0,162,103,85,255,49,239,99,254,156,135,215,0,111,255,167,254,39,196,214,0,144,38,79,1,249,168,125,0,155,97,156,255,23,52,219,255,150,22,144,0,44,149,165,255,40,127,183,0,196,77,233,255,118,129,210,255,170,135,230,255,214,119,198,0,233,240,35,0,253,52,7,255,117,102,48,255,21,204,154,255,179,136,177,255,23,2,3,1,149,130,89,255,252,17,159,1,70,60,26,0,144,107,17,0,180,190,60,255,56,182,59,255,110,71,54,255,198,18,129,255,149,224,87,255,223,21,152,255,138,22,182,255,250,156,205,0,236,45,208,255,79,148,242,1,101,70,209,0,103,78,174,0,101,144,172,255,152,136,237,1,191,194,136,0,113,80,125,1,152,4,141,0,155,150,53,255,196,116,245,0,239,114,73,254,19,82,17,255,124,125,234,255,40,52,191,0,42,210,158,255,155,132,165,0,178,5,42,1,64,92,40,255,36,85,77,255,178,228,118,0,137,66,96,254,115,226,66,0,110,240,69,254,151,111,80,0,167,174,236,255,227,108,107,255,188,242,65,255,183,81,255,0,57,206,181,255,47,34,181,255,213,240,158,1,71,75,95,0,156,40,24,255,102,210,81,0,171,199,228,255,154,34,41,0,227,175,75,0,21,239,195,0,138,229,95,1,76,192,49,0,117,123,87,1,227,225,130,0,125,62,63,255,2,198,171,0,254,36,13,254,145,186,206,0,148,255,244,255,35,0,166,0,30,150,219,1,92,228,212,0,92,198,60,254,62,133,200,255,201,41,59,0,125,238,109,255,180,163,238,1,140,122,82,0,9,22,88,255,197,157,47,255,153,94,57,0,88,30,182,0,84,161,85,0,178,146,124,0,166,166,7,255,21,208,223,0,156,182,242,0,155,121,185,0,83,156,174,254,154,16,118,255,186,83,232,1,223,58,121,255,29,23,88,0,35,125,127,255,170,5,149,254,164,12,130,255,155,196,29,0,161,96,136,0,7,35,29,1,162,37,251,0,3,46,242,255,0,217,188,0,57,174,226,1,206,233,2,0,57,187,136,254,123,189,9,255,201,117,127,255,186,36,204,0,231,25,216,0,80,78,105,0,19,134,129,255,148,203,68,0,141,81,125,254,248,165,200,255,214,144,135,0,151,55,166,255,38,235,91,0,21,46,154,0,223,254,150,255,35,153,180,255,125,176,29,1,43,98,30,255,216,122,230,255,233,160,12,0,57,185,12,254,240,113,7,255,5,9,16,254,26,91,108,0,109,198,203,0,8,147,40,0,129,134,228,255,124,186,40,255,114,98,132,254,166,132,23,0,99,69,44,0,9,242,238,255,184,53,59,0,132,129,102,255,52,32,243,254,147,223,200,255,123,83,179,254,135,144,201,255,141,37,56,1,151,60,227,255,90,73,156,1,203,172,187,0,80,151,47,255,94,137,231,255,36,191,59,255,225,209,181,255,74,215,213,254,6,118,179,255,153,54,193,1,50,0,231,0,104,157,72,1,140,227,154,255,182,226,16,254,96,225,92,255,115,20,170,254,6,250,78,0,248,75,173,255,53,89,6,255,0,180,118,0,72,173,1,0,64,8,206,1,174,133,223,0,185,62,133,255,214,11,98,0,197,31,208,0,171,167,244,255,22,231,181,1,150,218,185,0,247,169,97,1,165,139,247,255,47,120,149,1,103,248,51,0,60,69,28,254,25,179,196,0,124,7,218,254,58,107,81,0,184,233,156,255,252,74,36,0,118,188,67,0,141,95,53,255,222,94,165,254,46,61,53,0,206,59,115,255,47,236,250,255,74,5,32,1,129,154,238,255,106,32,226,0,121,187,61,255,3,166,241,254,67,170,172,255,29,216,178,255,23,201,252,0,253,110,243,0,200,125,57,0,109,192,96,255,52,115,238,0,38,121,243,255,201,56,33,0,194,118,130,0,75,96,25,255,170,30,230,254,39,63,253,0,36,45,250,255,251,1,239,0,160,212,92,1,45,209,237,0,243,33,87,254,237,84,201,255,212,18,157,254,212,99,127,255,217,98,16,254,139,172,239,0,168,201,130,255,143,193,169,255,238,151,193,1,215,104,41,0,239,61,165,254,2,3,242,0,22,203,177,254,177,204,22,0,149,129,213,254,31,11,41,255,0,159,121,254,160,25,114,255,162,80,200,0,157,151,11,0,154,134,78,1,216,54,252,0,48,103,133,0,105,220,197,0,253,168,77,254,53,179,23,0,24,121,240,1,255,46,96,255,107,60,135,254,98,205,249,255,63,249,119,255,120,59,211,255,114,180,55,254,91,85,237,0,149,212,77,1,56,73,49,0,86,198,150,0,93,209,160,0,69,205,182,255,244,90,43,0,20,36,176,0,122,116,221,0,51,167,39,1,231,1,63,255,13,197,134,0,3,209,34,255,135,59,202,0,167,100,78,0,47,223,76,0,185,60,62,0,178,166,123,1,132,12,161,255,61,174,43,0,195,69,144,0,127,47,191,1,34,44,78,0,57,234,52,1,255,22,40,255,246,94,146,0,83,228,128,0,60,78,224,255,0,96,210,255,153,175,236,0,159,21,73,0,180,115,196,254,131,225,106,0,255,167,134,0,159,8,112,255,120,68,194,255,176,196,198,255,118,48,168,255,93,169,1,0,112,200,102,1,74,24,254,0,19,141,4,254,142,62,63,0,131,179,187,255,77,156,155,255,119,86,164,0,170,208,146,255,208,133,154,255,148,155,58,255,162,120,232,254,252,213,155,0,241,13,42,0,94,50,131,0,179,170,112,0,140,83,151,255,55,119,84,1,140,35,239,255,153,45,67,1,236,175,39,0,54,151,103,255,158,42,65,255,196,239,135,254,86,53,203,0,149,97,47,254,216,35,17,255,70,3,70,1,103,36,90,255,40,26,173,0,184,48,13,0,163,219,217,255,81,6,1,255,221,170,108,254,233,208,93,0,100,201,249,254,86,36,35,255,209,154,30,1,227,201,251,255,2,189,167,254,100,57,3,0,13,128,41,0,197,100,75,0,150,204,235,255,145,174,59,0,120,248,149,255,85,55,225,0,114,210,53,254,199,204,119,0,14,247,74,1,63,251,129,0,67,104,151,1,135,130,80,0,79,89,55,255,117,230,157,255,25,96,143,0,213,145,5,0,69,241,120,1,149,243,95,255,114,42,20,0,131,72,2,0,154,53,20,255,73,62,109,0,196,102,152,0,41,12,204,255,122,38,11,1,250,10,145,0,207,125,148,0,246,244,222,255,41,32,85,1,112,213,126,0,162,249,86,1,71,198,127,255,81,9,21,1,98,39,4,255,204,71,45,1,75,111,137,0,234,59,231,0,32,48,95,255,204,31,114,1,29,196,181,255,51,241,167,254,93,109,142,0,104,144,45,0,235,12,181,255,52,112,164,0,76,254,202,255,174,14,162,0,61,235,147,255,43,64,185,254,233,125,217,0,243,88,167,254,74,49,8,0,156,204,66,0,124,214,123,0,38,221,118,1,146,112,236,0,114,98,177,0,151,89,199,0,87,197,112,0,185,149,161,0,44,96,165,0,248,179,20,255,188,219,216,254,40,62,13,0,243,142,141,0,229,227,206,255,172,202,35,255,117,176,225,255,82,110,38,1,42,245,14,255,20,83,97,0,49,171,10,0,242,119,120,0,25,232,61,0,212,240,147,255,4,115,56,255,145,17,239,254,202,17,251,255,249,18,245,255,99,117,239,0,184,4,179,255,246,237,51,255,37,239,137,255,166,112,166,255,81,188,33,255,185,250,142,255,54,187,173,0,208,112,201,0,246,43,228,1,104,184,88,255,212,52,196,255,51,117,108,255,254,117,155,0,46,91,15,255,87,14,144,255,87,227,204,0,83,26,83,1,159,76,227,0,159,27,213,1,24,151,108,0,117,144,179,254,137,209,82,0,38,159,10,0,115,133,201,0,223,182,156,1,110,196,93,255,57,60,233,0,5,167,105,255,154,197,164,0,96,34,186,255,147,133,37,1,220,99,190,0,1,167,84,255,20,145,171,0,194,197,251,254,95,78,133,255,252,248,243,255,225,93,131,255,187,134,196,255,216,153,170,0,20,118,158,254,140,1,118,0,86,158,15,1,45,211,41,255,147,1,100,254,113,116,76,255,211,127,108,1,103,15,48,0,193,16,102,1,69,51,95,255,107,128,157,0,137,171,233,0,90,124,144,1,106,161,182,0,175,76,236,1,200,141,172,255,163,58,104,0,233,180,52,255,240,253,14,255,162,113,254,255,38,239,138,254,52,46,166,0,241,101,33,254,131,186,156,0,111,208,62,255,124,94,160,255,31,172,254,0,112,174,56,255,188,99,27,255,67,138,251,0,125,58,128,1,156,152,174,255,178,12,247,255,252,84,158,0,82,197,14,254,172,200,83,255,37,39,46,1,106,207,167,0,24,189,34,0,131,178,144,0,206,213,4,0,161,226,210,0,72,51,105,255,97,45,187,255,78,184,223,255,176,29,251,0,79,160,86,255,116,37,178,0,82,77,213,1,82,84,141,255,226,101,212,1,175,88,199,255,245,94,247,1,172,118,109,255,166,185,190,0,131,181,120,0,87,254,93,255,134,240,73,255,32,245,143,255,139,162,103,255,179,98,18,254,217,204,112,0,147,223,120,255,53,10,243,0,166,140,150,0,125,80,200,255,14,109,219,255,91,218,1,255,252,252,47,254,109,156,116,255,115,49,127,1,204,87,211,255,148,202,217,255,26,85,249,255,14,245,134,1,76,89,169,255,242,45,230,0,59,98,172,255,114,73,132,254,78,155,49,255,158,126,84,0,49,175,43,255,16,182,84,255,157,103,35,0,104,193,109,255,67,221,154,0,201,172,1,254,8,162,88,0,165,1,29,255,125,155,229,255,30,154,220,1,103,239,92,0,220,1,109,255,202,198,1,0,94,2,142,1,36,54,44,0,235,226,158,255,170,251,214,255,185,77,9,0,97,74,242,0,219,163,149,255,240,35,118,255,223,114,88,254,192,199,3,0,106,37,24,255,201,161,118,255,97,89,99,1,224,58,103,255,101,199,147,254,222,60,99,0,234,25,59,1,52,135,27,0,102,3,91,254,168,216,235,0,229,232,136,0,104,60,129,0,46,168,238,0,39,191,67,0,75,163,47,0,143,97,98,255,56,216,168,1,168,233,252,255,35,111,22,255,92,84,43,0,26,200,87,1,91,253,152,0,202,56,70,0,142,8,77,0,80,10,175,1,252,199,76,0,22,110,82,255,129,1,194,0,11,128,61,1,87,14,145,255,253,222,190,1,15,72,174,0,85,163,86,254,58,99,44,255,45,24,188,254,26,205,15,0,19,229,210,254,248,67,195,0,99,71,184,0,154,199,37,255,151,243,121,255,38,51,75,255,201,85,130,254,44,65,250,0,57,147,243,254,146,43,59,255,89,28,53,0,33,84,24,255,179,51,18,254,189,70,83,0,11,156,179,1,98,134,119,0,158,111,111,0,119,154,73,255,200,63,140,254,45,13,13,255,154,192,2,254,81,72,42,0,46,160,185,254,44,112,6,0,146,215,149,1,26,176,104,0,68,28,87,1,236,50,153,255,179,128,250,254,206,193,191,255,166,92,137,254,53,40,239,0,210,1,204,254,168,173,35,0,141,243,45,1,36,50,109,255,15,242,194,255,227,159,122,255,176,175,202,254,70,57,72,0,40,223,56,0,208,162,58,255,183,98,93,0,15,111,12,0,30,8,76,255,132,127,246,255,45,242,103,0,69,181,15,255,10,209,30,0,3,179,121,0,241,232,218,1,123,199,88,255,2,210,202,1,188,130,81,255,94,101,208,1,103,36,45,0,76,193,24,1,95,26,241,255,165,162,187,0,36,114,140,0,202,66,5,255,37,56,147,0,152,11,243,1,127,85,232,255,250,135,212,1,185,177,113,0,90,220,75,255,69,248,146,0,50,111,50,0,92,22,80,0,244,36,115,254,163,100,82,255,25,193,6,1,127,61,36,0,253,67,30,254,65,236,170,255,161,17,215,254,63,175,140,0,55,127,4,0,79,112,233,0,109,160,40,0,143,83,7,255,65,26,238,255,217,169,140,255,78,94,189,255,0,147,190,255,147,71,186,254,106,77,127,255,233,157,233,1,135,87,237,255,208,13,236,1,155,109,36,255,180,100,218,0,180,163,18,0,190,110,9,1,17,63,123,255,179,136,180,255,165,123,123,255,144,188,81,254,71,240,108,255,25,112,11,255,227,218,51,255,167,50,234,255,114,79,108,255,31,19,115,255,183,240,99,0,227,87,143,255,72,217,248,255,102,169,95,1,129,149,149,0,238,133,12,1,227,204,35,0,208,115,26,1,102,8,234,0,112,88,143,1,144,249,14,0,240,158,172,254,100,112,119,0,194,141,153,254,40,56,83,255,121,176,46,0,42,53,76,255,158,191,154,0,91,209,92,0,173,13,16,1,5,72,226,255,204,254,149,0,80,184,207,0,100,9,122,254,118,101,171,255,252,203,0,254,160,207,54,0,56,72,249,1,56,140,13,255,10,64,107,254,91,101,52,255,225,181,248,1,139,255,132,0,230,145,17,0,233,56,23,0,119,1,241,255,213,169,151,255,99,99,9,254,185,15,191,255,173,103,109,1,174,13,251,255,178,88,7,254,27,59,68,255,10,33,2,255,248,97,59,0,26,30,146,1,176,147,10,0,95,121,207,1,188,88,24,0,185,94,254,254,115,55,201,0,24,50,70,0,120,53,6,0,142,66,146,0,228,226,249,255,104,192,222,1,173,68,219,0,162,184,36,255,143,102,137,255,157,11,23,0,125,45,98,0,235,93,225,254,56,112,160,255,70,116,243,1,153,249,55,255,129,39,17,1,241,80,244,0,87,69,21,1,94,228,73,255,78,66,65,255,194,227,231,0,61,146,87,255,173,155,23,255,112,116,219,254,216,38,11,255,131,186,133,0,94,212,187,0,100,47,91,0,204,254,175,255,222,18,215,254,173,68,108,255,227,228,79,255,38,221,213,0,163,227,150,254,31,190,18,0,160,179,11,1,10,90,94,255,220,174,88,0,163,211,229,255,199,136,52,0,130,95,221,255,140,188,231,254,139,113,128,255,117,171,236,254,49,220,20,255,59,20,171,255,228,109,188,0,20,225,32,254,195,16,174,0,227,254,136,1,135,39,105,0,150,77,206,255,210,238,226,0,55,212,132,254,239,57,124,0,170,194,93,255,249,16,247,255,24,151,62,255,10,151,10,0,79,139,178,255,120,242,202,0,26,219,213,0,62,125,35,255,144,2,108,255,230,33,83,255,81,45,216,1,224,62,17,0,214,217,125,0,98,153,153,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); -/* memory initializer */ allocate([179,176,106,254,131,93,138,255,109,62,36,255,178,121,32,255,120,252,70,0,220,248,37,0,204,88,103,1,128,220,251,255,236,227,7,1,106,49,198,255,60,56,107,0,99,114,238,0,220,204,94,1,73,187,1,0,89,154,34,0,78,217,165,255,14,195,249,255,9,230,253,255,205,135,245,0,26,252,7,255,84,205,27,1,134,2,112,0,37,158,32,0,231,91,237,255,191,170,204,255,152,7,222,0,109,192,49,0,193,166,146,255,232,19,181,255,105,142,52,255,103,16,27,1,253,200,165,0,195,217,4,255,52,189,144,255,123,155,160,254,87,130,54,255,78,120,61,255,14,56,41,0,25,41,125,255,87,168,245,0,214,165,70,0,212,169,6,255,219,211,194,254,72,93,164,255,197,33,103,255,43,142,141,0,131,225,172,0,244,105,28,0,68,68,225,0,136,84,13,255,130,57,40,254,139,77,56,0,84,150,53,0,54,95,157,0,144,13,177,254,95,115,186,0,117,23,118,255,244,166,241,255,11,186,135,0,178,106,203,255,97,218,93,0,43,253,45,0,164,152,4,0,139,118,239,0,96,1,24,254,235,153,211,255,168,110,20,255,50,239,176,0,114,41,232,0,193,250,53,0,254,160,111,254,136,122,41,255,97,108,67,0,215,152,23,255,140,209,212,0,42,189,163,0,202,42,50,255,106,106,189,255,190,68,217,255,233,58,117,0,229,220,243,1,197,3,4,0,37,120,54,254,4,156,134,255,36,61,171,254,165,136,100,255,212,232,14,0,90,174,10,0,216,198,65,255,12,3,64,0,116,113,115,255,248,103,8,0,231,125,18,255,160,28,197,0,30,184,35,1,223,73,249,255,123,20,46,254,135,56,37,255,173,13,229,1,119,161,34,255,245,61,73,0,205,125,112,0,137,104,134,0,217,246,30,255,237,142,143,0,65,159,102,255,108,164,190,0,219,117,173,255,34,37,120,254,200,69,80,0,31,124,218,254,74,27,160,255,186,154,199,255,71,199,252,0,104,81,159,1,17,200,39,0,211,61,192,1,26,238,91,0,148,217,12,0,59,91,213,255,11,81,183,255,129,230,122,255,114,203,145,1,119,180,66,255,72,138,180,0,224,149,106,0,119,82,104,255,208,140,43,0,98,9,182,255,205,101,134,255,18,101,38,0,95,197,166,255,203,241,147,0,62,208,145,255,133,246,251,0,2,169,14,0,13,247,184,0,142,7,254,0,36,200,23,255,88,205,223,0,91,129,52,255,21,186,30,0,143,228,210,1,247,234,248,255,230,69,31,254,176,186,135,255,238,205,52,1,139,79,43,0,17,176,217,254,32,243,67,0,242,111,233,0,44,35,9,255,227,114,81,1,4,71,12,255,38,105,191,0,7,117,50,255,81,79,16,0,63,68,65,255,157,36,110,255,77,241,3,255,226,45,251,1,142,25,206,0,120,123,209,1,28,254,238,255,5,128,126,255,91,222,215,255,162,15,191,0,86,240,73,0,135,185,81,254,44,241,163,0,212,219,210,255,112,162,155,0,207,101,118,0,168,72,56,255,196,5,52,0,72,172,242,255,126,22,157,255,146,96,59,255,162,121,152,254,140,16,95,0,195,254,200,254,82,150,162,0,119,43,145,254,204,172,78,255,166,224,159,0,104,19,237,255,245,126,208,255,226,59,213,0,117,217,197,0,152,72,237,0,220,31,23,254,14,90,231,255,188,212,64,1,60,101,246,255,85,24,86,0,1,177,109,0,146,83,32,1,75,182,192,0,119,241,224,0,185,237,27,255,184,101,82,1,235,37,77,255,253,134,19,0,232,246,122,0,60,106,179,0,195,11,12,0,109,66,235,1,125,113,59,0,61,40,164,0,175,104,240,0,2,47,187,255,50,12,141,0,194,139,181,255,135,250,104,0,97,92,222,255,217,149,201,255,203,241,118,255,79,151,67,0,122,142,218,255,149,245,239,0,138,42,200,254,80,37,97,255,124,112,167,255,36,138,87,255,130,29,147,255,241,87,78,255,204,97,19,1,177,209,22,255,247,227,127,254,99,119,83,255,212,25,198,1,16,179,179,0,145,77,172,254,89,153,14,255,218,189,167,0,107,233,59,255,35,33,243,254,44,112,112,255,161,127,79,1,204,175,10,0,40,21,138,254,104,116,228,0,199,95,137,255,133,190,168,255,146,165,234,1,183,99,39,0,183,220,54,254,255,222,133,0,162,219,121,254,63,239,6,0,225,102,54,255,251,18,246,0,4,34,129,1,135,36,131,0,206,50,59,1,15,97,183,0,171,216,135,255,101,152,43,255,150,251,91,0,38,145,95,0,34,204,38,254,178,140,83,255,25,129,243,255,76,144,37,0,106,36,26,254,118,144,172,255,68,186,229,255,107,161,213,255,46,163,68,255,149,170,253,0,187,17,15,0,218,160,165,255,171,35,246,1,96,13,19,0,165,203,117,0,214,107,192,255,244,123,177,1,100,3,104,0,178,242,97,255,251,76,130,255,211,77,42,1,250,79,70,255,63,244,80,1,105,101,246,0,61,136,58,1,238,91,213,0,14,59,98,255,167,84,77,0,17,132,46,254,57,175,197,255,185,62,184,0,76,64,207,0,172,175,208,254,175,74,37,0,138,27,211,254,148,125,194,0,10,89,81,0,168,203,101,255,43,213,209,1,235,245,54,0,30,35,226,255,9,126,70,0,226,125,94,254,156,117,20,255,57,248,112,1,230,48,64,255,164,92,166,1,224,214,230,255,36,120,143,0,55,8,43,255,251,1,245,1,106,98,165,0,74,107,106,254,53,4,54,255,90,178,150,1,3,120,123,255,244,5,89,1,114,250,61,255,254,153,82,1,77,15,17,0,57,238,90,1,95,223,230,0,236,52,47,254,103,148,164,255,121,207,36,1,18,16,185,255,75,20,74,0,187,11,101,0,46,48,129,255,22,239,210,255,77,236,129,255,111,77,204,255,61,72,97,255,199,217,251,255,42,215,204,0,133,145,201,255,57,230,146,1,235,100,198,0,146,73,35,254,108,198,20,255,182,79,210,255,82,103,136,0,246,108,176,0,34,17,60,255,19,74,114,254,168,170,78,255,157,239,20,255,149,41,168,0,58,121,28,0,79,179,134,255,231,121,135,255,174,209,98,255,243,122,190,0,171,166,205,0,212,116,48,0,29,108,66,255,162,222,182,1,14,119,21,0,213,39,249,255,254,223,228,255,183,165,198,0,133,190,48,0,124,208,109,255,119,175,85,255,9,209,121,1,48,171,189,255,195,71,134,1,136,219,51,255,182,91,141,254,49,159,72,0,35,118,245,255,112,186,227,255,59,137,31,0,137,44,163,0,114,103,60,254,8,213,150,0,162,10,113,255,194,104,72,0,220,131,116,255,178,79,92,0,203,250,213,254,93,193,189,255,130,255,34,254,212,188,151,0,136,17,20,255,20,101,83,255,212,206,166,0,229,238,73,255,151,74,3,255,168,87,215,0,155,188,133,255,166,129,73,0,240,79,133,255,178,211,81,255,203,72,163,254,193,168,165,0,14,164,199,254,30,255,204,0,65,72,91,1,166,74,102,255,200,42,0,255,194,113,227,255,66,23,208,0,229,216,100,255,24,239,26,0,10,233,62,255,123,10,178,1,26,36,174,255,119,219,199,1,45,163,190,0,16,168,42,0,166,57,198,255,28,26,26,0,126,165,231,0,251,108,100,255,61,229,121,255,58,118,138,0,76,207,17,0,13,34,112,254,89,16,168,0,37,208,105,255,35,201,215,255,40,106,101,254,6,239,114,0,40,103,226,254,246,127,110,255,63,167,58,0,132,240,142,0,5,158,88,255,129,73,158,255,94,89,146,0,230,54,146,0,8,45,173,0,79,169,1,0,115,186,247,0,84,64,131,0,67,224,253,255,207,189,64,0,154,28,81,1,45,184,54,255,87,212,224,255,0,96,73,255,129,33,235,1,52,66,80,255,251,174,155,255,4,179,37,0,234,164,93,254,93,175,253,0,198,69,87,255,224,106,46,0,99,29,210,0,62,188,114,255,44,234,8,0,169,175,247,255,23,109,137,255,229,182,39,0,192,165,94,254,245,101,217,0,191,88,96,0,196,94,99,255,106,238,11,254,53,126,243,0,94,1,101,255,46,147,2,0,201,124,124,255,141,12,218,0,13,166,157,1,48,251,237,255,155,250,124,255,106,148,146,255,182,13,202,0,28,61,167,0,217,152,8,254,220,130,45,255,200,230,255,1,55,65,87,255,93,191,97,254,114,251,14,0,32,105,92,1,26,207,141,0,24,207,13,254,21,50,48,255,186,148,116,255,211,43,225,0,37,34,162,254,164,210,42,255,68,23,96,255,182,214,8,255,245,117,137,255,66,195,50,0,75,12,83,254,80,140,164,0,9,165,36,1,228,110,227,0,241,17,90,1,25,52,212,0,6,223,12,255,139,243,57,0,12,113,75,1,246,183,191,255,213,191,69,255,230,15,142,0,1,195,196,255,138,171,47,255,64,63,106,1,16,169,214,255,207,174,56,1,88,73,133,255,182,133,140,0,177,14,25,255,147,184,53,255,10,227,161,255,120,216,244,255,73,77,233,0,157,238,139,1,59,65,233,0,70,251,216,1,41,184,153,255,32,203,112,0,146,147,253,0,87,101,109,1,44,82,133,255,244,150,53,255,94,152,232,255,59,93,39,255,88,147,220,255,78,81,13,1,32,47,252,255,160,19,114,255,93,107,39,255,118,16,211,1,185,119,209,255,227,219,127,254,88,105,236,255,162,110,23,255,36,166,110,255,91,236,221,255,66,234,116,0,111,19,244,254,10,233,26,0,32,183,6,254,2,191,242,0,218,156,53,254,41,60,70,255,168,236,111,0,121,185,126,255,238,142,207,255,55,126,52,0,220,129,208,254,80,204,164,255,67,23,144,254,218,40,108,255,127,202,164,0,203,33,3,255,2,158,0,0,37,96,188,255,192,49,74,0,109,4,0,0,111,167,10,254,91,218,135,255,203,66,173,255,150,194,226,0,201,253,6,255,174,102,121,0,205,191,110,0,53,194,4,0,81,40,45,254,35,102,143,255,12,108,198,255,16,27,232,255,252,71,186,1,176,110,114,0,142,3,117,1,113,77,142,0,19,156,197,1,92,47,252,0,53,232,22,1,54,18,235,0,46,35,189,255,236,212,129,0,2,96,208,254,200,238,199,255,59,175,164,255,146,43,231,0,194,217,52,255,3,223,12,0,138,54,178,254,85,235,207,0,232,207,34,0,49,52,50,255,166,113,89,255,10,45,216,255,62,173,28,0,111,165,246,0,118,115,91,255,128,84,60,0,167,144,203,0,87,13,243,0,22,30,228,1,177,113,146,255,129,170,230,254,252,153,129,255,145,225,43,0,70,231,5,255,122,105,126,254,86,246,148,255,110,37,154,254,209,3,91,0,68,145,62,0,228,16,165,255,55,221,249,254,178,210,91,0,83,146,226,254,69,146,186,0,93,210,104,254,16,25,173,0,231,186,38,0,189,122,140,255,251,13,112,255,105,110,93,0,251,72,170,0,192,23,223,255,24,3,202,1,225,93,228,0,153,147,199,254,109,170,22,0,248,101,246,255,178,124,12,255,178,254,102,254,55,4,65,0,125,214,180,0,183,96,147,0,45,117,23,254,132,191,249,0,143,176,203,254,136,183,54,255,146,234,177,0,146,101,86,255,44,123,143,1,33,209,152,0,192,90,41,254,83,15,125,255,213,172,82,0,215,169,144,0,16,13,34,0,32,209,100,255,84,18,249,1,197,17,236,255,217,186,230,0,49,160,176,255,111,118,97,255,237,104,235,0,79,59,92,254,69,249,11,255,35,172,74,1,19,118,68,0,222,124,165,255,180,66,35,255,86,174,246,0,43,74,111,255,126,144,86,255,228,234,91,0,242,213,24,254,69,44,235,255,220,180,35,0,8,248,7,255,102,47,92,255,240,205,102,255,113,230,171,1,31,185,201,255,194,246,70,255,122,17,187,0,134,70,199,255,149,3,150,255,117,63,103,0,65,104,123,255,212,54,19,1,6,141,88,0,83,134,243,255,136,53,103,0,169,27,180,0,177,49,24,0,111,54,167,0,195,61,215,255,31,1,108,1,60,42,70,0,185,3,162,255,194,149,40,255,246,127,38,254,190,119,38,255,61,119,8,1,96,161,219,255,42,203,221,1,177,242,164,255,245,159,10,0,116,196,0,0,5,93,205,254,128,127,179,0,125,237,246,255,149,162,217,255,87,37,20,254,140,238,192,0,9,9,193,0,97,1,226,0,29,38,10,0,0,136,63,255,229,72,210,254,38,134,92,255,78,218,208,1,104,36,84,255,12,5,193,255,242,175,61,255,191,169,46,1,179,147,147,255,113,190,139,254,125,172,31,0,3,75,252,254,215,36,15,0,193,27,24,1,255,69,149,255,110,129,118,0,203,93,249,0,138,137,64,254,38,70,6,0,153,116,222,0,161,74,123,0,193,99,79,255,118,59,94,255,61,12,43,1,146,177,157,0,46,147,191,0,16,255,38,0,11,51,31,1,60,58,98,255,111,194,77,1,154,91,244,0,140,40,144,1,173,10,251,0,203,209,50,254,108,130,78,0,228,180,90,0,174,7,250,0,31,174,60,0,41,171,30,0,116,99,82,255,118,193,139,255,187,173,198,254,218,111,56,0,185,123,216,0,249,158,52,0,52,180,93,255,201,9,91,255,56,45,166,254,132,155,203,255,58,232,110,0,52,211,89,255,253,0,162,1,9,87,183,0,145,136,44,1,94,122,245,0,85,188,171,1,147,92,198,0,0,8,104,0,30,95,174,0,221,230,52,1,247,247,235,255,137,174,53,255,35,21,204,255,71,227,214,1,232,82,194,0,11,48,227,255,170,73,184,255,198,251,252,254,44,112,34,0,131,101,131,255,72,168,187,0,132,135,125,255,138,104,97,255,238,184,168,255,243,104,84,255,135,216,226,255,139,144,237,0,188,137,150,1,80,56,140,255,86,169,167,255,194,78,25,255,220,17,180,255,17,13,193,0,117,137,212,255,141,224,151,0,49,244,175,0,193,99,175,255,19,99,154,1,255,65,62,255,156,210,55,255,242,244,3,255,250,14,149,0,158,88,217,255,157,207,134,254,251,232,28,0,46,156,251,255,171,56,184,255,239,51,234,0,142,138,131,255,25,254,243,1,10,201,194,0,63,97,75,0,210,239,162,0,192,200,31,1,117,214,243,0,24,71,222,254,54,40,232,255,76,183,111,254,144,14,87,255,214,79,136,255,216,196,212,0,132,27,140,254,131,5,253,0,124,108,19,255,28,215,75,0,76,222,55,254,233,182,63,0,68,171,191,254,52,111,222,255,10,105,77,255,80,170,235,0,143,24,88,255,45,231,121,0,148,129,224,1,61,246,84,0,253,46,219,255,239,76,33,0,49,148,18,254,230,37,69,0,67,134,22,254,142,155,94,0,31,157,211,254,213,42,30,255,4,228,247,254,252,176,13,255,39,0,31,254,241,244,255,255,170,45,10,254,253,222,249,0,222,114,132,0,255,47,6,255,180,163,179,1,84,94,151,255,89,209,82,254,229,52,169,255,213,236,0,1,214,56,228,255,135,119,151,255,112,201,193,0,83,160,53,254,6,151,66,0,18,162,17,0,233,97,91,0,131,5,78,1,181,120,53,255,117,95,63,255,237,117,185,0,191,126,136,255,144,119,233,0,183,57,97,1,47,201,187,255,167,165,119,1,45,100,126,0,21,98,6,254,145,150,95,255,120,54,152,0,209,98,104,0,143,111,30,254,184,148,249,0,235,216,46,0,248,202,148,255,57,95,22,0,242,225,163,0,233,247,232,255,71,171,19,255,103,244,49,255,84,103,93,255,68,121,244,1,82,224,13,0,41,79,43,255,249,206,167,255,215,52,21,254,192,32,22,255,247,111,60,0,101,74,38,255,22,91,84,254,29,28,13,255,198,231,215,254,244,154,200,0,223,137,237,0,211,132,14,0,95,64,206,255,17,62,247,255,233,131,121,1,93,23,77,0,205,204,52,254,81,189,136,0,180,219,138,1,143,18,94,0,204,43,140,254,188,175,219,0,111,98,143,255,151,63,162,255,211,50,71,254,19,146,53,0,146,45,83,254,178,82,238,255,16,133,84,255,226,198,93,255,201,97,20,255,120,118,35,255,114,50,231,255,162,229,156,255,211,26,12,0,114,39,115,255,206,212,134,0,197,217,160,255,116,129,94,254,199,215,219,255,75,223,249,1,253,116,181,255,232,215,104,255,228,130,246,255,185,117,86,0,14,5,8,0,239,29,61,1,237,87,133,255,125,146,137,254,204,168,223,0,46,168,245,0,154,105,22,0,220,212,161,255,107,69,24,255,137,218,181,255,241,84,198,255,130,122,211,255,141,8,153,255,190,177,118,0,96,89,178,0,255,16,48,254,122,96,105,255,117,54,232,255,34,126,105,255,204,67,166,0,232,52,138,255,211,147,12,0,25,54,7,0,44,15,215,254,51,236,45,0,190,68,129,1,106,147,225,0,28,93,45,254,236,141,15,255,17,61,161,0,220,115,192,0,236,145,24,254,111,168,169,0,224,58,63,255,127,164,188,0,82,234,75,1,224,158,134,0,209,68,110,1,217,166,217,0,70,225,166,1,187,193,143,255,16,7,88,255,10,205,140,0,117,192,156,1,17,56,38,0,27,124,108,1,171,215,55,255,95,253,212,0,155,135,168,255,246,178,153,254,154,68,74,0,232,61,96,254,105,132,59,0,33,76,199,1,189,176,130,255,9,104,25,254,75,198,102,255,233,1,112,0,108,220,20,255,114,230,70,0,140,194,133,255,57,158,164,254,146,6,80,255,169,196,97,1,85,183,130,0,70,158,222,1,59,237,234,255,96,25,26,255,232,175,97,255,11,121,248,254,88,35,194,0,219,180,252,254,74,8,227,0,195,227,73,1,184,110,161,255,49,233,164,1,128,53,47,0,82,14,121,255,193,190,58,0,48,174,117,255,132,23,32,0,40,10,134,1,22,51,25,255,240,11,176,255,110,57,146,0,117,143,239,1,157,101,118,255,54,84,76,0,205,184,18,255,47,4,72,255,78,112,85,255,193,50,66,1,93,16,52,255,8,105,134,0,12,109,72,255,58,156,251,0,144,35,204,0,44,160,117,254,50,107,194,0,1,68,165,255,111,110,162,0,158,83,40,254,76,214,234,0,58,216,205,255,171,96,147,255,40,227,114,1,176,227,241,0,70,249,183,1,136,84,139,255,60,122,247,254,143,9,117,255,177,174,137,254,73,247,143,0,236,185,126,255,62,25,247,255,45,64,56,255,161,244,6,0,34,57,56,1,105,202,83,0,128,147,208,0,6,103,10,255,74,138,65,255,97,80,100,255,214,174,33,255,50,134,74,255,110,151,130,254,111,84,172,0,84,199,75,254,248,59,112,255,8,216,178,1,9,183,95,0,238,27,8,254,170,205,220,0,195,229,135,0,98,76,237,255,226,91,26,1,82,219,39,255,225,190,199,1,217,200,121,255,81,179,8,255,140,65,206,0,178,207,87,254,250,252,46,255,104,89,110,1,253,189,158,255,144,214,158,255,160,245,54,255,53,183,92,1,21,200,194,255,146,33,113,1,209,1,255,0,235,106,43,255,167,52,232,0,157,229,221,0,51,30,25,0,250,221,27,1,65,147,87,255,79,123,196,0,65,196,223,255,76,44,17,1,85,241,68,0,202,183,249,255,65,212,212,255,9,33,154,1,71,59,80,0,175,194,59,255,141,72,9,0,100,160,244,0,230,208,56,0,59,25,75,254,80,194,194,0,18,3,200,254,160,159,115,0,132,143,247,1,111,93,57,255,58,237,11,1,134,222,135,255,122,163,108,1,123,43,190,255,251,189,206,254,80,182,72,255,208,246,224,1,17,60,9,0,161,207,38,0,141,109,91,0,216,15,211,255,136,78,110,0,98,163,104,255,21,80,121,255,173,178,183,1,127,143,4,0,104,60,82,254,214,16,13,255,96,238,33,1,158,148,230,255,127,129,62,255,51,255,210,255,62,141,236,254,157,55,224,255,114,39,244,0,192,188,250,255,228,76,53,0,98,84,81,255,173,203,61,254,147,50,55,255,204,235,191,0,52,197,244,0,88,43,211,254,27,191,119,0,188,231,154,0,66,81,161,0,92,193,160,1,250,227,120,0,123,55,226,0,184,17,72,0,133,168,10,254,22,135,156,255,41,25,103,255,48,202,58,0,186,149,81,255,188,134,239,0,235,181,189,254,217,139,188,255,74,48,82,0,46,218,229,0,189,253,251,0,50,229,12,255,211,141,191,1,128,244,25,255,169,231,122,254,86,47,189,255,132,183,23,255,37,178,150,255,51,137,253,0,200,78,31,0,22,105,50,0,130,60,0,0,132,163,91,254,23,231,187,0,192,79,239,0,157,102,164,255,192,82,20,1,24,181,103,255,240,9,234,0,1,123,164,255,133,233,0,255,202,242,242,0,60,186,245,0,241,16,199,255,224,116,158,254,191,125,91,255,224,86,207,0,121,37,231,255,227,9,198,255,15,153,239,255,121,232,217,254,75,112,82,0,95,12,57,254,51,214,105,255,148,220,97,1,199,98,36,0,156,209,12,254,10,212,52,0,217,180,55,254,212,170,232,255,216,20,84,255,157,250,135,0,157,99,127,254,1,206,41,0,149,36,70,1,54,196,201,255,87,116,0,254,235,171,150,0,27,163,234,0,202,135,180,0,208,95,0,254,123,156,93,0,183,62,75,0,137,235,182,0,204,225,255,255,214,139,210,255,2,115,8,255,29,12,111,0,52,156,1,0,253,21,251,255,37,165,31,254,12,130,211,0,106,18,53,254,42,99,154,0,14,217,61,254,216,11,92,255,200,197,112,254,147,38,199,0,36,252,120,254,107,169,77,0,1,123,159,255,207,75,102,0,163,175,196,0,44,1,240,0,120,186,176,254,13,98,76,255,237,124,241,255,232,146,188,255,200,96,224,0,204,31,41,0,208,200,13,0,21,225,96,255,175,156,196,0,247,208,126,0,62,184,244,254,2,171,81,0,85,115,158,0,54,64,45,255,19,138,114,0,135,71,205,0,227,47,147,1,218,231,66,0,253,209,28,0,244,15,173,255,6,15,118,254,16,150,208,255,185,22,50,255,86,112,207,255,75,113,215,1,63,146,43,255,4,225,19,254,227,23,62,255,14,255,214,254,45,8,205,255,87,197,151,254,210,82,215,255,245,248,247,255,128,248,70,0,225,247,87,0,90,120,70,0,213,245,92,0,13,133,226,0,47,181,5,1,92,163,105,255,6,30,133,254,232,178,61,255,230,149,24,255,18,49,158,0,228,100,61,254,116,243,251,255,77,75,92,1,81,219,147,255,76,163,254,254,141,213,246,0,232,37,152,254,97,44,100,0,201,37,50,1,212,244,57,0,174,171,183,255,249,74,112,0,166,156,30,0,222,221,97,255,243,93,73,254,251,101,100,255,216,217,93,255,254,138,187,255,142,190,52,255,59,203,177,255,200,94,52,0,115,114,158,255,165,152,104,1,126,99,226,255,118,157,244,1,107,200,16,0,193,90,229,0,121,6,88,0,156,32,93,254,125,241,211,255,14,237,157,255,165,154,21,255,184,224,22,255,250,24,152,255,113,77,31,0,247,171,23,255,237,177,204,255,52,137,145,255,194,182,114,0,224,234,149,0,10,111,103,1,201,129,4,0,238,142,78,0,52,6,40,255,110,213,165,254,60,207,253,0,62,215,69,0,96,97,0,255,49,45,202,0,120,121,22,255,235,139,48,1,198,45,34,255,182,50,27,1,131,210,91,255,46,54,128,0,175,123,105,255,198,141,78,254,67,244,239,255,245,54,103,254,78,38,242,255,2,92,249,254,251,174,87,255,139,63,144,0,24,108,27,255,34,102,18,1,34,22,152,0,66,229,118,254,50,143,99,0,144,169,149,1,118,30,152,0,178,8,121,1,8,159,18,0,90,101,230,255,129,29,119,0,68,36,11,1,232,183,55,0,23,255,96,255,161,41,193,255,63,139,222,0,15,179,243,0,255,100,15,255,82,53,135,0,137,57,149,1,99,240,170,255,22,230,228,254,49,180,82,255,61,82,43,0,110,245,217,0,199,125,61,0,46,253,52,0,141,197,219,0,211,159,193,0,55,121,105,254,183,20,129,0,169,119,170,255,203,178,139,255,135,40,182,255,172,13,202,255,65,178,148,0,8,207,43,0,122,53,127,1,74,161,48,0,227,214,128,254,86,11,243,255,100,86,7,1,245,68,134,255,61,43,21,1,152,84,94,255,190,60,250,254,239,118,232,255,214,136,37,1,113,76,107,255,93,104,100,1,144,206,23,255,110,150,154,1,228,103,185,0,218,49,50,254,135,77,139,255,185,1,78,0,0,161,148,255,97,29,233,255,207,148,149,255,160,168,0,0,91,128,171,255,6,28,19,254,11,111,247,0,39,187,150,255,138,232,149,0,117,62,68,255,63,216,188,255,235,234,32,254,29,57,160,255,25,12,241,1,169,60,191,0,32,131,141,255,237,159,123,255,94,197,94,254,116,254,3,255,92,179,97,254,121,97,92,255,170,112,14,0,21,149,248,0,248,227,3,0,80,96,109,0,75,192,74,1,12,90,226,255,161,106,68,1,208,114,127,255,114,42,255,254,74,26,74,255,247,179,150,254,121,140,60,0,147,70,200,255,214,40,161,255,161,188,201,255,141,65,135,255,242,115,252,0,62,47,202,0,180,149,255,254,130,55,237,0,165,17,186,255,10,169,194,0,156,109,218,255,112,140,123,255,104,128,223,254,177,142,108,255,121,37,219,255,128,77,18,255,111,108,23,1,91,192,75,0,174,245,22,255,4,236,62,255,43,64,153,1,227,173,254,0,237,122,132,1,127,89,186,255,142,82,128,254,252,84,174,0,90,179,177,1,243,214,87,255,103,60,162,255,208,130,14,255,11,130,139,0,206,129,219,255,94,217,157,255,239,230,230,255,116,115,159,254,164,107,95,0,51,218,2,1,216,125,198,255,140,202,128,254,11,95,68,255,55,9,93,254,174,153,6,255,204,172,96,0,69,160,110,0,213,38,49,254,27,80,213,0,118,125,114,0,70,70,67,255,15,142,73,255,131,122,185,255,243,20,50,254,130,237,40,0,210,159,140,1,197,151,65,255,84,153,66,0,195,126,90,0,16,238,236,1,118,187,102,255,3,24,133,255,187,69,230,0,56,197,92,1,213,69,94,255,80,138,229,1,206,7,230,0,222,111,230,1,91,233,119,255,9,89,7,1,2,98,1,0,148,74,133,255,51,246,180,255,228,177,112,1,58,189,108,255,194,203,237,254,21,209,195,0,147,10,35,1,86,157,226,0,31,163,139,254,56,7,75,255,62,90,116,0,181,60,169,0,138,162,212,254,81,167,31,0,205,90,112,255,33,112,227,0,83,151,117,1,177,224,73,255,174,144,217,255,230,204,79,255,22,77,232,255,114,78,234,0,224,57,126,254,9,49,141,0,242,147,165,1,104,182,140,255,167,132,12,1,123,68,127,0,225,87,39,1,251,108,8,0,198,193,143,1,121,135,207,255,172,22,70,0,50,68,116,255,101,175,40,255,248,105,233,0,166,203,7,0,110,197,218,0,215,254,26,254,168,226,253,0,31,143,96,0,11,103,41,0,183,129,203,254,100,247,74,255,213,126,132,0,210,147,44,0,199,234,27,1,148,47,181,0,155,91,158,1,54,105,175,255,2,78,145,254,102,154,95,0,128,207,127,254,52,124,236,255,130,84,71,0,221,243,211,0,152,170,207,0,222,106,199,0,183,84,94,254,92,200,56,255,138,182,115,1,142,96,146,0,133,136,228,0,97,18,150,0,55,251,66,0,140,102,4,0,202,103,151,0,30,19,248,255,51,184,207,0,202,198,89,0,55,197,225,254,169,95,249,255,66,65,68,255,188,234,126,0,166,223,100,1,112,239,244,0,144,23,194,0,58,39,182,0,244,44,24,254,175,68,179,255,152,118,154,1,176,162,130,0,217,114,204,254,173,126,78,255,33,222,30,255,36,2,91,255,2,143,243,0,9,235,215,0,3,171,151,1,24,215,245,255,168,47,164,254,241,146,207,0,69,129,180,0,68,243,113,0,144,53,72,254,251,45,14,0,23,110,168,0,68,68,79,255,110,70,95,254,174,91,144,255,33,206,95,255,137,41,7,255,19,187,153,254,35,255,112,255,9,145,185,254,50,157,37,0,11,112,49,1,102,8,190,255,234,243,169,1,60,85,23,0,74,39,189,0,116,49,239,0,173,213,210,0,46,161,108,255,159,150,37,0,196,120,185,255,34,98,6,255,153,195,62,255,97,230,71,255,102,61,76,0,26,212,236,255,164,97,16,0,198,59,146,0,163,23,196,0,56,24,61,0,181,98,193,0,251,147,229,255,98,189,24,255,46,54,206,255,234,82,246,0,183,103,38,1,109,62,204,0,10,240,224,0,146,22,117,255,142,154,120,0,69,212,35,0,208,99,118,1,121,255,3,255,72,6,194,0,117,17,197,255,125,15,23,0,154,79,153,0,214,94,197,255,185,55,147,255,62,254,78,254,127,82,153,0,110,102,63,255,108,82,161,255,105,187,212,1,80,138,39,0,60,255,93,255,72,12,186,0,210,251,31,1,190,167,144,255,228,44,19,254,128,67,232,0,214,249,107,254,136,145,86,255,132,46,176,0,189,187,227,255,208,22,140,0,217,211,116,0,50,81,186,254,139,250,31,0,30,64,198,1,135,155,100,0,160,206,23,254,187,162,211,255,16,188,63,0,254,208,49,0,85,84,191,0,241,192,242,255,153,126,145,1,234,162,162,255,230,97,216,1,64,135,126,0,190,148,223,1,52,0,43,255,28,39,189,1,64,136,238,0,175,196,185,0,98,226,213,255,127,159,244,1,226,175,60,0,160,233,142,1,180,243,207,255,69,152,89,1,31,101,21,0,144,25,164,254,139,191,209,0,91,25,121,0,32,147,5,0,39,186,123,255,63,115,230,255,93,167,198,255,143,213,220,255,179,156,19,255,25,66,122,0,214,160,217,255,2,45,62,255,106,79,146,254,51,137,99,255,87,100,231,255,175,145,232,255,101,184,1,255,174,9,125,0,82,37,161,1,36,114,141,255,48,222,142,255,245,186,154,0,5,174,221,254,63,114,155,255,135,55,160,1,80,31,135,0,126,250,179,1,236,218,45,0,20,28,145,1,16,147,73,0,249,189,132,1,17,189,192,255,223,142,198,255,72,20,15,255,250,53,237,254,15,11,18,0,27,211,113,254,213,107,56,255,174,147,146,255,96,126,48,0,23,193,109,1,37,162,94,0,199,157,249,254,24,128,187,255,205,49,178,254,93,164,42,255,43,119,235,1,88,183,237,255,218,210,1,255,107,254,42,0,230,10,99,255,162,0,226,0,219,237,91,0,129,178,203,0,208,50,95,254,206,208,95,255,247,191,89,254,110,234,79,255,165,61,243,0,20,122,112,255,246,246,185,254,103,4,123,0,233,99,230,1,219,91,252,255,199,222,22,255,179,245,233,255,211,241,234,0,111,250,192,255,85,84,136,0,101,58,50,255,131,173,156,254,119,45,51,255,118,233,16,254,242,90,214,0,94,159,219,1,3,3,234,255,98,76,92,254,80,54,230,0,5,228,231,254,53,24,223,255,113,56,118,1,20,132,1,255,171,210,236,0,56,241,158,255,186,115,19,255,8,229,174,0,48,44,0,1,114,114,166,255,6,73,226,255,205,89,244,0,137,227,75,1,248,173,56,0,74,120,246,254,119,3,11,255,81,120,198,255,136,122,98,255,146,241,221,1,109,194,78,255,223,241,70,1,214,200,169,255,97,190,47,255,47,103,174,255,99,92,72,254,118,233,180,255,193,35,233,254,26,229,32,255,222,252,198,0,204,43,71,255,199,84,172,0,134,102,190,0,111,238,97,254,230,40,230,0,227,205,64,254,200,12,225,0,166,25,222,0,113,69,51,255,143,159,24,0,167,184,74,0,29,224,116,254,158,208,233,0,193,116,126,255,212,11,133,255,22,58,140,1,204,36,51,255,232,30,43,0,235,70,181,255,64,56,146,254,169,18,84,255,226,1,13,255,200,50,176,255,52,213,245,254,168,209,97,0,191,71,55,0,34,78,156,0,232,144,58,1,185,74,189,0,186,142,149,254,64,69,127,255,161,203,147,255,176,151,191,0,136,231,203,254,163,182,137,0,161,126,251,254,233,32,66,0,68,207,66,0,30,28,37,0,93,114,96,1,254,92,247,255,44,171,69,0,202,119,11,255,188,118,50,1,255,83,136,255,71,82,26,0,70,227,2,0,32,235,121,1,181,41,154,0,71,134,229,254,202,255,36,0,41,152,5,0,154,63,73,255,34,182,124,0,121,221,150,255,26,204,213,1,41,172,87,0,90,157,146,255,109,130,20,0,71,107,200,255,243,102,189,0,1,195,145,254,46,88,117,0,8,206,227,0,191,110,253,255,109,128,20,254,134,85,51,255,137,177,112,1,216,34,22,255,131,16,208,255,121,149,170,0,114,19,23,1,166,80,31,255,113,240,122,0,232,179,250,0,68,110,180,254,210,170,119,0,223,108,164,255,207,79,233,255,27,229,226,254,209,98,81,255,79,68,7,0,131,185,100,0,170,29,162,255,17,162,107,255,57,21,11,1,100,200,181,255,127,65,166,1,165,134,204,0,104,167,168,0,1,164,79,0,146,135,59,1,70,50,128,255,102,119,13,254,227,6,135,0,162,142,179,255,160,100,222,0,27,224,219,1,158,93,195,255,234,141,137,0,16,24,125,255,238,206,47,255,97,17,98,255,116,110,12,255,96,115,77,0,91,227,232,255,248,254,79,255,92,229,6,254,88,198,139,0,206,75,129,0,250,77,206,255,141,244,123,1,138,69,220,0,32,151,6,1,131,167,22,255,237,68,167,254,199,189,150,0,163,171,138,255,51,188,6,255,95,29,137,254,148,226,179,0,181,107,208,255,134,31,82,255,151,101,45,255,129,202,225,0,224,72,147,0,48,138,151,255,195,64,206,254,237,218,158,0,106,29,137,254,253,189,233,255,103,15,17,255,194,97,255,0,178,45,169,254,198,225,155,0,39,48,117,255,135,106,115,0,97,38,181,0,150,47,65,255,83,130,229,254,246,38,129,0,92,239,154,254,91,99,127,0,161,111,33,255,238,217,242,255,131,185,195,255,213,191,158,255,41,150,218,0,132,169,131,0,89,84,252,1,171,70,128,255,163,248,203,254,1,50,180,255,124,76,85,1,251,111,80,0,99,66,239,255,154,237,182,255,221,126,133,254,74,204,99,255,65,147,119,255,99,56,167,255,79,248,149,255,116,155,228,255,237,43,14,254,69,137,11,255,22,250,241,1,91,122,143,255,205,249,243,0,212,26,60,255,48,182,176,1,48,23,191,255,203,121,152,254,45,74,213,255,62,90,18,254,245,163,230,255,185,106,116,255,83,35,159,0,12,33,2,255,80,34,62,0,16,87,174,255,173,101,85,0,202,36,81,254,160,69,204,255,64,225,187,0,58,206,94,0,86,144,47,0,229,86,245,0,63,145,190,1,37,5,39,0,109,251,26,0,137,147,234,0,162,121,145,255,144,116,206,255,197,232,185,255,183,190,140,255,73,12,254,255,139,20,242,255,170,90,239,255,97,66,187,255,245,181,135,254,222,136,52,0,245,5,51,254,203,47,78,0,152,101,216,0,73,23,125,0,254,96,33,1,235,210,73,255,43,209,88,1,7,129,109,0,122,104,228,254,170,242,203,0,242,204,135,255,202,28,233,255,65,6,127,0,159,144,71,0,100,140,95,0,78,150,13,0,251,107,118,1,182,58,125,255,1,38,108,255,141,189,209,255,8,155,125,1,113,163,91,255,121,79,190,255,134,239,108,255,76,47,248,0,163,228,239,0,17,111,10,0,88,149,75,255,215,235,239,0,167,159,24,255,47,151,108,255,107,209,188,0,233,231,99,254,28,202,148,255,174,35,138,255,110,24,68,255,2,69,181,0,107,102,82,0,102,237,7,0,92,36,237,255,221,162,83,1,55,202,6,255,135,234,135,255,24,250,222,0,65,94,168,254,245,248,210,255,167,108,201,254,255,161,111,0,205,8,254,0,136,13,116,0,100,176,132,255,43,215,126,255,177,133,130,255,158,79,148,0,67,224,37,1,12,206,21,255,62,34,110,1,237,104,175,255,80,132,111,255,142,174,72,0,84,229,180,254,105,179,140,0,64,248,15,255,233,138,16,0,245,67,123,254,218,121,212,255,63,95,218,1,213,133,137,255,143,182,82,255,48,28,11,0,244,114,141,1,209,175,76,255,157,181,150,255,186,229,3,255,164,157,111,1,231,189,139,0,119,202,190,255,218,106,64,255,68,235,63,254,96,26,172,255,187,47,11,1,215,18,251,255,81,84,89,0,68,58,128,0,94,113,5,1,92,129,208,255,97,15,83,254,9,28,188,0,239,9,164,0,60,205,152,0,192,163,98,255,184,18,60,0,217,182,139,0,109,59,120,255,4,192,251,0,169,210,240,255,37,172,92,254,148,211,245,255,179,65,52,0,253,13,115,0,185,174,206,1,114,188,149,255,237,90,173,0,43,199,192,255,88,108,113,0,52,35,76,0,66,25,148,255,221,4,7,255,151,241,114,255,190,209,232,0,98,50,199,0,151,150,213,255,18,74,36,1,53,40,7,0,19,135,65,255,26,172,69,0,174,237,85,0,99,95,41,0,3,56,16,0,39,160,177,255,200,106,218,254,185,68,84,255,91,186,61,254,67,143,141,255,13,244,166,255,99,114,198,0,199,110,163,255,193,18,186,0,124,239,246,1,110,68,22,0,2,235,46,1,212,60,107,0,105,42,105,1,14,230,152,0,7,5,131,0,141,104,154,255,213,3,6,0,131,228,162,255,179,100,28,1,231,123,85,255,206,14,223,1,253,96,230,0,38,152,149,1,98,137,122,0,214,205,3,255,226,152,179,255,6,133,137,0,158,69,140,255,113,162,154,255,180,243,172,255,27,189,115,255,143,46,220,255,213,134,225,255,126,29,69,0,188,43,137,1,242,70,9,0,90,204,255,255,231,170,147,0,23,56,19,254,56,125,157,255,48,179,218,255,79,182,253,255,38,212,191,1,41,235,124,0,96,151,28,0,135,148,190,0,205,249,39,254,52,96,136,255,212,44,136,255,67,209,131,255,252,130,23,255,219,128,20,255,198,129,118,0,108,101,11,0,178,5,146,1,62,7,100,255,181,236,94,254,28,26,164,0,76,22,112,255,120,102,79,0,202,192,229,1,200,176,215,0,41,64,244,255,206,184,78,0,167,45,63,1,160,35,0,255,59,12,142,255,204,9,144,255,219,94,229,1,122,27,112,0,189,105,109,255,64,208,74,255,251,127,55,1,2,226,198,0,44,76,209,0,151,152,77,255,210,23,46,1,201,171,69,255,44,211,231,0,190,37,224,255,245,196,62,255,169,181,222,255,34,211,17,0,119,241,197,255,229,35,152,1,21,69,40,255,178,226,161,0,148,179,193,0,219,194,254,1,40,206,51,255,231,92,250,1,67,153,170,0,21,148,241,0,170,69,82,255,121,18,231,255,92,114,3,0,184,62,230,0,225,201,87,255,146,96,162,255,181,242,220,0,173,187,221,1,226,62,170,255,56,126,217,1,117,13,227,255,179,44,239,0,157,141,155,255,144,221,83,0,235,209,208,0,42,17,165,1,251,81,133,0,124,245,201,254,97,211,24,255,83,214,166,0,154,36,9,255,248,47,127,0,90,219,140,255,161,217,38,254,212,147,63,255,66,84,148,1,207,3,1,0,230,134,89,1,127,78,122,255,224,155,1,255,82,136,74,0,178,156,208,255,186,25,49,255,222,3,210,1,229,150,190,255,85,162,52,255,41,84,141,255,73,123,84,254,93,17,150,0,119,19,28,1,32,22,215,255,28,23,204,255,142,241,52,255,228,52,125,0,29,76,207,0,215,167,250,254,175,164,230,0,55,207,105,1,109,187,245,255,161,44,220,1,41,101,128,255,167,16,94,0,93,214,107,255,118,72,0,254,80,61,234,255,121,175,125,0,139,169,251,0,97,39,147,254,250,196,49,255,165,179,110,254,223,70,187,255,22,142,125,1,154,179,138,255,118,176,42,1,10,174,153,0,156,92,102,0,168,13,161,255,143,16,32,0,250,197,180,255,203,163,44,1,87,32,36,0,161,153,20,255,123,252,15,0,25,227,80,0,60,88,142,0,17,22,201,1,154,205,77,255,39,63,47,0,8,122,141,0,128,23,182,254,204,39,19,255,4,112,29,255,23,36,140,255,210,234,116,254,53,50,63,255,121,171,104,255,160,219,94,0,87,82,14,254,231,42,5,0,165,139,127,254,86,78,38,0,130,60,66,254,203,30,45,255,46,196,122,1,249,53,162,255,136,143,103,254,215,210,114,0,231,7,160,254,169,152,42,255,111,45,246,0,142,131,135,255,131,71,204,255,36,226,11,0,0,28,242,255,225,138,213,255,247,46,216,254,245,3,183,0,108,252,74,1,206,26,48,255,205,54,246,255,211,198,36,255,121,35,50,0,52,216,202,255,38,139,129,254,242,73,148,0,67,231,141,255,42,47,204,0,78,116,25,1,4,225,191,255,6,147,228,0,58,88,177,0,122,165,229,255,252,83,201,255,224,167,96,1,177,184,158,255,242,105,179,1,248,198,240,0,133,66,203,1,254,36,47,0,45,24,115,255,119,62,254,0,196,225,186,254,123,141,172,0,26,85,41,255,226,111,183,0,213,231,151,0,4,59,7,255,238,138,148,0,66,147,33,255,31,246,141,255,209,141,116,255,104,112,31,0,88,161,172,0,83,215,230,254,47,111,151,0,45,38,52,1,132,45,204,0,138,128,109,254,233,117,134,255,243,190,173,254,241,236,240,0,82,127,236,254,40,223,161,255,110,182,225,255,123,174,239,0,135,242,145,1,51,209,154,0,150,3,115,254,217,164,252,255,55,156,69,1,84,94,255,255,232,73,45,1,20,19,212,255,96,197,59,254,96,251,33,0,38,199,73,1,64,172,247,255,117,116,56,255,228,17,18,0,62,138,103,1,246,229,164,255,244,118,201,254,86,32,159,255,109,34,137,1,85,211,186,0,10,193,193,254,122,194,177,0,122,238,102,255,162,218,171,0,108,217,161,1,158,170,34,0,176,47,155,1,181,228,11,255,8,156,0,0,16,75,93,0,206,98,255,1,58,154,35,0,12,243,184,254,67,117,66,255,230,229,123,0,201,42,110,0,134,228,178,254,186,108,118,255,58,19,154,255,82,169,62,255,114,143,115,1,239,196,50,255,173,48,193,255,147,2,84,255,150,134,147,254,95,232,73,0,109,227,52,254,191,137,10,0,40,204,30,254,76,52,97,255,164,235,126,0,254,124,188,0,74,182,21,1,121,29,35,255,241,30,7,254,85,218,214,255,7,84,150,254,81,27,117,255,160,159,152,254,66,24,221,255,227,10,60,1,141,135,102,0,208,189,150,1,117,179,92,0,132,22,136,255,120,199,28,0,21,129,79,254,182,9,65,0,218,163,169,0,246,147,198,255,107,38,144,1,78,175,205,255,214,5,250,254,47,88,29,255,164,47,204,255,43,55,6,255,131,134,207,254,116,100,214,0,96,140,75,1,106,220,144,0,195,32,28,1,172,81,5,255,199,179,52,255,37,84,203,0,170,112,174,0,11,4,91,0,69,244,27,1,117,131,92,0,33,152,175,255,140,153,107,255,251,135,43,254,87,138,4,255,198,234,147,254,121,152,84,255,205,101,155,1,157,9,25,0,72,106,17,254,108,153,0,255,189,229,186,0,193,8,176,255,174,149,209,0,238,130,29,0,233,214,126,1,61,226,102,0,57,163,4,1,198,111,51,255,45,79,78,1,115,210,10,255,218,9,25,255,158,139,198,255,211,82,187,254,80,133,83,0,157,129,230,1,243,133,134,255,40,136,16,0,77,107,79,255,183,85,92,1,177,204,202,0,163,71,147,255,152,69,190,0,172,51,188,1,250,210,172,255,211,242,113,1,89,89,26,255,64,66,111,254,116,152,42,0,161,39,27,255,54,80,254,0,106,209,115,1,103,124,97,0,221,230,98,255,31,231,6,0,178,192,120,254,15,217,203,255,124,158,79,0,112,145,247,0,92,250,48,1,163,181,193,255,37,47,142,254,144,189,165,255,46,146,240,0,6,75,128,0,41,157,200,254,87,121,213,0,1,113,236,0,5,45,250,0,144,12,82,0,31,108,231,0,225,239,119,255,167,7,189,255,187,228,132,255,110,189,34,0,94,44,204,1,162,52,197,0,78,188,241,254,57,20,141,0,244,146,47,1,206,100,51,0,125,107,148,254,27,195,77,0,152,253,90,1,7,143,144,255,51,37,31,0,34,119,38,255,7,197,118,0,153,188,211,0,151,20,116,254,245,65,52,255,180,253,110,1,47,177,209,0,161,99,17,255,118,222,202,0,125,179,252,1,123,54,126,255,145,57,191,0,55,186,121,0,10,243,138,0,205,211,229,255,125,156,241,254,148,156,185,255,227,19,188,255,124,41,32,255,31,34,206,254,17,57,83,0,204,22,37,255,42,96,98,0,119,102,184,1,3,190,28,0,110,82,218,255,200,204,192,255,201,145,118,0,117,204,146,0,132,32,98,1,192,194,121,0,106,161,248,1,237,88,124,0,23,212,26,0,205,171,90,255,248,48,216,1,141,37,230,255,124,203,0,254,158,168,30,255,214,248,21,0,112,187,7,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+20480); -/* memory initializer */ allocate([75,133,239,255,74,227,243,255,250,147,70,0,214,120,162,0,167,9,179,255,22,158,18,0,218,77,209,1,97,109,81,255,244,33,179,255,57,52,57,255,65,172,210,255,249,71,209,255,142,169,238,0,158,189,153,255,174,254,103,254,98,33,14,0,141,76,230,255,113,139,52,255,15,58,212,0,168,215,201,255,248,204,215,1,223,68,160,255,57,154,183,254,47,231,121,0,106,166,137,0,81,136,138,0,165,43,51,0,231,139,61,0,57,95,59,254,118,98,25,255,151,63,236,1,94,190,250,255,169,185,114,1,5,250,58,255,75,105,97,1,215,223,134,0,113,99,163,1,128,62,112,0,99,106,147,0,163,195,10,0,33,205,182,0,214,14,174,255,129,38,231,255,53,182,223,0,98,42,159,255,247,13,40,0,188,210,177,1,6,21,0,255,255,61,148,254,137,45,129,255,89,26,116,254,126,38,114,0,251,50,242,254,121,134,128,255,204,249,167,254,165,235,215,0,202,177,243,0,133,141,62,0,240,130,190,1,110,175,255,0,0,20,146,1,37,210,121,255,7,39,130,0,142,250,84,255,141,200,207,0,9,95,104,255,11,244,174,0,134,232,126,0,167,1,123,254,16,193,149,255,232,233,239,1,213,70,112,255,252,116,160,254,242,222,220,255,205,85,227,0,7,185,58,0,118,247,63,1,116,77,177,255,62,245,200,254,63,18,37,255,107,53,232,254,50,221,211,0,162,219,7,254,2,94,43,0,182,62,182,254,160,78,200,255,135,140,170,0,235,184,228,0,175,53,138,254,80,58,77,255,152,201,2,1,63,196,34,0,5,30,184,0,171,176,154,0,121,59,206,0,38,99,39,0,172,80,77,254,0,134,151,0,186,33,241,254,94,253,223,255,44,114,252,0,108,126,57,255,201,40,13,255,39,229,27,255,39,239,23,1,151,121,51,255,153,150,248,0,10,234,174,255,118,246,4,254,200,245,38,0,69,161,242,1,16,178,150,0,113,56,130,0,171,31,105,0,26,88,108,255,49,42,106,0,251,169,66,0,69,93,149,0,20,57,254,0,164,25,111,0,90,188,90,255,204,4,197,0,40,213,50,1,212,96,132,255,88,138,180,254,228,146,124,255,184,246,247,0,65,117,86,255,253,102,210,254,254,121,36,0,137,115,3,255,60,24,216,0,134,18,29,0,59,226,97,0,176,142,71,0,7,209,161,0,189,84,51,254,155,250,72,0,213,84,235,255,45,222,224,0,238,148,143,255,170,42,53,255,78,167,117,0,186,0,40,255,125,177,103,255,69,225,66,0,227,7,88,1,75,172,6,0,169,45,227,1,16,36,70,255,50,2,9,255,139,193,22,0,143,183,231,254,218,69,50,0,236,56,161,1,213,131,42,0,138,145,44,254,136,229,40,255,49,63,35,255,61,145,245,255,101,192,2,254,232,167,113,0,152,104,38,1,121,185,218,0,121,139,211,254,119,240,35,0,65,189,217,254,187,179,162,255,160,187,230,0,62,248,14,255,60,78,97,0,255,247,163,255,225,59,91,255,107,71,58,255,241,47,33,1,50,117,236,0,219,177,63,254,244,90,179,0,35,194,215,255,189,67,50,255,23,135,129,0,104,189,37,255,185,57,194,0,35,62,231,255,220,248,108,0,12,231,178,0,143,80,91,1,131,93,101,255,144,39,2,1,255,250,178,0,5,17,236,254,139,32,46,0,204,188,38,254,245,115,52,255,191,113,73,254,191,108,69,255,22,69,245,1,23,203,178,0,170,99,170,0,65,248,111,0,37,108,153,255,64,37,69,0,0,88,62,254,89,148,144,255,191,68,224,1,241,39,53,0,41,203,237,255,145,126,194,255,221,42,253,255,25,99,151,0,97,253,223,1,74,115,49,255,6,175,72,255,59,176,203,0,124,183,249,1,228,228,99,0,129,12,207,254,168,192,195,255,204,176,16,254,152,234,171,0,77,37,85,255,33,120,135,255,142,194,227,1,31,214,58,0,213,187,125,255,232,46,60,255,190,116,42,254,151,178,19,255,51,62,237,254,204,236,193,0,194,232,60,0,172,34,157,255,189,16,184,254,103,3,95,255,141,233,36,254,41,25,11,255,21,195,166,0,118,245,45,0,67,213,149,255,159,12,18,255,187,164,227,1,160,25,5,0,12,78,195,1,43,197,225,0,48,142,41,254,196,155,60,255,223,199,18,1,145,136,156,0,252,117,169,254,145,226,238,0,239,23,107,0,109,181,188,255,230,112,49,254,73,170,237,255,231,183,227,255,80,220,20,0,194,107,127,1,127,205,101,0,46,52,197,1,210,171,36,255,88,3,90,255,56,151,141,0,96,187,255,255,42,78,200,0,254,70,70,1,244,125,168,0,204,68,138,1,124,215,70,0,102,66,200,254,17,52,228,0,117,220,143,254,203,248,123,0,56,18,174,255,186,151,164,255,51,232,208,1,160,228,43,255,249,29,25,1,68,190,63,0,8,201,188,243,103,230,9,106,59,167,202,132,133,174,103,187,43,248,148,254,114,243,110,60,241,54,29,95,58,245,79,165,209,130,230,173,127,82,14,81,31,108,62,43,140,104,5,155,107,189,65,251,171,217,131,31,121,33,126,19,25,205,224,91,34,174,40,215,152,47,138,66,205,101,239,35,145,68,55,113,47,59,77,236,207,251,192,181,188,219,137,129,165,219,181,233,56,181,72,243,91,194,86,57,25,208,5,182,241,17,241,89,155,79,25,175,164,130,63,146,24,129,109,218,213,94,28,171,66,2,3,163,152,170,7,216,190,111,112,69,1,91,131,18,140,178,228,78,190,133,49,36,226,180,255,213,195,125,12,85,111,137,123,242,116,93,190,114,177,150,22,59,254,177,222,128,53,18,199,37,167,6,220,155,148,38,105,207,116,241,155,193,210,74,241,158,193,105,155,228,227,37,79,56,134,71,190,239,181,213,140,139,198,157,193,15,101,156,172,119,204,161,12,36,117,2,43,89,111,44,233,45,131,228,166,110,170,132,116,74,212,251,65,189,220,169,176,92,181,83,17,131,218,136,249,118,171,223,102,238,82,81,62,152,16,50,180,45,109,198,49,168,63,33,251,152,200,39,3,176,228,14,239,190,199,127,89,191,194,143,168,61,243,11,224,198,37,167,10,147,71,145,167,213,111,130,3,224,81,99,202,6,112,110,14,10,103,41,41,20,252,47,210,70,133,10,183,39,38,201,38,92,56,33,27,46,237,42,196,90,252,109,44,77,223,179,149,157,19,13,56,83,222,99,175,139,84,115,10,101,168,178,119,60,187,10,106,118,230,174,237,71,46,201,194,129,59,53,130,20,133,44,114,146,100,3,241,76,161,232,191,162,1,48,66,188,75,102,26,168,145,151,248,208,112,139,75,194,48,190,84,6,163,81,108,199,24,82,239,214,25,232,146,209,16,169,101,85,36,6,153,214,42,32,113,87,133,53,14,244,184,209,187,50,112,160,106,16,200,208,210,184,22,193,164,25,83,171,65,81,8,108,55,30,153,235,142,223,76,119,72,39,168,72,155,225,181,188,176,52,99,90,201,197,179,12,28,57,203,138,65,227,74,170,216,78,115,227,99,119,79,202,156,91,163,184,178,214,243,111,46,104,252,178,239,93,238,130,143,116,96,47,23,67,111,99,165,120,114,171,240,161,20,120,200,132,236,57,100,26,8,2,199,140,40,30,99,35,250,255,190,144,233,189,130,222,235,108,80,164,21,121,198,178,247,163,249,190,43,83,114,227,242,120,113,198,156,97,38,234,206,62,39,202,7,194,192,33,199,184,134,209,30,235,224,205,214,125,218,234,120,209,110,238,127,79,125,245,186,111,23,114,170,103,240,6,166,152,200,162,197,125,99,10,174,13,249,190,4,152,63,17,27,71,28,19,53,11,113,27,132,125,4,35,245,119,219,40,147,36,199,64,123,171,202,50,188,190,201,21,10,190,158,60,76,13,16,156,196,103,29,67,182,66,62,203,190,212,197,76,42,126,101,252,156,41,127,89,236,250,214,58,171,111,203,95,23,88,71,74,140,25,68,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+30720); +/* memory initializer */ allocate([8,201,188,243,103,230,9,106,59,167,202,132,133,174,103,187,43,248,148,254,114,243,110,60,241,54,29,95,58,245,79,165,209,130,230,173,127,82,14,81,31,108,62,43,140,104,5,155,107,189,65,251,171,217,131,31,121,33,126,19,25,205,224,91,34,174,40,215,152,47,138,66,205,101,239,35,145,68,55,113,47,59,77,236,207,251,192,181,188,219,137,129,165,219,181,233,56,181,72,243,91,194,86,57,25,208,5,182,241,17,241,89,155,79,25,175,164,130,63,146,24,129,109,218,213,94,28,171,66,2,3,163,152,170,7,216,190,111,112,69,1,91,131,18,140,178,228,78,190,133,49,36,226,180,255,213,195,125,12,85,111,137,123,242,116,93,190,114,177,150,22,59,254,177,222,128,53,18,199,37,167,6,220,155,148,38,105,207,116,241,155,193,210,74,241,158,193,105,155,228,227,37,79,56,134,71,190,239,181,213,140,139,198,157,193,15,101,156,172,119,204,161,12,36,117,2,43,89,111,44,233,45,131,228,166,110,170,132,116,74,212,251,65,189,220,169,176,92,181,83,17,131,218,136,249,118,171,223,102,238,82,81,62,152,16,50,180,45,109,198,49,168,63,33,251,152,200,39,3,176,228,14,239,190,199,127,89,191,194,143,168,61,243,11,224,198,37,167,10,147,71,145,167,213,111,130,3,224,81,99,202,6,112,110,14,10,103,41,41,20,252,47,210,70,133,10,183,39,38,201,38,92,56,33,27,46,237,42,196,90,252,109,44,77,223,179,149,157,19,13,56,83,222,99,175,139,84,115,10,101,168,178,119,60,187,10,106,118,230,174,237,71,46,201,194,129,59,53,130,20,133,44,114,146,100,3,241,76,161,232,191,162,1,48,66,188,75,102,26,168,145,151,248,208,112,139,75,194,48,190,84,6,163,81,108,199,24,82,239,214,25,232,146,209,16,169,101,85,36,6,153,214,42,32,113,87,133,53,14,244,184,209,187,50,112,160,106,16,200,208,210,184,22,193,164,25,83,171,65,81,8,108,55,30,153,235,142,223,76,119,72,39,168,72,155,225,181,188,176,52,99,90,201,197,179,12,28,57,203,138,65,227,74,170,216,78,115,227,99,119,79,202,156,91,163,184,178,214,243,111,46,104,252,178,239,93,238,130,143,116,96,47,23,67,111,99,165,120,114,171,240,161,20,120,200,132,236,57,100,26,8,2,199,140,40,30,99,35,250,255,190,144,233,189,130,222,235,108,80,164,21,121,198,178,247,163,249,190,43,83,114,227,242,120,113,198,156,97,38,234,206,62,39,202,7,194,192,33,199,184,134,209,30,235,224,205,214,125,218,234,120,209,110,238,127,79,125,245,186,111,23,114,170,103,240,6,166,152,200,162,197,125,99,10,174,13,249,190,4,152,63,17,27,71,28,19,53,11,113,27,132,125,4,35,245,119,219,40,147,36,199,64,123,171,202,50,188,190,201,21,10,190,158,60,76,13,16,156,196,103,29,67,182,66,62,203,190,212,197,76,42,126,101,252,156,41,127,89,236,250,214,58,171,111,203,95,23,88,71,74,140,25,68,108,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,47,99,168,254,170,226,153,255,102,179,216,0,226,141,122,255,122,66,153,254,182,245,134,0,227,228,25,1,214,57,235,255,216,173,56,255,181,231,210,0,119,128,157,255,129,95,136,255,110,126,51,0,2,169,183,255,7,130,98,254,69,176,94,255,116,4,227,1,217,242,145,255,202,173,31,1,105,1,39,255,46,175,69,0,228,47,58,255,215,224,69,254,207,56,69,255,16,254,139,255,23,207,212,255,202,20,126,255,95,213,96,255,9,176,33,0,200,5,207,255,241,42,128,254,35,33,192,255,248,229,196,1,129,17,120,0,251,103,151,255,7,52,112,255,140,56,66,255,40,226,245,255,217,70,37,254,172,214,9,255,72,67,134,1,146,192,214,255,44,38,112,0,68,184,75,255,206,90,251,0,149,235,141,0,181,170,58,0,116,244,239,0,92,157,2,0,102,173,98,0,233,137,96,1,127,49,203,0,5,155,148,0,23,148,9,255,211,122,12,0,34,134,26,255,219,204,136,0,134,8,41,255,224,83,43,254,85,25,247,0,109,127,0,254,169,136,48,0,238,119,219,255,231,173,213,0,206,18,254,254,8,186,7,255,126,9,7,1,111,42,72,0,111,52,236,254,96,63,141,0,147,191,127,254,205,78,192,255,14,106,237,1,187,219,76,0,175,243,187,254,105,89,173,0,85,25,89,1,162,243,148,0,2,118,209,254,33,158,9,0,139,163,46,255,93,70,40,0,108,42,142,254,111,252,142,255,155,223,144,0,51,229,167,255,73,252,155,255,94,116,12,255,152,160,218,255,156,238,37,255,179,234,207,255,197,0,179,255,154,164,141,0,225,196,104,0,10,35,25,254,209,212,242,255,97,253,222,254,184,101,229,0,222,18,127,1,164,136,135,255,30,207,140,254,146,97,243,0,129,192,26,254,201,84,33,255,111,10,78,255,147,81,178,255,4,4,24,0,161,238,215,255,6,141,33,0,53,215,14,255,41,181,208,255,231,139,157,0,179,203,221,255,255,185,113,0,189,226,172,255,113,66,214,255,202,62,45,255,102,64,8,255,78,174,16,254,133,117,68,255,182,120,89,255,133,114,211,0,189,110,21,255,15,10,106,0,41,192,1,0,152,232,121,255,188,60,160,255,153,113,206,255,0,183,226,254,180,13,72,255,176,160,14,254,211,201,134,255,158,24,143,0,127,105,53,0,96,12,189,0,167,215,251,255,159,76,128,254,106,101,225,255,30,252,4,0,146,12,174,0,89,241,178,254,10,229,166,255,123,221,42,254,30,20,212,0,82,128,3,0,48,209,243,0,119,121,64,255,50,227,156,255,0,110,197,1,103,27,144,0,133,59,140,1,189,241,36,255,248,37,195,1,96,220,55,0,183,76,62,255,195,66,61,0,50,76,164,1,225,164,76,255,76,61,163,255,117,62,31,0,81,145,64,255,118,65,14,0,162,115,214,255,6,138,46,0,124,230,244,255,10,138,143,0,52,26,194,0,184,244,76,0,129,143,41,1,190,244,19,255,123,170,122,255,98,129,68,0,121,213,147,0,86,101,30,255,161,103,155,0,140,89,67,255,239,229,190,1,67,11,181,0,198,240,137,254,238,69,188,255,234,113,60,255,37,255,57,255,69,178,182,254,128,208,179,0,118,26,125,254,3,7,214,255,241,50,77,255,85,203,197,255,211,135,250,255,25,48,100,255,187,213,180,254,17,88,105,0,83,209,158,1,5,115,98,0,4,174,60,254,171,55,110,255,217,181,17,255,20,188,170,0,146,156,102,254,87,214,174,255,114,122,155,1,233,44,170,0,127,8,239,1,214,236,234,0,175,5,219,0,49,106,61,255,6,66,208,255,2,106,110,255,81,234,19,255,215,107,192,255,67,151,238,0,19,42,108,255,229,85,113,1,50,68,135,255,17,106,9,0,50,103,1,255,80,1,168,1,35,152,30,255,16,168,185,1,56,89,232,255,101,210,252,0,41,250,71,0,204,170,79,255,14,46,239,255,80,77,239,0,189,214,75,255,17,141,249,0,38,80,76,255,190,85,117,0,86,228,170,0,156,216,208,1,195,207,164,255,150,66,76,255,175,225,16,255,141,80,98,1,76,219,242,0,198,162,114,0,46,218,152,0,155,43,241,254,155,160,104,255,178,9,252,254,100,110,212,0,14,5,167,0,233,239,163,255,28,151,157,1,101,146,10,255,254,158,70,254,71,249,228,0,88,30,50,0,68,58,160,255,191,24,104,1,129,66,129,255,192,50,85,255,8,179,138,255,38,250,201,0,115,80,160,0,131,230,113,0,125,88,147,0,90,68,199,0,253,76,158,0,28,255,118,0,113,250,254,0,66,75,46,0,230,218,43,0,229,120,186,1,148,68,43,0,136,124,238,1,187,107,197,255,84,53,246,255,51,116,254,255,51,187,165,0,2,17,175,0,66,84,160,1,247,58,30,0,35,65,53,254,69,236,191,0,45,134,245,1,163,123,221,0,32,110,20,255,52,23,165,0,186,214,71,0,233,176,96,0,242,239,54,1,57,89,138,0,83,0,84,255,136,160,100,0,92,142,120,254,104,124,190,0,181,177,62,255,250,41,85,0,152,130,42,1,96,252,246,0,151,151,63,254,239,133,62,0,32,56,156,0,45,167,189,255,142,133,179,1,131,86,211,0,187,179,150,254,250,170,14,255,68,113,21,255,222,186,59,255,66,7,241,1,69,6,72,0,86,156,108,254,55,167,89,0,109,52,219,254,13,176,23,255,196,44,106,255,239,149,71,255,164,140,125,255,159,173,1,0,51,41,231,0,145,62,33,0,138,111,93,1,185,83,69,0,144,115,46,0,97,151,16,255,24,228,26,0,49,217,226,0,113,75,234,254,193,153,12,255,182,48,96,255,14,13,26,0,128,195,249,254,69,193,59,0,132,37,81,254,125,106,60,0,214,240,169,1,164,227,66,0,210,163,78,0,37,52,151,0,99,77,26,0,238,156,213,255,213,192,209,1,73,46,84,0,20,65,41,1,54,206,79,0,201,131,146,254,170,111,24,255,177,33,50,254,171,38,203,255,78,247,116,0,209,221,153,0,133,128,178,1,58,44,25,0,201,39,59,1,189,19,252,0,49,229,210,1,117,187,117,0,181,179,184,1,0,114,219,0,48,94,147,0,245,41,56,0,125,13,204,254,244,173,119,0,44,221,32,254,84,234,20,0,249,160,198,1,236,126,234,255,143,62,221,0,129,89,214,255,55,139,5,254,68,20,191,255,14,204,178,1,35,195,217,0,47,51,206,1,38,246,165,0,206,27,6,254,158,87,36,0,217,52,146,255,125,123,215,255,85,60,31,255,171,13,7,0,218,245,88,254,252,35,60,0,55,214,160,255,133,101,56,0,224,32,19,254,147,64,234,0,26,145,162,1,114,118,125,0,248,252,250,0,101,94,196,255,198,141,226,254,51,42,182,0,135,12,9,254,109,172,210,255,197,236,194,1,241,65,154,0,48,156,47,255,153,67,55,255,218,165,34,254,74,180,179,0,218,66,71,1,88,122,99,0,212,181,219,255,92,42,231,255,239,0,154,0,245,77,183,255,94,81,170,1,18,213,216,0,171,93,71,0,52,94,248,0,18,151,161,254,197,209,66,255,174,244,15,254,162,48,183,0,49,61,240,254,182,93,195,0,199,228,6,1,200,5,17,255,137,45,237,255,108,148,4,0,90,79,237,255,39,63,77,255,53,82,207,1,142,22,118,255,101,232,18,1,92,26,67,0,5,200,88,255,33,168,138,255,149,225,72,0,2,209,27,255,44,245,168,1,220,237,17,255,30,211,105,254,141,238,221,0,128,80,245,254,111,254,14,0,222,95,190,1,223,9,241,0,146,76,212,255,108,205,104,255,63,117,153,0,144,69,48,0,35,228,111,0,192,33,193,255,112,214,190,254,115,152,151,0,23,102,88,0,51,74,248,0,226,199,143,254,204,162,101,255,208,97,189,1,245,104,18,0,230,246,30,255,23,148,69,0,110,88,52,254,226,181,89,255,208,47,90,254,114,161,80,255,33,116,248,0,179,152,87,255,69,144,177,1,88,238,26,255,58,32,113,1,1,77,69,0,59,121,52,255,152,238,83,0,52,8,193,0,231,39,233,255,199,34,138,0,222,68,173,0,91,57,242,254,220,210,127,255,192,7,246,254,151,35,187,0,195,236,165,0,111,93,206,0,212,247,133,1,154,133,209,255,155,231,10,0,64,78,38,0,122,249,100,1,30,19,97,255,62,91,249,1,248,133,77,0,197,63,168,254,116,10,82,0,184,236,113,254,212,203,194,255,61,100,252,254,36,5,202,255,119,91,153,255,129,79,29,0,103,103,171,254,237,215,111,255,216,53,69,0,239,240,23,0,194,149,221,255,38,225,222,0,232,255,180,254,118,82,133,255,57,209,177,1,139,232,133,0,158,176,46,254,194,115,46,0,88,247,229,1,28,103,191,0,221,222,175,254,149,235,44,0,151,228,25,254,218,105,103,0,142,85,210,0,149,129,190,255,213,65,94,254,117,134,224,255,82,198,117,0,157,221,220,0,163,101,36,0,197,114,37,0,104,172,166,254,11,182,0,0,81,72,188,255,97,188,16,255,69,6,10,0,199,147,145,255,8,9,115,1,65,214,175,255,217,173,209,0,80,127,166,0,247,229,4,254,167,183,124,255,90,28,204,254,175,59,240,255,11,41,248,1,108,40,51,255,144,177,195,254,150,250,126,0,138,91,65,1,120,60,222,255,245,193,239,0,29,214,189,255,128,2,25,0,80,154,162,0,77,220,107,1,234,205,74,255,54,166,103,255,116,72,9,0,228,94,47,255,30,200,25,255,35,214,89,255,61,176,140,255,83,226,163,255,75,130,172,0,128,38,17,0,95,137,152,255,215,124,159,1,79,93,0,0,148,82,157,254,195,130,251,255,40,202,76,255,251,126,224,0,157,99,62,254,207,7,225,255,96,68,195,0,140,186,157,255,131,19,231,255,42,128,254,0,52,219,61,254,102,203,72,0,141,7,11,255,186,164,213,0,31,122,119,0,133,242,145,0,208,252,232,255,91,213,182,255,143,4,250,254,249,215,74,0,165,30,111,1,171,9,223,0,229,123,34,1,92,130,26,255,77,155,45,1,195,139,28,255,59,224,78,0,136,17,247,0,108,121,32,0,79,250,189,255,96,227,252,254,38,241,62,0,62,174,125,255,155,111,93,255,10,230,206,1,97,197,40,255,0,49,57,254,65,250,13,0,18,251,150,255,220,109,210,255,5,174,166,254,44,129,189,0,235,35,147,255,37,247,141,255,72,141,4,255,103,107,255,0,247,90,4,0,53,44,42,0,2,30,240,0,4,59,63,0,88,78,36,0,113,167,180,0,190,71,193,255,199,158,164,255,58,8,172,0,77,33,12,0,65,63,3,0,153,77,33,255,172,254,102,1,228,221,4,255,87,30,254,1,146,41,86,255,138,204,239,254,108,141,17,255,187,242,135,0,210,208,127,0,68,45,14,254,73,96,62,0,81,60,24,255,170,6,36,255,3,249,26,0,35,213,109,0,22,129,54,255,21,35,225,255,234,61,56,255,58,217,6,0,143,124,88,0,236,126,66,0,209,38,183,255,34,238,6,255,174,145,102,0,95,22,211,0,196,15,153,254,46,84,232,255,117,34,146,1,231,250,74,255,27,134,100,1,92,187,195,255,170,198,112,0,120,28,42,0,209,70,67,0,29,81,31,0,29,168,100,1,169,173,160,0,107,35,117,0,62,96,59,255,81,12,69,1,135,239,190,255,220,252,18,0,163,220,58,255,137,137,188,255,83,102,109,0,96,6,76,0,234,222,210,255,185,174,205,1,60,158,213,255,13,241,214,0,172,129,140,0,93,104,242,0,192,156,251,0,43,117,30,0,225,81,158,0,127,232,218,0,226,28,203,0,233,27,151,255,117,43,5,255,242,14,47,255,33,20,6,0,137,251,44,254,27,31,245,255,183,214,125,254,40,121,149,0,186,158,213,255,89,8,227,0,69,88,0,254,203,135,225,0,201,174,203,0,147,71,184,0,18,121,41,254,94,5,78,0,224,214,240,254,36,5,180,0,251,135,231,1,163,138,212,0,210,249,116,254,88,129,187,0,19,8,49,254,62,14,144,255,159,76,211,0,214,51,82,0,109,117,228,254,103,223,203,255,75,252,15,1,154,71,220,255,23,13,91,1,141,168,96,255,181,182,133,0,250,51,55,0,234,234,212,254,175,63,158,0,39,240,52,1,158,189,36,255,213,40,85,1,32,180,247,255,19,102,26,1,84,24,97,255,69,21,222,0,148,139,122,255,220,213,235,1,232,203,255,0,121,57,147,0,227,7,154,0,53,22,147,1,72,1,225,0,82,134,48,254,83,60,157,255,145,72,169,0,34,103,239,0,198,233,47,0,116,19,4,255,184,106,9,255,183,129,83,0,36,176,230,1,34,103,72,0,219,162,134,0,245,42,158,0,32,149,96,254,165,44,144,0,202,239,72,254,215,150,5,0,42,66,36,1,132,215,175,0,86,174,86,255,26,197,156,255,49,232,135,254,103,182,82,0,253,128,176,1,153,178,122,0,245,250,10,0,236,24,178,0,137,106,132,0,40,29,41,0,50,30,152,255,124,105,38,0,230,191,75,0,143,43,170,0,44,131,20,255,44,13,23,255,237,255,155,1,159,109,100,255,112,181,24,255,104,220,108,0,55,211,131,0,99,12,213,255,152,151,145,255,238,5,159,0,97,155,8,0,33,108,81,0,1,3,103,0,62,109,34,255,250,155,180,0,32,71,195,255,38,70,145,1,159,95,245,0,69,229,101,1,136,28,240,0,79,224,25,0,78,110,121,255,248,168,124,0,187,128,247,0,2,147,235,254,79,11,132,0,70,58,12,1,181,8,163,255,79,137,133,255,37,170,11,255,141,243,85,255,176,231,215,255,204,150,164,255,239,215,39,255,46,87,156,254,8,163,88,255,172,34,232,0,66,44,102,255,27,54,41,254,236,99,87,255,41,123,169,1,52,114,43,0,117,134,40,0,155,134,26,0,231,207,91,254,35,132,38,255,19,102,125,254,36,227,133,255,118,3,113,255,29,13,124,0,152,96,74,1,88,146,206,255,167,191,220,254,162,18,88,255,182,100,23,0,31,117,52,0,81,46,106,1,12,2,7,0,69,80,201,1,209,246,172,0,12,48,141,1,224,211,88,0,116,226,159,0,122,98,130,0,65,236,234,1,225,226,9,255,207,226,123,1,89,214,59,0,112,135,88,1,90,244,203,255,49,11,38,1,129,108,186,0,89,112,15,1,101,46,204,255,127,204,45,254,79,255,221,255,51,73,18,255,127,42,101,255,241,21,202,0,160,227,7,0,105,50,236,0,79,52,197,255,104,202,208,1,180,15,16,0,101,197,78,255,98,77,203,0,41,185,241,1,35,193,124,0,35,155,23,255,207,53,192,0,11,125,163,1,249,158,185,255,4,131,48,0,21,93,111,255,61,121,231,1,69,200,36,255,185,48,185,255,111,238,21,255,39,50,25,255,99,215,163,255,87,212,30,255,164,147,5,255,128,6,35,1,108,223,110,255,194,76,178,0,74,101,180,0,243,47,48,0,174,25,43,255,82,173,253,1,54,114,192,255,40,55,91,0,215,108,176,255,11,56,7,0,224,233,76,0,209,98,202,254,242,25,125,0,44,193,93,254,203,8,177,0,135,176,19,0,112,71,213,255,206,59,176,1,4,67,26,0,14,143,213,254,42,55,208,255,60,67,120,0,193,21,163,0,99,164,115,0,10,20,118,0,156,212,222,254,160,7,217,255,114,245,76,1,117,59,123,0,176,194,86,254,213,15,176,0,78,206,207,254,213,129,59,0,233,251,22,1,96,55,152,255,236,255,15,255,197,89,84,255,93,149,133,0,174,160,113,0,234,99,169,255,152,116,88,0,144,164,83,255,95,29,198,255,34,47,15,255,99,120,134,255,5,236,193,0,249,247,126,255,147,187,30,0,50,230,117,255,108,217,219,255,163,81,166,255,72,25,169,254,155,121,79,255,28,155,89,254,7,126,17,0,147,65,33,1,47,234,253,0,26,51,18,0,105,83,199,255,163,196,230,0,113,248,164,0,226,254,218,0,189,209,203,255,164,247,222,254,255,35,165,0,4,188,243,1,127,179,71,0,37,237,254,255,100,186,240,0,5,57,71,254,103,72,73,255,244,18,81,254,229,210,132,255,238,6,180,255,11,229,174,255,227,221,192,1,17,49,28,0,163,215,196,254,9,118,4,255,51,240,71,0,113,129,109,255,76,240,231,0,188,177,127,0,125,71,44,1,26,175,243,0,94,169,25,254,27,230,29,0,15,139,119,1,168,170,186,255,172,197,76,255,252,75,188,0,137,124,196,0,72,22,96,255,45,151,249,1,220,145,100,0,64,192,159,255,120,239,226,0,129,178,146,0,0,192,125,0,235,138,234,0,183,157,146,0,83,199,192,255,184,172,72,255,73,225,128,0,77,6,250,255,186,65,67,0,104,246,207,0,188,32,138,255,218,24,242,0,67,138,81,254,237,129,121,255,20,207,150,1,41,199,16,255,6,20,128,0,159,118,5,0,181,16,143,255,220,38,15,0,23,64,147,254,73,26,13,0,87,228,57,1,204,124,128,0,43,24,223,0,219,99,199,0,22,75,20,255,19,27,126,0,157,62,215,0,110,29,230,0,179,167,255,1,54,252,190,0,221,204,182,254,179,158,65,255,81,157,3,0,194,218,159,0,170,223,0,0,224,11,32,255,38,197,98,0,168,164,37,0,23,88,7,1,164,186,110,0,96,36,134,0,234,242,229,0,250,121,19,0,242,254,112,255,3,47,94,1,9,239,6,255,81,134,153,254,214,253,168,255,67,124,224,0,245,95,74,0,28,30,44,254,1,109,220,255,178,89,89,0,252,36,76,0,24,198,46,255,76,77,111,0,134,234,136,255,39,94,29,0,185,72,234,255,70,68,135,255,231,102,7,254,77,231,140,0,167,47,58,1,148,97,118,255,16,27,225,1,166,206,143,255,110,178,214,255,180,131,162,0,143,141,225,1,13,218,78,255,114,153,33,1,98,104,204,0,175,114,117,1,167,206,75,0,202,196,83,1,58,64,67,0,138,47,111,1,196,247,128,255,137,224,224,254,158,112,207,0,154,100,255,1,134,37,107,0,198,128,79,255,127,209,155,255,163,254,185,254,60,14,243,0,31,219,112,254,29,217,65,0,200,13,116,254,123,60,196,255,224,59,184,254,242,89,196,0,123,16,75,254,149,16,206,0,69,254,48,1,231,116,223,255,209,160,65,1,200,80,98,0,37,194,184,254,148,63,34,0,139,240,65,255,217,144,132,255,56,38,45,254,199,120,210,0,108,177,166,255,160,222,4,0,220,126,119,254,165,107,160,255,82,220,248,1,241,175,136,0,144,141,23,255,169,138,84,0,160,137,78,255,226,118,80,255,52,27,132,255,63,96,139,255,152,250,39,0,188,155,15,0,232,51,150,254,40,15,232,255,240,229,9,255,137,175,27,255,75,73,97,1,218,212,11,0,135,5,162,1,107,185,213,0,2,249,107,255,40,242,70,0,219,200,25,0,25,157,13,0,67,82,80,255,196,249,23,255,145,20,149,0,50,72,146,0,94,76,148,1,24,251,65,0,31,192,23,0,184,212,201,255,123,233,162,1,247,173,72,0,162,87,219,254,126,134,89,0,159,11,12,254,166,105,29,0,73,27,228,1,113,120,183,255,66,163,109,1,212,143,11,255,159,231,168,1,255,128,90,0,57,14,58,254,89,52,10,255,253,8,163,1,0,145,210,255,10,129,85,1,46,181,27,0,103,136,160,254,126,188,209,255,34,35,111,0,215,219,24,255,212,11,214,254,101,5,118,0,232,197,133,255,223,167,109,255,237,80,86,255,70,139,94,0,158,193,191,1,155,15,51,255,15,190,115,0,78,135,207,255,249,10,27,1,181,125,233,0,95,172,13,254,170,213,161,255,39,236,138,255,95,93,87,255,190,128,95,0,125,15,206,0,166,150,159,0,227,15,158,255,206,158,120,255,42,141,128,0,101,178,120,1,156,109,131,0,218,14,44,254,247,168,206,255,212,112,28,0,112,17,228,255,90,16,37,1,197,222,108,0,254,207,83,255,9,90,243,255,243,244,172,0,26,88,115,255,205,116,122,0,191,230,193,0,180,100,11,1,217,37,96,255,154,78,156,0,235,234,31,255,206,178,178,255,149,192,251,0,182,250,135,0,246,22,105,0,124,193,109,255,2,210,149,255,169,17,170,0,0,96,110,255,117,9,8,1,50,123,40,255,193,189,99,0,34,227,160,0,48,80,70,254,211,51,236,0,45,122,245,254,44,174,8,0,173,37,233,255,158,65,171,0,122,69,215,255,90,80,2,255,131,106,96,254,227,114,135,0,205,49,119,254,176,62,64,255,82,51,17,255,241,20,243,255,130,13,8,254,128,217,243,255,162,27,1,254,90,118,241,0,246,198,246,255,55,16,118,255,200,159,157,0,163,17,1,0,140,107,121,0,85,161,118,255,38,0,149,0,156,47,238,0,9,166,166,1,75,98,181,255,50,74,25,0,66,15,47,0,139,225,159,0,76,3,142,255,14,238,184,0,11,207,53,255,183,192,186,1,171,32,174,255,191,76,221,1,247,170,219,0,25,172,50,254,217,9,233,0,203,126,68,255,183,92,48,0,127,167,183,1,65,49,254,0,16,63,127,1,254,21,170,255,59,224,127,254,22,48,63,255,27,78,130,254,40,195,29,0,250,132,112,254,35,203,144,0,104,169,168,0,207,253,30,255,104,40,38,254,94,228,88,0,206,16,128,255,212,55,122,255,223,22,234,0,223,197,127,0,253,181,181,1,145,102,118,0,236,153,36,255,212,217,72,255,20,38,24,254,138,62,62,0,152,140,4,0,230,220,99,255,1,21,212,255,148,201,231,0,244,123,9,254,0,171,210,0,51,58,37,255,1,255,14,255,244,183,145,254,0,242,166,0,22,74,132,0,121,216,41,0,95,195,114,254,133,24,151,255,156,226,231,255,247,5,77,255,246,148,115,254,225,92,81,255,222,80,246,254,170,123,89,255,74,199,141,0,29,20,8,255,138,136,70,255,93,75,92,0,221,147,49,254,52,126,226,0,229,124,23,0,46,9,181,0,205,64,52,1,131,254,28,0,151,158,212,0,131,64,78,0,206,25,171,0,0,230,139,0,191,253,110,254,103,247,167,0,64,40,40,1,42,165,241,255,59,75,228,254,124,243,189,255,196,92,178,255,130,140,86,255,141,89,56,1,147,198,5,255,203,248,158,254,144,162,141,0,11,172,226,0,130,42,21,255,1,167,143,255,144,36,36,255,48,88,164,254,168,170,220,0,98,71,214,0,91,208,79,0,159,76,201,1,166,42,214,255,69,255,0,255,6,128,125,255,190,1,140,0,146,83,218,255,215,238,72,1,122,127,53,0,189,116,165,255,84,8,66,255,214,3,208,255,213,110,133,0,195,168,44,1,158,231,69,0,162,64,200,254,91,58,104,0,182,58,187,254,249,228,136,0,203,134,76,254,99,221,233,0,75,254,214,254,80,69,154,0,64,152,248,254,236,136,202,255,157,105,153,254,149,175,20,0,22,35,19,255,124,121,233,0,186,250,198,254,132,229,139,0,137,80,174,255,165,125,68,0,144,202,148,254,235,239,248,0,135,184,118,0,101,94,17,255,122,72,70,254,69,130,146,0,127,222,248,1,69,127,118,255,30,82,215,254,188,74,19,255,229,167,194,254,117,25,66,255,65,234,56,254,213,22,156,0,151,59,93,254,45,28,27,255,186,126,164,255,32,6,239,0,127,114,99,1,219,52,2,255,99,96,166,254,62,190,126,255,108,222,168,1,75,226,174,0,230,226,199,0,60,117,218,255,252,248,20,1,214,188,204,0,31,194,134,254,123,69,192,255,169,173,36,254,55,98,91,0,223,42,102,254,137,1,102,0,157,90,25,0,239,122,64,255,252,6,233,0,7,54,20,255,82,116,174,0,135,37,54,255,15,186,125,0,227,112,175,255,100,180,225,255,42,237,244,255,244,173,226,254,248,18,33,0,171,99,150,255,74,235,50,255,117,82,32,254,106,168,237,0,207,109,208,1,228,9,186,0,135,60,169,254,179,92,143,0,244,170,104,255,235,45,124,255,70,99,186,0,117,137,183,0,224,31,215,0,40,9,100,0,26,16,95,1,68,217,87,0,8,151,20,255,26,100,58,255,176,165,203,1,52,118,70,0,7,32,254,254,244,254,245,255,167,144,194,255,125,113,23,255,176,121,181,0,136,84,209,0,138,6,30,255,89,48,28,0,33,155,14,255,25,240,154,0,141,205,109,1,70,115,62,255,20,40,107,254,138,154,199,255,94,223,226,255,157,171,38,0,163,177,25,254,45,118,3,255,14,222,23,1,209,190,81,255,118,123,232,1,13,213,101,255,123,55,123,254,27,246,165,0,50,99,76,255,140,214,32,255,97,65,67,255,24,12,28,0,174,86,78,1,64,247,96,0,160,135,67,0,66,55,243,255,147,204,96,255,26,6,33,255,98,51,83,1,153,213,208,255,2,184,54,255,25,218,11,0,49,67,246,254,18,149,72,255,13,25,72,0,42,79,214,0,42,4,38,1,27,139,144,255,149,187,23,0,18,164,132,0,245,84,184,254,120,198,104,255,126,218,96,0,56,117,234,255,13,29,214,254,68,47,10,255,167,154,132,254,152,38,198,0,66,178,89,255,200,46,171,255,13,99,83,255,210,187,253,255,170,45,42,1,138,209,124,0,214,162,141,0,12,230,156,0,102,36,112,254,3,147,67,0,52,215,123,255,233,171,54,255,98,137,62,0,247,218,39,255,231,218,236,0,247,191,127,0,195,146,84,0,165,176,92,255,19,212,94,255,17,74,227,0,88,40,153,1,198,147,1,255,206,67,245,254,240,3,218,255,61,141,213,255,97,183,106,0,195,232,235,254,95,86,154,0,209,48,205,254,118,209,241,255,240,120,223,1,213,29,159,0,163,127,147,255,13,218,93,0,85,24,68,254,70,20,80,255,189,5,140,1,82,97,254,255,99,99,191,255,132,84,133,255,107,218,116,255,112,122,46,0,105,17,32,0,194,160,63,255,68,222,39,1,216,253,92,0,177,105,205,255,149,201,195,0,42,225,11,255,40,162,115,0,9,7,81,0,165,218,219,0,180,22,0,254,29,146,252,255,146,207,225,1,180,135,96,0,31,163,112,0,177,11,219,255,133,12,193,254,43,78,50,0,65,113,121,1,59,217,6,255,110,94,24,1,112,172,111,0,7,15,96,0,36,85,123,0,71,150,21,255,208,73,188,0,192,11,167,1,213,245,34,0,9,230,92,0,162,142,39,255,215,90,27,0,98,97,89,0,94,79,211,0,90,157,240,0,95,220,126,1,102,176,226,0,36,30,224,254,35,31,127,0,231,232,115,1,85,83,130,0,210,73,245,255,47,143,114,255,68,65,197,0,59,72,62,255,183,133,173,254,93,121,118,255,59,177,81,255,234,69,173,255,205,128,177,0,220,244,51,0,26,244,209,1,73,222,77,255,163,8,96,254,150,149,211,0,158,254,203,1,54,127,139,0,161,224,59,0,4,109,22,255,222,42,45,255,208,146,102,255,236,142,187,0,50,205,245,255,10,74,89,254,48,79,142,0,222,76,130,255,30,166,63,0,236,12,13,255,49,184,244,0,187,113,102,0,218,101,253,0,153,57,182,254,32,150,42,0,25,198,146,1,237,241,56,0,140,68,5,0,91,164,172,255,78,145,186,254,67,52,205,0,219,207,129,1,109,115,17,0,54,143,58,1,21,248,120,255,179,255,30,0,193,236,66,255,1,255,7,255,253,192,48,255,19,69,217,1,3,214,0,255,64,101,146,1,223,125,35,255,235,73,179,255,249,167,226,0,225,175,10,1,97,162,58,0,106,112,171,1,84,172,5,255,133,140,178,255,134,245,142,0,97,90,125,255,186,203,185,255,223,77,23,255,192,92,106,0,15,198,115,255,217,152,248,0,171,178,120,255,228,134,53,0,176,54,193,1,250,251,53,0,213,10,100,1,34,199,106,0,151,31,244,254,172,224,87,255,14,237,23,255,253,85,26,255,127,39,116,255,172,104,100,0,251,14,70,255,212,208,138,255,253,211,250,0,176,49,165,0,15,76,123,255,37,218,160,255,92,135,16,1,10,126,114,255,70,5,224,255,247,249,141,0,68,20,60,1,241,210,189,255,195,217,187,1,151,3,113,0,151,92,174,0,231,62,178,255,219,183,225,0,23,23,33,255,205,181,80,0,57,184,248,255,67,180,1,255,90,123,93,255,39,0,162,255,96,248,52,255,84,66,140,0,34,127,228,255,194,138,7,1,166,110,188,0,21,17,155,1,154,190,198,255,214,80,59,255,18,7,143,0,72,29,226,1,199,217,249,0,232,161,71,1,149,190,201,0,217,175,95,254,113,147,67,255,138,143,199,255,127,204,1,0,29,182,83,1,206,230,155,255,186,204,60,0,10,125,85,255,232,96,25,255,255,89,247,255,213,254,175,1,232,193,81,0,28,43,156,254,12,69,8,0,147,24,248,0,18,198,49,0,134,60,35,0,118,246,18,255,49,88,254,254,228,21,186,255,182,65,112,1,219,22,1,255,22,126,52,255,189,53,49,255,112,25,143,0,38,127,55,255,226,101,163,254,208,133,61,255,137,69,174,1,190,118,145,255,60,98,219,255,217,13,245,255,250,136,10,0,84,254,226,0,201,31,125,1,240,51,251,255,31,131,130,255,2,138,50,255,215,215,177,1,223,12,238,255,252,149,56,255,124,91,68,255,72,126,170,254,119,255,100,0,130,135,232,255,14,79,178,0,250,131,197,0,138,198,208,0,121,216,139,254,119,18,36,255,29,193,122,0,16,42,45,255,213,240,235,1,230,190,169,255,198,35,228,254,110,173,72,0,214,221,241,255,56,148,135,0,192,117,78,254,141,93,207,255,143,65,149,0,21,18,98,255,95,44,244,1,106,191,77,0,254,85,8,254,214,110,176,255,73,173,19,254,160,196,199,255,237,90,144,0,193,172,113,255,200,155,136,254,228,90,221,0,137,49,74,1,164,221,215,255,209,189,5,255,105,236,55,255,42,31,129,1,193,255,236,0,46,217,60,0,138,88,187,255,226,82,236,255,81,69,151,255,142,190,16,1,13,134,8,0,127,122,48,255,81,64,156,0,171,243,139,0,237,35,246,0,122,143,193,254,212,122,146,0,95,41,255,1,87,132,77,0,4,212,31,0,17,31,78,0,39,45,173,254,24,142,217,255,95,9,6,255,227,83,6,0,98,59,130,254,62,30,33,0,8,115,211,1,162,97,128,255,7,184,23,254,116,28,168,255,248,138,151,255,98,244,240,0,186,118,130,0,114,248,235,255,105,173,200,1,160,124,71,255,94,36,164,1,175,65,146,255,238,241,170,254,202,198,197,0,228,71,138,254,45,246,109,255,194,52,158,0,133,187,176,0,83,252,154,254,89,189,221,255,170,73,252,0,148,58,125,0,36,68,51,254,42,69,177,255,168,76,86,255,38,100,204,255,38,53,35,0,175,19,97,0,225,238,253,255,81,81,135,0,210,27,255,254,235,73,107,0,8,207,115,0,82,127,136,0,84,99,21,254,207,19,136,0,100,164,101,0,80,208,77,255,132,207,237,255,15,3,15,255,33,166,110,0,156,95,85,255,37,185,111,1,150,106,35,255,166,151,76,0,114,87,135,255,159,194,64,0,12,122,31,255,232,7,101,254,173,119,98,0,154,71,220,254,191,57,53,255,168,232,160,255,224,32,99,255,218,156,165,0,151,153,163,0,217,13,148,1,197,113,89,0,149,28,161,254,207,23,30,0,105,132,227,255,54,230,94,255,133,173,204,255,92,183,157,255,88,144,252,254,102,33,90,0,159,97,3,0,181,218,155,255,240,114,119,0,106,214,53,255,165,190,115,1,152,91,225,255,88,106,44,255,208,61,113,0,151,52,124,0,191,27,156,255,110,54,236,1,14,30,166,255,39,127,207,1,229,199,28,0,188,228,188,254,100,157,235,0,246,218,183,1,107,22,193,255,206,160,95,0,76,239,147,0,207,161,117,0,51,166,2,255,52,117,10,254,73,56,227,255,152,193,225,0,132,94,136,255,101,191,209,0,32,107,229,255,198,43,180,1,100,210,118,0,114,67,153,255,23,88,26,255,89,154,92,1,220,120,140,255,144,114,207,255,252,115,250,255,34,206,72,0,138,133,127,255,8,178,124,1,87,75,97,0,15,229,92,254,240,67,131,255,118,123,227,254,146,120,104,255,145,213,255,1,129,187,70,255,219,119,54,0,1,19,173,0,45,150,148,1,248,83,72,0,203,233,169,1,142,107,56,0,247,249,38,1,45,242,80,255,30,233,103,0,96,82,70,0,23,201,111,0,81,39,30,255,161,183,78,255,194,234,33,255,68,227,140,254,216,206,116,0,70,27,235,255,104,144,79,0,164,230,93,254,214,135,156,0,154,187,242,254,188,20,131,255,36,109,174,0,159,112,241,0,5,110,149,1,36,165,218,0,166,29,19,1,178,46,73,0,93,43,32,254,248,189,237,0,102,155,141,0,201,93,195,255,241,139,253,255,15,111,98,255,108,65,163,254,155,79,190,255,73,174,193,254,246,40,48,255,107,88,11,254,202,97,85,255,253,204,18,255,113,242,66,0,110,160,194,254,208,18,186,0,81,21,60,0,188,104,167,255,124,166,97,254,210,133,142,0,56,242,137,254,41,111,130,0,111,151,58,1,111,213,141,255,183,172,241,255,38,6,196,255,185,7,123,255,46,11,246,0,245,105,119,1,15,2,161,255,8,206,45,255,18,202,74,255,83,124,115,1,212,141,157,0,83,8,209,254,139,15,232,255,172,54,173,254,50,247,132,0,214,189,213,0,144,184,105,0,223,254,248,0,255,147,240,255,23,188,72,0,7,51,54,0,188,25,180,254,220,180,0,255,83,160,20,0,163,189,243,255,58,209,194,255,87,73,60,0,106,24,49,0,245,249,220,0,22,173,167,0,118,11,195,255,19,126,237,0,110,159,37,255,59,82,47,0,180,187,86,0,188,148,208,1,100,37,133,255,7,112,193,0,129,188,156,255,84,106,129,255,133,225,202,0,14,236,111,255,40,20,101,0,172,172,49,254,51,54,74,255,251,185,184,255,93,155,224,255,180,249,224,1,230,178,146,0,72,57,54,254,178,62,184,0,119,205,72,0,185,239,253,255,61,15,218,0,196,67,56,255,234,32,171,1,46,219,228,0,208,108,234,255,20,63,232,255,165,53,199,1,133,228,5,255,52,205,107,0,74,238,140,255,150,156,219,254,239,172,178,255,251,189,223,254,32,142,211,255,218,15,138,1,241,196,80,0,28,36,98,254,22,234,199,0,61,237,220,255,246,57,37,0,142,17,142,255,157,62,26,0,43,238,95,254,3,217,6,255,213,25,240,1,39,220,174,255,154,205,48,254,19,13,192,255,244,34,54,254,140,16,155,0,240,181,5,254,155,193,60,0,166,128,4,255,36,145,56,255,150,240,219,0,120,51,145,0,82,153,42,1,140,236,146,0,107,92,248,1,189,10,3,0,63,136,242,0,211,39,24,0,19,202,161,1,173,27,186,255,210,204,239,254,41,209,162,255,182,254,159,255,172,116,52,0,195,103,222,254,205,69,59,0,53,22,41,1,218,48,194,0,80,210,242,0,210,188,207,0,187,161,161,254,216,17,1,0,136,225,113,0,250,184,63,0,223,30,98,254,77,168,162,0,59,53,175,0,19,201,10,255,139,224,194,0,147,193,154,255,212,189,12,254,1,200,174,255,50,133,113,1,94,179,90,0,173,182,135,0,94,177,113,0,43,89,215,255,136,252,106,255,123,134,83,254,5,245,66,255,82,49,39,1,220,2,224,0,97,129,177,0,77,59,89,0,61,29,155,1,203,171,220,255,92,78,139,0,145,33,181,255,169,24,141,1,55,150,179,0,139,60,80,255,218,39,97,0,2,147,107,255,60,248,72,0,173,230,47,1,6,83,182,255,16,105,162,254,137,212,81,255,180,184,134,1,39,222,164,255,221,105,251,1,239,112,125,0,63,7,97,0,63,104,227,255,148,58,12,0,90,60,224,255,84,212,252,0,79,215,168,0,248,221,199,1,115,121,1,0,36,172,120,0,32,162,187,255,57,107,49,255,147,42,21,0,106,198,43,1,57,74,87,0,126,203,81,255,129,135,195,0,140,31,177,0,221,139,194,0,3,222,215,0,131,68,231,0,177,86,178,254,124,151,180,0,184,124,38,1,70,163,17,0,249,251,181,1,42,55,227,0,226,161,44,0,23,236,110,0,51,149,142,1,93,5,236,0,218,183,106,254,67,24,77,0,40,245,209,255,222,121,153,0,165,57,30,0,83,125,60,0,70,38,82,1,229,6,188,0,109,222,157,255,55,118,63,255,205,151,186,0,227,33,149,255,254,176,246,1,227,177,227,0,34,106,163,254,176,43,79,0,106,95,78,1,185,241,122,255,185,14,61,0,36,1,202,0,13,178,162,255,247,11,132,0,161,230,92,1,65,1,185,255,212,50,165,1,141,146,64,255,158,242,218,0,21,164,125,0,213,139,122,1,67,71,87,0,203,158,178,1,151,92,43,0,152,111,5,255,39,3,239,255,217,255,250,255,176,63,71,255,74,245,77,1,250,174,18,255,34,49,227,255,246,46,251,255,154,35,48,1,125,157,61,255,106,36,78,255,97,236,153,0,136,187,120,255,113,134,171,255,19,213,217,254,216,94,209,255,252,5,61,0,94,3,202,0,3,26,183,255,64,191,43,255,30,23,21,0,129,141,77,255,102,120,7,1,194,76,140,0,188,175,52,255,17,81,148,0,232,86,55,1,225,48,172,0,134,42,42,255,238,50,47,0,169,18,254,0,20,147,87,255,14,195,239,255,69,247,23,0,238,229,128,255,177,49,112,0,168,98,251,255,121,71,248,0,243,8,145,254,246,227,153,255,219,169,177,254,251,139,165,255,12,163,185,255,164,40,171,255,153,159,27,254,243,109,91,255,222,24,112,1,18,214,231,0,107,157,181,254,195,147,0,255,194,99,104,255,89,140,190,255,177,66,126,254,106,185,66,0,49,218,31,0,252,174,158,0,188,79,230,1,238,41,224,0,212,234,8,1,136,11,181,0,166,117,83,255,68,195,94,0,46,132,201,0,240,152,88,0,164,57,69,254,160,224,42,255,59,215,67,255,119,195,141,255,36,180,121,254,207,47,8,255,174,210,223,0,101,197,68,255,255,82,141,1,250,137,233,0,97,86,133,1,16,80,69,0,132,131,159,0,116,93,100,0,45,141,139,0,152,172,157,255,90,43,91,0,71,153,46,0,39,16,112,255,217,136,97,255,220,198,25,254,177,53,49,0,222,88,134,255,128,15,60,0,207,192,169,255,192,116,209,255,106,78,211,1,200,213,183,255,7,12,122,254,222,203,60,255,33,110,199,254,251,106,117,0,228,225,4,1,120,58,7,255,221,193,84,254,112,133,27,0,189,200,201,255,139,135,150,0,234,55,176,255,61,50,65,0,152,108,169,255,220,85,1,255,112,135,227,0,162,26,186,0,207,96,185,254,244,136,107,0,93,153,50,1,198,97,151,0,110,11,86,255,143,117,174,255,115,212,200,0,5,202,183,0,237,164,10,254,185,239,62,0,236,120,18,254,98,123,99,255,168,201,194,254,46,234,214,0,191,133,49,255,99,169,119,0,190,187,35,1,115,21,45,255,249,131,72,0,112,6,123,255,214,49,181,254,166,233,34,0,92,197,102,254,253,228,205,255,3,59,201,1,42,98,46,0,219,37,35,255,169,195,38,0,94,124,193,1,156,43,223,0,95,72,133,254,120,206,191,0,122,197,239,255,177,187,79,255,254,46,2,1,250,167,190,0,84,129,19,0,203,113,166,255,249,31,189,254,72,157,202,255,208,71,73,255,207,24,72,0,10,16,18,1,210,81,76,255,88,208,192,255,126,243,107,255,238,141,120,255,199,121,234,255,137,12,59,255,36,220,123,255,148,179,60,254,240,12,29,0,66,0,97,1,36,30,38,255,115,1,93,255,96,103,231,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); +/* memory initializer */ allocate([197,158,59,1,192,164,240,0,202,202,57,255,24,174,48,0,89,77,155,1,42,76,215,0,244,151,233,0,23,48,81,0,239,127,52,254,227,130,37,255,248,116,93,1,124,132,118,0,173,254,192,1,6,235,83,255,110,175,231,1,251,28,182,0,129,249,93,254,84,184,128,0,76,181,62,0,175,128,186,0,100,53,136,254,109,29,226,0,221,233,58,1,20,99,74,0,0,22,160,0,134,13,21,0,9,52,55,255,17,89,140,0,175,34,59,0,84,165,119,255,224,226,234,255,7,72,166,255,123,115,255,1,18,214,246,0,250,7,71,1,217,220,185,0,212,35,76,255,38,125,175,0,189,97,210,0,114,238,44,255,41,188,169,254,45,186,154,0,81,92,22,0,132,160,193,0,121,208,98,255,13,81,44,255,203,156,82,0,71,58,21,255,208,114,191,254,50,38,147,0,154,216,195,0,101,25,18,0,60,250,215,255,233,132,235,255,103,175,142,1,16,14,92,0,141,31,110,254,238,241,45,255,153,217,239,1,97,168,47,255,249,85,16,1,28,175,62,255,57,254,54,0,222,231,126,0,166,45,117,254,18,189,96,255,228,76,50,0,200,244,94,0,198,152,120,1,68,34,69,255,12,65,160,254,101,19,90,0,167,197,120,255,68,54,185,255,41,218,188,0,113,168,48,0,88,105,189,1,26,82,32,255,185,93,164,1,228,240,237,255,66,182,53,0,171,197,92,255,107,9,233,1,199,120,144,255,78,49,10,255,109,170,105,255,90,4,31,255,28,244,113,255,74,58,11,0,62,220,246,255,121,154,200,254,144,210,178,255,126,57,129,1,43,250,14,255,101,111,28,1,47,86,241,255,61,70,150,255,53,73,5,255,30,26,158,0,209,26,86,0,138,237,74,0,164,95,188,0,142,60,29,254,162,116,248,255,187,175,160,0,151,18,16,0,209,111,65,254,203,134,39,255,88,108,49,255,131,26,71,255,221,27,215,254,104,105,93,255,31,236,31,254,135,0,211,255,143,127,110,1,212,73,229,0,233,67,167,254,195,1,208,255,132,17,221,255,51,217,90,0,67,235,50,255,223,210,143,0,179,53,130,1,233,106,198,0,217,173,220,255,112,229,24,255,175,154,93,254,71,203,246,255,48,66,133,255,3,136,230,255,23,221,113,254,235,111,213,0,170,120,95,254,251,221,2,0,45,130,158,254,105,94,217,255,242,52,180,254,213,68,45,255,104,38,28,0,244,158,76,0,161,200,96,255,207,53,13,255,187,67,148,0,170,54,248,0,119,162,178,255,83,20,11,0,42,42,192,1,146,159,163,255,183,232,111,0,77,229,21,255,71,53,143,0,27,76,34,0,246,136,47,255,219,39,182,255,92,224,201,1,19,142,14,255,69,182,241,255,163,118,245,0,9,109,106,1,170,181,247,255,78,47,238,255,84,210,176,255,213,107,139,0,39,38,11,0,72,21,150,0,72,130,69,0,205,77,155,254,142,133,21,0,71,111,172,254,226,42,59,255,179,0,215,1,33,128,241,0,234,252,13,1,184,79,8,0,110,30,73,255,246,141,189,0,170,207,218,1,74,154,69,255,138,246,49,255,155,32,100,0,125,74,105,255,90,85,61,255,35,229,177,255,62,125,193,255,153,86,188,1,73,120,212,0,209,123,246,254,135,209,38,255,151,58,44,1,92,69,214,255,14,12,88,255,252,153,166,255,253,207,112,255,60,78,83,255,227,124,110,0,180,96,252,255,53,117,33,254,164,220,82,255,41,1,27,255,38,164,166,255,164,99,169,254,61,144,70,255,192,166,18,0,107,250,66,0,197,65,50,0,1,179,18,255,255,104,1,255,43,153,35,255,80,111,168,0,110,175,168,0,41,105,45,255,219,14,205,255,164,233,140,254,43,1,118,0,233,67,195,0,178,82,159,255,138,87,122,255,212,238,90,255,144,35,124,254,25,140,164,0,251,215,44,254,133,70,107,255,101,227,80,254,92,169,55,0,215,42,49,0,114,180,85,255,33,232,27,1,172,213,25,0,62,176,123,254,32,133,24,255,225,191,62,0,93,70,153,0,181,42,104,1,22,191,224,255,200,200,140,255,249,234,37,0,149,57,141,0,195,56,208,255,254,130,70,255,32,173,240,255,29,220,199,0,110,100,115,255,132,229,249,0,228,233,223,255,37,216,209,254,178,177,209,255,183,45,165,254,224,97,114,0,137,97,168,255,225,222,172,0,165,13,49,1,210,235,204,255,252,4,28,254,70,160,151,0,232,190,52,254,83,248,93,255,62,215,77,1,175,175,179,255,160,50,66,0,121,48,208,0,63,169,209,255,0,210,200,0,224,187,44,1,73,162,82,0,9,176,143,255,19,76,193,255,29,59,167,1,24,43,154,0,28,190,190,0,141,188,129,0,232,235,203,255,234,0,109,255,54,65,159,0,60,88,232,255,121,253,150,254,252,233,131,255,198,110,41,1,83,77,71,255,200,22,59,254,106,253,242,255,21,12,207,255,237,66,189,0,90,198,202,1,225,172,127,0,53,22,202,0,56,230,132,0,1,86,183,0,109,190,42,0,243,68,174,1,109,228,154,0,200,177,122,1,35,160,183,255,177,48,85,255,90,218,169,255,248,152,78,0,202,254,110,0,6,52,43,0,142,98,65,255,63,145,22,0,70,106,93,0,232,138,107,1,110,179,61,255,211,129,218,1,242,209,92,0,35,90,217,1,182,143,106,255,116,101,217,255,114,250,221,255,173,204,6,0,60,150,163,0,73,172,44,255,239,110,80,255,237,76,153,254,161,140,249,0,149,232,229,0,133,31,40,255,174,164,119,0,113,51,214,0,129,228,2,254,64,34,243,0,107,227,244,255,174,106,200,255,84,153,70,1,50,35,16,0,250,74,216,254,236,189,66,255,153,249,13,0,230,178,4,255,221,41,238,0,118,227,121,255,94,87,140,254,254,119,92,0,73,239,246,254,117,87,128,0,19,211,145,255,177,46,252,0,229,91,246,1,69,128,247,255,202,77,54,1,8,11,9,255,153,96,166,0,217,214,173,255,134,192,2,1,0,207,0,0,189,174,107,1,140,134,100,0,158,193,243,1,182,102,171,0,235,154,51,0,142,5,123,255,60,168,89,1,217,14,92,255,19,214,5,1,211,167,254,0,44,6,202,254,120,18,236,255,15,113,184,255,184,223,139,0,40,177,119,254,182,123,90,255,176,165,176,0,247,77,194,0,27,234,120,0,231,0,214,255,59,39,30,0,125,99,145,255,150,68,68,1,141,222,248,0,153,123,210,255,110,127,152,255,229,33,214,1,135,221,197,0,137,97,2,0,12,143,204,255,81,41,188,0,115,79,130,255,94,3,132,0,152,175,187,255,124,141,10,255,126,192,179,255,11,103,198,0,149,6,45,0,219,85,187,1,230,18,178,255,72,182,152,0,3,198,184,255,128,112,224,1,97,161,230,0,254,99,38,255,58,159,197,0,151,66,219,0,59,69,143,255,185,112,249,0,119,136,47,255,123,130,132,0,168,71,95,255,113,176,40,1,232,185,173,0,207,93,117,1,68,157,108,255,102,5,147,254,49,97,33,0,89,65,111,254,247,30,163,255,124,217,221,1,102,250,216,0,198,174,75,254,57,55,18,0,227,5,236,1,229,213,173,0,201,109,218,1,49,233,239,0,30,55,158,1,25,178,106,0,155,111,188,1,94,126,140,0,215,31,238,1,77,240,16,0,213,242,25,1,38,71,168,0,205,186,93,254,49,211,140,255,219,0,180,255,134,118,165,0,160,147,134,255,110,186,35,255,198,243,42,0,243,146,119,0,134,235,163,1,4,241,135,255,193,46,193,254,103,180,79,255,225,4,184,254,242,118,130,0,146,135,176,1,234,111,30,0,69,66,213,254,41,96,123,0,121,94,42,255,178,191,195,255,46,130,42,0,117,84,8,255,233,49,214,254,238,122,109,0,6,71,89,1,236,211,123,0,244,13,48,254,119,148,14,0,114,28,86,255,75,237,25,255,145,229,16,254,129,100,53,255,134,150,120,254,168,157,50,0,23,72,104,255,224,49,14,0,255,123,22,255,151,185,151,255,170,80,184,1,134,182,20,0,41,100,101,1,153,33,16,0,76,154,111,1,86,206,234,255,192,160,164,254,165,123,93,255,1,216,164,254,67,17,175,255,169,11,59,255,158,41,61,255,73,188,14,255,195,6,137,255,22,147,29,255,20,103,3,255,246,130,227,255,122,40,128,0,226,47,24,254,35,36,32,0,152,186,183,255,69,202,20,0,195,133,195,0,222,51,247,0,169,171,94,1,183,0,160,255,64,205,18,1,156,83,15,255,197,58,249,254,251,89,110,255,50,10,88,254,51,43,216,0,98,242,198,1,245,151,113,0,171,236,194,1,197,31,199,255,229,81,38,1,41,59,20,0,253,104,230,0,152,93,14,255,246,242,146,254,214,169,240,255,240,102,108,254,160,167,236,0,154,218,188,0,150,233,202,255,27,19,250,1,2,71,133,255,175,12,63,1,145,183,198,0,104,120,115,255,130,251,247,0,17,212,167,255,62,123,132,255,247,100,189,0,155,223,152,0,143,197,33,0,155,59,44,255,150,93,240,1,127,3,87,255,95,71,207,1,167,85,1,255,188,152,116,255,10,23,23,0,137,195,93,1,54,98,97,0,240,0,168,255,148,188,127,0,134,107,151,0,76,253,171,0,90,132,192,0,146,22,54,0,224,66,54,254,230,186,229,255,39,182,196,0,148,251,130,255,65,131,108,254,128,1,160,0,169,49,167,254,199,254,148,255,251,6,131,0,187,254,129,255,85,82,62,0,178,23,58,255,254,132,5,0,164,213,39,0,134,252,146,254,37,53,81,255,155,134,82,0,205,167,238,255,94,45,180,255,132,40,161,0,254,111,112,1,54,75,217,0,179,230,221,1,235,94,191,255,23,243,48,1,202,145,203,255,39,118,42,255,117,141,253,0,254,0,222,0,43,251,50,0,54,169,234,1,80,68,208,0,148,203,243,254,145,7,135,0,6,254,0,0,252,185,127,0,98,8,129,255,38,35,72,255,211,36,220,1,40,26,89,0,168,64,197,254,3,222,239,255,2,83,215,254,180,159,105,0,58,115,194,0,186,116,106,255,229,247,219,255,129,118,193,0,202,174,183,1,166,161,72,0,201,107,147,254,237,136,74,0,233,230,106,1,105,111,168,0,64,224,30,1,1,229,3,0,102,151,175,255,194,238,228,255,254,250,212,0,187,237,121,0,67,251,96,1,197,30,11,0,183,95,204,0,205,89,138,0,64,221,37,1,255,223,30,255,178,48,211,255,241,200,90,255,167,209,96,255,57,130,221,0,46,114,200,255,61,184,66,0,55,182,24,254,110,182,33,0,171,190,232,255,114,94,31,0,18,221,8,0,47,231,254,0,255,112,83,0,118,15,215,255,173,25,40,254,192,193,31,255,238,21,146,255,171,193,118,255,101,234,53,254,131,212,112,0,89,192,107,1,8,208,27,0,181,217,15,255,231,149,232,0,140,236,126,0,144,9,199,255,12,79,181,254,147,182,202,255,19,109,182,255,49,212,225,0,74,163,203,0,175,233,148,0,26,112,51,0,193,193,9,255,15,135,249,0,150,227,130,0,204,0,219,1,24,242,205,0,238,208,117,255,22,244,112,0,26,229,34,0,37,80,188,255,38,45,206,254,240,90,225,255,29,3,47,255,42,224,76,0,186,243,167,0,32,132,15,255,5,51,125,0,139,135,24,0,6,241,219,0,172,229,133,255,246,214,50,0,231,11,207,255,191,126,83,1,180,163,170,255,245,56,24,1,178,164,211,255,3,16,202,1,98,57,118,255,141,131,89,254,33,51,24,0,243,149,91,255,253,52,14,0,35,169,67,254,49,30,88,255,179,27,36,255,165,140,183,0,58,189,151,0,88,31,0,0,75,169,66,0,66,101,199,255,24,216,199,1,121,196,26,255,14,79,203,254,240,226,81,255,94,28,10,255,83,193,240,255,204,193,131,255,94,15,86,0,218,40,157,0,51,193,209,0,0,242,177,0,102,185,247,0,158,109,116,0,38,135,91,0,223,175,149,0,220,66,1,255,86,60,232,0,25,96,37,255,225,122,162,1,215,187,168,255,158,157,46,0,56,171,162,0,232,240,101,1,122,22,9,0,51,9,21,255,53,25,238,255,217,30,232,254,125,169,148,0,13,232,102,0,148,9,37,0,165,97,141,1,228,131,41,0,222,15,243,255,254,18,17,0,6,60,237,1,106,3,113,0,59,132,189,0,92,112,30,0,105,208,213,0,48,84,179,255,187,121,231,254,27,216,109,255,162,221,107,254,73,239,195,255,250,31,57,255,149,135,89,255,185,23,115,1,3,163,157,255,18,112,250,0,25,57,187,255,161,96,164,0,47,16,243,0,12,141,251,254,67,234,184,255,41,18,161,0,175,6,96,255,160,172,52,254,24,176,183,255,198,193,85,1,124,121,137,255,151,50,114,255,220,203,60,255,207,239,5,1,0,38,107,255,55,238,94,254,70,152,94,0,213,220,77,1,120,17,69,255,85,164,190,255,203,234,81,0,38,49,37,254,61,144,124,0,137,78,49,254,168,247,48,0,95,164,252,0,105,169,135,0,253,228,134,0,64,166,75,0,81,73,20,255,207,210,10,0,234,106,150,255,94,34,90,255,254,159,57,254,220,133,99,0,139,147,180,254,24,23,185,0,41,57,30,255,189,97,76,0,65,187,223,255,224,172,37,255,34,62,95,1,231,144,240,0,77,106,126,254,64,152,91,0,29,98,155,0,226,251,53,255,234,211,5,255,144,203,222,255,164,176,221,254,5,231,24,0,179,122,205,0,36,1,134,255,125,70,151,254,97,228,252,0,172,129,23,254,48,90,209,255,150,224,82,1,84,134,30,0,241,196,46,0,103,113,234,255,46,101,121,254,40,124,250,255,135,45,242,254,9,249,168,255,140,108,131,255,143,163,171,0,50,173,199,255,88,222,142,255,200,95,158,0,142,192,163,255,7,117,135,0,111,124,22,0,236,12,65,254,68,38,65,255,227,174,254,0,244,245,38,0,240,50,208,255,161,63,250,0,60,209,239,0,122,35,19,0,14,33,230,254,2,159,113,0,106,20,127,255,228,205,96,0,137,210,174,254,180,212,144,255,89,98,154,1,34,88,139,0,167,162,112,1,65,110,197,0,241,37,169,0,66,56,131,255,10,201,83,254,133,253,187,255,177,112,45,254,196,251,0,0,196,250,151,255,238,232,214,255,150,209,205,0,28,240,118,0,71,76,83,1,236,99,91,0,42,250,131,1,96,18,64,255,118,222,35,0,113,214,203,255,122,119,184,255,66,19,36,0,204,64,249,0,146,89,139,0,134,62,135,1,104,233,101,0,188,84,26,0,49,249,129,0,208,214,75,255,207,130,77,255,115,175,235,0,171,2,137,255,175,145,186,1,55,245,135,255,154,86,181,1,100,58,246,255,109,199,60,255,82,204,134,255,215,49,230,1,140,229,192,255,222,193,251,255,81,136,15,255,179,149,162,255,23,39,29,255,7,95,75,254,191,81,222,0,241,81,90,255,107,49,201,255,244,211,157,0,222,140,149,255,65,219,56,254,189,246,90,255,178,59,157,1,48,219,52,0,98,34,215,0,28,17,187,255,175,169,24,0,92,79,161,255,236,200,194,1,147,143,234,0,229,225,7,1,197,168,14,0,235,51,53,1,253,120,174,0,197,6,168,255,202,117,171,0,163,21,206,0,114,85,90,255,15,41,10,255,194,19,99,0,65,55,216,254,162,146,116,0,50,206,212,255,64,146,29,255,158,158,131,1,100,165,130,255,172,23,129,255,125,53,9,255,15,193,18,1,26,49,11,255,181,174,201,1,135,201,14,255,100,19,149,0,219,98,79,0,42,99,143,254,96,0,48,255,197,249,83,254,104,149,79,255,235,110,136,254,82,128,44,255,65,41,36,254,88,211,10,0,187,121,187,0,98,134,199,0,171,188,179,254,210,11,238,255,66,123,130,254,52,234,61,0,48,113,23,254,6,86,120,255,119,178,245,0,87,129,201,0,242,141,209,0,202,114,85,0,148,22,161,0,103,195,48,0,25,49,171,255,138,67,130,0,182,73,122,254,148,24,130,0,211,229,154,0,32,155,158,0,84,105,61,0,177,194,9,255,166,89,86,1,54,83,187,0,249,40,117,255,109,3,215,255,53,146,44,1,63,47,179,0,194,216,3,254,14,84,136,0,136,177,13,255,72,243,186,255,117,17,125,255,211,58,211,255,93,79,223,0,90,88,245,255,139,209,111,255,70,222,47,0,10,246,79,255,198,217,178,0,227,225,11,1,78,126,179,255,62,43,126,0,103,148,35,0,129,8,165,254,245,240,148,0,61,51,142,0,81,208,134,0,15,137,115,255,211,119,236,255,159,245,248,255,2,134,136,255,230,139,58,1,160,164,254,0,114,85,141,255,49,166,182,255,144,70,84,1,85,182,7,0,46,53,93,0,9,166,161,255,55,162,178,255,45,184,188,0,146,28,44,254,169,90,49,0,120,178,241,1,14,123,127,255,7,241,199,1,189,66,50,255,198,143,101,254,189,243,135,255,141,24,24,254,75,97,87,0,118,251,154,1,237,54,156,0,171,146,207,255,131,196,246,255,136,64,113,1,151,232,57,0,240,218,115,0,49,61,27,255,64,129,73,1,252,169,27,255,40,132,10,1,90,201,193,255,252,121,240,1,186,206,41,0,43,198,97,0,145,100,183,0,204,216,80,254,172,150,65,0,249,229,196,254,104,123,73,255,77,104,96,254,130,180,8,0,104,123,57,0,220,202,229,255,102,249,211,0,86,14,232,255,182,78,209,0,239,225,164,0,106,13,32,255,120,73,17,255,134,67,233,0,83,254,181,0,183,236,112,1,48,64,131,255,241,216,243,255,65,193,226,0,206,241,100,254,100,134,166,255,237,202,197,0,55,13,81,0,32,124,102,255,40,228,177,0,118,181,31,1,231,160,134,255,119,187,202,0,0,142,60,255,128,38,189,255,166,201,150,0,207,120,26,1,54,184,172,0,12,242,204,254,133,66,230,0,34,38,31,1,184,112,80,0,32,51,165,254,191,243,55,0,58,73,146,254,155,167,205,255,100,104,152,255,197,254,207,255,173,19,247,0,238,10,202,0,239,151,242,0,94,59,39,255,240,29,102,255,10,92,154,255,229,84,219,255,161,129,80,0,208,90,204,1,240,219,174,255,158,102,145,1,53,178,76,255,52,108,168,1,83,222,107,0,211,36,109,0,118,58,56,0,8,29,22,0,237,160,199,0,170,209,157,0,137,71,47,0,143,86,32,0,198,242,2,0,212,48,136,1,92,172,186,0,230,151,105,1,96,191,229,0,138,80,191,254,240,216,130,255,98,43,6,254,168,196,49,0,253,18,91,1,144,73,121,0,61,146,39,1,63,104,24,255,184,165,112,254,126,235,98,0,80,213,98,255,123,60,87,255,82,140,245,1,223,120,173,255,15,198,134,1,206,60,239,0,231,234,92,255,33,238,19,255,165,113,142,1,176,119,38,0,160,43,166,254,239,91,105,0,107,61,194,1,25,4,68,0,15,139,51,0,164,132,106,255,34,116,46,254,168,95,197,0,137,212,23,0,72,156,58,0,137,112,69,254,150,105,154,255,236,201,157,0,23,212,154,255,136,82,227,254,226,59,221,255,95,149,192,0,81,118,52,255,33,43,215,1,14,147,75,255,89,156,121,254,14,18,79,0,147,208,139,1,151,218,62,255,156,88,8,1,210,184,98,255,20,175,123,255,102,83,229,0,220,65,116,1,150,250,4,255,92,142,220,255,34,247,66,255,204,225,179,254,151,81,151,0,71,40,236,255,138,63,62,0,6,79,240,255,183,185,181,0,118,50,27,0,63,227,192,0,123,99,58,1,50,224,155,255,17,225,223,254,220,224,77,255,14,44,123,1,141,128,175,0,248,212,200,0,150,59,183,255,147,97,29,0,150,204,181,0,253,37,71,0,145,85,119,0,154,200,186,0,2,128,249,255,83,24,124,0,14,87,143,0,168,51,245,1,124,151,231,255,208,240,197,1,124,190,185,0,48,58,246,0,20,233,232,0,125,18,98,255,13,254,31,255,245,177,130,255,108,142,35,0,171,125,242,254,140,12,34,255,165,161,162,0,206,205,101,0,247,25,34,1,100,145,57,0,39,70,57,0,118,204,203,255,242,0,162,0,165,244,30,0,198,116,226,0,128,111,153,255,140,54,182,1,60,122,15,255,155,58,57,1,54,50,198,0,171,211,29,255,107,138,167,255,173,107,199,255,109,161,193,0,89,72,242,255,206,115,89,255,250,254,142,254,177,202,94,255,81,89,50,0,7,105,66,255,25,254,255,254,203,64,23,255,79,222,108,255,39,249,75,0,241,124,50,0,239,152,133,0,221,241,105,0,147,151,98,0,213,161,121,254,242,49,137,0,233,37,249,254,42,183,27,0,184,119,230,255,217,32,163,255,208,251,228,1,137,62,131,255,79,64,9,254,94,48,113,0,17,138,50,254,193,255,22,0,247,18,197,1,67,55,104,0,16,205,95,255,48,37,66,0,55,156,63,1,64,82,74,255,200,53,71,254,239,67,125,0,26,224,222,0,223,137,93,255,30,224,202,255,9,220,132,0,198,38,235,1,102,141,86,0,60,43,81,1,136,28,26,0,233,36,8,254,207,242,148,0,164,162,63,0,51,46,224,255,114,48,79,255,9,175,226,0,222,3,193,255,47,160,232,255,255,93,105,254,14,42,230,0,26,138,82,1,208,43,244,0,27,39,38,255,98,208,127,255,64,149,182,255,5,250,209,0,187,60,28,254,49,25,218,255,169,116,205,255,119,18,120,0,156,116,147,255,132,53,109,255,13,10,202,0,110,83,167,0,157,219,137,255,6,3,130,255,50,167,30,255,60,159,47,255,129,128,157,254,94,3,189,0,3,166,68,0,83,223,215,0,150,90,194,1,15,168,65,0,227,83,51,255,205,171,66,255,54,187,60,1,152,102,45,255,119,154,225,0,240,247,136,0,100,197,178,255,139,71,223,255,204,82,16,1,41,206,42,255,156,192,221,255,216,123,244,255,218,218,185,255,187,186,239,255,252,172,160,255,195,52,22,0,144,174,181,254,187,100,115,255,211,78,176,255,27,7,193,0,147,213,104,255,90,201,10,255,80,123,66,1,22,33,186,0,1,7,99,254,30,206,10,0,229,234,5,0,53,30,210,0,138,8,220,254,71,55,167,0,72,225,86,1,118,190,188,0,254,193,101,1,171,249,172,255,94,158,183,254,93,2,108,255,176,93,76,255,73,99,79,255,74,64,129,254,246,46,65,0,99,241,127,254,246,151,102,255,44,53,208,254,59,102,234,0,154,175,164,255,88,242,32,0,111,38,1,0,255,182,190,255,115,176,15,254,169,60,129,0,122,237,241,0,90,76,63,0,62,74,120,255,122,195,110,0,119,4,178,0,222,242,210,0,130,33,46,254,156,40,41,0,167,146,112,1,49,163,111,255,121,176,235,0,76,207,14,255,3,25,198,1,41,235,213,0,85,36,214,1,49,92,109,255,200,24,30,254,168,236,195,0,145,39,124,1,236,195,149,0,90,36,184,255,67,85,170,255,38,35,26,254,131,124,68,255,239,155,35,255,54,201,164,0,196,22,117,255,49,15,205,0,24,224,29,1,126,113,144,0,117,21,182,0,203,159,141,0,223,135,77,0,176,230,176,255,190,229,215,255,99,37,181,255,51,21,138,255,25,189,89,255,49,48,165,254,152,45,247,0,170,108,222,0,80,202,5,0,27,69,103,254,204,22,129,255,180,252,62,254,210,1,91,255,146,110,254,255,219,162,28,0,223,252,213,1,59,8,33,0,206,16,244,0,129,211,48,0,107,160,208,0,112,59,209,0,109,77,216,254,34,21,185,255,246,99,56,255,179,139,19,255,185,29,50,255,84,89,19,0,74,250,98,255,225,42,200,255,192,217,205,255,210,16,167,0,99,132,95,1,43,230,57,0,254,11,203,255,99,188,63,255,119,193,251,254,80,105,54,0,232,181,189,1,183,69,112,255,208,171,165,255,47,109,180,255,123,83,165,0,146,162,52,255,154,11,4,255,151,227,90,255,146,137,97,254,61,233,41,255,94,42,55,255,108,164,236,0,152,68,254,0,10,140,131,255,10,106,79,254,243,158,137,0,67,178,66,254,177,123,198,255,15,62,34,0,197,88,42,255,149,95,177,255,152,0,198,255,149,254,113,255,225,90,163,255,125,217,247,0,18,17,224,0,128,66,120,254,192,25,9,255,50,221,205,0,49,212,70,0,233,255,164,0,2,209,9,0,221,52,219,254,172,224,244,255,94,56,206,1,242,179,2,255,31,91,164,1,230,46,138,255,189,230,220,0,57,47,61,255,111,11,157,0,177,91,152,0,28,230,98,0,97,87,126,0,198,89,145,255,167,79,107,0,249,77,160,1,29,233,230,255,150,21,86,254,60,11,193,0,151,37,36,254,185,150,243,255,228,212,83,1,172,151,180,0,201,169,155,0,244,60,234,0,142,235,4,1,67,218,60,0,192,113,75,1,116,243,207,255,65,172,155,0,81,30,156,255,80,72,33,254,18,231,109,255,142,107,21,254,125,26,132,255,176,16,59,255,150,201,58,0,206,169,201,0,208,121,226,0,40,172,14,255,150,61,94,255,56,57,156,255,141,60,145,255,45,108,149,255,238,145,155,255,209,85,31,254,192,12,210,0,99,98,93,254,152,16,151,0,225,185,220,0,141,235,44,255,160,172,21,254,71,26,31,255,13,64,93,254,28,56,198,0,177,62,248,1,182,8,241,0,166,101,148,255,78,81,133,255,129,222,215,1,188,169,129,255,232,7,97,0,49,112,60,255,217,229,251,0,119,108,138,0,39,19,123,254,131,49,235,0,132,84,145,0,130,230,148,255,25,74,187,0,5,245,54,255,185,219,241,1,18,194,228,255,241,202,102,0,105,113,202,0,155,235,79,0,21,9,178,255,156,1,239,0,200,148,61,0,115,247,210,255,49,221,135,0,58,189,8,1,35,46,9,0,81,65,5,255,52,158,185,255,125,116,46,255,74,140,13,255,210,92,172,254,147,23,71,0,217,224,253,254,115,108,180,255,145,58,48,254,219,177,24,255,156,255,60,1,154,147,242,0,253,134,87,0,53,75,229,0,48,195,222,255,31,175,50,255,156,210,120,255,208,35,222,255,18,248,179,1,2,10,101,255,157,194,248,255,158,204,101,255,104,254,197,255,79,62,4,0,178,172,101,1,96,146,251,255,65,10,156,0,2,137,165,255,116,4,231,0,242,215,1,0,19,35,29,255,43,161,79,0,59,149,246,1,251,66,176,0,200,33,3,255,80,110,142,255,195,161,17,1,228,56,66,255,123,47,145,254,132,4,164,0,67,174,172,0,25,253,114,0,87,97,87,1,250,220,84,0,96,91,200,255,37,125,59,0,19,65,118,0,161,52,241,255,237,172,6,255,176,191,255,255,1,65,130,254,223,190,230,0,101,253,231,255,146,35,109,0,250,29,77,1,49,0,19,0,123,90,155,1,22,86,32,255,218,213,65,0,111,93,127,0,60,93,169,255,8,127,182,0,17,186,14,254,253,137,246,255,213,25,48,254,76,238,0,255,248,92,70,255,99,224,139,0,184,9,255,1,7,164,208,0,205,131,198,1,87,214,199,0,130,214,95,0,221,149,222,0,23,38,171,254,197,110,213,0,43,115,140,254,215,177,118,0,96,52,66,1,117,158,237,0,14,64,182,255,46,63,174,255,158,95,190,255,225,205,177,255,43,5,142,255,172,99,212,255,244,187,147,0,29,51,153,255,228,116,24,254,30,101,207,0,19,246,150,255,134,231,5,0,125,134,226,1,77,65,98,0,236,130,33,255,5,110,62,0,69,108,127,255,7,113,22,0,145,20,83,254,194,161,231,255,131,181,60,0,217,209,177,255,229,148,212,254,3,131,184,0,117,177,187,1,28,14,31,255,176,102,80,0,50,84,151,255,125,31,54,255,21,157,133,255,19,179,139,1,224,232,26,0,34,117,170,255,167,252,171,255,73,141,206,254,129,250,35,0,72,79,236,1,220,229,20,255,41,202,173,255,99,76,238,255,198,22,224,255,108,198,195,255,36,141,96,1,236,158,59,255,106,100,87,0,110,226,2,0,227,234,222,0,154,93,119,255,74,112,164,255,67,91,2,255,21,145,33,255,102,214,137,255,175,230,103,254,163,246,166,0,93,247,116,254,167,224,28,255,220,2,57,1,171,206,84,0,123,228,17,255,27,120,119,0,119,11,147,1,180,47,225,255,104,200,185,254,165,2,114,0,77,78,212,0,45,154,177,255,24,196,121,254,82,157,182,0,90,16,190,1,12,147,197,0,95,239,152,255,11,235,71,0,86,146,119,255,172,134,214,0,60,131,196,0,161,225,129,0,31,130,120,254,95,200,51,0,105,231,210,255,58,9,148,255,43,168,221,255,124,237,142,0,198,211,50,254,46,245,103,0,164,248,84,0,152,70,208,255,180,117,177,0,70,79,185,0,243,74,32,0,149,156,207,0,197,196,161,1,245,53,239,0,15,93,246,254,139,240,49,255,196,88,36,255,162,38,123,0,128,200,157,1,174,76,103,255,173,169,34,254,216,1,171,255,114,51,17,0,136,228,194,0,110,150,56,254,106,246,159,0,19,184,79,255,150,77,240,255,155,80,162,0,0,53,169,255,29,151,86,0,68,94,16,0,92,7,110,254,98,117,149,255,249,77,230,255,253,10,140,0,214,124,92,254,35,118,235,0,89,48,57,1,22,53,166,0,184,144,61,255,179,255,194,0,214,248,61,254,59,110,246,0,121,21,81,254,166,3,228,0,106,64,26,255,69,232,134,255,242,220,53,254,46,220,85,0,113,149,247,255,97,179,103,255,190,127,11,0,135,209,182,0,95,52,129,1,170,144,206,255,122,200,204,255,168,100,146,0,60,144,149,254,70,60,40,0,122,52,177,255,246,211,101,255,174,237,8,0,7,51,120,0,19,31,173,0,126,239,156,255,143,189,203,0,196,128,88,255,233,133,226,255,30,125,173,255,201,108,50,0,123,100,59,255,254,163,3,1,221,148,181,255,214,136,57,254,222,180,137,255,207,88,54,255,28,33,251,255,67,214,52,1,210,208,100,0,81,170,94,0,145,40,53,0,224,111,231,254,35,28,244,255,226,199,195,254,238,17,230,0,217,217,164,254,169,157,221,0,218,46,162,1,199,207,163,255,108,115,162,1,14,96,187,255,118,60,76,0,184,159,152,0,209,231,71,254,42,164,186,255,186,153,51,254,221,171,182,255,162,142,173,0,235,47,193,0,7,139,16,1,95,164,64,255,16,221,166,0,219,197,16,0,132,29,44,255,100,69,117,255,60,235,88,254,40,81,173,0,71,190,61,255,187,88,157,0,231,11,23,0,237,117,164,0,225,168,223,255,154,114,116,255,163,152,242,1,24,32,170,0,125,98,113,254,168,19,76,0,17,157,220,254,155,52,5,0,19,111,161,255,71,90,252,255,173,110,240,0,10,198,121,255,253,255,240,255,66,123,210,0,221,194,215,254,121,163,17,255,225,7,99,0,190,49,182,0,115,9,133,1,232,26,138,255,213,68,132,0,44,119,122,255,179,98,51,0,149,90,106,0,71,50,230,255,10,153,118,255,177,70,25,0,165,87,205,0,55,138,234,0,238,30,97,0,113,155,207,0,98,153,127,0,34,107,219,254,117,114,172,255,76,180,255,254,242,57,179,255,221,34,172,254,56,162,49,255,83,3,255,255,113,221,189,255,188,25,228,254,16,88,89,255,71,28,198,254,22,17,149,255,243,121,254,255,107,202,99,255,9,206,14,1,220,47,153,0,107,137,39,1,97,49,194,255,149,51,197,254,186,58,11,255,107,43,232,1,200,6,14,255,181,133,65,254,221,228,171,255,123,62,231,1,227,234,179,255,34,189,212,254,244,187,249,0,190,13,80,1,130,89,1,0,223,133,173,0,9,222,198,255,66,127,74,0,167,216,93,255,155,168,198,1,66,145,0,0,68,102,46,1,172,90,154,0,216,128,75,255,160,40,51,0,158,17,27,1,124,240,49,0,236,202,176,255,151,124,192,255,38,193,190,0,95,182,61,0,163,147,124,255,255,165,51,255,28,40,17,254,215,96,78,0,86,145,218,254,31,36,202,255,86,9,5,0,111,41,200,255,237,108,97,0,57,62,44,0,117,184,15,1,45,241,116,0,152,1,220,255,157,165,188,0,250,15,131,1,60,44,125,255,65,220,251,255,75,50,184,0,53,90,128,255,231,80,194,255,136,129,127,1,21,18,187,255,45,58,161,255,71,147,34,0,174,249,11,254,35,141,29,0,239,68,177,255,115,110,58,0,238,190,177,1,87,245,166,255,190,49,247,255,146,83,184,255,173,14,39,255,146,215,104,0,142,223,120,0,149,200,155,255,212,207,145,1,16,181,217,0,173,32,87,255,255,35,181,0,119,223,161,1,200,223,94,255,70,6,186,255,192,67,85,255,50,169,152,0,144,26,123,255,56,243,179,254,20,68,136,0,39,140,188,254,253,208,5,255,200,115,135,1,43,172,229,255,156,104,187,0,151,251,167,0,52,135,23,0,151,153,72,0,147,197,107,254,148,158,5,255,238,143,206,0,126,153,137,255,88,152,197,254,7,68,167,0,252,159,165,255,239,78,54,255,24,63,55,255,38,222,94,0,237,183,12,255,206,204,210,0,19,39,246,254,30,74,231,0,135,108,29,1,179,115,0,0,117,118,116,1,132,6,252,255,145,129,161,1,105,67,141,0,82,37,226,255,238,226,228,255,204,214,129,254,162,123,100,255,185,121,234,0,45,108,231,0,66,8,56,255,132,136,128,0,172,224,66,254,175,157,188,0,230,223,226,254,242,219,69,0,184,14,119,1,82,162,56,0,114,123,20,0,162,103,85,255,49,239,99,254,156,135,215,0,111,255,167,254,39,196,214,0,144,38,79,1,249,168,125,0,155,97,156,255,23,52,219,255,150,22,144,0,44,149,165,255,40,127,183,0,196,77,233,255,118,129,210,255,170,135,230,255,214,119,198,0,233,240,35,0,253,52,7,255,117,102,48,255,21,204,154,255,179,136,177,255,23,2,3,1,149,130,89,255,252,17,159,1,70,60,26,0,144,107,17,0,180,190,60,255,56,182,59,255,110,71,54,255,198,18,129,255,149,224,87,255,223,21,152,255,138,22,182,255,250,156,205,0,236,45,208,255,79,148,242,1,101,70,209,0,103,78,174,0,101,144,172,255,152,136,237,1,191,194,136,0,113,80,125,1,152,4,141,0,155,150,53,255,196,116,245,0,239,114,73,254,19,82,17,255,124,125,234,255,40,52,191,0,42,210,158,255,155,132,165,0,178,5,42,1,64,92,40,255,36,85,77,255,178,228,118,0,137,66,96,254,115,226,66,0,110,240,69,254,151,111,80,0,167,174,236,255,227,108,107,255,188,242,65,255,183,81,255,0,57,206,181,255,47,34,181,255,213,240,158,1,71,75,95,0,156,40,24,255,102,210,81,0,171,199,228,255,154,34,41,0,227,175,75,0,21,239,195,0,138,229,95,1,76,192,49,0,117,123,87,1,227,225,130,0,125,62,63,255,2,198,171,0,254,36,13,254,145,186,206,0,148,255,244,255,35,0,166,0,30,150,219,1,92,228,212,0,92,198,60,254,62,133,200,255,201,41,59,0,125,238,109,255,180,163,238,1,140,122,82,0,9,22,88,255,197,157,47,255,153,94,57,0,88,30,182,0,84,161,85,0,178,146,124,0,166,166,7,255,21,208,223,0,156,182,242,0,155,121,185,0,83,156,174,254,154,16,118,255,186,83,232,1,223,58,121,255,29,23,88,0,35,125,127,255,170,5,149,254,164,12,130,255,155,196,29,0,161,96,136,0,7,35,29,1,162,37,251,0,3,46,242,255,0,217,188,0,57,174,226,1,206,233,2,0,57,187,136,254,123,189,9,255,201,117,127,255,186,36,204,0,231,25,216,0,80,78,105,0,19,134,129,255,148,203,68,0,141,81,125,254,248,165,200,255,214,144,135,0,151,55,166,255,38,235,91,0,21,46,154,0,223,254,150,255,35,153,180,255,125,176,29,1,43,98,30,255,216,122,230,255,233,160,12,0,57,185,12,254,240,113,7,255,5,9,16,254,26,91,108,0,109,198,203,0,8,147,40,0,129,134,228,255,124,186,40,255,114,98,132,254,166,132,23,0,99,69,44,0,9,242,238,255,184,53,59,0,132,129,102,255,52,32,243,254,147,223,200,255,123,83,179,254,135,144,201,255,141,37,56,1,151,60,227,255,90,73,156,1,203,172,187,0,80,151,47,255,94,137,231,255,36,191,59,255,225,209,181,255,74,215,213,254,6,118,179,255,153,54,193,1,50,0,231,0,104,157,72,1,140,227,154,255,182,226,16,254,96,225,92,255,115,20,170,254,6,250,78,0,248,75,173,255,53,89,6,255,0,180,118,0,72,173,1,0,64,8,206,1,174,133,223,0,185,62,133,255,214,11,98,0,197,31,208,0,171,167,244,255,22,231,181,1,150,218,185,0,247,169,97,1,165,139,247,255,47,120,149,1,103,248,51,0,60,69,28,254,25,179,196,0,124,7,218,254,58,107,81,0,184,233,156,255,252,74,36,0,118,188,67,0,141,95,53,255,222,94,165,254,46,61,53,0,206,59,115,255,47,236,250,255,74,5,32,1,129,154,238,255,106,32,226,0,121,187,61,255,3,166,241,254,67,170,172,255,29,216,178,255,23,201,252,0,253,110,243,0,200,125,57,0,109,192,96,255,52,115,238,0,38,121,243,255,201,56,33,0,194,118,130,0,75,96,25,255,170,30,230,254,39,63,253,0,36,45,250,255,251,1,239,0,160,212,92,1,45,209,237,0,243,33,87,254,237,84,201,255,212,18,157,254,212,99,127,255,217,98,16,254,139,172,239,0,168,201,130,255,143,193,169,255,238,151,193,1,215,104,41,0,239,61,165,254,2,3,242,0,22,203,177,254,177,204,22,0,149,129,213,254,31,11,41,255,0,159,121,254,160,25,114,255,162,80,200,0,157,151,11,0,154,134,78,1,216,54,252,0,48,103,133,0,105,220,197,0,253,168,77,254,53,179,23,0,24,121,240,1,255,46,96,255,107,60,135,254,98,205,249,255,63,249,119,255,120,59,211,255,114,180,55,254,91,85,237,0,149,212,77,1,56,73,49,0,86,198,150,0,93,209,160,0,69,205,182,255,244,90,43,0,20,36,176,0,122,116,221,0,51,167,39,1,231,1,63,255,13,197,134,0,3,209,34,255,135,59,202,0,167,100,78,0,47,223,76,0,185,60,62,0,178,166,123,1,132,12,161,255,61,174,43,0,195,69,144,0,127,47,191,1,34,44,78,0,57,234,52,1,255,22,40,255,246,94,146,0,83,228,128,0,60,78,224,255,0,96,210,255,153,175,236,0,159,21,73,0,180,115,196,254,131,225,106,0,255,167,134,0,159,8,112,255,120,68,194,255,176,196,198,255,118,48,168,255,93,169,1,0,112,200,102,1,74,24,254,0,19,141,4,254,142,62,63,0,131,179,187,255,77,156,155,255,119,86,164,0,170,208,146,255,208,133,154,255,148,155,58,255,162,120,232,254,252,213,155,0,241,13,42,0,94,50,131,0,179,170,112,0,140,83,151,255,55,119,84,1,140,35,239,255,153,45,67,1,236,175,39,0,54,151,103,255,158,42,65,255,196,239,135,254,86,53,203,0,149,97,47,254,216,35,17,255,70,3,70,1,103,36,90,255,40,26,173,0,184,48,13,0,163,219,217,255,81,6,1,255,221,170,108,254,233,208,93,0,100,201,249,254,86,36,35,255,209,154,30,1,227,201,251,255,2,189,167,254,100,57,3,0,13,128,41,0,197,100,75,0,150,204,235,255,145,174,59,0,120,248,149,255,85,55,225,0,114,210,53,254,199,204,119,0,14,247,74,1,63,251,129,0,67,104,151,1,135,130,80,0,79,89,55,255,117,230,157,255,25,96,143,0,213,145,5,0,69,241,120,1,149,243,95,255,114,42,20,0,131,72,2,0,154,53,20,255,73,62,109,0,196,102,152,0,41,12,204,255,122,38,11,1,250,10,145,0,207,125,148,0,246,244,222,255,41,32,85,1,112,213,126,0,162,249,86,1,71,198,127,255,81,9,21,1,98,39,4,255,204,71,45,1,75,111,137,0,234,59,231,0,32,48,95,255,204,31,114,1,29,196,181,255,51,241,167,254,93,109,142,0,104,144,45,0,235,12,181,255,52,112,164,0,76,254,202,255,174,14,162,0,61,235,147,255,43,64,185,254,233,125,217,0,243,88,167,254,74,49,8,0,156,204,66,0,124,214,123,0,38,221,118,1,146,112,236,0,114,98,177,0,151,89,199,0,87,197,112,0,185,149,161,0,44,96,165,0,248,179,20,255,188,219,216,254,40,62,13,0,243,142,141,0,229,227,206,255,172,202,35,255,117,176,225,255,82,110,38,1,42,245,14,255,20,83,97,0,49,171,10,0,242,119,120,0,25,232,61,0,212,240,147,255,4,115,56,255,145,17,239,254,202,17,251,255,249,18,245,255,99,117,239,0,184,4,179,255,246,237,51,255,37,239,137,255,166,112,166,255,81,188,33,255,185,250,142,255,54,187,173,0,208,112,201,0,246,43,228,1,104,184,88,255,212,52,196,255,51,117,108,255,254,117,155,0,46,91,15,255,87,14,144,255,87,227,204,0,83,26,83,1,159,76,227,0,159,27,213,1,24,151,108,0,117,144,179,254,137,209,82,0,38,159,10,0,115,133,201,0,223,182,156,1,110,196,93,255,57,60,233,0,5,167,105,255,154,197,164,0,96,34,186,255,147,133,37,1,220,99,190,0,1,167,84,255,20,145,171,0,194,197,251,254,95,78,133,255,252,248,243,255,225,93,131,255,187,134,196,255,216,153,170,0,20,118,158,254,140,1,118,0,86,158,15,1,45,211,41,255,147,1,100,254,113,116,76,255,211,127,108,1,103,15,48,0,193,16,102,1,69,51,95,255,107,128,157,0,137,171,233,0,90,124,144,1,106,161,182,0,175,76,236,1,200,141,172,255,163,58,104,0,233,180,52,255,240,253,14,255,162,113,254,255,38,239,138,254,52,46,166,0,241,101,33,254,131,186,156,0,111,208,62,255,124,94,160,255,31,172,254,0,112,174,56,255,188,99,27,255,67,138,251,0,125,58,128,1,156,152,174,255,178,12,247,255,252,84,158,0,82,197,14,254,172,200,83,255,37,39,46,1,106,207,167,0,24,189,34,0,131,178,144,0,206,213,4,0,161,226,210,0,72,51,105,255,97,45,187,255,78,184,223,255,176,29,251,0,79,160,86,255,116,37,178,0,82,77,213,1,82,84,141,255,226,101,212,1,175,88,199,255,245,94,247,1,172,118,109,255,166,185,190,0,131,181,120,0,87,254,93,255,134,240,73,255,32,245,143,255,139,162,103,255,179,98,18,254,217,204,112,0,147,223,120,255,53,10,243,0,166,140,150,0,125,80,200,255,14,109,219,255,91,218,1,255,252,252,47,254,109,156,116,255,115,49,127,1,204,87,211,255,148,202,217,255,26,85,249,255,14,245,134,1,76,89,169,255,242,45,230,0,59,98,172,255,114,73,132,254,78,155,49,255,158,126,84,0,49,175,43,255,16,182,84,255,157,103,35,0,104,193,109,255,67,221,154,0,201,172,1,254,8,162,88,0,165,1,29,255,125,155,229,255,30,154,220,1,103,239,92,0,220,1,109,255,202,198,1,0,94,2,142,1,36,54,44,0,235,226,158,255,170,251,214,255,185,77,9,0,97,74,242,0,219,163,149,255,240,35,118,255,223,114,88,254,192,199,3,0,106,37,24,255,201,161,118,255,97,89,99,1,224,58,103,255,101,199,147,254,222,60,99,0,234,25,59,1,52,135,27,0,102,3,91,254,168,216,235,0,229,232,136,0,104,60,129,0,46,168,238,0,39,191,67,0,75,163,47,0,143,97,98,255,56,216,168,1,168,233,252,255,35,111,22,255,92,84,43,0,26,200,87,1,91,253,152,0,202,56,70,0,142,8,77,0,80,10,175,1,252,199,76,0,22,110,82,255,129,1,194,0,11,128,61,1,87,14,145,255,253,222,190,1,15,72,174,0,85,163,86,254,58,99,44,255,45,24,188,254,26,205,15,0,19,229,210,254,248,67,195,0,99,71,184,0,154,199,37,255,151,243,121,255,38,51,75,255,201,85,130,254,44,65,250,0,57,147,243,254,146,43,59,255,89,28,53,0,33,84,24,255,179,51,18,254,189,70,83,0,11,156,179,1,98,134,119,0,158,111,111,0,119,154,73,255,200,63,140,254,45,13,13,255,154,192,2,254,81,72,42,0,46,160,185,254,44,112,6,0,146,215,149,1,26,176,104,0,68,28,87,1,236,50,153,255,179,128,250,254,206,193,191,255,166,92,137,254,53,40,239,0,210,1,204,254,168,173,35,0,141,243,45,1,36,50,109,255,15,242,194,255,227,159,122,255,176,175,202,254,70,57,72,0,40,223,56,0,208,162,58,255,183,98,93,0,15,111,12,0,30,8,76,255,132,127,246,255,45,242,103,0,69,181,15,255,10,209,30,0,3,179,121,0,241,232,218,1,123,199,88,255,2,210,202,1,188,130,81,255,94,101,208,1,103,36,45], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); +/* memory initializer */ allocate([76,193,24,1,95,26,241,255,165,162,187,0,36,114,140,0,202,66,5,255,37,56,147,0,152,11,243,1,127,85,232,255,250,135,212,1,185,177,113,0,90,220,75,255,69,248,146,0,50,111,50,0,92,22,80,0,244,36,115,254,163,100,82,255,25,193,6,1,127,61,36,0,253,67,30,254,65,236,170,255,161,17,215,254,63,175,140,0,55,127,4,0,79,112,233,0,109,160,40,0,143,83,7,255,65,26,238,255,217,169,140,255,78,94,189,255,0,147,190,255,147,71,186,254,106,77,127,255,233,157,233,1,135,87,237,255,208,13,236,1,155,109,36,255,180,100,218,0,180,163,18,0,190,110,9,1,17,63,123,255,179,136,180,255,165,123,123,255,144,188,81,254,71,240,108,255,25,112,11,255,227,218,51,255,167,50,234,255,114,79,108,255,31,19,115,255,183,240,99,0,227,87,143,255,72,217,248,255,102,169,95,1,129,149,149,0,238,133,12,1,227,204,35,0,208,115,26,1,102,8,234,0,112,88,143,1,144,249,14,0,240,158,172,254,100,112,119,0,194,141,153,254,40,56,83,255,121,176,46,0,42,53,76,255,158,191,154,0,91,209,92,0,173,13,16,1,5,72,226,255,204,254,149,0,80,184,207,0,100,9,122,254,118,101,171,255,252,203,0,254,160,207,54,0,56,72,249,1,56,140,13,255,10,64,107,254,91,101,52,255,225,181,248,1,139,255,132,0,230,145,17,0,233,56,23,0,119,1,241,255,213,169,151,255,99,99,9,254,185,15,191,255,173,103,109,1,174,13,251,255,178,88,7,254,27,59,68,255,10,33,2,255,248,97,59,0,26,30,146,1,176,147,10,0,95,121,207,1,188,88,24,0,185,94,254,254,115,55,201,0,24,50,70,0,120,53,6,0,142,66,146,0,228,226,249,255,104,192,222,1,173,68,219,0,162,184,36,255,143,102,137,255,157,11,23,0,125,45,98,0,235,93,225,254,56,112,160,255,70,116,243,1,153,249,55,255,129,39,17,1,241,80,244,0,87,69,21,1,94,228,73,255,78,66,65,255,194,227,231,0,61,146,87,255,173,155,23,255,112,116,219,254,216,38,11,255,131,186,133,0,94,212,187,0,100,47,91,0,204,254,175,255,222,18,215,254,173,68,108,255,227,228,79,255,38,221,213,0,163,227,150,254,31,190,18,0,160,179,11,1,10,90,94,255,220,174,88,0,163,211,229,255,199,136,52,0,130,95,221,255,140,188,231,254,139,113,128,255,117,171,236,254,49,220,20,255,59,20,171,255,228,109,188,0,20,225,32,254,195,16,174,0,227,254,136,1,135,39,105,0,150,77,206,255,210,238,226,0,55,212,132,254,239,57,124,0,170,194,93,255,249,16,247,255,24,151,62,255,10,151,10,0,79,139,178,255,120,242,202,0,26,219,213,0,62,125,35,255,144,2,108,255,230,33,83,255,81,45,216,1,224,62,17,0,214,217,125,0,98,153,153,255,179,176,106,254,131,93,138,255,109,62,36,255,178,121,32,255,120,252,70,0,220,248,37,0,204,88,103,1,128,220,251,255,236,227,7,1,106,49,198,255,60,56,107,0,99,114,238,0,220,204,94,1,73,187,1,0,89,154,34,0,78,217,165,255,14,195,249,255,9,230,253,255,205,135,245,0,26,252,7,255,84,205,27,1,134,2,112,0,37,158,32,0,231,91,237,255,191,170,204,255,152,7,222,0,109,192,49,0,193,166,146,255,232,19,181,255,105,142,52,255,103,16,27,1,253,200,165,0,195,217,4,255,52,189,144,255,123,155,160,254,87,130,54,255,78,120,61,255,14,56,41,0,25,41,125,255,87,168,245,0,214,165,70,0,212,169,6,255,219,211,194,254,72,93,164,255,197,33,103,255,43,142,141,0,131,225,172,0,244,105,28,0,68,68,225,0,136,84,13,255,130,57,40,254,139,77,56,0,84,150,53,0,54,95,157,0,144,13,177,254,95,115,186,0,117,23,118,255,244,166,241,255,11,186,135,0,178,106,203,255,97,218,93,0,43,253,45,0,164,152,4,0,139,118,239,0,96,1,24,254,235,153,211,255,168,110,20,255,50,239,176,0,114,41,232,0,193,250,53,0,254,160,111,254,136,122,41,255,97,108,67,0,215,152,23,255,140,209,212,0,42,189,163,0,202,42,50,255,106,106,189,255,190,68,217,255,233,58,117,0,229,220,243,1,197,3,4,0,37,120,54,254,4,156,134,255,36,61,171,254,165,136,100,255,212,232,14,0,90,174,10,0,216,198,65,255,12,3,64,0,116,113,115,255,248,103,8,0,231,125,18,255,160,28,197,0,30,184,35,1,223,73,249,255,123,20,46,254,135,56,37,255,173,13,229,1,119,161,34,255,245,61,73,0,205,125,112,0,137,104,134,0,217,246,30,255,237,142,143,0,65,159,102,255,108,164,190,0,219,117,173,255,34,37,120,254,200,69,80,0,31,124,218,254,74,27,160,255,186,154,199,255,71,199,252,0,104,81,159,1,17,200,39,0,211,61,192,1,26,238,91,0,148,217,12,0,59,91,213,255,11,81,183,255,129,230,122,255,114,203,145,1,119,180,66,255,72,138,180,0,224,149,106,0,119,82,104,255,208,140,43,0,98,9,182,255,205,101,134,255,18,101,38,0,95,197,166,255,203,241,147,0,62,208,145,255,133,246,251,0,2,169,14,0,13,247,184,0,142,7,254,0,36,200,23,255,88,205,223,0,91,129,52,255,21,186,30,0,143,228,210,1,247,234,248,255,230,69,31,254,176,186,135,255,238,205,52,1,139,79,43,0,17,176,217,254,32,243,67,0,242,111,233,0,44,35,9,255,227,114,81,1,4,71,12,255,38,105,191,0,7,117,50,255,81,79,16,0,63,68,65,255,157,36,110,255,77,241,3,255,226,45,251,1,142,25,206,0,120,123,209,1,28,254,238,255,5,128,126,255,91,222,215,255,162,15,191,0,86,240,73,0,135,185,81,254,44,241,163,0,212,219,210,255,112,162,155,0,207,101,118,0,168,72,56,255,196,5,52,0,72,172,242,255,126,22,157,255,146,96,59,255,162,121,152,254,140,16,95,0,195,254,200,254,82,150,162,0,119,43,145,254,204,172,78,255,166,224,159,0,104,19,237,255,245,126,208,255,226,59,213,0,117,217,197,0,152,72,237,0,220,31,23,254,14,90,231,255,188,212,64,1,60,101,246,255,85,24,86,0,1,177,109,0,146,83,32,1,75,182,192,0,119,241,224,0,185,237,27,255,184,101,82,1,235,37,77,255,253,134,19,0,232,246,122,0,60,106,179,0,195,11,12,0,109,66,235,1,125,113,59,0,61,40,164,0,175,104,240,0,2,47,187,255,50,12,141,0,194,139,181,255,135,250,104,0,97,92,222,255,217,149,201,255,203,241,118,255,79,151,67,0,122,142,218,255,149,245,239,0,138,42,200,254,80,37,97,255,124,112,167,255,36,138,87,255,130,29,147,255,241,87,78,255,204,97,19,1,177,209,22,255,247,227,127,254,99,119,83,255,212,25,198,1,16,179,179,0,145,77,172,254,89,153,14,255,218,189,167,0,107,233,59,255,35,33,243,254,44,112,112,255,161,127,79,1,204,175,10,0,40,21,138,254,104,116,228,0,199,95,137,255,133,190,168,255,146,165,234,1,183,99,39,0,183,220,54,254,255,222,133,0,162,219,121,254,63,239,6,0,225,102,54,255,251,18,246,0,4,34,129,1,135,36,131,0,206,50,59,1,15,97,183,0,171,216,135,255,101,152,43,255,150,251,91,0,38,145,95,0,34,204,38,254,178,140,83,255,25,129,243,255,76,144,37,0,106,36,26,254,118,144,172,255,68,186,229,255,107,161,213,255,46,163,68,255,149,170,253,0,187,17,15,0,218,160,165,255,171,35,246,1,96,13,19,0,165,203,117,0,214,107,192,255,244,123,177,1,100,3,104,0,178,242,97,255,251,76,130,255,211,77,42,1,250,79,70,255,63,244,80,1,105,101,246,0,61,136,58,1,238,91,213,0,14,59,98,255,167,84,77,0,17,132,46,254,57,175,197,255,185,62,184,0,76,64,207,0,172,175,208,254,175,74,37,0,138,27,211,254,148,125,194,0,10,89,81,0,168,203,101,255,43,213,209,1,235,245,54,0,30,35,226,255,9,126,70,0,226,125,94,254,156,117,20,255,57,248,112,1,230,48,64,255,164,92,166,1,224,214,230,255,36,120,143,0,55,8,43,255,251,1,245,1,106,98,165,0,74,107,106,254,53,4,54,255,90,178,150,1,3,120,123,255,244,5,89,1,114,250,61,255,254,153,82,1,77,15,17,0,57,238,90,1,95,223,230,0,236,52,47,254,103,148,164,255,121,207,36,1,18,16,185,255,75,20,74,0,187,11,101,0,46,48,129,255,22,239,210,255,77,236,129,255,111,77,204,255,61,72,97,255,199,217,251,255,42,215,204,0,133,145,201,255,57,230,146,1,235,100,198,0,146,73,35,254,108,198,20,255,182,79,210,255,82,103,136,0,246,108,176,0,34,17,60,255,19,74,114,254,168,170,78,255,157,239,20,255,149,41,168,0,58,121,28,0,79,179,134,255,231,121,135,255,174,209,98,255,243,122,190,0,171,166,205,0,212,116,48,0,29,108,66,255,162,222,182,1,14,119,21,0,213,39,249,255,254,223,228,255,183,165,198,0,133,190,48,0,124,208,109,255,119,175,85,255,9,209,121,1,48,171,189,255,195,71,134,1,136,219,51,255,182,91,141,254,49,159,72,0,35,118,245,255,112,186,227,255,59,137,31,0,137,44,163,0,114,103,60,254,8,213,150,0,162,10,113,255,194,104,72,0,220,131,116,255,178,79,92,0,203,250,213,254,93,193,189,255,130,255,34,254,212,188,151,0,136,17,20,255,20,101,83,255,212,206,166,0,229,238,73,255,151,74,3,255,168,87,215,0,155,188,133,255,166,129,73,0,240,79,133,255,178,211,81,255,203,72,163,254,193,168,165,0,14,164,199,254,30,255,204,0,65,72,91,1,166,74,102,255,200,42,0,255,194,113,227,255,66,23,208,0,229,216,100,255,24,239,26,0,10,233,62,255,123,10,178,1,26,36,174,255,119,219,199,1,45,163,190,0,16,168,42,0,166,57,198,255,28,26,26,0,126,165,231,0,251,108,100,255,61,229,121,255,58,118,138,0,76,207,17,0,13,34,112,254,89,16,168,0,37,208,105,255,35,201,215,255,40,106,101,254,6,239,114,0,40,103,226,254,246,127,110,255,63,167,58,0,132,240,142,0,5,158,88,255,129,73,158,255,94,89,146,0,230,54,146,0,8,45,173,0,79,169,1,0,115,186,247,0,84,64,131,0,67,224,253,255,207,189,64,0,154,28,81,1,45,184,54,255,87,212,224,255,0,96,73,255,129,33,235,1,52,66,80,255,251,174,155,255,4,179,37,0,234,164,93,254,93,175,253,0,198,69,87,255,224,106,46,0,99,29,210,0,62,188,114,255,44,234,8,0,169,175,247,255,23,109,137,255,229,182,39,0,192,165,94,254,245,101,217,0,191,88,96,0,196,94,99,255,106,238,11,254,53,126,243,0,94,1,101,255,46,147,2,0,201,124,124,255,141,12,218,0,13,166,157,1,48,251,237,255,155,250,124,255,106,148,146,255,182,13,202,0,28,61,167,0,217,152,8,254,220,130,45,255,200,230,255,1,55,65,87,255,93,191,97,254,114,251,14,0,32,105,92,1,26,207,141,0,24,207,13,254,21,50,48,255,186,148,116,255,211,43,225,0,37,34,162,254,164,210,42,255,68,23,96,255,182,214,8,255,245,117,137,255,66,195,50,0,75,12,83,254,80,140,164,0,9,165,36,1,228,110,227,0,241,17,90,1,25,52,212,0,6,223,12,255,139,243,57,0,12,113,75,1,246,183,191,255,213,191,69,255,230,15,142,0,1,195,196,255,138,171,47,255,64,63,106,1,16,169,214,255,207,174,56,1,88,73,133,255,182,133,140,0,177,14,25,255,147,184,53,255,10,227,161,255,120,216,244,255,73,77,233,0,157,238,139,1,59,65,233,0,70,251,216,1,41,184,153,255,32,203,112,0,146,147,253,0,87,101,109,1,44,82,133,255,244,150,53,255,94,152,232,255,59,93,39,255,88,147,220,255,78,81,13,1,32,47,252,255,160,19,114,255,93,107,39,255,118,16,211,1,185,119,209,255,227,219,127,254,88,105,236,255,162,110,23,255,36,166,110,255,91,236,221,255,66,234,116,0,111,19,244,254,10,233,26,0,32,183,6,254,2,191,242,0,218,156,53,254,41,60,70,255,168,236,111,0,121,185,126,255,238,142,207,255,55,126,52,0,220,129,208,254,80,204,164,255,67,23,144,254,218,40,108,255,127,202,164,0,203,33,3,255,2,158,0,0,37,96,188,255,192,49,74,0,109,4,0,0,111,167,10,254,91,218,135,255,203,66,173,255,150,194,226,0,201,253,6,255,174,102,121,0,205,191,110,0,53,194,4,0,81,40,45,254,35,102,143,255,12,108,198,255,16,27,232,255,252,71,186,1,176,110,114,0,142,3,117,1,113,77,142,0,19,156,197,1,92,47,252,0,53,232,22,1,54,18,235,0,46,35,189,255,236,212,129,0,2,96,208,254,200,238,199,255,59,175,164,255,146,43,231,0,194,217,52,255,3,223,12,0,138,54,178,254,85,235,207,0,232,207,34,0,49,52,50,255,166,113,89,255,10,45,216,255,62,173,28,0,111,165,246,0,118,115,91,255,128,84,60,0,167,144,203,0,87,13,243,0,22,30,228,1,177,113,146,255,129,170,230,254,252,153,129,255,145,225,43,0,70,231,5,255,122,105,126,254,86,246,148,255,110,37,154,254,209,3,91,0,68,145,62,0,228,16,165,255,55,221,249,254,178,210,91,0,83,146,226,254,69,146,186,0,93,210,104,254,16,25,173,0,231,186,38,0,189,122,140,255,251,13,112,255,105,110,93,0,251,72,170,0,192,23,223,255,24,3,202,1,225,93,228,0,153,147,199,254,109,170,22,0,248,101,246,255,178,124,12,255,178,254,102,254,55,4,65,0,125,214,180,0,183,96,147,0,45,117,23,254,132,191,249,0,143,176,203,254,136,183,54,255,146,234,177,0,146,101,86,255,44,123,143,1,33,209,152,0,192,90,41,254,83,15,125,255,213,172,82,0,215,169,144,0,16,13,34,0,32,209,100,255,84,18,249,1,197,17,236,255,217,186,230,0,49,160,176,255,111,118,97,255,237,104,235,0,79,59,92,254,69,249,11,255,35,172,74,1,19,118,68,0,222,124,165,255,180,66,35,255,86,174,246,0,43,74,111,255,126,144,86,255,228,234,91,0,242,213,24,254,69,44,235,255,220,180,35,0,8,248,7,255,102,47,92,255,240,205,102,255,113,230,171,1,31,185,201,255,194,246,70,255,122,17,187,0,134,70,199,255,149,3,150,255,117,63,103,0,65,104,123,255,212,54,19,1,6,141,88,0,83,134,243,255,136,53,103,0,169,27,180,0,177,49,24,0,111,54,167,0,195,61,215,255,31,1,108,1,60,42,70,0,185,3,162,255,194,149,40,255,246,127,38,254,190,119,38,255,61,119,8,1,96,161,219,255,42,203,221,1,177,242,164,255,245,159,10,0,116,196,0,0,5,93,205,254,128,127,179,0,125,237,246,255,149,162,217,255,87,37,20,254,140,238,192,0,9,9,193,0,97,1,226,0,29,38,10,0,0,136,63,255,229,72,210,254,38,134,92,255,78,218,208,1,104,36,84,255,12,5,193,255,242,175,61,255,191,169,46,1,179,147,147,255,113,190,139,254,125,172,31,0,3,75,252,254,215,36,15,0,193,27,24,1,255,69,149,255,110,129,118,0,203,93,249,0,138,137,64,254,38,70,6,0,153,116,222,0,161,74,123,0,193,99,79,255,118,59,94,255,61,12,43,1,146,177,157,0,46,147,191,0,16,255,38,0,11,51,31,1,60,58,98,255,111,194,77,1,154,91,244,0,140,40,144,1,173,10,251,0,203,209,50,254,108,130,78,0,228,180,90,0,174,7,250,0,31,174,60,0,41,171,30,0,116,99,82,255,118,193,139,255,187,173,198,254,218,111,56,0,185,123,216,0,249,158,52,0,52,180,93,255,201,9,91,255,56,45,166,254,132,155,203,255,58,232,110,0,52,211,89,255,253,0,162,1,9,87,183,0,145,136,44,1,94,122,245,0,85,188,171,1,147,92,198,0,0,8,104,0,30,95,174,0,221,230,52,1,247,247,235,255,137,174,53,255,35,21,204,255,71,227,214,1,232,82,194,0,11,48,227,255,170,73,184,255,198,251,252,254,44,112,34,0,131,101,131,255,72,168,187,0,132,135,125,255,138,104,97,255,238,184,168,255,243,104,84,255,135,216,226,255,139,144,237,0,188,137,150,1,80,56,140,255,86,169,167,255,194,78,25,255,220,17,180,255,17,13,193,0,117,137,212,255,141,224,151,0,49,244,175,0,193,99,175,255,19,99,154,1,255,65,62,255,156,210,55,255,242,244,3,255,250,14,149,0,158,88,217,255,157,207,134,254,251,232,28,0,46,156,251,255,171,56,184,255,239,51,234,0,142,138,131,255,25,254,243,1,10,201,194,0,63,97,75,0,210,239,162,0,192,200,31,1,117,214,243,0,24,71,222,254,54,40,232,255,76,183,111,254,144,14,87,255,214,79,136,255,216,196,212,0,132,27,140,254,131,5,253,0,124,108,19,255,28,215,75,0,76,222,55,254,233,182,63,0,68,171,191,254,52,111,222,255,10,105,77,255,80,170,235,0,143,24,88,255,45,231,121,0,148,129,224,1,61,246,84,0,253,46,219,255,239,76,33,0,49,148,18,254,230,37,69,0,67,134,22,254,142,155,94,0,31,157,211,254,213,42,30,255,4,228,247,254,252,176,13,255,39,0,31,254,241,244,255,255,170,45,10,254,253,222,249,0,222,114,132,0,255,47,6,255,180,163,179,1,84,94,151,255,89,209,82,254,229,52,169,255,213,236,0,1,214,56,228,255,135,119,151,255,112,201,193,0,83,160,53,254,6,151,66,0,18,162,17,0,233,97,91,0,131,5,78,1,181,120,53,255,117,95,63,255,237,117,185,0,191,126,136,255,144,119,233,0,183,57,97,1,47,201,187,255,167,165,119,1,45,100,126,0,21,98,6,254,145,150,95,255,120,54,152,0,209,98,104,0,143,111,30,254,184,148,249,0,235,216,46,0,248,202,148,255,57,95,22,0,242,225,163,0,233,247,232,255,71,171,19,255,103,244,49,255,84,103,93,255,68,121,244,1,82,224,13,0,41,79,43,255,249,206,167,255,215,52,21,254,192,32,22,255,247,111,60,0,101,74,38,255,22,91,84,254,29,28,13,255,198,231,215,254,244,154,200,0,223,137,237,0,211,132,14,0,95,64,206,255,17,62,247,255,233,131,121,1,93,23,77,0,205,204,52,254,81,189,136,0,180,219,138,1,143,18,94,0,204,43,140,254,188,175,219,0,111,98,143,255,151,63,162,255,211,50,71,254,19,146,53,0,146,45,83,254,178,82,238,255,16,133,84,255,226,198,93,255,201,97,20,255,120,118,35,255,114,50,231,255,162,229,156,255,211,26,12,0,114,39,115,255,206,212,134,0,197,217,160,255,116,129,94,254,199,215,219,255,75,223,249,1,253,116,181,255,232,215,104,255,228,130,246,255,185,117,86,0,14,5,8,0,239,29,61,1,237,87,133,255,125,146,137,254,204,168,223,0,46,168,245,0,154,105,22,0,220,212,161,255,107,69,24,255,137,218,181,255,241,84,198,255,130,122,211,255,141,8,153,255,190,177,118,0,96,89,178,0,255,16,48,254,122,96,105,255,117,54,232,255,34,126,105,255,204,67,166,0,232,52,138,255,211,147,12,0,25,54,7,0,44,15,215,254,51,236,45,0,190,68,129,1,106,147,225,0,28,93,45,254,236,141,15,255,17,61,161,0,220,115,192,0,236,145,24,254,111,168,169,0,224,58,63,255,127,164,188,0,82,234,75,1,224,158,134,0,209,68,110,1,217,166,217,0,70,225,166,1,187,193,143,255,16,7,88,255,10,205,140,0,117,192,156,1,17,56,38,0,27,124,108,1,171,215,55,255,95,253,212,0,155,135,168,255,246,178,153,254,154,68,74,0,232,61,96,254,105,132,59,0,33,76,199,1,189,176,130,255,9,104,25,254,75,198,102,255,233,1,112,0,108,220,20,255,114,230,70,0,140,194,133,255,57,158,164,254,146,6,80,255,169,196,97,1,85,183,130,0,70,158,222,1,59,237,234,255,96,25,26,255,232,175,97,255,11,121,248,254,88,35,194,0,219,180,252,254,74,8,227,0,195,227,73,1,184,110,161,255,49,233,164,1,128,53,47,0,82,14,121,255,193,190,58,0,48,174,117,255,132,23,32,0,40,10,134,1,22,51,25,255,240,11,176,255,110,57,146,0,117,143,239,1,157,101,118,255,54,84,76,0,205,184,18,255,47,4,72,255,78,112,85,255,193,50,66,1,93,16,52,255,8,105,134,0,12,109,72,255,58,156,251,0,144,35,204,0,44,160,117,254,50,107,194,0,1,68,165,255,111,110,162,0,158,83,40,254,76,214,234,0,58,216,205,255,171,96,147,255,40,227,114,1,176,227,241,0,70,249,183,1,136,84,139,255,60,122,247,254,143,9,117,255,177,174,137,254,73,247,143,0,236,185,126,255,62,25,247,255,45,64,56,255,161,244,6,0,34,57,56,1,105,202,83,0,128,147,208,0,6,103,10,255,74,138,65,255,97,80,100,255,214,174,33,255,50,134,74,255,110,151,130,254,111,84,172,0,84,199,75,254,248,59,112,255,8,216,178,1,9,183,95,0,238,27,8,254,170,205,220,0,195,229,135,0,98,76,237,255,226,91,26,1,82,219,39,255,225,190,199,1,217,200,121,255,81,179,8,255,140,65,206,0,178,207,87,254,250,252,46,255,104,89,110,1,253,189,158,255,144,214,158,255,160,245,54,255,53,183,92,1,21,200,194,255,146,33,113,1,209,1,255,0,235,106,43,255,167,52,232,0,157,229,221,0,51,30,25,0,250,221,27,1,65,147,87,255,79,123,196,0,65,196,223,255,76,44,17,1,85,241,68,0,202,183,249,255,65,212,212,255,9,33,154,1,71,59,80,0,175,194,59,255,141,72,9,0,100,160,244,0,230,208,56,0,59,25,75,254,80,194,194,0,18,3,200,254,160,159,115,0,132,143,247,1,111,93,57,255,58,237,11,1,134,222,135,255,122,163,108,1,123,43,190,255,251,189,206,254,80,182,72,255,208,246,224,1,17,60,9,0,161,207,38,0,141,109,91,0,216,15,211,255,136,78,110,0,98,163,104,255,21,80,121,255,173,178,183,1,127,143,4,0,104,60,82,254,214,16,13,255,96,238,33,1,158,148,230,255,127,129,62,255,51,255,210,255,62,141,236,254,157,55,224,255,114,39,244,0,192,188,250,255,228,76,53,0,98,84,81,255,173,203,61,254,147,50,55,255,204,235,191,0,52,197,244,0,88,43,211,254,27,191,119,0,188,231,154,0,66,81,161,0,92,193,160,1,250,227,120,0,123,55,226,0,184,17,72,0,133,168,10,254,22,135,156,255,41,25,103,255,48,202,58,0,186,149,81,255,188,134,239,0,235,181,189,254,217,139,188,255,74,48,82,0,46,218,229,0,189,253,251,0,50,229,12,255,211,141,191,1,128,244,25,255,169,231,122,254,86,47,189,255,132,183,23,255,37,178,150,255,51,137,253,0,200,78,31,0,22,105,50,0,130,60,0,0,132,163,91,254,23,231,187,0,192,79,239,0,157,102,164,255,192,82,20,1,24,181,103,255,240,9,234,0,1,123,164,255,133,233,0,255,202,242,242,0,60,186,245,0,241,16,199,255,224,116,158,254,191,125,91,255,224,86,207,0,121,37,231,255,227,9,198,255,15,153,239,255,121,232,217,254,75,112,82,0,95,12,57,254,51,214,105,255,148,220,97,1,199,98,36,0,156,209,12,254,10,212,52,0,217,180,55,254,212,170,232,255,216,20,84,255,157,250,135,0,157,99,127,254,1,206,41,0,149,36,70,1,54,196,201,255,87,116,0,254,235,171,150,0,27,163,234,0,202,135,180,0,208,95,0,254,123,156,93,0,183,62,75,0,137,235,182,0,204,225,255,255,214,139,210,255,2,115,8,255,29,12,111,0,52,156,1,0,253,21,251,255,37,165,31,254,12,130,211,0,106,18,53,254,42,99,154,0,14,217,61,254,216,11,92,255,200,197,112,254,147,38,199,0,36,252,120,254,107,169,77,0,1,123,159,255,207,75,102,0,163,175,196,0,44,1,240,0,120,186,176,254,13,98,76,255,237,124,241,255,232,146,188,255,200,96,224,0,204,31,41,0,208,200,13,0,21,225,96,255,175,156,196,0,247,208,126,0,62,184,244,254,2,171,81,0,85,115,158,0,54,64,45,255,19,138,114,0,135,71,205,0,227,47,147,1,218,231,66,0,253,209,28,0,244,15,173,255,6,15,118,254,16,150,208,255,185,22,50,255,86,112,207,255,75,113,215,1,63,146,43,255,4,225,19,254,227,23,62,255,14,255,214,254,45,8,205,255,87,197,151,254,210,82,215,255,245,248,247,255,128,248,70,0,225,247,87,0,90,120,70,0,213,245,92,0,13,133,226,0,47,181,5,1,92,163,105,255,6,30,133,254,232,178,61,255,230,149,24,255,18,49,158,0,228,100,61,254,116,243,251,255,77,75,92,1,81,219,147,255,76,163,254,254,141,213,246,0,232,37,152,254,97,44,100,0,201,37,50,1,212,244,57,0,174,171,183,255,249,74,112,0,166,156,30,0,222,221,97,255,243,93,73,254,251,101,100,255,216,217,93,255,254,138,187,255,142,190,52,255,59,203,177,255,200,94,52,0,115,114,158,255,165,152,104,1,126,99,226,255,118,157,244,1,107,200,16,0,193,90,229,0,121,6,88,0,156,32,93,254,125,241,211,255,14,237,157,255,165,154,21,255,184,224,22,255,250,24,152,255,113,77,31,0,247,171,23,255,237,177,204,255,52,137,145,255,194,182,114,0,224,234,149,0,10,111,103,1,201,129,4,0,238,142,78,0,52,6,40,255,110,213,165,254,60,207,253,0,62,215,69,0,96,97,0,255,49,45,202,0,120,121,22,255,235,139,48,1,198,45,34,255,182,50,27,1,131,210,91,255,46,54,128,0,175,123,105,255,198,141,78,254,67,244,239,255,245,54,103,254,78,38,242,255,2,92,249,254,251,174,87,255,139,63,144,0,24,108,27,255,34,102,18,1,34,22,152,0,66,229,118,254,50,143,99,0,144,169,149,1,118,30,152,0,178,8,121,1,8,159,18,0,90,101,230,255,129,29,119,0,68,36,11,1,232,183,55,0,23,255,96,255,161,41,193,255,63,139,222,0,15,179,243,0,255,100,15,255,82,53,135,0,137,57,149,1,99,240,170,255,22,230,228,254,49,180,82,255,61,82,43,0,110,245,217,0,199,125,61,0,46,253,52,0,141,197,219,0,211,159,193,0,55,121,105,254,183,20,129,0,169,119,170,255,203,178,139,255,135,40,182,255,172,13,202,255,65,178,148,0,8,207,43,0,122,53,127,1,74,161,48,0,227,214,128,254,86,11,243,255,100,86,7,1,245,68,134,255,61,43,21,1,152,84,94,255,190,60,250,254,239,118,232,255,214,136,37,1,113,76,107,255,93,104,100,1,144,206,23,255,110,150,154,1,228,103,185,0,218,49,50,254,135,77,139,255,185,1,78,0,0,161,148,255,97,29,233,255,207,148,149,255,160,168,0,0,91,128,171,255,6,28,19,254,11,111,247,0,39,187,150,255,138,232,149,0,117,62,68,255,63,216,188,255,235,234,32,254,29,57,160,255,25,12,241,1,169,60,191,0,32,131,141,255,237,159,123,255,94,197,94,254,116,254,3,255,92,179,97,254,121,97,92,255,170,112,14,0,21,149,248,0,248,227,3,0,80,96,109,0,75,192,74,1,12,90,226,255,161,106,68,1,208,114,127,255,114,42,255,254,74,26,74,255,247,179,150,254,121,140,60,0,147,70,200,255,214,40,161,255,161,188,201,255,141,65,135,255,242,115,252,0,62,47,202,0,180,149,255,254,130,55,237,0,165,17,186,255,10,169,194,0,156,109,218,255,112,140,123,255,104,128,223,254,177,142,108,255,121,37,219,255,128,77,18,255,111,108,23,1,91,192,75,0,174,245,22,255,4,236,62,255,43,64,153,1,227,173,254,0,237,122,132,1,127,89,186,255,142,82,128,254,252,84,174,0,90,179,177,1,243,214,87,255,103,60,162,255,208,130,14,255,11,130,139,0,206,129,219,255,94,217,157,255,239,230,230,255,116,115,159,254,164,107,95,0,51,218,2,1,216,125,198,255,140,202,128,254,11,95,68,255,55,9,93,254,174,153,6,255,204,172,96,0,69,160,110,0,213,38,49,254,27,80,213,0,118,125,114,0,70,70,67,255,15,142,73,255,131,122,185,255,243,20,50,254,130,237,40,0,210,159,140,1,197,151,65,255,84,153,66,0,195,126,90,0,16,238,236,1,118,187,102,255,3,24,133,255,187,69,230,0,56,197,92,1,213,69,94,255,80,138,229,1,206,7,230,0,222,111,230,1,91,233,119,255,9,89,7,1,2,98,1,0,148,74,133,255,51,246,180,255,228,177,112,1,58,189,108,255,194,203,237,254,21,209,195,0,147,10,35,1,86,157,226,0,31,163,139,254,56,7,75,255,62,90,116,0,181,60,169,0,138,162,212,254,81,167,31,0,205,90,112,255,33,112,227,0,83,151,117,1,177,224,73,255,174,144,217,255,230,204,79,255,22,77,232,255,114,78,234,0,224,57,126,254,9,49,141,0,242,147,165,1,104,182,140,255,167,132,12,1,123,68,127,0,225,87,39,1,251,108,8,0,198,193,143,1,121,135,207,255,172,22,70,0,50,68,116,255,101,175,40,255,248,105,233,0,166,203,7,0,110,197,218,0,215,254,26,254,168,226,253,0,31,143,96,0,11,103,41,0,183,129,203,254,100,247,74,255,213,126,132,0,210,147,44,0,199,234,27,1,148,47,181,0,155,91,158,1,54,105,175,255,2,78,145,254,102,154,95,0,128,207,127,254,52,124,236,255,130,84,71,0,221,243,211,0,152,170,207,0,222,106,199,0,183,84,94,254,92,200,56,255,138,182,115,1,142,96,146,0,133,136,228,0,97,18,150,0,55,251,66,0,140,102,4,0,202,103,151,0,30,19,248,255,51,184,207,0,202,198,89,0,55,197,225,254,169,95,249,255,66,65,68,255,188,234,126,0,166,223,100,1,112,239,244,0,144,23,194,0,58,39,182,0,244,44,24,254,175,68,179,255,152,118,154,1,176,162,130,0,217,114,204,254,173,126,78,255,33,222,30,255,36,2,91,255,2,143,243,0,9,235,215,0,3,171,151,1,24,215,245,255,168,47,164,254,241,146,207,0,69,129,180,0,68,243,113,0,144,53,72,254,251,45,14,0,23,110,168,0,68,68,79,255,110,70,95,254,174,91,144,255,33,206,95,255,137,41,7,255,19,187,153,254,35,255,112,255,9,145,185,254,50,157,37,0,11,112,49,1,102,8,190,255,234,243,169,1,60,85,23,0,74,39,189,0,116,49,239,0,173,213,210,0,46,161,108,255,159,150,37,0,196,120,185,255,34,98,6,255,153,195,62,255,97,230,71,255,102,61,76,0,26,212,236,255,164,97,16,0,198,59,146,0,163,23,196,0,56,24,61,0,181,98,193,0,251,147,229,255,98,189,24,255,46,54,206,255,234,82,246,0,183,103,38,1,109,62,204,0,10,240,224,0,146,22,117,255,142,154,120,0,69,212,35,0,208,99,118,1,121,255,3,255,72,6,194,0,117,17,197,255,125,15,23,0,154,79,153,0,214,94,197,255,185,55,147,255,62,254,78,254,127,82,153,0,110,102,63,255,108,82,161,255,105,187,212,1,80,138,39,0,60,255,93,255,72,12,186,0,210,251,31,1,190,167,144,255,228,44,19,254,128,67,232,0,214,249,107,254,136,145,86,255,132,46,176,0,189,187,227,255,208,22,140,0,217,211,116,0,50,81,186,254,139,250,31,0,30,64,198,1,135,155,100,0,160,206,23,254,187,162,211,255,16,188,63,0,254,208,49,0,85,84,191,0,241,192,242,255,153,126,145,1,234,162,162,255,230,97,216,1,64,135,126,0,190,148,223,1,52,0,43,255,28,39,189,1,64,136,238,0,175,196,185,0,98,226,213,255,127,159,244,1,226,175,60,0,160,233,142,1,180,243,207,255,69,152,89,1,31,101,21,0,144,25,164,254,139,191,209,0,91,25,121,0,32,147,5,0,39,186,123,255,63,115,230,255,93,167,198,255,143,213,220,255,179,156,19,255,25,66,122,0,214,160,217,255,2,45,62,255,106,79,146,254,51,137,99,255,87,100,231,255,175,145,232,255,101,184,1,255,174,9,125,0,82,37,161,1,36,114,141,255,48,222,142,255,245,186,154,0,5,174,221,254,63,114,155,255,135,55,160,1,80,31,135,0,126,250,179,1,236,218,45,0,20,28,145,1,16,147,73,0,249,189,132,1,17,189,192,255,223,142,198,255,72,20,15,255,250,53,237,254,15,11,18,0,27,211,113,254,213,107,56,255,174,147,146,255,96,126,48,0,23,193,109,1,37,162,94,0,199,157,249,254,24,128,187,255,205,49,178,254,93,164,42,255,43,119,235,1,88,183,237,255,218,210,1,255,107,254,42,0,230,10,99,255,162,0,226,0,219,237,91,0,129,178,203,0,208,50,95,254,206,208,95,255,247,191,89,254,110,234,79,255,165,61,243,0,20,122,112,255,246,246,185,254,103,4,123,0,233,99,230,1,219,91,252,255,199,222,22,255,179,245,233,255,211,241,234,0,111,250,192,255,85,84,136,0,101,58,50,255,131,173,156,254,119,45,51,255,118,233,16,254,242,90,214,0,94,159,219,1,3,3,234,255,98,76,92,254,80,54,230,0,5,228,231,254,53,24,223,255,113,56,118,1,20,132,1,255,171,210,236,0,56,241,158,255,186,115,19,255,8,229,174,0,48,44,0,1,114,114,166,255,6,73,226,255,205,89,244,0,137,227,75,1,248,173,56,0,74,120,246,254,119,3,11,255,81,120,198,255,136,122,98,255,146,241,221,1,109,194,78,255,223,241,70,1,214,200,169,255,97,190,47,255,47,103,174,255,99,92,72,254,118,233,180,255,193,35,233,254,26,229,32,255,222,252,198,0,204,43,71,255,199,84,172,0,134,102,190,0,111,238,97,254,230,40,230,0,227,205,64,254,200,12,225,0,166,25,222,0,113,69,51,255,143,159,24,0,167,184,74,0,29,224,116,254,158,208,233,0,193,116,126,255,212,11,133,255,22,58,140,1,204,36,51,255,232,30,43,0,235,70,181,255,64,56,146,254,169,18,84,255,226,1,13,255,200,50,176,255,52,213,245,254,168,209,97,0,191,71,55,0,34,78,156,0,232,144,58,1,185,74,189,0,186,142,149,254,64,69,127,255,161,203,147,255,176,151,191,0,136,231,203,254,163,182,137,0,161,126,251,254,233,32,66,0,68,207,66,0,30,28,37,0,93,114,96,1,254,92,247,255,44,171,69,0,202,119,11,255,188,118,50,1,255,83,136,255,71,82,26,0,70,227,2,0,32,235,121,1,181,41,154,0,71,134,229,254,202,255,36,0,41,152,5,0,154,63,73,255,34,182,124,0,121,221,150,255,26,204,213,1,41,172,87,0,90,157,146,255,109,130,20,0,71,107,200,255,243,102,189,0,1,195,145,254,46,88,117,0,8,206,227,0,191,110,253,255,109,128,20,254,134,85,51,255,137,177,112,1,216,34,22,255,131,16,208,255,121,149,170,0,114,19,23,1,166,80,31,255,113,240,122,0,232,179,250,0,68,110,180,254,210,170,119,0,223,108,164,255,207,79,233,255,27,229,226,254,209,98,81,255,79,68,7,0,131,185,100,0,170,29,162,255,17,162,107,255,57,21,11,1,100,200,181,255,127,65,166,1,165,134,204,0,104,167,168,0,1,164,79,0,146,135,59,1,70,50,128,255,102,119,13,254,227,6,135,0,162,142,179,255,160,100,222,0,27,224,219,1,158,93,195,255,234,141,137,0,16,24,125,255,238,206,47,255,97,17,98,255,116,110,12,255,96,115,77,0,91,227,232,255,248,254,79,255,92,229,6,254,88,198,139,0,206,75,129,0,250,77,206,255,141,244,123,1,138,69,220,0,32,151,6,1,131,167,22,255,237,68,167,254,199,189,150,0,163,171,138,255,51,188,6,255,95,29,137,254,148,226,179,0,181,107,208,255,134,31,82,255,151,101,45,255,129,202,225,0,224,72,147,0,48,138,151,255,195,64,206,254,237,218,158,0,106,29,137,254,253,189,233,255,103,15,17,255,194,97,255,0,178,45,169,254,198,225,155,0,39,48,117,255,135,106,115,0,97,38,181,0,150,47,65,255,83,130,229,254,246,38,129,0,92,239,154,254,91,99,127,0,161,111,33,255,238,217,242,255,131,185,195,255,213,191,158,255,41,150,218,0,132,169,131,0,89,84,252,1,171,70,128,255,163,248,203,254,1,50,180,255,124,76,85,1,251,111,80,0,99,66,239,255,154,237,182,255,221,126,133,254,74,204,99,255,65,147,119,255,99,56,167,255,79,248,149,255,116,155,228,255,237,43,14,254,69,137,11,255,22,250,241,1,91,122,143,255,205,249,243,0,212,26,60,255,48,182,176,1,48,23,191,255,203,121,152,254,45,74,213,255,62,90,18,254,245,163,230,255,185,106,116,255,83,35,159,0,12,33,2,255,80,34,62,0,16,87,174,255,173,101,85,0,202,36,81,254,160,69,204,255,64,225,187,0,58,206,94,0,86,144,47,0,229,86,245,0,63,145,190,1,37,5,39,0,109,251,26,0,137,147,234,0,162,121,145,255,144,116,206,255,197,232,185,255,183,190,140,255,73,12,254,255,139,20,242,255,170,90,239,255,97,66,187,255,245,181,135,254,222,136,52,0,245,5,51,254,203,47,78,0,152,101,216,0,73,23,125,0,254,96,33,1,235,210,73,255,43,209,88,1,7,129,109,0,122,104,228,254,170,242,203,0,242,204,135,255,202,28,233,255,65,6,127,0,159,144,71,0,100,140,95,0,78,150,13,0,251,107,118,1,182,58,125,255,1,38,108,255,141,189,209,255,8,155,125,1,113,163,91,255,121,79,190,255,134,239,108,255,76,47,248,0,163,228,239,0,17,111,10,0,88,149,75,255,215,235,239,0,167,159,24,255,47,151,108,255,107,209,188,0,233,231,99,254,28,202,148,255,174,35,138,255,110,24,68,255,2,69,181,0,107,102,82,0,102,237,7,0,92,36,237,255,221,162,83,1,55,202,6,255,135,234,135,255,24,250,222,0,65,94,168,254,245,248,210,255,167,108,201,254,255,161,111,0,205,8,254,0,136,13,116,0,100,176,132,255,43,215,126,255,177,133,130,255,158,79,148,0,67,224,37,1,12,206,21,255,62,34,110,1,237,104,175,255,80,132,111,255,142,174,72,0,84,229,180,254,105,179,140,0,64,248,15,255,233,138,16,0,245,67,123,254,218,121,212,255,63,95,218,1,213,133,137,255,143,182,82,255,48,28,11,0,244,114,141,1,209,175,76,255,157,181,150,255,186,229,3,255,164,157,111,1,231,189,139,0,119,202,190,255,218,106,64,255,68,235,63,254,96,26,172,255,187,47,11,1,215,18,251,255,81,84,89,0,68,58,128,0,94,113,5,1,92,129,208,255,97,15,83,254,9,28,188,0,239,9,164,0,60,205,152,0,192,163,98,255,184,18,60,0,217,182,139,0,109,59,120,255,4,192,251,0,169,210,240,255,37,172,92,254,148,211,245,255,179,65,52,0,253,13,115,0,185,174,206,1,114,188,149,255,237,90,173,0,43,199,192,255,88,108,113,0,52,35,76,0,66,25,148,255,221,4,7,255,151,241,114,255,190,209,232,0,98,50,199,0,151,150,213,255,18,74,36,1,53,40,7,0,19,135,65,255,26,172,69,0,174,237,85,0,99,95,41,0,3,56,16,0,39,160,177,255,200,106,218,254,185,68,84,255,91,186,61,254,67,143,141,255,13,244,166,255,99,114,198,0,199,110,163,255,193,18,186,0,124,239,246,1,110,68,22,0,2,235,46,1,212,60,107,0,105,42,105,1,14,230,152,0,7,5,131,0,141,104,154,255,213,3,6,0,131,228,162,255,179,100,28,1,231,123,85,255,206,14,223,1,253,96,230,0,38,152,149,1,98,137,122,0,214,205,3,255,226,152,179,255,6,133,137,0,158,69,140,255,113,162,154,255,180,243,172,255,27,189,115,255,143,46,220,255,213,134,225,255,126,29,69,0,188,43,137,1,242,70,9,0,90,204,255,255,231,170,147,0,23,56,19,254,56,125,157,255,48,179,218,255,79,182,253,255,38,212,191,1,41,235,124,0,96,151,28,0,135,148,190,0,205,249,39,254,52,96,136,255,212,44,136,255,67,209,131,255,252,130,23,255,219,128,20,255,198,129,118,0,108,101,11,0,178,5,146,1,62,7,100,255,181,236,94,254,28,26,164,0,76,22,112,255,120,102,79,0,202,192,229,1,200,176,215,0,41,64,244,255,206,184,78,0,167,45,63,1,160,35,0,255,59,12,142,255,204,9,144,255,219,94,229,1,122,27,112,0,189,105,109,255,64,208,74,255,251,127,55,1,2,226,198,0,44,76,209,0,151,152,77,255,210,23,46,1,201,171,69,255,44,211,231,0,190,37,224,255,245,196,62,255,169,181,222,255,34,211,17,0,119,241,197,255,229,35,152,1,21,69,40,255,178,226,161,0,148,179,193,0,219,194,254,1,40,206,51,255,231,92,250,1,67,153,170,0,21,148,241,0,170,69,82,255,121,18,231,255,92,114,3,0,184,62,230,0,225,201,87,255,146,96,162,255,181,242,220,0,173,187,221,1,226,62,170,255,56,126,217,1,117,13,227,255,179,44,239,0,157,141,155,255,144,221,83,0,235,209,208,0,42,17,165,1,251,81,133,0,124,245,201,254,97,211,24,255,83,214,166,0,154,36,9,255,248,47,127,0,90,219,140,255,161,217,38,254,212,147,63,255,66,84,148,1,207,3,1,0,230,134,89,1,127,78,122,255,224,155,1,255,82,136,74,0,178,156,208,255,186,25,49,255,222,3,210,1,229,150,190,255,85,162,52,255,41,84,141,255,73,123,84,254,93,17,150,0,119,19,28,1,32,22,215,255,28,23,204,255,142,241,52,255,228,52,125,0,29,76,207,0,215,167,250,254,175,164,230,0,55,207,105,1,109,187,245,255,161,44,220,1,41,101,128,255,167,16,94,0,93,214,107,255,118,72,0,254,80,61,234,255,121,175,125,0,139,169,251,0,97,39,147,254,250,196,49,255,165,179,110,254,223,70,187,255,22,142,125,1,154,179,138,255,118,176,42,1,10,174,153,0,156,92,102,0,168,13,161,255,143,16,32,0,250,197,180,255,203,163,44,1,87,32,36,0,161,153,20,255,123,252,15,0,25,227,80,0,60,88,142,0,17,22,201,1,154,205,77,255,39,63,47,0,8,122,141,0,128,23,182,254,204,39,19,255,4,112,29,255,23,36,140,255,210,234,116,254,53,50,63,255,121,171,104,255,160,219,94,0,87,82,14,254,231,42,5,0,165,139,127,254,86,78,38,0,130,60,66,254,203,30,45,255,46,196,122,1,249,53,162,255,136,143,103,254,215,210,114,0,231,7,160,254,169,152,42,255,111,45,246,0,142,131,135,255,131,71,204,255,36,226,11,0,0,28,242,255,225,138,213,255,247,46,216,254,245,3,183,0,108,252,74,1,206,26,48,255,205,54,246,255,211,198,36,255,121,35,50,0,52,216,202,255,38,139,129,254,242,73,148,0,67,231,141,255,42,47,204,0,78,116,25,1,4,225,191,255,6,147,228,0,58,88,177,0,122,165,229,255,252,83,201,255,224,167,96,1,177,184,158,255,242,105,179,1,248,198,240,0,133,66,203,1,254,36,47,0,45,24,115,255,119,62,254,0,196,225,186,254,123,141,172,0,26,85,41,255,226,111,183,0,213,231,151,0,4,59,7,255,238,138,148,0,66,147,33,255,31,246,141,255,209,141,116,255,104,112,31,0,88,161,172,0,83,215,230,254,47,111,151,0,45,38,52,1,132,45,204,0,138,128,109,254,233,117,134,255,243,190,173,254,241,236,240,0,82,127,236,254,40,223,161,255,110,182,225,255,123,174,239,0,135,242,145,1,51,209,154,0,150,3,115,254,217,164,252,255,55,156,69,1,84,94,255,255,232,73,45,1,20,19,212,255,96,197,59,254,96,251,33,0,38,199,73,1,64,172,247,255,117,116,56,255,228,17,18,0,62,138,103,1,246,229,164,255,244,118,201,254,86,32,159,255,109,34,137,1,85,211,186,0,10,193,193,254,122,194,177,0,122,238,102,255,162,218,171,0,108,217,161,1,158,170,34,0,176,47,155,1,181,228,11,255,8,156,0,0,16,75,93,0,206,98,255,1,58,154,35,0,12,243,184,254,67,117,66,255,230,229,123,0,201,42,110], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+20480); +/* memory initializer */ allocate([134,228,178,254,186,108,118,255,58,19,154,255,82,169,62,255,114,143,115,1,239,196,50,255,173,48,193,255,147,2,84,255,150,134,147,254,95,232,73,0,109,227,52,254,191,137,10,0,40,204,30,254,76,52,97,255,164,235,126,0,254,124,188,0,74,182,21,1,121,29,35,255,241,30,7,254,85,218,214,255,7,84,150,254,81,27,117,255,160,159,152,254,66,24,221,255,227,10,60,1,141,135,102,0,208,189,150,1,117,179,92,0,132,22,136,255,120,199,28,0,21,129,79,254,182,9,65,0,218,163,169,0,246,147,198,255,107,38,144,1,78,175,205,255,214,5,250,254,47,88,29,255,164,47,204,255,43,55,6,255,131,134,207,254,116,100,214,0,96,140,75,1,106,220,144,0,195,32,28,1,172,81,5,255,199,179,52,255,37,84,203,0,170,112,174,0,11,4,91,0,69,244,27,1,117,131,92,0,33,152,175,255,140,153,107,255,251,135,43,254,87,138,4,255,198,234,147,254,121,152,84,255,205,101,155,1,157,9,25,0,72,106,17,254,108,153,0,255,189,229,186,0,193,8,176,255,174,149,209,0,238,130,29,0,233,214,126,1,61,226,102,0,57,163,4,1,198,111,51,255,45,79,78,1,115,210,10,255,218,9,25,255,158,139,198,255,211,82,187,254,80,133,83,0,157,129,230,1,243,133,134,255,40,136,16,0,77,107,79,255,183,85,92,1,177,204,202,0,163,71,147,255,152,69,190,0,172,51,188,1,250,210,172,255,211,242,113,1,89,89,26,255,64,66,111,254,116,152,42,0,161,39,27,255,54,80,254,0,106,209,115,1,103,124,97,0,221,230,98,255,31,231,6,0,178,192,120,254,15,217,203,255,124,158,79,0,112,145,247,0,92,250,48,1,163,181,193,255,37,47,142,254,144,189,165,255,46,146,240,0,6,75,128,0,41,157,200,254,87,121,213,0,1,113,236,0,5,45,250,0,144,12,82,0,31,108,231,0,225,239,119,255,167,7,189,255,187,228,132,255,110,189,34,0,94,44,204,1,162,52,197,0,78,188,241,254,57,20,141,0,244,146,47,1,206,100,51,0,125,107,148,254,27,195,77,0,152,253,90,1,7,143,144,255,51,37,31,0,34,119,38,255,7,197,118,0,153,188,211,0,151,20,116,254,245,65,52,255,180,253,110,1,47,177,209,0,161,99,17,255,118,222,202,0,125,179,252,1,123,54,126,255,145,57,191,0,55,186,121,0,10,243,138,0,205,211,229,255,125,156,241,254,148,156,185,255,227,19,188,255,124,41,32,255,31,34,206,254,17,57,83,0,204,22,37,255,42,96,98,0,119,102,184,1,3,190,28,0,110,82,218,255,200,204,192,255,201,145,118,0,117,204,146,0,132,32,98,1,192,194,121,0,106,161,248,1,237,88,124,0,23,212,26,0,205,171,90,255,248,48,216,1,141,37,230,255,124,203,0,254,158,168,30,255,214,248,21,0,112,187,7,255,75,133,239,255,74,227,243,255,250,147,70,0,214,120,162,0,167,9,179,255,22,158,18,0,218,77,209,1,97,109,81,255,244,33,179,255,57,52,57,255,65,172,210,255,249,71,209,255,142,169,238,0,158,189,153,255,174,254,103,254,98,33,14,0,141,76,230,255,113,139,52,255,15,58,212,0,168,215,201,255,248,204,215,1,223,68,160,255,57,154,183,254,47,231,121,0,106,166,137,0,81,136,138,0,165,43,51,0,231,139,61,0,57,95,59,254,118,98,25,255,151,63,236,1,94,190,250,255,169,185,114,1,5,250,58,255,75,105,97,1,215,223,134,0,113,99,163,1,128,62,112,0,99,106,147,0,163,195,10,0,33,205,182,0,214,14,174,255,129,38,231,255,53,182,223,0,98,42,159,255,247,13,40,0,188,210,177,1,6,21,0,255,255,61,148,254,137,45,129,255,89,26,116,254,126,38,114,0,251,50,242,254,121,134,128,255,204,249,167,254,165,235,215,0,202,177,243,0,133,141,62,0,240,130,190,1,110,175,255,0,0,20,146,1,37,210,121,255,7,39,130,0,142,250,84,255,141,200,207,0,9,95,104,255,11,244,174,0,134,232,126,0,167,1,123,254,16,193,149,255,232,233,239,1,213,70,112,255,252,116,160,254,242,222,220,255,205,85,227,0,7,185,58,0,118,247,63,1,116,77,177,255,62,245,200,254,63,18,37,255,107,53,232,254,50,221,211,0,162,219,7,254,2,94,43,0,182,62,182,254,160,78,200,255,135,140,170,0,235,184,228,0,175,53,138,254,80,58,77,255,152,201,2,1,63,196,34,0,5,30,184,0,171,176,154,0,121,59,206,0,38,99,39,0,172,80,77,254,0,134,151,0,186,33,241,254,94,253,223,255,44,114,252,0,108,126,57,255,201,40,13,255,39,229,27,255,39,239,23,1,151,121,51,255,153,150,248,0,10,234,174,255,118,246,4,254,200,245,38,0,69,161,242,1,16,178,150,0,113,56,130,0,171,31,105,0,26,88,108,255,49,42,106,0,251,169,66,0,69,93,149,0,20,57,254,0,164,25,111,0,90,188,90,255,204,4,197,0,40,213,50,1,212,96,132,255,88,138,180,254,228,146,124,255,184,246,247,0,65,117,86,255,253,102,210,254,254,121,36,0,137,115,3,255,60,24,216,0,134,18,29,0,59,226,97,0,176,142,71,0,7,209,161,0,189,84,51,254,155,250,72,0,213,84,235,255,45,222,224,0,238,148,143,255,170,42,53,255,78,167,117,0,186,0,40,255,125,177,103,255,69,225,66,0,227,7,88,1,75,172,6,0,169,45,227,1,16,36,70,255,50,2,9,255,139,193,22,0,143,183,231,254,218,69,50,0,236,56,161,1,213,131,42,0,138,145,44,254,136,229,40,255,49,63,35,255,61,145,245,255,101,192,2,254,232,167,113,0,152,104,38,1,121,185,218,0,121,139,211,254,119,240,35,0,65,189,217,254,187,179,162,255,160,187,230,0,62,248,14,255,60,78,97,0,255,247,163,255,225,59,91,255,107,71,58,255,241,47,33,1,50,117,236,0,219,177,63,254,244,90,179,0,35,194,215,255,189,67,50,255,23,135,129,0,104,189,37,255,185,57,194,0,35,62,231,255,220,248,108,0,12,231,178,0,143,80,91,1,131,93,101,255,144,39,2,1,255,250,178,0,5,17,236,254,139,32,46,0,204,188,38,254,245,115,52,255,191,113,73,254,191,108,69,255,22,69,245,1,23,203,178,0,170,99,170,0,65,248,111,0,37,108,153,255,64,37,69,0,0,88,62,254,89,148,144,255,191,68,224,1,241,39,53,0,41,203,237,255,145,126,194,255,221,42,253,255,25,99,151,0,97,253,223,1,74,115,49,255,6,175,72,255,59,176,203,0,124,183,249,1,228,228,99,0,129,12,207,254,168,192,195,255,204,176,16,254,152,234,171,0,77,37,85,255,33,120,135,255,142,194,227,1,31,214,58,0,213,187,125,255,232,46,60,255,190,116,42,254,151,178,19,255,51,62,237,254,204,236,193,0,194,232,60,0,172,34,157,255,189,16,184,254,103,3,95,255,141,233,36,254,41,25,11,255,21,195,166,0,118,245,45,0,67,213,149,255,159,12,18,255,187,164,227,1,160,25,5,0,12,78,195,1,43,197,225,0,48,142,41,254,196,155,60,255,223,199,18,1,145,136,156,0,252,117,169,254,145,226,238,0,239,23,107,0,109,181,188,255,230,112,49,254,73,170,237,255,231,183,227,255,80,220,20,0,194,107,127,1,127,205,101,0,46,52,197,1,210,171,36,255,88,3,90,255,56,151,141,0,96,187,255,255,42,78,200,0,254,70,70,1,244,125,168,0,204,68,138,1,124,215,70,0,102,66,200,254,17,52,228,0,117,220,143,254,203,248,123,0,56,18,174,255,186,151,164,255,51,232,208,1,160,228,43,255,249,29,25,1,68,190,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,127,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,188,129,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+30720); + +/* no memory initializer */ var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8); assert(tempDoublePtr % 8 == 0); @@ -1360,6 +1571,8 @@ function copyTempDouble(ptr) { } +// {{PRE_LIBRARY}} + Module["_bitshift64Ashr"] = _bitshift64Ashr; @@ -1373,206 +1586,160 @@ function copyTempDouble(ptr) { Module["_memset"] = _memset; + function _pthread_cleanup_push(routine, arg) { + __ATEXIT__.push(function() { Runtime.dynCall('vi', routine, [arg]) }) + _pthread_cleanup_push.level = __ATEXIT__.length; + } + Module["_bitshift64Lshr"] = _bitshift64Lshr; Module["_bitshift64Shl"] = _bitshift64Shl; + function _pthread_cleanup_pop() { + assert(_pthread_cleanup_push.level == __ATEXIT__.length, 'cannot pop if something else added meanwhile!'); + __ATEXIT__.pop(); + _pthread_cleanup_push.level = __ATEXIT__.length; + } + function _abort() { Module['abort'](); } - - Module["_strlen"] = _strlen; + function ___lock() {} - - function _emscripten_memcpy_big(dest, src, num) { - HEAPU8.set(HEAPU8.subarray(src, src+num), dest); - return dest; - } - Module["_memcpy"] = _memcpy; + function ___unlock() {} - var ___errno_state=0;function ___setErrNo(value) { - // For convenient setting and returning of errno. - HEAP32[((___errno_state)>>2)]=value; - return value; - } - var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(name) { - // long sysconf(int name); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html - switch(name) { - case 30: return PAGE_SIZE; - case 132: - case 133: - case 12: - case 137: - case 138: - case 15: - case 235: - case 16: - case 17: - case 18: - case 19: - case 20: - case 149: - case 13: - case 10: - case 236: - case 153: - case 9: - case 21: - case 22: - case 159: - case 154: - case 14: - case 77: - case 78: - case 139: - case 80: - case 81: - case 79: - case 82: - case 68: - case 67: - case 164: - case 11: - case 29: - case 47: - case 48: - case 95: - case 52: - case 51: - case 46: - return 200809; - case 27: - case 246: - case 127: - case 128: - case 23: - case 24: - case 160: - case 161: - case 181: - case 182: - case 242: - case 183: - case 184: - case 243: - case 244: - case 245: - case 165: - case 178: - case 179: - case 49: - case 50: - case 168: - case 169: - case 175: - case 170: - case 171: - case 172: - case 97: - case 76: - case 32: - case 173: - case 35: - return -1; - case 176: - case 177: - case 7: - case 155: - case 8: - case 157: - case 125: - case 126: - case 92: - case 93: - case 129: - case 130: - case 131: - case 94: - case 91: - return 1; - case 74: - case 60: - case 69: - case 70: - case 4: - return 1024; - case 31: - case 42: - case 72: - return 32; - case 87: - case 26: - case 33: - return 2147483647; - case 34: - case 1: - return 47839; - case 38: - case 36: - return 99; - case 43: - case 37: - return 2048; - case 0: return 2097152; - case 3: return 65536; - case 28: return 32768; - case 44: return 32767; - case 75: return 16384; - case 39: return 1000; - case 89: return 700; - case 71: return 256; - case 40: return 255; - case 2: return 100; - case 180: return 64; - case 25: return 20; - case 5: return 16; - case 6: return 6; - case 73: return 4; - case 84: { - if (typeof navigator === 'object') return navigator['hardwareConcurrency'] || 1; - return 1; - } - } - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } - - function _sbrk(bytes) { - // Implement a Linux-like 'memory area' for our 'process'. - // Changes the size of the memory area by |bytes|; returns the - // address of the previous top ('break') of the memory area - // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP - var self = _sbrk; - if (!self.called) { - DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned - self.called = true; - assert(Runtime.dynamicAlloc); - self.alloc = Runtime.dynamicAlloc; - Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; - } - var ret = DYNAMICTOP; - if (bytes != 0) self.alloc(bytes); - return ret; // Previous break location. - } - - - Module["_memmove"] = _memmove; - - function ___errno_location() { - return ___errno_state; - } - + var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86}; + var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; + return value; + } - var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; + var PATH={splitPath:function (filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + },normalizeArray:function (parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + return parts; + },normalize:function (path) { + var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.substr(-1) === '/'; + // Normalize the path + path = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + return (isAbsolute ? '/' : '') + path; + },dirname:function (path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + },basename:function (path) { + // EMSCRIPTEN return '/'' for '/', not an empty string + if (path === '/') return '/'; + var lastSlash = path.lastIndexOf('/'); + if (lastSlash === -1) return path; + return path.substr(lastSlash+1); + },extname:function (path) { + return PATH.splitPath(path)[3]; + },join:function () { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join('/')); + },join2:function (l, r) { + return PATH.normalize(l + '/' + r); + },resolve:function () { + var resolvedPath = '', + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : FS.cwd(); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + return ''; // an invalid portion invalidates the whole thing + } + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; + },relative:function (from, to) { + from = PATH.resolve(from).substr(1); + to = PATH.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); + }}; var TTY={ttys:[],init:function () { // https://github.com/kripken/emscripten/pull/1555 @@ -1650,13 +1817,28 @@ function copyTempDouble(ptr) { if (!tty.input.length) { var result = null; if (ENVIRONMENT_IS_NODE) { - result = process['stdin']['read'](); - if (!result) { - if (process['stdin']['_readableState'] && process['stdin']['_readableState']['ended']) { - return null; // EOF - } - return undefined; // no data available + // we will read data by chunks of BUFSIZE + var BUFSIZE = 256; + var buf = new Buffer(BUFSIZE); + var bytesRead = 0; + + var fd = process.stdin.fd; + // Linux and Mac cannot use process.stdin.fd (which isn't set up as sync) + var usingDevice = false; + try { + fd = fs.openSync('/dev/stdin', 'r'); + usingDevice = true; + } catch (e) {} + + bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null); + + if (usingDevice) { fs.closeSync(fd); } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString('utf-8'); + } else { + result = null; } + } else if (typeof window != 'undefined' && typeof window.prompt == 'function') { // Browser. @@ -1677,28 +1859,28 @@ function copyTempDouble(ptr) { tty.input = intArrayFromString(result, true); } return tty.input.shift(); - },flush:function (tty) { - if (tty.output && tty.output.length > 0) { - Module['print'](tty.output.join('')); - tty.output = []; - } },put_char:function (tty, val) { if (val === null || val === 10) { - Module['print'](tty.output.join('')); + Module['print'](UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { - tty.output.push(TTY.utf8.processCChar(val)); + if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. + } + },flush:function (tty) { + if (tty.output && tty.output.length > 0) { + Module['print'](UTF8ArrayToString(tty.output, 0)); + tty.output = []; } }},default_tty1_ops:{put_char:function (tty, val) { if (val === null || val === 10) { - Module['printErr'](tty.output.join('')); + Module['printErr'](UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { - tty.output.push(TTY.utf8.processCChar(val)); + if (val != 0) tty.output.push(val); } },flush:function (tty) { if (tty.output && tty.output.length > 0) { - Module['printErr'](tty.output.join('')); + Module['printErr'](UTF8ArrayToString(tty.output, 0)); tty.output = []; } }}}; @@ -1738,7 +1920,8 @@ function copyTempDouble(ptr) { read: MEMFS.stream_ops.read, write: MEMFS.stream_ops.write, allocate: MEMFS.stream_ops.allocate, - mmap: MEMFS.stream_ops.mmap + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync } }, link: { @@ -1796,7 +1979,6 @@ function copyTempDouble(ptr) { if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. return new Uint8Array(node.contents); },expandFileStorage:function (node, newCapacity) { - // If we are asked to expand the size of a file that already exists, revert to using a standard JS array to store the file // instead of a typed array. This makes resizing the array more flexible because we can just .push() elements at the back to // increase the size. @@ -1829,7 +2011,6 @@ function copyTempDouble(ptr) { node.usedBytes = 0; return; } - if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. var oldContents = node.contents; node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. @@ -1937,8 +2118,7 @@ function copyTempDouble(ptr) { assert(size >= 0); if (size > 8 && contents.subarray) { // non-trivial, and typed array buffer.set(contents.subarray(position, position + size), offset); - } else - { + } else { for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; } return size; @@ -1961,13 +2141,15 @@ function copyTempDouble(ptr) { return length; } } + // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. MEMFS.expandFileStorage(node, position+length); if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. - else + else { for (var i = 0; i < length; i++) { node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. } + } node.usedBytes = Math.max(node.usedBytes, position+length); return length; },llseek:function (stream, offset, whence) { @@ -2017,6 +2199,18 @@ function copyTempDouble(ptr) { buffer.set(contents, ptr); } return { ptr: ptr, allocated: allocated }; + },msync:function (stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(ERRNO_CODES.ENODEV); + } + if (mmapFlags & 2) { + // MAP_PRIVATE calls need not to be synced back to underlying fs + return 0; + } + + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + // should we check if bytesWritten and length are the same? + return 0; }}}; var IDBFS={dbs:{},indexedDB:function () { @@ -2066,7 +2260,9 @@ function copyTempDouble(ptr) { fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); } - fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + if (!fileStore.indexNames.contains('timestamp')) { + fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + } }; req.onsuccess = function() { db = req.result; @@ -2075,8 +2271,9 @@ function copyTempDouble(ptr) { IDBFS.dbs[name] = db; callback(null, db); }; - req.onerror = function() { + req.onerror = function(e) { callback(this.error); + e.preventDefault(); }; },getLocalSet:function (mount, callback) { var entries = {}; @@ -2117,7 +2314,10 @@ function copyTempDouble(ptr) { if (err) return callback(err); var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); - transaction.onerror = function() { callback(this.error); }; + transaction.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; var store = transaction.objectStore(IDBFS.DB_STORE_NAME); var index = store.index('timestamp'); @@ -2190,15 +2390,24 @@ function copyTempDouble(ptr) { },loadRemoteEntry:function (store, path, callback) { var req = store.get(path); req.onsuccess = function(event) { callback(null, event.target.result); }; - req.onerror = function() { callback(this.error); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; },storeRemoteEntry:function (store, path, entry, callback) { var req = store.put(entry, path); req.onsuccess = function() { callback(null); }; - req.onerror = function() { callback(this.error); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; },removeRemoteEntry:function (store, path, callback) { var req = store.delete(path); req.onsuccess = function() { callback(null); }; - req.onerror = function() { callback(this.error); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; },reconcile:function (src, dst, callback) { var total = 0; @@ -2245,7 +2454,10 @@ function copyTempDouble(ptr) { } }; - transaction.onerror = function() { done(this.error); }; + transaction.onerror = function(e) { + done(this.error); + e.preventDefault(); + }; // sort paths in ascending order so directory entries are created // before the files inside them @@ -2292,7 +2504,7 @@ function copyTempDouble(ptr) { try { stat = fs.lstatSync(path); if (NODEFS.isWindows) { - // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so + // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so // propagate write bits to execute bits. stat.mode = stat.mode | ((stat.mode & 146) >> 1); } @@ -2311,10 +2523,11 @@ function copyTempDouble(ptr) { parts.reverse(); return PATH.join.apply(null, parts); },flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function (flags) { + flags &= ~0100000 /*O_LARGEFILE*/; // Ignore this flag from musl, otherwise node.js fails to open the file. if (flags in NODEFS.flagsToPermissionStringMap) { return NODEFS.flagsToPermissionStringMap[flags]; } else { - return flags; + throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } },node_ops:{getattr:function (node) { var path = NODEFS.realPath(node); @@ -2430,7 +2643,9 @@ function copyTempDouble(ptr) { },readlink:function (node) { var path = NODEFS.realPath(node); try { - return fs.readlinkSync(path); + path = fs.readlinkSync(path); + path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); + return path; } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(ERRNO_CODES[e.code]); @@ -2502,24 +2717,127 @@ function copyTempDouble(ptr) { return position; }}}; + var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function (mount) { + assert(ENVIRONMENT_IS_WORKER); + if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync(); + var root = WORKERFS.createNode(null, '/', WORKERFS.DIR_MODE, 0); + var createdParents = {}; + function ensureParent(path) { + // return the parent node, creating subdirs as necessary + var parts = path.split('/'); + var parent = root; + for (var i = 0; i < parts.length-1; i++) { + var curr = parts.slice(0, i+1).join('/'); + if (!createdParents[curr]) { + createdParents[curr] = WORKERFS.createNode(parent, curr, WORKERFS.DIR_MODE, 0); + } + parent = createdParents[curr]; + } + return parent; + } + function base(path) { + var parts = path.split('/'); + return parts[parts.length-1]; + } + // We also accept FileList here, by using Array.prototype + Array.prototype.forEach.call(mount.opts["files"] || [], function(file) { + WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate); + }); + (mount.opts["blobs"] || []).forEach(function(obj) { + WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"]); + }); + (mount.opts["packages"] || []).forEach(function(pack) { + pack['metadata'].files.forEach(function(file) { + var name = file.filename.substr(1); // remove initial slash + WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack['blob'].slice(file.start, file.end)); + }); + }); + return root; + },createNode:function (parent, name, mode, dev, contents, mtime) { + var node = FS.createNode(parent, name, mode); + node.mode = mode; + node.node_ops = WORKERFS.node_ops; + node.stream_ops = WORKERFS.stream_ops; + node.timestamp = (mtime || new Date).getTime(); + assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE); + if (mode === WORKERFS.FILE_MODE) { + node.size = contents.size; + node.contents = contents; + } else { + node.size = 4096; + node.contents = {}; + } + if (parent) { + parent.contents[name] = node; + } + return node; + },node_ops:{getattr:function (node) { + return { + dev: 1, + ino: undefined, + mode: node.mode, + nlink: 1, + uid: 0, + gid: 0, + rdev: undefined, + size: node.size, + atime: new Date(node.timestamp), + mtime: new Date(node.timestamp), + ctime: new Date(node.timestamp), + blksize: 4096, + blocks: Math.ceil(node.size / 4096), + }; + },setattr:function (node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + },lookup:function (parent, name) { + throw new FS.ErrnoError(ERRNO_CODES.ENOENT); + },mknod:function (parent, name, mode, dev) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },rename:function (oldNode, newDir, newName) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },unlink:function (parent, name) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },rmdir:function (parent, name) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },readdir:function (node) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },symlink:function (parent, newName, oldPath) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + },readlink:function (node) { + throw new FS.ErrnoError(ERRNO_CODES.EPERM); + }},stream_ops:{read:function (stream, buffer, offset, length, position) { + if (position >= stream.node.size) return 0; + var chunk = stream.node.contents.slice(position, position + length); + var ab = WORKERFS.reader.readAsArrayBuffer(chunk); + buffer.set(new Uint8Array(ab), offset); + return chunk.size; + },write:function (stream, buffer, offset, length, position) { + throw new FS.ErrnoError(ERRNO_CODES.EIO); + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.size; + } + } + if (position < 0) { + throw new FS.ErrnoError(ERRNO_CODES.EINVAL); + } + return position; + }}}; + var _stdin=allocate(1, "i32*", ALLOC_STATIC); var _stdout=allocate(1, "i32*", ALLOC_STATIC); - var _stderr=allocate(1, "i32*", ALLOC_STATIC); - - function _fflush(stream) { - // int fflush(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fflush.html - - /* - // Disabled, see https://github.com/kripken/emscripten/issues/2770 - stream = FS.getStreamFromPtr(stream); - if (stream.stream_ops.flush) { - stream.stream_ops.flush(stream); - } - */ - }var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},handleFSError:function (e) { + var _stderr=allocate(1, "i32*", ALLOC_STATIC);var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,handleFSError:function (e) { if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); return ___setErrNo(e.errno); },lookupPath:function (path, opts) { @@ -2575,7 +2893,7 @@ function copyTempDouble(ptr) { while (FS.isLink(current.mode)) { var link = FS.readlink(current_path); current_path = PATH.resolve(PATH.dirname(current_path), link); - + var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); current = lookup.node; @@ -2713,8 +3031,7 @@ function copyTempDouble(ptr) { } return flags; },flagsToPermissionString:function (flag) { - var accmode = flag & 2097155; - var perms = ['r', 'w', 'rw'][accmode]; + var perms = ['r', 'w', 'rw'][flag & 3]; if ((flag & 512)) { perms += 'w'; } @@ -2825,10 +3142,6 @@ function copyTempDouble(ptr) { return stream; },closeStream:function (fd) { FS.streams[fd] = null; - },getStreamFromPtr:function (ptr) { - return FS.streams[ptr - 1]; - },getPtrForStream:function (stream) { - return stream ? stream.fd + 1 : 0; },chrdev_stream_ops:{open:function (stream) { var device = FS.getDevice(stream.node.rdev); // override node's stream ops with the device's @@ -3193,7 +3506,7 @@ function copyTempDouble(ptr) { if (!link.node_ops.readlink) { throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } - return link.node_ops.readlink(link); + return PATH.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); },stat:function (path, dontFollow) { var lookup = FS.lookupPath(path, { follow: !dontFollow }); var node = lookup.node; @@ -3341,6 +3654,10 @@ function copyTempDouble(ptr) { if (FS.isChrdev(node.mode)) { flags &= ~512; } + // if asked only for a directory, then this must be one + if ((flags & 65536) && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); + } // check permissions, if this is not a file we just created now (it is ok to // create and write to a file with read-only permissions; it is read-only // for later use) @@ -3396,6 +3713,7 @@ function copyTempDouble(ptr) { } return stream; },close:function (stream) { + if (stream.getdents) stream.getdents = null; // free readdir state try { if (stream.stream_ops.close) { stream.stream_ops.close(stream); @@ -3490,6 +3808,13 @@ function copyTempDouble(ptr) { throw new FS.ErrnoError(ERRNO_CODES.ENODEV); } return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); + },msync:function (stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + },munmap:function (stream) { + return 0; },ioctl:function (stream, cmd, arg) { if (!stream.stream_ops.ioctl) { throw new FS.ErrnoError(ERRNO_CODES.ENOTTY); @@ -3509,11 +3834,7 @@ function copyTempDouble(ptr) { var buf = new Uint8Array(length); FS.read(stream, buf, 0, length, 0); if (opts.encoding === 'utf8') { - ret = ''; - var utf8 = new Runtime.UTF8Processor(); - for (var i = 0; i < length; i++) { - ret += utf8.processCChar(buf[i]); - } + ret = UTF8ArrayToString(buf, 0); } else if (opts.encoding === 'binary') { ret = buf; } @@ -3528,9 +3849,9 @@ function copyTempDouble(ptr) { } var stream = FS.open(path, opts.flags, opts.mode); if (opts.encoding === 'utf8') { - var utf8 = new Runtime.UTF8Processor(); - var buf = new Uint8Array(utf8.processJSString(data)); - FS.write(stream, buf, 0, buf.length, 0, opts.canOwn); + var buf = new Uint8Array(lengthBytesUTF8(data)+1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, 0, opts.canOwn); } else if (opts.encoding === 'binary') { FS.write(stream, data, 0, data.length, 0, opts.canOwn); } @@ -3557,7 +3878,7 @@ function copyTempDouble(ptr) { // setup /dev/null FS.registerDevice(FS.makedev(1, 3), { read: function() { return 0; }, - write: function() { return 0; } + write: function(stream, buffer, offset, length, pos) { return length; } }); FS.mkdev('/dev/null', FS.makedev(1, 3)); // setup /dev/tty and /dev/tty1 @@ -3586,6 +3907,31 @@ function copyTempDouble(ptr) { // just create the tmp dirs that reside in it commonly FS.mkdir('/dev/shm'); FS.mkdir('/dev/shm/tmp'); + },createSpecialDirectories:function () { + // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) + FS.mkdir('/proc'); + FS.mkdir('/proc/self'); + FS.mkdir('/proc/self/fd'); + FS.mount({ + mount: function() { + var node = FS.createNode('/proc/self', 'fd', 16384 | 0777, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + var ret = { + parent: null, + mount: { mountpoint: 'fake' }, + node_ops: { readlink: function() { return stream.path } } + }; + ret.parent = ret; // make it look like a simple root node + return ret; + } + }; + return node; + } + }, {}, '/proc/self/fd'); },createStandardStreams:function () { // TODO deprecate the old functionality of a single // input / output callback and that utilizes FS.createDevice @@ -3613,19 +3959,17 @@ function copyTempDouble(ptr) { // open default streams for the stdin, stdout and stderr devices var stdin = FS.open('/dev/stdin', 'r'); - HEAP32[((_stdin)>>2)]=FS.getPtrForStream(stdin); assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); var stdout = FS.open('/dev/stdout', 'w'); - HEAP32[((_stdout)>>2)]=FS.getPtrForStream(stdout); assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); var stderr = FS.open('/dev/stderr', 'w'); - HEAP32[((_stderr)>>2)]=FS.getPtrForStream(stderr); assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); },ensureErrnoError:function () { if (FS.ErrnoError) return; FS.ErrnoError = function ErrnoError(errno, node) { + //Module.printErr(stackTrace()); // useful for debugging this.node = node; this.setErrno = function(errno) { this.errno = errno; @@ -3655,6 +3999,14 @@ function copyTempDouble(ptr) { FS.createDefaultDirectories(); FS.createDefaultDevices(); + FS.createSpecialDirectories(); + + FS.filesystems = { + 'MEMFS': MEMFS, + 'IDBFS': IDBFS, + 'NODEFS': NODEFS, + 'WORKERFS': WORKERFS, + }; },init:function (input, output, error) { assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); FS.init.initialized = true; @@ -3669,6 +4021,10 @@ function copyTempDouble(ptr) { FS.createStandardStreams(); },quit:function () { FS.init.initialized = false; + // force-flush all streams, so we get musl std streams printed out + var fflush = Module['_fflush']; + if (fflush) fflush(0); + // close all of our streams for (var i = 0; i < FS.streams.length; i++) { var stream = FS.streams[i]; if (!stream) { @@ -3985,18 +4341,20 @@ function copyTempDouble(ptr) { }; node.stream_ops = stream_ops; return node; - },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn) { + },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { Browser.init(); // TODO we should allow people to just pass in a complete filename instead // of parent and name being that we just join them anyways var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname function processData(byteArray) { function finish(byteArray) { + if (preFinish) preFinish(); if (!dontCreateFile) { FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); } if (onload) onload(); - removeRunDependency('cp ' + fullname); + removeRunDependency(dep); } var handled = false; Module['preloadPlugins'].forEach(function(plugin) { @@ -4004,14 +4362,14 @@ function copyTempDouble(ptr) { if (plugin['canHandle'](fullname)) { plugin['handle'](byteArray, fullname, finish, function() { if (onerror) onerror(); - removeRunDependency('cp ' + fullname); + removeRunDependency(dep); }); handled = true; } }); if (!handled) finish(byteArray); } - addRunDependency('cp ' + fullname); + addRunDependency(dep); if (typeof url == 'string') { Browser.asyncLoad(url, function(byteArray) { processData(byteArray); @@ -4091,123 +4449,337 @@ function copyTempDouble(ptr) { transaction.onerror = onerror; }; openRequest.onerror = onerror; - }};var PATH={splitPath:function (filename) { - var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; - return splitPathRe.exec(filename).slice(1); - },normalizeArray:function (parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; + }};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function (dirfd, path) { + if (path[0] !== '/') { + // relative path + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + dir = dirstream.path; } + path = PATH.join2(dir, path); } - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); + return path; + },doStat:function (func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + // an error occurred while trying to look up the path; we should just report ENOTDIR + return -ERRNO_CODES.ENOTDIR; } + throw e; } - return parts; - },normalize:function (path) { - var isAbsolute = path.charAt(0) === '/', - trailingSlash = path.substr(-1) === '/'; - // Normalize the path - path = PATH.normalizeArray(path.split('/').filter(function(p) { - return !!p; - }), !isAbsolute).join('/'); - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - return (isAbsolute ? '/' : '') + path; - },dirname:function (path) { - var result = PATH.splitPath(path), - root = result[0], - dir = result[1]; - if (!root && !dir) { - // No dirname whatsoever - return '.'; + HEAP32[((buf)>>2)]=stat.dev; + HEAP32[(((buf)+(4))>>2)]=0; + HEAP32[(((buf)+(8))>>2)]=stat.ino; + HEAP32[(((buf)+(12))>>2)]=stat.mode; + HEAP32[(((buf)+(16))>>2)]=stat.nlink; + HEAP32[(((buf)+(20))>>2)]=stat.uid; + HEAP32[(((buf)+(24))>>2)]=stat.gid; + HEAP32[(((buf)+(28))>>2)]=stat.rdev; + HEAP32[(((buf)+(32))>>2)]=0; + HEAP32[(((buf)+(36))>>2)]=stat.size; + HEAP32[(((buf)+(40))>>2)]=4096; + HEAP32[(((buf)+(44))>>2)]=stat.blocks; + HEAP32[(((buf)+(48))>>2)]=(stat.atime.getTime() / 1000)|0; + HEAP32[(((buf)+(52))>>2)]=0; + HEAP32[(((buf)+(56))>>2)]=(stat.mtime.getTime() / 1000)|0; + HEAP32[(((buf)+(60))>>2)]=0; + HEAP32[(((buf)+(64))>>2)]=(stat.ctime.getTime() / 1000)|0; + HEAP32[(((buf)+(68))>>2)]=0; + HEAP32[(((buf)+(72))>>2)]=stat.ino; + return 0; + },doMsync:function (addr, stream, len, flags) { + var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len)); + FS.msync(stream, buffer, 0, len, flags); + },doMkdir:function (path, mode) { + // remove a trailing slash, if one - /a/b/ has basename of '', but + // we want to create b in the context of this function + path = PATH.normalize(path); + if (path[path.length-1] === '/') path = path.substr(0, path.length-1); + FS.mkdir(path, mode, 0); + return 0; + },doMknod:function (path, mode, dev) { + // we don't want this in the JS API as it uses mknod to create all nodes. + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + default: return -ERRNO_CODES.EINVAL; } - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); + FS.mknod(path, mode, dev); + return 0; + },doReadlink:function (path, buf, bufsize) { + if (bufsize <= 0) return -ERRNO_CODES.EINVAL; + var ret = FS.readlink(path); + ret = ret.slice(0, Math.max(0, bufsize)); + writeStringToMemory(ret, buf, true); + return ret.length; + },doAccess:function (path, amode) { + if (amode & ~7) { + // need a valid mode + return -ERRNO_CODES.EINVAL; } - return root + dir; - },basename:function (path) { - // EMSCRIPTEN return '/'' for '/', not an empty string - if (path === '/') return '/'; - var lastSlash = path.lastIndexOf('/'); - if (lastSlash === -1) return path; - return path.substr(lastSlash+1); - },extname:function (path) { - return PATH.splitPath(path)[3]; - },join:function () { - var paths = Array.prototype.slice.call(arguments, 0); - return PATH.normalize(paths.join('/')); - },join2:function (l, r) { - return PATH.normalize(l + '/' + r); - },resolve:function () { - var resolvedPath = '', - resolvedAbsolute = false; - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : FS.cwd(); - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - return ''; // an invalid portion invalidates the whole thing - } - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; + var node; + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + var perms = ''; + if (amode & 4) perms += 'r'; + if (amode & 2) perms += 'w'; + if (amode & 1) perms += 'x'; + if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { + return -ERRNO_CODES.EACCES; } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; - },relative:function (from, to) { - from = PATH.resolve(from).substr(1); - to = PATH.resolve(to).substr(1); - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - if (start > end) return []; - return arr.slice(start, end - start + 1); + return 0; + },doDup:function (path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + },doReadv:function (stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.read(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; // nothing more to read } - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } + return ret; + },doWritev:function (stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.write(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; } - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); + return ret; + },varargs:0,get:function (varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function () { + var ret = Pointer_stringify(SYSCALLS.get()); + return ret; + },getStreamFromFD:function () { + var stream = FS.getStream(SYSCALLS.get()); + if (!stream) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + return stream; + },getSocketFromFD:function () { + var socket = SOCKFS.getSocket(SYSCALLS.get()); + if (!socket) throw new FS.ErrnoError(ERRNO_CODES.EBADF); + return socket; + },getSocketAddress:function (allowNull) { + var addrp = SYSCALLS.get(), addrlen = SYSCALLS.get(); + if (allowNull && addrp === 0) return null; + var info = __read_sockaddr(addrp, addrlen); + if (info.errno) throw new FS.ErrnoError(info.errno); + info.addr = DNS.lookup_addr(info.addr) || info.addr; + return info; + },get64:function () { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function () { + assert(SYSCALLS.get() === 0); + }};function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function _sysconf(name) { + // long sysconf(int name); + // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html + switch(name) { + case 30: return PAGE_SIZE; + case 85: return totalMemory / PAGE_SIZE; + case 132: + case 133: + case 12: + case 137: + case 138: + case 15: + case 235: + case 16: + case 17: + case 18: + case 19: + case 20: + case 149: + case 13: + case 10: + case 236: + case 153: + case 9: + case 21: + case 22: + case 159: + case 154: + case 14: + case 77: + case 78: + case 139: + case 80: + case 81: + case 82: + case 68: + case 67: + case 164: + case 11: + case 29: + case 47: + case 48: + case 95: + case 52: + case 51: + case 46: + return 200809; + case 79: + return 0; + case 27: + case 246: + case 127: + case 128: + case 23: + case 24: + case 160: + case 161: + case 181: + case 182: + case 242: + case 183: + case 184: + case 243: + case 244: + case 245: + case 165: + case 178: + case 179: + case 49: + case 50: + case 168: + case 169: + case 175: + case 170: + case 171: + case 172: + case 97: + case 76: + case 32: + case 173: + case 35: + return -1; + case 176: + case 177: + case 7: + case 155: + case 8: + case 157: + case 125: + case 126: + case 92: + case 93: + case 129: + case 130: + case 131: + case 94: + case 91: + return 1; + case 74: + case 60: + case 69: + case 70: + case 4: + return 1024; + case 31: + case 42: + case 72: + return 32; + case 87: + case 26: + case 33: + return 2147483647; + case 34: + case 1: + return 47839; + case 38: + case 36: + return 99; + case 43: + case 37: + return 2048; + case 0: return 2097152; + case 3: return 65536; + case 28: return 32768; + case 44: return 32767; + case 75: return 16384; + case 39: return 1000; + case 89: return 700; + case 71: return 256; + case 40: return 255; + case 2: return 100; + case 180: return 64; + case 25: return 20; + case 5: return 16; + case 6: return 6; + case 73: return 4; + case 84: { + if (typeof navigator === 'object') return navigator['hardwareConcurrency'] || 1; + return 1; } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - return outputParts.join('/'); - }}; + } + ___setErrNo(ERRNO_CODES.EINVAL); + return -1; + } + + function _sbrk(bytes) { + // Implement a Linux-like 'memory area' for our 'process'. + // Changes the size of the memory area by |bytes|; returns the + // address of the previous top ('break') of the memory area + // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP + var self = _sbrk; + if (!self.called) { + DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned + self.called = true; + assert(Runtime.dynamicAlloc); + self.alloc = Runtime.dynamicAlloc; + Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; + } + var ret = DYNAMICTOP; + if (bytes != 0) { + var success = self.alloc(bytes); + if (!success) return -1 >>> 0; // sbrk failure code + } + return ret; // Previous break location. + } + + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + return dest; + } + Module["_memcpy"] = _memcpy; + Module["_memmove"] = _memmove; + + function _emscripten_set_main_loop_timing(mode, value) { @@ -4219,18 +4791,39 @@ function copyTempDouble(ptr) { } if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { setTimeout(Browser.mainLoop.runner, value); // doing this each time means that on exception, we stop }; Browser.mainLoop.method = 'timeout'; } else if (mode == 1 /*EM_TIMING_RAF*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { Browser.requestAnimationFrame(Browser.mainLoop.runner); }; Browser.mainLoop.method = 'rAF'; + } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { + if (!window['setImmediate']) { + // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) + var setImmediates = []; + var emscriptenMainLoopMessageId = '__emcc'; + function Browser_setImmediate_messageHandler(event) { + if (event.source === window && event.data === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()(); + } + } + window.addEventListener("message", Browser_setImmediate_messageHandler, true); + window['setImmediate'] = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + window.postMessage(emscriptenMainLoopMessageId, "*"); + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + window['setImmediate'](Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'immediate'; } return 0; - }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg) { + }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { Module['noExitRuntime'] = true; assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); @@ -4302,10 +4895,12 @@ function copyTempDouble(ptr) { Browser.mainLoop.scheduler(); } - if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); - else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) + if (!noSetTiming) { + if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) - Browser.mainLoop.scheduler(); + Browser.mainLoop.scheduler(); + } if (simulateInfiniteLoop) { throw 'SimulateInfiniteLoop'; @@ -4319,8 +4914,9 @@ function copyTempDouble(ptr) { var timingValue = Browser.mainLoop.timingValue; var func = Browser.mainLoop.func; Browser.mainLoop.func = null; - _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg); + _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler(); },updateStatus:function () { if (Module['setStatus']) { var message = Module['statusMessage'] || 'Please wait...'; @@ -4574,11 +5170,13 @@ function copyTempDouble(ptr) { Browser.init(); } return ctx; - },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas) { + },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas, vrDevice) { Browser.lockPointer = lockPointer; Browser.resizeCanvas = resizeCanvas; + Browser.vrDevice = vrDevice; if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; + if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; var canvas = Module['canvas']; function fullScreenChange() { @@ -4623,13 +5221,18 @@ function copyTempDouble(ptr) { var canvasContainer = document.createElement("div"); canvas.parentNode.insertBefore(canvasContainer, canvas); canvasContainer.appendChild(canvas); - + // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) canvasContainer.requestFullScreen = canvasContainer['requestFullScreen'] || canvasContainer['mozRequestFullScreen'] || canvasContainer['msRequestFullscreen'] || (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); - canvasContainer.requestFullScreen(); + + if (vrDevice) { + canvasContainer.requestFullScreen({ vrDisplay: vrDevice }); + } else { + canvasContainer.requestFullScreen(); + } },nextRAF:0,fakeRequestAnimationFrame:function (func) { // try to keep 60fps between calls to here var now = Date.now(); @@ -4660,19 +5263,43 @@ function copyTempDouble(ptr) { return function() { if (!ABORT) return func.apply(null, arguments); }; + },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function () { + Browser.allowAsyncCallbacks = false; + },resumeAsyncCallbacks:function () { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now + Browser.allowAsyncCallbacks = true; + if (Browser.queuedAsyncCallbacks.length > 0) { + var callbacks = Browser.queuedAsyncCallbacks; + Browser.queuedAsyncCallbacks = []; + callbacks.forEach(function(func) { + func(); + }); + } },safeRequestAnimationFrame:function (func) { return Browser.requestAnimationFrame(function() { - if (!ABORT) func(); + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } }); },safeSetTimeout:function (func, timeout) { Module['noExitRuntime'] = true; return setTimeout(function() { - if (!ABORT) func(); + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } }, timeout); },safeSetInterval:function (func, timeout) { Module['noExitRuntime'] = true; return setInterval(function() { - if (!ABORT) func(); + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } // drop it on the floor otherwise, next interval will kick in }, timeout); },getMimetype:function (name) { return { @@ -4770,8 +5397,10 @@ function copyTempDouble(ptr) { Browser.lastTouches[touch.identifier] = coords; Browser.touches[touch.identifier] = coords; } else if (event.type === 'touchend' || event.type === 'touchmove') { - Browser.lastTouches[touch.identifier] = Browser.touches[touch.identifier]; - Browser.touches[touch.identifier] = { x: adjustedX, y: adjustedY }; + var last = Browser.touches[touch.identifier]; + if (!last) last = coords; + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords; } return; } @@ -4900,16 +5529,83 @@ function copyTempDouble(ptr) { } return ret; } -___errno_state = Runtime.staticAlloc(4); HEAP32[((___errno_state)>>2)]=0; -Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas) { Browser.requestFullScreen(lockPointer, resizeCanvas) }; + + function _pthread_self() { + //FIXME: assumes only a single thread + return 0; + } + + function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + var offset = offset_low; + assert(offset_high === 0); + FS.llseek(stream, offset, whence); + HEAP32[((result)>>2)]=stream.position; + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall146(which, varargs) {SYSCALLS.varargs = varargs; + try { + // writev + var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + return SYSCALLS.doWritev(stream, iov, iovcnt); + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get(); + switch (op) { + case 21505: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + return 0; + } + case 21506: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + return 0; // no-op, not actually adjusting terminal settings + } + case 21519: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + var argp = SYSCALLS.get(); + HEAP32[((argp)>>2)]=0; + return 0; + } + case 21520: { + if (!stream.tty) return -ERRNO_CODES.ENOTTY; + return -ERRNO_CODES.EINVAL; // not supported + } + case 21531: { + var argp = SYSCALLS.get(); + return FS.ioctl(stream, op, argp); + } + default: abort('bad ioctl syscall ' + op); + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } +FS.staticInit();__ATINIT__.unshift(function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() });__ATMAIN__.push(function() { FS.ignorePermissions = false });__ATEXIT__.push(function() { FS.quit() });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice;Module["FS_unlink"] = FS.unlink; +__ATINIT__.unshift(function() { TTY.init() });__ATEXIT__.push(function() { TTY.shutdown() }); +if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); } +Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } -FS.staticInit();__ATINIT__.unshift({ func: function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() } });__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });__ATEXIT__.push({ func: function() { FS.quit() } });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice; -__ATINIT__.unshift({ func: function() { TTY.init() } });__ATEXIT__.push({ func: function() { TTY.shutdown() } });TTY.utf8 = new Runtime.UTF8Processor(); -if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); NODEFS.staticInit(); } + Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) } STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP); staticSealed = true; // seal the static portion of memory @@ -4920,16 +5616,44 @@ DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX); assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack"); - var ctlz_i8 = allocate([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_DYNAMIC); var cttz_i8 = allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0], "i8", ALLOC_DYNAMIC); -Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }; -Module.asmLibraryArg = { "abort": abort, "assert": assert, "min": Math_min, "_fflush": _fflush, "_sysconf": _sysconf, "_abort": _abort, "___setErrNo": ___setErrNo, "_sbrk": _sbrk, "_time": _time, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_emscripten_set_main_loop": _emscripten_set_main_loop, "___errno_location": ___errno_location, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8, "ctlz_i8": ctlz_i8, "NaN": NaN, "Infinity": Infinity }; +function invoke_ii(index,a1) { + try { + return Module["dynCall_ii"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + asm["setThrew"](1, 0); + } +} + +function invoke_iiii(index,a1,a2,a3) { + try { + return Module["dynCall_iiii"](index,a1,a2,a3); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + asm["setThrew"](1, 0); + } +} + +function invoke_vi(index,a1) { + try { + Module["dynCall_vi"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + asm["setThrew"](1, 0); + } +} + +Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; + +Module.asmLibraryArg = { "abort": abort, "assert": assert, "invoke_ii": invoke_ii, "invoke_iiii": invoke_iiii, "invoke_vi": invoke_vi, "_pthread_cleanup_pop": _pthread_cleanup_pop, "___lock": ___lock, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_pthread_self": _pthread_self, "___syscall6": ___syscall6, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_abort": _abort, "_sbrk": _sbrk, "_time": _time, "___setErrNo": ___setErrNo, "_emscripten_memcpy_big": _emscripten_memcpy_big, "___syscall54": ___syscall54, "___unlock": ___unlock, "___syscall140": ___syscall140, "_pthread_cleanup_push": _pthread_cleanup_push, "_sysconf": _sysconf, "___syscall146": ___syscall146, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8 }; // EMSCRIPTEN_START_ASM var asm = (function(global, env, buffer) { 'use asm'; + var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); var HEAP32 = new global.Int32Array(buffer); @@ -4945,13 +5669,12 @@ var asm = (function(global, env, buffer) { var tempDoublePtr=env.tempDoublePtr|0; var ABORT=env.ABORT|0; var cttz_i8=env.cttz_i8|0; - var ctlz_i8=env.ctlz_i8|0; var __THREW__ = 0; var threwValue = 0; var setjmpId = 0; var undef = 0; - var nan = +env.NaN, inf = +env.Infinity; + var nan = global.NaN, inf = global.Infinity; var tempInt = 0, tempBigInt = 0, tempBigIntP = 0, tempBigIntS = 0, tempBigIntR = 0.0, tempBigIntI = 0, tempBigIntD = 0, tempValue = 0, tempDouble = 0.0; var tempRet0 = 0; @@ -4979,19 +5702,30 @@ var asm = (function(global, env, buffer) { var Math_log=global.Math.log; var Math_ceil=global.Math.ceil; var Math_imul=global.Math.imul; + var Math_min=global.Math.min; + var Math_clz32=global.Math.clz32; var abort=env.abort; var assert=env.assert; - var Math_min=env.min; - var _fflush=env._fflush; - var _sysconf=env._sysconf; + var invoke_ii=env.invoke_ii; + var invoke_iiii=env.invoke_iiii; + var invoke_vi=env.invoke_vi; + var _pthread_cleanup_pop=env._pthread_cleanup_pop; + var ___lock=env.___lock; + var _emscripten_set_main_loop=env._emscripten_set_main_loop; + var _pthread_self=env._pthread_self; + var ___syscall6=env.___syscall6; + var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing; var _abort=env._abort; - var ___setErrNo=env.___setErrNo; var _sbrk=env._sbrk; var _time=env._time; - var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing; + var ___setErrNo=env.___setErrNo; var _emscripten_memcpy_big=env._emscripten_memcpy_big; - var _emscripten_set_main_loop=env._emscripten_set_main_loop; - var ___errno_location=env.___errno_location; + var ___syscall54=env.___syscall54; + var ___unlock=env.___unlock; + var ___syscall140=env.___syscall140; + var _pthread_cleanup_push=env._pthread_cleanup_push; + var _sysconf=env._sysconf; + var ___syscall146=env.___syscall146; var tempFloat = 0.0; // EMSCRIPTEN_START_FUNCS @@ -5000,7 +5734,7 @@ function stackAlloc(size) { var ret = 0; ret = STACKTOP; STACKTOP = (STACKTOP + size)|0; -STACKTOP = (STACKTOP + 15)&-16; + STACKTOP = (STACKTOP + 15)&-16; return ret|0; } @@ -5011,6 +5745,12 @@ function stackRestore(top) { top = top|0; STACKTOP = top; } +function establishStackSpace(stackBase, stackMax) { + stackBase = stackBase|0; + stackMax = stackMax|0; + STACKTOP = stackBase; + STACK_MAX = stackMax; +} function setThrew(threw, value) { threw = threw|0; @@ -5038,6 +5778,7 @@ function copyTempDouble(ptr) { HEAP8[tempDoublePtr+6>>0] = HEAP8[ptr+6>>0]; HEAP8[tempDoublePtr+7>>0] = HEAP8[ptr+7>>0]; } + function setTempRet0(value) { value = value|0; tempRet0 = value; @@ -5063,189 +5804,189 @@ function _crypto_verify_32_ref($x,$y) { $0 = HEAP8[$x>>0]|0; $1 = HEAP8[$y>>0]|0; $2 = $1 ^ $0; - $3 = (($x) + 1|0); + $3 = ((($x)) + 1|0); $4 = HEAP8[$3>>0]|0; - $5 = (($y) + 1|0); + $5 = ((($y)) + 1|0); $6 = HEAP8[$5>>0]|0; $7 = $6 ^ $4; $8 = $7 | $2; - $9 = (($x) + 2|0); + $9 = ((($x)) + 2|0); $10 = HEAP8[$9>>0]|0; - $11 = (($y) + 2|0); + $11 = ((($y)) + 2|0); $12 = HEAP8[$11>>0]|0; $13 = $12 ^ $10; $14 = $8 | $13; - $15 = (($x) + 3|0); + $15 = ((($x)) + 3|0); $16 = HEAP8[$15>>0]|0; - $17 = (($y) + 3|0); + $17 = ((($y)) + 3|0); $18 = HEAP8[$17>>0]|0; $19 = $18 ^ $16; $20 = $14 | $19; - $21 = (($x) + 4|0); + $21 = ((($x)) + 4|0); $22 = HEAP8[$21>>0]|0; - $23 = (($y) + 4|0); + $23 = ((($y)) + 4|0); $24 = HEAP8[$23>>0]|0; $25 = $24 ^ $22; $26 = $20 | $25; - $27 = (($x) + 5|0); + $27 = ((($x)) + 5|0); $28 = HEAP8[$27>>0]|0; - $29 = (($y) + 5|0); + $29 = ((($y)) + 5|0); $30 = HEAP8[$29>>0]|0; $31 = $30 ^ $28; $32 = $26 | $31; - $33 = (($x) + 6|0); + $33 = ((($x)) + 6|0); $34 = HEAP8[$33>>0]|0; - $35 = (($y) + 6|0); + $35 = ((($y)) + 6|0); $36 = HEAP8[$35>>0]|0; $37 = $36 ^ $34; $38 = $32 | $37; - $39 = (($x) + 7|0); + $39 = ((($x)) + 7|0); $40 = HEAP8[$39>>0]|0; - $41 = (($y) + 7|0); + $41 = ((($y)) + 7|0); $42 = HEAP8[$41>>0]|0; $43 = $42 ^ $40; $44 = $38 | $43; - $45 = (($x) + 8|0); + $45 = ((($x)) + 8|0); $46 = HEAP8[$45>>0]|0; - $47 = (($y) + 8|0); + $47 = ((($y)) + 8|0); $48 = HEAP8[$47>>0]|0; $49 = $48 ^ $46; $50 = $44 | $49; - $51 = (($x) + 9|0); + $51 = ((($x)) + 9|0); $52 = HEAP8[$51>>0]|0; - $53 = (($y) + 9|0); + $53 = ((($y)) + 9|0); $54 = HEAP8[$53>>0]|0; $55 = $54 ^ $52; $56 = $50 | $55; - $57 = (($x) + 10|0); + $57 = ((($x)) + 10|0); $58 = HEAP8[$57>>0]|0; - $59 = (($y) + 10|0); + $59 = ((($y)) + 10|0); $60 = HEAP8[$59>>0]|0; $61 = $60 ^ $58; $62 = $56 | $61; - $63 = (($x) + 11|0); + $63 = ((($x)) + 11|0); $64 = HEAP8[$63>>0]|0; - $65 = (($y) + 11|0); + $65 = ((($y)) + 11|0); $66 = HEAP8[$65>>0]|0; $67 = $66 ^ $64; $68 = $62 | $67; - $69 = (($x) + 12|0); + $69 = ((($x)) + 12|0); $70 = HEAP8[$69>>0]|0; - $71 = (($y) + 12|0); + $71 = ((($y)) + 12|0); $72 = HEAP8[$71>>0]|0; $73 = $72 ^ $70; $74 = $68 | $73; - $75 = (($x) + 13|0); + $75 = ((($x)) + 13|0); $76 = HEAP8[$75>>0]|0; - $77 = (($y) + 13|0); + $77 = ((($y)) + 13|0); $78 = HEAP8[$77>>0]|0; $79 = $78 ^ $76; $80 = $74 | $79; - $81 = (($x) + 14|0); + $81 = ((($x)) + 14|0); $82 = HEAP8[$81>>0]|0; - $83 = (($y) + 14|0); + $83 = ((($y)) + 14|0); $84 = HEAP8[$83>>0]|0; $85 = $84 ^ $82; $86 = $80 | $85; - $87 = (($x) + 15|0); + $87 = ((($x)) + 15|0); $88 = HEAP8[$87>>0]|0; - $89 = (($y) + 15|0); + $89 = ((($y)) + 15|0); $90 = HEAP8[$89>>0]|0; $91 = $90 ^ $88; $92 = $86 | $91; - $93 = (($x) + 16|0); + $93 = ((($x)) + 16|0); $94 = HEAP8[$93>>0]|0; - $95 = (($y) + 16|0); + $95 = ((($y)) + 16|0); $96 = HEAP8[$95>>0]|0; $97 = $96 ^ $94; $98 = $92 | $97; - $99 = (($x) + 17|0); + $99 = ((($x)) + 17|0); $100 = HEAP8[$99>>0]|0; - $101 = (($y) + 17|0); + $101 = ((($y)) + 17|0); $102 = HEAP8[$101>>0]|0; $103 = $102 ^ $100; $104 = $98 | $103; - $105 = (($x) + 18|0); + $105 = ((($x)) + 18|0); $106 = HEAP8[$105>>0]|0; - $107 = (($y) + 18|0); + $107 = ((($y)) + 18|0); $108 = HEAP8[$107>>0]|0; $109 = $108 ^ $106; $110 = $104 | $109; - $111 = (($x) + 19|0); + $111 = ((($x)) + 19|0); $112 = HEAP8[$111>>0]|0; - $113 = (($y) + 19|0); + $113 = ((($y)) + 19|0); $114 = HEAP8[$113>>0]|0; $115 = $114 ^ $112; $116 = $110 | $115; - $117 = (($x) + 20|0); + $117 = ((($x)) + 20|0); $118 = HEAP8[$117>>0]|0; - $119 = (($y) + 20|0); + $119 = ((($y)) + 20|0); $120 = HEAP8[$119>>0]|0; $121 = $120 ^ $118; $122 = $116 | $121; - $123 = (($x) + 21|0); + $123 = ((($x)) + 21|0); $124 = HEAP8[$123>>0]|0; - $125 = (($y) + 21|0); + $125 = ((($y)) + 21|0); $126 = HEAP8[$125>>0]|0; $127 = $126 ^ $124; $128 = $122 | $127; - $129 = (($x) + 22|0); + $129 = ((($x)) + 22|0); $130 = HEAP8[$129>>0]|0; - $131 = (($y) + 22|0); + $131 = ((($y)) + 22|0); $132 = HEAP8[$131>>0]|0; $133 = $132 ^ $130; $134 = $128 | $133; - $135 = (($x) + 23|0); + $135 = ((($x)) + 23|0); $136 = HEAP8[$135>>0]|0; - $137 = (($y) + 23|0); + $137 = ((($y)) + 23|0); $138 = HEAP8[$137>>0]|0; $139 = $138 ^ $136; $140 = $134 | $139; - $141 = (($x) + 24|0); + $141 = ((($x)) + 24|0); $142 = HEAP8[$141>>0]|0; - $143 = (($y) + 24|0); + $143 = ((($y)) + 24|0); $144 = HEAP8[$143>>0]|0; $145 = $144 ^ $142; $146 = $140 | $145; - $147 = (($x) + 25|0); + $147 = ((($x)) + 25|0); $148 = HEAP8[$147>>0]|0; - $149 = (($y) + 25|0); + $149 = ((($y)) + 25|0); $150 = HEAP8[$149>>0]|0; $151 = $150 ^ $148; $152 = $146 | $151; - $153 = (($x) + 26|0); + $153 = ((($x)) + 26|0); $154 = HEAP8[$153>>0]|0; - $155 = (($y) + 26|0); + $155 = ((($y)) + 26|0); $156 = HEAP8[$155>>0]|0; $157 = $156 ^ $154; $158 = $152 | $157; - $159 = (($x) + 27|0); + $159 = ((($x)) + 27|0); $160 = HEAP8[$159>>0]|0; - $161 = (($y) + 27|0); + $161 = ((($y)) + 27|0); $162 = HEAP8[$161>>0]|0; $163 = $162 ^ $160; $164 = $158 | $163; - $165 = (($x) + 28|0); + $165 = ((($x)) + 28|0); $166 = HEAP8[$165>>0]|0; - $167 = (($y) + 28|0); + $167 = ((($y)) + 28|0); $168 = HEAP8[$167>>0]|0; $169 = $168 ^ $166; $170 = $164 | $169; - $171 = (($x) + 29|0); + $171 = ((($x)) + 29|0); $172 = HEAP8[$171>>0]|0; - $173 = (($y) + 29|0); + $173 = ((($y)) + 29|0); $174 = HEAP8[$173>>0]|0; $175 = $174 ^ $172; $176 = $170 | $175; - $177 = (($x) + 30|0); + $177 = ((($x)) + 30|0); $178 = HEAP8[$177>>0]|0; - $179 = (($y) + 30|0); + $179 = ((($y)) + 30|0); $180 = HEAP8[$179>>0]|0; $181 = $180 ^ $178; $182 = $176 | $181; - $183 = (($x) + 31|0); + $183 = ((($x)) + 31|0); $184 = HEAP8[$183>>0]|0; - $185 = (($y) + 31|0); + $185 = ((($y)) + 31|0); $186 = HEAP8[$185>>0]|0; $187 = $186 ^ $184; $188 = $182 | $187; @@ -5254,39 +5995,40 @@ function _crypto_verify_32_ref($x,$y) { $191 = $190 >>> 8; $192 = $191 & 1; $193 = (($192) + -1)|0; - STACKTOP = sp;return ($193|0); + return ($193|0); } function _curve25519_sign($signature_out,$curve25519_privkey,$msg,$msg_len) { $signature_out = $signature_out|0; $curve25519_privkey = $curve25519_privkey|0; $msg = $msg|0; $msg_len = $msg_len|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_keypair = 0, $ed_pubkey_point = 0, $sigbuf_out_len = 0, dest = 0; - var label = 0, sp = 0, src = 0, stop = 0; + var $$alloca_mul = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_keypair = 0, $ed_pubkey_point = 0, $sigbuf_out_len = 0; + var dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 240|0; $ed_pubkey_point = sp + 8|0; $ed_keypair = sp + 168|0; $sigbuf_out_len = sp; $0 = (($msg_len) + 64)|0; - $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; + $$alloca_mul = $0; + $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0;; $2 = $sigbuf_out_len; $3 = $2; HEAP32[$3>>2] = 0; $4 = (($2) + 4)|0; $5 = $4; HEAP32[$5>>2] = 0; - dest=$ed_keypair+0|0; src=$curve25519_privkey+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$ed_keypair; src=$curve25519_privkey; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _crypto_sign_ed25519_ref10_ge_scalarmult_base($ed_pubkey_point,$curve25519_privkey); - $6 = (($ed_keypair) + 32|0); + $6 = ((($ed_keypair)) + 32|0); _crypto_sign_ed25519_ref10_ge_p3_tobytes($6,$ed_pubkey_point); - $7 = (($ed_keypair) + 63|0); + $7 = ((($ed_keypair)) + 63|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = $9 & 128; (_crypto_sign_modified($1,$sigbuf_out_len,$msg,$msg_len,0,$ed_keypair)|0); - dest=$signature_out+0|0; src=$1+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $11 = (($signature_out) + 63|0); + dest=$signature_out; src=$1; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $11 = ((($signature_out)) + 63|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = $13 | $10; @@ -5299,8 +6041,8 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { $curve25519_pubkey = $curve25519_pubkey|0; $msg = $msg|0; $msg_len = $msg_len|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ed_pubkey = 0, $ed_y = 0; - var $inv_mont_x_plus_one = 0, $mont_x = 0, $mont_x_minus_one = 0, $mont_x_plus_one = 0, $one = 0, $some_retval = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $$alloca_mul = 0, $$alloca_mul1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + var $ed_pubkey = 0, $ed_y = 0, $inv_mont_x_plus_one = 0, $mont_x = 0, $mont_x_minus_one = 0, $mont_x_plus_one = 0, $one = 0, $some_retval = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 288|0; $mont_x = sp + 208|0; @@ -5312,8 +6054,10 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { $ed_pubkey = sp + 248|0; $some_retval = sp; $0 = (($msg_len) + 64)|0; - $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; - $2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$0)|0)+15)&-16)|0;; + $$alloca_mul = $0; + $1 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0;; + $$alloca_mul1 = $0; + $2 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul1)|0)+15)&-16)|0;; _crypto_sign_ed25519_ref10_fe_frombytes($mont_x,$curve25519_pubkey); _crypto_sign_ed25519_ref10_fe_1($one); _crypto_sign_ed25519_ref10_fe_sub($mont_x_minus_one,$mont_x,$one); @@ -5321,11 +6065,11 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { _crypto_sign_ed25519_ref10_fe_invert($inv_mont_x_plus_one,$mont_x_plus_one); _crypto_sign_ed25519_ref10_fe_mul($ed_y,$mont_x_minus_one,$inv_mont_x_plus_one); _crypto_sign_ed25519_ref10_fe_tobytes($ed_pubkey,$ed_y); - $3 = (($signature) + 63|0); + $3 = ((($signature)) + 63|0); $4 = HEAP8[$3>>0]|0; $5 = $4&255; $6 = $5 & 128; - $7 = (($ed_pubkey) + 31|0); + $7 = ((($ed_pubkey)) + 31|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = $9 | $6; @@ -5336,8 +6080,8 @@ function _curve25519_verify($signature,$curve25519_pubkey,$msg,$msg_len) { $14 = $13 & 127; $15 = $14&255; HEAP8[$3>>0] = $15; - dest=$1+0|0; src=$signature+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $16 = (($1) + 64|0); + dest=$1; src=$signature; stop=dest+64|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $16 = ((($1)) + 64|0); _memcpy(($16|0),($msg|0),($msg_len|0))|0; $17 = (_crypto_sign_edwards25519sha512batch_ref10_open($2,$some_retval,$1,$0,0,$ed_pubkey)|0); STACKTOP = sp;return ($17|0); @@ -5366,12 +6110,12 @@ function _crypto_sign_modified($sm,$smlen,$m,$0,$1,$sk) { var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $R = 0, $hram = 0, $nonce = 0, $pk1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 320|0; - $pk1 = sp + 288|0; - $nonce = sp + 224|0; + $pk1 = sp + 224|0; + $nonce = sp + 256|0; $hram = sp + 160|0; $R = sp; - $2 = (($sk) + 32|0); - dest=$pk1+0|0; src=$2+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $2 = ((($sk)) + 32|0); + dest=$pk1; src=$2; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); $3 = (_i64Add(($0|0),($1|0),64,0)|0); $4 = tempRet0; $5 = $smlen; @@ -5380,14 +6124,14 @@ function _crypto_sign_modified($sm,$smlen,$m,$0,$1,$sk) { $7 = (($5) + 4)|0; $8 = $7; HEAP32[$8>>2] = $4; - $9 = (($sm) + 64|0); + $9 = ((($sm)) + 64|0); _memmove(($9|0),($m|0),($0|0))|0; - $10 = (($sm) + 32|0); + $10 = ((($sm)) + 32|0); _memmove(($10|0),($sk|0),32)|0; $11 = (_i64Add(($0|0),($1|0),32,0)|0); $12 = tempRet0; (_crypto_hash_sha512_ref($nonce,$10,$11,$12)|0); - dest=$10+0|0; src=$pk1+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$10; src=$pk1; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _crypto_sign_ed25519_ref10_sc_reduce($nonce); _crypto_sign_ed25519_ref10_ge_scalarmult_base($R,$nonce); _crypto_sign_ed25519_ref10_ge_p3_tobytes($sm,$R); @@ -5408,7 +6152,7 @@ function _curve25519_donna($mypublic,$secret,$basepoint) { $z = sp + 80|0; $zmone = sp; $e = sp + 328|0; - dest=$e+0|0; src=$secret+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$e; src=$secret; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _fexpand($bp,$basepoint); _cmult($x,$z,$e,$bp); _crecip($zmone,$z); @@ -5437,20 +6181,20 @@ function _fexpand($output,$input) { sp = STACKTOP; $0 = HEAP8[$input>>0]|0; $1 = $0&255; - $2 = (($input) + 1|0); + $2 = ((($input)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($input) + 2|0); + $8 = ((($input)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - $15 = (($input) + 3|0); + $15 = ((($input)) + 3|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (_bitshift64Shl(($17|0),0,24)|0); @@ -5465,20 +6209,20 @@ function _fexpand($output,$input) { HEAP32[$25>>2] = $14; $26 = HEAP8[$15>>0]|0; $27 = $26&255; - $28 = (($input) + 4|0); + $28 = ((($input)) + 4|0); $29 = HEAP8[$28>>0]|0; $30 = $29&255; $31 = (_bitshift64Shl(($30|0),0,8)|0); $32 = tempRet0; $33 = $31 | $27; - $34 = (($input) + 5|0); + $34 = ((($input)) + 5|0); $35 = HEAP8[$34>>0]|0; $36 = $35&255; $37 = (_bitshift64Shl(($36|0),0,16)|0); $38 = tempRet0; $39 = $33 | $37; $40 = $32 | $38; - $41 = (($input) + 6|0); + $41 = ((($input)) + 6|0); $42 = HEAP8[$41>>0]|0; $43 = $42&255; $44 = (_bitshift64Shl(($43|0),0,24)|0); @@ -5488,7 +6232,7 @@ function _fexpand($output,$input) { $48 = (_bitshift64Lshr(($46|0),($47|0),2)|0); $49 = tempRet0; $50 = $48 & 33554431; - $51 = (($output) + 8|0); + $51 = ((($output)) + 8|0); $52 = $51; $53 = $52; HEAP32[$53>>2] = $50; @@ -5497,20 +6241,20 @@ function _fexpand($output,$input) { HEAP32[$55>>2] = 0; $56 = HEAP8[$41>>0]|0; $57 = $56&255; - $58 = (($input) + 7|0); + $58 = ((($input)) + 7|0); $59 = HEAP8[$58>>0]|0; $60 = $59&255; $61 = (_bitshift64Shl(($60|0),0,8)|0); $62 = tempRet0; $63 = $61 | $57; - $64 = (($input) + 8|0); + $64 = ((($input)) + 8|0); $65 = HEAP8[$64>>0]|0; $66 = $65&255; $67 = (_bitshift64Shl(($66|0),0,16)|0); $68 = tempRet0; $69 = $63 | $67; $70 = $62 | $68; - $71 = (($input) + 9|0); + $71 = ((($input)) + 9|0); $72 = HEAP8[$71>>0]|0; $73 = $72&255; $74 = (_bitshift64Shl(($73|0),0,24)|0); @@ -5520,7 +6264,7 @@ function _fexpand($output,$input) { $78 = (_bitshift64Lshr(($76|0),($77|0),3)|0); $79 = tempRet0; $80 = $78 & 67108863; - $81 = (($output) + 16|0); + $81 = ((($output)) + 16|0); $82 = $81; $83 = $82; HEAP32[$83>>2] = $80; @@ -5529,20 +6273,20 @@ function _fexpand($output,$input) { HEAP32[$85>>2] = 0; $86 = HEAP8[$71>>0]|0; $87 = $86&255; - $88 = (($input) + 10|0); + $88 = ((($input)) + 10|0); $89 = HEAP8[$88>>0]|0; $90 = $89&255; $91 = (_bitshift64Shl(($90|0),0,8)|0); $92 = tempRet0; $93 = $91 | $87; - $94 = (($input) + 11|0); + $94 = ((($input)) + 11|0); $95 = HEAP8[$94>>0]|0; $96 = $95&255; $97 = (_bitshift64Shl(($96|0),0,16)|0); $98 = tempRet0; $99 = $93 | $97; $100 = $92 | $98; - $101 = (($input) + 12|0); + $101 = ((($input)) + 12|0); $102 = HEAP8[$101>>0]|0; $103 = $102&255; $104 = (_bitshift64Shl(($103|0),0,24)|0); @@ -5552,7 +6296,7 @@ function _fexpand($output,$input) { $108 = (_bitshift64Lshr(($106|0),($107|0),5)|0); $109 = tempRet0; $110 = $108 & 33554431; - $111 = (($output) + 24|0); + $111 = ((($output)) + 24|0); $112 = $111; $113 = $112; HEAP32[$113>>2] = $110; @@ -5561,20 +6305,20 @@ function _fexpand($output,$input) { HEAP32[$115>>2] = 0; $116 = HEAP8[$101>>0]|0; $117 = $116&255; - $118 = (($input) + 13|0); + $118 = ((($input)) + 13|0); $119 = HEAP8[$118>>0]|0; $120 = $119&255; $121 = (_bitshift64Shl(($120|0),0,8)|0); $122 = tempRet0; $123 = $121 | $117; - $124 = (($input) + 14|0); + $124 = ((($input)) + 14|0); $125 = HEAP8[$124>>0]|0; $126 = $125&255; $127 = (_bitshift64Shl(($126|0),0,16)|0); $128 = tempRet0; $129 = $123 | $127; $130 = $122 | $128; - $131 = (($input) + 15|0); + $131 = ((($input)) + 15|0); $132 = HEAP8[$131>>0]|0; $133 = $132&255; $134 = (_bitshift64Shl(($133|0),0,24)|0); @@ -5584,37 +6328,37 @@ function _fexpand($output,$input) { $138 = (_bitshift64Lshr(($136|0),($137|0),6)|0); $139 = tempRet0; $140 = $138 & 67108863; - $141 = (($output) + 32|0); + $141 = ((($output)) + 32|0); $142 = $141; $143 = $142; HEAP32[$143>>2] = $140; $144 = (($142) + 4)|0; $145 = $144; HEAP32[$145>>2] = 0; - $146 = (($input) + 16|0); + $146 = ((($input)) + 16|0); $147 = HEAP8[$146>>0]|0; $148 = $147&255; - $149 = (($input) + 17|0); + $149 = ((($input)) + 17|0); $150 = HEAP8[$149>>0]|0; $151 = $150&255; $152 = (_bitshift64Shl(($151|0),0,8)|0); $153 = tempRet0; $154 = $152 | $148; - $155 = (($input) + 18|0); + $155 = ((($input)) + 18|0); $156 = HEAP8[$155>>0]|0; $157 = $156&255; $158 = (_bitshift64Shl(($157|0),0,16)|0); $159 = tempRet0; $160 = $154 | $158; $161 = $153 | $159; - $162 = (($input) + 19|0); + $162 = ((($input)) + 19|0); $163 = HEAP8[$162>>0]|0; $164 = $163&255; $165 = (_bitshift64Shl(($164|0),0,24)|0); $166 = tempRet0; $167 = $165 & 16777216; $168 = $160 | $167; - $169 = (($output) + 40|0); + $169 = ((($output)) + 40|0); $170 = $169; $171 = $170; HEAP32[$171>>2] = $168; @@ -5623,20 +6367,20 @@ function _fexpand($output,$input) { HEAP32[$173>>2] = $161; $174 = HEAP8[$162>>0]|0; $175 = $174&255; - $176 = (($input) + 20|0); + $176 = ((($input)) + 20|0); $177 = HEAP8[$176>>0]|0; $178 = $177&255; $179 = (_bitshift64Shl(($178|0),0,8)|0); $180 = tempRet0; $181 = $179 | $175; - $182 = (($input) + 21|0); + $182 = ((($input)) + 21|0); $183 = HEAP8[$182>>0]|0; $184 = $183&255; $185 = (_bitshift64Shl(($184|0),0,16)|0); $186 = tempRet0; $187 = $181 | $185; $188 = $180 | $186; - $189 = (($input) + 22|0); + $189 = ((($input)) + 22|0); $190 = HEAP8[$189>>0]|0; $191 = $190&255; $192 = (_bitshift64Shl(($191|0),0,24)|0); @@ -5646,7 +6390,7 @@ function _fexpand($output,$input) { $196 = (_bitshift64Lshr(($194|0),($195|0),1)|0); $197 = tempRet0; $198 = $196 & 67108863; - $199 = (($output) + 48|0); + $199 = ((($output)) + 48|0); $200 = $199; $201 = $200; HEAP32[$201>>2] = $198; @@ -5655,20 +6399,20 @@ function _fexpand($output,$input) { HEAP32[$203>>2] = 0; $204 = HEAP8[$189>>0]|0; $205 = $204&255; - $206 = (($input) + 23|0); + $206 = ((($input)) + 23|0); $207 = HEAP8[$206>>0]|0; $208 = $207&255; $209 = (_bitshift64Shl(($208|0),0,8)|0); $210 = tempRet0; $211 = $209 | $205; - $212 = (($input) + 24|0); + $212 = ((($input)) + 24|0); $213 = HEAP8[$212>>0]|0; $214 = $213&255; $215 = (_bitshift64Shl(($214|0),0,16)|0); $216 = tempRet0; $217 = $211 | $215; $218 = $210 | $216; - $219 = (($input) + 25|0); + $219 = ((($input)) + 25|0); $220 = HEAP8[$219>>0]|0; $221 = $220&255; $222 = (_bitshift64Shl(($221|0),0,24)|0); @@ -5678,7 +6422,7 @@ function _fexpand($output,$input) { $226 = (_bitshift64Lshr(($224|0),($225|0),3)|0); $227 = tempRet0; $228 = $226 & 33554431; - $229 = (($output) + 56|0); + $229 = ((($output)) + 56|0); $230 = $229; $231 = $230; HEAP32[$231>>2] = $228; @@ -5687,20 +6431,20 @@ function _fexpand($output,$input) { HEAP32[$233>>2] = 0; $234 = HEAP8[$219>>0]|0; $235 = $234&255; - $236 = (($input) + 26|0); + $236 = ((($input)) + 26|0); $237 = HEAP8[$236>>0]|0; $238 = $237&255; $239 = (_bitshift64Shl(($238|0),0,8)|0); $240 = tempRet0; $241 = $239 | $235; - $242 = (($input) + 27|0); + $242 = ((($input)) + 27|0); $243 = HEAP8[$242>>0]|0; $244 = $243&255; $245 = (_bitshift64Shl(($244|0),0,16)|0); $246 = tempRet0; $247 = $241 | $245; $248 = $240 | $246; - $249 = (($input) + 28|0); + $249 = ((($input)) + 28|0); $250 = HEAP8[$249>>0]|0; $251 = $250&255; $252 = (_bitshift64Shl(($251|0),0,24)|0); @@ -5710,7 +6454,7 @@ function _fexpand($output,$input) { $256 = (_bitshift64Lshr(($254|0),($255|0),4)|0); $257 = tempRet0; $258 = $256 & 67108863; - $259 = (($output) + 64|0); + $259 = ((($output)) + 64|0); $260 = $259; $261 = $260; HEAP32[$261>>2] = $258; @@ -5719,20 +6463,20 @@ function _fexpand($output,$input) { HEAP32[$263>>2] = 0; $264 = HEAP8[$249>>0]|0; $265 = $264&255; - $266 = (($input) + 29|0); + $266 = ((($input)) + 29|0); $267 = HEAP8[$266>>0]|0; $268 = $267&255; $269 = (_bitshift64Shl(($268|0),0,8)|0); $270 = tempRet0; $271 = $269 | $265; - $272 = (($input) + 30|0); + $272 = ((($input)) + 30|0); $273 = HEAP8[$272>>0]|0; $274 = $273&255; $275 = (_bitshift64Shl(($274|0),0,16)|0); $276 = tempRet0; $277 = $271 | $275; $278 = $270 | $276; - $279 = (($input) + 31|0); + $279 = ((($input)) + 31|0); $280 = HEAP8[$279>>0]|0; $281 = $280&255; $282 = (_bitshift64Shl(($281|0),0,24)|0); @@ -5742,14 +6486,14 @@ function _fexpand($output,$input) { $286 = (_bitshift64Lshr(($284|0),($285|0),6)|0); $287 = tempRet0; $288 = $286 & 33554431; - $289 = (($output) + 72|0); + $289 = ((($output)) + 72|0); $290 = $289; $291 = $290; HEAP32[$291>>2] = $288; $292 = (($290) + 4)|0; $293 = $292; HEAP32[$293>>2] = 0; - STACKTOP = sp;return; + return; } function _cmult($resultx,$resultz,$n,$q) { $resultx = $resultx|0; @@ -5758,8 +6502,8 @@ function _cmult($resultx,$resultz,$n,$q) { $q = $q|0; var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0; var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $b = 0, $byte$09 = 0, $c = 0, $d = 0, $e = 0, $exitcond = 0, $exitcond20 = 0, $f = 0, $g = 0, $h = 0, $i$018 = 0, $j$08 = 0, $nqpqx$019 = 0, $nqpqx$110 = 0; - var $nqpqx$110$phi = 0, $nqpqx2$014 = 0, $nqpqx2$14 = 0, $nqpqx2$14$phi = 0, $nqpqz$013 = 0, $nqpqz$13 = 0, $nqpqz$13$phi = 0, $nqpqz2$015 = 0, $nqpqz2$15 = 0, $nqpqz2$15$phi = 0, $nqx$011 = 0, $nqx$11 = 0, $nqx$11$phi = 0, $nqx2$016 = 0, $nqx2$16 = 0, $nqx2$16$phi = 0, $nqz$012 = 0, $nqz$12 = 0, $nqz$12$phi = 0, $nqz2$017 = 0; - var $nqz2$17 = 0, $nqz2$17$phi = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $nqpqx$110$lcssa = 0, $nqpqx$110$phi = 0, $nqpqx2$014 = 0, $nqpqx2$14 = 0, $nqpqx2$14$lcssa = 0, $nqpqx2$14$phi = 0, $nqpqz$013 = 0, $nqpqz$13 = 0, $nqpqz$13$lcssa = 0, $nqpqz$13$phi = 0, $nqpqz2$015 = 0, $nqpqz2$15 = 0, $nqpqz2$15$lcssa = 0, $nqpqz2$15$phi = 0, $nqx$011 = 0, $nqx$11 = 0, $nqx$11$lcssa = 0, $nqx$11$phi = 0, $nqx2$016 = 0, $nqx2$16 = 0; + var $nqx2$16$lcssa = 0, $nqx2$16$lcssa$lcssa = 0, $nqx2$16$phi = 0, $nqz$012 = 0, $nqz$12 = 0, $nqz$12$lcssa = 0, $nqz$12$phi = 0, $nqz2$017 = 0, $nqz2$17 = 0, $nqz2$17$lcssa = 0, $nqz2$17$lcssa$lcssa = 0, $nqz2$17$phi = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 1216|0; $a = sp + 1064|0; @@ -5802,7 +6546,7 @@ function _cmult($resultx,$resultz,$n,$q) { $14 = (($12) + 4)|0; $15 = $14; HEAP32[$15>>2] = 0; - dest=$a+0|0; src=$q+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$a; src=$q; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $i$018 = 0;$nqpqx$019 = $a;$nqpqx2$014 = $e;$nqpqz$013 = $b;$nqpqz2$015 = $f;$nqx$011 = $c;$nqx2$016 = $g;$nqz$012 = $d;$nqz2$017 = $h; while(1) { $16 = (31 - ($i$018))|0; @@ -5822,6 +6566,7 @@ function _cmult($resultx,$resultz,$n,$q) { $23 = (($j$08) + 1)|0; $exitcond = ($23|0)==(8); if ($exitcond) { + $nqpqx$110$lcssa = $nqpqx$110;$nqpqx2$14$lcssa = $nqpqx2$14;$nqpqz$13$lcssa = $nqpqz$13;$nqpqz2$15$lcssa = $nqpqz2$15;$nqx$11$lcssa = $nqx$11;$nqx2$16$lcssa = $nqx2$16;$nqz$12$lcssa = $nqz$12;$nqz2$17$lcssa = $nqz2$17; break; } else { $nqz2$17$phi = $nqz$12;$nqz$12$phi = $nqz2$17;$nqx2$16$phi = $nqx$11;$nqx$11$phi = $nqx2$16;$nqpqz2$15$phi = $nqpqz$13;$nqpqz$13$phi = $nqpqz2$15;$nqpqx2$14$phi = $nqpqx$110;$nqpqx$110$phi = $nqpqx2$14;$byte$09 = $22;$j$08 = $23;$nqz2$17 = $nqz2$17$phi;$nqz$12 = $nqz$12$phi;$nqx2$16 = $nqx2$16$phi;$nqx$11 = $nqx$11$phi;$nqpqz2$15 = $nqpqz2$15$phi;$nqpqz$13 = $nqpqz$13$phi;$nqpqx2$14 = $nqpqx2$14$phi;$nqpqx$110 = $nqpqx$110$phi; @@ -5830,13 +6575,14 @@ function _cmult($resultx,$resultz,$n,$q) { $24 = (($i$018) + 1)|0; $exitcond20 = ($24|0)==(32); if ($exitcond20) { + $nqx2$16$lcssa$lcssa = $nqx2$16$lcssa;$nqz2$17$lcssa$lcssa = $nqz2$17$lcssa; break; } else { - $i$018 = $24;$nqpqx$019 = $nqpqx2$14;$nqpqx2$014 = $nqpqx$110;$nqpqz$013 = $nqpqz2$15;$nqpqz2$015 = $nqpqz$13;$nqx$011 = $nqx2$16;$nqx2$016 = $nqx$11;$nqz$012 = $nqz2$17;$nqz2$017 = $nqz$12; + $i$018 = $24;$nqpqx$019 = $nqpqx2$14$lcssa;$nqpqx2$014 = $nqpqx$110$lcssa;$nqpqz$013 = $nqpqz2$15$lcssa;$nqpqz2$015 = $nqpqz$13$lcssa;$nqx$011 = $nqx2$16$lcssa;$nqx2$016 = $nqx$11$lcssa;$nqz$012 = $nqz2$17$lcssa;$nqz2$017 = $nqz$12$lcssa; } } - dest=$resultx+0|0; src=$nqx2$16+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$resultz+0|0; src=$nqz2$17+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$resultx; src=$nqx2$16$lcssa$lcssa; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$resultz; src=$nqz2$17$lcssa$lcssa; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); STACKTOP = sp;return; } function _crecip($out,$z) { @@ -5976,34 +6722,35 @@ function _fmul($output,$in,$in2) { _fproduct($t,$in,$in2); _freduce_degree($t); _freduce_coefficients($t); - dest=$output+0|0; src=$t+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$output; src=$t; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); STACKTOP = sp;return; } function _fcontract($output,$input_limbs) { $output = $output|0; $input_limbs = $input_limbs|0; - var $$pn = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; - var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; - var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; - var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0; - var $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0; - var $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0; - var $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0; - var $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0; - var $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0; - var $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0; - var $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0; - var $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0; - var $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0; - var $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0; - var $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0; - var $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0; - var $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0; - var $403 = 0, $404 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; - var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; - var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0; - var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond11 = 0, $exitcond11$1 = 0, $exitcond14 = 0, $exitcond14$1 = 0, $i$17 = 0, $i$17$1 = 0, $i$24 = 0, $i$24$1 = 0, $i$33 = 0, $input = 0, $mask$02 = 0, $mask$1 = 0, label = 0; - var sp = 0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; + var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; + var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; + var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; + var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0; + var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0; + var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0; + var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; + var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; + var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; + var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; + var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; + var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0; + var $422 = 0, $423 = 0, $424 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; + var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; + var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0; + var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond$1 = 0, $exitcond13 = 0, $exitcond13$1 = 0, $i$18 = 0, $i$18$1 = 0, $i$26 = 0, $i$26$1 = 0, $input = 0, $mask$1 = 0, $mask$1$1 = 0, $mask$1$2 = 0, $mask$1$3 = 0, $mask$1$4 = 0, $mask$1$5 = 0; + var $mask$1$6 = 0, $mask$1$7 = 0, $mask$1$8 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $input = sp; @@ -6014,93 +6761,93 @@ function _fcontract($output,$input_limbs) { $4 = $3; $5 = HEAP32[$4>>2]|0; HEAP32[$input>>2] = $2; - $6 = (($input_limbs) + 8|0); + $6 = ((($input_limbs)) + 8|0); $7 = $6; $8 = $7; $9 = HEAP32[$8>>2]|0; $10 = (($7) + 4)|0; $11 = $10; $12 = HEAP32[$11>>2]|0; - $13 = (($input) + 4|0); + $13 = ((($input)) + 4|0); HEAP32[$13>>2] = $9; - $14 = (($input_limbs) + 16|0); + $14 = ((($input_limbs)) + 16|0); $15 = $14; $16 = $15; $17 = HEAP32[$16>>2]|0; $18 = (($15) + 4)|0; $19 = $18; $20 = HEAP32[$19>>2]|0; - $21 = (($input) + 8|0); + $21 = ((($input)) + 8|0); HEAP32[$21>>2] = $17; - $22 = (($input_limbs) + 24|0); + $22 = ((($input_limbs)) + 24|0); $23 = $22; $24 = $23; $25 = HEAP32[$24>>2]|0; $26 = (($23) + 4)|0; $27 = $26; $28 = HEAP32[$27>>2]|0; - $29 = (($input) + 12|0); + $29 = ((($input)) + 12|0); HEAP32[$29>>2] = $25; - $30 = (($input_limbs) + 32|0); + $30 = ((($input_limbs)) + 32|0); $31 = $30; $32 = $31; $33 = HEAP32[$32>>2]|0; $34 = (($31) + 4)|0; $35 = $34; $36 = HEAP32[$35>>2]|0; - $37 = (($input) + 16|0); + $37 = ((($input)) + 16|0); HEAP32[$37>>2] = $33; - $38 = (($input_limbs) + 40|0); + $38 = ((($input_limbs)) + 40|0); $39 = $38; $40 = $39; $41 = HEAP32[$40>>2]|0; $42 = (($39) + 4)|0; $43 = $42; $44 = HEAP32[$43>>2]|0; - $45 = (($input) + 20|0); + $45 = ((($input)) + 20|0); HEAP32[$45>>2] = $41; - $46 = (($input_limbs) + 48|0); + $46 = ((($input_limbs)) + 48|0); $47 = $46; $48 = $47; $49 = HEAP32[$48>>2]|0; $50 = (($47) + 4)|0; $51 = $50; $52 = HEAP32[$51>>2]|0; - $53 = (($input) + 24|0); + $53 = ((($input)) + 24|0); HEAP32[$53>>2] = $49; - $54 = (($input_limbs) + 56|0); + $54 = ((($input_limbs)) + 56|0); $55 = $54; $56 = $55; $57 = HEAP32[$56>>2]|0; $58 = (($55) + 4)|0; $59 = $58; $60 = HEAP32[$59>>2]|0; - $61 = (($input) + 28|0); + $61 = ((($input)) + 28|0); HEAP32[$61>>2] = $57; - $62 = (($input_limbs) + 64|0); + $62 = ((($input_limbs)) + 64|0); $63 = $62; $64 = $63; $65 = HEAP32[$64>>2]|0; $66 = (($63) + 4)|0; $67 = $66; $68 = HEAP32[$67>>2]|0; - $69 = (($input) + 32|0); + $69 = ((($input)) + 32|0); HEAP32[$69>>2] = $65; - $70 = (($input_limbs) + 72|0); + $70 = ((($input_limbs)) + 72|0); $71 = $70; $72 = $71; $73 = HEAP32[$72>>2]|0; $74 = (($71) + 4)|0; $75 = $74; $76 = HEAP32[$75>>2]|0; - $77 = (($input) + 36|0); + $77 = ((($input)) + 36|0); HEAP32[$77>>2] = $73; - $78 = (($input) + 36|0); - $i$17 = 0; + $78 = ((($input)) + 36|0); + $i$18 = 0; while(1) { - $79 = $i$17 & 1; + $79 = $i$18 & 1; $80 = ($79|0)==(0); - $81 = (($input) + ($i$17<<2)|0); + $81 = (($input) + ($i$18<<2)|0); $82 = HEAP32[$81>>2]|0; $83 = $82 >> 31; $84 = $83 & $82; @@ -6109,7 +6856,7 @@ function _fcontract($output,$input_limbs) { $93 = Math_imul($92, -67108864)|0; $94 = (($93) + ($82))|0; HEAP32[$81>>2] = $94; - $95 = (($i$17) + 1)|0; + $95 = (($i$18) + 1)|0; $96 = (($input) + ($95<<2)|0); $97 = HEAP32[$96>>2]|0; $98 = (($97) + ($92))|0; @@ -6119,18 +6866,18 @@ function _fcontract($output,$input_limbs) { $86 = Math_imul($85, -33554432)|0; $87 = (($86) + ($82))|0; HEAP32[$81>>2] = $87; - $88 = (($i$17) + 1)|0; + $88 = (($i$18) + 1)|0; $89 = (($input) + ($88<<2)|0); $90 = HEAP32[$89>>2]|0; $91 = (($90) + ($85))|0; HEAP32[$89>>2] = $91; } - $99 = (($i$17) + 1)|0; - $exitcond14 = ($99|0)==(9); - if ($exitcond14) { + $99 = (($i$18) + 1)|0; + $exitcond13 = ($99|0)==(9); + if ($exitcond13) { break; } else { - $i$17 = $99; + $i$18 = $99; } } $100 = HEAP32[$78>>2]|0; @@ -6144,41 +6891,41 @@ function _fcontract($output,$input_limbs) { $107 = ($103*19)|0; $108 = (($107) + ($106))|0; HEAP32[$input>>2] = $108; - $i$17$1 = 0; + $i$18$1 = 0; while(1) { - $384 = $i$17$1 & 1; - $385 = ($384|0)==(0); - $386 = (($input) + ($i$17$1<<2)|0); - $387 = HEAP32[$386>>2]|0; - $388 = $387 >> 31; - $389 = $388 & $387; - if ($385) { - $397 = $389 >> 26; - $398 = Math_imul($397, -67108864)|0; - $399 = (($398) + ($387))|0; - HEAP32[$386>>2] = $399; - $400 = (($i$17$1) + 1)|0; - $401 = (($input) + ($400<<2)|0); - $402 = HEAP32[$401>>2]|0; - $403 = (($402) + ($397))|0; - HEAP32[$401>>2] = $403; + $404 = $i$18$1 & 1; + $405 = ($404|0)==(0); + $406 = (($input) + ($i$18$1<<2)|0); + $407 = HEAP32[$406>>2]|0; + $408 = $407 >> 31; + $409 = $408 & $407; + if ($405) { + $417 = $409 >> 26; + $418 = Math_imul($417, -67108864)|0; + $419 = (($418) + ($407))|0; + HEAP32[$406>>2] = $419; + $420 = (($i$18$1) + 1)|0; + $421 = (($input) + ($420<<2)|0); + $422 = HEAP32[$421>>2]|0; + $423 = (($422) + ($417))|0; + HEAP32[$421>>2] = $423; } else { - $390 = $389 >> 25; - $391 = Math_imul($390, -33554432)|0; - $392 = (($391) + ($387))|0; - HEAP32[$386>>2] = $392; - $393 = (($i$17$1) + 1)|0; - $394 = (($input) + ($393<<2)|0); - $395 = HEAP32[$394>>2]|0; - $396 = (($395) + ($390))|0; - HEAP32[$394>>2] = $396; + $410 = $409 >> 25; + $411 = Math_imul($410, -33554432)|0; + $412 = (($411) + ($407))|0; + HEAP32[$406>>2] = $412; + $413 = (($i$18$1) + 1)|0; + $414 = (($input) + ($413<<2)|0); + $415 = HEAP32[$414>>2]|0; + $416 = (($415) + ($410))|0; + HEAP32[$414>>2] = $416; } - $404 = (($i$17$1) + 1)|0; - $exitcond14$1 = ($404|0)==(9); - if ($exitcond14$1) { + $424 = (($i$18$1) + 1)|0; + $exitcond13$1 = ($424|0)==(9); + if ($exitcond13$1) { break; } else { - $i$17$1 = $404; + $i$18$1 = $424; } } $109 = HEAP32[$78>>2]|0; @@ -6197,22 +6944,22 @@ function _fcontract($output,$input_limbs) { $121 = Math_imul($120, -67108864)|0; $122 = (($121) + ($117))|0; HEAP32[$input>>2] = $122; - $123 = (($input) + 4|0); + $123 = ((($input)) + 4|0); $124 = HEAP32[$123>>2]|0; $125 = (($120) + ($124))|0; HEAP32[$123>>2] = $125; - $126 = (($input) + 36|0); - $i$24 = 0; + $126 = ((($input)) + 36|0); + $i$26 = 0; while(1) { - $127 = $i$24 & 1; + $127 = $i$26 & 1; $128 = ($127|0)==(0); - $129 = (($input) + ($i$24<<2)|0); + $129 = (($input) + ($i$26<<2)|0); $130 = HEAP32[$129>>2]|0; if ($128) { $137 = $130 >> 26; $138 = $130 & 67108863; HEAP32[$129>>2] = $138; - $139 = (($i$24) + 1)|0; + $139 = (($i$26) + 1)|0; $140 = (($input) + ($139<<2)|0); $141 = HEAP32[$140>>2]|0; $142 = (($141) + ($137))|0; @@ -6221,18 +6968,18 @@ function _fcontract($output,$input_limbs) { $131 = $130 >> 25; $132 = $130 & 33554431; HEAP32[$129>>2] = $132; - $133 = (($i$24) + 1)|0; + $133 = (($i$26) + 1)|0; $134 = (($input) + ($133<<2)|0); $135 = HEAP32[$134>>2]|0; $136 = (($135) + ($131))|0; HEAP32[$134>>2] = $136; } - $143 = (($i$24) + 1)|0; - $exitcond11 = ($143|0)==(9); - if ($exitcond11) { + $143 = (($i$26) + 1)|0; + $exitcond = ($143|0)==(9); + if ($exitcond) { break; } else { - $i$24 = $143; + $i$26 = $143; } } $144 = HEAP32[$126>>2]|0; @@ -6243,466 +6990,369 @@ function _fcontract($output,$input_limbs) { $148 = HEAP32[$input>>2]|0; $149 = (($147) + ($148))|0; HEAP32[$input>>2] = $149; - $i$24$1 = 0; + $i$26$1 = 0; while(1) { - $360 = $i$24$1 & 1; - $361 = ($360|0)==(0); - $362 = (($input) + ($i$24$1<<2)|0); - $363 = HEAP32[$362>>2]|0; - if ($361) { - $370 = $363 >> 26; - $371 = $363 & 67108863; - HEAP32[$362>>2] = $371; - $372 = (($i$24$1) + 1)|0; - $373 = (($input) + ($372<<2)|0); - $374 = HEAP32[$373>>2]|0; - $375 = (($374) + ($370))|0; - HEAP32[$373>>2] = $375; + $387 = $i$26$1 & 1; + $388 = ($387|0)==(0); + $389 = (($input) + ($i$26$1<<2)|0); + $390 = HEAP32[$389>>2]|0; + if ($388) { + $397 = $390 >> 26; + $398 = $390 & 67108863; + HEAP32[$389>>2] = $398; + $399 = (($i$26$1) + 1)|0; + $400 = (($input) + ($399<<2)|0); + $401 = HEAP32[$400>>2]|0; + $402 = (($401) + ($397))|0; + HEAP32[$400>>2] = $402; } else { - $364 = $363 >> 25; - $365 = $363 & 33554431; - HEAP32[$362>>2] = $365; - $366 = (($i$24$1) + 1)|0; - $367 = (($input) + ($366<<2)|0); - $368 = HEAP32[$367>>2]|0; - $369 = (($368) + ($364))|0; - HEAP32[$367>>2] = $369; - } - $376 = (($i$24$1) + 1)|0; - $exitcond11$1 = ($376|0)==(9); - if ($exitcond11$1) { - break; - } else { - $i$24$1 = $376; - } - } - $377 = HEAP32[$126>>2]|0; - $378 = $377 >> 25; - $379 = $377 & 33554431; - HEAP32[$126>>2] = $379; - $380 = ($378*19)|0; - $381 = HEAP32[$input>>2]|0; - $382 = (($380) + ($381))|0; - HEAP32[$input>>2] = $382; - $383 = (_s32_gte($382)|0); - $i$33 = 1;$mask$02 = $383; - while(1) { - $150 = $i$33 & 1; - $151 = ($150|0)==(0); - $152 = (($input) + ($i$33<<2)|0); - $153 = HEAP32[$152>>2]|0; - if ($151) { - $155 = (_s32_eq($153,67108863)|0); - $$pn = $155; - } else { - $154 = (_s32_eq($153,33554431)|0); - $$pn = $154; + $391 = $390 >> 25; + $392 = $390 & 33554431; + HEAP32[$389>>2] = $392; + $393 = (($i$26$1) + 1)|0; + $394 = (($input) + ($393<<2)|0); + $395 = HEAP32[$394>>2]|0; + $396 = (($395) + ($391))|0; + HEAP32[$394>>2] = $396; } - $mask$1 = $$pn & $mask$02; - $156 = (($i$33) + 1)|0; - $exitcond = ($156|0)==(10); - if ($exitcond) { + $403 = (($i$26$1) + 1)|0; + $exitcond$1 = ($403|0)==(9); + if ($exitcond$1) { break; } else { - $i$33 = $156;$mask$02 = $mask$1; + $i$26$1 = $403; } } - $157 = $mask$1 & 67108845; - $158 = HEAP32[$input>>2]|0; - $159 = (($158) - ($157))|0; - HEAP32[$input>>2] = $159; - $160 = $mask$1 & 67108863; - $161 = $mask$1 & 33554431; - $162 = (($input) + 4|0); - $163 = HEAP32[$162>>2]|0; - $164 = (($163) - ($161))|0; - HEAP32[$162>>2] = $164; - $165 = (($input) + 8|0); - $166 = HEAP32[$165>>2]|0; - $167 = (($166) - ($160))|0; - HEAP32[$165>>2] = $167; - $168 = (($input) + 12|0); - $169 = HEAP32[$168>>2]|0; - $170 = (($169) - ($161))|0; - HEAP32[$168>>2] = $170; - $171 = (($input) + 16|0); - $172 = HEAP32[$171>>2]|0; - $173 = (($172) - ($160))|0; - HEAP32[$171>>2] = $173; - $174 = (($input) + 20|0); - $175 = HEAP32[$174>>2]|0; - $176 = (($175) - ($161))|0; - HEAP32[$174>>2] = $176; - $177 = (($input) + 24|0); - $178 = HEAP32[$177>>2]|0; - $179 = (($178) - ($160))|0; - HEAP32[$177>>2] = $179; - $180 = (($input) + 28|0); - $181 = HEAP32[$180>>2]|0; - $182 = (($181) - ($161))|0; - HEAP32[$180>>2] = $182; - $183 = (($input) + 32|0); - $184 = HEAP32[$183>>2]|0; - $185 = (($184) - ($160))|0; - HEAP32[$183>>2] = $185; - $186 = (($input) + 36|0); - $187 = HEAP32[$186>>2]|0; - $188 = (($187) - ($161))|0; - HEAP32[$186>>2] = $188; - $189 = HEAP32[$123>>2]|0; - $190 = $189 << 2; - HEAP32[$123>>2] = $190; - $191 = (($input) + 8|0); - $192 = HEAP32[$191>>2]|0; - $193 = $192 << 3; - HEAP32[$191>>2] = $193; - $194 = (($input) + 12|0); - $195 = HEAP32[$194>>2]|0; - $196 = $195 << 5; - HEAP32[$194>>2] = $196; - $197 = (($input) + 16|0); - $198 = HEAP32[$197>>2]|0; - $199 = $198 << 6; - HEAP32[$197>>2] = $199; - $200 = (($input) + 24|0); - $201 = HEAP32[$200>>2]|0; - $202 = $201 << 1; - HEAP32[$200>>2] = $202; - $203 = (($input) + 28|0); - $204 = HEAP32[$203>>2]|0; - $205 = $204 << 3; - HEAP32[$203>>2] = $205; - $206 = (($input) + 32|0); - $207 = HEAP32[$206>>2]|0; - $208 = $207 << 4; - HEAP32[$206>>2] = $208; - $209 = (($input) + 36|0); - $210 = HEAP32[$209>>2]|0; - $211 = $210 << 6; - HEAP32[$209>>2] = $211; + $150 = HEAP32[$126>>2]|0; + $151 = $150 >> 25; + $152 = $150 & 33554431; + HEAP32[$126>>2] = $152; + $153 = ($151*19)|0; + $154 = HEAP32[$input>>2]|0; + $155 = (($153) + ($154))|0; + HEAP32[$input>>2] = $155; + $156 = (_s32_gte($155)|0); + $157 = ((($input)) + 4|0); + $158 = HEAP32[$157>>2]|0; + $159 = (_s32_eq($158,33554431)|0); + $mask$1 = $159 & $156; + $160 = ((($input)) + 8|0); + $161 = HEAP32[$160>>2]|0; + $162 = (_s32_eq($161,67108863)|0); + $mask$1$1 = $162 & $mask$1; + $163 = ((($input)) + 12|0); + $164 = HEAP32[$163>>2]|0; + $165 = (_s32_eq($164,33554431)|0); + $mask$1$2 = $165 & $mask$1$1; + $166 = ((($input)) + 16|0); + $167 = HEAP32[$166>>2]|0; + $168 = (_s32_eq($167,67108863)|0); + $mask$1$3 = $168 & $mask$1$2; + $169 = ((($input)) + 20|0); + $170 = HEAP32[$169>>2]|0; + $171 = (_s32_eq($170,33554431)|0); + $mask$1$4 = $171 & $mask$1$3; + $172 = ((($input)) + 24|0); + $173 = HEAP32[$172>>2]|0; + $174 = (_s32_eq($173,67108863)|0); + $mask$1$5 = $174 & $mask$1$4; + $175 = ((($input)) + 28|0); + $176 = HEAP32[$175>>2]|0; + $177 = (_s32_eq($176,33554431)|0); + $mask$1$6 = $177 & $mask$1$5; + $178 = ((($input)) + 32|0); + $179 = HEAP32[$178>>2]|0; + $180 = (_s32_eq($179,67108863)|0); + $mask$1$7 = $180 & $mask$1$6; + $181 = ((($input)) + 36|0); + $182 = HEAP32[$181>>2]|0; + $183 = (_s32_eq($182,33554431)|0); + $mask$1$8 = $183 & $mask$1$7; + $184 = $mask$1$8 & 67108845; + $185 = HEAP32[$input>>2]|0; + $186 = (($185) - ($184))|0; + HEAP32[$input>>2] = $186; + $187 = $mask$1$8 & 67108863; + $188 = $mask$1$8 & 33554431; + $189 = ((($input)) + 4|0); + $190 = HEAP32[$189>>2]|0; + $191 = (($190) - ($188))|0; + HEAP32[$189>>2] = $191; + $192 = ((($input)) + 8|0); + $193 = HEAP32[$192>>2]|0; + $194 = (($193) - ($187))|0; + HEAP32[$192>>2] = $194; + $195 = ((($input)) + 12|0); + $196 = HEAP32[$195>>2]|0; + $197 = (($196) - ($188))|0; + HEAP32[$195>>2] = $197; + $198 = ((($input)) + 16|0); + $199 = HEAP32[$198>>2]|0; + $200 = (($199) - ($187))|0; + HEAP32[$198>>2] = $200; + $201 = ((($input)) + 20|0); + $202 = HEAP32[$201>>2]|0; + $203 = (($202) - ($188))|0; + HEAP32[$201>>2] = $203; + $204 = ((($input)) + 24|0); + $205 = HEAP32[$204>>2]|0; + $206 = (($205) - ($187))|0; + HEAP32[$204>>2] = $206; + $207 = ((($input)) + 28|0); + $208 = HEAP32[$207>>2]|0; + $209 = (($208) - ($188))|0; + HEAP32[$207>>2] = $209; + $210 = ((($input)) + 32|0); + $211 = HEAP32[$210>>2]|0; + $212 = (($211) - ($187))|0; + HEAP32[$210>>2] = $212; + $213 = ((($input)) + 36|0); + $214 = HEAP32[$213>>2]|0; + $215 = (($214) - ($188))|0; + HEAP32[$213>>2] = $215; + $216 = HEAP32[$123>>2]|0; + $217 = $216 << 2; + HEAP32[$123>>2] = $217; + $218 = ((($input)) + 8|0); + $219 = HEAP32[$218>>2]|0; + $220 = $219 << 3; + HEAP32[$218>>2] = $220; + $221 = ((($input)) + 12|0); + $222 = HEAP32[$221>>2]|0; + $223 = $222 << 5; + HEAP32[$221>>2] = $223; + $224 = ((($input)) + 16|0); + $225 = HEAP32[$224>>2]|0; + $226 = $225 << 6; + HEAP32[$224>>2] = $226; + $227 = ((($input)) + 24|0); + $228 = HEAP32[$227>>2]|0; + $229 = $228 << 1; + HEAP32[$227>>2] = $229; + $230 = ((($input)) + 28|0); + $231 = HEAP32[$230>>2]|0; + $232 = $231 << 3; + HEAP32[$230>>2] = $232; + $233 = ((($input)) + 32|0); + $234 = HEAP32[$233>>2]|0; + $235 = $234 << 4; + HEAP32[$233>>2] = $235; + $236 = ((($input)) + 36|0); + $237 = HEAP32[$236>>2]|0; + $238 = $237 << 6; + HEAP32[$236>>2] = $238; HEAP8[$output>>0] = 0; - $212 = (($output) + 16|0); - HEAP8[$212>>0] = 0; - $213 = HEAP32[$input>>2]|0; - $214 = HEAP8[$output>>0]|0; - $215 = $214&255; - $216 = $215 | $213; - $217 = $216&255; - HEAP8[$output>>0] = $217; - $218 = HEAP32[$input>>2]|0; - $219 = $218 >>> 8; - $220 = $219&255; - $221 = (($output) + 1|0); - HEAP8[$221>>0] = $220; - $222 = HEAP32[$input>>2]|0; - $223 = $222 >>> 16; - $224 = $223&255; - $225 = (($output) + 2|0); - HEAP8[$225>>0] = $224; - $226 = HEAP32[$input>>2]|0; - $227 = $226 >>> 24; - $228 = (($output) + 3|0); - $229 = HEAP32[$123>>2]|0; - $230 = $227 | $229; - $231 = $230&255; - HEAP8[$228>>0] = $231; - $232 = HEAP32[$123>>2]|0; - $233 = $232 >>> 8; - $234 = $233&255; - $235 = (($output) + 4|0); - HEAP8[$235>>0] = $234; - $236 = HEAP32[$123>>2]|0; - $237 = $236 >>> 16; - $238 = $237&255; - $239 = (($output) + 5|0); - HEAP8[$239>>0] = $238; - $240 = HEAP32[$123>>2]|0; - $241 = $240 >>> 24; - $242 = (($output) + 6|0); - $243 = HEAP32[$191>>2]|0; - $244 = $241 | $243; - $245 = $244&255; - HEAP8[$242>>0] = $245; - $246 = HEAP32[$191>>2]|0; - $247 = $246 >>> 8; - $248 = $247&255; - $249 = (($output) + 7|0); - HEAP8[$249>>0] = $248; - $250 = HEAP32[$191>>2]|0; - $251 = $250 >>> 16; - $252 = $251&255; - $253 = (($output) + 8|0); - HEAP8[$253>>0] = $252; - $254 = HEAP32[$191>>2]|0; - $255 = $254 >>> 24; - $256 = (($output) + 9|0); - $257 = HEAP32[$194>>2]|0; - $258 = $255 | $257; - $259 = $258&255; - HEAP8[$256>>0] = $259; - $260 = HEAP32[$194>>2]|0; - $261 = $260 >>> 8; - $262 = $261&255; - $263 = (($output) + 10|0); - HEAP8[$263>>0] = $262; - $264 = HEAP32[$194>>2]|0; - $265 = $264 >>> 16; - $266 = $265&255; - $267 = (($output) + 11|0); - HEAP8[$267>>0] = $266; - $268 = HEAP32[$194>>2]|0; - $269 = $268 >>> 24; - $270 = (($output) + 12|0); - $271 = HEAP32[$197>>2]|0; - $272 = $269 | $271; - $273 = $272&255; - HEAP8[$270>>0] = $273; - $274 = HEAP32[$197>>2]|0; - $275 = $274 >>> 8; - $276 = $275&255; - $277 = (($output) + 13|0); - HEAP8[$277>>0] = $276; - $278 = HEAP32[$197>>2]|0; - $279 = $278 >>> 16; - $280 = $279&255; - $281 = (($output) + 14|0); - HEAP8[$281>>0] = $280; - $282 = HEAP32[$197>>2]|0; - $283 = $282 >>> 24; - $284 = $283&255; - $285 = (($output) + 15|0); - HEAP8[$285>>0] = $284; - $286 = (($input) + 20|0); - $287 = HEAP32[$286>>2]|0; - $288 = HEAP8[$212>>0]|0; + $239 = ((($output)) + 16|0); + HEAP8[$239>>0] = 0; + $240 = HEAP32[$input>>2]|0; + $241 = HEAP8[$output>>0]|0; + $242 = $241&255; + $243 = $242 | $240; + $244 = $243&255; + HEAP8[$output>>0] = $244; + $245 = HEAP32[$input>>2]|0; + $246 = $245 >>> 8; + $247 = $246&255; + $248 = ((($output)) + 1|0); + HEAP8[$248>>0] = $247; + $249 = HEAP32[$input>>2]|0; + $250 = $249 >>> 16; + $251 = $250&255; + $252 = ((($output)) + 2|0); + HEAP8[$252>>0] = $251; + $253 = HEAP32[$input>>2]|0; + $254 = $253 >>> 24; + $255 = ((($output)) + 3|0); + $256 = HEAP32[$123>>2]|0; + $257 = $254 | $256; + $258 = $257&255; + HEAP8[$255>>0] = $258; + $259 = HEAP32[$123>>2]|0; + $260 = $259 >>> 8; + $261 = $260&255; + $262 = ((($output)) + 4|0); + HEAP8[$262>>0] = $261; + $263 = HEAP32[$123>>2]|0; + $264 = $263 >>> 16; + $265 = $264&255; + $266 = ((($output)) + 5|0); + HEAP8[$266>>0] = $265; + $267 = HEAP32[$123>>2]|0; + $268 = $267 >>> 24; + $269 = ((($output)) + 6|0); + $270 = HEAP32[$218>>2]|0; + $271 = $268 | $270; + $272 = $271&255; + HEAP8[$269>>0] = $272; + $273 = HEAP32[$218>>2]|0; + $274 = $273 >>> 8; + $275 = $274&255; + $276 = ((($output)) + 7|0); + HEAP8[$276>>0] = $275; + $277 = HEAP32[$218>>2]|0; + $278 = $277 >>> 16; + $279 = $278&255; + $280 = ((($output)) + 8|0); + HEAP8[$280>>0] = $279; + $281 = HEAP32[$218>>2]|0; + $282 = $281 >>> 24; + $283 = ((($output)) + 9|0); + $284 = HEAP32[$221>>2]|0; + $285 = $282 | $284; + $286 = $285&255; + HEAP8[$283>>0] = $286; + $287 = HEAP32[$221>>2]|0; + $288 = $287 >>> 8; $289 = $288&255; - $290 = $289 | $287; - $291 = $290&255; - HEAP8[$212>>0] = $291; - $292 = HEAP32[$286>>2]|0; - $293 = $292 >>> 8; - $294 = $293&255; - $295 = (($output) + 17|0); - HEAP8[$295>>0] = $294; - $296 = HEAP32[$286>>2]|0; - $297 = $296 >>> 16; - $298 = $297&255; - $299 = (($output) + 18|0); - HEAP8[$299>>0] = $298; - $300 = HEAP32[$286>>2]|0; - $301 = $300 >>> 24; - $302 = (($output) + 19|0); - $303 = HEAP32[$200>>2]|0; - $304 = $301 | $303; - $305 = $304&255; - HEAP8[$302>>0] = $305; - $306 = HEAP32[$200>>2]|0; - $307 = $306 >>> 8; - $308 = $307&255; - $309 = (($output) + 20|0); - HEAP8[$309>>0] = $308; - $310 = HEAP32[$200>>2]|0; - $311 = $310 >>> 16; - $312 = $311&255; - $313 = (($output) + 21|0); - HEAP8[$313>>0] = $312; - $314 = HEAP32[$200>>2]|0; - $315 = $314 >>> 24; - $316 = (($output) + 22|0); - $317 = HEAP32[$203>>2]|0; - $318 = $315 | $317; - $319 = $318&255; - HEAP8[$316>>0] = $319; - $320 = HEAP32[$203>>2]|0; - $321 = $320 >>> 8; - $322 = $321&255; - $323 = (($output) + 23|0); - HEAP8[$323>>0] = $322; - $324 = HEAP32[$203>>2]|0; - $325 = $324 >>> 16; - $326 = $325&255; - $327 = (($output) + 24|0); - HEAP8[$327>>0] = $326; - $328 = HEAP32[$203>>2]|0; - $329 = $328 >>> 24; - $330 = (($output) + 25|0); - $331 = HEAP32[$206>>2]|0; - $332 = $329 | $331; - $333 = $332&255; - HEAP8[$330>>0] = $333; - $334 = HEAP32[$206>>2]|0; - $335 = $334 >>> 8; - $336 = $335&255; - $337 = (($output) + 26|0); - HEAP8[$337>>0] = $336; - $338 = HEAP32[$206>>2]|0; - $339 = $338 >>> 16; - $340 = $339&255; - $341 = (($output) + 27|0); - HEAP8[$341>>0] = $340; - $342 = HEAP32[$206>>2]|0; - $343 = $342 >>> 24; - $344 = (($output) + 28|0); - $345 = HEAP32[$209>>2]|0; - $346 = $343 | $345; - $347 = $346&255; - HEAP8[$344>>0] = $347; - $348 = HEAP32[$209>>2]|0; - $349 = $348 >>> 8; - $350 = $349&255; - $351 = (($output) + 29|0); - HEAP8[$351>>0] = $350; - $352 = HEAP32[$209>>2]|0; - $353 = $352 >>> 16; - $354 = $353&255; - $355 = (($output) + 30|0); - HEAP8[$355>>0] = $354; - $356 = HEAP32[$209>>2]|0; - $357 = $356 >>> 24; - $358 = $357&255; - $359 = (($output) + 31|0); - HEAP8[$359>>0] = $358; + $290 = ((($output)) + 10|0); + HEAP8[$290>>0] = $289; + $291 = HEAP32[$221>>2]|0; + $292 = $291 >>> 16; + $293 = $292&255; + $294 = ((($output)) + 11|0); + HEAP8[$294>>0] = $293; + $295 = HEAP32[$221>>2]|0; + $296 = $295 >>> 24; + $297 = ((($output)) + 12|0); + $298 = HEAP32[$224>>2]|0; + $299 = $296 | $298; + $300 = $299&255; + HEAP8[$297>>0] = $300; + $301 = HEAP32[$224>>2]|0; + $302 = $301 >>> 8; + $303 = $302&255; + $304 = ((($output)) + 13|0); + HEAP8[$304>>0] = $303; + $305 = HEAP32[$224>>2]|0; + $306 = $305 >>> 16; + $307 = $306&255; + $308 = ((($output)) + 14|0); + HEAP8[$308>>0] = $307; + $309 = HEAP32[$224>>2]|0; + $310 = $309 >>> 24; + $311 = $310&255; + $312 = ((($output)) + 15|0); + HEAP8[$312>>0] = $311; + $313 = ((($input)) + 20|0); + $314 = HEAP32[$313>>2]|0; + $315 = HEAP8[$239>>0]|0; + $316 = $315&255; + $317 = $316 | $314; + $318 = $317&255; + HEAP8[$239>>0] = $318; + $319 = HEAP32[$313>>2]|0; + $320 = $319 >>> 8; + $321 = $320&255; + $322 = ((($output)) + 17|0); + HEAP8[$322>>0] = $321; + $323 = HEAP32[$313>>2]|0; + $324 = $323 >>> 16; + $325 = $324&255; + $326 = ((($output)) + 18|0); + HEAP8[$326>>0] = $325; + $327 = HEAP32[$313>>2]|0; + $328 = $327 >>> 24; + $329 = ((($output)) + 19|0); + $330 = HEAP32[$227>>2]|0; + $331 = $328 | $330; + $332 = $331&255; + HEAP8[$329>>0] = $332; + $333 = HEAP32[$227>>2]|0; + $334 = $333 >>> 8; + $335 = $334&255; + $336 = ((($output)) + 20|0); + HEAP8[$336>>0] = $335; + $337 = HEAP32[$227>>2]|0; + $338 = $337 >>> 16; + $339 = $338&255; + $340 = ((($output)) + 21|0); + HEAP8[$340>>0] = $339; + $341 = HEAP32[$227>>2]|0; + $342 = $341 >>> 24; + $343 = ((($output)) + 22|0); + $344 = HEAP32[$230>>2]|0; + $345 = $342 | $344; + $346 = $345&255; + HEAP8[$343>>0] = $346; + $347 = HEAP32[$230>>2]|0; + $348 = $347 >>> 8; + $349 = $348&255; + $350 = ((($output)) + 23|0); + HEAP8[$350>>0] = $349; + $351 = HEAP32[$230>>2]|0; + $352 = $351 >>> 16; + $353 = $352&255; + $354 = ((($output)) + 24|0); + HEAP8[$354>>0] = $353; + $355 = HEAP32[$230>>2]|0; + $356 = $355 >>> 24; + $357 = ((($output)) + 25|0); + $358 = HEAP32[$233>>2]|0; + $359 = $356 | $358; + $360 = $359&255; + HEAP8[$357>>0] = $360; + $361 = HEAP32[$233>>2]|0; + $362 = $361 >>> 8; + $363 = $362&255; + $364 = ((($output)) + 26|0); + HEAP8[$364>>0] = $363; + $365 = HEAP32[$233>>2]|0; + $366 = $365 >>> 16; + $367 = $366&255; + $368 = ((($output)) + 27|0); + HEAP8[$368>>0] = $367; + $369 = HEAP32[$233>>2]|0; + $370 = $369 >>> 24; + $371 = ((($output)) + 28|0); + $372 = HEAP32[$236>>2]|0; + $373 = $370 | $372; + $374 = $373&255; + HEAP8[$371>>0] = $374; + $375 = HEAP32[$236>>2]|0; + $376 = $375 >>> 8; + $377 = $376&255; + $378 = ((($output)) + 29|0); + HEAP8[$378>>0] = $377; + $379 = HEAP32[$236>>2]|0; + $380 = $379 >>> 16; + $381 = $380&255; + $382 = ((($output)) + 30|0); + HEAP8[$382>>0] = $381; + $383 = HEAP32[$236>>2]|0; + $384 = $383 >>> 24; + $385 = $384&255; + $386 = ((($output)) + 31|0); + HEAP8[$386>>0] = $385; STACKTOP = sp;return; } -function _swap_conditional($a,$b,$0,$1) { +function _s32_gte($a) { $a = $a|0; - $b = $b|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; - var $9 = 0, $exitcond = 0, $i$02 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_i64Subtract(0,0,($0|0),($1|0))|0); - $3 = tempRet0; - $i$02 = 0; - while(1) { - $4 = (($a) + ($i$02<<3)|0); - $5 = $4; - $6 = $5; - $7 = HEAP32[$6>>2]|0; - $8 = (($5) + 4)|0; - $9 = $8; - $10 = HEAP32[$9>>2]|0; - $11 = (($b) + ($i$02<<3)|0); - $12 = $11; - $13 = $12; - $14 = HEAP32[$13>>2]|0; - $15 = (($12) + 4)|0; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = $14 ^ $7; - $19 = $17 ^ $10; - $20 = $18 & $2; - $21 = $19 & $3; - $22 = $20 ^ $7; - $21 ^ $10; - $23 = (_bitshift64Ashr(0,($22|0),32)|0); - $24 = tempRet0; - $25 = $4; - $26 = $25; - HEAP32[$26>>2] = $23; - $27 = (($25) + 4)|0; - $28 = $27; - HEAP32[$28>>2] = $24; - $29 = $11; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (($29) + 4)|0; - $33 = $32; - $34 = HEAP32[$33>>2]|0; - $35 = $20 ^ $31; - $21 ^ $34; - $36 = (_bitshift64Ashr(0,($35|0),32)|0); - $37 = tempRet0; - $38 = $11; - $39 = $38; - HEAP32[$39>>2] = $36; - $40 = (($38) + 4)|0; - $41 = $40; - HEAP32[$41>>2] = $37; - $42 = (($i$02) + 1)|0; - $exitcond = ($42|0)==(10); - if ($exitcond) { - break; - } else { - $i$02 = $42; - } - } - STACKTOP = sp;return; -} -function _fmonty($x2,$z2,$x3,$z3,$x,$z,$xprime,$zprime,$qmqp) { - $x2 = $x2|0; - $z2 = $z2|0; - $x3 = $x3|0; - $z3 = $z3|0; - $x = $x|0; - $z = $z|0; - $xprime = $xprime|0; - $zprime = $zprime|0; - $qmqp = $qmqp|0; - var $0 = 0, $origx = 0, $origxprime = 0, $xx = 0, $xxprime = 0, $xxxprime = 0, $zz = 0, $zzprime = 0, $zzz = 0, $zzzprime = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 1232|0; - $origx = sp + 1144|0; - $origxprime = sp + 1064|0; - $zzz = sp + 912|0; - $xx = sp + 760|0; - $zz = sp + 608|0; - $xxprime = sp + 456|0; - $zzprime = sp + 304|0; - $zzzprime = sp + 152|0; - $xxxprime = sp; - dest=$origx+0|0; src=$x+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($x,$z); - _fdifference($z,$origx); - dest=$origxprime+0|0; src=$xprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($xprime,$zprime); - _fdifference($zprime,$origxprime); - _fproduct($xxprime,$xprime,$z); - _fproduct($zzprime,$x,$zprime); - _freduce_degree($xxprime); - _freduce_coefficients($xxprime); - _freduce_degree($zzprime); - _freduce_coefficients($zzprime); - dest=$origxprime+0|0; src=$xxprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsum($xxprime,$zzprime); - _fdifference($zzprime,$origxprime); - _fsquare($xxxprime,$xxprime); - _fsquare($zzzprime,$zzprime); - _fproduct($zzprime,$zzzprime,$qmqp); - _freduce_degree($zzprime); - _freduce_coefficients($zzprime); - dest=$x3+0|0; src=$xxxprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$z3+0|0; src=$zzprime+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _fsquare($xx,$x); - _fsquare($zz,$z); - _fproduct($x2,$xx,$zz); - _freduce_degree($x2); - _freduce_coefficients($x2); - _fdifference($zz,$xx); - $0 = (($zzz) + 80|0); - dest=$0+0|0; stop=dest+72|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - _fscalar_product($zzz,$zz); - _freduce_coefficients($zzz); - _fsum($zzz,$xx); - _fproduct($z2,$zz,$zzz); - _freduce_degree($z2); - _freduce_coefficients($z2); - STACKTOP = sp;return; + $0 = (($a) + -67108845)|0; + $1 = $0 >> 31; + $2 = $1 ^ -1; + return ($2|0); } -function _fsquare($output,$in) { - $output = $output|0; - $in = $in|0; - var $t = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; +function _s32_eq($a,$b) { + $a = $a|0; + $b = $b|0; + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 160|0; - $t = sp; - _fsquare_inner($t,$in); - _freduce_degree($t); - _freduce_coefficients($t); - dest=$output+0|0; src=$t+0|0; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; + $0 = $a ^ -1; + $1 = $0 ^ $b; + $2 = $1 << 16; + $3 = $2 & $1; + $4 = $3 << 8; + $5 = $4 & $3; + $6 = $5 << 4; + $7 = $6 & $5; + $8 = $7 << 2; + $9 = $8 & $7; + $10 = $9 << 1; + $11 = $10 & $9; + $12 = $11 >> 31; + return ($12|0); } function _fproduct($output,$in2,$in) { $output = $output|0; @@ -6846,7 +7496,7 @@ function _fproduct($output,$in2,$in) { $27 = HEAP32[$26>>2]|0; $28 = (_bitshift64Ashr(0,($24|0),32)|0); $29 = tempRet0; - $30 = (($in) + 8|0); + $30 = ((($in)) + 8|0); $31 = $30; $32 = $31; $33 = HEAP32[$32>>2]|0; @@ -6857,7 +7507,7 @@ function _fproduct($output,$in2,$in) { $38 = tempRet0; $39 = (___muldi3(($37|0),($38|0),($28|0),($29|0))|0); $40 = tempRet0; - $41 = (($in2) + 8|0); + $41 = ((($in2)) + 8|0); $42 = $41; $43 = $42; $44 = HEAP32[$43>>2]|0; @@ -6878,7 +7528,7 @@ function _fproduct($output,$in2,$in) { $59 = tempRet0; $60 = (_i64Add(($58|0),($59|0),($39|0),($40|0))|0); $61 = tempRet0; - $62 = (($output) + 8|0); + $62 = ((($output)) + 8|0); $63 = $62; $64 = $63; HEAP32[$64>>2] = $60; @@ -6911,7 +7561,7 @@ function _fproduct($output,$in2,$in) { $90 = HEAP32[$89>>2]|0; $91 = (_bitshift64Ashr(0,($87|0),32)|0); $92 = tempRet0; - $93 = (($in) + 16|0); + $93 = ((($in)) + 16|0); $94 = $93; $95 = $94; $96 = HEAP32[$95>>2]|0; @@ -6924,7 +7574,7 @@ function _fproduct($output,$in2,$in) { $103 = tempRet0; $104 = (_i64Add(($102|0),($103|0),($83|0),($84|0))|0); $105 = tempRet0; - $106 = (($in2) + 16|0); + $106 = ((($in2)) + 16|0); $107 = $106; $108 = $107; $109 = HEAP32[$108>>2]|0; @@ -6945,7 +7595,7 @@ function _fproduct($output,$in2,$in) { $124 = tempRet0; $125 = (_i64Add(($104|0),($105|0),($123|0),($124|0))|0); $126 = tempRet0; - $127 = (($output) + 16|0); + $127 = ((($output)) + 16|0); $128 = $127; $129 = $128; HEAP32[$129>>2] = $125; @@ -6998,7 +7648,7 @@ function _fproduct($output,$in2,$in) { $175 = HEAP32[$174>>2]|0; $176 = (_bitshift64Ashr(0,($172|0),32)|0); $177 = tempRet0; - $178 = (($in) + 24|0); + $178 = ((($in)) + 24|0); $179 = $178; $180 = $179; $181 = HEAP32[$180>>2]|0; @@ -7011,7 +7661,7 @@ function _fproduct($output,$in2,$in) { $188 = tempRet0; $189 = (_i64Add(($168|0),($169|0),($187|0),($188|0))|0); $190 = tempRet0; - $191 = (($in2) + 24|0); + $191 = ((($in2)) + 24|0); $192 = $191; $193 = $192; $194 = HEAP32[$193>>2]|0; @@ -7032,7 +7682,7 @@ function _fproduct($output,$in2,$in) { $209 = tempRet0; $210 = (_i64Add(($189|0),($190|0),($208|0),($209|0))|0); $211 = tempRet0; - $212 = (($output) + 24|0); + $212 = ((($output)) + 24|0); $213 = $212; $214 = $213; HEAP32[$214>>2] = $210; @@ -7107,7 +7757,7 @@ function _fproduct($output,$in2,$in) { $282 = HEAP32[$281>>2]|0; $283 = (_bitshift64Ashr(0,($279|0),32)|0); $284 = tempRet0; - $285 = (($in) + 32|0); + $285 = ((($in)) + 32|0); $286 = $285; $287 = $286; $288 = HEAP32[$287>>2]|0; @@ -7120,7 +7770,7 @@ function _fproduct($output,$in2,$in) { $295 = tempRet0; $296 = (_i64Add(($275|0),($276|0),($294|0),($295|0))|0); $297 = tempRet0; - $298 = (($in2) + 32|0); + $298 = ((($in2)) + 32|0); $299 = $298; $300 = $299; $301 = HEAP32[$300>>2]|0; @@ -7141,7 +7791,7 @@ function _fproduct($output,$in2,$in) { $316 = tempRet0; $317 = (_i64Add(($296|0),($297|0),($315|0),($316|0))|0); $318 = tempRet0; - $319 = (($output) + 32|0); + $319 = ((($output)) + 32|0); $320 = $319; $321 = $320; HEAP32[$321>>2] = $317; @@ -7234,7 +7884,7 @@ function _fproduct($output,$in2,$in) { $407 = HEAP32[$406>>2]|0; $408 = (_bitshift64Ashr(0,($404|0),32)|0); $409 = tempRet0; - $410 = (($in) + 40|0); + $410 = ((($in)) + 40|0); $411 = $410; $412 = $411; $413 = HEAP32[$412>>2]|0; @@ -7247,7 +7897,7 @@ function _fproduct($output,$in2,$in) { $420 = tempRet0; $421 = (_i64Add(($400|0),($401|0),($419|0),($420|0))|0); $422 = tempRet0; - $423 = (($in2) + 40|0); + $423 = ((($in2)) + 40|0); $424 = $423; $425 = $424; $426 = HEAP32[$425>>2]|0; @@ -7268,7 +7918,7 @@ function _fproduct($output,$in2,$in) { $441 = tempRet0; $442 = (_i64Add(($421|0),($422|0),($440|0),($441|0))|0); $443 = tempRet0; - $444 = (($output) + 40|0); + $444 = ((($output)) + 40|0); $445 = $444; $446 = $445; HEAP32[$446>>2] = $442; @@ -7383,7 +8033,7 @@ function _fproduct($output,$in2,$in) { $554 = HEAP32[$553>>2]|0; $555 = (_bitshift64Ashr(0,($551|0),32)|0); $556 = tempRet0; - $557 = (($in) + 48|0); + $557 = ((($in)) + 48|0); $558 = $557; $559 = $558; $560 = HEAP32[$559>>2]|0; @@ -7396,7 +8046,7 @@ function _fproduct($output,$in2,$in) { $567 = tempRet0; $568 = (_i64Add(($547|0),($548|0),($566|0),($567|0))|0); $569 = tempRet0; - $570 = (($in2) + 48|0); + $570 = ((($in2)) + 48|0); $571 = $570; $572 = $571; $573 = HEAP32[$572>>2]|0; @@ -7417,7 +8067,7 @@ function _fproduct($output,$in2,$in) { $588 = tempRet0; $589 = (_i64Add(($568|0),($569|0),($587|0),($588|0))|0); $590 = tempRet0; - $591 = (($output) + 48|0); + $591 = ((($output)) + 48|0); $592 = $591; $593 = $592; HEAP32[$593>>2] = $589; @@ -7550,7 +8200,7 @@ function _fproduct($output,$in2,$in) { $719 = HEAP32[$718>>2]|0; $720 = (_bitshift64Ashr(0,($716|0),32)|0); $721 = tempRet0; - $722 = (($in) + 56|0); + $722 = ((($in)) + 56|0); $723 = $722; $724 = $723; $725 = HEAP32[$724>>2]|0; @@ -7563,7 +8213,7 @@ function _fproduct($output,$in2,$in) { $732 = tempRet0; $733 = (_i64Add(($712|0),($713|0),($731|0),($732|0))|0); $734 = tempRet0; - $735 = (($in2) + 56|0); + $735 = ((($in2)) + 56|0); $736 = $735; $737 = $736; $738 = HEAP32[$737>>2]|0; @@ -7584,7 +8234,7 @@ function _fproduct($output,$in2,$in) { $753 = tempRet0; $754 = (_i64Add(($733|0),($734|0),($752|0),($753|0))|0); $755 = tempRet0; - $756 = (($output) + 56|0); + $756 = ((($output)) + 56|0); $757 = $756; $758 = $757; HEAP32[$758>>2] = $754; @@ -7739,7 +8389,7 @@ function _fproduct($output,$in2,$in) { $906 = HEAP32[$905>>2]|0; $907 = (_bitshift64Ashr(0,($903|0),32)|0); $908 = tempRet0; - $909 = (($in) + 64|0); + $909 = ((($in)) + 64|0); $910 = $909; $911 = $910; $912 = HEAP32[$911>>2]|0; @@ -7752,7 +8402,7 @@ function _fproduct($output,$in2,$in) { $919 = tempRet0; $920 = (_i64Add(($899|0),($900|0),($918|0),($919|0))|0); $921 = tempRet0; - $922 = (($in2) + 64|0); + $922 = ((($in2)) + 64|0); $923 = $922; $924 = $923; $925 = HEAP32[$924>>2]|0; @@ -7773,7 +8423,7 @@ function _fproduct($output,$in2,$in) { $940 = tempRet0; $941 = (_i64Add(($920|0),($921|0),($939|0),($940|0))|0); $942 = tempRet0; - $943 = (($output) + 64|0); + $943 = ((($output)) + 64|0); $944 = $943; $945 = $944; HEAP32[$945>>2] = $941; @@ -7946,7 +8596,7 @@ function _fproduct($output,$in2,$in) { $1111 = HEAP32[$1110>>2]|0; $1112 = (_bitshift64Ashr(0,($1108|0),32)|0); $1113 = tempRet0; - $1114 = (($in) + 72|0); + $1114 = ((($in)) + 72|0); $1115 = $1114; $1116 = $1115; $1117 = HEAP32[$1116>>2]|0; @@ -7959,7 +8609,7 @@ function _fproduct($output,$in2,$in) { $1124 = tempRet0; $1125 = (_i64Add(($1104|0),($1105|0),($1123|0),($1124|0))|0); $1126 = tempRet0; - $1127 = (($in2) + 72|0); + $1127 = ((($in2)) + 72|0); $1128 = $1127; $1129 = $1128; $1130 = HEAP32[$1129>>2]|0; @@ -7980,7 +8630,7 @@ function _fproduct($output,$in2,$in) { $1145 = tempRet0; $1146 = (_i64Add(($1125|0),($1126|0),($1144|0),($1145|0))|0); $1147 = tempRet0; - $1148 = (($output) + 72|0); + $1148 = ((($output)) + 72|0); $1149 = $1148; $1150 = $1149; HEAP32[$1150>>2] = $1146; @@ -8167,7 +8817,7 @@ function _fproduct($output,$in2,$in) { $1330 = tempRet0; $1331 = (_i64Add(($1311|0),($1312|0),($1329|0),($1330|0))|0); $1332 = tempRet0; - $1333 = (($output) + 80|0); + $1333 = ((($output)) + 80|0); $1334 = $1333; $1335 = $1334; HEAP32[$1335>>2] = $1331; @@ -8332,7 +8982,7 @@ function _fproduct($output,$in2,$in) { $1493 = tempRet0; $1494 = (_i64Add(($1474|0),($1475|0),($1492|0),($1493|0))|0); $1495 = tempRet0; - $1496 = (($output) + 88|0); + $1496 = ((($output)) + 88|0); $1497 = $1496; $1498 = $1497; HEAP32[$1498>>2] = $1494; @@ -8479,7 +9129,7 @@ function _fproduct($output,$in2,$in) { $1638 = tempRet0; $1639 = (_i64Add(($1619|0),($1620|0),($1637|0),($1638|0))|0); $1640 = tempRet0; - $1641 = (($output) + 96|0); + $1641 = ((($output)) + 96|0); $1642 = $1641; $1643 = $1642; HEAP32[$1643>>2] = $1639; @@ -8604,7 +9254,7 @@ function _fproduct($output,$in2,$in) { $1761 = tempRet0; $1762 = (_i64Add(($1742|0),($1743|0),($1760|0),($1761|0))|0); $1763 = tempRet0; - $1764 = (($output) + 104|0); + $1764 = ((($output)) + 104|0); $1765 = $1764; $1766 = $1765; HEAP32[$1766>>2] = $1762; @@ -8711,7 +9361,7 @@ function _fproduct($output,$in2,$in) { $1866 = tempRet0; $1867 = (_i64Add(($1847|0),($1848|0),($1865|0),($1866|0))|0); $1868 = tempRet0; - $1869 = (($output) + 112|0); + $1869 = ((($output)) + 112|0); $1870 = $1869; $1871 = $1870; HEAP32[$1871>>2] = $1867; @@ -8796,7 +9446,7 @@ function _fproduct($output,$in2,$in) { $1949 = tempRet0; $1950 = (_i64Add(($1930|0),($1931|0),($1948|0),($1949|0))|0); $1951 = tempRet0; - $1952 = (($output) + 120|0); + $1952 = ((($output)) + 120|0); $1953 = $1952; $1954 = $1953; HEAP32[$1954>>2] = $1950; @@ -8863,7 +9513,7 @@ function _fproduct($output,$in2,$in) { $2014 = tempRet0; $2015 = (_i64Add(($2013|0),($2014|0),($1973|0),($1974|0))|0); $2016 = tempRet0; - $2017 = (($output) + 128|0); + $2017 = ((($output)) + 128|0); $2018 = $2017; $2019 = $2018; HEAP32[$2019>>2] = $2015; @@ -8908,7 +9558,7 @@ function _fproduct($output,$in2,$in) { $2057 = tempRet0; $2058 = (_i64Add(($2056|0),($2057|0),($2038|0),($2039|0))|0); $2059 = tempRet0; - $2060 = (($output) + 136|0); + $2060 = ((($output)) + 136|0); $2061 = $2060; $2062 = $2061; HEAP32[$2062>>2] = $2058; @@ -8933,14 +9583,14 @@ function _fproduct($output,$in2,$in) { $2080 = tempRet0; $2081 = (___muldi3(($2079|0),($2080|0),($2071|0),($2072|0))|0); $2082 = tempRet0; - $2083 = (($output) + 144|0); + $2083 = ((($output)) + 144|0); $2084 = $2083; $2085 = $2084; HEAP32[$2085>>2] = $2081; $2086 = (($2084) + 4)|0; $2087 = $2086; HEAP32[$2087>>2] = $2082; - STACKTOP = sp;return; + return; } function _freduce_degree($output) { $output = $output|0; @@ -8961,7 +9611,7 @@ function _freduce_degree($output) { var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0; var sp = 0; sp = STACKTOP; - $0 = (($output) + 144|0); + $0 = ((($output)) + 144|0); $1 = $0; $2 = $1; $3 = HEAP32[$2>>2]|0; @@ -8970,7 +9620,7 @@ function _freduce_degree($output) { $6 = HEAP32[$5>>2]|0; $7 = (_bitshift64Shl(($3|0),($6|0),4)|0); $8 = tempRet0; - $9 = (($output) + 64|0); + $9 = ((($output)) + 64|0); $10 = $9; $11 = $10; $12 = HEAP32[$11>>2]|0; @@ -8997,7 +9647,7 @@ function _freduce_degree($output) { $32 = (($30) + 4)|0; $33 = $32; HEAP32[$33>>2] = $29; - $34 = (($output) + 136|0); + $34 = ((($output)) + 136|0); $35 = $34; $36 = $35; $37 = HEAP32[$36>>2]|0; @@ -9006,7 +9656,7 @@ function _freduce_degree($output) { $40 = HEAP32[$39>>2]|0; $41 = (_bitshift64Shl(($37|0),($40|0),4)|0); $42 = tempRet0; - $43 = (($output) + 56|0); + $43 = ((($output)) + 56|0); $44 = $43; $45 = $44; $46 = HEAP32[$45>>2]|0; @@ -9033,7 +9683,7 @@ function _freduce_degree($output) { $66 = (($64) + 4)|0; $67 = $66; HEAP32[$67>>2] = $63; - $68 = (($output) + 128|0); + $68 = ((($output)) + 128|0); $69 = $68; $70 = $69; $71 = HEAP32[$70>>2]|0; @@ -9042,7 +9692,7 @@ function _freduce_degree($output) { $74 = HEAP32[$73>>2]|0; $75 = (_bitshift64Shl(($71|0),($74|0),4)|0); $76 = tempRet0; - $77 = (($output) + 48|0); + $77 = ((($output)) + 48|0); $78 = $77; $79 = $78; $80 = HEAP32[$79>>2]|0; @@ -9069,7 +9719,7 @@ function _freduce_degree($output) { $100 = (($98) + 4)|0; $101 = $100; HEAP32[$101>>2] = $97; - $102 = (($output) + 120|0); + $102 = ((($output)) + 120|0); $103 = $102; $104 = $103; $105 = HEAP32[$104>>2]|0; @@ -9078,7 +9728,7 @@ function _freduce_degree($output) { $108 = HEAP32[$107>>2]|0; $109 = (_bitshift64Shl(($105|0),($108|0),4)|0); $110 = tempRet0; - $111 = (($output) + 40|0); + $111 = ((($output)) + 40|0); $112 = $111; $113 = $112; $114 = HEAP32[$113>>2]|0; @@ -9105,7 +9755,7 @@ function _freduce_degree($output) { $134 = (($132) + 4)|0; $135 = $134; HEAP32[$135>>2] = $131; - $136 = (($output) + 112|0); + $136 = ((($output)) + 112|0); $137 = $136; $138 = $137; $139 = HEAP32[$138>>2]|0; @@ -9114,7 +9764,7 @@ function _freduce_degree($output) { $142 = HEAP32[$141>>2]|0; $143 = (_bitshift64Shl(($139|0),($142|0),4)|0); $144 = tempRet0; - $145 = (($output) + 32|0); + $145 = ((($output)) + 32|0); $146 = $145; $147 = $146; $148 = HEAP32[$147>>2]|0; @@ -9141,7 +9791,7 @@ function _freduce_degree($output) { $168 = (($166) + 4)|0; $169 = $168; HEAP32[$169>>2] = $165; - $170 = (($output) + 104|0); + $170 = ((($output)) + 104|0); $171 = $170; $172 = $171; $173 = HEAP32[$172>>2]|0; @@ -9150,7 +9800,7 @@ function _freduce_degree($output) { $176 = HEAP32[$175>>2]|0; $177 = (_bitshift64Shl(($173|0),($176|0),4)|0); $178 = tempRet0; - $179 = (($output) + 24|0); + $179 = ((($output)) + 24|0); $180 = $179; $181 = $180; $182 = HEAP32[$181>>2]|0; @@ -9177,7 +9827,7 @@ function _freduce_degree($output) { $202 = (($200) + 4)|0; $203 = $202; HEAP32[$203>>2] = $199; - $204 = (($output) + 96|0); + $204 = ((($output)) + 96|0); $205 = $204; $206 = $205; $207 = HEAP32[$206>>2]|0; @@ -9186,7 +9836,7 @@ function _freduce_degree($output) { $210 = HEAP32[$209>>2]|0; $211 = (_bitshift64Shl(($207|0),($210|0),4)|0); $212 = tempRet0; - $213 = (($output) + 16|0); + $213 = ((($output)) + 16|0); $214 = $213; $215 = $214; $216 = HEAP32[$215>>2]|0; @@ -9213,7 +9863,7 @@ function _freduce_degree($output) { $236 = (($234) + 4)|0; $237 = $236; HEAP32[$237>>2] = $233; - $238 = (($output) + 88|0); + $238 = ((($output)) + 88|0); $239 = $238; $240 = $239; $241 = HEAP32[$240>>2]|0; @@ -9222,7 +9872,7 @@ function _freduce_degree($output) { $244 = HEAP32[$243>>2]|0; $245 = (_bitshift64Shl(($241|0),($244|0),4)|0); $246 = tempRet0; - $247 = (($output) + 8|0); + $247 = ((($output)) + 8|0); $248 = $247; $249 = $248; $250 = HEAP32[$249>>2]|0; @@ -9249,7 +9899,7 @@ function _freduce_degree($output) { $270 = (($268) + 4)|0; $271 = $270; HEAP32[$271>>2] = $267; - $272 = (($output) + 80|0); + $272 = ((($output)) + 80|0); $273 = $272; $274 = $273; $275 = HEAP32[$274>>2]|0; @@ -9278,7 +9928,7 @@ function _freduce_degree($output) { $297 = (($295) + 4)|0; $298 = $297; HEAP32[$298>>2] = $294; - STACKTOP = sp;return; + return; } function _freduce_coefficients($output) { $output = $output|0; @@ -9289,7 +9939,7 @@ function _freduce_coefficients($output) { var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0; var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i$01 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($output) + 80|0); + $0 = ((($output)) + 80|0); $1 = $0; $2 = $1; HEAP32[$2>>2] = 0; @@ -9414,7 +10064,7 @@ function _freduce_coefficients($output) { $101 = (($99) + 4)|0; $102 = $101; HEAP32[$102>>2] = $98; - $103 = (($output) + 8|0); + $103 = ((($output)) + 8|0); $104 = $103; $105 = $104; $106 = HEAP32[$105>>2]|0; @@ -9429,944 +10079,317 @@ function _freduce_coefficients($output) { $114 = (($112) + 4)|0; $115 = $114; HEAP32[$115>>2] = $111; - STACKTOP = sp;return; + return; } -function _s32_eq($a,$b) { - $a = $a|0; - $b = $b|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; +function _div_by_2_26($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = $a ^ -1; - $1 = $0 ^ $b; - $2 = $1 << 16; - $3 = $2 & $1; - $4 = $3 << 8; - $5 = $4 & $3; - $6 = $5 << 4; - $7 = $6 & $5; - $8 = $7 << 2; - $9 = $8 & $7; - $10 = $9 << 1; - $11 = $10 & $9; - $12 = $11 >> 31; - STACKTOP = sp;return ($12|0); + $2 = $1 >> 31; + $3 = $2 >>> 6; + $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); + $5 = tempRet0; + $6 = (_bitshift64Ashr(($4|0),($5|0),26)|0); + $7 = tempRet0; + tempRet0 = ($7); + return ($6|0); } -function _s32_gte($a) { - $a = $a|0; - var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; +function _div_by_2_25($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($a) + -67108845)|0; - $1 = $0 >> 31; - $2 = $1 ^ -1; - STACKTOP = sp;return ($2|0); + $2 = $1 >> 31; + $3 = $2 >>> 7; + $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); + $5 = tempRet0; + $6 = (_bitshift64Ashr(($4|0),($5|0),25)|0); + $7 = tempRet0; + tempRet0 = ($7); + return ($6|0); } -function _fsum($output,$in) { +function _fsquare($output,$in) { $output = $output|0; $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + var $t = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; - $0 = $output; + STACKTOP = STACKTOP + 160|0; + $t = sp; + _fsquare_inner($t,$in); + _freduce_degree($t); + _freduce_coefficients($t); + dest=$output; src=$t; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _fsquare_inner($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; + var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; + var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; + var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; + var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; + var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; + var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; + var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; + var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; + var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; + var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; + var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; + var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; + var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; + var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; + var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; + var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; + var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; + var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; + var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; + var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; + var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; + var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; + var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; + var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; + var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; + var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; + var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; + var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; + var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; + var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; + var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; + var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; + var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; + var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; + var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; + var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; + var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; + var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; + var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; + var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; + var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; + var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; + var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; + var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; + var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; + var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; + var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; + var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; + var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; + var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; + var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; + var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; + var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; + var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; + var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $0 = $in; $1 = $0; $2 = HEAP32[$1>>2]|0; $3 = (($0) + 4)|0; $4 = $3; $5 = HEAP32[$4>>2]|0; - $6 = $in; - $7 = $6; - $8 = HEAP32[$7>>2]|0; - $9 = (($6) + 4)|0; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (_i64Add(($8|0),($11|0),($2|0),($5|0))|0); - $13 = tempRet0; - $14 = $output; + $6 = (_bitshift64Ashr(0,($2|0),32)|0); + $7 = tempRet0; + $8 = (___muldi3(($6|0),($7|0),($6|0),($7|0))|0); + $9 = tempRet0; + $10 = $output; + $11 = $10; + HEAP32[$11>>2] = $8; + $12 = (($10) + 4)|0; + $13 = $12; + HEAP32[$13>>2] = $9; + $14 = $in; $15 = $14; - HEAP32[$15>>2] = $12; - $16 = (($14) + 4)|0; - $17 = $16; - HEAP32[$17>>2] = $13; - $18 = (($output) + 8|0); - $19 = $18; - $20 = $19; - $21 = HEAP32[$20>>2]|0; - $22 = (($19) + 4)|0; + $16 = HEAP32[$15>>2]|0; + $17 = (($14) + 4)|0; + $18 = $17; + $19 = HEAP32[$18>>2]|0; + $20 = (_bitshift64Ashr(0,($16|0),31)|0); + $21 = tempRet0; + $22 = ((($in)) + 8|0); $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($in) + 8|0); - $26 = $25; + $24 = $23; + $25 = HEAP32[$24>>2]|0; + $26 = (($23) + 4)|0; $27 = $26; $28 = HEAP32[$27>>2]|0; - $29 = (($26) + 4)|0; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (_i64Add(($28|0),($31|0),($21|0),($24|0))|0); - $33 = tempRet0; - $34 = $18; + $29 = (_bitshift64Ashr(0,($25|0),32)|0); + $30 = tempRet0; + $31 = (___muldi3(($29|0),($30|0),($20|0),($21|0))|0); + $32 = tempRet0; + $33 = ((($output)) + 8|0); + $34 = $33; $35 = $34; - HEAP32[$35>>2] = $32; + HEAP32[$35>>2] = $31; $36 = (($34) + 4)|0; $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($output) + 16|0); + HEAP32[$37>>2] = $32; + $38 = $22; $39 = $38; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (($39) + 4)|0; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($in) + 16|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_i64Add(($48|0),($51|0),($41|0),($44|0))|0); - $53 = tempRet0; - $54 = $38; - $55 = $54; - HEAP32[$55>>2] = $52; - $56 = (($54) + 4)|0; + $40 = HEAP32[$39>>2]|0; + $41 = (($38) + 4)|0; + $42 = $41; + $43 = HEAP32[$42>>2]|0; + $44 = (_bitshift64Ashr(0,($40|0),32)|0); + $45 = tempRet0; + $46 = (___muldi3(($44|0),($45|0),($44|0),($45|0))|0); + $47 = tempRet0; + $48 = $in; + $49 = $48; + $50 = HEAP32[$49>>2]|0; + $51 = (($48) + 4)|0; + $52 = $51; + $53 = HEAP32[$52>>2]|0; + $54 = (_bitshift64Ashr(0,($50|0),32)|0); + $55 = tempRet0; + $56 = ((($in)) + 16|0); $57 = $56; - HEAP32[$57>>2] = $53; - $58 = (($output) + 24|0); - $59 = $58; - $60 = $59; - $61 = HEAP32[$60>>2]|0; - $62 = (($59) + 4)|0; - $63 = $62; - $64 = HEAP32[$63>>2]|0; - $65 = (($in) + 24|0); - $66 = $65; - $67 = $66; - $68 = HEAP32[$67>>2]|0; - $69 = (($66) + 4)|0; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (_i64Add(($68|0),($71|0),($61|0),($64|0))|0); - $73 = tempRet0; - $74 = $58; + $58 = $57; + $59 = HEAP32[$58>>2]|0; + $60 = (($57) + 4)|0; + $61 = $60; + $62 = HEAP32[$61>>2]|0; + $63 = (_bitshift64Ashr(0,($59|0),32)|0); + $64 = tempRet0; + $65 = (___muldi3(($63|0),($64|0),($54|0),($55|0))|0); + $66 = tempRet0; + $67 = (_i64Add(($65|0),($66|0),($46|0),($47|0))|0); + $68 = tempRet0; + $69 = (_bitshift64Shl(($67|0),($68|0),1)|0); + $70 = tempRet0; + $71 = ((($output)) + 16|0); + $72 = $71; + $73 = $72; + HEAP32[$73>>2] = $69; + $74 = (($72) + 4)|0; $75 = $74; - HEAP32[$75>>2] = $72; - $76 = (($74) + 4)|0; + HEAP32[$75>>2] = $70; + $76 = $22; $77 = $76; - HEAP32[$77>>2] = $73; - $78 = (($output) + 32|0); - $79 = $78; + $78 = HEAP32[$77>>2]|0; + $79 = (($76) + 4)|0; $80 = $79; $81 = HEAP32[$80>>2]|0; - $82 = (($79) + 4)|0; - $83 = $82; - $84 = HEAP32[$83>>2]|0; - $85 = (($in) + 32|0); - $86 = $85; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (($86) + 4)|0; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (_i64Add(($88|0),($91|0),($81|0),($84|0))|0); + $82 = (_bitshift64Ashr(0,($78|0),32)|0); + $83 = tempRet0; + $84 = $56; + $85 = $84; + $86 = HEAP32[$85>>2]|0; + $87 = (($84) + 4)|0; + $88 = $87; + $89 = HEAP32[$88>>2]|0; + $90 = (_bitshift64Ashr(0,($86|0),32)|0); + $91 = tempRet0; + $92 = (___muldi3(($90|0),($91|0),($82|0),($83|0))|0); $93 = tempRet0; - $94 = $78; + $94 = $in; $95 = $94; - HEAP32[$95>>2] = $92; - $96 = (($94) + 4)|0; - $97 = $96; - HEAP32[$97>>2] = $93; - $98 = (($output) + 40|0); - $99 = $98; - $100 = $99; - $101 = HEAP32[$100>>2]|0; - $102 = (($99) + 4)|0; + $96 = HEAP32[$95>>2]|0; + $97 = (($94) + 4)|0; + $98 = $97; + $99 = HEAP32[$98>>2]|0; + $100 = (_bitshift64Ashr(0,($96|0),32)|0); + $101 = tempRet0; + $102 = ((($in)) + 24|0); $103 = $102; - $104 = HEAP32[$103>>2]|0; - $105 = (($in) + 40|0); - $106 = $105; + $104 = $103; + $105 = HEAP32[$104>>2]|0; + $106 = (($103) + 4)|0; $107 = $106; $108 = HEAP32[$107>>2]|0; - $109 = (($106) + 4)|0; - $110 = $109; - $111 = HEAP32[$110>>2]|0; - $112 = (_i64Add(($108|0),($111|0),($101|0),($104|0))|0); - $113 = tempRet0; - $114 = $98; - $115 = $114; - HEAP32[$115>>2] = $112; - $116 = (($114) + 4)|0; - $117 = $116; - HEAP32[$117>>2] = $113; - $118 = (($output) + 48|0); + $109 = (_bitshift64Ashr(0,($105|0),32)|0); + $110 = tempRet0; + $111 = (___muldi3(($109|0),($110|0),($100|0),($101|0))|0); + $112 = tempRet0; + $113 = (_i64Add(($111|0),($112|0),($92|0),($93|0))|0); + $114 = tempRet0; + $115 = (_bitshift64Shl(($113|0),($114|0),1)|0); + $116 = tempRet0; + $117 = ((($output)) + 24|0); + $118 = $117; $119 = $118; - $120 = $119; - $121 = HEAP32[$120>>2]|0; - $122 = (($119) + 4)|0; + HEAP32[$119>>2] = $115; + $120 = (($118) + 4)|0; + $121 = $120; + HEAP32[$121>>2] = $116; + $122 = $56; $123 = $122; $124 = HEAP32[$123>>2]|0; - $125 = (($in) + 48|0); + $125 = (($122) + 4)|0; $126 = $125; - $127 = $126; - $128 = HEAP32[$127>>2]|0; - $129 = (($126) + 4)|0; - $130 = $129; - $131 = HEAP32[$130>>2]|0; - $132 = (_i64Add(($128|0),($131|0),($121|0),($124|0))|0); - $133 = tempRet0; - $134 = $118; - $135 = $134; - HEAP32[$135>>2] = $132; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $133; - $138 = (($output) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = (($in) + 56|0); - $146 = $145; - $147 = $146; - $148 = HEAP32[$147>>2]|0; - $149 = (($146) + 4)|0; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (_i64Add(($148|0),($151|0),($141|0),($144|0))|0); - $153 = tempRet0; - $154 = $138; - $155 = $154; - HEAP32[$155>>2] = $152; - $156 = (($154) + 4)|0; - $157 = $156; - HEAP32[$157>>2] = $153; - $158 = (($output) + 64|0); - $159 = $158; - $160 = $159; - $161 = HEAP32[$160>>2]|0; - $162 = (($159) + 4)|0; - $163 = $162; - $164 = HEAP32[$163>>2]|0; - $165 = (($in) + 64|0); - $166 = $165; - $167 = $166; - $168 = HEAP32[$167>>2]|0; - $169 = (($166) + 4)|0; - $170 = $169; - $171 = HEAP32[$170>>2]|0; - $172 = (_i64Add(($168|0),($171|0),($161|0),($164|0))|0); - $173 = tempRet0; - $174 = $158; + $127 = HEAP32[$126>>2]|0; + $128 = (_bitshift64Ashr(0,($124|0),32)|0); + $129 = tempRet0; + $130 = (___muldi3(($128|0),($129|0),($128|0),($129|0))|0); + $131 = tempRet0; + $132 = $22; + $133 = $132; + $134 = HEAP32[$133>>2]|0; + $135 = (($132) + 4)|0; + $136 = $135; + $137 = HEAP32[$136>>2]|0; + $138 = (_bitshift64Ashr(0,($134|0),30)|0); + $139 = tempRet0; + $140 = $102; + $141 = $140; + $142 = HEAP32[$141>>2]|0; + $143 = (($140) + 4)|0; + $144 = $143; + $145 = HEAP32[$144>>2]|0; + $146 = (_bitshift64Ashr(0,($142|0),32)|0); + $147 = tempRet0; + $148 = (___muldi3(($146|0),($147|0),($138|0),($139|0))|0); + $149 = tempRet0; + $150 = (_i64Add(($148|0),($149|0),($130|0),($131|0))|0); + $151 = tempRet0; + $152 = $in; + $153 = $152; + $154 = HEAP32[$153>>2]|0; + $155 = (($152) + 4)|0; + $156 = $155; + $157 = HEAP32[$156>>2]|0; + $158 = (_bitshift64Ashr(0,($154|0),31)|0); + $159 = tempRet0; + $160 = ((($in)) + 32|0); + $161 = $160; + $162 = $161; + $163 = HEAP32[$162>>2]|0; + $164 = (($161) + 4)|0; + $165 = $164; + $166 = HEAP32[$165>>2]|0; + $167 = (_bitshift64Ashr(0,($163|0),32)|0); + $168 = tempRet0; + $169 = (___muldi3(($167|0),($168|0),($158|0),($159|0))|0); + $170 = tempRet0; + $171 = (_i64Add(($150|0),($151|0),($169|0),($170|0))|0); + $172 = tempRet0; + $173 = ((($output)) + 32|0); + $174 = $173; $175 = $174; - HEAP32[$175>>2] = $172; + HEAP32[$175>>2] = $171; $176 = (($174) + 4)|0; $177 = $176; - HEAP32[$177>>2] = $173; - $178 = (($output) + 72|0); + HEAP32[$177>>2] = $172; + $178 = $56; $179 = $178; - $180 = $179; - $181 = HEAP32[$180>>2]|0; - $182 = (($179) + 4)|0; - $183 = $182; - $184 = HEAP32[$183>>2]|0; - $185 = (($in) + 72|0); - $186 = $185; + $180 = HEAP32[$179>>2]|0; + $181 = (($178) + 4)|0; + $182 = $181; + $183 = HEAP32[$182>>2]|0; + $184 = (_bitshift64Ashr(0,($180|0),32)|0); + $185 = tempRet0; + $186 = $102; $187 = $186; $188 = HEAP32[$187>>2]|0; $189 = (($186) + 4)|0; $190 = $189; $191 = HEAP32[$190>>2]|0; - $192 = (_i64Add(($188|0),($191|0),($181|0),($184|0))|0); + $192 = (_bitshift64Ashr(0,($188|0),32)|0); $193 = tempRet0; - $194 = $178; - $195 = $194; - HEAP32[$195>>2] = $192; - $196 = (($194) + 4)|0; - $197 = $196; - HEAP32[$197>>2] = $193; - STACKTOP = sp;return; -} -function _fdifference($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = $output; - $7 = $6; - $8 = HEAP32[$7>>2]|0; - $9 = (($6) + 4)|0; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (_i64Subtract(($2|0),($5|0),($8|0),($11|0))|0); - $13 = tempRet0; - $14 = $output; - $15 = $14; - HEAP32[$15>>2] = $12; - $16 = (($14) + 4)|0; - $17 = $16; - HEAP32[$17>>2] = $13; - $18 = (($in) + 8|0); - $19 = $18; - $20 = $19; - $21 = HEAP32[$20>>2]|0; - $22 = (($19) + 4)|0; - $23 = $22; - $24 = HEAP32[$23>>2]|0; - $25 = (($output) + 8|0); - $26 = $25; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (($26) + 4)|0; - $30 = $29; - $31 = HEAP32[$30>>2]|0; - $32 = (_i64Subtract(($21|0),($24|0),($28|0),($31|0))|0); - $33 = tempRet0; - $34 = $25; - $35 = $34; - HEAP32[$35>>2] = $32; - $36 = (($34) + 4)|0; - $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($in) + 16|0); - $39 = $38; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (($39) + 4)|0; - $43 = $42; - $44 = HEAP32[$43>>2]|0; - $45 = (($output) + 16|0); - $46 = $45; - $47 = $46; - $48 = HEAP32[$47>>2]|0; - $49 = (($46) + 4)|0; - $50 = $49; - $51 = HEAP32[$50>>2]|0; - $52 = (_i64Subtract(($41|0),($44|0),($48|0),($51|0))|0); - $53 = tempRet0; - $54 = $45; - $55 = $54; - HEAP32[$55>>2] = $52; - $56 = (($54) + 4)|0; - $57 = $56; - HEAP32[$57>>2] = $53; - $58 = (($in) + 24|0); - $59 = $58; - $60 = $59; - $61 = HEAP32[$60>>2]|0; - $62 = (($59) + 4)|0; - $63 = $62; - $64 = HEAP32[$63>>2]|0; - $65 = (($output) + 24|0); - $66 = $65; - $67 = $66; - $68 = HEAP32[$67>>2]|0; - $69 = (($66) + 4)|0; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (_i64Subtract(($61|0),($64|0),($68|0),($71|0))|0); - $73 = tempRet0; - $74 = $65; - $75 = $74; - HEAP32[$75>>2] = $72; - $76 = (($74) + 4)|0; - $77 = $76; - HEAP32[$77>>2] = $73; - $78 = (($in) + 32|0); - $79 = $78; - $80 = $79; - $81 = HEAP32[$80>>2]|0; - $82 = (($79) + 4)|0; - $83 = $82; - $84 = HEAP32[$83>>2]|0; - $85 = (($output) + 32|0); - $86 = $85; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (($86) + 4)|0; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (_i64Subtract(($81|0),($84|0),($88|0),($91|0))|0); - $93 = tempRet0; - $94 = $85; - $95 = $94; - HEAP32[$95>>2] = $92; - $96 = (($94) + 4)|0; - $97 = $96; - HEAP32[$97>>2] = $93; - $98 = (($in) + 40|0); - $99 = $98; - $100 = $99; - $101 = HEAP32[$100>>2]|0; - $102 = (($99) + 4)|0; - $103 = $102; - $104 = HEAP32[$103>>2]|0; - $105 = (($output) + 40|0); - $106 = $105; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (($106) + 4)|0; - $110 = $109; - $111 = HEAP32[$110>>2]|0; - $112 = (_i64Subtract(($101|0),($104|0),($108|0),($111|0))|0); - $113 = tempRet0; - $114 = $105; - $115 = $114; - HEAP32[$115>>2] = $112; - $116 = (($114) + 4)|0; - $117 = $116; - HEAP32[$117>>2] = $113; - $118 = (($in) + 48|0); - $119 = $118; - $120 = $119; - $121 = HEAP32[$120>>2]|0; - $122 = (($119) + 4)|0; - $123 = $122; - $124 = HEAP32[$123>>2]|0; - $125 = (($output) + 48|0); - $126 = $125; - $127 = $126; - $128 = HEAP32[$127>>2]|0; - $129 = (($126) + 4)|0; - $130 = $129; - $131 = HEAP32[$130>>2]|0; - $132 = (_i64Subtract(($121|0),($124|0),($128|0),($131|0))|0); - $133 = tempRet0; - $134 = $125; - $135 = $134; - HEAP32[$135>>2] = $132; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $133; - $138 = (($in) + 56|0); - $139 = $138; - $140 = $139; - $141 = HEAP32[$140>>2]|0; - $142 = (($139) + 4)|0; - $143 = $142; - $144 = HEAP32[$143>>2]|0; - $145 = (($output) + 56|0); - $146 = $145; - $147 = $146; - $148 = HEAP32[$147>>2]|0; - $149 = (($146) + 4)|0; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (_i64Subtract(($141|0),($144|0),($148|0),($151|0))|0); - $153 = tempRet0; - $154 = $145; - $155 = $154; - HEAP32[$155>>2] = $152; - $156 = (($154) + 4)|0; - $157 = $156; - HEAP32[$157>>2] = $153; - $158 = (($in) + 64|0); - $159 = $158; - $160 = $159; - $161 = HEAP32[$160>>2]|0; - $162 = (($159) + 4)|0; - $163 = $162; - $164 = HEAP32[$163>>2]|0; - $165 = (($output) + 64|0); - $166 = $165; - $167 = $166; - $168 = HEAP32[$167>>2]|0; - $169 = (($166) + 4)|0; - $170 = $169; - $171 = HEAP32[$170>>2]|0; - $172 = (_i64Subtract(($161|0),($164|0),($168|0),($171|0))|0); - $173 = tempRet0; - $174 = $165; - $175 = $174; - HEAP32[$175>>2] = $172; - $176 = (($174) + 4)|0; - $177 = $176; - HEAP32[$177>>2] = $173; - $178 = (($in) + 72|0); - $179 = $178; - $180 = $179; - $181 = HEAP32[$180>>2]|0; - $182 = (($179) + 4)|0; - $183 = $182; - $184 = HEAP32[$183>>2]|0; - $185 = (($output) + 72|0); - $186 = $185; - $187 = $186; - $188 = HEAP32[$187>>2]|0; - $189 = (($186) + 4)|0; - $190 = $189; - $191 = HEAP32[$190>>2]|0; - $192 = (_i64Subtract(($181|0),($184|0),($188|0),($191|0))|0); - $193 = tempRet0; - $194 = $185; - $195 = $194; - HEAP32[$195>>2] = $192; - $196 = (($194) + 4)|0; - $197 = $196; - HEAP32[$197>>2] = $193; - STACKTOP = sp;return; -} -function _fscalar_product($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; - var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; - var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = (___muldi3(($2|0),($5|0),121665,0)|0); - $7 = tempRet0; - $8 = $output; - $9 = $8; - HEAP32[$9>>2] = $6; - $10 = (($8) + 4)|0; - $11 = $10; - HEAP32[$11>>2] = $7; - $12 = (($in) + 8|0); - $13 = $12; - $14 = $13; - $15 = HEAP32[$14>>2]|0; - $16 = (($13) + 4)|0; - $17 = $16; - $18 = HEAP32[$17>>2]|0; - $19 = (___muldi3(($15|0),($18|0),121665,0)|0); - $20 = tempRet0; - $21 = (($output) + 8|0); - $22 = $21; - $23 = $22; - HEAP32[$23>>2] = $19; - $24 = (($22) + 4)|0; - $25 = $24; - HEAP32[$25>>2] = $20; - $26 = (($in) + 16|0); - $27 = $26; - $28 = $27; - $29 = HEAP32[$28>>2]|0; - $30 = (($27) + 4)|0; - $31 = $30; - $32 = HEAP32[$31>>2]|0; - $33 = (___muldi3(($29|0),($32|0),121665,0)|0); - $34 = tempRet0; - $35 = (($output) + 16|0); - $36 = $35; - $37 = $36; - HEAP32[$37>>2] = $33; - $38 = (($36) + 4)|0; - $39 = $38; - HEAP32[$39>>2] = $34; - $40 = (($in) + 24|0); - $41 = $40; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (($41) + 4)|0; - $45 = $44; - $46 = HEAP32[$45>>2]|0; - $47 = (___muldi3(($43|0),($46|0),121665,0)|0); - $48 = tempRet0; - $49 = (($output) + 24|0); - $50 = $49; - $51 = $50; - HEAP32[$51>>2] = $47; - $52 = (($50) + 4)|0; - $53 = $52; - HEAP32[$53>>2] = $48; - $54 = (($in) + 32|0); - $55 = $54; - $56 = $55; - $57 = HEAP32[$56>>2]|0; - $58 = (($55) + 4)|0; - $59 = $58; - $60 = HEAP32[$59>>2]|0; - $61 = (___muldi3(($57|0),($60|0),121665,0)|0); - $62 = tempRet0; - $63 = (($output) + 32|0); - $64 = $63; - $65 = $64; - HEAP32[$65>>2] = $61; - $66 = (($64) + 4)|0; - $67 = $66; - HEAP32[$67>>2] = $62; - $68 = (($in) + 40|0); - $69 = $68; - $70 = $69; - $71 = HEAP32[$70>>2]|0; - $72 = (($69) + 4)|0; - $73 = $72; - $74 = HEAP32[$73>>2]|0; - $75 = (___muldi3(($71|0),($74|0),121665,0)|0); - $76 = tempRet0; - $77 = (($output) + 40|0); - $78 = $77; - $79 = $78; - HEAP32[$79>>2] = $75; - $80 = (($78) + 4)|0; - $81 = $80; - HEAP32[$81>>2] = $76; - $82 = (($in) + 48|0); - $83 = $82; - $84 = $83; - $85 = HEAP32[$84>>2]|0; - $86 = (($83) + 4)|0; - $87 = $86; - $88 = HEAP32[$87>>2]|0; - $89 = (___muldi3(($85|0),($88|0),121665,0)|0); - $90 = tempRet0; - $91 = (($output) + 48|0); - $92 = $91; - $93 = $92; - HEAP32[$93>>2] = $89; - $94 = (($92) + 4)|0; - $95 = $94; - HEAP32[$95>>2] = $90; - $96 = (($in) + 56|0); - $97 = $96; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (($97) + 4)|0; - $101 = $100; - $102 = HEAP32[$101>>2]|0; - $103 = (___muldi3(($99|0),($102|0),121665,0)|0); - $104 = tempRet0; - $105 = (($output) + 56|0); - $106 = $105; - $107 = $106; - HEAP32[$107>>2] = $103; - $108 = (($106) + 4)|0; - $109 = $108; - HEAP32[$109>>2] = $104; - $110 = (($in) + 64|0); - $111 = $110; - $112 = $111; - $113 = HEAP32[$112>>2]|0; - $114 = (($111) + 4)|0; - $115 = $114; - $116 = HEAP32[$115>>2]|0; - $117 = (___muldi3(($113|0),($116|0),121665,0)|0); - $118 = tempRet0; - $119 = (($output) + 64|0); - $120 = $119; - $121 = $120; - HEAP32[$121>>2] = $117; - $122 = (($120) + 4)|0; - $123 = $122; - HEAP32[$123>>2] = $118; - $124 = (($in) + 72|0); - $125 = $124; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (($125) + 4)|0; - $129 = $128; - $130 = HEAP32[$129>>2]|0; - $131 = (___muldi3(($127|0),($130|0),121665,0)|0); - $132 = tempRet0; - $133 = (($output) + 72|0); - $134 = $133; - $135 = $134; - HEAP32[$135>>2] = $131; - $136 = (($134) + 4)|0; - $137 = $136; - HEAP32[$137>>2] = $132; - STACKTOP = sp;return; -} -function _fsquare_inner($output,$in) { - $output = $output|0; - $in = $in|0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0; - var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0; - var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0; - var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0; - var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0; - var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0; - var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; - var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0; - var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0; - var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0; - var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0; - var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0; - var $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0; - var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0; - var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0; - var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0; - var $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0; - var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0; - var $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0; - var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0; - var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0; - var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0; - var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0; - var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0; - var $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0; - var $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0; - var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0; - var $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0; - var $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0; - var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0; - var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0; - var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0; - var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0; - var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0; - var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0; - var $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0; - var $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0; - var $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0; - var $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0; - var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0; - var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0; - var $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0; - var $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0; - var $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0; - var $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0; - var $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0; - var $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0; - var $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0; - var $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0; - var $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0; - var $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0; - var $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0; - var $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0; - var $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0; - var $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0; - var $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = $in; - $1 = $0; - $2 = HEAP32[$1>>2]|0; - $3 = (($0) + 4)|0; - $4 = $3; - $5 = HEAP32[$4>>2]|0; - $6 = (_bitshift64Ashr(0,($2|0),32)|0); - $7 = tempRet0; - $8 = (___muldi3(($6|0),($7|0),($6|0),($7|0))|0); - $9 = tempRet0; - $10 = $output; - $11 = $10; - HEAP32[$11>>2] = $8; - $12 = (($10) + 4)|0; - $13 = $12; - HEAP32[$13>>2] = $9; - $14 = $in; - $15 = $14; - $16 = HEAP32[$15>>2]|0; - $17 = (($14) + 4)|0; - $18 = $17; - $19 = HEAP32[$18>>2]|0; - $20 = (_bitshift64Ashr(0,($16|0),31)|0); - $21 = tempRet0; - $22 = (($in) + 8|0); - $23 = $22; - $24 = $23; - $25 = HEAP32[$24>>2]|0; - $26 = (($23) + 4)|0; - $27 = $26; - $28 = HEAP32[$27>>2]|0; - $29 = (_bitshift64Ashr(0,($25|0),32)|0); - $30 = tempRet0; - $31 = (___muldi3(($29|0),($30|0),($20|0),($21|0))|0); - $32 = tempRet0; - $33 = (($output) + 8|0); - $34 = $33; - $35 = $34; - HEAP32[$35>>2] = $31; - $36 = (($34) + 4)|0; - $37 = $36; - HEAP32[$37>>2] = $32; - $38 = $22; - $39 = $38; - $40 = HEAP32[$39>>2]|0; - $41 = (($38) + 4)|0; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = (_bitshift64Ashr(0,($40|0),32)|0); - $45 = tempRet0; - $46 = (___muldi3(($44|0),($45|0),($44|0),($45|0))|0); - $47 = tempRet0; - $48 = $in; - $49 = $48; - $50 = HEAP32[$49>>2]|0; - $51 = (($48) + 4)|0; - $52 = $51; - $53 = HEAP32[$52>>2]|0; - $54 = (_bitshift64Ashr(0,($50|0),32)|0); - $55 = tempRet0; - $56 = (($in) + 16|0); - $57 = $56; - $58 = $57; - $59 = HEAP32[$58>>2]|0; - $60 = (($57) + 4)|0; - $61 = $60; - $62 = HEAP32[$61>>2]|0; - $63 = (_bitshift64Ashr(0,($59|0),32)|0); - $64 = tempRet0; - $65 = (___muldi3(($63|0),($64|0),($54|0),($55|0))|0); - $66 = tempRet0; - $67 = (_i64Add(($65|0),($66|0),($46|0),($47|0))|0); - $68 = tempRet0; - $69 = (_bitshift64Shl(($67|0),($68|0),1)|0); - $70 = tempRet0; - $71 = (($output) + 16|0); - $72 = $71; - $73 = $72; - HEAP32[$73>>2] = $69; - $74 = (($72) + 4)|0; - $75 = $74; - HEAP32[$75>>2] = $70; - $76 = $22; - $77 = $76; - $78 = HEAP32[$77>>2]|0; - $79 = (($76) + 4)|0; - $80 = $79; - $81 = HEAP32[$80>>2]|0; - $82 = (_bitshift64Ashr(0,($78|0),32)|0); - $83 = tempRet0; - $84 = $56; - $85 = $84; - $86 = HEAP32[$85>>2]|0; - $87 = (($84) + 4)|0; - $88 = $87; - $89 = HEAP32[$88>>2]|0; - $90 = (_bitshift64Ashr(0,($86|0),32)|0); - $91 = tempRet0; - $92 = (___muldi3(($90|0),($91|0),($82|0),($83|0))|0); - $93 = tempRet0; - $94 = $in; - $95 = $94; - $96 = HEAP32[$95>>2]|0; - $97 = (($94) + 4)|0; - $98 = $97; - $99 = HEAP32[$98>>2]|0; - $100 = (_bitshift64Ashr(0,($96|0),32)|0); - $101 = tempRet0; - $102 = (($in) + 24|0); - $103 = $102; - $104 = $103; - $105 = HEAP32[$104>>2]|0; - $106 = (($103) + 4)|0; - $107 = $106; - $108 = HEAP32[$107>>2]|0; - $109 = (_bitshift64Ashr(0,($105|0),32)|0); - $110 = tempRet0; - $111 = (___muldi3(($109|0),($110|0),($100|0),($101|0))|0); - $112 = tempRet0; - $113 = (_i64Add(($111|0),($112|0),($92|0),($93|0))|0); - $114 = tempRet0; - $115 = (_bitshift64Shl(($113|0),($114|0),1)|0); - $116 = tempRet0; - $117 = (($output) + 24|0); - $118 = $117; - $119 = $118; - HEAP32[$119>>2] = $115; - $120 = (($118) + 4)|0; - $121 = $120; - HEAP32[$121>>2] = $116; - $122 = $56; - $123 = $122; - $124 = HEAP32[$123>>2]|0; - $125 = (($122) + 4)|0; - $126 = $125; - $127 = HEAP32[$126>>2]|0; - $128 = (_bitshift64Ashr(0,($124|0),32)|0); - $129 = tempRet0; - $130 = (___muldi3(($128|0),($129|0),($128|0),($129|0))|0); - $131 = tempRet0; - $132 = $22; - $133 = $132; - $134 = HEAP32[$133>>2]|0; - $135 = (($132) + 4)|0; - $136 = $135; - $137 = HEAP32[$136>>2]|0; - $138 = (_bitshift64Ashr(0,($134|0),30)|0); - $139 = tempRet0; - $140 = $102; - $141 = $140; - $142 = HEAP32[$141>>2]|0; - $143 = (($140) + 4)|0; - $144 = $143; - $145 = HEAP32[$144>>2]|0; - $146 = (_bitshift64Ashr(0,($142|0),32)|0); - $147 = tempRet0; - $148 = (___muldi3(($146|0),($147|0),($138|0),($139|0))|0); - $149 = tempRet0; - $150 = (_i64Add(($148|0),($149|0),($130|0),($131|0))|0); - $151 = tempRet0; - $152 = $in; - $153 = $152; - $154 = HEAP32[$153>>2]|0; - $155 = (($152) + 4)|0; - $156 = $155; - $157 = HEAP32[$156>>2]|0; - $158 = (_bitshift64Ashr(0,($154|0),31)|0); - $159 = tempRet0; - $160 = (($in) + 32|0); - $161 = $160; - $162 = $161; - $163 = HEAP32[$162>>2]|0; - $164 = (($161) + 4)|0; - $165 = $164; - $166 = HEAP32[$165>>2]|0; - $167 = (_bitshift64Ashr(0,($163|0),32)|0); - $168 = tempRet0; - $169 = (___muldi3(($167|0),($168|0),($158|0),($159|0))|0); - $170 = tempRet0; - $171 = (_i64Add(($150|0),($151|0),($169|0),($170|0))|0); - $172 = tempRet0; - $173 = (($output) + 32|0); - $174 = $173; - $175 = $174; - HEAP32[$175>>2] = $171; - $176 = (($174) + 4)|0; - $177 = $176; - HEAP32[$177>>2] = $172; - $178 = $56; - $179 = $178; - $180 = HEAP32[$179>>2]|0; - $181 = (($178) + 4)|0; - $182 = $181; - $183 = HEAP32[$182>>2]|0; - $184 = (_bitshift64Ashr(0,($180|0),32)|0); - $185 = tempRet0; - $186 = $102; - $187 = $186; - $188 = HEAP32[$187>>2]|0; - $189 = (($186) + 4)|0; - $190 = $189; - $191 = HEAP32[$190>>2]|0; - $192 = (_bitshift64Ashr(0,($188|0),32)|0); - $193 = tempRet0; - $194 = (___muldi3(($192|0),($193|0),($184|0),($185|0))|0); - $195 = tempRet0; - $196 = $22; + $194 = (___muldi3(($192|0),($193|0),($184|0),($185|0))|0); + $195 = tempRet0; + $196 = $22; $197 = $196; $198 = HEAP32[$197>>2]|0; $199 = (($196) + 4)|0; @@ -10394,7 +10417,7 @@ function _fsquare_inner($output,$in) { $221 = HEAP32[$220>>2]|0; $222 = (_bitshift64Ashr(0,($218|0),32)|0); $223 = tempRet0; - $224 = (($in) + 40|0); + $224 = ((($in)) + 40|0); $225 = $224; $226 = $225; $227 = HEAP32[$226>>2]|0; @@ -10409,7 +10432,7 @@ function _fsquare_inner($output,$in) { $236 = tempRet0; $237 = (_bitshift64Shl(($235|0),($236|0),1)|0); $238 = tempRet0; - $239 = (($output) + 40|0); + $239 = ((($output)) + 40|0); $240 = $239; $241 = $240; HEAP32[$241>>2] = $237; @@ -10454,7 +10477,7 @@ function _fsquare_inner($output,$in) { $279 = HEAP32[$278>>2]|0; $280 = (_bitshift64Ashr(0,($276|0),32)|0); $281 = tempRet0; - $282 = (($in) + 48|0); + $282 = ((($in)) + 48|0); $283 = $282; $284 = $283; $285 = HEAP32[$284>>2]|0; @@ -10489,7 +10512,7 @@ function _fsquare_inner($output,$in) { $314 = tempRet0; $315 = (_bitshift64Shl(($313|0),($314|0),1)|0); $316 = tempRet0; - $317 = (($output) + 48|0); + $317 = ((($output)) + 48|0); $318 = $317; $319 = $318; HEAP32[$319>>2] = $315; @@ -10562,7 +10585,7 @@ function _fsquare_inner($output,$in) { $385 = HEAP32[$384>>2]|0; $386 = (_bitshift64Ashr(0,($382|0),32)|0); $387 = tempRet0; - $388 = (($in) + 56|0); + $388 = ((($in)) + 56|0); $389 = $388; $390 = $389; $391 = HEAP32[$390>>2]|0; @@ -10577,7 +10600,7 @@ function _fsquare_inner($output,$in) { $400 = tempRet0; $401 = (_bitshift64Shl(($399|0),($400|0),1)|0); $402 = tempRet0; - $403 = (($output) + 56|0); + $403 = ((($output)) + 56|0); $404 = $403; $405 = $404; HEAP32[$405>>2] = $401; @@ -10620,7 +10643,7 @@ function _fsquare_inner($output,$in) { $441 = HEAP32[$440>>2]|0; $442 = (_bitshift64Ashr(0,($438|0),32)|0); $443 = tempRet0; - $444 = (($in) + 64|0); + $444 = ((($in)) + 64|0); $445 = $444; $446 = $445; $447 = HEAP32[$446>>2]|0; @@ -10679,7 +10702,7 @@ function _fsquare_inner($output,$in) { $500 = tempRet0; $501 = (_i64Add(($499|0),($500|0),($416|0),($417|0))|0); $502 = tempRet0; - $503 = (($output) + 64|0); + $503 = ((($output)) + 64|0); $504 = $503; $505 = $504; HEAP32[$505>>2] = $501; @@ -10772,7 +10795,7 @@ function _fsquare_inner($output,$in) { $591 = HEAP32[$590>>2]|0; $592 = (_bitshift64Ashr(0,($588|0),32)|0); $593 = tempRet0; - $594 = (($in) + 72|0); + $594 = ((($in)) + 72|0); $595 = $594; $596 = $595; $597 = HEAP32[$596>>2]|0; @@ -10787,7 +10810,7 @@ function _fsquare_inner($output,$in) { $606 = tempRet0; $607 = (_bitshift64Shl(($605|0),($606|0),1)|0); $608 = tempRet0; - $609 = (($output) + 72|0); + $609 = ((($output)) + 72|0); $610 = $609; $611 = $610; HEAP32[$611>>2] = $607; @@ -10888,7 +10911,7 @@ function _fsquare_inner($output,$in) { $705 = tempRet0; $706 = (_bitshift64Shl(($704|0),($705|0),1)|0); $707 = tempRet0; - $708 = (($output) + 80|0); + $708 = ((($output)) + 80|0); $709 = $708; $710 = $709; HEAP32[$710>>2] = $706; @@ -10975,7 +10998,7 @@ function _fsquare_inner($output,$in) { $790 = tempRet0; $791 = (_bitshift64Shl(($789|0),($790|0),1)|0); $792 = tempRet0; - $793 = (($output) + 88|0); + $793 = ((($output)) + 88|0); $794 = $793; $795 = $794; HEAP32[$795>>2] = $791; @@ -11056,7 +11079,7 @@ function _fsquare_inner($output,$in) { $869 = tempRet0; $870 = (_i64Add(($868|0),($869|0),($806|0),($807|0))|0); $871 = tempRet0; - $872 = (($output) + 96|0); + $872 = ((($output)) + 96|0); $873 = $872; $874 = $873; HEAP32[$874>>2] = $870; @@ -11123,7 +11146,7 @@ function _fsquare_inner($output,$in) { $934 = tempRet0; $935 = (_bitshift64Shl(($933|0),($934|0),1)|0); $936 = tempRet0; - $937 = (($output) + 104|0); + $937 = ((($output)) + 104|0); $938 = $937; $939 = $938; HEAP32[$939>>2] = $935; @@ -11182,7 +11205,7 @@ function _fsquare_inner($output,$in) { $991 = tempRet0; $992 = (_bitshift64Shl(($990|0),($991|0),1)|0); $993 = tempRet0; - $994 = (($output) + 112|0); + $994 = ((($output)) + 112|0); $995 = $994; $996 = $995; HEAP32[$996>>2] = $992; @@ -11229,7 +11252,7 @@ function _fsquare_inner($output,$in) { $1036 = tempRet0; $1037 = (_bitshift64Shl(($1035|0),($1036|0),1)|0); $1038 = tempRet0; - $1039 = (($output) + 120|0); + $1039 = ((($output)) + 120|0); $1040 = $1039; $1041 = $1040; HEAP32[$1041>>2] = $1037; @@ -11266,7 +11289,7 @@ function _fsquare_inner($output,$in) { $1071 = tempRet0; $1072 = (_i64Add(($1070|0),($1071|0),($1052|0),($1053|0))|0); $1073 = tempRet0; - $1074 = (($output) + 128|0); + $1074 = ((($output)) + 128|0); $1075 = $1074; $1076 = $1075; HEAP32[$1076>>2] = $1072; @@ -11291,7 +11314,7 @@ function _fsquare_inner($output,$in) { $1094 = tempRet0; $1095 = (___muldi3(($1093|0),($1094|0),($1085|0),($1086|0))|0); $1096 = tempRet0; - $1097 = (($output) + 136|0); + $1097 = ((($output)) + 136|0); $1098 = $1097; $1099 = $1098; HEAP32[$1099>>2] = $1095; @@ -11310,58 +11333,796 @@ function _fsquare_inner($output,$in) { $1111 = tempRet0; $1112 = (___muldi3(($1110|0),($1111|0),($1108|0),($1109|0))|0); $1113 = tempRet0; - $1114 = (($output) + 144|0); + $1114 = ((($output)) + 144|0); $1115 = $1114; $1116 = $1115; HEAP32[$1116>>2] = $1112; $1117 = (($1115) + 4)|0; $1118 = $1117; HEAP32[$1118>>2] = $1113; - STACKTOP = sp;return; + return; } -function _div_by_2_26($0,$1) { +function _swap_conditional($a,$b,$0,$1) { + $a = $a|0; + $b = $b|0; $0 = $0|0; $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, $exitcond = 0, $i$02 = 0, label = 0, sp = 0; sp = STACKTOP; - $2 = $1 >> 31; - $3 = $2 >>> 6; - $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); - $5 = tempRet0; - $6 = (_bitshift64Ashr(($4|0),($5|0),26)|0); - $7 = tempRet0; - tempRet0 = $7; - STACKTOP = sp;return ($6|0); + $2 = (_i64Subtract(0,0,($0|0),($1|0))|0); + $3 = tempRet0; + $i$02 = 0; + while(1) { + $4 = (($a) + ($i$02<<3)|0); + $5 = $4; + $6 = $5; + $7 = HEAP32[$6>>2]|0; + $8 = (($5) + 4)|0; + $9 = $8; + $10 = HEAP32[$9>>2]|0; + $11 = (($b) + ($i$02<<3)|0); + $12 = $11; + $13 = $12; + $14 = HEAP32[$13>>2]|0; + $15 = (($12) + 4)|0; + $16 = $15; + $17 = HEAP32[$16>>2]|0; + $18 = $14 ^ $7; + $19 = $17 ^ $10; + $20 = $18 & $2; + $21 = $19 & $3; + $22 = $20 ^ $7; + $21 ^ $10; + $23 = (_bitshift64Ashr(0,($22|0),32)|0); + $24 = tempRet0; + $25 = $4; + $26 = $25; + HEAP32[$26>>2] = $23; + $27 = (($25) + 4)|0; + $28 = $27; + HEAP32[$28>>2] = $24; + $29 = $11; + $30 = $29; + $31 = HEAP32[$30>>2]|0; + $32 = (($29) + 4)|0; + $33 = $32; + $34 = HEAP32[$33>>2]|0; + $35 = $20 ^ $31; + $21 ^ $34; + $36 = (_bitshift64Ashr(0,($35|0),32)|0); + $37 = tempRet0; + $38 = $11; + $39 = $38; + HEAP32[$39>>2] = $36; + $40 = (($38) + 4)|0; + $41 = $40; + HEAP32[$41>>2] = $37; + $42 = (($i$02) + 1)|0; + $exitcond = ($42|0)==(10); + if ($exitcond) { + break; + } else { + $i$02 = $42; + } + } + return; +} +function _fmonty($x2,$z2,$x3,$z3,$x,$z,$xprime,$zprime,$qmqp) { + $x2 = $x2|0; + $z2 = $z2|0; + $x3 = $x3|0; + $z3 = $z3|0; + $x = $x|0; + $z = $z|0; + $xprime = $xprime|0; + $zprime = $zprime|0; + $qmqp = $qmqp|0; + var $0 = 0, $origx = 0, $origxprime = 0, $xx = 0, $xxprime = 0, $xxxprime = 0, $zz = 0, $zzprime = 0, $zzz = 0, $zzzprime = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1232|0; + $origx = sp + 1144|0; + $origxprime = sp + 1064|0; + $zzz = sp + 912|0; + $xx = sp + 760|0; + $zz = sp + 608|0; + $xxprime = sp + 456|0; + $zzprime = sp + 304|0; + $zzzprime = sp + 152|0; + $xxxprime = sp; + dest=$origx; src=$x; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsum($x,$z); + _fdifference($z,$origx); + dest=$origxprime; src=$xprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsum($xprime,$zprime); + _fdifference($zprime,$origxprime); + _fproduct($xxprime,$xprime,$z); + _fproduct($zzprime,$x,$zprime); + _freduce_degree($xxprime); + _freduce_coefficients($xxprime); + _freduce_degree($zzprime); + _freduce_coefficients($zzprime); + dest=$origxprime; src=$xxprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsum($xxprime,$zzprime); + _fdifference($zzprime,$origxprime); + _fsquare($xxxprime,$xxprime); + _fsquare($zzzprime,$zzprime); + _fproduct($zzprime,$zzzprime,$qmqp); + _freduce_degree($zzprime); + _freduce_coefficients($zzprime); + dest=$x3; src=$xxxprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$z3; src=$zzprime; stop=dest+80|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _fsquare($xx,$x); + _fsquare($zz,$z); + _fproduct($x2,$xx,$zz); + _freduce_degree($x2); + _freduce_coefficients($x2); + _fdifference($zz,$xx); + $0 = ((($zzz)) + 80|0); + dest=$0; stop=dest+72|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + _fscalar_product($zzz,$zz); + _freduce_coefficients($zzz); + _fsum($zzz,$xx); + _fproduct($z2,$zz,$zzz); + _freduce_degree($z2); + _freduce_coefficients($z2); + STACKTOP = sp;return; +} +function _fsum($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $output; + $1 = $0; + $2 = HEAP32[$1>>2]|0; + $3 = (($0) + 4)|0; + $4 = $3; + $5 = HEAP32[$4>>2]|0; + $6 = $in; + $7 = $6; + $8 = HEAP32[$7>>2]|0; + $9 = (($6) + 4)|0; + $10 = $9; + $11 = HEAP32[$10>>2]|0; + $12 = (_i64Add(($8|0),($11|0),($2|0),($5|0))|0); + $13 = tempRet0; + $14 = $output; + $15 = $14; + HEAP32[$15>>2] = $12; + $16 = (($14) + 4)|0; + $17 = $16; + HEAP32[$17>>2] = $13; + $18 = ((($output)) + 8|0); + $19 = $18; + $20 = $19; + $21 = HEAP32[$20>>2]|0; + $22 = (($19) + 4)|0; + $23 = $22; + $24 = HEAP32[$23>>2]|0; + $25 = ((($in)) + 8|0); + $26 = $25; + $27 = $26; + $28 = HEAP32[$27>>2]|0; + $29 = (($26) + 4)|0; + $30 = $29; + $31 = HEAP32[$30>>2]|0; + $32 = (_i64Add(($28|0),($31|0),($21|0),($24|0))|0); + $33 = tempRet0; + $34 = $18; + $35 = $34; + HEAP32[$35>>2] = $32; + $36 = (($34) + 4)|0; + $37 = $36; + HEAP32[$37>>2] = $33; + $38 = ((($output)) + 16|0); + $39 = $38; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = (($39) + 4)|0; + $43 = $42; + $44 = HEAP32[$43>>2]|0; + $45 = ((($in)) + 16|0); + $46 = $45; + $47 = $46; + $48 = HEAP32[$47>>2]|0; + $49 = (($46) + 4)|0; + $50 = $49; + $51 = HEAP32[$50>>2]|0; + $52 = (_i64Add(($48|0),($51|0),($41|0),($44|0))|0); + $53 = tempRet0; + $54 = $38; + $55 = $54; + HEAP32[$55>>2] = $52; + $56 = (($54) + 4)|0; + $57 = $56; + HEAP32[$57>>2] = $53; + $58 = ((($output)) + 24|0); + $59 = $58; + $60 = $59; + $61 = HEAP32[$60>>2]|0; + $62 = (($59) + 4)|0; + $63 = $62; + $64 = HEAP32[$63>>2]|0; + $65 = ((($in)) + 24|0); + $66 = $65; + $67 = $66; + $68 = HEAP32[$67>>2]|0; + $69 = (($66) + 4)|0; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $72 = (_i64Add(($68|0),($71|0),($61|0),($64|0))|0); + $73 = tempRet0; + $74 = $58; + $75 = $74; + HEAP32[$75>>2] = $72; + $76 = (($74) + 4)|0; + $77 = $76; + HEAP32[$77>>2] = $73; + $78 = ((($output)) + 32|0); + $79 = $78; + $80 = $79; + $81 = HEAP32[$80>>2]|0; + $82 = (($79) + 4)|0; + $83 = $82; + $84 = HEAP32[$83>>2]|0; + $85 = ((($in)) + 32|0); + $86 = $85; + $87 = $86; + $88 = HEAP32[$87>>2]|0; + $89 = (($86) + 4)|0; + $90 = $89; + $91 = HEAP32[$90>>2]|0; + $92 = (_i64Add(($88|0),($91|0),($81|0),($84|0))|0); + $93 = tempRet0; + $94 = $78; + $95 = $94; + HEAP32[$95>>2] = $92; + $96 = (($94) + 4)|0; + $97 = $96; + HEAP32[$97>>2] = $93; + $98 = ((($output)) + 40|0); + $99 = $98; + $100 = $99; + $101 = HEAP32[$100>>2]|0; + $102 = (($99) + 4)|0; + $103 = $102; + $104 = HEAP32[$103>>2]|0; + $105 = ((($in)) + 40|0); + $106 = $105; + $107 = $106; + $108 = HEAP32[$107>>2]|0; + $109 = (($106) + 4)|0; + $110 = $109; + $111 = HEAP32[$110>>2]|0; + $112 = (_i64Add(($108|0),($111|0),($101|0),($104|0))|0); + $113 = tempRet0; + $114 = $98; + $115 = $114; + HEAP32[$115>>2] = $112; + $116 = (($114) + 4)|0; + $117 = $116; + HEAP32[$117>>2] = $113; + $118 = ((($output)) + 48|0); + $119 = $118; + $120 = $119; + $121 = HEAP32[$120>>2]|0; + $122 = (($119) + 4)|0; + $123 = $122; + $124 = HEAP32[$123>>2]|0; + $125 = ((($in)) + 48|0); + $126 = $125; + $127 = $126; + $128 = HEAP32[$127>>2]|0; + $129 = (($126) + 4)|0; + $130 = $129; + $131 = HEAP32[$130>>2]|0; + $132 = (_i64Add(($128|0),($131|0),($121|0),($124|0))|0); + $133 = tempRet0; + $134 = $118; + $135 = $134; + HEAP32[$135>>2] = $132; + $136 = (($134) + 4)|0; + $137 = $136; + HEAP32[$137>>2] = $133; + $138 = ((($output)) + 56|0); + $139 = $138; + $140 = $139; + $141 = HEAP32[$140>>2]|0; + $142 = (($139) + 4)|0; + $143 = $142; + $144 = HEAP32[$143>>2]|0; + $145 = ((($in)) + 56|0); + $146 = $145; + $147 = $146; + $148 = HEAP32[$147>>2]|0; + $149 = (($146) + 4)|0; + $150 = $149; + $151 = HEAP32[$150>>2]|0; + $152 = (_i64Add(($148|0),($151|0),($141|0),($144|0))|0); + $153 = tempRet0; + $154 = $138; + $155 = $154; + HEAP32[$155>>2] = $152; + $156 = (($154) + 4)|0; + $157 = $156; + HEAP32[$157>>2] = $153; + $158 = ((($output)) + 64|0); + $159 = $158; + $160 = $159; + $161 = HEAP32[$160>>2]|0; + $162 = (($159) + 4)|0; + $163 = $162; + $164 = HEAP32[$163>>2]|0; + $165 = ((($in)) + 64|0); + $166 = $165; + $167 = $166; + $168 = HEAP32[$167>>2]|0; + $169 = (($166) + 4)|0; + $170 = $169; + $171 = HEAP32[$170>>2]|0; + $172 = (_i64Add(($168|0),($171|0),($161|0),($164|0))|0); + $173 = tempRet0; + $174 = $158; + $175 = $174; + HEAP32[$175>>2] = $172; + $176 = (($174) + 4)|0; + $177 = $176; + HEAP32[$177>>2] = $173; + $178 = ((($output)) + 72|0); + $179 = $178; + $180 = $179; + $181 = HEAP32[$180>>2]|0; + $182 = (($179) + 4)|0; + $183 = $182; + $184 = HEAP32[$183>>2]|0; + $185 = ((($in)) + 72|0); + $186 = $185; + $187 = $186; + $188 = HEAP32[$187>>2]|0; + $189 = (($186) + 4)|0; + $190 = $189; + $191 = HEAP32[$190>>2]|0; + $192 = (_i64Add(($188|0),($191|0),($181|0),($184|0))|0); + $193 = tempRet0; + $194 = $178; + $195 = $194; + HEAP32[$195>>2] = $192; + $196 = (($194) + 4)|0; + $197 = $196; + HEAP32[$197>>2] = $193; + return; +} +function _fdifference($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; + var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; + var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = $in; + $1 = $0; + $2 = HEAP32[$1>>2]|0; + $3 = (($0) + 4)|0; + $4 = $3; + $5 = HEAP32[$4>>2]|0; + $6 = $output; + $7 = $6; + $8 = HEAP32[$7>>2]|0; + $9 = (($6) + 4)|0; + $10 = $9; + $11 = HEAP32[$10>>2]|0; + $12 = (_i64Subtract(($2|0),($5|0),($8|0),($11|0))|0); + $13 = tempRet0; + $14 = $output; + $15 = $14; + HEAP32[$15>>2] = $12; + $16 = (($14) + 4)|0; + $17 = $16; + HEAP32[$17>>2] = $13; + $18 = ((($in)) + 8|0); + $19 = $18; + $20 = $19; + $21 = HEAP32[$20>>2]|0; + $22 = (($19) + 4)|0; + $23 = $22; + $24 = HEAP32[$23>>2]|0; + $25 = ((($output)) + 8|0); + $26 = $25; + $27 = $26; + $28 = HEAP32[$27>>2]|0; + $29 = (($26) + 4)|0; + $30 = $29; + $31 = HEAP32[$30>>2]|0; + $32 = (_i64Subtract(($21|0),($24|0),($28|0),($31|0))|0); + $33 = tempRet0; + $34 = $25; + $35 = $34; + HEAP32[$35>>2] = $32; + $36 = (($34) + 4)|0; + $37 = $36; + HEAP32[$37>>2] = $33; + $38 = ((($in)) + 16|0); + $39 = $38; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = (($39) + 4)|0; + $43 = $42; + $44 = HEAP32[$43>>2]|0; + $45 = ((($output)) + 16|0); + $46 = $45; + $47 = $46; + $48 = HEAP32[$47>>2]|0; + $49 = (($46) + 4)|0; + $50 = $49; + $51 = HEAP32[$50>>2]|0; + $52 = (_i64Subtract(($41|0),($44|0),($48|0),($51|0))|0); + $53 = tempRet0; + $54 = $45; + $55 = $54; + HEAP32[$55>>2] = $52; + $56 = (($54) + 4)|0; + $57 = $56; + HEAP32[$57>>2] = $53; + $58 = ((($in)) + 24|0); + $59 = $58; + $60 = $59; + $61 = HEAP32[$60>>2]|0; + $62 = (($59) + 4)|0; + $63 = $62; + $64 = HEAP32[$63>>2]|0; + $65 = ((($output)) + 24|0); + $66 = $65; + $67 = $66; + $68 = HEAP32[$67>>2]|0; + $69 = (($66) + 4)|0; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $72 = (_i64Subtract(($61|0),($64|0),($68|0),($71|0))|0); + $73 = tempRet0; + $74 = $65; + $75 = $74; + HEAP32[$75>>2] = $72; + $76 = (($74) + 4)|0; + $77 = $76; + HEAP32[$77>>2] = $73; + $78 = ((($in)) + 32|0); + $79 = $78; + $80 = $79; + $81 = HEAP32[$80>>2]|0; + $82 = (($79) + 4)|0; + $83 = $82; + $84 = HEAP32[$83>>2]|0; + $85 = ((($output)) + 32|0); + $86 = $85; + $87 = $86; + $88 = HEAP32[$87>>2]|0; + $89 = (($86) + 4)|0; + $90 = $89; + $91 = HEAP32[$90>>2]|0; + $92 = (_i64Subtract(($81|0),($84|0),($88|0),($91|0))|0); + $93 = tempRet0; + $94 = $85; + $95 = $94; + HEAP32[$95>>2] = $92; + $96 = (($94) + 4)|0; + $97 = $96; + HEAP32[$97>>2] = $93; + $98 = ((($in)) + 40|0); + $99 = $98; + $100 = $99; + $101 = HEAP32[$100>>2]|0; + $102 = (($99) + 4)|0; + $103 = $102; + $104 = HEAP32[$103>>2]|0; + $105 = ((($output)) + 40|0); + $106 = $105; + $107 = $106; + $108 = HEAP32[$107>>2]|0; + $109 = (($106) + 4)|0; + $110 = $109; + $111 = HEAP32[$110>>2]|0; + $112 = (_i64Subtract(($101|0),($104|0),($108|0),($111|0))|0); + $113 = tempRet0; + $114 = $105; + $115 = $114; + HEAP32[$115>>2] = $112; + $116 = (($114) + 4)|0; + $117 = $116; + HEAP32[$117>>2] = $113; + $118 = ((($in)) + 48|0); + $119 = $118; + $120 = $119; + $121 = HEAP32[$120>>2]|0; + $122 = (($119) + 4)|0; + $123 = $122; + $124 = HEAP32[$123>>2]|0; + $125 = ((($output)) + 48|0); + $126 = $125; + $127 = $126; + $128 = HEAP32[$127>>2]|0; + $129 = (($126) + 4)|0; + $130 = $129; + $131 = HEAP32[$130>>2]|0; + $132 = (_i64Subtract(($121|0),($124|0),($128|0),($131|0))|0); + $133 = tempRet0; + $134 = $125; + $135 = $134; + HEAP32[$135>>2] = $132; + $136 = (($134) + 4)|0; + $137 = $136; + HEAP32[$137>>2] = $133; + $138 = ((($in)) + 56|0); + $139 = $138; + $140 = $139; + $141 = HEAP32[$140>>2]|0; + $142 = (($139) + 4)|0; + $143 = $142; + $144 = HEAP32[$143>>2]|0; + $145 = ((($output)) + 56|0); + $146 = $145; + $147 = $146; + $148 = HEAP32[$147>>2]|0; + $149 = (($146) + 4)|0; + $150 = $149; + $151 = HEAP32[$150>>2]|0; + $152 = (_i64Subtract(($141|0),($144|0),($148|0),($151|0))|0); + $153 = tempRet0; + $154 = $145; + $155 = $154; + HEAP32[$155>>2] = $152; + $156 = (($154) + 4)|0; + $157 = $156; + HEAP32[$157>>2] = $153; + $158 = ((($in)) + 64|0); + $159 = $158; + $160 = $159; + $161 = HEAP32[$160>>2]|0; + $162 = (($159) + 4)|0; + $163 = $162; + $164 = HEAP32[$163>>2]|0; + $165 = ((($output)) + 64|0); + $166 = $165; + $167 = $166; + $168 = HEAP32[$167>>2]|0; + $169 = (($166) + 4)|0; + $170 = $169; + $171 = HEAP32[$170>>2]|0; + $172 = (_i64Subtract(($161|0),($164|0),($168|0),($171|0))|0); + $173 = tempRet0; + $174 = $165; + $175 = $174; + HEAP32[$175>>2] = $172; + $176 = (($174) + 4)|0; + $177 = $176; + HEAP32[$177>>2] = $173; + $178 = ((($in)) + 72|0); + $179 = $178; + $180 = $179; + $181 = HEAP32[$180>>2]|0; + $182 = (($179) + 4)|0; + $183 = $182; + $184 = HEAP32[$183>>2]|0; + $185 = ((($output)) + 72|0); + $186 = $185; + $187 = $186; + $188 = HEAP32[$187>>2]|0; + $189 = (($186) + 4)|0; + $190 = $189; + $191 = HEAP32[$190>>2]|0; + $192 = (_i64Subtract(($181|0),($184|0),($188|0),($191|0))|0); + $193 = tempRet0; + $194 = $185; + $195 = $194; + HEAP32[$195>>2] = $192; + $196 = (($194) + 4)|0; + $197 = $196; + HEAP32[$197>>2] = $193; + return; } -function _div_by_2_25($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; +function _fscalar_product($output,$in) { + $output = $output|0; + $in = $in|0; + var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; + var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; + var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; - $2 = $1 >> 31; - $3 = $2 >>> 7; - $4 = (_i64Add(($3|0),0,($0|0),($1|0))|0); - $5 = tempRet0; - $6 = (_bitshift64Ashr(($4|0),($5|0),25)|0); + $0 = $in; + $1 = $0; + $2 = HEAP32[$1>>2]|0; + $3 = (($0) + 4)|0; + $4 = $3; + $5 = HEAP32[$4>>2]|0; + $6 = (___muldi3(($2|0),($5|0),121665,0)|0); $7 = tempRet0; - tempRet0 = $7; - STACKTOP = sp;return ($6|0); + $8 = $output; + $9 = $8; + HEAP32[$9>>2] = $6; + $10 = (($8) + 4)|0; + $11 = $10; + HEAP32[$11>>2] = $7; + $12 = ((($in)) + 8|0); + $13 = $12; + $14 = $13; + $15 = HEAP32[$14>>2]|0; + $16 = (($13) + 4)|0; + $17 = $16; + $18 = HEAP32[$17>>2]|0; + $19 = (___muldi3(($15|0),($18|0),121665,0)|0); + $20 = tempRet0; + $21 = ((($output)) + 8|0); + $22 = $21; + $23 = $22; + HEAP32[$23>>2] = $19; + $24 = (($22) + 4)|0; + $25 = $24; + HEAP32[$25>>2] = $20; + $26 = ((($in)) + 16|0); + $27 = $26; + $28 = $27; + $29 = HEAP32[$28>>2]|0; + $30 = (($27) + 4)|0; + $31 = $30; + $32 = HEAP32[$31>>2]|0; + $33 = (___muldi3(($29|0),($32|0),121665,0)|0); + $34 = tempRet0; + $35 = ((($output)) + 16|0); + $36 = $35; + $37 = $36; + HEAP32[$37>>2] = $33; + $38 = (($36) + 4)|0; + $39 = $38; + HEAP32[$39>>2] = $34; + $40 = ((($in)) + 24|0); + $41 = $40; + $42 = $41; + $43 = HEAP32[$42>>2]|0; + $44 = (($41) + 4)|0; + $45 = $44; + $46 = HEAP32[$45>>2]|0; + $47 = (___muldi3(($43|0),($46|0),121665,0)|0); + $48 = tempRet0; + $49 = ((($output)) + 24|0); + $50 = $49; + $51 = $50; + HEAP32[$51>>2] = $47; + $52 = (($50) + 4)|0; + $53 = $52; + HEAP32[$53>>2] = $48; + $54 = ((($in)) + 32|0); + $55 = $54; + $56 = $55; + $57 = HEAP32[$56>>2]|0; + $58 = (($55) + 4)|0; + $59 = $58; + $60 = HEAP32[$59>>2]|0; + $61 = (___muldi3(($57|0),($60|0),121665,0)|0); + $62 = tempRet0; + $63 = ((($output)) + 32|0); + $64 = $63; + $65 = $64; + HEAP32[$65>>2] = $61; + $66 = (($64) + 4)|0; + $67 = $66; + HEAP32[$67>>2] = $62; + $68 = ((($in)) + 40|0); + $69 = $68; + $70 = $69; + $71 = HEAP32[$70>>2]|0; + $72 = (($69) + 4)|0; + $73 = $72; + $74 = HEAP32[$73>>2]|0; + $75 = (___muldi3(($71|0),($74|0),121665,0)|0); + $76 = tempRet0; + $77 = ((($output)) + 40|0); + $78 = $77; + $79 = $78; + HEAP32[$79>>2] = $75; + $80 = (($78) + 4)|0; + $81 = $80; + HEAP32[$81>>2] = $76; + $82 = ((($in)) + 48|0); + $83 = $82; + $84 = $83; + $85 = HEAP32[$84>>2]|0; + $86 = (($83) + 4)|0; + $87 = $86; + $88 = HEAP32[$87>>2]|0; + $89 = (___muldi3(($85|0),($88|0),121665,0)|0); + $90 = tempRet0; + $91 = ((($output)) + 48|0); + $92 = $91; + $93 = $92; + HEAP32[$93>>2] = $89; + $94 = (($92) + 4)|0; + $95 = $94; + HEAP32[$95>>2] = $90; + $96 = ((($in)) + 56|0); + $97 = $96; + $98 = $97; + $99 = HEAP32[$98>>2]|0; + $100 = (($97) + 4)|0; + $101 = $100; + $102 = HEAP32[$101>>2]|0; + $103 = (___muldi3(($99|0),($102|0),121665,0)|0); + $104 = tempRet0; + $105 = ((($output)) + 56|0); + $106 = $105; + $107 = $106; + HEAP32[$107>>2] = $103; + $108 = (($106) + 4)|0; + $109 = $108; + HEAP32[$109>>2] = $104; + $110 = ((($in)) + 64|0); + $111 = $110; + $112 = $111; + $113 = HEAP32[$112>>2]|0; + $114 = (($111) + 4)|0; + $115 = $114; + $116 = HEAP32[$115>>2]|0; + $117 = (___muldi3(($113|0),($116|0),121665,0)|0); + $118 = tempRet0; + $119 = ((($output)) + 64|0); + $120 = $119; + $121 = $120; + HEAP32[$121>>2] = $117; + $122 = (($120) + 4)|0; + $123 = $122; + HEAP32[$123>>2] = $118; + $124 = ((($in)) + 72|0); + $125 = $124; + $126 = $125; + $127 = HEAP32[$126>>2]|0; + $128 = (($125) + 4)|0; + $129 = $128; + $130 = HEAP32[$129>>2]|0; + $131 = (___muldi3(($127|0),($130|0),121665,0)|0); + $132 = tempRet0; + $133 = ((($output)) + 72|0); + $134 = $133; + $135 = $134; + HEAP32[$135>>2] = $131; + $136 = (($134) + 4)|0; + $137 = $136; + HEAP32[$137>>2] = $132; + return; } function _crypto_sign_ed25519_ref10_fe_0($h) { $h = $h|0; var dest = 0, label = 0, sp = 0, stop = 0; sp = STACKTOP; - dest=$h+0|0; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; + dest=$h; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + return; } function _crypto_sign_ed25519_ref10_fe_1($h) { $h = $h|0; var $0 = 0, dest = 0, label = 0, sp = 0, stop = 0; sp = STACKTOP; HEAP32[$h>>2] = 1; - $0 = (($h) + 4|0); - dest=$0+0|0; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; + $0 = ((($h)) + 4|0); + dest=$0; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + return; } function _crypto_sign_ed25519_ref10_fe_add($h,$f,$g) { $h = $h|0; @@ -11372,42 +12133,42 @@ function _crypto_sign_ed25519_ref10_fe_add($h,$f,$g) { var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); + $20 = ((($g)) + 4|0); $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); + $22 = ((($g)) + 8|0); $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); + $24 = ((($g)) + 12|0); $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); + $26 = ((($g)) + 16|0); $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); + $28 = ((($g)) + 20|0); $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); + $30 = ((($g)) + 24|0); $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); + $32 = ((($g)) + 28|0); $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); + $34 = ((($g)) + 32|0); $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); + $36 = ((($g)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = (($19) + ($0))|0; $39 = (($21) + ($2))|0; @@ -11420,25 +12181,25 @@ function _crypto_sign_ed25519_ref10_fe_add($h,$f,$g) { $46 = (($35) + ($16))|0; $47 = (($37) + ($18))|0; HEAP32[$h>>2] = $38; - $48 = (($h) + 4|0); + $48 = ((($h)) + 4|0); HEAP32[$48>>2] = $39; - $49 = (($h) + 8|0); + $49 = ((($h)) + 8|0); HEAP32[$49>>2] = $40; - $50 = (($h) + 12|0); + $50 = ((($h)) + 12|0); HEAP32[$50>>2] = $41; - $51 = (($h) + 16|0); + $51 = ((($h)) + 16|0); HEAP32[$51>>2] = $42; - $52 = (($h) + 20|0); + $52 = ((($h)) + 20|0); HEAP32[$52>>2] = $43; - $53 = (($h) + 24|0); + $53 = ((($h)) + 24|0); HEAP32[$53>>2] = $44; - $54 = (($h) + 28|0); + $54 = ((($h)) + 28|0); HEAP32[$54>>2] = $45; - $55 = (($h) + 32|0); + $55 = ((($h)) + 32|0); HEAP32[$55>>2] = $46; - $56 = (($h) + 36|0); + $56 = ((($h)) + 36|0); HEAP32[$56>>2] = $47; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_cmov($f,$g,$b) { $f = $f|0; @@ -11450,42 +12211,42 @@ function _crypto_sign_ed25519_ref10_fe_cmov($f,$g,$b) { var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); + $20 = ((($g)) + 4|0); $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); + $22 = ((($g)) + 8|0); $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); + $24 = ((($g)) + 12|0); $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); + $26 = ((($g)) + 16|0); $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); + $28 = ((($g)) + 20|0); $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); + $30 = ((($g)) + 24|0); $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); + $32 = ((($g)) + 28|0); $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); + $34 = ((($g)) + 32|0); $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); + $36 = ((($g)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = $19 ^ $0; $39 = $21 ^ $2; @@ -11528,7 +12289,7 @@ function _crypto_sign_ed25519_ref10_fe_cmov($f,$g,$b) { HEAP32[$15>>2] = $67; $68 = $58 ^ $18; HEAP32[$17>>2] = $68; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_copy($h,$f) { $h = $h|0; @@ -11537,44 +12298,44 @@ function _crypto_sign_ed25519_ref10_fe_copy($h,$f) { var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; HEAP32[$h>>2] = $0; - $19 = (($h) + 4|0); + $19 = ((($h)) + 4|0); HEAP32[$19>>2] = $2; - $20 = (($h) + 8|0); + $20 = ((($h)) + 8|0); HEAP32[$20>>2] = $4; - $21 = (($h) + 12|0); + $21 = ((($h)) + 12|0); HEAP32[$21>>2] = $6; - $22 = (($h) + 16|0); + $22 = ((($h)) + 16|0); HEAP32[$22>>2] = $8; - $23 = (($h) + 20|0); + $23 = ((($h)) + 20|0); HEAP32[$23>>2] = $10; - $24 = (($h) + 24|0); + $24 = ((($h)) + 24|0); HEAP32[$24>>2] = $12; - $25 = (($h) + 28|0); + $25 = ((($h)) + 28|0); HEAP32[$25>>2] = $14; - $26 = (($h) + 32|0); + $26 = ((($h)) + 32|0); HEAP32[$26>>2] = $16; - $27 = (($h) + 36|0); + $27 = ((($h)) + 36|0); HEAP32[$27>>2] = $18; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_frombytes($h,$s) { $h = $h|0; @@ -11582,53 +12343,53 @@ function _crypto_sign_ed25519_ref10_fe_frombytes($h,$s) { var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0; var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0; var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; - var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; - var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; - var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; - var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; + var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = (_load_4($s)|0); $1 = tempRet0; - $2 = (($s) + 4|0); + $2 = ((($s)) + 4|0); $3 = (_load_3($2)|0); $4 = tempRet0; $5 = (_bitshift64Shl(($3|0),($4|0),6)|0); $6 = tempRet0; - $7 = (($s) + 7|0); + $7 = ((($s)) + 7|0); $8 = (_load_3($7)|0); $9 = tempRet0; $10 = (_bitshift64Shl(($8|0),($9|0),5)|0); $11 = tempRet0; - $12 = (($s) + 10|0); + $12 = ((($s)) + 10|0); $13 = (_load_3($12)|0); $14 = tempRet0; $15 = (_bitshift64Shl(($13|0),($14|0),3)|0); $16 = tempRet0; - $17 = (($s) + 13|0); + $17 = ((($s)) + 13|0); $18 = (_load_3($17)|0); $19 = tempRet0; $20 = (_bitshift64Shl(($18|0),($19|0),2)|0); $21 = tempRet0; - $22 = (($s) + 16|0); + $22 = ((($s)) + 16|0); $23 = (_load_4($22)|0); $24 = tempRet0; - $25 = (($s) + 20|0); + $25 = ((($s)) + 20|0); $26 = (_load_3($25)|0); $27 = tempRet0; $28 = (_bitshift64Shl(($26|0),($27|0),7)|0); $29 = tempRet0; - $30 = (($s) + 23|0); + $30 = ((($s)) + 23|0); $31 = (_load_3($30)|0); $32 = tempRet0; $33 = (_bitshift64Shl(($31|0),($32|0),5)|0); $34 = tempRet0; - $35 = (($s) + 26|0); + $35 = ((($s)) + 26|0); $36 = (_load_3($35)|0); $37 = tempRet0; $38 = (_bitshift64Shl(($36|0),($37|0),4)|0); $39 = tempRet0; - $40 = (($s) + 29|0); + $40 = ((($s)) + 29|0); $41 = (_load_3($40)|0); $42 = tempRet0; $43 = (_bitshift64Shl(($41|0),($42|0),2)|0); @@ -11638,124 +12399,125 @@ function _crypto_sign_ed25519_ref10_fe_frombytes($h,$s) { $47 = tempRet0; $48 = (_bitshift64Lshr(($46|0),($47|0),25)|0); $49 = tempRet0; - $50 = (___muldi3(($48|0),($49|0),19,0)|0); + $50 = (_i64Subtract(0,0,($48|0),($49|0))|0); $51 = tempRet0; - $52 = (_i64Add(($50|0),($51|0),($0|0),($1|0))|0); - $53 = tempRet0; - $54 = (_bitshift64Shl(($48|0),($49|0),25)|0); - $55 = tempRet0; - $56 = (_i64Add(($5|0),($6|0),16777216,0)|0); - $57 = tempRet0; - $58 = (_bitshift64Ashr(($56|0),($57|0),25)|0); - $59 = tempRet0; - $60 = (_i64Add(($58|0),($59|0),($10|0),($11|0))|0); - $61 = tempRet0; - $62 = (_bitshift64Shl(($58|0),($59|0),25)|0); - $63 = tempRet0; - $64 = (_i64Subtract(($5|0),($6|0),($62|0),($63|0))|0); - $65 = tempRet0; - $66 = (_i64Add(($15|0),($16|0),16777216,0)|0); - $67 = tempRet0; - $68 = (_bitshift64Ashr(($66|0),($67|0),25)|0); - $69 = tempRet0; - $70 = (_i64Add(($68|0),($69|0),($20|0),($21|0))|0); - $71 = tempRet0; - $72 = (_bitshift64Shl(($68|0),($69|0),25)|0); - $73 = tempRet0; - $74 = (_i64Subtract(($15|0),($16|0),($72|0),($73|0))|0); - $75 = tempRet0; - $76 = (_i64Add(($23|0),($24|0),16777216,0)|0); - $77 = tempRet0; - $78 = (_bitshift64Ashr(($76|0),($77|0),25)|0); - $79 = tempRet0; - $80 = (_i64Add(($28|0),($29|0),($78|0),($79|0))|0); - $81 = tempRet0; - $82 = (_bitshift64Shl(($78|0),($79|0),25)|0); - $83 = tempRet0; - $84 = (_i64Subtract(($23|0),($24|0),($82|0),($83|0))|0); - $85 = tempRet0; - $86 = (_i64Add(($33|0),($34|0),16777216,0)|0); - $87 = tempRet0; - $88 = (_bitshift64Ashr(($86|0),($87|0),25)|0); - $89 = tempRet0; - $90 = (_i64Add(($88|0),($89|0),($38|0),($39|0))|0); - $91 = tempRet0; - $92 = (_bitshift64Shl(($88|0),($89|0),25)|0); - $93 = tempRet0; - $94 = (_i64Add(($52|0),($53|0),33554432,0)|0); - $95 = tempRet0; - $96 = (_bitshift64Ashr(($94|0),($95|0),26)|0); - $97 = tempRet0; - $98 = (_i64Add(($64|0),($65|0),($96|0),($97|0))|0); - $99 = tempRet0; - $100 = (_bitshift64Shl(($96|0),($97|0),26)|0); - $101 = tempRet0; - $102 = (_i64Subtract(($52|0),($53|0),($100|0),($101|0))|0); - $103 = tempRet0; - $104 = (_i64Add(($60|0),($61|0),33554432,0)|0); - $105 = tempRet0; - $106 = (_bitshift64Ashr(($104|0),($105|0),26)|0); - $107 = tempRet0; - $108 = (_i64Add(($74|0),($75|0),($106|0),($107|0))|0); - $109 = tempRet0; - $110 = (_bitshift64Shl(($106|0),($107|0),26)|0); - $111 = tempRet0; - $112 = (_i64Subtract(($60|0),($61|0),($110|0),($111|0))|0); - $113 = tempRet0; - $114 = (_i64Add(($70|0),($71|0),33554432,0)|0); - $115 = tempRet0; - $116 = (_bitshift64Ashr(($114|0),($115|0),26)|0); - $117 = tempRet0; - $118 = (_i64Add(($84|0),($85|0),($116|0),($117|0))|0); - $119 = tempRet0; - $120 = (_bitshift64Shl(($116|0),($117|0),26)|0); - $121 = tempRet0; - $122 = (_i64Subtract(($70|0),($71|0),($120|0),($121|0))|0); - $123 = tempRet0; - $124 = (_i64Add(($80|0),($81|0),33554432,0)|0); - $125 = tempRet0; - $126 = (_bitshift64Ashr(($124|0),($125|0),26)|0); - $127 = tempRet0; - $128 = (_i64Add(($126|0),($127|0),($33|0),($34|0))|0); - $129 = tempRet0; - $130 = (_i64Subtract(($128|0),($129|0),($92|0),($93|0))|0); - $131 = tempRet0; - $132 = (_bitshift64Shl(($126|0),($127|0),26)|0); - $133 = tempRet0; - $134 = (_i64Subtract(($80|0),($81|0),($132|0),($133|0))|0); - $135 = tempRet0; - $136 = (_i64Add(($90|0),($91|0),33554432,0)|0); - $137 = tempRet0; - $138 = (_bitshift64Ashr(($136|0),($137|0),26)|0); - $139 = tempRet0; - $140 = (_i64Add(($138|0),($139|0),($45|0),0)|0); - $141 = tempRet0; - $142 = (_i64Subtract(($140|0),($141|0),($54|0),($55|0))|0); - $143 = tempRet0; - $144 = (_bitshift64Shl(($138|0),($139|0),26)|0); - $145 = tempRet0; - $146 = (_i64Subtract(($90|0),($91|0),($144|0),($145|0))|0); - $147 = tempRet0; - HEAP32[$h>>2] = $102; - $148 = (($h) + 4|0); - HEAP32[$148>>2] = $98; - $149 = (($h) + 8|0); - HEAP32[$149>>2] = $112; - $150 = (($h) + 12|0); - HEAP32[$150>>2] = $108; - $151 = (($h) + 16|0); - HEAP32[$151>>2] = $122; - $152 = (($h) + 20|0); - HEAP32[$152>>2] = $118; - $153 = (($h) + 24|0); - HEAP32[$153>>2] = $134; - $154 = (($h) + 28|0); - HEAP32[$154>>2] = $130; - $155 = (($h) + 32|0); - HEAP32[$155>>2] = $146; - $156 = (($h) + 36|0); - HEAP32[$156>>2] = $142; - STACKTOP = sp;return; + $52 = $50 & 19; + $53 = (_i64Add(($52|0),0,($0|0),($1|0))|0); + $54 = tempRet0; + $55 = (_bitshift64Shl(($48|0),($49|0),25)|0); + $56 = tempRet0; + $57 = (_i64Add(($5|0),($6|0),16777216,0)|0); + $58 = tempRet0; + $59 = (_bitshift64Ashr(($57|0),($58|0),25)|0); + $60 = tempRet0; + $61 = (_i64Add(($59|0),($60|0),($10|0),($11|0))|0); + $62 = tempRet0; + $63 = (_bitshift64Shl(($59|0),($60|0),25)|0); + $64 = tempRet0; + $65 = (_i64Subtract(($5|0),($6|0),($63|0),($64|0))|0); + $66 = tempRet0; + $67 = (_i64Add(($15|0),($16|0),16777216,0)|0); + $68 = tempRet0; + $69 = (_bitshift64Ashr(($67|0),($68|0),25)|0); + $70 = tempRet0; + $71 = (_i64Add(($69|0),($70|0),($20|0),($21|0))|0); + $72 = tempRet0; + $73 = (_bitshift64Shl(($69|0),($70|0),25)|0); + $74 = tempRet0; + $75 = (_i64Subtract(($15|0),($16|0),($73|0),($74|0))|0); + $76 = tempRet0; + $77 = (_i64Add(($23|0),($24|0),16777216,0)|0); + $78 = tempRet0; + $79 = (_bitshift64Ashr(($77|0),($78|0),25)|0); + $80 = tempRet0; + $81 = (_i64Add(($28|0),($29|0),($79|0),($80|0))|0); + $82 = tempRet0; + $83 = (_bitshift64Shl(($79|0),($80|0),25)|0); + $84 = tempRet0; + $85 = (_i64Subtract(($23|0),($24|0),($83|0),($84|0))|0); + $86 = tempRet0; + $87 = (_i64Add(($33|0),($34|0),16777216,0)|0); + $88 = tempRet0; + $89 = (_bitshift64Ashr(($87|0),($88|0),25)|0); + $90 = tempRet0; + $91 = (_i64Add(($89|0),($90|0),($38|0),($39|0))|0); + $92 = tempRet0; + $93 = (_bitshift64Shl(($89|0),($90|0),25)|0); + $94 = tempRet0; + $95 = (_i64Add(($53|0),($54|0),33554432,0)|0); + $96 = tempRet0; + $97 = (_bitshift64Ashr(($95|0),($96|0),26)|0); + $98 = tempRet0; + $99 = (_i64Add(($65|0),($66|0),($97|0),($98|0))|0); + $100 = tempRet0; + $101 = (_bitshift64Shl(($97|0),($98|0),26)|0); + $102 = tempRet0; + $103 = (_i64Subtract(($53|0),($54|0),($101|0),($102|0))|0); + $104 = tempRet0; + $105 = (_i64Add(($61|0),($62|0),33554432,0)|0); + $106 = tempRet0; + $107 = (_bitshift64Ashr(($105|0),($106|0),26)|0); + $108 = tempRet0; + $109 = (_i64Add(($75|0),($76|0),($107|0),($108|0))|0); + $110 = tempRet0; + $111 = (_bitshift64Shl(($107|0),($108|0),26)|0); + $112 = tempRet0; + $113 = (_i64Subtract(($61|0),($62|0),($111|0),($112|0))|0); + $114 = tempRet0; + $115 = (_i64Add(($71|0),($72|0),33554432,0)|0); + $116 = tempRet0; + $117 = (_bitshift64Ashr(($115|0),($116|0),26)|0); + $118 = tempRet0; + $119 = (_i64Add(($85|0),($86|0),($117|0),($118|0))|0); + $120 = tempRet0; + $121 = (_bitshift64Shl(($117|0),($118|0),26)|0); + $122 = tempRet0; + $123 = (_i64Subtract(($71|0),($72|0),($121|0),($122|0))|0); + $124 = tempRet0; + $125 = (_i64Add(($81|0),($82|0),33554432,0)|0); + $126 = tempRet0; + $127 = (_bitshift64Ashr(($125|0),($126|0),26)|0); + $128 = tempRet0; + $129 = (_i64Add(($127|0),($128|0),($33|0),($34|0))|0); + $130 = tempRet0; + $131 = (_i64Subtract(($129|0),($130|0),($93|0),($94|0))|0); + $132 = tempRet0; + $133 = (_bitshift64Shl(($127|0),($128|0),26)|0); + $134 = tempRet0; + $135 = (_i64Subtract(($81|0),($82|0),($133|0),($134|0))|0); + $136 = tempRet0; + $137 = (_i64Add(($91|0),($92|0),33554432,0)|0); + $138 = tempRet0; + $139 = (_bitshift64Ashr(($137|0),($138|0),26)|0); + $140 = tempRet0; + $141 = (_i64Add(($139|0),($140|0),($45|0),0)|0); + $142 = tempRet0; + $143 = (_i64Subtract(($141|0),($142|0),($55|0),($56|0))|0); + $144 = tempRet0; + $145 = (_bitshift64Shl(($139|0),($140|0),26)|0); + $146 = tempRet0; + $147 = (_i64Subtract(($91|0),($92|0),($145|0),($146|0))|0); + $148 = tempRet0; + HEAP32[$h>>2] = $103; + $149 = ((($h)) + 4|0); + HEAP32[$149>>2] = $99; + $150 = ((($h)) + 8|0); + HEAP32[$150>>2] = $113; + $151 = ((($h)) + 12|0); + HEAP32[$151>>2] = $109; + $152 = ((($h)) + 16|0); + HEAP32[$152>>2] = $123; + $153 = ((($h)) + 20|0); + HEAP32[$153>>2] = $119; + $154 = ((($h)) + 24|0); + HEAP32[$154>>2] = $135; + $155 = ((($h)) + 28|0); + HEAP32[$155>>2] = $131; + $156 = ((($h)) + 32|0); + HEAP32[$156>>2] = $147; + $157 = ((($h)) + 36|0); + HEAP32[$157>>2] = $143; + return; } function _load_4($in) { $in = $in|0; @@ -11764,28 +12526,28 @@ function _load_4($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - $15 = (($in) + 3|0); + $15 = ((($in)) + 3|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (_bitshift64Shl(($17|0),0,24)|0); $19 = tempRet0; $20 = $13 | $18; $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); + tempRet0 = ($21); + return ($20|0); } function _load_3($in) { $in = $in|0; @@ -11793,21 +12555,21 @@ function _load_3($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); + tempRet0 = ($14); + return ($13|0); } function _crypto_sign_ed25519_ref10_fe_invert($out,$z) { $out = $out|0; @@ -11941,7 +12703,7 @@ function _crypto_sign_ed25519_ref10_fe_isnonzero($f) { STACKTOP = STACKTOP + 32|0; $s = sp; _crypto_sign_ed25519_ref10_fe_tobytes($s,$f); - $0 = (_crypto_verify_32_ref($s,8)|0); + $0 = (_crypto_verify_32_ref($s,33172)|0); STACKTOP = sp;return ($0|0); } function _crypto_sign_ed25519_ref10_fe_mul($h,$f,$g) { @@ -11982,42 +12744,42 @@ function _crypto_sign_ed25519_ref10_fe_mul($h,$f,$g) { var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); + $20 = ((($g)) + 4|0); $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); + $22 = ((($g)) + 8|0); $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); + $24 = ((($g)) + 12|0); $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); + $26 = ((($g)) + 16|0); $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); + $28 = ((($g)) + 20|0); $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); + $30 = ((($g)) + 24|0); $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); + $32 = ((($g)) + 28|0); $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); + $34 = ((($g)) + 32|0); $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); + $36 = ((($g)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = ($21*19)|0; $39 = ($23*19)|0; @@ -12604,25 +13366,25 @@ function _crypto_sign_ed25519_ref10_fe_mul($h,$f,$g) { $620 = (_i64Subtract(($606|0),($607|0),($618|0),($619|0))|0); $621 = tempRet0; HEAP32[$h>>2] = $620; - $622 = (($h) + 4|0); + $622 = ((($h)) + 4|0); HEAP32[$622>>2] = $616; - $623 = (($h) + 8|0); + $623 = ((($h)) + 8|0); HEAP32[$623>>2] = $494; - $624 = (($h) + 12|0); + $624 = ((($h)) + 12|0); HEAP32[$624>>2] = $532; - $625 = (($h) + 16|0); + $625 = ((($h)) + 16|0); HEAP32[$625>>2] = $570; - $626 = (($h) + 20|0); + $626 = ((($h)) + 20|0); HEAP32[$626>>2] = $566; - $627 = (($h) + 24|0); + $627 = ((($h)) + 24|0); HEAP32[$627>>2] = $522; - $628 = (($h) + 28|0); + $628 = ((($h)) + 28|0); HEAP32[$628>>2] = $560; - $629 = (($h) + 32|0); + $629 = ((($h)) + 32|0); HEAP32[$629>>2] = $598; - $630 = (($h) + 36|0); + $630 = ((($h)) + 36|0); HEAP32[$630>>2] = $610; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_neg($h,$f) { $h = $h|0; @@ -12631,23 +13393,23 @@ function _crypto_sign_ed25519_ref10_fe_neg($h,$f) { var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = (0 - ($0))|0; $20 = (0 - ($2))|0; @@ -12660,25 +13422,25 @@ function _crypto_sign_ed25519_ref10_fe_neg($h,$f) { $27 = (0 - ($16))|0; $28 = (0 - ($18))|0; HEAP32[$h>>2] = $19; - $29 = (($h) + 4|0); + $29 = ((($h)) + 4|0); HEAP32[$29>>2] = $20; - $30 = (($h) + 8|0); + $30 = ((($h)) + 8|0); HEAP32[$30>>2] = $21; - $31 = (($h) + 12|0); + $31 = ((($h)) + 12|0); HEAP32[$31>>2] = $22; - $32 = (($h) + 16|0); + $32 = ((($h)) + 16|0); HEAP32[$32>>2] = $23; - $33 = (($h) + 20|0); + $33 = ((($h)) + 20|0); HEAP32[$33>>2] = $24; - $34 = (($h) + 24|0); + $34 = ((($h)) + 24|0); HEAP32[$34>>2] = $25; - $35 = (($h) + 28|0); + $35 = ((($h)) + 28|0); HEAP32[$35>>2] = $26; - $36 = (($h) + 32|0); + $36 = ((($h)) + 32|0); HEAP32[$36>>2] = $27; - $37 = (($h) + 36|0); + $37 = ((($h)) + 36|0); HEAP32[$37>>2] = $28; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_pow22523($out,$z) { $out = $out|0; @@ -12815,23 +13577,23 @@ function _crypto_sign_ed25519_ref10_fe_sq($h,$f) { var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = $0 << 1; $20 = $2 << 1; @@ -13215,25 +13977,25 @@ function _crypto_sign_ed25519_ref10_fe_sq($h,$f) { $398 = (_i64Subtract(($384|0),($385|0),($396|0),($397|0))|0); $399 = tempRet0; HEAP32[$h>>2] = $398; - $400 = (($h) + 4|0); + $400 = ((($h)) + 4|0); HEAP32[$400>>2] = $394; - $401 = (($h) + 8|0); + $401 = ((($h)) + 8|0); HEAP32[$401>>2] = $300; - $402 = (($h) + 12|0); + $402 = ((($h)) + 12|0); HEAP32[$402>>2] = $328; - $403 = (($h) + 16|0); + $403 = ((($h)) + 16|0); HEAP32[$403>>2] = $358; - $404 = (($h) + 20|0); + $404 = ((($h)) + 20|0); HEAP32[$404>>2] = $354; - $405 = (($h) + 24|0); + $405 = ((($h)) + 24|0); HEAP32[$405>>2] = $318; - $406 = (($h) + 28|0); + $406 = ((($h)) + 28|0); HEAP32[$406>>2] = $348; - $407 = (($h) + 32|0); + $407 = ((($h)) + 32|0); HEAP32[$407>>2] = $376; - $408 = (($h) + 36|0); + $408 = ((($h)) + 36|0); HEAP32[$408>>2] = $388; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_sq2($h,$f) { $h = $h|0; @@ -13262,23 +14024,23 @@ function _crypto_sign_ed25519_ref10_fe_sq2($h,$f) { var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = $0 << 1; $20 = $2 << 1; @@ -13682,25 +14444,25 @@ function _crypto_sign_ed25519_ref10_fe_sq2($h,$f) { $418 = (_i64Subtract(($404|0),($405|0),($416|0),($417|0))|0); $419 = tempRet0; HEAP32[$h>>2] = $418; - $420 = (($h) + 4|0); + $420 = ((($h)) + 4|0); HEAP32[$420>>2] = $414; - $421 = (($h) + 8|0); + $421 = ((($h)) + 8|0); HEAP32[$421>>2] = $346; - $422 = (($h) + 12|0); + $422 = ((($h)) + 12|0); HEAP32[$422>>2] = $366; - $423 = (($h) + 16|0); + $423 = ((($h)) + 16|0); HEAP32[$423>>2] = $386; - $424 = (($h) + 20|0); + $424 = ((($h)) + 20|0); HEAP32[$424>>2] = $382; - $425 = (($h) + 24|0); + $425 = ((($h)) + 24|0); HEAP32[$425>>2] = $356; - $426 = (($h) + 28|0); + $426 = ((($h)) + 28|0); HEAP32[$426>>2] = $376; - $427 = (($h) + 32|0); + $427 = ((($h)) + 32|0); HEAP32[$427>>2] = $396; - $428 = (($h) + 36|0); + $428 = ((($h)) + 36|0); HEAP32[$428>>2] = $408; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_sub($h,$f,$g) { $h = $h|0; @@ -13711,42 +14473,42 @@ function _crypto_sign_ed25519_ref10_fe_sub($h,$f,$g) { var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$f>>2]|0; - $1 = (($f) + 4|0); + $1 = ((($f)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($f) + 8|0); + $3 = ((($f)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($f) + 12|0); + $5 = ((($f)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($f) + 16|0); + $7 = ((($f)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($f) + 20|0); + $9 = ((($f)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($f) + 24|0); + $11 = ((($f)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($f) + 28|0); + $13 = ((($f)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($f) + 32|0); + $15 = ((($f)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($f) + 36|0); + $17 = ((($f)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = HEAP32[$g>>2]|0; - $20 = (($g) + 4|0); + $20 = ((($g)) + 4|0); $21 = HEAP32[$20>>2]|0; - $22 = (($g) + 8|0); + $22 = ((($g)) + 8|0); $23 = HEAP32[$22>>2]|0; - $24 = (($g) + 12|0); + $24 = ((($g)) + 12|0); $25 = HEAP32[$24>>2]|0; - $26 = (($g) + 16|0); + $26 = ((($g)) + 16|0); $27 = HEAP32[$26>>2]|0; - $28 = (($g) + 20|0); + $28 = ((($g)) + 20|0); $29 = HEAP32[$28>>2]|0; - $30 = (($g) + 24|0); + $30 = ((($g)) + 24|0); $31 = HEAP32[$30>>2]|0; - $32 = (($g) + 28|0); + $32 = ((($g)) + 28|0); $33 = HEAP32[$32>>2]|0; - $34 = (($g) + 32|0); + $34 = ((($g)) + 32|0); $35 = HEAP32[$34>>2]|0; - $36 = (($g) + 36|0); + $36 = ((($g)) + 36|0); $37 = HEAP32[$36>>2]|0; $38 = (($0) - ($19))|0; $39 = (($2) - ($21))|0; @@ -13759,25 +14521,25 @@ function _crypto_sign_ed25519_ref10_fe_sub($h,$f,$g) { $46 = (($16) - ($35))|0; $47 = (($18) - ($37))|0; HEAP32[$h>>2] = $38; - $48 = (($h) + 4|0); + $48 = ((($h)) + 4|0); HEAP32[$48>>2] = $39; - $49 = (($h) + 8|0); + $49 = ((($h)) + 8|0); HEAP32[$49>>2] = $40; - $50 = (($h) + 12|0); + $50 = ((($h)) + 12|0); HEAP32[$50>>2] = $41; - $51 = (($h) + 16|0); + $51 = ((($h)) + 16|0); HEAP32[$51>>2] = $42; - $52 = (($h) + 20|0); + $52 = ((($h)) + 20|0); HEAP32[$52>>2] = $43; - $53 = (($h) + 24|0); + $53 = ((($h)) + 24|0); HEAP32[$53>>2] = $44; - $54 = (($h) + 28|0); + $54 = ((($h)) + 28|0); HEAP32[$54>>2] = $45; - $55 = (($h) + 32|0); + $55 = ((($h)) + 32|0); HEAP32[$55>>2] = $46; - $56 = (($h) + 36|0); + $56 = ((($h)) + 36|0); HEAP32[$56>>2] = $47; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_fe_tobytes($s,$h) { $s = $s|0; @@ -13794,23 +14556,23 @@ function _crypto_sign_ed25519_ref10_fe_tobytes($s,$h) { var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0; sp = STACKTOP; $0 = HEAP32[$h>>2]|0; - $1 = (($h) + 4|0); + $1 = ((($h)) + 4|0); $2 = HEAP32[$1>>2]|0; - $3 = (($h) + 8|0); + $3 = ((($h)) + 8|0); $4 = HEAP32[$3>>2]|0; - $5 = (($h) + 12|0); + $5 = ((($h)) + 12|0); $6 = HEAP32[$5>>2]|0; - $7 = (($h) + 16|0); + $7 = ((($h)) + 16|0); $8 = HEAP32[$7>>2]|0; - $9 = (($h) + 20|0); + $9 = ((($h)) + 20|0); $10 = HEAP32[$9>>2]|0; - $11 = (($h) + 24|0); + $11 = ((($h)) + 24|0); $12 = HEAP32[$11>>2]|0; - $13 = (($h) + 28|0); + $13 = ((($h)) + 28|0); $14 = HEAP32[$13>>2]|0; - $15 = (($h) + 32|0); + $15 = ((($h)) + 32|0); $16 = HEAP32[$15>>2]|0; - $17 = (($h) + 36|0); + $17 = ((($h)) + 36|0); $18 = HEAP32[$17>>2]|0; $19 = ($18*19)|0; $20 = (($19) + 16777216)|0; @@ -13878,144 +14640,144 @@ function _crypto_sign_ed25519_ref10_fe_tobytes($s,$h) { HEAP8[$s>>0] = $81; $82 = $47 >>> 8; $83 = $82&255; - $84 = (($s) + 1|0); + $84 = ((($s)) + 1|0); HEAP8[$84>>0] = $83; $85 = $47 >>> 16; $86 = $85&255; - $87 = (($s) + 2|0); + $87 = ((($s)) + 2|0); HEAP8[$87>>0] = $86; $88 = $47 >>> 24; $89 = $51 << 2; $90 = $89 | $88; $91 = $90&255; - $92 = (($s) + 3|0); + $92 = ((($s)) + 3|0); HEAP8[$92>>0] = $91; $93 = $51 >>> 6; $94 = $93&255; - $95 = (($s) + 4|0); + $95 = ((($s)) + 4|0); HEAP8[$95>>0] = $94; $96 = $51 >>> 14; $97 = $96&255; - $98 = (($s) + 5|0); + $98 = ((($s)) + 5|0); HEAP8[$98>>0] = $97; $99 = $51 >>> 22; $100 = $55 << 3; $101 = $100 | $99; $102 = $101&255; - $103 = (($s) + 6|0); + $103 = ((($s)) + 6|0); HEAP8[$103>>0] = $102; $104 = $55 >>> 5; $105 = $104&255; - $106 = (($s) + 7|0); + $106 = ((($s)) + 7|0); HEAP8[$106>>0] = $105; $107 = $55 >>> 13; $108 = $107&255; - $109 = (($s) + 8|0); + $109 = ((($s)) + 8|0); HEAP8[$109>>0] = $108; $110 = $55 >>> 21; $111 = $59 << 5; $112 = $111 | $110; $113 = $112&255; - $114 = (($s) + 9|0); + $114 = ((($s)) + 9|0); HEAP8[$114>>0] = $113; $115 = $59 >>> 3; $116 = $115&255; - $117 = (($s) + 10|0); + $117 = ((($s)) + 10|0); HEAP8[$117>>0] = $116; $118 = $59 >>> 11; $119 = $118&255; - $120 = (($s) + 11|0); + $120 = ((($s)) + 11|0); HEAP8[$120>>0] = $119; $121 = $59 >>> 19; $122 = $63 << 6; $123 = $122 | $121; $124 = $123&255; - $125 = (($s) + 12|0); + $125 = ((($s)) + 12|0); HEAP8[$125>>0] = $124; $126 = $63 >>> 2; $127 = $126&255; - $128 = (($s) + 13|0); + $128 = ((($s)) + 13|0); HEAP8[$128>>0] = $127; $129 = $63 >>> 10; $130 = $129&255; - $131 = (($s) + 14|0); + $131 = ((($s)) + 14|0); HEAP8[$131>>0] = $130; $132 = $63 >>> 18; $133 = $132&255; - $134 = (($s) + 15|0); + $134 = ((($s)) + 15|0); HEAP8[$134>>0] = $133; $135 = $67&255; - $136 = (($s) + 16|0); + $136 = ((($s)) + 16|0); HEAP8[$136>>0] = $135; $137 = $67 >>> 8; $138 = $137&255; - $139 = (($s) + 17|0); + $139 = ((($s)) + 17|0); HEAP8[$139>>0] = $138; $140 = $67 >>> 16; $141 = $140&255; - $142 = (($s) + 18|0); + $142 = ((($s)) + 18|0); HEAP8[$142>>0] = $141; $143 = $67 >>> 24; $144 = $71 << 1; $145 = $144 | $143; $146 = $145&255; - $147 = (($s) + 19|0); + $147 = ((($s)) + 19|0); HEAP8[$147>>0] = $146; $148 = $71 >>> 7; $149 = $148&255; - $150 = (($s) + 20|0); + $150 = ((($s)) + 20|0); HEAP8[$150>>0] = $149; $151 = $71 >>> 15; $152 = $151&255; - $153 = (($s) + 21|0); + $153 = ((($s)) + 21|0); HEAP8[$153>>0] = $152; $154 = $71 >>> 23; $155 = $75 << 3; $156 = $155 | $154; $157 = $156&255; - $158 = (($s) + 22|0); + $158 = ((($s)) + 22|0); HEAP8[$158>>0] = $157; $159 = $75 >>> 5; $160 = $159&255; - $161 = (($s) + 23|0); + $161 = ((($s)) + 23|0); HEAP8[$161>>0] = $160; $162 = $75 >>> 13; $163 = $162&255; - $164 = (($s) + 24|0); + $164 = ((($s)) + 24|0); HEAP8[$164>>0] = $163; $165 = $75 >>> 21; $166 = $79 << 4; $167 = $166 | $165; $168 = $167&255; - $169 = (($s) + 25|0); + $169 = ((($s)) + 25|0); HEAP8[$169>>0] = $168; $170 = $79 >>> 4; $171 = $170&255; - $172 = (($s) + 26|0); + $172 = ((($s)) + 26|0); HEAP8[$172>>0] = $171; $173 = $79 >>> 12; $174 = $173&255; - $175 = (($s) + 27|0); + $175 = ((($s)) + 27|0); HEAP8[$175>>0] = $174; $176 = $79 >>> 20; $177 = $80 << 6; $178 = $176 | $177; $179 = $178&255; - $180 = (($s) + 28|0); + $180 = ((($s)) + 28|0); HEAP8[$180>>0] = $179; $181 = $77 >>> 2; $182 = $181&255; - $183 = (($s) + 29|0); + $183 = ((($s)) + 29|0); HEAP8[$183>>0] = $182; $184 = $77 >>> 10; $185 = $184&255; - $186 = (($s) + 30|0); + $186 = ((($s)) + 30|0); HEAP8[$186>>0] = $185; $187 = $80 >>> 18; $188 = $187&255; - $189 = (($s) + 31|0); + $189 = ((($s)) + 31|0); HEAP8[$189>>0] = $188; - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_add($r,$p,$q) { $r = $r|0; @@ -14025,20 +14787,20 @@ function _crypto_sign_ed25519_ref10_ge_add($r,$p,$q) { sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $t0 = sp; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); + $2 = ((($r)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); - $3 = (($q) + 40|0); + $3 = ((($q)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); - $4 = (($r) + 120|0); - $5 = (($q) + 120|0); - $6 = (($p) + 120|0); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 120|0); + $6 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - $8 = (($q) + 80|0); + $7 = ((($p)) + 80|0); + $8 = ((($q)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); @@ -14070,60 +14832,60 @@ function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($A2,$t); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$Ai); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $0 = (($Ai) + 160|0); + $0 = ((($Ai)) + 160|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($0,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$0); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $1 = (($Ai) + 320|0); + $1 = ((($Ai)) + 320|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($1,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$1); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $2 = (($Ai) + 480|0); + $2 = ((($Ai)) + 480|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($2,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$2); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $3 = (($Ai) + 640|0); + $3 = ((($Ai)) + 640|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($3,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$3); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $4 = (($Ai) + 800|0); + $4 = ((($Ai)) + 800|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($4,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$4); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $5 = (($Ai) + 960|0); + $5 = ((($Ai)) + 960|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($5,$u); _crypto_sign_ed25519_ref10_ge_add($t,$A2,$5); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($u,$t); - $6 = (($Ai) + 1120|0); + $6 = ((($Ai)) + 1120|0); _crypto_sign_ed25519_ref10_ge_p3_to_cached($6,$u); _crypto_sign_ed25519_ref10_ge_p2_0($r); $i$02 = 255; while(1) { - $8 = (($aslide) + ($i$02)|0); - $9 = HEAP8[$8>>0]|0; - $10 = ($9<<24>>24)==(0); - if (!($10)) { + $7 = (($aslide) + ($i$02)|0); + $8 = HEAP8[$7>>0]|0; + $9 = ($8<<24>>24)==(0); + if (!($9)) { $i$0$lcssa = $i$02; break; } - $11 = (($bslide) + ($i$02)|0); - $12 = HEAP8[$11>>0]|0; - $13 = ($12<<24>>24)==(0); - $14 = (($i$02) + -1)|0; - if (!($13)) { + $10 = (($bslide) + ($i$02)|0); + $11 = HEAP8[$10>>0]|0; + $12 = ($11<<24>>24)==(0); + if (!($12)) { $i$0$lcssa = $i$02; break; } - $7 = ($i$02|0)>(0); - if ($7) { + $14 = (($i$02) + -1)|0; + $15 = ($i$02|0)>(0); + if ($15) { $i$02 = $14; } else { $i$0$lcssa = $14; break; } } - $15 = ($i$0$lcssa|0)>(-1); - if ($15) { + $13 = ($i$0$lcssa|0)>(-1); + if ($13) { $i$11 = $i$0$lcssa; } else { STACKTOP = sp;return; @@ -14159,7 +14921,7 @@ function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { $31 = HEAP8[$28>>0]|0; $32 = $31 << 24 >> 24; $33 = (($32|0) / 2)&-1; - $34 = (40 + (($33*120)|0)|0); + $34 = (712 + (($33*120)|0)|0); _crypto_sign_ed25519_ref10_ge_madd($t,$u,$34); } else { $35 = ($29<<24>>24)<(0); @@ -14168,7 +14930,7 @@ function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { $36 = HEAP8[$28>>0]|0; $37 = $36 << 24 >> 24; $38 = (($37|0) / -2)&-1; - $39 = (40 + (($38*120)|0)|0); + $39 = (712 + (($38*120)|0)|0); _crypto_sign_ed25519_ref10_ge_msub($t,$u,$39); } } @@ -14186,40 +14948,40 @@ function _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($r,$a,$A,$b) { function _slide($r,$a) { $r = $r|0; $a = $a|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$03 = 0, $exitcond = 0, $exitcond10 = 0; - var $i$08 = 0, $i$15 = 0, $k$01 = 0, label = 0, sp = 0; + var $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$03 = 0, $exitcond = 0, $exitcond9 = 0; + var $i$07 = 0, $i$14 = 0, $k$02 = 0, label = 0, sp = 0; sp = STACKTOP; - $i$08 = 0; + $i$07 = 0; while(1) { - $0 = $i$08 >> 3; + $0 = $i$07 >> 3; $1 = (($a) + ($0)|0); $2 = HEAP8[$1>>0]|0; $3 = $2&255; - $4 = $i$08 & 7; + $4 = $i$07 & 7; $5 = $3 >>> $4; $6 = $5 & 1; $7 = $6&255; - $8 = (($r) + ($i$08)|0); + $8 = (($r) + ($i$07)|0); HEAP8[$8>>0] = $7; - $9 = (($i$08) + 1)|0; - $exitcond10 = ($9|0)==(256); - if ($exitcond10) { - $i$15 = 0; + $9 = (($i$07) + 1)|0; + $exitcond9 = ($9|0)==(256); + if ($exitcond9) { + $i$14 = 0; break; } else { - $i$08 = $9; + $i$07 = $9; } } while(1) { - $10 = (($r) + ($i$15)|0); + $10 = (($r) + ($i$14)|0); $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); L5: do { if (!($12)) { $b$03 = 1; while(1) { - $13 = (($b$03) + ($i$15))|0; + $13 = (($b$03) + ($i$14))|0; $14 = ($13|0)<(256); if (!($14)) { break L5; @@ -14248,48 +15010,46 @@ function _slide($r,$a) { } $27 = $25&255; HEAP8[$10>>0] = $27; - $28 = ($13|0)<(256); - if ($28) { - $k$01 = $13; - while(1) { - $29 = (($r) + ($k$01)|0); - $30 = HEAP8[$29>>0]|0; - $31 = ($30<<24>>24)==(0); - if ($31) { - break; - } - HEAP8[$29>>0] = 0; - $32 = (($k$01) + 1)|0; - $33 = ($32|0)<(256); - if ($33) { - $k$01 = $32; - } else { - break L9; - } + $k$02 = $13; + while(1) { + $28 = (($r) + ($k$02)|0); + $29 = HEAP8[$28>>0]|0; + $30 = ($29<<24>>24)==(0); + if ($30) { + $$lcssa = $28; + break; + } + HEAP8[$28>>0] = 0; + $31 = (($k$02) + 1)|0; + $32 = ($31|0)<(256); + if ($32) { + $k$02 = $31; + } else { + break L9; } - HEAP8[$29>>0] = 1; } + HEAP8[$$lcssa>>0] = 1; } } while(0); - $34 = (($b$03) + 1)|0; - $35 = ($34|0)<(7); - if ($35) { - $b$03 = $34; + $33 = (($b$03) + 1)|0; + $34 = ($33|0)<(7); + if ($34) { + $b$03 = $33; } else { break; } } } } while(0); - $36 = (($i$15) + 1)|0; - $exitcond = ($36|0)==(256); + $35 = (($i$14) + 1)|0; + $exitcond = ($35|0)==(256); if ($exitcond) { break; } else { - $i$15 = $36; + $i$14 = $35; } } - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { $h = $h|0; @@ -14303,12 +15063,12 @@ function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { $v3 = sp + 80|0; $vxx = sp + 40|0; $check = sp; - $0 = (($h) + 40|0); + $0 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_frombytes($0,$s); - $1 = (($h) + 80|0); + $1 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_1($1); _crypto_sign_ed25519_ref10_fe_sq($u,$0); - _crypto_sign_ed25519_ref10_fe_mul($v,$u,1000); + _crypto_sign_ed25519_ref10_fe_mul($v,$u,1672); _crypto_sign_ed25519_ref10_fe_sub($u,$u,$1); _crypto_sign_ed25519_ref10_fe_add($v,$v,$1); _crypto_sign_ed25519_ref10_fe_sq($v3,$v); @@ -14330,7 +15090,7 @@ function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { $4 = (_crypto_sign_ed25519_ref10_fe_isnonzero($check)|0); $5 = ($4|0)==(0); if ($5) { - _crypto_sign_ed25519_ref10_fe_mul($h,$h,1040); + _crypto_sign_ed25519_ref10_fe_mul($h,$h,1712); break; } else { $$0 = -1; @@ -14339,7 +15099,7 @@ function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { } } while(0); $6 = (_crypto_sign_ed25519_ref10_fe_isnegative($h)|0); - $7 = (($s) + 31|0); + $7 = ((($s)) + 31|0); $8 = HEAP8[$7>>0]|0; $9 = $8&255; $10 = $9 >>> 7; @@ -14347,7 +15107,7 @@ function _crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($h,$s) { if ($11) { _crypto_sign_ed25519_ref10_fe_neg($h,$h); } - $12 = (($h) + 120|0); + $12 = ((($h)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($12,$h,$0); $$0 = 0; STACKTOP = sp;return ($$0|0); @@ -14360,19 +15120,19 @@ function _crypto_sign_ed25519_ref10_ge_madd($r,$p,$q) { sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $t0 = sp; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); + $2 = ((($r)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($2,$r,$q); - $3 = (($q) + 40|0); + $3 = ((($q)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($1,$1,$3); - $4 = (($r) + 120|0); - $5 = (($q) + 80|0); - $6 = (($p) + 120|0); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 80|0); + $6 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); + $7 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); @@ -14388,19 +15148,19 @@ function _crypto_sign_ed25519_ref10_ge_msub($r,$p,$q) { sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $t0 = sp; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($q) + 40|0); + $2 = ((($r)) + 80|0); + $3 = ((($q)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); - $4 = (($r) + 120|0); - $5 = (($q) + 80|0); - $6 = (($p) + 120|0); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 80|0); + $6 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); + $7 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_add($t0,$7,$7); _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); _crypto_sign_ed25519_ref10_fe_add($1,$2,$1); @@ -14413,43 +15173,43 @@ function _crypto_sign_ed25519_ref10_ge_p1p1_to_p2($r,$p) { $p = $p|0; var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($p) + 120|0); + $0 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); - $1 = (($r) + 40|0); - $2 = (($p) + 40|0); - $3 = (($p) + 80|0); + $1 = ((($r)) + 40|0); + $2 = ((($p)) + 40|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); - $4 = (($r) + 80|0); + $4 = ((($r)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($r,$p) { $r = $r|0; $p = $p|0; var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($p) + 120|0); + $0 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($r,$p,$0); - $1 = (($r) + 40|0); - $2 = (($p) + 40|0); - $3 = (($p) + 80|0); + $1 = ((($r)) + 40|0); + $2 = ((($p)) + 40|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($1,$2,$3); - $4 = (($r) + 80|0); + $4 = ((($r)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($4,$3,$0); - $5 = (($r) + 120|0); + $5 = ((($r)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($5,$p,$2); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p2_0($h) { $h = $h|0; var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; _crypto_sign_ed25519_ref10_fe_0($h); - $0 = (($h) + 40|0); + $0 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); + $1 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_1($1); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$p) { $r = $r|0; @@ -14459,13 +15219,13 @@ function _crypto_sign_ed25519_ref10_ge_p2_dbl($r,$p) { STACKTOP = STACKTOP + 48|0; $t0 = sp; _crypto_sign_ed25519_ref10_fe_sq($r,$p); - $0 = (($r) + 80|0); - $1 = (($p) + 40|0); + $0 = ((($r)) + 80|0); + $1 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_sq($0,$1); - $2 = (($r) + 120|0); - $3 = (($p) + 80|0); + $2 = ((($r)) + 120|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_sq2($2,$3); - $4 = (($r) + 40|0); + $4 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($4,$p,$1); _crypto_sign_ed25519_ref10_fe_sq($t0,$4); _crypto_sign_ed25519_ref10_fe_add($4,$0,$r); @@ -14479,13 +15239,13 @@ function _crypto_sign_ed25519_ref10_ge_p3_0($h) { var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; _crypto_sign_ed25519_ref10_fe_0($h); - $0 = (($h) + 40|0); + $0 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); + $1 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_1($1); - $2 = (($h) + 120|0); + $2 = ((($h)) + 120|0); _crypto_sign_ed25519_ref10_fe_0($2); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p3_dbl($r,$p) { $r = $r|0; @@ -14503,17 +15263,17 @@ function _crypto_sign_ed25519_ref10_ge_p3_to_cached($r,$p) { $p = $p|0; var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($p) + 80|0); + $2 = ((($r)) + 80|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_copy($2,$3); - $4 = (($r) + 120|0); - $5 = (($p) + 120|0); - _crypto_sign_ed25519_ref10_fe_mul($4,$5,1080); - STACKTOP = sp;return; + $4 = ((($r)) + 120|0); + $5 = ((($p)) + 120|0); + _crypto_sign_ed25519_ref10_fe_mul($4,$5,1752); + return; } function _crypto_sign_ed25519_ref10_ge_p3_to_p2($r,$p) { $r = $r|0; @@ -14521,13 +15281,13 @@ function _crypto_sign_ed25519_ref10_ge_p3_to_p2($r,$p) { var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; _crypto_sign_ed25519_ref10_fe_copy($r,$p); - $0 = (($r) + 40|0); - $1 = (($p) + 40|0); + $0 = ((($r)) + 40|0); + $1 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_copy($0,$1); - $2 = (($r) + 80|0); - $3 = (($p) + 80|0); + $2 = ((($r)) + 80|0); + $3 = ((($p)) + 80|0); _crypto_sign_ed25519_ref10_fe_copy($2,$3); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_p3_tobytes($s,$h) { $s = $s|0; @@ -14538,15 +15298,15 @@ function _crypto_sign_ed25519_ref10_ge_p3_tobytes($s,$h) { $recip = sp + 80|0; $x = sp + 40|0; $y = sp; - $0 = (($h) + 80|0); + $0 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_invert($recip,$0); _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); - $1 = (($h) + 40|0); + $1 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); $3 = $2 << 7; - $4 = (($s) + 31|0); + $4 = ((($s)) + 31|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = $6 ^ $3; @@ -14559,18 +15319,18 @@ function _crypto_sign_ed25519_ref10_ge_precomp_0($h) { var $0 = 0, $1 = 0, label = 0, sp = 0; sp = STACKTOP; _crypto_sign_ed25519_ref10_fe_1($h); - $0 = (($h) + 40|0); + $0 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_1($0); - $1 = (($h) + 80|0); + $1 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_0($1); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { $h = $h|0; $a = $a|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $carry$04 = 0, $e = 0, $exitcond = 0, $exitcond7 = 0; - var $i$06 = 0, $i$15 = 0, $i$23 = 0, $i$32 = 0, $r = 0, $s = 0, $sext = 0, $sext1 = 0, $t = 0, label = 0, sp = 0; + var $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $carry$04 = 0, $e = 0, $exitcond = 0; + var $exitcond7 = 0, $i$06 = 0, $i$15 = 0, $i$23 = 0, $i$32 = 0, $r = 0, $s = 0, $sext = 0, $sext1 = 0, $t = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 464|0; $e = sp + 400|0; @@ -14616,15 +15376,16 @@ function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { $20 = (($i$15) + 1)|0; $exitcond = ($20|0)==(63); if ($exitcond) { + $$lcssa = $16; break; } else { $carry$04 = $16;$i$15 = $20; } } - $21 = (($e) + 63|0); + $21 = ((($e)) + 63|0); $22 = HEAP8[$21>>0]|0; $23 = $22&255; - $24 = (($23) + ($16))|0; + $24 = (($23) + ($$lcssa))|0; $25 = $24&255; HEAP8[$21>>0] = $25; _crypto_sign_ed25519_ref10_ge_p3_0($h); @@ -14633,7 +15394,7 @@ function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { $26 = (($i$23|0) / 2)&-1; $27 = (($e) + ($i$23)|0); $28 = HEAP8[$27>>0]|0; - _select($t,$26,$28); + _select60($t,$26,$28); _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); $29 = (($i$23) + 2)|0; @@ -14657,7 +15418,7 @@ function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { $31 = (($i$32|0) / 2)&-1; $32 = (($e) + ($i$32)|0); $33 = HEAP8[$32>>0]|0; - _select($t,$31,$33); + _select60($t,$31,$33); _crypto_sign_ed25519_ref10_ge_madd($r,$h,$t); _crypto_sign_ed25519_ref10_ge_p1p1_to_p3($h,$r); $34 = (($i$32) + 2)|0; @@ -14670,7 +15431,7 @@ function _crypto_sign_ed25519_ref10_ge_scalarmult_base($h,$a) { } STACKTOP = sp;return; } -function _select($t,$pos,$b) { +function _select60($t,$pos,$b) { $t = $t|0; $pos = $pos|0; $b = $b|0; @@ -14688,36 +15449,36 @@ function _select($t,$pos,$b) { $6 = (($1) - ($5))|0; $7 = $6&255; _crypto_sign_ed25519_ref10_ge_precomp_0($t); - $8 = (1120 + (($pos*960)|0)|0); + $8 = (1792 + (($pos*960)|0)|0); $9 = (_equal($7,1)|0); _cmov($t,$8,$9); - $10 = ((1120 + (($pos*960)|0)|0) + 120|0); + $10 = (((1792 + (($pos*960)|0)|0)) + 120|0); $11 = (_equal($7,2)|0); _cmov($t,$10,$11); - $12 = ((1120 + (($pos*960)|0)|0) + 240|0); + $12 = (((1792 + (($pos*960)|0)|0)) + 240|0); $13 = (_equal($7,3)|0); _cmov($t,$12,$13); - $14 = ((1120 + (($pos*960)|0)|0) + 360|0); + $14 = (((1792 + (($pos*960)|0)|0)) + 360|0); $15 = (_equal($7,4)|0); _cmov($t,$14,$15); - $16 = ((1120 + (($pos*960)|0)|0) + 480|0); + $16 = (((1792 + (($pos*960)|0)|0)) + 480|0); $17 = (_equal($7,5)|0); _cmov($t,$16,$17); - $18 = ((1120 + (($pos*960)|0)|0) + 600|0); + $18 = (((1792 + (($pos*960)|0)|0)) + 600|0); $19 = (_equal($7,6)|0); _cmov($t,$18,$19); - $20 = ((1120 + (($pos*960)|0)|0) + 720|0); + $20 = (((1792 + (($pos*960)|0)|0)) + 720|0); $21 = (_equal($7,7)|0); _cmov($t,$20,$21); - $22 = ((1120 + (($pos*960)|0)|0) + 840|0); + $22 = (((1792 + (($pos*960)|0)|0)) + 840|0); $23 = (_equal($7,8)|0); _cmov($t,$22,$23); - $24 = (($t) + 40|0); + $24 = ((($t)) + 40|0); _crypto_sign_ed25519_ref10_fe_copy($minust,$24); - $25 = (($minust) + 40|0); + $25 = ((($minust)) + 40|0); _crypto_sign_ed25519_ref10_fe_copy($25,$t); - $26 = (($minust) + 80|0); - $27 = (($t) + 80|0); + $26 = ((($minust)) + 80|0); + $27 = ((($t)) + 80|0); _crypto_sign_ed25519_ref10_fe_neg($26,$27); _cmov($t,$minust,$0); STACKTOP = sp;return; @@ -14732,7 +15493,7 @@ function _negative($b) { $3 = (_bitshift64Lshr(($0|0),($2|0),63)|0); $4 = tempRet0; $5 = $3&255; - STACKTOP = sp;return ($5|0); + return ($5|0); } function _equal($b,$c) { $b = $b|0; @@ -14744,7 +15505,7 @@ function _equal($b,$c) { $2 = (($1) + -1)|0; $3 = $2 >>> 31; $4 = $3&255; - STACKTOP = sp;return ($4|0); + return ($4|0); } function _cmov($t,$u,$b) { $t = $t|0; @@ -14754,13 +15515,13 @@ function _cmov($t,$u,$b) { sp = STACKTOP; $0 = $b&255; _crypto_sign_ed25519_ref10_fe_cmov($t,$u,$0); - $1 = (($t) + 40|0); - $2 = (($u) + 40|0); + $1 = ((($t)) + 40|0); + $2 = ((($u)) + 40|0); _crypto_sign_ed25519_ref10_fe_cmov($1,$2,$0); - $3 = (($t) + 80|0); - $4 = (($u) + 80|0); + $3 = ((($t)) + 80|0); + $4 = ((($u)) + 80|0); _crypto_sign_ed25519_ref10_fe_cmov($3,$4,$0); - STACKTOP = sp;return; + return; } function _crypto_sign_ed25519_ref10_ge_sub($r,$p,$q) { $r = $r|0; @@ -14770,20 +15531,20 @@ function _crypto_sign_ed25519_ref10_ge_sub($r,$p,$q) { sp = STACKTOP; STACKTOP = STACKTOP + 48|0; $t0 = sp; - $0 = (($p) + 40|0); + $0 = ((($p)) + 40|0); _crypto_sign_ed25519_ref10_fe_add($r,$0,$p); - $1 = (($r) + 40|0); + $1 = ((($r)) + 40|0); _crypto_sign_ed25519_ref10_fe_sub($1,$0,$p); - $2 = (($r) + 80|0); - $3 = (($q) + 40|0); + $2 = ((($r)) + 80|0); + $3 = ((($q)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($2,$r,$3); _crypto_sign_ed25519_ref10_fe_mul($1,$1,$q); - $4 = (($r) + 120|0); - $5 = (($q) + 120|0); - $6 = (($p) + 120|0); + $4 = ((($r)) + 120|0); + $5 = ((($q)) + 120|0); + $6 = ((($p)) + 120|0); _crypto_sign_ed25519_ref10_fe_mul($4,$5,$6); - $7 = (($p) + 80|0); - $8 = (($q) + 80|0); + $7 = ((($p)) + 80|0); + $8 = ((($q)) + 80|0); _crypto_sign_ed25519_ref10_fe_mul($r,$7,$8); _crypto_sign_ed25519_ref10_fe_add($t0,$r,$r); _crypto_sign_ed25519_ref10_fe_sub($r,$2,$1); @@ -14801,15 +15562,15 @@ function _crypto_sign_ed25519_ref10_ge_tobytes($s,$h) { $recip = sp + 80|0; $x = sp + 40|0; $y = sp; - $0 = (($h) + 80|0); + $0 = ((($h)) + 80|0); _crypto_sign_ed25519_ref10_fe_invert($recip,$0); _crypto_sign_ed25519_ref10_fe_mul($x,$h,$recip); - $1 = (($h) + 40|0); + $1 = ((($h)) + 40|0); _crypto_sign_ed25519_ref10_fe_mul($y,$1,$recip); _crypto_sign_ed25519_ref10_fe_tobytes($s,$y); $2 = (_crypto_sign_ed25519_ref10_fe_isnegative($x)|0); $3 = $2 << 7; - $4 = (($s) + 31|0); + $4 = ((($s)) + 31|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = $6 ^ $3; @@ -14829,9 +15590,9 @@ function _crypto_sign_edwards25519sha512batch_ref10_open($m,$mlen,$sm,$0,$1,$pk) sp = STACKTOP; STACKTOP = STACKTOP + 480|0; $pkcopy1 = sp + 440|0; - $rcopy = sp + 408|0; - $scopy = sp + 376|0; - $h = sp + 312|0; + $rcopy = sp + 344|0; + $scopy = sp + 312|0; + $h = sp + 376|0; $rcheck = sp + 280|0; $A = sp + 120|0; $R = sp; @@ -14841,20 +15602,20 @@ function _crypto_sign_edwards25519sha512batch_ref10_open($m,$mlen,$sm,$0,$1,$pk) $5 = $4 & $3; $6 = $2 | $5; if (!($6)) { - $7 = (($sm) + 63|0); + $7 = ((($sm)) + 63|0); $8 = HEAP8[$7>>0]|0; $9 = ($8&255)>(31); if (!($9)) { $10 = (_crypto_sign_ed25519_ref10_ge_frombytes_negate_vartime($A,$pk)|0); $11 = ($10|0)==(0); if ($11) { - dest=$pkcopy1+0|0; src=$pk+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - dest=$rcopy+0|0; src=$sm+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $12 = (($sm) + 32|0); - dest=$scopy+0|0; src=$12+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$pkcopy1; src=$pk; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + dest=$rcopy; src=$sm; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $12 = ((($sm)) + 32|0); + dest=$scopy; src=$12; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); _memmove(($m|0),($sm|0),($0|0))|0; - $13 = (($m) + 32|0); - dest=$13+0|0; src=$pkcopy1+0|0; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $13 = ((($m)) + 32|0); + dest=$13; src=$pkcopy1; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); (_crypto_hash_sha512_ref($h,$m,$0,$1)|0); _crypto_sign_ed25519_ref10_sc_reduce($h); _crypto_sign_ed25519_ref10_ge_double_scalarmult_vartime($R,$h,$A,$scopy); @@ -14862,13 +15623,13 @@ function _crypto_sign_edwards25519sha512batch_ref10_open($m,$mlen,$sm,$0,$1,$pk) $14 = (_crypto_verify_32_ref($rcheck,$rcopy)|0); $15 = ($14|0)==(0); if ($15) { - $16 = (($m) + 64|0); + $16 = ((($m)) + 64|0); $17 = (_i64Add(($0|0),($1|0),-64,-1)|0); $18 = tempRet0; _memmove(($m|0),($16|0),($17|0))|0; $$sum = (($0) + -64)|0; $19 = (($m) + ($$sum)|0); - dest=$19+0|0; stop=dest+64|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); + dest=$19; stop=dest+64|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); $20 = $mlen; $21 = $20; HEAP32[$21>>2] = $17; @@ -14995,65 +15756,65 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $0 = (_load_347($a)|0); $1 = tempRet0; $2 = $0 & 2097151; - $3 = (($a) + 2|0); + $3 = ((($a)) + 2|0); $4 = (_load_448($3)|0); $5 = tempRet0; $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); $7 = tempRet0; $8 = $6 & 2097151; - $9 = (($a) + 5|0); + $9 = ((($a)) + 5|0); $10 = (_load_347($9)|0); $11 = tempRet0; $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); $13 = tempRet0; $14 = $12 & 2097151; - $15 = (($a) + 7|0); + $15 = ((($a)) + 7|0); $16 = (_load_448($15)|0); $17 = tempRet0; $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); $19 = tempRet0; $20 = $18 & 2097151; - $21 = (($a) + 10|0); + $21 = ((($a)) + 10|0); $22 = (_load_448($21)|0); $23 = tempRet0; $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); $25 = tempRet0; $26 = $24 & 2097151; - $27 = (($a) + 13|0); + $27 = ((($a)) + 13|0); $28 = (_load_347($27)|0); $29 = tempRet0; $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); $31 = tempRet0; $32 = $30 & 2097151; - $33 = (($a) + 15|0); + $33 = ((($a)) + 15|0); $34 = (_load_448($33)|0); $35 = tempRet0; $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); $37 = tempRet0; $38 = $36 & 2097151; - $39 = (($a) + 18|0); + $39 = ((($a)) + 18|0); $40 = (_load_347($39)|0); $41 = tempRet0; $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); $43 = tempRet0; $44 = $42 & 2097151; - $45 = (($a) + 21|0); + $45 = ((($a)) + 21|0); $46 = (_load_347($45)|0); $47 = tempRet0; $48 = $46 & 2097151; - $49 = (($a) + 23|0); + $49 = ((($a)) + 23|0); $50 = (_load_448($49)|0); $51 = tempRet0; $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); $53 = tempRet0; $54 = $52 & 2097151; - $55 = (($a) + 26|0); + $55 = ((($a)) + 26|0); $56 = (_load_347($55)|0); $57 = tempRet0; $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); $59 = tempRet0; $60 = $58 & 2097151; - $61 = (($a) + 28|0); + $61 = ((($a)) + 28|0); $62 = (_load_448($61)|0); $63 = tempRet0; $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); @@ -15061,65 +15822,65 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $66 = (_load_347($b)|0); $67 = tempRet0; $68 = $66 & 2097151; - $69 = (($b) + 2|0); + $69 = ((($b)) + 2|0); $70 = (_load_448($69)|0); $71 = tempRet0; $72 = (_bitshift64Lshr(($70|0),($71|0),5)|0); $73 = tempRet0; $74 = $72 & 2097151; - $75 = (($b) + 5|0); + $75 = ((($b)) + 5|0); $76 = (_load_347($75)|0); $77 = tempRet0; $78 = (_bitshift64Lshr(($76|0),($77|0),2)|0); $79 = tempRet0; $80 = $78 & 2097151; - $81 = (($b) + 7|0); + $81 = ((($b)) + 7|0); $82 = (_load_448($81)|0); $83 = tempRet0; $84 = (_bitshift64Lshr(($82|0),($83|0),7)|0); $85 = tempRet0; $86 = $84 & 2097151; - $87 = (($b) + 10|0); + $87 = ((($b)) + 10|0); $88 = (_load_448($87)|0); $89 = tempRet0; $90 = (_bitshift64Lshr(($88|0),($89|0),4)|0); $91 = tempRet0; $92 = $90 & 2097151; - $93 = (($b) + 13|0); + $93 = ((($b)) + 13|0); $94 = (_load_347($93)|0); $95 = tempRet0; $96 = (_bitshift64Lshr(($94|0),($95|0),1)|0); $97 = tempRet0; $98 = $96 & 2097151; - $99 = (($b) + 15|0); + $99 = ((($b)) + 15|0); $100 = (_load_448($99)|0); $101 = tempRet0; $102 = (_bitshift64Lshr(($100|0),($101|0),6)|0); $103 = tempRet0; $104 = $102 & 2097151; - $105 = (($b) + 18|0); + $105 = ((($b)) + 18|0); $106 = (_load_347($105)|0); $107 = tempRet0; $108 = (_bitshift64Lshr(($106|0),($107|0),3)|0); $109 = tempRet0; $110 = $108 & 2097151; - $111 = (($b) + 21|0); + $111 = ((($b)) + 21|0); $112 = (_load_347($111)|0); $113 = tempRet0; $114 = $112 & 2097151; - $115 = (($b) + 23|0); + $115 = ((($b)) + 23|0); $116 = (_load_448($115)|0); $117 = tempRet0; $118 = (_bitshift64Lshr(($116|0),($117|0),5)|0); $119 = tempRet0; $120 = $118 & 2097151; - $121 = (($b) + 26|0); + $121 = ((($b)) + 26|0); $122 = (_load_347($121)|0); $123 = tempRet0; $124 = (_bitshift64Lshr(($122|0),($123|0),2)|0); $125 = tempRet0; $126 = $124 & 2097151; - $127 = (($b) + 28|0); + $127 = ((($b)) + 28|0); $128 = (_load_448($127)|0); $129 = tempRet0; $130 = (_bitshift64Lshr(($128|0),($129|0),7)|0); @@ -15127,65 +15888,65 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $132 = (_load_347($c)|0); $133 = tempRet0; $134 = $132 & 2097151; - $135 = (($c) + 2|0); + $135 = ((($c)) + 2|0); $136 = (_load_448($135)|0); $137 = tempRet0; $138 = (_bitshift64Lshr(($136|0),($137|0),5)|0); $139 = tempRet0; $140 = $138 & 2097151; - $141 = (($c) + 5|0); + $141 = ((($c)) + 5|0); $142 = (_load_347($141)|0); $143 = tempRet0; $144 = (_bitshift64Lshr(($142|0),($143|0),2)|0); $145 = tempRet0; $146 = $144 & 2097151; - $147 = (($c) + 7|0); + $147 = ((($c)) + 7|0); $148 = (_load_448($147)|0); $149 = tempRet0; $150 = (_bitshift64Lshr(($148|0),($149|0),7)|0); $151 = tempRet0; $152 = $150 & 2097151; - $153 = (($c) + 10|0); + $153 = ((($c)) + 10|0); $154 = (_load_448($153)|0); $155 = tempRet0; $156 = (_bitshift64Lshr(($154|0),($155|0),4)|0); $157 = tempRet0; $158 = $156 & 2097151; - $159 = (($c) + 13|0); + $159 = ((($c)) + 13|0); $160 = (_load_347($159)|0); $161 = tempRet0; $162 = (_bitshift64Lshr(($160|0),($161|0),1)|0); $163 = tempRet0; $164 = $162 & 2097151; - $165 = (($c) + 15|0); + $165 = ((($c)) + 15|0); $166 = (_load_448($165)|0); $167 = tempRet0; $168 = (_bitshift64Lshr(($166|0),($167|0),6)|0); $169 = tempRet0; $170 = $168 & 2097151; - $171 = (($c) + 18|0); + $171 = ((($c)) + 18|0); $172 = (_load_347($171)|0); $173 = tempRet0; $174 = (_bitshift64Lshr(($172|0),($173|0),3)|0); $175 = tempRet0; $176 = $174 & 2097151; - $177 = (($c) + 21|0); + $177 = ((($c)) + 21|0); $178 = (_load_347($177)|0); $179 = tempRet0; $180 = $178 & 2097151; - $181 = (($c) + 23|0); + $181 = ((($c)) + 23|0); $182 = (_load_448($181)|0); $183 = tempRet0; $184 = (_bitshift64Lshr(($182|0),($183|0),5)|0); $185 = tempRet0; $186 = $184 & 2097151; - $187 = (($c) + 26|0); + $187 = ((($c)) + 26|0); $188 = (_load_347($187)|0); $189 = tempRet0; $190 = (_bitshift64Lshr(($188|0),($189|0),2)|0); $191 = tempRet0; $192 = $190 & 2097151; - $193 = (($c) + 28|0); + $193 = ((($c)) + 28|0); $194 = (_load_448($193)|0); $195 = tempRet0; $196 = (_bitshift64Lshr(($194|0),($195|0),7)|0); @@ -15748,721 +16509,721 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $753 = tempRet0; $754 = (_bitshift64Shl(($726|0),($727|0),21)|0); $755 = tempRet0; - $756 = (_i64Add(($466|0),($467|0),1048576,0)|0); + $756 = (_i64Subtract(($400|0),($401|0),($754|0),($755|0))|0); $757 = tempRet0; - $758 = (_bitshift64Ashr(($756|0),($757|0),21)|0); + $758 = (_i64Add(($466|0),($467|0),1048576,0)|0); $759 = tempRet0; - $760 = (_i64Add(($484|0),($485|0),($486|0),($487|0))|0); + $760 = (_bitshift64Ashr(($758|0),($759|0),21)|0); $761 = tempRet0; - $762 = (_i64Add(($760|0),($761|0),($482|0),($483|0))|0); + $762 = (_i64Add(($484|0),($485|0),($486|0),($487|0))|0); $763 = tempRet0; - $764 = (_i64Add(($762|0),($763|0),($480|0),($481|0))|0); + $764 = (_i64Add(($762|0),($763|0),($482|0),($483|0))|0); $765 = tempRet0; - $766 = (_i64Add(($764|0),($765|0),($478|0),($479|0))|0); + $766 = (_i64Add(($764|0),($765|0),($480|0),($481|0))|0); $767 = tempRet0; - $768 = (_i64Add(($766|0),($767|0),($474|0),($475|0))|0); + $768 = (_i64Add(($766|0),($767|0),($478|0),($479|0))|0); $769 = tempRet0; - $770 = (_i64Add(($768|0),($769|0),($476|0),($477|0))|0); + $770 = (_i64Add(($768|0),($769|0),($474|0),($475|0))|0); $771 = tempRet0; - $772 = (_i64Add(($770|0),($771|0),($472|0),($473|0))|0); + $772 = (_i64Add(($770|0),($771|0),($476|0),($477|0))|0); $773 = tempRet0; - $774 = (_i64Add(($772|0),($773|0),($470|0),($471|0))|0); + $774 = (_i64Add(($772|0),($773|0),($472|0),($473|0))|0); $775 = tempRet0; - $776 = (_i64Add(($774|0),($775|0),($468|0),($469|0))|0); + $776 = (_i64Add(($774|0),($775|0),($470|0),($471|0))|0); $777 = tempRet0; - $778 = (_i64Add(($776|0),($777|0),($758|0),($759|0))|0); + $778 = (_i64Add(($776|0),($777|0),($468|0),($469|0))|0); $779 = tempRet0; - $780 = (_bitshift64Shl(($758|0),($759|0),21)|0); + $780 = (_i64Add(($778|0),($779|0),($760|0),($761|0))|0); $781 = tempRet0; - $782 = (_i64Add(($520|0),($521|0),1048576,0)|0); + $782 = (_bitshift64Shl(($760|0),($761|0),21)|0); $783 = tempRet0; - $784 = (_bitshift64Ashr(($782|0),($783|0),21)|0); + $784 = (_i64Subtract(($466|0),($467|0),($782|0),($783|0))|0); $785 = tempRet0; - $786 = (_i64Add(($534|0),($535|0),($536|0),($537|0))|0); + $786 = (_i64Add(($520|0),($521|0),1048576,0)|0); $787 = tempRet0; - $788 = (_i64Add(($786|0),($787|0),($532|0),($533|0))|0); + $788 = (_bitshift64Ashr(($786|0),($787|0),21)|0); $789 = tempRet0; - $790 = (_i64Add(($788|0),($789|0),($528|0),($529|0))|0); + $790 = (_i64Add(($534|0),($535|0),($536|0),($537|0))|0); $791 = tempRet0; - $792 = (_i64Add(($790|0),($791|0),($530|0),($531|0))|0); + $792 = (_i64Add(($790|0),($791|0),($532|0),($533|0))|0); $793 = tempRet0; - $794 = (_i64Add(($792|0),($793|0),($526|0),($527|0))|0); + $794 = (_i64Add(($792|0),($793|0),($528|0),($529|0))|0); $795 = tempRet0; - $796 = (_i64Add(($794|0),($795|0),($524|0),($525|0))|0); + $796 = (_i64Add(($794|0),($795|0),($530|0),($531|0))|0); $797 = tempRet0; - $798 = (_i64Add(($796|0),($797|0),($522|0),($523|0))|0); + $798 = (_i64Add(($796|0),($797|0),($526|0),($527|0))|0); $799 = tempRet0; - $800 = (_i64Add(($798|0),($799|0),($784|0),($785|0))|0); + $800 = (_i64Add(($798|0),($799|0),($524|0),($525|0))|0); $801 = tempRet0; - $802 = (_bitshift64Shl(($784|0),($785|0),21)|0); + $802 = (_i64Add(($800|0),($801|0),($522|0),($523|0))|0); $803 = tempRet0; - $804 = (_i64Add(($562|0),($563|0),1048576,0)|0); + $804 = (_i64Add(($802|0),($803|0),($788|0),($789|0))|0); $805 = tempRet0; - $806 = (_bitshift64Ashr(($804|0),($805|0),21)|0); + $806 = (_bitshift64Shl(($788|0),($789|0),21)|0); $807 = tempRet0; - $808 = (_i64Add(($570|0),($571|0),($574|0),($575|0))|0); + $808 = (_i64Subtract(($520|0),($521|0),($806|0),($807|0))|0); $809 = tempRet0; - $810 = (_i64Add(($808|0),($809|0),($572|0),($573|0))|0); + $810 = (_i64Add(($562|0),($563|0),1048576,0)|0); $811 = tempRet0; - $812 = (_i64Add(($810|0),($811|0),($568|0),($569|0))|0); + $812 = (_bitshift64Ashr(($810|0),($811|0),21)|0); $813 = tempRet0; - $814 = (_i64Add(($812|0),($813|0),($566|0),($567|0))|0); + $814 = (_i64Add(($570|0),($571|0),($574|0),($575|0))|0); $815 = tempRet0; - $816 = (_i64Add(($814|0),($815|0),($564|0),($565|0))|0); + $816 = (_i64Add(($814|0),($815|0),($572|0),($573|0))|0); $817 = tempRet0; - $818 = (_i64Add(($816|0),($817|0),($806|0),($807|0))|0); + $818 = (_i64Add(($816|0),($817|0),($568|0),($569|0))|0); $819 = tempRet0; - $820 = (_bitshift64Shl(($806|0),($807|0),21)|0); + $820 = (_i64Add(($818|0),($819|0),($566|0),($567|0))|0); $821 = tempRet0; - $822 = (_i64Add(($592|0),($593|0),1048576,0)|0); + $822 = (_i64Add(($820|0),($821|0),($564|0),($565|0))|0); $823 = tempRet0; - $824 = (_bitshift64Ashr(($822|0),($823|0),21)|0); + $824 = (_i64Add(($822|0),($823|0),($812|0),($813|0))|0); $825 = tempRet0; - $826 = (_i64Add(($598|0),($599|0),($600|0),($601|0))|0); + $826 = (_bitshift64Shl(($812|0),($813|0),21)|0); $827 = tempRet0; - $828 = (_i64Add(($826|0),($827|0),($596|0),($597|0))|0); + $828 = (_i64Subtract(($562|0),($563|0),($826|0),($827|0))|0); $829 = tempRet0; - $830 = (_i64Add(($828|0),($829|0),($594|0),($595|0))|0); + $830 = (_i64Add(($592|0),($593|0),1048576,0)|0); $831 = tempRet0; - $832 = (_i64Add(($830|0),($831|0),($824|0),($825|0))|0); + $832 = (_bitshift64Ashr(($830|0),($831|0),21)|0); $833 = tempRet0; - $834 = (_bitshift64Shl(($824|0),($825|0),21)|0); + $834 = (_i64Add(($598|0),($599|0),($600|0),($601|0))|0); $835 = tempRet0; - $836 = (_i64Subtract(($592|0),($593|0),($834|0),($835|0))|0); + $836 = (_i64Add(($834|0),($835|0),($596|0),($597|0))|0); $837 = tempRet0; - $838 = (_i64Add(($610|0),($611|0),1048576,0)|0); + $838 = (_i64Add(($836|0),($837|0),($594|0),($595|0))|0); $839 = tempRet0; - $840 = (_bitshift64Lshr(($838|0),($839|0),21)|0); + $840 = (_i64Add(($838|0),($839|0),($832|0),($833|0))|0); $841 = tempRet0; - $842 = (_i64Add(($616|0),($617|0),($840|0),($841|0))|0); + $842 = (_bitshift64Shl(($832|0),($833|0),21)|0); $843 = tempRet0; - $844 = (_bitshift64Shl(($840|0),($841|0),21)|0); + $844 = (_i64Subtract(($592|0),($593|0),($842|0),($843|0))|0); $845 = tempRet0; - $846 = (_i64Subtract(($610|0),($611|0),($844|0),($845|0))|0); + $846 = (_i64Add(($610|0),($611|0),1048576,0)|0); $847 = tempRet0; - $848 = (_i64Add(($618|0),($619|0),1048576,0)|0); + $848 = (_bitshift64Lshr(($846|0),($847|0),21)|0); $849 = tempRet0; - $850 = (_bitshift64Lshr(($848|0),($849|0),21)|0); + $850 = (_i64Add(($616|0),($617|0),($848|0),($849|0))|0); $851 = tempRet0; - $852 = (_bitshift64Shl(($850|0),($851|0),21)|0); + $852 = (_bitshift64Shl(($848|0),($849|0),21)|0); $853 = tempRet0; - $854 = (_i64Subtract(($618|0),($619|0),($852|0),($853|0))|0); + $854 = (_i64Subtract(($610|0),($611|0),($852|0),($853|0))|0); $855 = tempRet0; - $856 = (_i64Add(($628|0),($629|0),1048576,0)|0); + $856 = (_i64Add(($618|0),($619|0),1048576,0)|0); $857 = tempRet0; $858 = (_bitshift64Lshr(($856|0),($857|0),21)|0); $859 = tempRet0; $860 = (_bitshift64Shl(($858|0),($859|0),21)|0); $861 = tempRet0; - $862 = (_i64Subtract(($628|0),($629|0),($860|0),($861|0))|0); + $862 = (_i64Subtract(($618|0),($619|0),($860|0),($861|0))|0); $863 = tempRet0; - $864 = (_i64Add(($646|0),($647|0),1048576,0)|0); + $864 = (_i64Add(($628|0),($629|0),1048576,0)|0); $865 = tempRet0; - $866 = (_bitshift64Ashr(($864|0),($865|0),21)|0); + $866 = (_bitshift64Lshr(($864|0),($865|0),21)|0); $867 = tempRet0; - $868 = (_i64Add(($670|0),($671|0),($866|0),($867|0))|0); + $868 = (_bitshift64Shl(($866|0),($867|0),21)|0); $869 = tempRet0; - $870 = (_bitshift64Shl(($866|0),($867|0),21)|0); + $870 = (_i64Subtract(($628|0),($629|0),($868|0),($869|0))|0); $871 = tempRet0; - $872 = (_i64Subtract(($646|0),($647|0),($870|0),($871|0))|0); + $872 = (_i64Add(($646|0),($647|0),1048576,0)|0); $873 = tempRet0; - $874 = (_i64Add(($666|0),($667|0),1048576,0)|0); + $874 = (_bitshift64Ashr(($872|0),($873|0),21)|0); $875 = tempRet0; - $876 = (_bitshift64Ashr(($874|0),($875|0),21)|0); + $876 = (_i64Add(($874|0),($875|0),($670|0),($671|0))|0); $877 = tempRet0; - $878 = (_bitshift64Shl(($876|0),($877|0),21)|0); + $878 = (_bitshift64Shl(($874|0),($875|0),21)|0); $879 = tempRet0; - $880 = (_i64Subtract(($666|0),($667|0),($878|0),($879|0))|0); + $880 = (_i64Subtract(($646|0),($647|0),($878|0),($879|0))|0); $881 = tempRet0; - $882 = (_i64Add(($692|0),($693|0),1048576,0)|0); + $882 = (_i64Add(($666|0),($667|0),1048576,0)|0); $883 = tempRet0; $884 = (_bitshift64Ashr(($882|0),($883|0),21)|0); $885 = tempRet0; $886 = (_bitshift64Shl(($884|0),($885|0),21)|0); $887 = tempRet0; - $888 = (_i64Add(($720|0),($721|0),1048576,0)|0); + $888 = (_i64Subtract(($666|0),($667|0),($886|0),($887|0))|0); $889 = tempRet0; - $890 = (_bitshift64Ashr(($888|0),($889|0),21)|0); + $890 = (_i64Add(($692|0),($693|0),1048576,0)|0); $891 = tempRet0; - $892 = (_bitshift64Shl(($890|0),($891|0),21)|0); + $892 = (_bitshift64Ashr(($890|0),($891|0),21)|0); $893 = tempRet0; - $894 = (_i64Add(($752|0),($753|0),1048576,0)|0); + $894 = (_bitshift64Shl(($892|0),($893|0),21)|0); $895 = tempRet0; - $896 = (_bitshift64Ashr(($894|0),($895|0),21)|0); + $896 = (_i64Add(($720|0),($721|0),1048576,0)|0); $897 = tempRet0; - $898 = (_bitshift64Shl(($896|0),($897|0),21)|0); + $898 = (_bitshift64Ashr(($896|0),($897|0),21)|0); $899 = tempRet0; - $900 = (_i64Add(($778|0),($779|0),1048576,0)|0); + $900 = (_i64Add(($898|0),($899|0),($756|0),($757|0))|0); $901 = tempRet0; - $902 = (_bitshift64Ashr(($900|0),($901|0),21)|0); + $902 = (_bitshift64Shl(($898|0),($899|0),21)|0); $903 = tempRet0; - $904 = (_bitshift64Shl(($902|0),($903|0),21)|0); + $904 = (_i64Subtract(($720|0),($721|0),($902|0),($903|0))|0); $905 = tempRet0; - $906 = (_i64Add(($800|0),($801|0),1048576,0)|0); + $906 = (_i64Add(($752|0),($753|0),1048576,0)|0); $907 = tempRet0; $908 = (_bitshift64Ashr(($906|0),($907|0),21)|0); $909 = tempRet0; - $910 = (_bitshift64Shl(($908|0),($909|0),21)|0); + $910 = (_i64Add(($784|0),($785|0),($908|0),($909|0))|0); $911 = tempRet0; - $912 = (_i64Add(($818|0),($819|0),1048576,0)|0); + $912 = (_bitshift64Shl(($908|0),($909|0),21)|0); $913 = tempRet0; - $914 = (_bitshift64Ashr(($912|0),($913|0),21)|0); + $914 = (_i64Subtract(($752|0),($753|0),($912|0),($913|0))|0); $915 = tempRet0; - $916 = (_i64Add(($914|0),($915|0),($836|0),($837|0))|0); + $916 = (_i64Add(($780|0),($781|0),1048576,0)|0); $917 = tempRet0; - $918 = (_bitshift64Shl(($914|0),($915|0),21)|0); + $918 = (_bitshift64Ashr(($916|0),($917|0),21)|0); $919 = tempRet0; - $920 = (_i64Subtract(($818|0),($819|0),($918|0),($919|0))|0); + $920 = (_i64Add(($808|0),($809|0),($918|0),($919|0))|0); $921 = tempRet0; - $922 = (_i64Add(($832|0),($833|0),1048576,0)|0); + $922 = (_bitshift64Shl(($918|0),($919|0),21)|0); $923 = tempRet0; - $924 = (_bitshift64Ashr(($922|0),($923|0),21)|0); + $924 = (_i64Subtract(($780|0),($781|0),($922|0),($923|0))|0); $925 = tempRet0; - $926 = (_i64Add(($924|0),($925|0),($846|0),($847|0))|0); + $926 = (_i64Add(($804|0),($805|0),1048576,0)|0); $927 = tempRet0; - $928 = (_bitshift64Shl(($924|0),($925|0),21)|0); + $928 = (_bitshift64Ashr(($926|0),($927|0),21)|0); $929 = tempRet0; - $930 = (_i64Subtract(($832|0),($833|0),($928|0),($929|0))|0); + $930 = (_i64Add(($828|0),($829|0),($928|0),($929|0))|0); $931 = tempRet0; - $932 = (_i64Add(($842|0),($843|0),1048576,0)|0); + $932 = (_bitshift64Shl(($928|0),($929|0),21)|0); $933 = tempRet0; - $934 = (_bitshift64Lshr(($932|0),($933|0),21)|0); + $934 = (_i64Subtract(($804|0),($805|0),($932|0),($933|0))|0); $935 = tempRet0; - $936 = (_i64Add(($934|0),($935|0),($854|0),($855|0))|0); + $936 = (_i64Add(($824|0),($825|0),1048576,0)|0); $937 = tempRet0; - $938 = (_bitshift64Shl(($934|0),($935|0),21)|0); + $938 = (_bitshift64Ashr(($936|0),($937|0),21)|0); $939 = tempRet0; - $940 = (_i64Subtract(($842|0),($843|0),($938|0),($939|0))|0); + $940 = (_i64Add(($938|0),($939|0),($844|0),($845|0))|0); $941 = tempRet0; - $942 = (___muldi3(($850|0),($851|0),666643,0)|0); + $942 = (_bitshift64Shl(($938|0),($939|0),21)|0); $943 = tempRet0; - $944 = (___muldi3(($850|0),($851|0),470296,0)|0); + $944 = (_i64Subtract(($824|0),($825|0),($942|0),($943|0))|0); $945 = tempRet0; - $946 = (___muldi3(($850|0),($851|0),654183,0)|0); + $946 = (_i64Add(($840|0),($841|0),1048576,0)|0); $947 = tempRet0; - $948 = (___muldi3(($850|0),($851|0),-997805,-1)|0); + $948 = (_bitshift64Ashr(($946|0),($947|0),21)|0); $949 = tempRet0; - $950 = (___muldi3(($850|0),($851|0),136657,0)|0); + $950 = (_i64Add(($948|0),($949|0),($854|0),($855|0))|0); $951 = tempRet0; - $952 = (___muldi3(($850|0),($851|0),-683901,-1)|0); + $952 = (_bitshift64Shl(($948|0),($949|0),21)|0); $953 = tempRet0; - $954 = (_i64Add(($952|0),($953|0),($562|0),($563|0))|0); + $954 = (_i64Subtract(($840|0),($841|0),($952|0),($953|0))|0); $955 = tempRet0; - $956 = (_i64Subtract(($954|0),($955|0),($820|0),($821|0))|0); + $956 = (_i64Add(($850|0),($851|0),1048576,0)|0); $957 = tempRet0; - $958 = (_i64Add(($956|0),($957|0),($908|0),($909|0))|0); + $958 = (_bitshift64Lshr(($956|0),($957|0),21)|0); $959 = tempRet0; - $960 = (___muldi3(($936|0),($937|0),666643,0)|0); + $960 = (_i64Add(($958|0),($959|0),($862|0),($863|0))|0); $961 = tempRet0; - $962 = (___muldi3(($936|0),($937|0),470296,0)|0); + $962 = (_bitshift64Shl(($958|0),($959|0),21)|0); $963 = tempRet0; - $964 = (___muldi3(($936|0),($937|0),654183,0)|0); + $964 = (_i64Subtract(($850|0),($851|0),($962|0),($963|0))|0); $965 = tempRet0; - $966 = (___muldi3(($936|0),($937|0),-997805,-1)|0); + $966 = (___muldi3(($858|0),($859|0),666643,0)|0); $967 = tempRet0; - $968 = (___muldi3(($936|0),($937|0),136657,0)|0); + $968 = (_i64Add(($966|0),($967|0),($914|0),($915|0))|0); $969 = tempRet0; - $970 = (___muldi3(($936|0),($937|0),-683901,-1)|0); + $970 = (___muldi3(($858|0),($859|0),470296,0)|0); $971 = tempRet0; - $972 = (___muldi3(($940|0),($941|0),666643,0)|0); + $972 = (_i64Add(($970|0),($971|0),($910|0),($911|0))|0); $973 = tempRet0; - $974 = (___muldi3(($940|0),($941|0),470296,0)|0); + $974 = (___muldi3(($858|0),($859|0),654183,0)|0); $975 = tempRet0; - $976 = (___muldi3(($940|0),($941|0),654183,0)|0); + $976 = (_i64Add(($974|0),($975|0),($924|0),($925|0))|0); $977 = tempRet0; - $978 = (___muldi3(($940|0),($941|0),-997805,-1)|0); + $978 = (___muldi3(($858|0),($859|0),-997805,-1)|0); $979 = tempRet0; - $980 = (___muldi3(($940|0),($941|0),136657,0)|0); + $980 = (_i64Add(($978|0),($979|0),($920|0),($921|0))|0); $981 = tempRet0; - $982 = (___muldi3(($940|0),($941|0),-683901,-1)|0); + $982 = (___muldi3(($858|0),($859|0),136657,0)|0); $983 = tempRet0; - $984 = (_i64Add(($948|0),($949|0),($520|0),($521|0))|0); + $984 = (_i64Add(($982|0),($983|0),($934|0),($935|0))|0); $985 = tempRet0; - $986 = (_i64Subtract(($984|0),($985|0),($802|0),($803|0))|0); + $986 = (___muldi3(($858|0),($859|0),-683901,-1)|0); $987 = tempRet0; - $988 = (_i64Add(($986|0),($987|0),($902|0),($903|0))|0); + $988 = (_i64Add(($930|0),($931|0),($986|0),($987|0))|0); $989 = tempRet0; - $990 = (_i64Add(($988|0),($989|0),($968|0),($969|0))|0); + $990 = (___muldi3(($960|0),($961|0),666643,0)|0); $991 = tempRet0; - $992 = (_i64Add(($990|0),($991|0),($982|0),($983|0))|0); + $992 = (_i64Add(($990|0),($991|0),($900|0),($901|0))|0); $993 = tempRet0; - $994 = (___muldi3(($926|0),($927|0),666643,0)|0); + $994 = (___muldi3(($960|0),($961|0),470296,0)|0); $995 = tempRet0; - $996 = (___muldi3(($926|0),($927|0),470296,0)|0); + $996 = (_i64Add(($994|0),($995|0),($968|0),($969|0))|0); $997 = tempRet0; - $998 = (___muldi3(($926|0),($927|0),654183,0)|0); + $998 = (___muldi3(($960|0),($961|0),654183,0)|0); $999 = tempRet0; - $1000 = (___muldi3(($926|0),($927|0),-997805,-1)|0); + $1000 = (_i64Add(($998|0),($999|0),($972|0),($973|0))|0); $1001 = tempRet0; - $1002 = (___muldi3(($926|0),($927|0),136657,0)|0); + $1002 = (___muldi3(($960|0),($961|0),-997805,-1)|0); $1003 = tempRet0; - $1004 = (___muldi3(($926|0),($927|0),-683901,-1)|0); + $1004 = (_i64Add(($1002|0),($1003|0),($976|0),($977|0))|0); $1005 = tempRet0; - $1006 = (___muldi3(($930|0),($931|0),666643,0)|0); + $1006 = (___muldi3(($960|0),($961|0),136657,0)|0); $1007 = tempRet0; - $1008 = (___muldi3(($930|0),($931|0),470296,0)|0); + $1008 = (_i64Add(($1006|0),($1007|0),($980|0),($981|0))|0); $1009 = tempRet0; - $1010 = (___muldi3(($930|0),($931|0),654183,0)|0); + $1010 = (___muldi3(($960|0),($961|0),-683901,-1)|0); $1011 = tempRet0; - $1012 = (___muldi3(($930|0),($931|0),-997805,-1)|0); + $1012 = (_i64Add(($984|0),($985|0),($1010|0),($1011|0))|0); $1013 = tempRet0; - $1014 = (___muldi3(($930|0),($931|0),136657,0)|0); + $1014 = (___muldi3(($964|0),($965|0),666643,0)|0); $1015 = tempRet0; - $1016 = (___muldi3(($930|0),($931|0),-683901,-1)|0); + $1016 = (_i64Add(($1014|0),($1015|0),($904|0),($905|0))|0); $1017 = tempRet0; - $1018 = (_i64Add(($944|0),($945|0),($466|0),($467|0))|0); + $1018 = (___muldi3(($964|0),($965|0),470296,0)|0); $1019 = tempRet0; - $1020 = (_i64Subtract(($1018|0),($1019|0),($780|0),($781|0))|0); + $1020 = (_i64Add(($1018|0),($1019|0),($992|0),($993|0))|0); $1021 = tempRet0; - $1022 = (_i64Add(($1020|0),($1021|0),($964|0),($965|0))|0); + $1022 = (___muldi3(($964|0),($965|0),654183,0)|0); $1023 = tempRet0; - $1024 = (_i64Add(($1022|0),($1023|0),($1002|0),($1003|0))|0); + $1024 = (_i64Add(($1022|0),($1023|0),($996|0),($997|0))|0); $1025 = tempRet0; - $1026 = (_i64Add(($1024|0),($1025|0),($978|0),($979|0))|0); + $1026 = (___muldi3(($964|0),($965|0),-997805,-1)|0); $1027 = tempRet0; - $1028 = (_i64Add(($1026|0),($1027|0),($1016|0),($1017|0))|0); + $1028 = (_i64Add(($1026|0),($1027|0),($1000|0),($1001|0))|0); $1029 = tempRet0; - $1030 = (_i64Add(($1028|0),($1029|0),($896|0),($897|0))|0); + $1030 = (___muldi3(($964|0),($965|0),136657,0)|0); $1031 = tempRet0; - $1032 = (___muldi3(($916|0),($917|0),666643,0)|0); + $1032 = (_i64Add(($1030|0),($1031|0),($1004|0),($1005|0))|0); $1033 = tempRet0; - $1034 = (_i64Add(($1032|0),($1033|0),($284|0),($285|0))|0); + $1034 = (___muldi3(($964|0),($965|0),-683901,-1)|0); $1035 = tempRet0; - $1036 = (_i64Subtract(($1034|0),($1035|0),($694|0),($695|0))|0); + $1036 = (_i64Add(($1008|0),($1009|0),($1034|0),($1035|0))|0); $1037 = tempRet0; - $1038 = (_i64Add(($1036|0),($1037|0),($876|0),($877|0))|0); + $1038 = (___muldi3(($950|0),($951|0),666643,0)|0); $1039 = tempRet0; - $1040 = (___muldi3(($916|0),($917|0),470296,0)|0); + $1040 = (___muldi3(($950|0),($951|0),470296,0)|0); $1041 = tempRet0; - $1042 = (___muldi3(($916|0),($917|0),654183,0)|0); + $1042 = (_i64Add(($1040|0),($1041|0),($1016|0),($1017|0))|0); $1043 = tempRet0; - $1044 = (_i64Add(($994|0),($995|0),($336|0),($337|0))|0); + $1044 = (___muldi3(($950|0),($951|0),654183,0)|0); $1045 = tempRet0; - $1046 = (_i64Add(($1044|0),($1045|0),($1042|0),($1043|0))|0); + $1046 = (_i64Add(($1044|0),($1045|0),($1020|0),($1021|0))|0); $1047 = tempRet0; - $1048 = (_i64Add(($1046|0),($1047|0),($1008|0),($1009|0))|0); + $1048 = (___muldi3(($950|0),($951|0),-997805,-1)|0); $1049 = tempRet0; - $1050 = (_i64Subtract(($1048|0),($1049|0),($722|0),($723|0))|0); + $1050 = (_i64Add(($1048|0),($1049|0),($1024|0),($1025|0))|0); $1051 = tempRet0; - $1052 = (_i64Add(($1050|0),($1051|0),($884|0),($885|0))|0); + $1052 = (___muldi3(($950|0),($951|0),136657,0)|0); $1053 = tempRet0; - $1054 = (___muldi3(($916|0),($917|0),-997805,-1)|0); + $1054 = (_i64Add(($1052|0),($1053|0),($1028|0),($1029|0))|0); $1055 = tempRet0; - $1056 = (___muldi3(($916|0),($917|0),136657,0)|0); + $1056 = (___muldi3(($950|0),($951|0),-683901,-1)|0); $1057 = tempRet0; - $1058 = (_i64Add(($998|0),($999|0),($960|0),($961|0))|0); + $1058 = (_i64Add(($1032|0),($1033|0),($1056|0),($1057|0))|0); $1059 = tempRet0; - $1060 = (_i64Add(($1058|0),($1059|0),($1056|0),($1057|0))|0); + $1060 = (___muldi3(($954|0),($955|0),666643,0)|0); $1061 = tempRet0; - $1062 = (_i64Add(($1060|0),($1061|0),($974|0),($975|0))|0); + $1062 = (___muldi3(($954|0),($955|0),470296,0)|0); $1063 = tempRet0; - $1064 = (_i64Add(($1062|0),($1063|0),($1012|0),($1013|0))|0); + $1064 = (___muldi3(($954|0),($955|0),654183,0)|0); $1065 = tempRet0; - $1066 = (_i64Add(($1064|0),($1065|0),($400|0),($401|0))|0); + $1066 = (_i64Add(($1064|0),($1065|0),($1042|0),($1043|0))|0); $1067 = tempRet0; - $1068 = (_i64Add(($1066|0),($1067|0),($890|0),($891|0))|0); + $1068 = (___muldi3(($954|0),($955|0),-997805,-1)|0); $1069 = tempRet0; - $1070 = (_i64Subtract(($1068|0),($1069|0),($754|0),($755|0))|0); + $1070 = (_i64Add(($1046|0),($1047|0),($1068|0),($1069|0))|0); $1071 = tempRet0; - $1072 = (___muldi3(($916|0),($917|0),-683901,-1)|0); + $1072 = (___muldi3(($954|0),($955|0),136657,0)|0); $1073 = tempRet0; - $1074 = (_i64Add(($1038|0),($1039|0),1048576,0)|0); + $1074 = (_i64Add(($1072|0),($1073|0),($1050|0),($1051|0))|0); $1075 = tempRet0; - $1076 = (_bitshift64Ashr(($1074|0),($1075|0),21)|0); + $1076 = (___muldi3(($954|0),($955|0),-683901,-1)|0); $1077 = tempRet0; - $1078 = (_i64Add(($1006|0),($1007|0),($1040|0),($1041|0))|0); + $1078 = (_i64Add(($1054|0),($1055|0),($1076|0),($1077|0))|0); $1079 = tempRet0; - $1080 = (_i64Add(($1078|0),($1079|0),($692|0),($693|0))|0); + $1080 = (___muldi3(($940|0),($941|0),666643,0)|0); $1081 = tempRet0; - $1082 = (_i64Subtract(($1080|0),($1081|0),($886|0),($887|0))|0); + $1082 = (_i64Add(($284|0),($285|0),($1080|0),($1081|0))|0); $1083 = tempRet0; - $1084 = (_i64Add(($1082|0),($1083|0),($1076|0),($1077|0))|0); + $1084 = (_i64Add(($1082|0),($1083|0),($884|0),($885|0))|0); $1085 = tempRet0; - $1086 = (_bitshift64Shl(($1076|0),($1077|0),21)|0); + $1086 = (_i64Subtract(($1084|0),($1085|0),($694|0),($695|0))|0); $1087 = tempRet0; - $1088 = (_i64Add(($1052|0),($1053|0),1048576,0)|0); + $1088 = (___muldi3(($940|0),($941|0),470296,0)|0); $1089 = tempRet0; - $1090 = (_bitshift64Ashr(($1088|0),($1089|0),21)|0); + $1090 = (___muldi3(($940|0),($941|0),654183,0)|0); $1091 = tempRet0; - $1092 = (_i64Add(($1054|0),($1055|0),($996|0),($997|0))|0); + $1092 = (_i64Add(($1062|0),($1063|0),($1038|0),($1039|0))|0); $1093 = tempRet0; - $1094 = (_i64Add(($1092|0),($1093|0),($972|0),($973|0))|0); + $1094 = (_i64Add(($1092|0),($1093|0),($1090|0),($1091|0))|0); $1095 = tempRet0; - $1096 = (_i64Add(($1094|0),($1095|0),($1010|0),($1011|0))|0); + $1096 = (_i64Add(($1094|0),($1095|0),($336|0),($337|0))|0); $1097 = tempRet0; - $1098 = (_i64Add(($1096|0),($1097|0),($720|0),($721|0))|0); + $1098 = (_i64Add(($1096|0),($1097|0),($892|0),($893|0))|0); $1099 = tempRet0; - $1100 = (_i64Subtract(($1098|0),($1099|0),($892|0),($893|0))|0); + $1100 = (_i64Subtract(($1098|0),($1099|0),($722|0),($723|0))|0); $1101 = tempRet0; - $1102 = (_i64Add(($1100|0),($1101|0),($1090|0),($1091|0))|0); + $1102 = (___muldi3(($940|0),($941|0),-997805,-1)|0); $1103 = tempRet0; - $1104 = (_bitshift64Shl(($1090|0),($1091|0),21)|0); + $1104 = (_i64Add(($1066|0),($1067|0),($1102|0),($1103|0))|0); $1105 = tempRet0; - $1106 = (_i64Add(($1070|0),($1071|0),1048576,0)|0); + $1106 = (___muldi3(($940|0),($941|0),136657,0)|0); $1107 = tempRet0; - $1108 = (_bitshift64Ashr(($1106|0),($1107|0),21)|0); + $1108 = (_i64Add(($1070|0),($1071|0),($1106|0),($1107|0))|0); $1109 = tempRet0; - $1110 = (_i64Add(($962|0),($963|0),($942|0),($943|0))|0); + $1110 = (___muldi3(($940|0),($941|0),-683901,-1)|0); $1111 = tempRet0; - $1112 = (_i64Add(($1110|0),($1111|0),($1000|0),($1001|0))|0); + $1112 = (_i64Add(($1074|0),($1075|0),($1110|0),($1111|0))|0); $1113 = tempRet0; - $1114 = (_i64Add(($1112|0),($1113|0),($1072|0),($1073|0))|0); + $1114 = (_i64Add(($1086|0),($1087|0),1048576,0)|0); $1115 = tempRet0; - $1116 = (_i64Add(($1114|0),($1115|0),($976|0),($977|0))|0); + $1116 = (_bitshift64Ashr(($1114|0),($1115|0),21)|0); $1117 = tempRet0; - $1118 = (_i64Add(($1116|0),($1117|0),($1014|0),($1015|0))|0); + $1118 = (_i64Add(($1088|0),($1089|0),($1060|0),($1061|0))|0); $1119 = tempRet0; - $1120 = (_i64Add(($1118|0),($1119|0),($752|0),($753|0))|0); + $1120 = (_i64Add(($1118|0),($1119|0),($692|0),($693|0))|0); $1121 = tempRet0; - $1122 = (_i64Subtract(($1120|0),($1121|0),($898|0),($899|0))|0); + $1122 = (_i64Subtract(($1120|0),($1121|0),($894|0),($895|0))|0); $1123 = tempRet0; - $1124 = (_i64Add(($1122|0),($1123|0),($1108|0),($1109|0))|0); + $1124 = (_i64Add(($1122|0),($1123|0),($1116|0),($1117|0))|0); $1125 = tempRet0; - $1126 = (_bitshift64Shl(($1108|0),($1109|0),21)|0); + $1126 = (_bitshift64Shl(($1116|0),($1117|0),21)|0); $1127 = tempRet0; - $1128 = (_i64Add(($1030|0),($1031|0),1048576,0)|0); + $1128 = (_i64Subtract(($1086|0),($1087|0),($1126|0),($1127|0))|0); $1129 = tempRet0; - $1130 = (_bitshift64Ashr(($1128|0),($1129|0),21)|0); + $1130 = (_i64Add(($1100|0),($1101|0),1048576,0)|0); $1131 = tempRet0; - $1132 = (_i64Add(($778|0),($779|0),($946|0),($947|0))|0); + $1132 = (_bitshift64Ashr(($1130|0),($1131|0),21)|0); $1133 = tempRet0; - $1134 = (_i64Subtract(($1132|0),($1133|0),($904|0),($905|0))|0); + $1134 = (_i64Add(($1104|0),($1105|0),($1132|0),($1133|0))|0); $1135 = tempRet0; - $1136 = (_i64Add(($1134|0),($1135|0),($966|0),($967|0))|0); + $1136 = (_bitshift64Shl(($1132|0),($1133|0),21)|0); $1137 = tempRet0; - $1138 = (_i64Add(($1136|0),($1137|0),($1004|0),($1005|0))|0); + $1138 = (_i64Subtract(($1100|0),($1101|0),($1136|0),($1137|0))|0); $1139 = tempRet0; - $1140 = (_i64Add(($1138|0),($1139|0),($980|0),($981|0))|0); + $1140 = (_i64Add(($1108|0),($1109|0),1048576,0)|0); $1141 = tempRet0; - $1142 = (_i64Add(($1140|0),($1141|0),($1130|0),($1131|0))|0); + $1142 = (_bitshift64Ashr(($1140|0),($1141|0),21)|0); $1143 = tempRet0; - $1144 = (_bitshift64Shl(($1130|0),($1131|0),21)|0); + $1144 = (_i64Add(($1112|0),($1113|0),($1142|0),($1143|0))|0); $1145 = tempRet0; - $1146 = (_i64Subtract(($1030|0),($1031|0),($1144|0),($1145|0))|0); + $1146 = (_bitshift64Shl(($1142|0),($1143|0),21)|0); $1147 = tempRet0; - $1148 = (_i64Add(($992|0),($993|0),1048576,0)|0); + $1148 = (_i64Subtract(($1108|0),($1109|0),($1146|0),($1147|0))|0); $1149 = tempRet0; - $1150 = (_bitshift64Ashr(($1148|0),($1149|0),21)|0); + $1150 = (_i64Add(($1078|0),($1079|0),1048576,0)|0); $1151 = tempRet0; - $1152 = (_i64Add(($800|0),($801|0),($950|0),($951|0))|0); + $1152 = (_bitshift64Ashr(($1150|0),($1151|0),21)|0); $1153 = tempRet0; - $1154 = (_i64Subtract(($1152|0),($1153|0),($910|0),($911|0))|0); + $1154 = (_i64Add(($1152|0),($1153|0),($1058|0),($1059|0))|0); $1155 = tempRet0; - $1156 = (_i64Add(($1154|0),($1155|0),($970|0),($971|0))|0); + $1156 = (_bitshift64Shl(($1152|0),($1153|0),21)|0); $1157 = tempRet0; - $1158 = (_i64Add(($1156|0),($1157|0),($1150|0),($1151|0))|0); + $1158 = (_i64Subtract(($1078|0),($1079|0),($1156|0),($1157|0))|0); $1159 = tempRet0; - $1160 = (_bitshift64Shl(($1150|0),($1151|0),21)|0); + $1160 = (_i64Add(($1036|0),($1037|0),1048576,0)|0); $1161 = tempRet0; - $1162 = (_i64Subtract(($992|0),($993|0),($1160|0),($1161|0))|0); + $1162 = (_bitshift64Ashr(($1160|0),($1161|0),21)|0); $1163 = tempRet0; - $1164 = (_i64Add(($958|0),($959|0),1048576,0)|0); + $1164 = (_i64Add(($1162|0),($1163|0),($1012|0),($1013|0))|0); $1165 = tempRet0; - $1166 = (_bitshift64Ashr(($1164|0),($1165|0),21)|0); + $1166 = (_bitshift64Shl(($1162|0),($1163|0),21)|0); $1167 = tempRet0; - $1168 = (_i64Add(($1166|0),($1167|0),($920|0),($921|0))|0); + $1168 = (_i64Subtract(($1036|0),($1037|0),($1166|0),($1167|0))|0); $1169 = tempRet0; - $1170 = (_bitshift64Shl(($1166|0),($1167|0),21)|0); + $1170 = (_i64Add(($988|0),($989|0),1048576,0)|0); $1171 = tempRet0; - $1172 = (_i64Subtract(($958|0),($959|0),($1170|0),($1171|0))|0); + $1172 = (_bitshift64Ashr(($1170|0),($1171|0),21)|0); $1173 = tempRet0; - $1174 = (_i64Add(($1084|0),($1085|0),1048576,0)|0); + $1174 = (_i64Add(($1172|0),($1173|0),($944|0),($945|0))|0); $1175 = tempRet0; - $1176 = (_bitshift64Ashr(($1174|0),($1175|0),21)|0); + $1176 = (_bitshift64Shl(($1172|0),($1173|0),21)|0); $1177 = tempRet0; - $1178 = (_bitshift64Shl(($1176|0),($1177|0),21)|0); + $1178 = (_i64Subtract(($988|0),($989|0),($1176|0),($1177|0))|0); $1179 = tempRet0; - $1180 = (_i64Add(($1102|0),($1103|0),1048576,0)|0); + $1180 = (_i64Add(($1124|0),($1125|0),1048576,0)|0); $1181 = tempRet0; $1182 = (_bitshift64Ashr(($1180|0),($1181|0),21)|0); $1183 = tempRet0; - $1184 = (_bitshift64Shl(($1182|0),($1183|0),21)|0); + $1184 = (_i64Add(($1182|0),($1183|0),($1138|0),($1139|0))|0); $1185 = tempRet0; - $1186 = (_i64Add(($1124|0),($1125|0),1048576,0)|0); + $1186 = (_bitshift64Shl(($1182|0),($1183|0),21)|0); $1187 = tempRet0; - $1188 = (_bitshift64Ashr(($1186|0),($1187|0),21)|0); + $1188 = (_i64Subtract(($1124|0),($1125|0),($1186|0),($1187|0))|0); $1189 = tempRet0; - $1190 = (_i64Add(($1146|0),($1147|0),($1188|0),($1189|0))|0); + $1190 = (_i64Add(($1134|0),($1135|0),1048576,0)|0); $1191 = tempRet0; - $1192 = (_bitshift64Shl(($1188|0),($1189|0),21)|0); + $1192 = (_bitshift64Ashr(($1190|0),($1191|0),21)|0); $1193 = tempRet0; - $1194 = (_i64Subtract(($1124|0),($1125|0),($1192|0),($1193|0))|0); + $1194 = (_i64Add(($1192|0),($1193|0),($1148|0),($1149|0))|0); $1195 = tempRet0; - $1196 = (_i64Add(($1142|0),($1143|0),1048576,0)|0); + $1196 = (_bitshift64Shl(($1192|0),($1193|0),21)|0); $1197 = tempRet0; - $1198 = (_bitshift64Ashr(($1196|0),($1197|0),21)|0); + $1198 = (_i64Subtract(($1134|0),($1135|0),($1196|0),($1197|0))|0); $1199 = tempRet0; - $1200 = (_i64Add(($1198|0),($1199|0),($1162|0),($1163|0))|0); + $1200 = (_i64Add(($1144|0),($1145|0),1048576,0)|0); $1201 = tempRet0; - $1202 = (_bitshift64Shl(($1198|0),($1199|0),21)|0); + $1202 = (_bitshift64Ashr(($1200|0),($1201|0),21)|0); $1203 = tempRet0; - $1204 = (_i64Subtract(($1142|0),($1143|0),($1202|0),($1203|0))|0); + $1204 = (_i64Add(($1202|0),($1203|0),($1158|0),($1159|0))|0); $1205 = tempRet0; - $1206 = (_i64Add(($1158|0),($1159|0),1048576,0)|0); + $1206 = (_bitshift64Shl(($1202|0),($1203|0),21)|0); $1207 = tempRet0; - $1208 = (_bitshift64Ashr(($1206|0),($1207|0),21)|0); + $1208 = (_i64Subtract(($1144|0),($1145|0),($1206|0),($1207|0))|0); $1209 = tempRet0; - $1210 = (_i64Add(($1208|0),($1209|0),($1172|0),($1173|0))|0); + $1210 = (_i64Add(($1154|0),($1155|0),1048576,0)|0); $1211 = tempRet0; - $1212 = (_bitshift64Shl(($1208|0),($1209|0),21)|0); + $1212 = (_bitshift64Ashr(($1210|0),($1211|0),21)|0); $1213 = tempRet0; - $1214 = (_i64Subtract(($1158|0),($1159|0),($1212|0),($1213|0))|0); + $1214 = (_i64Add(($1212|0),($1213|0),($1168|0),($1169|0))|0); $1215 = tempRet0; - $1216 = (___muldi3(($1168|0),($1169|0),666643,0)|0); + $1216 = (_bitshift64Shl(($1212|0),($1213|0),21)|0); $1217 = tempRet0; - $1218 = (_i64Add(($880|0),($881|0),($1216|0),($1217|0))|0); + $1218 = (_i64Subtract(($1154|0),($1155|0),($1216|0),($1217|0))|0); $1219 = tempRet0; - $1220 = (___muldi3(($1168|0),($1169|0),470296,0)|0); + $1220 = (_i64Add(($1164|0),($1165|0),1048576,0)|0); $1221 = tempRet0; - $1222 = (___muldi3(($1168|0),($1169|0),654183,0)|0); + $1222 = (_bitshift64Ashr(($1220|0),($1221|0),21)|0); $1223 = tempRet0; - $1224 = (___muldi3(($1168|0),($1169|0),-997805,-1)|0); + $1224 = (_i64Add(($1222|0),($1223|0),($1178|0),($1179|0))|0); $1225 = tempRet0; - $1226 = (___muldi3(($1168|0),($1169|0),136657,0)|0); + $1226 = (_bitshift64Shl(($1222|0),($1223|0),21)|0); $1227 = tempRet0; - $1228 = (___muldi3(($1168|0),($1169|0),-683901,-1)|0); + $1228 = (_i64Subtract(($1164|0),($1165|0),($1226|0),($1227|0))|0); $1229 = tempRet0; - $1230 = (_i64Add(($1070|0),($1071|0),($1228|0),($1229|0))|0); + $1230 = (___muldi3(($1174|0),($1175|0),666643,0)|0); $1231 = tempRet0; - $1232 = (_i64Subtract(($1230|0),($1231|0),($1126|0),($1127|0))|0); + $1232 = (_i64Add(($888|0),($889|0),($1230|0),($1231|0))|0); $1233 = tempRet0; - $1234 = (_i64Add(($1232|0),($1233|0),($1182|0),($1183|0))|0); + $1234 = (___muldi3(($1174|0),($1175|0),470296,0)|0); $1235 = tempRet0; - $1236 = (___muldi3(($1210|0),($1211|0),666643,0)|0); + $1236 = (_i64Add(($1234|0),($1235|0),($1128|0),($1129|0))|0); $1237 = tempRet0; - $1238 = (_i64Add(($868|0),($869|0),($1236|0),($1237|0))|0); + $1238 = (___muldi3(($1174|0),($1175|0),654183,0)|0); $1239 = tempRet0; - $1240 = (___muldi3(($1210|0),($1211|0),470296,0)|0); + $1240 = (_i64Add(($1238|0),($1239|0),($1188|0),($1189|0))|0); $1241 = tempRet0; - $1242 = (_i64Add(($1218|0),($1219|0),($1240|0),($1241|0))|0); + $1242 = (___muldi3(($1174|0),($1175|0),-997805,-1)|0); $1243 = tempRet0; - $1244 = (___muldi3(($1210|0),($1211|0),654183,0)|0); + $1244 = (_i64Add(($1242|0),($1243|0),($1184|0),($1185|0))|0); $1245 = tempRet0; - $1246 = (___muldi3(($1210|0),($1211|0),-997805,-1)|0); + $1246 = (___muldi3(($1174|0),($1175|0),136657,0)|0); $1247 = tempRet0; - $1248 = (___muldi3(($1210|0),($1211|0),136657,0)|0); + $1248 = (_i64Add(($1246|0),($1247|0),($1198|0),($1199|0))|0); $1249 = tempRet0; - $1250 = (___muldi3(($1210|0),($1211|0),-683901,-1)|0); + $1250 = (___muldi3(($1174|0),($1175|0),-683901,-1)|0); $1251 = tempRet0; - $1252 = (___muldi3(($1214|0),($1215|0),666643,0)|0); + $1252 = (_i64Add(($1194|0),($1195|0),($1250|0),($1251|0))|0); $1253 = tempRet0; - $1254 = (_i64Add(($872|0),($873|0),($1252|0),($1253|0))|0); + $1254 = (___muldi3(($1224|0),($1225|0),666643,0)|0); $1255 = tempRet0; - $1256 = (___muldi3(($1214|0),($1215|0),470296,0)|0); + $1256 = (_i64Add(($876|0),($877|0),($1254|0),($1255|0))|0); $1257 = tempRet0; - $1258 = (_i64Add(($1238|0),($1239|0),($1256|0),($1257|0))|0); + $1258 = (___muldi3(($1224|0),($1225|0),470296,0)|0); $1259 = tempRet0; - $1260 = (___muldi3(($1214|0),($1215|0),654183,0)|0); + $1260 = (_i64Add(($1232|0),($1233|0),($1258|0),($1259|0))|0); $1261 = tempRet0; - $1262 = (_i64Add(($1242|0),($1243|0),($1260|0),($1261|0))|0); + $1262 = (___muldi3(($1224|0),($1225|0),654183,0)|0); $1263 = tempRet0; - $1264 = (___muldi3(($1214|0),($1215|0),-997805,-1)|0); + $1264 = (_i64Add(($1236|0),($1237|0),($1262|0),($1263|0))|0); $1265 = tempRet0; - $1266 = (___muldi3(($1214|0),($1215|0),136657,0)|0); + $1266 = (___muldi3(($1224|0),($1225|0),-997805,-1)|0); $1267 = tempRet0; - $1268 = (___muldi3(($1214|0),($1215|0),-683901,-1)|0); + $1268 = (_i64Add(($1266|0),($1267|0),($1240|0),($1241|0))|0); $1269 = tempRet0; - $1270 = (_i64Add(($1052|0),($1053|0),($1224|0),($1225|0))|0); + $1270 = (___muldi3(($1224|0),($1225|0),136657,0)|0); $1271 = tempRet0; - $1272 = (_i64Subtract(($1270|0),($1271|0),($1104|0),($1105|0))|0); + $1272 = (_i64Add(($1270|0),($1271|0),($1244|0),($1245|0))|0); $1273 = tempRet0; - $1274 = (_i64Add(($1272|0),($1273|0),($1176|0),($1177|0))|0); + $1274 = (___muldi3(($1224|0),($1225|0),-683901,-1)|0); $1275 = tempRet0; - $1276 = (_i64Add(($1274|0),($1275|0),($1248|0),($1249|0))|0); + $1276 = (_i64Add(($1248|0),($1249|0),($1274|0),($1275|0))|0); $1277 = tempRet0; - $1278 = (_i64Add(($1276|0),($1277|0),($1268|0),($1269|0))|0); + $1278 = (___muldi3(($1228|0),($1229|0),666643,0)|0); $1279 = tempRet0; - $1280 = (___muldi3(($1200|0),($1201|0),666643,0)|0); + $1280 = (_i64Add(($880|0),($881|0),($1278|0),($1279|0))|0); $1281 = tempRet0; - $1282 = (___muldi3(($1200|0),($1201|0),470296,0)|0); + $1282 = (___muldi3(($1228|0),($1229|0),470296,0)|0); $1283 = tempRet0; - $1284 = (___muldi3(($1200|0),($1201|0),654183,0)|0); + $1284 = (_i64Add(($1256|0),($1257|0),($1282|0),($1283|0))|0); $1285 = tempRet0; - $1286 = (___muldi3(($1200|0),($1201|0),-997805,-1)|0); + $1286 = (___muldi3(($1228|0),($1229|0),654183,0)|0); $1287 = tempRet0; - $1288 = (___muldi3(($1200|0),($1201|0),136657,0)|0); + $1288 = (_i64Add(($1260|0),($1261|0),($1286|0),($1287|0))|0); $1289 = tempRet0; - $1290 = (___muldi3(($1200|0),($1201|0),-683901,-1)|0); + $1290 = (___muldi3(($1228|0),($1229|0),-997805,-1)|0); $1291 = tempRet0; - $1292 = (___muldi3(($1204|0),($1205|0),666643,0)|0); + $1292 = (_i64Add(($1264|0),($1265|0),($1290|0),($1291|0))|0); $1293 = tempRet0; - $1294 = (___muldi3(($1204|0),($1205|0),470296,0)|0); + $1294 = (___muldi3(($1228|0),($1229|0),136657,0)|0); $1295 = tempRet0; - $1296 = (___muldi3(($1204|0),($1205|0),654183,0)|0); + $1296 = (_i64Add(($1294|0),($1295|0),($1268|0),($1269|0))|0); $1297 = tempRet0; - $1298 = (___muldi3(($1204|0),($1205|0),-997805,-1)|0); + $1298 = (___muldi3(($1228|0),($1229|0),-683901,-1)|0); $1299 = tempRet0; - $1300 = (___muldi3(($1204|0),($1205|0),136657,0)|0); + $1300 = (_i64Add(($1272|0),($1273|0),($1298|0),($1299|0))|0); $1301 = tempRet0; - $1302 = (___muldi3(($1204|0),($1205|0),-683901,-1)|0); + $1302 = (___muldi3(($1214|0),($1215|0),666643,0)|0); $1303 = tempRet0; - $1304 = (_i64Add(($1038|0),($1039|0),($1220|0),($1221|0))|0); + $1304 = (___muldi3(($1214|0),($1215|0),470296,0)|0); $1305 = tempRet0; - $1306 = (_i64Subtract(($1304|0),($1305|0),($1086|0),($1087|0))|0); + $1306 = (_i64Add(($1280|0),($1281|0),($1304|0),($1305|0))|0); $1307 = tempRet0; - $1308 = (_i64Add(($1306|0),($1307|0),($1244|0),($1245|0))|0); + $1308 = (___muldi3(($1214|0),($1215|0),654183,0)|0); $1309 = tempRet0; - $1310 = (_i64Add(($1308|0),($1309|0),($1264|0),($1265|0))|0); + $1310 = (_i64Add(($1284|0),($1285|0),($1308|0),($1309|0))|0); $1311 = tempRet0; - $1312 = (_i64Add(($1310|0),($1311|0),($1288|0),($1289|0))|0); + $1312 = (___muldi3(($1214|0),($1215|0),-997805,-1)|0); $1313 = tempRet0; - $1314 = (_i64Add(($1312|0),($1313|0),($1302|0),($1303|0))|0); + $1314 = (_i64Add(($1288|0),($1289|0),($1312|0),($1313|0))|0); $1315 = tempRet0; - $1316 = (___muldi3(($1190|0),($1191|0),666643,0)|0); + $1316 = (___muldi3(($1214|0),($1215|0),136657,0)|0); $1317 = tempRet0; - $1318 = (_i64Add(($1316|0),($1317|0),($632|0),($633|0))|0); + $1318 = (_i64Add(($1292|0),($1293|0),($1316|0),($1317|0))|0); $1319 = tempRet0; - $1320 = (___muldi3(($1190|0),($1191|0),470296,0)|0); + $1320 = (___muldi3(($1214|0),($1215|0),-683901,-1)|0); $1321 = tempRet0; - $1322 = (___muldi3(($1190|0),($1191|0),654183,0)|0); + $1322 = (_i64Add(($1296|0),($1297|0),($1320|0),($1321|0))|0); $1323 = tempRet0; - $1324 = (_i64Add(($858|0),($859|0),($216|0),($217|0))|0); + $1324 = (___muldi3(($1218|0),($1219|0),666643,0)|0); $1325 = tempRet0; - $1326 = (_i64Subtract(($1324|0),($1325|0),($648|0),($649|0))|0); + $1326 = (___muldi3(($1218|0),($1219|0),470296,0)|0); $1327 = tempRet0; - $1328 = (_i64Add(($1326|0),($1327|0),($1322|0),($1323|0))|0); + $1328 = (___muldi3(($1218|0),($1219|0),654183,0)|0); $1329 = tempRet0; - $1330 = (_i64Add(($1328|0),($1329|0),($1280|0),($1281|0))|0); + $1330 = (_i64Add(($1306|0),($1307|0),($1328|0),($1329|0))|0); $1331 = tempRet0; - $1332 = (_i64Add(($1330|0),($1331|0),($1294|0),($1295|0))|0); + $1332 = (___muldi3(($1218|0),($1219|0),-997805,-1)|0); $1333 = tempRet0; - $1334 = (___muldi3(($1190|0),($1191|0),-997805,-1)|0); + $1334 = (_i64Add(($1310|0),($1311|0),($1332|0),($1333|0))|0); $1335 = tempRet0; - $1336 = (___muldi3(($1190|0),($1191|0),136657,0)|0); + $1336 = (___muldi3(($1218|0),($1219|0),136657,0)|0); $1337 = tempRet0; - $1338 = (_i64Add(($1258|0),($1259|0),($1336|0),($1337|0))|0); + $1338 = (_i64Add(($1314|0),($1315|0),($1336|0),($1337|0))|0); $1339 = tempRet0; - $1340 = (_i64Add(($1338|0),($1339|0),($1284|0),($1285|0))|0); + $1340 = (___muldi3(($1218|0),($1219|0),-683901,-1)|0); $1341 = tempRet0; - $1342 = (_i64Add(($1340|0),($1341|0),($1298|0),($1299|0))|0); + $1342 = (_i64Add(($1318|0),($1319|0),($1340|0),($1341|0))|0); $1343 = tempRet0; - $1344 = (___muldi3(($1190|0),($1191|0),-683901,-1)|0); + $1344 = (___muldi3(($1204|0),($1205|0),666643,0)|0); $1345 = tempRet0; - $1346 = (_i64Add(($1318|0),($1319|0),1048576,0)|0); + $1346 = (_i64Add(($1344|0),($1345|0),($632|0),($633|0))|0); $1347 = tempRet0; - $1348 = (_bitshift64Ashr(($1346|0),($1347|0),21)|0); + $1348 = (___muldi3(($1204|0),($1205|0),470296,0)|0); $1349 = tempRet0; - $1350 = (_i64Add(($862|0),($863|0),($1320|0),($1321|0))|0); + $1350 = (___muldi3(($1204|0),($1205|0),654183,0)|0); $1351 = tempRet0; - $1352 = (_i64Add(($1350|0),($1351|0),($1292|0),($1293|0))|0); + $1352 = (_i64Add(($866|0),($867|0),($216|0),($217|0))|0); $1353 = tempRet0; - $1354 = (_i64Add(($1352|0),($1353|0),($1348|0),($1349|0))|0); + $1354 = (_i64Subtract(($1352|0),($1353|0),($648|0),($649|0))|0); $1355 = tempRet0; - $1356 = (_bitshift64Shl(($1348|0),($1349|0),21)|0); + $1356 = (_i64Add(($1354|0),($1355|0),($1302|0),($1303|0))|0); $1357 = tempRet0; - $1358 = (_i64Subtract(($1318|0),($1319|0),($1356|0),($1357|0))|0); + $1358 = (_i64Add(($1356|0),($1357|0),($1350|0),($1351|0))|0); $1359 = tempRet0; - $1360 = (_i64Add(($1332|0),($1333|0),1048576,0)|0); + $1360 = (_i64Add(($1358|0),($1359|0),($1326|0),($1327|0))|0); $1361 = tempRet0; - $1362 = (_bitshift64Ashr(($1360|0),($1361|0),21)|0); + $1362 = (___muldi3(($1204|0),($1205|0),-997805,-1)|0); $1363 = tempRet0; - $1364 = (_i64Add(($1254|0),($1255|0),($1334|0),($1335|0))|0); + $1364 = (_i64Add(($1330|0),($1331|0),($1362|0),($1363|0))|0); $1365 = tempRet0; - $1366 = (_i64Add(($1364|0),($1365|0),($1282|0),($1283|0))|0); + $1366 = (___muldi3(($1204|0),($1205|0),136657,0)|0); $1367 = tempRet0; - $1368 = (_i64Add(($1366|0),($1367|0),($1296|0),($1297|0))|0); + $1368 = (_i64Add(($1334|0),($1335|0),($1366|0),($1367|0))|0); $1369 = tempRet0; - $1370 = (_i64Add(($1368|0),($1369|0),($1362|0),($1363|0))|0); + $1370 = (___muldi3(($1204|0),($1205|0),-683901,-1)|0); $1371 = tempRet0; - $1372 = (_bitshift64Shl(($1362|0),($1363|0),21)|0); + $1372 = (_i64Add(($1338|0),($1339|0),($1370|0),($1371|0))|0); $1373 = tempRet0; - $1374 = (_i64Add(($1342|0),($1343|0),1048576,0)|0); + $1374 = (_i64Add(($1346|0),($1347|0),1048576,0)|0); $1375 = tempRet0; $1376 = (_bitshift64Ashr(($1374|0),($1375|0),21)|0); $1377 = tempRet0; - $1378 = (_i64Add(($1262|0),($1263|0),($1344|0),($1345|0))|0); + $1378 = (_i64Add(($870|0),($871|0),($1348|0),($1349|0))|0); $1379 = tempRet0; - $1380 = (_i64Add(($1378|0),($1379|0),($1286|0),($1287|0))|0); + $1380 = (_i64Add(($1378|0),($1379|0),($1324|0),($1325|0))|0); $1381 = tempRet0; - $1382 = (_i64Add(($1380|0),($1381|0),($1300|0),($1301|0))|0); + $1382 = (_i64Add(($1380|0),($1381|0),($1376|0),($1377|0))|0); $1383 = tempRet0; - $1384 = (_i64Add(($1382|0),($1383|0),($1376|0),($1377|0))|0); + $1384 = (_bitshift64Shl(($1376|0),($1377|0),21)|0); $1385 = tempRet0; - $1386 = (_bitshift64Shl(($1376|0),($1377|0),21)|0); + $1386 = (_i64Subtract(($1346|0),($1347|0),($1384|0),($1385|0))|0); $1387 = tempRet0; - $1388 = (_i64Add(($1314|0),($1315|0),1048576,0)|0); + $1388 = (_i64Add(($1360|0),($1361|0),1048576,0)|0); $1389 = tempRet0; $1390 = (_bitshift64Ashr(($1388|0),($1389|0),21)|0); $1391 = tempRet0; - $1392 = (_i64Add(($1084|0),($1085|0),($1222|0),($1223|0))|0); + $1392 = (_i64Add(($1390|0),($1391|0),($1364|0),($1365|0))|0); $1393 = tempRet0; - $1394 = (_i64Add(($1392|0),($1393|0),($1246|0),($1247|0))|0); + $1394 = (_bitshift64Shl(($1390|0),($1391|0),21)|0); $1395 = tempRet0; - $1396 = (_i64Subtract(($1394|0),($1395|0),($1178|0),($1179|0))|0); + $1396 = (_i64Add(($1368|0),($1369|0),1048576,0)|0); $1397 = tempRet0; - $1398 = (_i64Add(($1396|0),($1397|0),($1266|0),($1267|0))|0); + $1398 = (_bitshift64Ashr(($1396|0),($1397|0),21)|0); $1399 = tempRet0; - $1400 = (_i64Add(($1398|0),($1399|0),($1290|0),($1291|0))|0); + $1400 = (_i64Add(($1398|0),($1399|0),($1372|0),($1373|0))|0); $1401 = tempRet0; - $1402 = (_i64Add(($1400|0),($1401|0),($1390|0),($1391|0))|0); + $1402 = (_bitshift64Shl(($1398|0),($1399|0),21)|0); $1403 = tempRet0; - $1404 = (_bitshift64Shl(($1390|0),($1391|0),21)|0); + $1404 = (_i64Add(($1342|0),($1343|0),1048576,0)|0); $1405 = tempRet0; - $1406 = (_i64Subtract(($1314|0),($1315|0),($1404|0),($1405|0))|0); + $1406 = (_bitshift64Ashr(($1404|0),($1405|0),21)|0); $1407 = tempRet0; - $1408 = (_i64Add(($1278|0),($1279|0),1048576,0)|0); + $1408 = (_i64Add(($1406|0),($1407|0),($1322|0),($1323|0))|0); $1409 = tempRet0; - $1410 = (_bitshift64Ashr(($1408|0),($1409|0),21)|0); + $1410 = (_bitshift64Shl(($1406|0),($1407|0),21)|0); $1411 = tempRet0; - $1412 = (_i64Add(($1102|0),($1103|0),($1226|0),($1227|0))|0); + $1412 = (_i64Subtract(($1342|0),($1343|0),($1410|0),($1411|0))|0); $1413 = tempRet0; - $1414 = (_i64Add(($1412|0),($1413|0),($1250|0),($1251|0))|0); + $1414 = (_i64Add(($1300|0),($1301|0),1048576,0)|0); $1415 = tempRet0; - $1416 = (_i64Subtract(($1414|0),($1415|0),($1184|0),($1185|0))|0); + $1416 = (_bitshift64Ashr(($1414|0),($1415|0),21)|0); $1417 = tempRet0; - $1418 = (_i64Add(($1416|0),($1417|0),($1410|0),($1411|0))|0); + $1418 = (_i64Add(($1276|0),($1277|0),($1416|0),($1417|0))|0); $1419 = tempRet0; - $1420 = (_bitshift64Shl(($1410|0),($1411|0),21)|0); + $1420 = (_bitshift64Shl(($1416|0),($1417|0),21)|0); $1421 = tempRet0; - $1422 = (_i64Subtract(($1278|0),($1279|0),($1420|0),($1421|0))|0); + $1422 = (_i64Subtract(($1300|0),($1301|0),($1420|0),($1421|0))|0); $1423 = tempRet0; - $1424 = (_i64Add(($1234|0),($1235|0),1048576,0)|0); + $1424 = (_i64Add(($1252|0),($1253|0),1048576,0)|0); $1425 = tempRet0; $1426 = (_bitshift64Ashr(($1424|0),($1425|0),21)|0); $1427 = tempRet0; - $1428 = (_i64Add(($1194|0),($1195|0),($1426|0),($1427|0))|0); + $1428 = (_i64Add(($1208|0),($1209|0),($1426|0),($1427|0))|0); $1429 = tempRet0; $1430 = (_bitshift64Shl(($1426|0),($1427|0),21)|0); $1431 = tempRet0; - $1432 = (_i64Subtract(($1234|0),($1235|0),($1430|0),($1431|0))|0); + $1432 = (_i64Add(($1382|0),($1383|0),1048576,0)|0); $1433 = tempRet0; - $1434 = (_i64Add(($1354|0),($1355|0),1048576,0)|0); + $1434 = (_bitshift64Ashr(($1432|0),($1433|0),21)|0); $1435 = tempRet0; - $1436 = (_bitshift64Ashr(($1434|0),($1435|0),21)|0); + $1436 = (_bitshift64Shl(($1434|0),($1435|0),21)|0); $1437 = tempRet0; - $1438 = (_bitshift64Shl(($1436|0),($1437|0),21)|0); + $1438 = (_i64Add(($1392|0),($1393|0),1048576,0)|0); $1439 = tempRet0; - $1440 = (_i64Add(($1370|0),($1371|0),1048576,0)|0); + $1440 = (_bitshift64Ashr(($1438|0),($1439|0),21)|0); $1441 = tempRet0; - $1442 = (_bitshift64Ashr(($1440|0),($1441|0),21)|0); + $1442 = (_bitshift64Shl(($1440|0),($1441|0),21)|0); $1443 = tempRet0; - $1444 = (_bitshift64Shl(($1442|0),($1443|0),21)|0); + $1444 = (_i64Subtract(($1392|0),($1393|0),($1442|0),($1443|0))|0); $1445 = tempRet0; - $1446 = (_i64Add(($1384|0),($1385|0),1048576,0)|0); + $1446 = (_i64Add(($1400|0),($1401|0),1048576,0)|0); $1447 = tempRet0; $1448 = (_bitshift64Ashr(($1446|0),($1447|0),21)|0); $1449 = tempRet0; - $1450 = (_i64Add(($1406|0),($1407|0),($1448|0),($1449|0))|0); + $1450 = (_i64Add(($1412|0),($1413|0),($1448|0),($1449|0))|0); $1451 = tempRet0; $1452 = (_bitshift64Shl(($1448|0),($1449|0),21)|0); $1453 = tempRet0; - $1454 = (_i64Add(($1402|0),($1403|0),1048576,0)|0); + $1454 = (_i64Subtract(($1400|0),($1401|0),($1452|0),($1453|0))|0); $1455 = tempRet0; - $1456 = (_bitshift64Ashr(($1454|0),($1455|0),21)|0); + $1456 = (_i64Add(($1408|0),($1409|0),1048576,0)|0); $1457 = tempRet0; - $1458 = (_i64Add(($1422|0),($1423|0),($1456|0),($1457|0))|0); + $1458 = (_bitshift64Ashr(($1456|0),($1457|0),21)|0); $1459 = tempRet0; - $1460 = (_bitshift64Shl(($1456|0),($1457|0),21)|0); + $1460 = (_i64Add(($1422|0),($1423|0),($1458|0),($1459|0))|0); $1461 = tempRet0; - $1462 = (_i64Subtract(($1402|0),($1403|0),($1460|0),($1461|0))|0); + $1462 = (_bitshift64Shl(($1458|0),($1459|0),21)|0); $1463 = tempRet0; - $1464 = (_i64Add(($1418|0),($1419|0),1048576,0)|0); + $1464 = (_i64Subtract(($1408|0),($1409|0),($1462|0),($1463|0))|0); $1465 = tempRet0; - $1466 = (_bitshift64Ashr(($1464|0),($1465|0),21)|0); + $1466 = (_i64Add(($1418|0),($1419|0),1048576,0)|0); $1467 = tempRet0; - $1468 = (_i64Add(($1432|0),($1433|0),($1466|0),($1467|0))|0); + $1468 = (_bitshift64Ashr(($1466|0),($1467|0),21)|0); $1469 = tempRet0; - $1470 = (_bitshift64Shl(($1466|0),($1467|0),21)|0); + $1470 = (_bitshift64Shl(($1468|0),($1469|0),21)|0); $1471 = tempRet0; $1472 = (_i64Subtract(($1418|0),($1419|0),($1470|0),($1471|0))|0); $1473 = tempRet0; @@ -16476,7 +17237,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1481 = tempRet0; $1482 = (___muldi3(($1476|0),($1477|0),666643,0)|0); $1483 = tempRet0; - $1484 = (_i64Add(($1358|0),($1359|0),($1482|0),($1483|0))|0); + $1484 = (_i64Add(($1386|0),($1387|0),($1482|0),($1483|0))|0); $1485 = tempRet0; $1486 = (___muldi3(($1476|0),($1477|0),470296,0)|0); $1487 = tempRet0; @@ -16484,55 +17245,55 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1489 = tempRet0; $1490 = (___muldi3(($1476|0),($1477|0),-997805,-1)|0); $1491 = tempRet0; - $1492 = (___muldi3(($1476|0),($1477|0),136657,0)|0); + $1492 = (_i64Add(($1444|0),($1445|0),($1490|0),($1491|0))|0); $1493 = tempRet0; - $1494 = (___muldi3(($1476|0),($1477|0),-683901,-1)|0); + $1494 = (___muldi3(($1476|0),($1477|0),136657,0)|0); $1495 = tempRet0; - $1496 = (_bitshift64Ashr(($1484|0),($1485|0),21)|0); + $1496 = (___muldi3(($1476|0),($1477|0),-683901,-1)|0); $1497 = tempRet0; - $1498 = (_i64Add(($1486|0),($1487|0),($1354|0),($1355|0))|0); + $1498 = (_i64Add(($1454|0),($1455|0),($1496|0),($1497|0))|0); $1499 = tempRet0; - $1500 = (_i64Subtract(($1498|0),($1499|0),($1438|0),($1439|0))|0); + $1500 = (_bitshift64Ashr(($1484|0),($1485|0),21)|0); $1501 = tempRet0; - $1502 = (_i64Add(($1500|0),($1501|0),($1496|0),($1497|0))|0); + $1502 = (_i64Add(($1486|0),($1487|0),($1382|0),($1383|0))|0); $1503 = tempRet0; - $1504 = (_bitshift64Shl(($1496|0),($1497|0),21)|0); + $1504 = (_i64Subtract(($1502|0),($1503|0),($1436|0),($1437|0))|0); $1505 = tempRet0; - $1506 = (_i64Subtract(($1484|0),($1485|0),($1504|0),($1505|0))|0); + $1506 = (_i64Add(($1504|0),($1505|0),($1500|0),($1501|0))|0); $1507 = tempRet0; - $1508 = (_bitshift64Ashr(($1502|0),($1503|0),21)|0); + $1508 = (_bitshift64Shl(($1500|0),($1501|0),21)|0); $1509 = tempRet0; - $1510 = (_i64Add(($1488|0),($1489|0),($1332|0),($1333|0))|0); + $1510 = (_i64Subtract(($1484|0),($1485|0),($1508|0),($1509|0))|0); $1511 = tempRet0; - $1512 = (_i64Subtract(($1510|0),($1511|0),($1372|0),($1373|0))|0); + $1512 = (_bitshift64Ashr(($1506|0),($1507|0),21)|0); $1513 = tempRet0; - $1514 = (_i64Add(($1512|0),($1513|0),($1436|0),($1437|0))|0); + $1514 = (_i64Add(($1488|0),($1489|0),($1360|0),($1361|0))|0); $1515 = tempRet0; - $1516 = (_i64Add(($1514|0),($1515|0),($1508|0),($1509|0))|0); + $1516 = (_i64Subtract(($1514|0),($1515|0),($1394|0),($1395|0))|0); $1517 = tempRet0; - $1518 = (_bitshift64Shl(($1508|0),($1509|0),21)|0); + $1518 = (_i64Add(($1516|0),($1517|0),($1434|0),($1435|0))|0); $1519 = tempRet0; - $1520 = (_i64Subtract(($1502|0),($1503|0),($1518|0),($1519|0))|0); + $1520 = (_i64Add(($1518|0),($1519|0),($1512|0),($1513|0))|0); $1521 = tempRet0; - $1522 = (_bitshift64Ashr(($1516|0),($1517|0),21)|0); + $1522 = (_bitshift64Shl(($1512|0),($1513|0),21)|0); $1523 = tempRet0; - $1524 = (_i64Add(($1370|0),($1371|0),($1490|0),($1491|0))|0); + $1524 = (_i64Subtract(($1506|0),($1507|0),($1522|0),($1523|0))|0); $1525 = tempRet0; - $1526 = (_i64Subtract(($1524|0),($1525|0),($1444|0),($1445|0))|0); + $1526 = (_bitshift64Ashr(($1520|0),($1521|0),21)|0); $1527 = tempRet0; - $1528 = (_i64Add(($1526|0),($1527|0),($1522|0),($1523|0))|0); + $1528 = (_i64Add(($1526|0),($1527|0),($1492|0),($1493|0))|0); $1529 = tempRet0; - $1530 = (_bitshift64Shl(($1522|0),($1523|0),21)|0); + $1530 = (_bitshift64Shl(($1526|0),($1527|0),21)|0); $1531 = tempRet0; - $1532 = (_i64Subtract(($1516|0),($1517|0),($1530|0),($1531|0))|0); + $1532 = (_i64Subtract(($1520|0),($1521|0),($1530|0),($1531|0))|0); $1533 = tempRet0; $1534 = (_bitshift64Ashr(($1528|0),($1529|0),21)|0); $1535 = tempRet0; - $1536 = (_i64Add(($1492|0),($1493|0),($1342|0),($1343|0))|0); + $1536 = (_i64Add(($1494|0),($1495|0),($1368|0),($1369|0))|0); $1537 = tempRet0; - $1538 = (_i64Subtract(($1536|0),($1537|0),($1386|0),($1387|0))|0); + $1538 = (_i64Subtract(($1536|0),($1537|0),($1402|0),($1403|0))|0); $1539 = tempRet0; - $1540 = (_i64Add(($1538|0),($1539|0),($1442|0),($1443|0))|0); + $1540 = (_i64Add(($1538|0),($1539|0),($1440|0),($1441|0))|0); $1541 = tempRet0; $1542 = (_i64Add(($1540|0),($1541|0),($1534|0),($1535|0))|0); $1543 = tempRet0; @@ -16542,55 +17303,55 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1547 = tempRet0; $1548 = (_bitshift64Ashr(($1542|0),($1543|0),21)|0); $1549 = tempRet0; - $1550 = (_i64Add(($1384|0),($1385|0),($1494|0),($1495|0))|0); + $1550 = (_i64Add(($1548|0),($1549|0),($1498|0),($1499|0))|0); $1551 = tempRet0; - $1552 = (_i64Subtract(($1550|0),($1551|0),($1452|0),($1453|0))|0); + $1552 = (_bitshift64Shl(($1548|0),($1549|0),21)|0); $1553 = tempRet0; - $1554 = (_i64Add(($1552|0),($1553|0),($1548|0),($1549|0))|0); + $1554 = (_i64Subtract(($1542|0),($1543|0),($1552|0),($1553|0))|0); $1555 = tempRet0; - $1556 = (_bitshift64Shl(($1548|0),($1549|0),21)|0); + $1556 = (_bitshift64Ashr(($1550|0),($1551|0),21)|0); $1557 = tempRet0; - $1558 = (_i64Subtract(($1542|0),($1543|0),($1556|0),($1557|0))|0); + $1558 = (_i64Add(($1450|0),($1451|0),($1556|0),($1557|0))|0); $1559 = tempRet0; - $1560 = (_bitshift64Ashr(($1554|0),($1555|0),21)|0); + $1560 = (_bitshift64Shl(($1556|0),($1557|0),21)|0); $1561 = tempRet0; - $1562 = (_i64Add(($1450|0),($1451|0),($1560|0),($1561|0))|0); + $1562 = (_i64Subtract(($1550|0),($1551|0),($1560|0),($1561|0))|0); $1563 = tempRet0; - $1564 = (_bitshift64Shl(($1560|0),($1561|0),21)|0); + $1564 = (_bitshift64Ashr(($1558|0),($1559|0),21)|0); $1565 = tempRet0; - $1566 = (_i64Subtract(($1554|0),($1555|0),($1564|0),($1565|0))|0); + $1566 = (_i64Add(($1564|0),($1565|0),($1464|0),($1465|0))|0); $1567 = tempRet0; - $1568 = (_bitshift64Ashr(($1562|0),($1563|0),21)|0); + $1568 = (_bitshift64Shl(($1564|0),($1565|0),21)|0); $1569 = tempRet0; - $1570 = (_i64Add(($1568|0),($1569|0),($1462|0),($1463|0))|0); + $1570 = (_i64Subtract(($1558|0),($1559|0),($1568|0),($1569|0))|0); $1571 = tempRet0; - $1572 = (_bitshift64Shl(($1568|0),($1569|0),21)|0); + $1572 = (_bitshift64Ashr(($1566|0),($1567|0),21)|0); $1573 = tempRet0; - $1574 = (_i64Subtract(($1562|0),($1563|0),($1572|0),($1573|0))|0); + $1574 = (_i64Add(($1460|0),($1461|0),($1572|0),($1573|0))|0); $1575 = tempRet0; - $1576 = (_bitshift64Ashr(($1570|0),($1571|0),21)|0); + $1576 = (_bitshift64Shl(($1572|0),($1573|0),21)|0); $1577 = tempRet0; - $1578 = (_i64Add(($1458|0),($1459|0),($1576|0),($1577|0))|0); + $1578 = (_i64Subtract(($1566|0),($1567|0),($1576|0),($1577|0))|0); $1579 = tempRet0; - $1580 = (_bitshift64Shl(($1576|0),($1577|0),21)|0); + $1580 = (_bitshift64Ashr(($1574|0),($1575|0),21)|0); $1581 = tempRet0; - $1582 = (_i64Subtract(($1570|0),($1571|0),($1580|0),($1581|0))|0); + $1582 = (_i64Add(($1580|0),($1581|0),($1472|0),($1473|0))|0); $1583 = tempRet0; - $1584 = (_bitshift64Ashr(($1578|0),($1579|0),21)|0); + $1584 = (_bitshift64Shl(($1580|0),($1581|0),21)|0); $1585 = tempRet0; - $1586 = (_i64Add(($1584|0),($1585|0),($1472|0),($1473|0))|0); + $1586 = (_i64Subtract(($1574|0),($1575|0),($1584|0),($1585|0))|0); $1587 = tempRet0; - $1588 = (_bitshift64Shl(($1584|0),($1585|0),21)|0); + $1588 = (_bitshift64Ashr(($1582|0),($1583|0),21)|0); $1589 = tempRet0; - $1590 = (_i64Subtract(($1578|0),($1579|0),($1588|0),($1589|0))|0); + $1590 = (_i64Add(($1468|0),($1469|0),($1252|0),($1253|0))|0); $1591 = tempRet0; - $1592 = (_bitshift64Ashr(($1586|0),($1587|0),21)|0); + $1592 = (_i64Subtract(($1590|0),($1591|0),($1430|0),($1431|0))|0); $1593 = tempRet0; - $1594 = (_i64Add(($1468|0),($1469|0),($1592|0),($1593|0))|0); + $1594 = (_i64Add(($1592|0),($1593|0),($1588|0),($1589|0))|0); $1595 = tempRet0; - $1596 = (_bitshift64Shl(($1592|0),($1593|0),21)|0); + $1596 = (_bitshift64Shl(($1588|0),($1589|0),21)|0); $1597 = tempRet0; - $1598 = (_i64Subtract(($1586|0),($1587|0),($1596|0),($1597|0))|0); + $1598 = (_i64Subtract(($1582|0),($1583|0),($1596|0),($1597|0))|0); $1599 = tempRet0; $1600 = (_bitshift64Ashr(($1594|0),($1595|0),21)|0); $1601 = tempRet0; @@ -16608,11 +17369,11 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1613 = tempRet0; $1614 = (___muldi3(($1608|0),($1609|0),666643,0)|0); $1615 = tempRet0; - $1616 = (_i64Add(($1614|0),($1615|0),($1506|0),($1507|0))|0); + $1616 = (_i64Add(($1614|0),($1615|0),($1510|0),($1511|0))|0); $1617 = tempRet0; $1618 = (___muldi3(($1608|0),($1609|0),470296,0)|0); $1619 = tempRet0; - $1620 = (_i64Add(($1520|0),($1521|0),($1618|0),($1619|0))|0); + $1620 = (_i64Add(($1524|0),($1525|0),($1618|0),($1619|0))|0); $1621 = tempRet0; $1622 = (___muldi3(($1608|0),($1609|0),654183,0)|0); $1623 = tempRet0; @@ -16624,11 +17385,11 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1629 = tempRet0; $1630 = (___muldi3(($1608|0),($1609|0),136657,0)|0); $1631 = tempRet0; - $1632 = (_i64Add(($1558|0),($1559|0),($1630|0),($1631|0))|0); + $1632 = (_i64Add(($1554|0),($1555|0),($1630|0),($1631|0))|0); $1633 = tempRet0; $1634 = (___muldi3(($1608|0),($1609|0),-683901,-1)|0); $1635 = tempRet0; - $1636 = (_i64Add(($1566|0),($1567|0),($1634|0),($1635|0))|0); + $1636 = (_i64Add(($1562|0),($1563|0),($1634|0),($1635|0))|0); $1637 = tempRet0; $1638 = (_bitshift64Ashr(($1616|0),($1617|0),21)|0); $1639 = tempRet0; @@ -16648,7 +17409,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1653 = tempRet0; $1654 = (_bitshift64Ashr(($1648|0),($1649|0),21)|0); $1655 = tempRet0; - $1656 = (_i64Add(($1628|0),($1629|0),($1654|0),($1655|0))|0); + $1656 = (_i64Add(($1654|0),($1655|0),($1628|0),($1629|0))|0); $1657 = tempRet0; $1658 = (_bitshift64Shl(($1654|0),($1655|0),21)|0); $1659 = tempRet0; @@ -16664,7 +17425,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1669 = tempRet0; $1670 = (_bitshift64Ashr(($1664|0),($1665|0),21)|0); $1671 = tempRet0; - $1672 = (_i64Add(($1636|0),($1637|0),($1670|0),($1671|0))|0); + $1672 = (_i64Add(($1670|0),($1671|0),($1636|0),($1637|0))|0); $1673 = tempRet0; $1674 = (_bitshift64Shl(($1670|0),($1671|0),21)|0); $1675 = tempRet0; @@ -16672,7 +17433,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1677 = tempRet0; $1678 = (_bitshift64Ashr(($1672|0),($1673|0),21)|0); $1679 = tempRet0; - $1680 = (_i64Add(($1678|0),($1679|0),($1574|0),($1575|0))|0); + $1680 = (_i64Add(($1678|0),($1679|0),($1570|0),($1571|0))|0); $1681 = tempRet0; $1682 = (_bitshift64Shl(($1678|0),($1679|0),21)|0); $1683 = tempRet0; @@ -16680,7 +17441,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1685 = tempRet0; $1686 = (_bitshift64Ashr(($1680|0),($1681|0),21)|0); $1687 = tempRet0; - $1688 = (_i64Add(($1686|0),($1687|0),($1582|0),($1583|0))|0); + $1688 = (_i64Add(($1686|0),($1687|0),($1578|0),($1579|0))|0); $1689 = tempRet0; $1690 = (_bitshift64Shl(($1686|0),($1687|0),21)|0); $1691 = tempRet0; @@ -16688,7 +17449,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1693 = tempRet0; $1694 = (_bitshift64Ashr(($1688|0),($1689|0),21)|0); $1695 = tempRet0; - $1696 = (_i64Add(($1694|0),($1695|0),($1590|0),($1591|0))|0); + $1696 = (_i64Add(($1694|0),($1695|0),($1586|0),($1587|0))|0); $1697 = tempRet0; $1698 = (_bitshift64Shl(($1694|0),($1695|0),21)|0); $1699 = tempRet0; @@ -16723,7 +17484,7 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1727 = (_bitshift64Lshr(($1644|0),($1645|0),8)|0); $1728 = tempRet0; $1729 = $1727&255; - $1730 = (($s) + 1|0); + $1730 = ((($s)) + 1|0); HEAP8[$1730>>0] = $1729; $1731 = (_bitshift64Lshr(($1644|0),($1645|0),16)|0); $1732 = tempRet0; @@ -16732,17 +17493,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1735 = $1733 | $1731; $1734 | $1732; $1736 = $1735&255; - $1737 = (($s) + 2|0); + $1737 = ((($s)) + 2|0); HEAP8[$1737>>0] = $1736; $1738 = (_bitshift64Lshr(($1652|0),($1653|0),3)|0); $1739 = tempRet0; $1740 = $1738&255; - $1741 = (($s) + 3|0); + $1741 = ((($s)) + 3|0); HEAP8[$1741>>0] = $1740; $1742 = (_bitshift64Lshr(($1652|0),($1653|0),11)|0); $1743 = tempRet0; $1744 = $1742&255; - $1745 = (($s) + 4|0); + $1745 = ((($s)) + 4|0); HEAP8[$1745>>0] = $1744; $1746 = (_bitshift64Lshr(($1652|0),($1653|0),19)|0); $1747 = tempRet0; @@ -16751,12 +17512,12 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1750 = $1748 | $1746; $1749 | $1747; $1751 = $1750&255; - $1752 = (($s) + 5|0); + $1752 = ((($s)) + 5|0); HEAP8[$1752>>0] = $1751; $1753 = (_bitshift64Lshr(($1660|0),($1661|0),6)|0); $1754 = tempRet0; $1755 = $1753&255; - $1756 = (($s) + 6|0); + $1756 = ((($s)) + 6|0); HEAP8[$1756>>0] = $1755; $1757 = (_bitshift64Lshr(($1660|0),($1661|0),14)|0); $1758 = tempRet0; @@ -16765,17 +17526,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1761 = $1759 | $1757; $1760 | $1758; $1762 = $1761&255; - $1763 = (($s) + 7|0); + $1763 = ((($s)) + 7|0); HEAP8[$1763>>0] = $1762; $1764 = (_bitshift64Lshr(($1668|0),($1669|0),1)|0); $1765 = tempRet0; $1766 = $1764&255; - $1767 = (($s) + 8|0); + $1767 = ((($s)) + 8|0); HEAP8[$1767>>0] = $1766; $1768 = (_bitshift64Lshr(($1668|0),($1669|0),9)|0); $1769 = tempRet0; $1770 = $1768&255; - $1771 = (($s) + 9|0); + $1771 = ((($s)) + 9|0); HEAP8[$1771>>0] = $1770; $1772 = (_bitshift64Lshr(($1668|0),($1669|0),17)|0); $1773 = tempRet0; @@ -16784,17 +17545,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1776 = $1774 | $1772; $1775 | $1773; $1777 = $1776&255; - $1778 = (($s) + 10|0); + $1778 = ((($s)) + 10|0); HEAP8[$1778>>0] = $1777; $1779 = (_bitshift64Lshr(($1676|0),($1677|0),4)|0); $1780 = tempRet0; $1781 = $1779&255; - $1782 = (($s) + 11|0); + $1782 = ((($s)) + 11|0); HEAP8[$1782>>0] = $1781; $1783 = (_bitshift64Lshr(($1676|0),($1677|0),12)|0); $1784 = tempRet0; $1785 = $1783&255; - $1786 = (($s) + 12|0); + $1786 = ((($s)) + 12|0); HEAP8[$1786>>0] = $1785; $1787 = (_bitshift64Lshr(($1676|0),($1677|0),20)|0); $1788 = tempRet0; @@ -16803,12 +17564,12 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1791 = $1789 | $1787; $1790 | $1788; $1792 = $1791&255; - $1793 = (($s) + 13|0); + $1793 = ((($s)) + 13|0); HEAP8[$1793>>0] = $1792; $1794 = (_bitshift64Lshr(($1684|0),($1685|0),7)|0); $1795 = tempRet0; $1796 = $1794&255; - $1797 = (($s) + 14|0); + $1797 = ((($s)) + 14|0); HEAP8[$1797>>0] = $1796; $1798 = (_bitshift64Lshr(($1684|0),($1685|0),15)|0); $1799 = tempRet0; @@ -16817,17 +17578,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1802 = $1800 | $1798; $1801 | $1799; $1803 = $1802&255; - $1804 = (($s) + 15|0); + $1804 = ((($s)) + 15|0); HEAP8[$1804>>0] = $1803; $1805 = (_bitshift64Lshr(($1692|0),($1693|0),2)|0); $1806 = tempRet0; $1807 = $1805&255; - $1808 = (($s) + 16|0); + $1808 = ((($s)) + 16|0); HEAP8[$1808>>0] = $1807; $1809 = (_bitshift64Lshr(($1692|0),($1693|0),10)|0); $1810 = tempRet0; $1811 = $1809&255; - $1812 = (($s) + 17|0); + $1812 = ((($s)) + 17|0); HEAP8[$1812>>0] = $1811; $1813 = (_bitshift64Lshr(($1692|0),($1693|0),18)|0); $1814 = tempRet0; @@ -16836,25 +17597,25 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1817 = $1815 | $1813; $1816 | $1814; $1818 = $1817&255; - $1819 = (($s) + 18|0); + $1819 = ((($s)) + 18|0); HEAP8[$1819>>0] = $1818; $1820 = (_bitshift64Lshr(($1700|0),($1701|0),5)|0); $1821 = tempRet0; $1822 = $1820&255; - $1823 = (($s) + 19|0); + $1823 = ((($s)) + 19|0); HEAP8[$1823>>0] = $1822; $1824 = (_bitshift64Lshr(($1700|0),($1701|0),13)|0); $1825 = tempRet0; $1826 = $1824&255; - $1827 = (($s) + 20|0); + $1827 = ((($s)) + 20|0); HEAP8[$1827>>0] = $1826; $1828 = $1708&255; - $1829 = (($s) + 21|0); + $1829 = ((($s)) + 21|0); HEAP8[$1829>>0] = $1828; $1830 = (_bitshift64Lshr(($1708|0),($1709|0),8)|0); $1831 = tempRet0; $1832 = $1830&255; - $1833 = (($s) + 22|0); + $1833 = ((($s)) + 22|0); HEAP8[$1833>>0] = $1832; $1834 = (_bitshift64Lshr(($1708|0),($1709|0),16)|0); $1835 = tempRet0; @@ -16863,17 +17624,17 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1838 = $1836 | $1834; $1837 | $1835; $1839 = $1838&255; - $1840 = (($s) + 23|0); + $1840 = ((($s)) + 23|0); HEAP8[$1840>>0] = $1839; $1841 = (_bitshift64Lshr(($1716|0),($1717|0),3)|0); $1842 = tempRet0; $1843 = $1841&255; - $1844 = (($s) + 24|0); + $1844 = ((($s)) + 24|0); HEAP8[$1844>>0] = $1843; $1845 = (_bitshift64Lshr(($1716|0),($1717|0),11)|0); $1846 = tempRet0; $1847 = $1845&255; - $1848 = (($s) + 25|0); + $1848 = ((($s)) + 25|0); HEAP8[$1848>>0] = $1847; $1849 = (_bitshift64Lshr(($1716|0),($1717|0),19)|0); $1850 = tempRet0; @@ -16882,12 +17643,12 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1853 = $1851 | $1849; $1852 | $1850; $1854 = $1853&255; - $1855 = (($s) + 26|0); + $1855 = ((($s)) + 26|0); HEAP8[$1855>>0] = $1854; $1856 = (_bitshift64Lshr(($1724|0),($1725|0),6)|0); $1857 = tempRet0; $1858 = $1856&255; - $1859 = (($s) + 27|0); + $1859 = ((($s)) + 27|0); HEAP8[$1859>>0] = $1858; $1860 = (_bitshift64Lshr(($1724|0),($1725|0),14)|0); $1861 = tempRet0; @@ -16896,24 +17657,24 @@ function _crypto_sign_ed25519_ref10_sc_muladd($s,$a,$b,$c) { $1864 = $1860 | $1862; $1861 | $1863; $1865 = $1864&255; - $1866 = (($s) + 28|0); + $1866 = ((($s)) + 28|0); HEAP8[$1866>>0] = $1865; $1867 = (_bitshift64Lshr(($1720|0),($1721|0),1)|0); $1868 = tempRet0; $1869 = $1867&255; - $1870 = (($s) + 29|0); + $1870 = ((($s)) + 29|0); HEAP8[$1870>>0] = $1869; $1871 = (_bitshift64Lshr(($1720|0),($1721|0),9)|0); $1872 = tempRet0; $1873 = $1871&255; - $1874 = (($s) + 30|0); + $1874 = ((($s)) + 30|0); HEAP8[$1874>>0] = $1873; $1875 = (_bitshift64Lshr(($1720|0),($1721|0),17)|0); $1876 = tempRet0; $1877 = $1875&255; - $1878 = (($s) + 31|0); + $1878 = ((($s)) + 31|0); HEAP8[$1878>>0] = $1877; - STACKTOP = sp;return; + return; } function _load_347($in) { $in = $in|0; @@ -16921,21 +17682,21 @@ function _load_347($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); + tempRet0 = ($14); + return ($13|0); } function _load_448($in) { $in = $in|0; @@ -16944,28 +17705,28 @@ function _load_448($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - $15 = (($in) + 3|0); + $15 = ((($in)) + 3|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (_bitshift64Shl(($17|0),0,24)|0); $19 = tempRet0; $20 = $13 | $18; $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); + tempRet0 = ($21); + return ($20|0); } function _crypto_sign_ed25519_ref10_sc_reduce($s) { $s = $s|0; @@ -17025,334 +17786,334 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $0 = (_load_351($s)|0); $1 = tempRet0; $2 = $0 & 2097151; - $3 = (($s) + 2|0); + $3 = ((($s)) + 2|0); $4 = (_load_452($3)|0); $5 = tempRet0; $6 = (_bitshift64Lshr(($4|0),($5|0),5)|0); $7 = tempRet0; $8 = $6 & 2097151; - $9 = (($s) + 5|0); + $9 = ((($s)) + 5|0); $10 = (_load_351($9)|0); $11 = tempRet0; $12 = (_bitshift64Lshr(($10|0),($11|0),2)|0); $13 = tempRet0; $14 = $12 & 2097151; - $15 = (($s) + 7|0); + $15 = ((($s)) + 7|0); $16 = (_load_452($15)|0); $17 = tempRet0; $18 = (_bitshift64Lshr(($16|0),($17|0),7)|0); $19 = tempRet0; $20 = $18 & 2097151; - $21 = (($s) + 10|0); + $21 = ((($s)) + 10|0); $22 = (_load_452($21)|0); $23 = tempRet0; $24 = (_bitshift64Lshr(($22|0),($23|0),4)|0); $25 = tempRet0; $26 = $24 & 2097151; - $27 = (($s) + 13|0); + $27 = ((($s)) + 13|0); $28 = (_load_351($27)|0); $29 = tempRet0; $30 = (_bitshift64Lshr(($28|0),($29|0),1)|0); $31 = tempRet0; $32 = $30 & 2097151; - $33 = (($s) + 15|0); + $33 = ((($s)) + 15|0); $34 = (_load_452($33)|0); $35 = tempRet0; $36 = (_bitshift64Lshr(($34|0),($35|0),6)|0); $37 = tempRet0; $38 = $36 & 2097151; - $39 = (($s) + 18|0); + $39 = ((($s)) + 18|0); $40 = (_load_351($39)|0); $41 = tempRet0; $42 = (_bitshift64Lshr(($40|0),($41|0),3)|0); $43 = tempRet0; $44 = $42 & 2097151; - $45 = (($s) + 21|0); + $45 = ((($s)) + 21|0); $46 = (_load_351($45)|0); $47 = tempRet0; $48 = $46 & 2097151; - $49 = (($s) + 23|0); + $49 = ((($s)) + 23|0); $50 = (_load_452($49)|0); $51 = tempRet0; $52 = (_bitshift64Lshr(($50|0),($51|0),5)|0); $53 = tempRet0; $54 = $52 & 2097151; - $55 = (($s) + 26|0); + $55 = ((($s)) + 26|0); $56 = (_load_351($55)|0); $57 = tempRet0; $58 = (_bitshift64Lshr(($56|0),($57|0),2)|0); $59 = tempRet0; $60 = $58 & 2097151; - $61 = (($s) + 28|0); + $61 = ((($s)) + 28|0); $62 = (_load_452($61)|0); $63 = tempRet0; $64 = (_bitshift64Lshr(($62|0),($63|0),7)|0); $65 = tempRet0; $66 = $64 & 2097151; - $67 = (($s) + 31|0); + $67 = ((($s)) + 31|0); $68 = (_load_452($67)|0); $69 = tempRet0; $70 = (_bitshift64Lshr(($68|0),($69|0),4)|0); $71 = tempRet0; $72 = $70 & 2097151; - $73 = (($s) + 34|0); + $73 = ((($s)) + 34|0); $74 = (_load_351($73)|0); $75 = tempRet0; $76 = (_bitshift64Lshr(($74|0),($75|0),1)|0); $77 = tempRet0; $78 = $76 & 2097151; - $79 = (($s) + 36|0); + $79 = ((($s)) + 36|0); $80 = (_load_452($79)|0); $81 = tempRet0; $82 = (_bitshift64Lshr(($80|0),($81|0),6)|0); $83 = tempRet0; $84 = $82 & 2097151; - $85 = (($s) + 39|0); + $85 = ((($s)) + 39|0); $86 = (_load_351($85)|0); $87 = tempRet0; $88 = (_bitshift64Lshr(($86|0),($87|0),3)|0); $89 = tempRet0; $90 = $88 & 2097151; - $91 = (($s) + 42|0); + $91 = ((($s)) + 42|0); $92 = (_load_351($91)|0); $93 = tempRet0; $94 = $92 & 2097151; - $95 = (($s) + 44|0); + $95 = ((($s)) + 44|0); $96 = (_load_452($95)|0); $97 = tempRet0; $98 = (_bitshift64Lshr(($96|0),($97|0),5)|0); $99 = tempRet0; $100 = $98 & 2097151; - $101 = (($s) + 47|0); + $101 = ((($s)) + 47|0); $102 = (_load_351($101)|0); $103 = tempRet0; $104 = (_bitshift64Lshr(($102|0),($103|0),2)|0); $105 = tempRet0; $106 = $104 & 2097151; - $107 = (($s) + 49|0); + $107 = ((($s)) + 49|0); $108 = (_load_452($107)|0); $109 = tempRet0; $110 = (_bitshift64Lshr(($108|0),($109|0),7)|0); $111 = tempRet0; $112 = $110 & 2097151; - $113 = (($s) + 52|0); + $113 = ((($s)) + 52|0); $114 = (_load_452($113)|0); $115 = tempRet0; $116 = (_bitshift64Lshr(($114|0),($115|0),4)|0); $117 = tempRet0; $118 = $116 & 2097151; - $119 = (($s) + 55|0); + $119 = ((($s)) + 55|0); $120 = (_load_351($119)|0); $121 = tempRet0; $122 = (_bitshift64Lshr(($120|0),($121|0),1)|0); $123 = tempRet0; $124 = $122 & 2097151; - $125 = (($s) + 57|0); + $125 = ((($s)) + 57|0); $126 = (_load_452($125)|0); $127 = tempRet0; $128 = (_bitshift64Lshr(($126|0),($127|0),6)|0); $129 = tempRet0; $130 = $128 & 2097151; - $131 = (($s) + 60|0); + $131 = ((($s)) + 60|0); $132 = (_load_452($131)|0); $133 = tempRet0; $134 = (_bitshift64Lshr(($132|0),($133|0),3)|0); $135 = tempRet0; $136 = (___muldi3(($134|0),($135|0),666643,0)|0); $137 = tempRet0; - $138 = (___muldi3(($134|0),($135|0),470296,0)|0); + $138 = (_i64Add(($66|0),0,($136|0),($137|0))|0); $139 = tempRet0; - $140 = (___muldi3(($134|0),($135|0),654183,0)|0); + $140 = (___muldi3(($134|0),($135|0),470296,0)|0); $141 = tempRet0; - $142 = (___muldi3(($134|0),($135|0),-997805,-1)|0); + $142 = (_i64Add(($72|0),0,($140|0),($141|0))|0); $143 = tempRet0; - $144 = (___muldi3(($134|0),($135|0),136657,0)|0); + $144 = (___muldi3(($134|0),($135|0),654183,0)|0); $145 = tempRet0; - $146 = (_i64Add(($144|0),($145|0),($90|0),0)|0); + $146 = (_i64Add(($78|0),0,($144|0),($145|0))|0); $147 = tempRet0; - $148 = (___muldi3(($134|0),($135|0),-683901,-1)|0); + $148 = (___muldi3(($134|0),($135|0),-997805,-1)|0); $149 = tempRet0; - $150 = (_i64Add(($148|0),($149|0),($94|0),0)|0); + $150 = (_i64Add(($84|0),0,($148|0),($149|0))|0); $151 = tempRet0; - $152 = (___muldi3(($130|0),0,666643,0)|0); + $152 = (___muldi3(($134|0),($135|0),136657,0)|0); $153 = tempRet0; - $154 = (___muldi3(($130|0),0,470296,0)|0); + $154 = (_i64Add(($90|0),0,($152|0),($153|0))|0); $155 = tempRet0; - $156 = (___muldi3(($130|0),0,654183,0)|0); + $156 = (___muldi3(($134|0),($135|0),-683901,-1)|0); $157 = tempRet0; - $158 = (___muldi3(($130|0),0,-997805,-1)|0); + $158 = (_i64Add(($94|0),0,($156|0),($157|0))|0); $159 = tempRet0; - $160 = (___muldi3(($130|0),0,136657,0)|0); + $160 = (___muldi3(($130|0),0,666643,0)|0); $161 = tempRet0; - $162 = (___muldi3(($130|0),0,-683901,-1)|0); + $162 = (_i64Add(($60|0),0,($160|0),($161|0))|0); $163 = tempRet0; - $164 = (_i64Add(($146|0),($147|0),($162|0),($163|0))|0); + $164 = (___muldi3(($130|0),0,470296,0)|0); $165 = tempRet0; - $166 = (___muldi3(($124|0),0,666643,0)|0); + $166 = (_i64Add(($164|0),($165|0),($138|0),($139|0))|0); $167 = tempRet0; - $168 = (___muldi3(($124|0),0,470296,0)|0); + $168 = (___muldi3(($130|0),0,654183,0)|0); $169 = tempRet0; - $170 = (___muldi3(($124|0),0,654183,0)|0); + $170 = (_i64Add(($168|0),($169|0),($142|0),($143|0))|0); $171 = tempRet0; - $172 = (___muldi3(($124|0),0,-997805,-1)|0); + $172 = (___muldi3(($130|0),0,-997805,-1)|0); $173 = tempRet0; - $174 = (___muldi3(($124|0),0,136657,0)|0); + $174 = (_i64Add(($172|0),($173|0),($146|0),($147|0))|0); $175 = tempRet0; - $176 = (___muldi3(($124|0),0,-683901,-1)|0); + $176 = (___muldi3(($130|0),0,136657,0)|0); $177 = tempRet0; - $178 = (_i64Add(($176|0),($177|0),($84|0),0)|0); + $178 = (_i64Add(($176|0),($177|0),($150|0),($151|0))|0); $179 = tempRet0; - $180 = (_i64Add(($178|0),($179|0),($142|0),($143|0))|0); + $180 = (___muldi3(($130|0),0,-683901,-1)|0); $181 = tempRet0; - $182 = (_i64Add(($180|0),($181|0),($160|0),($161|0))|0); + $182 = (_i64Add(($154|0),($155|0),($180|0),($181|0))|0); $183 = tempRet0; - $184 = (___muldi3(($118|0),0,666643,0)|0); + $184 = (___muldi3(($124|0),0,666643,0)|0); $185 = tempRet0; - $186 = (___muldi3(($118|0),0,470296,0)|0); + $186 = (_i64Add(($54|0),0,($184|0),($185|0))|0); $187 = tempRet0; - $188 = (___muldi3(($118|0),0,654183,0)|0); + $188 = (___muldi3(($124|0),0,470296,0)|0); $189 = tempRet0; - $190 = (___muldi3(($118|0),0,-997805,-1)|0); + $190 = (_i64Add(($188|0),($189|0),($162|0),($163|0))|0); $191 = tempRet0; - $192 = (___muldi3(($118|0),0,136657,0)|0); + $192 = (___muldi3(($124|0),0,654183,0)|0); $193 = tempRet0; - $194 = (___muldi3(($118|0),0,-683901,-1)|0); + $194 = (_i64Add(($192|0),($193|0),($166|0),($167|0))|0); $195 = tempRet0; - $196 = (___muldi3(($112|0),0,666643,0)|0); + $196 = (___muldi3(($124|0),0,-997805,-1)|0); $197 = tempRet0; - $198 = (___muldi3(($112|0),0,470296,0)|0); + $198 = (_i64Add(($196|0),($197|0),($170|0),($171|0))|0); $199 = tempRet0; - $200 = (___muldi3(($112|0),0,654183,0)|0); + $200 = (___muldi3(($124|0),0,136657,0)|0); $201 = tempRet0; - $202 = (___muldi3(($112|0),0,-997805,-1)|0); + $202 = (_i64Add(($200|0),($201|0),($174|0),($175|0))|0); $203 = tempRet0; - $204 = (___muldi3(($112|0),0,136657,0)|0); + $204 = (___muldi3(($124|0),0,-683901,-1)|0); $205 = tempRet0; - $206 = (___muldi3(($112|0),0,-683901,-1)|0); + $206 = (_i64Add(($178|0),($179|0),($204|0),($205|0))|0); $207 = tempRet0; - $208 = (_i64Add(($206|0),($207|0),($72|0),0)|0); + $208 = (___muldi3(($118|0),0,666643,0)|0); $209 = tempRet0; - $210 = (_i64Add(($208|0),($209|0),($192|0),($193|0))|0); + $210 = (___muldi3(($118|0),0,470296,0)|0); $211 = tempRet0; - $212 = (_i64Add(($210|0),($211|0),($172|0),($173|0))|0); + $212 = (_i64Add(($210|0),($211|0),($186|0),($187|0))|0); $213 = tempRet0; - $214 = (_i64Add(($212|0),($213|0),($138|0),($139|0))|0); + $214 = (___muldi3(($118|0),0,654183,0)|0); $215 = tempRet0; - $216 = (_i64Add(($214|0),($215|0),($156|0),($157|0))|0); + $216 = (_i64Add(($214|0),($215|0),($190|0),($191|0))|0); $217 = tempRet0; - $218 = (___muldi3(($106|0),0,666643,0)|0); + $218 = (___muldi3(($118|0),0,-997805,-1)|0); $219 = tempRet0; - $220 = (_i64Add(($218|0),($219|0),($38|0),0)|0); + $220 = (_i64Add(($218|0),($219|0),($194|0),($195|0))|0); $221 = tempRet0; - $222 = (___muldi3(($106|0),0,470296,0)|0); + $222 = (___muldi3(($118|0),0,136657,0)|0); $223 = tempRet0; - $224 = (___muldi3(($106|0),0,654183,0)|0); + $224 = (_i64Add(($222|0),($223|0),($198|0),($199|0))|0); $225 = tempRet0; - $226 = (_i64Add(($224|0),($225|0),($48|0),0)|0); + $226 = (___muldi3(($118|0),0,-683901,-1)|0); $227 = tempRet0; - $228 = (_i64Add(($226|0),($227|0),($198|0),($199|0))|0); + $228 = (_i64Add(($202|0),($203|0),($226|0),($227|0))|0); $229 = tempRet0; - $230 = (_i64Add(($228|0),($229|0),($184|0),($185|0))|0); + $230 = (___muldi3(($112|0),0,666643,0)|0); $231 = tempRet0; - $232 = (___muldi3(($106|0),0,-997805,-1)|0); + $232 = (___muldi3(($112|0),0,470296,0)|0); $233 = tempRet0; - $234 = (___muldi3(($106|0),0,136657,0)|0); + $234 = (___muldi3(($112|0),0,654183,0)|0); $235 = tempRet0; - $236 = (_i64Add(($234|0),($235|0),($60|0),0)|0); + $236 = (_i64Add(($234|0),($235|0),($212|0),($213|0))|0); $237 = tempRet0; - $238 = (_i64Add(($236|0),($237|0),($202|0),($203|0))|0); + $238 = (___muldi3(($112|0),0,-997805,-1)|0); $239 = tempRet0; - $240 = (_i64Add(($238|0),($239|0),($188|0),($189|0))|0); + $240 = (_i64Add(($216|0),($217|0),($238|0),($239|0))|0); $241 = tempRet0; - $242 = (_i64Add(($240|0),($241|0),($168|0),($169|0))|0); + $242 = (___muldi3(($112|0),0,136657,0)|0); $243 = tempRet0; - $244 = (_i64Add(($242|0),($243|0),($152|0),($153|0))|0); + $244 = (_i64Add(($242|0),($243|0),($220|0),($221|0))|0); $245 = tempRet0; - $246 = (___muldi3(($106|0),0,-683901,-1)|0); + $246 = (___muldi3(($112|0),0,-683901,-1)|0); $247 = tempRet0; - $248 = (_i64Add(($220|0),($221|0),1048576,0)|0); + $248 = (_i64Add(($224|0),($225|0),($246|0),($247|0))|0); $249 = tempRet0; - $250 = (_bitshift64Lshr(($248|0),($249|0),21)|0); + $250 = (___muldi3(($106|0),0,666643,0)|0); $251 = tempRet0; - $252 = (_i64Add(($222|0),($223|0),($44|0),0)|0); + $252 = (_i64Add(($250|0),($251|0),($38|0),0)|0); $253 = tempRet0; - $254 = (_i64Add(($252|0),($253|0),($196|0),($197|0))|0); + $254 = (___muldi3(($106|0),0,470296,0)|0); $255 = tempRet0; - $256 = (_i64Add(($254|0),($255|0),($250|0),($251|0))|0); + $256 = (___muldi3(($106|0),0,654183,0)|0); $257 = tempRet0; - $258 = (_bitshift64Shl(($250|0),($251|0),21)|0); + $258 = (_i64Add(($256|0),($257|0),($48|0),0)|0); $259 = tempRet0; - $260 = (_i64Subtract(($220|0),($221|0),($258|0),($259|0))|0); + $260 = (_i64Add(($258|0),($259|0),($232|0),($233|0))|0); $261 = tempRet0; - $262 = (_i64Add(($230|0),($231|0),1048576,0)|0); + $262 = (_i64Add(($260|0),($261|0),($208|0),($209|0))|0); $263 = tempRet0; - $264 = (_bitshift64Lshr(($262|0),($263|0),21)|0); + $264 = (___muldi3(($106|0),0,-997805,-1)|0); $265 = tempRet0; - $266 = (_i64Add(($232|0),($233|0),($54|0),0)|0); + $266 = (_i64Add(($236|0),($237|0),($264|0),($265|0))|0); $267 = tempRet0; - $268 = (_i64Add(($266|0),($267|0),($200|0),($201|0))|0); + $268 = (___muldi3(($106|0),0,136657,0)|0); $269 = tempRet0; - $270 = (_i64Add(($268|0),($269|0),($186|0),($187|0))|0); + $270 = (_i64Add(($240|0),($241|0),($268|0),($269|0))|0); $271 = tempRet0; - $272 = (_i64Add(($270|0),($271|0),($166|0),($167|0))|0); + $272 = (___muldi3(($106|0),0,-683901,-1)|0); $273 = tempRet0; - $274 = (_i64Add(($272|0),($273|0),($264|0),($265|0))|0); + $274 = (_i64Add(($244|0),($245|0),($272|0),($273|0))|0); $275 = tempRet0; - $276 = (_bitshift64Shl(($264|0),($265|0),21)|0); + $276 = (_i64Add(($252|0),($253|0),1048576,0)|0); $277 = tempRet0; - $278 = (_i64Subtract(($230|0),($231|0),($276|0),($277|0))|0); + $278 = (_bitshift64Lshr(($276|0),($277|0),21)|0); $279 = tempRet0; - $280 = (_i64Add(($244|0),($245|0),1048576,0)|0); + $280 = (_i64Add(($254|0),($255|0),($44|0),0)|0); $281 = tempRet0; - $282 = (_bitshift64Ashr(($280|0),($281|0),21)|0); + $282 = (_i64Add(($280|0),($281|0),($230|0),($231|0))|0); $283 = tempRet0; - $284 = (_i64Add(($246|0),($247|0),($66|0),0)|0); + $284 = (_i64Add(($282|0),($283|0),($278|0),($279|0))|0); $285 = tempRet0; - $286 = (_i64Add(($284|0),($285|0),($204|0),($205|0))|0); + $286 = (_bitshift64Shl(($278|0),($279|0),21)|0); $287 = tempRet0; - $288 = (_i64Add(($286|0),($287|0),($190|0),($191|0))|0); + $288 = (_i64Subtract(($252|0),($253|0),($286|0),($287|0))|0); $289 = tempRet0; - $290 = (_i64Add(($288|0),($289|0),($170|0),($171|0))|0); + $290 = (_i64Add(($262|0),($263|0),1048576,0)|0); $291 = tempRet0; - $292 = (_i64Add(($290|0),($291|0),($136|0),($137|0))|0); + $292 = (_bitshift64Lshr(($290|0),($291|0),21)|0); $293 = tempRet0; - $294 = (_i64Add(($292|0),($293|0),($154|0),($155|0))|0); + $294 = (_i64Add(($266|0),($267|0),($292|0),($293|0))|0); $295 = tempRet0; - $296 = (_i64Add(($294|0),($295|0),($282|0),($283|0))|0); + $296 = (_bitshift64Shl(($292|0),($293|0),21)|0); $297 = tempRet0; - $298 = (_bitshift64Shl(($282|0),($283|0),21)|0); + $298 = (_i64Subtract(($262|0),($263|0),($296|0),($297|0))|0); $299 = tempRet0; - $300 = (_i64Subtract(($244|0),($245|0),($298|0),($299|0))|0); + $300 = (_i64Add(($270|0),($271|0),1048576,0)|0); $301 = tempRet0; - $302 = (_i64Add(($216|0),($217|0),1048576,0)|0); + $302 = (_bitshift64Ashr(($300|0),($301|0),21)|0); $303 = tempRet0; - $304 = (_bitshift64Ashr(($302|0),($303|0),21)|0); + $304 = (_i64Add(($302|0),($303|0),($274|0),($275|0))|0); $305 = tempRet0; - $306 = (_i64Add(($194|0),($195|0),($78|0),0)|0); + $306 = (_bitshift64Shl(($302|0),($303|0),21)|0); $307 = tempRet0; - $308 = (_i64Add(($306|0),($307|0),($174|0),($175|0))|0); + $308 = (_i64Subtract(($270|0),($271|0),($306|0),($307|0))|0); $309 = tempRet0; - $310 = (_i64Add(($308|0),($309|0),($140|0),($141|0))|0); + $310 = (_i64Add(($248|0),($249|0),1048576,0)|0); $311 = tempRet0; - $312 = (_i64Add(($310|0),($311|0),($158|0),($159|0))|0); + $312 = (_bitshift64Ashr(($310|0),($311|0),21)|0); $313 = tempRet0; - $314 = (_i64Add(($312|0),($313|0),($304|0),($305|0))|0); + $314 = (_i64Add(($312|0),($313|0),($228|0),($229|0))|0); $315 = tempRet0; - $316 = (_bitshift64Shl(($304|0),($305|0),21)|0); + $316 = (_bitshift64Shl(($312|0),($313|0),21)|0); $317 = tempRet0; - $318 = (_i64Subtract(($216|0),($217|0),($316|0),($317|0))|0); + $318 = (_i64Subtract(($248|0),($249|0),($316|0),($317|0))|0); $319 = tempRet0; - $320 = (_i64Add(($182|0),($183|0),1048576,0)|0); + $320 = (_i64Add(($206|0),($207|0),1048576,0)|0); $321 = tempRet0; $322 = (_bitshift64Ashr(($320|0),($321|0),21)|0); $323 = tempRet0; - $324 = (_i64Add(($164|0),($165|0),($322|0),($323|0))|0); + $324 = (_i64Add(($322|0),($323|0),($182|0),($183|0))|0); $325 = tempRet0; $326 = (_bitshift64Shl(($322|0),($323|0),21)|0); $327 = tempRet0; - $328 = (_i64Subtract(($182|0),($183|0),($326|0),($327|0))|0); + $328 = (_i64Subtract(($206|0),($207|0),($326|0),($327|0))|0); $329 = tempRet0; - $330 = (_i64Add(($150|0),($151|0),1048576,0)|0); + $330 = (_i64Add(($158|0),($159|0),1048576,0)|0); $331 = tempRet0; $332 = (_bitshift64Ashr(($330|0),($331|0),21)|0); $333 = tempRet0; @@ -17360,37 +18121,37 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $335 = tempRet0; $336 = (_bitshift64Shl(($332|0),($333|0),21)|0); $337 = tempRet0; - $338 = (_i64Subtract(($150|0),($151|0),($336|0),($337|0))|0); + $338 = (_i64Subtract(($158|0),($159|0),($336|0),($337|0))|0); $339 = tempRet0; - $340 = (_i64Add(($256|0),($257|0),1048576,0)|0); + $340 = (_i64Add(($284|0),($285|0),1048576,0)|0); $341 = tempRet0; $342 = (_bitshift64Lshr(($340|0),($341|0),21)|0); $343 = tempRet0; - $344 = (_i64Add(($278|0),($279|0),($342|0),($343|0))|0); + $344 = (_i64Add(($342|0),($343|0),($298|0),($299|0))|0); $345 = tempRet0; $346 = (_bitshift64Shl(($342|0),($343|0),21)|0); $347 = tempRet0; - $348 = (_i64Subtract(($256|0),($257|0),($346|0),($347|0))|0); + $348 = (_i64Subtract(($284|0),($285|0),($346|0),($347|0))|0); $349 = tempRet0; - $350 = (_i64Add(($274|0),($275|0),1048576,0)|0); + $350 = (_i64Add(($294|0),($295|0),1048576,0)|0); $351 = tempRet0; $352 = (_bitshift64Ashr(($350|0),($351|0),21)|0); $353 = tempRet0; - $354 = (_i64Add(($300|0),($301|0),($352|0),($353|0))|0); + $354 = (_i64Add(($352|0),($353|0),($308|0),($309|0))|0); $355 = tempRet0; $356 = (_bitshift64Shl(($352|0),($353|0),21)|0); $357 = tempRet0; - $358 = (_i64Subtract(($274|0),($275|0),($356|0),($357|0))|0); + $358 = (_i64Subtract(($294|0),($295|0),($356|0),($357|0))|0); $359 = tempRet0; - $360 = (_i64Add(($296|0),($297|0),1048576,0)|0); + $360 = (_i64Add(($304|0),($305|0),1048576,0)|0); $361 = tempRet0; $362 = (_bitshift64Ashr(($360|0),($361|0),21)|0); $363 = tempRet0; - $364 = (_i64Add(($318|0),($319|0),($362|0),($363|0))|0); + $364 = (_i64Add(($362|0),($363|0),($318|0),($319|0))|0); $365 = tempRet0; $366 = (_bitshift64Shl(($362|0),($363|0),21)|0); $367 = tempRet0; - $368 = (_i64Subtract(($296|0),($297|0),($366|0),($367|0))|0); + $368 = (_i64Subtract(($304|0),($305|0),($366|0),($367|0))|0); $369 = tempRet0; $370 = (_i64Add(($314|0),($315|0),1048576,0)|0); $371 = tempRet0; @@ -17414,11 +18175,11 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $389 = tempRet0; $390 = (___muldi3(($334|0),($335|0),666643,0)|0); $391 = tempRet0; - $392 = (_i64Add(($390|0),($391|0),($32|0),0)|0); + $392 = (_i64Add(($32|0),0,($390|0),($391|0))|0); $393 = tempRet0; $394 = (___muldi3(($334|0),($335|0),470296,0)|0); $395 = tempRet0; - $396 = (_i64Add(($260|0),($261|0),($394|0),($395|0))|0); + $396 = (_i64Add(($288|0),($289|0),($394|0),($395|0))|0); $397 = tempRet0; $398 = (___muldi3(($334|0),($335|0),654183,0)|0); $399 = tempRet0; @@ -17426,11 +18187,11 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $401 = tempRet0; $402 = (___muldi3(($334|0),($335|0),-997805,-1)|0); $403 = tempRet0; - $404 = (_i64Add(($344|0),($345|0),($402|0),($403|0))|0); + $404 = (_i64Add(($402|0),($403|0),($344|0),($345|0))|0); $405 = tempRet0; $406 = (___muldi3(($334|0),($335|0),136657,0)|0); $407 = tempRet0; - $408 = (_i64Add(($358|0),($359|0),($406|0),($407|0))|0); + $408 = (_i64Add(($406|0),($407|0),($358|0),($359|0))|0); $409 = tempRet0; $410 = (___muldi3(($334|0),($335|0),-683901,-1)|0); $411 = tempRet0; @@ -17438,169 +18199,169 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $413 = tempRet0; $414 = (___muldi3(($384|0),($385|0),666643,0)|0); $415 = tempRet0; - $416 = (___muldi3(($384|0),($385|0),470296,0)|0); + $416 = (_i64Add(($26|0),0,($414|0),($415|0))|0); $417 = tempRet0; - $418 = (___muldi3(($384|0),($385|0),654183,0)|0); + $418 = (___muldi3(($384|0),($385|0),470296,0)|0); $419 = tempRet0; - $420 = (_i64Add(($396|0),($397|0),($418|0),($419|0))|0); + $420 = (_i64Add(($392|0),($393|0),($418|0),($419|0))|0); $421 = tempRet0; - $422 = (___muldi3(($384|0),($385|0),-997805,-1)|0); + $422 = (___muldi3(($384|0),($385|0),654183,0)|0); $423 = tempRet0; - $424 = (_i64Add(($400|0),($401|0),($422|0),($423|0))|0); + $424 = (_i64Add(($396|0),($397|0),($422|0),($423|0))|0); $425 = tempRet0; - $426 = (___muldi3(($384|0),($385|0),136657,0)|0); + $426 = (___muldi3(($384|0),($385|0),-997805,-1)|0); $427 = tempRet0; - $428 = (_i64Add(($404|0),($405|0),($426|0),($427|0))|0); + $428 = (_i64Add(($400|0),($401|0),($426|0),($427|0))|0); $429 = tempRet0; - $430 = (___muldi3(($384|0),($385|0),-683901,-1)|0); + $430 = (___muldi3(($384|0),($385|0),136657,0)|0); $431 = tempRet0; - $432 = (_i64Add(($408|0),($409|0),($430|0),($431|0))|0); + $432 = (_i64Add(($404|0),($405|0),($430|0),($431|0))|0); $433 = tempRet0; - $434 = (___muldi3(($388|0),($389|0),666643,0)|0); + $434 = (___muldi3(($384|0),($385|0),-683901,-1)|0); $435 = tempRet0; - $436 = (___muldi3(($388|0),($389|0),470296,0)|0); + $436 = (_i64Add(($408|0),($409|0),($434|0),($435|0))|0); $437 = tempRet0; - $438 = (___muldi3(($388|0),($389|0),654183,0)|0); + $438 = (___muldi3(($388|0),($389|0),666643,0)|0); $439 = tempRet0; - $440 = (___muldi3(($388|0),($389|0),-997805,-1)|0); + $440 = (_i64Add(($20|0),0,($438|0),($439|0))|0); $441 = tempRet0; - $442 = (___muldi3(($388|0),($389|0),136657,0)|0); + $442 = (___muldi3(($388|0),($389|0),470296,0)|0); $443 = tempRet0; - $444 = (___muldi3(($388|0),($389|0),-683901,-1)|0); + $444 = (_i64Add(($416|0),($417|0),($442|0),($443|0))|0); $445 = tempRet0; - $446 = (_i64Add(($428|0),($429|0),($444|0),($445|0))|0); + $446 = (___muldi3(($388|0),($389|0),654183,0)|0); $447 = tempRet0; - $448 = (___muldi3(($374|0),($375|0),666643,0)|0); + $448 = (_i64Add(($420|0),($421|0),($446|0),($447|0))|0); $449 = tempRet0; - $450 = (___muldi3(($374|0),($375|0),470296,0)|0); + $450 = (___muldi3(($388|0),($389|0),-997805,-1)|0); $451 = tempRet0; - $452 = (___muldi3(($374|0),($375|0),654183,0)|0); + $452 = (_i64Add(($424|0),($425|0),($450|0),($451|0))|0); $453 = tempRet0; - $454 = (___muldi3(($374|0),($375|0),-997805,-1)|0); + $454 = (___muldi3(($388|0),($389|0),136657,0)|0); $455 = tempRet0; - $456 = (___muldi3(($374|0),($375|0),136657,0)|0); + $456 = (_i64Add(($428|0),($429|0),($454|0),($455|0))|0); $457 = tempRet0; - $458 = (___muldi3(($374|0),($375|0),-683901,-1)|0); + $458 = (___muldi3(($388|0),($389|0),-683901,-1)|0); $459 = tempRet0; - $460 = (___muldi3(($378|0),($379|0),666643,0)|0); + $460 = (_i64Add(($432|0),($433|0),($458|0),($459|0))|0); $461 = tempRet0; - $462 = (___muldi3(($378|0),($379|0),470296,0)|0); + $462 = (___muldi3(($374|0),($375|0),666643,0)|0); $463 = tempRet0; - $464 = (___muldi3(($378|0),($379|0),654183,0)|0); + $464 = (_i64Add(($462|0),($463|0),($14|0),0)|0); $465 = tempRet0; - $466 = (___muldi3(($378|0),($379|0),-997805,-1)|0); + $466 = (___muldi3(($374|0),($375|0),470296,0)|0); $467 = tempRet0; - $468 = (___muldi3(($378|0),($379|0),136657,0)|0); + $468 = (_i64Add(($440|0),($441|0),($466|0),($467|0))|0); $469 = tempRet0; - $470 = (___muldi3(($378|0),($379|0),-683901,-1)|0); + $470 = (___muldi3(($374|0),($375|0),654183,0)|0); $471 = tempRet0; - $472 = (_i64Add(($420|0),($421|0),($456|0),($457|0))|0); + $472 = (_i64Add(($444|0),($445|0),($470|0),($471|0))|0); $473 = tempRet0; - $474 = (_i64Add(($472|0),($473|0),($440|0),($441|0))|0); + $474 = (___muldi3(($374|0),($375|0),-997805,-1)|0); $475 = tempRet0; - $476 = (_i64Add(($474|0),($475|0),($470|0),($471|0))|0); + $476 = (_i64Add(($448|0),($449|0),($474|0),($475|0))|0); $477 = tempRet0; - $478 = (___muldi3(($364|0),($365|0),666643,0)|0); + $478 = (___muldi3(($374|0),($375|0),136657,0)|0); $479 = tempRet0; - $480 = (_i64Add(($478|0),($479|0),($2|0),0)|0); + $480 = (_i64Add(($452|0),($453|0),($478|0),($479|0))|0); $481 = tempRet0; - $482 = (___muldi3(($364|0),($365|0),470296,0)|0); + $482 = (___muldi3(($374|0),($375|0),-683901,-1)|0); $483 = tempRet0; - $484 = (___muldi3(($364|0),($365|0),654183,0)|0); + $484 = (_i64Add(($456|0),($457|0),($482|0),($483|0))|0); $485 = tempRet0; - $486 = (_i64Add(($484|0),($485|0),($14|0),0)|0); + $486 = (___muldi3(($378|0),($379|0),666643,0)|0); $487 = tempRet0; - $488 = (_i64Add(($486|0),($487|0),($448|0),($449|0))|0); + $488 = (___muldi3(($378|0),($379|0),470296,0)|0); $489 = tempRet0; - $490 = (_i64Add(($488|0),($489|0),($462|0),($463|0))|0); + $490 = (___muldi3(($378|0),($379|0),654183,0)|0); $491 = tempRet0; - $492 = (___muldi3(($364|0),($365|0),-997805,-1)|0); + $492 = (_i64Add(($468|0),($469|0),($490|0),($491|0))|0); $493 = tempRet0; - $494 = (___muldi3(($364|0),($365|0),136657,0)|0); + $494 = (___muldi3(($378|0),($379|0),-997805,-1)|0); $495 = tempRet0; - $496 = (_i64Add(($494|0),($495|0),($26|0),0)|0); + $496 = (_i64Add(($472|0),($473|0),($494|0),($495|0))|0); $497 = tempRet0; - $498 = (_i64Add(($496|0),($497|0),($414|0),($415|0))|0); + $498 = (___muldi3(($378|0),($379|0),136657,0)|0); $499 = tempRet0; - $500 = (_i64Add(($498|0),($499|0),($452|0),($453|0))|0); + $500 = (_i64Add(($476|0),($477|0),($498|0),($499|0))|0); $501 = tempRet0; - $502 = (_i64Add(($500|0),($501|0),($436|0),($437|0))|0); + $502 = (___muldi3(($378|0),($379|0),-683901,-1)|0); $503 = tempRet0; - $504 = (_i64Add(($502|0),($503|0),($466|0),($467|0))|0); + $504 = (_i64Add(($480|0),($481|0),($502|0),($503|0))|0); $505 = tempRet0; - $506 = (___muldi3(($364|0),($365|0),-683901,-1)|0); + $506 = (___muldi3(($364|0),($365|0),666643,0)|0); $507 = tempRet0; - $508 = (_i64Add(($480|0),($481|0),1048576,0)|0); + $508 = (_i64Add(($506|0),($507|0),($2|0),0)|0); $509 = tempRet0; - $510 = (_bitshift64Ashr(($508|0),($509|0),21)|0); + $510 = (___muldi3(($364|0),($365|0),470296,0)|0); $511 = tempRet0; - $512 = (_i64Add(($482|0),($483|0),($8|0),0)|0); + $512 = (___muldi3(($364|0),($365|0),654183,0)|0); $513 = tempRet0; - $514 = (_i64Add(($512|0),($513|0),($460|0),($461|0))|0); + $514 = (_i64Add(($464|0),($465|0),($512|0),($513|0))|0); $515 = tempRet0; - $516 = (_i64Add(($514|0),($515|0),($510|0),($511|0))|0); + $516 = (_i64Add(($514|0),($515|0),($488|0),($489|0))|0); $517 = tempRet0; - $518 = (_bitshift64Shl(($510|0),($511|0),21)|0); + $518 = (___muldi3(($364|0),($365|0),-997805,-1)|0); $519 = tempRet0; - $520 = (_i64Subtract(($480|0),($481|0),($518|0),($519|0))|0); + $520 = (_i64Add(($492|0),($493|0),($518|0),($519|0))|0); $521 = tempRet0; - $522 = (_i64Add(($490|0),($491|0),1048576,0)|0); + $522 = (___muldi3(($364|0),($365|0),136657,0)|0); $523 = tempRet0; - $524 = (_bitshift64Ashr(($522|0),($523|0),21)|0); + $524 = (_i64Add(($496|0),($497|0),($522|0),($523|0))|0); $525 = tempRet0; - $526 = (_i64Add(($492|0),($493|0),($20|0),0)|0); + $526 = (___muldi3(($364|0),($365|0),-683901,-1)|0); $527 = tempRet0; - $528 = (_i64Add(($526|0),($527|0),($450|0),($451|0))|0); + $528 = (_i64Add(($500|0),($501|0),($526|0),($527|0))|0); $529 = tempRet0; - $530 = (_i64Add(($528|0),($529|0),($434|0),($435|0))|0); + $530 = (_i64Add(($508|0),($509|0),1048576,0)|0); $531 = tempRet0; - $532 = (_i64Add(($530|0),($531|0),($464|0),($465|0))|0); + $532 = (_bitshift64Ashr(($530|0),($531|0),21)|0); $533 = tempRet0; - $534 = (_i64Add(($532|0),($533|0),($524|0),($525|0))|0); + $534 = (_i64Add(($510|0),($511|0),($8|0),0)|0); $535 = tempRet0; - $536 = (_bitshift64Shl(($524|0),($525|0),21)|0); + $536 = (_i64Add(($534|0),($535|0),($486|0),($487|0))|0); $537 = tempRet0; - $538 = (_i64Add(($504|0),($505|0),1048576,0)|0); + $538 = (_i64Add(($536|0),($537|0),($532|0),($533|0))|0); $539 = tempRet0; - $540 = (_bitshift64Ashr(($538|0),($539|0),21)|0); + $540 = (_bitshift64Shl(($532|0),($533|0),21)|0); $541 = tempRet0; - $542 = (_i64Add(($392|0),($393|0),($506|0),($507|0))|0); + $542 = (_i64Subtract(($508|0),($509|0),($540|0),($541|0))|0); $543 = tempRet0; - $544 = (_i64Add(($542|0),($543|0),($416|0),($417|0))|0); + $544 = (_i64Add(($516|0),($517|0),1048576,0)|0); $545 = tempRet0; - $546 = (_i64Add(($544|0),($545|0),($454|0),($455|0))|0); + $546 = (_bitshift64Ashr(($544|0),($545|0),21)|0); $547 = tempRet0; - $548 = (_i64Add(($546|0),($547|0),($438|0),($439|0))|0); + $548 = (_i64Add(($546|0),($547|0),($520|0),($521|0))|0); $549 = tempRet0; - $550 = (_i64Add(($548|0),($549|0),($468|0),($469|0))|0); + $550 = (_bitshift64Shl(($546|0),($547|0),21)|0); $551 = tempRet0; - $552 = (_i64Add(($550|0),($551|0),($540|0),($541|0))|0); + $552 = (_i64Add(($524|0),($525|0),1048576,0)|0); $553 = tempRet0; - $554 = (_bitshift64Shl(($540|0),($541|0),21)|0); + $554 = (_bitshift64Ashr(($552|0),($553|0),21)|0); $555 = tempRet0; - $556 = (_i64Add(($476|0),($477|0),1048576,0)|0); + $556 = (_i64Add(($554|0),($555|0),($528|0),($529|0))|0); $557 = tempRet0; - $558 = (_bitshift64Ashr(($556|0),($557|0),21)|0); + $558 = (_bitshift64Shl(($554|0),($555|0),21)|0); $559 = tempRet0; - $560 = (_i64Add(($424|0),($425|0),($458|0),($459|0))|0); + $560 = (_i64Add(($504|0),($505|0),1048576,0)|0); $561 = tempRet0; - $562 = (_i64Add(($560|0),($561|0),($442|0),($443|0))|0); + $562 = (_bitshift64Ashr(($560|0),($561|0),21)|0); $563 = tempRet0; - $564 = (_i64Add(($562|0),($563|0),($558|0),($559|0))|0); + $564 = (_i64Add(($562|0),($563|0),($484|0),($485|0))|0); $565 = tempRet0; - $566 = (_bitshift64Shl(($558|0),($559|0),21)|0); + $566 = (_bitshift64Shl(($562|0),($563|0),21)|0); $567 = tempRet0; - $568 = (_i64Subtract(($476|0),($477|0),($566|0),($567|0))|0); + $568 = (_i64Subtract(($504|0),($505|0),($566|0),($567|0))|0); $569 = tempRet0; - $570 = (_i64Add(($446|0),($447|0),1048576,0)|0); + $570 = (_i64Add(($460|0),($461|0),1048576,0)|0); $571 = tempRet0; $572 = (_bitshift64Ashr(($570|0),($571|0),21)|0); $573 = tempRet0; - $574 = (_i64Add(($432|0),($433|0),($572|0),($573|0))|0); + $574 = (_i64Add(($572|0),($573|0),($436|0),($437|0))|0); $575 = tempRet0; $576 = (_bitshift64Shl(($572|0),($573|0),21)|0); $577 = tempRet0; - $578 = (_i64Subtract(($446|0),($447|0),($576|0),($577|0))|0); + $578 = (_i64Subtract(($460|0),($461|0),($576|0),($577|0))|0); $579 = tempRet0; $580 = (_i64Add(($412|0),($413|0),1048576,0)|0); $581 = tempRet0; @@ -17612,135 +18373,135 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $587 = tempRet0; $588 = (_i64Subtract(($412|0),($413|0),($586|0),($587|0))|0); $589 = tempRet0; - $590 = (_i64Add(($516|0),($517|0),1048576,0)|0); + $590 = (_i64Add(($538|0),($539|0),1048576,0)|0); $591 = tempRet0; $592 = (_bitshift64Ashr(($590|0),($591|0),21)|0); $593 = tempRet0; $594 = (_bitshift64Shl(($592|0),($593|0),21)|0); $595 = tempRet0; - $596 = (_i64Add(($534|0),($535|0),1048576,0)|0); + $596 = (_i64Add(($548|0),($549|0),1048576,0)|0); $597 = tempRet0; $598 = (_bitshift64Ashr(($596|0),($597|0),21)|0); $599 = tempRet0; $600 = (_bitshift64Shl(($598|0),($599|0),21)|0); $601 = tempRet0; - $602 = (_i64Add(($552|0),($553|0),1048576,0)|0); + $602 = (_i64Subtract(($548|0),($549|0),($600|0),($601|0))|0); $603 = tempRet0; - $604 = (_bitshift64Ashr(($602|0),($603|0),21)|0); + $604 = (_i64Add(($556|0),($557|0),1048576,0)|0); $605 = tempRet0; - $606 = (_i64Add(($568|0),($569|0),($604|0),($605|0))|0); + $606 = (_bitshift64Ashr(($604|0),($605|0),21)|0); $607 = tempRet0; - $608 = (_bitshift64Shl(($604|0),($605|0),21)|0); + $608 = (_i64Add(($568|0),($569|0),($606|0),($607|0))|0); $609 = tempRet0; - $610 = (_i64Add(($564|0),($565|0),1048576,0)|0); + $610 = (_bitshift64Shl(($606|0),($607|0),21)|0); $611 = tempRet0; - $612 = (_bitshift64Ashr(($610|0),($611|0),21)|0); + $612 = (_i64Subtract(($556|0),($557|0),($610|0),($611|0))|0); $613 = tempRet0; - $614 = (_i64Add(($578|0),($579|0),($612|0),($613|0))|0); + $614 = (_i64Add(($564|0),($565|0),1048576,0)|0); $615 = tempRet0; - $616 = (_bitshift64Shl(($612|0),($613|0),21)|0); + $616 = (_bitshift64Ashr(($614|0),($615|0),21)|0); $617 = tempRet0; - $618 = (_i64Subtract(($564|0),($565|0),($616|0),($617|0))|0); + $618 = (_i64Add(($578|0),($579|0),($616|0),($617|0))|0); $619 = tempRet0; - $620 = (_i64Add(($574|0),($575|0),1048576,0)|0); + $620 = (_bitshift64Shl(($616|0),($617|0),21)|0); $621 = tempRet0; - $622 = (_bitshift64Ashr(($620|0),($621|0),21)|0); + $622 = (_i64Subtract(($564|0),($565|0),($620|0),($621|0))|0); $623 = tempRet0; - $624 = (_i64Add(($588|0),($589|0),($622|0),($623|0))|0); + $624 = (_i64Add(($574|0),($575|0),1048576,0)|0); $625 = tempRet0; - $626 = (_bitshift64Shl(($622|0),($623|0),21)|0); + $626 = (_bitshift64Ashr(($624|0),($625|0),21)|0); $627 = tempRet0; - $628 = (_i64Subtract(($574|0),($575|0),($626|0),($627|0))|0); + $628 = (_i64Add(($588|0),($589|0),($626|0),($627|0))|0); $629 = tempRet0; - $630 = (_i64Add(($584|0),($585|0),1048576,0)|0); + $630 = (_bitshift64Shl(($626|0),($627|0),21)|0); $631 = tempRet0; - $632 = (_bitshift64Ashr(($630|0),($631|0),21)|0); + $632 = (_i64Subtract(($574|0),($575|0),($630|0),($631|0))|0); $633 = tempRet0; - $634 = (_bitshift64Shl(($632|0),($633|0),21)|0); + $634 = (_i64Add(($584|0),($585|0),1048576,0)|0); $635 = tempRet0; - $636 = (_i64Subtract(($584|0),($585|0),($634|0),($635|0))|0); + $636 = (_bitshift64Ashr(($634|0),($635|0),21)|0); $637 = tempRet0; - $638 = (___muldi3(($632|0),($633|0),666643,0)|0); + $638 = (_bitshift64Shl(($636|0),($637|0),21)|0); $639 = tempRet0; - $640 = (_i64Add(($520|0),($521|0),($638|0),($639|0))|0); + $640 = (_i64Subtract(($584|0),($585|0),($638|0),($639|0))|0); $641 = tempRet0; - $642 = (___muldi3(($632|0),($633|0),470296,0)|0); + $642 = (___muldi3(($636|0),($637|0),666643,0)|0); $643 = tempRet0; - $644 = (___muldi3(($632|0),($633|0),654183,0)|0); + $644 = (_i64Add(($542|0),($543|0),($642|0),($643|0))|0); $645 = tempRet0; - $646 = (___muldi3(($632|0),($633|0),-997805,-1)|0); + $646 = (___muldi3(($636|0),($637|0),470296,0)|0); $647 = tempRet0; - $648 = (___muldi3(($632|0),($633|0),136657,0)|0); + $648 = (___muldi3(($636|0),($637|0),654183,0)|0); $649 = tempRet0; - $650 = (___muldi3(($632|0),($633|0),-683901,-1)|0); + $650 = (___muldi3(($636|0),($637|0),-997805,-1)|0); $651 = tempRet0; - $652 = (_bitshift64Ashr(($640|0),($641|0),21)|0); + $652 = (_i64Add(($602|0),($603|0),($650|0),($651|0))|0); $653 = tempRet0; - $654 = (_i64Add(($642|0),($643|0),($516|0),($517|0))|0); + $654 = (___muldi3(($636|0),($637|0),136657,0)|0); $655 = tempRet0; - $656 = (_i64Subtract(($654|0),($655|0),($594|0),($595|0))|0); + $656 = (___muldi3(($636|0),($637|0),-683901,-1)|0); $657 = tempRet0; - $658 = (_i64Add(($656|0),($657|0),($652|0),($653|0))|0); + $658 = (_i64Add(($612|0),($613|0),($656|0),($657|0))|0); $659 = tempRet0; - $660 = (_bitshift64Shl(($652|0),($653|0),21)|0); + $660 = (_bitshift64Ashr(($644|0),($645|0),21)|0); $661 = tempRet0; - $662 = (_i64Subtract(($640|0),($641|0),($660|0),($661|0))|0); + $662 = (_i64Add(($646|0),($647|0),($538|0),($539|0))|0); $663 = tempRet0; - $664 = (_bitshift64Ashr(($658|0),($659|0),21)|0); + $664 = (_i64Subtract(($662|0),($663|0),($594|0),($595|0))|0); $665 = tempRet0; - $666 = (_i64Add(($644|0),($645|0),($490|0),($491|0))|0); + $666 = (_i64Add(($664|0),($665|0),($660|0),($661|0))|0); $667 = tempRet0; - $668 = (_i64Subtract(($666|0),($667|0),($536|0),($537|0))|0); + $668 = (_bitshift64Shl(($660|0),($661|0),21)|0); $669 = tempRet0; - $670 = (_i64Add(($668|0),($669|0),($592|0),($593|0))|0); + $670 = (_i64Subtract(($644|0),($645|0),($668|0),($669|0))|0); $671 = tempRet0; - $672 = (_i64Add(($670|0),($671|0),($664|0),($665|0))|0); + $672 = (_bitshift64Ashr(($666|0),($667|0),21)|0); $673 = tempRet0; - $674 = (_bitshift64Shl(($664|0),($665|0),21)|0); + $674 = (_i64Add(($648|0),($649|0),($516|0),($517|0))|0); $675 = tempRet0; - $676 = (_i64Subtract(($658|0),($659|0),($674|0),($675|0))|0); + $676 = (_i64Subtract(($674|0),($675|0),($550|0),($551|0))|0); $677 = tempRet0; - $678 = (_bitshift64Ashr(($672|0),($673|0),21)|0); + $678 = (_i64Add(($676|0),($677|0),($592|0),($593|0))|0); $679 = tempRet0; - $680 = (_i64Add(($534|0),($535|0),($646|0),($647|0))|0); + $680 = (_i64Add(($678|0),($679|0),($672|0),($673|0))|0); $681 = tempRet0; - $682 = (_i64Subtract(($680|0),($681|0),($600|0),($601|0))|0); + $682 = (_bitshift64Shl(($672|0),($673|0),21)|0); $683 = tempRet0; - $684 = (_i64Add(($682|0),($683|0),($678|0),($679|0))|0); + $684 = (_i64Subtract(($666|0),($667|0),($682|0),($683|0))|0); $685 = tempRet0; - $686 = (_bitshift64Shl(($678|0),($679|0),21)|0); + $686 = (_bitshift64Ashr(($680|0),($681|0),21)|0); $687 = tempRet0; - $688 = (_i64Subtract(($672|0),($673|0),($686|0),($687|0))|0); + $688 = (_i64Add(($686|0),($687|0),($652|0),($653|0))|0); $689 = tempRet0; - $690 = (_bitshift64Ashr(($684|0),($685|0),21)|0); + $690 = (_bitshift64Shl(($686|0),($687|0),21)|0); $691 = tempRet0; - $692 = (_i64Add(($648|0),($649|0),($504|0),($505|0))|0); + $692 = (_i64Subtract(($680|0),($681|0),($690|0),($691|0))|0); $693 = tempRet0; - $694 = (_i64Subtract(($692|0),($693|0),($554|0),($555|0))|0); + $694 = (_bitshift64Ashr(($688|0),($689|0),21)|0); $695 = tempRet0; - $696 = (_i64Add(($694|0),($695|0),($598|0),($599|0))|0); + $696 = (_i64Add(($654|0),($655|0),($524|0),($525|0))|0); $697 = tempRet0; - $698 = (_i64Add(($696|0),($697|0),($690|0),($691|0))|0); + $698 = (_i64Subtract(($696|0),($697|0),($558|0),($559|0))|0); $699 = tempRet0; - $700 = (_bitshift64Shl(($690|0),($691|0),21)|0); + $700 = (_i64Add(($698|0),($699|0),($598|0),($599|0))|0); $701 = tempRet0; - $702 = (_i64Subtract(($684|0),($685|0),($700|0),($701|0))|0); + $702 = (_i64Add(($700|0),($701|0),($694|0),($695|0))|0); $703 = tempRet0; - $704 = (_bitshift64Ashr(($698|0),($699|0),21)|0); + $704 = (_bitshift64Shl(($694|0),($695|0),21)|0); $705 = tempRet0; - $706 = (_i64Add(($552|0),($553|0),($650|0),($651|0))|0); + $706 = (_i64Subtract(($688|0),($689|0),($704|0),($705|0))|0); $707 = tempRet0; - $708 = (_i64Subtract(($706|0),($707|0),($608|0),($609|0))|0); + $708 = (_bitshift64Ashr(($702|0),($703|0),21)|0); $709 = tempRet0; - $710 = (_i64Add(($708|0),($709|0),($704|0),($705|0))|0); + $710 = (_i64Add(($708|0),($709|0),($658|0),($659|0))|0); $711 = tempRet0; - $712 = (_bitshift64Shl(($704|0),($705|0),21)|0); + $712 = (_bitshift64Shl(($708|0),($709|0),21)|0); $713 = tempRet0; - $714 = (_i64Subtract(($698|0),($699|0),($712|0),($713|0))|0); + $714 = (_i64Subtract(($702|0),($703|0),($712|0),($713|0))|0); $715 = tempRet0; $716 = (_bitshift64Ashr(($710|0),($711|0),21)|0); $717 = tempRet0; - $718 = (_i64Add(($606|0),($607|0),($716|0),($717|0))|0); + $718 = (_i64Add(($608|0),($609|0),($716|0),($717|0))|0); $719 = tempRet0; $720 = (_bitshift64Shl(($716|0),($717|0),21)|0); $721 = tempRet0; @@ -17748,7 +18509,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $723 = tempRet0; $724 = (_bitshift64Ashr(($718|0),($719|0),21)|0); $725 = tempRet0; - $726 = (_i64Add(($724|0),($725|0),($618|0),($619|0))|0); + $726 = (_i64Add(($724|0),($725|0),($622|0),($623|0))|0); $727 = tempRet0; $728 = (_bitshift64Shl(($724|0),($725|0),21)|0); $729 = tempRet0; @@ -17756,7 +18517,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $731 = tempRet0; $732 = (_bitshift64Ashr(($726|0),($727|0),21)|0); $733 = tempRet0; - $734 = (_i64Add(($614|0),($615|0),($732|0),($733|0))|0); + $734 = (_i64Add(($618|0),($619|0),($732|0),($733|0))|0); $735 = tempRet0; $736 = (_bitshift64Shl(($732|0),($733|0),21)|0); $737 = tempRet0; @@ -17764,7 +18525,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $739 = tempRet0; $740 = (_bitshift64Ashr(($734|0),($735|0),21)|0); $741 = tempRet0; - $742 = (_i64Add(($740|0),($741|0),($628|0),($629|0))|0); + $742 = (_i64Add(($740|0),($741|0),($632|0),($633|0))|0); $743 = tempRet0; $744 = (_bitshift64Shl(($740|0),($741|0),21)|0); $745 = tempRet0; @@ -17772,7 +18533,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $747 = tempRet0; $748 = (_bitshift64Ashr(($742|0),($743|0),21)|0); $749 = tempRet0; - $750 = (_i64Add(($624|0),($625|0),($748|0),($749|0))|0); + $750 = (_i64Add(($628|0),($629|0),($748|0),($749|0))|0); $751 = tempRet0; $752 = (_bitshift64Shl(($748|0),($749|0),21)|0); $753 = tempRet0; @@ -17780,7 +18541,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $755 = tempRet0; $756 = (_bitshift64Ashr(($750|0),($751|0),21)|0); $757 = tempRet0; - $758 = (_i64Add(($756|0),($757|0),($636|0),($637|0))|0); + $758 = (_i64Add(($756|0),($757|0),($640|0),($641|0))|0); $759 = tempRet0; $760 = (_bitshift64Shl(($756|0),($757|0),21)|0); $761 = tempRet0; @@ -17794,19 +18555,19 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $769 = tempRet0; $770 = (___muldi3(($764|0),($765|0),666643,0)|0); $771 = tempRet0; - $772 = (_i64Add(($770|0),($771|0),($662|0),($663|0))|0); + $772 = (_i64Add(($770|0),($771|0),($670|0),($671|0))|0); $773 = tempRet0; $774 = (___muldi3(($764|0),($765|0),470296,0)|0); $775 = tempRet0; - $776 = (_i64Add(($676|0),($677|0),($774|0),($775|0))|0); + $776 = (_i64Add(($684|0),($685|0),($774|0),($775|0))|0); $777 = tempRet0; $778 = (___muldi3(($764|0),($765|0),654183,0)|0); $779 = tempRet0; - $780 = (_i64Add(($688|0),($689|0),($778|0),($779|0))|0); + $780 = (_i64Add(($692|0),($693|0),($778|0),($779|0))|0); $781 = tempRet0; $782 = (___muldi3(($764|0),($765|0),-997805,-1)|0); $783 = tempRet0; - $784 = (_i64Add(($702|0),($703|0),($782|0),($783|0))|0); + $784 = (_i64Add(($706|0),($707|0),($782|0),($783|0))|0); $785 = tempRet0; $786 = (___muldi3(($764|0),($765|0),136657,0)|0); $787 = tempRet0; @@ -17834,7 +18595,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $809 = tempRet0; $810 = (_bitshift64Ashr(($804|0),($805|0),21)|0); $811 = tempRet0; - $812 = (_i64Add(($784|0),($785|0),($810|0),($811|0))|0); + $812 = (_i64Add(($810|0),($811|0),($784|0),($785|0))|0); $813 = tempRet0; $814 = (_bitshift64Shl(($810|0),($811|0),21)|0); $815 = tempRet0; @@ -17850,7 +18611,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $825 = tempRet0; $826 = (_bitshift64Ashr(($820|0),($821|0),21)|0); $827 = tempRet0; - $828 = (_i64Add(($792|0),($793|0),($826|0),($827|0))|0); + $828 = (_i64Add(($826|0),($827|0),($792|0),($793|0))|0); $829 = tempRet0; $830 = (_bitshift64Shl(($826|0),($827|0),21)|0); $831 = tempRet0; @@ -17909,7 +18670,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $883 = (_bitshift64Lshr(($800|0),($801|0),8)|0); $884 = tempRet0; $885 = $883&255; - $886 = (($s) + 1|0); + $886 = ((($s)) + 1|0); HEAP8[$886>>0] = $885; $887 = (_bitshift64Lshr(($800|0),($801|0),16)|0); $888 = tempRet0; @@ -17922,12 +18683,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $893 = (_bitshift64Lshr(($808|0),($809|0),3)|0); $894 = tempRet0; $895 = $893&255; - $896 = (($s) + 3|0); + $896 = ((($s)) + 3|0); HEAP8[$896>>0] = $895; $897 = (_bitshift64Lshr(($808|0),($809|0),11)|0); $898 = tempRet0; $899 = $897&255; - $900 = (($s) + 4|0); + $900 = ((($s)) + 4|0); HEAP8[$900>>0] = $899; $901 = (_bitshift64Lshr(($808|0),($809|0),19)|0); $902 = tempRet0; @@ -17940,7 +18701,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $907 = (_bitshift64Lshr(($816|0),($817|0),6)|0); $908 = tempRet0; $909 = $907&255; - $910 = (($s) + 6|0); + $910 = ((($s)) + 6|0); HEAP8[$910>>0] = $909; $911 = (_bitshift64Lshr(($816|0),($817|0),14)|0); $912 = tempRet0; @@ -17953,12 +18714,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $917 = (_bitshift64Lshr(($824|0),($825|0),1)|0); $918 = tempRet0; $919 = $917&255; - $920 = (($s) + 8|0); + $920 = ((($s)) + 8|0); HEAP8[$920>>0] = $919; $921 = (_bitshift64Lshr(($824|0),($825|0),9)|0); $922 = tempRet0; $923 = $921&255; - $924 = (($s) + 9|0); + $924 = ((($s)) + 9|0); HEAP8[$924>>0] = $923; $925 = (_bitshift64Lshr(($824|0),($825|0),17)|0); $926 = tempRet0; @@ -17971,12 +18732,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $931 = (_bitshift64Lshr(($832|0),($833|0),4)|0); $932 = tempRet0; $933 = $931&255; - $934 = (($s) + 11|0); + $934 = ((($s)) + 11|0); HEAP8[$934>>0] = $933; $935 = (_bitshift64Lshr(($832|0),($833|0),12)|0); $936 = tempRet0; $937 = $935&255; - $938 = (($s) + 12|0); + $938 = ((($s)) + 12|0); HEAP8[$938>>0] = $937; $939 = (_bitshift64Lshr(($832|0),($833|0),20)|0); $940 = tempRet0; @@ -17989,7 +18750,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $945 = (_bitshift64Lshr(($840|0),($841|0),7)|0); $946 = tempRet0; $947 = $945&255; - $948 = (($s) + 14|0); + $948 = ((($s)) + 14|0); HEAP8[$948>>0] = $947; $949 = (_bitshift64Lshr(($840|0),($841|0),15)|0); $950 = tempRet0; @@ -18002,12 +18763,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $955 = (_bitshift64Lshr(($848|0),($849|0),2)|0); $956 = tempRet0; $957 = $955&255; - $958 = (($s) + 16|0); + $958 = ((($s)) + 16|0); HEAP8[$958>>0] = $957; $959 = (_bitshift64Lshr(($848|0),($849|0),10)|0); $960 = tempRet0; $961 = $959&255; - $962 = (($s) + 17|0); + $962 = ((($s)) + 17|0); HEAP8[$962>>0] = $961; $963 = (_bitshift64Lshr(($848|0),($849|0),18)|0); $964 = tempRet0; @@ -18020,19 +18781,19 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $969 = (_bitshift64Lshr(($856|0),($857|0),5)|0); $970 = tempRet0; $971 = $969&255; - $972 = (($s) + 19|0); + $972 = ((($s)) + 19|0); HEAP8[$972>>0] = $971; $973 = (_bitshift64Lshr(($856|0),($857|0),13)|0); $974 = tempRet0; $975 = $973&255; - $976 = (($s) + 20|0); + $976 = ((($s)) + 20|0); HEAP8[$976>>0] = $975; $977 = $864&255; HEAP8[$45>>0] = $977; $978 = (_bitshift64Lshr(($864|0),($865|0),8)|0); $979 = tempRet0; $980 = $978&255; - $981 = (($s) + 22|0); + $981 = ((($s)) + 22|0); HEAP8[$981>>0] = $980; $982 = (_bitshift64Lshr(($864|0),($865|0),16)|0); $983 = tempRet0; @@ -18045,12 +18806,12 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $988 = (_bitshift64Lshr(($872|0),($873|0),3)|0); $989 = tempRet0; $990 = $988&255; - $991 = (($s) + 24|0); + $991 = ((($s)) + 24|0); HEAP8[$991>>0] = $990; $992 = (_bitshift64Lshr(($872|0),($873|0),11)|0); $993 = tempRet0; $994 = $992&255; - $995 = (($s) + 25|0); + $995 = ((($s)) + 25|0); HEAP8[$995>>0] = $994; $996 = (_bitshift64Lshr(($872|0),($873|0),19)|0); $997 = tempRet0; @@ -18063,7 +18824,7 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $1002 = (_bitshift64Lshr(($880|0),($881|0),6)|0); $1003 = tempRet0; $1004 = $1002&255; - $1005 = (($s) + 27|0); + $1005 = ((($s)) + 27|0); HEAP8[$1005>>0] = $1004; $1006 = (_bitshift64Lshr(($880|0),($881|0),14)|0); $1007 = tempRet0; @@ -18076,18 +18837,18 @@ function _crypto_sign_ed25519_ref10_sc_reduce($s) { $1012 = (_bitshift64Lshr(($876|0),($877|0),1)|0); $1013 = tempRet0; $1014 = $1012&255; - $1015 = (($s) + 29|0); + $1015 = ((($s)) + 29|0); HEAP8[$1015>>0] = $1014; $1016 = (_bitshift64Lshr(($876|0),($877|0),9)|0); $1017 = tempRet0; $1018 = $1016&255; - $1019 = (($s) + 30|0); + $1019 = ((($s)) + 30|0); HEAP8[$1019>>0] = $1018; $1020 = (_bitshift64Lshr(($876|0),($877|0),17)|0); $1021 = tempRet0; $1022 = $1020&255; HEAP8[$67>>0] = $1022; - STACKTOP = sp;return; + return; } function _load_351($in) { $in = $in|0; @@ -18095,21 +18856,21 @@ function _load_351($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - tempRet0 = $14; - STACKTOP = sp;return ($13|0); + tempRet0 = ($14); + return ($13|0); } function _load_452($in) { $in = $in|0; @@ -18118,43 +18879,43 @@ function _load_452($in) { sp = STACKTOP; $0 = HEAP8[$in>>0]|0; $1 = $0&255; - $2 = (($in) + 1|0); + $2 = ((($in)) + 1|0); $3 = HEAP8[$2>>0]|0; $4 = $3&255; $5 = (_bitshift64Shl(($4|0),0,8)|0); $6 = tempRet0; $7 = $5 | $1; - $8 = (($in) + 2|0); + $8 = ((($in)) + 2|0); $9 = HEAP8[$8>>0]|0; $10 = $9&255; $11 = (_bitshift64Shl(($10|0),0,16)|0); $12 = tempRet0; $13 = $7 | $11; $14 = $6 | $12; - $15 = (($in) + 3|0); + $15 = ((($in)) + 3|0); $16 = HEAP8[$15>>0]|0; $17 = $16&255; $18 = (_bitshift64Shl(($17|0),0,24)|0); $19 = tempRet0; $20 = $13 | $18; $21 = $14 | $19; - tempRet0 = $21; - STACKTOP = sp;return ($20|0); + tempRet0 = ($21); + return ($20|0); } function _sph_sha512_init($cc) { $cc = $cc|0; var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; - $0 = (($cc) + 128|0); - dest=$0+0|0; src=31840+0|0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $1 = (($cc) + 192|0); + $0 = ((($cc)) + 128|0); + dest=$0; src=8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $1 = ((($cc)) + 192|0); $2 = $1; $3 = $2; HEAP32[$3>>2] = 0; $4 = (($2) + 4)|0; $5 = $4; HEAP32[$5>>2] = 0; - STACKTOP = sp;return; + return; } function _sph_sha384($cc,$data,$len) { $cc = $cc|0; @@ -18163,10 +18924,10 @@ function _sph_sha384($cc,$data,$len) { var $$01$ = 0, $$012 = 0, $$03 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $current$04 = 0, $current$1 = 0, label = 0, sp = 0; sp = STACKTOP; - $0 = (($cc) + 192|0); + $0 = ((($cc)) + 192|0); $1 = ($len|0)==(0); if ($1) { - STACKTOP = sp;return; + return; } $2 = $0; $3 = $2; @@ -18175,7 +18936,7 @@ function _sph_sha384($cc,$data,$len) { $6 = $5; $7 = HEAP32[$6>>2]|0; $8 = $4 & 127; - $9 = (($cc) + 128|0); + $9 = ((($cc)) + 128|0); $$012 = $len;$$03 = $data;$current$04 = $8; while(1) { $10 = (128 - ($current$04))|0; @@ -18214,7 +18975,7 @@ function _sph_sha384($cc,$data,$len) { $$012 = $15;$$03 = $13;$current$04 = $current$1; } } - STACKTOP = sp;return; + return; } function _sph_sha512_close($cc,$dst) { $cc = $cc|0; @@ -18223,7 +18984,7 @@ function _sph_sha512_close($cc,$dst) { sp = STACKTOP; _sha384_close($cc,$dst,8); _sph_sha512_init($cc); - STACKTOP = sp;return; + return; } function _sha3_round($data,$r) { $data = $data|0; @@ -18275,8 +19036,8 @@ function _sha3_round($data,$r) { var $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0; var $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0; var $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0; - var $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $W = 0, $exitcond = 0, $exitcond19 = 0, $i$011 = 0, $i$110 = 0, $i$29 = 0; - var label = 0, sp = 0; + var $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0; + var $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $98 = 0, $99 = 0, $W = 0, $exitcond = 0, $exitcond19 = 0, $i$011 = 0, $i$110 = 0, $i$29 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 640|0; $W = sp; @@ -18398,56 +19159,56 @@ function _sha3_round($data,$r) { $93 = (($90) + 4)|0; $94 = $93; $95 = HEAP32[$94>>2]|0; - $96 = (($r) + 8|0); + $96 = ((($r)) + 8|0); $97 = $96; $98 = $97; $99 = HEAP32[$98>>2]|0; $100 = (($97) + 4)|0; $101 = $100; $102 = HEAP32[$101>>2]|0; - $103 = (($r) + 16|0); + $103 = ((($r)) + 16|0); $104 = $103; $105 = $104; $106 = HEAP32[$105>>2]|0; $107 = (($104) + 4)|0; $108 = $107; $109 = HEAP32[$108>>2]|0; - $110 = (($r) + 24|0); + $110 = ((($r)) + 24|0); $111 = $110; $112 = $111; $113 = HEAP32[$112>>2]|0; $114 = (($111) + 4)|0; $115 = $114; $116 = HEAP32[$115>>2]|0; - $117 = (($r) + 32|0); + $117 = ((($r)) + 32|0); $118 = $117; $119 = $118; $120 = HEAP32[$119>>2]|0; $121 = (($118) + 4)|0; $122 = $121; $123 = HEAP32[$122>>2]|0; - $124 = (($r) + 40|0); + $124 = ((($r)) + 40|0); $125 = $124; $126 = $125; $127 = HEAP32[$126>>2]|0; $128 = (($125) + 4)|0; $129 = $128; $130 = HEAP32[$129>>2]|0; - $131 = (($r) + 48|0); + $131 = ((($r)) + 48|0); $132 = $131; $133 = $132; $134 = HEAP32[$133>>2]|0; $135 = (($132) + 4)|0; $136 = $135; $137 = HEAP32[$136>>2]|0; - $138 = (($r) + 56|0); + $138 = ((($r)) + 56|0); $139 = $138; $140 = $139; $141 = HEAP32[$140>>2]|0; $142 = (($139) + 4)|0; $143 = $142; $144 = HEAP32[$143>>2]|0; - $145 = $120;$146 = $123;$170 = $134;$171 = $127;$173 = $137;$174 = $130;$193 = $141;$194 = $144;$203 = $92;$204 = $95;$228 = $99;$230 = $102;$234 = $106;$236 = $109;$241 = $113;$242 = $116;$i$29 = 0; + $145 = $120;$146 = $123;$170 = $127;$171 = $134;$173 = $130;$174 = $137;$193 = $141;$194 = $144;$203 = $92;$204 = $95;$228 = $99;$230 = $102;$234 = $106;$236 = $109;$241 = $113;$242 = $116;$i$29 = 0; while(1) { $147 = (_bitshift64Shl(($145|0),($146|0),50)|0); $148 = tempRet0; @@ -18471,13 +19232,13 @@ function _sha3_round($data,$r) { $166 = $162 | $164; $167 = $159 ^ $165; $168 = $160 ^ $166; - $169 = $171 ^ $170; - $172 = $174 ^ $173; + $169 = $170 ^ $171; + $172 = $173 ^ $174; $175 = $169 & $145; $176 = $172 & $146; - $177 = $175 ^ $170; - $178 = $176 ^ $173; - $179 = (31904 + ($i$29<<3)|0); + $177 = $175 ^ $171; + $178 = $176 ^ $174; + $179 = (72 + ($i$29<<3)|0); $180 = $179; $181 = $180; $182 = HEAP32[$181>>2]|0; @@ -18557,14 +19318,14 @@ function _sha3_round($data,$r) { $266 = $262 | $264; $267 = $259 ^ $265; $268 = $260 ^ $266; - $269 = $145 ^ $171; - $270 = $146 ^ $174; + $269 = $145 ^ $170; + $270 = $146 ^ $173; $271 = $243 & $269; $272 = $244 & $270; - $273 = $271 ^ $171; - $274 = $272 ^ $174; + $273 = $271 ^ $170; + $274 = $272 ^ $173; $275 = $i$29 | 1; - $276 = (31904 + ($275<<3)|0); + $276 = (72 + ($275<<3)|0); $277 = $276; $278 = $277; $279 = HEAP32[$278>>2]|0; @@ -18578,7 +19339,7 @@ function _sha3_round($data,$r) { $287 = (($284) + 4)|0; $288 = $287; $289 = HEAP32[$288>>2]|0; - $290 = (_i64Add(($279|0),($282|0),($170|0),($173|0))|0); + $290 = (_i64Add(($279|0),($282|0),($171|0),($174|0))|0); $291 = tempRet0; $292 = (_i64Add(($290|0),($291|0),($286|0),($289|0))|0); $293 = tempRet0; @@ -18651,7 +19412,7 @@ function _sha3_round($data,$r) { $360 = $358 ^ $145; $361 = $359 ^ $146; $362 = $i$29 | 2; - $363 = (31904 + ($362<<3)|0); + $363 = (72 + ($362<<3)|0); $364 = $363; $365 = $364; $366 = HEAP32[$365>>2]|0; @@ -18665,7 +19426,7 @@ function _sha3_round($data,$r) { $374 = (($371) + 4)|0; $375 = $374; $376 = HEAP32[$375>>2]|0; - $377 = (_i64Add(($366|0),($369|0),($171|0),($174|0))|0); + $377 = (_i64Add(($366|0),($369|0),($170|0),($173|0))|0); $378 = tempRet0; $379 = (_i64Add(($377|0),($378|0),($373|0),($376|0))|0); $380 = tempRet0; @@ -18738,7 +19499,7 @@ function _sha3_round($data,$r) { $447 = $445 ^ $243; $448 = $446 ^ $244; $449 = $i$29 | 3; - $450 = (31904 + ($449<<3)|0); + $450 = (72 + ($449<<3)|0); $451 = $450; $452 = $451; $453 = HEAP32[$452>>2]|0; @@ -18825,7 +19586,7 @@ function _sha3_round($data,$r) { $534 = $532 ^ $330; $535 = $533 ^ $331; $536 = $i$29 | 4; - $537 = (31904 + ($536<<3)|0); + $537 = (72 + ($536<<3)|0); $538 = $537; $539 = $538; $540 = HEAP32[$539>>2]|0; @@ -18912,7 +19673,7 @@ function _sha3_round($data,$r) { $621 = $619 ^ $417; $622 = $620 ^ $418; $623 = $i$29 | 5; - $624 = (31904 + ($623<<3)|0); + $624 = (72 + ($623<<3)|0); $625 = $624; $626 = $625; $627 = HEAP32[$626>>2]|0; @@ -18926,9 +19687,9 @@ function _sha3_round($data,$r) { $635 = (($632) + 4)|0; $636 = $635; $637 = HEAP32[$636>>2]|0; - $638 = (_i64Add(($627|0),($630|0),($330|0),($331|0))|0); + $638 = (_i64Add(($634|0),($637|0),($627|0),($630|0))|0); $639 = tempRet0; - $640 = (_i64Add(($638|0),($639|0),($634|0),($637|0))|0); + $640 = (_i64Add(($638|0),($639|0),($330|0),($331|0))|0); $641 = tempRet0; $642 = (_i64Add(($640|0),($641|0),($621|0),($622|0))|0); $643 = tempRet0; @@ -18999,7 +19760,7 @@ function _sha3_round($data,$r) { $708 = $706 ^ $504; $709 = $707 ^ $505; $710 = $i$29 | 6; - $711 = (31904 + ($710<<3)|0); + $711 = (72 + ($710<<3)|0); $712 = $711; $713 = $712; $714 = HEAP32[$713>>2]|0; @@ -19086,7 +19847,7 @@ function _sha3_round($data,$r) { $795 = $793 ^ $591; $796 = $794 ^ $592; $797 = $i$29 | 7; - $798 = (31904 + ($797<<3)|0); + $798 = (72 + ($797<<3)|0); $799 = $798; $800 = $799; $801 = HEAP32[$800>>2]|0; @@ -19147,8 +19908,9 @@ function _sha3_round($data,$r) { $856 = (($i$29) + 8)|0; $857 = ($856|0)<(80); if ($857) { - $145 = $852;$146 = $853;$170 = $678;$171 = $765;$173 = $679;$174 = $766;$193 = $591;$194 = $592;$203 = $854;$204 = $855;$228 = $767;$230 = $768;$234 = $680;$236 = $681;$241 = $593;$242 = $594;$i$29 = $856; + $145 = $852;$146 = $853;$170 = $765;$171 = $678;$173 = $766;$174 = $679;$193 = $591;$194 = $592;$203 = $854;$204 = $855;$228 = $767;$230 = $768;$234 = $680;$236 = $681;$241 = $593;$242 = $594;$i$29 = $856; } else { + $864 = $854;$865 = $855;$878 = $767;$879 = $768;$892 = $680;$893 = $681;$906 = $593;$907 = $594;$920 = $852;$921 = $853;$934 = $765;$935 = $766;$948 = $678;$949 = $679;$962 = $591;$963 = $592; break; } } @@ -19158,112 +19920,112 @@ function _sha3_round($data,$r) { $861 = (($858) + 4)|0; $862 = $861; $863 = HEAP32[$862>>2]|0; - $864 = (_i64Add(($860|0),($863|0),($854|0),($855|0))|0); - $865 = tempRet0; - $866 = $r; - $867 = $866; - HEAP32[$867>>2] = $864; - $868 = (($866) + 4)|0; + $866 = (_i64Add(($860|0),($863|0),($864|0),($865|0))|0); + $867 = tempRet0; + $868 = $r; $869 = $868; - HEAP32[$869>>2] = $865; - $870 = $96; + HEAP32[$869>>2] = $866; + $870 = (($868) + 4)|0; $871 = $870; - $872 = HEAP32[$871>>2]|0; - $873 = (($870) + 4)|0; - $874 = $873; - $875 = HEAP32[$874>>2]|0; - $876 = (_i64Add(($872|0),($875|0),($767|0),($768|0))|0); - $877 = tempRet0; - $878 = $96; - $879 = $878; - HEAP32[$879>>2] = $876; - $880 = (($878) + 4)|0; - $881 = $880; - HEAP32[$881>>2] = $877; - $882 = $103; + HEAP32[$871>>2] = $867; + $872 = $96; + $873 = $872; + $874 = HEAP32[$873>>2]|0; + $875 = (($872) + 4)|0; + $876 = $875; + $877 = HEAP32[$876>>2]|0; + $880 = (_i64Add(($874|0),($877|0),($878|0),($879|0))|0); + $881 = tempRet0; + $882 = $96; $883 = $882; - $884 = HEAP32[$883>>2]|0; - $885 = (($882) + 4)|0; - $886 = $885; - $887 = HEAP32[$886>>2]|0; - $888 = (_i64Add(($884|0),($887|0),($680|0),($681|0))|0); - $889 = tempRet0; - $890 = $103; - $891 = $890; - HEAP32[$891>>2] = $888; - $892 = (($890) + 4)|0; - $893 = $892; - HEAP32[$893>>2] = $889; - $894 = $110; - $895 = $894; - $896 = HEAP32[$895>>2]|0; - $897 = (($894) + 4)|0; - $898 = $897; - $899 = HEAP32[$898>>2]|0; - $900 = (_i64Add(($896|0),($899|0),($593|0),($594|0))|0); - $901 = tempRet0; - $902 = $110; - $903 = $902; - HEAP32[$903>>2] = $900; - $904 = (($902) + 4)|0; - $905 = $904; - HEAP32[$905>>2] = $901; - $906 = $117; - $907 = $906; - $908 = HEAP32[$907>>2]|0; - $909 = (($906) + 4)|0; - $910 = $909; - $911 = HEAP32[$910>>2]|0; - $912 = (_i64Add(($908|0),($911|0),($852|0),($853|0))|0); - $913 = tempRet0; + HEAP32[$883>>2] = $880; + $884 = (($882) + 4)|0; + $885 = $884; + HEAP32[$885>>2] = $881; + $886 = $103; + $887 = $886; + $888 = HEAP32[$887>>2]|0; + $889 = (($886) + 4)|0; + $890 = $889; + $891 = HEAP32[$890>>2]|0; + $894 = (_i64Add(($888|0),($891|0),($892|0),($893|0))|0); + $895 = tempRet0; + $896 = $103; + $897 = $896; + HEAP32[$897>>2] = $894; + $898 = (($896) + 4)|0; + $899 = $898; + HEAP32[$899>>2] = $895; + $900 = $110; + $901 = $900; + $902 = HEAP32[$901>>2]|0; + $903 = (($900) + 4)|0; + $904 = $903; + $905 = HEAP32[$904>>2]|0; + $908 = (_i64Add(($902|0),($905|0),($906|0),($907|0))|0); + $909 = tempRet0; + $910 = $110; + $911 = $910; + HEAP32[$911>>2] = $908; + $912 = (($910) + 4)|0; + $913 = $912; + HEAP32[$913>>2] = $909; $914 = $117; $915 = $914; - HEAP32[$915>>2] = $912; - $916 = (($914) + 4)|0; - $917 = $916; - HEAP32[$917>>2] = $913; - $918 = $124; - $919 = $918; - $920 = HEAP32[$919>>2]|0; - $921 = (($918) + 4)|0; - $922 = $921; - $923 = HEAP32[$922>>2]|0; - $924 = (_i64Add(($920|0),($923|0),($765|0),($766|0))|0); - $925 = tempRet0; - $926 = $124; + $916 = HEAP32[$915>>2]|0; + $917 = (($914) + 4)|0; + $918 = $917; + $919 = HEAP32[$918>>2]|0; + $922 = (_i64Add(($916|0),($919|0),($920|0),($921|0))|0); + $923 = tempRet0; + $924 = $117; + $925 = $924; + HEAP32[$925>>2] = $922; + $926 = (($924) + 4)|0; $927 = $926; - HEAP32[$927>>2] = $924; - $928 = (($926) + 4)|0; + HEAP32[$927>>2] = $923; + $928 = $124; $929 = $928; - HEAP32[$929>>2] = $925; - $930 = $131; - $931 = $930; - $932 = HEAP32[$931>>2]|0; - $933 = (($930) + 4)|0; - $934 = $933; - $935 = HEAP32[$934>>2]|0; - $936 = (_i64Add(($932|0),($935|0),($678|0),($679|0))|0); + $930 = HEAP32[$929>>2]|0; + $931 = (($928) + 4)|0; + $932 = $931; + $933 = HEAP32[$932>>2]|0; + $936 = (_i64Add(($930|0),($933|0),($934|0),($935|0))|0); $937 = tempRet0; - $938 = $131; + $938 = $124; $939 = $938; HEAP32[$939>>2] = $936; $940 = (($938) + 4)|0; $941 = $940; HEAP32[$941>>2] = $937; - $942 = $138; + $942 = $131; $943 = $942; $944 = HEAP32[$943>>2]|0; $945 = (($942) + 4)|0; $946 = $945; $947 = HEAP32[$946>>2]|0; - $948 = (_i64Add(($944|0),($947|0),($591|0),($592|0))|0); - $949 = tempRet0; - $950 = $138; - $951 = $950; - HEAP32[$951>>2] = $948; - $952 = (($950) + 4)|0; + $950 = (_i64Add(($944|0),($947|0),($948|0),($949|0))|0); + $951 = tempRet0; + $952 = $131; $953 = $952; - HEAP32[$953>>2] = $949; + HEAP32[$953>>2] = $950; + $954 = (($952) + 4)|0; + $955 = $954; + HEAP32[$955>>2] = $951; + $956 = $138; + $957 = $956; + $958 = HEAP32[$957>>2]|0; + $959 = (($956) + 4)|0; + $960 = $959; + $961 = HEAP32[$960>>2]|0; + $964 = (_i64Add(($958|0),($961|0),($962|0),($963|0))|0); + $965 = tempRet0; + $966 = $138; + $967 = $966; + HEAP32[$967>>2] = $964; + $968 = (($966) + 4)|0; + $969 = $968; + HEAP32[$969>>2] = $965; STACKTOP = sp;return; } function _sha384_close($cc,$dst,$rnum) { @@ -19273,7 +20035,7 @@ function _sha384_close($cc,$dst,$rnum) { var label = 0, sp = 0; sp = STACKTOP; _sha384_addbits_and_close($cc,0,0,$dst,$rnum); - STACKTOP = sp;return; + return; } function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { $cc = $cc|0; @@ -19285,7 +20047,7 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $u$01 = 0, dest = 0, label = 0, sp = 0, stop = 0; sp = STACKTOP; - $0 = (($cc) + 192|0); + $0 = ((($cc)) + 192|0); $1 = $0; $2 = $1; $3 = HEAP32[$2>>2]|0; @@ -19306,14 +20068,14 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { if ($15) { $17 = $7 ^ 127; _memset(($16|0),0,($17|0))|0; - $18 = (($cc) + 128|0); + $18 = ((($cc)) + 128|0); _sha3_round($cc,$18); - dest=$cc+0|0; stop=dest+112|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); + dest=$cc; stop=dest+112|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); } else { $19 = (111 - ($7))|0; _memset(($16|0),0,($19|0))|0; } - $20 = (($cc) + 112|0); + $20 = ((($cc)) + 112|0); $21 = $0; $22 = $21; $23 = HEAP32[$22>>2]|0; @@ -19323,7 +20085,7 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { $27 = (_bitshift64Lshr(($23|0),($26|0),61)|0); $28 = tempRet0; _sph_enc64be_aligned($20,$27,$28); - $29 = (($cc) + 120|0); + $29 = ((($cc)) + 120|0); $30 = $0; $31 = $30; $32 = HEAP32[$31>>2]|0; @@ -19335,11 +20097,11 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { $38 = (_i64Add(($36|0),($37|0),($n|0),0)|0); $39 = tempRet0; _sph_enc64be_aligned($29,$38,$39); - $40 = (($cc) + 128|0); + $40 = ((($cc)) + 128|0); _sha3_round($cc,$40); $41 = ($rnum|0)==(0); if ($41) { - STACKTOP = sp;return; + return; } else { $u$01 = 0; } @@ -19362,7 +20124,95 @@ function _sha384_addbits_and_close($cc,$ub,$n,$dst,$rnum) { $u$01 = $51; } } - STACKTOP = sp;return; + return; +} +function _sph_enc64be_aligned($dst,$0,$1) { + $dst = $dst|0; + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); + $3 = tempRet0; + $4 = $2&255; + HEAP8[$dst>>0] = $4; + $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); + $6 = tempRet0; + $7 = $5&255; + $8 = ((($dst)) + 1|0); + HEAP8[$8>>0] = $7; + $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); + $10 = tempRet0; + $11 = $9&255; + $12 = ((($dst)) + 2|0); + HEAP8[$12>>0] = $11; + $13 = $1&255; + $14 = ((($dst)) + 3|0); + HEAP8[$14>>0] = $13; + $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); + $16 = tempRet0; + $17 = $15&255; + $18 = ((($dst)) + 4|0); + HEAP8[$18>>0] = $17; + $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); + $20 = tempRet0; + $21 = $19&255; + $22 = ((($dst)) + 5|0); + HEAP8[$22>>0] = $21; + $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); + $24 = tempRet0; + $25 = $23&255; + $26 = ((($dst)) + 6|0); + HEAP8[$26>>0] = $25; + $27 = $0&255; + $28 = ((($dst)) + 7|0); + HEAP8[$28>>0] = $27; + return; +} +function _sph_enc64be($dst,$0,$1) { + $dst = $dst|0; + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); + $3 = tempRet0; + $4 = $2&255; + HEAP8[$dst>>0] = $4; + $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); + $6 = tempRet0; + $7 = $5&255; + $8 = ((($dst)) + 1|0); + HEAP8[$8>>0] = $7; + $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); + $10 = tempRet0; + $11 = $9&255; + $12 = ((($dst)) + 2|0); + HEAP8[$12>>0] = $11; + $13 = $1&255; + $14 = ((($dst)) + 3|0); + HEAP8[$14>>0] = $13; + $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); + $16 = tempRet0; + $17 = $15&255; + $18 = ((($dst)) + 4|0); + HEAP8[$18>>0] = $17; + $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); + $20 = tempRet0; + $21 = $19&255; + $22 = ((($dst)) + 5|0); + HEAP8[$22>>0] = $21; + $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); + $24 = tempRet0; + $25 = $23&255; + $26 = ((($dst)) + 6|0); + HEAP8[$26>>0] = $25; + $27 = $0&255; + $28 = ((($dst)) + 7|0); + HEAP8[$28>>0] = $27; + return; } function _sph_dec64be_aligned($src) { $src = $src|0; @@ -19374,233 +20224,538 @@ function _sph_dec64be_aligned($src) { $1 = $0&255; $2 = (_bitshift64Shl(($1|0),0,56)|0); $3 = tempRet0; - $4 = (($src) + 1|0); + $4 = ((($src)) + 1|0); $5 = HEAP8[$4>>0]|0; $6 = $5&255; $7 = (_bitshift64Shl(($6|0),0,48)|0); $8 = tempRet0; $9 = $7 | $2; $10 = $8 | $3; - $11 = (($src) + 2|0); + $11 = ((($src)) + 2|0); $12 = HEAP8[$11>>0]|0; $13 = $12&255; $14 = (_bitshift64Shl(($13|0),0,40)|0); $15 = tempRet0; $16 = $9 | $14; $17 = $10 | $15; - $18 = (($src) + 3|0); + $18 = ((($src)) + 3|0); $19 = HEAP8[$18>>0]|0; $20 = $19&255; $21 = $17 | $20; - $22 = (($src) + 4|0); + $22 = ((($src)) + 4|0); $23 = HEAP8[$22>>0]|0; $24 = $23&255; $25 = (_bitshift64Shl(($24|0),0,24)|0); $26 = tempRet0; $27 = $16 | $25; $28 = $21 | $26; - $29 = (($src) + 5|0); + $29 = ((($src)) + 5|0); $30 = HEAP8[$29>>0]|0; $31 = $30&255; $32 = (_bitshift64Shl(($31|0),0,16)|0); $33 = tempRet0; $34 = $27 | $32; $35 = $28 | $33; - $36 = (($src) + 6|0); + $36 = ((($src)) + 6|0); $37 = HEAP8[$36>>0]|0; $38 = $37&255; $39 = (_bitshift64Shl(($38|0),0,8)|0); $40 = tempRet0; $41 = $34 | $39; $42 = $35 | $40; - $43 = (($src) + 7|0); + $43 = ((($src)) + 7|0); $44 = HEAP8[$43>>0]|0; $45 = $44&255; $46 = $41 | $45; - tempRet0 = $42; - STACKTOP = sp;return ($46|0); + tempRet0 = ($42); + return ($46|0); } -function _sph_enc64be_aligned($dst,$0,$1) { - $dst = $dst|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; +function ___errno_location() { + var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; sp = STACKTOP; - $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); - $3 = tempRet0; - $4 = $2&255; - HEAP8[$dst>>0] = $4; - $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); - $6 = tempRet0; - $7 = $5&255; - $8 = (($dst) + 1|0); - HEAP8[$8>>0] = $7; - $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); - $10 = tempRet0; - $11 = $9&255; - $12 = (($dst) + 2|0); - HEAP8[$12>>0] = $11; - $13 = $1&255; - $14 = (($dst) + 3|0); - HEAP8[$14>>0] = $13; - $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); - $16 = tempRet0; - $17 = $15&255; - $18 = (($dst) + 4|0); - HEAP8[$18>>0] = $17; - $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); - $20 = tempRet0; - $21 = $19&255; - $22 = (($dst) + 5|0); - HEAP8[$22>>0] = $21; - $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); - $24 = tempRet0; - $25 = $23&255; - $26 = (($dst) + 6|0); - HEAP8[$26>>0] = $25; - $27 = $0&255; - $28 = (($dst) + 7|0); - HEAP8[$28>>0] = $27; - STACKTOP = sp;return; + $0 = HEAP32[32512>>2]|0; + $1 = ($0|0)==(0|0); + if ($1) { + $$0 = 32560; + } else { + $2 = (_pthread_self()|0); + $3 = ((($2)) + 60|0); + $4 = HEAP32[$3>>2]|0; + $$0 = $4; + } + return ($$0|0); } -function _sph_enc64be($dst,$0,$1) { - $dst = $dst|0; - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; +function ___syscall_ret($r) { + $r = $r|0; + var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; sp = STACKTOP; - $2 = (_bitshift64Lshr(($0|0),($1|0),56)|0); - $3 = tempRet0; - $4 = $2&255; - HEAP8[$dst>>0] = $4; - $5 = (_bitshift64Lshr(($0|0),($1|0),48)|0); - $6 = tempRet0; - $7 = $5&255; - $8 = (($dst) + 1|0); - HEAP8[$8>>0] = $7; - $9 = (_bitshift64Lshr(($0|0),($1|0),40)|0); - $10 = tempRet0; - $11 = $9&255; - $12 = (($dst) + 2|0); - HEAP8[$12>>0] = $11; - $13 = $1&255; - $14 = (($dst) + 3|0); - HEAP8[$14>>0] = $13; - $15 = (_bitshift64Lshr(($0|0),($1|0),24)|0); - $16 = tempRet0; - $17 = $15&255; - $18 = (($dst) + 4|0); - HEAP8[$18>>0] = $17; - $19 = (_bitshift64Lshr(($0|0),($1|0),16)|0); - $20 = tempRet0; - $21 = $19&255; - $22 = (($dst) + 5|0); - HEAP8[$22>>0] = $21; - $23 = (_bitshift64Lshr(($0|0),($1|0),8)|0); - $24 = tempRet0; - $25 = $23&255; - $26 = (($dst) + 6|0); - HEAP8[$26>>0] = $25; - $27 = $0&255; - $28 = (($dst) + 7|0); - HEAP8[$28>>0] = $27; - STACKTOP = sp;return; + $0 = ($r>>>0)>(4294963200); + if ($0) { + $1 = (0 - ($r))|0; + $2 = (___errno_location()|0); + HEAP32[$2>>2] = $1; + $$0 = -1; + } else { + $$0 = $r; + } + return ($$0|0); +} +function ___lockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return 0; +} +function ___unlockfile($f) { + $f = $f|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function ___stdio_close($f) { + $f = $f|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; + $vararg_buffer = sp; + $0 = ((($f)) + 60|0); + $1 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $1; + $2 = (___syscall6(6,($vararg_buffer|0))|0); + $3 = (___syscall_ret($2)|0); + STACKTOP = sp;return ($3|0); +} +function ___stdio_seek($f,$off,$whence) { + $f = $f|0; + $off = $off|0; + $whence = $whence|0; + var $$pre = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $ret = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr4 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; + $vararg_buffer = sp; + $ret = sp + 20|0; + $0 = ((($f)) + 60|0); + $1 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $1; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 0; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $off; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $ret; + $vararg_ptr4 = ((($vararg_buffer)) + 16|0); + HEAP32[$vararg_ptr4>>2] = $whence; + $2 = (___syscall140(140,($vararg_buffer|0))|0); + $3 = (___syscall_ret($2)|0); + $4 = ($3|0)<(0); + if ($4) { + HEAP32[$ret>>2] = -1; + $5 = -1; + } else { + $$pre = HEAP32[$ret>>2]|0; + $5 = $$pre; + } + STACKTOP = sp;return ($5|0); +} +function ___stdio_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $$0 = 0, $$phi$trans$insert = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cnt$0 = 0, $cnt$1 = 0, $iov$0 = 0, $iov$0$lcssa11 = 0, $iov$1 = 0, $iovcnt$0 = 0; + var $iovcnt$0$lcssa12 = 0, $iovcnt$1 = 0, $iovs = 0, $rem$0 = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $vararg_ptr7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer = sp; + $iovs = sp + 32|0; + $0 = ((($f)) + 28|0); + $1 = HEAP32[$0>>2]|0; + HEAP32[$iovs>>2] = $1; + $2 = ((($iovs)) + 4|0); + $3 = ((($f)) + 20|0); + $4 = HEAP32[$3>>2]|0; + $5 = $4; + $6 = (($5) - ($1))|0; + HEAP32[$2>>2] = $6; + $7 = ((($iovs)) + 8|0); + HEAP32[$7>>2] = $buf; + $8 = ((($iovs)) + 12|0); + HEAP32[$8>>2] = $len; + $9 = (($6) + ($len))|0; + $10 = ((($f)) + 60|0); + $11 = ((($f)) + 44|0); + $iov$0 = $iovs;$iovcnt$0 = 2;$rem$0 = $9; + while(1) { + $12 = HEAP32[32512>>2]|0; + $13 = ($12|0)==(0|0); + if ($13) { + $17 = HEAP32[$10>>2]|0; + HEAP32[$vararg_buffer3>>2] = $17; + $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr6>>2] = $iov$0; + $vararg_ptr7 = ((($vararg_buffer3)) + 8|0); + HEAP32[$vararg_ptr7>>2] = $iovcnt$0; + $18 = (___syscall146(146,($vararg_buffer3|0))|0); + $19 = (___syscall_ret($18)|0); + $cnt$0 = $19; + } else { + _pthread_cleanup_push((1|0),($f|0)); + $14 = HEAP32[$10>>2]|0; + HEAP32[$vararg_buffer>>2] = $14; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $iov$0; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $iovcnt$0; + $15 = (___syscall146(146,($vararg_buffer|0))|0); + $16 = (___syscall_ret($15)|0); + _pthread_cleanup_pop(0); + $cnt$0 = $16; + } + $20 = ($rem$0|0)==($cnt$0|0); + if ($20) { + label = 6; + break; + } + $27 = ($cnt$0|0)<(0); + if ($27) { + $iov$0$lcssa11 = $iov$0;$iovcnt$0$lcssa12 = $iovcnt$0; + label = 8; + break; + } + $35 = (($rem$0) - ($cnt$0))|0; + $36 = ((($iov$0)) + 4|0); + $37 = HEAP32[$36>>2]|0; + $38 = ($cnt$0>>>0)>($37>>>0); + if ($38) { + $39 = HEAP32[$11>>2]|0; + HEAP32[$0>>2] = $39; + HEAP32[$3>>2] = $39; + $40 = (($cnt$0) - ($37))|0; + $41 = ((($iov$0)) + 8|0); + $42 = (($iovcnt$0) + -1)|0; + $$phi$trans$insert = ((($iov$0)) + 12|0); + $$pre = HEAP32[$$phi$trans$insert>>2]|0; + $50 = $$pre;$cnt$1 = $40;$iov$1 = $41;$iovcnt$1 = $42; + } else { + $43 = ($iovcnt$0|0)==(2); + if ($43) { + $44 = HEAP32[$0>>2]|0; + $45 = (($44) + ($cnt$0)|0); + HEAP32[$0>>2] = $45; + $50 = $37;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = 2; + } else { + $50 = $37;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = $iovcnt$0; + } + } + $46 = HEAP32[$iov$1>>2]|0; + $47 = (($46) + ($cnt$1)|0); + HEAP32[$iov$1>>2] = $47; + $48 = ((($iov$1)) + 4|0); + $49 = (($50) - ($cnt$1))|0; + HEAP32[$48>>2] = $49; + $iov$0 = $iov$1;$iovcnt$0 = $iovcnt$1;$rem$0 = $35; + } + if ((label|0) == 6) { + $21 = HEAP32[$11>>2]|0; + $22 = ((($f)) + 48|0); + $23 = HEAP32[$22>>2]|0; + $24 = (($21) + ($23)|0); + $25 = ((($f)) + 16|0); + HEAP32[$25>>2] = $24; + $26 = $21; + HEAP32[$0>>2] = $26; + HEAP32[$3>>2] = $26; + $$0 = $len; + } + else if ((label|0) == 8) { + $28 = ((($f)) + 16|0); + HEAP32[$28>>2] = 0; + HEAP32[$0>>2] = 0; + HEAP32[$3>>2] = 0; + $29 = HEAP32[$f>>2]|0; + $30 = $29 | 32; + HEAP32[$f>>2] = $30; + $31 = ($iovcnt$0$lcssa12|0)==(2); + if ($31) { + $$0 = 0; + } else { + $32 = ((($iov$0$lcssa11)) + 4|0); + $33 = HEAP32[$32>>2]|0; + $34 = (($len) - ($33))|0; + $$0 = $34; + } + } + STACKTOP = sp;return ($$0|0); +} +function ___stdout_write($f,$buf,$len) { + $f = $f|0; + $buf = $buf|0; + $len = $len|0; + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tio = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; + $vararg_buffer = sp; + $tio = sp + 12|0; + $0 = ((($f)) + 36|0); + HEAP32[$0>>2] = 3; + $1 = HEAP32[$f>>2]|0; + $2 = $1 & 64; + $3 = ($2|0)==(0); + if ($3) { + $4 = ((($f)) + 60|0); + $5 = HEAP32[$4>>2]|0; + HEAP32[$vararg_buffer>>2] = $5; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = 21505; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $tio; + $6 = (___syscall54(54,($vararg_buffer|0))|0); + $7 = ($6|0)==(0); + if (!($7)) { + $8 = ((($f)) + 75|0); + HEAP8[$8>>0] = -1; + } + } + $9 = (___stdio_write($f,$buf,$len)|0); + STACKTOP = sp;return ($9|0); +} +function _fflush($f) { + $f = $f|0; + var $$0 = 0, $$01 = 0, $$012 = 0, $$014 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, $r$0$lcssa = 0, $r$03 = 0, $r$1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ($f|0)==(0|0); + do { + if ($0) { + $7 = HEAP32[32556>>2]|0; + $8 = ($7|0)==(0|0); + if ($8) { + $27 = 0; + } else { + $9 = HEAP32[32556>>2]|0; + $10 = (_fflush($9)|0); + $27 = $10; + } + ___lock(((32540)|0)); + $$012 = HEAP32[(32536)>>2]|0; + $11 = ($$012|0)==(0|0); + if ($11) { + $r$0$lcssa = $27; + } else { + $$014 = $$012;$r$03 = $27; + while(1) { + $12 = ((($$014)) + 76|0); + $13 = HEAP32[$12>>2]|0; + $14 = ($13|0)>(-1); + if ($14) { + $15 = (___lockfile($$014)|0); + $24 = $15; + } else { + $24 = 0; + } + $16 = ((($$014)) + 20|0); + $17 = HEAP32[$16>>2]|0; + $18 = ((($$014)) + 28|0); + $19 = HEAP32[$18>>2]|0; + $20 = ($17>>>0)>($19>>>0); + if ($20) { + $21 = (___fflush_unlocked($$014)|0); + $22 = $21 | $r$03; + $r$1 = $22; + } else { + $r$1 = $r$03; + } + $23 = ($24|0)==(0); + if (!($23)) { + ___unlockfile($$014); + } + $25 = ((($$014)) + 56|0); + $$01 = HEAP32[$25>>2]|0; + $26 = ($$01|0)==(0|0); + if ($26) { + $r$0$lcssa = $r$1; + break; + } else { + $$014 = $$01;$r$03 = $r$1; + } + } + } + ___unlock(((32540)|0)); + $$0 = $r$0$lcssa; + } else { + $1 = ((($f)) + 76|0); + $2 = HEAP32[$1>>2]|0; + $3 = ($2|0)>(-1); + if (!($3)) { + $4 = (___fflush_unlocked($f)|0); + $$0 = $4; + break; + } + $5 = (___lockfile($f)|0); + $phitmp = ($5|0)==(0); + $6 = (___fflush_unlocked($f)|0); + if ($phitmp) { + $$0 = $6; + } else { + ___unlockfile($f); + $$0 = $6; + } + } + } while(0); + return ($$0|0); +} +function _cleanup392($p) { + $p = $p|0; + var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ((($p)) + 68|0); + $1 = HEAP32[$0>>2]|0; + $2 = ($1|0)==(0); + if ($2) { + ___unlockfile($p); + } + return; +} +function ___fflush_unlocked($f) { + $f = $f|0; + var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = ((($f)) + 20|0); + $1 = HEAP32[$0>>2]|0; + $2 = ((($f)) + 28|0); + $3 = HEAP32[$2>>2]|0; + $4 = ($1>>>0)>($3>>>0); + if ($4) { + $5 = ((($f)) + 36|0); + $6 = HEAP32[$5>>2]|0; + (FUNCTION_TABLE_iiii[$6 & 3]($f,0,0)|0); + $7 = HEAP32[$0>>2]|0; + $8 = ($7|0)==(0|0); + if ($8) { + $$0 = -1; + } else { + label = 3; + } + } else { + label = 3; + } + if ((label|0) == 3) { + $9 = ((($f)) + 4|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($f)) + 8|0); + $12 = HEAP32[$11>>2]|0; + $13 = ($10>>>0)<($12>>>0); + if ($13) { + $14 = ((($f)) + 40|0); + $15 = HEAP32[$14>>2]|0; + $16 = $10; + $17 = $12; + $18 = (($16) - ($17))|0; + (FUNCTION_TABLE_iiii[$15 & 3]($f,$18,1)|0); + } + $19 = ((($f)) + 16|0); + HEAP32[$19>>2] = 0; + HEAP32[$2>>2] = 0; + HEAP32[$0>>2] = 0; + HEAP32[$11>>2] = 0; + HEAP32[$9>>2] = 0; + $$0 = 0; + } + return ($$0|0); } function _malloc($bytes) { $bytes = $bytes|0; - var $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i23$i = 0, $$pre$i25 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i24$iZ2D = 0, $$pre$phi$i26Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phi59$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre105 = 0, $$pre58$i$i = 0, $$rsize$0$i = 0, $$rsize$3$i = 0, $$sum = 0, $$sum$i$i = 0, $$sum$i$i$i = 0, $$sum$i12$i = 0, $$sum$i13$i = 0; - var $$sum$i16$i = 0, $$sum$i19$i = 0, $$sum$i2338 = 0, $$sum$i32 = 0, $$sum$i39 = 0, $$sum1 = 0, $$sum1$i = 0, $$sum1$i$i = 0, $$sum1$i14$i = 0, $$sum1$i20$i = 0, $$sum1$i24 = 0, $$sum10 = 0, $$sum10$i = 0, $$sum10$i$i = 0, $$sum10$pre$i$i = 0, $$sum102$i = 0, $$sum103$i = 0, $$sum104$i = 0, $$sum105$i = 0, $$sum106$i = 0; - var $$sum107$i = 0, $$sum108$i = 0, $$sum109$i = 0, $$sum11$i = 0, $$sum11$i$i = 0, $$sum11$i22$i = 0, $$sum110$i = 0, $$sum111$i = 0, $$sum1112 = 0, $$sum112$i = 0, $$sum113$i = 0, $$sum114$i = 0, $$sum115$i = 0, $$sum12$i = 0, $$sum12$i$i = 0, $$sum13$i = 0, $$sum13$i$i = 0, $$sum14$i$i = 0, $$sum14$pre$i = 0, $$sum15$i = 0; - var $$sum15$i$i = 0, $$sum16$i = 0, $$sum16$i$i = 0, $$sum17$i = 0, $$sum17$i$i = 0, $$sum18$i = 0, $$sum1819$i$i = 0, $$sum2 = 0, $$sum2$i = 0, $$sum2$i$i = 0, $$sum2$i$i$i = 0, $$sum2$i15$i = 0, $$sum2$i17$i = 0, $$sum2$i21$i = 0, $$sum2$pre$i = 0, $$sum20$i$i = 0, $$sum21$i$i = 0, $$sum22$i$i = 0, $$sum23$i$i = 0, $$sum24$i$i = 0; - var $$sum25$i$i = 0, $$sum26$pre$i$i = 0, $$sum27$i$i = 0, $$sum28$i$i = 0, $$sum29$i$i = 0, $$sum3$i = 0, $$sum3$i$i = 0, $$sum3$i27 = 0, $$sum30$i$i = 0, $$sum3132$i$i = 0, $$sum34$i$i = 0, $$sum3536$i$i = 0, $$sum3738$i$i = 0, $$sum39$i$i = 0, $$sum4 = 0, $$sum4$i = 0, $$sum4$i28 = 0, $$sum40$i$i = 0, $$sum41$i$i = 0, $$sum42$i$i = 0; - var $$sum5$i = 0, $$sum5$i$i = 0, $$sum56 = 0, $$sum6$i = 0, $$sum67$i$i = 0, $$sum7$i = 0, $$sum8$i = 0, $$sum8$pre = 0, $$sum9 = 0, $$sum9$i = 0, $$sum9$i$i = 0, $$tsize$1$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0; - var $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0; - var $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0; - var $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0; - var $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $108 = 0; - var $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0; - var $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0; - var $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0; - var $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0; - var $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0; - var $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0; - var $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0; - var $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0; - var $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0; - var $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0; - var $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0; - var $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0; - var $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0; - var $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0; - var $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0; - var $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0; - var $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0; - var $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0; - var $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0; - var $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0; - var $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0; - var $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0; - var $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0; - var $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0; - var $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0; - var $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0; - var $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0; - var $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0; - var $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0; - var $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0; - var $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0; - var $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0; - var $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0; - var $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0; - var $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0; - var $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0; - var $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0; - var $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0; - var $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0; - var $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0; - var $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0; - var $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0; - var $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0; - var $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0; - var $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0; - var $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0; - var $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0; - var $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0; - var $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0; - var $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0, $F5$0$i = 0, $I1$0$c$i$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$027$i = 0, $K2$015$i$i = 0, $K8$053$i$i = 0; - var $R$0$i = 0, $R$0$i$i = 0, $R$0$i18 = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i20 = 0, $RP$0$i = 0, $RP$0$i$i = 0, $RP$0$i17 = 0, $T$0$lcssa$i = 0, $T$0$lcssa$i$i = 0, $T$0$lcssa$i26$i = 0, $T$014$i$i = 0, $T$026$i = 0, $T$052$i$i = 0, $br$0$i = 0, $br$030$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i21 = 0; - var $exitcond$i$i = 0, $i$02$i$i = 0, $idx$0$i = 0, $mem$0 = 0, $nb$0 = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i$i = 0, $or$cond$i27$i = 0, $or$cond$i29 = 0, $or$cond1$i = 0, $or$cond19$i = 0, $or$cond2$i = 0, $or$cond24$i = 0, $or$cond3$i = 0, $or$cond4$i = 0, $or$cond47$i = 0, $or$cond5$i = 0, $or$cond6$i = 0, $or$cond8$i = 0; - var $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i15 = 0, $rsize$1$i = 0, $rsize$2$i = 0, $rsize$3$lcssa$i = 0, $rsize$331$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$073$i = 0, $sp$166$i = 0, $ssize$0$i = 0, $ssize$1$i = 0, $ssize$129$i = 0, $ssize$2$i = 0, $t$0$i = 0, $t$0$i14 = 0; - var $t$1$i = 0, $t$2$ph$i = 0, $t$2$v$3$i = 0, $t$230$i = 0, $tbase$245$i = 0, $tsize$03141$i = 0, $tsize$1$i = 0, $tsize$244$i = 0, $v$0$i = 0, $v$0$i16 = 0, $v$1$i = 0, $v$2$i = 0, $v$3$lcssa$i = 0, $v$332$i = 0, label = 0, sp = 0; + var $$3$i = 0, $$lcssa = 0, $$lcssa211 = 0, $$lcssa215 = 0, $$lcssa216 = 0, $$lcssa217 = 0, $$lcssa219 = 0, $$lcssa222 = 0, $$lcssa224 = 0, $$lcssa226 = 0, $$lcssa228 = 0, $$lcssa230 = 0, $$lcssa232 = 0, $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i22$i = 0, $$pre$i25 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i23$iZ2D = 0; + var $$pre$phi$i26Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phi58$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre105 = 0, $$pre106 = 0, $$pre14$i$i = 0, $$pre43$i = 0, $$pre56$i$i = 0, $$pre57$i$i = 0, $$pre8$i = 0, $$rsize$0$i = 0, $$rsize$3$i = 0, $$sum = 0, $$sum$i$i = 0, $$sum$i$i$i = 0, $$sum$i13$i = 0, $$sum$i14$i = 0, $$sum$i17$i = 0, $$sum$i19$i = 0; + var $$sum$i2334 = 0, $$sum$i32 = 0, $$sum$i35 = 0, $$sum1 = 0, $$sum1$i = 0, $$sum1$i$i = 0, $$sum1$i15$i = 0, $$sum1$i20$i = 0, $$sum1$i24 = 0, $$sum10 = 0, $$sum10$i = 0, $$sum10$i$i = 0, $$sum11$i = 0, $$sum11$i$i = 0, $$sum1112 = 0, $$sum112$i = 0, $$sum113$i = 0, $$sum114$i = 0, $$sum115$i = 0, $$sum116$i = 0; + var $$sum117$i = 0, $$sum118$i = 0, $$sum119$i = 0, $$sum12$i = 0, $$sum12$i$i = 0, $$sum120$i = 0, $$sum121$i = 0, $$sum122$i = 0, $$sum123$i = 0, $$sum124$i = 0, $$sum125$i = 0, $$sum13$i = 0, $$sum13$i$i = 0, $$sum14$i$i = 0, $$sum15$i = 0, $$sum15$i$i = 0, $$sum16$i = 0, $$sum16$i$i = 0, $$sum17$i = 0, $$sum17$i$i = 0; + var $$sum18$i = 0, $$sum1819$i$i = 0, $$sum2 = 0, $$sum2$i = 0, $$sum2$i$i = 0, $$sum2$i$i$i = 0, $$sum2$i16$i = 0, $$sum2$i18$i = 0, $$sum2$i21$i = 0, $$sum20$i$i = 0, $$sum21$i$i = 0, $$sum22$i$i = 0, $$sum23$i$i = 0, $$sum24$i$i = 0, $$sum25$i$i = 0, $$sum27$i$i = 0, $$sum28$i$i = 0, $$sum29$i$i = 0, $$sum3$i = 0, $$sum3$i27 = 0; + var $$sum30$i$i = 0, $$sum3132$i$i = 0, $$sum34$i$i = 0, $$sum3536$i$i = 0, $$sum3738$i$i = 0, $$sum39$i$i = 0, $$sum4 = 0, $$sum4$i = 0, $$sum4$i$i = 0, $$sum4$i28 = 0, $$sum40$i$i = 0, $$sum41$i$i = 0, $$sum42$i$i = 0, $$sum5$i = 0, $$sum5$i$i = 0, $$sum56 = 0, $$sum6$i = 0, $$sum67$i$i = 0, $$sum7$i = 0, $$sum8$i = 0; + var $$sum9 = 0, $$sum9$i = 0, $$sum9$i$i = 0, $$tsize$1$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0; + var $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0; + var $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0; + var $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0; + var $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0; + var $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0; + var $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0; + var $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0; + var $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0; + var $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0; + var $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0; + var $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0; + var $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0; + var $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0; + var $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0; + var $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0; + var $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0; + var $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0; + var $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0; + var $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0; + var $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0; + var $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0; + var $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0; + var $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0; + var $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0; + var $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0; + var $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0; + var $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0; + var $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0; + var $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0; + var $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0; + var $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0; + var $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0; + var $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0; + var $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0; + var $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0; + var $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0; + var $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0; + var $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0; + var $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0; + var $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0; + var $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0; + var $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0; + var $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0; + var $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0; + var $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0; + var $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0; + var $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0; + var $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0; + var $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0; + var $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0; + var $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0; + var $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0; + var $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0; + var $F5$0$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$029$i = 0, $K2$07$i$i = 0, $K8$051$i$i = 0, $R$0$i = 0, $R$0$i$i = 0, $R$0$i$i$lcssa = 0, $R$0$i$lcssa = 0, $R$0$i18 = 0, $R$0$i18$lcssa = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i20 = 0, $RP$0$i = 0, $RP$0$i$i = 0, $RP$0$i$i$lcssa = 0, $RP$0$i$lcssa = 0; + var $RP$0$i17 = 0, $RP$0$i17$lcssa = 0, $T$0$lcssa$i = 0, $T$0$lcssa$i$i = 0, $T$0$lcssa$i25$i = 0, $T$028$i = 0, $T$028$i$lcssa = 0, $T$050$i$i = 0, $T$050$i$i$lcssa = 0, $T$06$i$i = 0, $T$06$i$i$lcssa = 0, $br$0$ph$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i21 = 0, $exitcond$i$i = 0, $i$02$i$i = 0, $idx$0$i = 0, $mem$0 = 0, $nb$0 = 0; + var $not$$i = 0, $not$$i$i = 0, $not$$i26$i = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i30 = 0, $or$cond1$i = 0, $or$cond19$i = 0, $or$cond2$i = 0, $or$cond3$i = 0, $or$cond5$i = 0, $or$cond57$i = 0, $or$cond6$i = 0, $or$cond8$i = 0, $or$cond9$i = 0, $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i$lcssa = 0, $rsize$0$i15 = 0, $rsize$1$i = 0; + var $rsize$2$i = 0, $rsize$3$lcssa$i = 0, $rsize$331$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$084$i = 0, $sp$084$i$lcssa = 0, $sp$183$i = 0, $sp$183$i$lcssa = 0, $ssize$0$$i = 0, $ssize$0$i = 0, $ssize$1$ph$i = 0, $ssize$2$i = 0, $t$0$i = 0, $t$0$i14 = 0, $t$1$i = 0, $t$2$ph$i = 0; + var $t$2$v$3$i = 0, $t$230$i = 0, $tbase$255$i = 0, $tsize$0$ph$i = 0, $tsize$0323944$i = 0, $tsize$1$i = 0, $tsize$254$i = 0, $v$0$i = 0, $v$0$i$lcssa = 0, $v$0$i16 = 0, $v$1$i = 0, $v$2$i = 0, $v$3$lcssa$i = 0, $v$3$ph$i = 0, $v$332$i = 0, label = 0, sp = 0; sp = STACKTOP; $0 = ($bytes>>>0)<(245); do { if ($0) { $1 = ($bytes>>>0)<(11); - if ($1) { - $5 = 16; - } else { - $2 = (($bytes) + 11)|0; - $3 = $2 & -8; - $5 = $3; - } - $4 = $5 >>> 3; - $6 = HEAP32[32544>>2]|0; - $7 = $6 >>> $4; + $2 = (($bytes) + 11)|0; + $3 = $2 & -8; + $4 = $1 ? 16 : $3; + $5 = $4 >>> 3; + $6 = HEAP32[32676>>2]|0; + $7 = $6 >>> $5; $8 = $7 & 3; $9 = ($8|0)==(0); if (!($9)) { $10 = $7 & 1; $11 = $10 ^ 1; - $12 = (($11) + ($4))|0; + $12 = (($11) + ($5))|0; $13 = $12 << 1; - $14 = ((32544 + ($13<<2)|0) + 40|0); + $14 = (32716 + ($13<<2)|0); $$sum10 = (($13) + 2)|0; - $15 = ((32544 + ($$sum10<<2)|0) + 40|0); + $15 = (32716 + ($$sum10<<2)|0); $16 = HEAP32[$15>>2]|0; - $17 = (($16) + 8|0); + $17 = ((($16)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = ($14|0)==($18|0); do { @@ -19608,15 +20763,15 @@ function _malloc($bytes) { $20 = 1 << $12; $21 = $20 ^ -1; $22 = $6 & $21; - HEAP32[32544>>2] = $22; + HEAP32[32676>>2] = $22; } else { - $23 = HEAP32[((32544 + 16|0))>>2]|0; + $23 = HEAP32[(32692)>>2]|0; $24 = ($18>>>0)<($23>>>0); if ($24) { _abort(); // unreachable; } - $25 = (($18) + 12|0); + $25 = ((($18)) + 12|0); $26 = HEAP32[$25>>2]|0; $27 = ($26|0)==($16|0); if ($27) { @@ -19631,7 +20786,7 @@ function _malloc($bytes) { } while(0); $28 = $12 << 3; $29 = $28 | 3; - $30 = (($16) + 4|0); + $30 = ((($16)) + 4|0); HEAP32[$30>>2] = $29; $$sum1112 = $28 | 4; $31 = (($16) + ($$sum1112)|0); @@ -19639,15 +20794,15 @@ function _malloc($bytes) { $33 = $32 | 1; HEAP32[$31>>2] = $33; $mem$0 = $17; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } - $34 = HEAP32[((32544 + 8|0))>>2]|0; - $35 = ($5>>>0)>($34>>>0); + $34 = HEAP32[(32684)>>2]|0; + $35 = ($4>>>0)>($34>>>0); if ($35) { $36 = ($7|0)==(0); if (!($36)) { - $37 = $7 << $4; - $38 = 2 << $4; + $37 = $7 << $5; + $38 = 2 << $5; $39 = (0 - ($38))|0; $40 = $38 | $39; $41 = $37 & $40; @@ -19675,11 +20830,11 @@ function _malloc($bytes) { $63 = $59 >>> $61; $64 = (($62) + ($63))|0; $65 = $64 << 1; - $66 = ((32544 + ($65<<2)|0) + 40|0); + $66 = (32716 + ($65<<2)|0); $$sum4 = (($65) + 2)|0; - $67 = ((32544 + ($$sum4<<2)|0) + 40|0); + $67 = (32716 + ($$sum4<<2)|0); $68 = HEAP32[$67>>2]|0; - $69 = (($68) + 8|0); + $69 = ((($68)) + 8|0); $70 = HEAP32[$69>>2]|0; $71 = ($66|0)==($70|0); do { @@ -19687,23 +20842,23 @@ function _malloc($bytes) { $72 = 1 << $64; $73 = $72 ^ -1; $74 = $6 & $73; - HEAP32[32544>>2] = $74; - $88 = $34; + HEAP32[32676>>2] = $74; + $89 = $34; } else { - $75 = HEAP32[((32544 + 16|0))>>2]|0; + $75 = HEAP32[(32692)>>2]|0; $76 = ($70>>>0)<($75>>>0); if ($76) { _abort(); // unreachable; } - $77 = (($70) + 12|0); + $77 = ((($70)) + 12|0); $78 = HEAP32[$77>>2]|0; $79 = ($78|0)==($68|0); if ($79) { HEAP32[$77>>2] = $66; HEAP32[$67>>2] = $70; - $$pre = HEAP32[((32544 + 8|0))>>2]|0; - $88 = $$pre; + $$pre = HEAP32[(32684)>>2]|0; + $89 = $$pre; break; } else { _abort(); @@ -19712,38 +20867,38 @@ function _malloc($bytes) { } } while(0); $80 = $64 << 3; - $81 = (($80) - ($5))|0; - $82 = $5 | 3; - $83 = (($68) + 4|0); + $81 = (($80) - ($4))|0; + $82 = $4 | 3; + $83 = ((($68)) + 4|0); HEAP32[$83>>2] = $82; - $84 = (($68) + ($5)|0); + $84 = (($68) + ($4)|0); $85 = $81 | 1; - $$sum56 = $5 | 4; + $$sum56 = $4 | 4; $86 = (($68) + ($$sum56)|0); HEAP32[$86>>2] = $85; $87 = (($68) + ($80)|0); HEAP32[$87>>2] = $81; - $89 = ($88|0)==(0); - if (!($89)) { - $90 = HEAP32[((32544 + 20|0))>>2]|0; - $91 = $88 >>> 3; + $88 = ($89|0)==(0); + if (!($88)) { + $90 = HEAP32[(32696)>>2]|0; + $91 = $89 >>> 3; $92 = $91 << 1; - $93 = ((32544 + ($92<<2)|0) + 40|0); - $94 = HEAP32[32544>>2]|0; + $93 = (32716 + ($92<<2)|0); + $94 = HEAP32[32676>>2]|0; $95 = 1 << $91; $96 = $94 & $95; $97 = ($96|0)==(0); if ($97) { $98 = $94 | $95; - HEAP32[32544>>2] = $98; - $$sum8$pre = (($92) + 2)|0; - $$pre105 = ((32544 + ($$sum8$pre<<2)|0) + 40|0); - $$pre$phiZ2D = $$pre105;$F4$0 = $93; + HEAP32[32676>>2] = $98; + $$pre105 = (($92) + 2)|0; + $$pre106 = (32716 + ($$pre105<<2)|0); + $$pre$phiZ2D = $$pre106;$F4$0 = $93; } else { $$sum9 = (($92) + 2)|0; - $99 = ((32544 + ($$sum9<<2)|0) + 40|0); + $99 = (32716 + ($$sum9<<2)|0); $100 = HEAP32[$99>>2]|0; - $101 = HEAP32[((32544 + 16|0))>>2]|0; + $101 = HEAP32[(32692)>>2]|0; $102 = ($100>>>0)<($101>>>0); if ($102) { _abort(); @@ -19753,22 +20908,22 @@ function _malloc($bytes) { } } HEAP32[$$pre$phiZ2D>>2] = $90; - $103 = (($F4$0) + 12|0); + $103 = ((($F4$0)) + 12|0); HEAP32[$103>>2] = $90; - $104 = (($90) + 8|0); + $104 = ((($90)) + 8|0); HEAP32[$104>>2] = $F4$0; - $105 = (($90) + 12|0); + $105 = ((($90)) + 12|0); HEAP32[$105>>2] = $93; } - HEAP32[((32544 + 8|0))>>2] = $81; - HEAP32[((32544 + 20|0))>>2] = $84; + HEAP32[(32684)>>2] = $81; + HEAP32[(32696)>>2] = $84; $mem$0 = $69; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } - $106 = HEAP32[((32544 + 4|0))>>2]|0; + $106 = HEAP32[(32680)>>2]|0; $107 = ($106|0)==(0); if ($107) { - $nb$0 = $5; + $nb$0 = $4; } else { $108 = (0 - ($106))|0; $109 = $106 & $108; @@ -19793,22 +20948,23 @@ function _malloc($bytes) { $128 = $124 | $127; $129 = $125 >>> $127; $130 = (($128) + ($129))|0; - $131 = ((32544 + ($130<<2)|0) + 304|0); + $131 = (32980 + ($130<<2)|0); $132 = HEAP32[$131>>2]|0; - $133 = (($132) + 4|0); + $133 = ((($132)) + 4|0); $134 = HEAP32[$133>>2]|0; $135 = $134 & -8; - $136 = (($135) - ($5))|0; + $136 = (($135) - ($4))|0; $rsize$0$i = $136;$t$0$i = $132;$v$0$i = $132; while(1) { - $137 = (($t$0$i) + 16|0); + $137 = ((($t$0$i)) + 16|0); $138 = HEAP32[$137>>2]|0; $139 = ($138|0)==(0|0); if ($139) { - $140 = (($t$0$i) + 20|0); + $140 = ((($t$0$i)) + 20|0); $141 = HEAP32[$140>>2]|0; $142 = ($141|0)==(0|0); if ($142) { + $rsize$0$i$lcssa = $rsize$0$i;$v$0$i$lcssa = $v$0$i; break; } else { $144 = $141; @@ -19816,39 +20972,39 @@ function _malloc($bytes) { } else { $144 = $138; } - $143 = (($144) + 4|0); + $143 = ((($144)) + 4|0); $145 = HEAP32[$143>>2]|0; $146 = $145 & -8; - $147 = (($146) - ($5))|0; + $147 = (($146) - ($4))|0; $148 = ($147>>>0)<($rsize$0$i>>>0); $$rsize$0$i = $148 ? $147 : $rsize$0$i; $$v$0$i = $148 ? $144 : $v$0$i; $rsize$0$i = $$rsize$0$i;$t$0$i = $144;$v$0$i = $$v$0$i; } - $149 = HEAP32[((32544 + 16|0))>>2]|0; - $150 = ($v$0$i>>>0)<($149>>>0); + $149 = HEAP32[(32692)>>2]|0; + $150 = ($v$0$i$lcssa>>>0)<($149>>>0); if ($150) { _abort(); // unreachable; } - $151 = (($v$0$i) + ($5)|0); - $152 = ($v$0$i>>>0)<($151>>>0); + $151 = (($v$0$i$lcssa) + ($4)|0); + $152 = ($v$0$i$lcssa>>>0)<($151>>>0); if (!($152)) { _abort(); // unreachable; } - $153 = (($v$0$i) + 24|0); + $153 = ((($v$0$i$lcssa)) + 24|0); $154 = HEAP32[$153>>2]|0; - $155 = (($v$0$i) + 12|0); + $155 = ((($v$0$i$lcssa)) + 12|0); $156 = HEAP32[$155>>2]|0; - $157 = ($156|0)==($v$0$i|0); + $157 = ($156|0)==($v$0$i$lcssa|0); do { if ($157) { - $167 = (($v$0$i) + 20|0); + $167 = ((($v$0$i$lcssa)) + 20|0); $168 = HEAP32[$167>>2]|0; $169 = ($168|0)==(0|0); if ($169) { - $170 = (($v$0$i) + 16|0); + $170 = ((($v$0$i$lcssa)) + 16|0); $171 = HEAP32[$170>>2]|0; $172 = ($171|0)==(0|0); if ($172) { @@ -19861,49 +21017,50 @@ function _malloc($bytes) { $R$0$i = $168;$RP$0$i = $167; } while(1) { - $173 = (($R$0$i) + 20|0); + $173 = ((($R$0$i)) + 20|0); $174 = HEAP32[$173>>2]|0; $175 = ($174|0)==(0|0); if (!($175)) { $R$0$i = $174;$RP$0$i = $173; continue; } - $176 = (($R$0$i) + 16|0); + $176 = ((($R$0$i)) + 16|0); $177 = HEAP32[$176>>2]|0; $178 = ($177|0)==(0|0); if ($178) { + $R$0$i$lcssa = $R$0$i;$RP$0$i$lcssa = $RP$0$i; break; } else { $R$0$i = $177;$RP$0$i = $176; } } - $179 = ($RP$0$i>>>0)<($149>>>0); + $179 = ($RP$0$i$lcssa>>>0)<($149>>>0); if ($179) { _abort(); // unreachable; } else { - HEAP32[$RP$0$i>>2] = 0; - $R$1$i = $R$0$i; + HEAP32[$RP$0$i$lcssa>>2] = 0; + $R$1$i = $R$0$i$lcssa; break; } } else { - $158 = (($v$0$i) + 8|0); + $158 = ((($v$0$i$lcssa)) + 8|0); $159 = HEAP32[$158>>2]|0; $160 = ($159>>>0)<($149>>>0); if ($160) { _abort(); // unreachable; } - $161 = (($159) + 12|0); + $161 = ((($159)) + 12|0); $162 = HEAP32[$161>>2]|0; - $163 = ($162|0)==($v$0$i|0); + $163 = ($162|0)==($v$0$i$lcssa|0); if (!($163)) { _abort(); // unreachable; } - $164 = (($156) + 8|0); + $164 = ((($156)) + 8|0); $165 = HEAP32[$164>>2]|0; - $166 = ($165|0)==($v$0$i|0); + $166 = ($165|0)==($v$0$i$lcssa|0); if ($166) { HEAP32[$161>>2] = $156; HEAP32[$164>>2] = $159; @@ -19918,36 +21075,36 @@ function _malloc($bytes) { $180 = ($154|0)==(0|0); do { if (!($180)) { - $181 = (($v$0$i) + 28|0); + $181 = ((($v$0$i$lcssa)) + 28|0); $182 = HEAP32[$181>>2]|0; - $183 = ((32544 + ($182<<2)|0) + 304|0); + $183 = (32980 + ($182<<2)|0); $184 = HEAP32[$183>>2]|0; - $185 = ($v$0$i|0)==($184|0); + $185 = ($v$0$i$lcssa|0)==($184|0); if ($185) { HEAP32[$183>>2] = $R$1$i; $cond$i = ($R$1$i|0)==(0|0); if ($cond$i) { $186 = 1 << $182; $187 = $186 ^ -1; - $188 = HEAP32[((32544 + 4|0))>>2]|0; + $188 = HEAP32[(32680)>>2]|0; $189 = $188 & $187; - HEAP32[((32544 + 4|0))>>2] = $189; + HEAP32[(32680)>>2] = $189; break; } } else { - $190 = HEAP32[((32544 + 16|0))>>2]|0; + $190 = HEAP32[(32692)>>2]|0; $191 = ($154>>>0)<($190>>>0); if ($191) { _abort(); // unreachable; } - $192 = (($154) + 16|0); + $192 = ((($154)) + 16|0); $193 = HEAP32[$192>>2]|0; - $194 = ($193|0)==($v$0$i|0); + $194 = ($193|0)==($v$0$i$lcssa|0); if ($194) { HEAP32[$192>>2] = $R$1$i; } else { - $195 = (($154) + 20|0); + $195 = ((($154)) + 20|0); HEAP32[$195>>2] = $R$1$i; } $196 = ($R$1$i|0)==(0|0); @@ -19955,15 +21112,15 @@ function _malloc($bytes) { break; } } - $197 = HEAP32[((32544 + 16|0))>>2]|0; + $197 = HEAP32[(32692)>>2]|0; $198 = ($R$1$i>>>0)<($197>>>0); if ($198) { _abort(); // unreachable; } - $199 = (($R$1$i) + 24|0); + $199 = ((($R$1$i)) + 24|0); HEAP32[$199>>2] = $154; - $200 = (($v$0$i) + 16|0); + $200 = ((($v$0$i$lcssa)) + 16|0); $201 = HEAP32[$200>>2]|0; $202 = ($201|0)==(0|0); do { @@ -19973,77 +21130,77 @@ function _malloc($bytes) { _abort(); // unreachable; } else { - $204 = (($R$1$i) + 16|0); + $204 = ((($R$1$i)) + 16|0); HEAP32[$204>>2] = $201; - $205 = (($201) + 24|0); + $205 = ((($201)) + 24|0); HEAP32[$205>>2] = $R$1$i; break; } } } while(0); - $206 = (($v$0$i) + 20|0); + $206 = ((($v$0$i$lcssa)) + 20|0); $207 = HEAP32[$206>>2]|0; $208 = ($207|0)==(0|0); if (!($208)) { - $209 = HEAP32[((32544 + 16|0))>>2]|0; + $209 = HEAP32[(32692)>>2]|0; $210 = ($207>>>0)<($209>>>0); if ($210) { _abort(); // unreachable; } else { - $211 = (($R$1$i) + 20|0); + $211 = ((($R$1$i)) + 20|0); HEAP32[$211>>2] = $207; - $212 = (($207) + 24|0); + $212 = ((($207)) + 24|0); HEAP32[$212>>2] = $R$1$i; break; } } } } while(0); - $213 = ($rsize$0$i>>>0)<(16); + $213 = ($rsize$0$i$lcssa>>>0)<(16); if ($213) { - $214 = (($rsize$0$i) + ($5))|0; + $214 = (($rsize$0$i$lcssa) + ($4))|0; $215 = $214 | 3; - $216 = (($v$0$i) + 4|0); + $216 = ((($v$0$i$lcssa)) + 4|0); HEAP32[$216>>2] = $215; $$sum4$i = (($214) + 4)|0; - $217 = (($v$0$i) + ($$sum4$i)|0); + $217 = (($v$0$i$lcssa) + ($$sum4$i)|0); $218 = HEAP32[$217>>2]|0; $219 = $218 | 1; HEAP32[$217>>2] = $219; } else { - $220 = $5 | 3; - $221 = (($v$0$i) + 4|0); + $220 = $4 | 3; + $221 = ((($v$0$i$lcssa)) + 4|0); HEAP32[$221>>2] = $220; - $222 = $rsize$0$i | 1; - $$sum$i39 = $5 | 4; - $223 = (($v$0$i) + ($$sum$i39)|0); + $222 = $rsize$0$i$lcssa | 1; + $$sum$i35 = $4 | 4; + $223 = (($v$0$i$lcssa) + ($$sum$i35)|0); HEAP32[$223>>2] = $222; - $$sum1$i = (($rsize$0$i) + ($5))|0; - $224 = (($v$0$i) + ($$sum1$i)|0); - HEAP32[$224>>2] = $rsize$0$i; - $225 = HEAP32[((32544 + 8|0))>>2]|0; + $$sum1$i = (($rsize$0$i$lcssa) + ($4))|0; + $224 = (($v$0$i$lcssa) + ($$sum1$i)|0); + HEAP32[$224>>2] = $rsize$0$i$lcssa; + $225 = HEAP32[(32684)>>2]|0; $226 = ($225|0)==(0); if (!($226)) { - $227 = HEAP32[((32544 + 20|0))>>2]|0; + $227 = HEAP32[(32696)>>2]|0; $228 = $225 >>> 3; $229 = $228 << 1; - $230 = ((32544 + ($229<<2)|0) + 40|0); - $231 = HEAP32[32544>>2]|0; + $230 = (32716 + ($229<<2)|0); + $231 = HEAP32[32676>>2]|0; $232 = 1 << $228; $233 = $231 & $232; $234 = ($233|0)==(0); if ($234) { $235 = $231 | $232; - HEAP32[32544>>2] = $235; - $$sum2$pre$i = (($229) + 2)|0; - $$pre$i = ((32544 + ($$sum2$pre$i<<2)|0) + 40|0); - $$pre$phi$iZ2D = $$pre$i;$F1$0$i = $230; + HEAP32[32676>>2] = $235; + $$pre$i = (($229) + 2)|0; + $$pre8$i = (32716 + ($$pre$i<<2)|0); + $$pre$phi$iZ2D = $$pre8$i;$F1$0$i = $230; } else { $$sum3$i = (($229) + 2)|0; - $236 = ((32544 + ($$sum3$i<<2)|0) + 40|0); + $236 = (32716 + ($$sum3$i<<2)|0); $237 = HEAP32[$236>>2]|0; - $238 = HEAP32[((32544 + 16|0))>>2]|0; + $238 = HEAP32[(32692)>>2]|0; $239 = ($237>>>0)<($238>>>0); if ($239) { _abort(); @@ -20053,22 +21210,22 @@ function _malloc($bytes) { } } HEAP32[$$pre$phi$iZ2D>>2] = $227; - $240 = (($F1$0$i) + 12|0); + $240 = ((($F1$0$i)) + 12|0); HEAP32[$240>>2] = $227; - $241 = (($227) + 8|0); + $241 = ((($227)) + 8|0); HEAP32[$241>>2] = $F1$0$i; - $242 = (($227) + 12|0); + $242 = ((($227)) + 12|0); HEAP32[$242>>2] = $230; } - HEAP32[((32544 + 8|0))>>2] = $rsize$0$i; - HEAP32[((32544 + 20|0))>>2] = $151; + HEAP32[(32684)>>2] = $rsize$0$i$lcssa; + HEAP32[(32696)>>2] = $151; } - $243 = (($v$0$i) + 8|0); + $243 = ((($v$0$i$lcssa)) + 8|0); $mem$0 = $243; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } } else { - $nb$0 = $5; + $nb$0 = $4; } } else { $244 = ($bytes>>>0)>(4294967231); @@ -20077,7 +21234,7 @@ function _malloc($bytes) { } else { $245 = (($bytes) + 11)|0; $246 = $245 & -8; - $247 = HEAP32[((32544 + 4|0))>>2]|0; + $247 = HEAP32[(32680)>>2]|0; $248 = ($247|0)==(0); if ($248) { $nb$0 = $246; @@ -20117,25 +21274,22 @@ function _malloc($bytes) { $idx$0$i = $274; } } - $275 = ((32544 + ($idx$0$i<<2)|0) + 304|0); + $275 = (32980 + ($idx$0$i<<2)|0); $276 = HEAP32[$275>>2]|0; $277 = ($276|0)==(0|0); - L126: do { + L123: do { if ($277) { $rsize$2$i = $249;$t$1$i = 0;$v$2$i = 0; + label = 86; } else { $278 = ($idx$0$i|0)==(31); - if ($278) { - $282 = 0; - } else { - $279 = $idx$0$i >>> 1; - $280 = (25 - ($279))|0; - $282 = $280; - } - $281 = $246 << $282; - $rsize$0$i15 = $249;$rst$0$i = 0;$sizebits$0$i = $281;$t$0$i14 = $276;$v$0$i16 = 0; + $279 = $idx$0$i >>> 1; + $280 = (25 - ($279))|0; + $281 = $278 ? 0 : $280; + $282 = $246 << $281; + $rsize$0$i15 = $249;$rst$0$i = 0;$sizebits$0$i = $282;$t$0$i14 = $276;$v$0$i16 = 0; while(1) { - $283 = (($t$0$i14) + 4|0); + $283 = ((($t$0$i14)) + 4|0); $284 = HEAP32[$283>>2]|0; $285 = $284 & -8; $286 = (($285) - ($246))|0; @@ -20143,18 +21297,19 @@ function _malloc($bytes) { if ($287) { $288 = ($285|0)==($246|0); if ($288) { - $rsize$2$i = $286;$t$1$i = $t$0$i14;$v$2$i = $t$0$i14; - break L126; + $rsize$331$i = $286;$t$230$i = $t$0$i14;$v$332$i = $t$0$i14; + label = 90; + break L123; } else { $rsize$1$i = $286;$v$1$i = $t$0$i14; } } else { $rsize$1$i = $rsize$0$i15;$v$1$i = $v$0$i16; } - $289 = (($t$0$i14) + 20|0); + $289 = ((($t$0$i14)) + 20|0); $290 = HEAP32[$289>>2]|0; $291 = $sizebits$0$i >>> 31; - $292 = ((($t$0$i14) + ($291<<2)|0) + 16|0); + $292 = (((($t$0$i14)) + 16|0) + ($291<<2)|0); $293 = HEAP32[$292>>2]|0; $294 = ($290|0)==(0|0); $295 = ($290|0)==($293|0); @@ -20164,6 +21319,7 @@ function _malloc($bytes) { $297 = $sizebits$0$i << 1; if ($296) { $rsize$2$i = $rsize$1$i;$t$1$i = $rst$1$i;$v$2$i = $v$1$i; + label = 86; break; } else { $rsize$0$i15 = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $297;$t$0$i14 = $293;$v$0$i16 = $v$1$i; @@ -20171,69 +21327,76 @@ function _malloc($bytes) { } } } while(0); - $298 = ($t$1$i|0)==(0|0); - $299 = ($v$2$i|0)==(0|0); - $or$cond$i = $298 & $299; - if ($or$cond$i) { - $300 = 2 << $idx$0$i; - $301 = (0 - ($300))|0; - $302 = $300 | $301; - $303 = $247 & $302; - $304 = ($303|0)==(0); - if ($304) { - $nb$0 = $246; - break; + if ((label|0) == 86) { + $298 = ($t$1$i|0)==(0|0); + $299 = ($v$2$i|0)==(0|0); + $or$cond$i = $298 & $299; + if ($or$cond$i) { + $300 = 2 << $idx$0$i; + $301 = (0 - ($300))|0; + $302 = $300 | $301; + $303 = $247 & $302; + $304 = ($303|0)==(0); + if ($304) { + $nb$0 = $246; + break; + } + $305 = (0 - ($303))|0; + $306 = $303 & $305; + $307 = (($306) + -1)|0; + $308 = $307 >>> 12; + $309 = $308 & 16; + $310 = $307 >>> $309; + $311 = $310 >>> 5; + $312 = $311 & 8; + $313 = $312 | $309; + $314 = $310 >>> $312; + $315 = $314 >>> 2; + $316 = $315 & 4; + $317 = $313 | $316; + $318 = $314 >>> $316; + $319 = $318 >>> 1; + $320 = $319 & 2; + $321 = $317 | $320; + $322 = $318 >>> $320; + $323 = $322 >>> 1; + $324 = $323 & 1; + $325 = $321 | $324; + $326 = $322 >>> $324; + $327 = (($325) + ($326))|0; + $328 = (32980 + ($327<<2)|0); + $329 = HEAP32[$328>>2]|0; + $t$2$ph$i = $329;$v$3$ph$i = 0; + } else { + $t$2$ph$i = $t$1$i;$v$3$ph$i = $v$2$i; + } + $330 = ($t$2$ph$i|0)==(0|0); + if ($330) { + $rsize$3$lcssa$i = $rsize$2$i;$v$3$lcssa$i = $v$3$ph$i; + } else { + $rsize$331$i = $rsize$2$i;$t$230$i = $t$2$ph$i;$v$332$i = $v$3$ph$i; + label = 90; } - $305 = (0 - ($303))|0; - $306 = $303 & $305; - $307 = (($306) + -1)|0; - $308 = $307 >>> 12; - $309 = $308 & 16; - $310 = $307 >>> $309; - $311 = $310 >>> 5; - $312 = $311 & 8; - $313 = $312 | $309; - $314 = $310 >>> $312; - $315 = $314 >>> 2; - $316 = $315 & 4; - $317 = $313 | $316; - $318 = $314 >>> $316; - $319 = $318 >>> 1; - $320 = $319 & 2; - $321 = $317 | $320; - $322 = $318 >>> $320; - $323 = $322 >>> 1; - $324 = $323 & 1; - $325 = $321 | $324; - $326 = $322 >>> $324; - $327 = (($325) + ($326))|0; - $328 = ((32544 + ($327<<2)|0) + 304|0); - $329 = HEAP32[$328>>2]|0; - $t$2$ph$i = $329; - } else { - $t$2$ph$i = $t$1$i; } - $330 = ($t$2$ph$i|0)==(0|0); - if ($330) { - $rsize$3$lcssa$i = $rsize$2$i;$v$3$lcssa$i = $v$2$i; - } else { - $rsize$331$i = $rsize$2$i;$t$230$i = $t$2$ph$i;$v$332$i = $v$2$i; + if ((label|0) == 90) { while(1) { - $331 = (($t$230$i) + 4|0); + label = 0; + $331 = ((($t$230$i)) + 4|0); $332 = HEAP32[$331>>2]|0; $333 = $332 & -8; $334 = (($333) - ($246))|0; $335 = ($334>>>0)<($rsize$331$i>>>0); $$rsize$3$i = $335 ? $334 : $rsize$331$i; $t$2$v$3$i = $335 ? $t$230$i : $v$332$i; - $336 = (($t$230$i) + 16|0); + $336 = ((($t$230$i)) + 16|0); $337 = HEAP32[$336>>2]|0; $338 = ($337|0)==(0|0); if (!($338)) { $rsize$331$i = $$rsize$3$i;$t$230$i = $337;$v$332$i = $t$2$v$3$i; + label = 90; continue; } - $339 = (($t$230$i) + 20|0); + $339 = ((($t$230$i)) + 20|0); $340 = HEAP32[$339>>2]|0; $341 = ($340|0)==(0|0); if ($341) { @@ -20241,6 +21404,7 @@ function _malloc($bytes) { break; } else { $rsize$331$i = $$rsize$3$i;$t$230$i = $340;$v$332$i = $t$2$v$3$i; + label = 90; } } } @@ -20248,11 +21412,11 @@ function _malloc($bytes) { if ($342) { $nb$0 = $246; } else { - $343 = HEAP32[((32544 + 8|0))>>2]|0; + $343 = HEAP32[(32684)>>2]|0; $344 = (($343) - ($246))|0; $345 = ($rsize$3$lcssa$i>>>0)<($344>>>0); if ($345) { - $346 = HEAP32[((32544 + 16|0))>>2]|0; + $346 = HEAP32[(32692)>>2]|0; $347 = ($v$3$lcssa$i>>>0)<($346>>>0); if ($347) { _abort(); @@ -20264,18 +21428,18 @@ function _malloc($bytes) { _abort(); // unreachable; } - $350 = (($v$3$lcssa$i) + 24|0); + $350 = ((($v$3$lcssa$i)) + 24|0); $351 = HEAP32[$350>>2]|0; - $352 = (($v$3$lcssa$i) + 12|0); + $352 = ((($v$3$lcssa$i)) + 12|0); $353 = HEAP32[$352>>2]|0; $354 = ($353|0)==($v$3$lcssa$i|0); do { if ($354) { - $364 = (($v$3$lcssa$i) + 20|0); + $364 = ((($v$3$lcssa$i)) + 20|0); $365 = HEAP32[$364>>2]|0; $366 = ($365|0)==(0|0); if ($366) { - $367 = (($v$3$lcssa$i) + 16|0); + $367 = ((($v$3$lcssa$i)) + 16|0); $368 = HEAP32[$367>>2]|0; $369 = ($368|0)==(0|0); if ($369) { @@ -20288,47 +21452,48 @@ function _malloc($bytes) { $R$0$i18 = $365;$RP$0$i17 = $364; } while(1) { - $370 = (($R$0$i18) + 20|0); + $370 = ((($R$0$i18)) + 20|0); $371 = HEAP32[$370>>2]|0; $372 = ($371|0)==(0|0); if (!($372)) { $R$0$i18 = $371;$RP$0$i17 = $370; continue; } - $373 = (($R$0$i18) + 16|0); + $373 = ((($R$0$i18)) + 16|0); $374 = HEAP32[$373>>2]|0; $375 = ($374|0)==(0|0); if ($375) { + $R$0$i18$lcssa = $R$0$i18;$RP$0$i17$lcssa = $RP$0$i17; break; } else { $R$0$i18 = $374;$RP$0$i17 = $373; } } - $376 = ($RP$0$i17>>>0)<($346>>>0); + $376 = ($RP$0$i17$lcssa>>>0)<($346>>>0); if ($376) { _abort(); // unreachable; } else { - HEAP32[$RP$0$i17>>2] = 0; - $R$1$i20 = $R$0$i18; + HEAP32[$RP$0$i17$lcssa>>2] = 0; + $R$1$i20 = $R$0$i18$lcssa; break; } } else { - $355 = (($v$3$lcssa$i) + 8|0); + $355 = ((($v$3$lcssa$i)) + 8|0); $356 = HEAP32[$355>>2]|0; $357 = ($356>>>0)<($346>>>0); if ($357) { _abort(); // unreachable; } - $358 = (($356) + 12|0); + $358 = ((($356)) + 12|0); $359 = HEAP32[$358>>2]|0; $360 = ($359|0)==($v$3$lcssa$i|0); if (!($360)) { _abort(); // unreachable; } - $361 = (($353) + 8|0); + $361 = ((($353)) + 8|0); $362 = HEAP32[$361>>2]|0; $363 = ($362|0)==($v$3$lcssa$i|0); if ($363) { @@ -20345,9 +21510,9 @@ function _malloc($bytes) { $377 = ($351|0)==(0|0); do { if (!($377)) { - $378 = (($v$3$lcssa$i) + 28|0); + $378 = ((($v$3$lcssa$i)) + 28|0); $379 = HEAP32[$378>>2]|0; - $380 = ((32544 + ($379<<2)|0) + 304|0); + $380 = (32980 + ($379<<2)|0); $381 = HEAP32[$380>>2]|0; $382 = ($v$3$lcssa$i|0)==($381|0); if ($382) { @@ -20356,25 +21521,25 @@ function _malloc($bytes) { if ($cond$i21) { $383 = 1 << $379; $384 = $383 ^ -1; - $385 = HEAP32[((32544 + 4|0))>>2]|0; + $385 = HEAP32[(32680)>>2]|0; $386 = $385 & $384; - HEAP32[((32544 + 4|0))>>2] = $386; + HEAP32[(32680)>>2] = $386; break; } } else { - $387 = HEAP32[((32544 + 16|0))>>2]|0; + $387 = HEAP32[(32692)>>2]|0; $388 = ($351>>>0)<($387>>>0); if ($388) { _abort(); // unreachable; } - $389 = (($351) + 16|0); + $389 = ((($351)) + 16|0); $390 = HEAP32[$389>>2]|0; $391 = ($390|0)==($v$3$lcssa$i|0); if ($391) { HEAP32[$389>>2] = $R$1$i20; } else { - $392 = (($351) + 20|0); + $392 = ((($351)) + 20|0); HEAP32[$392>>2] = $R$1$i20; } $393 = ($R$1$i20|0)==(0|0); @@ -20382,15 +21547,15 @@ function _malloc($bytes) { break; } } - $394 = HEAP32[((32544 + 16|0))>>2]|0; + $394 = HEAP32[(32692)>>2]|0; $395 = ($R$1$i20>>>0)<($394>>>0); if ($395) { _abort(); // unreachable; } - $396 = (($R$1$i20) + 24|0); + $396 = ((($R$1$i20)) + 24|0); HEAP32[$396>>2] = $351; - $397 = (($v$3$lcssa$i) + 16|0); + $397 = ((($v$3$lcssa$i)) + 16|0); $398 = HEAP32[$397>>2]|0; $399 = ($398|0)==(0|0); do { @@ -20400,27 +21565,27 @@ function _malloc($bytes) { _abort(); // unreachable; } else { - $401 = (($R$1$i20) + 16|0); + $401 = ((($R$1$i20)) + 16|0); HEAP32[$401>>2] = $398; - $402 = (($398) + 24|0); + $402 = ((($398)) + 24|0); HEAP32[$402>>2] = $R$1$i20; break; } } } while(0); - $403 = (($v$3$lcssa$i) + 20|0); + $403 = ((($v$3$lcssa$i)) + 20|0); $404 = HEAP32[$403>>2]|0; $405 = ($404|0)==(0|0); if (!($405)) { - $406 = HEAP32[((32544 + 16|0))>>2]|0; + $406 = HEAP32[(32692)>>2]|0; $407 = ($404>>>0)<($406>>>0); if ($407) { _abort(); // unreachable; } else { - $408 = (($R$1$i20) + 20|0); + $408 = ((($R$1$i20)) + 20|0); HEAP32[$408>>2] = $404; - $409 = (($404) + 24|0); + $409 = ((($404)) + 24|0); HEAP32[$409>>2] = $R$1$i20; break; } @@ -20428,11 +21593,11 @@ function _malloc($bytes) { } } while(0); $410 = ($rsize$3$lcssa$i>>>0)<(16); - L204: do { + L199: do { if ($410) { $411 = (($rsize$3$lcssa$i) + ($246))|0; $412 = $411 | 3; - $413 = (($v$3$lcssa$i) + 4|0); + $413 = ((($v$3$lcssa$i)) + 4|0); HEAP32[$413>>2] = $412; $$sum18$i = (($411) + 4)|0; $414 = (($v$3$lcssa$i) + ($$sum18$i)|0); @@ -20441,11 +21606,11 @@ function _malloc($bytes) { HEAP32[$414>>2] = $416; } else { $417 = $246 | 3; - $418 = (($v$3$lcssa$i) + 4|0); + $418 = ((($v$3$lcssa$i)) + 4|0); HEAP32[$418>>2] = $417; $419 = $rsize$3$lcssa$i | 1; - $$sum$i2338 = $246 | 4; - $420 = (($v$3$lcssa$i) + ($$sum$i2338)|0); + $$sum$i2334 = $246 | 4; + $420 = (($v$3$lcssa$i) + ($$sum$i2334)|0); HEAP32[$420>>2] = $419; $$sum1$i24 = (($rsize$3$lcssa$i) + ($246))|0; $421 = (($v$3$lcssa$i) + ($$sum1$i24)|0); @@ -20454,34 +21619,32 @@ function _malloc($bytes) { $423 = ($rsize$3$lcssa$i>>>0)<(256); if ($423) { $424 = $422 << 1; - $425 = ((32544 + ($424<<2)|0) + 40|0); - $426 = HEAP32[32544>>2]|0; + $425 = (32716 + ($424<<2)|0); + $426 = HEAP32[32676>>2]|0; $427 = 1 << $422; $428 = $426 & $427; $429 = ($428|0)==(0); - do { - if ($429) { - $430 = $426 | $427; - HEAP32[32544>>2] = $430; - $$sum14$pre$i = (($424) + 2)|0; - $$pre$i25 = ((32544 + ($$sum14$pre$i<<2)|0) + 40|0); - $$pre$phi$i26Z2D = $$pre$i25;$F5$0$i = $425; - } else { - $$sum17$i = (($424) + 2)|0; - $431 = ((32544 + ($$sum17$i<<2)|0) + 40|0); - $432 = HEAP32[$431>>2]|0; - $433 = HEAP32[((32544 + 16|0))>>2]|0; - $434 = ($432>>>0)<($433>>>0); - if (!($434)) { - $$pre$phi$i26Z2D = $431;$F5$0$i = $432; - break; - } + if ($429) { + $430 = $426 | $427; + HEAP32[32676>>2] = $430; + $$pre$i25 = (($424) + 2)|0; + $$pre43$i = (32716 + ($$pre$i25<<2)|0); + $$pre$phi$i26Z2D = $$pre43$i;$F5$0$i = $425; + } else { + $$sum17$i = (($424) + 2)|0; + $431 = (32716 + ($$sum17$i<<2)|0); + $432 = HEAP32[$431>>2]|0; + $433 = HEAP32[(32692)>>2]|0; + $434 = ($432>>>0)<($433>>>0); + if ($434) { _abort(); // unreachable; + } else { + $$pre$phi$i26Z2D = $431;$F5$0$i = $432; } - } while(0); + } HEAP32[$$pre$phi$i26Z2D>>2] = $348; - $435 = (($F5$0$i) + 12|0); + $435 = ((($F5$0$i)) + 12|0); HEAP32[$435>>2] = $348; $$sum15$i = (($246) + 8)|0; $436 = (($v$3$lcssa$i) + ($$sum15$i)|0); @@ -20525,7 +21688,7 @@ function _malloc($bytes) { $I7$0$i = $462; } } - $463 = ((32544 + ($I7$0$i<<2)|0) + 304|0); + $463 = (32980 + ($I7$0$i<<2)|0); $$sum2$i = (($246) + 28)|0; $464 = (($v$3$lcssa$i) + ($$sum2$i)|0); HEAP32[$464>>2] = $I7$0$i; @@ -20535,13 +21698,13 @@ function _malloc($bytes) { $466 = (($v$3$lcssa$i) + ($$sum4$i28)|0); HEAP32[$466>>2] = 0; HEAP32[$465>>2] = 0; - $467 = HEAP32[((32544 + 4|0))>>2]|0; + $467 = HEAP32[(32680)>>2]|0; $468 = 1 << $I7$0$i; $469 = $467 & $468; $470 = ($469|0)==(0); if ($470) { $471 = $467 | $468; - HEAP32[((32544 + 4|0))>>2] = $471; + HEAP32[(32680)>>2] = $471; HEAP32[$463>>2] = $348; $$sum5$i = (($246) + 24)|0; $472 = (($v$3$lcssa$i) + ($$sum5$i)|0); @@ -20555,72 +21718,69 @@ function _malloc($bytes) { break; } $475 = HEAP32[$463>>2]|0; - $476 = ($I7$0$i|0)==(31); - if ($476) { - $484 = 0; - } else { - $477 = $I7$0$i >>> 1; - $478 = (25 - ($477))|0; - $484 = $478; - } - $479 = (($475) + 4|0); - $480 = HEAP32[$479>>2]|0; - $481 = $480 & -8; - $482 = ($481|0)==($rsize$3$lcssa$i|0); - L225: do { - if ($482) { + $476 = ((($475)) + 4|0); + $477 = HEAP32[$476>>2]|0; + $478 = $477 & -8; + $479 = ($478|0)==($rsize$3$lcssa$i|0); + L217: do { + if ($479) { $T$0$lcssa$i = $475; } else { - $483 = $rsize$3$lcssa$i << $484; - $K12$027$i = $483;$T$026$i = $475; + $480 = ($I7$0$i|0)==(31); + $481 = $I7$0$i >>> 1; + $482 = (25 - ($481))|0; + $483 = $480 ? 0 : $482; + $484 = $rsize$3$lcssa$i << $483; + $K12$029$i = $484;$T$028$i = $475; while(1) { - $491 = $K12$027$i >>> 31; - $492 = ((($T$026$i) + ($491<<2)|0) + 16|0); + $491 = $K12$029$i >>> 31; + $492 = (((($T$028$i)) + 16|0) + ($491<<2)|0); $487 = HEAP32[$492>>2]|0; $493 = ($487|0)==(0|0); if ($493) { + $$lcssa232 = $492;$T$028$i$lcssa = $T$028$i; break; } - $485 = $K12$027$i << 1; - $486 = (($487) + 4|0); + $485 = $K12$029$i << 1; + $486 = ((($487)) + 4|0); $488 = HEAP32[$486>>2]|0; $489 = $488 & -8; $490 = ($489|0)==($rsize$3$lcssa$i|0); if ($490) { $T$0$lcssa$i = $487; - break L225; + break L217; } else { - $K12$027$i = $485;$T$026$i = $487; + $K12$029$i = $485;$T$028$i = $487; } } - $494 = HEAP32[((32544 + 16|0))>>2]|0; - $495 = ($492>>>0)<($494>>>0); + $494 = HEAP32[(32692)>>2]|0; + $495 = ($$lcssa232>>>0)<($494>>>0); if ($495) { _abort(); // unreachable; } else { - HEAP32[$492>>2] = $348; + HEAP32[$$lcssa232>>2] = $348; $$sum11$i = (($246) + 24)|0; $496 = (($v$3$lcssa$i) + ($$sum11$i)|0); - HEAP32[$496>>2] = $T$026$i; + HEAP32[$496>>2] = $T$028$i$lcssa; $$sum12$i = (($246) + 12)|0; $497 = (($v$3$lcssa$i) + ($$sum12$i)|0); HEAP32[$497>>2] = $348; $$sum13$i = (($246) + 8)|0; $498 = (($v$3$lcssa$i) + ($$sum13$i)|0); HEAP32[$498>>2] = $348; - break L204; + break L199; } } } while(0); - $499 = (($T$0$lcssa$i) + 8|0); + $499 = ((($T$0$lcssa$i)) + 8|0); $500 = HEAP32[$499>>2]|0; - $501 = HEAP32[((32544 + 16|0))>>2]|0; - $502 = ($T$0$lcssa$i>>>0)>=($501>>>0); - $503 = ($500>>>0)>=($501>>>0); - $or$cond24$i = $502 & $503; - if ($or$cond24$i) { - $504 = (($500) + 12|0); + $501 = HEAP32[(32692)>>2]|0; + $502 = ($500>>>0)>=($501>>>0); + $not$$i = ($T$0$lcssa$i>>>0)>=($501>>>0); + $503 = $502 & $not$$i; + if ($503) { + $504 = ((($500)) + 12|0); HEAP32[$504>>2] = $348; HEAP32[$499>>2] = $348; $$sum8$i = (($246) + 8)|0; @@ -20639,9 +21799,9 @@ function _malloc($bytes) { } } } while(0); - $508 = (($v$3$lcssa$i) + 8|0); + $508 = ((($v$3$lcssa$i)) + 8|0); $mem$0 = $508; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } else { $nb$0 = $246; } @@ -20650,16 +21810,16 @@ function _malloc($bytes) { } } } while(0); - $509 = HEAP32[((32544 + 8|0))>>2]|0; + $509 = HEAP32[(32684)>>2]|0; $510 = ($509>>>0)<($nb$0>>>0); if (!($510)) { $511 = (($509) - ($nb$0))|0; - $512 = HEAP32[((32544 + 20|0))>>2]|0; + $512 = HEAP32[(32696)>>2]|0; $513 = ($511>>>0)>(15); if ($513) { $514 = (($512) + ($nb$0)|0); - HEAP32[((32544 + 20|0))>>2] = $514; - HEAP32[((32544 + 8|0))>>2] = $511; + HEAP32[(32696)>>2] = $514; + HEAP32[(32684)>>2] = $511; $515 = $511 | 1; $$sum2 = (($nb$0) + 4)|0; $516 = (($512) + ($$sum2)|0); @@ -20667,13 +21827,13 @@ function _malloc($bytes) { $517 = (($512) + ($509)|0); HEAP32[$517>>2] = $511; $518 = $nb$0 | 3; - $519 = (($512) + 4|0); + $519 = ((($512)) + 4|0); HEAP32[$519>>2] = $518; } else { - HEAP32[((32544 + 8|0))>>2] = 0; - HEAP32[((32544 + 20|0))>>2] = 0; + HEAP32[(32684)>>2] = 0; + HEAP32[(32696)>>2] = 0; $520 = $509 | 3; - $521 = (($512) + 4|0); + $521 = ((($512)) + 4|0); HEAP32[$521>>2] = $520; $$sum1 = (($509) + 4)|0; $522 = (($512) + ($$sum1)|0); @@ -20681,30 +21841,30 @@ function _malloc($bytes) { $524 = $523 | 1; HEAP32[$522>>2] = $524; } - $525 = (($512) + 8|0); + $525 = ((($512)) + 8|0); $mem$0 = $525; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } - $526 = HEAP32[((32544 + 12|0))>>2]|0; + $526 = HEAP32[(32688)>>2]|0; $527 = ($526>>>0)>($nb$0>>>0); if ($527) { $528 = (($526) - ($nb$0))|0; - HEAP32[((32544 + 12|0))>>2] = $528; - $529 = HEAP32[((32544 + 24|0))>>2]|0; + HEAP32[(32688)>>2] = $528; + $529 = HEAP32[(32700)>>2]|0; $530 = (($529) + ($nb$0)|0); - HEAP32[((32544 + 24|0))>>2] = $530; + HEAP32[(32700)>>2] = $530; $531 = $528 | 1; $$sum = (($nb$0) + 4)|0; $532 = (($529) + ($$sum)|0); HEAP32[$532>>2] = $531; $533 = $nb$0 | 3; - $534 = (($529) + 4|0); + $534 = ((($529)) + 4|0); HEAP32[$534>>2] = $533; - $535 = (($529) + 8|0); + $535 = ((($529)) + 8|0); $mem$0 = $535; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } - $536 = HEAP32[33016>>2]|0; + $536 = HEAP32[33148>>2]|0; $537 = ($536|0)==(0); do { if ($537) { @@ -20713,16 +21873,16 @@ function _malloc($bytes) { $540 = $539 & $538; $541 = ($540|0)==(0); if ($541) { - HEAP32[((33016 + 8|0))>>2] = $538; - HEAP32[((33016 + 4|0))>>2] = $538; - HEAP32[((33016 + 12|0))>>2] = -1; - HEAP32[((33016 + 16|0))>>2] = -1; - HEAP32[((33016 + 20|0))>>2] = 0; - HEAP32[((32544 + 444|0))>>2] = 0; + HEAP32[(33156)>>2] = $538; + HEAP32[(33152)>>2] = $538; + HEAP32[(33160)>>2] = -1; + HEAP32[(33164)>>2] = -1; + HEAP32[(33168)>>2] = 0; + HEAP32[(33120)>>2] = 0; $542 = (_time((0|0))|0); $543 = $542 & -16; $544 = $543 ^ 1431655768; - HEAP32[33016>>2] = $544; + HEAP32[33148>>2] = $544; break; } else { _abort(); @@ -20731,7 +21891,7 @@ function _malloc($bytes) { } } while(0); $545 = (($nb$0) + 48)|0; - $546 = HEAP32[((33016 + 8|0))>>2]|0; + $546 = HEAP32[(33156)>>2]|0; $547 = (($nb$0) + 47)|0; $548 = (($546) + ($547))|0; $549 = (0 - ($546))|0; @@ -20739,613 +21899,596 @@ function _malloc($bytes) { $551 = ($550>>>0)>($nb$0>>>0); if (!($551)) { $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } - $552 = HEAP32[((32544 + 440|0))>>2]|0; + $552 = HEAP32[(33116)>>2]|0; $553 = ($552|0)==(0); if (!($553)) { - $554 = HEAP32[((32544 + 432|0))>>2]|0; + $554 = HEAP32[(33108)>>2]|0; $555 = (($554) + ($550))|0; $556 = ($555>>>0)<=($554>>>0); $557 = ($555>>>0)>($552>>>0); $or$cond1$i = $556 | $557; if ($or$cond1$i) { $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } } - $558 = HEAP32[((32544 + 444|0))>>2]|0; + $558 = HEAP32[(33120)>>2]|0; $559 = $558 & 4; $560 = ($559|0)==(0); - L266: do { + L258: do { if ($560) { - $561 = HEAP32[((32544 + 24|0))>>2]|0; + $561 = HEAP32[(32700)>>2]|0; $562 = ($561|0)==(0|0); - L268: do { + L260: do { if ($562) { - label = 181; + label = 174; } else { - $sp$0$i$i = ((32544 + 448|0)); + $sp$0$i$i = (33124); while(1) { $563 = HEAP32[$sp$0$i$i>>2]|0; $564 = ($563>>>0)>($561>>>0); if (!($564)) { - $565 = (($sp$0$i$i) + 4|0); + $565 = ((($sp$0$i$i)) + 4|0); $566 = HEAP32[$565>>2]|0; $567 = (($563) + ($566)|0); $568 = ($567>>>0)>($561>>>0); if ($568) { + $$lcssa228 = $sp$0$i$i;$$lcssa230 = $565; break; } } - $569 = (($sp$0$i$i) + 8|0); + $569 = ((($sp$0$i$i)) + 8|0); $570 = HEAP32[$569>>2]|0; $571 = ($570|0)==(0|0); if ($571) { - label = 181; - break L268; + label = 174; + break L260; } else { $sp$0$i$i = $570; } } - $572 = ($sp$0$i$i|0)==(0|0); - if ($572) { - label = 181; - } else { - $595 = HEAP32[((32544 + 12|0))>>2]|0; - $596 = (($548) - ($595))|0; - $597 = $596 & $549; - $598 = ($597>>>0)<(2147483647); - if ($598) { - $599 = (_sbrk(($597|0))|0); - $600 = HEAP32[$sp$0$i$i>>2]|0; - $601 = HEAP32[$565>>2]|0; - $602 = (($600) + ($601)|0); - $603 = ($599|0)==($602|0); + $594 = HEAP32[(32688)>>2]|0; + $595 = (($548) - ($594))|0; + $596 = $595 & $549; + $597 = ($596>>>0)<(2147483647); + if ($597) { + $598 = (_sbrk(($596|0))|0); + $599 = HEAP32[$$lcssa228>>2]|0; + $600 = HEAP32[$$lcssa230>>2]|0; + $601 = (($599) + ($600)|0); + $602 = ($598|0)==($601|0); + $$3$i = $602 ? $596 : 0; + if ($602) { + $603 = ($598|0)==((-1)|0); if ($603) { - $br$0$i = $599;$ssize$1$i = $597; - label = 190; + $tsize$0323944$i = $$3$i; } else { - $br$030$i = $599;$ssize$129$i = $597; - label = 191; + $tbase$255$i = $598;$tsize$254$i = $$3$i; + label = 194; + break L258; } } else { - $tsize$03141$i = 0; + $br$0$ph$i = $598;$ssize$1$ph$i = $596;$tsize$0$ph$i = $$3$i; + label = 184; } + } else { + $tsize$0323944$i = 0; } } } while(0); do { - if ((label|0) == 181) { - $573 = (_sbrk(0)|0); - $574 = ($573|0)==((-1)|0); - if ($574) { - $tsize$03141$i = 0; + if ((label|0) == 174) { + $572 = (_sbrk(0)|0); + $573 = ($572|0)==((-1)|0); + if ($573) { + $tsize$0323944$i = 0; } else { - $575 = $573; - $576 = HEAP32[((33016 + 4|0))>>2]|0; - $577 = (($576) + -1)|0; - $578 = $577 & $575; - $579 = ($578|0)==(0); - if ($579) { + $574 = $572; + $575 = HEAP32[(33152)>>2]|0; + $576 = (($575) + -1)|0; + $577 = $576 & $574; + $578 = ($577|0)==(0); + if ($578) { $ssize$0$i = $550; } else { - $580 = (($577) + ($575))|0; - $581 = (0 - ($576))|0; - $582 = $580 & $581; - $583 = (($550) - ($575))|0; - $584 = (($583) + ($582))|0; - $ssize$0$i = $584; + $579 = (($576) + ($574))|0; + $580 = (0 - ($575))|0; + $581 = $579 & $580; + $582 = (($550) - ($574))|0; + $583 = (($582) + ($581))|0; + $ssize$0$i = $583; } - $585 = HEAP32[((32544 + 432|0))>>2]|0; - $586 = (($585) + ($ssize$0$i))|0; - $587 = ($ssize$0$i>>>0)>($nb$0>>>0); - $588 = ($ssize$0$i>>>0)<(2147483647); - $or$cond$i29 = $587 & $588; - if ($or$cond$i29) { - $589 = HEAP32[((32544 + 440|0))>>2]|0; - $590 = ($589|0)==(0); - if (!($590)) { - $591 = ($586>>>0)<=($585>>>0); - $592 = ($586>>>0)>($589>>>0); - $or$cond2$i = $591 | $592; + $584 = HEAP32[(33108)>>2]|0; + $585 = (($584) + ($ssize$0$i))|0; + $586 = ($ssize$0$i>>>0)>($nb$0>>>0); + $587 = ($ssize$0$i>>>0)<(2147483647); + $or$cond$i30 = $586 & $587; + if ($or$cond$i30) { + $588 = HEAP32[(33116)>>2]|0; + $589 = ($588|0)==(0); + if (!($589)) { + $590 = ($585>>>0)<=($584>>>0); + $591 = ($585>>>0)>($588>>>0); + $or$cond2$i = $590 | $591; if ($or$cond2$i) { - $tsize$03141$i = 0; + $tsize$0323944$i = 0; break; } } - $593 = (_sbrk(($ssize$0$i|0))|0); - $594 = ($593|0)==($573|0); - if ($594) { - $br$0$i = $573;$ssize$1$i = $ssize$0$i; - label = 190; + $592 = (_sbrk(($ssize$0$i|0))|0); + $593 = ($592|0)==($572|0); + $ssize$0$$i = $593 ? $ssize$0$i : 0; + if ($593) { + $tbase$255$i = $572;$tsize$254$i = $ssize$0$$i; + label = 194; + break L258; } else { - $br$030$i = $593;$ssize$129$i = $ssize$0$i; - label = 191; + $br$0$ph$i = $592;$ssize$1$ph$i = $ssize$0$i;$tsize$0$ph$i = $ssize$0$$i; + label = 184; } } else { - $tsize$03141$i = 0; + $tsize$0323944$i = 0; } } } } while(0); - L288: do { - if ((label|0) == 190) { - $604 = ($br$0$i|0)==((-1)|0); - if ($604) { - $tsize$03141$i = $ssize$1$i; - } else { - $tbase$245$i = $br$0$i;$tsize$244$i = $ssize$1$i; - label = 201; - break L266; - } - } - else if ((label|0) == 191) { - $605 = (0 - ($ssize$129$i))|0; - $606 = ($br$030$i|0)!=((-1)|0); - $607 = ($ssize$129$i>>>0)<(2147483647); - $or$cond5$i = $606 & $607; - $608 = ($545>>>0)>($ssize$129$i>>>0); - $or$cond4$i = $or$cond5$i & $608; + L280: do { + if ((label|0) == 184) { + $604 = (0 - ($ssize$1$ph$i))|0; + $605 = ($br$0$ph$i|0)!=((-1)|0); + $606 = ($ssize$1$ph$i>>>0)<(2147483647); + $or$cond5$i = $606 & $605; + $607 = ($545>>>0)>($ssize$1$ph$i>>>0); + $or$cond6$i = $607 & $or$cond5$i; do { - if ($or$cond4$i) { - $609 = HEAP32[((33016 + 8|0))>>2]|0; - $610 = (($547) - ($ssize$129$i))|0; - $611 = (($610) + ($609))|0; - $612 = (0 - ($609))|0; - $613 = $611 & $612; - $614 = ($613>>>0)<(2147483647); - if ($614) { - $615 = (_sbrk(($613|0))|0); - $616 = ($615|0)==((-1)|0); - if ($616) { - (_sbrk(($605|0))|0); - $tsize$03141$i = 0; - break L288; + if ($or$cond6$i) { + $608 = HEAP32[(33156)>>2]|0; + $609 = (($547) - ($ssize$1$ph$i))|0; + $610 = (($609) + ($608))|0; + $611 = (0 - ($608))|0; + $612 = $610 & $611; + $613 = ($612>>>0)<(2147483647); + if ($613) { + $614 = (_sbrk(($612|0))|0); + $615 = ($614|0)==((-1)|0); + if ($615) { + (_sbrk(($604|0))|0); + $tsize$0323944$i = $tsize$0$ph$i; + break L280; } else { - $617 = (($613) + ($ssize$129$i))|0; - $ssize$2$i = $617; + $616 = (($612) + ($ssize$1$ph$i))|0; + $ssize$2$i = $616; break; } } else { - $ssize$2$i = $ssize$129$i; + $ssize$2$i = $ssize$1$ph$i; } } else { - $ssize$2$i = $ssize$129$i; + $ssize$2$i = $ssize$1$ph$i; } } while(0); - $618 = ($br$030$i|0)==((-1)|0); - if ($618) { - $tsize$03141$i = 0; + $617 = ($br$0$ph$i|0)==((-1)|0); + if ($617) { + $tsize$0323944$i = $tsize$0$ph$i; } else { - $tbase$245$i = $br$030$i;$tsize$244$i = $ssize$2$i; - label = 201; - break L266; + $tbase$255$i = $br$0$ph$i;$tsize$254$i = $ssize$2$i; + label = 194; + break L258; } } } while(0); - $619 = HEAP32[((32544 + 444|0))>>2]|0; - $620 = $619 | 4; - HEAP32[((32544 + 444|0))>>2] = $620; - $tsize$1$i = $tsize$03141$i; - label = 198; + $618 = HEAP32[(33120)>>2]|0; + $619 = $618 | 4; + HEAP32[(33120)>>2] = $619; + $tsize$1$i = $tsize$0323944$i; + label = 191; } else { $tsize$1$i = 0; - label = 198; + label = 191; } } while(0); - if ((label|0) == 198) { - $621 = ($550>>>0)<(2147483647); - if ($621) { - $622 = (_sbrk(($550|0))|0); - $623 = (_sbrk(0)|0); + if ((label|0) == 191) { + $620 = ($550>>>0)<(2147483647); + if ($620) { + $621 = (_sbrk(($550|0))|0); + $622 = (_sbrk(0)|0); + $623 = ($621|0)!=((-1)|0); $624 = ($622|0)!=((-1)|0); - $625 = ($623|0)!=((-1)|0); - $or$cond3$i = $624 & $625; - $626 = ($622>>>0)<($623>>>0); - $or$cond6$i = $or$cond3$i & $626; - if ($or$cond6$i) { - $627 = $623; - $628 = $622; - $629 = (($627) - ($628))|0; - $630 = (($nb$0) + 40)|0; - $631 = ($629>>>0)>($630>>>0); - $$tsize$1$i = $631 ? $629 : $tsize$1$i; - if ($631) { - $tbase$245$i = $622;$tsize$244$i = $$tsize$1$i; - label = 201; + $or$cond3$i = $623 & $624; + $625 = ($621>>>0)<($622>>>0); + $or$cond8$i = $625 & $or$cond3$i; + if ($or$cond8$i) { + $626 = $622; + $627 = $621; + $628 = (($626) - ($627))|0; + $629 = (($nb$0) + 40)|0; + $630 = ($628>>>0)>($629>>>0); + $$tsize$1$i = $630 ? $628 : $tsize$1$i; + if ($630) { + $tbase$255$i = $621;$tsize$254$i = $$tsize$1$i; + label = 194; } } } } - if ((label|0) == 201) { - $632 = HEAP32[((32544 + 432|0))>>2]|0; - $633 = (($632) + ($tsize$244$i))|0; - HEAP32[((32544 + 432|0))>>2] = $633; - $634 = HEAP32[((32544 + 436|0))>>2]|0; - $635 = ($633>>>0)>($634>>>0); - if ($635) { - HEAP32[((32544 + 436|0))>>2] = $633; - } - $636 = HEAP32[((32544 + 24|0))>>2]|0; - $637 = ($636|0)==(0|0); - L308: do { - if ($637) { - $638 = HEAP32[((32544 + 16|0))>>2]|0; - $639 = ($638|0)==(0|0); - $640 = ($tbase$245$i>>>0)<($638>>>0); - $or$cond8$i = $639 | $640; - if ($or$cond8$i) { - HEAP32[((32544 + 16|0))>>2] = $tbase$245$i; - } - HEAP32[((32544 + 448|0))>>2] = $tbase$245$i; - HEAP32[((32544 + 452|0))>>2] = $tsize$244$i; - HEAP32[((32544 + 460|0))>>2] = 0; - $641 = HEAP32[33016>>2]|0; - HEAP32[((32544 + 36|0))>>2] = $641; - HEAP32[((32544 + 32|0))>>2] = -1; + if ((label|0) == 194) { + $631 = HEAP32[(33108)>>2]|0; + $632 = (($631) + ($tsize$254$i))|0; + HEAP32[(33108)>>2] = $632; + $633 = HEAP32[(33112)>>2]|0; + $634 = ($632>>>0)>($633>>>0); + if ($634) { + HEAP32[(33112)>>2] = $632; + } + $635 = HEAP32[(32700)>>2]|0; + $636 = ($635|0)==(0|0); + L299: do { + if ($636) { + $637 = HEAP32[(32692)>>2]|0; + $638 = ($637|0)==(0|0); + $639 = ($tbase$255$i>>>0)<($637>>>0); + $or$cond9$i = $638 | $639; + if ($or$cond9$i) { + HEAP32[(32692)>>2] = $tbase$255$i; + } + HEAP32[(33124)>>2] = $tbase$255$i; + HEAP32[(33128)>>2] = $tsize$254$i; + HEAP32[(33136)>>2] = 0; + $640 = HEAP32[33148>>2]|0; + HEAP32[(32712)>>2] = $640; + HEAP32[(32708)>>2] = -1; $i$02$i$i = 0; while(1) { - $642 = $i$02$i$i << 1; - $643 = ((32544 + ($642<<2)|0) + 40|0); - $$sum$i$i = (($642) + 3)|0; - $644 = ((32544 + ($$sum$i$i<<2)|0) + 40|0); - HEAP32[$644>>2] = $643; - $$sum1$i$i = (($642) + 2)|0; - $645 = ((32544 + ($$sum1$i$i<<2)|0) + 40|0); - HEAP32[$645>>2] = $643; - $646 = (($i$02$i$i) + 1)|0; - $exitcond$i$i = ($646|0)==(32); + $641 = $i$02$i$i << 1; + $642 = (32716 + ($641<<2)|0); + $$sum$i$i = (($641) + 3)|0; + $643 = (32716 + ($$sum$i$i<<2)|0); + HEAP32[$643>>2] = $642; + $$sum1$i$i = (($641) + 2)|0; + $644 = (32716 + ($$sum1$i$i<<2)|0); + HEAP32[$644>>2] = $642; + $645 = (($i$02$i$i) + 1)|0; + $exitcond$i$i = ($645|0)==(32); if ($exitcond$i$i) { break; } else { - $i$02$i$i = $646; + $i$02$i$i = $645; } } - $647 = (($tsize$244$i) + -40)|0; - $648 = (($tbase$245$i) + 8|0); - $649 = $648; - $650 = $649 & 7; - $651 = ($650|0)==(0); - if ($651) { - $655 = 0; - } else { - $652 = (0 - ($649))|0; - $653 = $652 & 7; - $655 = $653; - } - $654 = (($tbase$245$i) + ($655)|0); - $656 = (($647) - ($655))|0; - HEAP32[((32544 + 24|0))>>2] = $654; - HEAP32[((32544 + 12|0))>>2] = $656; - $657 = $656 | 1; - $$sum$i12$i = (($655) + 4)|0; - $658 = (($tbase$245$i) + ($$sum$i12$i)|0); - HEAP32[$658>>2] = $657; - $$sum2$i$i = (($tsize$244$i) + -36)|0; - $659 = (($tbase$245$i) + ($$sum2$i$i)|0); - HEAP32[$659>>2] = 40; - $660 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $660; + $646 = (($tsize$254$i) + -40)|0; + $647 = ((($tbase$255$i)) + 8|0); + $648 = $647; + $649 = $648 & 7; + $650 = ($649|0)==(0); + $651 = (0 - ($648))|0; + $652 = $651 & 7; + $653 = $650 ? 0 : $652; + $654 = (($tbase$255$i) + ($653)|0); + $655 = (($646) - ($653))|0; + HEAP32[(32700)>>2] = $654; + HEAP32[(32688)>>2] = $655; + $656 = $655 | 1; + $$sum$i13$i = (($653) + 4)|0; + $657 = (($tbase$255$i) + ($$sum$i13$i)|0); + HEAP32[$657>>2] = $656; + $$sum2$i$i = (($tsize$254$i) + -36)|0; + $658 = (($tbase$255$i) + ($$sum2$i$i)|0); + HEAP32[$658>>2] = 40; + $659 = HEAP32[(33164)>>2]|0; + HEAP32[(32704)>>2] = $659; } else { - $sp$073$i = ((32544 + 448|0)); + $sp$084$i = (33124); while(1) { - $661 = HEAP32[$sp$073$i>>2]|0; - $662 = (($sp$073$i) + 4|0); - $663 = HEAP32[$662>>2]|0; - $664 = (($661) + ($663)|0); - $665 = ($tbase$245$i|0)==($664|0); - if ($665) { - label = 213; + $660 = HEAP32[$sp$084$i>>2]|0; + $661 = ((($sp$084$i)) + 4|0); + $662 = HEAP32[$661>>2]|0; + $663 = (($660) + ($662)|0); + $664 = ($tbase$255$i|0)==($663|0); + if ($664) { + $$lcssa222 = $660;$$lcssa224 = $661;$$lcssa226 = $662;$sp$084$i$lcssa = $sp$084$i; + label = 204; break; } - $666 = (($sp$073$i) + 8|0); - $667 = HEAP32[$666>>2]|0; - $668 = ($667|0)==(0|0); - if ($668) { + $665 = ((($sp$084$i)) + 8|0); + $666 = HEAP32[$665>>2]|0; + $667 = ($666|0)==(0|0); + if ($667) { break; } else { - $sp$073$i = $667; + $sp$084$i = $666; } } - if ((label|0) == 213) { - $669 = (($sp$073$i) + 12|0); - $670 = HEAP32[$669>>2]|0; - $671 = $670 & 8; - $672 = ($671|0)==(0); - if ($672) { - $673 = ($636>>>0)>=($661>>>0); - $674 = ($636>>>0)<($tbase$245$i>>>0); - $or$cond47$i = $673 & $674; - if ($or$cond47$i) { - $675 = (($663) + ($tsize$244$i))|0; - HEAP32[$662>>2] = $675; - $676 = HEAP32[((32544 + 12|0))>>2]|0; - $677 = (($676) + ($tsize$244$i))|0; - $678 = (($636) + 8|0); - $679 = $678; - $680 = $679 & 7; - $681 = ($680|0)==(0); - if ($681) { - $685 = 0; - } else { - $682 = (0 - ($679))|0; - $683 = $682 & 7; - $685 = $683; - } - $684 = (($636) + ($685)|0); - $686 = (($677) - ($685))|0; - HEAP32[((32544 + 24|0))>>2] = $684; - HEAP32[((32544 + 12|0))>>2] = $686; - $687 = $686 | 1; - $$sum$i16$i = (($685) + 4)|0; - $688 = (($636) + ($$sum$i16$i)|0); - HEAP32[$688>>2] = $687; - $$sum2$i17$i = (($677) + 4)|0; - $689 = (($636) + ($$sum2$i17$i)|0); - HEAP32[$689>>2] = 40; - $690 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $690; + if ((label|0) == 204) { + $668 = ((($sp$084$i$lcssa)) + 12|0); + $669 = HEAP32[$668>>2]|0; + $670 = $669 & 8; + $671 = ($670|0)==(0); + if ($671) { + $672 = ($635>>>0)>=($$lcssa222>>>0); + $673 = ($635>>>0)<($tbase$255$i>>>0); + $or$cond57$i = $673 & $672; + if ($or$cond57$i) { + $674 = (($$lcssa226) + ($tsize$254$i))|0; + HEAP32[$$lcssa224>>2] = $674; + $675 = HEAP32[(32688)>>2]|0; + $676 = (($675) + ($tsize$254$i))|0; + $677 = ((($635)) + 8|0); + $678 = $677; + $679 = $678 & 7; + $680 = ($679|0)==(0); + $681 = (0 - ($678))|0; + $682 = $681 & 7; + $683 = $680 ? 0 : $682; + $684 = (($635) + ($683)|0); + $685 = (($676) - ($683))|0; + HEAP32[(32700)>>2] = $684; + HEAP32[(32688)>>2] = $685; + $686 = $685 | 1; + $$sum$i17$i = (($683) + 4)|0; + $687 = (($635) + ($$sum$i17$i)|0); + HEAP32[$687>>2] = $686; + $$sum2$i18$i = (($676) + 4)|0; + $688 = (($635) + ($$sum2$i18$i)|0); + HEAP32[$688>>2] = 40; + $689 = HEAP32[(33164)>>2]|0; + HEAP32[(32704)>>2] = $689; break; } } } - $691 = HEAP32[((32544 + 16|0))>>2]|0; - $692 = ($tbase$245$i>>>0)<($691>>>0); - if ($692) { - HEAP32[((32544 + 16|0))>>2] = $tbase$245$i; - $756 = $tbase$245$i; + $690 = HEAP32[(32692)>>2]|0; + $691 = ($tbase$255$i>>>0)<($690>>>0); + if ($691) { + HEAP32[(32692)>>2] = $tbase$255$i; + $755 = $tbase$255$i; } else { - $756 = $691; + $755 = $690; } - $693 = (($tbase$245$i) + ($tsize$244$i)|0); - $sp$166$i = ((32544 + 448|0)); + $692 = (($tbase$255$i) + ($tsize$254$i)|0); + $sp$183$i = (33124); while(1) { - $694 = HEAP32[$sp$166$i>>2]|0; - $695 = ($694|0)==($693|0); - if ($695) { - label = 223; + $693 = HEAP32[$sp$183$i>>2]|0; + $694 = ($693|0)==($692|0); + if ($694) { + $$lcssa219 = $sp$183$i;$sp$183$i$lcssa = $sp$183$i; + label = 212; break; } - $696 = (($sp$166$i) + 8|0); - $697 = HEAP32[$696>>2]|0; - $698 = ($697|0)==(0|0); - if ($698) { + $695 = ((($sp$183$i)) + 8|0); + $696 = HEAP32[$695>>2]|0; + $697 = ($696|0)==(0|0); + if ($697) { + $sp$0$i$i$i = (33124); break; } else { - $sp$166$i = $697; + $sp$183$i = $696; } } - if ((label|0) == 223) { - $699 = (($sp$166$i) + 12|0); - $700 = HEAP32[$699>>2]|0; - $701 = $700 & 8; - $702 = ($701|0)==(0); - if ($702) { - HEAP32[$sp$166$i>>2] = $tbase$245$i; - $703 = (($sp$166$i) + 4|0); - $704 = HEAP32[$703>>2]|0; - $705 = (($704) + ($tsize$244$i))|0; - HEAP32[$703>>2] = $705; - $706 = (($tbase$245$i) + 8|0); - $707 = $706; - $708 = $707 & 7; - $709 = ($708|0)==(0); - if ($709) { - $713 = 0; - } else { - $710 = (0 - ($707))|0; - $711 = $710 & 7; - $713 = $711; - } - $712 = (($tbase$245$i) + ($713)|0); - $$sum102$i = (($tsize$244$i) + 8)|0; - $714 = (($tbase$245$i) + ($$sum102$i)|0); - $715 = $714; - $716 = $715 & 7; - $717 = ($716|0)==(0); - if ($717) { - $720 = 0; - } else { - $718 = (0 - ($715))|0; - $719 = $718 & 7; - $720 = $719; - } - $$sum103$i = (($720) + ($tsize$244$i))|0; - $721 = (($tbase$245$i) + ($$sum103$i)|0); - $722 = $721; - $723 = $712; - $724 = (($722) - ($723))|0; - $$sum$i19$i = (($713) + ($nb$0))|0; - $725 = (($tbase$245$i) + ($$sum$i19$i)|0); - $726 = (($724) - ($nb$0))|0; - $727 = $nb$0 | 3; - $$sum1$i20$i = (($713) + 4)|0; - $728 = (($tbase$245$i) + ($$sum1$i20$i)|0); - HEAP32[$728>>2] = $727; - $729 = ($721|0)==($636|0); - L345: do { - if ($729) { - $730 = HEAP32[((32544 + 12|0))>>2]|0; - $731 = (($730) + ($726))|0; - HEAP32[((32544 + 12|0))>>2] = $731; - HEAP32[((32544 + 24|0))>>2] = $725; - $732 = $731 | 1; + if ((label|0) == 212) { + $698 = ((($sp$183$i$lcssa)) + 12|0); + $699 = HEAP32[$698>>2]|0; + $700 = $699 & 8; + $701 = ($700|0)==(0); + if ($701) { + HEAP32[$$lcssa219>>2] = $tbase$255$i; + $702 = ((($sp$183$i$lcssa)) + 4|0); + $703 = HEAP32[$702>>2]|0; + $704 = (($703) + ($tsize$254$i))|0; + HEAP32[$702>>2] = $704; + $705 = ((($tbase$255$i)) + 8|0); + $706 = $705; + $707 = $706 & 7; + $708 = ($707|0)==(0); + $709 = (0 - ($706))|0; + $710 = $709 & 7; + $711 = $708 ? 0 : $710; + $712 = (($tbase$255$i) + ($711)|0); + $$sum112$i = (($tsize$254$i) + 8)|0; + $713 = (($tbase$255$i) + ($$sum112$i)|0); + $714 = $713; + $715 = $714 & 7; + $716 = ($715|0)==(0); + $717 = (0 - ($714))|0; + $718 = $717 & 7; + $719 = $716 ? 0 : $718; + $$sum113$i = (($719) + ($tsize$254$i))|0; + $720 = (($tbase$255$i) + ($$sum113$i)|0); + $721 = $720; + $722 = $712; + $723 = (($721) - ($722))|0; + $$sum$i19$i = (($711) + ($nb$0))|0; + $724 = (($tbase$255$i) + ($$sum$i19$i)|0); + $725 = (($723) - ($nb$0))|0; + $726 = $nb$0 | 3; + $$sum1$i20$i = (($711) + 4)|0; + $727 = (($tbase$255$i) + ($$sum1$i20$i)|0); + HEAP32[$727>>2] = $726; + $728 = ($720|0)==($635|0); + L324: do { + if ($728) { + $729 = HEAP32[(32688)>>2]|0; + $730 = (($729) + ($725))|0; + HEAP32[(32688)>>2] = $730; + HEAP32[(32700)>>2] = $724; + $731 = $730 | 1; $$sum42$i$i = (($$sum$i19$i) + 4)|0; - $733 = (($tbase$245$i) + ($$sum42$i$i)|0); - HEAP32[$733>>2] = $732; + $732 = (($tbase$255$i) + ($$sum42$i$i)|0); + HEAP32[$732>>2] = $731; } else { - $734 = HEAP32[((32544 + 20|0))>>2]|0; - $735 = ($721|0)==($734|0); - if ($735) { - $736 = HEAP32[((32544 + 8|0))>>2]|0; - $737 = (($736) + ($726))|0; - HEAP32[((32544 + 8|0))>>2] = $737; - HEAP32[((32544 + 20|0))>>2] = $725; - $738 = $737 | 1; + $733 = HEAP32[(32696)>>2]|0; + $734 = ($720|0)==($733|0); + if ($734) { + $735 = HEAP32[(32684)>>2]|0; + $736 = (($735) + ($725))|0; + HEAP32[(32684)>>2] = $736; + HEAP32[(32696)>>2] = $724; + $737 = $736 | 1; $$sum40$i$i = (($$sum$i19$i) + 4)|0; - $739 = (($tbase$245$i) + ($$sum40$i$i)|0); - HEAP32[$739>>2] = $738; - $$sum41$i$i = (($737) + ($$sum$i19$i))|0; - $740 = (($tbase$245$i) + ($$sum41$i$i)|0); - HEAP32[$740>>2] = $737; + $738 = (($tbase$255$i) + ($$sum40$i$i)|0); + HEAP32[$738>>2] = $737; + $$sum41$i$i = (($736) + ($$sum$i19$i))|0; + $739 = (($tbase$255$i) + ($$sum41$i$i)|0); + HEAP32[$739>>2] = $736; break; } - $$sum2$i21$i = (($tsize$244$i) + 4)|0; - $$sum104$i = (($$sum2$i21$i) + ($720))|0; - $741 = (($tbase$245$i) + ($$sum104$i)|0); - $742 = HEAP32[$741>>2]|0; - $743 = $742 & 3; - $744 = ($743|0)==(1); - if ($744) { - $745 = $742 & -8; - $746 = $742 >>> 3; - $747 = ($742>>>0)<(256); - L353: do { - if ($747) { - $$sum3738$i$i = $720 | 8; - $$sum114$i = (($$sum3738$i$i) + ($tsize$244$i))|0; - $748 = (($tbase$245$i) + ($$sum114$i)|0); - $749 = HEAP32[$748>>2]|0; - $$sum39$i$i = (($tsize$244$i) + 12)|0; - $$sum115$i = (($$sum39$i$i) + ($720))|0; - $750 = (($tbase$245$i) + ($$sum115$i)|0); - $751 = HEAP32[$750>>2]|0; - $752 = $746 << 1; - $753 = ((32544 + ($752<<2)|0) + 40|0); - $754 = ($749|0)==($753|0); + $$sum2$i21$i = (($tsize$254$i) + 4)|0; + $$sum114$i = (($$sum2$i21$i) + ($719))|0; + $740 = (($tbase$255$i) + ($$sum114$i)|0); + $741 = HEAP32[$740>>2]|0; + $742 = $741 & 3; + $743 = ($742|0)==(1); + if ($743) { + $744 = $741 & -8; + $745 = $741 >>> 3; + $746 = ($741>>>0)<(256); + L332: do { + if ($746) { + $$sum3738$i$i = $719 | 8; + $$sum124$i = (($$sum3738$i$i) + ($tsize$254$i))|0; + $747 = (($tbase$255$i) + ($$sum124$i)|0); + $748 = HEAP32[$747>>2]|0; + $$sum39$i$i = (($tsize$254$i) + 12)|0; + $$sum125$i = (($$sum39$i$i) + ($719))|0; + $749 = (($tbase$255$i) + ($$sum125$i)|0); + $750 = HEAP32[$749>>2]|0; + $751 = $745 << 1; + $752 = (32716 + ($751<<2)|0); + $753 = ($748|0)==($752|0); do { - if (!($754)) { - $755 = ($749>>>0)<($756>>>0); - if ($755) { + if (!($753)) { + $754 = ($748>>>0)<($755>>>0); + if ($754) { _abort(); // unreachable; } - $757 = (($749) + 12|0); - $758 = HEAP32[$757>>2]|0; - $759 = ($758|0)==($721|0); - if ($759) { + $756 = ((($748)) + 12|0); + $757 = HEAP32[$756>>2]|0; + $758 = ($757|0)==($720|0); + if ($758) { break; } _abort(); // unreachable; } } while(0); - $760 = ($751|0)==($749|0); - if ($760) { - $761 = 1 << $746; - $762 = $761 ^ -1; - $763 = HEAP32[32544>>2]|0; - $764 = $763 & $762; - HEAP32[32544>>2] = $764; + $759 = ($750|0)==($748|0); + if ($759) { + $760 = 1 << $745; + $761 = $760 ^ -1; + $762 = HEAP32[32676>>2]|0; + $763 = $762 & $761; + HEAP32[32676>>2] = $763; break; } - $765 = ($751|0)==($753|0); + $764 = ($750|0)==($752|0); do { - if ($765) { - $$pre58$i$i = (($751) + 8|0); - $$pre$phi59$i$iZ2D = $$pre58$i$i; + if ($764) { + $$pre57$i$i = ((($750)) + 8|0); + $$pre$phi58$i$iZ2D = $$pre57$i$i; } else { - $766 = ($751>>>0)<($756>>>0); - if ($766) { + $765 = ($750>>>0)<($755>>>0); + if ($765) { _abort(); // unreachable; } - $767 = (($751) + 8|0); - $768 = HEAP32[$767>>2]|0; - $769 = ($768|0)==($721|0); - if ($769) { - $$pre$phi59$i$iZ2D = $767; + $766 = ((($750)) + 8|0); + $767 = HEAP32[$766>>2]|0; + $768 = ($767|0)==($720|0); + if ($768) { + $$pre$phi58$i$iZ2D = $766; break; } _abort(); // unreachable; } } while(0); - $770 = (($749) + 12|0); - HEAP32[$770>>2] = $751; - HEAP32[$$pre$phi59$i$iZ2D>>2] = $749; + $769 = ((($748)) + 12|0); + HEAP32[$769>>2] = $750; + HEAP32[$$pre$phi58$i$iZ2D>>2] = $748; } else { - $$sum34$i$i = $720 | 24; - $$sum105$i = (($$sum34$i$i) + ($tsize$244$i))|0; - $771 = (($tbase$245$i) + ($$sum105$i)|0); - $772 = HEAP32[$771>>2]|0; - $$sum5$i$i = (($tsize$244$i) + 12)|0; - $$sum106$i = (($$sum5$i$i) + ($720))|0; - $773 = (($tbase$245$i) + ($$sum106$i)|0); - $774 = HEAP32[$773>>2]|0; - $775 = ($774|0)==($721|0); + $$sum34$i$i = $719 | 24; + $$sum115$i = (($$sum34$i$i) + ($tsize$254$i))|0; + $770 = (($tbase$255$i) + ($$sum115$i)|0); + $771 = HEAP32[$770>>2]|0; + $$sum5$i$i = (($tsize$254$i) + 12)|0; + $$sum116$i = (($$sum5$i$i) + ($719))|0; + $772 = (($tbase$255$i) + ($$sum116$i)|0); + $773 = HEAP32[$772>>2]|0; + $774 = ($773|0)==($720|0); do { - if ($775) { - $$sum67$i$i = $720 | 16; - $$sum112$i = (($$sum2$i21$i) + ($$sum67$i$i))|0; - $785 = (($tbase$245$i) + ($$sum112$i)|0); - $786 = HEAP32[$785>>2]|0; - $787 = ($786|0)==(0|0); - if ($787) { - $$sum113$i = (($$sum67$i$i) + ($tsize$244$i))|0; - $788 = (($tbase$245$i) + ($$sum113$i)|0); - $789 = HEAP32[$788>>2]|0; - $790 = ($789|0)==(0|0); - if ($790) { + if ($774) { + $$sum67$i$i = $719 | 16; + $$sum122$i = (($$sum2$i21$i) + ($$sum67$i$i))|0; + $784 = (($tbase$255$i) + ($$sum122$i)|0); + $785 = HEAP32[$784>>2]|0; + $786 = ($785|0)==(0|0); + if ($786) { + $$sum123$i = (($$sum67$i$i) + ($tsize$254$i))|0; + $787 = (($tbase$255$i) + ($$sum123$i)|0); + $788 = HEAP32[$787>>2]|0; + $789 = ($788|0)==(0|0); + if ($789) { $R$1$i$i = 0; break; } else { - $R$0$i$i = $789;$RP$0$i$i = $788; + $R$0$i$i = $788;$RP$0$i$i = $787; } } else { - $R$0$i$i = $786;$RP$0$i$i = $785; + $R$0$i$i = $785;$RP$0$i$i = $784; } while(1) { - $791 = (($R$0$i$i) + 20|0); - $792 = HEAP32[$791>>2]|0; - $793 = ($792|0)==(0|0); - if (!($793)) { - $R$0$i$i = $792;$RP$0$i$i = $791; + $790 = ((($R$0$i$i)) + 20|0); + $791 = HEAP32[$790>>2]|0; + $792 = ($791|0)==(0|0); + if (!($792)) { + $R$0$i$i = $791;$RP$0$i$i = $790; continue; } - $794 = (($R$0$i$i) + 16|0); - $795 = HEAP32[$794>>2]|0; - $796 = ($795|0)==(0|0); - if ($796) { + $793 = ((($R$0$i$i)) + 16|0); + $794 = HEAP32[$793>>2]|0; + $795 = ($794|0)==(0|0); + if ($795) { + $R$0$i$i$lcssa = $R$0$i$i;$RP$0$i$i$lcssa = $RP$0$i$i; break; } else { - $R$0$i$i = $795;$RP$0$i$i = $794; + $R$0$i$i = $794;$RP$0$i$i = $793; } } - $797 = ($RP$0$i$i>>>0)<($756>>>0); - if ($797) { + $796 = ($RP$0$i$i$lcssa>>>0)<($755>>>0); + if ($796) { _abort(); // unreachable; } else { - HEAP32[$RP$0$i$i>>2] = 0; - $R$1$i$i = $R$0$i$i; + HEAP32[$RP$0$i$i$lcssa>>2] = 0; + $R$1$i$i = $R$0$i$i$lcssa; break; } } else { - $$sum3536$i$i = $720 | 8; - $$sum107$i = (($$sum3536$i$i) + ($tsize$244$i))|0; - $776 = (($tbase$245$i) + ($$sum107$i)|0); - $777 = HEAP32[$776>>2]|0; - $778 = ($777>>>0)<($756>>>0); - if ($778) { + $$sum3536$i$i = $719 | 8; + $$sum117$i = (($$sum3536$i$i) + ($tsize$254$i))|0; + $775 = (($tbase$255$i) + ($$sum117$i)|0); + $776 = HEAP32[$775>>2]|0; + $777 = ($776>>>0)<($755>>>0); + if ($777) { _abort(); // unreachable; } - $779 = (($777) + 12|0); - $780 = HEAP32[$779>>2]|0; - $781 = ($780|0)==($721|0); - if (!($781)) { + $778 = ((($776)) + 12|0); + $779 = HEAP32[$778>>2]|0; + $780 = ($779|0)==($720|0); + if (!($780)) { _abort(); // unreachable; } - $782 = (($774) + 8|0); - $783 = HEAP32[$782>>2]|0; - $784 = ($783|0)==($721|0); - if ($784) { - HEAP32[$779>>2] = $774; - HEAP32[$782>>2] = $777; - $R$1$i$i = $774; + $781 = ((($773)) + 8|0); + $782 = HEAP32[$781>>2]|0; + $783 = ($782|0)==($720|0); + if ($783) { + HEAP32[$778>>2] = $773; + HEAP32[$781>>2] = $776; + $R$1$i$i = $773; break; } else { _abort(); @@ -21353,304 +22496,301 @@ function _malloc($bytes) { } } } while(0); - $798 = ($772|0)==(0|0); - if ($798) { + $797 = ($771|0)==(0|0); + if ($797) { break; } - $$sum30$i$i = (($tsize$244$i) + 28)|0; - $$sum108$i = (($$sum30$i$i) + ($720))|0; - $799 = (($tbase$245$i) + ($$sum108$i)|0); - $800 = HEAP32[$799>>2]|0; - $801 = ((32544 + ($800<<2)|0) + 304|0); - $802 = HEAP32[$801>>2]|0; - $803 = ($721|0)==($802|0); + $$sum30$i$i = (($tsize$254$i) + 28)|0; + $$sum118$i = (($$sum30$i$i) + ($719))|0; + $798 = (($tbase$255$i) + ($$sum118$i)|0); + $799 = HEAP32[$798>>2]|0; + $800 = (32980 + ($799<<2)|0); + $801 = HEAP32[$800>>2]|0; + $802 = ($720|0)==($801|0); do { - if ($803) { - HEAP32[$801>>2] = $R$1$i$i; + if ($802) { + HEAP32[$800>>2] = $R$1$i$i; $cond$i$i = ($R$1$i$i|0)==(0|0); if (!($cond$i$i)) { break; } - $804 = 1 << $800; - $805 = $804 ^ -1; - $806 = HEAP32[((32544 + 4|0))>>2]|0; - $807 = $806 & $805; - HEAP32[((32544 + 4|0))>>2] = $807; - break L353; + $803 = 1 << $799; + $804 = $803 ^ -1; + $805 = HEAP32[(32680)>>2]|0; + $806 = $805 & $804; + HEAP32[(32680)>>2] = $806; + break L332; } else { - $808 = HEAP32[((32544 + 16|0))>>2]|0; - $809 = ($772>>>0)<($808>>>0); - if ($809) { + $807 = HEAP32[(32692)>>2]|0; + $808 = ($771>>>0)<($807>>>0); + if ($808) { _abort(); // unreachable; } - $810 = (($772) + 16|0); - $811 = HEAP32[$810>>2]|0; - $812 = ($811|0)==($721|0); - if ($812) { - HEAP32[$810>>2] = $R$1$i$i; + $809 = ((($771)) + 16|0); + $810 = HEAP32[$809>>2]|0; + $811 = ($810|0)==($720|0); + if ($811) { + HEAP32[$809>>2] = $R$1$i$i; } else { - $813 = (($772) + 20|0); - HEAP32[$813>>2] = $R$1$i$i; + $812 = ((($771)) + 20|0); + HEAP32[$812>>2] = $R$1$i$i; } - $814 = ($R$1$i$i|0)==(0|0); - if ($814) { - break L353; + $813 = ($R$1$i$i|0)==(0|0); + if ($813) { + break L332; } } } while(0); - $815 = HEAP32[((32544 + 16|0))>>2]|0; - $816 = ($R$1$i$i>>>0)<($815>>>0); - if ($816) { + $814 = HEAP32[(32692)>>2]|0; + $815 = ($R$1$i$i>>>0)<($814>>>0); + if ($815) { _abort(); // unreachable; } - $817 = (($R$1$i$i) + 24|0); - HEAP32[$817>>2] = $772; - $$sum3132$i$i = $720 | 16; - $$sum109$i = (($$sum3132$i$i) + ($tsize$244$i))|0; - $818 = (($tbase$245$i) + ($$sum109$i)|0); - $819 = HEAP32[$818>>2]|0; - $820 = ($819|0)==(0|0); + $816 = ((($R$1$i$i)) + 24|0); + HEAP32[$816>>2] = $771; + $$sum3132$i$i = $719 | 16; + $$sum119$i = (($$sum3132$i$i) + ($tsize$254$i))|0; + $817 = (($tbase$255$i) + ($$sum119$i)|0); + $818 = HEAP32[$817>>2]|0; + $819 = ($818|0)==(0|0); do { - if (!($820)) { - $821 = ($819>>>0)<($815>>>0); - if ($821) { + if (!($819)) { + $820 = ($818>>>0)<($814>>>0); + if ($820) { _abort(); // unreachable; } else { - $822 = (($R$1$i$i) + 16|0); - HEAP32[$822>>2] = $819; - $823 = (($819) + 24|0); - HEAP32[$823>>2] = $R$1$i$i; + $821 = ((($R$1$i$i)) + 16|0); + HEAP32[$821>>2] = $818; + $822 = ((($818)) + 24|0); + HEAP32[$822>>2] = $R$1$i$i; break; } } } while(0); - $$sum110$i = (($$sum2$i21$i) + ($$sum3132$i$i))|0; - $824 = (($tbase$245$i) + ($$sum110$i)|0); - $825 = HEAP32[$824>>2]|0; - $826 = ($825|0)==(0|0); - if ($826) { + $$sum120$i = (($$sum2$i21$i) + ($$sum3132$i$i))|0; + $823 = (($tbase$255$i) + ($$sum120$i)|0); + $824 = HEAP32[$823>>2]|0; + $825 = ($824|0)==(0|0); + if ($825) { break; } - $827 = HEAP32[((32544 + 16|0))>>2]|0; - $828 = ($825>>>0)<($827>>>0); - if ($828) { + $826 = HEAP32[(32692)>>2]|0; + $827 = ($824>>>0)<($826>>>0); + if ($827) { _abort(); // unreachable; } else { - $829 = (($R$1$i$i) + 20|0); - HEAP32[$829>>2] = $825; - $830 = (($825) + 24|0); - HEAP32[$830>>2] = $R$1$i$i; + $828 = ((($R$1$i$i)) + 20|0); + HEAP32[$828>>2] = $824; + $829 = ((($824)) + 24|0); + HEAP32[$829>>2] = $R$1$i$i; break; } } } while(0); - $$sum9$i$i = $745 | $720; - $$sum111$i = (($$sum9$i$i) + ($tsize$244$i))|0; - $831 = (($tbase$245$i) + ($$sum111$i)|0); - $832 = (($745) + ($726))|0; - $oldfirst$0$i$i = $831;$qsize$0$i$i = $832; + $$sum9$i$i = $744 | $719; + $$sum121$i = (($$sum9$i$i) + ($tsize$254$i))|0; + $830 = (($tbase$255$i) + ($$sum121$i)|0); + $831 = (($744) + ($725))|0; + $oldfirst$0$i$i = $830;$qsize$0$i$i = $831; } else { - $oldfirst$0$i$i = $721;$qsize$0$i$i = $726; + $oldfirst$0$i$i = $720;$qsize$0$i$i = $725; } - $833 = (($oldfirst$0$i$i) + 4|0); - $834 = HEAP32[$833>>2]|0; - $835 = $834 & -2; - HEAP32[$833>>2] = $835; - $836 = $qsize$0$i$i | 1; + $832 = ((($oldfirst$0$i$i)) + 4|0); + $833 = HEAP32[$832>>2]|0; + $834 = $833 & -2; + HEAP32[$832>>2] = $834; + $835 = $qsize$0$i$i | 1; $$sum10$i$i = (($$sum$i19$i) + 4)|0; - $837 = (($tbase$245$i) + ($$sum10$i$i)|0); - HEAP32[$837>>2] = $836; - $$sum11$i22$i = (($qsize$0$i$i) + ($$sum$i19$i))|0; - $838 = (($tbase$245$i) + ($$sum11$i22$i)|0); - HEAP32[$838>>2] = $qsize$0$i$i; - $839 = $qsize$0$i$i >>> 3; - $840 = ($qsize$0$i$i>>>0)<(256); - if ($840) { - $841 = $839 << 1; - $842 = ((32544 + ($841<<2)|0) + 40|0); - $843 = HEAP32[32544>>2]|0; - $844 = 1 << $839; - $845 = $843 & $844; - $846 = ($845|0)==(0); + $836 = (($tbase$255$i) + ($$sum10$i$i)|0); + HEAP32[$836>>2] = $835; + $$sum11$i$i = (($qsize$0$i$i) + ($$sum$i19$i))|0; + $837 = (($tbase$255$i) + ($$sum11$i$i)|0); + HEAP32[$837>>2] = $qsize$0$i$i; + $838 = $qsize$0$i$i >>> 3; + $839 = ($qsize$0$i$i>>>0)<(256); + if ($839) { + $840 = $838 << 1; + $841 = (32716 + ($840<<2)|0); + $842 = HEAP32[32676>>2]|0; + $843 = 1 << $838; + $844 = $842 & $843; + $845 = ($844|0)==(0); do { - if ($846) { - $847 = $843 | $844; - HEAP32[32544>>2] = $847; - $$sum26$pre$i$i = (($841) + 2)|0; - $$pre$i23$i = ((32544 + ($$sum26$pre$i$i<<2)|0) + 40|0); - $$pre$phi$i24$iZ2D = $$pre$i23$i;$F4$0$i$i = $842; + if ($845) { + $846 = $842 | $843; + HEAP32[32676>>2] = $846; + $$pre$i22$i = (($840) + 2)|0; + $$pre56$i$i = (32716 + ($$pre$i22$i<<2)|0); + $$pre$phi$i23$iZ2D = $$pre56$i$i;$F4$0$i$i = $841; } else { - $$sum29$i$i = (($841) + 2)|0; - $848 = ((32544 + ($$sum29$i$i<<2)|0) + 40|0); - $849 = HEAP32[$848>>2]|0; - $850 = HEAP32[((32544 + 16|0))>>2]|0; - $851 = ($849>>>0)<($850>>>0); - if (!($851)) { - $$pre$phi$i24$iZ2D = $848;$F4$0$i$i = $849; + $$sum29$i$i = (($840) + 2)|0; + $847 = (32716 + ($$sum29$i$i<<2)|0); + $848 = HEAP32[$847>>2]|0; + $849 = HEAP32[(32692)>>2]|0; + $850 = ($848>>>0)<($849>>>0); + if (!($850)) { + $$pre$phi$i23$iZ2D = $847;$F4$0$i$i = $848; break; } _abort(); // unreachable; } } while(0); - HEAP32[$$pre$phi$i24$iZ2D>>2] = $725; - $852 = (($F4$0$i$i) + 12|0); - HEAP32[$852>>2] = $725; + HEAP32[$$pre$phi$i23$iZ2D>>2] = $724; + $851 = ((($F4$0$i$i)) + 12|0); + HEAP32[$851>>2] = $724; $$sum27$i$i = (($$sum$i19$i) + 8)|0; - $853 = (($tbase$245$i) + ($$sum27$i$i)|0); - HEAP32[$853>>2] = $F4$0$i$i; + $852 = (($tbase$255$i) + ($$sum27$i$i)|0); + HEAP32[$852>>2] = $F4$0$i$i; $$sum28$i$i = (($$sum$i19$i) + 12)|0; - $854 = (($tbase$245$i) + ($$sum28$i$i)|0); - HEAP32[$854>>2] = $842; + $853 = (($tbase$255$i) + ($$sum28$i$i)|0); + HEAP32[$853>>2] = $841; break; } - $855 = $qsize$0$i$i >>> 8; - $856 = ($855|0)==(0); + $854 = $qsize$0$i$i >>> 8; + $855 = ($854|0)==(0); do { - if ($856) { + if ($855) { $I7$0$i$i = 0; } else { - $857 = ($qsize$0$i$i>>>0)>(16777215); - if ($857) { + $856 = ($qsize$0$i$i>>>0)>(16777215); + if ($856) { $I7$0$i$i = 31; break; } - $858 = (($855) + 1048320)|0; - $859 = $858 >>> 16; - $860 = $859 & 8; - $861 = $855 << $860; - $862 = (($861) + 520192)|0; - $863 = $862 >>> 16; - $864 = $863 & 4; - $865 = $864 | $860; - $866 = $861 << $864; - $867 = (($866) + 245760)|0; - $868 = $867 >>> 16; - $869 = $868 & 2; - $870 = $865 | $869; - $871 = (14 - ($870))|0; - $872 = $866 << $869; - $873 = $872 >>> 15; - $874 = (($871) + ($873))|0; - $875 = $874 << 1; - $876 = (($874) + 7)|0; - $877 = $qsize$0$i$i >>> $876; - $878 = $877 & 1; - $879 = $878 | $875; - $I7$0$i$i = $879; + $857 = (($854) + 1048320)|0; + $858 = $857 >>> 16; + $859 = $858 & 8; + $860 = $854 << $859; + $861 = (($860) + 520192)|0; + $862 = $861 >>> 16; + $863 = $862 & 4; + $864 = $863 | $859; + $865 = $860 << $863; + $866 = (($865) + 245760)|0; + $867 = $866 >>> 16; + $868 = $867 & 2; + $869 = $864 | $868; + $870 = (14 - ($869))|0; + $871 = $865 << $868; + $872 = $871 >>> 15; + $873 = (($870) + ($872))|0; + $874 = $873 << 1; + $875 = (($873) + 7)|0; + $876 = $qsize$0$i$i >>> $875; + $877 = $876 & 1; + $878 = $877 | $874; + $I7$0$i$i = $878; } } while(0); - $880 = ((32544 + ($I7$0$i$i<<2)|0) + 304|0); + $879 = (32980 + ($I7$0$i$i<<2)|0); $$sum12$i$i = (($$sum$i19$i) + 28)|0; - $881 = (($tbase$245$i) + ($$sum12$i$i)|0); - HEAP32[$881>>2] = $I7$0$i$i; + $880 = (($tbase$255$i) + ($$sum12$i$i)|0); + HEAP32[$880>>2] = $I7$0$i$i; $$sum13$i$i = (($$sum$i19$i) + 16)|0; - $882 = (($tbase$245$i) + ($$sum13$i$i)|0); + $881 = (($tbase$255$i) + ($$sum13$i$i)|0); $$sum14$i$i = (($$sum$i19$i) + 20)|0; - $883 = (($tbase$245$i) + ($$sum14$i$i)|0); - HEAP32[$883>>2] = 0; + $882 = (($tbase$255$i) + ($$sum14$i$i)|0); HEAP32[$882>>2] = 0; - $884 = HEAP32[((32544 + 4|0))>>2]|0; - $885 = 1 << $I7$0$i$i; - $886 = $884 & $885; - $887 = ($886|0)==(0); - if ($887) { - $888 = $884 | $885; - HEAP32[((32544 + 4|0))>>2] = $888; - HEAP32[$880>>2] = $725; + HEAP32[$881>>2] = 0; + $883 = HEAP32[(32680)>>2]|0; + $884 = 1 << $I7$0$i$i; + $885 = $883 & $884; + $886 = ($885|0)==(0); + if ($886) { + $887 = $883 | $884; + HEAP32[(32680)>>2] = $887; + HEAP32[$879>>2] = $724; $$sum15$i$i = (($$sum$i19$i) + 24)|0; - $889 = (($tbase$245$i) + ($$sum15$i$i)|0); - HEAP32[$889>>2] = $880; + $888 = (($tbase$255$i) + ($$sum15$i$i)|0); + HEAP32[$888>>2] = $879; $$sum16$i$i = (($$sum$i19$i) + 12)|0; - $890 = (($tbase$245$i) + ($$sum16$i$i)|0); - HEAP32[$890>>2] = $725; + $889 = (($tbase$255$i) + ($$sum16$i$i)|0); + HEAP32[$889>>2] = $724; $$sum17$i$i = (($$sum$i19$i) + 8)|0; - $891 = (($tbase$245$i) + ($$sum17$i$i)|0); - HEAP32[$891>>2] = $725; + $890 = (($tbase$255$i) + ($$sum17$i$i)|0); + HEAP32[$890>>2] = $724; break; } - $892 = HEAP32[$880>>2]|0; - $893 = ($I7$0$i$i|0)==(31); - if ($893) { - $901 = 0; - } else { - $894 = $I7$0$i$i >>> 1; - $895 = (25 - ($894))|0; - $901 = $895; - } - $896 = (($892) + 4|0); - $897 = HEAP32[$896>>2]|0; - $898 = $897 & -8; - $899 = ($898|0)==($qsize$0$i$i|0); - L442: do { - if ($899) { - $T$0$lcssa$i26$i = $892; + $891 = HEAP32[$879>>2]|0; + $892 = ((($891)) + 4|0); + $893 = HEAP32[$892>>2]|0; + $894 = $893 & -8; + $895 = ($894|0)==($qsize$0$i$i|0); + L418: do { + if ($895) { + $T$0$lcssa$i25$i = $891; } else { - $900 = $qsize$0$i$i << $901; - $K8$053$i$i = $900;$T$052$i$i = $892; + $896 = ($I7$0$i$i|0)==(31); + $897 = $I7$0$i$i >>> 1; + $898 = (25 - ($897))|0; + $899 = $896 ? 0 : $898; + $900 = $qsize$0$i$i << $899; + $K8$051$i$i = $900;$T$050$i$i = $891; while(1) { - $908 = $K8$053$i$i >>> 31; - $909 = ((($T$052$i$i) + ($908<<2)|0) + 16|0); - $904 = HEAP32[$909>>2]|0; - $910 = ($904|0)==(0|0); - if ($910) { + $907 = $K8$051$i$i >>> 31; + $908 = (((($T$050$i$i)) + 16|0) + ($907<<2)|0); + $903 = HEAP32[$908>>2]|0; + $909 = ($903|0)==(0|0); + if ($909) { + $$lcssa = $908;$T$050$i$i$lcssa = $T$050$i$i; break; } - $902 = $K8$053$i$i << 1; - $903 = (($904) + 4|0); - $905 = HEAP32[$903>>2]|0; - $906 = $905 & -8; - $907 = ($906|0)==($qsize$0$i$i|0); - if ($907) { - $T$0$lcssa$i26$i = $904; - break L442; + $901 = $K8$051$i$i << 1; + $902 = ((($903)) + 4|0); + $904 = HEAP32[$902>>2]|0; + $905 = $904 & -8; + $906 = ($905|0)==($qsize$0$i$i|0); + if ($906) { + $T$0$lcssa$i25$i = $903; + break L418; } else { - $K8$053$i$i = $902;$T$052$i$i = $904; + $K8$051$i$i = $901;$T$050$i$i = $903; } } - $911 = HEAP32[((32544 + 16|0))>>2]|0; - $912 = ($909>>>0)<($911>>>0); - if ($912) { + $910 = HEAP32[(32692)>>2]|0; + $911 = ($$lcssa>>>0)<($910>>>0); + if ($911) { _abort(); // unreachable; } else { - HEAP32[$909>>2] = $725; + HEAP32[$$lcssa>>2] = $724; $$sum23$i$i = (($$sum$i19$i) + 24)|0; - $913 = (($tbase$245$i) + ($$sum23$i$i)|0); - HEAP32[$913>>2] = $T$052$i$i; + $912 = (($tbase$255$i) + ($$sum23$i$i)|0); + HEAP32[$912>>2] = $T$050$i$i$lcssa; $$sum24$i$i = (($$sum$i19$i) + 12)|0; - $914 = (($tbase$245$i) + ($$sum24$i$i)|0); - HEAP32[$914>>2] = $725; + $913 = (($tbase$255$i) + ($$sum24$i$i)|0); + HEAP32[$913>>2] = $724; $$sum25$i$i = (($$sum$i19$i) + 8)|0; - $915 = (($tbase$245$i) + ($$sum25$i$i)|0); - HEAP32[$915>>2] = $725; - break L345; + $914 = (($tbase$255$i) + ($$sum25$i$i)|0); + HEAP32[$914>>2] = $724; + break L324; } } } while(0); - $916 = (($T$0$lcssa$i26$i) + 8|0); - $917 = HEAP32[$916>>2]|0; - $918 = HEAP32[((32544 + 16|0))>>2]|0; - $919 = ($T$0$lcssa$i26$i>>>0)>=($918>>>0); - $920 = ($917>>>0)>=($918>>>0); - $or$cond$i27$i = $919 & $920; - if ($or$cond$i27$i) { - $921 = (($917) + 12|0); - HEAP32[$921>>2] = $725; - HEAP32[$916>>2] = $725; + $915 = ((($T$0$lcssa$i25$i)) + 8|0); + $916 = HEAP32[$915>>2]|0; + $917 = HEAP32[(32692)>>2]|0; + $918 = ($916>>>0)>=($917>>>0); + $not$$i26$i = ($T$0$lcssa$i25$i>>>0)>=($917>>>0); + $919 = $918 & $not$$i26$i; + if ($919) { + $920 = ((($916)) + 12|0); + HEAP32[$920>>2] = $724; + HEAP32[$915>>2] = $724; $$sum20$i$i = (($$sum$i19$i) + 8)|0; - $922 = (($tbase$245$i) + ($$sum20$i$i)|0); - HEAP32[$922>>2] = $917; + $921 = (($tbase$255$i) + ($$sum20$i$i)|0); + HEAP32[$921>>2] = $916; $$sum21$i$i = (($$sum$i19$i) + 12)|0; - $923 = (($tbase$245$i) + ($$sum21$i$i)|0); - HEAP32[$923>>2] = $T$0$lcssa$i26$i; + $922 = (($tbase$255$i) + ($$sum21$i$i)|0); + HEAP32[$922>>2] = $T$0$lcssa$i25$i; $$sum22$i$i = (($$sum$i19$i) + 24)|0; - $924 = (($tbase$245$i) + ($$sum22$i$i)|0); - HEAP32[$924>>2] = 0; + $923 = (($tbase$255$i) + ($$sum22$i$i)|0); + HEAP32[$923>>2] = 0; break; } else { _abort(); @@ -21658,282 +22798,266 @@ function _malloc($bytes) { } } } while(0); - $$sum1819$i$i = $713 | 8; - $925 = (($tbase$245$i) + ($$sum1819$i$i)|0); - $mem$0 = $925; - STACKTOP = sp;return ($mem$0|0); + $$sum1819$i$i = $711 | 8; + $924 = (($tbase$255$i) + ($$sum1819$i$i)|0); + $mem$0 = $924; + return ($mem$0|0); + } else { + $sp$0$i$i$i = (33124); } } - $sp$0$i$i$i = ((32544 + 448|0)); while(1) { - $926 = HEAP32[$sp$0$i$i$i>>2]|0; - $927 = ($926>>>0)>($636>>>0); - if (!($927)) { - $928 = (($sp$0$i$i$i) + 4|0); - $929 = HEAP32[$928>>2]|0; - $930 = (($926) + ($929)|0); - $931 = ($930>>>0)>($636>>>0); - if ($931) { + $925 = HEAP32[$sp$0$i$i$i>>2]|0; + $926 = ($925>>>0)>($635>>>0); + if (!($926)) { + $927 = ((($sp$0$i$i$i)) + 4|0); + $928 = HEAP32[$927>>2]|0; + $929 = (($925) + ($928)|0); + $930 = ($929>>>0)>($635>>>0); + if ($930) { + $$lcssa215 = $925;$$lcssa216 = $928;$$lcssa217 = $929; break; } } - $932 = (($sp$0$i$i$i) + 8|0); - $933 = HEAP32[$932>>2]|0; - $sp$0$i$i$i = $933; - } - $$sum$i13$i = (($929) + -47)|0; - $$sum1$i14$i = (($929) + -39)|0; - $934 = (($926) + ($$sum1$i14$i)|0); - $935 = $934; - $936 = $935 & 7; - $937 = ($936|0)==(0); - if ($937) { - $940 = 0; - } else { - $938 = (0 - ($935))|0; - $939 = $938 & 7; - $940 = $939; - } - $$sum2$i15$i = (($$sum$i13$i) + ($940))|0; - $941 = (($926) + ($$sum2$i15$i)|0); - $942 = (($636) + 16|0); - $943 = ($941>>>0)<($942>>>0); - $944 = $943 ? $636 : $941; - $945 = (($944) + 8|0); - $946 = (($tsize$244$i) + -40)|0; - $947 = (($tbase$245$i) + 8|0); - $948 = $947; - $949 = $948 & 7; - $950 = ($949|0)==(0); - if ($950) { - $954 = 0; - } else { - $951 = (0 - ($948))|0; - $952 = $951 & 7; - $954 = $952; - } - $953 = (($tbase$245$i) + ($954)|0); - $955 = (($946) - ($954))|0; - HEAP32[((32544 + 24|0))>>2] = $953; - HEAP32[((32544 + 12|0))>>2] = $955; - $956 = $955 | 1; - $$sum$i$i$i = (($954) + 4)|0; - $957 = (($tbase$245$i) + ($$sum$i$i$i)|0); - HEAP32[$957>>2] = $956; - $$sum2$i$i$i = (($tsize$244$i) + -36)|0; - $958 = (($tbase$245$i) + ($$sum2$i$i$i)|0); - HEAP32[$958>>2] = 40; - $959 = HEAP32[((33016 + 16|0))>>2]|0; - HEAP32[((32544 + 28|0))>>2] = $959; - $960 = (($944) + 4|0); - HEAP32[$960>>2] = 27; - ;HEAP32[$945+0>>2]=HEAP32[((32544 + 448|0))+0>>2]|0;HEAP32[$945+4>>2]=HEAP32[((32544 + 448|0))+4>>2]|0;HEAP32[$945+8>>2]=HEAP32[((32544 + 448|0))+8>>2]|0;HEAP32[$945+12>>2]=HEAP32[((32544 + 448|0))+12>>2]|0; - HEAP32[((32544 + 448|0))>>2] = $tbase$245$i; - HEAP32[((32544 + 452|0))>>2] = $tsize$244$i; - HEAP32[((32544 + 460|0))>>2] = 0; - HEAP32[((32544 + 456|0))>>2] = $945; - $961 = (($944) + 28|0); - HEAP32[$961>>2] = 7; - $962 = (($944) + 32|0); - $963 = ($962>>>0)<($930>>>0); - if ($963) { - $965 = $961; + $931 = ((($sp$0$i$i$i)) + 8|0); + $932 = HEAP32[$931>>2]|0; + $sp$0$i$i$i = $932; + } + $$sum$i14$i = (($$lcssa216) + -47)|0; + $$sum1$i15$i = (($$lcssa216) + -39)|0; + $933 = (($$lcssa215) + ($$sum1$i15$i)|0); + $934 = $933; + $935 = $934 & 7; + $936 = ($935|0)==(0); + $937 = (0 - ($934))|0; + $938 = $937 & 7; + $939 = $936 ? 0 : $938; + $$sum2$i16$i = (($$sum$i14$i) + ($939))|0; + $940 = (($$lcssa215) + ($$sum2$i16$i)|0); + $941 = ((($635)) + 16|0); + $942 = ($940>>>0)<($941>>>0); + $943 = $942 ? $635 : $940; + $944 = ((($943)) + 8|0); + $945 = (($tsize$254$i) + -40)|0; + $946 = ((($tbase$255$i)) + 8|0); + $947 = $946; + $948 = $947 & 7; + $949 = ($948|0)==(0); + $950 = (0 - ($947))|0; + $951 = $950 & 7; + $952 = $949 ? 0 : $951; + $953 = (($tbase$255$i) + ($952)|0); + $954 = (($945) - ($952))|0; + HEAP32[(32700)>>2] = $953; + HEAP32[(32688)>>2] = $954; + $955 = $954 | 1; + $$sum$i$i$i = (($952) + 4)|0; + $956 = (($tbase$255$i) + ($$sum$i$i$i)|0); + HEAP32[$956>>2] = $955; + $$sum2$i$i$i = (($tsize$254$i) + -36)|0; + $957 = (($tbase$255$i) + ($$sum2$i$i$i)|0); + HEAP32[$957>>2] = 40; + $958 = HEAP32[(33164)>>2]|0; + HEAP32[(32704)>>2] = $958; + $959 = ((($943)) + 4|0); + HEAP32[$959>>2] = 27; + ;HEAP32[$944>>2]=HEAP32[(33124)>>2]|0;HEAP32[$944+4>>2]=HEAP32[(33124)+4>>2]|0;HEAP32[$944+8>>2]=HEAP32[(33124)+8>>2]|0;HEAP32[$944+12>>2]=HEAP32[(33124)+12>>2]|0; + HEAP32[(33124)>>2] = $tbase$255$i; + HEAP32[(33128)>>2] = $tsize$254$i; + HEAP32[(33136)>>2] = 0; + HEAP32[(33132)>>2] = $944; + $960 = ((($943)) + 28|0); + HEAP32[$960>>2] = 7; + $961 = ((($943)) + 32|0); + $962 = ($961>>>0)<($$lcssa217>>>0); + if ($962) { + $964 = $960; while(1) { - $964 = (($965) + 4|0); - HEAP32[$964>>2] = 7; - $966 = (($965) + 8|0); - $967 = ($966>>>0)<($930>>>0); - if ($967) { - $965 = $964; + $963 = ((($964)) + 4|0); + HEAP32[$963>>2] = 7; + $965 = ((($964)) + 8|0); + $966 = ($965>>>0)<($$lcssa217>>>0); + if ($966) { + $964 = $963; } else { break; } } } - $968 = ($944|0)==($636|0); - if (!($968)) { - $969 = $944; - $970 = $636; - $971 = (($969) - ($970))|0; - $972 = (($636) + ($971)|0); - $$sum3$i$i = (($971) + 4)|0; - $973 = (($636) + ($$sum3$i$i)|0); - $974 = HEAP32[$973>>2]|0; - $975 = $974 & -2; - HEAP32[$973>>2] = $975; - $976 = $971 | 1; - $977 = (($636) + 4|0); - HEAP32[$977>>2] = $976; - HEAP32[$972>>2] = $971; - $978 = $971 >>> 3; - $979 = ($971>>>0)<(256); - if ($979) { - $980 = $978 << 1; - $981 = ((32544 + ($980<<2)|0) + 40|0); - $982 = HEAP32[32544>>2]|0; - $983 = 1 << $978; - $984 = $982 & $983; - $985 = ($984|0)==(0); - do { - if ($985) { - $986 = $982 | $983; - HEAP32[32544>>2] = $986; - $$sum10$pre$i$i = (($980) + 2)|0; - $$pre$i$i = ((32544 + ($$sum10$pre$i$i<<2)|0) + 40|0); - $$pre$phi$i$iZ2D = $$pre$i$i;$F$0$i$i = $981; - } else { - $$sum11$i$i = (($980) + 2)|0; - $987 = ((32544 + ($$sum11$i$i<<2)|0) + 40|0); - $988 = HEAP32[$987>>2]|0; - $989 = HEAP32[((32544 + 16|0))>>2]|0; - $990 = ($988>>>0)<($989>>>0); - if (!($990)) { - $$pre$phi$i$iZ2D = $987;$F$0$i$i = $988; - break; - } + $967 = ($943|0)==($635|0); + if (!($967)) { + $968 = $943; + $969 = $635; + $970 = (($968) - ($969))|0; + $971 = HEAP32[$959>>2]|0; + $972 = $971 & -2; + HEAP32[$959>>2] = $972; + $973 = $970 | 1; + $974 = ((($635)) + 4|0); + HEAP32[$974>>2] = $973; + HEAP32[$943>>2] = $970; + $975 = $970 >>> 3; + $976 = ($970>>>0)<(256); + if ($976) { + $977 = $975 << 1; + $978 = (32716 + ($977<<2)|0); + $979 = HEAP32[32676>>2]|0; + $980 = 1 << $975; + $981 = $979 & $980; + $982 = ($981|0)==(0); + if ($982) { + $983 = $979 | $980; + HEAP32[32676>>2] = $983; + $$pre$i$i = (($977) + 2)|0; + $$pre14$i$i = (32716 + ($$pre$i$i<<2)|0); + $$pre$phi$i$iZ2D = $$pre14$i$i;$F$0$i$i = $978; + } else { + $$sum4$i$i = (($977) + 2)|0; + $984 = (32716 + ($$sum4$i$i<<2)|0); + $985 = HEAP32[$984>>2]|0; + $986 = HEAP32[(32692)>>2]|0; + $987 = ($985>>>0)<($986>>>0); + if ($987) { _abort(); // unreachable; + } else { + $$pre$phi$i$iZ2D = $984;$F$0$i$i = $985; } - } while(0); - HEAP32[$$pre$phi$i$iZ2D>>2] = $636; - $991 = (($F$0$i$i) + 12|0); - HEAP32[$991>>2] = $636; - $992 = (($636) + 8|0); - HEAP32[$992>>2] = $F$0$i$i; - $993 = (($636) + 12|0); - HEAP32[$993>>2] = $981; + } + HEAP32[$$pre$phi$i$iZ2D>>2] = $635; + $988 = ((($F$0$i$i)) + 12|0); + HEAP32[$988>>2] = $635; + $989 = ((($635)) + 8|0); + HEAP32[$989>>2] = $F$0$i$i; + $990 = ((($635)) + 12|0); + HEAP32[$990>>2] = $978; break; } - $994 = $971 >>> 8; - $995 = ($994|0)==(0); - if ($995) { + $991 = $970 >>> 8; + $992 = ($991|0)==(0); + if ($992) { $I1$0$i$i = 0; } else { - $996 = ($971>>>0)>(16777215); - if ($996) { + $993 = ($970>>>0)>(16777215); + if ($993) { $I1$0$i$i = 31; } else { - $997 = (($994) + 1048320)|0; - $998 = $997 >>> 16; - $999 = $998 & 8; - $1000 = $994 << $999; - $1001 = (($1000) + 520192)|0; - $1002 = $1001 >>> 16; - $1003 = $1002 & 4; - $1004 = $1003 | $999; - $1005 = $1000 << $1003; - $1006 = (($1005) + 245760)|0; - $1007 = $1006 >>> 16; - $1008 = $1007 & 2; - $1009 = $1004 | $1008; - $1010 = (14 - ($1009))|0; - $1011 = $1005 << $1008; - $1012 = $1011 >>> 15; - $1013 = (($1010) + ($1012))|0; - $1014 = $1013 << 1; - $1015 = (($1013) + 7)|0; - $1016 = $971 >>> $1015; - $1017 = $1016 & 1; - $1018 = $1017 | $1014; - $I1$0$i$i = $1018; + $994 = (($991) + 1048320)|0; + $995 = $994 >>> 16; + $996 = $995 & 8; + $997 = $991 << $996; + $998 = (($997) + 520192)|0; + $999 = $998 >>> 16; + $1000 = $999 & 4; + $1001 = $1000 | $996; + $1002 = $997 << $1000; + $1003 = (($1002) + 245760)|0; + $1004 = $1003 >>> 16; + $1005 = $1004 & 2; + $1006 = $1001 | $1005; + $1007 = (14 - ($1006))|0; + $1008 = $1002 << $1005; + $1009 = $1008 >>> 15; + $1010 = (($1007) + ($1009))|0; + $1011 = $1010 << 1; + $1012 = (($1010) + 7)|0; + $1013 = $970 >>> $1012; + $1014 = $1013 & 1; + $1015 = $1014 | $1011; + $I1$0$i$i = $1015; } } - $1019 = ((32544 + ($I1$0$i$i<<2)|0) + 304|0); - $1020 = (($636) + 28|0); - $I1$0$c$i$i = $I1$0$i$i; - HEAP32[$1020>>2] = $I1$0$c$i$i; - $1021 = (($636) + 20|0); - HEAP32[$1021>>2] = 0; - $1022 = (($636) + 16|0); - HEAP32[$1022>>2] = 0; - $1023 = HEAP32[((32544 + 4|0))>>2]|0; - $1024 = 1 << $I1$0$i$i; - $1025 = $1023 & $1024; - $1026 = ($1025|0)==(0); - if ($1026) { - $1027 = $1023 | $1024; - HEAP32[((32544 + 4|0))>>2] = $1027; - HEAP32[$1019>>2] = $636; - $1028 = (($636) + 24|0); - HEAP32[$1028>>2] = $1019; - $1029 = (($636) + 12|0); - HEAP32[$1029>>2] = $636; - $1030 = (($636) + 8|0); - HEAP32[$1030>>2] = $636; + $1016 = (32980 + ($I1$0$i$i<<2)|0); + $1017 = ((($635)) + 28|0); + HEAP32[$1017>>2] = $I1$0$i$i; + $1018 = ((($635)) + 20|0); + HEAP32[$1018>>2] = 0; + HEAP32[$941>>2] = 0; + $1019 = HEAP32[(32680)>>2]|0; + $1020 = 1 << $I1$0$i$i; + $1021 = $1019 & $1020; + $1022 = ($1021|0)==(0); + if ($1022) { + $1023 = $1019 | $1020; + HEAP32[(32680)>>2] = $1023; + HEAP32[$1016>>2] = $635; + $1024 = ((($635)) + 24|0); + HEAP32[$1024>>2] = $1016; + $1025 = ((($635)) + 12|0); + HEAP32[$1025>>2] = $635; + $1026 = ((($635)) + 8|0); + HEAP32[$1026>>2] = $635; break; } - $1031 = HEAP32[$1019>>2]|0; - $1032 = ($I1$0$i$i|0)==(31); - if ($1032) { - $1040 = 0; - } else { - $1033 = $I1$0$i$i >>> 1; - $1034 = (25 - ($1033))|0; - $1040 = $1034; - } - $1035 = (($1031) + 4|0); - $1036 = HEAP32[$1035>>2]|0; - $1037 = $1036 & -8; - $1038 = ($1037|0)==($971|0); - L493: do { - if ($1038) { - $T$0$lcssa$i$i = $1031; + $1027 = HEAP32[$1016>>2]|0; + $1028 = ((($1027)) + 4|0); + $1029 = HEAP32[$1028>>2]|0; + $1030 = $1029 & -8; + $1031 = ($1030|0)==($970|0); + L459: do { + if ($1031) { + $T$0$lcssa$i$i = $1027; } else { - $1039 = $971 << $1040; - $K2$015$i$i = $1039;$T$014$i$i = $1031; + $1032 = ($I1$0$i$i|0)==(31); + $1033 = $I1$0$i$i >>> 1; + $1034 = (25 - ($1033))|0; + $1035 = $1032 ? 0 : $1034; + $1036 = $970 << $1035; + $K2$07$i$i = $1036;$T$06$i$i = $1027; while(1) { - $1047 = $K2$015$i$i >>> 31; - $1048 = ((($T$014$i$i) + ($1047<<2)|0) + 16|0); - $1043 = HEAP32[$1048>>2]|0; - $1049 = ($1043|0)==(0|0); - if ($1049) { + $1043 = $K2$07$i$i >>> 31; + $1044 = (((($T$06$i$i)) + 16|0) + ($1043<<2)|0); + $1039 = HEAP32[$1044>>2]|0; + $1045 = ($1039|0)==(0|0); + if ($1045) { + $$lcssa211 = $1044;$T$06$i$i$lcssa = $T$06$i$i; break; } - $1041 = $K2$015$i$i << 1; - $1042 = (($1043) + 4|0); - $1044 = HEAP32[$1042>>2]|0; - $1045 = $1044 & -8; - $1046 = ($1045|0)==($971|0); - if ($1046) { - $T$0$lcssa$i$i = $1043; - break L493; + $1037 = $K2$07$i$i << 1; + $1038 = ((($1039)) + 4|0); + $1040 = HEAP32[$1038>>2]|0; + $1041 = $1040 & -8; + $1042 = ($1041|0)==($970|0); + if ($1042) { + $T$0$lcssa$i$i = $1039; + break L459; } else { - $K2$015$i$i = $1041;$T$014$i$i = $1043; + $K2$07$i$i = $1037;$T$06$i$i = $1039; } } - $1050 = HEAP32[((32544 + 16|0))>>2]|0; - $1051 = ($1048>>>0)<($1050>>>0); - if ($1051) { + $1046 = HEAP32[(32692)>>2]|0; + $1047 = ($$lcssa211>>>0)<($1046>>>0); + if ($1047) { _abort(); // unreachable; } else { - HEAP32[$1048>>2] = $636; - $1052 = (($636) + 24|0); - HEAP32[$1052>>2] = $T$014$i$i; - $1053 = (($636) + 12|0); - HEAP32[$1053>>2] = $636; - $1054 = (($636) + 8|0); - HEAP32[$1054>>2] = $636; - break L308; + HEAP32[$$lcssa211>>2] = $635; + $1048 = ((($635)) + 24|0); + HEAP32[$1048>>2] = $T$06$i$i$lcssa; + $1049 = ((($635)) + 12|0); + HEAP32[$1049>>2] = $635; + $1050 = ((($635)) + 8|0); + HEAP32[$1050>>2] = $635; + break L299; } } } while(0); - $1055 = (($T$0$lcssa$i$i) + 8|0); - $1056 = HEAP32[$1055>>2]|0; - $1057 = HEAP32[((32544 + 16|0))>>2]|0; - $1058 = ($T$0$lcssa$i$i>>>0)>=($1057>>>0); - $1059 = ($1056>>>0)>=($1057>>>0); - $or$cond$i$i = $1058 & $1059; - if ($or$cond$i$i) { - $1060 = (($1056) + 12|0); - HEAP32[$1060>>2] = $636; - HEAP32[$1055>>2] = $636; - $1061 = (($636) + 8|0); - HEAP32[$1061>>2] = $1056; - $1062 = (($636) + 12|0); - HEAP32[$1062>>2] = $T$0$lcssa$i$i; - $1063 = (($636) + 24|0); - HEAP32[$1063>>2] = 0; + $1051 = ((($T$0$lcssa$i$i)) + 8|0); + $1052 = HEAP32[$1051>>2]|0; + $1053 = HEAP32[(32692)>>2]|0; + $1054 = ($1052>>>0)>=($1053>>>0); + $not$$i$i = ($T$0$lcssa$i$i>>>0)>=($1053>>>0); + $1055 = $1054 & $not$$i$i; + if ($1055) { + $1056 = ((($1052)) + 12|0); + HEAP32[$1056>>2] = $635; + HEAP32[$1051>>2] = $635; + $1057 = ((($635)) + 8|0); + HEAP32[$1057>>2] = $1052; + $1058 = ((($635)) + 12|0); + HEAP32[$1058>>2] = $T$0$lcssa$i$i; + $1059 = ((($635)) + 24|0); + HEAP32[$1059>>2] = 0; break; } else { _abort(); @@ -21942,65 +23066,65 @@ function _malloc($bytes) { } } } while(0); - $1064 = HEAP32[((32544 + 12|0))>>2]|0; - $1065 = ($1064>>>0)>($nb$0>>>0); - if ($1065) { - $1066 = (($1064) - ($nb$0))|0; - HEAP32[((32544 + 12|0))>>2] = $1066; - $1067 = HEAP32[((32544 + 24|0))>>2]|0; - $1068 = (($1067) + ($nb$0)|0); - HEAP32[((32544 + 24|0))>>2] = $1068; - $1069 = $1066 | 1; + $1060 = HEAP32[(32688)>>2]|0; + $1061 = ($1060>>>0)>($nb$0>>>0); + if ($1061) { + $1062 = (($1060) - ($nb$0))|0; + HEAP32[(32688)>>2] = $1062; + $1063 = HEAP32[(32700)>>2]|0; + $1064 = (($1063) + ($nb$0)|0); + HEAP32[(32700)>>2] = $1064; + $1065 = $1062 | 1; $$sum$i32 = (($nb$0) + 4)|0; - $1070 = (($1067) + ($$sum$i32)|0); - HEAP32[$1070>>2] = $1069; - $1071 = $nb$0 | 3; - $1072 = (($1067) + 4|0); - HEAP32[$1072>>2] = $1071; - $1073 = (($1067) + 8|0); - $mem$0 = $1073; - STACKTOP = sp;return ($mem$0|0); + $1066 = (($1063) + ($$sum$i32)|0); + HEAP32[$1066>>2] = $1065; + $1067 = $nb$0 | 3; + $1068 = ((($1063)) + 4|0); + HEAP32[$1068>>2] = $1067; + $1069 = ((($1063)) + 8|0); + $mem$0 = $1069; + return ($mem$0|0); } } - $1074 = (___errno_location()|0); - HEAP32[$1074>>2] = 12; + $1070 = (___errno_location()|0); + HEAP32[$1070>>2] = 12; $mem$0 = 0; - STACKTOP = sp;return ($mem$0|0); + return ($mem$0|0); } function _free($mem) { $mem = $mem|0; - var $$pre = 0, $$pre$phi66Z2D = 0, $$pre$phi68Z2D = 0, $$pre$phiZ2D = 0, $$pre65 = 0, $$pre67 = 0, $$sum = 0, $$sum16$pre = 0, $$sum17 = 0, $$sum18 = 0, $$sum19 = 0, $$sum2 = 0, $$sum20 = 0, $$sum2324 = 0, $$sum25 = 0, $$sum26 = 0, $$sum28 = 0, $$sum29 = 0, $$sum3 = 0, $$sum30 = 0; - var $$sum31 = 0, $$sum32 = 0, $$sum33 = 0, $$sum34 = 0, $$sum35 = 0, $$sum36 = 0, $$sum37 = 0, $$sum5 = 0, $$sum67 = 0, $$sum8 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0; - var $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0; - var $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0; - var $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0; - var $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0; - var $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0; - var $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0; - var $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0; - var $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0; - var $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0; - var $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0; - var $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0; - var $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0; - var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; - var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0; - var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0; - var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F16$0 = 0, $I18$0 = 0, $I18$0$c = 0, $K19$058 = 0, $R$0 = 0, $R$1 = 0, $R7$0 = 0; - var $R7$1 = 0, $RP$0 = 0, $RP9$0 = 0, $T$0$lcssa = 0, $T$057 = 0, $cond = 0, $cond54 = 0, $or$cond = 0, $p$0 = 0, $psize$0 = 0, $psize$1 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0; + var $$lcssa = 0, $$pre = 0, $$pre$phi59Z2D = 0, $$pre$phi61Z2D = 0, $$pre$phiZ2D = 0, $$pre57 = 0, $$pre58 = 0, $$pre60 = 0, $$sum = 0, $$sum11 = 0, $$sum12 = 0, $$sum13 = 0, $$sum14 = 0, $$sum1718 = 0, $$sum19 = 0, $$sum2 = 0, $$sum20 = 0, $$sum22 = 0, $$sum23 = 0, $$sum24 = 0; + var $$sum25 = 0, $$sum26 = 0, $$sum27 = 0, $$sum28 = 0, $$sum29 = 0, $$sum3 = 0, $$sum30 = 0, $$sum31 = 0, $$sum5 = 0, $$sum67 = 0, $$sum8 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0; + var $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0; + var $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0; + var $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0; + var $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0; + var $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0; + var $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0; + var $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0; + var $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0; + var $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0; + var $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0; + var $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0; + var $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0; + var $321 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0; + var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0; + var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0; + var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F16$0 = 0, $I18$0 = 0, $K19$052 = 0, $R$0 = 0, $R$0$lcssa = 0, $R$1 = 0; + var $R7$0 = 0, $R7$0$lcssa = 0, $R7$1 = 0, $RP$0 = 0, $RP$0$lcssa = 0, $RP9$0 = 0, $RP9$0$lcssa = 0, $T$0$lcssa = 0, $T$051 = 0, $T$051$lcssa = 0, $cond = 0, $cond47 = 0, $not$ = 0, $p$0 = 0, $psize$0 = 0, $psize$1 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0; sp = STACKTOP; $0 = ($mem|0)==(0|0); if ($0) { - STACKTOP = sp;return; + return; } - $1 = (($mem) + -8|0); - $2 = HEAP32[((32544 + 16|0))>>2]|0; + $1 = ((($mem)) + -8|0); + $2 = HEAP32[(32692)>>2]|0; $3 = ($1>>>0)<($2>>>0); if ($3) { _abort(); // unreachable; } - $4 = (($mem) + -4|0); + $4 = ((($mem)) + -4|0); $5 = HEAP32[$4>>2]|0; $6 = $5 & 3; $7 = ($6|0)==(1); @@ -22018,7 +23142,7 @@ function _free($mem) { $12 = HEAP32[$1>>2]|0; $13 = ($6|0)==(0); if ($13) { - STACKTOP = sp;return; + return; } $$sum2 = (-8 - ($12))|0; $14 = (($mem) + ($$sum2)|0); @@ -22028,7 +23152,7 @@ function _free($mem) { _abort(); // unreachable; } - $17 = HEAP32[((32544 + 20|0))>>2]|0; + $17 = HEAP32[(32696)>>2]|0; $18 = ($14|0)==($17|0); if ($18) { $$sum3 = (($8) + -4)|0; @@ -22040,27 +23164,27 @@ function _free($mem) { $p$0 = $14;$psize$0 = $15; break; } - HEAP32[((32544 + 8|0))>>2] = $15; + HEAP32[(32684)>>2] = $15; $107 = $104 & -2; HEAP32[$103>>2] = $107; $108 = $15 | 1; - $$sum26 = (($$sum2) + 4)|0; - $109 = (($mem) + ($$sum26)|0); + $$sum20 = (($$sum2) + 4)|0; + $109 = (($mem) + ($$sum20)|0); HEAP32[$109>>2] = $108; HEAP32[$9>>2] = $15; - STACKTOP = sp;return; + return; } $19 = $12 >>> 3; $20 = ($12>>>0)<(256); if ($20) { - $$sum36 = (($$sum2) + 8)|0; - $21 = (($mem) + ($$sum36)|0); + $$sum30 = (($$sum2) + 8)|0; + $21 = (($mem) + ($$sum30)|0); $22 = HEAP32[$21>>2]|0; - $$sum37 = (($$sum2) + 12)|0; - $23 = (($mem) + ($$sum37)|0); + $$sum31 = (($$sum2) + 12)|0; + $23 = (($mem) + ($$sum31)|0); $24 = HEAP32[$23>>2]|0; $25 = $19 << 1; - $26 = ((32544 + ($25<<2)|0) + 40|0); + $26 = (32716 + ($25<<2)|0); $27 = ($22|0)==($26|0); if (!($27)) { $28 = ($22>>>0)<($2>>>0); @@ -22068,7 +23192,7 @@ function _free($mem) { _abort(); // unreachable; } - $29 = (($22) + 12|0); + $29 = ((($22)) + 12|0); $30 = HEAP32[$29>>2]|0; $31 = ($30|0)==($14|0); if (!($31)) { @@ -22080,54 +23204,54 @@ function _free($mem) { if ($32) { $33 = 1 << $19; $34 = $33 ^ -1; - $35 = HEAP32[32544>>2]|0; + $35 = HEAP32[32676>>2]|0; $36 = $35 & $34; - HEAP32[32544>>2] = $36; + HEAP32[32676>>2] = $36; $p$0 = $14;$psize$0 = $15; break; } $37 = ($24|0)==($26|0); if ($37) { - $$pre67 = (($24) + 8|0); - $$pre$phi68Z2D = $$pre67; + $$pre60 = ((($24)) + 8|0); + $$pre$phi61Z2D = $$pre60; } else { $38 = ($24>>>0)<($2>>>0); if ($38) { _abort(); // unreachable; } - $39 = (($24) + 8|0); + $39 = ((($24)) + 8|0); $40 = HEAP32[$39>>2]|0; $41 = ($40|0)==($14|0); if ($41) { - $$pre$phi68Z2D = $39; + $$pre$phi61Z2D = $39; } else { _abort(); // unreachable; } } - $42 = (($22) + 12|0); + $42 = ((($22)) + 12|0); HEAP32[$42>>2] = $24; - HEAP32[$$pre$phi68Z2D>>2] = $22; + HEAP32[$$pre$phi61Z2D>>2] = $22; $p$0 = $14;$psize$0 = $15; break; } - $$sum28 = (($$sum2) + 24)|0; - $43 = (($mem) + ($$sum28)|0); + $$sum22 = (($$sum2) + 24)|0; + $43 = (($mem) + ($$sum22)|0); $44 = HEAP32[$43>>2]|0; - $$sum29 = (($$sum2) + 12)|0; - $45 = (($mem) + ($$sum29)|0); + $$sum23 = (($$sum2) + 12)|0; + $45 = (($mem) + ($$sum23)|0); $46 = HEAP32[$45>>2]|0; $47 = ($46|0)==($14|0); do { if ($47) { - $$sum31 = (($$sum2) + 20)|0; - $57 = (($mem) + ($$sum31)|0); + $$sum25 = (($$sum2) + 20)|0; + $57 = (($mem) + ($$sum25)|0); $58 = HEAP32[$57>>2]|0; $59 = ($58|0)==(0|0); if ($59) { - $$sum30 = (($$sum2) + 16)|0; - $60 = (($mem) + ($$sum30)|0); + $$sum24 = (($$sum2) + 16)|0; + $60 = (($mem) + ($$sum24)|0); $61 = HEAP32[$60>>2]|0; $62 = ($61|0)==(0|0); if ($62) { @@ -22140,48 +23264,49 @@ function _free($mem) { $R$0 = $58;$RP$0 = $57; } while(1) { - $63 = (($R$0) + 20|0); + $63 = ((($R$0)) + 20|0); $64 = HEAP32[$63>>2]|0; $65 = ($64|0)==(0|0); if (!($65)) { $R$0 = $64;$RP$0 = $63; continue; } - $66 = (($R$0) + 16|0); + $66 = ((($R$0)) + 16|0); $67 = HEAP32[$66>>2]|0; $68 = ($67|0)==(0|0); if ($68) { + $R$0$lcssa = $R$0;$RP$0$lcssa = $RP$0; break; } else { $R$0 = $67;$RP$0 = $66; } } - $69 = ($RP$0>>>0)<($2>>>0); + $69 = ($RP$0$lcssa>>>0)<($2>>>0); if ($69) { _abort(); // unreachable; } else { - HEAP32[$RP$0>>2] = 0; - $R$1 = $R$0; + HEAP32[$RP$0$lcssa>>2] = 0; + $R$1 = $R$0$lcssa; break; } } else { - $$sum35 = (($$sum2) + 8)|0; - $48 = (($mem) + ($$sum35)|0); + $$sum29 = (($$sum2) + 8)|0; + $48 = (($mem) + ($$sum29)|0); $49 = HEAP32[$48>>2]|0; $50 = ($49>>>0)<($2>>>0); if ($50) { _abort(); // unreachable; } - $51 = (($49) + 12|0); + $51 = ((($49)) + 12|0); $52 = HEAP32[$51>>2]|0; $53 = ($52|0)==($14|0); if (!($53)) { _abort(); // unreachable; } - $54 = (($46) + 8|0); + $54 = ((($46)) + 8|0); $55 = HEAP32[$54>>2]|0; $56 = ($55|0)==($14|0); if ($56) { @@ -22199,10 +23324,10 @@ function _free($mem) { if ($70) { $p$0 = $14;$psize$0 = $15; } else { - $$sum32 = (($$sum2) + 28)|0; - $71 = (($mem) + ($$sum32)|0); + $$sum26 = (($$sum2) + 28)|0; + $71 = (($mem) + ($$sum26)|0); $72 = HEAP32[$71>>2]|0; - $73 = ((32544 + ($72<<2)|0) + 304|0); + $73 = (32980 + ($72<<2)|0); $74 = HEAP32[$73>>2]|0; $75 = ($14|0)==($74|0); if ($75) { @@ -22211,26 +23336,26 @@ function _free($mem) { if ($cond) { $76 = 1 << $72; $77 = $76 ^ -1; - $78 = HEAP32[((32544 + 4|0))>>2]|0; + $78 = HEAP32[(32680)>>2]|0; $79 = $78 & $77; - HEAP32[((32544 + 4|0))>>2] = $79; + HEAP32[(32680)>>2] = $79; $p$0 = $14;$psize$0 = $15; break; } } else { - $80 = HEAP32[((32544 + 16|0))>>2]|0; + $80 = HEAP32[(32692)>>2]|0; $81 = ($44>>>0)<($80>>>0); if ($81) { _abort(); // unreachable; } - $82 = (($44) + 16|0); + $82 = ((($44)) + 16|0); $83 = HEAP32[$82>>2]|0; $84 = ($83|0)==($14|0); if ($84) { HEAP32[$82>>2] = $R$1; } else { - $85 = (($44) + 20|0); + $85 = ((($44)) + 20|0); HEAP32[$85>>2] = $R$1; } $86 = ($R$1|0)==(0|0); @@ -22239,16 +23364,16 @@ function _free($mem) { break; } } - $87 = HEAP32[((32544 + 16|0))>>2]|0; + $87 = HEAP32[(32692)>>2]|0; $88 = ($R$1>>>0)<($87>>>0); if ($88) { _abort(); // unreachable; } - $89 = (($R$1) + 24|0); + $89 = ((($R$1)) + 24|0); HEAP32[$89>>2] = $44; - $$sum33 = (($$sum2) + 16)|0; - $90 = (($mem) + ($$sum33)|0); + $$sum27 = (($$sum2) + 16)|0; + $90 = (($mem) + ($$sum27)|0); $91 = HEAP32[$90>>2]|0; $92 = ($91|0)==(0|0); do { @@ -22258,30 +23383,30 @@ function _free($mem) { _abort(); // unreachable; } else { - $94 = (($R$1) + 16|0); + $94 = ((($R$1)) + 16|0); HEAP32[$94>>2] = $91; - $95 = (($91) + 24|0); + $95 = ((($91)) + 24|0); HEAP32[$95>>2] = $R$1; break; } } } while(0); - $$sum34 = (($$sum2) + 20)|0; - $96 = (($mem) + ($$sum34)|0); + $$sum28 = (($$sum2) + 20)|0; + $96 = (($mem) + ($$sum28)|0); $97 = HEAP32[$96>>2]|0; $98 = ($97|0)==(0|0); if ($98) { $p$0 = $14;$psize$0 = $15; } else { - $99 = HEAP32[((32544 + 16|0))>>2]|0; + $99 = HEAP32[(32692)>>2]|0; $100 = ($97>>>0)<($99>>>0); if ($100) { _abort(); // unreachable; } else { - $101 = (($R$1) + 20|0); + $101 = ((($R$1)) + 20|0); HEAP32[$101>>2] = $97; - $102 = (($97) + 24|0); + $102 = ((($97)) + 24|0); HEAP32[$102>>2] = $R$1; $p$0 = $14;$psize$0 = $15; break; @@ -22297,8 +23422,8 @@ function _free($mem) { _abort(); // unreachable; } - $$sum25 = (($8) + -4)|0; - $111 = (($mem) + ($$sum25)|0); + $$sum19 = (($8) + -4)|0; + $111 = (($mem) + ($$sum19)|0); $112 = HEAP32[$111>>2]|0; $113 = $112 & 1; $114 = ($113|0)==(0); @@ -22309,38 +23434,38 @@ function _free($mem) { $115 = $112 & 2; $116 = ($115|0)==(0); if ($116) { - $117 = HEAP32[((32544 + 24|0))>>2]|0; + $117 = HEAP32[(32700)>>2]|0; $118 = ($9|0)==($117|0); if ($118) { - $119 = HEAP32[((32544 + 12|0))>>2]|0; + $119 = HEAP32[(32688)>>2]|0; $120 = (($119) + ($psize$0))|0; - HEAP32[((32544 + 12|0))>>2] = $120; - HEAP32[((32544 + 24|0))>>2] = $p$0; + HEAP32[(32688)>>2] = $120; + HEAP32[(32700)>>2] = $p$0; $121 = $120 | 1; - $122 = (($p$0) + 4|0); + $122 = ((($p$0)) + 4|0); HEAP32[$122>>2] = $121; - $123 = HEAP32[((32544 + 20|0))>>2]|0; + $123 = HEAP32[(32696)>>2]|0; $124 = ($p$0|0)==($123|0); if (!($124)) { - STACKTOP = sp;return; + return; } - HEAP32[((32544 + 20|0))>>2] = 0; - HEAP32[((32544 + 8|0))>>2] = 0; - STACKTOP = sp;return; + HEAP32[(32696)>>2] = 0; + HEAP32[(32684)>>2] = 0; + return; } - $125 = HEAP32[((32544 + 20|0))>>2]|0; + $125 = HEAP32[(32696)>>2]|0; $126 = ($9|0)==($125|0); if ($126) { - $127 = HEAP32[((32544 + 8|0))>>2]|0; + $127 = HEAP32[(32684)>>2]|0; $128 = (($127) + ($psize$0))|0; - HEAP32[((32544 + 8|0))>>2] = $128; - HEAP32[((32544 + 20|0))>>2] = $p$0; + HEAP32[(32684)>>2] = $128; + HEAP32[(32696)>>2] = $p$0; $129 = $128 | 1; - $130 = (($p$0) + 4|0); + $130 = ((($p$0)) + 4|0); HEAP32[$130>>2] = $129; $131 = (($p$0) + ($128)|0); HEAP32[$131>>2] = $128; - STACKTOP = sp;return; + return; } $132 = $112 & -8; $133 = (($132) + ($psize$0))|0; @@ -22350,20 +23475,20 @@ function _free($mem) { if ($135) { $136 = (($mem) + ($8)|0); $137 = HEAP32[$136>>2]|0; - $$sum2324 = $8 | 4; - $138 = (($mem) + ($$sum2324)|0); + $$sum1718 = $8 | 4; + $138 = (($mem) + ($$sum1718)|0); $139 = HEAP32[$138>>2]|0; $140 = $134 << 1; - $141 = ((32544 + ($140<<2)|0) + 40|0); + $141 = (32716 + ($140<<2)|0); $142 = ($137|0)==($141|0); if (!($142)) { - $143 = HEAP32[((32544 + 16|0))>>2]|0; + $143 = HEAP32[(32692)>>2]|0; $144 = ($137>>>0)<($143>>>0); if ($144) { _abort(); // unreachable; } - $145 = (($137) + 12|0); + $145 = ((($137)) + 12|0); $146 = HEAP32[$145>>2]|0; $147 = ($146|0)==($9|0); if (!($147)) { @@ -22375,35 +23500,35 @@ function _free($mem) { if ($148) { $149 = 1 << $134; $150 = $149 ^ -1; - $151 = HEAP32[32544>>2]|0; + $151 = HEAP32[32676>>2]|0; $152 = $151 & $150; - HEAP32[32544>>2] = $152; + HEAP32[32676>>2] = $152; break; } $153 = ($139|0)==($141|0); if ($153) { - $$pre65 = (($139) + 8|0); - $$pre$phi66Z2D = $$pre65; + $$pre58 = ((($139)) + 8|0); + $$pre$phi59Z2D = $$pre58; } else { - $154 = HEAP32[((32544 + 16|0))>>2]|0; + $154 = HEAP32[(32692)>>2]|0; $155 = ($139>>>0)<($154>>>0); if ($155) { _abort(); // unreachable; } - $156 = (($139) + 8|0); + $156 = ((($139)) + 8|0); $157 = HEAP32[$156>>2]|0; $158 = ($157|0)==($9|0); if ($158) { - $$pre$phi66Z2D = $156; + $$pre$phi59Z2D = $156; } else { _abort(); // unreachable; } } - $159 = (($137) + 12|0); + $159 = ((($137)) + 12|0); HEAP32[$159>>2] = $139; - HEAP32[$$pre$phi66Z2D>>2] = $137; + HEAP32[$$pre$phi59Z2D>>2] = $137; } else { $$sum5 = (($8) + 16)|0; $160 = (($mem) + ($$sum5)|0); @@ -22433,49 +23558,50 @@ function _free($mem) { $R7$0 = $176;$RP9$0 = $175; } while(1) { - $181 = (($R7$0) + 20|0); + $181 = ((($R7$0)) + 20|0); $182 = HEAP32[$181>>2]|0; $183 = ($182|0)==(0|0); if (!($183)) { $R7$0 = $182;$RP9$0 = $181; continue; } - $184 = (($R7$0) + 16|0); + $184 = ((($R7$0)) + 16|0); $185 = HEAP32[$184>>2]|0; $186 = ($185|0)==(0|0); if ($186) { + $R7$0$lcssa = $R7$0;$RP9$0$lcssa = $RP9$0; break; } else { $R7$0 = $185;$RP9$0 = $184; } } - $187 = HEAP32[((32544 + 16|0))>>2]|0; - $188 = ($RP9$0>>>0)<($187>>>0); + $187 = HEAP32[(32692)>>2]|0; + $188 = ($RP9$0$lcssa>>>0)<($187>>>0); if ($188) { _abort(); // unreachable; } else { - HEAP32[$RP9$0>>2] = 0; - $R7$1 = $R7$0; + HEAP32[$RP9$0$lcssa>>2] = 0; + $R7$1 = $R7$0$lcssa; break; } } else { $165 = (($mem) + ($8)|0); $166 = HEAP32[$165>>2]|0; - $167 = HEAP32[((32544 + 16|0))>>2]|0; + $167 = HEAP32[(32692)>>2]|0; $168 = ($166>>>0)<($167>>>0); if ($168) { _abort(); // unreachable; } - $169 = (($166) + 12|0); + $169 = ((($166)) + 12|0); $170 = HEAP32[$169>>2]|0; $171 = ($170|0)==($9|0); if (!($171)) { _abort(); // unreachable; } - $172 = (($163) + 8|0); + $172 = ((($163)) + 8|0); $173 = HEAP32[$172>>2]|0; $174 = ($173|0)==($9|0); if ($174) { @@ -22491,37 +23617,37 @@ function _free($mem) { } while(0); $189 = ($161|0)==(0|0); if (!($189)) { - $$sum18 = (($8) + 20)|0; - $190 = (($mem) + ($$sum18)|0); + $$sum12 = (($8) + 20)|0; + $190 = (($mem) + ($$sum12)|0); $191 = HEAP32[$190>>2]|0; - $192 = ((32544 + ($191<<2)|0) + 304|0); + $192 = (32980 + ($191<<2)|0); $193 = HEAP32[$192>>2]|0; $194 = ($9|0)==($193|0); if ($194) { HEAP32[$192>>2] = $R7$1; - $cond54 = ($R7$1|0)==(0|0); - if ($cond54) { + $cond47 = ($R7$1|0)==(0|0); + if ($cond47) { $195 = 1 << $191; $196 = $195 ^ -1; - $197 = HEAP32[((32544 + 4|0))>>2]|0; + $197 = HEAP32[(32680)>>2]|0; $198 = $197 & $196; - HEAP32[((32544 + 4|0))>>2] = $198; + HEAP32[(32680)>>2] = $198; break; } } else { - $199 = HEAP32[((32544 + 16|0))>>2]|0; + $199 = HEAP32[(32692)>>2]|0; $200 = ($161>>>0)<($199>>>0); if ($200) { _abort(); // unreachable; } - $201 = (($161) + 16|0); + $201 = ((($161)) + 16|0); $202 = HEAP32[$201>>2]|0; $203 = ($202|0)==($9|0); if ($203) { HEAP32[$201>>2] = $R7$1; } else { - $204 = (($161) + 20|0); + $204 = ((($161)) + 20|0); HEAP32[$204>>2] = $R7$1; } $205 = ($R7$1|0)==(0|0); @@ -22529,16 +23655,16 @@ function _free($mem) { break; } } - $206 = HEAP32[((32544 + 16|0))>>2]|0; + $206 = HEAP32[(32692)>>2]|0; $207 = ($R7$1>>>0)<($206>>>0); if ($207) { _abort(); // unreachable; } - $208 = (($R7$1) + 24|0); + $208 = ((($R7$1)) + 24|0); HEAP32[$208>>2] = $161; - $$sum19 = (($8) + 8)|0; - $209 = (($mem) + ($$sum19)|0); + $$sum13 = (($8) + 8)|0; + $209 = (($mem) + ($$sum13)|0); $210 = HEAP32[$209>>2]|0; $211 = ($210|0)==(0|0); do { @@ -22548,28 +23674,28 @@ function _free($mem) { _abort(); // unreachable; } else { - $213 = (($R7$1) + 16|0); + $213 = ((($R7$1)) + 16|0); HEAP32[$213>>2] = $210; - $214 = (($210) + 24|0); + $214 = ((($210)) + 24|0); HEAP32[$214>>2] = $R7$1; break; } } } while(0); - $$sum20 = (($8) + 12)|0; - $215 = (($mem) + ($$sum20)|0); + $$sum14 = (($8) + 12)|0; + $215 = (($mem) + ($$sum14)|0); $216 = HEAP32[$215>>2]|0; $217 = ($216|0)==(0|0); if (!($217)) { - $218 = HEAP32[((32544 + 16|0))>>2]|0; + $218 = HEAP32[(32692)>>2]|0; $219 = ($216>>>0)<($218>>>0); if ($219) { _abort(); // unreachable; } else { - $220 = (($R7$1) + 20|0); + $220 = ((($R7$1)) + 20|0); HEAP32[$220>>2] = $216; - $221 = (($216) + 24|0); + $221 = ((($216)) + 24|0); HEAP32[$221>>2] = $R7$1; break; } @@ -22578,15 +23704,15 @@ function _free($mem) { } } while(0); $222 = $133 | 1; - $223 = (($p$0) + 4|0); + $223 = ((($p$0)) + 4|0); HEAP32[$223>>2] = $222; $224 = (($p$0) + ($133)|0); HEAP32[$224>>2] = $133; - $225 = HEAP32[((32544 + 20|0))>>2]|0; + $225 = HEAP32[(32696)>>2]|0; $226 = ($p$0|0)==($225|0); if ($226) { - HEAP32[((32544 + 8|0))>>2] = $133; - STACKTOP = sp;return; + HEAP32[(32684)>>2] = $133; + return; } else { $psize$1 = $133; } @@ -22594,7 +23720,7 @@ function _free($mem) { $227 = $112 & -2; HEAP32[$111>>2] = $227; $228 = $psize$0 | 1; - $229 = (($p$0) + 4|0); + $229 = ((($p$0)) + 4|0); HEAP32[$229>>2] = $228; $230 = (($p$0) + ($psize$0)|0); HEAP32[$230>>2] = $psize$0; @@ -22604,22 +23730,22 @@ function _free($mem) { $232 = ($psize$1>>>0)<(256); if ($232) { $233 = $231 << 1; - $234 = ((32544 + ($233<<2)|0) + 40|0); - $235 = HEAP32[32544>>2]|0; + $234 = (32716 + ($233<<2)|0); + $235 = HEAP32[32676>>2]|0; $236 = 1 << $231; $237 = $235 & $236; $238 = ($237|0)==(0); if ($238) { $239 = $235 | $236; - HEAP32[32544>>2] = $239; - $$sum16$pre = (($233) + 2)|0; - $$pre = ((32544 + ($$sum16$pre<<2)|0) + 40|0); - $$pre$phiZ2D = $$pre;$F16$0 = $234; + HEAP32[32676>>2] = $239; + $$pre = (($233) + 2)|0; + $$pre57 = (32716 + ($$pre<<2)|0); + $$pre$phiZ2D = $$pre57;$F16$0 = $234; } else { - $$sum17 = (($233) + 2)|0; - $240 = ((32544 + ($$sum17<<2)|0) + 40|0); + $$sum11 = (($233) + 2)|0; + $240 = (32716 + ($$sum11<<2)|0); $241 = HEAP32[$240>>2]|0; - $242 = HEAP32[((32544 + 16|0))>>2]|0; + $242 = HEAP32[(32692)>>2]|0; $243 = ($241>>>0)<($242>>>0); if ($243) { _abort(); @@ -22629,13 +23755,13 @@ function _free($mem) { } } HEAP32[$$pre$phiZ2D>>2] = $p$0; - $244 = (($F16$0) + 12|0); + $244 = ((($F16$0)) + 12|0); HEAP32[$244>>2] = $p$0; - $245 = (($p$0) + 8|0); + $245 = ((($p$0)) + 8|0); HEAP32[$245>>2] = $F16$0; - $246 = (($p$0) + 12|0); + $246 = ((($p$0)) + 12|0); HEAP32[$246>>2] = $234; - STACKTOP = sp;return; + return; } $247 = $psize$1 >>> 8; $248 = ($247|0)==(0); @@ -22671,101 +23797,97 @@ function _free($mem) { $I18$0 = $271; } } - $272 = ((32544 + ($I18$0<<2)|0) + 304|0); - $273 = (($p$0) + 28|0); - $I18$0$c = $I18$0; - HEAP32[$273>>2] = $I18$0$c; - $274 = (($p$0) + 20|0); - HEAP32[$274>>2] = 0; - $275 = (($p$0) + 16|0); + $272 = (32980 + ($I18$0<<2)|0); + $273 = ((($p$0)) + 28|0); + HEAP32[$273>>2] = $I18$0; + $274 = ((($p$0)) + 16|0); + $275 = ((($p$0)) + 20|0); HEAP32[$275>>2] = 0; - $276 = HEAP32[((32544 + 4|0))>>2]|0; + HEAP32[$274>>2] = 0; + $276 = HEAP32[(32680)>>2]|0; $277 = 1 << $I18$0; $278 = $276 & $277; $279 = ($278|0)==(0); L199: do { if ($279) { $280 = $276 | $277; - HEAP32[((32544 + 4|0))>>2] = $280; + HEAP32[(32680)>>2] = $280; HEAP32[$272>>2] = $p$0; - $281 = (($p$0) + 24|0); + $281 = ((($p$0)) + 24|0); HEAP32[$281>>2] = $272; - $282 = (($p$0) + 12|0); + $282 = ((($p$0)) + 12|0); HEAP32[$282>>2] = $p$0; - $283 = (($p$0) + 8|0); + $283 = ((($p$0)) + 8|0); HEAP32[$283>>2] = $p$0; } else { $284 = HEAP32[$272>>2]|0; - $285 = ($I18$0|0)==(31); - if ($285) { - $293 = 0; - } else { - $286 = $I18$0 >>> 1; - $287 = (25 - ($286))|0; - $293 = $287; - } - $288 = (($284) + 4|0); - $289 = HEAP32[$288>>2]|0; - $290 = $289 & -8; - $291 = ($290|0)==($psize$1|0); - L205: do { - if ($291) { + $285 = ((($284)) + 4|0); + $286 = HEAP32[$285>>2]|0; + $287 = $286 & -8; + $288 = ($287|0)==($psize$1|0); + L202: do { + if ($288) { $T$0$lcssa = $284; } else { - $292 = $psize$1 << $293; - $K19$058 = $292;$T$057 = $284; + $289 = ($I18$0|0)==(31); + $290 = $I18$0 >>> 1; + $291 = (25 - ($290))|0; + $292 = $289 ? 0 : $291; + $293 = $psize$1 << $292; + $K19$052 = $293;$T$051 = $284; while(1) { - $300 = $K19$058 >>> 31; - $301 = ((($T$057) + ($300<<2)|0) + 16|0); + $300 = $K19$052 >>> 31; + $301 = (((($T$051)) + 16|0) + ($300<<2)|0); $296 = HEAP32[$301>>2]|0; $302 = ($296|0)==(0|0); if ($302) { + $$lcssa = $301;$T$051$lcssa = $T$051; break; } - $294 = $K19$058 << 1; - $295 = (($296) + 4|0); + $294 = $K19$052 << 1; + $295 = ((($296)) + 4|0); $297 = HEAP32[$295>>2]|0; $298 = $297 & -8; $299 = ($298|0)==($psize$1|0); if ($299) { $T$0$lcssa = $296; - break L205; + break L202; } else { - $K19$058 = $294;$T$057 = $296; + $K19$052 = $294;$T$051 = $296; } } - $303 = HEAP32[((32544 + 16|0))>>2]|0; - $304 = ($301>>>0)<($303>>>0); + $303 = HEAP32[(32692)>>2]|0; + $304 = ($$lcssa>>>0)<($303>>>0); if ($304) { _abort(); // unreachable; } else { - HEAP32[$301>>2] = $p$0; - $305 = (($p$0) + 24|0); - HEAP32[$305>>2] = $T$057; - $306 = (($p$0) + 12|0); + HEAP32[$$lcssa>>2] = $p$0; + $305 = ((($p$0)) + 24|0); + HEAP32[$305>>2] = $T$051$lcssa; + $306 = ((($p$0)) + 12|0); HEAP32[$306>>2] = $p$0; - $307 = (($p$0) + 8|0); + $307 = ((($p$0)) + 8|0); HEAP32[$307>>2] = $p$0; break L199; } } } while(0); - $308 = (($T$0$lcssa) + 8|0); + $308 = ((($T$0$lcssa)) + 8|0); $309 = HEAP32[$308>>2]|0; - $310 = HEAP32[((32544 + 16|0))>>2]|0; - $311 = ($T$0$lcssa>>>0)>=($310>>>0); - $312 = ($309>>>0)>=($310>>>0); - $or$cond = $311 & $312; - if ($or$cond) { - $313 = (($309) + 12|0); + $310 = HEAP32[(32692)>>2]|0; + $311 = ($309>>>0)>=($310>>>0); + $not$ = ($T$0$lcssa>>>0)>=($310>>>0); + $312 = $311 & $not$; + if ($312) { + $313 = ((($309)) + 12|0); HEAP32[$313>>2] = $p$0; HEAP32[$308>>2] = $p$0; - $314 = (($p$0) + 8|0); + $314 = ((($p$0)) + 8|0); HEAP32[$314>>2] = $309; - $315 = (($p$0) + 12|0); + $315 = ((($p$0)) + 12|0); HEAP32[$315>>2] = $T$0$lcssa; - $316 = (($p$0) + 24|0); + $316 = ((($p$0)) + 24|0); HEAP32[$316>>2] = 0; break; } else { @@ -22774,30 +23896,29 @@ function _free($mem) { } } } while(0); - $317 = HEAP32[((32544 + 32|0))>>2]|0; + $317 = HEAP32[(32708)>>2]|0; $318 = (($317) + -1)|0; - HEAP32[((32544 + 32|0))>>2] = $318; + HEAP32[(32708)>>2] = $318; $319 = ($318|0)==(0); if ($319) { - $sp$0$in$i = ((32544 + 456|0)); + $sp$0$in$i = (33132); } else { - STACKTOP = sp;return; + return; } while(1) { $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; $320 = ($sp$0$i|0)==(0|0); - $321 = (($sp$0$i) + 8|0); + $321 = ((($sp$0$i)) + 8|0); if ($320) { break; } else { $sp$0$in$i = $321; } } - HEAP32[((32544 + 32|0))>>2] = -1; - STACKTOP = sp;return; + HEAP32[(32708)>>2] = -1; + return; } function runPostSets() { - } function _bitshift64Ashr(low, high, bits) { low = low|0; high = high|0; bits = bits|0; @@ -22880,17 +24001,7 @@ function _bitshift64Shl(low, high, bits) { tempRet0 = low << (bits - 32); return 0; } -function _strlen(ptr) { - ptr = ptr|0; - var curr = 0; - curr = ptr; - while (((HEAP8[((curr)>>0)])|0)) { - curr = (curr + 1)|0; - } - return (curr - ptr)|0; -} function _memcpy(dest, src, num) { - dest = dest|0; src = src|0; num = num|0; var ret = 0; if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; @@ -22938,18 +24049,6 @@ function _memmove(dest, src, num) { } return dest | 0; } -function _llvm_ctlz_i32(x) { - x = x|0; - var ret = 0; - ret = ((HEAP8[(((ctlz_i8)+(x >>> 24))>>0)])|0); - if ((ret|0) < 8) return ret|0; - ret = ((HEAP8[(((ctlz_i8)+((x >> 16)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 8)|0; - ret = ((HEAP8[(((ctlz_i8)+((x >> 8)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 16)|0; - return (((HEAP8[(((ctlz_i8)+(x&0xff))>>0)])|0) + 24)|0; - } - function _llvm_cttz_i32(x) { x = x|0; var ret = 0; @@ -22993,7 +24092,7 @@ function ___divdi3($a$0, $a$1, $b$0, $b$1) { $7$1 = $2$1 ^ $1$1; $8$0 = ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, 0) | 0; $10$0 = _i64Subtract($8$0 ^ $7$0, tempRet0 ^ $7$1, $7$0, $7$1) | 0; - return (tempRet0 = tempRet0, $10$0) | 0; + return $10$0 | 0; } function ___remdi3($a$0, $a$1, $b$0, $b$1) { $a$0 = $a$0 | 0; @@ -23002,7 +24101,7 @@ function ___remdi3($a$0, $a$1, $b$0, $b$1) { $b$1 = $b$1 | 0; var $rem = 0, $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $10$0 = 0, $10$1 = 0, __stackBase__ = 0; __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; + STACKTOP = STACKTOP + 16 | 0; $rem = __stackBase__ | 0; $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; @@ -23037,7 +24136,7 @@ function ___udivdi3($a$0, $a$1, $b$0, $b$1) { $b$1 = $b$1 | 0; var $1$0 = 0; $1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0; - return (tempRet0 = tempRet0, $1$0) | 0; + return $1$0 | 0; } function ___uremdi3($a$0, $a$1, $b$0, $b$1) { $a$0 = $a$0 | 0; @@ -23046,7 +24145,7 @@ function ___uremdi3($a$0, $a$1, $b$0, $b$1) { $b$1 = $b$1 | 0; var $rem = 0, __stackBase__ = 0; __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; + STACKTOP = STACKTOP + 16 | 0; $rem = __stackBase__ | 0; ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0; STACKTOP = __stackBase__; @@ -23119,8 +24218,8 @@ function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { $_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0); return (tempRet0 = $_0$1, $_0$0) | 0; } - $49 = _llvm_ctlz_i32($d_sroa_1_4_extract_trunc | 0) | 0; - $51 = $49 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + $49 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; + $51 = $49 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; if ($51 >>> 0 <= 30) { $57 = $51 + 1 | 0; $58 = 31 - $51 | 0; @@ -23143,8 +24242,8 @@ function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { return (tempRet0 = $_0$1, $_0$0) | 0; } else { if (!$17) { - $117 = _llvm_ctlz_i32($d_sroa_1_4_extract_trunc | 0) | 0; - $119 = $117 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + $117 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; + $119 = $117 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; if ($119 >>> 0 <= 31) { $125 = $119 + 1 | 0; $126 = 31 - $119 | 0; @@ -23169,8 +24268,8 @@ function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { } $66 = $d_sroa_0_0_extract_trunc - 1 | 0; if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) { - $86 = (_llvm_ctlz_i32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0; - $88 = $86 - (_llvm_ctlz_i32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; + $86 = (Math_clz32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0; + $88 = $86 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; $89 = 64 - $88 | 0; $91 = 32 - $88 | 0; $92 = $91 >> 31; @@ -23209,7 +24308,7 @@ function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { } else { $d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1; $d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0; - $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0, $d_sroa_0_0_insert_insert99$1, -1, -1) | 0; + $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0 | 0, $d_sroa_0_0_insert_insert99$1 | 0, -1, -1) | 0; $137$1 = tempRet0; $q_sroa_1_1198 = $q_sroa_1_1_ph; $q_sroa_0_1199 = $q_sroa_0_1_ph; @@ -23233,1704 +24332,111 @@ function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { if (($155 | 0) == 0) { break; } else { - $q_sroa_1_1198 = $147; - $q_sroa_0_1199 = $149; - $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc; - $sr_1202 = $155; - $carry_0203 = $152; - } - } - $q_sroa_1_1_lcssa = $147; - $q_sroa_0_1_lcssa = $149; - $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc; - $carry_0_lcssa$1 = 0; - $carry_0_lcssa$0 = $152; - } - $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa; - $q_sroa_0_0_insert_ext75$1 = 0; - $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1; - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa; - HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0; - } - $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1; - $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0; - return (tempRet0 = $_0$1, $_0$0) | 0; -} -// ======================================================================= - - - -// EMSCRIPTEN_END_FUNCS - - - - // EMSCRIPTEN_END_FUNCS - - - return { _curve25519_verify: _curve25519_verify, _crypto_sign_ed25519_ref10_ge_scalarmult_base: _crypto_sign_ed25519_ref10_ge_scalarmult_base, _curve25519_sign: _curve25519_sign, _free: _free, _i64Add: _i64Add, _memmove: _memmove, _bitshift64Ashr: _bitshift64Ashr, _sph_sha512_init: _sph_sha512_init, _curve25519_donna: _curve25519_donna, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, _strlen: _strlen, _bitshift64Lshr: _bitshift64Lshr, _i64Subtract: _i64Subtract, _bitshift64Shl: _bitshift64Shl, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, getTempRet0: getTempRet0 }; -}) -// EMSCRIPTEN_END_ASM -(Module.asmGlobalArg, Module.asmLibraryArg, buffer); -var _curve25519_verify = Module["_curve25519_verify"] = asm["_curve25519_verify"]; -var _crypto_sign_ed25519_ref10_ge_scalarmult_base = Module["_crypto_sign_ed25519_ref10_ge_scalarmult_base"] = asm["_crypto_sign_ed25519_ref10_ge_scalarmult_base"]; -var _curve25519_sign = Module["_curve25519_sign"] = asm["_curve25519_sign"]; -var _free = Module["_free"] = asm["_free"]; -var _i64Add = Module["_i64Add"] = asm["_i64Add"]; -var _memmove = Module["_memmove"] = asm["_memmove"]; -var _bitshift64Ashr = Module["_bitshift64Ashr"] = asm["_bitshift64Ashr"]; -var _sph_sha512_init = Module["_sph_sha512_init"] = asm["_sph_sha512_init"]; -var _curve25519_donna = Module["_curve25519_donna"] = asm["_curve25519_donna"]; -var _memset = Module["_memset"] = asm["_memset"]; -var _malloc = Module["_malloc"] = asm["_malloc"]; -var _memcpy = Module["_memcpy"] = asm["_memcpy"]; -var _strlen = Module["_strlen"] = asm["_strlen"]; -var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"]; -var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"]; -var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"]; -var runPostSets = Module["runPostSets"] = asm["runPostSets"]; - -Runtime.stackAlloc = asm['stackAlloc']; -Runtime.stackSave = asm['stackSave']; -Runtime.stackRestore = asm['stackRestore']; -Runtime.setTempRet0 = asm['setTempRet0']; -Runtime.getTempRet0 = asm['getTempRet0']; - - -// TODO: strip out parts of this we do not need - -//======= begin closure i64 code ======= - -// Copyright 2009 The Closure Library Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Defines a Long class for representing a 64-bit two's-complement - * integer value, which faithfully simulates the behavior of a Java "long". This - * implementation is derived from LongLib in GWT. - * - */ - -var i64Math = (function() { // Emscripten wrapper - var goog = { math: {} }; - - - /** - * Constructs a 64-bit two's-complement integer, given its low and high 32-bit - * values as *signed* integers. See the from* functions below for more - * convenient ways of constructing Longs. - * - * The internal representation of a long is the two given signed, 32-bit values. - * We use 32-bit pieces because these are the size of integers on which - * Javascript performs bit-operations. For operations like addition and - * multiplication, we split each number into 16-bit pieces, which can easily be - * multiplied within Javascript's floating-point representation without overflow - * or change in sign. - * - * In the algorithms below, we frequently reduce the negative case to the - * positive case by negating the input(s) and then post-processing the result. - * Note that we must ALWAYS check specially whether those values are MIN_VALUE - * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as - * a positive number, it overflows back into a negative). Not handling this - * case would often result in infinite recursion. - * - * @param {number} low The low (signed) 32 bits of the long. - * @param {number} high The high (signed) 32 bits of the long. - * @constructor - */ - goog.math.Long = function(low, high) { - /** - * @type {number} - * @private - */ - this.low_ = low | 0; // force into 32 signed bits. - - /** - * @type {number} - * @private - */ - this.high_ = high | 0; // force into 32 signed bits. - }; - - - // NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the - // from* methods on which they depend. - - - /** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @private - */ - goog.math.Long.IntCache_ = {}; - - - /** - * Returns a Long representing the given (32-bit) integer value. - * @param {number} value The 32-bit integer in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromInt = function(value) { - if (-128 <= value && value < 128) { - var cachedObj = goog.math.Long.IntCache_[value]; - if (cachedObj) { - return cachedObj; - } - } - - var obj = new goog.math.Long(value | 0, value < 0 ? -1 : 0); - if (-128 <= value && value < 128) { - goog.math.Long.IntCache_[value] = obj; - } - return obj; - }; - - - /** - * Returns a Long representing the given value, provided that it is a finite - * number. Otherwise, zero is returned. - * @param {number} value The number in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromNumber = function(value) { - if (isNaN(value) || !isFinite(value)) { - return goog.math.Long.ZERO; - } else if (value <= -goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MIN_VALUE; - } else if (value + 1 >= goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MAX_VALUE; - } else if (value < 0) { - return goog.math.Long.fromNumber(-value).negate(); - } else { - return new goog.math.Long( - (value % goog.math.Long.TWO_PWR_32_DBL_) | 0, - (value / goog.math.Long.TWO_PWR_32_DBL_) | 0); - } - }; - - - /** - * Returns a Long representing the 64-bit integer that comes by concatenating - * the given high and low bits. Each is assumed to use 32 bits. - * @param {number} lowBits The low 32-bits. - * @param {number} highBits The high 32-bits. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromBits = function(lowBits, highBits) { - return new goog.math.Long(lowBits, highBits); - }; - - - /** - * Returns a Long representation of the given string, written using the given - * radix. - * @param {string} str The textual representation of the Long. - * @param {number=} opt_radix The radix in which the text is written. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromString = function(str, opt_radix) { - if (str.length == 0) { - throw Error('number format error: empty string'); - } - - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (str.charAt(0) == '-') { - return goog.math.Long.fromString(str.substring(1), radix).negate(); - } else if (str.indexOf('-') >= 0) { - throw Error('number format error: interior "-" character: ' + str); - } - - // Do several (8) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 8)); - - var result = goog.math.Long.ZERO; - for (var i = 0; i < str.length; i += 8) { - var size = Math.min(8, str.length - i); - var value = parseInt(str.substring(i, i + size), radix); - if (size < 8) { - var power = goog.math.Long.fromNumber(Math.pow(radix, size)); - result = result.multiply(power).add(goog.math.Long.fromNumber(value)); - } else { - result = result.multiply(radixToPower); - result = result.add(goog.math.Long.fromNumber(value)); - } - } - return result; - }; - - - // NOTE: the compiler should inline these constant values below and then remove - // these variables, so there should be no runtime penalty for these. - - - /** - * Number used repeated below in calculations. This must appear before the - * first call to any from* function below. - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_16_DBL_ = 1 << 16; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_24_DBL_ = 1 << 24; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_32_DBL_ = - goog.math.Long.TWO_PWR_16_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_31_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ / 2; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_48_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_64_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_32_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_63_DBL_ = - goog.math.Long.TWO_PWR_64_DBL_ / 2; - - - /** @type {!goog.math.Long} */ - goog.math.Long.ZERO = goog.math.Long.fromInt(0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.ONE = goog.math.Long.fromInt(1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.NEG_ONE = goog.math.Long.fromInt(-1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MAX_VALUE = - goog.math.Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MIN_VALUE = goog.math.Long.fromBits(0, 0x80000000 | 0); - - - /** - * @type {!goog.math.Long} - * @private - */ - goog.math.Long.TWO_PWR_24_ = goog.math.Long.fromInt(1 << 24); - - - /** @return {number} The value, assuming it is a 32-bit integer. */ - goog.math.Long.prototype.toInt = function() { - return this.low_; - }; - - - /** @return {number} The closest floating-point representation to this value. */ - goog.math.Long.prototype.toNumber = function() { - return this.high_ * goog.math.Long.TWO_PWR_32_DBL_ + - this.getLowBitsUnsigned(); - }; - - - /** - * @param {number=} opt_radix The radix in which the text should be written. - * @return {string} The textual representation of this value. - */ - goog.math.Long.prototype.toString = function(opt_radix) { - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (this.isZero()) { - return '0'; - } - - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - // We need to change the Long value before it can be negated, so we remove - // the bottom-most digit in this base and then recurse to do the rest. - var radixLong = goog.math.Long.fromNumber(radix); - var div = this.div(radixLong); - var rem = div.multiply(radixLong).subtract(this); - return div.toString(radix) + rem.toInt().toString(radix); - } else { - return '-' + this.negate().toString(radix); - } - } - - // Do several (6) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 6)); - - var rem = this; - var result = ''; - while (true) { - var remDiv = rem.div(radixToPower); - var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt(); - var digits = intval.toString(radix); - - rem = remDiv; - if (rem.isZero()) { - return digits + result; - } else { - while (digits.length < 6) { - digits = '0' + digits; - } - result = '' + digits + result; - } - } - }; - - - /** @return {number} The high 32-bits as a signed value. */ - goog.math.Long.prototype.getHighBits = function() { - return this.high_; - }; - - - /** @return {number} The low 32-bits as a signed value. */ - goog.math.Long.prototype.getLowBits = function() { - return this.low_; - }; - - - /** @return {number} The low 32-bits as an unsigned value. */ - goog.math.Long.prototype.getLowBitsUnsigned = function() { - return (this.low_ >= 0) ? - this.low_ : goog.math.Long.TWO_PWR_32_DBL_ + this.low_; - }; - - - /** - * @return {number} Returns the number of bits needed to represent the absolute - * value of this Long. - */ - goog.math.Long.prototype.getNumBitsAbs = function() { - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return 64; - } else { - return this.negate().getNumBitsAbs(); - } - } else { - var val = this.high_ != 0 ? this.high_ : this.low_; - for (var bit = 31; bit > 0; bit--) { - if ((val & (1 << bit)) != 0) { - break; - } - } - return this.high_ != 0 ? bit + 33 : bit + 1; - } - }; - - - /** @return {boolean} Whether this value is zero. */ - goog.math.Long.prototype.isZero = function() { - return this.high_ == 0 && this.low_ == 0; - }; - - - /** @return {boolean} Whether this value is negative. */ - goog.math.Long.prototype.isNegative = function() { - return this.high_ < 0; - }; - - - /** @return {boolean} Whether this value is odd. */ - goog.math.Long.prototype.isOdd = function() { - return (this.low_ & 1) == 1; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long equals the other. - */ - goog.math.Long.prototype.equals = function(other) { - return (this.high_ == other.high_) && (this.low_ == other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long does not equal the other. - */ - goog.math.Long.prototype.notEquals = function(other) { - return (this.high_ != other.high_) || (this.low_ != other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than the other. - */ - goog.math.Long.prototype.lessThan = function(other) { - return this.compare(other) < 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than or equal to the other. - */ - goog.math.Long.prototype.lessThanOrEqual = function(other) { - return this.compare(other) <= 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than the other. - */ - goog.math.Long.prototype.greaterThan = function(other) { - return this.compare(other) > 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than or equal to the other. - */ - goog.math.Long.prototype.greaterThanOrEqual = function(other) { - return this.compare(other) >= 0; - }; - - - /** - * Compares this Long with the given one. - * @param {goog.math.Long} other Long to compare against. - * @return {number} 0 if they are the same, 1 if the this is greater, and -1 - * if the given one is greater. - */ - goog.math.Long.prototype.compare = function(other) { - if (this.equals(other)) { - return 0; - } - - var thisNeg = this.isNegative(); - var otherNeg = other.isNegative(); - if (thisNeg && !otherNeg) { - return -1; - } - if (!thisNeg && otherNeg) { - return 1; - } - - // at this point, the signs are the same, so subtraction will not overflow - if (this.subtract(other).isNegative()) { - return -1; - } else { - return 1; - } - }; - - - /** @return {!goog.math.Long} The negation of this value. */ - goog.math.Long.prototype.negate = function() { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.MIN_VALUE; - } else { - return this.not().add(goog.math.Long.ONE); - } - }; - - - /** - * Returns the sum of this and the given Long. - * @param {goog.math.Long} other Long to add to this one. - * @return {!goog.math.Long} The sum of this and the given Long. - */ - goog.math.Long.prototype.add = function(other) { - // Divide each number into 4 chunks of 16 bits, and then sum the chunks. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 + b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns the difference of this and the given Long. - * @param {goog.math.Long} other Long to subtract from this. - * @return {!goog.math.Long} The difference of this and the given Long. - */ - goog.math.Long.prototype.subtract = function(other) { - return this.add(other.negate()); - }; - - - /** - * Returns the product of this and the given long. - * @param {goog.math.Long} other Long to multiply with this. - * @return {!goog.math.Long} The product of this and the other. - */ - goog.math.Long.prototype.multiply = function(other) { - if (this.isZero()) { - return goog.math.Long.ZERO; - } else if (other.isZero()) { - return goog.math.Long.ZERO; - } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - return other.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return this.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().multiply(other.negate()); - } else { - return this.negate().multiply(other).negate(); - } - } else if (other.isNegative()) { - return this.multiply(other.negate()).negate(); - } - - // If both longs are small, use float multiplication - if (this.lessThan(goog.math.Long.TWO_PWR_24_) && - other.lessThan(goog.math.Long.TWO_PWR_24_)) { - return goog.math.Long.fromNumber(this.toNumber() * other.toNumber()); - } - - // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. - // We can skip products that would overflow. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns this Long divided by the given one. - * @param {goog.math.Long} other Long by which to divide. - * @return {!goog.math.Long} This Long divided by the given one. - */ - goog.math.Long.prototype.div = function(other) { - if (other.isZero()) { - throw Error('division by zero'); - } else if (this.isZero()) { - return goog.math.Long.ZERO; - } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - if (other.equals(goog.math.Long.ONE) || - other.equals(goog.math.Long.NEG_ONE)) { - return goog.math.Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ONE; - } else { - // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. - var halfThis = this.shiftRight(1); - var approx = halfThis.div(other).shiftLeft(1); - if (approx.equals(goog.math.Long.ZERO)) { - return other.isNegative() ? goog.math.Long.ONE : goog.math.Long.NEG_ONE; - } else { - var rem = this.subtract(other.multiply(approx)); - var result = approx.add(rem.div(other)); - return result; - } - } - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().div(other.negate()); - } else { - return this.negate().div(other).negate(); - } - } else if (other.isNegative()) { - return this.div(other.negate()).negate(); - } - - // Repeat the following until the remainder is less than other: find a - // floating-point that approximates remainder / other *from below*, add this - // into the result, and subtract it from the remainder. It is critical that - // the approximate value is less than or equal to the real value so that the - // remainder never becomes negative. - var res = goog.math.Long.ZERO; - var rem = this; - while (rem.greaterThanOrEqual(other)) { - // Approximate the result of division. This may be a little greater or - // smaller than the actual value. - var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber())); - - // We will tweak the approximate result by changing it in the 48-th digit or - // the smallest non-fractional digit, whichever is larger. - var log2 = Math.ceil(Math.log(approx) / Math.LN2); - var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48); - - // Decrease the approximation until it is smaller than the remainder. Note - // that if it is too large, the product overflows and is negative. - var approxRes = goog.math.Long.fromNumber(approx); - var approxRem = approxRes.multiply(other); - while (approxRem.isNegative() || approxRem.greaterThan(rem)) { - approx -= delta; - approxRes = goog.math.Long.fromNumber(approx); - approxRem = approxRes.multiply(other); - } - - // We know the answer can't be zero... and actually, zero would cause - // infinite recursion since we would make no progress. - if (approxRes.isZero()) { - approxRes = goog.math.Long.ONE; - } - - res = res.add(approxRes); - rem = rem.subtract(approxRem); - } - return res; - }; - - - /** - * Returns this Long modulo the given one. - * @param {goog.math.Long} other Long by which to mod. - * @return {!goog.math.Long} This Long modulo the given one. - */ - goog.math.Long.prototype.modulo = function(other) { - return this.subtract(this.div(other).multiply(other)); - }; - - - /** @return {!goog.math.Long} The bitwise-NOT of this value. */ - goog.math.Long.prototype.not = function() { - return goog.math.Long.fromBits(~this.low_, ~this.high_); - }; - - - /** - * Returns the bitwise-AND of this Long and the given one. - * @param {goog.math.Long} other The Long with which to AND. - * @return {!goog.math.Long} The bitwise-AND of this and the other. - */ - goog.math.Long.prototype.and = function(other) { - return goog.math.Long.fromBits(this.low_ & other.low_, - this.high_ & other.high_); - }; - - - /** - * Returns the bitwise-OR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to OR. - * @return {!goog.math.Long} The bitwise-OR of this and the other. - */ - goog.math.Long.prototype.or = function(other) { - return goog.math.Long.fromBits(this.low_ | other.low_, - this.high_ | other.high_); - }; - - - /** - * Returns the bitwise-XOR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to XOR. - * @return {!goog.math.Long} The bitwise-XOR of this and the other. - */ - goog.math.Long.prototype.xor = function(other) { - return goog.math.Long.fromBits(this.low_ ^ other.low_, - this.high_ ^ other.high_); - }; - - - /** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the left by the given amount. - */ - goog.math.Long.prototype.shiftLeft = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var low = this.low_; - if (numBits < 32) { - var high = this.high_; - return goog.math.Long.fromBits( - low << numBits, - (high << numBits) | (low >>> (32 - numBits))); - } else { - return goog.math.Long.fromBits(0, low << (numBits - 32)); - } - } - }; - - - /** - * Returns this Long with bits shifted to the right by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount. - */ - goog.math.Long.prototype.shiftRight = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >> numBits); - } else { - return goog.math.Long.fromBits( - high >> (numBits - 32), - high >= 0 ? 0 : -1); - } - } - }; - - - /** - * Returns this Long with bits shifted to the right by the given amount, with - * the new top bits matching the current sign bit. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount, with - * zeros placed into the new leading bits. - */ - goog.math.Long.prototype.shiftRightUnsigned = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >>> numBits); - } else if (numBits == 32) { - return goog.math.Long.fromBits(high, 0); - } else { - return goog.math.Long.fromBits(high >>> (numBits - 32), 0); - } - } - }; - - //======= begin jsbn ======= - - var navigator = { appName: 'Modern Browser' }; // polyfill a little - - // Copyright (c) 2005 Tom Wu - // All Rights Reserved. - // http://www-cs-students.stanford.edu/~tjw/jsbn/ - - /* - * Copyright (c) 2003-2005 Tom Wu - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF - * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * In addition, the following condition applies: - * - * All redistributions must retain an intact copy of this copyright notice - * and disclaimer. - */ - - // Basic JavaScript BN library - subset useful for RSA encryption. - - // Bits per digit - var dbits; - - // JavaScript engine analysis - var canary = 0xdeadbeefcafe; - var j_lm = ((canary&0xffffff)==0xefcafe); - - // (public) Constructor - function BigInteger(a,b,c) { - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); - } - - // return new, unset BigInteger - function nbi() { return new BigInteger(null); } - - // am: Compute w_j += (x*this_i), propagate carries, - // c is initial carry, returns final carry. - // c < 3*dvalue, x < 2*dvalue, this_i < dvalue - // We need to select the fastest one that works in this environment. - - // am1: use a single mult and divide to get the high bits, - // max digit bits should be 26 because - // max internal value = 2*dvalue^2-2*dvalue (< 2^53) - function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this[i++]+w[j]+c; - c = Math.floor(v/0x4000000); - w[j++] = v&0x3ffffff; - } - return c; - } - // am2 avoids a big mult-and-extract completely. - // Max digit bits should be <= 30 because we do bitwise ops - // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this[i]&0x7fff; - var h = this[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w[j++] = l&0x3fffffff; - } - return c; - } - // Alternately, set max digit bits to 28 since some - // browsers slow down when dealing with 32-bit numbers. - function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this[i]&0x3fff; - var h = this[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w[j++] = l&0xfffffff; - } - return c; - } - if(j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; - } - else if(j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; - } - else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; - } - - BigInteger.prototype.DB = dbits; - BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; - } - - // (protected) set from integer value x, -DV <= x < DV - function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+DV; - else this.t = 0; - } - - // return bigint initialized to value - function nbv(i) { var r = nbi(); r.fromInt(i); return r; } - - // (protected) set from string and radix - function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; - } - mi = false; - if(sh == 0) - this[this.t++] = x; - else if(sh+k > this.DB) { - this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); - } - else - this[this.t-1] |= x<= this.DB) sh -= this.DB; - } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; - } - - // (public) return string representation in given radix - function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this[i]&((1<>(p+=this.DB-k); - } - else { - d = (this[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } - } - if(d > 0) m = true; - if(m) r += int2char(d); - } - } - return m?r:"0"; - } - - // (public) -this - function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } - - // (public) |this| - function bnAbs() { return (this.s<0)?this.negate():this; } - - // (public) return + if this > a, - if this < a, 0 if equal - function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; - return 0; - } - - // returns bit length of the integer x - function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; - } - - // (public) return the number of bits in "this" - function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); - } - - // (protected) r = this << n*DB - function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; - for(i = n-1; i >= 0; --i) r[i] = 0; - r.t = this.t+n; - r.s = this.s; - } - - // (protected) r = this >> n*DB - function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r[i-n] = this[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; - } - - // (protected) r = this << n - function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r[i+ds+1] = (this[i]>>cbs)|c; - c = (this[i]&bm)<= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); - } - - // (protected) r = this >> n - function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r[i-ds-1] |= (this[i]&bm)<>bs; - } - if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c -= a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c -= a.s; - } - r.s = (c<0)?-1:0; - if(c < -1) r[i++] = this.DV+c; - else if(c > 0) r[i++] = c; - r.t = i; - r.clamp(); - } - - // (protected) r = this * a, r != this,a (HAC 14.12) - // "this" should be the larger one if appropriate. - function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); - } - - // (protected) r = this^2, r != this (HAC 14.16) - function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x[i],r,2*i,0,1); - if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r[i+x.t] -= x.DV; - r[i+x.t+1] = 1; - } - } - if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); - r.s = 0; - r.clamp(); - } - - // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) - // r != q, this != m. q or r may be null. - function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; - } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } - else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r[r.t++] = 1; - r.subTo(t,r); - } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); - if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r[i] < --qd) r.subTo(t,r); - } - } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); - } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); - } - - // (public) this mod a - function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; - } - - // Modular reduction using "classic" algorithm - function Classic(m) { this.m = m; } - function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; - } - function cRevert(x) { return x; } - function cReduce(x) { x.divRemTo(this.m,null,x); } - function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - Classic.prototype.convert = cConvert; - Classic.prototype.revert = cRevert; - Classic.prototype.reduce = cReduce; - Classic.prototype.mulTo = cMulTo; - Classic.prototype.sqrTo = cSqrTo; - - // (protected) return "-1/this % 2^DB"; useful for Mont. reduction - // justification: - // xy == 1 (mod m) - // xy = 1+km - // xy(2-xy) = (1+km)(1-km) - // x[y(2-xy)] = 1-k^2m^2 - // x[y(2-xy)] == 1 (mod m^2) - // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 - // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. - // JS multiply "overflows" differently from C/C++, so care is needed here. - function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; - } - - // Montgomery reduction - function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; - } - - // xR mod m - function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; - } - - // x/R mod m - function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; - } - - // x = x/R mod m (HAC 14.32) - function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } + $q_sroa_1_1198 = $147; + $q_sroa_0_1199 = $149; + $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc; + $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc; + $sr_1202 = $155; + $carry_0203 = $152; + } } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + $q_sroa_1_1_lcssa = $147; + $q_sroa_0_1_lcssa = $149; + $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc; + $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc; + $carry_0_lcssa$1 = 0; + $carry_0_lcssa$0 = $152; } + $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa; + $q_sroa_0_0_insert_ext75$1 = 0; + $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1; + if (($rem | 0) != 0) { + HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa; + HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0; + } + $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1; + $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0; + return (tempRet0 = $_0$1, $_0$0) | 0; +} +// ======================================================================= - // r = "x^2/R mod m"; x != r - function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = "xy/R mod m"; x,y != r - function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Montgomery.prototype.convert = montConvert; - Montgomery.prototype.revert = montRevert; - Montgomery.prototype.reduce = montReduce; - Montgomery.prototype.mulTo = montMulTo; - Montgomery.prototype.sqrTo = montSqrTo; - // (protected) true iff this is even - function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } - // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } - } - return z.revert(r); - } + +function dynCall_ii(index,a1) { + index = index|0; + a1=a1|0; + return FUNCTION_TABLE_ii[index&1](a1|0)|0; +} - // (public) this^e % m, 0 <= e < 2^32 - function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); - } - - // protected - BigInteger.prototype.copyTo = bnpCopyTo; - BigInteger.prototype.fromInt = bnpFromInt; - BigInteger.prototype.fromString = bnpFromString; - BigInteger.prototype.clamp = bnpClamp; - BigInteger.prototype.dlShiftTo = bnpDLShiftTo; - BigInteger.prototype.drShiftTo = bnpDRShiftTo; - BigInteger.prototype.lShiftTo = bnpLShiftTo; - BigInteger.prototype.rShiftTo = bnpRShiftTo; - BigInteger.prototype.subTo = bnpSubTo; - BigInteger.prototype.multiplyTo = bnpMultiplyTo; - BigInteger.prototype.squareTo = bnpSquareTo; - BigInteger.prototype.divRemTo = bnpDivRemTo; - BigInteger.prototype.invDigit = bnpInvDigit; - BigInteger.prototype.isEven = bnpIsEven; - BigInteger.prototype.exp = bnpExp; - - // public - BigInteger.prototype.toString = bnToString; - BigInteger.prototype.negate = bnNegate; - BigInteger.prototype.abs = bnAbs; - BigInteger.prototype.compareTo = bnCompareTo; - BigInteger.prototype.bitLength = bnBitLength; - BigInteger.prototype.mod = bnMod; - BigInteger.prototype.modPowInt = bnModPowInt; - - // "constants" - BigInteger.ZERO = nbv(0); - BigInteger.ONE = nbv(1); - - // jsbn2 stuff - - // (protected) convert from radix string - function bnpFromRadix(s,b) { - this.fromInt(0); - if(b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b,cs), mi = false, j = 0, w = 0; - for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } - } - if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); - } - if(mi) BigInteger.ZERO.subTo(this,this); - } - // (protected) return x s.t. r^x < DV - function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } +function dynCall_iiii(index,a1,a2,a3) { + index = index|0; + a1=a1|0; a2=a2|0; a3=a3|0; + return FUNCTION_TABLE_iiii[index&3](a1|0,a2|0,a3|0)|0; +} - // (public) 0 if this == 0, 1 if this > 0 - function bnSigNum() { - if(this.s < 0) return -1; - else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; - } - // (protected) this *= n, this >= 0, 1 < n < DV - function bnpDMultiply(n) { - this[this.t] = this.am(0,n-1,this,0,0,this.t); - ++this.t; - this.clamp(); - } +function dynCall_vi(index,a1) { + index = index|0; + a1=a1|0; + FUNCTION_TABLE_vi[index&1](a1|0); +} - // (protected) this += n << w words, this >= 0 - function bnpDAddOffset(n,w) { - if(n == 0) return; - while(this.t <= w) this[this.t++] = 0; - this[w] += n; - while(this[w] >= this.DV) { - this[w] -= this.DV; - if(++w >= this.t) this[this.t++] = 0; - ++this[w]; - } - } +function b0(p0) { + p0 = p0|0; abort(0);return 0; +} +function b1(p0,p1,p2) { + p0 = p0|0;p1 = p1|0;p2 = p2|0; abort(1);return 0; +} +function b2(p0) { + p0 = p0|0; abort(2); +} - // (protected) convert to radix string - function bnpToRadix(b) { - if(b == null) b = 10; - if(this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b,cs); - var d = nbv(a), y = nbi(), z = nbi(), r = ""; - this.divRemTo(d,y,z); - while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); - } - return z.intValue().toString(b) + r; - } +// EMSCRIPTEN_END_FUNCS +var FUNCTION_TABLE_ii = [b0,___stdio_close]; +var FUNCTION_TABLE_iiii = [b1,___stdout_write,___stdio_seek,___stdio_write]; +var FUNCTION_TABLE_vi = [b2,_cleanup392]; - // (public) return value as integer - function bnIntValue() { - if(this.s < 0) { - if(this.t == 1) return this[0]-this.DV; - else if(this.t == 0) return -1; - } - else if(this.t == 1) return this[0]; - else if(this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1]&((1<<(32-this.DB))-1))<>= this.DB; - } - if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c += a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c<0)?-1:0; - if(c > 0) r[i++] = c; - else if(c < -1) r[i++] = this.DV+c; - r.t = i; - r.clamp(); - } - - BigInteger.prototype.fromRadix = bnpFromRadix; - BigInteger.prototype.chunkSize = bnpChunkSize; - BigInteger.prototype.signum = bnSigNum; - BigInteger.prototype.dMultiply = bnpDMultiply; - BigInteger.prototype.dAddOffset = bnpDAddOffset; - BigInteger.prototype.toRadix = bnpToRadix; - BigInteger.prototype.intValue = bnIntValue; - BigInteger.prototype.addTo = bnpAddTo; - - //======= end jsbn ======= - - // Emscripten wrapper - var Wrapper = { - abs: function(l, h) { - var x = new goog.math.Long(l, h); - var ret; - if (x.isNegative()) { - ret = x.negate(); - } else { - ret = x; - } - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - }, - ensureTemps: function() { - if (Wrapper.ensuredTemps) return; - Wrapper.ensuredTemps = true; - Wrapper.two32 = new BigInteger(); - Wrapper.two32.fromString('4294967296', 10); - Wrapper.two64 = new BigInteger(); - Wrapper.two64.fromString('18446744073709551616', 10); - Wrapper.temp1 = new BigInteger(); - Wrapper.temp2 = new BigInteger(); - }, - lh2bignum: function(l, h) { - var a = new BigInteger(); - a.fromString(h.toString(), 10); - var b = new BigInteger(); - a.multiplyTo(Wrapper.two32, b); - var c = new BigInteger(); - c.fromString(l.toString(), 10); - var d = new BigInteger(); - c.addTo(b, d); - return d; - }, - stringify: function(l, h, unsigned) { - var ret = new goog.math.Long(l, h).toString(); - if (unsigned && ret[0] == '-') { - // unsign slowly using jsbn bignums - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(ret, 10); - ret = new BigInteger(); - Wrapper.two64.addTo(bignum, ret); - ret = ret.toString(10); - } - return ret; - }, - fromString: function(str, base, min, max, unsigned) { - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(str, base); - var bigmin = new BigInteger(); - bigmin.fromString(min, 10); - var bigmax = new BigInteger(); - bigmax.fromString(max, 10); - if (unsigned && bignum.compareTo(BigInteger.ZERO) < 0) { - var temp = new BigInteger(); - bignum.addTo(Wrapper.two64, temp); - bignum = temp; - } - var error = false; - if (bignum.compareTo(bigmin) < 0) { - bignum = bigmin; - error = true; - } else if (bignum.compareTo(bigmax) > 0) { - bignum = bigmax; - error = true; - } - var ret = goog.math.Long.fromString(bignum.toString()); // min-max checks should have clamped this to a range goog.math.Long can handle well - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - if (error) throw 'range error'; - } - }; - return Wrapper; -})(); +Runtime.stackAlloc = asm['stackAlloc']; +Runtime.stackSave = asm['stackSave']; +Runtime.stackRestore = asm['stackRestore']; +Runtime.establishStackSpace = asm['establishStackSpace']; -//======= end closure i64 code ======= +Runtime.setTempRet0 = asm['setTempRet0']; +Runtime.getTempRet0 = asm['getTempRet0']; // === Auto-generated postamble setup entry stuff === -if (memoryInitializer) { - if (typeof Module['locateFile'] === 'function') { - memoryInitializer = Module['locateFile'](memoryInitializer); - } else if (Module['memoryInitializerPrefixURL']) { - memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; - } - if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { - var data = Module['readBinary'](memoryInitializer); - HEAPU8.set(data, STATIC_BASE); - } else { - addRunDependency('memory initializer'); - Browser.asyncLoad(memoryInitializer, function(data) { - HEAPU8.set(data, STATIC_BASE); - removeRunDependency('memory initializer'); - }, function(data) { - throw 'could not load memory initializer ' + memoryInitializer; - }); - } -} function ExitStatus(status) { this.name = "ExitStatus"; @@ -24946,7 +24452,7 @@ var calledMain = false; dependenciesFulfilled = function runCaller() { // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) - if (!Module['calledRun'] && shouldRunNow) run(); + if (!Module['calledRun']) run(); if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled } @@ -24973,7 +24479,6 @@ Module['callMain'] = Module.callMain = function callMain(args) { argv.push(0); argv = allocate(argv, 'i32', ALLOC_NORMAL); - initialStackTop = STACKTOP; try { @@ -24981,7 +24486,7 @@ Module['callMain'] = Module.callMain = function callMain(args) { // if we're not running an evented main loop, it's time to exit - exit(ret); + exit(ret, /* implicit = */ true); } catch(e) { if (e instanceof ExitStatus) { @@ -25028,9 +24533,6 @@ function run(args) { preMain(); - if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) { - Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms'); - } if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); @@ -25053,17 +24555,22 @@ function run(args) { } Module['run'] = Module.run = run; -function exit(status) { - if (Module['noExitRuntime']) { +function exit(status, implicit) { + if (implicit && Module['noExitRuntime']) { return; } - ABORT = true; - EXITSTATUS = status; - STACKTOP = initialStackTop; + if (Module['noExitRuntime']) { + } else { - // exit the runtime - exitRuntime(); + ABORT = true; + EXITSTATUS = status; + STACKTOP = initialStackTop; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } if (ENVIRONMENT_IS_NODE) { // Work around a node.js bug where stdout buffer is not flushed at process exit: @@ -25088,10 +24595,15 @@ function exit(status) { } Module['exit'] = Module.exit = exit; -function abort(text) { - if (text) { - Module.print(text); - Module.printErr(text); +var abortDecorators = []; + +function abort(what) { + if (what !== undefined) { + Module.print(what); + Module.printErr(what); + what = JSON.stringify(what) + } else { + what = ''; } ABORT = true; @@ -25099,7 +24611,13 @@ function abort(text) { var extra = '\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.'; - throw 'abort() at ' + stackTrace() + extra; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; } Module['abort'] = Module.abort = abort; @@ -25132,10684 +24650,36914 @@ run(); - -/* vim: ts=4:sw=4:expandtab */ -var Internal = Internal || {}; - -(function() { - 'use strict'; - - // Insert some bytes into the emscripten memory and return a pointer - function _allocate(bytes) { - var address = Module._malloc(bytes.length); - Module.HEAPU8.set(bytes, address); - - return address; - } - - function _readBytes(address, length, array) { - array.set(Module.HEAPU8.subarray(address, address + length)); - } - - var basepoint = new Uint8Array(32); - basepoint[0] = 9; - - Internal.curve25519 = { - keyPair: function(privKey) { - var priv = new Uint8Array(privKey); - priv[0] &= 248; - priv[31] &= 127; - priv[31] |= 64; - - // Where to store the result - var publicKey_ptr = Module._malloc(32); - - // Get a pointer to the private key - var privateKey_ptr = _allocate(priv); - - // The basepoint for generating public keys - var basepoint_ptr = _allocate(basepoint); - - // The return value is just 0, the operation is done in place - var err = Module._curve25519_donna(publicKey_ptr, - privateKey_ptr, - basepoint_ptr); - - var res = new Uint8Array(32); - _readBytes(publicKey_ptr, 32, res); - - Module._free(publicKey_ptr); - Module._free(privateKey_ptr); - Module._free(basepoint_ptr); - - return { pubKey: res.buffer, privKey: priv.buffer }; - }, - sharedSecret: function(pubKey, privKey) { - // Where to store the result - var sharedKey_ptr = Module._malloc(32); - - // Get a pointer to our private key - var privateKey_ptr = _allocate(new Uint8Array(privKey)); - - // Get a pointer to their public key, the basepoint when you're - // generating a shared secret - var basepoint_ptr = _allocate(new Uint8Array(pubKey)); - - // Return value is 0 here too of course - var err = Module._curve25519_donna(sharedKey_ptr, - privateKey_ptr, - basepoint_ptr); - - var res = new Uint8Array(32); - _readBytes(sharedKey_ptr, 32, res); - - Module._free(sharedKey_ptr); - Module._free(privateKey_ptr); - Module._free(basepoint_ptr); - - return res.buffer; - }, - sign: function(privKey, message) { - // Where to store the result - var signature_ptr = Module._malloc(64); - - // Get a pointer to our private key - var privateKey_ptr = _allocate(new Uint8Array(privKey)); - - // Get a pointer to the message - var message_ptr = _allocate(new Uint8Array(message)); - - var err = Module._curve25519_sign(signature_ptr, - privateKey_ptr, - message_ptr, - message.byteLength); - - var res = new Uint8Array(64); - _readBytes(signature_ptr, 64, res); - - Module._free(signature_ptr); - Module._free(privateKey_ptr); - Module._free(message_ptr); - - return res.buffer; - }, - verify: function(pubKey, message, sig) { - // Get a pointer to their public key - var publicKey_ptr = _allocate(new Uint8Array(pubKey)); - - // Get a pointer to the signature - var signature_ptr = _allocate(new Uint8Array(sig)); - - // Get a pointer to the message - var message_ptr = _allocate(new Uint8Array(message)); - - var res = Module._curve25519_verify(signature_ptr, - publicKey_ptr, - message_ptr, - message.byteLength); - - Module._free(publicKey_ptr); - Module._free(signature_ptr); - Module._free(message_ptr); - - return res !== 0; - } - }; - - Internal.curve25519_async = { - keyPair: function(privKey) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.keyPair(privKey)); - }); - }, - sharedSecret: function(pubKey, privKey) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.sharedSecret(pubKey, privKey)); - }); - }, - sign: function(privKey, message) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.sign(privKey, message)); - }); - }, - verify: function(pubKey, message, sig) { - return new Promise(function(resolve, reject) { - if (Internal.curve25519.verify(pubKey, message, sig)) { - reject(new Error("Invalid signature")); - } else { - resolve(); - } - }); - }, - }; - -})(); - -;(function() { - -'use strict'; - -// I am the...workee? -var origCurve25519 = Internal.curve25519_async; - -Internal.startWorker = function(url) { - Internal.stopWorker(); // there can be only one - Internal.curve25519_async = new Curve25519Worker(url); -}; - -Internal.stopWorker = function() { - if (Internal.curve25519_async instanceof Curve25519Worker) { - var worker = Internal.curve25519_async.worker; - Internal.curve25519_async = origCurve25519; - worker.terminate(); - } -}; - -libsignal.worker = { - startWorker: Internal.startWorker, - stopWorker: Internal.stopWorker, -}; - -function Curve25519Worker(url) { - this.jobs = {}; - this.jobId = 0; - this.worker = new Worker(url); - this.worker.onmessage = function(e) { - var job = this.jobs[e.data.id]; - if (e.data.error && typeof job.onerror === 'function') { - job.onerror(new Error(e.data.error)); - } else if (typeof job.onsuccess === 'function') { - job.onsuccess(e.data.result); - } - delete this.jobs[e.data.id]; - }.bind(this); -} - -Curve25519Worker.prototype = { - constructor: Curve25519Worker, - postMessage: function(methodName, args, onsuccess, onerror) { - return new Promise(function(resolve, reject) { - this.jobs[this.jobId] = { onsuccess: resolve, onerror: reject }; - this.worker.postMessage({ id: this.jobId, methodName: methodName, args: args }); - this.jobId++; - }.bind(this)); - }, - keyPair: function(privKey) { - return this.postMessage('keyPair', [privKey]); - }, - sharedSecret: function(pubKey, privKey) { - return this.postMessage('sharedSecret', [pubKey, privKey]); - }, - sign: function(privKey, message) { - return this.postMessage('sign', [privKey, message]); - }, - verify: function(pubKey, message, sig) { - return this.postMessage('verify', [pubKey, message, sig]); - } -}; - -})(); +module.exports = Module; +Module.inspect = function() { return '[Module]'; }; +}).call(this,require('_process'),require("buffer").Buffer,"/build") +},{"_process":111,"buffer":49,"crypto":59,"fs":46,"path":107}],2:[function(require,module,exports){ +(function (process){ +/* + Copyright 2013 Daniel Wirtz + Copyright 2009 The Closure Library Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS-IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +/** + * @license long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/long.js for details + */ +(function(global, factory) { + + /* AMD */ if (typeof define === 'function' && define["amd"]) + define([], factory); + /* CommonJS */ else if (typeof require === 'function' && typeof module === "object" && module && module["exports"]) + module["exports"] = factory(); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["Long"] = factory(); + +})(this, function() { + "use strict"; + + /** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @constructor + */ + function Long(low, high, unsigned) { + + /** + * The low 32 bits as a signed value. + * @type {number} + */ + this.low = low | 0; + + /** + * The high 32 bits as a signed value. + * @type {number} + */ + this.high = high | 0; + + /** + * Whether unsigned or not. + * @type {boolean} + */ + this.unsigned = !!unsigned; + } + + // The internal representation of a long is the two given signed, 32-bit values. + // We use 32-bit pieces because these are the size of integers on which + // Javascript performs bit-operations. For operations like addition and + // multiplication, we split each number into 16 bit pieces, which can easily be + // multiplied within Javascript's floating-point representation without overflow + // or change in sign. + // + // In the algorithms below, we frequently reduce the negative case to the + // positive case by negating the input(s) and then post-processing the result. + // Note that we must ALWAYS check specially whether those values are MIN_VALUE + // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as + // a positive number, it overflows back into a negative). Not handling this + // case would often result in infinite recursion. + // + // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* + // methods on which they depend. + + /** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private + */ + Long.prototype.__isLong__; + + Object.defineProperty(Long.prototype, "__isLong__", { + value: true, + enumerable: false, + configurable: false + }); + + /** + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner + */ + function isLong(obj) { + return (obj && obj["__isLong__"]) === true; + } + + /** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} + */ + Long.isLong = isLong; + + /** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner + */ + var INT_CACHE = {}; + + /** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner + */ + var UINT_CACHE = {}; + + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromInt(value, unsigned) { + var obj, cachedObj, cache; + if (unsigned) { + value >>>= 0; + if (cache = (0 <= value && value < 256)) { + cachedObj = UINT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true); + if (cache) + UINT_CACHE[value] = obj; + return obj; + } else { + value |= 0; + if (cache = (-128 <= value && value < 128)) { + cachedObj = INT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, value < 0 ? -1 : 0, false); + if (cache) + INT_CACHE[value] = obj; + return obj; + } + } + + /** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromInt = fromInt; + + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromNumber(value, unsigned) { + if (isNaN(value) || !isFinite(value)) + return unsigned ? UZERO : ZERO; + if (unsigned) { + if (value < 0) + return UZERO; + if (value >= TWO_PWR_64_DBL) + return MAX_UNSIGNED_VALUE; + } else { + if (value <= -TWO_PWR_63_DBL) + return MIN_VALUE; + if (value + 1 >= TWO_PWR_63_DBL) + return MAX_VALUE; + } + if (value < 0) + return fromNumber(-value, unsigned).neg(); + return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned); + } + + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromNumber = fromNumber; + + /** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromBits(lowBits, highBits, unsigned) { + return new Long(lowBits, highBits, unsigned); + } + + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromBits = fromBits; + + /** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner + */ + var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) + + /** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner + */ + function fromString(str, unsigned, radix) { + if (str.length === 0) + throw Error('empty string'); + if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") + return ZERO; + if (typeof unsigned === 'number') { + // For goog.math.long compatibility + radix = unsigned, + unsigned = false; + } else { + unsigned = !! unsigned; + } + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + + var p; + if ((p = str.indexOf('-')) > 0) + throw Error('interior hyphen'); + else if (p === 0) { + return fromString(str.substring(1), unsigned, radix).neg(); + } + + // Do several (8) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 8)); + + var result = ZERO; + for (var i = 0; i < str.length; i += 8) { + var size = Math.min(8, str.length - i), + value = parseInt(str.substring(i, i + size), radix); + if (size < 8) { + var power = fromNumber(pow_dbl(radix, size)); + result = result.mul(power).add(fromNumber(value)); + } else { + result = result.mul(radixToPower); + result = result.add(fromNumber(value)); + } + } + result.unsigned = unsigned; + return result; + } + + /** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value + */ + Long.fromString = fromString; + + /** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @returns {!Long} + * @inner + */ + function fromValue(val) { + if (val /* is compatible */ instanceof Long) + return val; + if (typeof val === 'number') + return fromNumber(val); + if (typeof val === 'string') + return fromString(val); + // Throws for non-objects, converts non-instanceof Long: + return fromBits(val.low, val.high, val.unsigned); + } + + /** + * Converts the specified value to a Long. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @returns {!Long} + */ + Long.fromValue = fromValue; + + // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be + // no runtime penalty for these. + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_16_DBL = 1 << 16; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_24_DBL = 1 << 24; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; + + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; + + /** + * @type {!Long} + * @const + * @inner + */ + var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); + + /** + * @type {!Long} + * @inner + */ + var ZERO = fromInt(0); + + /** + * Signed zero. + * @type {!Long} + */ + Long.ZERO = ZERO; + + /** + * @type {!Long} + * @inner + */ + var UZERO = fromInt(0, true); + + /** + * Unsigned zero. + * @type {!Long} + */ + Long.UZERO = UZERO; + + /** + * @type {!Long} + * @inner + */ + var ONE = fromInt(1); + + /** + * Signed one. + * @type {!Long} + */ + Long.ONE = ONE; + + /** + * @type {!Long} + * @inner + */ + var UONE = fromInt(1, true); + + /** + * Unsigned one. + * @type {!Long} + */ + Long.UONE = UONE; + + /** + * @type {!Long} + * @inner + */ + var NEG_ONE = fromInt(-1); + + /** + * Signed negative one. + * @type {!Long} + */ + Long.NEG_ONE = NEG_ONE; + + /** + * @type {!Long} + * @inner + */ + var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false); + + /** + * Maximum signed value. + * @type {!Long} + */ + Long.MAX_VALUE = MAX_VALUE; + + /** + * @type {!Long} + * @inner + */ + var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true); + + /** + * Maximum unsigned value. + * @type {!Long} + */ + Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; + + /** + * @type {!Long} + * @inner + */ + var MIN_VALUE = fromBits(0, 0x80000000|0, false); + + /** + * Minimum signed value. + * @type {!Long} + */ + Long.MIN_VALUE = MIN_VALUE; + + /** + * @alias Long.prototype + * @inner + */ + var LongPrototype = Long.prototype; + + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} + */ + LongPrototype.toInt = function toInt() { + return this.unsigned ? this.low >>> 0 : this.low; + }; + + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} + */ + LongPrototype.toNumber = function toNumber() { + if (this.unsigned) + return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0); + return this.high * TWO_PWR_32_DBL + (this.low >>> 0); + }; + + /** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range + */ + LongPrototype.toString = function toString(radix) { + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + if (this.isZero()) + return '0'; + if (this.isNegative()) { // Unsigned Longs are never negative + if (this.eq(MIN_VALUE)) { + // We need to change the Long value before it can be negated, so we remove + // the bottom-most digit in this base and then recurse to do the rest. + var radixLong = fromNumber(radix), + div = this.div(radixLong), + rem1 = div.mul(radixLong).sub(this); + return div.toString(radix) + rem1.toInt().toString(radix); + } else + return '-' + this.neg().toString(radix); + } + + // Do several (6) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), + rem = this; + var result = ''; + while (true) { + var remDiv = rem.div(radixToPower), + intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, + digits = intval.toString(radix); + rem = remDiv; + if (rem.isZero()) + return digits + result; + else { + while (digits.length < 6) + digits = '0' + digits; + result = '' + digits + result; + } + } + }; + + /** + * Gets the high 32 bits as a signed integer. + * @returns {number} Signed high bits + */ + LongPrototype.getHighBits = function getHighBits() { + return this.high; + }; + + /** + * Gets the high 32 bits as an unsigned integer. + * @returns {number} Unsigned high bits + */ + LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { + return this.high >>> 0; + }; + + /** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits + */ + LongPrototype.getLowBits = function getLowBits() { + return this.low; + }; + + /** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits + */ + LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { + return this.low >>> 0; + }; + + /** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} + */ + LongPrototype.getNumBitsAbs = function getNumBitsAbs() { + if (this.isNegative()) // Unsigned Longs are never negative + return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) + if ((val & (1 << bit)) != 0) + break; + return this.high != 0 ? bit + 33 : bit + 1; + }; + + /** + * Tests if this Long's value equals zero. + * @returns {boolean} + */ + LongPrototype.isZero = function isZero() { + return this.high === 0 && this.low === 0; + }; + + /** + * Tests if this Long's value is negative. + * @returns {boolean} + */ + LongPrototype.isNegative = function isNegative() { + return !this.unsigned && this.high < 0; + }; + + /** + * Tests if this Long's value is positive. + * @returns {boolean} + */ + LongPrototype.isPositive = function isPositive() { + return this.unsigned || this.high >= 0; + }; + + /** + * Tests if this Long's value is odd. + * @returns {boolean} + */ + LongPrototype.isOdd = function isOdd() { + return (this.low & 1) === 1; + }; + + /** + * Tests if this Long's value is even. + * @returns {boolean} + */ + LongPrototype.isEven = function isEven() { + return (this.low & 1) === 0; + }; + + /** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.equals = function equals(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1) + return false; + return this.high === other.high && this.low === other.low; + }; + + /** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.eq = LongPrototype.equals; + + /** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.notEquals = function notEquals(other) { + return !this.eq(/* validates */ other); + }; + + /** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.neq = LongPrototype.notEquals; + + /** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThan = function lessThan(other) { + return this.comp(/* validates */ other) < 0; + }; + + /** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lt = LongPrototype.lessThan; + + /** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { + return this.comp(/* validates */ other) <= 0; + }; + + /** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lte = LongPrototype.lessThanOrEqual; + + /** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThan = function greaterThan(other) { + return this.comp(/* validates */ other) > 0; + }; + + /** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gt = LongPrototype.greaterThan; + + /** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { + return this.comp(/* validates */ other) >= 0; + }; + + /** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gte = LongPrototype.greaterThanOrEqual; + + /** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ + LongPrototype.compare = function compare(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.eq(other)) + return 0; + var thisNeg = this.isNegative(), + otherNeg = other.isNegative(); + if (thisNeg && !otherNeg) + return -1; + if (!thisNeg && otherNeg) + return 1; + // At this point the sign bits are the same + if (!this.unsigned) + return this.sub(other).isNegative() ? -1 : 1; + // Both are positive if at least one is unsigned + return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1; + }; + + /** + * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. + * @function + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ + LongPrototype.comp = LongPrototype.compare; + + /** + * Negates this Long's value. + * @returns {!Long} Negated Long + */ + LongPrototype.negate = function negate() { + if (!this.unsigned && this.eq(MIN_VALUE)) + return MIN_VALUE; + return this.not().add(ONE); + }; + + /** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long + */ + LongPrototype.neg = LongPrototype.negate; + + /** + * Returns the sum of this and the specified Long. + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum + */ + LongPrototype.add = function add(addend) { + if (!isLong(addend)) + addend = fromValue(addend); + + // Divide each number into 4 chunks of 16 bits, and then sum the chunks. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = addend.high >>> 16; + var b32 = addend.high & 0xFFFF; + var b16 = addend.low >>> 16; + var b00 = addend.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 + b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 + b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 + b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 + b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; + + /** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ + LongPrototype.subtract = function subtract(subtrahend) { + if (!isLong(subtrahend)) + subtrahend = fromValue(subtrahend); + return this.add(subtrahend.neg()); + }; + + /** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ + LongPrototype.sub = LongPrototype.subtract; + + /** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.multiply = function multiply(multiplier) { + if (this.isZero()) + return ZERO; + if (!isLong(multiplier)) + multiplier = fromValue(multiplier); + if (multiplier.isZero()) + return ZERO; + if (this.eq(MIN_VALUE)) + return multiplier.isOdd() ? MIN_VALUE : ZERO; + if (multiplier.eq(MIN_VALUE)) + return this.isOdd() ? MIN_VALUE : ZERO; + + if (this.isNegative()) { + if (multiplier.isNegative()) + return this.neg().mul(multiplier.neg()); + else + return this.neg().mul(multiplier).neg(); + } else if (multiplier.isNegative()) + return this.mul(multiplier.neg()).neg(); + + // If both longs are small, use float multiplication + if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24)) + return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned); + + // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. + // We can skip products that would overflow. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = multiplier.high >>> 16; + var b32 = multiplier.high & 0xFFFF; + var b16 = multiplier.low >>> 16; + var b00 = multiplier.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 * b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 * b00; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c16 += a00 * b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 * b00; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a16 * b16; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a00 * b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; + + /** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.mul = LongPrototype.multiply; + + /** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.divide = function divide(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + if (divisor.isZero()) + throw Error('division by zero'); + if (this.isZero()) + return this.unsigned ? UZERO : ZERO; + var approx, rem, res; + if (!this.unsigned) { + // This section is only relevant for signed longs and is derived from the + // closure library as a whole. + if (this.eq(MIN_VALUE)) { + if (divisor.eq(ONE) || divisor.eq(NEG_ONE)) + return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE + else if (divisor.eq(MIN_VALUE)) + return ONE; + else { + // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. + var halfThis = this.shr(1); + approx = halfThis.div(divisor).shl(1); + if (approx.eq(ZERO)) { + return divisor.isNegative() ? ONE : NEG_ONE; + } else { + rem = this.sub(divisor.mul(approx)); + res = approx.add(rem.div(divisor)); + return res; + } + } + } else if (divisor.eq(MIN_VALUE)) + return this.unsigned ? UZERO : ZERO; + if (this.isNegative()) { + if (divisor.isNegative()) + return this.neg().div(divisor.neg()); + return this.neg().div(divisor).neg(); + } else if (divisor.isNegative()) + return this.div(divisor.neg()).neg(); + res = ZERO; + } else { + // The algorithm below has not been made for unsigned longs. It's therefore + // required to take special care of the MSB prior to running it. + if (!divisor.unsigned) + divisor = divisor.toUnsigned(); + if (divisor.gt(this)) + return UZERO; + if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true + return UONE; + res = UZERO; + } + + // Repeat the following until the remainder is less than other: find a + // floating-point that approximates remainder / other *from below*, add this + // into the result, and subtract it from the remainder. It is critical that + // the approximate value is less than or equal to the real value so that the + // remainder never becomes negative. + rem = this; + while (rem.gte(divisor)) { + // Approximate the result of division. This may be a little greater or + // smaller than the actual value. + approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber())); + + // We will tweak the approximate result by changing it in the 48-th digit or + // the smallest non-fractional digit, whichever is larger. + var log2 = Math.ceil(Math.log(approx) / Math.LN2), + delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48), + + // Decrease the approximation until it is smaller than the remainder. Note + // that if it is too large, the product overflows and is negative. + approxRes = fromNumber(approx), + approxRem = approxRes.mul(divisor); + while (approxRem.isNegative() || approxRem.gt(rem)) { + approx -= delta; + approxRes = fromNumber(approx, this.unsigned); + approxRem = approxRes.mul(divisor); + } + + // We know the answer can't be zero... and actually, zero would cause + // infinite recursion since we would make no progress. + if (approxRes.isZero()) + approxRes = ONE; + + res = res.add(approxRes); + rem = rem.sub(approxRem); + } + return res; + }; + + /** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.div = LongPrototype.divide; + + /** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.modulo = function modulo(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + return this.sub(this.div(divisor).mul(divisor)); + }; + + /** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.mod = LongPrototype.modulo; + + /** + * Returns the bitwise NOT of this Long. + * @returns {!Long} + */ + LongPrototype.not = function not() { + return fromBits(~this.low, ~this.high, this.unsigned); + }; + + /** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.and = function and(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low & other.low, this.high & other.high, this.unsigned); + }; + + /** + * Returns the bitwise OR of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.or = function or(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low | other.low, this.high | other.high, this.unsigned); + }; + + /** + * Returns the bitwise XOR of this Long and the given one. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.xor = function xor(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); + }; + + /** + * Returns this Long with bits shifted to the left by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftLeft = function shiftLeft(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned); + else + return fromBits(0, this.low << (numBits - 32), this.unsigned); + }; + + /** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shl = LongPrototype.shiftLeft; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftRight = function shiftRight(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned); + else + return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned); + }; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shr = LongPrototype.shiftRight; + + /** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + numBits &= 63; + if (numBits === 0) + return this; + else { + var high = this.high; + if (numBits < 32) { + var low = this.low; + return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned); + } else if (numBits === 32) + return fromBits(high, 0, this.unsigned); + else + return fromBits(high >>> (numBits - 32), 0, this.unsigned); + } + }; + + /** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shru = LongPrototype.shiftRightUnsigned; + + /** + * Converts this Long to signed. + * @returns {!Long} Signed long + */ + LongPrototype.toSigned = function toSigned() { + if (!this.unsigned) + return this; + return fromBits(this.low, this.high, false); + }; + + /** + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long + */ + LongPrototype.toUnsigned = function toUnsigned() { + if (this.unsigned) + return this; + return fromBits(this.low, this.high, true); + }; + + /** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation + */ + LongPrototype.toBytes = function(le) { + return le ? this.toBytesLE() : this.toBytesBE(); + } + + /** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation + */ + LongPrototype.toBytesLE = function() { + var hi = this.high, + lo = this.low; + return [ + lo & 0xff, + (lo >>> 8) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 24) & 0xff, + hi & 0xff, + (hi >>> 8) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 24) & 0xff + ]; + } + + /** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation + */ + LongPrototype.toBytesBE = function() { + var hi = this.high, + lo = this.low; + return [ + (hi >>> 24) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 8) & 0xff, + hi & 0xff, + (lo >>> 24) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 8) & 0xff, + lo & 0xff + ]; + } + + return Long; +}); /* - Copyright 2013 Daniel Wirtz - Copyright 2009 The Closure Library Authors. All Rights Reserved. + Copyright 2013-2014 Daniel Wirtz + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +/** + * @license ByteBuffer.js (c) 2013-2014 Daniel Wirtz + * This version of ByteBuffer.js uses an ArrayBuffer as its backing buffer which is accessed through a DataView and is + * compatible with modern browsers. + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/ByteBuffer.js for details + */ // +(function(global) { + "use strict"; + + /** + * @param {function(new: Long, number, number, boolean=)=} Long + * @returns {function(new: ByteBuffer, number=, boolean=, boolean=)}} + * @inner + */ + function loadByteBuffer(Long) { + + /** + * Constructs a new ByteBuffer. + * @class The swiss army knife for binary data in JavaScript. + * @exports ByteBuffer + * @constructor + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @expose + */ + var ByteBuffer = function(capacity, littleEndian, noAssert) { + if (typeof capacity === 'undefined') capacity = ByteBuffer.DEFAULT_CAPACITY; + if (typeof littleEndian === 'undefined') littleEndian = ByteBuffer.DEFAULT_ENDIAN; + if (typeof noAssert === 'undefined') noAssert = ByteBuffer.DEFAULT_NOASSERT; + if (!noAssert) { + capacity = capacity | 0; + if (capacity < 0) + throw RangeError("Illegal capacity"); + littleEndian = !!littleEndian; + noAssert = !!noAssert; + } + + /** + * Backing buffer. + * @type {!ArrayBuffer} + * @expose + */ + this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity); + + /** + * Data view to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. + * @type {?DataView} + * @expose + */ + this.view = capacity === 0 ? null : new DataView(this.buffer); + + /** + * Absolute read/write offset. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear + */ + this.offset = 0; + + /** + * Marked offset. + * @type {number} + * @expose + * @see ByteBuffer#mark + * @see ByteBuffer#reset + */ + this.markedOffset = -1; + + /** + * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear + */ + this.limit = capacity; + + /** + * Whether to use little endian byte order, defaults to `false` for big endian. + * @type {boolean} + * @expose + */ + this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : false; + + /** + * Whether to skip assertions of offsets and values, defaults to `false`. + * @type {boolean} + * @expose + */ + this.noAssert = !!noAssert; + }; + + /** + * ByteBuffer version. + * @type {string} + * @const + * @expose + */ + ByteBuffer.VERSION = "3.5.5"; + + /** + * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.LITTLE_ENDIAN = true; + + /** + * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.BIG_ENDIAN = false; + + /** + * Default initial capacity of `16`. + * @type {number} + * @expose + */ + ByteBuffer.DEFAULT_CAPACITY = 16; + + /** + * Default endianess of `false` for big endian. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN; + + /** + * Default no assertions flag of `false`. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_NOASSERT = false; + + /** + * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded + * and int64 support is not available. + * @type {?Long} + * @const + * @see https://github.com/dcodeIO/Long.js + * @expose + */ + ByteBuffer.Long = Long || null; + + /** + * @alias ByteBuffer.prototype + * @inner + */ + var ByteBufferPrototype = ByteBuffer.prototype; + + // helpers + + /** + * @type {!ArrayBuffer} + * @inner + */ + var EMPTY_BUFFER = new ArrayBuffer(0); + + /** + * String.fromCharCode reference for compile-time renaming. + * @type {function(...number):string} + * @inner + */ + var stringFromCharCode = String.fromCharCode; + + /** + * Creates a source function for a string. + * @param {string} s String to read from + * @returns {function():number|null} Source function returning the next char code respectively `null` if there are + * no more characters left. + * @throws {TypeError} If the argument is invalid + * @inner + */ + function stringSource(s) { + var i=0; return function() { + return i < s.length ? s.charCodeAt(i++) : null; + }; + } + + /** + * Creates a destination function for a string. + * @returns {function(number=):undefined|string} Destination function successively called with the next char code. + * Returns the final string when called without arguments. + * @inner + */ + function stringDestination() { + var cs = [], ps = []; return function() { + if (arguments.length === 0) + return ps.join('')+stringFromCharCode.apply(String, cs); + if (cs.length + arguments.length > 1024) + ps.push(stringFromCharCode.apply(String, cs)), + cs.length = 0; + Array.prototype.push.apply(cs, arguments); + }; + } + + /** + * Allocates a new ByteBuffer backed by a buffer of the specified capacity. + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} + * @expose + */ + ByteBuffer.allocate = function(capacity, littleEndian, noAssert) { + return new ByteBuffer(capacity, littleEndian, noAssert); + }; + + /** + * Concatenates multiple ByteBuffers into one. + * @param {!Array.} buffers Buffers to concatenate + * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", + * defaults to "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults + * to {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} Concatenated ByteBuffer + * @expose + */ + ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) { + if (typeof encoding === 'boolean' || typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + var capacity = 0; + for (var i=0, k=buffers.length, length; i 0) capacity += length; + } + if (capacity === 0) + return new ByteBuffer(0, littleEndian, noAssert); + var bb = new ByteBuffer(capacity, littleEndian, noAssert), + bi; + var view = new Uint8Array(bb.buffer); + i=0; while (i} buffer Anything that can be wrapped + * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to + * "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` + * @expose + */ + ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) { + if (typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + if (typeof buffer === 'string') { + if (typeof encoding === 'undefined') + encoding = "utf8"; + switch (encoding) { + case "base64": + return ByteBuffer.fromBase64(buffer, littleEndian); + case "hex": + return ByteBuffer.fromHex(buffer, littleEndian); + case "binary": + return ByteBuffer.fromBinary(buffer, littleEndian); + case "utf8": + return ByteBuffer.fromUTF8(buffer, littleEndian); + case "debug": + return ByteBuffer.fromDebug(buffer, littleEndian); + default: + throw Error("Unsupported encoding: "+encoding); + } + } + if (buffer === null || typeof buffer !== 'object') + throw TypeError("Illegal buffer"); + var bb; + if (ByteBuffer.isByteBuffer(buffer)) { + bb = ByteBufferPrototype.clone.call(buffer); + bb.markedOffset = -1; + return bb; + } + if (buffer instanceof Uint8Array) { // Extract ArrayBuffer from Uint8Array + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.length > 0) { // Avoid references to more than one EMPTY_BUFFER + bb.buffer = buffer.buffer; + bb.offset = buffer.byteOffset; + bb.limit = buffer.byteOffset + buffer.length; + bb.view = buffer.length > 0 ? new DataView(buffer.buffer) : null; + } + } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.byteLength > 0) { + bb.buffer = buffer; + bb.offset = 0; + bb.limit = buffer.byteLength; + bb.view = buffer.byteLength > 0 ? new DataView(buffer) : null; + } + } else if (Object.prototype.toString.call(buffer) === "[object Array]") { // Create from octets + bb = new ByteBuffer(buffer.length, littleEndian, noAssert); + bb.limit = buffer.length; + for (i=0; i>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 1; + var capacity0 = this.buffer.byteLength; + if (offset > capacity0) + this.resize((capacity0 *= 2) > offset ? capacity0 : offset); + offset -= 1; + this.view.setInt8(offset, value); + if (relative) this.offset += 1; + return this; + }; + + /** + * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8; + + /** + * Reads an 8bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var value = this.view.getInt8(offset); + if (relative) this.offset += 1; + return value; + }; + + /** + * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8; + + /** + * Writes an 8bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUint8 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 1; + var capacity1 = this.buffer.byteLength; + if (offset > capacity1) + this.resize((capacity1 *= 2) > offset ? capacity1 : offset); + offset -= 1; + this.view.setUint8(offset, value); + if (relative) this.offset += 1; + return this; + }; + + /** + * Reads an 8bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUint8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var value = this.view.getUint8(offset); + if (relative) this.offset += 1; + return value; + }; + + // types/ints/int16 + + /** + * Writes a 16bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeInt16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 2; + var capacity2 = this.buffer.byteLength; + if (offset > capacity2) + this.resize((capacity2 *= 2) > offset ? capacity2 : offset); + offset -= 2; + this.view.setInt16(offset, value, this.littleEndian); + if (relative) this.offset += 2; + return this; + }; + + /** + * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16; + + /** + * Reads a 16bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readInt16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + } + var value = this.view.getInt16(offset, this.littleEndian); + if (relative) this.offset += 2; + return value; + }; + + /** + * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16; + + /** + * Writes a 16bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeUint16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 2; + var capacity3 = this.buffer.byteLength; + if (offset > capacity3) + this.resize((capacity3 *= 2) > offset ? capacity3 : offset); + offset -= 2; + this.view.setUint16(offset, value, this.littleEndian); + if (relative) this.offset += 2; + return this; + }; + + /** + * Reads a 16bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.readUint16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + } + var value = this.view.getUint16(offset, this.littleEndian); + if (relative) this.offset += 2; + return value; + }; + + // types/ints/int32 + + /** + * Writes a 32bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeInt32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity4 = this.buffer.byteLength; + if (offset > capacity4) + this.resize((capacity4 *= 2) > offset ? capacity4 : offset); + offset -= 4; + this.view.setInt32(offset, value, this.littleEndian); + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32; + + /** + * Reads a 32bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = this.view.getInt32(offset, this.littleEndian); + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32; + + /** + * Writes a 32bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose + */ + ByteBufferPrototype.writeUint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity5 = this.buffer.byteLength; + if (offset > capacity5) + this.resize((capacity5 *= 2) > offset ? capacity5 : offset); + offset -= 4; + this.view.setUint32(offset, value, this.littleEndian); + if (relative) this.offset += 4; + return this; + }; + + /** + * Reads a 32bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose + */ + ByteBufferPrototype.readUint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = this.view.getUint32(offset, this.littleEndian); + if (relative) this.offset += 4; + return value; + }; + + // types/ints/int64 + + if (Long) { + + /** + * Writes a 64bit signed integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeInt64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity6 = this.buffer.byteLength; + if (offset > capacity6) + this.resize((capacity6 *= 2) > offset ? capacity6 : offset); + offset -= 8; + if (this.littleEndian) { + this.view.setInt32(offset , value.low , true); + this.view.setInt32(offset+4, value.high, true); + } else { + this.view.setInt32(offset , value.high, false); + this.view.setInt32(offset+4, value.low , false); + } + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64; + + /** + * Reads a 64bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readInt64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var value = this.littleEndian + ? new Long(this.view.getInt32(offset , true ), this.view.getInt32(offset+4, true ), false) + : new Long(this.view.getInt32(offset+4, false), this.view.getInt32(offset , false), false); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64; + + /** + * Writes a 64bit unsigned integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity7 = this.buffer.byteLength; + if (offset > capacity7) + this.resize((capacity7 *= 2) > offset ? capacity7 : offset); + offset -= 8; + if (this.littleEndian) { + this.view.setInt32(offset , value.low , true); + this.view.setInt32(offset+4, value.high, true); + } else { + this.view.setInt32(offset , value.high, false); + this.view.setInt32(offset+4, value.low , false); + } + if (relative) this.offset += 8; + return this; + }; + + /** + * Reads a 64bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readUint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var value = this.littleEndian + ? new Long(this.view.getInt32(offset , true ), this.view.getInt32(offset+4, true ), true) + : new Long(this.view.getInt32(offset+4, false), this.view.getInt32(offset , false), true); + if (relative) this.offset += 8; + return value; + }; + + } // Long + + + // types/floats/float32 + + /** + * Writes a 32bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity8 = this.buffer.byteLength; + if (offset > capacity8) + this.resize((capacity8 *= 2) > offset ? capacity8 : offset); + offset -= 4; + this.view.setFloat32(offset, value, this.littleEndian); + if (relative) this.offset += 4; + return this; + }; + + /** + * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32; + + /** + * Reads a 32bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = this.view.getFloat32(offset, this.littleEndian); + if (relative) this.offset += 4; + return value; + }; + + /** + * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32; + + // types/floats/float64 + + /** + * Writes a 64bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 8; + var capacity9 = this.buffer.byteLength; + if (offset > capacity9) + this.resize((capacity9 *= 2) > offset ? capacity9 : offset); + offset -= 8; + this.view.setFloat64(offset, value, this.littleEndian); + if (relative) this.offset += 8; + return this; + }; + + /** + * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64; + + /** + * Reads a 64bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var value = this.view.getFloat64(offset, this.littleEndian); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64; + + + // types/varints/varint32 + + /** + * Maximum number of bytes required to store a 32bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT32_BYTES = 5; + + /** + * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. + * @param {number} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} + * @expose + */ + ByteBuffer.calculateVarint32 = function(value) { + // ref: src/google/protobuf/io/coded_stream.cc + value = value >>> 0; + if (value < 1 << 7 ) return 1; + else if (value < 1 << 14) return 2; + else if (value < 1 << 21) return 3; + else if (value < 1 << 28) return 4; + else return 5; + }; + + /** + * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. + * @param {number} n Signed 32bit integer + * @returns {number} Unsigned zigzag encoded 32bit integer + * @expose + */ + ByteBuffer.zigZagEncode32 = function(n) { + return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h + }; + + /** + * Decodes a zigzag encoded signed 32bit integer. + * @param {number} n Unsigned zigzag encoded 32bit integer + * @returns {number} Signed 32bit integer + * @expose + */ + ByteBuffer.zigZagDecode32 = function(n) { + return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h + }; + + /** + * Writes a 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeVarint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var size = ByteBuffer.calculateVarint32(value), + b; + offset += size; + var capacity10 = this.buffer.byteLength; + if (offset > capacity10) + this.resize((capacity10 *= 2) > offset ? capacity10 : offset); + offset -= size; + // ref: http://code.google.com/searchframe#WTeibokF6gE/trunk/src/google/protobuf/io/coded_stream.cc + this.view.setUint8(offset, b = value | 0x80); + value >>>= 0; + if (value >= 1 << 7) { + b = (value >> 7) | 0x80; + this.view.setUint8(offset+1, b); + if (value >= 1 << 14) { + b = (value >> 14) | 0x80; + this.view.setUint8(offset+2, b); + if (value >= 1 << 21) { + b = (value >> 21) | 0x80; + this.view.setUint8(offset+3, b); + if (value >= 1 << 28) { + this.view.setUint8(offset+4, (value >> 28) & 0x0F); + size = 5; + } else { + this.view.setUint8(offset+3, b & 0x7F); + size = 4; + } + } else { + this.view.setUint8(offset+2, b & 0x7F); + size = 3; + } + } else { + this.view.setUint8(offset+1, b & 0x7F); + size = 2; + } + } else { + this.view.setUint8(offset, b & 0x7F); + size = 1; + } + if (relative) { + this.offset += size; + return this; + } + return size; + }; + + /** + * Writes a zig-zag encoded 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) { + return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset); + }; + + /** + * Reads a 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available + * to fully decode the varint. + * @expose + */ + ByteBufferPrototype.readVarint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + // ref: src/google/protobuf/io/coded_stream.cc + var size = 0, + value = 0 >>> 0, + temp, + ioffset; + do { + ioffset = offset+size; + if (!this.noAssert && ioffset > this.limit) { + var err = Error("Truncated"); + err['truncated'] = true; + throw err; + } + temp = this.view.getUint8(ioffset); + if (size < 5) + value |= ((temp&0x7F)<<(7*size)) >>> 0; + ++size; + } while ((temp & 0x80) === 0x80); + value = value | 0; // Make sure to discard the higher order bits + if (relative) { + this.offset += size; + return value; + } + return { + "value": value, + "length": size + }; + }; + + /** + * Reads a zig-zag encoded 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint32ZigZag = function(offset) { + var val = this.readVarint32(offset); + if (typeof val === 'object') + val["value"] = ByteBuffer.zigZagDecode32(val["value"]); + else + val = ByteBuffer.zigZagDecode32(val); + return val; + }; + + // types/varints/varint64 + + if (Long) { + + /** + * Maximum number of bytes required to store a 64bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT64_BYTES = 10; + + /** + * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. + * @param {number|!Long} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} + * @expose + */ + ByteBuffer.calculateVarint64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + // ref: src/google/protobuf/io/coded_stream.cc + var part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + if (part2 == 0) { + if (part1 == 0) { + if (part0 < 1 << 14) + return part0 < 1 << 7 ? 1 : 2; + else + return part0 < 1 << 21 ? 3 : 4; + } else { + if (part1 < 1 << 14) + return part1 < 1 << 7 ? 5 : 6; + else + return part1 < 1 << 21 ? 7 : 8; + } + } else + return part2 < 1 << 7 ? 9 : 10; + }; + + /** + * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. + * @param {number|!Long} value Signed long + * @returns {!Long} Unsigned zigzag encoded long + * @expose + */ + ByteBuffer.zigZagEncode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned(); + }; + + /** + * Decodes a zigzag encoded signed 64bit integer. + * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number + * @returns {!Long} Signed long + * @expose + */ + ByteBuffer.zigZagDecode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned(); + }; + + /** + * Writes a 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeVarint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + var size = ByteBuffer.calculateVarint64(value), + part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + offset += size; + var capacity11 = this.buffer.byteLength; + if (offset > capacity11) + this.resize((capacity11 *= 2) > offset ? capacity11 : offset); + offset -= size; + switch (size) { + case 10: this.view.setUint8(offset+9, (part2 >>> 7) & 0x01); + case 9 : this.view.setUint8(offset+8, size !== 9 ? (part2 ) | 0x80 : (part2 ) & 0x7F); + case 8 : this.view.setUint8(offset+7, size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F); + case 7 : this.view.setUint8(offset+6, size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F); + case 6 : this.view.setUint8(offset+5, size !== 6 ? (part1 >>> 7) | 0x80 : (part1 >>> 7) & 0x7F); + case 5 : this.view.setUint8(offset+4, size !== 5 ? (part1 ) | 0x80 : (part1 ) & 0x7F); + case 4 : this.view.setUint8(offset+3, size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F); + case 3 : this.view.setUint8(offset+2, size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F); + case 2 : this.view.setUint8(offset+1, size !== 2 ? (part0 >>> 7) | 0x80 : (part0 >>> 7) & 0x7F); + case 1 : this.view.setUint8(offset , size !== 1 ? (part0 ) | 0x80 : (part0 ) & 0x7F); + } + if (relative) { + this.offset += size; + return this; + } else { + return size; + } + }; + + /** + * Writes a zig-zag encoded 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) { + return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset); + }; + + /** + * Reads a 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + // ref: src/google/protobuf/io/coded_stream.cc + var start = offset, + part0 = 0, + part1 = 0, + part2 = 0, + b = 0; + b = this.view.getUint8(offset++); part0 = (b & 0x7F) ; if (b & 0x80) { + b = this.view.getUint8(offset++); part0 |= (b & 0x7F) << 7; if (b & 0x80) { + b = this.view.getUint8(offset++); part0 |= (b & 0x7F) << 14; if (b & 0x80) { + b = this.view.getUint8(offset++); part0 |= (b & 0x7F) << 21; if (b & 0x80) { + b = this.view.getUint8(offset++); part1 = (b & 0x7F) ; if (b & 0x80) { + b = this.view.getUint8(offset++); part1 |= (b & 0x7F) << 7; if (b & 0x80) { + b = this.view.getUint8(offset++); part1 |= (b & 0x7F) << 14; if (b & 0x80) { + b = this.view.getUint8(offset++); part1 |= (b & 0x7F) << 21; if (b & 0x80) { + b = this.view.getUint8(offset++); part2 = (b & 0x7F) ; if (b & 0x80) { + b = this.view.getUint8(offset++); part2 |= (b & 0x7F) << 7; if (b & 0x80) { + throw Error("Buffer overrun"); }}}}}}}}}} + var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false); + if (relative) { + this.offset = offset; + return value; + } else { + return { + 'value': value, + 'length': offset-start + }; + } + }; + + /** + * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint64ZigZag = function(offset) { + var val = this.readVarint64(offset); + if (val && val['value'] instanceof Long) + val["value"] = ByteBuffer.zigZagDecode64(val["value"]); + else + val = ByteBuffer.zigZagDecode64(val); + return val; + }; + + } // Long + + + // types/strings/cstring + + /** + * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL + * characters itself. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * contained in `str` + 1 if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written + * @expose + */ + ByteBufferPrototype.writeCString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + var i, + k = str.length; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + for (i=0; i>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + // UTF8 strings do not contain zero bytes in between except for the zero character, so: + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k+1; + var capacity12 = this.buffer.byteLength; + if (offset > capacity12) + this.resize((capacity12 *= 2) > offset ? capacity12 : offset); + offset -= k+1; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view.setUint8(offset++, b); + }.bind(this)); + this.view.setUint8(offset++, 0); + if (relative) { + this.offset = offset; + return this; + } + return k; + }; + + /** + * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters + * itself. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readCString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var start = offset, + temp; + // UTF8 strings do not contain zero bytes in between except for the zero character itself, so: + var sd, b = -1; + utfx.decodeUTF8toUTF16(function() { + if (b === 0) return null; + if (offset >= this.limit) + throw RangeError("Illegal range: Truncated data, "+offset+" < "+this.limit); + return (b = this.view.getUint8(offset++)) === 0 ? null : b; + }.bind(this), sd = stringDestination(), true); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } + }; + + // types/strings/istring + + /** + * Writes a length as uint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 + */ + ByteBufferPrototype.writeIString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + offset += 4+k; + var capacity13 = this.buffer.byteLength; + if (offset > capacity13) + this.resize((capacity13 *= 2) > offset ? capacity13 : offset); + offset -= 4+k; + this.view.setUint32(offset, k, this.littleEndian); + offset += 4; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view.setUint8(offset++, b); + }.bind(this)); + if (offset !== start + 4 + k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+4+k)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a length as uint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 + */ + ByteBufferPrototype.readIString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var temp = 0, + start = offset, + str; + temp = this.view.getUint32(offset, this.littleEndian); + offset += 4; + var k = offset + temp, + sd; + utfx.decodeUTF8toUTF16(function() { + return offset < k ? this.view.getUint8(offset++) : null; + }.bind(this), sd = stringDestination(), this.noAssert); + str = sd(); + if (relative) { + this.offset = offset; + return str; + } else { + return { + 'string': str, + 'length': offset - start + }; + } + }; + + // types/strings/utf8string + + /** + * Metrics representing number of UTF8 characters. Evaluates to `c`. + * @type {string} + * @const + * @expose + */ + ByteBuffer.METRICS_CHARS = 'c'; + + /** + * Metrics representing number of bytes. Evaluates to `b`. + * @type {string} + * @const + * @expose + */ + ByteBuffer.METRICS_BYTES = 'b'; + + /** + * Writes an UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeUTF8String = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var k; + var start = offset; + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k; + var capacity14 = this.buffer.byteLength; + if (offset > capacity14) + this.resize((capacity14 *= 2) > offset ? capacity14 : offset); + offset -= k; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view.setUint8(offset++, b); + }.bind(this)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}. + * @function + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose + */ + ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String; + + /** + * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's + * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. + * @function + * @param {string} str String to calculate + * @returns {number} Number of UTF8 characters + * @expose + */ + ByteBuffer.calculateUTF8Chars = function(str) { + return utfx.calculateUTF16asUTF8(stringSource(str))[0]; + }; + + /** + * Calculates the number of UTF8 bytes of a string. + * @function + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose + */ + ByteBuffer.calculateUTF8Bytes = function(str) { + return utfx.calculateUTF16asUTF8(stringSource(str))[1]; + }; + + /** + * Reads an UTF8 encoded string. + * @param {number} length Number of characters or bytes to read. + * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readUTF8String = function(length, metrics, offset) { + if (typeof metrics === 'number') { + offset = metrics; + metrics = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS; + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var i = 0, + start = offset, + sd; + if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser + sd = stringDestination(); + utfx.decodeUTF8(function() { + return i < length && offset < this.limit ? this.view.getUint8(offset++) : null; + }.bind(this), function(cp) { + ++i; utfx.UTF8toUTF16(cp, sd); + }.bind(this)); + if (i !== length) + throw RangeError("Illegal range: Truncated data, "+i+" == "+length); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } + } else if (metrics === ByteBuffer.METRICS_BYTES) { + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + length > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength); + } + var k = offset + length; + utfx.decodeUTF8toUTF16(function() { + return offset < k ? this.view.getUint8(offset++) : null; + }.bind(this), sd = stringDestination(), this.noAssert); + if (offset !== k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+k); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + 'string': sd(), + 'length': offset - start + }; + } + } else + throw TypeError("Unsupported metrics: "+metrics); + }; + + /** + * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. + * @function + * @param {number} length Number of characters or bytes to read + * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + */ + ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String; + + // types/strings/vstring + + /** + * Writes a length as varint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 + */ + ByteBufferPrototype.writeVString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k, l; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + l = ByteBuffer.calculateVarint32(k); + offset += l+k; + var capacity15 = this.buffer.byteLength; + if (offset > capacity15) + this.resize((capacity15 *= 2) > offset ? capacity15 : offset); + offset -= l+k; + offset += this.writeVarint32(k, offset); + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view.setUint8(offset++, b); + }.bind(this)); + if (offset !== start+k+l) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+k+l)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; + + /** + * Reads a length as varint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 + */ + ByteBufferPrototype.readVString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var temp = this.readVarint32(offset), + start = offset, + str; + offset += temp['length']; + temp = temp['value']; + var k = offset + temp, + sd = stringDestination(); + utfx.decodeUTF8toUTF16(function() { + return offset < k ? this.view.getUint8(offset++) : null; + }.bind(this), sd, this.noAssert); + str = sd(); + if (relative) { + this.offset = offset; + return str; + } else { + return { + 'string': str, + 'length': offset - start + }; + } + }; + + + /** + * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended + * data's length. + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` + * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` + */ + ByteBufferPrototype.append = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var length = source.limit - source.offset; + if (length <= 0) return this; // Nothing to append + offset += length; + var capacity16 = this.buffer.byteLength; + if (offset > capacity16) + this.resize((capacity16 *= 2) > offset ? capacity16 : offset); + offset -= length; + new Uint8Array(this.buffer, offset).set(new Uint8Array(source.buffer).subarray(source.offset, source.limit)); + source.offset += length; + if (relative) this.offset += length; + return this; + }; + + /** + * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the + specified offset up to the length of this ByteBuffer's data. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#append + */ + ByteBufferPrototype.appendTo = function(target, offset) { + target.append(this, offset); + return this; + }; + + /** + * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to + * disable them if your code already makes sure that everything is valid. + * @param {boolean} assert `true` to enable assertions, otherwise `false` + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.assert = function(assert) { + this.noAssert = !assert; + return this; + }; + + /** + * Gets the capacity of this ByteBuffer's backing buffer. + * @returns {number} Capacity of the backing buffer + * @expose + */ + ByteBufferPrototype.capacity = function() { + return this.buffer.byteLength; + }; + + /** + * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the + * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.clear = function() { + this.offset = 0; + this.limit = this.buffer.byteLength; + this.markedOffset = -1; + return this; + }; + + /** + * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset}, + * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}. + * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false` + * @returns {!ByteBuffer} Cloned instance + * @expose + */ + ByteBufferPrototype.clone = function(copy) { + var bb = new ByteBuffer(0, this.littleEndian, this.noAssert); + if (copy) { + var buffer = new ArrayBuffer(this.buffer.byteLength); + new Uint8Array(buffer).set(this.buffer); + bb.buffer = buffer; + bb.view = new DataView(buffer); + } else { + bb.buffer = this.buffer; + bb.view = this.view; + } + bb.offset = this.offset; + bb.markedOffset = this.markedOffset; + bb.limit = this.limit; + return bb; + }; + + /** + * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes + * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and + * adapt {@link ByteBuffer#markedOffset} to the same relative position if set. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.compact = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === 0 && end === this.buffer.byteLength) + return this; // Already compacted + var len = end - begin; + if (len === 0) { + this.buffer = EMPTY_BUFFER; + this.view = null; + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = 0; + return this; + } + var buffer = new ArrayBuffer(len); + new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(begin, end)); + this.buffer = buffer; + this.view = new DataView(buffer); + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = len; + return this; + }; + + /** + * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Copy + * @expose + */ + ByteBufferPrototype.copy = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return new ByteBuffer(0, this.littleEndian, this.noAssert); + var capacity = end - begin, + bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert); + bb.offset = 0; + bb.limit = capacity; + if (bb.markedOffset >= 0) bb.markedOffset -= begin; + this.copyTo(bb, 0, begin, end); + return bb; + }; + + /** + * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} + * by the number of bytes copied if omitted. + * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the + * number of bytes copied if omitted. + * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) { + var relative, + targetRelative; + if (!this.noAssert) { + if (!ByteBuffer.isByteBuffer(target)) + throw TypeError("Illegal target: Not a ByteBuffer"); + } + targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0; + sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0; + sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0; + + if (targetOffset < 0 || targetOffset > target.buffer.byteLength) + throw RangeError("Illegal target range: 0 <= "+targetOffset+" <= "+target.buffer.byteLength); + if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength) + throw RangeError("Illegal source range: 0 <= "+sourceOffset+" <= "+this.buffer.byteLength); + + var len = sourceLimit - sourceOffset; + if (len === 0) + return target; // Nothing to copy + + target.ensureCapacity(targetOffset + len); + + new Uint8Array(target.buffer).set(new Uint8Array(this.buffer).subarray(sourceOffset, sourceLimit), targetOffset); + + if (relative) this.offset += len; + if (targetRelative) target.offset += len; + + return this; + }; + + /** + * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the + * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, + * the required capacity will be used instead. + * @param {number} capacity Required capacity + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.ensureCapacity = function(capacity) { + var current = this.buffer.byteLength; + if (current < capacity) + return this.resize((current *= 2) > capacity ? current : capacity); + return this; + }; + + /** + * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {number|string} value Byte value to fill with. If given as a string, the first character is used. + * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} this + * @expose + * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes + */ + ByteBufferPrototype.fill = function(value, begin, end) { + var relative = typeof begin === 'undefined'; + if (relative) begin = this.offset; + if (typeof value === 'string' && value.length > 0) + value = value.charCodeAt(0); + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin >= end) + return this; // Nothing to fill + while (begin < end) this.view.setUint8(begin++, value); + if (relative) this.offset = begin; + return this; + }; + + /** + * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and + * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.flip = function() { + this.limit = this.offset; + this.offset = 0; + return this; + }; + /** + * Marks an offset on this ByteBuffer to be used later. + * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}. + * @returns {!ByteBuffer} this + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @see ByteBuffer#reset + * @expose + */ + ByteBufferPrototype.mark = function(offset) { + offset = typeof offset === 'undefined' ? this.offset : offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + this.markedOffset = offset; + return this; + }; + /** + * Sets the byte order. + * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.order = function(littleEndian) { + if (!this.noAssert) { + if (typeof littleEndian !== 'boolean') + throw TypeError("Illegal littleEndian: Not a boolean"); + } + this.littleEndian = !!littleEndian; + return this; + }; + + /** + * Switches (to) little endian byte order. + * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.LE = function(littleEndian) { + this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true; + return this; + }; + + /** + * Switches (to) big endian byte order. + * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.BE = function(bigEndian) { + this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false; + return this; + }; + /** + * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be + * modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` + * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` + */ + ByteBufferPrototype.prepend = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var len = source.limit - source.offset; + if (len <= 0) return this; // Nothing to prepend + var diff = len - offset; + var arrayView; + if (diff > 0) { // Not enough space before offset, so resize + move + var buffer = new ArrayBuffer(this.buffer.byteLength + diff); + arrayView = new Uint8Array(buffer); + arrayView.set(new Uint8Array(this.buffer).subarray(offset, this.buffer.byteLength), len); + this.buffer = buffer; + this.view = new DataView(buffer); + this.offset += diff; + if (this.markedOffset >= 0) this.markedOffset += diff; + this.limit += diff; + offset += diff; + } else { + arrayView = new Uint8Array(this.buffer); + } + arrayView.set(new Uint8Array(source.buffer).subarray(source.offset, source.limit), offset - len); + source.offset = source.limit; + if (relative) + this.offset -= len; + return this; + }; - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + /** + * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#prepend + */ + ByteBufferPrototype.prependTo = function(target, offset) { + target.prepend(this, offset); + return this; + }; + /** + * Prints debug information about this ByteBuffer's contents. + * @param {function(string)=} out Output function to call, defaults to console.log + * @expose + */ + ByteBufferPrototype.printDebug = function(out) { + if (typeof out !== 'function') out = console.log.bind(console); + out( + this.toString()+"\n"+ + "-------------------------------------------------------------------\n"+ + this.toDebug(/* columns */ true) + ); + }; - http://www.apache.org/licenses/LICENSE-2.0 + /** + * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}, so this returns `limit - offset`. + * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. + * @expose + */ + ByteBufferPrototype.remaining = function() { + return this.limit - this.offset; + }; + /** + * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} + * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been + * marked, sets `offset = 0`. + * @returns {!ByteBuffer} this + * @see ByteBuffer#mark + * @expose + */ + ByteBufferPrototype.reset = function() { + if (this.markedOffset >= 0) { + this.offset = this.markedOffset; + this.markedOffset = -1; + } else { + this.offset = 0; + } + return this; + }; + /** + * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that + * large or larger. + * @param {number} capacity Capacity required + * @returns {!ByteBuffer} this + * @throws {TypeError} If `capacity` is not a number + * @throws {RangeError} If `capacity < 0` + * @expose + */ + ByteBufferPrototype.resize = function(capacity) { + if (!this.noAssert) { + if (typeof capacity !== 'number' || capacity % 1 !== 0) + throw TypeError("Illegal capacity: "+capacity+" (not an integer)"); + capacity |= 0; + if (capacity < 0) + throw RangeError("Illegal capacity: 0 <= "+capacity); + } + if (this.buffer.byteLength < capacity) { + var buffer = new ArrayBuffer(capacity); + new Uint8Array(buffer).set(new Uint8Array(this.buffer)); + this.buffer = buffer; + this.view = new DataView(buffer); + } + return this; + }; + /** + * Reverses this ByteBuffer's contents. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.reverse = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return this; // Nothing to reverse + Array.prototype.reverse.call(new Uint8Array(this.buffer).subarray(begin, end)); + this.view = new DataView(this.buffer); // FIXME: Why exactly is this necessary? + return this; + }; + /** + * Skips the next `length` bytes. This will just advance + * @param {number} length Number of bytes to skip. May also be negative to move the offset back. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.skip = function(length) { + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + } + var offset = this.offset + length; + if (!this.noAssert) { + if (offset < 0 || offset > this.buffer.byteLength) + throw RangeError("Illegal length: 0 <= "+this.offset+" + "+length+" <= "+this.buffer.byteLength); + } + this.offset = offset; + return this; + }; - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS-IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ + /** + * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} + * @expose + */ + ByteBufferPrototype.slice = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var bb = this.clone(); + bb.offset = begin; + bb.limit = end; + return bb; + }; + /** + * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will transparently {@link ByteBuffer#flip} this + * ByteBuffer if `offset > limit` but the actual offsets remain untouched. + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if + * possible. Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose + */ + ByteBufferPrototype.toBuffer = function(forceCopy) { + var offset = this.offset, + limit = this.limit; + if (offset > limit) { + var t = offset; + offset = limit; + limit = t; + } + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: Not an integer"); + offset >>>= 0; + if (typeof limit !== 'number' || limit % 1 !== 0) + throw TypeError("Illegal limit: Not an integer"); + limit >>>= 0; + if (offset < 0 || offset > limit || limit > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+offset+" <= "+limit+" <= "+this.buffer.byteLength); + } + // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is + // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So: + if (!forceCopy && offset === 0 && limit === this.buffer.byteLength) { + return this.buffer; + } + if (offset === limit) { + return EMPTY_BUFFER; + } + var buffer = new ArrayBuffer(limit - offset); + new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0); + return buffer; + }; -/** - * @license long.js (c) 2013 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/long.js for details - */ -(function(global, factory) { + /** + * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will transparently {@link ByteBuffer#flip} this + * ByteBuffer if `offset > limit` but the actual offsets remain untouched. This is an alias of + * {@link ByteBuffer#toBuffer}. + * @function + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. + * Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose + */ + ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer; - /* AMD */ if (typeof define === 'function' && define["amd"]) - define([], factory); - /* CommonJS */ else if (typeof require === 'function' && typeof module === "object" && module && module["exports"]) - module["exports"] = factory(); - /* Global */ else - (global["dcodeIO"] = global["dcodeIO"] || {})["Long"] = factory(); -})(this, function() { - "use strict"; + /** + * Converts the ByteBuffer's contents to a string. + * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows + * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with + * highlighted offsets. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {string} String representation + * @throws {Error} If `encoding` is invalid + * @expose + */ + ByteBufferPrototype.toString = function(encoding, begin, end) { + if (typeof encoding === 'undefined') + return "ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")"; + if (typeof encoding === 'number') + encoding = "utf8", + begin = encoding, + end = begin; + switch (encoding) { + case "utf8": + return this.toUTF8(begin, end); + case "base64": + return this.toBase64(begin, end); + case "hex": + return this.toHex(begin, end); + case "binary": + return this.toBinary(begin, end); + case "debug": + return this.toDebug(); + case "columns": + return this.toColumns(); + default: + throw Error("Unsupported encoding: "+encoding); + } + }; - /** - * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. - * See the from* functions below for more convenient ways of constructing Longs. - * @exports Long - * @class A Long class for representing a 64 bit two's-complement integer value. - * @param {number} low The low (signed) 32 bits of the long - * @param {number} high The high (signed) 32 bits of the long - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @constructor - */ - function Long(low, high, unsigned) { + // lxiv-embeddable /** - * The low 32 bits as a signed value. - * @type {number} + * lxiv-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/lxiv for details + */ + var lxiv = function() { + "use strict"; + + /** + * lxiv namespace. + * @type {!Object.} + * @exports lxiv + */ + var lxiv = {}; + + /** + * Character codes for output. + * @type {!Array.} + * @inner + */ + var aout = [ + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 + ]; + + /** + * Character codes for input. + * @type {!Array.} + * @inner + */ + var ain = []; + for (var i=0, k=aout.length; i>2)&0x3f]); + t = (b&0x3)<<4; + if ((b = src()) !== null) { + t |= (b>>4)&0xf; + dst(aout[(t|((b>>4)&0xf))&0x3f]); + t = (b&0xf)<<2; + if ((b = src()) !== null) + dst(aout[(t|((b>>6)&0x3))&0x3f]), + dst(aout[b&0x3f]); + else + dst(aout[t&0x3f]), + dst(61); + } else + dst(aout[t&0x3f]), + dst(61), + dst(61); + } + }; + + /** + * Decodes base64 char codes to bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + * @throws {Error} If a character code is invalid + */ + lxiv.decode = function(src, dst) { + var c, t1, t2; + function fail(c) { + throw Error("Illegal character code: "+c); + } + while ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') fail(c); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') fail(c); + dst((t1<<2)>>>0|(t2&0x30)>>4); + if ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t1&0x3)<<6)>>>0|t2); + } + } + } + } + }; + + /** + * Tests if a string is valid base64. + * @param {string} str String to test + * @returns {boolean} `true` if valid, otherwise `false` + */ + lxiv.test = function(str) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str); + }; + + return lxiv; + }(); + + // encodings/base64 + + /** + * Encodes this ByteBuffer's contents to a base64 encoded string. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. + * @returns {string} Base64 encoded string + * @expose + */ + ByteBufferPrototype.toBase64 = function(begin, end) { + if (typeof begin === 'undefined') + begin = this.offset; + if (typeof end === 'undefined') + end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var sd; lxiv.encode(function() { + return begin < end ? this.view.getUint8(begin++) : null; + }.bind(this), sd = stringDestination()); + return sd(); + }; + + /** + * Decodes a base64 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromBase64 = function(str, littleEndian, noAssert) { + if (!noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (str.length % 4 !== 0) + throw TypeError("Illegal str: Length not a multiple of 4"); + } + var bb = new ByteBuffer(str.length/4*3, littleEndian, noAssert), + i = 0; + lxiv.decode(stringSource(str), function(b) { + bb.view.setUint8(i++, b); + }); + bb.limit = i; + return bb; + }; + + /** + * Encodes a binary string to base64 like `window.btoa` does. + * @param {string} str Binary string + * @returns {string} Base64 encoded string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa + * @expose + */ + ByteBuffer.btoa = function(str) { + return ByteBuffer.fromBinary(str).toBase64(); + }; + + /** + * Decodes a base64 encoded string to binary like `window.atob` does. + * @param {string} b64 Base64 encoded string + * @returns {string} Binary string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob * @expose */ - this.low = low | 0; + ByteBuffer.atob = function(b64) { + return ByteBuffer.fromBase64(b64).toBinary(); + }; + + // encodings/binary /** - * The high 32 bits as a signed value. - * @type {number} + * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Binary encoded string + * @throws {RangeError} If `offset > limit` * @expose */ - this.high = high | 0; + ByteBufferPrototype.toBinary = function(begin, end) { + begin = typeof begin === 'undefined' ? this.offset : begin; + end = typeof end === 'undefined' ? this.limit : end; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return ""; + var cc = [], pt = []; + while (begin < end) { + cc.push(this.view.getUint8(begin++)); + if (cc.length >= 1024) + pt.push(String.fromCharCode.apply(String, cc)), + cc = []; + } + return pt.join('') + String.fromCharCode.apply(String, cc); + }; /** - * Whether unsigned or not. - * @type {boolean} + * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer * @expose */ - this.unsigned = !!unsigned; - } - - // The internal representation of a long is the two given signed, 32-bit values. - // We use 32-bit pieces because these are the size of integers on which - // Javascript performs bit-operations. For operations like addition and - // multiplication, we split each number into 16 bit pieces, which can easily be - // multiplied within Javascript's floating-point representation without overflow - // or change in sign. - // - // In the algorithms below, we frequently reduce the negative case to the - // positive case by negating the input(s) and then post-processing the result. - // Note that we must ALWAYS check specially whether those values are MIN_VALUE - // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as - // a positive number, it overflows back into a negative). Not handling this - // case would often result in infinite recursion. - // - // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* - // methods on which they depend. - - /** - * An indicator used to reliably determine if an object is a Long or not. - * @type {boolean} - * @const - * @expose - * @private - */ - Long.__isLong__; - - Object.defineProperty(Long.prototype, "__isLong__", { - value: true, - enumerable: false, - configurable: false - }); - - /** - * @function - * @param {*} obj Object - * @returns {boolean} - * @inner - */ - function isLong(obj) { - return (obj && obj["__isLong__"]) === true; - } - - /** - * Tests if the specified object is a Long. - * @function - * @param {*} obj Object - * @returns {boolean} - * @expose - */ - Long.isLong = isLong; - - /** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @inner - */ - var INT_CACHE = {}; - - /** - * A cache of the Long representations of small unsigned integer values. - * @type {!Object} - * @inner - */ - var UINT_CACHE = {}; - - /** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner - */ - function fromInt(value, unsigned) { - var obj, cachedObj, cache; - if (unsigned) { - value >>>= 0; - if (cache = (0 <= value && value < 256)) { - cachedObj = UINT_CACHE[value]; - if (cachedObj) - return cachedObj; + ByteBuffer.fromBinary = function(str, littleEndian, noAssert) { + if (!noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); } - obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true); - if (cache) - UINT_CACHE[value] = obj; - return obj; - } else { - value |= 0; - if (cache = (-128 <= value && value < 128)) { - cachedObj = INT_CACHE[value]; - if (cachedObj) - return cachedObj; + var i = 0, k = str.length, charCode, + bb = new ByteBuffer(k, littleEndian, noAssert); + while (i 255) + throw RangeError("Illegal charCode at "+i+": 0 <= "+charCode+" <= 255"); + bb.view.setUint8(i++, charCode); } - obj = fromBits(value, value < 0 ? -1 : 0, false); - if (cache) - INT_CACHE[value] = obj; - return obj; - } - } - - /** - * Returns a Long representing the given 32 bit integer value. - * @function - * @param {number} value The 32 bit integer in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @returns {!Long} The corresponding Long value - * @expose - */ - Long.fromInt = fromInt; - - /** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner - */ - function fromNumber(value, unsigned) { - if (isNaN(value) || !isFinite(value)) - return unsigned ? UZERO : ZERO; - if (unsigned) { - if (value < 0) - return UZERO; - if (value >= TWO_PWR_64_DBL) - return MAX_UNSIGNED_VALUE; - } else { - if (value <= -TWO_PWR_63_DBL) - return MIN_VALUE; - if (value + 1 >= TWO_PWR_63_DBL) - return MAX_VALUE; - } - if (value < 0) - return fromNumber(-value, unsigned).neg(); - return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned); - } - - /** - * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. - * @function - * @param {number} value The number in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @returns {!Long} The corresponding Long value - * @expose - */ - Long.fromNumber = fromNumber; - - /** - * @param {number} lowBits - * @param {number} highBits - * @param {boolean=} unsigned - * @returns {!Long} - * @inner - */ - function fromBits(lowBits, highBits, unsigned) { - return new Long(lowBits, highBits, unsigned); - } - - /** - * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is - * assumed to use 32 bits. - * @function - * @param {number} lowBits The low 32 bits - * @param {number} highBits The high 32 bits - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @returns {!Long} The corresponding Long value - * @expose - */ - Long.fromBits = fromBits; - - /** - * @function - * @param {number} base - * @param {number} exponent - * @returns {number} - * @inner - */ - var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) - - /** - * @param {string} str - * @param {(boolean|number)=} unsigned - * @param {number=} radix - * @returns {!Long} - * @inner - */ - function fromString(str, unsigned, radix) { - if (str.length === 0) - throw Error('empty string'); - if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") - return ZERO; - if (typeof unsigned === 'number') { - // For goog.math.long compatibility - radix = unsigned, - unsigned = false; - } else { - unsigned = !! unsigned; - } - radix = radix || 10; - if (radix < 2 || 36 < radix) - throw RangeError('radix'); + bb.limit = k; + return bb; + }; - var p; - if ((p = str.indexOf('-')) > 0) - throw Error('interior hyphen'); - else if (p === 0) { - return fromString(str.substring(1), unsigned, radix).neg(); - } + // encodings/debug - // Do several (8) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = fromNumber(pow_dbl(radix, 8)); + /** + * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: + * * `<` : offset, + * * `'` : markedOffset, + * * `>` : limit, + * * `|` : offset and limit, + * * `[` : offset and markedOffset, + * * `]` : markedOffset and limit, + * * `!` : offset, markedOffset and limit + * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` + * @returns {string|!Array.} Debug string or array of lines if `asArray = true` + * @expose + * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` + * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` + * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` + * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` + */ + ByteBufferPrototype.toDebug = function(columns) { + var i = -1, + k = this.buffer.byteLength, + b, + hex = "", + asc = "", + out = ""; + while (i 32 && b < 127 ? String.fromCharCode(b) : '.'; + } + } + ++i; + if (columns) { + if (i > 0 && i % 16 === 0 && i !== k) { + while (hex.length < 3*16+3) hex += " "; + out += hex+asc+"\n"; + hex = asc = ""; + } + } + if (i === this.offset && i === this.limit) + hex += i === this.markedOffset ? "!" : "|"; + else if (i === this.offset) + hex += i === this.markedOffset ? "[" : "<"; + else if (i === this.limit) + hex += i === this.markedOffset ? "]" : ">"; + else + hex += i === this.markedOffset ? "'" : (columns || (i !== 0 && i !== k) ? " " : ""); + } + if (columns && hex !== " ") { + while (hex.length < 3*16+3) hex += " "; + out += hex+asc+"\n"; + } + return columns ? out : hex; + }; - var result = ZERO; - for (var i = 0; i < str.length; i += 8) { - var size = Math.min(8, str.length - i), - value = parseInt(str.substring(i, i + size), radix); - if (size < 8) { - var power = fromNumber(pow_dbl(radix, size)); - result = result.mul(power).add(fromNumber(value)); - } else { - result = result.mul(radixToPower); - result = result.add(fromNumber(value)); + /** + * Decodes a hex encoded string with marked offsets to a ByteBuffer. + * @param {string} str Debug string to decode (not be generated with `columns = true`) + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + * @see ByteBuffer#toDebug + */ + ByteBuffer.fromDebug = function(str, littleEndian, noAssert) { + var k = str.length, + bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert); + var i = 0, j = 0, ch, b, + rs = false, // Require symbol next + ho = false, hm = false, hl = false, // Already has offset, markedOffset, limit? + fail = false; + while (i': + if (!noAssert) { + if (hl) { + fail = true; break; + } + hl = true; + } + bb.limit = j; + rs = false; + break; + case "'": + if (!noAssert) { + if (hm) { + fail = true; break; + } + hm = true; + } + bb.markedOffset = j; + rs = false; + break; + case ' ': + rs = false; + break; + default: + if (!noAssert) { + if (rs) { + fail = true; break; + } + } + b = parseInt(ch+str.charAt(i++), 16); + if (!noAssert) { + if (isNaN(b) || b < 0 || b > 255) + throw TypeError("Illegal str: Not a debug encoded string"); + } + bb.view.setUint8(j++, b); + rs = true; + } + if (fail) + throw TypeError("Illegal str: Invalid symbol at "+i); } - } - result.unsigned = unsigned; - return result; - } + if (!noAssert) { + if (!ho || !hl) + throw TypeError("Illegal str: Missing offset or limit"); + if (j>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var out = new Array(end - begin), + b; + while (begin < end) { + b = this.view.getUint8(begin++); + if (b < 0x10) + out.push("0", b.toString(16)); + else out.push(b.toString(16)); + } + return out.join(''); + }; - /** - * Converts the specified value to a Long. - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value - * @returns {!Long} - * @expose - */ - Long.fromValue = fromValue; + /** + * Decodes a hex encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromHex = function(str, littleEndian, noAssert) { + if (!noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (str.length % 2 !== 0) + throw TypeError("Illegal str: Length not a multiple of 2"); + } + var k = str.length, + bb = new ByteBuffer((k / 2) | 0, littleEndian), + b; + for (var i=0, j=0; i 255) + throw TypeError("Illegal str: Contains non-hex characters"); + bb.view.setUint8(j++, b); + } + bb.limit = j; + return bb; + }; - // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be - // no runtime penalty for these. + // utfx-embeddable - /** - * @type {number} - * @const - * @inner - */ - var TWO_PWR_16_DBL = 1 << 16; + /** + * utfx-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/utfx for details + */ + var utfx = function() { + "use strict"; - /** - * @type {number} - * @const - * @inner - */ - var TWO_PWR_24_DBL = 1 << 24; + /** + * utfx namespace. + * @inner + * @type {!Object.} + */ + var utfx = {}; - /** - * @type {number} - * @const - * @inner - */ - var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; + /** + * Maximum valid code point. + * @type {number} + * @const + */ + utfx.MAX_CODEPOINT = 0x10FFFF; - /** - * @type {number} - * @const - * @inner - */ - var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; + /** + * Encodes UTF8 code points to UTF8 bytes. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte + */ + utfx.encodeUTF8 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, + src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp < 0x80) + dst(cp&0x7F); + else if (cp < 0x800) + dst(((cp>>6)&0x1F)|0xC0), + dst((cp&0x3F)|0x80); + else if (cp < 0x10000) + dst(((cp>>12)&0x0F)|0xE0), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + else + dst(((cp>>18)&0x07)|0xF0), + dst(((cp>>12)&0x3F)|0x80), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + cp = null; + } + }; - /** - * @type {number} - * @const - * @inner - */ - var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; + /** + * Decodes UTF8 bytes to UTF8 code points. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the + * remaining bytes. + */ + utfx.decodeUTF8 = function(src, dst) { + var a, b, c, d, fail = function(b) { + b = b.slice(0, b.indexOf(null)); + var err = Error(b.toString()); + err.name = "TruncatedError"; + err['bytes'] = b; + throw err; + }; + while ((a = src()) !== null) { + if ((a&0x80) === 0) + dst(a); + else if ((a&0xE0) === 0xC0) + ((b = src()) === null) && fail([a, b]), + dst(((a&0x1F)<<6) | (b&0x3F)); + else if ((a&0xF0) === 0xE0) + ((b=src()) === null || (c=src()) === null) && fail([a, b, c]), + dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F)); + else if ((a&0xF8) === 0xF0) + ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]), + dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F)); + else throw RangeError("Illegal starting byte: "+a); + } + }; - /** - * @type {!Long} - * @const - * @inner - */ - var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); + /** + * Converts UTF16 characters to UTF8 code points. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Code points destination as a function successively called with each converted code + * point. + */ + utfx.UTF16toUTF8 = function(src, dst) { + var c1, c2 = null; + while (true) { + if ((c1 = c2 !== null ? c2 : src()) === null) + break; + if (c1 >= 0xD800 && c1 <= 0xDFFF) { + if ((c2 = src()) !== null) { + if (c2 >= 0xDC00 && c2 <= 0xDFFF) { + dst((c1-0xD800)*0x400+c2-0xDC00+0x10000); + c2 = null; continue; + } + } + } + dst(c1); + } + if (c2 !== null) dst(c2); + }; - /** - * @type {!Long} - * @inner - */ - var ZERO = fromInt(0); + /** + * Converts UTF8 code points to UTF16 characters. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a code point is out of range + */ + utfx.UTF8toUTF16 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp <= 0xFFFF) + dst(cp); + else + cp -= 0x10000, + dst((cp>>10)+0xD800), + dst((cp%0x400)+0xDC00); + cp = null; + } + }; - /** - * Signed zero. - * @type {!Long} - * @expose - */ - Long.ZERO = ZERO; + /** + * Converts and encodes UTF16 characters to UTF8 bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` + * if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + */ + utfx.encodeUTF16toUTF8 = function(src, dst) { + utfx.UTF16toUTF8(src, function(cp) { + utfx.encodeUTF8(cp, dst); + }); + }; - /** - * @type {!Long} - * @inner - */ - var UZERO = fromInt(0, true); + /** + * Decodes and converts UTF8 bytes to UTF16 characters. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. + */ + utfx.decodeUTF8toUTF16 = function(src, dst) { + utfx.decodeUTF8(src, function(cp) { + utfx.UTF8toUTF16(cp, dst); + }); + }; - /** - * Unsigned zero. - * @type {!Long} - * @expose - */ - Long.UZERO = UZERO; + /** + * Calculates the byte length of an UTF8 code point. + * @param {number} cp UTF8 code point + * @returns {number} Byte length + */ + utfx.calculateCodePoint = function(cp) { + return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + }; - /** - * @type {!Long} - * @inner - */ - var ONE = fromInt(1); + /** + * Calculates the number of UTF8 bytes required to store UTF8 code points. + * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively + * `null` if there are no more code points left. + * @returns {number} The number of UTF8 bytes required + */ + utfx.calculateUTF8 = function(src) { + var cp, l=0; + while ((cp = src()) !== null) + l += utfx.calculateCodePoint(cp); + return l; + }; - /** - * Signed one. - * @type {!Long} - * @expose - */ - Long.ONE = ONE; + /** + * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. + * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. + */ + utfx.calculateUTF16asUTF8 = function(src) { + var n=0, l=0; + utfx.UTF16toUTF8(src, function(cp) { + ++n; l += utfx.calculateCodePoint(cp); + }); + return [n,l]; + }; - /** - * @type {!Long} - * @inner - */ - var UONE = fromInt(1, true); + return utfx; + }(); - /** - * Unsigned one. - * @type {!Long} - * @expose - */ - Long.UONE = UONE; + // encodings/utf8 - /** - * @type {!Long} - * @inner - */ - var NEG_ONE = fromInt(-1); + /** + * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded + * string. + * @returns {string} Hex encoded string + * @throws {RangeError} If `offset > limit` + * @expose + */ + ByteBufferPrototype.toUTF8 = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var sd; try { + utfx.decodeUTF8toUTF16(function() { + return begin < end ? this.view.getUint8(begin++) : null; + }.bind(this), sd = stringDestination()); + } catch (e) { + if (begin !== end) + throw RangeError("Illegal range: Truncated data, "+begin+" != "+end); + } + return sd(); + }; - /** - * Signed negative one. - * @type {!Long} - * @expose - */ - Long.NEG_ONE = NEG_ONE; + /** + * Decodes an UTF8 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) { + if (!noAssert) + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + var bb = new ByteBuffer(utfx.calculateUTF16asUTF8(stringSource(str), true)[1], littleEndian, noAssert), + i = 0; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + bb.view.setUint8(i++, b); + }); + bb.limit = i; + return bb; + }; - /** - * @type {!Long} - * @inner - */ - var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false); - /** - * Maximum signed value. - * @type {!Long} - * @expose - */ - Long.MAX_VALUE = MAX_VALUE; + return ByteBuffer; + } - /** - * @type {!Long} - * @inner - */ - var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true); + /* CommonJS */ if (typeof require === 'function' && typeof module === 'object' && module && typeof exports === 'object' && exports) + module['exports'] = (function() { + var Long; try { Long = require("long"); } catch (e) {} + return loadByteBuffer(Long); + })(); + /* AMD */ else if (typeof define === 'function' && define["amd"]) + define("ByteBuffer", ["Long"], function(Long) { return loadByteBuffer(Long); }); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["ByteBuffer"] = loadByteBuffer(global["dcodeIO"]["Long"]); - /** - * Maximum unsigned value. - * @type {!Long} - * @expose - */ - Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; +})(this); + +/* + Copyright 2013 Daniel Wirtz - /** - * @type {!Long} - * @inner - */ - var MIN_VALUE = fromBits(0, 0x80000000|0, false); + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - /** - * Minimum signed value. - * @type {!Long} - * @expose - */ - Long.MIN_VALUE = MIN_VALUE; + http://www.apache.org/licenses/LICENSE-2.0 - /** - * @alias Long.prototype - * @inner - */ - var LongPrototype = Long.prototype; + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ - /** - * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. - * @returns {number} - * @expose - */ - LongPrototype.toInt = function toInt() { - return this.unsigned ? this.low >>> 0 : this.low; - }; +/** + * @license protobuf.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/protobuf.js for details + */ +(function(global, factory) { - /** - * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). - * @returns {number} - * @expose - */ - LongPrototype.toNumber = function toNumber() { - if (this.unsigned) - return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0); - return this.high * TWO_PWR_32_DBL + (this.low >>> 0); - }; + /* AMD */ if (typeof define === 'function' && define["amd"]) + define(["bytebuffer"], factory); + /* CommonJS */ else if (typeof require === "function" && typeof module === "object" && module && module["exports"]) + module["exports"] = factory(require("bytebuffer"), true); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["ProtoBuf"] = factory(global["dcodeIO"]["ByteBuffer"]); - /** - * Converts the Long to a string written in the specified radix. - * @param {number=} radix Radix (2-36), defaults to 10 - * @returns {string} - * @override - * @throws {RangeError} If `radix` is out of range - * @expose - */ - LongPrototype.toString = function toString(radix) { - radix = radix || 10; - if (radix < 2 || 36 < radix) - throw RangeError('radix'); - if (this.isZero()) - return '0'; - if (this.isNegative()) { // Unsigned Longs are never negative - if (this.eq(MIN_VALUE)) { - // We need to change the Long value before it can be negated, so we remove - // the bottom-most digit in this base and then recurse to do the rest. - var radixLong = fromNumber(radix), - div = this.div(radixLong), - rem1 = div.mul(radixLong).sub(this); - return div.toString(radix) + rem1.toInt().toString(radix); - } else - return '-' + this.neg().toString(radix); - } +})(this, function(ByteBuffer, isCommonJS) { + "use strict"; - // Do several (6) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), - rem = this; - var result = ''; - while (true) { - var remDiv = rem.div(radixToPower), - intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, - digits = intval.toString(radix); - rem = remDiv; - if (rem.isZero()) - return digits + result; - else { - while (digits.length < 6) - digits = '0' + digits; - result = '' + digits + result; - } - } - }; + /** + * The ProtoBuf namespace. + * @exports ProtoBuf + * @namespace + * @expose + */ + var ProtoBuf = {}; /** - * Gets the high 32 bits as a signed integer. - * @returns {number} Signed high bits + * @type {!function(new: ByteBuffer, ...[*])} * @expose */ - LongPrototype.getHighBits = function getHighBits() { - return this.high; - }; + ProtoBuf.ByteBuffer = ByteBuffer; /** - * Gets the high 32 bits as an unsigned integer. - * @returns {number} Unsigned high bits + * @type {?function(new: Long, ...[*])} * @expose */ - LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { - return this.high >>> 0; - }; + ProtoBuf.Long = ByteBuffer.Long || null; /** - * Gets the low 32 bits as a signed integer. - * @returns {number} Signed low bits + * ProtoBuf.js version. + * @type {string} + * @const * @expose */ - LongPrototype.getLowBits = function getLowBits() { - return this.low; - }; + ProtoBuf.VERSION = "5.0.1"; /** - * Gets the low 32 bits as an unsigned integer. - * @returns {number} Unsigned low bits + * Wire types. + * @type {Object.} + * @const * @expose */ - LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { - return this.low >>> 0; - }; + ProtoBuf.WIRE_TYPES = {}; /** - * Gets the number of bits needed to represent the absolute value of this Long. - * @returns {number} + * Varint wire type. + * @type {number} * @expose */ - LongPrototype.getNumBitsAbs = function getNumBitsAbs() { - if (this.isNegative()) // Unsigned Longs are never negative - return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); - var val = this.high != 0 ? this.high : this.low; - for (var bit = 31; bit > 0; bit--) - if ((val & (1 << bit)) != 0) - break; - return this.high != 0 ? bit + 33 : bit + 1; - }; + ProtoBuf.WIRE_TYPES.VARINT = 0; /** - * Tests if this Long's value equals zero. - * @returns {boolean} + * Fixed 64 bits wire type. + * @type {number} + * @const * @expose */ - LongPrototype.isZero = function isZero() { - return this.high === 0 && this.low === 0; - }; + ProtoBuf.WIRE_TYPES.BITS64 = 1; /** - * Tests if this Long's value is negative. - * @returns {boolean} + * Length delimited wire type. + * @type {number} + * @const * @expose */ - LongPrototype.isNegative = function isNegative() { - return !this.unsigned && this.high < 0; - }; + ProtoBuf.WIRE_TYPES.LDELIM = 2; /** - * Tests if this Long's value is positive. - * @returns {boolean} + * Start group wire type. + * @type {number} + * @const * @expose */ - LongPrototype.isPositive = function isPositive() { - return this.unsigned || this.high >= 0; - }; + ProtoBuf.WIRE_TYPES.STARTGROUP = 3; /** - * Tests if this Long's value is odd. - * @returns {boolean} + * End group wire type. + * @type {number} + * @const * @expose */ - LongPrototype.isOdd = function isOdd() { - return (this.low & 1) === 1; - }; + ProtoBuf.WIRE_TYPES.ENDGROUP = 4; /** - * Tests if this Long's value is even. - * @returns {boolean} + * Fixed 32 bits wire type. + * @type {number} + * @const * @expose */ - LongPrototype.isEven = function isEven() { - return (this.low & 1) === 0; - }; + ProtoBuf.WIRE_TYPES.BITS32 = 5; /** - * Tests if this Long's value equals the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + * Packable wire types. + * @type {!Array.} + * @const * @expose */ - LongPrototype.equals = function equals(other) { - if (!isLong(other)) - other = fromValue(other); - if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1) - return false; - return this.high === other.high && this.low === other.low; + ProtoBuf.PACKABLE_WIRE_TYPES = [ + ProtoBuf.WIRE_TYPES.VARINT, + ProtoBuf.WIRE_TYPES.BITS64, + ProtoBuf.WIRE_TYPES.BITS32 + ]; + + /** + * Types. + * @dict + * @type {!Object.} + * @const + * @expose + */ + ProtoBuf.TYPES = { + // According to the protobuf spec. + "int32": { + name: "int32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "uint32": { + name: "uint32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "sint32": { + name: "sint32", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "int64": { + name: "int64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "uint64": { + name: "uint64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined + }, + "sint64": { + name: "sint64", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "bool": { + name: "bool", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: false + }, + "double": { + name: "double", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: 0 + }, + "string": { + name: "string", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: "" + }, + "bytes": { + name: "bytes", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: null // overridden in the code, must be a unique instance + }, + "fixed32": { + name: "fixed32", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "sfixed32": { + name: "sfixed32", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "fixed64": { + name: "fixed64", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined + }, + "sfixed64": { + name: "sfixed64", + wireType: ProtoBuf.WIRE_TYPES.BITS64, + defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined + }, + "float": { + name: "float", + wireType: ProtoBuf.WIRE_TYPES.BITS32, + defaultValue: 0 + }, + "enum": { + name: "enum", + wireType: ProtoBuf.WIRE_TYPES.VARINT, + defaultValue: 0 + }, + "message": { + name: "message", + wireType: ProtoBuf.WIRE_TYPES.LDELIM, + defaultValue: null + }, + "group": { + name: "group", + wireType: ProtoBuf.WIRE_TYPES.STARTGROUP, + defaultValue: null + } }; /** - * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + * Valid map key types. + * @type {!Array.>} + * @const * @expose */ - LongPrototype.eq = LongPrototype.equals; + ProtoBuf.MAP_KEY_TYPES = [ + ProtoBuf.TYPES["int32"], + ProtoBuf.TYPES["sint32"], + ProtoBuf.TYPES["sfixed32"], + ProtoBuf.TYPES["uint32"], + ProtoBuf.TYPES["fixed32"], + ProtoBuf.TYPES["int64"], + ProtoBuf.TYPES["sint64"], + ProtoBuf.TYPES["sfixed64"], + ProtoBuf.TYPES["uint64"], + ProtoBuf.TYPES["fixed64"], + ProtoBuf.TYPES["bool"], + ProtoBuf.TYPES["string"], + ProtoBuf.TYPES["bytes"] + ]; /** - * Tests if this Long's value differs from the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + * Minimum field id. + * @type {number} + * @const * @expose */ - LongPrototype.notEquals = function notEquals(other) { - return !this.eq(/* validates */ other); - }; + ProtoBuf.ID_MIN = 1; /** - * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + * Maximum field id. + * @type {number} + * @const * @expose */ - LongPrototype.neq = LongPrototype.notEquals; + ProtoBuf.ID_MAX = 0x1FFFFFFF; /** - * Tests if this Long's value is less than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + * If set to `true`, field names will be converted from underscore notation to camel case. Defaults to `false`. + * Must be set prior to parsing. + * @type {boolean} * @expose */ - LongPrototype.lessThan = function lessThan(other) { - return this.comp(/* validates */ other) < 0; - }; + ProtoBuf.convertFieldsToCamelCase = false; /** - * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + * By default, messages are populated with (setX, set_x) accessors for each field. This can be disabled by + * setting this to `false` prior to building messages. + * @type {boolean} * @expose */ - LongPrototype.lt = LongPrototype.lessThan; + ProtoBuf.populateAccessors = true; /** - * Tests if this Long's value is less than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + * By default, messages are populated with default values if a field is not present on the wire. To disable + * this behavior, set this setting to `false`. + * @type {boolean} * @expose */ - LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { - return this.comp(/* validates */ other) <= 0; + ProtoBuf.populateDefaults = true; + + /** + * @alias ProtoBuf.Util + * @expose + */ + ProtoBuf.Util = (function() { + "use strict"; + + /** + * ProtoBuf utilities. + * @exports ProtoBuf.Util + * @namespace + */ + var Util = {}; + + /** + * Flag if running in node or not. + * @type {boolean} + * @const + * @expose + */ + Util.IS_NODE = !!( + typeof process === 'object' && process+'' === '[object process]' && !process['browser'] + ); + + /** + * Constructs a XMLHttpRequest object. + * @return {XMLHttpRequest} + * @throws {Error} If XMLHttpRequest is not supported + * @expose + */ + Util.XHR = function() { + // No dependencies please, ref: http://www.quirksmode.org/js/xmlhttp.html + var XMLHttpFactories = [ + function () {return new XMLHttpRequest()}, + function () {return new ActiveXObject("Msxml2.XMLHTTP")}, + function () {return new ActiveXObject("Msxml3.XMLHTTP")}, + function () {return new ActiveXObject("Microsoft.XMLHTTP")} + ]; + /** @type {?XMLHttpRequest} */ + var xhr = null; + for (var i=0;i} + * @expose + */ + ProtoBuf.Lang = { + + // Characters always ending a statement + DELIM: /[\s\{\}=;:\[\],'"\(\)<>]/g, + + // Field rules + RULE: /^(?:required|optional|repeated|map)$/, + + // Field types + TYPE: /^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/, + + // Names + NAME: /^[a-zA-Z_][a-zA-Z_0-9]*$/, + + // Type definitions + TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/, + + // Type references + TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/, + + // Fully qualified type references + FQTYPEREF: /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/, + + // All numbers + NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/, + + // Decimal numbers + NUMBER_DEC: /^(?:[1-9][0-9]*|0)$/, + + // Hexadecimal numbers + NUMBER_HEX: /^0[xX][0-9a-fA-F]+$/, + + // Octal numbers + NUMBER_OCT: /^0[0-7]+$/, + + // Floating point numbers + NUMBER_FLT: /^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/, + + // Booleans + BOOL: /^(?:true|false)$/i, + + // Id numbers + ID: /^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, + + // Negative id numbers (enum values) + NEGID: /^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, + + // Whitespaces + WHITESPACE: /\s/, + + // All strings + STRING: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g, + + // Double quoted strings + STRING_DQ: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, + + // Single quoted strings + STRING_SQ: /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g }; /** - * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + * @alias ProtoBuf.DotProto * @expose */ - LongPrototype.lte = LongPrototype.lessThanOrEqual; + ProtoBuf.DotProto = (function(ProtoBuf, Lang) { + "use strict"; + + /** + * Utilities to parse .proto files. + * @exports ProtoBuf.DotProto + * @namespace + */ + var DotProto = {}; + + /** + * Constructs a new Tokenizer. + * @exports ProtoBuf.DotProto.Tokenizer + * @class prototype tokenizer + * @param {string} proto Proto to tokenize + * @constructor + */ + var Tokenizer = function(proto) { + + /** + * Source to parse. + * @type {string} + * @expose + */ + this.source = proto+""; + + /** + * Current index. + * @type {number} + * @expose + */ + this.index = 0; + + /** + * Current line. + * @type {number} + * @expose + */ + this.line = 1; + + /** + * Token stack. + * @type {!Array.} + * @expose + */ + this.stack = []; - /** - * Tests if this Long's value is greater than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} - * @expose - */ - LongPrototype.greaterThan = function greaterThan(other) { - return this.comp(/* validates */ other) > 0; - }; + /** + * Opening character of the current string read, if any. + * @type {?string} + * @private + */ + this._stringOpen = null; + }; - /** - * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - * @expose - */ - LongPrototype.gt = LongPrototype.greaterThan; + /** + * @alias ProtoBuf.DotProto.Tokenizer.prototype + * @inner + */ + var TokenizerPrototype = Tokenizer.prototype; - /** - * Tests if this Long's value is greater than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} - * @expose - */ - LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { - return this.comp(/* validates */ other) >= 0; - }; + /** + * Reads a string beginning at the current index. + * @return {string} + * @private + */ + TokenizerPrototype._readString = function() { + var re = this._stringOpen === '"' + ? Lang.STRING_DQ + : Lang.STRING_SQ; + re.lastIndex = this.index - 1; // Include the open quote + var match = re.exec(this.source); + if (!match) + throw Error("unterminated string"); + this.index = re.lastIndex; + this.stack.push(this._stringOpen); + this._stringOpen = null; + return match[1]; + }; - /** - * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} - * @expose - */ - LongPrototype.gte = LongPrototype.greaterThanOrEqual; + /** + * Gets the next token and advances by one. + * @return {?string} Token or `null` on EOF + * @expose + */ + TokenizerPrototype.next = function() { + if (this.stack.length > 0) + return this.stack.shift(); + if (this.index >= this.source.length) + return null; + if (this._stringOpen !== null) + return this._readString(); - /** - * Compares this Long's value with the specified's. - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater - * @expose - */ - LongPrototype.compare = function compare(other) { - if (!isLong(other)) - other = fromValue(other); - if (this.eq(other)) - return 0; - var thisNeg = this.isNegative(), - otherNeg = other.isNegative(); - if (thisNeg && !otherNeg) - return -1; - if (!thisNeg && otherNeg) - return 1; - // At this point the sign bits are the same - if (!this.unsigned) - return this.sub(other).isNegative() ? -1 : 1; - // Both are positive if at least one is unsigned - return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1; - }; + var repeat, + prev, + next; + do { + repeat = false; - /** - * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. - * @function - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater - * @expose - */ - LongPrototype.comp = LongPrototype.compare; + // Strip white spaces + while (Lang.WHITESPACE.test(next = this.source.charAt(this.index))) { + if (next === '\n') + ++this.line; + if (++this.index === this.source.length) + return null; + } - /** - * Negates this Long's value. - * @returns {!Long} Negated Long - * @expose - */ - LongPrototype.negate = function negate() { - if (!this.unsigned && this.eq(MIN_VALUE)) - return MIN_VALUE; - return this.not().add(ONE); - }; + // Strip comments + if (this.source.charAt(this.index) === '/') { + ++this.index; + if (this.source.charAt(this.index) === '/') { // Line + while (this.source.charAt(++this.index) !== '\n') + if (this.index == this.source.length) + return null; + ++this.index; + ++this.line; + repeat = true; + } else if ((next = this.source.charAt(this.index)) === '*') { /* Block */ + do { + if (next === '\n') + ++this.line; + if (++this.index === this.source.length) + return null; + prev = next; + next = this.source.charAt(this.index); + } while (prev !== '*' || next !== '/'); + ++this.index; + repeat = true; + } else + return '/'; + } + } while (repeat); - /** - * Negates this Long's value. This is an alias of {@link Long#negate}. - * @function - * @returns {!Long} Negated Long - * @expose - */ - LongPrototype.neg = LongPrototype.negate; + if (this.index === this.source.length) + return null; - /** - * Returns the sum of this and the specified Long. - * @param {!Long|number|string} addend Addend - * @returns {!Long} Sum - * @expose - */ - LongPrototype.add = function add(addend) { - if (!isLong(addend)) - addend = fromValue(addend); + // Read the next token + var end = this.index; + Lang.DELIM.lastIndex = 0; + var delim = Lang.DELIM.test(this.source.charAt(end++)); + if (!delim) + while(end < this.source.length && !Lang.DELIM.test(this.source.charAt(end))) + ++end; + var token = this.source.substring(this.index, this.index = end); + if (token === '"' || token === "'") + this._stringOpen = token; + return token; + }; - // Divide each number into 4 chunks of 16 bits, and then sum the chunks. + /** + * Peeks for the next token. + * @return {?string} Token or `null` on EOF + * @expose + */ + TokenizerPrototype.peek = function() { + if (this.stack.length === 0) { + var token = this.next(); + if (token === null) + return null; + this.stack.push(token); + } + return this.stack[0]; + }; - var a48 = this.high >>> 16; - var a32 = this.high & 0xFFFF; - var a16 = this.low >>> 16; - var a00 = this.low & 0xFFFF; + /** + * Skips a specific token and throws if it differs. + * @param {string} expected Expected token + * @throws {Error} If the actual token differs + */ + TokenizerPrototype.skip = function(expected) { + var actual = this.next(); + if (actual !== expected) + throw Error("illegal '"+actual+"', '"+expected+"' expected"); + }; - var b48 = addend.high >>> 16; - var b32 = addend.high & 0xFFFF; - var b16 = addend.low >>> 16; - var b00 = addend.low & 0xFFFF; + /** + * Omits an optional token. + * @param {string} expected Expected optional token + * @returns {boolean} `true` if the token exists + */ + TokenizerPrototype.omit = function(expected) { + if (this.peek() === expected) { + this.next(); + return true; + } + return false; + }; - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 + b48; - c48 &= 0xFFFF; - return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); - }; + /** + * Returns a string representation of this object. + * @return {string} String representation as of "Tokenizer(index/length)" + * @expose + */ + TokenizerPrototype.toString = function() { + return "Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"; + }; - /** - * Returns the difference of this and the specified Long. - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference - * @expose - */ - LongPrototype.subtract = function subtract(subtrahend) { - if (!isLong(subtrahend)) - subtrahend = fromValue(subtrahend); - return this.add(subtrahend.neg()); - }; + /** + * @alias ProtoBuf.DotProto.Tokenizer + * @expose + */ + DotProto.Tokenizer = Tokenizer; - /** - * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. - * @function - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference - * @expose - */ - LongPrototype.sub = LongPrototype.subtract; + /** + * Constructs a new Parser. + * @exports ProtoBuf.DotProto.Parser + * @class prototype parser + * @param {string} source Source + * @constructor + */ + var Parser = function(source) { - /** - * Returns the product of this and the specified Long. - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product - * @expose - */ - LongPrototype.multiply = function multiply(multiplier) { - if (this.isZero()) - return ZERO; - if (!isLong(multiplier)) - multiplier = fromValue(multiplier); - if (multiplier.isZero()) - return ZERO; - if (this.eq(MIN_VALUE)) - return multiplier.isOdd() ? MIN_VALUE : ZERO; - if (multiplier.eq(MIN_VALUE)) - return this.isOdd() ? MIN_VALUE : ZERO; + /** + * Tokenizer. + * @type {!ProtoBuf.DotProto.Tokenizer} + * @expose + */ + this.tn = new Tokenizer(source); - if (this.isNegative()) { - if (multiplier.isNegative()) - return this.neg().mul(multiplier.neg()); - else - return this.neg().mul(multiplier).neg(); - } else if (multiplier.isNegative()) - return this.mul(multiplier.neg()).neg(); + /** + * Whether parsing proto3 or not. + * @type {boolean} + */ + this.proto3 = false; + }; - // If both longs are small, use float multiplication - if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24)) - return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned); + /** + * @alias ProtoBuf.DotProto.Parser.prototype + * @inner + */ + var ParserPrototype = Parser.prototype; - // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. - // We can skip products that would overflow. + /** + * Parses the source. + * @returns {!Object} + * @throws {Error} If the source cannot be parsed + * @expose + */ + ParserPrototype.parse = function() { + var topLevel = { + "name": "[ROOT]", // temporary + "package": null, + "messages": [], + "enums": [], + "imports": [], + "options": {}, + "services": [] + // "syntax": undefined + }; + var token, + head = true, + weak; + try { + while (token = this.tn.next()) { + switch (token) { + case 'package': + if (!head || topLevel["package"] !== null) + throw Error("unexpected 'package'"); + token = this.tn.next(); + if (!Lang.TYPEREF.test(token)) + throw Error("illegal package name: " + token); + this.tn.skip(";"); + topLevel["package"] = token; + break; + case 'import': + if (!head) + throw Error("unexpected 'import'"); + token = this.tn.peek(); + if (token === "public" || (weak = token === "weak")) // token ignored + this.tn.next(); + token = this._readString(); + this.tn.skip(";"); + if (!weak) // import ignored + topLevel["imports"].push(token); + break; + case 'syntax': + if (!head) + throw Error("unexpected 'syntax'"); + this.tn.skip("="); + if ((topLevel["syntax"] = this._readString()) === "proto3") + this.proto3 = true; + this.tn.skip(";"); + break; + case 'message': + this._parseMessage(topLevel, null); + head = false; + break; + case 'enum': + this._parseEnum(topLevel); + head = false; + break; + case 'option': + this._parseOption(topLevel); + break; + case 'service': + this._parseService(topLevel); + break; + case 'extend': + this._parseExtend(topLevel); + break; + default: + throw Error("unexpected '" + token + "'"); + } + } + } catch (e) { + e.message = "Parse error at line "+this.tn.line+": " + e.message; + throw e; + } + delete topLevel["name"]; + return topLevel; + }; - var a48 = this.high >>> 16; - var a32 = this.high & 0xFFFF; - var a16 = this.low >>> 16; - var a00 = this.low & 0xFFFF; + /** + * Parses the specified source. + * @returns {!Object} + * @throws {Error} If the source cannot be parsed + * @expose + */ + Parser.parse = function(source) { + return new Parser(source).parse(); + }; - var b48 = multiplier.high >>> 16; - var b32 = multiplier.high & 0xFFFF; - var b16 = multiplier.low >>> 16; - var b00 = multiplier.low & 0xFFFF; + // ----- Conversion ------ - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 0xFFFF; - return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); - }; + /** + * Converts a numerical string to an id. + * @param {string} value + * @param {boolean=} mayBeNegative + * @returns {number} + * @inner + */ + function mkId(value, mayBeNegative) { + var id = -1, + sign = 1; + if (value.charAt(0) == '-') { + sign = -1; + value = value.substring(1); + } + if (Lang.NUMBER_DEC.test(value)) + id = parseInt(value); + else if (Lang.NUMBER_HEX.test(value)) + id = parseInt(value.substring(2), 16); + else if (Lang.NUMBER_OCT.test(value)) + id = parseInt(value.substring(1), 8); + else + throw Error("illegal id value: " + (sign < 0 ? '-' : '') + value); + id = (sign*id)|0; // Force to 32bit + if (!mayBeNegative && id < 0) + throw Error("illegal id value: " + (sign < 0 ? '-' : '') + value); + return id; + } - /** - * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. - * @function - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product - * @expose - */ - LongPrototype.mul = LongPrototype.multiply; + /** + * Converts a numerical string to a number. + * @param {string} val + * @returns {number} + * @inner + */ + function mkNumber(val) { + var sign = 1; + if (val.charAt(0) == '-') { + sign = -1; + val = val.substring(1); + } + if (Lang.NUMBER_DEC.test(val)) + return sign * parseInt(val, 10); + else if (Lang.NUMBER_HEX.test(val)) + return sign * parseInt(val.substring(2), 16); + else if (Lang.NUMBER_OCT.test(val)) + return sign * parseInt(val.substring(1), 8); + else if (val === 'inf') + return sign * Infinity; + else if (val === 'nan') + return NaN; + else if (Lang.NUMBER_FLT.test(val)) + return sign * parseFloat(val); + throw Error("illegal number value: " + (sign < 0 ? '-' : '') + val); + } - /** - * Returns this Long divided by the specified. The result is signed if this Long is signed or - * unsigned if this Long is unsigned. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient - * @expose - */ - LongPrototype.divide = function divide(divisor) { - if (!isLong(divisor)) - divisor = fromValue(divisor); - if (divisor.isZero()) - throw Error('division by zero'); - if (this.isZero()) - return this.unsigned ? UZERO : ZERO; - var approx, rem, res; - if (!this.unsigned) { - if (this.eq(MIN_VALUE)) { - if (divisor.eq(ONE) || divisor.eq(NEG_ONE)) - return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE - else if (divisor.eq(MIN_VALUE)) - return ONE; - else { - // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. - var halfThis = this.shr(1); - approx = halfThis.div(divisor).shl(1); - if (approx.eq(ZERO)) { - return divisor.isNegative() ? ONE : NEG_ONE; - } else { - rem = this.sub(divisor.mul(approx)); - res = approx.add(rem.div(divisor)); - return res; - } - } - } else if (divisor.eq(MIN_VALUE)) - return this.unsigned ? UZERO : ZERO; - if (this.isNegative()) { - if (divisor.isNegative()) - return this.neg().div(divisor.neg()); - return this.neg().div(divisor).neg(); - } else if (divisor.isNegative()) - return this.div(divisor.neg()).neg(); - } else if (!divisor.unsigned) - divisor = divisor.toUnsigned(); + // ----- Reading ------ - // The algorithm below has not been made for unsigned longs. It's therefore - // required to take special care of the MSB prior to running it. - if (this.unsigned) { - if (divisor.gt(this)) - return UZERO; - if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true - return UONE; - res = UZERO; - } else - res = ZERO; + /** + * Reads a string. + * @returns {string} + * @private + */ + ParserPrototype._readString = function() { + var value = "", + token, + delim; + do { + delim = this.tn.next(); + if (delim !== "'" && delim !== '"') + throw Error("illegal string delimiter: "+delim); + value += this.tn.next(); + this.tn.skip(delim); + token = this.tn.peek(); + } while (token === '"' || token === '"'); // multi line? + return value; + }; - // Repeat the following until the remainder is less than other: find a - // floating-point that approximates remainder / other *from below*, add this - // into the result, and subtract it from the remainder. It is critical that - // the approximate value is less than or equal to the real value so that the - // remainder never becomes negative. - rem = this; - while (rem.gte(divisor)) { - // Approximate the result of division. This may be a little greater or - // smaller than the actual value. - approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber())); + /** + * Reads a value. + * @param {boolean=} mayBeTypeRef + * @returns {number|boolean|string} + * @private + */ + ParserPrototype._readValue = function(mayBeTypeRef) { + var token = this.tn.peek(), + value; + if (token === '"' || token === "'") + return this._readString(); + this.tn.next(); + if (Lang.NUMBER.test(token)) + return mkNumber(token); + if (Lang.BOOL.test(token)) + return (token.toLowerCase() === 'true'); + if (mayBeTypeRef && Lang.TYPEREF.test(token)) + return token; + throw Error("illegal value: "+token); - // We will tweak the approximate result by changing it in the 48-th digit or - // the smallest non-fractional digit, whichever is larger. - var log2 = Math.ceil(Math.log(approx) / Math.LN2), - delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48), + }; - // Decrease the approximation until it is smaller than the remainder. Note - // that if it is too large, the product overflows and is negative. - approxRes = fromNumber(approx), - approxRem = approxRes.mul(divisor); - while (approxRem.isNegative() || approxRem.gt(rem)) { - approx -= delta; - approxRes = fromNumber(approx, this.unsigned); - approxRem = approxRes.mul(divisor); - } + // ----- Parsing constructs ----- - // We know the answer can't be zero... and actually, zero would cause - // infinite recursion since we would make no progress. - if (approxRes.isZero()) - approxRes = ONE; + /** + * Parses a namespace option. + * @param {!Object} parent Parent definition + * @param {boolean=} isList + * @private + */ + ParserPrototype._parseOption = function(parent, isList) { + var token = this.tn.next(), + custom = false; + if (token === '(') { + custom = true; + token = this.tn.next(); + } + if (!Lang.TYPEREF.test(token)) + // we can allow options of the form google.protobuf.* since they will just get ignored anyways + // if (!/google\.protobuf\./.test(token)) // FIXME: Why should that not be a valid typeref? + throw Error("illegal option name: "+token); + var name = token; + if (custom) { // (my_method_option).foo, (my_method_option), some_method_option, (foo.my_option).bar + this.tn.skip(')'); + name = '('+name+')'; + token = this.tn.peek(); + if (Lang.FQTYPEREF.test(token)) { + name += token; + this.tn.next(); + } + } + this.tn.skip('='); + this._parseOptionValue(parent, name); + if (!isList) + this.tn.skip(";"); + }; - res = res.add(approxRes); - rem = rem.sub(approxRem); + /** + * Sets an option on the specified options object. + * @param {!Object.} options + * @param {string} name + * @param {string|number|boolean} value + * @inner + */ + function setOption(options, name, value) { + if (typeof options[name] === 'undefined') + options[name] = value; + else { + if (!Array.isArray(options[name])) + options[name] = [ options[name] ]; + options[name].push(value); + } } - return res; - }; - /** - * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient - * @expose - */ - LongPrototype.div = LongPrototype.divide; + /** + * Parses an option value. + * @param {!Object} parent + * @param {string} name + * @private + */ + ParserPrototype._parseOptionValue = function(parent, name) { + var token = this.tn.peek(); + if (token !== '{') { // Plain value + setOption(parent["options"], name, this._readValue(true)); + } else { // Aggregate options + this.tn.skip("{"); + while ((token = this.tn.next()) !== '}') { + if (!Lang.NAME.test(token)) + throw Error("illegal option name: " + name + "." + token); + if (this.tn.omit(":")) + setOption(parent["options"], name + "." + token, this._readValue(true)); + else + this._parseOptionValue(parent, name + "." + token); + } + } + }; - /** - * Returns this Long modulo the specified. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder - * @expose - */ - LongPrototype.modulo = function modulo(divisor) { - if (!isLong(divisor)) - divisor = fromValue(divisor); - return this.sub(this.div(divisor).mul(divisor)); - }; + /** + * Parses a service definition. + * @param {!Object} parent Parent definition + * @private + */ + ParserPrototype._parseService = function(parent) { + var token = this.tn.next(); + if (!Lang.NAME.test(token)) + throw Error("illegal service name at line "+this.tn.line+": "+token); + var name = token; + var svc = { + "name": name, + "rpc": {}, + "options": {} + }; + this.tn.skip("{"); + while ((token = this.tn.next()) !== '}') { + if (token === "option") + this._parseOption(svc); + else if (token === 'rpc') + this._parseServiceRPC(svc); + else + throw Error("illegal service token: "+token); + } + this.tn.omit(";"); + parent["services"].push(svc); + }; - /** - * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder - * @expose - */ - LongPrototype.mod = LongPrototype.modulo; + /** + * Parses a RPC service definition of the form ['rpc', name, (request), 'returns', (response)]. + * @param {!Object} svc Service definition + * @private + */ + ParserPrototype._parseServiceRPC = function(svc) { + var type = "rpc", + token = this.tn.next(); + if (!Lang.NAME.test(token)) + throw Error("illegal rpc service method name: "+token); + var name = token; + var method = { + "request": null, + "response": null, + "request_stream": false, + "response_stream": false, + "options": {} + }; + this.tn.skip("("); + token = this.tn.next(); + if (token.toLowerCase() === "stream") { + method["request_stream"] = true; + token = this.tn.next(); + } + if (!Lang.TYPEREF.test(token)) + throw Error("illegal rpc service request type: "+token); + method["request"] = token; + this.tn.skip(")"); + token = this.tn.next(); + if (token.toLowerCase() !== "returns") + throw Error("illegal rpc service request type delimiter: "+token); + this.tn.skip("("); + token = this.tn.next(); + if (token.toLowerCase() === "stream") { + method["response_stream"] = true; + token = this.tn.next(); + } + method["response"] = token; + this.tn.skip(")"); + token = this.tn.peek(); + if (token === '{') { + this.tn.next(); + while ((token = this.tn.next()) !== '}') { + if (token === 'option') + this._parseOption(method); + else + throw Error("illegal rpc service token: " + token); + } + this.tn.omit(";"); + } else + this.tn.skip(";"); + if (typeof svc[type] === 'undefined') + svc[type] = {}; + svc[type][name] = method; + }; - /** - * Returns the bitwise NOT of this Long. - * @returns {!Long} - * @expose - */ - LongPrototype.not = function not() { - return fromBits(~this.low, ~this.high, this.unsigned); - }; + /** + * Parses a message definition. + * @param {!Object} parent Parent definition + * @param {!Object=} fld Field definition if this is a group + * @returns {!Object} + * @private + */ + ParserPrototype._parseMessage = function(parent, fld) { + var isGroup = !!fld, + token = this.tn.next(); + var msg = { + "name": "", + "fields": [], + "enums": [], + "messages": [], + "options": {}, + "services": [], + "oneofs": {} + // "extensions": undefined + }; + if (!Lang.NAME.test(token)) + throw Error("illegal "+(isGroup ? "group" : "message")+" name: "+token); + msg["name"] = token; + if (isGroup) { + this.tn.skip("="); + fld["id"] = mkId(this.tn.next()); + msg["isGroup"] = true; + } + token = this.tn.peek(); + if (token === '[' && fld) + this._parseFieldOptions(fld); + this.tn.skip("{"); + while ((token = this.tn.next()) !== '}') { + if (Lang.RULE.test(token)) + this._parseMessageField(msg, token); + else if (token === "oneof") + this._parseMessageOneOf(msg); + else if (token === "enum") + this._parseEnum(msg); + else if (token === "message") + this._parseMessage(msg); + else if (token === "option") + this._parseOption(msg); + else if (token === "service") + this._parseService(msg); + else if (token === "extensions") + msg["extensions"] = this._parseExtensionRanges(); + else if (token === "reserved") + this._parseIgnored(); // TODO + else if (token === "extend") + this._parseExtend(msg); + else if (Lang.TYPEREF.test(token)) { + if (!this.proto3) + throw Error("illegal field rule: "+token); + this._parseMessageField(msg, "optional", token); + } else + throw Error("illegal message token: "+token); + } + this.tn.omit(";"); + parent["messages"].push(msg); + return msg; + }; - /** - * Returns the bitwise AND of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} - * @expose - */ - LongPrototype.and = function and(other) { - if (!isLong(other)) - other = fromValue(other); - return fromBits(this.low & other.low, this.high & other.high, this.unsigned); - }; + /** + * Parses an ignored statement. + * @private + */ + ParserPrototype._parseIgnored = function() { + while (this.tn.peek() !== ';') + this.tn.next(); + this.tn.skip(";"); + }; - /** - * Returns the bitwise OR of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} - * @expose - */ - LongPrototype.or = function or(other) { - if (!isLong(other)) - other = fromValue(other); - return fromBits(this.low | other.low, this.high | other.high, this.unsigned); - }; + /** + * Parses a message field. + * @param {!Object} msg Message definition + * @param {string} rule Field rule + * @param {string=} type Field type if already known (never known for maps) + * @returns {!Object} Field descriptor + * @private + */ + ParserPrototype._parseMessageField = function(msg, rule, type) { + if (!Lang.RULE.test(rule)) + throw Error("illegal message field rule: "+rule); + var fld = { + "rule": rule, + "type": "", + "name": "", + "options": {}, + "id": 0 + }; + var token; + if (rule === "map") { - /** - * Returns the bitwise XOR of this Long and the given one. - * @param {!Long|number|string} other Other Long - * @returns {!Long} - * @expose - */ - LongPrototype.xor = function xor(other) { - if (!isLong(other)) - other = fromValue(other); - return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); - }; + if (type) + throw Error("illegal type: " + type); + this.tn.skip('<'); + token = this.tn.next(); + if (!Lang.TYPE.test(token) && !Lang.TYPEREF.test(token)) + throw Error("illegal message field type: " + token); + fld["keytype"] = token; + this.tn.skip(','); + token = this.tn.next(); + if (!Lang.TYPE.test(token) && !Lang.TYPEREF.test(token)) + throw Error("illegal message field: " + token); + fld["type"] = token; + this.tn.skip('>'); + token = this.tn.next(); + if (!Lang.NAME.test(token)) + throw Error("illegal message field name: " + token); + fld["name"] = token; + this.tn.skip("="); + fld["id"] = mkId(this.tn.next()); + token = this.tn.peek(); + if (token === '[') + this._parseFieldOptions(fld); + this.tn.skip(";"); - /** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - * @expose - */ - LongPrototype.shiftLeft = function shiftLeft(numBits) { - if (isLong(numBits)) - numBits = numBits.toInt(); - if ((numBits &= 63) === 0) - return this; - else if (numBits < 32) - return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned); - else - return fromBits(0, this.low << (numBits - 32), this.unsigned); - }; + } else { - /** - * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - * @expose - */ - LongPrototype.shl = LongPrototype.shiftLeft; + type = typeof type !== 'undefined' ? type : this.tn.next(); - /** - * Returns this Long with bits arithmetically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - * @expose - */ - LongPrototype.shiftRight = function shiftRight(numBits) { - if (isLong(numBits)) - numBits = numBits.toInt(); - if ((numBits &= 63) === 0) - return this; - else if (numBits < 32) - return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned); - else - return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned); - }; + if (type === "group") { - /** - * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - * @expose - */ - LongPrototype.shr = LongPrototype.shiftRight; + // "A [legacy] group simply combines a nested message type and a field into a single declaration. In your + // code, you can treat this message just as if it had a Result type field called result (the latter name is + // converted to lower-case so that it does not conflict with the former)." + var grp = this._parseMessage(msg, fld); + if (!/^[A-Z]/.test(grp["name"])) + throw Error('illegal group name: '+grp["name"]); + fld["type"] = grp["name"]; + fld["name"] = grp["name"].toLowerCase(); + this.tn.omit(";"); - /** - * Returns this Long with bits logically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - * @expose - */ - LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { - if (isLong(numBits)) - numBits = numBits.toInt(); - numBits &= 63; - if (numBits === 0) - return this; - else { - var high = this.high; - if (numBits < 32) { - var low = this.low; - return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned); - } else if (numBits === 32) - return fromBits(high, 0, this.unsigned); - else - return fromBits(high >>> (numBits - 32), 0, this.unsigned); - } - }; + } else { - /** - * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long - * @expose - */ - LongPrototype.shru = LongPrototype.shiftRightUnsigned; + if (!Lang.TYPE.test(type) && !Lang.TYPEREF.test(type)) + throw Error("illegal message field type: " + type); + fld["type"] = type; + token = this.tn.next(); + if (!Lang.NAME.test(token)) + throw Error("illegal message field name: " + token); + fld["name"] = token; + this.tn.skip("="); + fld["id"] = mkId(this.tn.next()); + token = this.tn.peek(); + if (token === "[") + this._parseFieldOptions(fld); + this.tn.skip(";"); - /** - * Converts this Long to signed. - * @returns {!Long} Signed long - * @expose - */ - LongPrototype.toSigned = function toSigned() { - if (!this.unsigned) - return this; - return fromBits(this.low, this.high, false); - }; + } + } + msg["fields"].push(fld); + return fld; + }; - /** - * Converts this Long to unsigned. - * @returns {!Long} Unsigned long - * @expose - */ - LongPrototype.toUnsigned = function toUnsigned() { - if (this.unsigned) - return this; - return fromBits(this.low, this.high, true); - }; + /** + * Parses a message oneof. + * @param {!Object} msg Message definition + * @private + */ + ParserPrototype._parseMessageOneOf = function(msg) { + var token = this.tn.next(); + if (!Lang.NAME.test(token)) + throw Error("illegal oneof name: "+token); + var name = token, + fld; + var fields = []; + this.tn.skip("{"); + while ((token = this.tn.next()) !== "}") { + fld = this._parseMessageField(msg, "optional", token); + fld["oneof"] = name; + fields.push(fld["id"]); + } + this.tn.omit(";"); + msg["oneofs"][name] = fields; + }; - return Long; -}); - -/* - Copyright 2013-2014 Daniel Wirtz + /** + * Parses a set of field option definitions. + * @param {!Object} fld Field definition + * @private + */ + ParserPrototype._parseFieldOptions = function(fld) { + this.tn.skip("["); + var token, + first = true; + while ((token = this.tn.peek()) !== ']') { + if (!first) + this.tn.skip(","); + this._parseOption(fld, true); + first = false; + } + this.tn.next(); + }; - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + /** + * Parses an enum. + * @param {!Object} msg Message definition + * @private + */ + ParserPrototype._parseEnum = function(msg) { + var enm = { + "name": "", + "values": [], + "options": {} + }; + var token = this.tn.next(); + if (!Lang.NAME.test(token)) + throw Error("illegal name: "+token); + enm["name"] = token; + this.tn.skip("{"); + while ((token = this.tn.next()) !== '}') { + if (token === "option") + this._parseOption(enm); + else { + if (!Lang.NAME.test(token)) + throw Error("illegal name: "+token); + this.tn.skip("="); + var val = { + "name": token, + "id": mkId(this.tn.next(), true) + }; + token = this.tn.peek(); + if (token === "[") + this._parseFieldOptions({ "options": {} }); + this.tn.skip(";"); + enm["values"].push(val); + } + } + this.tn.omit(";"); + msg["enums"].push(enm); + }; - http://www.apache.org/licenses/LICENSE-2.0 + /** + * Parses extension / reserved ranges. + * @returns {!Array.>} + * @private + */ + ParserPrototype._parseExtensionRanges = function() { + var ranges = []; + var token, + range, + value; + do { + range = []; + while (true) { + token = this.tn.next(); + switch (token) { + case "min": + value = ProtoBuf.ID_MIN; + break; + case "max": + value = ProtoBuf.ID_MAX; + break; + default: + value = mkNumber(token); + break; + } + range.push(value); + if (range.length === 2) + break; + if (this.tn.peek() !== "to") { + range.push(value); + break; + } + this.tn.next(); + } + ranges.push(range); + } while (this.tn.omit(",")); + this.tn.skip(";"); + return ranges; + }; - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ + /** + * Parses an extend block. + * @param {!Object} parent Parent object + * @private + */ + ParserPrototype._parseExtend = function(parent) { + var token = this.tn.next(); + if (!Lang.TYPEREF.test(token)) + throw Error("illegal extend reference: "+token); + var ext = { + "ref": token, + "fields": [] + }; + this.tn.skip("{"); + while ((token = this.tn.next()) !== '}') { + if (Lang.RULE.test(token)) + this._parseMessageField(ext, token); + else if (Lang.TYPEREF.test(token)) { + if (!this.proto3) + throw Error("illegal field rule: "+token); + this._parseMessageField(ext, "optional", token); + } else + throw Error("illegal extend token: "+token); + } + this.tn.omit(";"); + parent["messages"].push(ext); + return ext; + }; -/** - * @license ByteBuffer.js (c) 2013-2014 Daniel Wirtz - * This version of ByteBuffer.js uses an ArrayBuffer as its backing buffer which is accessed through a DataView and is - * compatible with modern browsers. - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/ByteBuffer.js for details - */ // -(function(global) { - "use strict"; + // ----- General ----- - /** - * @param {function(new: Long, number, number, boolean=)=} Long - * @returns {function(new: ByteBuffer, number=, boolean=, boolean=)}} - * @inner - */ - function loadByteBuffer(Long) { + /** + * Returns a string representation of this parser. + * @returns {string} + */ + ParserPrototype.toString = function() { + return "Parser at line "+this.tn.line; + }; /** - * Constructs a new ByteBuffer. - * @class The swiss army knife for binary data in JavaScript. - * @exports ByteBuffer - * @constructor - * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @alias ProtoBuf.DotProto.Parser * @expose */ - var ByteBuffer = function(capacity, littleEndian, noAssert) { - if (typeof capacity === 'undefined') capacity = ByteBuffer.DEFAULT_CAPACITY; - if (typeof littleEndian === 'undefined') littleEndian = ByteBuffer.DEFAULT_ENDIAN; - if (typeof noAssert === 'undefined') noAssert = ByteBuffer.DEFAULT_NOASSERT; - if (!noAssert) { - capacity = capacity | 0; - if (capacity < 0) - throw RangeError("Illegal capacity"); - littleEndian = !!littleEndian; - noAssert = !!noAssert; - } + DotProto.Parser = Parser; - /** - * Backing buffer. - * @type {!ArrayBuffer} - * @expose - */ - this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity); + return DotProto; - /** - * Data view to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. - * @type {?DataView} - * @expose - */ - this.view = capacity === 0 ? null : new DataView(this.buffer); + })(ProtoBuf, ProtoBuf.Lang); - /** - * Absolute read/write offset. - * @type {number} - * @expose - * @see ByteBuffer#flip - * @see ByteBuffer#clear - */ - this.offset = 0; + /** + * @alias ProtoBuf.Reflect + * @expose + */ + ProtoBuf.Reflect = (function(ProtoBuf) { + "use strict"; + + /** + * Reflection types. + * @exports ProtoBuf.Reflect + * @namespace + */ + var Reflect = {}; + + /** + * Constructs a Reflect base class. + * @exports ProtoBuf.Reflect.T + * @constructor + * @abstract + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {?ProtoBuf.Reflect.T} parent Parent object + * @param {string} name Object name + */ + var T = function(builder, parent, name) { /** - * Marked offset. - * @type {number} + * Builder reference. + * @type {!ProtoBuf.Builder} * @expose - * @see ByteBuffer#mark - * @see ByteBuffer#reset */ - this.markedOffset = -1; + this.builder = builder; /** - * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. - * @type {number} + * Parent object. + * @type {?ProtoBuf.Reflect.T} * @expose - * @see ByteBuffer#flip - * @see ByteBuffer#clear */ - this.limit = capacity; + this.parent = parent; /** - * Whether to use little endian byte order, defaults to `false` for big endian. - * @type {boolean} + * Object name in namespace. + * @type {string} * @expose */ - this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : false; + this.name = name; /** - * Whether to skip assertions of offsets and values, defaults to `false`. - * @type {boolean} + * Fully qualified class name + * @type {string} * @expose */ - this.noAssert = !!noAssert; + this.className; }; /** - * ByteBuffer version. - * @type {string} - * @const - * @expose + * @alias ProtoBuf.Reflect.T.prototype + * @inner */ - ByteBuffer.VERSION = "3.5.5"; + var TPrototype = T.prototype; /** - * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. - * @type {boolean} - * @const + * Returns the fully qualified name of this object. + * @returns {string} Fully qualified name as of ".PATH.TO.THIS" * @expose */ - ByteBuffer.LITTLE_ENDIAN = true; + TPrototype.fqn = function() { + var name = this.name, + ptr = this; + do { + ptr = ptr.parent; + if (ptr == null) + break; + name = ptr.name+"."+name; + } while (true); + return name; + }; /** - * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. - * @type {boolean} - * @const + * Returns a string representation of this Reflect object (its fully qualified name). + * @param {boolean=} includeClass Set to true to include the class name. Defaults to false. + * @return String representation * @expose */ - ByteBuffer.BIG_ENDIAN = false; + TPrototype.toString = function(includeClass) { + return (includeClass ? this.className + " " : "") + this.fqn(); + }; /** - * Default initial capacity of `16`. - * @type {number} + * Builds this type. + * @throws {Error} If this type cannot be built directly * @expose */ - ByteBuffer.DEFAULT_CAPACITY = 16; + TPrototype.build = function() { + throw Error(this.toString(true)+" cannot be built directly"); + }; /** - * Default endianess of `false` for big endian. - * @type {boolean} + * @alias ProtoBuf.Reflect.T * @expose */ - ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN; + Reflect.T = T; /** - * Default no assertions flag of `false`. - * @type {boolean} - * @expose + * Constructs a new Namespace. + * @exports ProtoBuf.Reflect.Namespace + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {?ProtoBuf.Reflect.Namespace} parent Namespace parent + * @param {string} name Namespace name + * @param {Object.=} options Namespace options + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.T */ - ByteBuffer.DEFAULT_NOASSERT = false; + var Namespace = function(builder, parent, name, options, syntax) { + T.call(this, builder, parent, name); - /** - * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded - * and int64 support is not available. - * @type {?Long} - * @const - * @see https://github.com/dcodeIO/Long.js - * @expose - */ - ByteBuffer.Long = Long || null; + /** + * @override + */ + this.className = "Namespace"; - /** - * @alias ByteBuffer.prototype - * @inner - */ - var ByteBufferPrototype = ByteBuffer.prototype; + /** + * Children inside the namespace. + * @type {!Array.} + */ + this.children = []; - // helpers + /** + * Options. + * @type {!Object.} + */ + this.options = options || {}; - /** - * @type {!ArrayBuffer} - * @inner - */ - var EMPTY_BUFFER = new ArrayBuffer(0); + /** + * Syntax level (e.g., proto2 or proto3). + * @type {!string} + */ + this.syntax = syntax || "proto2"; + }; /** - * String.fromCharCode reference for compile-time renaming. - * @type {function(...number):string} + * @alias ProtoBuf.Reflect.Namespace.prototype * @inner */ - var stringFromCharCode = String.fromCharCode; + var NamespacePrototype = Namespace.prototype = Object.create(T.prototype); /** - * Creates a source function for a string. - * @param {string} s String to read from - * @returns {function():number|null} Source function returning the next char code respectively `null` if there are - * no more characters left. - * @throws {TypeError} If the argument is invalid - * @inner + * Returns an array of the namespace's children. + * @param {ProtoBuf.Reflect.T=} type Filter type (returns instances of this type only). Defaults to null (all children). + * @return {Array.} + * @expose */ - function stringSource(s) { - var i=0; return function() { - return i < s.length ? s.charCodeAt(i++) : null; - }; - } + NamespacePrototype.getChildren = function(type) { + type = type || null; + if (type == null) + return this.children.slice(); + var children = []; + for (var i=0, k=this.children.length; i 1024) - ps.push(stringFromCharCode.apply(String, cs)), - cs.length = 0; - Array.prototype.push.apply(cs, arguments); - }; - } + NamespacePrototype.addChild = function(child) { + var other; + if (other = this.getChild(child.name)) { + // Try to revert camelcase transformation on collision + if (other instanceof Message.Field && other.name !== other.originalName && this.getChild(other.originalName) === null) + other.name = other.originalName; // Revert previous first (effectively keeps both originals) + else if (child instanceof Message.Field && child.name !== child.originalName && this.getChild(child.originalName) === null) + child.name = child.originalName; + else + throw Error("Duplicate name in namespace "+this.toString(true)+": "+child.name); + } + this.children.push(child); + }; /** - * Allocates a new ByteBuffer backed by a buffer of the specified capacity. - * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} + * Gets a child by its name or id. + * @param {string|number} nameOrId Child name or id + * @return {?ProtoBuf.Reflect.T} The child or null if not found * @expose */ - ByteBuffer.allocate = function(capacity, littleEndian, noAssert) { - return new ByteBuffer(capacity, littleEndian, noAssert); + NamespacePrototype.getChild = function(nameOrId) { + var key = typeof nameOrId === 'number' ? 'id' : 'name'; + for (var i=0, k=this.children.length; i} buffers Buffers to concatenate - * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", - * defaults to "utf8") - * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults - * to {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} Concatenated ByteBuffer + * Resolves a reflect object inside of this namespace. + * @param {string|!Array.} qn Qualified name to resolve + * @param {boolean=} excludeNonNamespace Excludes non-namespace types, defaults to `false` + * @return {?ProtoBuf.Reflect.Namespace} The resolved type or null if not found * @expose */ - ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) { - if (typeof encoding === 'boolean' || typeof encoding !== 'string') { - noAssert = littleEndian; - littleEndian = encoding; - encoding = undefined; - } - var capacity = 0; - for (var i=0, k=buffers.length, length; i 0) capacity += length; - } - if (capacity === 0) - return new ByteBuffer(0, littleEndian, noAssert); - var bb = new ByteBuffer(capacity, littleEndian, noAssert), - bi; - var view = new Uint8Array(bb.buffer); - i=0; while (i} Runtime namespace * @expose */ - ByteBuffer.type = function() { - return ArrayBuffer; + NamespacePrototype.build = function() { + /** @dict */ + var ns = {}; + var children = this.children; + for (var i=0, k=children.length, child; i} buffer Anything that can be wrapped - * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to - * "utf8") - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` - * @expose + * Builds the namespace's '$options' property. + * @return {Object.} */ - ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) { - if (typeof encoding !== 'string') { - noAssert = littleEndian; - littleEndian = encoding; - encoding = undefined; - } - if (typeof buffer === 'string') { - if (typeof encoding === 'undefined') - encoding = "utf8"; - switch (encoding) { - case "base64": - return ByteBuffer.fromBase64(buffer, littleEndian); - case "hex": - return ByteBuffer.fromHex(buffer, littleEndian); - case "binary": - return ByteBuffer.fromBinary(buffer, littleEndian); - case "utf8": - return ByteBuffer.fromUTF8(buffer, littleEndian); - case "debug": - return ByteBuffer.fromDebug(buffer, littleEndian); - default: - throw Error("Unsupported encoding: "+encoding); - } - } - if (buffer === null || typeof buffer !== 'object') - throw TypeError("Illegal buffer"); - var bb; - if (ByteBuffer.isByteBuffer(buffer)) { - bb = ByteBufferPrototype.clone.call(buffer); - bb.markedOffset = -1; - return bb; + NamespacePrototype.buildOpt = function() { + var opt = {}, + keys = Object.keys(this.options); + for (var i=0, k=keys.length; i 0) { // Avoid references to more than one EMPTY_BUFFER - bb.buffer = buffer.buffer; - bb.offset = buffer.byteOffset; - bb.limit = buffer.byteOffset + buffer.length; - bb.view = buffer.length > 0 ? new DataView(buffer.buffer) : null; - } - } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer - bb = new ByteBuffer(0, littleEndian, noAssert); - if (buffer.byteLength > 0) { - bb.buffer = buffer; - bb.offset = 0; - bb.limit = buffer.byteLength; - bb.view = buffer.byteLength > 0 ? new DataView(buffer) : null; - } - } else if (Object.prototype.toString.call(buffer) === "[object Array]") { // Create from octets - bb = new ByteBuffer(buffer.length, littleEndian, noAssert); - bb.limit = buffer.length; - for (i=0; i}null} Option value or NULL if there is no such option */ - ByteBufferPrototype.writeInt8 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value !== 'number' || value % 1 !== 0) - throw TypeError("Illegal value: "+value+" (not an integer)"); - value |= 0; - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - offset += 1; - var capacity0 = this.buffer.byteLength; - if (offset > capacity0) - this.resize((capacity0 *= 2) > offset ? capacity0 : offset); - offset -= 1; - this.view.setInt8(offset, value); - if (relative) this.offset += 1; - return this; + NamespacePrototype.getOption = function(name) { + if (typeof name === 'undefined') + return this.options; + return typeof this.options[name] !== 'undefined' ? this.options[name] : null; }; /** - * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this + * @alias ProtoBuf.Reflect.Namespace * @expose */ - ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8; + Reflect.Namespace = Namespace; /** - * Reads an 8bit signed integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + * Constructs a new Element implementation that checks and converts values for a + * particular field type, as appropriate. + * + * An Element represents a single value: either the value of a singular field, + * or a value contained in one entry of a repeated field or map field. This + * class does not implement these higher-level concepts; it only encapsulates + * the low-level typechecking and conversion. + * + * @exports ProtoBuf.Reflect.Element + * @param {{name: string, wireType: number}} type Resolved data type + * @param {ProtoBuf.Reflect.T|null} resolvedType Resolved type, if relevant + * (e.g. submessage field). + * @param {boolean} isMapKey Is this element a Map key? The value will be + * converted to string form if so. + * @param {string} syntax Syntax level of defining message type, e.g., + * proto2 or proto3. + * @constructor */ - ByteBufferPrototype.readInt8 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 1 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); - } - var value = this.view.getInt8(offset); - if (relative) this.offset += 1; - return value; + var Element = function(type, resolvedType, isMapKey, syntax) { + + /** + * Element type, as a string (e.g., int32). + * @type {{name: string, wireType: number}} + */ + this.type = type; + + /** + * Element type reference to submessage or enum definition, if needed. + * @type {ProtoBuf.Reflect.T|null} + */ + this.resolvedType = resolvedType; + + /** + * Element is a map key. + * @type {boolean} + */ + this.isMapKey = isMapKey; + + /** + * Syntax level of defining message type, e.g., proto2 or proto3. + * @type {string} + */ + this.syntax = syntax; + + if (isMapKey && ProtoBuf.MAP_KEY_TYPES.indexOf(type) < 0) + throw Error("Invalid map key type: " + type.name); }; + var ElementPrototype = Element.prototype; + /** - * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. + * Obtains a (new) default value for the specified type. + * @param type {string|{name: string, wireType: number}} Field type + * @returns {*} Default value + * @inner + */ + function mkDefault(type) { + if (typeof type === 'string') + type = ProtoBuf.TYPES[type]; + if (typeof type.defaultValue === 'undefined') + throw Error("default value for type "+type.name+" is not supported"); + if (type == ProtoBuf.TYPES["bytes"]) + return new ByteBuffer(0); + return type.defaultValue; + } + + /** + * Returns the default value for this field in proto3. * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + * @param type {string|{name: string, wireType: number}} the field type + * @returns {*} Default value */ - ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8; + Element.defaultFieldValue = mkDefault; /** - * Writes an 8bit unsigned integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this - * @expose + * Makes a Long from a value. + * @param {{low: number, high: number, unsigned: boolean}|string|number} value Value + * @param {boolean=} unsigned Whether unsigned or not, defaults to reuse it from Long-like objects or to signed for + * strings and numbers + * @returns {!Long} + * @throws {Error} If the value cannot be converted to a Long + * @inner */ - ByteBufferPrototype.writeUint8 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value !== 'number' || value % 1 !== 0) - throw TypeError("Illegal value: "+value+" (not an integer)"); - value >>>= 0; - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - offset += 1; - var capacity1 = this.buffer.byteLength; - if (offset > capacity1) - this.resize((capacity1 *= 2) > offset ? capacity1 : offset); - offset -= 1; - this.view.setUint8(offset, value); - if (relative) this.offset += 1; - return this; - }; + function mkLong(value, unsigned) { + if (value && typeof value.low === 'number' && typeof value.high === 'number' && typeof value.unsigned === 'boolean' + && value.low === value.low && value.high === value.high) + return new ProtoBuf.Long(value.low, value.high, typeof unsigned === 'undefined' ? value.unsigned : unsigned); + if (typeof value === 'string') + return ProtoBuf.Long.fromString(value, unsigned || false, 10); + if (typeof value === 'number') + return ProtoBuf.Long.fromNumber(value, unsigned || false); + throw Error("not convertible to Long"); + } /** - * Reads an 8bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read + * Checks if the given value can be set for an element of this type (singular + * field or one element of a repeated field or map). + * @param {*} value Value to check + * @return {*} Verified, maybe adjusted, value + * @throws {Error} If the value cannot be verified for this element slot * @expose */ - ByteBufferPrototype.readUint8 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 1 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + ElementPrototype.verifyValue = function(value) { + var self = this; + function fail(val, msg) { + throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); + } + switch (this.type) { + // Signed 32bit + case ProtoBuf.TYPES["int32"]: + case ProtoBuf.TYPES["sint32"]: + case ProtoBuf.TYPES["sfixed32"]: + // Account for !NaN: value === value + if (typeof value !== 'number' || (value === value && value % 1 !== 0)) + fail(typeof value, "not an integer"); + return value > 4294967295 ? value | 0 : value; + + // Unsigned 32bit + case ProtoBuf.TYPES["uint32"]: + case ProtoBuf.TYPES["fixed32"]: + if (typeof value !== 'number' || (value === value && value % 1 !== 0)) + fail(typeof value, "not an integer"); + return value < 0 ? value >>> 0 : value; + + // Signed 64bit + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["sint64"]: + case ProtoBuf.TYPES["sfixed64"]: { + if (ProtoBuf.Long) + try { + return mkLong(value, false); + } catch (e) { + fail(typeof value, e.message); + } + else + fail(typeof value, "requires Long.js"); + } + + // Unsigned 64bit + case ProtoBuf.TYPES["uint64"]: + case ProtoBuf.TYPES["fixed64"]: { + if (ProtoBuf.Long) + try { + return mkLong(value, true); + } catch (e) { + fail(typeof value, e.message); + } + else + fail(typeof value, "requires Long.js"); + } + + // Bool + case ProtoBuf.TYPES["bool"]: + if (typeof value !== 'boolean') + fail(typeof value, "not a boolean"); + return value; + + // Float + case ProtoBuf.TYPES["float"]: + case ProtoBuf.TYPES["double"]: + if (typeof value !== 'number') + fail(typeof value, "not a number"); + return value; + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + if (typeof value !== 'string' && !(value && value instanceof String)) + fail(typeof value, "not a string"); + return ""+value; // Convert String object to string + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: + if (ByteBuffer.isByteBuffer(value)) + return value; + return ByteBuffer.wrap(value, "base64"); + + // Constant enum value + case ProtoBuf.TYPES["enum"]: { + var values = this.resolvedType.getChildren(ProtoBuf.Reflect.Enum.Value); + for (i=0; i 4294967295 || value < 0) + fail(typeof value, "not in range for uint32") + return value; + } else { + // proto2 requires enum values to be valid. + fail(value, "not a valid enum value"); + } + } + // Embedded message + case ProtoBuf.TYPES["group"]: + case ProtoBuf.TYPES["message"]: { + if (!value || typeof value !== 'object') + fail(typeof value, "object expected"); + if (value instanceof this.resolvedType.clazz) + return value; + if (value instanceof ProtoBuf.Builder.Message) { + // Mismatched type: Convert to object (see: https://github.com/dcodeIO/ProtoBuf.js/issues/180) + var obj = {}; + for (var i in value) + if (value.hasOwnProperty(i)) + obj[i] = value[i]; + value = obj; + } + // Else let's try to construct one from a key-value object + return new (this.resolvedType.clazz)(value); // May throw for a hundred of reasons + } } - var value = this.view.getUint8(offset); - if (relative) this.offset += 1; - return value; - }; - // types/ints/int16 + // We should never end here + throw Error("[INTERNAL] Illegal value for "+this.toString(true)+": "+value+" (undefined type "+this.type+")"); + }; /** - * Writes a 16bit signed integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds + * Calculates the byte length of an element on the wire. + * @param {number} id Field number + * @param {*} value Field value + * @returns {number} Byte length + * @throws {Error} If the value cannot be calculated * @expose */ - ByteBufferPrototype.writeInt16 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value !== 'number' || value % 1 !== 0) - throw TypeError("Illegal value: "+value+" (not an integer)"); - value |= 0; - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + ElementPrototype.calculateLength = function(id, value) { + if (value === null) return 0; // Nothing to encode + // Tag has already been written + var n; + switch (this.type) { + case ProtoBuf.TYPES["int32"]: + return value < 0 ? ByteBuffer.calculateVarint64(value) : ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["uint32"]: + return ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["sint32"]: + return ByteBuffer.calculateVarint32(ByteBuffer.zigZagEncode32(value)); + case ProtoBuf.TYPES["fixed32"]: + case ProtoBuf.TYPES["sfixed32"]: + case ProtoBuf.TYPES["float"]: + return 4; + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["uint64"]: + return ByteBuffer.calculateVarint64(value); + case ProtoBuf.TYPES["sint64"]: + return ByteBuffer.calculateVarint64(ByteBuffer.zigZagEncode64(value)); + case ProtoBuf.TYPES["fixed64"]: + case ProtoBuf.TYPES["sfixed64"]: + return 8; + case ProtoBuf.TYPES["bool"]: + return 1; + case ProtoBuf.TYPES["enum"]: + return ByteBuffer.calculateVarint32(value); + case ProtoBuf.TYPES["double"]: + return 8; + case ProtoBuf.TYPES["string"]: + n = ByteBuffer.calculateUTF8Bytes(value); + return ByteBuffer.calculateVarint32(n) + n; + case ProtoBuf.TYPES["bytes"]: + if (value.remaining() < 0) + throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); + return ByteBuffer.calculateVarint32(value.remaining()) + value.remaining(); + case ProtoBuf.TYPES["message"]: + n = this.resolvedType.calculate(value); + return ByteBuffer.calculateVarint32(n) + n; + case ProtoBuf.TYPES["group"]: + n = this.resolvedType.calculate(value); + return n + ByteBuffer.calculateVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); } - offset += 2; - var capacity2 = this.buffer.byteLength; - if (offset > capacity2) - this.resize((capacity2 *= 2) > offset ? capacity2 : offset); - offset -= 2; - this.view.setInt16(offset, value, this.littleEndian); - if (relative) this.offset += 2; - return this; + // We should never end here + throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); }; /** - * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds + * Encodes a value to the specified buffer. Does not encode the key. + * @param {number} id Field number + * @param {*} value Field value + * @param {ByteBuffer} buffer ByteBuffer to encode to + * @return {ByteBuffer} The ByteBuffer for chaining + * @throws {Error} If the value cannot be encoded * @expose */ - ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16; + ElementPrototype.encodeValue = function(id, value, buffer) { + if (value === null) return buffer; // Nothing to encode + // Tag has already been written - /** - * Reads a 16bit signed integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose - */ - ByteBufferPrototype.readInt16 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 2 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + switch (this.type) { + // 32bit signed varint + case ProtoBuf.TYPES["int32"]: + // "If you use int32 or int64 as the type for a negative number, the resulting varint is always ten bytes + // long – it is, effectively, treated like a very large unsigned integer." (see #122) + if (value < 0) + buffer.writeVarint64(value); + else + buffer.writeVarint32(value); + break; + + // 32bit unsigned varint + case ProtoBuf.TYPES["uint32"]: + buffer.writeVarint32(value); + break; + + // 32bit varint zig-zag + case ProtoBuf.TYPES["sint32"]: + buffer.writeVarint32ZigZag(value); + break; + + // Fixed unsigned 32bit + case ProtoBuf.TYPES["fixed32"]: + buffer.writeUint32(value); + break; + + // Fixed signed 32bit + case ProtoBuf.TYPES["sfixed32"]: + buffer.writeInt32(value); + break; + + // 64bit varint as-is + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["uint64"]: + buffer.writeVarint64(value); // throws + break; + + // 64bit varint zig-zag + case ProtoBuf.TYPES["sint64"]: + buffer.writeVarint64ZigZag(value); // throws + break; + + // Fixed unsigned 64bit + case ProtoBuf.TYPES["fixed64"]: + buffer.writeUint64(value); // throws + break; + + // Fixed signed 64bit + case ProtoBuf.TYPES["sfixed64"]: + buffer.writeInt64(value); // throws + break; + + // Bool + case ProtoBuf.TYPES["bool"]: + if (typeof value === 'string') + buffer.writeVarint32(value.toLowerCase() === 'false' ? 0 : !!value); + else + buffer.writeVarint32(value ? 1 : 0); + break; + + // Constant enum value + case ProtoBuf.TYPES["enum"]: + buffer.writeVarint32(value); + break; + + // 32bit float + case ProtoBuf.TYPES["float"]: + buffer.writeFloat32(value); + break; + + // 64bit float + case ProtoBuf.TYPES["double"]: + buffer.writeFloat64(value); + break; + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + buffer.writeVString(value); + break; + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: + if (value.remaining() < 0) + throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); + var prevOffset = value.offset; + buffer.writeVarint32(value.remaining()); + buffer.append(value); + value.offset = prevOffset; + break; + + // Embedded message + case ProtoBuf.TYPES["message"]: + var bb = new ByteBuffer().LE(); + this.resolvedType.encode(value, bb); + buffer.writeVarint32(bb.offset); + buffer.append(bb.flip()); + break; + + // Legacy group + case ProtoBuf.TYPES["group"]: + this.resolvedType.encode(value, buffer); + buffer.writeVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); + break; + + default: + // We should never end here + throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); } - var value = this.view.getInt16(offset, this.littleEndian); - if (relative) this.offset += 2; - return value; + return buffer; }; /** - * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. - * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds + * Decode one element value from the specified buffer. + * @param {ByteBuffer} buffer ByteBuffer to decode from + * @param {number} wireType The field wire type + * @param {number} id The field number + * @return {*} Decoded value + * @throws {Error} If the field cannot be decoded * @expose */ - ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16; + ElementPrototype.decode = function(buffer, wireType, id) { + if (wireType != this.type.wireType) + throw Error("Unexpected wire type for element"); - /** - * Writes a 16bit unsigned integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose - */ - ByteBufferPrototype.writeUint16 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value !== 'number' || value % 1 !== 0) - throw TypeError("Illegal value: "+value+" (not an integer)"); - value >>>= 0; - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + var value, nBytes; + switch (this.type) { + // 32bit signed varint + case ProtoBuf.TYPES["int32"]: + return buffer.readVarint32() | 0; + + // 32bit unsigned varint + case ProtoBuf.TYPES["uint32"]: + return buffer.readVarint32() >>> 0; + + // 32bit signed varint zig-zag + case ProtoBuf.TYPES["sint32"]: + return buffer.readVarint32ZigZag() | 0; + + // Fixed 32bit unsigned + case ProtoBuf.TYPES["fixed32"]: + return buffer.readUint32() >>> 0; + + case ProtoBuf.TYPES["sfixed32"]: + return buffer.readInt32() | 0; + + // 64bit signed varint + case ProtoBuf.TYPES["int64"]: + return buffer.readVarint64(); + + // 64bit unsigned varint + case ProtoBuf.TYPES["uint64"]: + return buffer.readVarint64().toUnsigned(); + + // 64bit signed varint zig-zag + case ProtoBuf.TYPES["sint64"]: + return buffer.readVarint64ZigZag(); + + // Fixed 64bit unsigned + case ProtoBuf.TYPES["fixed64"]: + return buffer.readUint64(); + + // Fixed 64bit signed + case ProtoBuf.TYPES["sfixed64"]: + return buffer.readInt64(); + + // Bool varint + case ProtoBuf.TYPES["bool"]: + return !!buffer.readVarint32(); + + // Constant enum value (varint) + case ProtoBuf.TYPES["enum"]: + // The following Builder.Message#set will already throw + return buffer.readVarint32(); + + // 32bit float + case ProtoBuf.TYPES["float"]: + return buffer.readFloat(); + + // 64bit float + case ProtoBuf.TYPES["double"]: + return buffer.readDouble(); + + // Length-delimited string + case ProtoBuf.TYPES["string"]: + return buffer.readVString(); + + // Length-delimited bytes + case ProtoBuf.TYPES["bytes"]: { + nBytes = buffer.readVarint32(); + if (buffer.remaining() < nBytes) + throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); + value = buffer.clone(); // Offset already set + value.limit = value.offset+nBytes; + buffer.offset += nBytes; + return value; + } + + // Length-delimited embedded message + case ProtoBuf.TYPES["message"]: { + nBytes = buffer.readVarint32(); + return this.resolvedType.decode(buffer, nBytes); + } + + // Legacy group + case ProtoBuf.TYPES["group"]: + return this.resolvedType.decode(buffer, -1, id); } - offset += 2; - var capacity3 = this.buffer.byteLength; - if (offset > capacity3) - this.resize((capacity3 *= 2) > offset ? capacity3 : offset); - offset -= 2; - this.view.setUint16(offset, value, this.littleEndian); - if (relative) this.offset += 2; - return this; + + // We should never end here + throw Error("[INTERNAL] Illegal decode type"); }; /** - * Reads a 16bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + * Converts a value from a string to the canonical element type. + * + * Legal only when isMapKey is true. + * + * @param {string} str The string value + * @returns {*} The value */ - ByteBufferPrototype.readUint16 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 2 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); + ElementPrototype.valueFromString = function(str) { + if (!this.isMapKey) { + throw Error("valueFromString() called on non-map-key element"); } - var value = this.view.getUint16(offset, this.littleEndian); - if (relative) this.offset += 2; - return value; - }; - // types/ints/int32 + switch (this.type) { + case ProtoBuf.TYPES["int32"]: + case ProtoBuf.TYPES["sint32"]: + case ProtoBuf.TYPES["sfixed32"]: + case ProtoBuf.TYPES["uint32"]: + case ProtoBuf.TYPES["fixed32"]: + return this.verifyValue(parseInt(str)); - /** - * Writes a 32bit signed integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose - */ - ByteBufferPrototype.writeInt32 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value !== 'number' || value % 1 !== 0) - throw TypeError("Illegal value: "+value+" (not an integer)"); - value |= 0; - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - offset += 4; - var capacity4 = this.buffer.byteLength; - if (offset > capacity4) - this.resize((capacity4 *= 2) > offset ? capacity4 : offset); - offset -= 4; - this.view.setInt32(offset, value, this.littleEndian); - if (relative) this.offset += 4; - return this; - }; + case ProtoBuf.TYPES["int64"]: + case ProtoBuf.TYPES["sint64"]: + case ProtoBuf.TYPES["sfixed64"]: + case ProtoBuf.TYPES["uint64"]: + case ProtoBuf.TYPES["fixed64"]: + // Long-based fields support conversions from string already. + return this.verifyValue(str); - /** - * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose - */ - ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32; + case ProtoBuf.TYPES["bool"]: + return str === "true"; - /** - * Reads a 32bit signed integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose - */ - ByteBufferPrototype.readInt32 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 4 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + case ProtoBuf.TYPES["string"]: + return this.verifyValue(str); + + case ProtoBuf.TYPES["bytes"]: + return ByteBuffer.fromBinary(str); } - var value = this.view.getInt32(offset, this.littleEndian); - if (relative) this.offset += 4; - return value; }; /** - * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose - */ - ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32; - - /** - * Writes a 32bit unsigned integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose + * Converts a value from the canonical element type to a string. + * + * It should be the case that `valueFromString(valueToString(val))` returns + * a value equivalent to `verifyValue(val)` for every legal value of `val` + * according to this element type. + * + * This may be used when the element must be stored or used as a string, + * e.g., as a map key on an Object. + * + * Legal only when isMapKey is true. + * + * @param {*} val The value + * @returns {string} The string form of the value. */ - ByteBufferPrototype.writeUint32 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value !== 'number' || value % 1 !== 0) - throw TypeError("Illegal value: "+value+" (not an integer)"); - value >>>= 0; - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - offset += 4; - var capacity5 = this.buffer.byteLength; - if (offset > capacity5) - this.resize((capacity5 *= 2) > offset ? capacity5 : offset); - offset -= 4; - this.view.setUint32(offset, value, this.littleEndian); - if (relative) this.offset += 4; - return this; + ElementPrototype.valueToString = function(value) { + if (!this.isMapKey) { + throw Error("valueToString() called on non-map-key element"); + } + + if (this.type === ProtoBuf.TYPES["bytes"]) { + return value.toString("binary"); + } else { + return value.toString(); + } }; /** - * Reads a 32bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read + * @alias ProtoBuf.Reflect.Element * @expose */ - ByteBufferPrototype.readUint32 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 4 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); - } - var value = this.view.getUint32(offset, this.littleEndian); - if (relative) this.offset += 4; - return value; - }; - - // types/ints/int64 + Reflect.Element = Element; - if (Long) { + /** + * Constructs a new Message. + * @exports ProtoBuf.Reflect.Message + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Namespace} parent Parent message or namespace + * @param {string} name Message name + * @param {Object.=} options Message options + * @param {boolean=} isGroup `true` if this is a legacy group + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Message = function(builder, parent, name, options, isGroup, syntax) { + Namespace.call(this, builder, parent, name, options, syntax); /** - * Writes a 64bit signed integer. - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + * @override */ - ByteBufferPrototype.writeInt64 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value === 'number') - value = Long.fromNumber(value); - else if (typeof value === 'string') - value = Long.fromString(value); - else if (!(value && value instanceof Long)) - throw TypeError("Illegal value: "+value+" (not an integer or Long)"); - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - if (typeof value === 'number') - value = Long.fromNumber(value); - else if (typeof value === 'string') - value = Long.fromString(value); - offset += 8; - var capacity6 = this.buffer.byteLength; - if (offset > capacity6) - this.resize((capacity6 *= 2) > offset ? capacity6 : offset); - offset -= 8; - if (this.littleEndian) { - this.view.setInt32(offset , value.low , true); - this.view.setInt32(offset+4, value.high, true); - } else { - this.view.setInt32(offset , value.high, false); - this.view.setInt32(offset+4, value.low , false); - } - if (relative) this.offset += 8; - return this; - }; + this.className = "Message"; /** - * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this + * Extensions range. + * @type {!Array.|undefined} * @expose */ - ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64; + this.extensions = undefined; /** - * Reads a 64bit signed integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} + * Runtime message class. + * @type {?function(new:ProtoBuf.Builder.Message)} * @expose */ - ByteBufferPrototype.readInt64 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 8 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); - } - var value = this.littleEndian - ? new Long(this.view.getInt32(offset , true ), this.view.getInt32(offset+4, true ), false) - : new Long(this.view.getInt32(offset+4, false), this.view.getInt32(offset , false), false); - if (relative) this.offset += 8; - return value; - }; + this.clazz = null; /** - * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} + * Whether this is a legacy group or not. + * @type {boolean} * @expose */ - ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64; + this.isGroup = !!isGroup; + + // The following cached collections are used to efficiently iterate over or look up fields when decoding. /** - * Writes a 64bit unsigned integer. - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + * Cached fields. + * @type {?Array.} + * @private */ - ByteBufferPrototype.writeUint64 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value === 'number') - value = Long.fromNumber(value); - else if (typeof value === 'string') - value = Long.fromString(value); - else if (!(value && value instanceof Long)) - throw TypeError("Illegal value: "+value+" (not an integer or Long)"); - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - if (typeof value === 'number') - value = Long.fromNumber(value); - else if (typeof value === 'string') - value = Long.fromString(value); - offset += 8; - var capacity7 = this.buffer.byteLength; - if (offset > capacity7) - this.resize((capacity7 *= 2) > offset ? capacity7 : offset); - offset -= 8; - if (this.littleEndian) { - this.view.setInt32(offset , value.low , true); - this.view.setInt32(offset+4, value.high, true); - } else { - this.view.setInt32(offset , value.high, false); - this.view.setInt32(offset+4, value.low , false); - } - if (relative) this.offset += 8; - return this; - }; + this._fields = null; /** - * Reads a 64bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} - * @expose + * Cached fields by id. + * @type {?Object.} + * @private */ - ByteBufferPrototype.readUint64 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 8 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); - } - var value = this.littleEndian - ? new Long(this.view.getInt32(offset , true ), this.view.getInt32(offset+4, true ), true) - : new Long(this.view.getInt32(offset+4, false), this.view.getInt32(offset , false), true); - if (relative) this.offset += 8; - return value; - }; - - } // Long - - - // types/floats/float32 + this._fieldsById = null; - /** - * Writes a 32bit float. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {!ByteBuffer} this - * @expose - */ - ByteBufferPrototype.writeFloat32 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value !== 'number') - throw TypeError("Illegal value: "+value+" (not a number)"); - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - offset += 4; - var capacity8 = this.buffer.byteLength; - if (offset > capacity8) - this.resize((capacity8 *= 2) > offset ? capacity8 : offset); - offset -= 4; - this.view.setFloat32(offset, value, this.littleEndian); - if (relative) this.offset += 4; - return this; + /** + * Cached fields by name. + * @type {?Object.} + * @private + */ + this._fieldsByName = null; }; /** - * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {!ByteBuffer} this - * @expose + * @alias ProtoBuf.Reflect.Message.prototype + * @inner */ - ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32; + var MessagePrototype = Message.prototype = Object.create(Namespace.prototype); /** - * Reads a 32bit float. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} + * Builds the message and returns the runtime counterpart, which is a fully functional class. + * @see ProtoBuf.Builder.Message + * @param {boolean=} rebuild Whether to rebuild or not, defaults to false + * @return {ProtoBuf.Reflect.Message} Message class + * @throws {Error} If the message cannot be built * @expose */ - ByteBufferPrototype.readFloat32 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 4 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); - } - var value = this.view.getFloat32(offset, this.littleEndian); - if (relative) this.offset += 4; - return value; - }; + MessagePrototype.build = function(rebuild) { + if (this.clazz && !rebuild) + return this.clazz; + + // Create the runtime Message class in its own scope + var clazz = (function(ProtoBuf, T) { + + var fields = T.getChildren(ProtoBuf.Reflect.Message.Field), + oneofs = T.getChildren(ProtoBuf.Reflect.Message.OneOf); + + /** + * Constructs a new runtime Message. + * @name ProtoBuf.Builder.Message + * @class Barebone of all runtime messages. + * @param {!Object.|string} values Preset values + * @param {...string} var_args + * @constructor + * @throws {Error} If the message cannot be created + */ + var Message = function(values, var_args) { + ProtoBuf.Builder.Message.call(this); + + // Create virtual oneof properties + for (var i=0, k=oneofs.length; i 0) { + var value; + // Set field values from a values object + if (arguments.length === 1 && values !== null && typeof values === 'object' && + /* not _another_ Message */ (typeof values.encode !== 'function' || values instanceof Message) && + /* not a repeated field */ !Array.isArray(values) && + /* not a Map */ !(values instanceof ProtoBuf.Map) && + /* not a ByteBuffer */ !ByteBuffer.isByteBuffer(values) && + /* not an ArrayBuffer */ !(values instanceof ArrayBuffer) && + /* not a Long */ !(ProtoBuf.Long && values instanceof ProtoBuf.Long)) { + this.$set(values); + } else // Set field values from arguments, in declaration order + for (i=0, k=arguments.length; i} keyOrObj String key or plain object holding multiple values + * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted + * @param {boolean=} noAssert Whether to not assert for an actual field / proper value type, defaults to `false` + * @returns {!ProtoBuf.Builder.Message} this + * @throws {Error} If the value cannot be set + * @expose + */ + MessagePrototype.set = function(keyOrObj, value, noAssert) { + if (keyOrObj && typeof keyOrObj === 'object') { + noAssert = value; + for (var ikey in keyOrObj) + if (keyOrObj.hasOwnProperty(ikey) && typeof (value = keyOrObj[ikey]) !== 'undefined') + this.$set(ikey, value, noAssert); + return this; + } + var field = T._fieldsByName[keyOrObj]; + if (!noAssert) { + if (!field) + throw Error(this+"#"+keyOrObj+" is not a field: undefined"); + if (!(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+keyOrObj+" is not a field: "+field.toString(true)); + this[field.name] = (value = field.verifyValue(value)); // May throw + } else + this[keyOrObj] = value; + if (field && field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) + var currentField = this[field.oneof.name]; // Virtual field references currently set field + if (value !== null) { + if (currentField !== null && currentField !== field.name) + this[currentField] = null; // Clear currently set field + this[field.oneof.name] = field.name; // Point virtual field at this field + } else if (/* value === null && */currentField === keyOrObj) + this[field.oneof.name] = null; // Clear virtual field (current field explicitly cleared) + } + return this; + }; + + /** + * Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}. + * @name ProtoBuf.Builder.Message#$set + * @function + * @param {string|!Object.} keyOrObj String key or plain object holding multiple values + * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted + * @param {boolean=} noAssert Whether to not assert the value, defaults to `false` + * @throws {Error} If the value cannot be set + * @expose + */ + MessagePrototype.$set = MessagePrototype.set; + + /** + * Gets a field's value. + * @name ProtoBuf.Builder.Message#get + * @function + * @param {string} key Key + * @param {boolean=} noAssert Whether to not assert for an actual field, defaults to `false` + * @return {*} Value + * @throws {Error} If there is no such field + * @expose + */ + MessagePrototype.get = function(key, noAssert) { + if (noAssert) + return this[key]; + var field = T._fieldsByName[key]; + if (!field || !(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+key+" is not a field: undefined"); + if (!(field instanceof ProtoBuf.Reflect.Message.Field)) + throw Error(this+"#"+key+" is not a field: "+field.toString(true)); + return this[field.name]; + }; + + /** + * Gets a field's value. This is an alias for {@link ProtoBuf.Builder.Message#$get}. + * @name ProtoBuf.Builder.Message#$get + * @function + * @param {string} key Key + * @return {*} Value + * @throws {Error} If there is no such field + * @expose + */ + MessagePrototype.$get = MessagePrototype.get; + + // Getters and setters + + for (var i=0; i>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - offset += 8; - var capacity9 = this.buffer.byteLength; - if (offset > capacity9) - this.resize((capacity9 *= 2) > offset ? capacity9 : offset); - offset -= 8; - this.view.setFloat64(offset, value, this.littleEndian); - if (relative) this.offset += 8; - return this; - }; + })(field); + } - /** - * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose - */ - ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64; + // En-/decoding - /** - * Reads a 64bit float. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {number} - * @expose - */ - ByteBufferPrototype.readFloat64 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 8 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); - } - var value = this.view.getFloat64(offset, this.littleEndian); - if (relative) this.offset += 8; - return value; - }; + /** + * Encodes the message. + * @name ProtoBuf.Builder.Message#$encode + * @function + * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. + * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` + * @return {!ByteBuffer} Encoded message as a ByteBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ByteBuffer in the `encoded` property on the error. + * @expose + * @see ProtoBuf.Builder.Message#encode64 + * @see ProtoBuf.Builder.Message#encodeHex + * @see ProtoBuf.Builder.Message#encodeAB + */ + MessagePrototype.encode = function(buffer, noVerify) { + if (typeof buffer === 'boolean') + noVerify = buffer, + buffer = undefined; + var isNew = false; + if (!buffer) + buffer = new ByteBuffer(), + isNew = true; + var le = buffer.littleEndian; + try { + T.encode(this, buffer.LE(), noVerify); + return (isNew ? buffer.flip() : buffer).LE(le); + } catch (e) { + buffer.LE(le); + throw(e); + } + }; - /** - * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. - * @function - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {number} - * @expose - */ - ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64; + /** + * Encodes a message using the specified data payload. + * @param {!Object.} data Data payload + * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. + * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` + * @return {!ByteBuffer} Encoded message as a ByteBuffer + * @expose + */ + Message.encode = function(data, buffer, noVerify) { + return new Message(data).encode(buffer, noVerify); + }; + /** + * Calculates the byte length of the message. + * @name ProtoBuf.Builder.Message#calculate + * @function + * @returns {number} Byte length + * @throws {Error} If the message cannot be calculated or if required fields are missing. + * @expose + */ + MessagePrototype.calculate = function() { + return T.calculate(this); + }; - // types/varints/varint32 + /** + * Encodes the varint32 length-delimited message. + * @name ProtoBuf.Builder.Message#encodeDelimited + * @function + * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. + * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` + * @return {!ByteBuffer} Encoded message as a ByteBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ByteBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeDelimited = function(buffer, noVerify) { + var isNew = false; + if (!buffer) + buffer = new ByteBuffer(), + isNew = true; + var enc = new ByteBuffer().LE(); + T.encode(this, enc, noVerify).flip(); + buffer.writeVarint32(enc.remaining()); + buffer.append(enc); + return isNew ? buffer.flip() : buffer; + }; - /** - * Maximum number of bytes required to store a 32bit base 128 variable-length integer. - * @type {number} - * @const - * @expose - */ - ByteBuffer.MAX_VARINT32_BYTES = 5; + /** + * Directly encodes the message to an ArrayBuffer. + * @name ProtoBuf.Builder.Message#encodeAB + * @function + * @return {ArrayBuffer} Encoded message as ArrayBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ArrayBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeAB = function() { + try { + return this.encode().toArrayBuffer(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toArrayBuffer(); + throw(e); + } + }; - /** - * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. - * @param {number} value Value to encode - * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} - * @expose - */ - ByteBuffer.calculateVarint32 = function(value) { - // ref: src/google/protobuf/io/coded_stream.cc - value = value >>> 0; - if (value < 1 << 7 ) return 1; - else if (value < 1 << 14) return 2; - else if (value < 1 << 21) return 3; - else if (value < 1 << 28) return 4; - else return 5; - }; + /** + * Returns the message as an ArrayBuffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeAB}. + * @name ProtoBuf.Builder.Message#toArrayBuffer + * @function + * @return {ArrayBuffer} Encoded message as ArrayBuffer + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded ArrayBuffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toArrayBuffer = MessagePrototype.encodeAB; - /** - * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. - * @param {number} n Signed 32bit integer - * @returns {number} Unsigned zigzag encoded 32bit integer - * @expose - */ - ByteBuffer.zigZagEncode32 = function(n) { - return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h - }; + /** + * Directly encodes the message to a node Buffer. + * @name ProtoBuf.Builder.Message#encodeNB + * @function + * @return {!Buffer} + * @throws {Error} If the message cannot be encoded, not running under node.js or if required fields are + * missing. The later still returns the encoded node Buffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeNB = function() { + try { + return this.encode().toBuffer(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toBuffer(); + throw(e); + } + }; - /** - * Decodes a zigzag encoded signed 32bit integer. - * @param {number} n Unsigned zigzag encoded 32bit integer - * @returns {number} Signed 32bit integer - * @expose - */ - ByteBuffer.zigZagDecode32 = function(n) { - return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h - }; + /** + * Returns the message as a node Buffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeNB}. + * @name ProtoBuf.Builder.Message#toBuffer + * @function + * @return {!Buffer} + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded node Buffer in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toBuffer = MessagePrototype.encodeNB; - /** - * Writes a 32bit base 128 variable-length integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written - * @expose - */ - ByteBufferPrototype.writeVarint32 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value !== 'number' || value % 1 !== 0) - throw TypeError("Illegal value: "+value+" (not an integer)"); - value |= 0; - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - var size = ByteBuffer.calculateVarint32(value), - b; - offset += size; - var capacity10 = this.buffer.byteLength; - if (offset > capacity10) - this.resize((capacity10 *= 2) > offset ? capacity10 : offset); - offset -= size; - // ref: http://code.google.com/searchframe#WTeibokF6gE/trunk/src/google/protobuf/io/coded_stream.cc - this.view.setUint8(offset, b = value | 0x80); - value >>>= 0; - if (value >= 1 << 7) { - b = (value >> 7) | 0x80; - this.view.setUint8(offset+1, b); - if (value >= 1 << 14) { - b = (value >> 14) | 0x80; - this.view.setUint8(offset+2, b); - if (value >= 1 << 21) { - b = (value >> 21) | 0x80; - this.view.setUint8(offset+3, b); - if (value >= 1 << 28) { - this.view.setUint8(offset+4, (value >> 28) & 0x0F); - size = 5; - } else { - this.view.setUint8(offset+3, b & 0x7F); - size = 4; - } - } else { - this.view.setUint8(offset+2, b & 0x7F); - size = 3; + /** + * Directly encodes the message to a base64 encoded string. + * @name ProtoBuf.Builder.Message#encode64 + * @function + * @return {string} Base64 encoded string + * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later + * still returns the encoded base64 string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encode64 = function() { + try { + return this.encode().toBase64(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toBase64(); + throw(e); } - } else { - this.view.setUint8(offset+1, b & 0x7F); - size = 2; - } - } else { - this.view.setUint8(offset, b & 0x7F); - size = 1; - } - if (relative) { - this.offset += size; - return this; - } - return size; - }; + }; - /** - * Writes a zig-zag encoded 32bit base 128 variable-length integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written - * @expose - */ - ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) { - return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset); - }; + /** + * Returns the message as a base64 encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encode64}. + * @name ProtoBuf.Builder.Message#toBase64 + * @function + * @return {string} Base64 encoded string + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded base64 string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toBase64 = MessagePrototype.encode64; - /** - * Reads a 32bit base 128 variable-length integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read - * and the actual number of bytes read. - * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available - * to fully decode the varint. - * @expose - */ - ByteBufferPrototype.readVarint32 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 1 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); - } - // ref: src/google/protobuf/io/coded_stream.cc - var size = 0, - value = 0 >>> 0, - temp, - ioffset; - do { - ioffset = offset+size; - if (!this.noAssert && ioffset > this.limit) { - var err = Error("Truncated"); - err['truncated'] = true; - throw err; - } - temp = this.view.getUint8(ioffset); - if (size < 5) - value |= ((temp&0x7F)<<(7*size)) >>> 0; - ++size; - } while ((temp & 0x80) === 0x80); - value = value | 0; // Make sure to discard the higher order bits - if (relative) { - this.offset += size; - return value; - } - return { - "value": value, - "length": size - }; - }; + /** + * Directly encodes the message to a hex encoded string. + * @name ProtoBuf.Builder.Message#encodeHex + * @function + * @return {string} Hex encoded string + * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later + * still returns the encoded hex string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.encodeHex = function() { + try { + return this.encode().toHex(); + } catch (e) { + if (e["encoded"]) e["encoded"] = e["encoded"].toHex(); + throw(e); + } + }; - /** - * Reads a zig-zag encoded 32bit base 128 variable-length integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read - * and the actual number of bytes read. - * @throws {Error} If it's not a valid varint - * @expose - */ - ByteBufferPrototype.readVarint32ZigZag = function(offset) { - var val = this.readVarint32(offset); - if (typeof val === 'object') - val["value"] = ByteBuffer.zigZagDecode32(val["value"]); - else - val = ByteBuffer.zigZagDecode32(val); - return val; - }; + /** + * Returns the message as a hex encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encodeHex}. + * @name ProtoBuf.Builder.Message#toHex + * @function + * @return {string} Hex encoded string + * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still + * returns the encoded hex string in the `encoded` property on the error. + * @expose + */ + MessagePrototype.toHex = MessagePrototype.encodeHex; + + /** + * Clones a message object or field value to a raw object. + * @param {*} obj Object to clone + * @param {boolean} binaryAsBase64 Whether to include binary data as base64 strings or as a buffer otherwise + * @param {boolean} longsAsStrings Whether to encode longs as strings + * @param {!ProtoBuf.Reflect.T=} resolvedType The resolved field type if a field + * @returns {*} Cloned object + * @inner + */ + function cloneRaw(obj, binaryAsBase64, longsAsStrings, resolvedType) { + if (obj === null || typeof obj !== 'object') { + // Convert enum values to their respective names + if (resolvedType && resolvedType instanceof ProtoBuf.Reflect.Enum) { + var name = ProtoBuf.Reflect.Enum.getName(resolvedType.object, obj); + if (name !== null) + return name; + } + // Pass-through string, number, boolean, null... + return obj; + } + // Convert ByteBuffers to raw buffer or strings + if (ByteBuffer.isByteBuffer(obj)) + return binaryAsBase64 ? obj.toBase64() : obj.toBuffer(); + // Convert Longs to proper objects or strings + if (ProtoBuf.Long.isLong(obj)) + return longsAsStrings ? obj.toString() : ProtoBuf.Long.fromValue(obj); + var clone; + // Clone arrays + if (Array.isArray(obj)) { + clone = []; + obj.forEach(function(v, k) { + clone[k] = cloneRaw(v, binaryAsBase64, longsAsStrings, resolvedType); + }); + return clone; + } + clone = {}; + // Convert maps to objects + if (obj instanceof ProtoBuf.Map) { + var it = obj.entries(); + for (var e = it.next(); !e.done; e = it.next()) + clone[obj.keyElem.valueToString(e.value[0])] = cloneRaw(e.value[1], binaryAsBase64, longsAsStrings, obj.valueElem.resolvedType); + return clone; + } + // Everything else is a non-null object + var type = obj.$type, + field = undefined; + for (var i in obj) + if (obj.hasOwnProperty(i)) { + if (type && (field = type.getChild(i))) + clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings, field.resolvedType); + else + clone[i] = cloneRaw(obj[i], binaryAsBase64, longsAsStrings); + } + return clone; + } - // types/varints/varint64 + /** + * Returns the message's raw payload. + * @param {boolean=} binaryAsBase64 Whether to include binary data as base64 strings instead of Buffers, defaults to `false` + * @param {boolean} longsAsStrings Whether to encode longs as strings + * @returns {Object.} Raw payload + * @expose + */ + MessagePrototype.toRaw = function(binaryAsBase64, longsAsStrings) { + return cloneRaw(this, !!binaryAsBase64, !!longsAsStrings, this.$type); + }; - if (Long) { + /** + * Encodes a message to JSON. + * @returns {string} JSON string + * @expose + */ + MessagePrototype.encodeJSON = function() { + return JSON.stringify( + cloneRaw(this, + /* binary-as-base64 */ true, + /* longs-as-strings */ true, + this.$type + ) + ); + }; - /** - * Maximum number of bytes required to store a 64bit base 128 variable-length integer. - * @type {number} - * @const - * @expose - */ - ByteBuffer.MAX_VARINT64_BYTES = 10; + /** + * Decodes a message from the specified buffer or string. + * @name ProtoBuf.Builder.Message.decode + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from + * @param {(number|string)=} length Message length. Defaults to decode all the remainig data. + * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + * @see ProtoBuf.Builder.Message.decode64 + * @see ProtoBuf.Builder.Message.decodeHex + */ + Message.decode = function(buffer, length, enc) { + if (typeof length === 'string') + enc = length, + length = -1; + if (typeof buffer === 'string') + buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); + buffer = ByteBuffer.isByteBuffer(buffer) ? buffer : ByteBuffer.wrap(buffer); // May throw + var le = buffer.littleEndian; + try { + var msg = T.decode(buffer.LE()); + buffer.LE(le); + return msg; + } catch (e) { + buffer.LE(le); + throw(e); + } + }; - /** - * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. - * @param {number|!Long} value Value to encode - * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} - * @expose - */ - ByteBuffer.calculateVarint64 = function(value) { - if (typeof value === 'number') - value = Long.fromNumber(value); - else if (typeof value === 'string') - value = Long.fromString(value); - // ref: src/google/protobuf/io/coded_stream.cc - var part0 = value.toInt() >>> 0, - part1 = value.shiftRightUnsigned(28).toInt() >>> 0, - part2 = value.shiftRightUnsigned(56).toInt() >>> 0; - if (part2 == 0) { - if (part1 == 0) { - if (part0 < 1 << 14) - return part0 < 1 << 7 ? 1 : 2; - else - return part0 < 1 << 21 ? 3 : 4; - } else { - if (part1 < 1 << 14) - return part1 < 1 << 7 ? 5 : 6; - else - return part1 < 1 << 21 ? 7 : 8; + /** + * Decodes a varint32 length-delimited message from the specified buffer or string. + * @name ProtoBuf.Builder.Message.decodeDelimited + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from + * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 + * @return {ProtoBuf.Builder.Message} Decoded message or `null` if not enough bytes are available yet + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decodeDelimited = function(buffer, enc) { + if (typeof buffer === 'string') + buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); + buffer = ByteBuffer.isByteBuffer(buffer) ? buffer : ByteBuffer.wrap(buffer); // May throw + if (buffer.remaining() < 1) + return null; + var off = buffer.offset, + len = buffer.readVarint32(); + if (buffer.remaining() < len) { + buffer.offset = off; + return null; } - } else - return part2 < 1 << 7 ? 9 : 10; - }; + try { + var msg = T.decode(buffer.slice(buffer.offset, buffer.offset + len).LE()); + buffer.offset += len; + return msg; + } catch (err) { + buffer.offset += len; + throw err; + } + }; - /** - * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. - * @param {number|!Long} value Signed long - * @returns {!Long} Unsigned zigzag encoded long - * @expose - */ - ByteBuffer.zigZagEncode64 = function(value) { - if (typeof value === 'number') - value = Long.fromNumber(value, false); - else if (typeof value === 'string') - value = Long.fromString(value, false); - else if (value.unsigned !== false) value = value.toSigned(); - // ref: src/google/protobuf/wire_format_lite.h - return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned(); - }; + /** + * Decodes the message from the specified base64 encoded string. + * @name ProtoBuf.Builder.Message.decode64 + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decode64 = function(str) { + return Message.decode(str, "base64"); + }; - /** - * Decodes a zigzag encoded signed 64bit integer. - * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number - * @returns {!Long} Signed long - * @expose - */ - ByteBuffer.zigZagDecode64 = function(value) { - if (typeof value === 'number') - value = Long.fromNumber(value, false); - else if (typeof value === 'string') - value = Long.fromString(value, false); - else if (value.unsigned !== false) value = value.toSigned(); - // ref: src/google/protobuf/wire_format_lite.h - return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned(); - }; + /** + * Decodes the message from the specified hex encoded string. + * @name ProtoBuf.Builder.Message.decodeHex + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still + * returns the decoded message with missing fields in the `decoded` property on the error. + * @expose + */ + Message.decodeHex = function(str) { + return Message.decode(str, "hex"); + }; - /** - * Writes a 64bit base 128 variable-length integer. - * @param {number|Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. - * @expose - */ - ByteBufferPrototype.writeVarint64 = function(value, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof value === 'number') - value = Long.fromNumber(value); - else if (typeof value === 'string') - value = Long.fromString(value); - else if (!(value && value instanceof Long)) - throw TypeError("Illegal value: "+value+" (not an integer or Long)"); - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - if (typeof value === 'number') - value = Long.fromNumber(value, false); - else if (typeof value === 'string') - value = Long.fromString(value, false); - else if (value.unsigned !== false) value = value.toSigned(); - var size = ByteBuffer.calculateVarint64(value), - part0 = value.toInt() >>> 0, - part1 = value.shiftRightUnsigned(28).toInt() >>> 0, - part2 = value.shiftRightUnsigned(56).toInt() >>> 0; - offset += size; - var capacity11 = this.buffer.byteLength; - if (offset > capacity11) - this.resize((capacity11 *= 2) > offset ? capacity11 : offset); - offset -= size; - switch (size) { - case 10: this.view.setUint8(offset+9, (part2 >>> 7) & 0x01); - case 9 : this.view.setUint8(offset+8, size !== 9 ? (part2 ) | 0x80 : (part2 ) & 0x7F); - case 8 : this.view.setUint8(offset+7, size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F); - case 7 : this.view.setUint8(offset+6, size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F); - case 6 : this.view.setUint8(offset+5, size !== 6 ? (part1 >>> 7) | 0x80 : (part1 >>> 7) & 0x7F); - case 5 : this.view.setUint8(offset+4, size !== 5 ? (part1 ) | 0x80 : (part1 ) & 0x7F); - case 4 : this.view.setUint8(offset+3, size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F); - case 3 : this.view.setUint8(offset+2, size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F); - case 2 : this.view.setUint8(offset+1, size !== 2 ? (part0 >>> 7) | 0x80 : (part0 >>> 7) & 0x7F); - case 1 : this.view.setUint8(offset , size !== 1 ? (part0 ) | 0x80 : (part0 ) & 0x7F); - } - if (relative) { - this.offset += size; - return this; - } else { - return size; - } - }; + /** + * Decodes the message from a JSON string. + * @name ProtoBuf.Builder.Message.decodeJSON + * @function + * @param {string} str String to decode from + * @return {!ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded or if required fields are + * missing. + * @expose + */ + Message.decodeJSON = function(str) { + return new Message(JSON.parse(str)); + }; - /** - * Writes a zig-zag encoded 64bit base 128 variable-length integer. - * @param {number|Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. - * @expose - */ - ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) { - return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset); - }; + // Utility - /** - * Reads a 64bit base 128 variable-length integer. Requires Long.js. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and - * the actual number of bytes read. - * @throws {Error} If it's not a valid varint - * @expose - */ - ByteBufferPrototype.readVarint64 = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 1 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); - } - // ref: src/google/protobuf/io/coded_stream.cc - var start = offset, - part0 = 0, - part1 = 0, - part2 = 0, - b = 0; - b = this.view.getUint8(offset++); part0 = (b & 0x7F) ; if (b & 0x80) { - b = this.view.getUint8(offset++); part0 |= (b & 0x7F) << 7; if (b & 0x80) { - b = this.view.getUint8(offset++); part0 |= (b & 0x7F) << 14; if (b & 0x80) { - b = this.view.getUint8(offset++); part0 |= (b & 0x7F) << 21; if (b & 0x80) { - b = this.view.getUint8(offset++); part1 = (b & 0x7F) ; if (b & 0x80) { - b = this.view.getUint8(offset++); part1 |= (b & 0x7F) << 7; if (b & 0x80) { - b = this.view.getUint8(offset++); part1 |= (b & 0x7F) << 14; if (b & 0x80) { - b = this.view.getUint8(offset++); part1 |= (b & 0x7F) << 21; if (b & 0x80) { - b = this.view.getUint8(offset++); part2 = (b & 0x7F) ; if (b & 0x80) { - b = this.view.getUint8(offset++); part2 |= (b & 0x7F) << 7; if (b & 0x80) { - throw Error("Buffer overrun"); }}}}}}}}}} - var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false); - if (relative) { - this.offset = offset; - return value; - } else { - return { - 'value': value, - 'length': offset-start - }; - } - }; + /** + * Returns a string representation of this Message. + * @name ProtoBuf.Builder.Message#toString + * @function + * @return {string} String representation as of ".Fully.Qualified.MessageName" + * @expose + */ + MessagePrototype.toString = function() { + return T.toString(); + }; - /** - * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and - * the actual number of bytes read. - * @throws {Error} If it's not a valid varint - * @expose - */ - ByteBufferPrototype.readVarint64ZigZag = function(offset) { - var val = this.readVarint64(offset); - if (val && val['value'] instanceof Long) - val["value"] = ByteBuffer.zigZagDecode64(val["value"]); - else - val = ByteBuffer.zigZagDecode64(val); - return val; - }; + // Properties - } // Long + /** + * Message options. + * @name ProtoBuf.Builder.Message.$options + * @type {Object.} + * @expose + */ + var $optionsS; // cc needs this + /** + * Message options. + * @name ProtoBuf.Builder.Message#$options + * @type {Object.} + * @expose + */ + var $options; - // types/strings/cstring + /** + * Reflection type. + * @name ProtoBuf.Builder.Message.$type + * @type {!ProtoBuf.Reflect.Message} + * @expose + */ + var $typeS; - /** - * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL - * characters itself. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * contained in `str` + 1 if omitted. - * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written - * @expose - */ - ByteBufferPrototype.writeCString = function(str, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - var i, - k = str.length; - if (!this.noAssert) { - if (typeof str !== 'string') - throw TypeError("Illegal str: Not a string"); - for (i=0; i>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - // UTF8 strings do not contain zero bytes in between except for the zero character, so: - k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; - offset += k+1; - var capacity12 = this.buffer.byteLength; - if (offset > capacity12) - this.resize((capacity12 *= 2) > offset ? capacity12 : offset); - offset -= k+1; - utfx.encodeUTF16toUTF8(stringSource(str), function(b) { - this.view.setUint8(offset++, b); - }.bind(this)); - this.view.setUint8(offset++, 0); - if (relative) { - this.offset = offset; - return this; - } - return k; - }; + /** + * Reflection type. + * @name ProtoBuf.Builder.Message#$type + * @type {!ProtoBuf.Reflect.Message} + * @expose + */ + var $type; - /** - * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters - * itself. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose - */ - ByteBufferPrototype.readCString = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 1 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); - } - var start = offset, - temp; - // UTF8 strings do not contain zero bytes in between except for the zero character itself, so: - var sd, b = -1; - utfx.decodeUTF8toUTF16(function() { - if (b === 0) return null; - if (offset >= this.limit) - throw RangeError("Illegal range: Truncated data, "+offset+" < "+this.limit); - return (b = this.view.getUint8(offset++)) === 0 ? null : b; - }.bind(this), sd = stringDestination(), true); - if (relative) { - this.offset = offset; - return sd(); - } else { - return { - "string": sd(), - "length": offset - start - }; - } - }; + if (Object.defineProperty) + Object.defineProperty(Message, '$options', { "value": T.buildOpt() }), + Object.defineProperty(MessagePrototype, "$options", { "value": Message["$options"] }), + Object.defineProperty(Message, "$type", { "value": T }), + Object.defineProperty(MessagePrototype, "$type", { "value": T }); - // types/strings/istring + return Message; - /** - * Writes a length as uint32 prefixed UTF8 encoded string. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written - * @expose - * @see ByteBuffer#writeVarint32 - */ - ByteBufferPrototype.writeIString = function(str, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof str !== 'string') - throw TypeError("Illegal str: Not a string"); - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - var start = offset, - k; - k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; - offset += 4+k; - var capacity13 = this.buffer.byteLength; - if (offset > capacity13) - this.resize((capacity13 *= 2) > offset ? capacity13 : offset); - offset -= 4+k; - this.view.setUint32(offset, k, this.littleEndian); - offset += 4; - utfx.encodeUTF16toUTF8(stringSource(str), function(b) { - this.view.setUint8(offset++, b); - }.bind(this)); - if (offset !== start + 4 + k) - throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+4+k)); - if (relative) { - this.offset = offset; - return this; + })(ProtoBuf, this); + + // Static enums and prototyped sub-messages / cached collections + this._fields = []; + this._fieldsById = {}; + this._fieldsByName = {}; + for (var i=0, k=this.children.length, child; i>>= 0; - if (offset < 0 || offset + 4 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + MessagePrototype.encode = function(message, buffer, noVerify) { + var fieldMissing = null, + field; + for (var i=0, k=this._fields.length, val; i>> 3; + switch (wireType) { + case ProtoBuf.WIRE_TYPES.VARINT: + do tag = buf.readUint8(); + while ((tag & 0x80) === 0x80); + break; + case ProtoBuf.WIRE_TYPES.BITS64: + buf.offset += 8; + break; + case ProtoBuf.WIRE_TYPES.LDELIM: + tag = buf.readVarint32(); // reads the varint + buf.offset += tag; // skips n bytes + break; + case ProtoBuf.WIRE_TYPES.STARTGROUP: + skipTillGroupEnd(id, buf); + break; + case ProtoBuf.WIRE_TYPES.ENDGROUP: + if (id === expectedId) + return false; + else + throw Error("Illegal GROUPEND after unknown group: "+id+" ("+expectedId+" expected)"); + case ProtoBuf.WIRE_TYPES.BITS32: + buf.offset += 4; + break; + default: + throw Error("Illegal wire type in unknown group "+expectedId+": "+wireType); + } + return true; + } /** - * Writes an UTF8 encoded string. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. - * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * Decodes an encoded message and returns the decoded message. + * @param {ByteBuffer} buffer ByteBuffer to decode from + * @param {number=} length Message length. Defaults to decode all remaining data. + * @param {number=} expectedGroupEndId Expected GROUPEND id if this is a legacy group + * @return {ProtoBuf.Builder.Message} Decoded message + * @throws {Error} If the message cannot be decoded * @expose */ - ByteBufferPrototype.writeUTF8String = function(str, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + MessagePrototype.decode = function(buffer, length, expectedGroupEndId) { + length = typeof length === 'number' ? length : -1; + var start = buffer.offset, + msg = new (this.clazz)(), + tag, wireType, id, field; + while (buffer.offset < start+length || (length === -1 && buffer.remaining() > 0)) { + tag = buffer.readVarint32(); + wireType = tag & 0x07; + id = tag >>> 3; + if (wireType === ProtoBuf.WIRE_TYPES.ENDGROUP) { + if (id !== expectedGroupEndId) + throw Error("Illegal group end indicator for "+this.toString(true)+": "+id+" ("+(expectedGroupEndId ? expectedGroupEndId+" expected" : "not a group")+")"); + break; + } + if (!(field = this._fieldsById[id])) { + // "messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing." + switch (wireType) { + case ProtoBuf.WIRE_TYPES.VARINT: + buffer.readVarint32(); + break; + case ProtoBuf.WIRE_TYPES.BITS32: + buffer.offset += 4; + break; + case ProtoBuf.WIRE_TYPES.BITS64: + buffer.offset += 8; + break; + case ProtoBuf.WIRE_TYPES.LDELIM: + var len = buffer.readVarint32(); + buffer.offset += len; + break; + case ProtoBuf.WIRE_TYPES.STARTGROUP: + while (skipTillGroupEnd(id, buffer)) {} + break; + default: + throw Error("Illegal wire type for unknown field "+id+" in "+this.toString(true)+"#decode: "+wireType); + } + continue; + } + if (field.repeated && !field.options["packed"]) { + msg[field.name].push(field.decode(wireType, buffer)); + } else if (field.map) { + var keyval = field.decode(wireType, buffer); + msg[field.name].set(keyval[0], keyval[1]); + } else { + msg[field.name] = field.decode(wireType, buffer); + if (field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) + var currentField = msg[field.oneof.name]; // Virtual field references currently set field + if (currentField !== null && currentField !== field.name) + msg[currentField] = null; // Clear currently set field + msg[field.oneof.name] = field.name; // Point virtual field at this field + } + } } - var k; - var start = offset; - k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; - offset += k; - var capacity14 = this.buffer.byteLength; - if (offset > capacity14) - this.resize((capacity14 *= 2) > offset ? capacity14 : offset); - offset -= k; - utfx.encodeUTF16toUTF8(stringSource(str), function(b) { - this.view.setUint8(offset++, b); - }.bind(this)); - if (relative) { - this.offset = offset; - return this; + + // Check if all required fields are present and set default values for optional fields that are not + for (var i=0, k=this._fields.length; i=} options Options + * @param {!ProtoBuf.Reflect.Message.OneOf=} oneof Enclosing OneOf + * @param {string?} syntax The syntax level of this definition (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.T */ - ByteBuffer.calculateUTF8Chars = function(str) { - return utfx.calculateUTF16asUTF8(stringSource(str))[0]; - }; + var Field = function(builder, message, rule, keytype, type, name, id, options, oneof, syntax) { + T.call(this, builder, message, name); - /** - * Calculates the number of UTF8 bytes of a string. - * @function - * @param {string} str String to calculate - * @returns {number} Number of UTF8 bytes - * @expose - */ - ByteBuffer.calculateUTF8Bytes = function(str) { - return utfx.calculateUTF16asUTF8(stringSource(str))[1]; - }; + /** + * @override + */ + this.className = "Message.Field"; - /** - * Reads an UTF8 encoded string. - * @param {number} length Number of characters or bytes to read. - * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to - * {@link ByteBuffer.METRICS_CHARS}. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose - */ - ByteBufferPrototype.readUTF8String = function(length, metrics, offset) { - if (typeof metrics === 'number') { - offset = metrics; - metrics = undefined; - } - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS; - if (!this.noAssert) { - if (typeof length !== 'number' || length % 1 !== 0) - throw TypeError("Illegal length: "+length+" (not an integer)"); - length |= 0; - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - var i = 0, - start = offset, - sd; - if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser - sd = stringDestination(); - utfx.decodeUTF8(function() { - return i < length && offset < this.limit ? this.view.getUint8(offset++) : null; - }.bind(this), function(cp) { - ++i; utfx.UTF8toUTF16(cp, sd); - }.bind(this)); - if (i !== length) - throw RangeError("Illegal range: Truncated data, "+i+" == "+length); - if (relative) { - this.offset = offset; - return sd(); - } else { - return { - "string": sd(), - "length": offset - start - }; - } - } else if (metrics === ByteBuffer.METRICS_BYTES) { - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + length > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength); - } - var k = offset + length; - utfx.decodeUTF8toUTF16(function() { - return offset < k ? this.view.getUint8(offset++) : null; - }.bind(this), sd = stringDestination(), this.noAssert); - if (offset !== k) - throw RangeError("Illegal range: Truncated data, "+offset+" == "+k); - if (relative) { - this.offset = offset; - return sd(); - } else { - return { - 'string': sd(), - 'length': offset - start - }; - } - } else - throw TypeError("Unsupported metrics: "+metrics); - }; + /** + * Message field required flag. + * @type {boolean} + * @expose + */ + this.required = rule === "required"; - /** - * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. - * @function - * @param {number} length Number of characters or bytes to read - * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to - * {@link ByteBuffer.METRICS_CHARS}. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose - */ - ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String; + /** + * Message field repeated flag. + * @type {boolean} + * @expose + */ + this.repeated = rule === "repeated"; - // types/strings/vstring + /** + * Message field map flag. + * @type {boolean} + * @expose + */ + this.map = rule === "map"; - /** - * Writes a length as varint32 prefixed UTF8 encoded string. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written - * @expose - * @see ByteBuffer#writeVarint32 - */ - ByteBufferPrototype.writeVString = function(str, offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof str !== 'string') - throw TypeError("Illegal str: Not a string"); - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - var start = offset, - k, l; - k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; - l = ByteBuffer.calculateVarint32(k); - offset += l+k; - var capacity15 = this.buffer.byteLength; - if (offset > capacity15) - this.resize((capacity15 *= 2) > offset ? capacity15 : offset); - offset -= l+k; - offset += this.writeVarint32(k, offset); - utfx.encodeUTF16toUTF8(stringSource(str), function(b) { - this.view.setUint8(offset++, b); - }.bind(this)); - if (offset !== start+k+l) - throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+k+l)); - if (relative) { - this.offset = offset; - return this; - } - return offset - start; - }; + /** + * Message field key type. Type reference string if unresolved, protobuf + * type if resolved. Valid only if this.map === true, null otherwise. + * @type {string|{name: string, wireType: number}|null} + * @expose + */ + this.keyType = keytype || null; + + /** + * Message field type. Type reference string if unresolved, protobuf type if + * resolved. In a map field, this is the value type. + * @type {string|{name: string, wireType: number}} + * @expose + */ + this.type = type; + + /** + * Resolved type reference inside the global namespace. + * @type {ProtoBuf.Reflect.T|null} + * @expose + */ + this.resolvedType = null; + + /** + * Unique message field id. + * @type {number} + * @expose + */ + this.id = id; + + /** + * Message field options. + * @type {!Object.} + * @dict + * @expose + */ + this.options = options || {}; + + /** + * Default value. + * @type {*} + * @expose + */ + this.defaultValue = null; + + /** + * Enclosing OneOf. + * @type {?ProtoBuf.Reflect.Message.OneOf} + * @expose + */ + this.oneof = oneof || null; + + /** + * Syntax level of this definition (e.g., proto3). + * @type {string} + * @expose + */ + this.syntax = syntax || 'proto2'; + + /** + * Original field name. + * @type {string} + * @expose + */ + this.originalName = this.name; // Used to revert camelcase transformation on naming collisions + + /** + * Element implementation. Created in build() after types are resolved. + * @type {ProtoBuf.Element} + * @expose + */ + this.element = null; + + /** + * Key element implementation, for map fields. Created in build() after + * types are resolved. + * @type {ProtoBuf.Element} + * @expose + */ + this.keyElement = null; - /** - * Reads a length as varint32 prefixed UTF8 encoded string. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose - * @see ByteBuffer#readVarint32 - */ - ByteBufferPrototype.readVString = function(offset) { - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 1 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); - } - var temp = this.readVarint32(offset), - start = offset, - str; - offset += temp['length']; - temp = temp['value']; - var k = offset + temp, - sd = stringDestination(); - utfx.decodeUTF8toUTF16(function() { - return offset < k ? this.view.getUint8(offset++) : null; - }.bind(this), sd, this.noAssert); - str = sd(); - if (relative) { - this.offset = offset; - return str; - } else { - return { - 'string': str, - 'length': offset - start - }; - } + // Convert field names to camel case notation if the override is set + if (this.builder.options['convertFieldsToCamelCase'] && !(this instanceof Message.ExtensionField)) + this.name = ProtoBuf.Util.toCamelCase(this.name); }; - /** - * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended - * data's length. - * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets - * will be modified according to the performed read operation. - * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") - * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!ByteBuffer} this - * @expose - * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` - * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` + * @alias ProtoBuf.Reflect.Message.Field.prototype + * @inner */ - ByteBufferPrototype.append = function(source, encoding, offset) { - if (typeof encoding === 'number' || typeof encoding !== 'string') { - offset = encoding; - encoding = undefined; - } - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - if (!(source instanceof ByteBuffer)) - source = ByteBuffer.wrap(source, encoding); - var length = source.limit - source.offset; - if (length <= 0) return this; // Nothing to append - offset += length; - var capacity16 = this.buffer.byteLength; - if (offset > capacity16) - this.resize((capacity16 *= 2) > offset ? capacity16 : offset); - offset -= length; - new Uint8Array(this.buffer, offset).set(new Uint8Array(source.buffer).subarray(source.offset, source.limit)); - source.offset += length; - if (relative) this.offset += length; - return this; - }; + var FieldPrototype = Field.prototype = Object.create(T.prototype); /** - * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the - specified offset up to the length of this ByteBuffer's data. - * @param {!ByteBuffer} target Target ByteBuffer - * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!ByteBuffer} this + * Builds the field. + * @override * @expose - * @see ByteBuffer#append */ - ByteBufferPrototype.appendTo = function(target, offset) { - target.append(this, offset); - return this; + FieldPrototype.build = function() { + this.element = new Element(this.type, this.resolvedType, false, this.syntax); + if (this.map) + this.keyElement = new Element(this.keyType, undefined, true, this.syntax); + + // In proto3, fields do not have field presence, and every field is set to + // its type's default value ("", 0, 0.0, or false). + if (this.syntax === 'proto3' && !this.repeated && !this.map) + this.defaultValue = Element.defaultFieldValue(this.type); + + // Otherwise, default values are present when explicitly specified + else if (typeof this.options['default'] !== 'undefined') + this.defaultValue = this.verifyValue(this.options['default']); }; /** - * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to - * disable them if your code already makes sure that everything is valid. - * @param {boolean} assert `true` to enable assertions, otherwise `false` - * @returns {!ByteBuffer} this + * Checks if the given value can be set for this field. + * @param {*} value Value to check + * @param {boolean=} skipRepeated Whether to skip the repeated value check or not. Defaults to false. + * @return {*} Verified, maybe adjusted, value + * @throws {Error} If the value cannot be set for this field * @expose */ - ByteBufferPrototype.assert = function(assert) { - this.noAssert = !assert; - return this; + FieldPrototype.verifyValue = function(value, skipRepeated) { + skipRepeated = skipRepeated || false; + var self = this; + function fail(val, msg) { + throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); + } + if (value === null) { // NULL values for optional fields + if (this.required) + fail(typeof value, "required"); + if (this.syntax === 'proto3' && this.type !== ProtoBuf.TYPES["message"]) + fail(typeof value, "proto3 field without field presence cannot be null"); + return null; + } + var i; + if (this.repeated && !skipRepeated) { // Repeated values as arrays + if (!Array.isArray(value)) + value = [value]; + var res = []; + for (i=0; i 0; + + case ProtoBuf.TYPES["bytes"]: + return value.remaining() > 0; + + case ProtoBuf.TYPES["enum"]: + return value !== 0; + + case ProtoBuf.TYPES["message"]: + return value !== null; + default: + return true; + } }; /** - * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the - * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. - * @returns {!ByteBuffer} this + * Encodes the specified field value to the specified buffer. + * @param {*} value Verified field value + * @param {ByteBuffer} buffer ByteBuffer to encode to + * @param {!ProtoBuf.Builder.Message} message Runtime message + * @return {ByteBuffer} The ByteBuffer for chaining + * @throws {Error} If the field cannot be encoded * @expose */ - ByteBufferPrototype.clear = function() { - this.offset = 0; - this.limit = this.buffer.byteLength; - this.markedOffset = -1; - return this; + FieldPrototype.encode = function(value, buffer, message) { + if (this.type === null || typeof this.type !== 'object') + throw Error("[INTERNAL] Unresolved type in "+this.toString(true)+": "+this.type); + if (value === null || (this.repeated && value.length == 0)) + return buffer; // Optional omitted + try { + if (this.repeated) { + var i; + // "Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire + // types) can be declared 'packed'." + if (this.options["packed"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) { + // "All of the elements of the field are packed into a single key-value pair with wire type 2 + // (length-delimited). Each element is encoded the same way it would be normally, except without a + // tag preceding it." + buffer.writeVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); + buffer.ensureCapacity(buffer.offset += 1); // We do not know the length yet, so let's assume a varint of length 1 + var start = buffer.offset; // Remember where the contents begin + for (i=0; i 1) { // We need to move the contents + var contents = buffer.slice(start, buffer.offset); + start += varintLen-1; + buffer.offset = start; + buffer.append(contents); + } + buffer.writeVarint32(len, start-varintLen); + } else { + // "If your message definition has repeated elements (without the [packed=true] option), the encoded + // message has zero or more key-value pairs with the same tag number" + for (i=0; i= 0) { + n += ByteBuffer.calculateVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); + ni = 0; + for (i=0; i>>= 0; - if (typeof end !== 'number' || end % 1 !== 0) - throw TypeError("Illegal end: Not an integer"); - end >>>= 0; - if (begin < 0 || begin > end || end > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + FieldPrototype.decode = function(wireType, buffer, skipRepeated) { + var value, nBytes; + + // We expect wireType to match the underlying type's wireType unless we see + // a packed repeated field, or unless this is a map field. + var wireTypeOK = + (!this.map && wireType == this.type.wireType) || + (!skipRepeated && this.repeated && this.options["packed"] && + wireType == ProtoBuf.WIRE_TYPES.LDELIM) || + (this.map && wireType == ProtoBuf.WIRE_TYPES.LDELIM); + if (!wireTypeOK) + throw Error("Illegal wire type for field "+this.toString(true)+": "+wireType+" ("+this.type.wireType+" expected)"); + + // Handle packed repeated fields. + if (wireType == ProtoBuf.WIRE_TYPES.LDELIM && this.repeated && this.options["packed"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) { + if (!skipRepeated) { + nBytes = buffer.readVarint32(); + nBytes = buffer.offset + nBytes; // Limit + var values = []; + while (buffer.offset < nBytes) + values.push(this.decode(this.type.wireType, buffer, true)); + return values; + } + // Read the next value otherwise... } - if (begin === 0 && end === this.buffer.byteLength) - return this; // Already compacted - var len = end - begin; - if (len === 0) { - this.buffer = EMPTY_BUFFER; - this.view = null; - if (this.markedOffset >= 0) this.markedOffset -= begin; - this.offset = 0; - this.limit = 0; - return this; + + // Handle maps. + if (this.map) { + // Read one (key, value) submessage, and return [key, value] + var key = Element.defaultFieldValue(this.keyType); + value = Element.defaultFieldValue(this.type); + + // Read the length + nBytes = buffer.readVarint32(); + if (buffer.remaining() < nBytes) + throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); + + // Get a sub-buffer of this key/value submessage + var msgbuf = buffer.clone(); + msgbuf.limit = msgbuf.offset + nBytes; + buffer.offset += nBytes; + + while (msgbuf.remaining() > 0) { + var tag = msgbuf.readVarint32(); + wireType = tag & 0x07; + var id = tag >>> 3; + if (id === 1) { + key = this.keyElement.decode(msgbuf, wireType, id); + } else if (id === 2) { + value = this.element.decode(msgbuf, wireType, id); + } else { + throw Error("Unexpected tag in map field key/value submessage"); + } + } + + return [key, value]; } - var buffer = new ArrayBuffer(len); - new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(begin, end)); - this.buffer = buffer; - this.view = new DataView(buffer); - if (this.markedOffset >= 0) this.markedOffset -= begin; - this.offset = 0; - this.limit = len; - return this; + + // Handle singular and non-packed repeated field values. + return this.element.decode(buffer, wireType, this.id); }; /** - * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and - * {@link ByteBuffer#limit}. - * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. - * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. - * @returns {!ByteBuffer} Copy + * @alias ProtoBuf.Reflect.Message.Field * @expose */ - ByteBufferPrototype.copy = function(begin, end) { - if (typeof begin === 'undefined') begin = this.offset; - if (typeof end === 'undefined') end = this.limit; - if (!this.noAssert) { - if (typeof begin !== 'number' || begin % 1 !== 0) - throw TypeError("Illegal begin: Not an integer"); - begin >>>= 0; - if (typeof end !== 'number' || end % 1 !== 0) - throw TypeError("Illegal end: Not an integer"); - end >>>= 0; - if (begin < 0 || begin > end || end > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); - } - if (begin === end) - return new ByteBuffer(0, this.littleEndian, this.noAssert); - var capacity = end - begin, - bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert); - bb.offset = 0; - bb.limit = capacity; - if (bb.markedOffset >= 0) bb.markedOffset -= begin; - this.copyTo(bb, 0, begin, end); - return bb; + Reflect.Message.Field = Field; + + /** + * Constructs a new Message ExtensionField. + * @exports ProtoBuf.Reflect.Message.ExtensionField + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Message} message Message reference + * @param {string} rule Rule, one of requried, optional, repeated + * @param {string} type Data type, e.g. int32 + * @param {string} name Field name + * @param {number} id Unique field id + * @param {!Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Message.Field + */ + var ExtensionField = function(builder, message, rule, type, name, id, options) { + Field.call(this, builder, message, rule, /* keytype = */ null, type, name, id, options); + + /** + * Extension reference. + * @type {!ProtoBuf.Reflect.Extension} + * @expose + */ + this.extension; }; + // Extends Field + ExtensionField.prototype = Object.create(Field.prototype); + /** - * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and - * {@link ByteBuffer#limit}. - * @param {!ByteBuffer} target Target ByteBuffer - * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} - * by the number of bytes copied if omitted. - * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the - * number of bytes copied if omitted. - * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} - * @returns {!ByteBuffer} this + * @alias ProtoBuf.Reflect.Message.ExtensionField * @expose */ - ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) { - var relative, - targetRelative; - if (!this.noAssert) { - if (!ByteBuffer.isByteBuffer(target)) - throw TypeError("Illegal target: Not a ByteBuffer"); - } - targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0; - sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0; - sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0; + Reflect.Message.ExtensionField = ExtensionField; - if (targetOffset < 0 || targetOffset > target.buffer.byteLength) - throw RangeError("Illegal target range: 0 <= "+targetOffset+" <= "+target.buffer.byteLength); - if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength) - throw RangeError("Illegal source range: 0 <= "+sourceOffset+" <= "+this.buffer.byteLength); + /** + * Constructs a new Message OneOf. + * @exports ProtoBuf.Reflect.Message.OneOf + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Message} message Message reference + * @param {string} name OneOf name + * @constructor + * @extends ProtoBuf.Reflect.T + */ + var OneOf = function(builder, message, name) { + T.call(this, builder, message, name); - var len = sourceLimit - sourceOffset; - if (len === 0) - return target; // Nothing to copy + /** + * Enclosed fields. + * @type {!Array.} + * @expose + */ + this.fields = []; + }; - target.ensureCapacity(targetOffset + len); + /** + * @alias ProtoBuf.Reflect.Message.OneOf + * @expose + */ + Reflect.Message.OneOf = OneOf; - new Uint8Array(target.buffer).set(new Uint8Array(this.buffer).subarray(sourceOffset, sourceLimit), targetOffset); + /** + * Constructs a new Enum. + * @exports ProtoBuf.Reflect.Enum + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.T} parent Parent Reflect object + * @param {string} name Enum name + * @param {Object.=} options Enum options + * @param {string?} syntax The syntax level (e.g., proto3) + * @constructor + * @extends ProtoBuf.Reflect.Namespace + */ + var Enum = function(builder, parent, name, options, syntax) { + Namespace.call(this, builder, parent, name, options, syntax); - if (relative) this.offset += len; - if (targetRelative) target.offset += len; + /** + * @override + */ + this.className = "Enum"; - return this; + /** + * Runtime enum object. + * @type {Object.|null} + * @expose + */ + this.object = null; }; /** - * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the - * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, - * the required capacity will be used instead. - * @param {number} capacity Required capacity - * @returns {!ByteBuffer} this + * Gets the string name of an enum value. + * @param {!ProtoBuf.Builder.Enum} enm Runtime enum + * @param {number} value Enum value + * @returns {?string} Name or `null` if not present * @expose */ - ByteBufferPrototype.ensureCapacity = function(capacity) { - var current = this.buffer.byteLength; - if (current < capacity) - return this.resize((current *= 2) > capacity ? current : capacity); - return this; + Enum.getName = function(enm, value) { + var keys = Object.keys(enm); + for (var i=0, key; i 0) - value = value.charCodeAt(0); - if (typeof begin === 'undefined') begin = this.offset; - if (typeof end === 'undefined') end = this.limit; - if (!this.noAssert) { - if (typeof value !== 'number' || value % 1 !== 0) - throw TypeError("Illegal value: "+value+" (not an integer)"); - value |= 0; - if (typeof begin !== 'number' || begin % 1 !== 0) - throw TypeError("Illegal begin: Not an integer"); - begin >>>= 0; - if (typeof end !== 'number' || end % 1 !== 0) - throw TypeError("Illegal end: Not an integer"); - end >>>= 0; - if (begin < 0 || begin > end || end > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); - } - if (begin >= end) - return this; // Nothing to fill - while (begin < end) this.view.setUint8(begin++, value); - if (relative) this.offset = begin; - return this; - }; + var EnumPrototype = Enum.prototype = Object.create(Namespace.prototype); /** - * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and - * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. - * @returns {!ByteBuffer} this + * Builds this enum and returns the runtime counterpart. + * @param {boolean} rebuild Whether to rebuild or not, defaults to false + * @returns {!Object.} * @expose */ - ByteBufferPrototype.flip = function() { - this.limit = this.offset; - this.offset = 0; - return this; + EnumPrototype.build = function(rebuild) { + if (this.object && !rebuild) + return this.object; + var enm = new ProtoBuf.Builder.Enum(), + values = this.getChildren(Enum.Value); + for (var i=0, k=values.length; i>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - this.markedOffset = offset; - return this; - }; + Reflect.Enum = Enum; + /** - * Sets the byte order. - * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian - * @returns {!ByteBuffer} this - * @expose + * Constructs a new Enum Value. + * @exports ProtoBuf.Reflect.Enum.Value + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Enum} enm Enum reference + * @param {string} name Field name + * @param {number} id Unique field id + * @constructor + * @extends ProtoBuf.Reflect.T */ - ByteBufferPrototype.order = function(littleEndian) { - if (!this.noAssert) { - if (typeof littleEndian !== 'boolean') - throw TypeError("Illegal littleEndian: Not a boolean"); - } - this.littleEndian = !!littleEndian; - return this; + var Value = function(builder, enm, name, id) { + T.call(this, builder, enm, name); + + /** + * @override + */ + this.className = "Enum.Value"; + + /** + * Unique enum value id. + * @type {number} + * @expose + */ + this.id = id; }; + // Extends T + Value.prototype = Object.create(T.prototype); + /** - * Switches (to) little endian byte order. - * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian - * @returns {!ByteBuffer} this + * @alias ProtoBuf.Reflect.Enum.Value * @expose */ - ByteBufferPrototype.LE = function(littleEndian) { - this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true; - return this; - }; + Reflect.Enum.Value = Value; /** - * Switches (to) big endian byte order. - * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian - * @returns {!ByteBuffer} this - * @expose + * An extension (field). + * @exports ProtoBuf.Reflect.Extension + * @constructor + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.T} parent Parent object + * @param {string} name Object name + * @param {!ProtoBuf.Reflect.Message.Field} field Extension field */ - ByteBufferPrototype.BE = function(bigEndian) { - this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false; - return this; + var Extension = function(builder, parent, name, field) { + T.call(this, builder, parent, name); + + /** + * Extended message field. + * @type {!ProtoBuf.Reflect.Message.Field} + * @expose + */ + this.field = field; }; + + // Extends T + Extension.prototype = Object.create(T.prototype); + /** - * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the - * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer - * will be resized and its contents moved accordingly. - * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be - * modified according to the performed read operation. - * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") - * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes - * prepended if omitted. - * @returns {!ByteBuffer} this + * @alias ProtoBuf.Reflect.Extension * @expose - * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` - * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` */ - ByteBufferPrototype.prepend = function(source, encoding, offset) { - if (typeof encoding === 'number' || typeof encoding !== 'string') { - offset = encoding; - encoding = undefined; - } - var relative = typeof offset === 'undefined'; - if (relative) offset = this.offset; - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: "+offset+" (not an integer)"); - offset >>>= 0; - if (offset < 0 || offset + 0 > this.buffer.byteLength) - throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); - } - if (!(source instanceof ByteBuffer)) - source = ByteBuffer.wrap(source, encoding); - var len = source.limit - source.offset; - if (len <= 0) return this; // Nothing to prepend - var diff = len - offset; - var arrayView; - if (diff > 0) { // Not enough space before offset, so resize + move - var buffer = new ArrayBuffer(this.buffer.byteLength + diff); - arrayView = new Uint8Array(buffer); - arrayView.set(new Uint8Array(this.buffer).subarray(offset, this.buffer.byteLength), len); - this.buffer = buffer; - this.view = new DataView(buffer); - this.offset += diff; - if (this.markedOffset >= 0) this.markedOffset += diff; - this.limit += diff; - offset += diff; - } else { - arrayView = new Uint8Array(this.buffer); - } - arrayView.set(new Uint8Array(source.buffer).subarray(source.offset, source.limit), offset - len); - source.offset = source.limit; - if (relative) - this.offset -= len; - return this; - }; + Reflect.Extension = Extension; /** - * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the - * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer - * will be resized and its contents moved accordingly. - * @param {!ByteBuffer} target Target ByteBuffer - * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes - * prepended if omitted. - * @returns {!ByteBuffer} this - * @expose - * @see ByteBuffer#prepend + * Constructs a new Service. + * @exports ProtoBuf.Reflect.Service + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Namespace} root Root + * @param {string} name Service name + * @param {Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Namespace */ - ByteBufferPrototype.prependTo = function(target, offset) { - target.prepend(this, offset); - return this; + var Service = function(builder, root, name, options) { + Namespace.call(this, builder, root, name, options); + + /** + * @override + */ + this.className = "Service"; + + /** + * Built runtime service class. + * @type {?function(new:ProtoBuf.Builder.Service)} + */ + this.clazz = null; }; + /** - * Prints debug information about this ByteBuffer's contents. - * @param {function(string)=} out Output function to call, defaults to console.log + * @alias ProtoBuf.Reflect.Service.prototype + * @inner + */ + var ServicePrototype = Service.prototype = Object.create(Namespace.prototype); + + /** + * Builds the service and returns the runtime counterpart, which is a fully functional class. + * @see ProtoBuf.Builder.Service + * @param {boolean=} rebuild Whether to rebuild or not + * @return {Function} Service class + * @throws {Error} If the message cannot be built * @expose */ - ByteBufferPrototype.printDebug = function(out) { - if (typeof out !== 'function') out = console.log.bind(console); - out( - this.toString()+"\n"+ - "-------------------------------------------------------------------\n"+ - this.toDebug(/* columns */ true) - ); - }; + ServicePrototype.build = function(rebuild) { + if (this.clazz && !rebuild) + return this.clazz; + + // Create the runtime Service class in its own scope + return this.clazz = (function(ProtoBuf, T) { + + /** + * Constructs a new runtime Service. + * @name ProtoBuf.Builder.Service + * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))=} rpcImpl RPC implementation receiving the method name and the message + * @class Barebone of all runtime services. + * @constructor + * @throws {Error} If the service cannot be created + */ + var Service = function(rpcImpl) { + ProtoBuf.Builder.Service.call(this); + + /** + * Service implementation. + * @name ProtoBuf.Builder.Service#rpcImpl + * @type {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} + * @expose + */ + this.rpcImpl = rpcImpl || function(name, msg, callback) { + // This is what a user has to implement: A function receiving the method name, the actual message to + // send (type checked) and the callback that's either provided with the error as its first + // argument or null and the actual response message. + setTimeout(callback.bind(this, Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")), 0); // Must be async! + }; + }; + + /** + * @alias ProtoBuf.Builder.Service.prototype + * @inner + */ + var ServicePrototype = Service.prototype = Object.create(ProtoBuf.Builder.Service.prototype); + + /** + * Asynchronously performs an RPC call using the given RPC implementation. + * @name ProtoBuf.Builder.Service.[Method] + * @function + * @param {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl RPC implementation + * @param {ProtoBuf.Builder.Message} req Request + * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving + * the error if any and the response either as a pre-parsed message or as its raw bytes + * @abstract + */ + + /** + * Asynchronously performs an RPC call using the instance's RPC implementation. + * @name ProtoBuf.Builder.Service#[Method] + * @function + * @param {ProtoBuf.Builder.Message} req Request + * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving + * the error if any and the response either as a pre-parsed message or as its raw bytes + * @abstract + */ + + var rpc = T.getChildren(ProtoBuf.Reflect.Service.RPCMethod); + for (var i=0; i} + * @expose + */ + var $optionsS; // cc needs this + + /** + * Service options. + * @name ProtoBuf.Builder.Service#$options + * @type {Object.} + * @expose + */ + var $options; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Service.$type + * @type {!ProtoBuf.Reflect.Service} + * @expose + */ + var $typeS; + + /** + * Reflection type. + * @name ProtoBuf.Builder.Service#$type + * @type {!ProtoBuf.Reflect.Service} + * @expose + */ + var $type; + + if (Object.defineProperty) + Object.defineProperty(Service, "$options", { "value": T.buildOpt() }), + Object.defineProperty(ServicePrototype, "$options", { "value": Service["$options"] }), + Object.defineProperty(Service, "$type", { "value": T }), + Object.defineProperty(ServicePrototype, "$type", { "value": T }); + + return Service; - /** - * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and - * {@link ByteBuffer#limit}, so this returns `limit - offset`. - * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. - * @expose - */ - ByteBufferPrototype.remaining = function() { - return this.limit - this.offset; + })(ProtoBuf, this); }; + /** - * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} - * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been - * marked, sets `offset = 0`. - * @returns {!ByteBuffer} this - * @see ByteBuffer#mark + * @alias ProtoBuf.Reflect.Service * @expose */ - ByteBufferPrototype.reset = function() { - if (this.markedOffset >= 0) { - this.offset = this.markedOffset; - this.markedOffset = -1; - } else { - this.offset = 0; - } - return this; - }; + Reflect.Service = Service; + /** - * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that - * large or larger. - * @param {number} capacity Capacity required - * @returns {!ByteBuffer} this - * @throws {TypeError} If `capacity` is not a number - * @throws {RangeError} If `capacity < 0` - * @expose + * Abstract service method. + * @exports ProtoBuf.Reflect.Service.Method + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Service} svc Service + * @param {string} name Method name + * @param {Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.T */ - ByteBufferPrototype.resize = function(capacity) { - if (!this.noAssert) { - if (typeof capacity !== 'number' || capacity % 1 !== 0) - throw TypeError("Illegal capacity: "+capacity+" (not an integer)"); - capacity |= 0; - if (capacity < 0) - throw RangeError("Illegal capacity: 0 <= "+capacity); - } - if (this.buffer.byteLength < capacity) { - var buffer = new ArrayBuffer(capacity); - new Uint8Array(buffer).set(new Uint8Array(this.buffer)); - this.buffer = buffer; - this.view = new DataView(buffer); - } - return this; + var Method = function(builder, svc, name, options) { + T.call(this, builder, svc, name); + + /** + * @override + */ + this.className = "Service.Method"; + + /** + * Options. + * @type {Object.} + * @expose + */ + this.options = options || {}; }; + /** - * Reverses this ByteBuffer's contents. - * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} - * @returns {!ByteBuffer} this - * @expose + * @alias ProtoBuf.Reflect.Service.Method.prototype + * @inner */ - ByteBufferPrototype.reverse = function(begin, end) { - if (typeof begin === 'undefined') begin = this.offset; - if (typeof end === 'undefined') end = this.limit; - if (!this.noAssert) { - if (typeof begin !== 'number' || begin % 1 !== 0) - throw TypeError("Illegal begin: Not an integer"); - begin >>>= 0; - if (typeof end !== 'number' || end % 1 !== 0) - throw TypeError("Illegal end: Not an integer"); - end >>>= 0; - if (begin < 0 || begin > end || end > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); - } - if (begin === end) - return this; // Nothing to reverse - Array.prototype.reverse.call(new Uint8Array(this.buffer).subarray(begin, end)); - this.view = new DataView(this.buffer); // FIXME: Why exactly is this necessary? - return this; - }; + var MethodPrototype = Method.prototype = Object.create(T.prototype); + /** - * Skips the next `length` bytes. This will just advance - * @param {number} length Number of bytes to skip. May also be negative to move the offset back. - * @returns {!ByteBuffer} this - * @expose + * Builds the method's '$options' property. + * @name ProtoBuf.Reflect.Service.Method#buildOpt + * @function + * @return {Object.} */ - ByteBufferPrototype.skip = function(length) { - if (!this.noAssert) { - if (typeof length !== 'number' || length % 1 !== 0) - throw TypeError("Illegal length: "+length+" (not an integer)"); - length |= 0; - } - var offset = this.offset + length; - if (!this.noAssert) { - if (offset < 0 || offset > this.buffer.byteLength) - throw RangeError("Illegal length: 0 <= "+this.offset+" + "+length+" <= "+this.buffer.byteLength); - } - this.offset = offset; - return this; - }; + MethodPrototype.buildOpt = NamespacePrototype.buildOpt; /** - * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. - * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. - * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. - * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} + * @alias ProtoBuf.Reflect.Service.Method * @expose */ - ByteBufferPrototype.slice = function(begin, end) { - if (typeof begin === 'undefined') begin = this.offset; - if (typeof end === 'undefined') end = this.limit; - if (!this.noAssert) { - if (typeof begin !== 'number' || begin % 1 !== 0) - throw TypeError("Illegal begin: Not an integer"); - begin >>>= 0; - if (typeof end !== 'number' || end % 1 !== 0) - throw TypeError("Illegal end: Not an integer"); - end >>>= 0; - if (begin < 0 || begin > end || end > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); - } - var bb = this.clone(); - bb.offset = begin; - bb.limit = end; - return bb; - }; + Reflect.Service.Method = Method; + /** - * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between - * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will transparently {@link ByteBuffer#flip} this - * ByteBuffer if `offset > limit` but the actual offsets remain untouched. - * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if - * possible. Defaults to `false` - * @returns {!ArrayBuffer} Contents as an ArrayBuffer - * @expose + * RPC service method. + * @exports ProtoBuf.Reflect.Service.RPCMethod + * @param {!ProtoBuf.Builder} builder Builder reference + * @param {!ProtoBuf.Reflect.Service} svc Service + * @param {string} name Method name + * @param {string} request Request message name + * @param {string} response Response message name + * @param {boolean} request_stream Whether requests are streamed + * @param {boolean} response_stream Whether responses are streamed + * @param {Object.=} options Options + * @constructor + * @extends ProtoBuf.Reflect.Service.Method */ - ByteBufferPrototype.toBuffer = function(forceCopy) { - var offset = this.offset, - limit = this.limit; - if (offset > limit) { - var t = offset; - offset = limit; - limit = t; - } - if (!this.noAssert) { - if (typeof offset !== 'number' || offset % 1 !== 0) - throw TypeError("Illegal offset: Not an integer"); - offset >>>= 0; - if (typeof limit !== 'number' || limit % 1 !== 0) - throw TypeError("Illegal limit: Not an integer"); - limit >>>= 0; - if (offset < 0 || offset > limit || limit > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+offset+" <= "+limit+" <= "+this.buffer.byteLength); - } - // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is - // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So: - if (!forceCopy && offset === 0 && limit === this.buffer.byteLength) { - return this.buffer; - } - if (offset === limit) { - return EMPTY_BUFFER; - } - var buffer = new ArrayBuffer(limit - offset); - new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0); - return buffer; + var RPCMethod = function(builder, svc, name, request, response, request_stream, response_stream, options) { + Method.call(this, builder, svc, name, options); + + /** + * @override + */ + this.className = "Service.RPCMethod"; + + /** + * Request message name. + * @type {string} + * @expose + */ + this.requestName = request; + + /** + * Response message name. + * @type {string} + * @expose + */ + this.responseName = response; + + /** + * Whether requests are streamed + * @type {bool} + * @expose + */ + this.requestStream = request_stream; + + /** + * Whether responses are streamed + * @type {bool} + * @expose + */ + this.responseStream = response_stream; + + /** + * Resolved request message type. + * @type {ProtoBuf.Reflect.Message} + * @expose + */ + this.resolvedRequestType = null; + + /** + * Resolved response message type. + * @type {ProtoBuf.Reflect.Message} + * @expose + */ + this.resolvedResponseType = null; }; + // Extends Method + RPCMethod.prototype = Object.create(Method.prototype); + /** - * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between - * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will transparently {@link ByteBuffer#flip} this - * ByteBuffer if `offset > limit` but the actual offsets remain untouched. This is an alias of - * {@link ByteBuffer#toBuffer}. - * @function - * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. - * Defaults to `false` - * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @alias ProtoBuf.Reflect.Service.RPCMethod * @expose */ - ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer; + Reflect.Service.RPCMethod = RPCMethod; + return Reflect; - /** - * Converts the ByteBuffer's contents to a string. - * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows - * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with - * highlighted offsets. - * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} - * @returns {string} String representation - * @throws {Error} If `encoding` is invalid - * @expose - */ - ByteBufferPrototype.toString = function(encoding, begin, end) { - if (typeof encoding === 'undefined') - return "ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")"; - if (typeof encoding === 'number') - encoding = "utf8", - begin = encoding, - end = begin; - switch (encoding) { - case "utf8": - return this.toUTF8(begin, end); - case "base64": - return this.toBase64(begin, end); - case "hex": - return this.toHex(begin, end); - case "binary": - return this.toBinary(begin, end); - case "debug": - return this.toDebug(); - case "columns": - return this.toColumns(); - default: - throw Error("Unsupported encoding: "+encoding); - } - }; + })(ProtoBuf); - // lxiv-embeddable + /** + * @alias ProtoBuf.Builder + * @expose + */ + ProtoBuf.Builder = (function(ProtoBuf, Lang, Reflect) { + "use strict"; /** - * lxiv-embeddable (c) 2014 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/lxiv for details + * Constructs a new Builder. + * @exports ProtoBuf.Builder + * @class Provides the functionality to build protocol messages. + * @param {Object.=} options Options + * @constructor */ - var lxiv = function() { - "use strict"; + var Builder = function(options) { /** - * lxiv namespace. - * @type {!Object.} - * @exports lxiv + * Namespace. + * @type {ProtoBuf.Reflect.Namespace} + * @expose */ - var lxiv = {}; + this.ns = new Reflect.Namespace(this, null, ""); // Global namespace /** - * Character codes for output. - * @type {!Array.} - * @inner + * Namespace pointer. + * @type {ProtoBuf.Reflect.T} + * @expose */ - var aout = [ - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 - ]; + this.ptr = this.ns; /** - * Character codes for input. - * @type {!Array.} - * @inner + * Resolved flag. + * @type {boolean} + * @expose */ - var ain = []; - for (var i=0, k=aout.length; i|null} + * @expose */ - lxiv.encode = function(src, dst) { - var b, t; - while ((b = src()) !== null) { - dst(aout[(b>>2)&0x3f]); - t = (b&0x3)<<4; - if ((b = src()) !== null) { - t |= (b>>4)&0xf; - dst(aout[(t|((b>>4)&0xf))&0x3f]); - t = (b&0xf)<<2; - if ((b = src()) !== null) - dst(aout[(t|((b>>6)&0x3))&0x3f]), - dst(aout[b&0x3f]); - else - dst(aout[t&0x3f]), - dst(61); - } else - dst(aout[t&0x3f]), - dst(61), - dst(61); - } - }; + this.result = null; /** - * Decodes base64 char codes to bytes. - * @param {!function():number|null} src Characters source as a function returning the next char code respectively - * `null` if there are no more characters left. - * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. - * @throws {Error} If a character code is invalid + * Imported files. + * @type {Array.} + * @expose */ - lxiv.decode = function(src, dst) { - var c, t1, t2; - function fail(c) { - throw Error("Illegal character code: "+c); - } - while ((c = src()) !== null) { - t1 = ain[c]; - if (typeof t1 === 'undefined') fail(c); - if ((c = src()) !== null) { - t2 = ain[c]; - if (typeof t2 === 'undefined') fail(c); - dst((t1<<2)>>>0|(t2&0x30)>>4); - if ((c = src()) !== null) { - t1 = ain[c]; - if (typeof t1 === 'undefined') - if (c === 61) break; else fail(c); - dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2); - if ((c = src()) !== null) { - t2 = ain[c]; - if (typeof t2 === 'undefined') - if (c === 61) break; else fail(c); - dst(((t1&0x3)<<6)>>>0|t2); - } - } - } - } - }; + this.files = {}; /** - * Tests if a string is valid base64. - * @param {string} str String to test - * @returns {boolean} `true` if valid, otherwise `false` + * Import root override. + * @type {?string} + * @expose */ - lxiv.test = function(str) { - return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str); - }; + this.importRoot = null; - return lxiv; - }(); + /** + * Options. + * @type {!Object.} + * @expose + */ + this.options = options || {}; + }; - // encodings/base64 + /** + * @alias ProtoBuf.Builder.prototype + * @inner + */ + var BuilderPrototype = Builder.prototype; + + // ----- Definition tests ----- /** - * Encodes this ByteBuffer's contents to a base64 encoded string. - * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. - * @returns {string} Base64 encoded string + * Tests if a definition most likely describes a message. + * @param {!Object} def + * @returns {boolean} * @expose */ - ByteBufferPrototype.toBase64 = function(begin, end) { - if (typeof begin === 'undefined') - begin = this.offset; - if (typeof end === 'undefined') - end = this.limit; - if (!this.noAssert) { - if (typeof begin !== 'number' || begin % 1 !== 0) - throw TypeError("Illegal begin: Not an integer"); - begin >>>= 0; - if (typeof end !== 'number' || end % 1 !== 0) - throw TypeError("Illegal end: Not an integer"); - end >>>= 0; - if (begin < 0 || begin > end || end > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); - } - var sd; lxiv.encode(function() { - return begin < end ? this.view.getUint8(begin++) : null; - }.bind(this), sd = stringDestination()); - return sd(); + Builder.isMessage = function(def) { + // Messages require a string name + if (typeof def["name"] !== 'string') + return false; + // Messages do not contain values (enum) or rpc methods (service) + if (typeof def["values"] !== 'undefined' || typeof def["rpc"] !== 'undefined') + return false; + return true; + }; + + /** + * Tests if a definition most likely describes a message field. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isMessageField = function(def) { + // Message fields require a string rule, name and type and an id + if (typeof def["rule"] !== 'string' || typeof def["name"] !== 'string' || typeof def["type"] !== 'string' || typeof def["id"] === 'undefined') + return false; + return true; + }; + + /** + * Tests if a definition most likely describes an enum. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isEnum = function(def) { + // Enums require a string name + if (typeof def["name"] !== 'string') + return false; + // Enums require at least one value + if (typeof def["values"] === 'undefined' || !Array.isArray(def["values"]) || def["values"].length === 0) + return false; + return true; + }; + + /** + * Tests if a definition most likely describes a service. + * @param {!Object} def + * @returns {boolean} + * @expose + */ + Builder.isService = function(def) { + // Services require a string name and an rpc object + if (typeof def["name"] !== 'string' || typeof def["rpc"] !== 'object' || !def["rpc"]) + return false; + return true; }; /** - * Decodes a base64 encoded string to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer + * Tests if a definition most likely describes an extended message + * @param {!Object} def + * @returns {boolean} * @expose */ - ByteBuffer.fromBase64 = function(str, littleEndian, noAssert) { - if (!noAssert) { - if (typeof str !== 'string') - throw TypeError("Illegal str: Not a string"); - if (str.length % 4 !== 0) - throw TypeError("Illegal str: Length not a multiple of 4"); - } - var bb = new ByteBuffer(str.length/4*3, littleEndian, noAssert), - i = 0; - lxiv.decode(stringSource(str), function(b) { - bb.view.setUint8(i++, b); - }); - bb.limit = i; - return bb; + Builder.isExtend = function(def) { + // Extends rquire a string ref + if (typeof def["ref"] !== 'string') + return false; + return true; }; + // ----- Building ----- + /** - * Encodes a binary string to base64 like `window.btoa` does. - * @param {string} str Binary string - * @returns {string} Base64 encoded string - * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa + * Resets the pointer to the root namespace. + * @returns {!ProtoBuf.Builder} this * @expose */ - ByteBuffer.btoa = function(str) { - return ByteBuffer.fromBinary(str).toBase64(); + BuilderPrototype.reset = function() { + this.ptr = this.ns; + return this; }; /** - * Decodes a base64 encoded string to binary like `window.atob` does. - * @param {string} b64 Base64 encoded string - * @returns {string} Binary string - * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob + * Defines a namespace on top of the current pointer position and places the pointer on it. + * @param {string} namespace + * @return {!ProtoBuf.Builder} this * @expose */ - ByteBuffer.atob = function(b64) { - return ByteBuffer.fromBase64(b64).toBinary(); + BuilderPrototype.define = function(namespace) { + if (typeof namespace !== 'string' || !Lang.TYPEREF.test(namespace)) + throw Error("illegal namespace: "+namespace); + namespace.split(".").forEach(function(part) { + var ns = this.ptr.getChild(part); + if (ns === null) // Keep existing + this.ptr.addChild(ns = new Reflect.Namespace(this, this.ptr, part)); + this.ptr = ns; + }, this); + return this; }; - // encodings/binary - /** - * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. - * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. - * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. - * @returns {string} Binary encoded string - * @throws {RangeError} If `offset > limit` + * Creates the specified definitions at the current pointer position. + * @param {!Array.} defs Messages, enums or services to create + * @returns {!ProtoBuf.Builder} this + * @throws {Error} If a message definition is invalid * @expose */ - ByteBufferPrototype.toBinary = function(begin, end) { - begin = typeof begin === 'undefined' ? this.offset : begin; - end = typeof end === 'undefined' ? this.limit : end; - if (!this.noAssert) { - if (typeof begin !== 'number' || begin % 1 !== 0) - throw TypeError("Illegal begin: Not an integer"); - begin >>>= 0; - if (typeof end !== 'number' || end % 1 !== 0) - throw TypeError("Illegal end: Not an integer"); - end >>>= 0; - if (begin < 0 || begin > end || end > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + BuilderPrototype.create = function(defs) { + if (!defs) + return this; // Nothing to create + if (!Array.isArray(defs)) + defs = [defs]; + else { + if (defs.length === 0) + return this; + defs = defs.slice(); } - if (begin === end) - return ""; - var cc = [], pt = []; - while (begin < end) { - cc.push(this.view.getUint8(begin++)); - if (cc.length >= 1024) - pt.push(String.fromCharCode.apply(String, cc)), - cc = []; + + // It's quite hard to keep track of scopes and memory here, so let's do this iteratively. + var stack = [defs]; + while (stack.length > 0) { + defs = stack.pop(); + + if (!Array.isArray(defs)) // Stack always contains entire namespaces + throw Error("not a valid namespace: "+JSON.stringify(defs)); + + while (defs.length > 0) { + var def = defs.shift(); // Namespaces always contain an array of messages, enums and services + + if (Builder.isMessage(def)) { + var obj = new Reflect.Message(this, this.ptr, def["name"], def["options"], def["isGroup"], def["syntax"]); + + // Create OneOfs + var oneofs = {}; + if (def["oneofs"]) + Object.keys(def["oneofs"]).forEach(function(name) { + obj.addChild(oneofs[name] = new Reflect.Message.OneOf(this, obj, name)); + }, this); + + // Create fields + if (def["fields"]) + def["fields"].forEach(function(fld) { + if (obj.getChild(fld["id"]|0) !== null) + throw Error("duplicate or invalid field id in "+obj.name+": "+fld['id']); + if (fld["options"] && typeof fld["options"] !== 'object') + throw Error("illegal field options in "+obj.name+"#"+fld["name"]); + var oneof = null; + if (typeof fld["oneof"] === 'string' && !(oneof = oneofs[fld["oneof"]])) + throw Error("illegal oneof in "+obj.name+"#"+fld["name"]+": "+fld["oneof"]); + fld = new Reflect.Message.Field(this, obj, fld["rule"], fld["keytype"], fld["type"], fld["name"], fld["id"], fld["options"], oneof, def["syntax"]); + if (oneof) + oneof.fields.push(fld); + obj.addChild(fld); + }, this); + + // Push children to stack + var subObj = []; + if (def["enums"]) + def["enums"].forEach(function(enm) { + subObj.push(enm); + }); + if (def["messages"]) + def["messages"].forEach(function(msg) { + subObj.push(msg); + }); + if (def["services"]) + def["services"].forEach(function(svc) { + subObj.push(svc); + }); + + // Set extension ranges + if (def["extensions"]) { + if (typeof def["extensions"][0] === 'number') // pre 5.0.1 + obj.extensions = [ def["extensions"] ]; + else + obj.extensions = def["extensions"]; + } + + // Create on top of current namespace + this.ptr.addChild(obj); + if (subObj.length > 0) { + stack.push(defs); // Push the current level back + defs = subObj; // Continue processing sub level + subObj = null; + this.ptr = obj; // And move the pointer to this namespace + obj = null; + continue; + } + subObj = null; + + } else if (Builder.isEnum(def)) { + + obj = new Reflect.Enum(this, this.ptr, def["name"], def["options"], def["syntax"]); + def["values"].forEach(function(val) { + obj.addChild(new Reflect.Enum.Value(this, obj, val["name"], val["id"])); + }, this); + this.ptr.addChild(obj); + + } else if (Builder.isService(def)) { + + obj = new Reflect.Service(this, this.ptr, def["name"], def["options"]); + Object.keys(def["rpc"]).forEach(function(name) { + var mtd = def["rpc"][name]; + obj.addChild(new Reflect.Service.RPCMethod(this, obj, name, mtd["request"], mtd["response"], !!mtd["request_stream"], !!mtd["response_stream"], mtd["options"])); + }, this); + this.ptr.addChild(obj); + + } else if (Builder.isExtend(def)) { + + obj = this.ptr.resolve(def["ref"], true); + if (obj) { + def["fields"].forEach(function(fld) { + if (obj.getChild(fld['id']|0) !== null) + throw Error("duplicate extended field id in "+obj.name+": "+fld['id']); + // Check if field id is allowed to be extended + if (obj.extensions) { + var valid = false; + obj.extensions.forEach(function(range) { + if (fld["id"] >= range[0] && fld["id"] <= range[1]) + valid = true; + }); + if (!valid) + throw Error("illegal extended field id in "+obj.name+": "+fld['id']+" (not within valid ranges)"); + } + // Convert extension field names to camel case notation if the override is set + var name = fld["name"]; + if (this.options['convertFieldsToCamelCase']) + name = ProtoBuf.Util.toCamelCase(name); + // see #161: Extensions use their fully qualified name as their runtime key and... + var field = new Reflect.Message.ExtensionField(this, obj, fld["rule"], fld["type"], this.ptr.fqn()+'.'+name, fld["id"], fld["options"]); + // ...are added on top of the current namespace as an extension which is used for + // resolving their type later on (the extension always keeps the original name to + // prevent naming collisions) + var ext = new Reflect.Extension(this, this.ptr, fld["name"], field); + field.extension = ext; + this.ptr.addChild(ext); + obj.addChild(field); + }, this); + + } else if (!/\.?google\.protobuf\./.test(def["ref"])) // Silently skip internal extensions + throw Error("extended message "+def["ref"]+" is not defined"); + + } else + throw Error("not a valid definition: "+JSON.stringify(def)); + + def = null; + obj = null; + } + // Break goes here + defs = null; + this.ptr = this.ptr.parent; // Namespace done, continue at parent } - return pt.join('') + String.fromCharCode.apply(String, cc); + this.resolved = false; // Require re-resolve + this.result = null; // Require re-build + return this; }; /** - * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + * Propagates syntax to all children. + * @param {!Object} parent + * @inner */ - ByteBuffer.fromBinary = function(str, littleEndian, noAssert) { - if (!noAssert) { - if (typeof str !== 'string') - throw TypeError("Illegal str: Not a string"); + function propagateSyntax(parent) { + if (parent['messages']) { + parent['messages'].forEach(function(child) { + child["syntax"] = parent["syntax"]; + propagateSyntax(child); + }); } - var i = 0, k = str.length, charCode, - bb = new ByteBuffer(k, littleEndian, noAssert); - while (i 255) - throw RangeError("Illegal charCode at "+i+": 0 <= "+charCode+" <= 255"); - bb.view.setUint8(i++, charCode); + if (parent['enums']) { + parent['enums'].forEach(function(child) { + child["syntax"] = parent["syntax"]; + }); } - bb.limit = k; - return bb; - }; - - // encodings/debug + } /** - * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: - * * `<` : offset, - * * `'` : markedOffset, - * * `>` : limit, - * * `|` : offset and limit, - * * `[` : offset and markedOffset, - * * `]` : markedOffset and limit, - * * `!` : offset, markedOffset and limit - * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` - * @returns {string|!Array.} Debug string or array of lines if `asArray = true` + * Imports another definition into this builder. + * @param {Object.} json Parsed import + * @param {(string|{root: string, file: string})=} filename Imported file name + * @returns {!ProtoBuf.Builder} this + * @throws {Error} If the definition or file cannot be imported * @expose - * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` - * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` - * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` - * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` */ - ByteBufferPrototype.toDebug = function(columns) { - var i = -1, - k = this.buffer.byteLength, - b, - hex = "", - asc = "", - out = ""; - while (i 32 && b < 127 ? String.fromCharCode(b) : '.'; + BuilderPrototype["import"] = function(json, filename) { + var delim = '/'; + + // Make sure to skip duplicate imports + + if (typeof filename === 'string') { + + if (ProtoBuf.Util.IS_NODE) + filename = require("path")['resolve'](filename); + if (this.files[filename] === true) + return this.reset(); + this.files[filename] = true; + + } else if (typeof filename === 'object') { // Object with root, file. + + var root = filename.root; + if (ProtoBuf.Util.IS_NODE) + root = require("path")['resolve'](root); + if (root.indexOf("\\") >= 0 || filename.file.indexOf("\\") >= 0) + delim = '\\'; + var fname = root + delim + filename.file; + if (this.files[fname] === true) + return this.reset(); + this.files[fname] = true; + } + + // Import imports + + if (json['imports'] && json['imports'].length > 0) { + var importRoot, + resetRoot = false; + + if (typeof filename === 'object') { // If an import root is specified, override + + this.importRoot = filename["root"]; resetRoot = true; // ... and reset afterwards + importRoot = this.importRoot; + filename = filename["file"]; + if (importRoot.indexOf("\\") >= 0 || filename.indexOf("\\") >= 0) + delim = '\\'; + + } else if (typeof filename === 'string') { + + if (this.importRoot) // If import root is overridden, use it + importRoot = this.importRoot; + else { // Otherwise compute from filename + if (filename.indexOf("/") >= 0) { // Unix + importRoot = filename.replace(/\/[^\/]*$/, ""); + if (/* /file.proto */ importRoot === "") + importRoot = "/"; + } else if (filename.indexOf("\\") >= 0) { // Windows + importRoot = filename.replace(/\\[^\\]*$/, ""); + delim = '\\'; + } else + importRoot = "."; } + + } else + importRoot = null; + + for (var i=0; i 0 && i % 16 === 0 && i !== k) { - while (hex.length < 3*16+3) hex += " "; - out += hex+asc+"\n"; - hex = asc = ""; + if (resetRoot) // Reset import root override when all imports are done + this.importRoot = null; + } + + // Import structures + + if (json['package']) + this.define(json['package']); + if (json['syntax']) + propagateSyntax(json); + var base = this.ptr; + if (json['options']) + Object.keys(json['options']).forEach(function(key) { + base.options[key] = json['options'][key]; + }); + if (json['messages']) + this.create(json['messages']), + this.ptr = base; + if (json['enums']) + this.create(json['enums']), + this.ptr = base; + if (json['services']) + this.create(json['services']), + this.ptr = base; + if (json['extends']) + this.create(json['extends']); + + return this.reset(); + }; + + /** + * Resolves all namespace objects. + * @throws {Error} If a type cannot be resolved + * @returns {!ProtoBuf.Builder} this + * @expose + */ + BuilderPrototype.resolveAll = function() { + // Resolve all reflected objects + var res; + if (this.ptr == null || typeof this.ptr.type === 'object') + return this; // Done (already resolved) + + if (this.ptr instanceof Reflect.Namespace) { // Resolve children + + this.ptr.children.forEach(function(child) { + this.ptr = child; + this.resolveAll(); + }, this); + + } else if (this.ptr instanceof Reflect.Message.Field) { // Resolve type + + if (!Lang.TYPE.test(this.ptr.type)) { + if (!Lang.TYPEREF.test(this.ptr.type)) + throw Error("illegal type reference in "+this.ptr.toString(true)+": "+this.ptr.type); + res = (this.ptr instanceof Reflect.Message.ExtensionField ? this.ptr.extension.parent : this.ptr.parent).resolve(this.ptr.type, true); + if (!res) + throw Error("unresolvable type reference in "+this.ptr.toString(true)+": "+this.ptr.type); + this.ptr.resolvedType = res; + if (res instanceof Reflect.Enum) { + this.ptr.type = ProtoBuf.TYPES["enum"]; + if (this.ptr.syntax === 'proto3' && res.syntax !== 'proto3') + throw Error("proto3 message cannot reference proto2 enum"); } + else if (res instanceof Reflect.Message) + this.ptr.type = res.isGroup ? ProtoBuf.TYPES["group"] : ProtoBuf.TYPES["message"]; + else + throw Error("illegal type reference in "+this.ptr.toString(true)+": "+this.ptr.type); + } else + this.ptr.type = ProtoBuf.TYPES[this.ptr.type]; + + // If it's a map field, also resolve the key type. The key type can be only a numeric, string, or bool type + // (i.e., no enums or messages), so we don't need to resolve against the current namespace. + if (this.ptr.map) { + if (!Lang.TYPE.test(this.ptr.keyType)) + throw Error("illegal key type for map field in "+this.ptr.toString(true)+": "+this.ptr.keyType); + this.ptr.keyType = ProtoBuf.TYPES[this.ptr.keyType]; } - if (i === this.offset && i === this.limit) - hex += i === this.markedOffset ? "!" : "|"; - else if (i === this.offset) - hex += i === this.markedOffset ? "[" : "<"; - else if (i === this.limit) - hex += i === this.markedOffset ? "]" : ">"; - else - hex += i === this.markedOffset ? "'" : (columns || (i !== 0 && i !== k) ? " " : ""); - } - if (columns && hex !== " ") { - while (hex.length < 3*16+3) hex += " "; - out += hex+asc+"\n"; - } - return columns ? out : hex; + + } else if (this.ptr instanceof ProtoBuf.Reflect.Service.Method) { + + if (this.ptr instanceof ProtoBuf.Reflect.Service.RPCMethod) { + res = this.ptr.parent.resolve(this.ptr.requestName, true); + if (!res || !(res instanceof ProtoBuf.Reflect.Message)) + throw Error("Illegal type reference in "+this.ptr.toString(true)+": "+this.ptr.requestName); + this.ptr.resolvedRequestType = res; + res = this.ptr.parent.resolve(this.ptr.responseName, true); + if (!res || !(res instanceof ProtoBuf.Reflect.Message)) + throw Error("Illegal type reference in "+this.ptr.toString(true)+": "+this.ptr.responseName); + this.ptr.resolvedResponseType = res; + } else // Should not happen as nothing else is implemented + throw Error("illegal service type in "+this.ptr.toString(true)); + + } else if ( + !(this.ptr instanceof ProtoBuf.Reflect.Message.OneOf) && // Not built + !(this.ptr instanceof ProtoBuf.Reflect.Extension) && // Not built + !(this.ptr instanceof ProtoBuf.Reflect.Enum.Value) // Built in enum + ) + throw Error("illegal object in namespace: "+typeof(this.ptr)+": "+this.ptr); + + return this.reset(); }; /** - * Decodes a hex encoded string with marked offsets to a ByteBuffer. - * @param {string} str Debug string to decode (not be generated with `columns = true`) - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer + * Builds the protocol. This will first try to resolve all definitions and, if this has been successful, + * return the built package. + * @param {(string|Array.)=} path Specifies what to return. If omitted, the entire namespace will be returned. + * @returns {!ProtoBuf.Builder.Message|!Object.} + * @throws {Error} If a type could not be resolved * @expose - * @see ByteBuffer#toDebug */ - ByteBuffer.fromDebug = function(str, littleEndian, noAssert) { - var k = str.length, - bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert); - var i = 0, j = 0, ch, b, - rs = false, // Require symbol next - ho = false, hm = false, hl = false, // Already has offset, markedOffset, limit? - fail = false; - while (i': - if (!noAssert) { - if (hl) { - fail = true; break; - } - hl = true; - } - bb.limit = j; - rs = false; - break; - case "'": - if (!noAssert) { - if (hm) { - fail = true; break; - } - hm = true; - } - bb.markedOffset = j; - rs = false; - break; - case ' ': - rs = false; - break; - default: - if (!noAssert) { - if (rs) { - fail = true; break; - } - } - b = parseInt(ch+str.charAt(i++), 16); - if (!noAssert) { - if (isNaN(b) || b < 0 || b > 255) - throw TypeError("Illegal str: Not a debug encoded string"); - } - bb.view.setUint8(j++, b); - rs = true; + BuilderPrototype.build = function(path) { + this.reset(); + if (!this.resolved) + this.resolveAll(), + this.resolved = true, + this.result = null; // Require re-build + if (this.result === null) // (Re-)Build + this.result = this.ns.build(); + if (!path) + return this.result; + var part = typeof path === 'string' ? path.split(".") : path, + ptr = this.result; // Build namespace pointer (no hasChild etc.) + for (var i=0; i>>= 0; - if (typeof end !== 'number' || end % 1 !== 0) - throw TypeError("Illegal end: Not an integer"); - end >>>= 0; - if (begin < 0 || begin > end || end > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); - } - var out = new Array(end - begin), - b; - while (begin < end) { - b = this.view.getUint8(begin++); - if (b < 0x10) - out.push("0", b.toString(16)); - else out.push(b.toString(16)); - } - return out.join(''); + BuilderPrototype.lookup = function(path, excludeNonNamespace) { + return path ? this.ns.resolve(path, excludeNonNamespace) : this.ns; }; /** - * Decodes a hex encoded string to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer + * Returns a string representation of this object. + * @return {string} String representation as of "Builder" * @expose */ - ByteBuffer.fromHex = function(str, littleEndian, noAssert) { - if (!noAssert) { - if (typeof str !== 'string') - throw TypeError("Illegal str: Not a string"); - if (str.length % 2 !== 0) - throw TypeError("Illegal str: Length not a multiple of 2"); - } - var k = str.length, - bb = new ByteBuffer((k / 2) | 0, littleEndian), - b; - for (var i=0, j=0; i 255) - throw TypeError("Illegal str: Contains non-hex characters"); - bb.view.setUint8(j++, b); - } - bb.limit = j; - return bb; + BuilderPrototype.toString = function() { + return "Builder"; }; - // utfx-embeddable + // ----- Base classes ----- + // Exist for the sole purpose of being able to "... instanceof ProtoBuf.Builder.Message" etc. /** - * utfx-embeddable (c) 2014 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/utfx for details + * @alias ProtoBuf.Builder.Message */ - var utfx = function() { - "use strict"; + Builder.Message = function() {}; + + /** + * @alias ProtoBuf.Builder.Enum + */ + Builder.Enum = function() {}; + + /** + * @alias ProtoBuf.Builder.Message + */ + Builder.Service = function() {}; + + return Builder; + + })(ProtoBuf, ProtoBuf.Lang, ProtoBuf.Reflect); + + /** + * @alias ProtoBuf.Map + * @expose + */ + ProtoBuf.Map = (function(ProtoBuf, Reflect) { + "use strict"; + + /** + * Constructs a new Map. A Map is a container that is used to implement map + * fields on message objects. It closely follows the ES6 Map API; however, + * it is distinct because we do not want to depend on external polyfills or + * on ES6 itself. + * + * @exports ProtoBuf.Map + * @param {!ProtoBuf.Reflect.Field} field Map field + * @param {Object.=} contents Initial contents + * @constructor + */ + var Map = function(field, contents) { + if (!field.map) + throw Error("field is not a map"); /** - * utfx namespace. - * @inner - * @type {!Object.} + * The field corresponding to this map. + * @type {!ProtoBuf.Reflect.Field} */ - var utfx = {}; + this.field = field; /** - * Maximum valid code point. - * @type {number} - * @const + * Element instance corresponding to key type. + * @type {!ProtoBuf.Reflect.Element} */ - utfx.MAX_CODEPOINT = 0x10FFFF; + this.keyElem = new Reflect.Element(field.keyType, null, true, field.syntax); /** - * Encodes UTF8 code points to UTF8 bytes. - * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point - * respectively `null` if there are no more code points left or a single numeric code point. - * @param {!function(number)} dst Bytes destination as a function successively called with the next byte + * Element instance corresponding to value type. + * @type {!ProtoBuf.Reflect.Element} */ - utfx.encodeUTF8 = function(src, dst) { - var cp = null; - if (typeof src === 'number') - cp = src, - src = function() { return null; }; - while (cp !== null || (cp = src()) !== null) { - if (cp < 0x80) - dst(cp&0x7F); - else if (cp < 0x800) - dst(((cp>>6)&0x1F)|0xC0), - dst((cp&0x3F)|0x80); - else if (cp < 0x10000) - dst(((cp>>12)&0x0F)|0xE0), - dst(((cp>>6)&0x3F)|0x80), - dst((cp&0x3F)|0x80); - else - dst(((cp>>18)&0x07)|0xF0), - dst(((cp>>12)&0x3F)|0x80), - dst(((cp>>6)&0x3F)|0x80), - dst((cp&0x3F)|0x80); - cp = null; - } - }; + this.valueElem = new Reflect.Element(field.type, field.resolvedType, false, field.syntax); /** - * Decodes UTF8 bytes to UTF8 code points. - * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there - * are no more bytes left. - * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. - * @throws {RangeError} If a starting byte is invalid in UTF8 - * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the - * remaining bytes. + * Internal map: stores mapping of (string form of key) -> (key, value) + * pair. + * + * We provide map semantics for arbitrary key types, but we build on top + * of an Object, which has only string keys. In order to avoid the need + * to convert a string key back to its native type in many situations, + * we store the native key value alongside the value. Thus, we only need + * a one-way mapping from a key type to its string form that guarantees + * uniqueness and equality (i.e., str(K1) === str(K2) if and only if K1 + * === K2). + * + * @type {!Object} */ - utfx.decodeUTF8 = function(src, dst) { - var a, b, c, d, fail = function(b) { - b = b.slice(0, b.indexOf(null)); - var err = Error(b.toString()); - err.name = "TruncatedError"; - err['bytes'] = b; - throw err; - }; - while ((a = src()) !== null) { - if ((a&0x80) === 0) - dst(a); - else if ((a&0xE0) === 0xC0) - ((b = src()) === null) && fail([a, b]), - dst(((a&0x1F)<<6) | (b&0x3F)); - else if ((a&0xF0) === 0xE0) - ((b=src()) === null || (c=src()) === null) && fail([a, b, c]), - dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F)); - else if ((a&0xF8) === 0xF0) - ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]), - dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F)); - else throw RangeError("Illegal starting byte: "+a); - } - }; + this.map = {}; /** - * Converts UTF16 characters to UTF8 code points. - * @param {!function():number|null} src Characters source as a function returning the next char code respectively - * `null` if there are no more characters left. - * @param {!function(number)} dst Code points destination as a function successively called with each converted code - * point. + * Returns the number of elements in the map. */ - utfx.UTF16toUTF8 = function(src, dst) { - var c1, c2 = null; - while (true) { - if ((c1 = c2 !== null ? c2 : src()) === null) - break; - if (c1 >= 0xD800 && c1 <= 0xDFFF) { - if ((c2 = src()) !== null) { - if (c2 >= 0xDC00 && c2 <= 0xDFFF) { - dst((c1-0xD800)*0x400+c2-0xDC00+0x10000); - c2 = null; continue; - } - } - } - dst(c1); + Object.defineProperty(this, "size", { + get: function() { return Object.keys(this.map).length; } + }); + + // Fill initial contents from a raw object. + if (contents) { + var keys = Object.keys(contents); + for (var i = 0; i < keys.length; i++) { + var key = this.keyElem.valueFromString(keys[i]); + var val = this.valueElem.verifyValue(contents[keys[i]]); + this.map[this.keyElem.valueToString(key)] = + { key: key, value: val }; } - if (c2 !== null) dst(c2); - }; + } + }; - /** - * Converts UTF8 code points to UTF16 characters. - * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point - * respectively `null` if there are no more code points left or a single numeric code point. - * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. - * @throws {RangeError} If a code point is out of range - */ - utfx.UTF8toUTF16 = function(src, dst) { - var cp = null; - if (typeof src === 'number') - cp = src, src = function() { return null; }; - while (cp !== null || (cp = src()) !== null) { - if (cp <= 0xFFFF) - dst(cp); - else - cp -= 0x10000, - dst((cp>>10)+0xD800), - dst((cp%0x400)+0xDC00); - cp = null; + var MapPrototype = Map.prototype; + + /** + * Helper: return an iterator over an array. + * @param {!Array<*>} arr the array + * @returns {!Object} an iterator + * @inner + */ + function arrayIterator(arr) { + var idx = 0; + return { + next: function() { + if (idx < arr.length) + return { done: false, value: arr[idx++] }; + return { done: true }; } - }; + } + } - /** - * Converts and encodes UTF16 characters to UTF8 bytes. - * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` - * if there are no more characters left. - * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. - */ - utfx.encodeUTF16toUTF8 = function(src, dst) { - utfx.UTF16toUTF8(src, function(cp) { - utfx.encodeUTF8(cp, dst); - }); - }; + /** + * Clears the map. + */ + MapPrototype.clear = function() { + this.map = {}; + }; - /** - * Decodes and converts UTF8 bytes to UTF16 characters. - * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there - * are no more bytes left. - * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. - * @throws {RangeError} If a starting byte is invalid in UTF8 - * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. - */ - utfx.decodeUTF8toUTF16 = function(src, dst) { - utfx.decodeUTF8(src, function(cp) { - utfx.UTF8toUTF16(cp, dst); - }); - }; + /** + * Deletes a particular key from the map. + * @returns {boolean} Whether any entry with this key was deleted. + */ + MapPrototype["delete"] = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + var hadKey = keyValue in this.map; + delete this.map[keyValue]; + return hadKey; + }; - /** - * Calculates the byte length of an UTF8 code point. - * @param {number} cp UTF8 code point - * @returns {number} Byte length - */ - utfx.calculateCodePoint = function(cp) { - return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; - }; + /** + * Returns an iterator over [key, value] pairs in the map. + * @returns {Object} The iterator + */ + MapPrototype.entries = function() { + var entries = []; + var strKeys = Object.keys(this.map); + for (var i = 0, entry; i < strKeys.length; i++) + entries.push([(entry=this.map[strKeys[i]]).key, entry.value]); + return arrayIterator(entries); + }; - /** - * Calculates the number of UTF8 bytes required to store UTF8 code points. - * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively - * `null` if there are no more code points left. - * @returns {number} The number of UTF8 bytes required - */ - utfx.calculateUTF8 = function(src) { - var cp, l=0; - while ((cp = src()) !== null) - l += utfx.calculateCodePoint(cp); - return l; - }; + /** + * Returns an iterator over keys in the map. + * @returns {Object} The iterator + */ + MapPrototype.keys = function() { + var keys = []; + var strKeys = Object.keys(this.map); + for (var i = 0; i < strKeys.length; i++) + keys.push(this.map[strKeys[i]].key); + return arrayIterator(keys); + }; - /** - * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. - * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively - * `null` if there are no more characters left. - * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. - */ - utfx.calculateUTF16asUTF8 = function(src) { - var n=0, l=0; - utfx.UTF16toUTF8(src, function(cp) { - ++n; l += utfx.calculateCodePoint(cp); - }); - return [n,l]; - }; + /** + * Returns an iterator over values in the map. + * @returns {!Object} The iterator + */ + MapPrototype.values = function() { + var values = []; + var strKeys = Object.keys(this.map); + for (var i = 0; i < strKeys.length; i++) + values.push(this.map[strKeys[i]].value); + return arrayIterator(values); + }; - return utfx; - }(); + /** + * Iterates over entries in the map, calling a function on each. + * @param {function(this:*, *, *, *)} cb The callback to invoke with value, key, and map arguments. + * @param {Object=} thisArg The `this` value for the callback + */ + MapPrototype.forEach = function(cb, thisArg) { + var strKeys = Object.keys(this.map); + for (var i = 0, entry; i < strKeys.length; i++) + cb.call(thisArg, (entry=this.map[strKeys[i]]).value, entry.key, this); + }; - // encodings/utf8 + /** + * Sets a key in the map to the given value. + * @param {*} key The key + * @param {*} value The value + * @returns {!ProtoBuf.Map} The map instance + */ + MapPrototype.set = function(key, value) { + var keyValue = this.keyElem.verifyValue(key); + var valValue = this.valueElem.verifyValue(value); + this.map[this.keyElem.valueToString(keyValue)] = + { key: keyValue, value: valValue }; + return this; + }; /** - * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded - * string. - * @returns {string} Hex encoded string - * @throws {RangeError} If `offset > limit` - * @expose + * Gets the value corresponding to a key in the map. + * @param {*} key The key + * @returns {*|undefined} The value, or `undefined` if key not present */ - ByteBufferPrototype.toUTF8 = function(begin, end) { - if (typeof begin === 'undefined') begin = this.offset; - if (typeof end === 'undefined') end = this.limit; - if (!this.noAssert) { - if (typeof begin !== 'number' || begin % 1 !== 0) - throw TypeError("Illegal begin: Not an integer"); - begin >>>= 0; - if (typeof end !== 'number' || end % 1 !== 0) - throw TypeError("Illegal end: Not an integer"); - end >>>= 0; - if (begin < 0 || begin > end || end > this.buffer.byteLength) - throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); - } - var sd; try { - utfx.decodeUTF8toUTF16(function() { - return begin < end ? this.view.getUint8(begin++) : null; - }.bind(this), sd = stringDestination()); - } catch (e) { - if (begin !== end) - throw RangeError("Illegal range: Truncated data, "+begin+" != "+end); - } - return sd(); + MapPrototype.get = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + if (!(keyValue in this.map)) + return undefined; + return this.map[keyValue].value; }; /** - * Decodes an UTF8 encoded string to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + * Determines whether the given key is present in the map. + * @param {*} key The key + * @returns {boolean} `true` if the key is present */ - ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) { - if (!noAssert) - if (typeof str !== 'string') - throw TypeError("Illegal str: Not a string"); - var bb = new ByteBuffer(utfx.calculateUTF16asUTF8(stringSource(str), true)[1], littleEndian, noAssert), - i = 0; - utfx.encodeUTF16toUTF8(stringSource(str), function(b) { - bb.view.setUint8(i++, b); - }); - bb.limit = i; - return bb; + MapPrototype.has = function(key) { + var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); + return (keyValue in this.map); }; + return Map; + })(ProtoBuf, ProtoBuf.Reflect); - return ByteBuffer; - } - /* CommonJS */ if (typeof require === 'function' && typeof module === 'object' && module && typeof exports === 'object' && exports) - module['exports'] = (function() { - var Long; try { Long = require("long"); } catch (e) {} - return loadByteBuffer(Long); - })(); - /* AMD */ else if (typeof define === 'function' && define["amd"]) - define("ByteBuffer", ["Long"], function(Long) { return loadByteBuffer(Long); }); - /* Global */ else - (global["dcodeIO"] = global["dcodeIO"] || {})["ByteBuffer"] = loadByteBuffer(global["dcodeIO"]["Long"]); + /** + * Loads a .proto string and returns the Builder. + * @param {string} proto .proto file contents + * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted. + * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports. + * @return {ProtoBuf.Builder} Builder to create new messages + * @throws {Error} If the definition cannot be parsed or built + * @expose + */ + ProtoBuf.loadProto = function(proto, builder, filename) { + if (typeof builder === 'string' || (builder && typeof builder["file"] === 'string' && typeof builder["root"] === 'string')) + filename = builder, + builder = undefined; + return ProtoBuf.loadJson(ProtoBuf.DotProto.Parser.parse(proto), builder, filename); + }; -})(this); + /** + * Loads a .proto string and returns the Builder. This is an alias of {@link ProtoBuf.loadProto}. + * @function + * @param {string} proto .proto file contents + * @param {(ProtoBuf.Builder|string)=} builder Builder to append to. Will create a new one if omitted. + * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports. + * @return {ProtoBuf.Builder} Builder to create new messages + * @throws {Error} If the definition cannot be parsed or built + * @expose + */ + ProtoBuf.protoFromString = ProtoBuf.loadProto; // Legacy + + /** + * Loads a .proto file and returns the Builder. + * @param {string|{root: string, file: string}} filename Path to proto file or an object specifying 'file' with + * an overridden 'root' path for all imported files. + * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and + * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the + * file will be read synchronously and this function will return the Builder. + * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted. + * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the + * request has failed), else undefined + * @expose + */ + ProtoBuf.loadProtoFile = function(filename, callback, builder) { + if (callback && typeof callback === 'object') + builder = callback, + callback = null; + else if (!callback || typeof callback !== 'function') + callback = null; + if (callback) + return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename["root"]+"/"+filename["file"], function(contents) { + if (contents === null) { + callback(Error("Failed to fetch file")); + return; + } + try { + callback(null, ProtoBuf.loadProto(contents, builder, filename)); + } catch (e) { + callback(e); + } + }); + var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename["root"]+"/"+filename["file"] : filename); + return contents === null ? null : ProtoBuf.loadProto(contents, builder, filename); + }; + + /** + * Loads a .proto file and returns the Builder. This is an alias of {@link ProtoBuf.loadProtoFile}. + * @function + * @param {string|{root: string, file: string}} filename Path to proto file or an object specifying 'file' with + * an overridden 'root' path for all imported files. + * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and + * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the + * file will be read synchronously and this function will return the Builder. + * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted. + * @return {!ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the + * request has failed), else undefined + * @expose + */ + ProtoBuf.protoFromFile = ProtoBuf.loadProtoFile; // Legacy + + + /** + * Constructs a new empty Builder. + * @param {Object.=} options Builder options, defaults to global options set on ProtoBuf + * @return {!ProtoBuf.Builder} Builder + * @expose + */ + ProtoBuf.newBuilder = function(options) { + options = options || {}; + if (typeof options['convertFieldsToCamelCase'] === 'undefined') + options['convertFieldsToCamelCase'] = ProtoBuf.convertFieldsToCamelCase; + if (typeof options['populateAccessors'] === 'undefined') + options['populateAccessors'] = ProtoBuf.populateAccessors; + return new ProtoBuf.Builder(options); + }; + + /** + * Loads a .json definition and returns the Builder. + * @param {!*|string} json JSON definition + * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted. + * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports. + * @return {ProtoBuf.Builder} Builder to create new messages + * @throws {Error} If the definition cannot be parsed or built + * @expose + */ + ProtoBuf.loadJson = function(json, builder, filename) { + if (typeof builder === 'string' || (builder && typeof builder["file"] === 'string' && typeof builder["root"] === 'string')) + filename = builder, + builder = null; + if (!builder || typeof builder !== 'object') + builder = ProtoBuf.newBuilder(); + if (typeof json === 'string') + json = JSON.parse(json); + builder["import"](json, filename); + builder.resolveAll(); + return builder; + }; + + /** + * Loads a .json file and returns the Builder. + * @param {string|!{root: string, file: string}} filename Path to json file or an object specifying 'file' with + * an overridden 'root' path for all imported files. + * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and + * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the + * file will be read synchronously and this function will return the Builder. + * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted. + * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the + * request has failed), else undefined + * @expose + */ + ProtoBuf.loadJsonFile = function(filename, callback, builder) { + if (callback && typeof callback === 'object') + builder = callback, + callback = null; + else if (!callback || typeof callback !== 'function') + callback = null; + if (callback) + return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename["root"]+"/"+filename["file"], function(contents) { + if (contents === null) { + callback(Error("Failed to fetch file")); + return; + } + try { + callback(null, ProtoBuf.loadJson(JSON.parse(contents), builder, filename)); + } catch (e) { + callback(e); + } + }); + var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename["root"]+"/"+filename["file"] : filename); + return contents === null ? null : ProtoBuf.loadJson(JSON.parse(contents), builder, filename); + }; + + return ProtoBuf; +}); + +}).call(this,require('_process')) +},{"_process":111,"bytebuffer":50,"fs":46,"long":100,"path":107}],3:[function(require,module,exports){ +var Internal = Internal || {}; + +Internal.protoText = function() { + var protoText = {}; + + protoText['protos/WhisperTextProtocol.proto'] = + 'package textsecure;\n' + + 'option java_package = "org.whispersystems.libsignal.protocol";\n' + + 'option java_outer_classname = "WhisperProtos";\n' + + 'message WhisperMessage {\n' + + ' optional bytes ephemeralKey = 1;\n' + + ' optional uint32 counter = 2;\n' + + ' optional uint32 previousCounter = 3;\n' + + ' optional bytes ciphertext = 4; // PushMessageContent\n' + + '}\n' + + 'message PreKeyWhisperMessage {\n' + + ' optional uint32 registrationId = 5;\n' + + ' optional uint32 preKeyId = 1;\n' + + ' optional uint32 signedPreKeyId = 6;\n' + + ' optional bytes baseKey = 2;\n' + + ' optional bytes identityKey = 3;\n' + + ' optional bytes message = 4; // WhisperMessage\n' + + '}\n' + + 'message KeyExchangeMessage {\n' + + ' optional uint32 id = 1;\n' + + ' optional bytes baseKey = 2;\n' + + ' optional bytes ephemeralKey = 3;\n' + + ' optional bytes identityKey = 4;\n' + + ' optional bytes baseKeySignature = 5;\n' + + '}\n' + +'' ; + + return protoText; +}(); +/* vim: ts=4:sw=4 */ + +// this is concatinated after ../protos/WhisperTextProtocol.proto +// Internal.protoText is getting passed in from that file +// (see the Gruntfile's `protos_concat` routine) +// here we export the loaded protobuf, an object +// { WhisperMessage, PreKeyWhisperMessage } +module.exports = function protobuf () { + 'use strict'; + var dcodeIO = require('../build/dcodeIO.js'); + + function loadProtoBufs(filename) { + return dcodeIO.loadProto(Internal.protoText['protos/' + filename]).build('textsecure'); + } + + var protocolMessages = loadProtoBufs('WhisperTextProtocol.proto'); + + return { + WhisperMessage : protocolMessages.WhisperMessage, + PreKeyWhisperMessage : protocolMessages.PreKeyWhisperMessage + }; +}(); + +},{"../build/dcodeIO.js":2}],4:[function(require,module,exports){ +var asn1 = exports; + +asn1.bignum = require('bn.js'); + +asn1.define = require('./asn1/api').define; +asn1.base = require('./asn1/base'); +asn1.constants = require('./asn1/constants'); +asn1.decoders = require('./asn1/decoders'); +asn1.encoders = require('./asn1/encoders'); + +},{"./asn1/api":5,"./asn1/base":7,"./asn1/constants":11,"./asn1/decoders":13,"./asn1/encoders":16,"bn.js":19}],5:[function(require,module,exports){ +var asn1 = require('../asn1'); +var inherits = require('inherits'); + +var api = exports; + +api.define = function define(name, body) { + return new Entity(name, body); +}; + +function Entity(name, body) { + this.name = name; + this.body = body; + + this.decoders = {}; + this.encoders = {}; +}; + +Entity.prototype._createNamed = function createNamed(base) { + var named; + try { + named = require('vm').runInThisContext( + '(function ' + this.name + '(entity) {\n' + + ' this._initNamed(entity);\n' + + '})' + ); + } catch (e) { + named = function (entity) { + this._initNamed(entity); + }; + } + inherits(named, base); + named.prototype._initNamed = function initnamed(entity) { + base.call(this, entity); + }; + + return new named(this); +}; + +Entity.prototype._getDecoder = function _getDecoder(enc) { + enc = enc || 'der'; + // Lazily create decoder + if (!this.decoders.hasOwnProperty(enc)) + this.decoders[enc] = this._createNamed(asn1.decoders[enc]); + return this.decoders[enc]; +}; + +Entity.prototype.decode = function decode(data, enc, options) { + return this._getDecoder(enc).decode(data, options); +}; + +Entity.prototype._getEncoder = function _getEncoder(enc) { + enc = enc || 'der'; + // Lazily create encoder + if (!this.encoders.hasOwnProperty(enc)) + this.encoders[enc] = this._createNamed(asn1.encoders[enc]); + return this.encoders[enc]; +}; + +Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) { + return this._getEncoder(enc).encode(data, reporter); +}; + +},{"../asn1":4,"inherits":97,"vm":142}],6:[function(require,module,exports){ +var inherits = require('inherits'); +var Reporter = require('../base').Reporter; +var Buffer = require('buffer').Buffer; + +function DecoderBuffer(base, options) { + Reporter.call(this, options); + if (!Buffer.isBuffer(base)) { + this.error('Input not Buffer'); + return; + } + + this.base = base; + this.offset = 0; + this.length = base.length; +} +inherits(DecoderBuffer, Reporter); +exports.DecoderBuffer = DecoderBuffer; + +DecoderBuffer.prototype.save = function save() { + return { offset: this.offset, reporter: Reporter.prototype.save.call(this) }; +}; + +DecoderBuffer.prototype.restore = function restore(save) { + // Return skipped data + var res = new DecoderBuffer(this.base); + res.offset = save.offset; + res.length = this.offset; + + this.offset = save.offset; + Reporter.prototype.restore.call(this, save.reporter); + + return res; +}; + +DecoderBuffer.prototype.isEmpty = function isEmpty() { + return this.offset === this.length; +}; + +DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) { + if (this.offset + 1 <= this.length) + return this.base.readUInt8(this.offset++, true); + else + return this.error(fail || 'DecoderBuffer overrun'); +} + +DecoderBuffer.prototype.skip = function skip(bytes, fail) { + if (!(this.offset + bytes <= this.length)) + return this.error(fail || 'DecoderBuffer overrun'); + + var res = new DecoderBuffer(this.base); + + // Share reporter state + res._reporterState = this._reporterState; + + res.offset = this.offset; + res.length = this.offset + bytes; + this.offset += bytes; + return res; +} + +DecoderBuffer.prototype.raw = function raw(save) { + return this.base.slice(save ? save.offset : this.offset, this.length); +} + +function EncoderBuffer(value, reporter) { + if (Array.isArray(value)) { + this.length = 0; + this.value = value.map(function(item) { + if (!(item instanceof EncoderBuffer)) + item = new EncoderBuffer(item, reporter); + this.length += item.length; + return item; + }, this); + } else if (typeof value === 'number') { + if (!(0 <= value && value <= 0xff)) + return reporter.error('non-byte EncoderBuffer value'); + this.value = value; + this.length = 1; + } else if (typeof value === 'string') { + this.value = value; + this.length = Buffer.byteLength(value); + } else if (Buffer.isBuffer(value)) { + this.value = value; + this.length = value.length; + } else { + return reporter.error('Unsupported type: ' + typeof value); + } +} +exports.EncoderBuffer = EncoderBuffer; + +EncoderBuffer.prototype.join = function join(out, offset) { + if (!out) + out = new Buffer(this.length); + if (!offset) + offset = 0; + + if (this.length === 0) + return out; + + if (Array.isArray(this.value)) { + this.value.forEach(function(item) { + item.join(out, offset); + offset += item.length; + }); + } else { + if (typeof this.value === 'number') + out[offset] = this.value; + else if (typeof this.value === 'string') + out.write(this.value, offset); + else if (Buffer.isBuffer(this.value)) + this.value.copy(out, offset); + offset += this.length; + } + + return out; +}; + +},{"../base":7,"buffer":49,"inherits":97}],7:[function(require,module,exports){ +var base = exports; + +base.Reporter = require('./reporter').Reporter; +base.DecoderBuffer = require('./buffer').DecoderBuffer; +base.EncoderBuffer = require('./buffer').EncoderBuffer; +base.Node = require('./node'); + +},{"./buffer":6,"./node":8,"./reporter":9}],8:[function(require,module,exports){ +var Reporter = require('../base').Reporter; +var EncoderBuffer = require('../base').EncoderBuffer; +var DecoderBuffer = require('../base').DecoderBuffer; +var assert = require('minimalistic-assert'); + +// Supported tags +var tags = [ + 'seq', 'seqof', 'set', 'setof', 'objid', 'bool', + 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc', + 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str', + 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr' +]; + +// Public methods list +var methods = [ + 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', + 'any', 'contains' +].concat(tags); + +// Overrided methods list +var overrided = [ + '_peekTag', '_decodeTag', '_use', + '_decodeStr', '_decodeObjid', '_decodeTime', + '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList', + + '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime', + '_encodeNull', '_encodeInt', '_encodeBool' +]; + +function Node(enc, parent) { + var state = {}; + this._baseState = state; + + state.enc = enc; + + state.parent = parent || null; + state.children = null; + + // State + state.tag = null; + state.args = null; + state.reverseArgs = null; + state.choice = null; + state.optional = false; + state.any = false; + state.obj = false; + state.use = null; + state.useDecoder = null; + state.key = null; + state['default'] = null; + state.explicit = null; + state.implicit = null; + state.contains = null; + + // Should create new instance on each method + if (!state.parent) { + state.children = []; + this._wrap(); + } +} +module.exports = Node; + +var stateProps = [ + 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice', + 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit', + 'implicit', 'contains' +]; + +Node.prototype.clone = function clone() { + var state = this._baseState; + var cstate = {}; + stateProps.forEach(function(prop) { + cstate[prop] = state[prop]; + }); + var res = new this.constructor(cstate.parent); + res._baseState = cstate; + return res; +}; + +Node.prototype._wrap = function wrap() { + var state = this._baseState; + methods.forEach(function(method) { + this[method] = function _wrappedMethod() { + var clone = new this.constructor(this); + state.children.push(clone); + return clone[method].apply(clone, arguments); + }; + }, this); +}; + +Node.prototype._init = function init(body) { + var state = this._baseState; + + assert(state.parent === null); + body.call(this); + + // Filter children + state.children = state.children.filter(function(child) { + return child._baseState.parent === this; + }, this); + assert.equal(state.children.length, 1, 'Root node can have only one child'); +}; + +Node.prototype._useArgs = function useArgs(args) { + var state = this._baseState; + + // Filter children and args + var children = args.filter(function(arg) { + return arg instanceof this.constructor; + }, this); + args = args.filter(function(arg) { + return !(arg instanceof this.constructor); + }, this); + + if (children.length !== 0) { + assert(state.children === null); + state.children = children; + + // Replace parent to maintain backward link + children.forEach(function(child) { + child._baseState.parent = this; + }, this); + } + if (args.length !== 0) { + assert(state.args === null); + state.args = args; + state.reverseArgs = args.map(function(arg) { + if (typeof arg !== 'object' || arg.constructor !== Object) + return arg; + + var res = {}; + Object.keys(arg).forEach(function(key) { + if (key == (key | 0)) + key |= 0; + var value = arg[key]; + res[value] = key; + }); + return res; + }); + } +}; + +// +// Overrided methods +// + +overrided.forEach(function(method) { + Node.prototype[method] = function _overrided() { + var state = this._baseState; + throw new Error(method + ' not implemented for encoding: ' + state.enc); + }; +}); + +// +// Public methods +// + +tags.forEach(function(tag) { + Node.prototype[tag] = function _tagMethod() { + var state = this._baseState; + var args = Array.prototype.slice.call(arguments); + + assert(state.tag === null); + state.tag = tag; + + this._useArgs(args); + + return this; + }; +}); + +Node.prototype.use = function use(item) { + assert(item); + var state = this._baseState; + + assert(state.use === null); + state.use = item; + + return this; +}; + +Node.prototype.optional = function optional() { + var state = this._baseState; + + state.optional = true; + + return this; +}; + +Node.prototype.def = function def(val) { + var state = this._baseState; + + assert(state['default'] === null); + state['default'] = val; + state.optional = true; + + return this; +}; + +Node.prototype.explicit = function explicit(num) { + var state = this._baseState; + + assert(state.explicit === null && state.implicit === null); + state.explicit = num; + + return this; +}; + +Node.prototype.implicit = function implicit(num) { + var state = this._baseState; + + assert(state.explicit === null && state.implicit === null); + state.implicit = num; + + return this; +}; + +Node.prototype.obj = function obj() { + var state = this._baseState; + var args = Array.prototype.slice.call(arguments); + + state.obj = true; + + if (args.length !== 0) + this._useArgs(args); + + return this; +}; + +Node.prototype.key = function key(newKey) { + var state = this._baseState; + + assert(state.key === null); + state.key = newKey; + + return this; +}; + +Node.prototype.any = function any() { + var state = this._baseState; + + state.any = true; + + return this; +}; + +Node.prototype.choice = function choice(obj) { + var state = this._baseState; + + assert(state.choice === null); + state.choice = obj; + this._useArgs(Object.keys(obj).map(function(key) { + return obj[key]; + })); + + return this; +}; + +Node.prototype.contains = function contains(item) { + var state = this._baseState; + + assert(state.use === null); + state.contains = item; + + return this; +}; + +// +// Decoding +// + +Node.prototype._decode = function decode(input, options) { + var state = this._baseState; + + // Decode root node + if (state.parent === null) + return input.wrapResult(state.children[0]._decode(input, options)); + + var result = state['default']; + var present = true; + + var prevKey = null; + if (state.key !== null) + prevKey = input.enterKey(state.key); + + // Check if tag is there + if (state.optional) { + var tag = null; + if (state.explicit !== null) + tag = state.explicit; + else if (state.implicit !== null) + tag = state.implicit; + else if (state.tag !== null) + tag = state.tag; + + if (tag === null && !state.any) { + // Trial and Error + var save = input.save(); + try { + if (state.choice === null) + this._decodeGeneric(state.tag, input, options); + else + this._decodeChoice(input, options); + present = true; + } catch (e) { + present = false; + } + input.restore(save); + } else { + present = this._peekTag(input, tag, state.any); + + if (input.isError(present)) + return present; + } + } + + // Push object on stack + var prevObj; + if (state.obj && present) + prevObj = input.enterObject(); + + if (present) { + // Unwrap explicit values + if (state.explicit !== null) { + var explicit = this._decodeTag(input, state.explicit); + if (input.isError(explicit)) + return explicit; + input = explicit; + } + + var start = input.offset; + + // Unwrap implicit and normal values + if (state.use === null && state.choice === null) { + if (state.any) + var save = input.save(); + var body = this._decodeTag( + input, + state.implicit !== null ? state.implicit : state.tag, + state.any + ); + if (input.isError(body)) + return body; + + if (state.any) + result = input.raw(save); + else + input = body; + } + + if (options && options.track && state.tag !== null) + options.track(input.path(), start, input.length, 'tagged'); + + if (options && options.track && state.tag !== null) + options.track(input.path(), input.offset, input.length, 'content'); + + // Select proper method for tag + if (state.any) + result = result; + else if (state.choice === null) + result = this._decodeGeneric(state.tag, input, options); + else + result = this._decodeChoice(input, options); + + if (input.isError(result)) + return result; + + // Decode children + if (!state.any && state.choice === null && state.children !== null) { + state.children.forEach(function decodeChildren(child) { + // NOTE: We are ignoring errors here, to let parser continue with other + // parts of encoded data + child._decode(input, options); + }); + } + + // Decode contained/encoded by schema, only in bit or octet strings + if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) { + var data = new DecoderBuffer(result); + result = this._getUse(state.contains, input._reporterState.obj) + ._decode(data, options); + } + } + + // Pop object + if (state.obj && present) + result = input.leaveObject(prevObj); + + // Set key + if (state.key !== null && (result !== null || present === true)) + input.leaveKey(prevKey, state.key, result); + else if (prevKey !== null) + input.exitKey(prevKey); + + return result; +}; + +Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) { + var state = this._baseState; + + if (tag === 'seq' || tag === 'set') + return null; + if (tag === 'seqof' || tag === 'setof') + return this._decodeList(input, tag, state.args[0], options); + else if (/str$/.test(tag)) + return this._decodeStr(input, tag, options); + else if (tag === 'objid' && state.args) + return this._decodeObjid(input, state.args[0], state.args[1], options); + else if (tag === 'objid') + return this._decodeObjid(input, null, null, options); + else if (tag === 'gentime' || tag === 'utctime') + return this._decodeTime(input, tag, options); + else if (tag === 'null_') + return this._decodeNull(input, options); + else if (tag === 'bool') + return this._decodeBool(input, options); + else if (tag === 'objDesc') + return this._decodeStr(input, tag, options); + else if (tag === 'int' || tag === 'enum') + return this._decodeInt(input, state.args && state.args[0], options); + + if (state.use !== null) { + return this._getUse(state.use, input._reporterState.obj) + ._decode(input, options); + } else { + return input.error('unknown tag: ' + tag); + } +}; + +Node.prototype._getUse = function _getUse(entity, obj) { + + var state = this._baseState; + // Create altered use decoder if implicit is set + state.useDecoder = this._use(entity, obj); + assert(state.useDecoder._baseState.parent === null); + state.useDecoder = state.useDecoder._baseState.children[0]; + if (state.implicit !== state.useDecoder._baseState.implicit) { + state.useDecoder = state.useDecoder.clone(); + state.useDecoder._baseState.implicit = state.implicit; + } + return state.useDecoder; +}; + +Node.prototype._decodeChoice = function decodeChoice(input, options) { + var state = this._baseState; + var result = null; + var match = false; + + Object.keys(state.choice).some(function(key) { + var save = input.save(); + var node = state.choice[key]; + try { + var value = node._decode(input, options); + if (input.isError(value)) + return false; + + result = { type: key, value: value }; + match = true; + } catch (e) { + input.restore(save); + return false; + } + return true; + }, this); + + if (!match) + return input.error('Choice not matched'); + + return result; +}; + +// +// Encoding +// + +Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) { + return new EncoderBuffer(data, this.reporter); +}; + +Node.prototype._encode = function encode(data, reporter, parent) { + var state = this._baseState; + if (state['default'] !== null && state['default'] === data) + return; + + var result = this._encodeValue(data, reporter, parent); + if (result === undefined) + return; + + if (this._skipDefault(result, reporter, parent)) + return; + + return result; +}; + +Node.prototype._encodeValue = function encode(data, reporter, parent) { + var state = this._baseState; + + // Decode root node + if (state.parent === null) + return state.children[0]._encode(data, reporter || new Reporter()); + + var result = null; + + // Set reporter to share it with a child class + this.reporter = reporter; + + // Check if data is there + if (state.optional && data === undefined) { + if (state['default'] !== null) + data = state['default'] + else + return; + } + + // Encode children first + var content = null; + var primitive = false; + if (state.any) { + // Anything that was given is translated to buffer + result = this._createEncoderBuffer(data); + } else if (state.choice) { + result = this._encodeChoice(data, reporter); + } else if (state.contains) { + content = this._getUse(state.contains, parent)._encode(data, reporter); + primitive = true; + } else if (state.children) { + content = state.children.map(function(child) { + if (child._baseState.tag === 'null_') + return child._encode(null, reporter, data); + + if (child._baseState.key === null) + return reporter.error('Child should have a key'); + var prevKey = reporter.enterKey(child._baseState.key); + + if (typeof data !== 'object') + return reporter.error('Child expected, but input is not object'); + + var res = child._encode(data[child._baseState.key], reporter, data); + reporter.leaveKey(prevKey); + + return res; + }, this).filter(function(child) { + return child; + }); + content = this._createEncoderBuffer(content); + } else { + if (state.tag === 'seqof' || state.tag === 'setof') { + // TODO(indutny): this should be thrown on DSL level + if (!(state.args && state.args.length === 1)) + return reporter.error('Too many args for : ' + state.tag); + + if (!Array.isArray(data)) + return reporter.error('seqof/setof, but data is not Array'); + + var child = this.clone(); + child._baseState.implicit = null; + content = this._createEncoderBuffer(data.map(function(item) { + var state = this._baseState; + + return this._getUse(state.args[0], data)._encode(item, reporter); + }, child)); + } else if (state.use !== null) { + result = this._getUse(state.use, parent)._encode(data, reporter); + } else { + content = this._encodePrimitive(state.tag, data); + primitive = true; + } + } + + // Encode data itself + var result; + if (!state.any && state.choice === null) { + var tag = state.implicit !== null ? state.implicit : state.tag; + var cls = state.implicit === null ? 'universal' : 'context'; + + if (tag === null) { + if (state.use === null) + reporter.error('Tag could be ommited only for .use()'); + } else { + if (state.use === null) + result = this._encodeComposite(tag, primitive, cls, content); + } + } + + // Wrap in explicit + if (state.explicit !== null) + result = this._encodeComposite(state.explicit, false, 'context', result); + + return result; +}; + +Node.prototype._encodeChoice = function encodeChoice(data, reporter) { + var state = this._baseState; + + var node = state.choice[data.type]; + if (!node) { + assert( + false, + data.type + ' not found in ' + + JSON.stringify(Object.keys(state.choice))); + } + return node._encode(data.value, reporter); +}; + +Node.prototype._encodePrimitive = function encodePrimitive(tag, data) { + var state = this._baseState; + + if (/str$/.test(tag)) + return this._encodeStr(data, tag); + else if (tag === 'objid' && state.args) + return this._encodeObjid(data, state.reverseArgs[0], state.args[1]); + else if (tag === 'objid') + return this._encodeObjid(data, null, null); + else if (tag === 'gentime' || tag === 'utctime') + return this._encodeTime(data, tag); + else if (tag === 'null_') + return this._encodeNull(); + else if (tag === 'int' || tag === 'enum') + return this._encodeInt(data, state.args && state.reverseArgs[0]); + else if (tag === 'bool') + return this._encodeBool(data); + else if (tag === 'objDesc') + return this._encodeStr(data, tag); + else + throw new Error('Unsupported tag: ' + tag); +}; + +Node.prototype._isNumstr = function isNumstr(str) { + return /^[0-9 ]*$/.test(str); +}; + +Node.prototype._isPrintstr = function isPrintstr(str) { + return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str); +}; + +},{"../base":7,"minimalistic-assert":102}],9:[function(require,module,exports){ +var inherits = require('inherits'); + +function Reporter(options) { + this._reporterState = { + obj: null, + path: [], + options: options || {}, + errors: [] + }; +} +exports.Reporter = Reporter; + +Reporter.prototype.isError = function isError(obj) { + return obj instanceof ReporterError; +}; + +Reporter.prototype.save = function save() { + var state = this._reporterState; + + return { obj: state.obj, pathLen: state.path.length }; +}; + +Reporter.prototype.restore = function restore(data) { + var state = this._reporterState; + + state.obj = data.obj; + state.path = state.path.slice(0, data.pathLen); +}; + +Reporter.prototype.enterKey = function enterKey(key) { + return this._reporterState.path.push(key); +}; + +Reporter.prototype.exitKey = function exitKey(index) { + var state = this._reporterState; + + state.path = state.path.slice(0, index - 1); +}; + +Reporter.prototype.leaveKey = function leaveKey(index, key, value) { + var state = this._reporterState; + + this.exitKey(index); + if (state.obj !== null) + state.obj[key] = value; +}; + +Reporter.prototype.path = function path() { + return this._reporterState.path.join('/'); +}; + +Reporter.prototype.enterObject = function enterObject() { + var state = this._reporterState; + + var prev = state.obj; + state.obj = {}; + return prev; +}; + +Reporter.prototype.leaveObject = function leaveObject(prev) { + var state = this._reporterState; + + var now = state.obj; + state.obj = prev; + return now; +}; + +Reporter.prototype.error = function error(msg) { + var err; + var state = this._reporterState; + + var inherited = msg instanceof ReporterError; + if (inherited) { + err = msg; + } else { + err = new ReporterError(state.path.map(function(elem) { + return '[' + JSON.stringify(elem) + ']'; + }).join(''), msg.message || msg, msg.stack); + } + + if (!state.options.partial) + throw err; + + if (!inherited) + state.errors.push(err); + + return err; +}; + +Reporter.prototype.wrapResult = function wrapResult(result) { + var state = this._reporterState; + if (!state.options.partial) + return result; + + return { + result: this.isError(result) ? null : result, + errors: state.errors + }; +}; + +function ReporterError(path, msg) { + this.path = path; + this.rethrow(msg); +}; +inherits(ReporterError, Error); + +ReporterError.prototype.rethrow = function rethrow(msg) { + this.message = msg + ' at: ' + (this.path || '(shallow)'); + if (Error.captureStackTrace) + Error.captureStackTrace(this, ReporterError); + + if (!this.stack) { + try { + // IE only adds stack when thrown + throw new Error(this.message); + } catch (e) { + this.stack = e.stack; + } + } + return this; +}; + +},{"inherits":97}],10:[function(require,module,exports){ +var constants = require('../constants'); + +exports.tagClass = { + 0: 'universal', + 1: 'application', + 2: 'context', + 3: 'private' +}; +exports.tagClassByName = constants._reverse(exports.tagClass); + +exports.tag = { + 0x00: 'end', + 0x01: 'bool', + 0x02: 'int', + 0x03: 'bitstr', + 0x04: 'octstr', + 0x05: 'null_', + 0x06: 'objid', + 0x07: 'objDesc', + 0x08: 'external', + 0x09: 'real', + 0x0a: 'enum', + 0x0b: 'embed', + 0x0c: 'utf8str', + 0x0d: 'relativeOid', + 0x10: 'seq', + 0x11: 'set', + 0x12: 'numstr', + 0x13: 'printstr', + 0x14: 't61str', + 0x15: 'videostr', + 0x16: 'ia5str', + 0x17: 'utctime', + 0x18: 'gentime', + 0x19: 'graphstr', + 0x1a: 'iso646str', + 0x1b: 'genstr', + 0x1c: 'unistr', + 0x1d: 'charstr', + 0x1e: 'bmpstr' +}; +exports.tagByName = constants._reverse(exports.tag); + +},{"../constants":11}],11:[function(require,module,exports){ +var constants = exports; + +// Helper +constants._reverse = function reverse(map) { + var res = {}; + + Object.keys(map).forEach(function(key) { + // Convert key to integer if it is stringified + if ((key | 0) == key) + key = key | 0; + + var value = map[key]; + res[value] = key; + }); + + return res; +}; + +constants.der = require('./der'); + +},{"./der":10}],12:[function(require,module,exports){ +var inherits = require('inherits'); + +var asn1 = require('../../asn1'); +var base = asn1.base; +var bignum = asn1.bignum; + +// Import DER constants +var der = asn1.constants.der; + +function DERDecoder(entity) { + this.enc = 'der'; + this.name = entity.name; + this.entity = entity; + + // Construct base tree + this.tree = new DERNode(); + this.tree._init(entity.body); +}; +module.exports = DERDecoder; + +DERDecoder.prototype.decode = function decode(data, options) { + if (!(data instanceof base.DecoderBuffer)) + data = new base.DecoderBuffer(data, options); + + return this.tree._decode(data, options); +}; + +// Tree methods + +function DERNode(parent) { + base.Node.call(this, 'der', parent); +} +inherits(DERNode, base.Node); + +DERNode.prototype._peekTag = function peekTag(buffer, tag, any) { + if (buffer.isEmpty()) + return false; + + var state = buffer.save(); + var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"'); + if (buffer.isError(decodedTag)) + return decodedTag; + + buffer.restore(state); + + return decodedTag.tag === tag || decodedTag.tagStr === tag || + (decodedTag.tagStr + 'of') === tag || any; +}; + +DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) { + var decodedTag = derDecodeTag(buffer, + 'Failed to decode tag of "' + tag + '"'); + if (buffer.isError(decodedTag)) + return decodedTag; + + var len = derDecodeLen(buffer, + decodedTag.primitive, + 'Failed to get length of "' + tag + '"'); + + // Failure + if (buffer.isError(len)) + return len; + + if (!any && + decodedTag.tag !== tag && + decodedTag.tagStr !== tag && + decodedTag.tagStr + 'of' !== tag) { + return buffer.error('Failed to match tag: "' + tag + '"'); + } + + if (decodedTag.primitive || len !== null) + return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); + + // Indefinite length... find END tag + var state = buffer.save(); + var res = this._skipUntilEnd( + buffer, + 'Failed to skip indefinite length body: "' + this.tag + '"'); + if (buffer.isError(res)) + return res; + + len = buffer.offset - state.offset; + buffer.restore(state); + return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); +}; + +DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) { + while (true) { + var tag = derDecodeTag(buffer, fail); + if (buffer.isError(tag)) + return tag; + var len = derDecodeLen(buffer, tag.primitive, fail); + if (buffer.isError(len)) + return len; + + var res; + if (tag.primitive || len !== null) + res = buffer.skip(len) + else + res = this._skipUntilEnd(buffer, fail); + + // Failure + if (buffer.isError(res)) + return res; + + if (tag.tagStr === 'end') + break; + } +}; + +DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder, + options) { + var result = []; + while (!buffer.isEmpty()) { + var possibleEnd = this._peekTag(buffer, 'end'); + if (buffer.isError(possibleEnd)) + return possibleEnd; + + var res = decoder.decode(buffer, 'der', options); + if (buffer.isError(res) && possibleEnd) + break; + result.push(res); + } + return result; +}; + +DERNode.prototype._decodeStr = function decodeStr(buffer, tag) { + if (tag === 'bitstr') { + var unused = buffer.readUInt8(); + if (buffer.isError(unused)) + return unused; + return { unused: unused, data: buffer.raw() }; + } else if (tag === 'bmpstr') { + var raw = buffer.raw(); + if (raw.length % 2 === 1) + return buffer.error('Decoding of string type: bmpstr length mismatch'); + + var str = ''; + for (var i = 0; i < raw.length / 2; i++) { + str += String.fromCharCode(raw.readUInt16BE(i * 2)); + } + return str; + } else if (tag === 'numstr') { + var numstr = buffer.raw().toString('ascii'); + if (!this._isNumstr(numstr)) { + return buffer.error('Decoding of string type: ' + + 'numstr unsupported characters'); + } + return numstr; + } else if (tag === 'octstr') { + return buffer.raw(); + } else if (tag === 'objDesc') { + return buffer.raw(); + } else if (tag === 'printstr') { + var printstr = buffer.raw().toString('ascii'); + if (!this._isPrintstr(printstr)) { + return buffer.error('Decoding of string type: ' + + 'printstr unsupported characters'); + } + return printstr; + } else if (/str$/.test(tag)) { + return buffer.raw().toString(); + } else { + return buffer.error('Decoding of string type: ' + tag + ' unsupported'); + } +}; + +DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) { + var result; + var identifiers = []; + var ident = 0; + while (!buffer.isEmpty()) { + var subident = buffer.readUInt8(); + ident <<= 7; + ident |= subident & 0x7f; + if ((subident & 0x80) === 0) { + identifiers.push(ident); + ident = 0; + } + } + if (subident & 0x80) + identifiers.push(ident); + + var first = (identifiers[0] / 40) | 0; + var second = identifiers[0] % 40; + + if (relative) + result = identifiers; + else + result = [first, second].concat(identifiers.slice(1)); + + if (values) { + var tmp = values[result.join(' ')]; + if (tmp === undefined) + tmp = values[result.join('.')]; + if (tmp !== undefined) + result = tmp; + } + + return result; +}; + +DERNode.prototype._decodeTime = function decodeTime(buffer, tag) { + var str = buffer.raw().toString(); + if (tag === 'gentime') { + var year = str.slice(0, 4) | 0; + var mon = str.slice(4, 6) | 0; + var day = str.slice(6, 8) | 0; + var hour = str.slice(8, 10) | 0; + var min = str.slice(10, 12) | 0; + var sec = str.slice(12, 14) | 0; + } else if (tag === 'utctime') { + var year = str.slice(0, 2) | 0; + var mon = str.slice(2, 4) | 0; + var day = str.slice(4, 6) | 0; + var hour = str.slice(6, 8) | 0; + var min = str.slice(8, 10) | 0; + var sec = str.slice(10, 12) | 0; + if (year < 70) + year = 2000 + year; + else + year = 1900 + year; + } else { + return buffer.error('Decoding ' + tag + ' time is not supported yet'); + } + + return Date.UTC(year, mon - 1, day, hour, min, sec, 0); +}; + +DERNode.prototype._decodeNull = function decodeNull(buffer) { + return null; +}; + +DERNode.prototype._decodeBool = function decodeBool(buffer) { + var res = buffer.readUInt8(); + if (buffer.isError(res)) + return res; + else + return res !== 0; +}; + +DERNode.prototype._decodeInt = function decodeInt(buffer, values) { + // Bigint, return as it is (assume big endian) + var raw = buffer.raw(); + var res = new bignum(raw); + + if (values) + res = values[res.toString(10)] || res; + + return res; +}; + +DERNode.prototype._use = function use(entity, obj) { + if (typeof entity === 'function') + entity = entity(obj); + return entity._getDecoder('der').tree; +}; + +// Utility methods + +function derDecodeTag(buf, fail) { + var tag = buf.readUInt8(fail); + if (buf.isError(tag)) + return tag; + + var cls = der.tagClass[tag >> 6]; + var primitive = (tag & 0x20) === 0; + + // Multi-octet tag - load + if ((tag & 0x1f) === 0x1f) { + var oct = tag; + tag = 0; + while ((oct & 0x80) === 0x80) { + oct = buf.readUInt8(fail); + if (buf.isError(oct)) + return oct; + + tag <<= 7; + tag |= oct & 0x7f; + } + } else { + tag &= 0x1f; + } + var tagStr = der.tag[tag]; + + return { + cls: cls, + primitive: primitive, + tag: tag, + tagStr: tagStr + }; +} + +function derDecodeLen(buf, primitive, fail) { + var len = buf.readUInt8(fail); + if (buf.isError(len)) + return len; + + // Indefinite form + if (!primitive && len === 0x80) + return null; + + // Definite form + if ((len & 0x80) === 0) { + // Short form + return len; + } + + // Long form + var num = len & 0x7f; + if (num >= 4) + return buf.error('length octect is too long'); + + len = 0; + for (var i = 0; i < num; i++) { + len <<= 8; + var j = buf.readUInt8(fail); + if (buf.isError(j)) + return j; + len |= j; + } + + return len; +} + +},{"../../asn1":4,"inherits":97}],13:[function(require,module,exports){ +var decoders = exports; + +decoders.der = require('./der'); +decoders.pem = require('./pem'); + +},{"./der":12,"./pem":14}],14:[function(require,module,exports){ +var inherits = require('inherits'); +var Buffer = require('buffer').Buffer; + +var DERDecoder = require('./der'); + +function PEMDecoder(entity) { + DERDecoder.call(this, entity); + this.enc = 'pem'; +}; +inherits(PEMDecoder, DERDecoder); +module.exports = PEMDecoder; + +PEMDecoder.prototype.decode = function decode(data, options) { + var lines = data.toString().split(/[\r\n]+/g); + + var label = options.label.toUpperCase(); + + var re = /^-----(BEGIN|END) ([^-]+)-----$/; + var start = -1; + var end = -1; + for (var i = 0; i < lines.length; i++) { + var match = lines[i].match(re); + if (match === null) + continue; + + if (match[2] !== label) + continue; + + if (start === -1) { + if (match[1] !== 'BEGIN') + break; + start = i; + } else { + if (match[1] !== 'END') + break; + end = i; + break; + } + } + if (start === -1 || end === -1) + throw new Error('PEM section not found for: ' + label); + + var base64 = lines.slice(start + 1, end).join(''); + // Remove excessive symbols + base64.replace(/[^a-z0-9\+\/=]+/gi, ''); + + var input = new Buffer(base64, 'base64'); + return DERDecoder.prototype.decode.call(this, input, options); +}; + +},{"./der":12,"buffer":49,"inherits":97}],15:[function(require,module,exports){ +var inherits = require('inherits'); +var Buffer = require('buffer').Buffer; + +var asn1 = require('../../asn1'); +var base = asn1.base; + +// Import DER constants +var der = asn1.constants.der; + +function DEREncoder(entity) { + this.enc = 'der'; + this.name = entity.name; + this.entity = entity; + + // Construct base tree + this.tree = new DERNode(); + this.tree._init(entity.body); +}; +module.exports = DEREncoder; + +DEREncoder.prototype.encode = function encode(data, reporter) { + return this.tree._encode(data, reporter).join(); +}; + +// Tree methods + +function DERNode(parent) { + base.Node.call(this, 'der', parent); +} +inherits(DERNode, base.Node); + +DERNode.prototype._encodeComposite = function encodeComposite(tag, + primitive, + cls, + content) { + var encodedTag = encodeTag(tag, primitive, cls, this.reporter); + + // Short form + if (content.length < 0x80) { + var header = new Buffer(2); + header[0] = encodedTag; + header[1] = content.length; + return this._createEncoderBuffer([ header, content ]); + } + + // Long form + // Count octets required to store length + var lenOctets = 1; + for (var i = content.length; i >= 0x100; i >>= 8) + lenOctets++; + + var header = new Buffer(1 + 1 + lenOctets); + header[0] = encodedTag; + header[1] = 0x80 | lenOctets; + + for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8) + header[i] = j & 0xff; + + return this._createEncoderBuffer([ header, content ]); +}; + +DERNode.prototype._encodeStr = function encodeStr(str, tag) { + if (tag === 'bitstr') { + return this._createEncoderBuffer([ str.unused | 0, str.data ]); + } else if (tag === 'bmpstr') { + var buf = new Buffer(str.length * 2); + for (var i = 0; i < str.length; i++) { + buf.writeUInt16BE(str.charCodeAt(i), i * 2); + } + return this._createEncoderBuffer(buf); + } else if (tag === 'numstr') { + if (!this._isNumstr(str)) { + return this.reporter.error('Encoding of string type: numstr supports ' + + 'only digits and space'); + } + return this._createEncoderBuffer(str); + } else if (tag === 'printstr') { + if (!this._isPrintstr(str)) { + return this.reporter.error('Encoding of string type: printstr supports ' + + 'only latin upper and lower case letters, ' + + 'digits, space, apostrophe, left and rigth ' + + 'parenthesis, plus sign, comma, hyphen, ' + + 'dot, slash, colon, equal sign, ' + + 'question mark'); + } + return this._createEncoderBuffer(str); + } else if (/str$/.test(tag)) { + return this._createEncoderBuffer(str); + } else if (tag === 'objDesc') { + return this._createEncoderBuffer(str); + } else { + return this.reporter.error('Encoding of string type: ' + tag + + ' unsupported'); + } +}; + +DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) { + if (typeof id === 'string') { + if (!values) + return this.reporter.error('string objid given, but no values map found'); + if (!values.hasOwnProperty(id)) + return this.reporter.error('objid not found in values map'); + id = values[id].split(/[\s\.]+/g); + for (var i = 0; i < id.length; i++) + id[i] |= 0; + } else if (Array.isArray(id)) { + id = id.slice(); + for (var i = 0; i < id.length; i++) + id[i] |= 0; + } + + if (!Array.isArray(id)) { + return this.reporter.error('objid() should be either array or string, ' + + 'got: ' + JSON.stringify(id)); + } + + if (!relative) { + if (id[1] >= 40) + return this.reporter.error('Second objid identifier OOB'); + id.splice(0, 2, id[0] * 40 + id[1]); + } + + // Count number of octets + var size = 0; + for (var i = 0; i < id.length; i++) { + var ident = id[i]; + for (size++; ident >= 0x80; ident >>= 7) + size++; + } + + var objid = new Buffer(size); + var offset = objid.length - 1; + for (var i = id.length - 1; i >= 0; i--) { + var ident = id[i]; + objid[offset--] = ident & 0x7f; + while ((ident >>= 7) > 0) + objid[offset--] = 0x80 | (ident & 0x7f); + } + + return this._createEncoderBuffer(objid); +}; + +function two(num) { + if (num < 10) + return '0' + num; + else + return num; +} + +DERNode.prototype._encodeTime = function encodeTime(time, tag) { + var str; + var date = new Date(time); + + if (tag === 'gentime') { + str = [ + two(date.getFullYear()), + two(date.getUTCMonth() + 1), + two(date.getUTCDate()), + two(date.getUTCHours()), + two(date.getUTCMinutes()), + two(date.getUTCSeconds()), + 'Z' + ].join(''); + } else if (tag === 'utctime') { + str = [ + two(date.getFullYear() % 100), + two(date.getUTCMonth() + 1), + two(date.getUTCDate()), + two(date.getUTCHours()), + two(date.getUTCMinutes()), + two(date.getUTCSeconds()), + 'Z' + ].join(''); + } else { + this.reporter.error('Encoding ' + tag + ' time is not supported yet'); + } + + return this._encodeStr(str, 'octstr'); +}; + +DERNode.prototype._encodeNull = function encodeNull() { + return this._createEncoderBuffer(''); +}; + +DERNode.prototype._encodeInt = function encodeInt(num, values) { + if (typeof num === 'string') { + if (!values) + return this.reporter.error('String int or enum given, but no values map'); + if (!values.hasOwnProperty(num)) { + return this.reporter.error('Values map doesn\'t contain: ' + + JSON.stringify(num)); + } + num = values[num]; + } + + // Bignum, assume big endian + if (typeof num !== 'number' && !Buffer.isBuffer(num)) { + var numArray = num.toArray(); + if (!num.sign && numArray[0] & 0x80) { + numArray.unshift(0); + } + num = new Buffer(numArray); + } + + if (Buffer.isBuffer(num)) { + var size = num.length; + if (num.length === 0) + size++; + + var out = new Buffer(size); + num.copy(out); + if (num.length === 0) + out[0] = 0 + return this._createEncoderBuffer(out); + } + + if (num < 0x80) + return this._createEncoderBuffer(num); + + if (num < 0x100) + return this._createEncoderBuffer([0, num]); + + var size = 1; + for (var i = num; i >= 0x100; i >>= 8) + size++; + + var out = new Array(size); + for (var i = out.length - 1; i >= 0; i--) { + out[i] = num & 0xff; + num >>= 8; + } + if(out[0] & 0x80) { + out.unshift(0); + } + + return this._createEncoderBuffer(new Buffer(out)); +}; + +DERNode.prototype._encodeBool = function encodeBool(value) { + return this._createEncoderBuffer(value ? 0xff : 0); +}; + +DERNode.prototype._use = function use(entity, obj) { + if (typeof entity === 'function') + entity = entity(obj); + return entity._getEncoder('der').tree; +}; + +DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) { + var state = this._baseState; + var i; + if (state['default'] === null) + return false; + + var data = dataBuffer.join(); + if (state.defaultBuffer === undefined) + state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join(); + + if (data.length !== state.defaultBuffer.length) + return false; + + for (i=0; i < data.length; i++) + if (data[i] !== state.defaultBuffer[i]) + return false; + + return true; +}; + +// Utility methods + +function encodeTag(tag, primitive, cls, reporter) { + var res; + + if (tag === 'seqof') + tag = 'seq'; + else if (tag === 'setof') + tag = 'set'; + + if (der.tagByName.hasOwnProperty(tag)) + res = der.tagByName[tag]; + else if (typeof tag === 'number' && (tag | 0) === tag) + res = tag; + else + return reporter.error('Unknown tag: ' + tag); + + if (res >= 0x1f) + return reporter.error('Multi-octet tag encoding unsupported'); + + if (!primitive) + res |= 0x20; + + res |= (der.tagClassByName[cls || 'universal'] << 6); + + return res; +} + +},{"../../asn1":4,"buffer":49,"inherits":97}],16:[function(require,module,exports){ +var encoders = exports; + +encoders.der = require('./der'); +encoders.pem = require('./pem'); + +},{"./der":15,"./pem":17}],17:[function(require,module,exports){ +var inherits = require('inherits'); + +var DEREncoder = require('./der'); + +function PEMEncoder(entity) { + DEREncoder.call(this, entity); + this.enc = 'pem'; +}; +inherits(PEMEncoder, DEREncoder); +module.exports = PEMEncoder; + +PEMEncoder.prototype.encode = function encode(data, options) { + var buf = DEREncoder.prototype.encode.call(this, data); + + var p = buf.toString('base64'); + var out = [ '-----BEGIN ' + options.label + '-----' ]; + for (var i = 0; i < p.length; i += 64) + out.push(p.slice(i, i + 64)); + out.push('-----END ' + options.label + '-----'); + return out.join('\n'); +}; + +},{"./der":15,"inherits":97}],18:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function placeHoldersCount (b64) { + var len = b64.length + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 +} + +function byteLength (b64) { + // base64 is 4/3 + up to two characters of the original data + return b64.length * 3 / 4 - placeHoldersCount(b64) +} + +function toByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + var len = b64.length + placeHolders = placeHoldersCount(b64) + + arr = new Arr(len * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len + + var L = 0 + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] + arr[L++] = (tmp >> 16) & 0xFF + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + if (placeHolders === 2) { + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[L++] = tmp & 0xFF + } else if (placeHolders === 1) { + tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var output = '' + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + output += lookup[tmp >> 2] + output += lookup[(tmp << 4) & 0x3F] + output += '==' + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) + output += lookup[tmp >> 10] + output += lookup[(tmp >> 4) & 0x3F] + output += lookup[(tmp << 2) & 0x3F] + output += '=' + } + + parts.push(output) + + return parts.join('') +} + +},{}],19:[function(require,module,exports){ +(function (module, exports) { + 'use strict'; + + // Utils + function assert (val, msg) { + if (!val) throw new Error(msg || 'Assertion failed'); + } + + // Could use `inherits` module, but don't want to move from single file + // architecture yet. + function inherits (ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + + // BN + + function BN (number, base, endian) { + if (BN.isBN(number)) { + return number; + } + + this.negative = 0; + this.words = null; + this.length = 0; + + // Reduction context + this.red = null; + + if (number !== null) { + if (base === 'le' || base === 'be') { + endian = base; + base = 10; + } + + this._init(number || 0, base || 10, endian || 'be'); + } + } + if (typeof module === 'object') { + module.exports = BN; + } else { + exports.BN = BN; + } + + BN.BN = BN; + BN.wordSize = 26; + + var Buffer; + try { + Buffer = require('buf' + 'fer').Buffer; + } catch (e) { + } + + BN.isBN = function isBN (num) { + if (num instanceof BN) { + return true; + } + + return num !== null && typeof num === 'object' && + num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); + }; + + BN.max = function max (left, right) { + if (left.cmp(right) > 0) return left; + return right; + }; + + BN.min = function min (left, right) { + if (left.cmp(right) < 0) return left; + return right; + }; + + BN.prototype._init = function init (number, base, endian) { + if (typeof number === 'number') { + return this._initNumber(number, base, endian); + } + + if (typeof number === 'object') { + return this._initArray(number, base, endian); + } + + if (base === 'hex') { + base = 16; + } + assert(base === (base | 0) && base >= 2 && base <= 36); + + number = number.toString().replace(/\s+/g, ''); + var start = 0; + if (number[0] === '-') { + start++; + } + + if (base === 16) { + this._parseHex(number, start); + } else { + this._parseBase(number, base, start); + } + + if (number[0] === '-') { + this.negative = 1; + } + + this.strip(); + + if (endian !== 'le') return; + + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initNumber = function _initNumber (number, base, endian) { + if (number < 0) { + this.negative = 1; + number = -number; + } + if (number < 0x4000000) { + this.words = [ number & 0x3ffffff ]; + this.length = 1; + } else if (number < 0x10000000000000) { + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff + ]; + this.length = 2; + } else { + assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff, + 1 + ]; + this.length = 3; + } + + if (endian !== 'le') return; + + // Reverse the bytes + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initArray = function _initArray (number, base, endian) { + // Perhaps a Uint8Array + assert(typeof number.length === 'number'); + if (number.length <= 0) { + this.words = [ 0 ]; + this.length = 1; + return this; + } + + this.length = Math.ceil(number.length / 3); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + var off = 0; + if (endian === 'be') { + for (i = number.length - 1, j = 0; i >= 0; i -= 3) { + w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } else if (endian === 'le') { + for (i = 0, j = 0; i < number.length; i += 3) { + w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } + return this.strip(); + }; + + function parseHex (str, start, end) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r <<= 4; + + // 'a' - 'f' + if (c >= 49 && c <= 54) { + r |= c - 49 + 0xa; + + // 'A' - 'F' + } else if (c >= 17 && c <= 22) { + r |= c - 17 + 0xa; + + // '0' - '9' + } else { + r |= c & 0xf; + } + } + return r; + } + + BN.prototype._parseHex = function _parseHex (number, start) { + // Create possibly bigger array to ensure that it fits the number + this.length = Math.ceil((number.length - start) / 6); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + // Scan 24-bit chunks and add them to the number + var off = 0; + for (i = number.length - 6, j = 0; i >= start; i -= 6) { + w = parseHex(number, i, i + 6); + this.words[j] |= (w << off) & 0x3ffffff; + // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb + this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + if (i + 6 !== start) { + w = parseHex(number, start, i + 6); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; + } + this.strip(); + }; + + function parseBase (str, start, end, mul) { + var r = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r *= mul; + + // 'a' + if (c >= 49) { + r += c - 49 + 0xa; + + // 'A' + } else if (c >= 17) { + r += c - 17 + 0xa; + + // '0' - '9' + } else { + r += c; + } + } + return r; + } + + BN.prototype._parseBase = function _parseBase (number, base, start) { + // Initialize as zero + this.words = [ 0 ]; + this.length = 1; + + // Find length of limb in base + for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { + limbLen++; + } + limbLen--; + limbPow = (limbPow / base) | 0; + + var total = number.length - start; + var mod = total % limbLen; + var end = Math.min(total, total - mod) + start; + + var word = 0; + for (var i = start; i < end; i += limbLen) { + word = parseBase(number, i, i + limbLen, base); + + this.imuln(limbPow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + if (mod !== 0) { + var pow = 1; + word = parseBase(number, i, number.length, base); + + for (i = 0; i < mod; i++) { + pow *= base; + } + + this.imuln(pow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + }; + + BN.prototype.copy = function copy (dest) { + dest.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + dest.words[i] = this.words[i]; + } + dest.length = this.length; + dest.negative = this.negative; + dest.red = this.red; + }; + + BN.prototype.clone = function clone () { + var r = new BN(null); + this.copy(r); + return r; + }; + + BN.prototype._expand = function _expand (size) { + while (this.length < size) { + this.words[this.length++] = 0; + } + return this; + }; + + // Remove leading `0` from `this` + BN.prototype.strip = function strip () { + while (this.length > 1 && this.words[this.length - 1] === 0) { + this.length--; + } + return this._normSign(); + }; + + BN.prototype._normSign = function _normSign () { + // -0 = 0 + if (this.length === 1 && this.words[0] === 0) { + this.negative = 0; + } + return this; + }; + + BN.prototype.inspect = function inspect () { + return (this.red ? ''; + }; + + /* + + var zeros = []; + var groupSizes = []; + var groupBases = []; + + var s = ''; + var i = -1; + while (++i < BN.wordSize) { + zeros[i] = s; + s += '0'; + } + groupSizes[0] = 0; + groupSizes[1] = 0; + groupBases[0] = 0; + groupBases[1] = 0; + var base = 2 - 1; + while (++base < 36 + 1) { + var groupSize = 0; + var groupBase = 1; + while (groupBase < (1 << BN.wordSize) / base) { + groupBase *= base; + groupSize += 1; + } + groupSizes[base] = groupSize; + groupBases[base] = groupBase; + } + + */ + + var zeros = [ + '', + '0', + '00', + '000', + '0000', + '00000', + '000000', + '0000000', + '00000000', + '000000000', + '0000000000', + '00000000000', + '000000000000', + '0000000000000', + '00000000000000', + '000000000000000', + '0000000000000000', + '00000000000000000', + '000000000000000000', + '0000000000000000000', + '00000000000000000000', + '000000000000000000000', + '0000000000000000000000', + '00000000000000000000000', + '000000000000000000000000', + '0000000000000000000000000' + ]; + + var groupSizes = [ + 0, 0, + 25, 16, 12, 11, 10, 9, 8, + 8, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 6, 6, 5, 5, + 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5 + ]; + + var groupBases = [ + 0, 0, + 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, + 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, + 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, + 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, + 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 + ]; + + BN.prototype.toString = function toString (base, padding) { + base = base || 10; + padding = padding | 0 || 1; + + var out; + if (base === 16 || base === 'hex') { + out = ''; + var off = 0; + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = this.words[i]; + var word = (((w << off) | carry) & 0xffffff).toString(16); + carry = (w >>> (24 - off)) & 0xffffff; + if (carry !== 0 || i !== this.length - 1) { + out = zeros[6 - word.length] + word + out; + } else { + out = word + out; + } + off += 2; + if (off >= 26) { + off -= 26; + i--; + } + } + if (carry !== 0) { + out = carry.toString(16) + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + if (base === (base | 0) && base >= 2 && base <= 36) { + // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); + var groupSize = groupSizes[base]; + // var groupBase = Math.pow(base, groupSize); + var groupBase = groupBases[base]; + out = ''; + var c = this.clone(); + c.negative = 0; + while (!c.isZero()) { + var r = c.modn(groupBase).toString(base); + c = c.idivn(groupBase); + + if (!c.isZero()) { + out = zeros[groupSize - r.length] + r + out; + } else { + out = r + out; + } + } + if (this.isZero()) { + out = '0' + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + assert(false, 'Base should be between 2 and 36'); + }; + + BN.prototype.toNumber = function toNumber () { + var ret = this.words[0]; + if (this.length === 2) { + ret += this.words[1] * 0x4000000; + } else if (this.length === 3 && this.words[2] === 0x01) { + // NOTE: at this stage it is known that the top bit is set + ret += 0x10000000000000 + (this.words[1] * 0x4000000); + } else if (this.length > 2) { + assert(false, 'Number can only safely store up to 53 bits'); + } + return (this.negative !== 0) ? -ret : ret; + }; + + BN.prototype.toJSON = function toJSON () { + return this.toString(16); + }; + + BN.prototype.toBuffer = function toBuffer (endian, length) { + assert(typeof Buffer !== 'undefined'); + return this.toArrayLike(Buffer, endian, length); + }; + + BN.prototype.toArray = function toArray (endian, length) { + return this.toArrayLike(Array, endian, length); + }; + + BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { + var byteLength = this.byteLength(); + var reqLength = length || Math.max(1, byteLength); + assert(byteLength <= reqLength, 'byte array longer than desired length'); + assert(reqLength > 0, 'Requested array length <= 0'); + + this.strip(); + var littleEndian = endian === 'le'; + var res = new ArrayType(reqLength); + + var b, i; + var q = this.clone(); + if (!littleEndian) { + // Assume big-endian + for (i = 0; i < reqLength - byteLength; i++) { + res[i] = 0; + } + + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[reqLength - i - 1] = b; + } + } else { + for (i = 0; !q.isZero(); i++) { + b = q.andln(0xff); + q.iushrn(8); + + res[i] = b; + } + + for (; i < reqLength; i++) { + res[i] = 0; + } + } + + return res; + }; + + if (Math.clz32) { + BN.prototype._countBits = function _countBits (w) { + return 32 - Math.clz32(w); + }; + } else { + BN.prototype._countBits = function _countBits (w) { + var t = w; + var r = 0; + if (t >= 0x1000) { + r += 13; + t >>>= 13; + } + if (t >= 0x40) { + r += 7; + t >>>= 7; + } + if (t >= 0x8) { + r += 4; + t >>>= 4; + } + if (t >= 0x02) { + r += 2; + t >>>= 2; + } + return r + t; + }; + } + + BN.prototype._zeroBits = function _zeroBits (w) { + // Short-cut + if (w === 0) return 26; + + var t = w; + var r = 0; + if ((t & 0x1fff) === 0) { + r += 13; + t >>>= 13; + } + if ((t & 0x7f) === 0) { + r += 7; + t >>>= 7; + } + if ((t & 0xf) === 0) { + r += 4; + t >>>= 4; + } + if ((t & 0x3) === 0) { + r += 2; + t >>>= 2; + } + if ((t & 0x1) === 0) { + r++; + } + return r; + }; + + // Return number of used bits in a BN + BN.prototype.bitLength = function bitLength () { + var w = this.words[this.length - 1]; + var hi = this._countBits(w); + return (this.length - 1) * 26 + hi; + }; + + function toBitArray (num) { + var w = new Array(num.bitLength()); + + for (var bit = 0; bit < w.length; bit++) { + var off = (bit / 26) | 0; + var wbit = bit % 26; + + w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; + } + + return w; + } + + // Number of trailing zero bits + BN.prototype.zeroBits = function zeroBits () { + if (this.isZero()) return 0; + + var r = 0; + for (var i = 0; i < this.length; i++) { + var b = this._zeroBits(this.words[i]); + r += b; + if (b !== 26) break; + } + return r; + }; + + BN.prototype.byteLength = function byteLength () { + return Math.ceil(this.bitLength() / 8); + }; + + BN.prototype.toTwos = function toTwos (width) { + if (this.negative !== 0) { + return this.abs().inotn(width).iaddn(1); + } + return this.clone(); + }; + + BN.prototype.fromTwos = function fromTwos (width) { + if (this.testn(width - 1)) { + return this.notn(width).iaddn(1).ineg(); + } + return this.clone(); + }; + + BN.prototype.isNeg = function isNeg () { + return this.negative !== 0; + }; + + // Return negative clone of `this` + BN.prototype.neg = function neg () { + return this.clone().ineg(); + }; + + BN.prototype.ineg = function ineg () { + if (!this.isZero()) { + this.negative ^= 1; + } + + return this; + }; + + // Or `num` with `this` in-place + BN.prototype.iuor = function iuor (num) { + while (this.length < num.length) { + this.words[this.length++] = 0; + } + + for (var i = 0; i < num.length; i++) { + this.words[i] = this.words[i] | num.words[i]; + } + + return this.strip(); + }; + + BN.prototype.ior = function ior (num) { + assert((this.negative | num.negative) === 0); + return this.iuor(num); + }; + + // Or `num` with `this` + BN.prototype.or = function or (num) { + if (this.length > num.length) return this.clone().ior(num); + return num.clone().ior(this); + }; + + BN.prototype.uor = function uor (num) { + if (this.length > num.length) return this.clone().iuor(num); + return num.clone().iuor(this); + }; + + // And `num` with `this` in-place + BN.prototype.iuand = function iuand (num) { + // b = min-length(num, this) + var b; + if (this.length > num.length) { + b = num; + } else { + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = this.words[i] & num.words[i]; + } + + this.length = b.length; + + return this.strip(); + }; + + BN.prototype.iand = function iand (num) { + assert((this.negative | num.negative) === 0); + return this.iuand(num); + }; + + // And `num` with `this` + BN.prototype.and = function and (num) { + if (this.length > num.length) return this.clone().iand(num); + return num.clone().iand(this); + }; + + BN.prototype.uand = function uand (num) { + if (this.length > num.length) return this.clone().iuand(num); + return num.clone().iuand(this); + }; + + // Xor `num` with `this` in-place + BN.prototype.iuxor = function iuxor (num) { + // a.length > b.length + var a; + var b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = a.words[i] ^ b.words[i]; + } + + if (this !== a) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = a.length; + + return this.strip(); + }; + + BN.prototype.ixor = function ixor (num) { + assert((this.negative | num.negative) === 0); + return this.iuxor(num); + }; + + // Xor `num` with `this` + BN.prototype.xor = function xor (num) { + if (this.length > num.length) return this.clone().ixor(num); + return num.clone().ixor(this); + }; + + BN.prototype.uxor = function uxor (num) { + if (this.length > num.length) return this.clone().iuxor(num); + return num.clone().iuxor(this); + }; + + // Not ``this`` with ``width`` bitwidth + BN.prototype.inotn = function inotn (width) { + assert(typeof width === 'number' && width >= 0); + + var bytesNeeded = Math.ceil(width / 26) | 0; + var bitsLeft = width % 26; + + // Extend the buffer with leading zeroes + this._expand(bytesNeeded); + + if (bitsLeft > 0) { + bytesNeeded--; + } + + // Handle complete words + for (var i = 0; i < bytesNeeded; i++) { + this.words[i] = ~this.words[i] & 0x3ffffff; + } + + // Handle the residue + if (bitsLeft > 0) { + this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); + } + + // And remove leading zeroes + return this.strip(); + }; + + BN.prototype.notn = function notn (width) { + return this.clone().inotn(width); + }; + + // Set `bit` of `this` + BN.prototype.setn = function setn (bit, val) { + assert(typeof bit === 'number' && bit >= 0); + + var off = (bit / 26) | 0; + var wbit = bit % 26; + + this._expand(off + 1); + + if (val) { + this.words[off] = this.words[off] | (1 << wbit); + } else { + this.words[off] = this.words[off] & ~(1 << wbit); + } + + return this.strip(); + }; + + // Add `num` to `this` in-place + BN.prototype.iadd = function iadd (num) { + var r; + + // negative + positive + if (this.negative !== 0 && num.negative === 0) { + this.negative = 0; + r = this.isub(num); + this.negative ^= 1; + return this._normSign(); + + // positive + negative + } else if (this.negative === 0 && num.negative !== 0) { + num.negative = 0; + r = this.isub(num); + num.negative = 1; + return r._normSign(); + } + + // a.length > b.length + var a, b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) + (b.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + + this.length = a.length; + if (carry !== 0) { + this.words[this.length] = carry; + this.length++; + // Copy the rest of the words + } else if (a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + return this; + }; + + // Add `num` to `this` + BN.prototype.add = function add (num) { + var res; + if (num.negative !== 0 && this.negative === 0) { + num.negative = 0; + res = this.sub(num); + num.negative ^= 1; + return res; + } else if (num.negative === 0 && this.negative !== 0) { + this.negative = 0; + res = num.sub(this); + this.negative = 1; + return res; + } + + if (this.length > num.length) return this.clone().iadd(num); + + return num.clone().iadd(this); + }; + + // Subtract `num` from `this` in-place + BN.prototype.isub = function isub (num) { + // this - (-num) = this + num + if (num.negative !== 0) { + num.negative = 0; + var r = this.iadd(num); + num.negative = 1; + return r._normSign(); + + // -this - num = -(this + num) + } else if (this.negative !== 0) { + this.negative = 0; + this.iadd(num); + this.negative = 1; + return this._normSign(); + } + + // At this point both numbers are positive + var cmp = this.cmp(num); + + // Optimization - zeroify + if (cmp === 0) { + this.negative = 0; + this.length = 1; + this.words[0] = 0; + return this; + } + + // a > b + var a, b; + if (cmp > 0) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) - (b.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + + // Copy rest of the words + if (carry === 0 && i < a.length && a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = Math.max(this.length, i); + + if (a !== this) { + this.negative = 1; + } + + return this.strip(); + }; + + // Subtract `num` from `this` + BN.prototype.sub = function sub (num) { + return this.clone().isub(num); + }; + + function smallMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + var len = (self.length + num.length) | 0; + out.length = len; + len = (len - 1) | 0; + + // Peel one iteration (compiler can't do it, because of code complexity) + var a = self.words[0] | 0; + var b = num.words[0] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + var carry = (r / 0x4000000) | 0; + out.words[0] = lo; + + for (var k = 1; k < len; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = carry >>> 26; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = (k - j) | 0; + a = self.words[i] | 0; + b = num.words[j] | 0; + r = a * b + rword; + ncarry += (r / 0x4000000) | 0; + rword = r & 0x3ffffff; + } + out.words[k] = rword | 0; + carry = ncarry | 0; + } + if (carry !== 0) { + out.words[k] = carry | 0; + } else { + out.length--; + } + + return out.strip(); + } + + // TODO(indutny): it may be reasonable to omit it for users who don't need + // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit + // multiplication (like elliptic secp256k1). + var comb10MulTo = function comb10MulTo (self, num, out) { + var a = self.words; + var b = num.words; + var o = out.words; + var c = 0; + var lo; + var mid; + var hi; + var a0 = a[0] | 0; + var al0 = a0 & 0x1fff; + var ah0 = a0 >>> 13; + var a1 = a[1] | 0; + var al1 = a1 & 0x1fff; + var ah1 = a1 >>> 13; + var a2 = a[2] | 0; + var al2 = a2 & 0x1fff; + var ah2 = a2 >>> 13; + var a3 = a[3] | 0; + var al3 = a3 & 0x1fff; + var ah3 = a3 >>> 13; + var a4 = a[4] | 0; + var al4 = a4 & 0x1fff; + var ah4 = a4 >>> 13; + var a5 = a[5] | 0; + var al5 = a5 & 0x1fff; + var ah5 = a5 >>> 13; + var a6 = a[6] | 0; + var al6 = a6 & 0x1fff; + var ah6 = a6 >>> 13; + var a7 = a[7] | 0; + var al7 = a7 & 0x1fff; + var ah7 = a7 >>> 13; + var a8 = a[8] | 0; + var al8 = a8 & 0x1fff; + var ah8 = a8 >>> 13; + var a9 = a[9] | 0; + var al9 = a9 & 0x1fff; + var ah9 = a9 >>> 13; + var b0 = b[0] | 0; + var bl0 = b0 & 0x1fff; + var bh0 = b0 >>> 13; + var b1 = b[1] | 0; + var bl1 = b1 & 0x1fff; + var bh1 = b1 >>> 13; + var b2 = b[2] | 0; + var bl2 = b2 & 0x1fff; + var bh2 = b2 >>> 13; + var b3 = b[3] | 0; + var bl3 = b3 & 0x1fff; + var bh3 = b3 >>> 13; + var b4 = b[4] | 0; + var bl4 = b4 & 0x1fff; + var bh4 = b4 >>> 13; + var b5 = b[5] | 0; + var bl5 = b5 & 0x1fff; + var bh5 = b5 >>> 13; + var b6 = b[6] | 0; + var bl6 = b6 & 0x1fff; + var bh6 = b6 >>> 13; + var b7 = b[7] | 0; + var bl7 = b7 & 0x1fff; + var bh7 = b7 >>> 13; + var b8 = b[8] | 0; + var bl8 = b8 & 0x1fff; + var bh8 = b8 >>> 13; + var b9 = b[9] | 0; + var bl9 = b9 & 0x1fff; + var bh9 = b9 >>> 13; + + out.negative = self.negative ^ num.negative; + out.length = 19; + /* k = 0 */ + lo = Math.imul(al0, bl0); + mid = Math.imul(al0, bh0); + mid = (mid + Math.imul(ah0, bl0)) | 0; + hi = Math.imul(ah0, bh0); + var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; + w0 &= 0x3ffffff; + /* k = 1 */ + lo = Math.imul(al1, bl0); + mid = Math.imul(al1, bh0); + mid = (mid + Math.imul(ah1, bl0)) | 0; + hi = Math.imul(ah1, bh0); + lo = (lo + Math.imul(al0, bl1)) | 0; + mid = (mid + Math.imul(al0, bh1)) | 0; + mid = (mid + Math.imul(ah0, bl1)) | 0; + hi = (hi + Math.imul(ah0, bh1)) | 0; + var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; + w1 &= 0x3ffffff; + /* k = 2 */ + lo = Math.imul(al2, bl0); + mid = Math.imul(al2, bh0); + mid = (mid + Math.imul(ah2, bl0)) | 0; + hi = Math.imul(ah2, bh0); + lo = (lo + Math.imul(al1, bl1)) | 0; + mid = (mid + Math.imul(al1, bh1)) | 0; + mid = (mid + Math.imul(ah1, bl1)) | 0; + hi = (hi + Math.imul(ah1, bh1)) | 0; + lo = (lo + Math.imul(al0, bl2)) | 0; + mid = (mid + Math.imul(al0, bh2)) | 0; + mid = (mid + Math.imul(ah0, bl2)) | 0; + hi = (hi + Math.imul(ah0, bh2)) | 0; + var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; + w2 &= 0x3ffffff; + /* k = 3 */ + lo = Math.imul(al3, bl0); + mid = Math.imul(al3, bh0); + mid = (mid + Math.imul(ah3, bl0)) | 0; + hi = Math.imul(ah3, bh0); + lo = (lo + Math.imul(al2, bl1)) | 0; + mid = (mid + Math.imul(al2, bh1)) | 0; + mid = (mid + Math.imul(ah2, bl1)) | 0; + hi = (hi + Math.imul(ah2, bh1)) | 0; + lo = (lo + Math.imul(al1, bl2)) | 0; + mid = (mid + Math.imul(al1, bh2)) | 0; + mid = (mid + Math.imul(ah1, bl2)) | 0; + hi = (hi + Math.imul(ah1, bh2)) | 0; + lo = (lo + Math.imul(al0, bl3)) | 0; + mid = (mid + Math.imul(al0, bh3)) | 0; + mid = (mid + Math.imul(ah0, bl3)) | 0; + hi = (hi + Math.imul(ah0, bh3)) | 0; + var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; + w3 &= 0x3ffffff; + /* k = 4 */ + lo = Math.imul(al4, bl0); + mid = Math.imul(al4, bh0); + mid = (mid + Math.imul(ah4, bl0)) | 0; + hi = Math.imul(ah4, bh0); + lo = (lo + Math.imul(al3, bl1)) | 0; + mid = (mid + Math.imul(al3, bh1)) | 0; + mid = (mid + Math.imul(ah3, bl1)) | 0; + hi = (hi + Math.imul(ah3, bh1)) | 0; + lo = (lo + Math.imul(al2, bl2)) | 0; + mid = (mid + Math.imul(al2, bh2)) | 0; + mid = (mid + Math.imul(ah2, bl2)) | 0; + hi = (hi + Math.imul(ah2, bh2)) | 0; + lo = (lo + Math.imul(al1, bl3)) | 0; + mid = (mid + Math.imul(al1, bh3)) | 0; + mid = (mid + Math.imul(ah1, bl3)) | 0; + hi = (hi + Math.imul(ah1, bh3)) | 0; + lo = (lo + Math.imul(al0, bl4)) | 0; + mid = (mid + Math.imul(al0, bh4)) | 0; + mid = (mid + Math.imul(ah0, bl4)) | 0; + hi = (hi + Math.imul(ah0, bh4)) | 0; + var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; + w4 &= 0x3ffffff; + /* k = 5 */ + lo = Math.imul(al5, bl0); + mid = Math.imul(al5, bh0); + mid = (mid + Math.imul(ah5, bl0)) | 0; + hi = Math.imul(ah5, bh0); + lo = (lo + Math.imul(al4, bl1)) | 0; + mid = (mid + Math.imul(al4, bh1)) | 0; + mid = (mid + Math.imul(ah4, bl1)) | 0; + hi = (hi + Math.imul(ah4, bh1)) | 0; + lo = (lo + Math.imul(al3, bl2)) | 0; + mid = (mid + Math.imul(al3, bh2)) | 0; + mid = (mid + Math.imul(ah3, bl2)) | 0; + hi = (hi + Math.imul(ah3, bh2)) | 0; + lo = (lo + Math.imul(al2, bl3)) | 0; + mid = (mid + Math.imul(al2, bh3)) | 0; + mid = (mid + Math.imul(ah2, bl3)) | 0; + hi = (hi + Math.imul(ah2, bh3)) | 0; + lo = (lo + Math.imul(al1, bl4)) | 0; + mid = (mid + Math.imul(al1, bh4)) | 0; + mid = (mid + Math.imul(ah1, bl4)) | 0; + hi = (hi + Math.imul(ah1, bh4)) | 0; + lo = (lo + Math.imul(al0, bl5)) | 0; + mid = (mid + Math.imul(al0, bh5)) | 0; + mid = (mid + Math.imul(ah0, bl5)) | 0; + hi = (hi + Math.imul(ah0, bh5)) | 0; + var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; + w5 &= 0x3ffffff; + /* k = 6 */ + lo = Math.imul(al6, bl0); + mid = Math.imul(al6, bh0); + mid = (mid + Math.imul(ah6, bl0)) | 0; + hi = Math.imul(ah6, bh0); + lo = (lo + Math.imul(al5, bl1)) | 0; + mid = (mid + Math.imul(al5, bh1)) | 0; + mid = (mid + Math.imul(ah5, bl1)) | 0; + hi = (hi + Math.imul(ah5, bh1)) | 0; + lo = (lo + Math.imul(al4, bl2)) | 0; + mid = (mid + Math.imul(al4, bh2)) | 0; + mid = (mid + Math.imul(ah4, bl2)) | 0; + hi = (hi + Math.imul(ah4, bh2)) | 0; + lo = (lo + Math.imul(al3, bl3)) | 0; + mid = (mid + Math.imul(al3, bh3)) | 0; + mid = (mid + Math.imul(ah3, bl3)) | 0; + hi = (hi + Math.imul(ah3, bh3)) | 0; + lo = (lo + Math.imul(al2, bl4)) | 0; + mid = (mid + Math.imul(al2, bh4)) | 0; + mid = (mid + Math.imul(ah2, bl4)) | 0; + hi = (hi + Math.imul(ah2, bh4)) | 0; + lo = (lo + Math.imul(al1, bl5)) | 0; + mid = (mid + Math.imul(al1, bh5)) | 0; + mid = (mid + Math.imul(ah1, bl5)) | 0; + hi = (hi + Math.imul(ah1, bh5)) | 0; + lo = (lo + Math.imul(al0, bl6)) | 0; + mid = (mid + Math.imul(al0, bh6)) | 0; + mid = (mid + Math.imul(ah0, bl6)) | 0; + hi = (hi + Math.imul(ah0, bh6)) | 0; + var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; + w6 &= 0x3ffffff; + /* k = 7 */ + lo = Math.imul(al7, bl0); + mid = Math.imul(al7, bh0); + mid = (mid + Math.imul(ah7, bl0)) | 0; + hi = Math.imul(ah7, bh0); + lo = (lo + Math.imul(al6, bl1)) | 0; + mid = (mid + Math.imul(al6, bh1)) | 0; + mid = (mid + Math.imul(ah6, bl1)) | 0; + hi = (hi + Math.imul(ah6, bh1)) | 0; + lo = (lo + Math.imul(al5, bl2)) | 0; + mid = (mid + Math.imul(al5, bh2)) | 0; + mid = (mid + Math.imul(ah5, bl2)) | 0; + hi = (hi + Math.imul(ah5, bh2)) | 0; + lo = (lo + Math.imul(al4, bl3)) | 0; + mid = (mid + Math.imul(al4, bh3)) | 0; + mid = (mid + Math.imul(ah4, bl3)) | 0; + hi = (hi + Math.imul(ah4, bh3)) | 0; + lo = (lo + Math.imul(al3, bl4)) | 0; + mid = (mid + Math.imul(al3, bh4)) | 0; + mid = (mid + Math.imul(ah3, bl4)) | 0; + hi = (hi + Math.imul(ah3, bh4)) | 0; + lo = (lo + Math.imul(al2, bl5)) | 0; + mid = (mid + Math.imul(al2, bh5)) | 0; + mid = (mid + Math.imul(ah2, bl5)) | 0; + hi = (hi + Math.imul(ah2, bh5)) | 0; + lo = (lo + Math.imul(al1, bl6)) | 0; + mid = (mid + Math.imul(al1, bh6)) | 0; + mid = (mid + Math.imul(ah1, bl6)) | 0; + hi = (hi + Math.imul(ah1, bh6)) | 0; + lo = (lo + Math.imul(al0, bl7)) | 0; + mid = (mid + Math.imul(al0, bh7)) | 0; + mid = (mid + Math.imul(ah0, bl7)) | 0; + hi = (hi + Math.imul(ah0, bh7)) | 0; + var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; + w7 &= 0x3ffffff; + /* k = 8 */ + lo = Math.imul(al8, bl0); + mid = Math.imul(al8, bh0); + mid = (mid + Math.imul(ah8, bl0)) | 0; + hi = Math.imul(ah8, bh0); + lo = (lo + Math.imul(al7, bl1)) | 0; + mid = (mid + Math.imul(al7, bh1)) | 0; + mid = (mid + Math.imul(ah7, bl1)) | 0; + hi = (hi + Math.imul(ah7, bh1)) | 0; + lo = (lo + Math.imul(al6, bl2)) | 0; + mid = (mid + Math.imul(al6, bh2)) | 0; + mid = (mid + Math.imul(ah6, bl2)) | 0; + hi = (hi + Math.imul(ah6, bh2)) | 0; + lo = (lo + Math.imul(al5, bl3)) | 0; + mid = (mid + Math.imul(al5, bh3)) | 0; + mid = (mid + Math.imul(ah5, bl3)) | 0; + hi = (hi + Math.imul(ah5, bh3)) | 0; + lo = (lo + Math.imul(al4, bl4)) | 0; + mid = (mid + Math.imul(al4, bh4)) | 0; + mid = (mid + Math.imul(ah4, bl4)) | 0; + hi = (hi + Math.imul(ah4, bh4)) | 0; + lo = (lo + Math.imul(al3, bl5)) | 0; + mid = (mid + Math.imul(al3, bh5)) | 0; + mid = (mid + Math.imul(ah3, bl5)) | 0; + hi = (hi + Math.imul(ah3, bh5)) | 0; + lo = (lo + Math.imul(al2, bl6)) | 0; + mid = (mid + Math.imul(al2, bh6)) | 0; + mid = (mid + Math.imul(ah2, bl6)) | 0; + hi = (hi + Math.imul(ah2, bh6)) | 0; + lo = (lo + Math.imul(al1, bl7)) | 0; + mid = (mid + Math.imul(al1, bh7)) | 0; + mid = (mid + Math.imul(ah1, bl7)) | 0; + hi = (hi + Math.imul(ah1, bh7)) | 0; + lo = (lo + Math.imul(al0, bl8)) | 0; + mid = (mid + Math.imul(al0, bh8)) | 0; + mid = (mid + Math.imul(ah0, bl8)) | 0; + hi = (hi + Math.imul(ah0, bh8)) | 0; + var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; + w8 &= 0x3ffffff; + /* k = 9 */ + lo = Math.imul(al9, bl0); + mid = Math.imul(al9, bh0); + mid = (mid + Math.imul(ah9, bl0)) | 0; + hi = Math.imul(ah9, bh0); + lo = (lo + Math.imul(al8, bl1)) | 0; + mid = (mid + Math.imul(al8, bh1)) | 0; + mid = (mid + Math.imul(ah8, bl1)) | 0; + hi = (hi + Math.imul(ah8, bh1)) | 0; + lo = (lo + Math.imul(al7, bl2)) | 0; + mid = (mid + Math.imul(al7, bh2)) | 0; + mid = (mid + Math.imul(ah7, bl2)) | 0; + hi = (hi + Math.imul(ah7, bh2)) | 0; + lo = (lo + Math.imul(al6, bl3)) | 0; + mid = (mid + Math.imul(al6, bh3)) | 0; + mid = (mid + Math.imul(ah6, bl3)) | 0; + hi = (hi + Math.imul(ah6, bh3)) | 0; + lo = (lo + Math.imul(al5, bl4)) | 0; + mid = (mid + Math.imul(al5, bh4)) | 0; + mid = (mid + Math.imul(ah5, bl4)) | 0; + hi = (hi + Math.imul(ah5, bh4)) | 0; + lo = (lo + Math.imul(al4, bl5)) | 0; + mid = (mid + Math.imul(al4, bh5)) | 0; + mid = (mid + Math.imul(ah4, bl5)) | 0; + hi = (hi + Math.imul(ah4, bh5)) | 0; + lo = (lo + Math.imul(al3, bl6)) | 0; + mid = (mid + Math.imul(al3, bh6)) | 0; + mid = (mid + Math.imul(ah3, bl6)) | 0; + hi = (hi + Math.imul(ah3, bh6)) | 0; + lo = (lo + Math.imul(al2, bl7)) | 0; + mid = (mid + Math.imul(al2, bh7)) | 0; + mid = (mid + Math.imul(ah2, bl7)) | 0; + hi = (hi + Math.imul(ah2, bh7)) | 0; + lo = (lo + Math.imul(al1, bl8)) | 0; + mid = (mid + Math.imul(al1, bh8)) | 0; + mid = (mid + Math.imul(ah1, bl8)) | 0; + hi = (hi + Math.imul(ah1, bh8)) | 0; + lo = (lo + Math.imul(al0, bl9)) | 0; + mid = (mid + Math.imul(al0, bh9)) | 0; + mid = (mid + Math.imul(ah0, bl9)) | 0; + hi = (hi + Math.imul(ah0, bh9)) | 0; + var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; + w9 &= 0x3ffffff; + /* k = 10 */ + lo = Math.imul(al9, bl1); + mid = Math.imul(al9, bh1); + mid = (mid + Math.imul(ah9, bl1)) | 0; + hi = Math.imul(ah9, bh1); + lo = (lo + Math.imul(al8, bl2)) | 0; + mid = (mid + Math.imul(al8, bh2)) | 0; + mid = (mid + Math.imul(ah8, bl2)) | 0; + hi = (hi + Math.imul(ah8, bh2)) | 0; + lo = (lo + Math.imul(al7, bl3)) | 0; + mid = (mid + Math.imul(al7, bh3)) | 0; + mid = (mid + Math.imul(ah7, bl3)) | 0; + hi = (hi + Math.imul(ah7, bh3)) | 0; + lo = (lo + Math.imul(al6, bl4)) | 0; + mid = (mid + Math.imul(al6, bh4)) | 0; + mid = (mid + Math.imul(ah6, bl4)) | 0; + hi = (hi + Math.imul(ah6, bh4)) | 0; + lo = (lo + Math.imul(al5, bl5)) | 0; + mid = (mid + Math.imul(al5, bh5)) | 0; + mid = (mid + Math.imul(ah5, bl5)) | 0; + hi = (hi + Math.imul(ah5, bh5)) | 0; + lo = (lo + Math.imul(al4, bl6)) | 0; + mid = (mid + Math.imul(al4, bh6)) | 0; + mid = (mid + Math.imul(ah4, bl6)) | 0; + hi = (hi + Math.imul(ah4, bh6)) | 0; + lo = (lo + Math.imul(al3, bl7)) | 0; + mid = (mid + Math.imul(al3, bh7)) | 0; + mid = (mid + Math.imul(ah3, bl7)) | 0; + hi = (hi + Math.imul(ah3, bh7)) | 0; + lo = (lo + Math.imul(al2, bl8)) | 0; + mid = (mid + Math.imul(al2, bh8)) | 0; + mid = (mid + Math.imul(ah2, bl8)) | 0; + hi = (hi + Math.imul(ah2, bh8)) | 0; + lo = (lo + Math.imul(al1, bl9)) | 0; + mid = (mid + Math.imul(al1, bh9)) | 0; + mid = (mid + Math.imul(ah1, bl9)) | 0; + hi = (hi + Math.imul(ah1, bh9)) | 0; + var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; + w10 &= 0x3ffffff; + /* k = 11 */ + lo = Math.imul(al9, bl2); + mid = Math.imul(al9, bh2); + mid = (mid + Math.imul(ah9, bl2)) | 0; + hi = Math.imul(ah9, bh2); + lo = (lo + Math.imul(al8, bl3)) | 0; + mid = (mid + Math.imul(al8, bh3)) | 0; + mid = (mid + Math.imul(ah8, bl3)) | 0; + hi = (hi + Math.imul(ah8, bh3)) | 0; + lo = (lo + Math.imul(al7, bl4)) | 0; + mid = (mid + Math.imul(al7, bh4)) | 0; + mid = (mid + Math.imul(ah7, bl4)) | 0; + hi = (hi + Math.imul(ah7, bh4)) | 0; + lo = (lo + Math.imul(al6, bl5)) | 0; + mid = (mid + Math.imul(al6, bh5)) | 0; + mid = (mid + Math.imul(ah6, bl5)) | 0; + hi = (hi + Math.imul(ah6, bh5)) | 0; + lo = (lo + Math.imul(al5, bl6)) | 0; + mid = (mid + Math.imul(al5, bh6)) | 0; + mid = (mid + Math.imul(ah5, bl6)) | 0; + hi = (hi + Math.imul(ah5, bh6)) | 0; + lo = (lo + Math.imul(al4, bl7)) | 0; + mid = (mid + Math.imul(al4, bh7)) | 0; + mid = (mid + Math.imul(ah4, bl7)) | 0; + hi = (hi + Math.imul(ah4, bh7)) | 0; + lo = (lo + Math.imul(al3, bl8)) | 0; + mid = (mid + Math.imul(al3, bh8)) | 0; + mid = (mid + Math.imul(ah3, bl8)) | 0; + hi = (hi + Math.imul(ah3, bh8)) | 0; + lo = (lo + Math.imul(al2, bl9)) | 0; + mid = (mid + Math.imul(al2, bh9)) | 0; + mid = (mid + Math.imul(ah2, bl9)) | 0; + hi = (hi + Math.imul(ah2, bh9)) | 0; + var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; + w11 &= 0x3ffffff; + /* k = 12 */ + lo = Math.imul(al9, bl3); + mid = Math.imul(al9, bh3); + mid = (mid + Math.imul(ah9, bl3)) | 0; + hi = Math.imul(ah9, bh3); + lo = (lo + Math.imul(al8, bl4)) | 0; + mid = (mid + Math.imul(al8, bh4)) | 0; + mid = (mid + Math.imul(ah8, bl4)) | 0; + hi = (hi + Math.imul(ah8, bh4)) | 0; + lo = (lo + Math.imul(al7, bl5)) | 0; + mid = (mid + Math.imul(al7, bh5)) | 0; + mid = (mid + Math.imul(ah7, bl5)) | 0; + hi = (hi + Math.imul(ah7, bh5)) | 0; + lo = (lo + Math.imul(al6, bl6)) | 0; + mid = (mid + Math.imul(al6, bh6)) | 0; + mid = (mid + Math.imul(ah6, bl6)) | 0; + hi = (hi + Math.imul(ah6, bh6)) | 0; + lo = (lo + Math.imul(al5, bl7)) | 0; + mid = (mid + Math.imul(al5, bh7)) | 0; + mid = (mid + Math.imul(ah5, bl7)) | 0; + hi = (hi + Math.imul(ah5, bh7)) | 0; + lo = (lo + Math.imul(al4, bl8)) | 0; + mid = (mid + Math.imul(al4, bh8)) | 0; + mid = (mid + Math.imul(ah4, bl8)) | 0; + hi = (hi + Math.imul(ah4, bh8)) | 0; + lo = (lo + Math.imul(al3, bl9)) | 0; + mid = (mid + Math.imul(al3, bh9)) | 0; + mid = (mid + Math.imul(ah3, bl9)) | 0; + hi = (hi + Math.imul(ah3, bh9)) | 0; + var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; + w12 &= 0x3ffffff; + /* k = 13 */ + lo = Math.imul(al9, bl4); + mid = Math.imul(al9, bh4); + mid = (mid + Math.imul(ah9, bl4)) | 0; + hi = Math.imul(ah9, bh4); + lo = (lo + Math.imul(al8, bl5)) | 0; + mid = (mid + Math.imul(al8, bh5)) | 0; + mid = (mid + Math.imul(ah8, bl5)) | 0; + hi = (hi + Math.imul(ah8, bh5)) | 0; + lo = (lo + Math.imul(al7, bl6)) | 0; + mid = (mid + Math.imul(al7, bh6)) | 0; + mid = (mid + Math.imul(ah7, bl6)) | 0; + hi = (hi + Math.imul(ah7, bh6)) | 0; + lo = (lo + Math.imul(al6, bl7)) | 0; + mid = (mid + Math.imul(al6, bh7)) | 0; + mid = (mid + Math.imul(ah6, bl7)) | 0; + hi = (hi + Math.imul(ah6, bh7)) | 0; + lo = (lo + Math.imul(al5, bl8)) | 0; + mid = (mid + Math.imul(al5, bh8)) | 0; + mid = (mid + Math.imul(ah5, bl8)) | 0; + hi = (hi + Math.imul(ah5, bh8)) | 0; + lo = (lo + Math.imul(al4, bl9)) | 0; + mid = (mid + Math.imul(al4, bh9)) | 0; + mid = (mid + Math.imul(ah4, bl9)) | 0; + hi = (hi + Math.imul(ah4, bh9)) | 0; + var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; + w13 &= 0x3ffffff; + /* k = 14 */ + lo = Math.imul(al9, bl5); + mid = Math.imul(al9, bh5); + mid = (mid + Math.imul(ah9, bl5)) | 0; + hi = Math.imul(ah9, bh5); + lo = (lo + Math.imul(al8, bl6)) | 0; + mid = (mid + Math.imul(al8, bh6)) | 0; + mid = (mid + Math.imul(ah8, bl6)) | 0; + hi = (hi + Math.imul(ah8, bh6)) | 0; + lo = (lo + Math.imul(al7, bl7)) | 0; + mid = (mid + Math.imul(al7, bh7)) | 0; + mid = (mid + Math.imul(ah7, bl7)) | 0; + hi = (hi + Math.imul(ah7, bh7)) | 0; + lo = (lo + Math.imul(al6, bl8)) | 0; + mid = (mid + Math.imul(al6, bh8)) | 0; + mid = (mid + Math.imul(ah6, bl8)) | 0; + hi = (hi + Math.imul(ah6, bh8)) | 0; + lo = (lo + Math.imul(al5, bl9)) | 0; + mid = (mid + Math.imul(al5, bh9)) | 0; + mid = (mid + Math.imul(ah5, bl9)) | 0; + hi = (hi + Math.imul(ah5, bh9)) | 0; + var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; + w14 &= 0x3ffffff; + /* k = 15 */ + lo = Math.imul(al9, bl6); + mid = Math.imul(al9, bh6); + mid = (mid + Math.imul(ah9, bl6)) | 0; + hi = Math.imul(ah9, bh6); + lo = (lo + Math.imul(al8, bl7)) | 0; + mid = (mid + Math.imul(al8, bh7)) | 0; + mid = (mid + Math.imul(ah8, bl7)) | 0; + hi = (hi + Math.imul(ah8, bh7)) | 0; + lo = (lo + Math.imul(al7, bl8)) | 0; + mid = (mid + Math.imul(al7, bh8)) | 0; + mid = (mid + Math.imul(ah7, bl8)) | 0; + hi = (hi + Math.imul(ah7, bh8)) | 0; + lo = (lo + Math.imul(al6, bl9)) | 0; + mid = (mid + Math.imul(al6, bh9)) | 0; + mid = (mid + Math.imul(ah6, bl9)) | 0; + hi = (hi + Math.imul(ah6, bh9)) | 0; + var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; + w15 &= 0x3ffffff; + /* k = 16 */ + lo = Math.imul(al9, bl7); + mid = Math.imul(al9, bh7); + mid = (mid + Math.imul(ah9, bl7)) | 0; + hi = Math.imul(ah9, bh7); + lo = (lo + Math.imul(al8, bl8)) | 0; + mid = (mid + Math.imul(al8, bh8)) | 0; + mid = (mid + Math.imul(ah8, bl8)) | 0; + hi = (hi + Math.imul(ah8, bh8)) | 0; + lo = (lo + Math.imul(al7, bl9)) | 0; + mid = (mid + Math.imul(al7, bh9)) | 0; + mid = (mid + Math.imul(ah7, bl9)) | 0; + hi = (hi + Math.imul(ah7, bh9)) | 0; + var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; + w16 &= 0x3ffffff; + /* k = 17 */ + lo = Math.imul(al9, bl8); + mid = Math.imul(al9, bh8); + mid = (mid + Math.imul(ah9, bl8)) | 0; + hi = Math.imul(ah9, bh8); + lo = (lo + Math.imul(al8, bl9)) | 0; + mid = (mid + Math.imul(al8, bh9)) | 0; + mid = (mid + Math.imul(ah8, bl9)) | 0; + hi = (hi + Math.imul(ah8, bh9)) | 0; + var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; + w17 &= 0x3ffffff; + /* k = 18 */ + lo = Math.imul(al9, bl9); + mid = Math.imul(al9, bh9); + mid = (mid + Math.imul(ah9, bl9)) | 0; + hi = Math.imul(ah9, bh9); + var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; + w18 &= 0x3ffffff; + o[0] = w0; + o[1] = w1; + o[2] = w2; + o[3] = w3; + o[4] = w4; + o[5] = w5; + o[6] = w6; + o[7] = w7; + o[8] = w8; + o[9] = w9; + o[10] = w10; + o[11] = w11; + o[12] = w12; + o[13] = w13; + o[14] = w14; + o[15] = w15; + o[16] = w16; + o[17] = w17; + o[18] = w18; + if (c !== 0) { + o[19] = c; + out.length++; + } + return out; + }; + + // Polyfill comb + if (!Math.imul) { + comb10MulTo = smallMulTo; + } + + function bigMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + out.length = self.length + num.length; + + var carry = 0; + var hncarry = 0; + for (var k = 0; k < out.length - 1; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = hncarry; + hncarry = 0; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = k - j; + var a = self.words[i] | 0; + var b = num.words[j] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; + lo = (lo + rword) | 0; + rword = lo & 0x3ffffff; + ncarry = (ncarry + (lo >>> 26)) | 0; + + hncarry += ncarry >>> 26; + ncarry &= 0x3ffffff; + } + out.words[k] = rword; + carry = ncarry; + ncarry = hncarry; + } + if (carry !== 0) { + out.words[k] = carry; + } else { + out.length--; + } + + return out.strip(); + } + + function jumboMulTo (self, num, out) { + var fftm = new FFTM(); + return fftm.mulp(self, num, out); + } + + BN.prototype.mulTo = function mulTo (num, out) { + var res; + var len = this.length + num.length; + if (this.length === 10 && num.length === 10) { + res = comb10MulTo(this, num, out); + } else if (len < 63) { + res = smallMulTo(this, num, out); + } else if (len < 1024) { + res = bigMulTo(this, num, out); + } else { + res = jumboMulTo(this, num, out); + } + + return res; + }; + + // Cooley-Tukey algorithm for FFT + // slightly revisited to rely on looping instead of recursion + + function FFTM (x, y) { + this.x = x; + this.y = y; + } + + FFTM.prototype.makeRBT = function makeRBT (N) { + var t = new Array(N); + var l = BN.prototype._countBits(N) - 1; + for (var i = 0; i < N; i++) { + t[i] = this.revBin(i, l, N); + } + + return t; + }; + + // Returns binary-reversed representation of `x` + FFTM.prototype.revBin = function revBin (x, l, N) { + if (x === 0 || x === N - 1) return x; + + var rb = 0; + for (var i = 0; i < l; i++) { + rb |= (x & 1) << (l - i - 1); + x >>= 1; + } + + return rb; + }; + + // Performs "tweedling" phase, therefore 'emulating' + // behaviour of the recursive algorithm + FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { + for (var i = 0; i < N; i++) { + rtws[i] = rws[rbt[i]]; + itws[i] = iws[rbt[i]]; + } + }; + + FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { + this.permute(rbt, rws, iws, rtws, itws, N); + + for (var s = 1; s < N; s <<= 1) { + var l = s << 1; + + var rtwdf = Math.cos(2 * Math.PI / l); + var itwdf = Math.sin(2 * Math.PI / l); + + for (var p = 0; p < N; p += l) { + var rtwdf_ = rtwdf; + var itwdf_ = itwdf; + + for (var j = 0; j < s; j++) { + var re = rtws[p + j]; + var ie = itws[p + j]; + + var ro = rtws[p + j + s]; + var io = itws[p + j + s]; + + var rx = rtwdf_ * ro - itwdf_ * io; + + io = rtwdf_ * io + itwdf_ * ro; + ro = rx; + + rtws[p + j] = re + ro; + itws[p + j] = ie + io; + + rtws[p + j + s] = re - ro; + itws[p + j + s] = ie - io; + + /* jshint maxdepth : false */ + if (j !== l) { + rx = rtwdf * rtwdf_ - itwdf * itwdf_; + + itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; + rtwdf_ = rx; + } + } + } + } + }; + + FFTM.prototype.guessLen13b = function guessLen13b (n, m) { + var N = Math.max(m, n) | 1; + var odd = N & 1; + var i = 0; + for (N = N / 2 | 0; N; N = N >>> 1) { + i++; + } + + return 1 << i + 1 + odd; + }; + + FFTM.prototype.conjugate = function conjugate (rws, iws, N) { + if (N <= 1) return; + + for (var i = 0; i < N / 2; i++) { + var t = rws[i]; + + rws[i] = rws[N - i - 1]; + rws[N - i - 1] = t; + + t = iws[i]; + + iws[i] = -iws[N - i - 1]; + iws[N - i - 1] = -t; + } + }; + + FFTM.prototype.normalize13b = function normalize13b (ws, N) { + var carry = 0; + for (var i = 0; i < N / 2; i++) { + var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + + Math.round(ws[2 * i] / N) + + carry; + + ws[i] = w & 0x3ffffff; + + if (w < 0x4000000) { + carry = 0; + } else { + carry = w / 0x4000000 | 0; + } + } + + return ws; + }; + + FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { + var carry = 0; + for (var i = 0; i < len; i++) { + carry = carry + (ws[i] | 0); + + rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; + rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; + } + + // Pad with zeroes + for (i = 2 * len; i < N; ++i) { + rws[i] = 0; + } + + assert(carry === 0); + assert((carry & ~0x1fff) === 0); + }; + + FFTM.prototype.stub = function stub (N) { + var ph = new Array(N); + for (var i = 0; i < N; i++) { + ph[i] = 0; + } + + return ph; + }; + + FFTM.prototype.mulp = function mulp (x, y, out) { + var N = 2 * this.guessLen13b(x.length, y.length); + + var rbt = this.makeRBT(N); + + var _ = this.stub(N); + + var rws = new Array(N); + var rwst = new Array(N); + var iwst = new Array(N); + + var nrws = new Array(N); + var nrwst = new Array(N); + var niwst = new Array(N); + + var rmws = out.words; + rmws.length = N; + + this.convert13b(x.words, x.length, rws, N); + this.convert13b(y.words, y.length, nrws, N); + + this.transform(rws, _, rwst, iwst, N, rbt); + this.transform(nrws, _, nrwst, niwst, N, rbt); + + for (var i = 0; i < N; i++) { + var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; + iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; + rwst[i] = rx; + } + + this.conjugate(rwst, iwst, N); + this.transform(rwst, iwst, rmws, _, N, rbt); + this.conjugate(rmws, _, N); + this.normalize13b(rmws, N); + + out.negative = x.negative ^ y.negative; + out.length = x.length + y.length; + return out.strip(); + }; + + // Multiply `this` by `num` + BN.prototype.mul = function mul (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return this.mulTo(num, out); + }; + + // Multiply employing FFT + BN.prototype.mulf = function mulf (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return jumboMulTo(this, num, out); + }; + + // In-place Multiplication + BN.prototype.imul = function imul (num) { + return this.clone().mulTo(num, this); + }; + + BN.prototype.imuln = function imuln (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + + // Carry + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = (this.words[i] | 0) * num; + var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); + carry >>= 26; + carry += (w / 0x4000000) | 0; + // NOTE: lo is 27bit maximum + carry += lo >>> 26; + this.words[i] = lo & 0x3ffffff; + } + + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + + return this; + }; + + BN.prototype.muln = function muln (num) { + return this.clone().imuln(num); + }; + + // `this` * `this` + BN.prototype.sqr = function sqr () { + return this.mul(this); + }; + + // `this` * `this` in-place + BN.prototype.isqr = function isqr () { + return this.imul(this.clone()); + }; + + // Math.pow(`this`, `num`) + BN.prototype.pow = function pow (num) { + var w = toBitArray(num); + if (w.length === 0) return new BN(1); + + // Skip leading zeroes + var res = this; + for (var i = 0; i < w.length; i++, res = res.sqr()) { + if (w[i] !== 0) break; + } + + if (++i < w.length) { + for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { + if (w[i] === 0) continue; + + res = res.mul(q); + } + } + + return res; + }; + + // Shift-left in-place + BN.prototype.iushln = function iushln (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); + var i; + + if (r !== 0) { + var carry = 0; + + for (i = 0; i < this.length; i++) { + var newCarry = this.words[i] & carryMask; + var c = ((this.words[i] | 0) - newCarry) << r; + this.words[i] = c | carry; + carry = newCarry >>> (26 - r); + } + + if (carry) { + this.words[i] = carry; + this.length++; + } + } + + if (s !== 0) { + for (i = this.length - 1; i >= 0; i--) { + this.words[i + s] = this.words[i]; + } + + for (i = 0; i < s; i++) { + this.words[i] = 0; + } + + this.length += s; + } + + return this.strip(); + }; + + BN.prototype.ishln = function ishln (bits) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushln(bits); + }; + + // Shift-right in-place + // NOTE: `hint` is a lowest bit before trailing zeroes + // NOTE: if `extended` is present - it will be filled with destroyed bits + BN.prototype.iushrn = function iushrn (bits, hint, extended) { + assert(typeof bits === 'number' && bits >= 0); + var h; + if (hint) { + h = (hint - (hint % 26)) / 26; + } else { + h = 0; + } + + var r = bits % 26; + var s = Math.min((bits - r) / 26, this.length); + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + var maskedWords = extended; + + h -= s; + h = Math.max(0, h); + + // Extended mode, copy masked part + if (maskedWords) { + for (var i = 0; i < s; i++) { + maskedWords.words[i] = this.words[i]; + } + maskedWords.length = s; + } + + if (s === 0) { + // No-op, we should not move anything at all + } else if (this.length > s) { + this.length -= s; + for (i = 0; i < this.length; i++) { + this.words[i] = this.words[i + s]; + } + } else { + this.words[0] = 0; + this.length = 1; + } + + var carry = 0; + for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { + var word = this.words[i] | 0; + this.words[i] = (carry << (26 - r)) | (word >>> r); + carry = word & mask; + } + + // Push carried bits as a mask + if (maskedWords && carry !== 0) { + maskedWords.words[maskedWords.length++] = carry; + } + + if (this.length === 0) { + this.words[0] = 0; + this.length = 1; + } + + return this.strip(); + }; + + BN.prototype.ishrn = function ishrn (bits, hint, extended) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushrn(bits, hint, extended); + }; + + // Shift-left + BN.prototype.shln = function shln (bits) { + return this.clone().ishln(bits); + }; + + BN.prototype.ushln = function ushln (bits) { + return this.clone().iushln(bits); + }; + + // Shift-right + BN.prototype.shrn = function shrn (bits) { + return this.clone().ishrn(bits); + }; + + BN.prototype.ushrn = function ushrn (bits) { + return this.clone().iushrn(bits); + }; + + // Test if n bit is set + BN.prototype.testn = function testn (bit) { + assert(typeof bit === 'number' && bit >= 0); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) return false; + + // Check bit and return + var w = this.words[s]; + + return !!(w & q); + }; + + // Return only lowers bits of number (in-place) + BN.prototype.imaskn = function imaskn (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + + assert(this.negative === 0, 'imaskn works only with positive numbers'); + + if (this.length <= s) { + return this; + } + + if (r !== 0) { + s++; + } + this.length = Math.min(s, this.length); + + if (r !== 0) { + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + this.words[this.length - 1] &= mask; + } + + return this.strip(); + }; + + // Return only lowers bits of number + BN.prototype.maskn = function maskn (bits) { + return this.clone().imaskn(bits); + }; + + // Add plain number `num` to `this` + BN.prototype.iaddn = function iaddn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.isubn(-num); + + // Possible sign change + if (this.negative !== 0) { + if (this.length === 1 && (this.words[0] | 0) < num) { + this.words[0] = num - (this.words[0] | 0); + this.negative = 0; + return this; + } + + this.negative = 0; + this.isubn(num); + this.negative = 1; + return this; + } + + // Add without checks + return this._iaddn(num); + }; + + BN.prototype._iaddn = function _iaddn (num) { + this.words[0] += num; + + // Carry + for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { + this.words[i] -= 0x4000000; + if (i === this.length - 1) { + this.words[i + 1] = 1; + } else { + this.words[i + 1]++; + } + } + this.length = Math.max(this.length, i + 1); + + return this; + }; + + // Subtract plain number `num` from `this` + BN.prototype.isubn = function isubn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.iaddn(-num); + + if (this.negative !== 0) { + this.negative = 0; + this.iaddn(num); + this.negative = 1; + return this; + } + + this.words[0] -= num; + + if (this.length === 1 && this.words[0] < 0) { + this.words[0] = -this.words[0]; + this.negative = 1; + } else { + // Carry + for (var i = 0; i < this.length && this.words[i] < 0; i++) { + this.words[i] += 0x4000000; + this.words[i + 1] -= 1; + } + } + + return this.strip(); + }; + + BN.prototype.addn = function addn (num) { + return this.clone().iaddn(num); + }; + + BN.prototype.subn = function subn (num) { + return this.clone().isubn(num); + }; + + BN.prototype.iabs = function iabs () { + this.negative = 0; + + return this; + }; + + BN.prototype.abs = function abs () { + return this.clone().iabs(); + }; + + BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { + var len = num.length + shift; + var i; + + this._expand(len); + + var w; + var carry = 0; + for (i = 0; i < num.length; i++) { + w = (this.words[i + shift] | 0) + carry; + var right = (num.words[i] | 0) * mul; + w -= right & 0x3ffffff; + carry = (w >> 26) - ((right / 0x4000000) | 0); + this.words[i + shift] = w & 0x3ffffff; + } + for (; i < this.length - shift; i++) { + w = (this.words[i + shift] | 0) + carry; + carry = w >> 26; + this.words[i + shift] = w & 0x3ffffff; + } + + if (carry === 0) return this.strip(); + + // Subtraction overflow + assert(carry === -1); + carry = 0; + for (i = 0; i < this.length; i++) { + w = -(this.words[i] | 0) + carry; + carry = w >> 26; + this.words[i] = w & 0x3ffffff; + } + this.negative = 1; + + return this.strip(); + }; + + BN.prototype._wordDiv = function _wordDiv (num, mode) { + var shift = this.length - num.length; + + var a = this.clone(); + var b = num; + + // Normalize + var bhi = b.words[b.length - 1] | 0; + var bhiBits = this._countBits(bhi); + shift = 26 - bhiBits; + if (shift !== 0) { + b = b.ushln(shift); + a.iushln(shift); + bhi = b.words[b.length - 1] | 0; + } + + // Initialize quotient + var m = a.length - b.length; + var q; + + if (mode !== 'mod') { + q = new BN(null); + q.length = m + 1; + q.words = new Array(q.length); + for (var i = 0; i < q.length; i++) { + q.words[i] = 0; + } + } + + var diff = a.clone()._ishlnsubmul(b, 1, m); + if (diff.negative === 0) { + a = diff; + if (q) { + q.words[m] = 1; + } + } + + for (var j = m - 1; j >= 0; j--) { + var qj = (a.words[b.length + j] | 0) * 0x4000000 + + (a.words[b.length + j - 1] | 0); + + // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max + // (0x7ffffff) + qj = Math.min((qj / bhi) | 0, 0x3ffffff); + + a._ishlnsubmul(b, qj, j); + while (a.negative !== 0) { + qj--; + a.negative = 0; + a._ishlnsubmul(b, 1, j); + if (!a.isZero()) { + a.negative ^= 1; + } + } + if (q) { + q.words[j] = qj; + } + } + if (q) { + q.strip(); + } + a.strip(); + + // Denormalize + if (mode !== 'div' && shift !== 0) { + a.iushrn(shift); + } + + return { + div: q || null, + mod: a + }; + }; + + // NOTE: 1) `mode` can be set to `mod` to request mod only, + // to `div` to request div only, or be absent to + // request both div & mod + // 2) `positive` is true if unsigned mod is requested + BN.prototype.divmod = function divmod (num, mode, positive) { + assert(!num.isZero()); + + if (this.isZero()) { + return { + div: new BN(0), + mod: new BN(0) + }; + } + + var div, mod, res; + if (this.negative !== 0 && num.negative === 0) { + res = this.neg().divmod(num, mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.iadd(num); + } + } + + return { + div: div, + mod: mod + }; + } + + if (this.negative === 0 && num.negative !== 0) { + res = this.divmod(num.neg(), mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + return { + div: div, + mod: res.mod + }; + } + + if ((this.negative & num.negative) !== 0) { + res = this.neg().divmod(num.neg(), mode); + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.isub(num); + } + } + + return { + div: res.div, + mod: mod + }; + } + + // Both numbers are positive at this point + + // Strip both numbers to approximate shift value + if (num.length > this.length || this.cmp(num) < 0) { + return { + div: new BN(0), + mod: this + }; + } + + // Very short reduction + if (num.length === 1) { + if (mode === 'div') { + return { + div: this.divn(num.words[0]), + mod: null + }; + } + + if (mode === 'mod') { + return { + div: null, + mod: new BN(this.modn(num.words[0])) + }; + } + + return { + div: this.divn(num.words[0]), + mod: new BN(this.modn(num.words[0])) + }; + } + + return this._wordDiv(num, mode); + }; + + // Find `this` / `num` + BN.prototype.div = function div (num) { + return this.divmod(num, 'div', false).div; + }; + + // Find `this` % `num` + BN.prototype.mod = function mod (num) { + return this.divmod(num, 'mod', false).mod; + }; + + BN.prototype.umod = function umod (num) { + return this.divmod(num, 'mod', true).mod; + }; + + // Find Round(`this` / `num`) + BN.prototype.divRound = function divRound (num) { + var dm = this.divmod(num); + + // Fast case - exact division + if (dm.mod.isZero()) return dm.div; + + var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; + + var half = num.ushrn(1); + var r2 = num.andln(1); + var cmp = mod.cmp(half); + + // Round down + if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; + + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); + }; + + BN.prototype.modn = function modn (num) { + assert(num <= 0x3ffffff); + var p = (1 << 26) % num; + + var acc = 0; + for (var i = this.length - 1; i >= 0; i--) { + acc = (p * acc + (this.words[i] | 0)) % num; + } + + return acc; + }; + + // In-place division by number + BN.prototype.idivn = function idivn (num) { + assert(num <= 0x3ffffff); + + var carry = 0; + for (var i = this.length - 1; i >= 0; i--) { + var w = (this.words[i] | 0) + carry * 0x4000000; + this.words[i] = (w / num) | 0; + carry = w % num; + } + + return this.strip(); + }; + + BN.prototype.divn = function divn (num) { + return this.clone().idivn(num); + }; + + BN.prototype.egcd = function egcd (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var x = this; + var y = p.clone(); + + if (x.negative !== 0) { + x = x.umod(p); + } else { + x = x.clone(); + } + + // A * x + B * y = x + var A = new BN(1); + var B = new BN(0); + + // C * x + D * y = y + var C = new BN(0); + var D = new BN(1); + + var g = 0; + + while (x.isEven() && y.isEven()) { + x.iushrn(1); + y.iushrn(1); + ++g; + } + + var yp = y.clone(); + var xp = x.clone(); + + while (!x.isZero()) { + for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + x.iushrn(i); + while (i-- > 0) { + if (A.isOdd() || B.isOdd()) { + A.iadd(yp); + B.isub(xp); + } + + A.iushrn(1); + B.iushrn(1); + } + } + + for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + y.iushrn(j); + while (j-- > 0) { + if (C.isOdd() || D.isOdd()) { + C.iadd(yp); + D.isub(xp); + } + + C.iushrn(1); + D.iushrn(1); + } + } + + if (x.cmp(y) >= 0) { + x.isub(y); + A.isub(C); + B.isub(D); + } else { + y.isub(x); + C.isub(A); + D.isub(B); + } + } + + return { + a: C, + b: D, + gcd: y.iushln(g) + }; + }; + + // This is reduced incarnation of the binary EEA + // above, designated to invert members of the + // _prime_ fields F(p) at a maximal speed + BN.prototype._invmp = function _invmp (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var a = this; + var b = p.clone(); + + if (a.negative !== 0) { + a = a.umod(p); + } else { + a = a.clone(); + } + + var x1 = new BN(1); + var x2 = new BN(0); + + var delta = b.clone(); + + while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { + for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + a.iushrn(i); + while (i-- > 0) { + if (x1.isOdd()) { + x1.iadd(delta); + } + + x1.iushrn(1); + } + } + + for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + b.iushrn(j); + while (j-- > 0) { + if (x2.isOdd()) { + x2.iadd(delta); + } + + x2.iushrn(1); + } + } + + if (a.cmp(b) >= 0) { + a.isub(b); + x1.isub(x2); + } else { + b.isub(a); + x2.isub(x1); + } + } + + var res; + if (a.cmpn(1) === 0) { + res = x1; + } else { + res = x2; + } + + if (res.cmpn(0) < 0) { + res.iadd(p); + } + + return res; + }; + + BN.prototype.gcd = function gcd (num) { + if (this.isZero()) return num.abs(); + if (num.isZero()) return this.abs(); + + var a = this.clone(); + var b = num.clone(); + a.negative = 0; + b.negative = 0; + + // Remove common factor of two + for (var shift = 0; a.isEven() && b.isEven(); shift++) { + a.iushrn(1); + b.iushrn(1); + } + + do { + while (a.isEven()) { + a.iushrn(1); + } + while (b.isEven()) { + b.iushrn(1); + } + + var r = a.cmp(b); + if (r < 0) { + // Swap `a` and `b` to make `a` always bigger than `b` + var t = a; + a = b; + b = t; + } else if (r === 0 || b.cmpn(1) === 0) { + break; + } + + a.isub(b); + } while (true); + + return b.iushln(shift); + }; + + // Invert number in the field F(num) + BN.prototype.invm = function invm (num) { + return this.egcd(num).a.umod(num); + }; + + BN.prototype.isEven = function isEven () { + return (this.words[0] & 1) === 0; + }; + + BN.prototype.isOdd = function isOdd () { + return (this.words[0] & 1) === 1; + }; + + // And first word and num + BN.prototype.andln = function andln (num) { + return this.words[0] & num; + }; + + // Increment at the bit position in-line + BN.prototype.bincn = function bincn (bit) { + assert(typeof bit === 'number'); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) { + this._expand(s + 1); + this.words[s] |= q; + return this; + } + + // Add bit and propagate, if needed + var carry = q; + for (var i = s; carry !== 0 && i < this.length; i++) { + var w = this.words[i] | 0; + w += carry; + carry = w >>> 26; + w &= 0x3ffffff; + this.words[i] = w; + } + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + return this; + }; + + BN.prototype.isZero = function isZero () { + return this.length === 1 && this.words[0] === 0; + }; + + BN.prototype.cmpn = function cmpn (num) { + var negative = num < 0; + + if (this.negative !== 0 && !negative) return -1; + if (this.negative === 0 && negative) return 1; + + this.strip(); + + var res; + if (this.length > 1) { + res = 1; + } else { + if (negative) { + num = -num; + } + + assert(num <= 0x3ffffff, 'Number is too big'); + + var w = this.words[0] | 0; + res = w === num ? 0 : w < num ? -1 : 1; + } + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Compare two numbers and return: + // 1 - if `this` > `num` + // 0 - if `this` == `num` + // -1 - if `this` < `num` + BN.prototype.cmp = function cmp (num) { + if (this.negative !== 0 && num.negative === 0) return -1; + if (this.negative === 0 && num.negative !== 0) return 1; + + var res = this.ucmp(num); + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Unsigned comparison + BN.prototype.ucmp = function ucmp (num) { + // At this point both numbers have the same sign + if (this.length > num.length) return 1; + if (this.length < num.length) return -1; + + var res = 0; + for (var i = this.length - 1; i >= 0; i--) { + var a = this.words[i] | 0; + var b = num.words[i] | 0; + + if (a === b) continue; + if (a < b) { + res = -1; + } else if (a > b) { + res = 1; + } + break; + } + return res; + }; + + BN.prototype.gtn = function gtn (num) { + return this.cmpn(num) === 1; + }; + + BN.prototype.gt = function gt (num) { + return this.cmp(num) === 1; + }; + + BN.prototype.gten = function gten (num) { + return this.cmpn(num) >= 0; + }; + + BN.prototype.gte = function gte (num) { + return this.cmp(num) >= 0; + }; + + BN.prototype.ltn = function ltn (num) { + return this.cmpn(num) === -1; + }; + + BN.prototype.lt = function lt (num) { + return this.cmp(num) === -1; + }; + + BN.prototype.lten = function lten (num) { + return this.cmpn(num) <= 0; + }; + + BN.prototype.lte = function lte (num) { + return this.cmp(num) <= 0; + }; + + BN.prototype.eqn = function eqn (num) { + return this.cmpn(num) === 0; + }; + + BN.prototype.eq = function eq (num) { + return this.cmp(num) === 0; + }; + + // + // A reduce context, could be using montgomery or something better, depending + // on the `m` itself. + // + BN.red = function red (num) { + return new Red(num); + }; + + BN.prototype.toRed = function toRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + assert(this.negative === 0, 'red works only with positives'); + return ctx.convertTo(this)._forceRed(ctx); + }; + + BN.prototype.fromRed = function fromRed () { + assert(this.red, 'fromRed works only with numbers in reduction context'); + return this.red.convertFrom(this); + }; + + BN.prototype._forceRed = function _forceRed (ctx) { + this.red = ctx; + return this; + }; + + BN.prototype.forceRed = function forceRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + return this._forceRed(ctx); + }; + + BN.prototype.redAdd = function redAdd (num) { + assert(this.red, 'redAdd works only with red numbers'); + return this.red.add(this, num); + }; + + BN.prototype.redIAdd = function redIAdd (num) { + assert(this.red, 'redIAdd works only with red numbers'); + return this.red.iadd(this, num); + }; + + BN.prototype.redSub = function redSub (num) { + assert(this.red, 'redSub works only with red numbers'); + return this.red.sub(this, num); + }; + + BN.prototype.redISub = function redISub (num) { + assert(this.red, 'redISub works only with red numbers'); + return this.red.isub(this, num); + }; + + BN.prototype.redShl = function redShl (num) { + assert(this.red, 'redShl works only with red numbers'); + return this.red.shl(this, num); + }; + + BN.prototype.redMul = function redMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.mul(this, num); + }; + + BN.prototype.redIMul = function redIMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.imul(this, num); + }; + + BN.prototype.redSqr = function redSqr () { + assert(this.red, 'redSqr works only with red numbers'); + this.red._verify1(this); + return this.red.sqr(this); + }; + + BN.prototype.redISqr = function redISqr () { + assert(this.red, 'redISqr works only with red numbers'); + this.red._verify1(this); + return this.red.isqr(this); + }; + + // Square root over p + BN.prototype.redSqrt = function redSqrt () { + assert(this.red, 'redSqrt works only with red numbers'); + this.red._verify1(this); + return this.red.sqrt(this); + }; + + BN.prototype.redInvm = function redInvm () { + assert(this.red, 'redInvm works only with red numbers'); + this.red._verify1(this); + return this.red.invm(this); + }; + + // Return negative clone of `this` % `red modulo` + BN.prototype.redNeg = function redNeg () { + assert(this.red, 'redNeg works only with red numbers'); + this.red._verify1(this); + return this.red.neg(this); + }; + + BN.prototype.redPow = function redPow (num) { + assert(this.red && !num.red, 'redPow(normalNum)'); + this.red._verify1(this); + return this.red.pow(this, num); + }; + + // Prime numbers with efficient reduction + var primes = { + k256: null, + p224: null, + p192: null, + p25519: null + }; + + // Pseudo-Mersenne prime + function MPrime (name, p) { + // P = 2 ^ N - K + this.name = name; + this.p = new BN(p, 16); + this.n = this.p.bitLength(); + this.k = new BN(1).iushln(this.n).isub(this.p); + + this.tmp = this._tmp(); + } + + MPrime.prototype._tmp = function _tmp () { + var tmp = new BN(null); + tmp.words = new Array(Math.ceil(this.n / 13)); + return tmp; + }; + + MPrime.prototype.ireduce = function ireduce (num) { + // Assumes that `num` is less than `P^2` + // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) + var r = num; + var rlen; + + do { + this.split(r, this.tmp); + r = this.imulK(r); + r = r.iadd(this.tmp); + rlen = r.bitLength(); + } while (rlen > this.n); + + var cmp = rlen < this.n ? -1 : r.ucmp(this.p); + if (cmp === 0) { + r.words[0] = 0; + r.length = 1; + } else if (cmp > 0) { + r.isub(this.p); + } else { + r.strip(); + } + + return r; + }; + + MPrime.prototype.split = function split (input, out) { + input.iushrn(this.n, 0, out); + }; + + MPrime.prototype.imulK = function imulK (num) { + return num.imul(this.k); + }; + + function K256 () { + MPrime.call( + this, + 'k256', + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + inherits(K256, MPrime); + + K256.prototype.split = function split (input, output) { + // 256 = 9 * 26 + 22 + var mask = 0x3fffff; + + var outLen = Math.min(input.length, 9); + for (var i = 0; i < outLen; i++) { + output.words[i] = input.words[i]; + } + output.length = outLen; + + if (input.length <= 9) { + input.words[0] = 0; + input.length = 1; + return; + } + + // Shift by 9 limbs + var prev = input.words[9]; + output.words[output.length++] = prev & mask; + + for (i = 10; i < input.length; i++) { + var next = input.words[i] | 0; + input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); + prev = next; + } + prev >>>= 22; + input.words[i - 10] = prev; + if (prev === 0 && input.length > 10) { + input.length -= 10; + } else { + input.length -= 9; + } + }; + + K256.prototype.imulK = function imulK (num) { + // K = 0x1000003d1 = [ 0x40, 0x3d1 ] + num.words[num.length] = 0; + num.words[num.length + 1] = 0; + num.length += 2; + + // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 + var lo = 0; + for (var i = 0; i < num.length; i++) { + var w = num.words[i] | 0; + lo += w * 0x3d1; + num.words[i] = lo & 0x3ffffff; + lo = w * 0x40 + ((lo / 0x4000000) | 0); + } + + // Fast length reduction + if (num.words[num.length - 1] === 0) { + num.length--; + if (num.words[num.length - 1] === 0) { + num.length--; + } + } + return num; + }; + + function P224 () { + MPrime.call( + this, + 'p224', + 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + inherits(P224, MPrime); + + function P192 () { + MPrime.call( + this, + 'p192', + 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + inherits(P192, MPrime); + + function P25519 () { + // 2 ^ 255 - 19 + MPrime.call( + this, + '25519', + '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + inherits(P25519, MPrime); + + P25519.prototype.imulK = function imulK (num) { + // K = 0x13 + var carry = 0; + for (var i = 0; i < num.length; i++) { + var hi = (num.words[i] | 0) * 0x13 + carry; + var lo = hi & 0x3ffffff; + hi >>>= 26; + + num.words[i] = lo; + carry = hi; + } + if (carry !== 0) { + num.words[num.length++] = carry; + } + return num; + }; + + // Exported mostly for testing purposes, use plain name instead + BN._prime = function prime (name) { + // Cached version of prime + if (primes[name]) return primes[name]; + + var prime; + if (name === 'k256') { + prime = new K256(); + } else if (name === 'p224') { + prime = new P224(); + } else if (name === 'p192') { + prime = new P192(); + } else if (name === 'p25519') { + prime = new P25519(); + } else { + throw new Error('Unknown prime ' + name); + } + primes[name] = prime; + + return prime; + }; + + // + // Base reduction engine + // + function Red (m) { + if (typeof m === 'string') { + var prime = BN._prime(m); + this.m = prime.p; + this.prime = prime; + } else { + assert(m.gtn(1), 'modulus must be greater than 1'); + this.m = m; + this.prime = null; + } + } + + Red.prototype._verify1 = function _verify1 (a) { + assert(a.negative === 0, 'red works only with positives'); + assert(a.red, 'red works only with red numbers'); + }; + + Red.prototype._verify2 = function _verify2 (a, b) { + assert((a.negative | b.negative) === 0, 'red works only with positives'); + assert(a.red && a.red === b.red, + 'red works only with red numbers'); + }; + + Red.prototype.imod = function imod (a) { + if (this.prime) return this.prime.ireduce(a)._forceRed(this); + return a.umod(this.m)._forceRed(this); + }; + + Red.prototype.neg = function neg (a) { + if (a.isZero()) { + return a.clone(); + } + + return this.m.sub(a)._forceRed(this); + }; + + Red.prototype.add = function add (a, b) { + this._verify2(a, b); + + var res = a.add(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.iadd = function iadd (a, b) { + this._verify2(a, b); + + var res = a.iadd(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res; + }; + + Red.prototype.sub = function sub (a, b) { + this._verify2(a, b); + + var res = a.sub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.isub = function isub (a, b) { + this._verify2(a, b); + + var res = a.isub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res; + }; + + Red.prototype.shl = function shl (a, num) { + this._verify1(a); + return this.imod(a.ushln(num)); + }; + + Red.prototype.imul = function imul (a, b) { + this._verify2(a, b); + return this.imod(a.imul(b)); + }; + + Red.prototype.mul = function mul (a, b) { + this._verify2(a, b); + return this.imod(a.mul(b)); + }; + + Red.prototype.isqr = function isqr (a) { + return this.imul(a, a.clone()); + }; + + Red.prototype.sqr = function sqr (a) { + return this.mul(a, a); + }; + + Red.prototype.sqrt = function sqrt (a) { + if (a.isZero()) return a.clone(); + + var mod3 = this.m.andln(3); + assert(mod3 % 2 === 1); + + // Fast case + if (mod3 === 3) { + var pow = this.m.add(new BN(1)).iushrn(2); + return this.pow(a, pow); + } + + // Tonelli-Shanks algorithm (Totally unoptimized and slow) + // + // Find Q and S, that Q * 2 ^ S = (P - 1) + var q = this.m.subn(1); + var s = 0; + while (!q.isZero() && q.andln(1) === 0) { + s++; + q.iushrn(1); + } + assert(!q.isZero()); + + var one = new BN(1).toRed(this); + var nOne = one.redNeg(); + + // Find quadratic non-residue + // NOTE: Max is such because of generalized Riemann hypothesis. + var lpow = this.m.subn(1).iushrn(1); + var z = this.m.bitLength(); + z = new BN(2 * z * z).toRed(this); + + while (this.pow(z, lpow).cmp(nOne) !== 0) { + z.redIAdd(nOne); + } + + var c = this.pow(z, q); + var r = this.pow(a, q.addn(1).iushrn(1)); + var t = this.pow(a, q); + var m = s; + while (t.cmp(one) !== 0) { + var tmp = t; + for (var i = 0; tmp.cmp(one) !== 0; i++) { + tmp = tmp.redSqr(); + } + assert(i < m); + var b = this.pow(c, new BN(1).iushln(m - i - 1)); + + r = r.redMul(b); + c = b.redSqr(); + t = t.redMul(c); + m = i; + } + + return r; + }; + + Red.prototype.invm = function invm (a) { + var inv = a._invmp(this.m); + if (inv.negative !== 0) { + inv.negative = 0; + return this.imod(inv).redNeg(); + } else { + return this.imod(inv); + } + }; + + Red.prototype.pow = function pow (a, num) { + if (num.isZero()) return new BN(1); + if (num.cmpn(1) === 0) return a.clone(); + + var windowSize = 4; + var wnd = new Array(1 << windowSize); + wnd[0] = new BN(1).toRed(this); + wnd[1] = a; + for (var i = 2; i < wnd.length; i++) { + wnd[i] = this.mul(wnd[i - 1], a); + } + + var res = wnd[0]; + var current = 0; + var currentLen = 0; + var start = num.bitLength() % 26; + if (start === 0) { + start = 26; + } + + for (i = num.length - 1; i >= 0; i--) { + var word = num.words[i]; + for (var j = start - 1; j >= 0; j--) { + var bit = (word >> j) & 1; + if (res !== wnd[0]) { + res = this.sqr(res); + } + + if (bit === 0 && current === 0) { + currentLen = 0; + continue; + } + + current <<= 1; + current |= bit; + currentLen++; + if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; + + res = this.mul(res, wnd[current]); + currentLen = 0; + current = 0; + } + start = 26; + } + + return res; + }; + + Red.prototype.convertTo = function convertTo (num) { + var r = num.umod(this.m); + + return r === num ? r.clone() : r; + }; + + Red.prototype.convertFrom = function convertFrom (num) { + var res = num.clone(); + res.red = null; + return res; + }; + + // + // Montgomery method engine + // + + BN.mont = function mont (num) { + return new Mont(num); + }; + + function Mont (m) { + Red.call(this, m); + + this.shift = this.m.bitLength(); + if (this.shift % 26 !== 0) { + this.shift += 26 - (this.shift % 26); + } + + this.r = new BN(1).iushln(this.shift); + this.r2 = this.imod(this.r.sqr()); + this.rinv = this.r._invmp(this.m); + + this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); + this.minv = this.minv.umod(this.r); + this.minv = this.r.sub(this.minv); + } + inherits(Mont, Red); + + Mont.prototype.convertTo = function convertTo (num) { + return this.imod(num.ushln(this.shift)); + }; + + Mont.prototype.convertFrom = function convertFrom (num) { + var r = this.imod(num.mul(this.rinv)); + r.red = null; + return r; + }; + + Mont.prototype.imul = function imul (a, b) { + if (a.isZero() || b.isZero()) { + a.words[0] = 0; + a.length = 1; + return a; + } + + var t = a.imul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.mul = function mul (a, b) { + if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); + + var t = a.mul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.invm = function invm (a) { + // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R + var res = this.imod(a._invmp(this.m).mul(this.r2)); + return res._forceRed(this); + }; +})(typeof module === 'undefined' || module, this); + +},{}],20:[function(require,module,exports){ +var r; + +module.exports = function rand(len) { + if (!r) + r = new Rand(null); + + return r.generate(len); +}; + +function Rand(rand) { + this.rand = rand; +} +module.exports.Rand = Rand; + +Rand.prototype.generate = function generate(len) { + return this._rand(len); +}; + +if (typeof window === 'object') { + if (window.crypto && window.crypto.getRandomValues) { + // Modern browsers + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + window.crypto.getRandomValues(arr); + return arr; + }; + } else if (window.msCrypto && window.msCrypto.getRandomValues) { + // IE + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + window.msCrypto.getRandomValues(arr); + return arr; + }; + } else { + // Old junk + Rand.prototype._rand = function() { + throw new Error('Not implemented yet'); + }; + } +} else { + // Node.js or Web worker + try { + var crypto = require('crypto'); + + Rand.prototype._rand = function _rand(n) { + return crypto.randomBytes(n); + }; + } catch (e) { + // Emulate crypto API using randy + Rand.prototype._rand = function _rand(n) { + var res = new Uint8Array(n); + for (var i = 0; i < res.length; i++) + res[i] = this.rand.getByte(); + return res; + }; + } +} + +},{"crypto":21}],21:[function(require,module,exports){ + +},{}],22:[function(require,module,exports){ +(function (Buffer){ +// based on the aes implimentation in triple sec +// https://github.com/keybase/triplesec + +// which is in turn based on the one from crypto-js +// https://code.google.com/p/crypto-js/ + +var uint_max = Math.pow(2, 32) +function fixup_uint32 (x) { + var ret, x_pos + ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x + return ret +} +function scrub_vec (v) { + for (var i = 0; i < v.length; v++) { + v[i] = 0 + } + return false +} + +function Global () { + this.SBOX = [] + this.INV_SBOX = [] + this.SUB_MIX = [[], [], [], []] + this.INV_SUB_MIX = [[], [], [], []] + this.init() + this.RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36] +} + +Global.prototype.init = function () { + var d, i, sx, t, x, x2, x4, x8, xi, _i + d = (function () { + var _i, _results + _results = [] + for (i = _i = 0; _i < 256; i = ++_i) { + if (i < 128) { + _results.push(i << 1) + } else { + _results.push((i << 1) ^ 0x11b) + } + } + return _results + })() + x = 0 + xi = 0 + for (i = _i = 0; _i < 256; i = ++_i) { + sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4) + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63 + this.SBOX[x] = sx + this.INV_SBOX[sx] = x + x2 = d[x] + x4 = d[x2] + x8 = d[x4] + t = (d[sx] * 0x101) ^ (sx * 0x1010100) + this.SUB_MIX[0][x] = (t << 24) | (t >>> 8) + this.SUB_MIX[1][x] = (t << 16) | (t >>> 16) + this.SUB_MIX[2][x] = (t << 8) | (t >>> 24) + this.SUB_MIX[3][x] = t + t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100) + this.INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8) + this.INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16) + this.INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24) + this.INV_SUB_MIX[3][sx] = t + if (x === 0) { + x = xi = 1 + } else { + x = x2 ^ d[d[d[x8 ^ x2]]] + xi ^= d[d[xi]] + } + } + return true +} + +var G = new Global() + +AES.blockSize = 4 * 4 + +AES.prototype.blockSize = AES.blockSize + +AES.keySize = 256 / 8 + +AES.prototype.keySize = AES.keySize + +function bufferToArray (buf) { + var len = buf.length / 4 + var out = new Array(len) + var i = -1 + while (++i < len) { + out[i] = buf.readUInt32BE(i * 4) + } + return out +} +function AES (key) { + this._key = bufferToArray(key) + this._doReset() +} + +AES.prototype._doReset = function () { + var invKsRow, keySize, keyWords, ksRow, ksRows, t + keyWords = this._key + keySize = keyWords.length + this._nRounds = keySize + 6 + ksRows = (this._nRounds + 1) * 4 + this._keySchedule = [] + for (ksRow = 0; ksRow < ksRows; ksRow++) { + this._keySchedule[ksRow] = ksRow < keySize ? keyWords[ksRow] : (t = this._keySchedule[ksRow - 1], (ksRow % keySize) === 0 ? (t = (t << 8) | (t >>> 24), t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff], t ^= G.RCON[(ksRow / keySize) | 0] << 24) : keySize > 6 && ksRow % keySize === 4 ? t = (G.SBOX[t >>> 24] << 24) | (G.SBOX[(t >>> 16) & 0xff] << 16) | (G.SBOX[(t >>> 8) & 0xff] << 8) | G.SBOX[t & 0xff] : void 0, this._keySchedule[ksRow - keySize] ^ t) + } + this._invKeySchedule = [] + for (invKsRow = 0; invKsRow < ksRows; invKsRow++) { + ksRow = ksRows - invKsRow + t = this._keySchedule[ksRow - (invKsRow % 4 ? 0 : 4)] + this._invKeySchedule[invKsRow] = invKsRow < 4 || ksRow <= 4 ? t : G.INV_SUB_MIX[0][G.SBOX[t >>> 24]] ^ G.INV_SUB_MIX[1][G.SBOX[(t >>> 16) & 0xff]] ^ G.INV_SUB_MIX[2][G.SBOX[(t >>> 8) & 0xff]] ^ G.INV_SUB_MIX[3][G.SBOX[t & 0xff]] + } + return true +} + +AES.prototype.encryptBlock = function (M) { + M = bufferToArray(new Buffer(M)) + var out = this._doCryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX) + var buf = new Buffer(16) + buf.writeUInt32BE(out[0], 0) + buf.writeUInt32BE(out[1], 4) + buf.writeUInt32BE(out[2], 8) + buf.writeUInt32BE(out[3], 12) + return buf +} + +AES.prototype.decryptBlock = function (M) { + M = bufferToArray(new Buffer(M)) + var temp = [M[3], M[1]] + M[1] = temp[0] + M[3] = temp[1] + var out = this._doCryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX) + var buf = new Buffer(16) + buf.writeUInt32BE(out[0], 0) + buf.writeUInt32BE(out[3], 4) + buf.writeUInt32BE(out[2], 8) + buf.writeUInt32BE(out[1], 12) + return buf +} + +AES.prototype.scrub = function () { + scrub_vec(this._keySchedule) + scrub_vec(this._invKeySchedule) + scrub_vec(this._key) +} + +AES.prototype._doCryptBlock = function (M, keySchedule, SUB_MIX, SBOX) { + var ksRow, s0, s1, s2, s3, t0, t1, t2, t3 + + s0 = M[0] ^ keySchedule[0] + s1 = M[1] ^ keySchedule[1] + s2 = M[2] ^ keySchedule[2] + s3 = M[3] ^ keySchedule[3] + ksRow = 4 + for (var round = 1; round < this._nRounds; round++) { + t0 = SUB_MIX[0][s0 >>> 24] ^ SUB_MIX[1][(s1 >>> 16) & 0xff] ^ SUB_MIX[2][(s2 >>> 8) & 0xff] ^ SUB_MIX[3][s3 & 0xff] ^ keySchedule[ksRow++] + t1 = SUB_MIX[0][s1 >>> 24] ^ SUB_MIX[1][(s2 >>> 16) & 0xff] ^ SUB_MIX[2][(s3 >>> 8) & 0xff] ^ SUB_MIX[3][s0 & 0xff] ^ keySchedule[ksRow++] + t2 = SUB_MIX[0][s2 >>> 24] ^ SUB_MIX[1][(s3 >>> 16) & 0xff] ^ SUB_MIX[2][(s0 >>> 8) & 0xff] ^ SUB_MIX[3][s1 & 0xff] ^ keySchedule[ksRow++] + t3 = SUB_MIX[0][s3 >>> 24] ^ SUB_MIX[1][(s0 >>> 16) & 0xff] ^ SUB_MIX[2][(s1 >>> 8) & 0xff] ^ SUB_MIX[3][s2 & 0xff] ^ keySchedule[ksRow++] + s0 = t0 + s1 = t1 + s2 = t2 + s3 = t3 + } + t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++] + t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++] + t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++] + t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++] + return [ + fixup_uint32(t0), + fixup_uint32(t1), + fixup_uint32(t2), + fixup_uint32(t3) + ] +} + +exports.AES = AES + +}).call(this,require("buffer").Buffer) +},{"buffer":49}],23:[function(require,module,exports){ +(function (Buffer){ +var aes = require('./aes') +var Transform = require('cipher-base') +var inherits = require('inherits') +var GHASH = require('./ghash') +var xor = require('buffer-xor') +inherits(StreamCipher, Transform) +module.exports = StreamCipher + +function StreamCipher (mode, key, iv, decrypt) { + if (!(this instanceof StreamCipher)) { + return new StreamCipher(mode, key, iv) + } + Transform.call(this) + this._finID = Buffer.concat([iv, new Buffer([0, 0, 0, 1])]) + iv = Buffer.concat([iv, new Buffer([0, 0, 0, 2])]) + this._cipher = new aes.AES(key) + this._prev = new Buffer(iv.length) + this._cache = new Buffer('') + this._secCache = new Buffer('') + this._decrypt = decrypt + this._alen = 0 + this._len = 0 + iv.copy(this._prev) + this._mode = mode + var h = new Buffer(4) + h.fill(0) + this._ghash = new GHASH(this._cipher.encryptBlock(h)) + this._authTag = null + this._called = false +} +StreamCipher.prototype._update = function (chunk) { + if (!this._called && this._alen) { + var rump = 16 - (this._alen % 16) + if (rump < 16) { + rump = new Buffer(rump) + rump.fill(0) + this._ghash.update(rump) + } + } + this._called = true + var out = this._mode.encrypt(this, chunk) + if (this._decrypt) { + this._ghash.update(chunk) + } else { + this._ghash.update(out) + } + this._len += chunk.length + return out +} +StreamCipher.prototype._final = function () { + if (this._decrypt && !this._authTag) { + throw new Error('Unsupported state or unable to authenticate data') + } + var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)) + if (this._decrypt) { + if (xorTest(tag, this._authTag)) { + throw new Error('Unsupported state or unable to authenticate data') + } + } else { + this._authTag = tag + } + this._cipher.scrub() +} +StreamCipher.prototype.getAuthTag = function getAuthTag () { + if (!this._decrypt && Buffer.isBuffer(this._authTag)) { + return this._authTag + } else { + throw new Error('Attempting to get auth tag in unsupported state') + } +} +StreamCipher.prototype.setAuthTag = function setAuthTag (tag) { + if (this._decrypt) { + this._authTag = tag + } else { + throw new Error('Attempting to set auth tag in unsupported state') + } +} +StreamCipher.prototype.setAAD = function setAAD (buf) { + if (!this._called) { + this._ghash.update(buf) + this._alen += buf.length + } else { + throw new Error('Attempting to set AAD in unsupported state') + } +} +function xorTest (a, b) { + var out = 0 + if (a.length !== b.length) { + out++ + } + var len = Math.min(a.length, b.length) + var i = -1 + while (++i < len) { + out += (a[i] ^ b[i]) + } + return out +} + +}).call(this,require("buffer").Buffer) +},{"./aes":22,"./ghash":27,"buffer":49,"buffer-xor":48,"cipher-base":52,"inherits":97}],24:[function(require,module,exports){ +var ciphers = require('./encrypter') +exports.createCipher = exports.Cipher = ciphers.createCipher +exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv +var deciphers = require('./decrypter') +exports.createDecipher = exports.Decipher = deciphers.createDecipher +exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv +var modes = require('./modes') +function getCiphers () { + return Object.keys(modes) +} +exports.listCiphers = exports.getCiphers = getCiphers + +},{"./decrypter":25,"./encrypter":26,"./modes":28}],25:[function(require,module,exports){ +(function (Buffer){ +var aes = require('./aes') +var Transform = require('cipher-base') +var inherits = require('inherits') +var modes = require('./modes') +var StreamCipher = require('./streamCipher') +var AuthCipher = require('./authCipher') +var ebtk = require('evp_bytestokey') + +inherits(Decipher, Transform) +function Decipher (mode, key, iv) { + if (!(this instanceof Decipher)) { + return new Decipher(mode, key, iv) + } + Transform.call(this) + this._cache = new Splitter() + this._last = void 0 + this._cipher = new aes.AES(key) + this._prev = new Buffer(iv.length) + iv.copy(this._prev) + this._mode = mode + this._autopadding = true +} +Decipher.prototype._update = function (data) { + this._cache.add(data) + var chunk + var thing + var out = [] + while ((chunk = this._cache.get(this._autopadding))) { + thing = this._mode.decrypt(this, chunk) + out.push(thing) + } + return Buffer.concat(out) +} +Decipher.prototype._final = function () { + var chunk = this._cache.flush() + if (this._autopadding) { + return unpad(this._mode.decrypt(this, chunk)) + } else if (chunk) { + throw new Error('data not multiple of block length') + } +} +Decipher.prototype.setAutoPadding = function (setTo) { + this._autopadding = !!setTo + return this +} +function Splitter () { + if (!(this instanceof Splitter)) { + return new Splitter() + } + this.cache = new Buffer('') +} +Splitter.prototype.add = function (data) { + this.cache = Buffer.concat([this.cache, data]) +} + +Splitter.prototype.get = function (autoPadding) { + var out + if (autoPadding) { + if (this.cache.length > 16) { + out = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + return out + } + } else { + if (this.cache.length >= 16) { + out = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + return out + } + } + return null +} +Splitter.prototype.flush = function () { + if (this.cache.length) { + return this.cache + } +} +function unpad (last) { + var padded = last[15] + var i = -1 + while (++i < padded) { + if (last[(i + (16 - padded))] !== padded) { + throw new Error('unable to decrypt data') + } + } + if (padded === 16) { + return + } + return last.slice(0, 16 - padded) +} + +var modelist = { + ECB: require('./modes/ecb'), + CBC: require('./modes/cbc'), + CFB: require('./modes/cfb'), + CFB8: require('./modes/cfb8'), + CFB1: require('./modes/cfb1'), + OFB: require('./modes/ofb'), + CTR: require('./modes/ctr'), + GCM: require('./modes/ctr') +} + +function createDecipheriv (suite, password, iv) { + var config = modes[suite.toLowerCase()] + if (!config) { + throw new TypeError('invalid suite type') + } + if (typeof iv === 'string') { + iv = new Buffer(iv) + } + if (typeof password === 'string') { + password = new Buffer(password) + } + if (password.length !== config.key / 8) { + throw new TypeError('invalid key length ' + password.length) + } + if (iv.length !== config.iv) { + throw new TypeError('invalid iv length ' + iv.length) + } + if (config.type === 'stream') { + return new StreamCipher(modelist[config.mode], password, iv, true) + } else if (config.type === 'auth') { + return new AuthCipher(modelist[config.mode], password, iv, true) + } + return new Decipher(modelist[config.mode], password, iv) +} + +function createDecipher (suite, password) { + var config = modes[suite.toLowerCase()] + if (!config) { + throw new TypeError('invalid suite type') + } + var keys = ebtk(password, false, config.key, config.iv) + return createDecipheriv(suite, keys.key, keys.iv) +} +exports.createDecipher = createDecipher +exports.createDecipheriv = createDecipheriv + +}).call(this,require("buffer").Buffer) +},{"./aes":22,"./authCipher":23,"./modes":28,"./modes/cbc":29,"./modes/cfb":30,"./modes/cfb1":31,"./modes/cfb8":32,"./modes/ctr":33,"./modes/ecb":34,"./modes/ofb":35,"./streamCipher":36,"buffer":49,"cipher-base":52,"evp_bytestokey":88,"inherits":97}],26:[function(require,module,exports){ +(function (Buffer){ +var aes = require('./aes') +var Transform = require('cipher-base') +var inherits = require('inherits') +var modes = require('./modes') +var ebtk = require('evp_bytestokey') +var StreamCipher = require('./streamCipher') +var AuthCipher = require('./authCipher') +inherits(Cipher, Transform) +function Cipher (mode, key, iv) { + if (!(this instanceof Cipher)) { + return new Cipher(mode, key, iv) + } + Transform.call(this) + this._cache = new Splitter() + this._cipher = new aes.AES(key) + this._prev = new Buffer(iv.length) + iv.copy(this._prev) + this._mode = mode + this._autopadding = true +} +Cipher.prototype._update = function (data) { + this._cache.add(data) + var chunk + var thing + var out = [] + while ((chunk = this._cache.get())) { + thing = this._mode.encrypt(this, chunk) + out.push(thing) + } + return Buffer.concat(out) +} +Cipher.prototype._final = function () { + var chunk = this._cache.flush() + if (this._autopadding) { + chunk = this._mode.encrypt(this, chunk) + this._cipher.scrub() + return chunk + } else if (chunk.toString('hex') !== '10101010101010101010101010101010') { + this._cipher.scrub() + throw new Error('data not multiple of block length') + } +} +Cipher.prototype.setAutoPadding = function (setTo) { + this._autopadding = !!setTo + return this +} + +function Splitter () { + if (!(this instanceof Splitter)) { + return new Splitter() + } + this.cache = new Buffer('') +} +Splitter.prototype.add = function (data) { + this.cache = Buffer.concat([this.cache, data]) +} + +Splitter.prototype.get = function () { + if (this.cache.length > 15) { + var out = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + return out + } + return null +} +Splitter.prototype.flush = function () { + var len = 16 - this.cache.length + var padBuff = new Buffer(len) + + var i = -1 + while (++i < len) { + padBuff.writeUInt8(len, i) + } + var out = Buffer.concat([this.cache, padBuff]) + return out +} +var modelist = { + ECB: require('./modes/ecb'), + CBC: require('./modes/cbc'), + CFB: require('./modes/cfb'), + CFB8: require('./modes/cfb8'), + CFB1: require('./modes/cfb1'), + OFB: require('./modes/ofb'), + CTR: require('./modes/ctr'), + GCM: require('./modes/ctr') +} + +function createCipheriv (suite, password, iv) { + var config = modes[suite.toLowerCase()] + if (!config) { + throw new TypeError('invalid suite type') + } + if (typeof iv === 'string') { + iv = new Buffer(iv) + } + if (typeof password === 'string') { + password = new Buffer(password) + } + if (password.length !== config.key / 8) { + throw new TypeError('invalid key length ' + password.length) + } + if (iv.length !== config.iv) { + throw new TypeError('invalid iv length ' + iv.length) + } + if (config.type === 'stream') { + return new StreamCipher(modelist[config.mode], password, iv) + } else if (config.type === 'auth') { + return new AuthCipher(modelist[config.mode], password, iv) + } + return new Cipher(modelist[config.mode], password, iv) +} +function createCipher (suite, password) { + var config = modes[suite.toLowerCase()] + if (!config) { + throw new TypeError('invalid suite type') + } + var keys = ebtk(password, false, config.key, config.iv) + return createCipheriv(suite, keys.key, keys.iv) +} + +exports.createCipheriv = createCipheriv +exports.createCipher = createCipher + +}).call(this,require("buffer").Buffer) +},{"./aes":22,"./authCipher":23,"./modes":28,"./modes/cbc":29,"./modes/cfb":30,"./modes/cfb1":31,"./modes/cfb8":32,"./modes/ctr":33,"./modes/ecb":34,"./modes/ofb":35,"./streamCipher":36,"buffer":49,"cipher-base":52,"evp_bytestokey":88,"inherits":97}],27:[function(require,module,exports){ +(function (Buffer){ +var zeros = new Buffer(16) +zeros.fill(0) +module.exports = GHASH +function GHASH (key) { + this.h = key + this.state = new Buffer(16) + this.state.fill(0) + this.cache = new Buffer('') +} +// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html +// by Juho Vähä-Herttua +GHASH.prototype.ghash = function (block) { + var i = -1 + while (++i < block.length) { + this.state[i] ^= block[i] + } + this._multiply() +} + +GHASH.prototype._multiply = function () { + var Vi = toArray(this.h) + var Zi = [0, 0, 0, 0] + var j, xi, lsb_Vi + var i = -1 + while (++i < 128) { + xi = (this.state[~~(i / 8)] & (1 << (7 - i % 8))) !== 0 + if (xi) { + // Z_i+1 = Z_i ^ V_i + Zi = xor(Zi, Vi) + } + + // Store the value of LSB(V_i) + lsb_Vi = (Vi[3] & 1) !== 0 + + // V_i+1 = V_i >> 1 + for (j = 3; j > 0; j--) { + Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31) + } + Vi[0] = Vi[0] >>> 1 + + // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R + if (lsb_Vi) { + Vi[0] = Vi[0] ^ (0xe1 << 24) + } + } + this.state = fromArray(Zi) +} +GHASH.prototype.update = function (buf) { + this.cache = Buffer.concat([this.cache, buf]) + var chunk + while (this.cache.length >= 16) { + chunk = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + this.ghash(chunk) + } +} +GHASH.prototype.final = function (abl, bl) { + if (this.cache.length) { + this.ghash(Buffer.concat([this.cache, zeros], 16)) + } + this.ghash(fromArray([ + 0, abl, + 0, bl + ])) + return this.state +} + +function toArray (buf) { + return [ + buf.readUInt32BE(0), + buf.readUInt32BE(4), + buf.readUInt32BE(8), + buf.readUInt32BE(12) + ] +} +function fromArray (out) { + out = out.map(fixup_uint32) + var buf = new Buffer(16) + buf.writeUInt32BE(out[0], 0) + buf.writeUInt32BE(out[1], 4) + buf.writeUInt32BE(out[2], 8) + buf.writeUInt32BE(out[3], 12) + return buf +} +var uint_max = Math.pow(2, 32) +function fixup_uint32 (x) { + var ret, x_pos + ret = x > uint_max || x < 0 ? (x_pos = Math.abs(x) % uint_max, x < 0 ? uint_max - x_pos : x_pos) : x + return ret +} +function xor (a, b) { + return [ + a[0] ^ b[0], + a[1] ^ b[1], + a[2] ^ b[2], + a[3] ^ b[3] + ] +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49}],28:[function(require,module,exports){ +exports['aes-128-ecb'] = { + cipher: 'AES', + key: 128, + iv: 0, + mode: 'ECB', + type: 'block' +} +exports['aes-192-ecb'] = { + cipher: 'AES', + key: 192, + iv: 0, + mode: 'ECB', + type: 'block' +} +exports['aes-256-ecb'] = { + cipher: 'AES', + key: 256, + iv: 0, + mode: 'ECB', + type: 'block' +} +exports['aes-128-cbc'] = { + cipher: 'AES', + key: 128, + iv: 16, + mode: 'CBC', + type: 'block' +} +exports['aes-192-cbc'] = { + cipher: 'AES', + key: 192, + iv: 16, + mode: 'CBC', + type: 'block' +} +exports['aes-256-cbc'] = { + cipher: 'AES', + key: 256, + iv: 16, + mode: 'CBC', + type: 'block' +} +exports['aes128'] = exports['aes-128-cbc'] +exports['aes192'] = exports['aes-192-cbc'] +exports['aes256'] = exports['aes-256-cbc'] +exports['aes-128-cfb'] = { + cipher: 'AES', + key: 128, + iv: 16, + mode: 'CFB', + type: 'stream' +} +exports['aes-192-cfb'] = { + cipher: 'AES', + key: 192, + iv: 16, + mode: 'CFB', + type: 'stream' +} +exports['aes-256-cfb'] = { + cipher: 'AES', + key: 256, + iv: 16, + mode: 'CFB', + type: 'stream' +} +exports['aes-128-cfb8'] = { + cipher: 'AES', + key: 128, + iv: 16, + mode: 'CFB8', + type: 'stream' +} +exports['aes-192-cfb8'] = { + cipher: 'AES', + key: 192, + iv: 16, + mode: 'CFB8', + type: 'stream' +} +exports['aes-256-cfb8'] = { + cipher: 'AES', + key: 256, + iv: 16, + mode: 'CFB8', + type: 'stream' +} +exports['aes-128-cfb1'] = { + cipher: 'AES', + key: 128, + iv: 16, + mode: 'CFB1', + type: 'stream' +} +exports['aes-192-cfb1'] = { + cipher: 'AES', + key: 192, + iv: 16, + mode: 'CFB1', + type: 'stream' +} +exports['aes-256-cfb1'] = { + cipher: 'AES', + key: 256, + iv: 16, + mode: 'CFB1', + type: 'stream' +} +exports['aes-128-ofb'] = { + cipher: 'AES', + key: 128, + iv: 16, + mode: 'OFB', + type: 'stream' +} +exports['aes-192-ofb'] = { + cipher: 'AES', + key: 192, + iv: 16, + mode: 'OFB', + type: 'stream' +} +exports['aes-256-ofb'] = { + cipher: 'AES', + key: 256, + iv: 16, + mode: 'OFB', + type: 'stream' +} +exports['aes-128-ctr'] = { + cipher: 'AES', + key: 128, + iv: 16, + mode: 'CTR', + type: 'stream' +} +exports['aes-192-ctr'] = { + cipher: 'AES', + key: 192, + iv: 16, + mode: 'CTR', + type: 'stream' +} +exports['aes-256-ctr'] = { + cipher: 'AES', + key: 256, + iv: 16, + mode: 'CTR', + type: 'stream' +} +exports['aes-128-gcm'] = { + cipher: 'AES', + key: 128, + iv: 12, + mode: 'GCM', + type: 'auth' +} +exports['aes-192-gcm'] = { + cipher: 'AES', + key: 192, + iv: 12, + mode: 'GCM', + type: 'auth' +} +exports['aes-256-gcm'] = { + cipher: 'AES', + key: 256, + iv: 12, + mode: 'GCM', + type: 'auth' +} + +},{}],29:[function(require,module,exports){ +var xor = require('buffer-xor') + +exports.encrypt = function (self, block) { + var data = xor(block, self._prev) + + self._prev = self._cipher.encryptBlock(data) + return self._prev +} + +exports.decrypt = function (self, block) { + var pad = self._prev + + self._prev = block + var out = self._cipher.decryptBlock(block) + + return xor(out, pad) +} + +},{"buffer-xor":48}],30:[function(require,module,exports){ +(function (Buffer){ +var xor = require('buffer-xor') + +exports.encrypt = function (self, data, decrypt) { + var out = new Buffer('') + var len + + while (data.length) { + if (self._cache.length === 0) { + self._cache = self._cipher.encryptBlock(self._prev) + self._prev = new Buffer('') + } + + if (self._cache.length <= data.length) { + len = self._cache.length + out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)]) + data = data.slice(len) + } else { + out = Buffer.concat([out, encryptStart(self, data, decrypt)]) + break + } + } + + return out +} +function encryptStart (self, data, decrypt) { + var len = data.length + var out = xor(data, self._cache) + self._cache = self._cache.slice(len) + self._prev = Buffer.concat([self._prev, decrypt ? data : out]) + return out +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49,"buffer-xor":48}],31:[function(require,module,exports){ +(function (Buffer){ +function encryptByte (self, byteParam, decrypt) { + var pad + var i = -1 + var len = 8 + var out = 0 + var bit, value + while (++i < len) { + pad = self._cipher.encryptBlock(self._prev) + bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0 + value = pad[0] ^ bit + out += ((value & 0x80) >> (i % 8)) + self._prev = shiftIn(self._prev, decrypt ? bit : value) + } + return out +} +exports.encrypt = function (self, chunk, decrypt) { + var len = chunk.length + var out = new Buffer(len) + var i = -1 + while (++i < len) { + out[i] = encryptByte(self, chunk[i], decrypt) + } + return out +} +function shiftIn (buffer, value) { + var len = buffer.length + var i = -1 + var out = new Buffer(buffer.length) + buffer = Buffer.concat([buffer, new Buffer([value])]) + while (++i < len) { + out[i] = buffer[i] << 1 | buffer[i + 1] >> (7) + } + return out +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49}],32:[function(require,module,exports){ +(function (Buffer){ +function encryptByte (self, byteParam, decrypt) { + var pad = self._cipher.encryptBlock(self._prev) + var out = pad[0] ^ byteParam + self._prev = Buffer.concat([self._prev.slice(1), new Buffer([decrypt ? byteParam : out])]) + return out +} +exports.encrypt = function (self, chunk, decrypt) { + var len = chunk.length + var out = new Buffer(len) + var i = -1 + while (++i < len) { + out[i] = encryptByte(self, chunk[i], decrypt) + } + return out +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49}],33:[function(require,module,exports){ +(function (Buffer){ +var xor = require('buffer-xor') + +function incr32 (iv) { + var len = iv.length + var item + while (len--) { + item = iv.readUInt8(len) + if (item === 255) { + iv.writeUInt8(0, len) + } else { + item++ + iv.writeUInt8(item, len) + break + } + } +} + +function getBlock (self) { + var out = self._cipher.encryptBlock(self._prev) + incr32(self._prev) + return out +} + +exports.encrypt = function (self, chunk) { + while (self._cache.length < chunk.length) { + self._cache = Buffer.concat([self._cache, getBlock(self)]) + } + var pad = self._cache.slice(0, chunk.length) + self._cache = self._cache.slice(chunk.length) + return xor(chunk, pad) +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49,"buffer-xor":48}],34:[function(require,module,exports){ +exports.encrypt = function (self, block) { + return self._cipher.encryptBlock(block) +} +exports.decrypt = function (self, block) { + return self._cipher.decryptBlock(block) +} + +},{}],35:[function(require,module,exports){ +(function (Buffer){ +var xor = require('buffer-xor') + +function getBlock (self) { + self._prev = self._cipher.encryptBlock(self._prev) + return self._prev +} + +exports.encrypt = function (self, chunk) { + while (self._cache.length < chunk.length) { + self._cache = Buffer.concat([self._cache, getBlock(self)]) + } + + var pad = self._cache.slice(0, chunk.length) + self._cache = self._cache.slice(chunk.length) + return xor(chunk, pad) +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49,"buffer-xor":48}],36:[function(require,module,exports){ +(function (Buffer){ +var aes = require('./aes') +var Transform = require('cipher-base') +var inherits = require('inherits') + +inherits(StreamCipher, Transform) +module.exports = StreamCipher +function StreamCipher (mode, key, iv, decrypt) { + if (!(this instanceof StreamCipher)) { + return new StreamCipher(mode, key, iv) + } + Transform.call(this) + this._cipher = new aes.AES(key) + this._prev = new Buffer(iv.length) + this._cache = new Buffer('') + this._secCache = new Buffer('') + this._decrypt = decrypt + iv.copy(this._prev) + this._mode = mode +} +StreamCipher.prototype._update = function (chunk) { + return this._mode.encrypt(this, chunk, this._decrypt) +} +StreamCipher.prototype._final = function () { + this._cipher.scrub() +} + +}).call(this,require("buffer").Buffer) +},{"./aes":22,"buffer":49,"cipher-base":52,"inherits":97}],37:[function(require,module,exports){ +var ebtk = require('evp_bytestokey') +var aes = require('browserify-aes/browser') +var DES = require('browserify-des') +var desModes = require('browserify-des/modes') +var aesModes = require('browserify-aes/modes') +function createCipher (suite, password) { + var keyLen, ivLen + suite = suite.toLowerCase() + if (aesModes[suite]) { + keyLen = aesModes[suite].key + ivLen = aesModes[suite].iv + } else if (desModes[suite]) { + keyLen = desModes[suite].key * 8 + ivLen = desModes[suite].iv + } else { + throw new TypeError('invalid suite type') + } + var keys = ebtk(password, false, keyLen, ivLen) + return createCipheriv(suite, keys.key, keys.iv) +} +function createDecipher (suite, password) { + var keyLen, ivLen + suite = suite.toLowerCase() + if (aesModes[suite]) { + keyLen = aesModes[suite].key + ivLen = aesModes[suite].iv + } else if (desModes[suite]) { + keyLen = desModes[suite].key * 8 + ivLen = desModes[suite].iv + } else { + throw new TypeError('invalid suite type') + } + var keys = ebtk(password, false, keyLen, ivLen) + return createDecipheriv(suite, keys.key, keys.iv) +} + +function createCipheriv (suite, key, iv) { + suite = suite.toLowerCase() + if (aesModes[suite]) { + return aes.createCipheriv(suite, key, iv) + } else if (desModes[suite]) { + return new DES({ + key: key, + iv: iv, + mode: suite + }) + } else { + throw new TypeError('invalid suite type') + } +} +function createDecipheriv (suite, key, iv) { + suite = suite.toLowerCase() + if (aesModes[suite]) { + return aes.createDecipheriv(suite, key, iv) + } else if (desModes[suite]) { + return new DES({ + key: key, + iv: iv, + mode: suite, + decrypt: true + }) + } else { + throw new TypeError('invalid suite type') + } +} +exports.createCipher = exports.Cipher = createCipher +exports.createCipheriv = exports.Cipheriv = createCipheriv +exports.createDecipher = exports.Decipher = createDecipher +exports.createDecipheriv = exports.Decipheriv = createDecipheriv +function getCiphers () { + return Object.keys(desModes).concat(aes.getCiphers()) +} +exports.listCiphers = exports.getCiphers = getCiphers + +},{"browserify-aes/browser":24,"browserify-aes/modes":28,"browserify-des":38,"browserify-des/modes":39,"evp_bytestokey":88}],38:[function(require,module,exports){ +(function (Buffer){ +var CipherBase = require('cipher-base') +var des = require('des.js') +var inherits = require('inherits') + +var modes = { + 'des-ede3-cbc': des.CBC.instantiate(des.EDE), + 'des-ede3': des.EDE, + 'des-ede-cbc': des.CBC.instantiate(des.EDE), + 'des-ede': des.EDE, + 'des-cbc': des.CBC.instantiate(des.DES), + 'des-ecb': des.DES +} +modes.des = modes['des-cbc'] +modes.des3 = modes['des-ede3-cbc'] +module.exports = DES +inherits(DES, CipherBase) +function DES (opts) { + CipherBase.call(this) + var modeName = opts.mode.toLowerCase() + var mode = modes[modeName] + var type + if (opts.decrypt) { + type = 'decrypt' + } else { + type = 'encrypt' + } + var key = opts.key + if (modeName === 'des-ede' || modeName === 'des-ede-cbc') { + key = Buffer.concat([key, key.slice(0, 8)]) + } + var iv = opts.iv + this._des = mode.create({ + key: key, + iv: iv, + type: type + }) +} +DES.prototype._update = function (data) { + return new Buffer(this._des.update(data)) +} +DES.prototype._final = function () { + return new Buffer(this._des.final()) +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49,"cipher-base":52,"des.js":60,"inherits":97}],39:[function(require,module,exports){ +exports['des-ecb'] = { + key: 8, + iv: 0 +} +exports['des-cbc'] = exports.des = { + key: 8, + iv: 8 +} +exports['des-ede3-cbc'] = exports.des3 = { + key: 24, + iv: 8 +} +exports['des-ede3'] = { + key: 24, + iv: 0 +} +exports['des-ede-cbc'] = { + key: 16, + iv: 8 +} +exports['des-ede'] = { + key: 16, + iv: 0 +} + +},{}],40:[function(require,module,exports){ +(function (Buffer){ +var bn = require('bn.js'); +var randomBytes = require('randombytes'); +module.exports = crt; +function blind(priv) { + var r = getr(priv); + var blinder = r.toRed(bn.mont(priv.modulus)) + .redPow(new bn(priv.publicExponent)).fromRed(); + return { + blinder: blinder, + unblinder:r.invm(priv.modulus) + }; +} +function crt(msg, priv) { + var blinds = blind(priv); + var len = priv.modulus.byteLength(); + var mod = bn.mont(priv.modulus); + var blinded = new bn(msg).mul(blinds.blinder).umod(priv.modulus); + var c1 = blinded.toRed(bn.mont(priv.prime1)); + var c2 = blinded.toRed(bn.mont(priv.prime2)); + var qinv = priv.coefficient; + var p = priv.prime1; + var q = priv.prime2; + var m1 = c1.redPow(priv.exponent1); + var m2 = c2.redPow(priv.exponent2); + m1 = m1.fromRed(); + m2 = m2.fromRed(); + var h = m1.isub(m2).imul(qinv).umod(p); + h.imul(q); + m2.iadd(h); + return new Buffer(m2.imul(blinds.unblinder).umod(priv.modulus).toArray(false, len)); +} +crt.getr = getr; +function getr(priv) { + var len = priv.modulus.byteLength(); + var r = new bn(randomBytes(len)); + while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2)) { + r = new bn(randomBytes(len)); + } + return r; +} + +}).call(this,require("buffer").Buffer) +},{"bn.js":19,"buffer":49,"randombytes":118}],41:[function(require,module,exports){ +(function (Buffer){ +'use strict' +exports['RSA-SHA224'] = exports.sha224WithRSAEncryption = { + sign: 'rsa', + hash: 'sha224', + id: new Buffer('302d300d06096086480165030402040500041c', 'hex') +} +exports['RSA-SHA256'] = exports.sha256WithRSAEncryption = { + sign: 'rsa', + hash: 'sha256', + id: new Buffer('3031300d060960864801650304020105000420', 'hex') +} +exports['RSA-SHA384'] = exports.sha384WithRSAEncryption = { + sign: 'rsa', + hash: 'sha384', + id: new Buffer('3041300d060960864801650304020205000430', 'hex') +} +exports['RSA-SHA512'] = exports.sha512WithRSAEncryption = { + sign: 'rsa', + hash: 'sha512', + id: new Buffer('3051300d060960864801650304020305000440', 'hex') +} +exports['RSA-SHA1'] = { + sign: 'rsa', + hash: 'sha1', + id: new Buffer('3021300906052b0e03021a05000414', 'hex') +} +exports['ecdsa-with-SHA1'] = { + sign: 'ecdsa', + hash: 'sha1', + id: new Buffer('', 'hex') +} + +exports.DSA = exports['DSA-SHA1'] = exports['DSA-SHA'] = { + sign: 'dsa', + hash: 'sha1', + id: new Buffer('', 'hex') +} +exports['DSA-SHA224'] = exports['DSA-WITH-SHA224'] = { + sign: 'dsa', + hash: 'sha224', + id: new Buffer('', 'hex') +} +exports['DSA-SHA256'] = exports['DSA-WITH-SHA256'] = { + sign: 'dsa', + hash: 'sha256', + id: new Buffer('', 'hex') +} +exports['DSA-SHA384'] = exports['DSA-WITH-SHA384'] = { + sign: 'dsa', + hash: 'sha384', + id: new Buffer('', 'hex') +} +exports['DSA-SHA512'] = exports['DSA-WITH-SHA512'] = { + sign: 'dsa', + hash: 'sha512', + id: new Buffer('', 'hex') +} +exports['DSA-RIPEMD160'] = { + sign: 'dsa', + hash: 'rmd160', + id: new Buffer('', 'hex') +} +exports['RSA-RIPEMD160'] = exports.ripemd160WithRSA = { + sign: 'rsa', + hash: 'rmd160', + id: new Buffer('3021300906052b2403020105000414', 'hex') +} +exports['RSA-MD5'] = exports.md5WithRSAEncryption = { + sign: 'rsa', + hash: 'md5', + id: new Buffer('3020300c06082a864886f70d020505000410', 'hex') +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49}],42:[function(require,module,exports){ +(function (Buffer){ +var _algos = require('./algos') +var createHash = require('create-hash') +var inherits = require('inherits') +var sign = require('./sign') +var stream = require('stream') +var verify = require('./verify') + +var algos = {} +Object.keys(_algos).forEach(function (key) { + algos[key] = algos[key.toLowerCase()] = _algos[key] +}) + +function Sign (algorithm) { + stream.Writable.call(this) + + var data = algos[algorithm] + if (!data) { + throw new Error('Unknown message digest') + } + + this._hashType = data.hash + this._hash = createHash(data.hash) + this._tag = data.id + this._signType = data.sign +} +inherits(Sign, stream.Writable) + +Sign.prototype._write = function _write (data, _, done) { + this._hash.update(data) + done() +} + +Sign.prototype.update = function update (data, enc) { + if (typeof data === 'string') { + data = new Buffer(data, enc) + } + + this._hash.update(data) + return this +} + +Sign.prototype.sign = function signMethod (key, enc) { + this.end() + var hash = this._hash.digest() + var sig = sign(Buffer.concat([this._tag, hash]), key, this._hashType, this._signType) + + return enc ? sig.toString(enc) : sig +} + +function Verify (algorithm) { + stream.Writable.call(this) + + var data = algos[algorithm] + if (!data) { + throw new Error('Unknown message digest') + } + + this._hash = createHash(data.hash) + this._tag = data.id + this._signType = data.sign +} +inherits(Verify, stream.Writable) + +Verify.prototype._write = function _write (data, _, done) { + this._hash.update(data) + + done() +} + +Verify.prototype.update = function update (data, enc) { + if (typeof data === 'string') { + data = new Buffer(data, enc) + } + + this._hash.update(data) + return this +} + +Verify.prototype.verify = function verifyMethod (key, sig, enc) { + if (typeof sig === 'string') { + sig = new Buffer(sig, enc) + } + + this.end() + var hash = this._hash.digest() + + return verify(sig, Buffer.concat([this._tag, hash]), key, this._signType) +} + +function createSign (algorithm) { + return new Sign(algorithm) +} + +function createVerify (algorithm) { + return new Verify(algorithm) +} + +module.exports = { + Sign: createSign, + Verify: createVerify, + createSign: createSign, + createVerify: createVerify +} + +}).call(this,require("buffer").Buffer) +},{"./algos":41,"./sign":44,"./verify":45,"buffer":49,"create-hash":55,"inherits":97,"stream":139}],43:[function(require,module,exports){ +'use strict' +exports['1.3.132.0.10'] = 'secp256k1' + +exports['1.3.132.0.33'] = 'p224' + +exports['1.2.840.10045.3.1.1'] = 'p192' + +exports['1.2.840.10045.3.1.7'] = 'p256' + +exports['1.3.132.0.34'] = 'p384' + +exports['1.3.132.0.35'] = 'p521' + +},{}],44:[function(require,module,exports){ +(function (Buffer){ +// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js +var createHmac = require('create-hmac') +var crt = require('browserify-rsa') +var curves = require('./curves') +var elliptic = require('elliptic') +var parseKeys = require('parse-asn1') + +var BN = require('bn.js') +var EC = elliptic.ec + +function sign (hash, key, hashType, signType) { + var priv = parseKeys(key) + if (priv.curve) { + if (signType !== 'ecdsa') throw new Error('wrong private key type') + + return ecSign(hash, priv) + } else if (priv.type === 'dsa') { + if (signType !== 'dsa') { + throw new Error('wrong private key type') + } + return dsaSign(hash, priv, hashType) + } else { + if (signType !== 'rsa') throw new Error('wrong private key type') + } + + var len = priv.modulus.byteLength() + var pad = [ 0, 1 ] + while (hash.length + pad.length + 1 < len) { + pad.push(0xff) + } + pad.push(0x00) + var i = -1 + while (++i < hash.length) { + pad.push(hash[i]) + } + + var out = crt(pad, priv) + return out +} + +function ecSign (hash, priv) { + var curveId = curves[priv.curve.join('.')] + if (!curveId) throw new Error('unknown curve ' + priv.curve.join('.')) + + var curve = new EC(curveId) + var key = curve.genKeyPair() + + key._importPrivate(priv.privateKey) + var out = key.sign(hash) + + return new Buffer(out.toDER()) +} + +function dsaSign (hash, priv, algo) { + var x = priv.params.priv_key + var p = priv.params.p + var q = priv.params.q + var g = priv.params.g + var r = new BN(0) + var k + var H = bits2int(hash, q).mod(q) + var s = false + var kv = getKey(x, q, hash, algo) + while (s === false) { + k = makeKey(q, kv, algo) + r = makeR(g, k, p, q) + s = k.invm(q).imul(H.add(x.mul(r))).mod(q) + if (!s.cmpn(0)) { + s = false + r = new BN(0) + } + } + return toDER(r, s) +} + +function toDER (r, s) { + r = r.toArray() + s = s.toArray() + + // Pad values + if (r[0] & 0x80) { + r = [ 0 ].concat(r) + } + // Pad values + if (s[0] & 0x80) { + s = [0].concat(s) + } + + var total = r.length + s.length + 4 + var res = [ 0x30, total, 0x02, r.length ] + res = res.concat(r, [ 0x02, s.length ], s) + return new Buffer(res) +} + +function getKey (x, q, hash, algo) { + x = new Buffer(x.toArray()) + if (x.length < q.byteLength()) { + var zeros = new Buffer(q.byteLength() - x.length) + zeros.fill(0) + x = Buffer.concat([zeros, x]) + } + var hlen = hash.length + var hbits = bits2octets(hash, q) + var v = new Buffer(hlen) + v.fill(1) + var k = new Buffer(hlen) + k.fill(0) + k = createHmac(algo, k) + .update(v) + .update(new Buffer([0])) + .update(x) + .update(hbits) + .digest() + v = createHmac(algo, k) + .update(v) + .digest() + k = createHmac(algo, k) + .update(v) + .update(new Buffer([1])) + .update(x) + .update(hbits) + .digest() + v = createHmac(algo, k) + .update(v) + .digest() + return { + k: k, + v: v + } +} + +function bits2int (obits, q) { + var bits = new BN(obits) + var shift = (obits.length << 3) - q.bitLength() + if (shift > 0) { + bits.ishrn(shift) + } + return bits +} + +function bits2octets (bits, q) { + bits = bits2int(bits, q) + bits = bits.mod(q) + var out = new Buffer(bits.toArray()) + if (out.length < q.byteLength()) { + var zeros = new Buffer(q.byteLength() - out.length) + zeros.fill(0) + out = Buffer.concat([zeros, out]) + } + return out +} + +function makeKey (q, kv, algo) { + var t, k + + do { + t = new Buffer('') + + while (t.length * 8 < q.bitLength()) { + kv.v = createHmac(algo, kv.k) + .update(kv.v) + .digest() + t = Buffer.concat([t, kv.v]) + } + + k = bits2int(t, q) + kv.k = createHmac(algo, kv.k) + .update(kv.v) + .update(new Buffer([0])) + .digest() + kv.v = createHmac(algo, kv.k) + .update(kv.v) + .digest() + } while (k.cmp(q) !== -1) + + return k +} + +function makeR (g, k, p, q) { + return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q) +} + +module.exports = sign +module.exports.getKey = getKey +module.exports.makeKey = makeKey + +}).call(this,require("buffer").Buffer) +},{"./curves":43,"bn.js":19,"browserify-rsa":40,"buffer":49,"create-hmac":58,"elliptic":70,"parse-asn1":106}],45:[function(require,module,exports){ +(function (Buffer){ +// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js +var curves = require('./curves') +var elliptic = require('elliptic') +var parseKeys = require('parse-asn1') + +var BN = require('bn.js') +var EC = elliptic.ec + +function verify (sig, hash, key, signType) { + var pub = parseKeys(key) + if (pub.type === 'ec') { + if (signType !== 'ecdsa') { + throw new Error('wrong public key type') + } + return ecVerify(sig, hash, pub) + } else if (pub.type === 'dsa') { + if (signType !== 'dsa') { + throw new Error('wrong public key type') + } + return dsaVerify(sig, hash, pub) + } else { + if (signType !== 'rsa') { + throw new Error('wrong public key type') + } + } + var len = pub.modulus.byteLength() + var pad = [ 1 ] + var padNum = 0 + while (hash.length + pad.length + 2 < len) { + pad.push(0xff) + padNum++ + } + pad.push(0x00) + var i = -1 + while (++i < hash.length) { + pad.push(hash[i]) + } + pad = new Buffer(pad) + var red = BN.mont(pub.modulus) + sig = new BN(sig).toRed(red) + + sig = sig.redPow(new BN(pub.publicExponent)) + + sig = new Buffer(sig.fromRed().toArray()) + var out = 0 + if (padNum < 8) { + out = 1 + } + len = Math.min(sig.length, pad.length) + if (sig.length !== pad.length) { + out = 1 + } + + i = -1 + while (++i < len) { + out |= (sig[i] ^ pad[i]) + } + return out === 0 +} + +function ecVerify (sig, hash, pub) { + var curveId = curves[pub.data.algorithm.curve.join('.')] + if (!curveId) throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.')) + + var curve = new EC(curveId) + var pubkey = pub.data.subjectPrivateKey.data + + return curve.verify(hash, sig, pubkey) +} + +function dsaVerify (sig, hash, pub) { + var p = pub.data.p + var q = pub.data.q + var g = pub.data.g + var y = pub.data.pub_key + var unpacked = parseKeys.signature.decode(sig, 'der') + var s = unpacked.s + var r = unpacked.r + checkValue(s, q) + checkValue(r, q) + var montp = BN.mont(p) + var w = s.invm(q) + var v = g.toRed(montp) + .redPow(new BN(hash).mul(w).mod(q)) + .fromRed() + .mul( + y.toRed(montp) + .redPow(r.mul(w).mod(q)) + .fromRed() + ).mod(p).mod(q) + return !v.cmp(r) +} + +function checkValue (b, q) { + if (b.cmpn(0) <= 0) { + throw new Error('invalid sig') + } + if (b.cmp(q) >= q) { + throw new Error('invalid sig') + } +} + +module.exports = verify + +}).call(this,require("buffer").Buffer) +},{"./curves":43,"bn.js":19,"buffer":49,"elliptic":70,"parse-asn1":106}],46:[function(require,module,exports){ +arguments[4][21][0].apply(exports,arguments) +},{"dup":21}],47:[function(require,module,exports){ +(function (global){ +'use strict'; + +var buffer = require('buffer'); +var Buffer = buffer.Buffer; +var SlowBuffer = buffer.SlowBuffer; +var MAX_LEN = buffer.kMaxLength || 2147483647; +exports.alloc = function alloc(size, fill, encoding) { + if (typeof Buffer.alloc === 'function') { + return Buffer.alloc(size, fill, encoding); + } + if (typeof encoding === 'number') { + throw new TypeError('encoding must not be number'); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size > MAX_LEN) { + throw new RangeError('size is too large'); + } + var enc = encoding; + var _fill = fill; + if (_fill === undefined) { + enc = undefined; + _fill = 0; + } + var buf = new Buffer(size); + if (typeof _fill === 'string') { + var fillBuf = new Buffer(_fill, enc); + var flen = fillBuf.length; + var i = -1; + while (++i < size) { + buf[i] = fillBuf[i % flen]; + } + } else { + buf.fill(_fill); + } + return buf; +} +exports.allocUnsafe = function allocUnsafe(size) { + if (typeof Buffer.allocUnsafe === 'function') { + return Buffer.allocUnsafe(size); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size > MAX_LEN) { + throw new RangeError('size is too large'); + } + return new Buffer(size); +} +exports.from = function from(value, encodingOrOffset, length) { + if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) { + return Buffer.from(value, encodingOrOffset, length); + } + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number'); + } + if (typeof value === 'string') { + return new Buffer(value, encodingOrOffset); + } + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + var offset = encodingOrOffset; + if (arguments.length === 1) { + return new Buffer(value); + } + if (typeof offset === 'undefined') { + offset = 0; + } + var len = length; + if (typeof len === 'undefined') { + len = value.byteLength - offset; + } + if (offset >= value.byteLength) { + throw new RangeError('\'offset\' is out of bounds'); + } + if (len > value.byteLength - offset) { + throw new RangeError('\'length\' is out of bounds'); + } + return new Buffer(value.slice(offset, offset + len)); + } + if (Buffer.isBuffer(value)) { + var out = new Buffer(value.length); + value.copy(out, 0, 0, value.length); + return out; + } + if (value) { + if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) { + return new Buffer(value); + } + if (value.type === 'Buffer' && Array.isArray(value.data)) { + return new Buffer(value.data); + } + } + + throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.'); +} +exports.allocUnsafeSlow = function allocUnsafeSlow(size) { + if (typeof Buffer.allocUnsafeSlow === 'function') { + return Buffer.allocUnsafeSlow(size); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size >= MAX_LEN) { + throw new RangeError('size is too large'); + } + return new SlowBuffer(size); +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"buffer":49}],48:[function(require,module,exports){ +(function (Buffer){ +module.exports = function xor (a, b) { + var length = Math.min(a.length, b.length) + var buffer = new Buffer(length) + + for (var i = 0; i < length; ++i) { + buffer[i] = a[i] ^ b[i] + } + + return buffer +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49}],49:[function(require,module,exports){ +(function (global){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') +var isArray = require('isarray') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() + +/* + * Export kMaxLength after typed array support is determined. + */ +exports.kMaxLength = kMaxLength() + +function typedArraySupport () { + try { + var arr = new Uint8Array(1) + arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length) + } + that.length = length + } + + return that +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length) + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe(this, arg) + } + return from(this, arg, encodingOrOffset, length) +} + +Buffer.poolSize = 8192 // not used by this implementation + +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype + return arr +} + +function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } + + return fromObject(that, value) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) { + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }) + } +} + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } +} + +function alloc (that, size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) + } + return createBuffer(that, size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) +} + +function allocUnsafe (that, size) { + assertSize(size) + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0 + } + } + return that +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + var length = byteLength(string, encoding) | 0 + that = createBuffer(that, length) + + var actual = that.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual) + } + + return that +} + +function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + that = createBuffer(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array) + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset) + } else { + array = new Uint8Array(array, byteOffset, length) + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array) + } + return that +} + +function fromObject (that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + that = createBuffer(that, len) + + if (that.length === 0) { + return that + } + + obj.copy(that, 0, 0, len) + return that + } + + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) + } + return fromArrayLike(that, obj) + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data) + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} + +function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string + } + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (Buffer.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} -/* - Copyright 2013 Daniel Wirtz - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -/** - * @license protobuf.js (c) 2013 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/protobuf.js for details - */ -(function(global, factory) { - - /* AMD */ if (typeof define === 'function' && define["amd"]) - define(["bytebuffer"], factory); - /* CommonJS */ else if (typeof require === "function" && typeof module === "object" && module && module["exports"]) - module["exports"] = factory(require("bytebuffer"), true); - /* Global */ else - (global["dcodeIO"] = global["dcodeIO"] || {})["ProtoBuf"] = factory(global["dcodeIO"]["ByteBuffer"]); - -})(this, function(ByteBuffer, isCommonJS) { - "use strict"; - - /** - * The ProtoBuf namespace. - * @exports ProtoBuf - * @namespace - * @expose - */ - var ProtoBuf = {}; - - /** - * @type {!function(new: ByteBuffer, ...[*])} - * @expose - */ - ProtoBuf.ByteBuffer = ByteBuffer; - - /** - * @type {?function(new: Long, ...[*])} - * @expose - */ - ProtoBuf.Long = ByteBuffer.Long || null; - - /** - * ProtoBuf.js version. - * @type {string} - * @const - * @expose - */ - ProtoBuf.VERSION = "5.0.1"; - - /** - * Wire types. - * @type {Object.} - * @const - * @expose - */ - ProtoBuf.WIRE_TYPES = {}; - - /** - * Varint wire type. - * @type {number} - * @expose - */ - ProtoBuf.WIRE_TYPES.VARINT = 0; - - /** - * Fixed 64 bits wire type. - * @type {number} - * @const - * @expose - */ - ProtoBuf.WIRE_TYPES.BITS64 = 1; - - /** - * Length delimited wire type. - * @type {number} - * @const - * @expose - */ - ProtoBuf.WIRE_TYPES.LDELIM = 2; - - /** - * Start group wire type. - * @type {number} - * @const - * @expose - */ - ProtoBuf.WIRE_TYPES.STARTGROUP = 3; - - /** - * End group wire type. - * @type {number} - * @const - * @expose - */ - ProtoBuf.WIRE_TYPES.ENDGROUP = 4; - - /** - * Fixed 32 bits wire type. - * @type {number} - * @const - * @expose - */ - ProtoBuf.WIRE_TYPES.BITS32 = 5; - - /** - * Packable wire types. - * @type {!Array.} - * @const - * @expose - */ - ProtoBuf.PACKABLE_WIRE_TYPES = [ - ProtoBuf.WIRE_TYPES.VARINT, - ProtoBuf.WIRE_TYPES.BITS64, - ProtoBuf.WIRE_TYPES.BITS32 - ]; - - /** - * Types. - * @dict - * @type {!Object.} - * @const - * @expose - */ - ProtoBuf.TYPES = { - // According to the protobuf spec. - "int32": { - name: "int32", - wireType: ProtoBuf.WIRE_TYPES.VARINT, - defaultValue: 0 - }, - "uint32": { - name: "uint32", - wireType: ProtoBuf.WIRE_TYPES.VARINT, - defaultValue: 0 - }, - "sint32": { - name: "sint32", - wireType: ProtoBuf.WIRE_TYPES.VARINT, - defaultValue: 0 - }, - "int64": { - name: "int64", - wireType: ProtoBuf.WIRE_TYPES.VARINT, - defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined - }, - "uint64": { - name: "uint64", - wireType: ProtoBuf.WIRE_TYPES.VARINT, - defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined - }, - "sint64": { - name: "sint64", - wireType: ProtoBuf.WIRE_TYPES.VARINT, - defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined - }, - "bool": { - name: "bool", - wireType: ProtoBuf.WIRE_TYPES.VARINT, - defaultValue: false - }, - "double": { - name: "double", - wireType: ProtoBuf.WIRE_TYPES.BITS64, - defaultValue: 0 - }, - "string": { - name: "string", - wireType: ProtoBuf.WIRE_TYPES.LDELIM, - defaultValue: "" - }, - "bytes": { - name: "bytes", - wireType: ProtoBuf.WIRE_TYPES.LDELIM, - defaultValue: null // overridden in the code, must be a unique instance - }, - "fixed32": { - name: "fixed32", - wireType: ProtoBuf.WIRE_TYPES.BITS32, - defaultValue: 0 - }, - "sfixed32": { - name: "sfixed32", - wireType: ProtoBuf.WIRE_TYPES.BITS32, - defaultValue: 0 - }, - "fixed64": { - name: "fixed64", - wireType: ProtoBuf.WIRE_TYPES.BITS64, - defaultValue: ProtoBuf.Long ? ProtoBuf.Long.UZERO : undefined - }, - "sfixed64": { - name: "sfixed64", - wireType: ProtoBuf.WIRE_TYPES.BITS64, - defaultValue: ProtoBuf.Long ? ProtoBuf.Long.ZERO : undefined - }, - "float": { - name: "float", - wireType: ProtoBuf.WIRE_TYPES.BITS32, - defaultValue: 0 - }, - "enum": { - name: "enum", - wireType: ProtoBuf.WIRE_TYPES.VARINT, - defaultValue: 0 - }, - "message": { - name: "message", - wireType: ProtoBuf.WIRE_TYPES.LDELIM, - defaultValue: null - }, - "group": { - name: "group", - wireType: ProtoBuf.WIRE_TYPES.STARTGROUP, - defaultValue: null - } - }; - - /** - * Valid map key types. - * @type {!Array.>} - * @const - * @expose - */ - ProtoBuf.MAP_KEY_TYPES = [ - ProtoBuf.TYPES["int32"], - ProtoBuf.TYPES["sint32"], - ProtoBuf.TYPES["sfixed32"], - ProtoBuf.TYPES["uint32"], - ProtoBuf.TYPES["fixed32"], - ProtoBuf.TYPES["int64"], - ProtoBuf.TYPES["sint64"], - ProtoBuf.TYPES["sfixed64"], - ProtoBuf.TYPES["uint64"], - ProtoBuf.TYPES["fixed64"], - ProtoBuf.TYPES["bool"], - ProtoBuf.TYPES["string"], - ProtoBuf.TYPES["bytes"] - ]; - - /** - * Minimum field id. - * @type {number} - * @const - * @expose - */ - ProtoBuf.ID_MIN = 1; - - /** - * Maximum field id. - * @type {number} - * @const - * @expose - */ - ProtoBuf.ID_MAX = 0x1FFFFFFF; - - /** - * If set to `true`, field names will be converted from underscore notation to camel case. Defaults to `false`. - * Must be set prior to parsing. - * @type {boolean} - * @expose - */ - ProtoBuf.convertFieldsToCamelCase = false; - - /** - * By default, messages are populated with (setX, set_x) accessors for each field. This can be disabled by - * setting this to `false` prior to building messages. - * @type {boolean} - * @expose - */ - ProtoBuf.populateAccessors = true; - - /** - * By default, messages are populated with default values if a field is not present on the wire. To disable - * this behavior, set this setting to `false`. - * @type {boolean} - * @expose - */ - ProtoBuf.populateDefaults = true; - - /** - * @alias ProtoBuf.Util - * @expose - */ - ProtoBuf.Util = (function() { - "use strict"; +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end) + newBuf.__proto__ = Buffer.prototype + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start] + } + } + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if (code < 256) { + val = code + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255 + } - /** - * ProtoBuf utilities. - * @exports ProtoBuf.Util - * @namespace - */ - var Util = {}; + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } - /** - * Flag if running in node or not. - * @type {boolean} - * @const - * @expose - */ - Util.IS_NODE = !!( - typeof process === 'object' && process+'' === '[object process]' && !process['browser'] - ); + if (end <= start) { + return this + } - /** - * Constructs a XMLHttpRequest object. - * @return {XMLHttpRequest} - * @throws {Error} If XMLHttpRequest is not supported - * @expose - */ - Util.XHR = function() { - // No dependencies please, ref: http://www.quirksmode.org/js/xmlhttp.html - var XMLHttpFactories = [ - function () {return new XMLHttpRequest()}, - function () {return new ActiveXObject("Msxml2.XMLHTTP")}, - function () {return new ActiveXObject("Msxml3.XMLHTTP")}, - function () {return new ActiveXObject("Microsoft.XMLHTTP")} - ]; - /** @type {?XMLHttpRequest} */ - var xhr = null; - for (var i=0;i>> 0 + end = end === undefined ? this.length : end >>> 0 - /** - * Fetches a resource. - * @param {string} path Resource path - * @param {function(?string)=} callback Callback receiving the resource's contents. If omitted the resource will - * be fetched synchronously. If the request failed, contents will be null. - * @return {?string|undefined} Resource contents if callback is omitted (null if the request failed), else undefined. - * @expose - */ - Util.fetch = function(path, callback) { - if (callback && typeof callback != 'function') - callback = null; - if (Util.IS_NODE) { - var fs = require("fs"); - if (callback) { - fs.readFile(path, function(err, data) { - if (err) - callback(null); - else - callback(""+data); - }); - } else - try { - return fs.readFileSync(path); - } catch (e) { - return null; - } - } else { - var xhr = Util.XHR(); - xhr.open('GET', path, callback ? true : false); - // xhr.setRequestHeader('User-Agent', 'XMLHTTP/1.0'); - xhr.setRequestHeader('Accept', 'text/plain'); - if (typeof xhr.overrideMimeType === 'function') xhr.overrideMimeType('text/plain'); - if (callback) { - xhr.onreadystatechange = function() { - if (xhr.readyState != 4) return; - if (/* remote */ xhr.status == 200 || /* local */ (xhr.status == 0 && typeof xhr.responseText === 'string')) - callback(xhr.responseText); - else - callback(null); - }; - if (xhr.readyState == 4) - return; - xhr.send(null); - } else { - xhr.send(null); - if (/* remote */ xhr.status == 200 || /* local */ (xhr.status == 0 && typeof xhr.responseText === 'string')) - return xhr.responseText; - return null; - } - } - }; + if (!val) val = 0 - /** - * Converts a string to camel case. - * @param {string} str - * @returns {string} - * @expose - */ - Util.toCamelCase = function(str) { - return str.replace(/_([a-zA-Z])/g, function ($0, $1) { - return $1.toUpperCase(); - }); - }; + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : utf8ToBytes(new Buffer(val, encoding).toString()) + var len = bytes.length + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } - return Util; - })(); - - /** - * Language expressions. - * @type {!Object.} - * @expose - */ - ProtoBuf.Lang = { - - // Characters always ending a statement - DELIM: /[\s\{\}=;:\[\],'"\(\)<>]/g, - - // Field rules - RULE: /^(?:required|optional|repeated|map)$/, - - // Field types - TYPE: /^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/, - - // Names - NAME: /^[a-zA-Z_][a-zA-Z_0-9]*$/, - - // Type definitions - TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/, - - // Type references - TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/, - - // Fully qualified type references - FQTYPEREF: /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/, - - // All numbers - NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/, - - // Decimal numbers - NUMBER_DEC: /^(?:[1-9][0-9]*|0)$/, - - // Hexadecimal numbers - NUMBER_HEX: /^0[xX][0-9a-fA-F]+$/, - - // Octal numbers - NUMBER_OCT: /^0[0-7]+$/, - - // Floating point numbers - NUMBER_FLT: /^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/, - - // Booleans - BOOL: /^(?:true|false)$/i, - - // Id numbers - ID: /^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, - - // Negative id numbers (enum values) - NEGID: /^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"base64-js":18,"ieee754":95,"isarray":99}],50:[function(require,module,exports){ +/* + Copyright 2013-2014 Daniel Wirtz - // Whitespaces - WHITESPACE: /\s/, + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - // All strings - STRING: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g, + http://www.apache.org/licenses/LICENSE-2.0 - // Double quoted strings - STRING_DQ: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ - // Single quoted strings - STRING_SQ: /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g - }; +/** + * @license ByteBuffer.js (c) 2013-2014 Daniel Wirtz + * This version of ByteBuffer.js uses an ArrayBuffer as its backing buffer which is accessed through a DataView and is + * compatible with modern browsers. + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/ByteBuffer.js for details + */ // +(function(global) { + "use strict"; /** - * @alias ProtoBuf.DotProto - * @expose + * @param {function(new: Long, number, number, boolean=)=} Long + * @returns {function(new: ByteBuffer, number=, boolean=, boolean=)}} + * @inner */ - ProtoBuf.DotProto = (function(ProtoBuf, Lang) { - "use strict"; - - /** - * Utilities to parse .proto files. - * @exports ProtoBuf.DotProto - * @namespace - */ - var DotProto = {}; + function loadByteBuffer(Long) { /** - * Constructs a new Tokenizer. - * @exports ProtoBuf.DotProto.Tokenizer - * @class prototype tokenizer - * @param {string} proto Proto to tokenize + * Constructs a new ByteBuffer. + * @class The swiss army knife for binary data in JavaScript. + * @exports ByteBuffer * @constructor + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @expose */ - var Tokenizer = function(proto) { + var ByteBuffer = function(capacity, littleEndian, noAssert) { + if (typeof capacity === 'undefined') capacity = ByteBuffer.DEFAULT_CAPACITY; + if (typeof littleEndian === 'undefined') littleEndian = ByteBuffer.DEFAULT_ENDIAN; + if (typeof noAssert === 'undefined') noAssert = ByteBuffer.DEFAULT_NOASSERT; + if (!noAssert) { + capacity = capacity | 0; + if (capacity < 0) + throw RangeError("Illegal capacity"); + littleEndian = !!littleEndian; + noAssert = !!noAssert; + } /** - * Source to parse. - * @type {string} + * Backing buffer. + * @type {!ArrayBuffer} * @expose */ - this.source = proto+""; + this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity); /** - * Current index. + * Data view to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. + * @type {?DataView} + * @expose + */ + this.view = capacity === 0 ? null : new DataView(this.buffer); + + /** + * Absolute read/write offset. * @type {number} * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear */ - this.index = 0; + this.offset = 0; /** - * Current line. + * Marked offset. * @type {number} * @expose + * @see ByteBuffer#mark + * @see ByteBuffer#reset */ - this.line = 1; + this.markedOffset = -1; /** - * Token stack. - * @type {!Array.} + * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. + * @type {number} * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear */ - this.stack = []; + this.limit = capacity; /** - * Opening character of the current string read, if any. - * @type {?string} - * @private + * Whether to use little endian byte order, defaults to `false` for big endian. + * @type {boolean} + * @expose */ - this._stringOpen = null; + this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : false; + + /** + * Whether to skip assertions of offsets and values, defaults to `false`. + * @type {boolean} + * @expose + */ + this.noAssert = !!noAssert; }; /** - * @alias ProtoBuf.DotProto.Tokenizer.prototype + * ByteBuffer version. + * @type {string} + * @const + * @expose + */ + ByteBuffer.VERSION = "3.5.5"; + + /** + * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.LITTLE_ENDIAN = true; + + /** + * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. + * @type {boolean} + * @const + * @expose + */ + ByteBuffer.BIG_ENDIAN = false; + + /** + * Default initial capacity of `16`. + * @type {number} + * @expose + */ + ByteBuffer.DEFAULT_CAPACITY = 16; + + /** + * Default endianess of `false` for big endian. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN; + + /** + * Default no assertions flag of `false`. + * @type {boolean} + * @expose + */ + ByteBuffer.DEFAULT_NOASSERT = false; + + /** + * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded + * and int64 support is not available. + * @type {?Long} + * @const + * @see https://github.com/dcodeIO/Long.js + * @expose + */ + ByteBuffer.Long = Long || null; + + /** + * @alias ByteBuffer.prototype * @inner */ - var TokenizerPrototype = Tokenizer.prototype; + var ByteBufferPrototype = ByteBuffer.prototype; + + // helpers /** - * Reads a string beginning at the current index. - * @return {string} - * @private + * @type {!ArrayBuffer} + * @inner */ - TokenizerPrototype._readString = function() { - var re = this._stringOpen === '"' - ? Lang.STRING_DQ - : Lang.STRING_SQ; - re.lastIndex = this.index - 1; // Include the open quote - var match = re.exec(this.source); - if (!match) - throw Error("unterminated string"); - this.index = re.lastIndex; - this.stack.push(this._stringOpen); - this._stringOpen = null; - return match[1]; + var EMPTY_BUFFER = new ArrayBuffer(0); + + /** + * String.fromCharCode reference for compile-time renaming. + * @type {function(...number):string} + * @inner + */ + var stringFromCharCode = String.fromCharCode; + + /** + * Creates a source function for a string. + * @param {string} s String to read from + * @returns {function():number|null} Source function returning the next char code respectively `null` if there are + * no more characters left. + * @throws {TypeError} If the argument is invalid + * @inner + */ + function stringSource(s) { + var i=0; return function() { + return i < s.length ? s.charCodeAt(i++) : null; + }; + } + + /** + * Creates a destination function for a string. + * @returns {function(number=):undefined|string} Destination function successively called with the next char code. + * Returns the final string when called without arguments. + * @inner + */ + function stringDestination() { + var cs = [], ps = []; return function() { + if (arguments.length === 0) + return ps.join('')+stringFromCharCode.apply(String, cs); + if (cs.length + arguments.length > 1024) + ps.push(stringFromCharCode.apply(String, cs)), + cs.length = 0; + Array.prototype.push.apply(cs, arguments); + }; + } + + /** + * Allocates a new ByteBuffer backed by a buffer of the specified capacity. + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} + * @expose + */ + ByteBuffer.allocate = function(capacity, littleEndian, noAssert) { + return new ByteBuffer(capacity, littleEndian, noAssert); + }; + + /** + * Concatenates multiple ByteBuffers into one. + * @param {!Array.} buffers Buffers to concatenate + * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", + * defaults to "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults + * to {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} Concatenated ByteBuffer + * @expose + */ + ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) { + if (typeof encoding === 'boolean' || typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + var capacity = 0; + for (var i=0, k=buffers.length, length; i 0) capacity += length; + } + if (capacity === 0) + return new ByteBuffer(0, littleEndian, noAssert); + var bb = new ByteBuffer(capacity, littleEndian, noAssert), + bi; + var view = new Uint8Array(bb.buffer); + i=0; while (i} buffer Anything that can be wrapped + * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to + * "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` * @expose */ - TokenizerPrototype.next = function() { - if (this.stack.length > 0) - return this.stack.shift(); - if (this.index >= this.source.length) - return null; - if (this._stringOpen !== null) - return this._readString(); - - var repeat, - prev, - next; - do { - repeat = false; - - // Strip white spaces - while (Lang.WHITESPACE.test(next = this.source.charAt(this.index))) { - if (next === '\n') - ++this.line; - if (++this.index === this.source.length) - return null; + ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) { + if (typeof encoding !== 'string') { + noAssert = littleEndian; + littleEndian = encoding; + encoding = undefined; + } + if (typeof buffer === 'string') { + if (typeof encoding === 'undefined') + encoding = "utf8"; + switch (encoding) { + case "base64": + return ByteBuffer.fromBase64(buffer, littleEndian); + case "hex": + return ByteBuffer.fromHex(buffer, littleEndian); + case "binary": + return ByteBuffer.fromBinary(buffer, littleEndian); + case "utf8": + return ByteBuffer.fromUTF8(buffer, littleEndian); + case "debug": + return ByteBuffer.fromDebug(buffer, littleEndian); + default: + throw Error("Unsupported encoding: "+encoding); } - - // Strip comments - if (this.source.charAt(this.index) === '/') { - ++this.index; - if (this.source.charAt(this.index) === '/') { // Line - while (this.source.charAt(++this.index) !== '\n') - if (this.index == this.source.length) - return null; - ++this.index; - ++this.line; - repeat = true; - } else if ((next = this.source.charAt(this.index)) === '*') { /* Block */ - do { - if (next === '\n') - ++this.line; - if (++this.index === this.source.length) - return null; - prev = next; - next = this.source.charAt(this.index); - } while (prev !== '*' || next !== '/'); - ++this.index; - repeat = true; - } else - return '/'; + } + if (buffer === null || typeof buffer !== 'object') + throw TypeError("Illegal buffer"); + var bb; + if (ByteBuffer.isByteBuffer(buffer)) { + bb = ByteBufferPrototype.clone.call(buffer); + bb.markedOffset = -1; + return bb; + } + if (buffer instanceof Uint8Array) { // Extract ArrayBuffer from Uint8Array + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.length > 0) { // Avoid references to more than one EMPTY_BUFFER + bb.buffer = buffer.buffer; + bb.offset = buffer.byteOffset; + bb.limit = buffer.byteOffset + buffer.length; + bb.view = buffer.length > 0 ? new DataView(buffer.buffer) : null; } - } while (repeat); - - if (this.index === this.source.length) - return null; - - // Read the next token - var end = this.index; - Lang.DELIM.lastIndex = 0; - var delim = Lang.DELIM.test(this.source.charAt(end++)); - if (!delim) - while(end < this.source.length && !Lang.DELIM.test(this.source.charAt(end))) - ++end; - var token = this.source.substring(this.index, this.index = end); - if (token === '"' || token === "'") - this._stringOpen = token; - return token; + } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer + bb = new ByteBuffer(0, littleEndian, noAssert); + if (buffer.byteLength > 0) { + bb.buffer = buffer; + bb.offset = 0; + bb.limit = buffer.byteLength; + bb.view = buffer.byteLength > 0 ? new DataView(buffer) : null; + } + } else if (Object.prototype.toString.call(buffer) === "[object Array]") { // Create from octets + bb = new ByteBuffer(buffer.length, littleEndian, noAssert); + bb.limit = buffer.length; + for (i=0; i>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); } - return this.stack[0]; + offset += 1; + var capacity0 = this.buffer.byteLength; + if (offset > capacity0) + this.resize((capacity0 *= 2) > offset ? capacity0 : offset); + offset -= 1; + this.view.setInt8(offset, value); + if (relative) this.offset += 1; + return this; }; /** - * Skips a specific token and throws if it differs. - * @param {string} expected Expected token - * @throws {Error} If the actual token differs + * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose */ - TokenizerPrototype.skip = function(expected) { - var actual = this.next(); - if (actual !== expected) - throw Error("illegal '"+actual+"', '"+expected+"' expected"); - }; + ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8; /** - * Omits an optional token. - * @param {string} expected Expected optional token - * @returns {boolean} `true` if the token exists + * Reads an 8bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ - TokenizerPrototype.omit = function(expected) { - if (this.peek() === expected) { - this.next(); - return true; + ByteBufferPrototype.readInt8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); } - return false; + var value = this.view.getInt8(offset); + if (relative) this.offset += 1; + return value; }; /** - * Returns a string representation of this object. - * @return {string} String representation as of "Tokenizer(index/length)" + * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read * @expose */ - TokenizerPrototype.toString = function() { - return "Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"; - }; + ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8; /** - * @alias ProtoBuf.DotProto.Tokenizer + * Writes an 8bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this * @expose */ - DotProto.Tokenizer = Tokenizer; + ByteBufferPrototype.writeUint8 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 1; + var capacity1 = this.buffer.byteLength; + if (offset > capacity1) + this.resize((capacity1 *= 2) > offset ? capacity1 : offset); + offset -= 1; + this.view.setUint8(offset, value); + if (relative) this.offset += 1; + return this; + }; /** - * Constructs a new Parser. - * @exports ProtoBuf.DotProto.Parser - * @class prototype parser - * @param {string} source Source - * @constructor + * Reads an 8bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ - var Parser = function(source) { + ByteBufferPrototype.readUint8 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var value = this.view.getUint8(offset); + if (relative) this.offset += 1; + return value; + }; - /** - * Tokenizer. - * @type {!ProtoBuf.DotProto.Tokenizer} - * @expose - */ - this.tn = new Tokenizer(source); + // types/ints/int16 - /** - * Whether parsing proto3 or not. - * @type {boolean} - */ - this.proto3 = false; + /** + * Writes a 16bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose + */ + ByteBufferPrototype.writeInt16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 2; + var capacity2 = this.buffer.byteLength; + if (offset > capacity2) + this.resize((capacity2 *= 2) > offset ? capacity2 : offset); + offset -= 2; + this.view.setInt16(offset, value, this.littleEndian); + if (relative) this.offset += 2; + return this; }; /** - * @alias ProtoBuf.DotProto.Parser.prototype - * @inner + * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ - var ParserPrototype = Parser.prototype; + ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16; /** - * Parses the source. - * @returns {!Object} - * @throws {Error} If the source cannot be parsed + * Reads a 16bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds * @expose */ - ParserPrototype.parse = function() { - var topLevel = { - "name": "[ROOT]", // temporary - "package": null, - "messages": [], - "enums": [], - "imports": [], - "options": {}, - "services": [] - // "syntax": undefined - }; - var token, - head = true, - weak; - try { - while (token = this.tn.next()) { - switch (token) { - case 'package': - if (!head || topLevel["package"] !== null) - throw Error("unexpected 'package'"); - token = this.tn.next(); - if (!Lang.TYPEREF.test(token)) - throw Error("illegal package name: " + token); - this.tn.skip(";"); - topLevel["package"] = token; - break; - case 'import': - if (!head) - throw Error("unexpected 'import'"); - token = this.tn.peek(); - if (token === "public" || (weak = token === "weak")) // token ignored - this.tn.next(); - token = this._readString(); - this.tn.skip(";"); - if (!weak) // import ignored - topLevel["imports"].push(token); - break; - case 'syntax': - if (!head) - throw Error("unexpected 'syntax'"); - this.tn.skip("="); - if ((topLevel["syntax"] = this._readString()) === "proto3") - this.proto3 = true; - this.tn.skip(";"); - break; - case 'message': - this._parseMessage(topLevel, null); - head = false; - break; - case 'enum': - this._parseEnum(topLevel); - head = false; - break; - case 'option': - this._parseOption(topLevel); - break; - case 'service': - this._parseService(topLevel); - break; - case 'extend': - this._parseExtend(topLevel); - break; - default: - throw Error("unexpected '" + token + "'"); - } - } - } catch (e) { - e.message = "Parse error at line "+this.tn.line+": " + e.message; - throw e; + ByteBufferPrototype.readInt16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); } - delete topLevel["name"]; - return topLevel; + var value = this.view.getInt16(offset, this.littleEndian); + if (relative) this.offset += 2; + return value; }; /** - * Parses the specified source. - * @returns {!Object} - * @throws {Error} If the source cannot be parsed + * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds * @expose */ - Parser.parse = function(source) { - return new Parser(source).parse(); - }; - - // ----- Conversion ------ + ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16; /** - * Converts a numerical string to an id. - * @param {string} value - * @param {boolean=} mayBeNegative - * @returns {number} - * @inner + * Writes a 16bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ - function mkId(value, mayBeNegative) { - var id = -1, - sign = 1; - if (value.charAt(0) == '-') { - sign = -1; - value = value.substring(1); + ByteBufferPrototype.writeUint16 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); } - if (Lang.NUMBER_DEC.test(value)) - id = parseInt(value); - else if (Lang.NUMBER_HEX.test(value)) - id = parseInt(value.substring(2), 16); - else if (Lang.NUMBER_OCT.test(value)) - id = parseInt(value.substring(1), 8); - else - throw Error("illegal id value: " + (sign < 0 ? '-' : '') + value); - id = (sign*id)|0; // Force to 32bit - if (!mayBeNegative && id < 0) - throw Error("illegal id value: " + (sign < 0 ? '-' : '') + value); - return id; - } + offset += 2; + var capacity3 = this.buffer.byteLength; + if (offset > capacity3) + this.resize((capacity3 *= 2) > offset ? capacity3 : offset); + offset -= 2; + this.view.setUint16(offset, value, this.littleEndian); + if (relative) this.offset += 2; + return this; + }; /** - * Converts a numerical string to a number. - * @param {string} val - * @returns {number} - * @inner + * Reads a 16bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ - function mkNumber(val) { - var sign = 1; - if (val.charAt(0) == '-') { - sign = -1; - val = val.substring(1); + ByteBufferPrototype.readUint16 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 2 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+2+") <= "+this.buffer.byteLength); } - if (Lang.NUMBER_DEC.test(val)) - return sign * parseInt(val, 10); - else if (Lang.NUMBER_HEX.test(val)) - return sign * parseInt(val.substring(2), 16); - else if (Lang.NUMBER_OCT.test(val)) - return sign * parseInt(val.substring(1), 8); - else if (val === 'inf') - return sign * Infinity; - else if (val === 'nan') - return NaN; - else if (Lang.NUMBER_FLT.test(val)) - return sign * parseFloat(val); - throw Error("illegal number value: " + (sign < 0 ? '-' : '') + val); - } + var value = this.view.getUint16(offset, this.littleEndian); + if (relative) this.offset += 2; + return value; + }; - // ----- Reading ------ + // types/ints/int32 /** - * Reads a string. - * @returns {string} - * @private + * Writes a 32bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ - ParserPrototype._readString = function() { - var value = "", - token, - delim; - do { - delim = this.tn.next(); - if (delim !== "'" && delim !== '"') - throw Error("illegal string delimiter: "+delim); - value += this.tn.next(); - this.tn.skip(delim); - token = this.tn.peek(); - } while (token === '"' || token === '"'); // multi line? - return value; + ByteBufferPrototype.writeInt32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 4; + var capacity4 = this.buffer.byteLength; + if (offset > capacity4) + this.resize((capacity4 *= 2) > offset ? capacity4 : offset); + offset -= 4; + this.view.setInt32(offset, value, this.littleEndian); + if (relative) this.offset += 4; + return this; }; /** - * Reads a value. - * @param {boolean=} mayBeTypeRef - * @returns {number|boolean|string} - * @private + * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ - ParserPrototype._readValue = function(mayBeTypeRef) { - var token = this.tn.peek(), - value; - if (token === '"' || token === "'") - return this._readString(); - this.tn.next(); - if (Lang.NUMBER.test(token)) - return mkNumber(token); - if (Lang.BOOL.test(token)) - return (token.toLowerCase() === 'true'); - if (mayBeTypeRef && Lang.TYPEREF.test(token)) - return token; - throw Error("illegal value: "+token); - - }; - - // ----- Parsing constructs ----- + ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32; /** - * Parses a namespace option. - * @param {!Object} parent Parent definition - * @param {boolean=} isList - * @private + * Reads a 32bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ - ParserPrototype._parseOption = function(parent, isList) { - var token = this.tn.next(), - custom = false; - if (token === '(') { - custom = true; - token = this.tn.next(); - } - if (!Lang.TYPEREF.test(token)) - // we can allow options of the form google.protobuf.* since they will just get ignored anyways - // if (!/google\.protobuf\./.test(token)) // FIXME: Why should that not be a valid typeref? - throw Error("illegal option name: "+token); - var name = token; - if (custom) { // (my_method_option).foo, (my_method_option), some_method_option, (foo.my_option).bar - this.tn.skip(')'); - name = '('+name+')'; - token = this.tn.peek(); - if (Lang.FQTYPEREF.test(token)) { - name += token; - this.tn.next(); - } + ByteBufferPrototype.readInt32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); } - this.tn.skip('='); - this._parseOptionValue(parent, name); - if (!isList) - this.tn.skip(";"); + var value = this.view.getInt32(offset, this.littleEndian); + if (relative) this.offset += 4; + return value; }; /** - * Sets an option on the specified options object. - * @param {!Object.} options - * @param {string} name - * @param {string|number|boolean} value - * @inner + * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ - function setOption(options, name, value) { - if (typeof options[name] === 'undefined') - options[name] = value; - else { - if (!Array.isArray(options[name])) - options[name] = [ options[name] ]; - options[name].push(value); - } - } + ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32; /** - * Parses an option value. - * @param {!Object} parent - * @param {string} name - * @private + * Writes a 32bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ - ParserPrototype._parseOptionValue = function(parent, name) { - var token = this.tn.peek(); - if (token !== '{') { // Plain value - setOption(parent["options"], name, this._readValue(true)); - } else { // Aggregate options - this.tn.skip("{"); - while ((token = this.tn.next()) !== '}') { - if (!Lang.NAME.test(token)) - throw Error("illegal option name: " + name + "." + token); - if (this.tn.omit(":")) - setOption(parent["options"], name + "." + token, this._readValue(true)); - else - this._parseOptionValue(parent, name + "." + token); - } + ByteBufferPrototype.writeUint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value >>>= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); } + offset += 4; + var capacity5 = this.buffer.byteLength; + if (offset > capacity5) + this.resize((capacity5 *= 2) > offset ? capacity5 : offset); + offset -= 4; + this.view.setUint32(offset, value, this.littleEndian); + if (relative) this.offset += 4; + return this; }; /** - * Parses a service definition. - * @param {!Object} parent Parent definition - * @private + * Reads a 32bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ - ParserPrototype._parseService = function(parent) { - var token = this.tn.next(); - if (!Lang.NAME.test(token)) - throw Error("illegal service name at line "+this.tn.line+": "+token); - var name = token; - var svc = { - "name": name, - "rpc": {}, - "options": {} - }; - this.tn.skip("{"); - while ((token = this.tn.next()) !== '}') { - if (token === "option") - this._parseOption(svc); - else if (token === 'rpc') - this._parseServiceRPC(svc); - else - throw Error("illegal service token: "+token); + ByteBufferPrototype.readUint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); } - this.tn.omit(";"); - parent["services"].push(svc); + var value = this.view.getUint32(offset, this.littleEndian); + if (relative) this.offset += 4; + return value; }; - /** - * Parses a RPC service definition of the form ['rpc', name, (request), 'returns', (response)]. - * @param {!Object} svc Service definition - * @private - */ - ParserPrototype._parseServiceRPC = function(svc) { - var type = "rpc", - token = this.tn.next(); - if (!Lang.NAME.test(token)) - throw Error("illegal rpc service method name: "+token); - var name = token; - var method = { - "request": null, - "response": null, - "request_stream": false, - "response_stream": false, - "options": {} + // types/ints/int64 + + if (Long) { + + /** + * Writes a 64bit signed integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeInt64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity6 = this.buffer.byteLength; + if (offset > capacity6) + this.resize((capacity6 *= 2) > offset ? capacity6 : offset); + offset -= 8; + if (this.littleEndian) { + this.view.setInt32(offset , value.low , true); + this.view.setInt32(offset+4, value.high, true); + } else { + this.view.setInt32(offset , value.high, false); + this.view.setInt32(offset+4, value.low , false); + } + if (relative) this.offset += 8; + return this; }; - this.tn.skip("("); - token = this.tn.next(); - if (token.toLowerCase() === "stream") { - method["request_stream"] = true; - token = this.tn.next(); - } - if (!Lang.TYPEREF.test(token)) - throw Error("illegal rpc service request type: "+token); - method["request"] = token; - this.tn.skip(")"); - token = this.tn.next(); - if (token.toLowerCase() !== "returns") - throw Error("illegal rpc service request type delimiter: "+token); - this.tn.skip("("); - token = this.tn.next(); - if (token.toLowerCase() === "stream") { - method["response_stream"] = true; - token = this.tn.next(); - } - method["response"] = token; - this.tn.skip(")"); - token = this.tn.peek(); - if (token === '{') { - this.tn.next(); - while ((token = this.tn.next()) !== '}') { - if (token === 'option') - this._parseOption(method); - else - throw Error("illegal rpc service token: " + token); + + /** + * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64; + + /** + * Reads a 64bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readInt64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); } - this.tn.omit(";"); - } else - this.tn.skip(";"); - if (typeof svc[type] === 'undefined') - svc[type] = {}; - svc[type][name] = method; - }; + var value = this.littleEndian + ? new Long(this.view.getInt32(offset , true ), this.view.getInt32(offset+4, true ), false) + : new Long(this.view.getInt32(offset+4, false), this.view.getInt32(offset , false), false); + if (relative) this.offset += 8; + return value; + }; + + /** + * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64; + + /** + * Writes a 64bit unsigned integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeUint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + offset += 8; + var capacity7 = this.buffer.byteLength; + if (offset > capacity7) + this.resize((capacity7 *= 2) > offset ? capacity7 : offset); + offset -= 8; + if (this.littleEndian) { + this.view.setInt32(offset , value.low , true); + this.view.setInt32(offset+4, value.high, true); + } else { + this.view.setInt32(offset , value.high, false); + this.view.setInt32(offset+4, value.low , false); + } + if (relative) this.offset += 8; + return this; + }; + + /** + * Reads a 64bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose + */ + ByteBufferPrototype.readUint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var value = this.littleEndian + ? new Long(this.view.getInt32(offset , true ), this.view.getInt32(offset+4, true ), true) + : new Long(this.view.getInt32(offset+4, false), this.view.getInt32(offset , false), true); + if (relative) this.offset += 8; + return value; + }; + + } // Long + + + // types/floats/float32 /** - * Parses a message definition. - * @param {!Object} parent Parent definition - * @param {!Object=} fld Field definition if this is a group - * @returns {!Object} - * @private + * Writes a 32bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose */ - ParserPrototype._parseMessage = function(parent, fld) { - var isGroup = !!fld, - token = this.tn.next(); - var msg = { - "name": "", - "fields": [], - "enums": [], - "messages": [], - "options": {}, - "services": [], - "oneofs": {} - // "extensions": undefined - }; - if (!Lang.NAME.test(token)) - throw Error("illegal "+(isGroup ? "group" : "message")+" name: "+token); - msg["name"] = token; - if (isGroup) { - this.tn.skip("="); - fld["id"] = mkId(this.tn.next()); - msg["isGroup"] = true; - } - token = this.tn.peek(); - if (token === '[' && fld) - this._parseFieldOptions(fld); - this.tn.skip("{"); - while ((token = this.tn.next()) !== '}') { - if (Lang.RULE.test(token)) - this._parseMessageField(msg, token); - else if (token === "oneof") - this._parseMessageOneOf(msg); - else if (token === "enum") - this._parseEnum(msg); - else if (token === "message") - this._parseMessage(msg); - else if (token === "option") - this._parseOption(msg); - else if (token === "service") - this._parseService(msg); - else if (token === "extensions") - msg["extensions"] = this._parseExtensionRanges(); - else if (token === "reserved") - this._parseIgnored(); // TODO - else if (token === "extend") - this._parseExtend(msg); - else if (Lang.TYPEREF.test(token)) { - if (!this.proto3) - throw Error("illegal field rule: "+token); - this._parseMessageField(msg, "optional", token); - } else - throw Error("illegal message token: "+token); + ByteBufferPrototype.writeFloat32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); } - this.tn.omit(";"); - parent["messages"].push(msg); - return msg; + offset += 4; + var capacity8 = this.buffer.byteLength; + if (offset > capacity8) + this.resize((capacity8 *= 2) > offset ? capacity8 : offset); + offset -= 4; + this.view.setFloat32(offset, value, this.littleEndian); + if (relative) this.offset += 4; + return this; }; /** - * Parses an ignored statement. - * @private + * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32; + + /** + * Reads a 32bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose */ - ParserPrototype._parseIgnored = function() { - while (this.tn.peek() !== ';') - this.tn.next(); - this.tn.skip(";"); + ByteBufferPrototype.readFloat32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var value = this.view.getFloat32(offset, this.littleEndian); + if (relative) this.offset += 4; + return value; }; /** - * Parses a message field. - * @param {!Object} msg Message definition - * @param {string} rule Field rule - * @param {string=} type Field type if already known (never known for maps) - * @returns {!Object} Field descriptor - * @private + * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose */ - ParserPrototype._parseMessageField = function(msg, rule, type) { - if (!Lang.RULE.test(rule)) - throw Error("illegal message field rule: "+rule); - var fld = { - "rule": rule, - "type": "", - "name": "", - "options": {}, - "id": 0 - }; - var token; - if (rule === "map") { + ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32; - if (type) - throw Error("illegal type: " + type); - this.tn.skip('<'); - token = this.tn.next(); - if (!Lang.TYPE.test(token) && !Lang.TYPEREF.test(token)) - throw Error("illegal message field type: " + token); - fld["keytype"] = token; - this.tn.skip(','); - token = this.tn.next(); - if (!Lang.TYPE.test(token) && !Lang.TYPEREF.test(token)) - throw Error("illegal message field: " + token); - fld["type"] = token; - this.tn.skip('>'); - token = this.tn.next(); - if (!Lang.NAME.test(token)) - throw Error("illegal message field name: " + token); - fld["name"] = token; - this.tn.skip("="); - fld["id"] = mkId(this.tn.next()); - token = this.tn.peek(); - if (token === '[') - this._parseFieldOptions(fld); - this.tn.skip(";"); + // types/floats/float64 - } else { + /** + * Writes a 64bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeFloat64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number') + throw TypeError("Illegal value: "+value+" (not a number)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + offset += 8; + var capacity9 = this.buffer.byteLength; + if (offset > capacity9) + this.resize((capacity9 *= 2) > offset ? capacity9 : offset); + offset -= 8; + this.view.setFloat64(offset, value, this.littleEndian); + if (relative) this.offset += 8; + return this; + }; - type = typeof type !== 'undefined' ? type : this.tn.next(); + /** + * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64; - if (type === "group") { + /** + * Reads a 64bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readFloat64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 8 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+8+") <= "+this.buffer.byteLength); + } + var value = this.view.getFloat64(offset, this.littleEndian); + if (relative) this.offset += 8; + return value; + }; - // "A [legacy] group simply combines a nested message type and a field into a single declaration. In your - // code, you can treat this message just as if it had a Result type field called result (the latter name is - // converted to lower-case so that it does not conflict with the former)." - var grp = this._parseMessage(msg, fld); - if (!/^[A-Z]/.test(grp["name"])) - throw Error('illegal group name: '+grp["name"]); - fld["type"] = grp["name"]; - fld["name"] = grp["name"].toLowerCase(); - this.tn.omit(";"); + /** + * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose + */ + ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64; - } else { - if (!Lang.TYPE.test(type) && !Lang.TYPEREF.test(type)) - throw Error("illegal message field type: " + type); - fld["type"] = type; - token = this.tn.next(); - if (!Lang.NAME.test(token)) - throw Error("illegal message field name: " + token); - fld["name"] = token; - this.tn.skip("="); - fld["id"] = mkId(this.tn.next()); - token = this.tn.peek(); - if (token === "[") - this._parseFieldOptions(fld); - this.tn.skip(";"); + // types/varints/varint32 - } - } - msg["fields"].push(fld); - return fld; - }; + /** + * Maximum number of bytes required to store a 32bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT32_BYTES = 5; /** - * Parses a message oneof. - * @param {!Object} msg Message definition - * @private + * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. + * @param {number} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} + * @expose */ - ParserPrototype._parseMessageOneOf = function(msg) { - var token = this.tn.next(); - if (!Lang.NAME.test(token)) - throw Error("illegal oneof name: "+token); - var name = token, - fld; - var fields = []; - this.tn.skip("{"); - while ((token = this.tn.next()) !== "}") { - fld = this._parseMessageField(msg, "optional", token); - fld["oneof"] = name; - fields.push(fld["id"]); - } - this.tn.omit(";"); - msg["oneofs"][name] = fields; + ByteBuffer.calculateVarint32 = function(value) { + // ref: src/google/protobuf/io/coded_stream.cc + value = value >>> 0; + if (value < 1 << 7 ) return 1; + else if (value < 1 << 14) return 2; + else if (value < 1 << 21) return 3; + else if (value < 1 << 28) return 4; + else return 5; }; /** - * Parses a set of field option definitions. - * @param {!Object} fld Field definition - * @private + * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. + * @param {number} n Signed 32bit integer + * @returns {number} Unsigned zigzag encoded 32bit integer + * @expose */ - ParserPrototype._parseFieldOptions = function(fld) { - this.tn.skip("["); - var token, - first = true; - while ((token = this.tn.peek()) !== ']') { - if (!first) - this.tn.skip(","); - this._parseOption(fld, true); - first = false; - } - this.tn.next(); + ByteBuffer.zigZagEncode32 = function(n) { + return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h }; /** - * Parses an enum. - * @param {!Object} msg Message definition - * @private + * Decodes a zigzag encoded signed 32bit integer. + * @param {number} n Unsigned zigzag encoded 32bit integer + * @returns {number} Signed 32bit integer + * @expose */ - ParserPrototype._parseEnum = function(msg) { - var enm = { - "name": "", - "values": [], - "options": {} - }; - var token = this.tn.next(); - if (!Lang.NAME.test(token)) - throw Error("illegal name: "+token); - enm["name"] = token; - this.tn.skip("{"); - while ((token = this.tn.next()) !== '}') { - if (token === "option") - this._parseOption(enm); - else { - if (!Lang.NAME.test(token)) - throw Error("illegal name: "+token); - this.tn.skip("="); - var val = { - "name": token, - "id": mkId(this.tn.next(), true) - }; - token = this.tn.peek(); - if (token === "[") - this._parseFieldOptions({ "options": {} }); - this.tn.skip(";"); - enm["values"].push(val); - } - } - this.tn.omit(";"); - msg["enums"].push(enm); + ByteBuffer.zigZagDecode32 = function(n) { + return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h }; /** - * Parses extension / reserved ranges. - * @returns {!Array.>} - * @private + * Writes a 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose */ - ParserPrototype._parseExtensionRanges = function() { - var ranges = []; - var token, - range, - value; - do { - range = []; - while (true) { - token = this.tn.next(); - switch (token) { - case "min": - value = ProtoBuf.ID_MIN; - break; - case "max": - value = ProtoBuf.ID_MAX; - break; - default: - value = mkNumber(token); - break; - } - range.push(value); - if (range.length === 2) - break; - if (this.tn.peek() !== "to") { - range.push(value); - break; + ByteBufferPrototype.writeVarint32 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var size = ByteBuffer.calculateVarint32(value), + b; + offset += size; + var capacity10 = this.buffer.byteLength; + if (offset > capacity10) + this.resize((capacity10 *= 2) > offset ? capacity10 : offset); + offset -= size; + // ref: http://code.google.com/searchframe#WTeibokF6gE/trunk/src/google/protobuf/io/coded_stream.cc + this.view.setUint8(offset, b = value | 0x80); + value >>>= 0; + if (value >= 1 << 7) { + b = (value >> 7) | 0x80; + this.view.setUint8(offset+1, b); + if (value >= 1 << 14) { + b = (value >> 14) | 0x80; + this.view.setUint8(offset+2, b); + if (value >= 1 << 21) { + b = (value >> 21) | 0x80; + this.view.setUint8(offset+3, b); + if (value >= 1 << 28) { + this.view.setUint8(offset+4, (value >> 28) & 0x0F); + size = 5; + } else { + this.view.setUint8(offset+3, b & 0x7F); + size = 4; + } + } else { + this.view.setUint8(offset+2, b & 0x7F); + size = 3; } - this.tn.next(); + } else { + this.view.setUint8(offset+1, b & 0x7F); + size = 2; } - ranges.push(range); - } while (this.tn.omit(",")); - this.tn.skip(";"); - return ranges; + } else { + this.view.setUint8(offset, b & 0x7F); + size = 1; + } + if (relative) { + this.offset += size; + return this; + } + return size; }; /** - * Parses an extend block. - * @param {!Object} parent Parent object - * @private + * Writes a zig-zag encoded 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose */ - ParserPrototype._parseExtend = function(parent) { - var token = this.tn.next(); - if (!Lang.TYPEREF.test(token)) - throw Error("illegal extend reference: "+token); - var ext = { - "ref": token, - "fields": [] - }; - this.tn.skip("{"); - while ((token = this.tn.next()) !== '}') { - if (Lang.RULE.test(token)) - this._parseMessageField(ext, token); - else if (Lang.TYPEREF.test(token)) { - if (!this.proto3) - throw Error("illegal field rule: "+token); - this._parseMessageField(ext, "optional", token); - } else - throw Error("illegal extend token: "+token); - } - this.tn.omit(";"); - parent["messages"].push(ext); - return ext; + ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) { + return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset); }; - // ----- General ----- - /** - * Returns a string representation of this parser. - * @returns {string} + * Reads a 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available + * to fully decode the varint. + * @expose */ - ParserPrototype.toString = function() { - return "Parser at line "+this.tn.line; + ByteBufferPrototype.readVarint32 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + // ref: src/google/protobuf/io/coded_stream.cc + var size = 0, + value = 0 >>> 0, + temp, + ioffset; + do { + ioffset = offset+size; + if (!this.noAssert && ioffset > this.limit) { + var err = Error("Truncated"); + err['truncated'] = true; + throw err; + } + temp = this.view.getUint8(ioffset); + if (size < 5) + value |= ((temp&0x7F)<<(7*size)) >>> 0; + ++size; + } while ((temp & 0x80) === 0x80); + value = value | 0; // Make sure to discard the higher order bits + if (relative) { + this.offset += size; + return value; + } + return { + "value": value, + "length": size + }; }; /** - * @alias ProtoBuf.DotProto.Parser + * Reads a zig-zag encoded 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint * @expose */ - DotProto.Parser = Parser; + ByteBufferPrototype.readVarint32ZigZag = function(offset) { + var val = this.readVarint32(offset); + if (typeof val === 'object') + val["value"] = ByteBuffer.zigZagDecode32(val["value"]); + else + val = ByteBuffer.zigZagDecode32(val); + return val; + }; - return DotProto; + // types/varints/varint64 - })(ProtoBuf, ProtoBuf.Lang); + if (Long) { - /** - * @alias ProtoBuf.Reflect - * @expose - */ - ProtoBuf.Reflect = (function(ProtoBuf) { - "use strict"; + /** + * Maximum number of bytes required to store a 64bit base 128 variable-length integer. + * @type {number} + * @const + * @expose + */ + ByteBuffer.MAX_VARINT64_BYTES = 10; - /** - * Reflection types. - * @exports ProtoBuf.Reflect - * @namespace - */ - var Reflect = {}; + /** + * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. + * @param {number|!Long} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} + * @expose + */ + ByteBuffer.calculateVarint64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + // ref: src/google/protobuf/io/coded_stream.cc + var part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + if (part2 == 0) { + if (part1 == 0) { + if (part0 < 1 << 14) + return part0 < 1 << 7 ? 1 : 2; + else + return part0 < 1 << 21 ? 3 : 4; + } else { + if (part1 < 1 << 14) + return part1 < 1 << 7 ? 5 : 6; + else + return part1 < 1 << 21 ? 7 : 8; + } + } else + return part2 < 1 << 7 ? 9 : 10; + }; - /** - * Constructs a Reflect base class. - * @exports ProtoBuf.Reflect.T - * @constructor - * @abstract - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {?ProtoBuf.Reflect.T} parent Parent object - * @param {string} name Object name - */ - var T = function(builder, parent, name) { + /** + * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. + * @param {number|!Long} value Signed long + * @returns {!Long} Unsigned zigzag encoded long + * @expose + */ + ByteBuffer.zigZagEncode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned(); + }; /** - * Builder reference. - * @type {!ProtoBuf.Builder} + * Decodes a zigzag encoded signed 64bit integer. + * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number + * @returns {!Long} Signed long * @expose */ - this.builder = builder; + ByteBuffer.zigZagDecode64 = function(value) { + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + // ref: src/google/protobuf/wire_format_lite.h + return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned(); + }; /** - * Parent object. - * @type {?ProtoBuf.Reflect.T} + * Writes a 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. * @expose */ - this.parent = parent; + ByteBufferPrototype.writeVarint64 = function(value, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof value === 'number') + value = Long.fromNumber(value); + else if (typeof value === 'string') + value = Long.fromString(value); + else if (!(value && value instanceof Long)) + throw TypeError("Illegal value: "+value+" (not an integer or Long)"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (typeof value === 'number') + value = Long.fromNumber(value, false); + else if (typeof value === 'string') + value = Long.fromString(value, false); + else if (value.unsigned !== false) value = value.toSigned(); + var size = ByteBuffer.calculateVarint64(value), + part0 = value.toInt() >>> 0, + part1 = value.shiftRightUnsigned(28).toInt() >>> 0, + part2 = value.shiftRightUnsigned(56).toInt() >>> 0; + offset += size; + var capacity11 = this.buffer.byteLength; + if (offset > capacity11) + this.resize((capacity11 *= 2) > offset ? capacity11 : offset); + offset -= size; + switch (size) { + case 10: this.view.setUint8(offset+9, (part2 >>> 7) & 0x01); + case 9 : this.view.setUint8(offset+8, size !== 9 ? (part2 ) | 0x80 : (part2 ) & 0x7F); + case 8 : this.view.setUint8(offset+7, size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F); + case 7 : this.view.setUint8(offset+6, size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F); + case 6 : this.view.setUint8(offset+5, size !== 6 ? (part1 >>> 7) | 0x80 : (part1 >>> 7) & 0x7F); + case 5 : this.view.setUint8(offset+4, size !== 5 ? (part1 ) | 0x80 : (part1 ) & 0x7F); + case 4 : this.view.setUint8(offset+3, size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F); + case 3 : this.view.setUint8(offset+2, size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F); + case 2 : this.view.setUint8(offset+1, size !== 2 ? (part0 >>> 7) | 0x80 : (part0 >>> 7) & 0x7F); + case 1 : this.view.setUint8(offset , size !== 1 ? (part0 ) | 0x80 : (part0 ) & 0x7F); + } + if (relative) { + this.offset += size; + return this; + } else { + return size; + } + }; /** - * Object name in namespace. - * @type {string} + * Writes a zig-zag encoded 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. * @expose */ - this.name = name; + ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) { + return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset); + }; /** - * Fully qualified class name - * @type {string} + * Reads a 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint * @expose */ - this.className; - }; + ByteBufferPrototype.readVarint64 = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + // ref: src/google/protobuf/io/coded_stream.cc + var start = offset, + part0 = 0, + part1 = 0, + part2 = 0, + b = 0; + b = this.view.getUint8(offset++); part0 = (b & 0x7F) ; if (b & 0x80) { + b = this.view.getUint8(offset++); part0 |= (b & 0x7F) << 7; if (b & 0x80) { + b = this.view.getUint8(offset++); part0 |= (b & 0x7F) << 14; if (b & 0x80) { + b = this.view.getUint8(offset++); part0 |= (b & 0x7F) << 21; if (b & 0x80) { + b = this.view.getUint8(offset++); part1 = (b & 0x7F) ; if (b & 0x80) { + b = this.view.getUint8(offset++); part1 |= (b & 0x7F) << 7; if (b & 0x80) { + b = this.view.getUint8(offset++); part1 |= (b & 0x7F) << 14; if (b & 0x80) { + b = this.view.getUint8(offset++); part1 |= (b & 0x7F) << 21; if (b & 0x80) { + b = this.view.getUint8(offset++); part2 = (b & 0x7F) ; if (b & 0x80) { + b = this.view.getUint8(offset++); part2 |= (b & 0x7F) << 7; if (b & 0x80) { + throw Error("Buffer overrun"); }}}}}}}}}} + var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false); + if (relative) { + this.offset = offset; + return value; + } else { + return { + 'value': value, + 'length': offset-start + }; + } + }; - /** - * @alias ProtoBuf.Reflect.T.prototype - * @inner - */ - var TPrototype = T.prototype; + /** + * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose + */ + ByteBufferPrototype.readVarint64ZigZag = function(offset) { + var val = this.readVarint64(offset); + if (val && val['value'] instanceof Long) + val["value"] = ByteBuffer.zigZagDecode64(val["value"]); + else + val = ByteBuffer.zigZagDecode64(val); + return val; + }; - /** - * Returns the fully qualified name of this object. - * @returns {string} Fully qualified name as of ".PATH.TO.THIS" - * @expose - */ - TPrototype.fqn = function() { - var name = this.name, - ptr = this; - do { - ptr = ptr.parent; - if (ptr == null) - break; - name = ptr.name+"."+name; - } while (true); - return name; - }; + } // Long + + + // types/strings/cstring /** - * Returns a string representation of this Reflect object (its fully qualified name). - * @param {boolean=} includeClass Set to true to include the class name. Defaults to false. - * @return String representation + * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL + * characters itself. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * contained in `str` + 1 if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written * @expose */ - TPrototype.toString = function(includeClass) { - return (includeClass ? this.className + " " : "") + this.fqn(); + ByteBufferPrototype.writeCString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + var i, + k = str.length; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + for (i=0; i>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + // UTF8 strings do not contain zero bytes in between except for the zero character, so: + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k+1; + var capacity12 = this.buffer.byteLength; + if (offset > capacity12) + this.resize((capacity12 *= 2) > offset ? capacity12 : offset); + offset -= k+1; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view.setUint8(offset++, b); + }.bind(this)); + this.view.setUint8(offset++, 0); + if (relative) { + this.offset = offset; + return this; + } + return k; }; /** - * Builds this type. - * @throws {Error} If this type cannot be built directly + * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters + * itself. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. * @expose */ - TPrototype.build = function() { - throw Error(this.toString(true)+" cannot be built directly"); + ByteBufferPrototype.readCString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var start = offset, + temp; + // UTF8 strings do not contain zero bytes in between except for the zero character itself, so: + var sd, b = -1; + utfx.decodeUTF8toUTF16(function() { + if (b === 0) return null; + if (offset >= this.limit) + throw RangeError("Illegal range: Truncated data, "+offset+" < "+this.limit); + return (b = this.view.getUint8(offset++)) === 0 ? null : b; + }.bind(this), sd = stringDestination(), true); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } }; - /** - * @alias ProtoBuf.Reflect.T - * @expose - */ - Reflect.T = T; + // types/strings/istring /** - * Constructs a new Namespace. - * @exports ProtoBuf.Reflect.Namespace - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {?ProtoBuf.Reflect.Namespace} parent Namespace parent - * @param {string} name Namespace name - * @param {Object.=} options Namespace options - * @param {string?} syntax The syntax level of this definition (e.g., proto3) - * @constructor - * @extends ProtoBuf.Reflect.T + * Writes a length as uint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 */ - var Namespace = function(builder, parent, name, options, syntax) { - T.call(this, builder, parent, name); - - /** - * @override - */ - this.className = "Namespace"; - - /** - * Children inside the namespace. - * @type {!Array.} - */ - this.children = []; - - /** - * Options. - * @type {!Object.} - */ - this.options = options || {}; - - /** - * Syntax level (e.g., proto2 or proto3). - * @type {!string} - */ - this.syntax = syntax || "proto2"; + ByteBufferPrototype.writeIString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + offset += 4+k; + var capacity13 = this.buffer.byteLength; + if (offset > capacity13) + this.resize((capacity13 *= 2) > offset ? capacity13 : offset); + offset -= 4+k; + this.view.setUint32(offset, k, this.littleEndian); + offset += 4; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view.setUint8(offset++, b); + }.bind(this)); + if (offset !== start + 4 + k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+4+k)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; }; /** - * @alias ProtoBuf.Reflect.Namespace.prototype - * @inner - */ - var NamespacePrototype = Namespace.prototype = Object.create(T.prototype); - - /** - * Returns an array of the namespace's children. - * @param {ProtoBuf.Reflect.T=} type Filter type (returns instances of this type only). Defaults to null (all children). - * @return {Array.} + * Reads a length as uint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. * @expose + * @see ByteBuffer#readVarint32 */ - NamespacePrototype.getChildren = function(type) { - type = type || null; - if (type == null) - return this.children.slice(); - var children = []; - for (var i=0, k=this.children.length; i>>= 0; + if (offset < 0 || offset + 4 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+4+") <= "+this.buffer.byteLength); + } + var temp = 0, + start = offset, + str; + temp = this.view.getUint32(offset, this.littleEndian); + offset += 4; + var k = offset + temp, + sd; + utfx.decodeUTF8toUTF16(function() { + return offset < k ? this.view.getUint8(offset++) : null; + }.bind(this), sd = stringDestination(), this.noAssert); + str = sd(); + if (relative) { + this.offset = offset; + return str; + } else { + return { + 'string': str, + 'length': offset - start + }; + } }; + // types/strings/utf8string + /** - * Adds a child to the namespace. - * @param {ProtoBuf.Reflect.T} child Child - * @throws {Error} If the child cannot be added (duplicate) + * Metrics representing number of UTF8 characters. Evaluates to `c`. + * @type {string} + * @const * @expose */ - NamespacePrototype.addChild = function(child) { - var other; - if (other = this.getChild(child.name)) { - // Try to revert camelcase transformation on collision - if (other instanceof Message.Field && other.name !== other.originalName && this.getChild(other.originalName) === null) - other.name = other.originalName; // Revert previous first (effectively keeps both originals) - else if (child instanceof Message.Field && child.name !== child.originalName && this.getChild(child.originalName) === null) - child.name = child.originalName; - else - throw Error("Duplicate name in namespace "+this.toString(true)+": "+child.name); - } - this.children.push(child); - }; + ByteBuffer.METRICS_CHARS = 'c'; /** - * Gets a child by its name or id. - * @param {string|number} nameOrId Child name or id - * @return {?ProtoBuf.Reflect.T} The child or null if not found + * Metrics representing number of bytes. Evaluates to `b`. + * @type {string} + * @const * @expose */ - NamespacePrototype.getChild = function(nameOrId) { - var key = typeof nameOrId === 'number' ? 'id' : 'name'; - for (var i=0, k=this.children.length; i} qn Qualified name to resolve - * @param {boolean=} excludeNonNamespace Excludes non-namespace types, defaults to `false` - * @return {?ProtoBuf.Reflect.Namespace} The resolved type or null if not found + * Writes an UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. * @expose */ - NamespacePrototype.resolve = function(qn, excludeNonNamespace) { - var part = typeof qn === 'string' ? qn.split(".") : qn, - ptr = this, - i = 0; - if (part[i] === "") { // Fully qualified name, e.g. ".My.Message' - while (ptr.parent !== null) - ptr = ptr.parent; - i++; + ByteBufferPrototype.writeUTF8String = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); } - var child; - do { - do { - if (!(ptr instanceof Reflect.Namespace)) { - ptr = null; - break; - } - child = ptr.getChild(part[i]); - if (!child || !(child instanceof Reflect.T) || (excludeNonNamespace && !(child instanceof Reflect.Namespace))) { - ptr = null; - break; - } - ptr = child; i++; - } while (i < part.length); - if (ptr != null) - break; // Found - // Else search the parent - if (this.parent !== null) - return this.parent.resolve(qn, excludeNonNamespace); - } while (ptr != null); - return ptr; + var k; + var start = offset; + k = utfx.calculateUTF16asUTF8(stringSource(str))[1]; + offset += k; + var capacity14 = this.buffer.byteLength; + if (offset > capacity14) + this.resize((capacity14 *= 2) > offset ? capacity14 : offset); + offset -= k; + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view.setUint8(offset++, b); + }.bind(this)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; }; /** - * Determines the shortest qualified name of the specified type, if any, relative to this namespace. - * @param {!ProtoBuf.Reflect.T} t Reflection type - * @returns {string} The shortest qualified name or, if there is none, the fqn + * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}. + * @function + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. * @expose */ - NamespacePrototype.qn = function(t) { - var part = [], ptr = t; - do { - part.unshift(ptr.name); - ptr = ptr.parent; - } while (ptr !== null); - for (var len=1; len <= part.length; len++) { - var qn = part.slice(part.length-len); - if (t === this.resolve(qn, t instanceof Reflect.Namespace)) - return qn.join("."); - } - return t.fqn(); - }; + ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String; /** - * Builds the namespace and returns the runtime counterpart. - * @return {Object.} Runtime namespace + * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's + * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. + * @function + * @param {string} str String to calculate + * @returns {number} Number of UTF8 characters * @expose */ - NamespacePrototype.build = function() { - /** @dict */ - var ns = {}; - var children = this.children; - for (var i=0, k=children.length, child; i} + * Calculates the number of UTF8 bytes of a string. + * @function + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose */ - NamespacePrototype.buildOpt = function() { - var opt = {}, - keys = Object.keys(this.options); - for (var i=0, k=keys.length; i}null} Option value or NULL if there is no such option + * Reads an UTF8 encoded string. + * @param {number} length Number of characters or bytes to read. + * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose */ - NamespacePrototype.getOption = function(name) { - if (typeof name === 'undefined') - return this.options; - return typeof this.options[name] !== 'undefined' ? this.options[name] : null; + ByteBufferPrototype.readUTF8String = function(length, metrics, offset) { + if (typeof metrics === 'number') { + offset = metrics; + metrics = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS; + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var i = 0, + start = offset, + sd; + if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser + sd = stringDestination(); + utfx.decodeUTF8(function() { + return i < length && offset < this.limit ? this.view.getUint8(offset++) : null; + }.bind(this), function(cp) { + ++i; utfx.UTF8toUTF16(cp, sd); + }.bind(this)); + if (i !== length) + throw RangeError("Illegal range: Truncated data, "+i+" == "+length); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + "string": sd(), + "length": offset - start + }; + } + } else if (metrics === ByteBuffer.METRICS_BYTES) { + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + length > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength); + } + var k = offset + length; + utfx.decodeUTF8toUTF16(function() { + return offset < k ? this.view.getUint8(offset++) : null; + }.bind(this), sd = stringDestination(), this.noAssert); + if (offset !== k) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+k); + if (relative) { + this.offset = offset; + return sd(); + } else { + return { + 'string': sd(), + 'length': offset - start + }; + } + } else + throw TypeError("Unsupported metrics: "+metrics); }; /** - * @alias ProtoBuf.Reflect.Namespace + * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. + * @function + * @param {number} length Number of characters or bytes to read + * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. * @expose */ - Reflect.Namespace = Namespace; + ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String; + + // types/strings/vstring /** - * Constructs a new Element implementation that checks and converts values for a - * particular field type, as appropriate. - * - * An Element represents a single value: either the value of a singular field, - * or a value contained in one entry of a repeated field or map field. This - * class does not implement these higher-level concepts; it only encapsulates - * the low-level typechecking and conversion. - * - * @exports ProtoBuf.Reflect.Element - * @param {{name: string, wireType: number}} type Resolved data type - * @param {ProtoBuf.Reflect.T|null} resolvedType Resolved type, if relevant - * (e.g. submessage field). - * @param {boolean} isMapKey Is this element a Map key? The value will be - * converted to string form if so. - * @param {string} syntax Syntax level of defining message type, e.g., - * proto2 or proto3. - * @constructor + * Writes a length as varint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 */ - var Element = function(type, resolvedType, isMapKey, syntax) { - - /** - * Element type, as a string (e.g., int32). - * @type {{name: string, wireType: number}} - */ - this.type = type; - - /** - * Element type reference to submessage or enum definition, if needed. - * @type {ProtoBuf.Reflect.T|null} - */ - this.resolvedType = resolvedType; - - /** - * Element is a map key. - * @type {boolean} - */ - this.isMapKey = isMapKey; - - /** - * Syntax level of defining message type, e.g., proto2 or proto3. - * @type {string} - */ - this.syntax = syntax; + ByteBufferPrototype.writeVString = function(str, offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + var start = offset, + k, l; + k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1]; + l = ByteBuffer.calculateVarint32(k); + offset += l+k; + var capacity15 = this.buffer.byteLength; + if (offset > capacity15) + this.resize((capacity15 *= 2) > offset ? capacity15 : offset); + offset -= l+k; + offset += this.writeVarint32(k, offset); + utfx.encodeUTF16toUTF8(stringSource(str), function(b) { + this.view.setUint8(offset++, b); + }.bind(this)); + if (offset !== start+k+l) + throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+k+l)); + if (relative) { + this.offset = offset; + return this; + } + return offset - start; + }; - if (isMapKey && ProtoBuf.MAP_KEY_TYPES.indexOf(type) < 0) - throw Error("Invalid map key type: " + type.name); + /** + * Reads a length as varint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 + */ + ByteBufferPrototype.readVString = function(offset) { + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 1 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+1+") <= "+this.buffer.byteLength); + } + var temp = this.readVarint32(offset), + start = offset, + str; + offset += temp['length']; + temp = temp['value']; + var k = offset + temp, + sd = stringDestination(); + utfx.decodeUTF8toUTF16(function() { + return offset < k ? this.view.getUint8(offset++) : null; + }.bind(this), sd, this.noAssert); + str = sd(); + if (relative) { + this.offset = offset; + return str; + } else { + return { + 'string': str, + 'length': offset - start + }; + } }; - var ElementPrototype = Element.prototype; /** - * Obtains a (new) default value for the specified type. - * @param type {string|{name: string, wireType: number}} Field type - * @returns {*} Default value - * @inner + * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended + * data's length. + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` + * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` */ - function mkDefault(type) { - if (typeof type === 'string') - type = ProtoBuf.TYPES[type]; - if (typeof type.defaultValue === 'undefined') - throw Error("default value for type "+type.name+" is not supported"); - if (type == ProtoBuf.TYPES["bytes"]) - return new ByteBuffer(0); - return type.defaultValue; - } + ByteBufferPrototype.append = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var length = source.limit - source.offset; + if (length <= 0) return this; // Nothing to append + offset += length; + var capacity16 = this.buffer.byteLength; + if (offset > capacity16) + this.resize((capacity16 *= 2) > offset ? capacity16 : offset); + offset -= length; + new Uint8Array(this.buffer, offset).set(new Uint8Array(source.buffer).subarray(source.offset, source.limit)); + source.offset += length; + if (relative) this.offset += length; + return this; + }; /** - * Returns the default value for this field in proto3. - * @function - * @param type {string|{name: string, wireType: number}} the field type - * @returns {*} Default value + * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the + specified offset up to the length of this ByteBuffer's data. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#append */ - Element.defaultFieldValue = mkDefault; + ByteBufferPrototype.appendTo = function(target, offset) { + target.append(this, offset); + return this; + }; /** - * Makes a Long from a value. - * @param {{low: number, high: number, unsigned: boolean}|string|number} value Value - * @param {boolean=} unsigned Whether unsigned or not, defaults to reuse it from Long-like objects or to signed for - * strings and numbers - * @returns {!Long} - * @throws {Error} If the value cannot be converted to a Long - * @inner + * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to + * disable them if your code already makes sure that everything is valid. + * @param {boolean} assert `true` to enable assertions, otherwise `false` + * @returns {!ByteBuffer} this + * @expose */ - function mkLong(value, unsigned) { - if (value && typeof value.low === 'number' && typeof value.high === 'number' && typeof value.unsigned === 'boolean' - && value.low === value.low && value.high === value.high) - return new ProtoBuf.Long(value.low, value.high, typeof unsigned === 'undefined' ? value.unsigned : unsigned); - if (typeof value === 'string') - return ProtoBuf.Long.fromString(value, unsigned || false, 10); - if (typeof value === 'number') - return ProtoBuf.Long.fromNumber(value, unsigned || false); - throw Error("not convertible to Long"); - } + ByteBufferPrototype.assert = function(assert) { + this.noAssert = !assert; + return this; + }; /** - * Checks if the given value can be set for an element of this type (singular - * field or one element of a repeated field or map). - * @param {*} value Value to check - * @return {*} Verified, maybe adjusted, value - * @throws {Error} If the value cannot be verified for this element slot + * Gets the capacity of this ByteBuffer's backing buffer. + * @returns {number} Capacity of the backing buffer * @expose */ - ElementPrototype.verifyValue = function(value) { - var self = this; - function fail(val, msg) { - throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); - } - switch (this.type) { - // Signed 32bit - case ProtoBuf.TYPES["int32"]: - case ProtoBuf.TYPES["sint32"]: - case ProtoBuf.TYPES["sfixed32"]: - // Account for !NaN: value === value - if (typeof value !== 'number' || (value === value && value % 1 !== 0)) - fail(typeof value, "not an integer"); - return value > 4294967295 ? value | 0 : value; - - // Unsigned 32bit - case ProtoBuf.TYPES["uint32"]: - case ProtoBuf.TYPES["fixed32"]: - if (typeof value !== 'number' || (value === value && value % 1 !== 0)) - fail(typeof value, "not an integer"); - return value < 0 ? value >>> 0 : value; - - // Signed 64bit - case ProtoBuf.TYPES["int64"]: - case ProtoBuf.TYPES["sint64"]: - case ProtoBuf.TYPES["sfixed64"]: { - if (ProtoBuf.Long) - try { - return mkLong(value, false); - } catch (e) { - fail(typeof value, e.message); - } - else - fail(typeof value, "requires Long.js"); - } - - // Unsigned 64bit - case ProtoBuf.TYPES["uint64"]: - case ProtoBuf.TYPES["fixed64"]: { - if (ProtoBuf.Long) - try { - return mkLong(value, true); - } catch (e) { - fail(typeof value, e.message); - } - else - fail(typeof value, "requires Long.js"); - } - - // Bool - case ProtoBuf.TYPES["bool"]: - if (typeof value !== 'boolean') - fail(typeof value, "not a boolean"); - return value; - - // Float - case ProtoBuf.TYPES["float"]: - case ProtoBuf.TYPES["double"]: - if (typeof value !== 'number') - fail(typeof value, "not a number"); - return value; - - // Length-delimited string - case ProtoBuf.TYPES["string"]: - if (typeof value !== 'string' && !(value && value instanceof String)) - fail(typeof value, "not a string"); - return ""+value; // Convert String object to string - - // Length-delimited bytes - case ProtoBuf.TYPES["bytes"]: - if (ByteBuffer.isByteBuffer(value)) - return value; - return ByteBuffer.wrap(value, "base64"); - - // Constant enum value - case ProtoBuf.TYPES["enum"]: { - var values = this.resolvedType.getChildren(ProtoBuf.Reflect.Enum.Value); - for (i=0; i 4294967295 || value < 0) - fail(typeof value, "not in range for uint32") - return value; - } else { - // proto2 requires enum values to be valid. - fail(value, "not a valid enum value"); - } - } - // Embedded message - case ProtoBuf.TYPES["group"]: - case ProtoBuf.TYPES["message"]: { - if (!value || typeof value !== 'object') - fail(typeof value, "object expected"); - if (value instanceof this.resolvedType.clazz) - return value; - if (value instanceof ProtoBuf.Builder.Message) { - // Mismatched type: Convert to object (see: https://github.com/dcodeIO/ProtoBuf.js/issues/180) - var obj = {}; - for (var i in value) - if (value.hasOwnProperty(i)) - obj[i] = value[i]; - value = obj; - } - // Else let's try to construct one from a key-value object - return new (this.resolvedType.clazz)(value); // May throw for a hundred of reasons - } - } + ByteBufferPrototype.capacity = function() { + return this.buffer.byteLength; + }; - // We should never end here - throw Error("[INTERNAL] Illegal value for "+this.toString(true)+": "+value+" (undefined type "+this.type+")"); + /** + * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the + * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.clear = function() { + this.offset = 0; + this.limit = this.buffer.byteLength; + this.markedOffset = -1; + return this; }; /** - * Calculates the byte length of an element on the wire. - * @param {number} id Field number - * @param {*} value Field value - * @returns {number} Byte length - * @throws {Error} If the value cannot be calculated + * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset}, + * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}. + * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false` + * @returns {!ByteBuffer} Cloned instance * @expose */ - ElementPrototype.calculateLength = function(id, value) { - if (value === null) return 0; // Nothing to encode - // Tag has already been written - var n; - switch (this.type) { - case ProtoBuf.TYPES["int32"]: - return value < 0 ? ByteBuffer.calculateVarint64(value) : ByteBuffer.calculateVarint32(value); - case ProtoBuf.TYPES["uint32"]: - return ByteBuffer.calculateVarint32(value); - case ProtoBuf.TYPES["sint32"]: - return ByteBuffer.calculateVarint32(ByteBuffer.zigZagEncode32(value)); - case ProtoBuf.TYPES["fixed32"]: - case ProtoBuf.TYPES["sfixed32"]: - case ProtoBuf.TYPES["float"]: - return 4; - case ProtoBuf.TYPES["int64"]: - case ProtoBuf.TYPES["uint64"]: - return ByteBuffer.calculateVarint64(value); - case ProtoBuf.TYPES["sint64"]: - return ByteBuffer.calculateVarint64(ByteBuffer.zigZagEncode64(value)); - case ProtoBuf.TYPES["fixed64"]: - case ProtoBuf.TYPES["sfixed64"]: - return 8; - case ProtoBuf.TYPES["bool"]: - return 1; - case ProtoBuf.TYPES["enum"]: - return ByteBuffer.calculateVarint32(value); - case ProtoBuf.TYPES["double"]: - return 8; - case ProtoBuf.TYPES["string"]: - n = ByteBuffer.calculateUTF8Bytes(value); - return ByteBuffer.calculateVarint32(n) + n; - case ProtoBuf.TYPES["bytes"]: - if (value.remaining() < 0) - throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); - return ByteBuffer.calculateVarint32(value.remaining()) + value.remaining(); - case ProtoBuf.TYPES["message"]: - n = this.resolvedType.calculate(value); - return ByteBuffer.calculateVarint32(n) + n; - case ProtoBuf.TYPES["group"]: - n = this.resolvedType.calculate(value); - return n + ByteBuffer.calculateVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); + ByteBufferPrototype.clone = function(copy) { + var bb = new ByteBuffer(0, this.littleEndian, this.noAssert); + if (copy) { + var buffer = new ArrayBuffer(this.buffer.byteLength); + new Uint8Array(buffer).set(this.buffer); + bb.buffer = buffer; + bb.view = new DataView(buffer); + } else { + bb.buffer = this.buffer; + bb.view = this.view; } - // We should never end here - throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); + bb.offset = this.offset; + bb.markedOffset = this.markedOffset; + bb.limit = this.limit; + return bb; }; /** - * Encodes a value to the specified buffer. Does not encode the key. - * @param {number} id Field number - * @param {*} value Field value - * @param {ByteBuffer} buffer ByteBuffer to encode to - * @return {ByteBuffer} The ByteBuffer for chaining - * @throws {Error} If the value cannot be encoded + * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes + * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and + * adapt {@link ByteBuffer#markedOffset} to the same relative position if set. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this * @expose */ - ElementPrototype.encodeValue = function(id, value, buffer) { - if (value === null) return buffer; // Nothing to encode - // Tag has already been written - - switch (this.type) { - // 32bit signed varint - case ProtoBuf.TYPES["int32"]: - // "If you use int32 or int64 as the type for a negative number, the resulting varint is always ten bytes - // long – it is, effectively, treated like a very large unsigned integer." (see #122) - if (value < 0) - buffer.writeVarint64(value); - else - buffer.writeVarint32(value); - break; - - // 32bit unsigned varint - case ProtoBuf.TYPES["uint32"]: - buffer.writeVarint32(value); - break; - - // 32bit varint zig-zag - case ProtoBuf.TYPES["sint32"]: - buffer.writeVarint32ZigZag(value); - break; - - // Fixed unsigned 32bit - case ProtoBuf.TYPES["fixed32"]: - buffer.writeUint32(value); - break; - - // Fixed signed 32bit - case ProtoBuf.TYPES["sfixed32"]: - buffer.writeInt32(value); - break; - - // 64bit varint as-is - case ProtoBuf.TYPES["int64"]: - case ProtoBuf.TYPES["uint64"]: - buffer.writeVarint64(value); // throws - break; - - // 64bit varint zig-zag - case ProtoBuf.TYPES["sint64"]: - buffer.writeVarint64ZigZag(value); // throws - break; - - // Fixed unsigned 64bit - case ProtoBuf.TYPES["fixed64"]: - buffer.writeUint64(value); // throws - break; - - // Fixed signed 64bit - case ProtoBuf.TYPES["sfixed64"]: - buffer.writeInt64(value); // throws - break; - - // Bool - case ProtoBuf.TYPES["bool"]: - if (typeof value === 'string') - buffer.writeVarint32(value.toLowerCase() === 'false' ? 0 : !!value); - else - buffer.writeVarint32(value ? 1 : 0); - break; - - // Constant enum value - case ProtoBuf.TYPES["enum"]: - buffer.writeVarint32(value); - break; - - // 32bit float - case ProtoBuf.TYPES["float"]: - buffer.writeFloat32(value); - break; - - // 64bit float - case ProtoBuf.TYPES["double"]: - buffer.writeFloat64(value); - break; - - // Length-delimited string - case ProtoBuf.TYPES["string"]: - buffer.writeVString(value); - break; - - // Length-delimited bytes - case ProtoBuf.TYPES["bytes"]: - if (value.remaining() < 0) - throw Error("Illegal value for "+this.toString(true)+": "+value.remaining()+" bytes remaining"); - var prevOffset = value.offset; - buffer.writeVarint32(value.remaining()); - buffer.append(value); - value.offset = prevOffset; - break; - - // Embedded message - case ProtoBuf.TYPES["message"]: - var bb = new ByteBuffer().LE(); - this.resolvedType.encode(value, bb); - buffer.writeVarint32(bb.offset); - buffer.append(bb.flip()); - break; - - // Legacy group - case ProtoBuf.TYPES["group"]: - this.resolvedType.encode(value, buffer); - buffer.writeVarint32((id << 3) | ProtoBuf.WIRE_TYPES.ENDGROUP); - break; - - default: - // We should never end here - throw Error("[INTERNAL] Illegal value to encode in "+this.toString(true)+": "+value+" (unknown type)"); + ByteBufferPrototype.compact = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); } - return buffer; + if (begin === 0 && end === this.buffer.byteLength) + return this; // Already compacted + var len = end - begin; + if (len === 0) { + this.buffer = EMPTY_BUFFER; + this.view = null; + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = 0; + return this; + } + var buffer = new ArrayBuffer(len); + new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(begin, end)); + this.buffer = buffer; + this.view = new DataView(buffer); + if (this.markedOffset >= 0) this.markedOffset -= begin; + this.offset = 0; + this.limit = len; + return this; }; /** - * Decode one element value from the specified buffer. - * @param {ByteBuffer} buffer ByteBuffer to decode from - * @param {number} wireType The field wire type - * @param {number} id The field number - * @return {*} Decoded value - * @throws {Error} If the field cannot be decoded + * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Copy * @expose */ - ElementPrototype.decode = function(buffer, wireType, id) { - if (wireType != this.type.wireType) - throw Error("Unexpected wire type for element"); - - var value, nBytes; - switch (this.type) { - // 32bit signed varint - case ProtoBuf.TYPES["int32"]: - return buffer.readVarint32() | 0; - - // 32bit unsigned varint - case ProtoBuf.TYPES["uint32"]: - return buffer.readVarint32() >>> 0; - - // 32bit signed varint zig-zag - case ProtoBuf.TYPES["sint32"]: - return buffer.readVarint32ZigZag() | 0; - - // Fixed 32bit unsigned - case ProtoBuf.TYPES["fixed32"]: - return buffer.readUint32() >>> 0; - - case ProtoBuf.TYPES["sfixed32"]: - return buffer.readInt32() | 0; - - // 64bit signed varint - case ProtoBuf.TYPES["int64"]: - return buffer.readVarint64(); + ByteBufferPrototype.copy = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return new ByteBuffer(0, this.littleEndian, this.noAssert); + var capacity = end - begin, + bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert); + bb.offset = 0; + bb.limit = capacity; + if (bb.markedOffset >= 0) bb.markedOffset -= begin; + this.copyTo(bb, 0, begin, end); + return bb; + }; - // 64bit unsigned varint - case ProtoBuf.TYPES["uint64"]: - return buffer.readVarint64().toUnsigned(); + /** + * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} + * by the number of bytes copied if omitted. + * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the + * number of bytes copied if omitted. + * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) { + var relative, + targetRelative; + if (!this.noAssert) { + if (!ByteBuffer.isByteBuffer(target)) + throw TypeError("Illegal target: Not a ByteBuffer"); + } + targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0; + sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0; + sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0; - // 64bit signed varint zig-zag - case ProtoBuf.TYPES["sint64"]: - return buffer.readVarint64ZigZag(); + if (targetOffset < 0 || targetOffset > target.buffer.byteLength) + throw RangeError("Illegal target range: 0 <= "+targetOffset+" <= "+target.buffer.byteLength); + if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength) + throw RangeError("Illegal source range: 0 <= "+sourceOffset+" <= "+this.buffer.byteLength); - // Fixed 64bit unsigned - case ProtoBuf.TYPES["fixed64"]: - return buffer.readUint64(); + var len = sourceLimit - sourceOffset; + if (len === 0) + return target; // Nothing to copy - // Fixed 64bit signed - case ProtoBuf.TYPES["sfixed64"]: - return buffer.readInt64(); + target.ensureCapacity(targetOffset + len); - // Bool varint - case ProtoBuf.TYPES["bool"]: - return !!buffer.readVarint32(); + new Uint8Array(target.buffer).set(new Uint8Array(this.buffer).subarray(sourceOffset, sourceLimit), targetOffset); - // Constant enum value (varint) - case ProtoBuf.TYPES["enum"]: - // The following Builder.Message#set will already throw - return buffer.readVarint32(); + if (relative) this.offset += len; + if (targetRelative) target.offset += len; - // 32bit float - case ProtoBuf.TYPES["float"]: - return buffer.readFloat(); + return this; + }; - // 64bit float - case ProtoBuf.TYPES["double"]: - return buffer.readDouble(); + /** + * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the + * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, + * the required capacity will be used instead. + * @param {number} capacity Required capacity + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.ensureCapacity = function(capacity) { + var current = this.buffer.byteLength; + if (current < capacity) + return this.resize((current *= 2) > capacity ? current : capacity); + return this; + }; - // Length-delimited string - case ProtoBuf.TYPES["string"]: - return buffer.readVString(); + /** + * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {number|string} value Byte value to fill with. If given as a string, the first character is used. + * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} this + * @expose + * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes + */ + ByteBufferPrototype.fill = function(value, begin, end) { + var relative = typeof begin === 'undefined'; + if (relative) begin = this.offset; + if (typeof value === 'string' && value.length > 0) + value = value.charCodeAt(0); + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof value !== 'number' || value % 1 !== 0) + throw TypeError("Illegal value: "+value+" (not an integer)"); + value |= 0; + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin >= end) + return this; // Nothing to fill + while (begin < end) this.view.setUint8(begin++, value); + if (relative) this.offset = begin; + return this; + }; - // Length-delimited bytes - case ProtoBuf.TYPES["bytes"]: { - nBytes = buffer.readVarint32(); - if (buffer.remaining() < nBytes) - throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); - value = buffer.clone(); // Offset already set - value.limit = value.offset+nBytes; - buffer.offset += nBytes; - return value; - } + /** + * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and + * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.flip = function() { + this.limit = this.offset; + this.offset = 0; + return this; + }; + /** + * Marks an offset on this ByteBuffer to be used later. + * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}. + * @returns {!ByteBuffer} this + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @see ByteBuffer#reset + * @expose + */ + ByteBufferPrototype.mark = function(offset) { + offset = typeof offset === 'undefined' ? this.offset : offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); + } + this.markedOffset = offset; + return this; + }; + /** + * Sets the byte order. + * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.order = function(littleEndian) { + if (!this.noAssert) { + if (typeof littleEndian !== 'boolean') + throw TypeError("Illegal littleEndian: Not a boolean"); + } + this.littleEndian = !!littleEndian; + return this; + }; - // Length-delimited embedded message - case ProtoBuf.TYPES["message"]: { - nBytes = buffer.readVarint32(); - return this.resolvedType.decode(buffer, nBytes); - } + /** + * Switches (to) little endian byte order. + * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.LE = function(littleEndian) { + this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true; + return this; + }; - // Legacy group - case ProtoBuf.TYPES["group"]: - return this.resolvedType.decode(buffer, -1, id); + /** + * Switches (to) big endian byte order. + * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian + * @returns {!ByteBuffer} this + * @expose + */ + ByteBufferPrototype.BE = function(bigEndian) { + this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false; + return this; + }; + /** + * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be + * modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` + * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` + */ + ByteBufferPrototype.prepend = function(source, encoding, offset) { + if (typeof encoding === 'number' || typeof encoding !== 'string') { + offset = encoding; + encoding = undefined; + } + var relative = typeof offset === 'undefined'; + if (relative) offset = this.offset; + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: "+offset+" (not an integer)"); + offset >>>= 0; + if (offset < 0 || offset + 0 > this.buffer.byteLength) + throw RangeError("Illegal offset: 0 <= "+offset+" (+"+0+") <= "+this.buffer.byteLength); } - - // We should never end here - throw Error("[INTERNAL] Illegal decode type"); + if (!(source instanceof ByteBuffer)) + source = ByteBuffer.wrap(source, encoding); + var len = source.limit - source.offset; + if (len <= 0) return this; // Nothing to prepend + var diff = len - offset; + var arrayView; + if (diff > 0) { // Not enough space before offset, so resize + move + var buffer = new ArrayBuffer(this.buffer.byteLength + diff); + arrayView = new Uint8Array(buffer); + arrayView.set(new Uint8Array(this.buffer).subarray(offset, this.buffer.byteLength), len); + this.buffer = buffer; + this.view = new DataView(buffer); + this.offset += diff; + if (this.markedOffset >= 0) this.markedOffset += diff; + this.limit += diff; + offset += diff; + } else { + arrayView = new Uint8Array(this.buffer); + } + arrayView.set(new Uint8Array(source.buffer).subarray(source.offset, source.limit), offset - len); + source.offset = source.limit; + if (relative) + this.offset -= len; + return this; }; /** - * Converts a value from a string to the canonical element type. - * - * Legal only when isMapKey is true. - * - * @param {string} str The string value - * @returns {*} The value + * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#prepend */ - ElementPrototype.valueFromString = function(str) { - if (!this.isMapKey) { - throw Error("valueFromString() called on non-map-key element"); - } - - switch (this.type) { - case ProtoBuf.TYPES["int32"]: - case ProtoBuf.TYPES["sint32"]: - case ProtoBuf.TYPES["sfixed32"]: - case ProtoBuf.TYPES["uint32"]: - case ProtoBuf.TYPES["fixed32"]: - return this.verifyValue(parseInt(str)); - - case ProtoBuf.TYPES["int64"]: - case ProtoBuf.TYPES["sint64"]: - case ProtoBuf.TYPES["sfixed64"]: - case ProtoBuf.TYPES["uint64"]: - case ProtoBuf.TYPES["fixed64"]: - // Long-based fields support conversions from string already. - return this.verifyValue(str); - - case ProtoBuf.TYPES["bool"]: - return str === "true"; - - case ProtoBuf.TYPES["string"]: - return this.verifyValue(str); + ByteBufferPrototype.prependTo = function(target, offset) { + target.prepend(this, offset); + return this; + }; + /** + * Prints debug information about this ByteBuffer's contents. + * @param {function(string)=} out Output function to call, defaults to console.log + * @expose + */ + ByteBufferPrototype.printDebug = function(out) { + if (typeof out !== 'function') out = console.log.bind(console); + out( + this.toString()+"\n"+ + "-------------------------------------------------------------------\n"+ + this.toDebug(/* columns */ true) + ); + }; - case ProtoBuf.TYPES["bytes"]: - return ByteBuffer.fromBinary(str); + /** + * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}, so this returns `limit - offset`. + * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. + * @expose + */ + ByteBufferPrototype.remaining = function() { + return this.limit - this.offset; + }; + /** + * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} + * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been + * marked, sets `offset = 0`. + * @returns {!ByteBuffer} this + * @see ByteBuffer#mark + * @expose + */ + ByteBufferPrototype.reset = function() { + if (this.markedOffset >= 0) { + this.offset = this.markedOffset; + this.markedOffset = -1; + } else { + this.offset = 0; } + return this; }; - /** - * Converts a value from the canonical element type to a string. - * - * It should be the case that `valueFromString(valueToString(val))` returns - * a value equivalent to `verifyValue(val)` for every legal value of `val` - * according to this element type. - * - * This may be used when the element must be stored or used as a string, - * e.g., as a map key on an Object. - * - * Legal only when isMapKey is true. - * - * @param {*} val The value - * @returns {string} The string form of the value. + * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that + * large or larger. + * @param {number} capacity Capacity required + * @returns {!ByteBuffer} this + * @throws {TypeError} If `capacity` is not a number + * @throws {RangeError} If `capacity < 0` + * @expose */ - ElementPrototype.valueToString = function(value) { - if (!this.isMapKey) { - throw Error("valueToString() called on non-map-key element"); + ByteBufferPrototype.resize = function(capacity) { + if (!this.noAssert) { + if (typeof capacity !== 'number' || capacity % 1 !== 0) + throw TypeError("Illegal capacity: "+capacity+" (not an integer)"); + capacity |= 0; + if (capacity < 0) + throw RangeError("Illegal capacity: 0 <= "+capacity); } - - if (this.type === ProtoBuf.TYPES["bytes"]) { - return value.toString("binary"); - } else { - return value.toString(); + if (this.buffer.byteLength < capacity) { + var buffer = new ArrayBuffer(capacity); + new Uint8Array(buffer).set(new Uint8Array(this.buffer)); + this.buffer = buffer; + this.view = new DataView(buffer); } + return this; }; - /** - * @alias ProtoBuf.Reflect.Element + * Reverses this ByteBuffer's contents. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this * @expose */ - Reflect.Element = Element; - + ByteBufferPrototype.reverse = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return this; // Nothing to reverse + Array.prototype.reverse.call(new Uint8Array(this.buffer).subarray(begin, end)); + this.view = new DataView(this.buffer); // FIXME: Why exactly is this necessary? + return this; + }; /** - * Constructs a new Message. - * @exports ProtoBuf.Reflect.Message - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {!ProtoBuf.Reflect.Namespace} parent Parent message or namespace - * @param {string} name Message name - * @param {Object.=} options Message options - * @param {boolean=} isGroup `true` if this is a legacy group - * @param {string?} syntax The syntax level of this definition (e.g., proto3) - * @constructor - * @extends ProtoBuf.Reflect.Namespace + * Skips the next `length` bytes. This will just advance + * @param {number} length Number of bytes to skip. May also be negative to move the offset back. + * @returns {!ByteBuffer} this + * @expose */ - var Message = function(builder, parent, name, options, isGroup, syntax) { - Namespace.call(this, builder, parent, name, options, syntax); - - /** - * @override - */ - this.className = "Message"; - - /** - * Extensions range. - * @type {!Array.|undefined} - * @expose - */ - this.extensions = undefined; - - /** - * Runtime message class. - * @type {?function(new:ProtoBuf.Builder.Message)} - * @expose - */ - this.clazz = null; - - /** - * Whether this is a legacy group or not. - * @type {boolean} - * @expose - */ - this.isGroup = !!isGroup; - - // The following cached collections are used to efficiently iterate over or look up fields when decoding. - - /** - * Cached fields. - * @type {?Array.} - * @private - */ - this._fields = null; - - /** - * Cached fields by id. - * @type {?Object.} - * @private - */ - this._fieldsById = null; - - /** - * Cached fields by name. - * @type {?Object.} - * @private - */ - this._fieldsByName = null; + ByteBufferPrototype.skip = function(length) { + if (!this.noAssert) { + if (typeof length !== 'number' || length % 1 !== 0) + throw TypeError("Illegal length: "+length+" (not an integer)"); + length |= 0; + } + var offset = this.offset + length; + if (!this.noAssert) { + if (offset < 0 || offset > this.buffer.byteLength) + throw RangeError("Illegal length: 0 <= "+this.offset+" + "+length+" <= "+this.buffer.byteLength); + } + this.offset = offset; + return this; }; /** - * @alias ProtoBuf.Reflect.Message.prototype - * @inner + * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} + * @expose */ - var MessagePrototype = Message.prototype = Object.create(Namespace.prototype); - + ByteBufferPrototype.slice = function(begin, end) { + if (typeof begin === 'undefined') begin = this.offset; + if (typeof end === 'undefined') end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var bb = this.clone(); + bb.offset = begin; + bb.limit = end; + return bb; + }; /** - * Builds the message and returns the runtime counterpart, which is a fully functional class. - * @see ProtoBuf.Builder.Message - * @param {boolean=} rebuild Whether to rebuild or not, defaults to false - * @return {ProtoBuf.Reflect.Message} Message class - * @throws {Error} If the message cannot be built + * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will transparently {@link ByteBuffer#flip} this + * ByteBuffer if `offset > limit` but the actual offsets remain untouched. + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if + * possible. Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer * @expose */ - MessagePrototype.build = function(rebuild) { - if (this.clazz && !rebuild) - return this.clazz; - - // Create the runtime Message class in its own scope - var clazz = (function(ProtoBuf, T) { - - var fields = T.getChildren(ProtoBuf.Reflect.Message.Field), - oneofs = T.getChildren(ProtoBuf.Reflect.Message.OneOf); - - /** - * Constructs a new runtime Message. - * @name ProtoBuf.Builder.Message - * @class Barebone of all runtime messages. - * @param {!Object.|string} values Preset values - * @param {...string} var_args - * @constructor - * @throws {Error} If the message cannot be created - */ - var Message = function(values, var_args) { - ProtoBuf.Builder.Message.call(this); - - // Create virtual oneof properties - for (var i=0, k=oneofs.length; i 0) { - var value; - // Set field values from a values object - if (arguments.length === 1 && values !== null && typeof values === 'object' && - /* not _another_ Message */ (typeof values.encode !== 'function' || values instanceof Message) && - /* not a repeated field */ !Array.isArray(values) && - /* not a Map */ !(values instanceof ProtoBuf.Map) && - /* not a ByteBuffer */ !ByteBuffer.isByteBuffer(values) && - /* not an ArrayBuffer */ !(values instanceof ArrayBuffer) && - /* not a Long */ !(ProtoBuf.Long && values instanceof ProtoBuf.Long)) { - this.$set(values); - } else // Set field values from arguments, in declaration order - for (i=0, k=arguments.length; i} keyOrObj String key or plain object holding multiple values - * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted - * @param {boolean=} noAssert Whether to not assert for an actual field / proper value type, defaults to `false` - * @returns {!ProtoBuf.Builder.Message} this - * @throws {Error} If the value cannot be set - * @expose - */ - MessagePrototype.set = function(keyOrObj, value, noAssert) { - if (keyOrObj && typeof keyOrObj === 'object') { - noAssert = value; - for (var ikey in keyOrObj) - if (keyOrObj.hasOwnProperty(ikey) && typeof (value = keyOrObj[ikey]) !== 'undefined') - this.$set(ikey, value, noAssert); - return this; - } - var field = T._fieldsByName[keyOrObj]; - if (!noAssert) { - if (!field) - throw Error(this+"#"+keyOrObj+" is not a field: undefined"); - if (!(field instanceof ProtoBuf.Reflect.Message.Field)) - throw Error(this+"#"+keyOrObj+" is not a field: "+field.toString(true)); - this[field.name] = (value = field.verifyValue(value)); // May throw - } else - this[keyOrObj] = value; - if (field && field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) - var currentField = this[field.oneof.name]; // Virtual field references currently set field - if (value !== null) { - if (currentField !== null && currentField !== field.name) - this[currentField] = null; // Clear currently set field - this[field.oneof.name] = field.name; // Point virtual field at this field - } else if (/* value === null && */currentField === keyOrObj) - this[field.oneof.name] = null; // Clear virtual field (current field explicitly cleared) - } - return this; - }; - - /** - * Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}. - * @name ProtoBuf.Builder.Message#$set - * @function - * @param {string|!Object.} keyOrObj String key or plain object holding multiple values - * @param {(*|boolean)=} value Value to set if key is a string, otherwise omitted - * @param {boolean=} noAssert Whether to not assert the value, defaults to `false` - * @throws {Error} If the value cannot be set - * @expose - */ - MessagePrototype.$set = MessagePrototype.set; - - /** - * Gets a field's value. - * @name ProtoBuf.Builder.Message#get - * @function - * @param {string} key Key - * @param {boolean=} noAssert Whether to not assert for an actual field, defaults to `false` - * @return {*} Value - * @throws {Error} If there is no such field - * @expose - */ - MessagePrototype.get = function(key, noAssert) { - if (noAssert) - return this[key]; - var field = T._fieldsByName[key]; - if (!field || !(field instanceof ProtoBuf.Reflect.Message.Field)) - throw Error(this+"#"+key+" is not a field: undefined"); - if (!(field instanceof ProtoBuf.Reflect.Message.Field)) - throw Error(this+"#"+key+" is not a field: "+field.toString(true)); - return this[field.name]; - }; - - /** - * Gets a field's value. This is an alias for {@link ProtoBuf.Builder.Message#$get}. - * @name ProtoBuf.Builder.Message#$get - * @function - * @param {string} key Key - * @return {*} Value - * @throws {Error} If there is no such field - * @expose - */ - MessagePrototype.$get = MessagePrototype.get; - - // Getters and setters + ByteBufferPrototype.toBuffer = function(forceCopy) { + var offset = this.offset, + limit = this.limit; + if (offset > limit) { + var t = offset; + offset = limit; + limit = t; + } + if (!this.noAssert) { + if (typeof offset !== 'number' || offset % 1 !== 0) + throw TypeError("Illegal offset: Not an integer"); + offset >>>= 0; + if (typeof limit !== 'number' || limit % 1 !== 0) + throw TypeError("Illegal limit: Not an integer"); + limit >>>= 0; + if (offset < 0 || offset > limit || limit > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+offset+" <= "+limit+" <= "+this.buffer.byteLength); + } + // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is + // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So: + if (!forceCopy && offset === 0 && limit === this.buffer.byteLength) { + return this.buffer; + } + if (offset === limit) { + return EMPTY_BUFFER; + } + var buffer = new ArrayBuffer(limit - offset); + new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0); + return buffer; + }; - for (var i=0; i limit` but the actual offsets remain untouched. This is an alias of + * {@link ByteBuffer#toBuffer}. + * @function + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. + * Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose + */ + ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer; - if (T.builder.options['populateAccessors']) - (function(field) { - // set/get[SomeValue] - var Name = field.originalName.replace(/(_[a-zA-Z])/g, function(match) { - return match.toUpperCase().replace('_',''); - }); - Name = Name.substring(0,1).toUpperCase() + Name.substring(1); - // set/get_[some_value] FIXME: Do we really need these? - var name = field.originalName.replace(/([A-Z])/g, function(match) { - return "_"+match; - }); + /** + * Converts the ByteBuffer's contents to a string. + * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows + * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with + * highlighted offsets. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {string} String representation + * @throws {Error} If `encoding` is invalid + * @expose + */ + ByteBufferPrototype.toString = function(encoding, begin, end) { + if (typeof encoding === 'undefined') + return "ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")"; + if (typeof encoding === 'number') + encoding = "utf8", + begin = encoding, + end = begin; + switch (encoding) { + case "utf8": + return this.toUTF8(begin, end); + case "base64": + return this.toBase64(begin, end); + case "hex": + return this.toHex(begin, end); + case "binary": + return this.toBinary(begin, end); + case "debug": + return this.toDebug(); + case "columns": + return this.toColumns(); + default: + throw Error("Unsupported encoding: "+encoding); + } + }; - /** - * The current field's unbound setter function. - * @function - * @param {*} value - * @param {boolean=} noAssert - * @returns {!ProtoBuf.Builder.Message} - * @inner - */ - var setter = function(value, noAssert) { - this[field.name] = noAssert ? value : field.verifyValue(value); - return this; - }; + // lxiv-embeddable - /** - * The current field's unbound getter function. - * @function - * @returns {*} - * @inner - */ - var getter = function() { - return this[field.name]; - }; + /** + * lxiv-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/lxiv for details + */ + var lxiv = function() { + "use strict"; - if (T.getChild("set"+Name) === null) - /** - * Sets a value. This method is present for each field, but only if there is no name conflict with - * another field. - * @name ProtoBuf.Builder.Message#set[SomeField] - * @function - * @param {*} value Value to set - * @param {boolean=} noAssert Whether to not assert the value, defaults to `false` - * @returns {!ProtoBuf.Builder.Message} this - * @abstract - * @throws {Error} If the value cannot be set - */ - MessagePrototype["set"+Name] = setter; + /** + * lxiv namespace. + * @type {!Object.} + * @exports lxiv + */ + var lxiv = {}; - if (T.getChild("set_"+name) === null) - /** - * Sets a value. This method is present for each field, but only if there is no name conflict with - * another field. - * @name ProtoBuf.Builder.Message#set_[some_field] - * @function - * @param {*} value Value to set - * @param {boolean=} noAssert Whether to not assert the value, defaults to `false` - * @returns {!ProtoBuf.Builder.Message} this - * @abstract - * @throws {Error} If the value cannot be set - */ - MessagePrototype["set_"+name] = setter; + /** + * Character codes for output. + * @type {!Array.} + * @inner + */ + var aout = [ + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 + ]; - if (T.getChild("get"+Name) === null) - /** - * Gets a value. This method is present for each field, but only if there is no name conflict with - * another field. - * @name ProtoBuf.Builder.Message#get[SomeField] - * @function - * @abstract - * @return {*} The value - */ - MessagePrototype["get"+Name] = getter; + /** + * Character codes for input. + * @type {!Array.} + * @inner + */ + var ain = []; + for (var i=0, k=aout.length; i>2)&0x3f]); + t = (b&0x3)<<4; + if ((b = src()) !== null) { + t |= (b>>4)&0xf; + dst(aout[(t|((b>>4)&0xf))&0x3f]); + t = (b&0xf)<<2; + if ((b = src()) !== null) + dst(aout[(t|((b>>6)&0x3))&0x3f]), + dst(aout[b&0x3f]); + else + dst(aout[t&0x3f]), + dst(61); + } else + dst(aout[t&0x3f]), + dst(61), + dst(61); + } + }; - })(field); + /** + * Decodes base64 char codes to bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + * @throws {Error} If a character code is invalid + */ + lxiv.decode = function(src, dst) { + var c, t1, t2; + function fail(c) { + throw Error("Illegal character code: "+c); + } + while ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') fail(c); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') fail(c); + dst((t1<<2)>>>0|(t2&0x30)>>4); + if ((c = src()) !== null) { + t1 = ain[c]; + if (typeof t1 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2); + if ((c = src()) !== null) { + t2 = ain[c]; + if (typeof t2 === 'undefined') + if (c === 61) break; else fail(c); + dst(((t1&0x3)<<6)>>>0|t2); + } + } + } } + }; - // En-/decoding + /** + * Tests if a string is valid base64. + * @param {string} str String to test + * @returns {boolean} `true` if valid, otherwise `false` + */ + lxiv.test = function(str) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str); + }; - /** - * Encodes the message. - * @name ProtoBuf.Builder.Message#$encode - * @function - * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. - * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` - * @return {!ByteBuffer} Encoded message as a ByteBuffer - * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still - * returns the encoded ByteBuffer in the `encoded` property on the error. - * @expose - * @see ProtoBuf.Builder.Message#encode64 - * @see ProtoBuf.Builder.Message#encodeHex - * @see ProtoBuf.Builder.Message#encodeAB - */ - MessagePrototype.encode = function(buffer, noVerify) { - if (typeof buffer === 'boolean') - noVerify = buffer, - buffer = undefined; - var isNew = false; - if (!buffer) - buffer = new ByteBuffer(), - isNew = true; - var le = buffer.littleEndian; - try { - T.encode(this, buffer.LE(), noVerify); - return (isNew ? buffer.flip() : buffer).LE(le); - } catch (e) { - buffer.LE(le); - throw(e); - } - }; + return lxiv; + }(); - /** - * Encodes a message using the specified data payload. - * @param {!Object.} data Data payload - * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. - * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` - * @return {!ByteBuffer} Encoded message as a ByteBuffer - * @expose - */ - Message.encode = function(data, buffer, noVerify) { - return new Message(data).encode(buffer, noVerify); - }; + // encodings/base64 - /** - * Calculates the byte length of the message. - * @name ProtoBuf.Builder.Message#calculate - * @function - * @returns {number} Byte length - * @throws {Error} If the message cannot be calculated or if required fields are missing. - * @expose - */ - MessagePrototype.calculate = function() { - return T.calculate(this); - }; + /** + * Encodes this ByteBuffer's contents to a base64 encoded string. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. + * @returns {string} Base64 encoded string + * @expose + */ + ByteBufferPrototype.toBase64 = function(begin, end) { + if (typeof begin === 'undefined') + begin = this.offset; + if (typeof end === 'undefined') + end = this.limit; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var sd; lxiv.encode(function() { + return begin < end ? this.view.getUint8(begin++) : null; + }.bind(this), sd = stringDestination()); + return sd(); + }; - /** - * Encodes the varint32 length-delimited message. - * @name ProtoBuf.Builder.Message#encodeDelimited - * @function - * @param {(!ByteBuffer|boolean)=} buffer ByteBuffer to encode to. Will create a new one and flip it if omitted. - * @param {boolean=} noVerify Whether to not verify field values, defaults to `false` - * @return {!ByteBuffer} Encoded message as a ByteBuffer - * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still - * returns the encoded ByteBuffer in the `encoded` property on the error. - * @expose - */ - MessagePrototype.encodeDelimited = function(buffer, noVerify) { - var isNew = false; - if (!buffer) - buffer = new ByteBuffer(), - isNew = true; - var enc = new ByteBuffer().LE(); - T.encode(this, enc, noVerify).flip(); - buffer.writeVarint32(enc.remaining()); - buffer.append(enc); - return isNew ? buffer.flip() : buffer; - }; + /** + * Decodes a base64 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromBase64 = function(str, littleEndian, noAssert) { + if (!noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (str.length % 4 !== 0) + throw TypeError("Illegal str: Length not a multiple of 4"); + } + var bb = new ByteBuffer(str.length/4*3, littleEndian, noAssert), + i = 0; + lxiv.decode(stringSource(str), function(b) { + bb.view.setUint8(i++, b); + }); + bb.limit = i; + return bb; + }; - /** - * Directly encodes the message to an ArrayBuffer. - * @name ProtoBuf.Builder.Message#encodeAB - * @function - * @return {ArrayBuffer} Encoded message as ArrayBuffer - * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still - * returns the encoded ArrayBuffer in the `encoded` property on the error. - * @expose - */ - MessagePrototype.encodeAB = function() { - try { - return this.encode().toArrayBuffer(); - } catch (e) { - if (e["encoded"]) e["encoded"] = e["encoded"].toArrayBuffer(); - throw(e); - } - }; + /** + * Encodes a binary string to base64 like `window.btoa` does. + * @param {string} str Binary string + * @returns {string} Base64 encoded string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa + * @expose + */ + ByteBuffer.btoa = function(str) { + return ByteBuffer.fromBinary(str).toBase64(); + }; - /** - * Returns the message as an ArrayBuffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeAB}. - * @name ProtoBuf.Builder.Message#toArrayBuffer - * @function - * @return {ArrayBuffer} Encoded message as ArrayBuffer - * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still - * returns the encoded ArrayBuffer in the `encoded` property on the error. - * @expose - */ - MessagePrototype.toArrayBuffer = MessagePrototype.encodeAB; + /** + * Decodes a base64 encoded string to binary like `window.atob` does. + * @param {string} b64 Base64 encoded string + * @returns {string} Binary string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob + * @expose + */ + ByteBuffer.atob = function(b64) { + return ByteBuffer.fromBase64(b64).toBinary(); + }; - /** - * Directly encodes the message to a node Buffer. - * @name ProtoBuf.Builder.Message#encodeNB - * @function - * @return {!Buffer} - * @throws {Error} If the message cannot be encoded, not running under node.js or if required fields are - * missing. The later still returns the encoded node Buffer in the `encoded` property on the error. - * @expose - */ - MessagePrototype.encodeNB = function() { - try { - return this.encode().toBuffer(); - } catch (e) { - if (e["encoded"]) e["encoded"] = e["encoded"].toBuffer(); - throw(e); - } - }; + // encodings/binary - /** - * Returns the message as a node Buffer. This is an alias for {@link ProtoBuf.Builder.Message#encodeNB}. - * @name ProtoBuf.Builder.Message#toBuffer - * @function - * @return {!Buffer} - * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still - * returns the encoded node Buffer in the `encoded` property on the error. - * @expose - */ - MessagePrototype.toBuffer = MessagePrototype.encodeNB; + /** + * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Binary encoded string + * @throws {RangeError} If `offset > limit` + * @expose + */ + ByteBufferPrototype.toBinary = function(begin, end) { + begin = typeof begin === 'undefined' ? this.offset : begin; + end = typeof end === 'undefined' ? this.limit : end; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + if (begin === end) + return ""; + var cc = [], pt = []; + while (begin < end) { + cc.push(this.view.getUint8(begin++)); + if (cc.length >= 1024) + pt.push(String.fromCharCode.apply(String, cc)), + cc = []; + } + return pt.join('') + String.fromCharCode.apply(String, cc); + }; - /** - * Directly encodes the message to a base64 encoded string. - * @name ProtoBuf.Builder.Message#encode64 - * @function - * @return {string} Base64 encoded string - * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later - * still returns the encoded base64 string in the `encoded` property on the error. - * @expose - */ - MessagePrototype.encode64 = function() { - try { - return this.encode().toBase64(); - } catch (e) { - if (e["encoded"]) e["encoded"] = e["encoded"].toBase64(); - throw(e); - } - }; + /** + * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromBinary = function(str, littleEndian, noAssert) { + if (!noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + } + var i = 0, k = str.length, charCode, + bb = new ByteBuffer(k, littleEndian, noAssert); + while (i 255) + throw RangeError("Illegal charCode at "+i+": 0 <= "+charCode+" <= 255"); + bb.view.setUint8(i++, charCode); + } + bb.limit = k; + return bb; + }; - /** - * Returns the message as a base64 encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encode64}. - * @name ProtoBuf.Builder.Message#toBase64 - * @function - * @return {string} Base64 encoded string - * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still - * returns the encoded base64 string in the `encoded` property on the error. - * @expose - */ - MessagePrototype.toBase64 = MessagePrototype.encode64; + // encodings/debug - /** - * Directly encodes the message to a hex encoded string. - * @name ProtoBuf.Builder.Message#encodeHex - * @function - * @return {string} Hex encoded string - * @throws {Error} If the underlying buffer cannot be encoded or if required fields are missing. The later - * still returns the encoded hex string in the `encoded` property on the error. - * @expose - */ - MessagePrototype.encodeHex = function() { - try { - return this.encode().toHex(); - } catch (e) { - if (e["encoded"]) e["encoded"] = e["encoded"].toHex(); - throw(e); + /** + * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: + * * `<` : offset, + * * `'` : markedOffset, + * * `>` : limit, + * * `|` : offset and limit, + * * `[` : offset and markedOffset, + * * `]` : markedOffset and limit, + * * `!` : offset, markedOffset and limit + * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` + * @returns {string|!Array.} Debug string or array of lines if `asArray = true` + * @expose + * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` + * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` + * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` + * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` + */ + ByteBufferPrototype.toDebug = function(columns) { + var i = -1, + k = this.buffer.byteLength, + b, + hex = "", + asc = "", + out = ""; + while (i 32 && b < 127 ? String.fromCharCode(b) : '.'; } - }; - - /** - * Returns the message as a hex encoded string. This is an alias for {@link ProtoBuf.Builder.Message#encodeHex}. - * @name ProtoBuf.Builder.Message#toHex - * @function - * @return {string} Hex encoded string - * @throws {Error} If the message cannot be encoded or if required fields are missing. The later still - * returns the encoded hex string in the `encoded` property on the error. - * @expose - */ - MessagePrototype.toHex = MessagePrototype.encodeHex; + } + ++i; + if (columns) { + if (i > 0 && i % 16 === 0 && i !== k) { + while (hex.length < 3*16+3) hex += " "; + out += hex+asc+"\n"; + hex = asc = ""; + } + } + if (i === this.offset && i === this.limit) + hex += i === this.markedOffset ? "!" : "|"; + else if (i === this.offset) + hex += i === this.markedOffset ? "[" : "<"; + else if (i === this.limit) + hex += i === this.markedOffset ? "]" : ">"; + else + hex += i === this.markedOffset ? "'" : (columns || (i !== 0 && i !== k) ? " " : ""); + } + if (columns && hex !== " ") { + while (hex.length < 3*16+3) hex += " "; + out += hex+asc+"\n"; + } + return columns ? out : hex; + }; - /** - * Clones a message object or field value to a raw object. - * @param {*} obj Object to clone - * @param {boolean} binaryAsBase64 Whether to include binary data as base64 strings or as a buffer otherwise - * @param {boolean} longsAsStrings Whether to encode longs as strings - * @param {!ProtoBuf.Reflect.T=} resolvedType The resolved field type if a field - * @returns {*} Cloned object - * @inner - */ - function cloneRaw(obj, binaryAsBase64, longsAsStrings, resolvedType) { - if (obj === null || typeof obj !== 'object') { - // Convert enum values to their respective names - if (resolvedType && resolvedType instanceof ProtoBuf.Reflect.Enum) { - var name = ProtoBuf.Reflect.Enum.getName(resolvedType.object, obj); - if (name !== null) - return name; + /** + * Decodes a hex encoded string with marked offsets to a ByteBuffer. + * @param {string} str Debug string to decode (not be generated with `columns = true`) + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + * @see ByteBuffer#toDebug + */ + ByteBuffer.fromDebug = function(str, littleEndian, noAssert) { + var k = str.length, + bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert); + var i = 0, j = 0, ch, b, + rs = false, // Require symbol next + ho = false, hm = false, hl = false, // Already has offset, markedOffset, limit? + fail = false; + while (i': + if (!noAssert) { + if (hl) { + fail = true; break; + } + hl = true; + } + bb.limit = j; + rs = false; + break; + case "'": + if (!noAssert) { + if (hm) { + fail = true; break; + } + hm = true; + } + bb.markedOffset = j; + rs = false; + break; + case ' ': + rs = false; + break; + default: + if (!noAssert) { + if (rs) { + fail = true; break; + } + } + b = parseInt(ch+str.charAt(i++), 16); + if (!noAssert) { + if (isNaN(b) || b < 0 || b > 255) + throw TypeError("Illegal str: Not a debug encoded string"); + } + bb.view.setUint8(j++, b); + rs = true; } + if (fail) + throw TypeError("Illegal str: Invalid symbol at "+i); + } + if (!noAssert) { + if (!ho || !hl) + throw TypeError("Illegal str: Missing offset or limit"); + if (j} Raw payload - * @expose - */ - MessagePrototype.toRaw = function(binaryAsBase64, longsAsStrings) { - return cloneRaw(this, !!binaryAsBase64, !!longsAsStrings, this.$type); - }; - - /** - * Encodes a message to JSON. - * @returns {string} JSON string - * @expose - */ - MessagePrototype.encodeJSON = function() { - return JSON.stringify( - cloneRaw(this, - /* binary-as-base64 */ true, - /* longs-as-strings */ true, - this.$type - ) - ); - }; + // encodings/hex - /** - * Decodes a message from the specified buffer or string. - * @name ProtoBuf.Builder.Message.decode - * @function - * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from - * @param {(number|string)=} length Message length. Defaults to decode all the remainig data. - * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 - * @return {!ProtoBuf.Builder.Message} Decoded message - * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still - * returns the decoded message with missing fields in the `decoded` property on the error. - * @expose - * @see ProtoBuf.Builder.Message.decode64 - * @see ProtoBuf.Builder.Message.decodeHex - */ - Message.decode = function(buffer, length, enc) { - if (typeof length === 'string') - enc = length, - length = -1; - if (typeof buffer === 'string') - buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); - buffer = ByteBuffer.isByteBuffer(buffer) ? buffer : ByteBuffer.wrap(buffer); // May throw - var le = buffer.littleEndian; - try { - var msg = T.decode(buffer.LE()); - buffer.LE(le); - return msg; - } catch (e) { - buffer.LE(le); - throw(e); - } - }; + /** + * Encodes this ByteBuffer's contents to a hex encoded string. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Hex encoded string + * @expose + */ + ByteBufferPrototype.toHex = function(begin, end) { + begin = typeof begin === 'undefined' ? this.offset : begin; + end = typeof end === 'undefined' ? this.limit : end; + if (!this.noAssert) { + if (typeof begin !== 'number' || begin % 1 !== 0) + throw TypeError("Illegal begin: Not an integer"); + begin >>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); + } + var out = new Array(end - begin), + b; + while (begin < end) { + b = this.view.getUint8(begin++); + if (b < 0x10) + out.push("0", b.toString(16)); + else out.push(b.toString(16)); + } + return out.join(''); + }; - /** - * Decodes a varint32 length-delimited message from the specified buffer or string. - * @name ProtoBuf.Builder.Message.decodeDelimited - * @function - * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer Buffer to decode from - * @param {string=} enc Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64 - * @return {ProtoBuf.Builder.Message} Decoded message or `null` if not enough bytes are available yet - * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still - * returns the decoded message with missing fields in the `decoded` property on the error. - * @expose - */ - Message.decodeDelimited = function(buffer, enc) { - if (typeof buffer === 'string') - buffer = ByteBuffer.wrap(buffer, enc ? enc : "base64"); - buffer = ByteBuffer.isByteBuffer(buffer) ? buffer : ByteBuffer.wrap(buffer); // May throw - if (buffer.remaining() < 1) - return null; - var off = buffer.offset, - len = buffer.readVarint32(); - if (buffer.remaining() < len) { - buffer.offset = off; - return null; - } - try { - var msg = T.decode(buffer.slice(buffer.offset, buffer.offset + len).LE()); - buffer.offset += len; - return msg; - } catch (err) { - buffer.offset += len; - throw err; - } - }; + /** + * Decodes a hex encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + */ + ByteBuffer.fromHex = function(str, littleEndian, noAssert) { + if (!noAssert) { + if (typeof str !== 'string') + throw TypeError("Illegal str: Not a string"); + if (str.length % 2 !== 0) + throw TypeError("Illegal str: Length not a multiple of 2"); + } + var k = str.length, + bb = new ByteBuffer((k / 2) | 0, littleEndian), + b; + for (var i=0, j=0; i 255) + throw TypeError("Illegal str: Contains non-hex characters"); + bb.view.setUint8(j++, b); + } + bb.limit = j; + return bb; + }; - /** - * Decodes the message from the specified base64 encoded string. - * @name ProtoBuf.Builder.Message.decode64 - * @function - * @param {string} str String to decode from - * @return {!ProtoBuf.Builder.Message} Decoded message - * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still - * returns the decoded message with missing fields in the `decoded` property on the error. - * @expose - */ - Message.decode64 = function(str) { - return Message.decode(str, "base64"); - }; + // utfx-embeddable - /** - * Decodes the message from the specified hex encoded string. - * @name ProtoBuf.Builder.Message.decodeHex - * @function - * @param {string} str String to decode from - * @return {!ProtoBuf.Builder.Message} Decoded message - * @throws {Error} If the message cannot be decoded or if required fields are missing. The later still - * returns the decoded message with missing fields in the `decoded` property on the error. - * @expose - */ - Message.decodeHex = function(str) { - return Message.decode(str, "hex"); - }; + /** + * utfx-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/utfx for details + */ + var utfx = function() { + "use strict"; - /** - * Decodes the message from a JSON string. - * @name ProtoBuf.Builder.Message.decodeJSON - * @function - * @param {string} str String to decode from - * @return {!ProtoBuf.Builder.Message} Decoded message - * @throws {Error} If the message cannot be decoded or if required fields are - * missing. - * @expose - */ - Message.decodeJSON = function(str) { - return new Message(JSON.parse(str)); - }; + /** + * utfx namespace. + * @inner + * @type {!Object.} + */ + var utfx = {}; - // Utility + /** + * Maximum valid code point. + * @type {number} + * @const + */ + utfx.MAX_CODEPOINT = 0x10FFFF; - /** - * Returns a string representation of this Message. - * @name ProtoBuf.Builder.Message#toString - * @function - * @return {string} String representation as of ".Fully.Qualified.MessageName" - * @expose - */ - MessagePrototype.toString = function() { - return T.toString(); - }; + /** + * Encodes UTF8 code points to UTF8 bytes. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte + */ + utfx.encodeUTF8 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, + src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp < 0x80) + dst(cp&0x7F); + else if (cp < 0x800) + dst(((cp>>6)&0x1F)|0xC0), + dst((cp&0x3F)|0x80); + else if (cp < 0x10000) + dst(((cp>>12)&0x0F)|0xE0), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + else + dst(((cp>>18)&0x07)|0xF0), + dst(((cp>>12)&0x3F)|0x80), + dst(((cp>>6)&0x3F)|0x80), + dst((cp&0x3F)|0x80); + cp = null; + } + }; - // Properties + /** + * Decodes UTF8 bytes to UTF8 code points. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the + * remaining bytes. + */ + utfx.decodeUTF8 = function(src, dst) { + var a, b, c, d, fail = function(b) { + b = b.slice(0, b.indexOf(null)); + var err = Error(b.toString()); + err.name = "TruncatedError"; + err['bytes'] = b; + throw err; + }; + while ((a = src()) !== null) { + if ((a&0x80) === 0) + dst(a); + else if ((a&0xE0) === 0xC0) + ((b = src()) === null) && fail([a, b]), + dst(((a&0x1F)<<6) | (b&0x3F)); + else if ((a&0xF0) === 0xE0) + ((b=src()) === null || (c=src()) === null) && fail([a, b, c]), + dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F)); + else if ((a&0xF8) === 0xF0) + ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]), + dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F)); + else throw RangeError("Illegal starting byte: "+a); + } + }; - /** - * Message options. - * @name ProtoBuf.Builder.Message.$options - * @type {Object.} - * @expose - */ - var $optionsS; // cc needs this + /** + * Converts UTF16 characters to UTF8 code points. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Code points destination as a function successively called with each converted code + * point. + */ + utfx.UTF16toUTF8 = function(src, dst) { + var c1, c2 = null; + while (true) { + if ((c1 = c2 !== null ? c2 : src()) === null) + break; + if (c1 >= 0xD800 && c1 <= 0xDFFF) { + if ((c2 = src()) !== null) { + if (c2 >= 0xDC00 && c2 <= 0xDFFF) { + dst((c1-0xD800)*0x400+c2-0xDC00+0x10000); + c2 = null; continue; + } + } + } + dst(c1); + } + if (c2 !== null) dst(c2); + }; - /** - * Message options. - * @name ProtoBuf.Builder.Message#$options - * @type {Object.} - * @expose - */ - var $options; + /** + * Converts UTF8 code points to UTF16 characters. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a code point is out of range + */ + utfx.UTF8toUTF16 = function(src, dst) { + var cp = null; + if (typeof src === 'number') + cp = src, src = function() { return null; }; + while (cp !== null || (cp = src()) !== null) { + if (cp <= 0xFFFF) + dst(cp); + else + cp -= 0x10000, + dst((cp>>10)+0xD800), + dst((cp%0x400)+0xDC00); + cp = null; + } + }; - /** - * Reflection type. - * @name ProtoBuf.Builder.Message.$type - * @type {!ProtoBuf.Reflect.Message} - * @expose - */ - var $typeS; + /** + * Converts and encodes UTF16 characters to UTF8 bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` + * if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + */ + utfx.encodeUTF16toUTF8 = function(src, dst) { + utfx.UTF16toUTF8(src, function(cp) { + utfx.encodeUTF8(cp, dst); + }); + }; - /** - * Reflection type. - * @name ProtoBuf.Builder.Message#$type - * @type {!ProtoBuf.Reflect.Message} - * @expose - */ - var $type; + /** + * Decodes and converts UTF8 bytes to UTF16 characters. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. + */ + utfx.decodeUTF8toUTF16 = function(src, dst) { + utfx.decodeUTF8(src, function(cp) { + utfx.UTF8toUTF16(cp, dst); + }); + }; - if (Object.defineProperty) - Object.defineProperty(Message, '$options', { "value": T.buildOpt() }), - Object.defineProperty(MessagePrototype, "$options", { "value": Message["$options"] }), - Object.defineProperty(Message, "$type", { "value": T }), - Object.defineProperty(MessagePrototype, "$type", { "value": T }); + /** + * Calculates the byte length of an UTF8 code point. + * @param {number} cp UTF8 code point + * @returns {number} Byte length + */ + utfx.calculateCodePoint = function(cp) { + return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4; + }; - return Message; + /** + * Calculates the number of UTF8 bytes required to store UTF8 code points. + * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively + * `null` if there are no more code points left. + * @returns {number} The number of UTF8 bytes required + */ + utfx.calculateUTF8 = function(src) { + var cp, l=0; + while ((cp = src()) !== null) + l += utfx.calculateCodePoint(cp); + return l; + }; - })(ProtoBuf, this); + /** + * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. + * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. + */ + utfx.calculateUTF16asUTF8 = function(src) { + var n=0, l=0; + utfx.UTF16toUTF8(src, function(cp) { + ++n; l += utfx.calculateCodePoint(cp); + }); + return [n,l]; + }; - // Static enums and prototyped sub-messages / cached collections - this._fields = []; - this._fieldsById = {}; - this._fieldsByName = {}; - for (var i=0, k=this.children.length, child; i limit` * @expose */ - MessagePrototype.encode = function(message, buffer, noVerify) { - var fieldMissing = null, - field; - for (var i=0, k=this._fields.length, val; i>>= 0; + if (typeof end !== 'number' || end % 1 !== 0) + throw TypeError("Illegal end: Not an integer"); + end >>>= 0; + if (begin < 0 || begin > end || end > this.buffer.byteLength) + throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength); } - if (fieldMissing !== null) { - var err = Error("Missing at least one required field for "+this.toString(true)+": "+fieldMissing); - err["encoded"] = buffer; // Still expose what we got - throw(err); + var sd; try { + utfx.decodeUTF8toUTF16(function() { + return begin < end ? this.view.getUint8(begin++) : null; + }.bind(this), sd = stringDestination()); + } catch (e) { + if (begin !== end) + throw RangeError("Illegal range: Truncated data, "+begin+" != "+end); } - return buffer; + return sd(); }; /** - * Calculates a runtime message's byte length. - * @param {!ProtoBuf.Builder.Message} message Runtime message to encode - * @returns {number} Byte length - * @throws {Error} If required fields are missing or the message cannot be calculated for another reason + * Decodes an UTF8 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer * @expose */ - MessagePrototype.calculate = function(message) { - for (var n=0, i=0, k=this._fields.length, field, val; i>> 3; - switch (wireType) { - case ProtoBuf.WIRE_TYPES.VARINT: - do tag = buf.readUint8(); - while ((tag & 0x80) === 0x80); - break; - case ProtoBuf.WIRE_TYPES.BITS64: - buf.offset += 8; - break; - case ProtoBuf.WIRE_TYPES.LDELIM: - tag = buf.readVarint32(); // reads the varint - buf.offset += tag; // skips n bytes - break; - case ProtoBuf.WIRE_TYPES.STARTGROUP: - skipTillGroupEnd(id, buf); - break; - case ProtoBuf.WIRE_TYPES.ENDGROUP: - if (id === expectedId) - return false; - else - throw Error("Illegal GROUPEND after unknown group: "+id+" ("+expectedId+" expected)"); - case ProtoBuf.WIRE_TYPES.BITS32: - buf.offset += 4; - break; - default: - throw Error("Illegal wire type in unknown group "+expectedId+": "+wireType); - } - return true; - } + + return ByteBuffer; + } + + /* CommonJS */ if (typeof require === 'function' && typeof module === 'object' && module && typeof exports === 'object' && exports) + module['exports'] = (function() { + var Long; try { Long = require("long"); } catch (e) {} + return loadByteBuffer(Long); + })(); + /* AMD */ else if (typeof define === 'function' && define["amd"]) + define("ByteBuffer", ["Long"], function(Long) { return loadByteBuffer(Long); }); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["ByteBuffer"] = loadByteBuffer(global["dcodeIO"]["Long"]); + +})(this); + +},{"long":51}],51:[function(require,module,exports){ +/* + Copyright 2013 Daniel Wirtz + Copyright 2009 The Closure Library Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS-IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +/** + * @license Long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/Long.js for details + */ +(function(global, factory) { + + /* AMD */ if (typeof define === 'function' && define["amd"]) + define([], factory); + /* CommonJS */ else if (typeof require === 'function' && typeof module === "object" && module && module["exports"]) + module["exports"] = factory(); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["Long"] = factory(); + +})(this, function() { + "use strict"; + + /** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @constructor + */ + function Long(low, high, unsigned) { /** - * Decodes an encoded message and returns the decoded message. - * @param {ByteBuffer} buffer ByteBuffer to decode from - * @param {number=} length Message length. Defaults to decode all remaining data. - * @param {number=} expectedGroupEndId Expected GROUPEND id if this is a legacy group - * @return {ProtoBuf.Builder.Message} Decoded message - * @throws {Error} If the message cannot be decoded + * The low 32 bits as a signed value. + * @type {number} * @expose */ - MessagePrototype.decode = function(buffer, length, expectedGroupEndId) { - length = typeof length === 'number' ? length : -1; - var start = buffer.offset, - msg = new (this.clazz)(), - tag, wireType, id, field; - while (buffer.offset < start+length || (length === -1 && buffer.remaining() > 0)) { - tag = buffer.readVarint32(); - wireType = tag & 0x07; - id = tag >>> 3; - if (wireType === ProtoBuf.WIRE_TYPES.ENDGROUP) { - if (id !== expectedGroupEndId) - throw Error("Illegal group end indicator for "+this.toString(true)+": "+id+" ("+(expectedGroupEndId ? expectedGroupEndId+" expected" : "not a group")+")"); - break; - } - if (!(field = this._fieldsById[id])) { - // "messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing." - switch (wireType) { - case ProtoBuf.WIRE_TYPES.VARINT: - buffer.readVarint32(); - break; - case ProtoBuf.WIRE_TYPES.BITS32: - buffer.offset += 4; - break; - case ProtoBuf.WIRE_TYPES.BITS64: - buffer.offset += 8; - break; - case ProtoBuf.WIRE_TYPES.LDELIM: - var len = buffer.readVarint32(); - buffer.offset += len; - break; - case ProtoBuf.WIRE_TYPES.STARTGROUP: - while (skipTillGroupEnd(id, buffer)) {} - break; - default: - throw Error("Illegal wire type for unknown field "+id+" in "+this.toString(true)+"#decode: "+wireType); - } - continue; - } - if (field.repeated && !field.options["packed"]) { - msg[field.name].push(field.decode(wireType, buffer)); - } else if (field.map) { - var keyval = field.decode(wireType, buffer); - msg[field.name].set(keyval[0], keyval[1]); - } else { - msg[field.name] = field.decode(wireType, buffer); - if (field.oneof) { // Field is part of an OneOf (not a virtual OneOf field) - var currentField = msg[field.oneof.name]; // Virtual field references currently set field - if (currentField !== null && currentField !== field.name) - msg[currentField] = null; // Clear currently set field - msg[field.oneof.name] = field.name; // Point virtual field at this field - } - } - } - - // Check if all required fields are present and set default values for optional fields that are not - for (var i=0, k=this._fields.length; i=} options Options - * @param {!ProtoBuf.Reflect.Message.OneOf=} oneof Enclosing OneOf - * @param {string?} syntax The syntax level of this definition (e.g., proto3) - * @constructor - * @extends ProtoBuf.Reflect.T + * Whether unsigned or not. + * @type {boolean} + * @expose */ - var Field = function(builder, message, rule, keytype, type, name, id, options, oneof, syntax) { - T.call(this, builder, message, name); + this.unsigned = !!unsigned; + } - /** - * @override - */ - this.className = "Message.Field"; + // The internal representation of a long is the two given signed, 32-bit values. + // We use 32-bit pieces because these are the size of integers on which + // Javascript performs bit-operations. For operations like addition and + // multiplication, we split each number into 16 bit pieces, which can easily be + // multiplied within Javascript's floating-point representation without overflow + // or change in sign. + // + // In the algorithms below, we frequently reduce the negative case to the + // positive case by negating the input(s) and then post-processing the result. + // Note that we must ALWAYS check specially whether those values are MIN_VALUE + // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as + // a positive number, it overflows back into a negative). Not handling this + // case would often result in infinite recursion. + // + // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* + // methods on which they depend. + + /** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @expose + * @private + */ + Long.__isLong__; + + Object.defineProperty(Long.prototype, "__isLong__", { + value: true, + enumerable: false, + configurable: false + }); + + /** + * Tests if the specified object is a Long. + * @param {*} obj Object + * @returns {boolean} + * @expose + */ + Long.isLong = function isLong(obj) { + return (obj && obj["__isLong__"]) === true; + }; - /** - * Message field required flag. - * @type {boolean} - * @expose - */ - this.required = rule === "required"; + /** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner + */ + var INT_CACHE = {}; - /** - * Message field repeated flag. - * @type {boolean} - * @expose - */ - this.repeated = rule === "repeated"; + /** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner + */ + var UINT_CACHE = {}; - /** - * Message field map flag. - * @type {boolean} - * @expose - */ - this.map = rule === "map"; + /** + * Returns a Long representing the given 32 bit integer value. + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + * @expose + */ + Long.fromInt = function fromInt(value, unsigned) { + var obj, cachedObj; + if (!unsigned) { + value = value | 0; + if (-128 <= value && value < 128) { + cachedObj = INT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = new Long(value, value < 0 ? -1 : 0, false); + if (-128 <= value && value < 128) + INT_CACHE[value] = obj; + return obj; + } else { + value = value >>> 0; + if (0 <= value && value < 256) { + cachedObj = UINT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = new Long(value, (value | 0) < 0 ? -1 : 0, true); + if (0 <= value && value < 256) + UINT_CACHE[value] = obj; + return obj; + } + }; - /** - * Message field key type. Type reference string if unresolved, protobuf - * type if resolved. Valid only if this.map === true, null otherwise. - * @type {string|{name: string, wireType: number}|null} - * @expose - */ - this.keyType = keytype || null; + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + * @expose + */ + Long.fromNumber = function fromNumber(value, unsigned) { + unsigned = !!unsigned; + if (isNaN(value) || !isFinite(value)) + return Long.ZERO; + if (!unsigned && value <= -TWO_PWR_63_DBL) + return Long.MIN_VALUE; + if (!unsigned && value + 1 >= TWO_PWR_63_DBL) + return Long.MAX_VALUE; + if (unsigned && value >= TWO_PWR_64_DBL) + return Long.MAX_UNSIGNED_VALUE; + if (value < 0) + return Long.fromNumber(-value, unsigned).negate(); + return new Long((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned); + }; - /** - * Message field type. Type reference string if unresolved, protobuf type if - * resolved. In a map field, this is the value type. - * @type {string|{name: string, wireType: number}} - * @expose - */ - this.type = type; + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + * @expose + */ + Long.fromBits = function fromBits(lowBits, highBits, unsigned) { + return new Long(lowBits, highBits, unsigned); + }; - /** - * Resolved type reference inside the global namespace. - * @type {ProtoBuf.Reflect.T|null} - * @expose - */ - this.resolvedType = null; + /** + * Returns a Long representation of the given string, written using the specified radix. + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value + * @expose + */ + Long.fromString = function fromString(str, unsigned, radix) { + if (str.length === 0) + throw Error('number format error: empty string'); + if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") + return Long.ZERO; + if (typeof unsigned === 'number') // For goog.math.long compatibility + radix = unsigned, + unsigned = false; + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw Error('radix out of range: ' + radix); - /** - * Unique message field id. - * @type {number} - * @expose - */ - this.id = id; + var p; + if ((p = str.indexOf('-')) > 0) + throw Error('number format error: interior "-" character: ' + str); + else if (p === 0) + return Long.fromString(str.substring(1), unsigned, radix).negate(); - /** - * Message field options. - * @type {!Object.} - * @dict - * @expose - */ - this.options = options || {}; + // Do several (8) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = Long.fromNumber(Math.pow(radix, 8)); - /** - * Default value. - * @type {*} - * @expose - */ - this.defaultValue = null; + var result = Long.ZERO; + for (var i = 0; i < str.length; i += 8) { + var size = Math.min(8, str.length - i); + var value = parseInt(str.substring(i, i + size), radix); + if (size < 8) { + var power = Long.fromNumber(Math.pow(radix, size)); + result = result.multiply(power).add(Long.fromNumber(value)); + } else { + result = result.multiply(radixToPower); + result = result.add(Long.fromNumber(value)); + } + } + result.unsigned = unsigned; + return result; + }; - /** - * Enclosing OneOf. - * @type {?ProtoBuf.Reflect.Message.OneOf} - * @expose - */ - this.oneof = oneof || null; + /** + * Converts the specified value to a Long. + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @returns {!Long} + * @expose + */ + Long.fromValue = function fromValue(val) { + if (val /* is compatible */ instanceof Long) + return val; + if (typeof val === 'number') + return Long.fromNumber(val); + if (typeof val === 'string') + return Long.fromString(val); + // Throws for non-objects, converts non-instanceof Long: + return new Long(val.low, val.high, val.unsigned); + }; - /** - * Syntax level of this definition (e.g., proto3). - * @type {string} - * @expose - */ - this.syntax = syntax || 'proto2'; + // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be + // no runtime penalty for these. - /** - * Original field name. - * @type {string} - * @expose - */ - this.originalName = this.name; // Used to revert camelcase transformation on naming collisions + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_16_DBL = 1 << 16; - /** - * Element implementation. Created in build() after types are resolved. - * @type {ProtoBuf.Element} - * @expose - */ - this.element = null; + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_24_DBL = 1 << 24; - /** - * Key element implementation, for map fields. Created in build() after - * types are resolved. - * @type {ProtoBuf.Element} - * @expose - */ - this.keyElement = null; + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; - // Convert field names to camel case notation if the override is set - if (this.builder.options['convertFieldsToCamelCase'] && !(this instanceof Message.ExtensionField)) - this.name = ProtoBuf.Util.toCamelCase(this.name); - }; + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; - /** - * @alias ProtoBuf.Reflect.Message.Field.prototype - * @inner - */ - var FieldPrototype = Field.prototype = Object.create(T.prototype); + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; - /** - * Builds the field. - * @override - * @expose - */ - FieldPrototype.build = function() { - this.element = new Element(this.type, this.resolvedType, false, this.syntax); - if (this.map) - this.keyElement = new Element(this.keyType, undefined, true, this.syntax); + /** + * @type {!Long} + * @const + * @inner + */ + var TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL); - // In proto3, fields do not have field presence, and every field is set to - // its type's default value ("", 0, 0.0, or false). - if (this.syntax === 'proto3' && !this.repeated && !this.map) - this.defaultValue = Element.defaultFieldValue(this.type); + /** + * Signed zero. + * @type {!Long} + * @expose + */ + Long.ZERO = Long.fromInt(0); - // Otherwise, default values are present when explicitly specified - else if (typeof this.options['default'] !== 'undefined') - this.defaultValue = this.verifyValue(this.options['default']); - }; + /** + * Unsigned zero. + * @type {!Long} + * @expose + */ + Long.UZERO = Long.fromInt(0, true); - /** - * Checks if the given value can be set for this field. - * @param {*} value Value to check - * @param {boolean=} skipRepeated Whether to skip the repeated value check or not. Defaults to false. - * @return {*} Verified, maybe adjusted, value - * @throws {Error} If the value cannot be set for this field - * @expose - */ - FieldPrototype.verifyValue = function(value, skipRepeated) { - skipRepeated = skipRepeated || false; - var self = this; - function fail(val, msg) { - throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")"); - } - if (value === null) { // NULL values for optional fields - if (this.required) - fail(typeof value, "required"); - if (this.syntax === 'proto3' && this.type !== ProtoBuf.TYPES["message"]) - fail(typeof value, "proto3 field without field presence cannot be null"); - return null; - } - var i; - if (this.repeated && !skipRepeated) { // Repeated values as arrays - if (!Array.isArray(value)) - value = [value]; - var res = []; - for (i=0; i 0; + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} + * @expose + */ + Long.prototype.toInt = function toInt() { + return this.unsigned ? this.low >>> 0 : this.low; + }; - case ProtoBuf.TYPES["bytes"]: - return value.remaining() > 0; + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} + * @expose + */ + Long.prototype.toNumber = function toNumber() { + if (this.unsigned) { + return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0); + } + return this.high * TWO_PWR_32_DBL + (this.low >>> 0); + }; - case ProtoBuf.TYPES["enum"]: - return value !== 0; + /** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range + * @expose + */ + Long.prototype.toString = function toString(radix) { + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix out of range: ' + radix); + if (this.isZero()) + return '0'; + var rem; + if (this.isNegative()) { // Unsigned Longs are never negative + if (this.equals(Long.MIN_VALUE)) { + // We need to change the Long value before it can be negated, so we remove + // the bottom-most digit in this base and then recurse to do the rest. + var radixLong = Long.fromNumber(radix); + var div = this.divide(radixLong); + rem = div.multiply(radixLong).subtract(this); + return div.toString(radix) + rem.toInt().toString(radix); + } else + return '-' + this.negate().toString(radix); + } - case ProtoBuf.TYPES["message"]: - return value !== null; - default: - return true; + // Do several (6) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = Long.fromNumber(Math.pow(radix, 6), this.unsigned); + rem = this; + var result = ''; + while (true) { + var remDiv = rem.divide(radixToPower), + intval = rem.subtract(remDiv.multiply(radixToPower)).toInt() >>> 0, + digits = intval.toString(radix); + rem = remDiv; + if (rem.isZero()) + return digits + result; + else { + while (digits.length < 6) + digits = '0' + digits; + result = '' + digits + result; } - }; + } + }; - /** - * Encodes the specified field value to the specified buffer. - * @param {*} value Verified field value - * @param {ByteBuffer} buffer ByteBuffer to encode to - * @param {!ProtoBuf.Builder.Message} message Runtime message - * @return {ByteBuffer} The ByteBuffer for chaining - * @throws {Error} If the field cannot be encoded - * @expose - */ - FieldPrototype.encode = function(value, buffer, message) { - if (this.type === null || typeof this.type !== 'object') - throw Error("[INTERNAL] Unresolved type in "+this.toString(true)+": "+this.type); - if (value === null || (this.repeated && value.length == 0)) - return buffer; // Optional omitted - try { - if (this.repeated) { - var i; - // "Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire - // types) can be declared 'packed'." - if (this.options["packed"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) { - // "All of the elements of the field are packed into a single key-value pair with wire type 2 - // (length-delimited). Each element is encoded the same way it would be normally, except without a - // tag preceding it." - buffer.writeVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); - buffer.ensureCapacity(buffer.offset += 1); // We do not know the length yet, so let's assume a varint of length 1 - var start = buffer.offset; // Remember where the contents begin - for (i=0; i 1) { // We need to move the contents - var contents = buffer.slice(start, buffer.offset); - start += varintLen-1; - buffer.offset = start; - buffer.append(contents); - } - buffer.writeVarint32(len, start-varintLen); - } else { - // "If your message definition has repeated elements (without the [packed=true] option), the encoded - // message has zero or more key-value pairs with the same tag number" - for (i=0; i>> 0; + }; + + /** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits + * @expose + */ + Long.prototype.getLowBits = function getLowBits() { + return this.low; + }; + + /** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits + * @expose + */ + Long.prototype.getLowBitsUnsigned = function getLowBitsUnsigned() { + return this.low >>> 0; + }; - // Write out the key and val. - buffer.writeVarint32((1 << 3) | this.keyType.wireType); - this.keyElement.encodeValue(1, key, buffer); - buffer.writeVarint32((2 << 3) | this.type.wireType); - this.element.encodeValue(2, val, buffer); - }, this); - } else { - if (this.hasWirePresence(value, message)) { - buffer.writeVarint32((this.id << 3) | this.type.wireType); - this.element.encodeValue(this.id, value, buffer); - } - } - } catch (e) { - throw Error("Illegal value for "+this.toString(true)+": "+value+" ("+e+")"); - } - return buffer; - }; + /** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} + * @expose + */ + Long.prototype.getNumBitsAbs = function getNumBitsAbs() { + if (this.isNegative()) // Unsigned Longs are never negative + return this.equals(Long.MIN_VALUE) ? 64 : this.negate().getNumBitsAbs(); + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) + if ((val & (1 << bit)) != 0) + break; + return this.high != 0 ? bit + 33 : bit + 1; + }; - /** - * Calculates the length of this field's value on the network level. - * @param {*} value Field value - * @param {!ProtoBuf.Builder.Message} message Runtime message - * @returns {number} Byte length - * @expose - */ - FieldPrototype.calculate = function(value, message) { - value = this.verifyValue(value); // May throw - if (this.type === null || typeof this.type !== 'object') - throw Error("[INTERNAL] Unresolved type in "+this.toString(true)+": "+this.type); - if (value === null || (this.repeated && value.length == 0)) - return 0; // Optional omitted - var n = 0; - try { - if (this.repeated) { - var i, ni; - if (this.options["packed"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) { - n += ByteBuffer.calculateVarint32((this.id << 3) | ProtoBuf.WIRE_TYPES.LDELIM); - ni = 0; - for (i=0; i= 0; + }; - // We expect wireType to match the underlying type's wireType unless we see - // a packed repeated field, or unless this is a map field. - var wireTypeOK = - (!this.map && wireType == this.type.wireType) || - (!skipRepeated && this.repeated && this.options["packed"] && - wireType == ProtoBuf.WIRE_TYPES.LDELIM) || - (this.map && wireType == ProtoBuf.WIRE_TYPES.LDELIM); - if (!wireTypeOK) - throw Error("Illegal wire type for field "+this.toString(true)+": "+wireType+" ("+this.type.wireType+" expected)"); + /** + * Tests if this Long's value is odd. + * @returns {boolean} + * @expose + */ + Long.prototype.isOdd = function isOdd() { + return (this.low & 1) === 1; + }; - // Handle packed repeated fields. - if (wireType == ProtoBuf.WIRE_TYPES.LDELIM && this.repeated && this.options["packed"] && ProtoBuf.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) >= 0) { - if (!skipRepeated) { - nBytes = buffer.readVarint32(); - nBytes = buffer.offset + nBytes; // Limit - var values = []; - while (buffer.offset < nBytes) - values.push(this.decode(this.type.wireType, buffer, true)); - return values; - } - // Read the next value otherwise... - } + /** + * Tests if this Long's value is even. + * @returns {boolean} + * @expose + */ + Long.prototype.isEven = function isEven() { + return (this.low & 1) === 0; + }; - // Handle maps. - if (this.map) { - // Read one (key, value) submessage, and return [key, value] - var key = Element.defaultFieldValue(this.keyType); - value = Element.defaultFieldValue(this.type); + /** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.equals = function equals(other) { + if (!Long.isLong(other)) + other = Long.fromValue(other); + if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1) + return false; + return this.high === other.high && this.low === other.low; + }; - // Read the length - nBytes = buffer.readVarint32(); - if (buffer.remaining() < nBytes) - throw Error("Illegal number of bytes for "+this.toString(true)+": "+nBytes+" required but got only "+buffer.remaining()); + /** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.eq = Long.prototype.equals; - // Get a sub-buffer of this key/value submessage - var msgbuf = buffer.clone(); - msgbuf.limit = msgbuf.offset + nBytes; - buffer.offset += nBytes; + /** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.notEquals = function notEquals(other) { + return !this.equals(/* validates */ other); + }; - while (msgbuf.remaining() > 0) { - var tag = msgbuf.readVarint32(); - wireType = tag & 0x07; - var id = tag >>> 3; - if (id === 1) { - key = this.keyElement.decode(msgbuf, wireType, id); - } else if (id === 2) { - value = this.element.decode(msgbuf, wireType, id); - } else { - throw Error("Unexpected tag in map field key/value submessage"); - } - } + /** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.neq = Long.prototype.notEquals; - return [key, value]; - } + /** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.lessThan = function lessThan(other) { + return this.compare(/* validates */ other) < 0; + }; - // Handle singular and non-packed repeated field values. - return this.element.decode(buffer, wireType, this.id); - }; + /** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.lt = Long.prototype.lessThan; - /** - * @alias ProtoBuf.Reflect.Message.Field - * @expose - */ - Reflect.Message.Field = Field; + /** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.lessThanOrEqual = function lessThanOrEqual(other) { + return this.compare(/* validates */ other) <= 0; + }; - /** - * Constructs a new Message ExtensionField. - * @exports ProtoBuf.Reflect.Message.ExtensionField - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {!ProtoBuf.Reflect.Message} message Message reference - * @param {string} rule Rule, one of requried, optional, repeated - * @param {string} type Data type, e.g. int32 - * @param {string} name Field name - * @param {number} id Unique field id - * @param {!Object.=} options Options - * @constructor - * @extends ProtoBuf.Reflect.Message.Field - */ - var ExtensionField = function(builder, message, rule, type, name, id, options) { - Field.call(this, builder, message, rule, /* keytype = */ null, type, name, id, options); + /** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.lte = Long.prototype.lessThanOrEqual; - /** - * Extension reference. - * @type {!ProtoBuf.Reflect.Extension} - * @expose - */ - this.extension; - }; + /** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.greaterThan = function greaterThan(other) { + return this.compare(/* validates */ other) > 0; + }; - // Extends Field - ExtensionField.prototype = Object.create(Field.prototype); + /** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.gt = Long.prototype.greaterThan; - /** - * @alias ProtoBuf.Reflect.Message.ExtensionField - * @expose - */ - Reflect.Message.ExtensionField = ExtensionField; + /** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.greaterThanOrEqual = function greaterThanOrEqual(other) { + return this.compare(/* validates */ other) >= 0; + }; - /** - * Constructs a new Message OneOf. - * @exports ProtoBuf.Reflect.Message.OneOf - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {!ProtoBuf.Reflect.Message} message Message reference - * @param {string} name OneOf name - * @constructor - * @extends ProtoBuf.Reflect.T - */ - var OneOf = function(builder, message, name) { - T.call(this, builder, message, name); + /** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + * @expose + */ + Long.prototype.gte = Long.prototype.greaterThanOrEqual; - /** - * Enclosed fields. - * @type {!Array.} - * @expose - */ - this.fields = []; - }; + /** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + * @expose + */ + Long.prototype.compare = function compare(other) { + if (!Long.isLong(other)) + other = Long.fromValue(other); + if (this.equals(other)) + return 0; + var thisNeg = this.isNegative(), + otherNeg = other.isNegative(); + if (thisNeg && !otherNeg) + return -1; + if (!thisNeg && otherNeg) + return 1; + // At this point the sign bits are the same + if (!this.unsigned) + return this.subtract(other).isNegative() ? -1 : 1; + // Both are positive if at least one is unsigned + return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1; + }; - /** - * @alias ProtoBuf.Reflect.Message.OneOf - * @expose - */ - Reflect.Message.OneOf = OneOf; + /** + * Negates this Long's value. + * @returns {!Long} Negated Long + * @expose + */ + Long.prototype.negate = function negate() { + if (!this.unsigned && this.equals(Long.MIN_VALUE)) + return Long.MIN_VALUE; + return this.not().add(Long.ONE); + }; - /** - * Constructs a new Enum. - * @exports ProtoBuf.Reflect.Enum - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {!ProtoBuf.Reflect.T} parent Parent Reflect object - * @param {string} name Enum name - * @param {Object.=} options Enum options - * @param {string?} syntax The syntax level (e.g., proto3) - * @constructor - * @extends ProtoBuf.Reflect.Namespace - */ - var Enum = function(builder, parent, name, options, syntax) { - Namespace.call(this, builder, parent, name, options, syntax); + /** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long + * @expose + */ + Long.prototype.neg = Long.prototype.negate; - /** - * @override - */ - this.className = "Enum"; + /** + * Returns the sum of this and the specified Long. + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum + * @expose + */ + Long.prototype.add = function add(addend) { + if (!Long.isLong(addend)) + addend = Long.fromValue(addend); - /** - * Runtime enum object. - * @type {Object.|null} - * @expose - */ - this.object = null; - }; + // Divide each number into 4 chunks of 16 bits, and then sum the chunks. - /** - * Gets the string name of an enum value. - * @param {!ProtoBuf.Builder.Enum} enm Runtime enum - * @param {number} value Enum value - * @returns {?string} Name or `null` if not present - * @expose - */ - Enum.getName = function(enm, value) { - var keys = Object.keys(enm); - for (var i=0, key; i>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; - /** - * @alias ProtoBuf.Reflect.Enum.prototype - * @inner - */ - var EnumPrototype = Enum.prototype = Object.create(Namespace.prototype); + var b48 = addend.high >>> 16; + var b32 = addend.high & 0xFFFF; + var b16 = addend.low >>> 16; + var b00 = addend.low & 0xFFFF; - /** - * Builds this enum and returns the runtime counterpart. - * @param {boolean} rebuild Whether to rebuild or not, defaults to false - * @returns {!Object.} - * @expose - */ - EnumPrototype.build = function(rebuild) { - if (this.object && !rebuild) - return this.object; - var enm = new ProtoBuf.Builder.Enum(), - values = this.getChildren(Enum.Value); - for (var i=0, k=values.length; i>> 16; + c00 &= 0xFFFF; + c16 += a16 + b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 + b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 + b48; + c48 &= 0xFFFF; + return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; - /** - * @alias ProtoBuf.Reflect.Enum - * @expose - */ - Reflect.Enum = Enum; + /** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + * @expose + */ + Long.prototype.subtract = function subtract(subtrahend) { + if (!Long.isLong(subtrahend)) + subtrahend = Long.fromValue(subtrahend); + return this.add(subtrahend.negate()); + }; - /** - * Constructs a new Enum Value. - * @exports ProtoBuf.Reflect.Enum.Value - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {!ProtoBuf.Reflect.Enum} enm Enum reference - * @param {string} name Field name - * @param {number} id Unique field id - * @constructor - * @extends ProtoBuf.Reflect.T - */ - var Value = function(builder, enm, name, id) { - T.call(this, builder, enm, name); + /** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + * @expose + */ + Long.prototype.sub = Long.prototype.subtract; - /** - * @override - */ - this.className = "Enum.Value"; + /** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + * @expose + */ + Long.prototype.multiply = function multiply(multiplier) { + if (this.isZero()) + return Long.ZERO; + if (!Long.isLong(multiplier)) + multiplier = Long.fromValue(multiplier); + if (multiplier.isZero()) + return Long.ZERO; + if (this.equals(Long.MIN_VALUE)) + return multiplier.isOdd() ? Long.MIN_VALUE : Long.ZERO; + if (multiplier.equals(Long.MIN_VALUE)) + return this.isOdd() ? Long.MIN_VALUE : Long.ZERO; - /** - * Unique enum value id. - * @type {number} - * @expose - */ - this.id = id; - }; + if (this.isNegative()) { + if (multiplier.isNegative()) + return this.negate().multiply(multiplier.negate()); + else + return this.negate().multiply(multiplier).negate(); + } else if (multiplier.isNegative()) + return this.multiply(multiplier.negate()).negate(); - // Extends T - Value.prototype = Object.create(T.prototype); + // If both longs are small, use float multiplication + if (this.lessThan(TWO_PWR_24) && multiplier.lessThan(TWO_PWR_24)) + return Long.fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned); - /** - * @alias ProtoBuf.Reflect.Enum.Value - * @expose - */ - Reflect.Enum.Value = Value; + // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. + // We can skip products that would overflow. - /** - * An extension (field). - * @exports ProtoBuf.Reflect.Extension - * @constructor - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {!ProtoBuf.Reflect.T} parent Parent object - * @param {string} name Object name - * @param {!ProtoBuf.Reflect.Message.Field} field Extension field - */ - var Extension = function(builder, parent, name, field) { - T.call(this, builder, parent, name); + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; - /** - * Extended message field. - * @type {!ProtoBuf.Reflect.Message.Field} - * @expose - */ - this.field = field; - }; + var b48 = multiplier.high >>> 16; + var b32 = multiplier.high & 0xFFFF; + var b16 = multiplier.low >>> 16; + var b00 = multiplier.low & 0xFFFF; - // Extends T - Extension.prototype = Object.create(T.prototype); + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 * b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 * b00; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c16 += a00 * b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 * b00; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a16 * b16; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a00 * b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; + c48 &= 0xFFFF; + return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; - /** - * @alias ProtoBuf.Reflect.Extension - * @expose - */ - Reflect.Extension = Extension; + /** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + * @expose + */ + Long.prototype.mul = Long.prototype.multiply; - /** - * Constructs a new Service. - * @exports ProtoBuf.Reflect.Service - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {!ProtoBuf.Reflect.Namespace} root Root - * @param {string} name Service name - * @param {Object.=} options Options - * @constructor - * @extends ProtoBuf.Reflect.Namespace - */ - var Service = function(builder, root, name, options) { - Namespace.call(this, builder, root, name, options); + /** + * Returns this Long divided by the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + * @expose + */ + Long.prototype.divide = function divide(divisor) { + if (!Long.isLong(divisor)) + divisor = Long.fromValue(divisor); + if (divisor.isZero()) + throw(new Error('division by zero')); + if (this.isZero()) + return this.unsigned ? Long.UZERO : Long.ZERO; + var approx, rem, res; + if (this.equals(Long.MIN_VALUE)) { + if (divisor.equals(Long.ONE) || divisor.equals(Long.NEG_ONE)) + return Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE + else if (divisor.equals(Long.MIN_VALUE)) + return Long.ONE; + else { + // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. + var halfThis = this.shiftRight(1); + approx = halfThis.divide(divisor).shiftLeft(1); + if (approx.equals(Long.ZERO)) { + return divisor.isNegative() ? Long.ONE : Long.NEG_ONE; + } else { + rem = this.subtract(divisor.multiply(approx)); + res = approx.add(rem.divide(divisor)); + return res; + } + } + } else if (divisor.equals(Long.MIN_VALUE)) + return this.unsigned ? Long.UZERO : Long.ZERO; + if (this.isNegative()) { + if (divisor.isNegative()) + return this.negate().divide(divisor.negate()); + return this.negate().divide(divisor).negate(); + } else if (divisor.isNegative()) + return this.divide(divisor.negate()).negate(); - /** - * @override - */ - this.className = "Service"; + // Repeat the following until the remainder is less than other: find a + // floating-point that approximates remainder / other *from below*, add this + // into the result, and subtract it from the remainder. It is critical that + // the approximate value is less than or equal to the real value so that the + // remainder never becomes negative. + res = Long.ZERO; + rem = this; + while (rem.greaterThanOrEqual(divisor)) { + // Approximate the result of division. This may be a little greater or + // smaller than the actual value. + approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber())); - /** - * Built runtime service class. - * @type {?function(new:ProtoBuf.Builder.Service)} - */ - this.clazz = null; - }; + // We will tweak the approximate result by changing it in the 48-th digit or + // the smallest non-fractional digit, whichever is larger. + var log2 = Math.ceil(Math.log(approx) / Math.LN2), + delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48), - /** - * @alias ProtoBuf.Reflect.Service.prototype - * @inner - */ - var ServicePrototype = Service.prototype = Object.create(Namespace.prototype); + // Decrease the approximation until it is smaller than the remainder. Note + // that if it is too large, the product overflows and is negative. + approxRes = Long.fromNumber(approx), + approxRem = approxRes.multiply(divisor); + while (approxRem.isNegative() || approxRem.greaterThan(rem)) { + approx -= delta; + approxRes = Long.fromNumber(approx, this.unsigned); + approxRem = approxRes.multiply(divisor); + } - /** - * Builds the service and returns the runtime counterpart, which is a fully functional class. - * @see ProtoBuf.Builder.Service - * @param {boolean=} rebuild Whether to rebuild or not - * @return {Function} Service class - * @throws {Error} If the message cannot be built - * @expose - */ - ServicePrototype.build = function(rebuild) { - if (this.clazz && !rebuild) - return this.clazz; + // We know the answer can't be zero... and actually, zero would cause + // infinite recursion since we would make no progress. + if (approxRes.isZero()) + approxRes = Long.ONE; - // Create the runtime Service class in its own scope - return this.clazz = (function(ProtoBuf, T) { + res = res.add(approxRes); + rem = rem.subtract(approxRem); + } + return res; + }; - /** - * Constructs a new runtime Service. - * @name ProtoBuf.Builder.Service - * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))=} rpcImpl RPC implementation receiving the method name and the message - * @class Barebone of all runtime services. - * @constructor - * @throws {Error} If the service cannot be created - */ - var Service = function(rpcImpl) { - ProtoBuf.Builder.Service.call(this); + /** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + * @expose + */ + Long.prototype.div = Long.prototype.divide; - /** - * Service implementation. - * @name ProtoBuf.Builder.Service#rpcImpl - * @type {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} - * @expose - */ - this.rpcImpl = rpcImpl || function(name, msg, callback) { - // This is what a user has to implement: A function receiving the method name, the actual message to - // send (type checked) and the callback that's either provided with the error as its first - // argument or null and the actual response message. - setTimeout(callback.bind(this, Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")), 0); // Must be async! - }; - }; + /** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + * @expose + */ + Long.prototype.modulo = function modulo(divisor) { + if (!Long.isLong(divisor)) + divisor = Long.fromValue(divisor); + return this.subtract(this.divide(divisor).multiply(divisor)); + }; - /** - * @alias ProtoBuf.Builder.Service.prototype - * @inner - */ - var ServicePrototype = Service.prototype = Object.create(ProtoBuf.Builder.Service.prototype); + /** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + * @expose + */ + Long.prototype.mod = Long.prototype.modulo; - /** - * Asynchronously performs an RPC call using the given RPC implementation. - * @name ProtoBuf.Builder.Service.[Method] - * @function - * @param {!function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl RPC implementation - * @param {ProtoBuf.Builder.Message} req Request - * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving - * the error if any and the response either as a pre-parsed message or as its raw bytes - * @abstract - */ + /** + * Returns the bitwise NOT of this Long. + * @returns {!Long} + * @expose + */ + Long.prototype.not = function not() { + return Long.fromBits(~this.low, ~this.high, this.unsigned); + }; - /** - * Asynchronously performs an RPC call using the instance's RPC implementation. - * @name ProtoBuf.Builder.Service#[Method] - * @function - * @param {ProtoBuf.Builder.Message} req Request - * @param {function(Error, (ProtoBuf.Builder.Message|ByteBuffer|Buffer|string)=)} callback Callback receiving - * the error if any and the response either as a pre-parsed message or as its raw bytes - * @abstract - */ + /** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + * @expose + */ + Long.prototype.and = function and(other) { + if (!Long.isLong(other)) + other = Long.fromValue(other); + return Long.fromBits(this.low & other.low, this.high & other.high, this.unsigned); + }; - var rpc = T.getChildren(ProtoBuf.Reflect.Service.RPCMethod); - for (var i=0; i>> (32 - numBits)), this.unsigned); + else + return Long.fromBits(0, this.low << (numBits - 32), this.unsigned); + }; - if (Object.defineProperty) - Object.defineProperty(Service[method.name], "$options", { "value": method.buildOpt() }), - Object.defineProperty(ServicePrototype[method.name], "$options", { "value": Service[method.name]["$options"] }); - })(rpc[i]); - } + /** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + * @expose + */ + Long.prototype.shl = Long.prototype.shiftLeft; - // Properties + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + * @expose + */ + Long.prototype.shiftRight = function shiftRight(numBits) { + if (Long.isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return Long.fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned); + else + return Long.fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned); + }; - /** - * Service options. - * @name ProtoBuf.Builder.Service.$options - * @type {Object.} - * @expose - */ - var $optionsS; // cc needs this + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + * @expose + */ + Long.prototype.shr = Long.prototype.shiftRight; - /** - * Service options. - * @name ProtoBuf.Builder.Service#$options - * @type {Object.} - * @expose - */ - var $options; + /** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + * @expose + */ + Long.prototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { + if (Long.isLong(numBits)) + numBits = numBits.toInt(); + numBits &= 63; + if (numBits === 0) + return this; + else { + var high = this.high; + if (numBits < 32) { + var low = this.low; + return Long.fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned); + } else if (numBits === 32) + return Long.fromBits(high, 0, this.unsigned); + else + return Long.fromBits(high >>> (numBits - 32), 0, this.unsigned); + } + }; - /** - * Reflection type. - * @name ProtoBuf.Builder.Service.$type - * @type {!ProtoBuf.Reflect.Service} - * @expose - */ - var $typeS; + /** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + * @expose + */ + Long.prototype.shru = Long.prototype.shiftRightUnsigned; - /** - * Reflection type. - * @name ProtoBuf.Builder.Service#$type - * @type {!ProtoBuf.Reflect.Service} - * @expose - */ - var $type; + /** + * Converts this Long to signed. + * @returns {!Long} Signed long + * @expose + */ + Long.prototype.toSigned = function toSigned() { + if (!this.unsigned) + return this; + return new Long(this.low, this.high, false); + }; - if (Object.defineProperty) - Object.defineProperty(Service, "$options", { "value": T.buildOpt() }), - Object.defineProperty(ServicePrototype, "$options", { "value": Service["$options"] }), - Object.defineProperty(Service, "$type", { "value": T }), - Object.defineProperty(ServicePrototype, "$type", { "value": T }); + /** + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long + * @expose + */ + Long.prototype.toUnsigned = function toUnsigned() { + if (this.unsigned) + return this; + return new Long(this.low, this.high, true); + }; + + return Long; +}); + +},{}],52:[function(require,module,exports){ +(function (Buffer){ +var Transform = require('stream').Transform +var inherits = require('inherits') +var StringDecoder = require('string_decoder').StringDecoder +module.exports = CipherBase +inherits(CipherBase, Transform) +function CipherBase (hashMode) { + Transform.call(this) + this.hashMode = typeof hashMode === 'string' + if (this.hashMode) { + this[hashMode] = this._finalOrDigest + } else { + this.final = this._finalOrDigest + } + this._decoder = null + this._encoding = null +} +CipherBase.prototype.update = function (data, inputEnc, outputEnc) { + if (typeof data === 'string') { + data = new Buffer(data, inputEnc) + } + var outData = this._update(data) + if (this.hashMode) { + return this + } + if (outputEnc) { + outData = this._toString(outData, outputEnc) + } + return outData +} + +CipherBase.prototype.setAutoPadding = function () {} + +CipherBase.prototype.getAuthTag = function () { + throw new Error('trying to get auth tag in unsupported state') +} + +CipherBase.prototype.setAuthTag = function () { + throw new Error('trying to set auth tag in unsupported state') +} + +CipherBase.prototype.setAAD = function () { + throw new Error('trying to set aad in unsupported state') +} + +CipherBase.prototype._transform = function (data, _, next) { + var err + try { + if (this.hashMode) { + this._update(data) + } else { + this.push(this._update(data)) + } + } catch (e) { + err = e + } finally { + next(err) + } +} +CipherBase.prototype._flush = function (done) { + var err + try { + this.push(this._final()) + } catch (e) { + err = e + } finally { + done(err) + } +} +CipherBase.prototype._finalOrDigest = function (outputEnc) { + var outData = this._final() || new Buffer('') + if (outputEnc) { + outData = this._toString(outData, outputEnc, true) + } + return outData +} + +CipherBase.prototype._toString = function (value, enc, fin) { + if (!this._decoder) { + this._decoder = new StringDecoder(enc) + this._encoding = enc + } + if (this._encoding !== enc) { + throw new Error('can\'t switch encodings') + } + var out = this._decoder.write(value) + if (fin) { + out += this._decoder.end() + } + return out +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49,"inherits":97,"stream":139,"string_decoder":140}],53:[function(require,module,exports){ +(function (Buffer){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + +}).call(this,{"isBuffer":require("../../is-buffer/index.js")}) +},{"../../is-buffer/index.js":98}],54:[function(require,module,exports){ +(function (Buffer){ +var elliptic = require('elliptic'); +var BN = require('bn.js'); + +module.exports = function createECDH(curve) { + return new ECDH(curve); +}; + +var aliases = { + secp256k1: { + name: 'secp256k1', + byteLength: 32 + }, + secp224r1: { + name: 'p224', + byteLength: 28 + }, + prime256v1: { + name: 'p256', + byteLength: 32 + }, + prime192v1: { + name: 'p192', + byteLength: 24 + }, + ed25519: { + name: 'ed25519', + byteLength: 32 + }, + secp384r1: { + name: 'p384', + byteLength: 48 + }, + secp521r1: { + name: 'p521', + byteLength: 66 + } +}; + +aliases.p224 = aliases.secp224r1; +aliases.p256 = aliases.secp256r1 = aliases.prime256v1; +aliases.p192 = aliases.secp192r1 = aliases.prime192v1; +aliases.p384 = aliases.secp384r1; +aliases.p521 = aliases.secp521r1; + +function ECDH(curve) { + this.curveType = aliases[curve]; + if (!this.curveType ) { + this.curveType = { + name: curve + }; + } + this.curve = new elliptic.ec(this.curveType.name); + this.keys = void 0; +} + +ECDH.prototype.generateKeys = function (enc, format) { + this.keys = this.curve.genKeyPair(); + return this.getPublicKey(enc, format); +}; + +ECDH.prototype.computeSecret = function (other, inenc, enc) { + inenc = inenc || 'utf8'; + if (!Buffer.isBuffer(other)) { + other = new Buffer(other, inenc); + } + var otherPub = this.curve.keyFromPublic(other).getPublic(); + var out = otherPub.mul(this.keys.getPrivate()).getX(); + return formatReturnValue(out, enc, this.curveType.byteLength); +}; + +ECDH.prototype.getPublicKey = function (enc, format) { + var key = this.keys.getPublic(format === 'compressed', true); + if (format === 'hybrid') { + if (key[key.length - 1] % 2) { + key[0] = 7; + } else { + key [0] = 6; + } + } + return formatReturnValue(key, enc); +}; + +ECDH.prototype.getPrivateKey = function (enc) { + return formatReturnValue(this.keys.getPrivate(), enc); +}; + +ECDH.prototype.setPublicKey = function (pub, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(pub)) { + pub = new Buffer(pub, enc); + } + this.keys._importPublic(pub); + return this; +}; + +ECDH.prototype.setPrivateKey = function (priv, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(priv)) { + priv = new Buffer(priv, enc); + } + var _priv = new BN(priv); + _priv = _priv.toString(16); + this.keys._importPrivate(_priv); + return this; +}; + +function formatReturnValue(bn, enc, len) { + if (!Array.isArray(bn)) { + bn = bn.toArray(); + } + var buf = new Buffer(bn); + if (len && buf.length < len) { + var zeros = new Buffer(len - buf.length); + zeros.fill(0); + buf = Buffer.concat([zeros, buf]); + } + if (!enc) { + return buf; + } else { + return buf.toString(enc); + } +} + +}).call(this,require("buffer").Buffer) +},{"bn.js":19,"buffer":49,"elliptic":70}],55:[function(require,module,exports){ +(function (Buffer){ +'use strict'; +var inherits = require('inherits') +var md5 = require('./md5') +var rmd160 = require('ripemd160') +var sha = require('sha.js') + +var Base = require('cipher-base') + +function HashNoConstructor(hash) { + Base.call(this, 'digest') + + this._hash = hash + this.buffers = [] +} + +inherits(HashNoConstructor, Base) + +HashNoConstructor.prototype._update = function (data) { + this.buffers.push(data) +} + +HashNoConstructor.prototype._final = function () { + var buf = Buffer.concat(this.buffers) + var r = this._hash(buf) + this.buffers = null + + return r +} + +function Hash(hash) { + Base.call(this, 'digest') + + this._hash = hash +} + +inherits(Hash, Base) + +Hash.prototype._update = function (data) { + this._hash.update(data) +} + +Hash.prototype._final = function () { + return this._hash.digest() +} + +module.exports = function createHash (alg) { + alg = alg.toLowerCase() + if ('md5' === alg) return new HashNoConstructor(md5) + if ('rmd160' === alg || 'ripemd160' === alg) return new HashNoConstructor(rmd160) + + return new Hash(sha(alg)) +} + +}).call(this,require("buffer").Buffer) +},{"./md5":57,"buffer":49,"cipher-base":52,"inherits":97,"ripemd160":130,"sha.js":132}],56:[function(require,module,exports){ +(function (Buffer){ +'use strict'; +var intSize = 4; +var zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0); +var chrsz = 8; + +function toArray(buf, bigEndian) { + if ((buf.length % intSize) !== 0) { + var len = buf.length + (intSize - (buf.length % intSize)); + buf = Buffer.concat([buf, zeroBuffer], len); + } + + var arr = []; + var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE; + for (var i = 0; i < buf.length; i += intSize) { + arr.push(fn.call(buf, i)); + } + return arr; +} + +function toBuffer(arr, size, bigEndian) { + var buf = new Buffer(size); + var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE; + for (var i = 0; i < arr.length; i++) { + fn.call(buf, arr[i], i * 4, true); + } + return buf; +} + +function hash(buf, fn, hashSize, bigEndian) { + if (!Buffer.isBuffer(buf)) buf = new Buffer(buf); + var arr = fn(toArray(buf, bigEndian), buf.length * chrsz); + return toBuffer(arr, hashSize, bigEndian); +} +exports.hash = hash; +}).call(this,require("buffer").Buffer) +},{"buffer":49}],57:[function(require,module,exports){ +'use strict'; +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +var helpers = require('./helpers'); + +/* + * Calculate the MD5 of an array of little-endian words, and a bit length + */ +function core_md5(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); + d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); + d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); + d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i+10], 17, -42063); + b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); + d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + + a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); + d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); + c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); + d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); + c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); + d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); + c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); + d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); + c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + + a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); + d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); + d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); + d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); + d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + + a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); + d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); + d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); + d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); + d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); + +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn(q, a, b, x, s, t) +{ + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +} +function md5_ff(a, b, c, d, x, s, t) +{ + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5_gg(a, b, c, d, x, s, t) +{ + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5_hh(a, b, c, d, x, s, t) +{ + return md5_cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5_ii(a, b, c, d, x, s, t) +{ + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +module.exports = function md5(buf) { + return helpers.hash(buf, core_md5, 16); +}; +},{"./helpers":56}],58:[function(require,module,exports){ +(function (Buffer){ +'use strict'; +var createHash = require('create-hash/browser'); +var inherits = require('inherits') + +var Transform = require('stream').Transform + +var ZEROS = new Buffer(128) +ZEROS.fill(0) + +function Hmac(alg, key) { + Transform.call(this) + alg = alg.toLowerCase() + if (typeof key === 'string') { + key = new Buffer(key) + } + + var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64 + + this._alg = alg + this._key = key + + if (key.length > blocksize) { + key = createHash(alg).update(key).digest() + + } else if (key.length < blocksize) { + key = Buffer.concat([key, ZEROS], blocksize) + } + + var ipad = this._ipad = new Buffer(blocksize) + var opad = this._opad = new Buffer(blocksize) + + for (var i = 0; i < blocksize; i++) { + ipad[i] = key[i] ^ 0x36 + opad[i] = key[i] ^ 0x5C + } + + this._hash = createHash(alg).update(ipad) +} + +inherits(Hmac, Transform) + +Hmac.prototype.update = function (data, enc) { + this._hash.update(data, enc) + + return this +} + +Hmac.prototype._transform = function (data, _, next) { + this._hash.update(data) + + next() +} + +Hmac.prototype._flush = function (next) { + this.push(this.digest()) + + next() +} + +Hmac.prototype.digest = function (enc) { + var h = this._hash.digest() + + return createHash(this._alg).update(this._opad).update(h).digest(enc) +} + +module.exports = function createHmac(alg, key) { + return new Hmac(alg, key) +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49,"create-hash/browser":55,"inherits":97,"stream":139}],59:[function(require,module,exports){ +'use strict' + +exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes') +exports.createHash = exports.Hash = require('create-hash') +exports.createHmac = exports.Hmac = require('create-hmac') + +var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(Object.keys(require('browserify-sign/algos'))) +exports.getHashes = function () { + return hashes +} + +var p = require('pbkdf2') +exports.pbkdf2 = p.pbkdf2 +exports.pbkdf2Sync = p.pbkdf2Sync + +var aes = require('browserify-cipher') +;[ + 'Cipher', + 'createCipher', + 'Cipheriv', + 'createCipheriv', + 'Decipher', + 'createDecipher', + 'Decipheriv', + 'createDecipheriv', + 'getCiphers', + 'listCiphers' +].forEach(function (key) { + exports[key] = aes[key] +}) + +var dh = require('diffie-hellman') +;[ + 'DiffieHellmanGroup', + 'createDiffieHellmanGroup', + 'getDiffieHellman', + 'createDiffieHellman', + 'DiffieHellman' +].forEach(function (key) { + exports[key] = dh[key] +}) + +var sign = require('browserify-sign') +;[ + 'createSign', + 'Sign', + 'createVerify', + 'Verify' +].forEach(function (key) { + exports[key] = sign[key] +}) + +exports.createECDH = require('create-ecdh') + +var publicEncrypt = require('public-encrypt') + +;[ + 'publicEncrypt', + 'privateEncrypt', + 'publicDecrypt', + 'privateDecrypt' +].forEach(function (key) { + exports[key] = publicEncrypt[key] +}) + +// the least I can do is make error messages for the rest of the node.js/crypto api. +;[ + 'createCredentials' +].forEach(function (name) { + exports[name] = function () { + throw new Error([ + 'sorry, ' + name + ' is not implemented yet', + 'we accept pull requests', + 'https://github.com/crypto-browserify/crypto-browserify' + ].join('\n')) + } +}) + +},{"browserify-cipher":37,"browserify-sign":42,"browserify-sign/algos":41,"create-ecdh":54,"create-hash":55,"create-hmac":58,"diffie-hellman":66,"pbkdf2":108,"public-encrypt":112,"randombytes":118}],60:[function(require,module,exports){ +'use strict'; + +exports.utils = require('./des/utils'); +exports.Cipher = require('./des/cipher'); +exports.DES = require('./des/des'); +exports.CBC = require('./des/cbc'); +exports.EDE = require('./des/ede'); + +},{"./des/cbc":61,"./des/cipher":62,"./des/des":63,"./des/ede":64,"./des/utils":65}],61:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +var proto = {}; + +function CBCState(iv) { + assert.equal(iv.length, 8, 'Invalid IV length'); + + this.iv = new Array(8); + for (var i = 0; i < this.iv.length; i++) + this.iv[i] = iv[i]; +} + +function instantiate(Base) { + function CBC(options) { + Base.call(this, options); + this._cbcInit(); + } + inherits(CBC, Base); + + var keys = Object.keys(proto); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + CBC.prototype[key] = proto[key]; + } + + CBC.create = function create(options) { + return new CBC(options); + }; + + return CBC; +} + +exports.instantiate = instantiate; + +proto._cbcInit = function _cbcInit() { + var state = new CBCState(this.options.iv); + this._cbcState = state; +}; + +proto._update = function _update(inp, inOff, out, outOff) { + var state = this._cbcState; + var superProto = this.constructor.super_.prototype; + + var iv = state.iv; + if (this.type === 'encrypt') { + for (var i = 0; i < this.blockSize; i++) + iv[i] ^= inp[inOff + i]; + + superProto._update.call(this, iv, 0, out, outOff); + + for (var i = 0; i < this.blockSize; i++) + iv[i] = out[outOff + i]; + } else { + superProto._update.call(this, inp, inOff, out, outOff); + + for (var i = 0; i < this.blockSize; i++) + out[outOff + i] ^= iv[i]; + + for (var i = 0; i < this.blockSize; i++) + iv[i] = inp[inOff + i]; + } +}; + +},{"inherits":97,"minimalistic-assert":102}],62:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); + +function Cipher(options) { + this.options = options; + + this.type = this.options.type; + this.blockSize = 8; + this._init(); + + this.buffer = new Array(this.blockSize); + this.bufferOff = 0; +} +module.exports = Cipher; + +Cipher.prototype._init = function _init() { + // Might be overrided +}; + +Cipher.prototype.update = function update(data) { + if (data.length === 0) + return []; + + if (this.type === 'decrypt') + return this._updateDecrypt(data); + else + return this._updateEncrypt(data); +}; + +Cipher.prototype._buffer = function _buffer(data, off) { + // Append data to buffer + var min = Math.min(this.buffer.length - this.bufferOff, data.length - off); + for (var i = 0; i < min; i++) + this.buffer[this.bufferOff + i] = data[off + i]; + this.bufferOff += min; + + // Shift next + return min; +}; + +Cipher.prototype._flushBuffer = function _flushBuffer(out, off) { + this._update(this.buffer, 0, out, off); + this.bufferOff = 0; + return this.blockSize; +}; + +Cipher.prototype._updateEncrypt = function _updateEncrypt(data) { + var inputOff = 0; + var outputOff = 0; + + var count = ((this.bufferOff + data.length) / this.blockSize) | 0; + var out = new Array(count * this.blockSize); + + if (this.bufferOff !== 0) { + inputOff += this._buffer(data, inputOff); + + if (this.bufferOff === this.buffer.length) + outputOff += this._flushBuffer(out, outputOff); + } + + // Write blocks + var max = data.length - ((data.length - inputOff) % this.blockSize); + for (; inputOff < max; inputOff += this.blockSize) { + this._update(data, inputOff, out, outputOff); + outputOff += this.blockSize; + } + + // Queue rest + for (; inputOff < data.length; inputOff++, this.bufferOff++) + this.buffer[this.bufferOff] = data[inputOff]; + + return out; +}; + +Cipher.prototype._updateDecrypt = function _updateDecrypt(data) { + var inputOff = 0; + var outputOff = 0; + + var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1; + var out = new Array(count * this.blockSize); + + // TODO(indutny): optimize it, this is far from optimal + for (; count > 0; count--) { + inputOff += this._buffer(data, inputOff); + outputOff += this._flushBuffer(out, outputOff); + } + + // Buffer rest of the input + inputOff += this._buffer(data, inputOff); + + return out; +}; + +Cipher.prototype.final = function final(buffer) { + var first; + if (buffer) + first = this.update(buffer); + + var last; + if (this.type === 'encrypt') + last = this._finalEncrypt(); + else + last = this._finalDecrypt(); + + if (first) + return first.concat(last); + else + return last; +}; + +Cipher.prototype._pad = function _pad(buffer, off) { + if (off === 0) + return false; + + while (off < buffer.length) + buffer[off++] = 0; + + return true; +}; + +Cipher.prototype._finalEncrypt = function _finalEncrypt() { + if (!this._pad(this.buffer, this.bufferOff)) + return []; + + var out = new Array(this.blockSize); + this._update(this.buffer, 0, out, 0); + return out; +}; + +Cipher.prototype._unpad = function _unpad(buffer) { + return buffer; +}; + +Cipher.prototype._finalDecrypt = function _finalDecrypt() { + assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt'); + var out = new Array(this.blockSize); + this._flushBuffer(out, 0); + + return this._unpad(out); +}; + +},{"minimalistic-assert":102}],63:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +var des = require('../des'); +var utils = des.utils; +var Cipher = des.Cipher; + +function DESState() { + this.tmp = new Array(2); + this.keys = null; +} + +function DES(options) { + Cipher.call(this, options); + + var state = new DESState(); + this._desState = state; + + this.deriveKeys(state, options.key); +} +inherits(DES, Cipher); +module.exports = DES; + +DES.create = function create(options) { + return new DES(options); +}; + +var shiftTable = [ + 1, 1, 2, 2, 2, 2, 2, 2, + 1, 2, 2, 2, 2, 2, 2, 1 +]; + +DES.prototype.deriveKeys = function deriveKeys(state, key) { + state.keys = new Array(16 * 2); + + assert.equal(key.length, this.blockSize, 'Invalid key length'); + + var kL = utils.readUInt32BE(key, 0); + var kR = utils.readUInt32BE(key, 4); + + utils.pc1(kL, kR, state.tmp, 0); + kL = state.tmp[0]; + kR = state.tmp[1]; + for (var i = 0; i < state.keys.length; i += 2) { + var shift = shiftTable[i >>> 1]; + kL = utils.r28shl(kL, shift); + kR = utils.r28shl(kR, shift); + utils.pc2(kL, kR, state.keys, i); + } +}; + +DES.prototype._update = function _update(inp, inOff, out, outOff) { + var state = this._desState; + + var l = utils.readUInt32BE(inp, inOff); + var r = utils.readUInt32BE(inp, inOff + 4); + + // Initial Permutation + utils.ip(l, r, state.tmp, 0); + l = state.tmp[0]; + r = state.tmp[1]; + + if (this.type === 'encrypt') + this._encrypt(state, l, r, state.tmp, 0); + else + this._decrypt(state, l, r, state.tmp, 0); + + l = state.tmp[0]; + r = state.tmp[1]; + + utils.writeUInt32BE(out, l, outOff); + utils.writeUInt32BE(out, r, outOff + 4); +}; + +DES.prototype._pad = function _pad(buffer, off) { + var value = buffer.length - off; + for (var i = off; i < buffer.length; i++) + buffer[i] = value; + + return true; +}; + +DES.prototype._unpad = function _unpad(buffer) { + var pad = buffer[buffer.length - 1]; + for (var i = buffer.length - pad; i < buffer.length; i++) + assert.equal(buffer[i], pad); + + return buffer.slice(0, buffer.length - pad); +}; + +DES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) { + var l = lStart; + var r = rStart; + + // Apply f() x16 times + for (var i = 0; i < state.keys.length; i += 2) { + var keyL = state.keys[i]; + var keyR = state.keys[i + 1]; + + // f(r, k) + utils.expand(r, state.tmp, 0); + + keyL ^= state.tmp[0]; + keyR ^= state.tmp[1]; + var s = utils.substitute(keyL, keyR); + var f = utils.permute(s); + + var t = r; + r = (l ^ f) >>> 0; + l = t; + } + + // Reverse Initial Permutation + utils.rip(r, l, out, off); +}; + +DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) { + var l = rStart; + var r = lStart; + + // Apply f() x16 times + for (var i = state.keys.length - 2; i >= 0; i -= 2) { + var keyL = state.keys[i]; + var keyR = state.keys[i + 1]; + + // f(r, k) + utils.expand(l, state.tmp, 0); + + keyL ^= state.tmp[0]; + keyR ^= state.tmp[1]; + var s = utils.substitute(keyL, keyR); + var f = utils.permute(s); + + var t = l; + l = (r ^ f) >>> 0; + r = t; + } + + // Reverse Initial Permutation + utils.rip(l, r, out, off); +}; + +},{"../des":60,"inherits":97,"minimalistic-assert":102}],64:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +var des = require('../des'); +var Cipher = des.Cipher; +var DES = des.DES; + +function EDEState(type, key) { + assert.equal(key.length, 24, 'Invalid key length'); + + var k1 = key.slice(0, 8); + var k2 = key.slice(8, 16); + var k3 = key.slice(16, 24); + + if (type === 'encrypt') { + this.ciphers = [ + DES.create({ type: 'encrypt', key: k1 }), + DES.create({ type: 'decrypt', key: k2 }), + DES.create({ type: 'encrypt', key: k3 }) + ]; + } else { + this.ciphers = [ + DES.create({ type: 'decrypt', key: k3 }), + DES.create({ type: 'encrypt', key: k2 }), + DES.create({ type: 'decrypt', key: k1 }) + ]; + } +} + +function EDE(options) { + Cipher.call(this, options); + + var state = new EDEState(this.type, this.options.key); + this._edeState = state; +} +inherits(EDE, Cipher); + +module.exports = EDE; + +EDE.create = function create(options) { + return new EDE(options); +}; + +EDE.prototype._update = function _update(inp, inOff, out, outOff) { + var state = this._edeState; + + state.ciphers[0]._update(inp, inOff, out, outOff); + state.ciphers[1]._update(out, outOff, out, outOff); + state.ciphers[2]._update(out, outOff, out, outOff); +}; + +EDE.prototype._pad = DES.prototype._pad; +EDE.prototype._unpad = DES.prototype._unpad; + +},{"../des":60,"inherits":97,"minimalistic-assert":102}],65:[function(require,module,exports){ +'use strict'; + +exports.readUInt32BE = function readUInt32BE(bytes, off) { + var res = (bytes[0 + off] << 24) | + (bytes[1 + off] << 16) | + (bytes[2 + off] << 8) | + bytes[3 + off]; + return res >>> 0; +}; + +exports.writeUInt32BE = function writeUInt32BE(bytes, value, off) { + bytes[0 + off] = value >>> 24; + bytes[1 + off] = (value >>> 16) & 0xff; + bytes[2 + off] = (value >>> 8) & 0xff; + bytes[3 + off] = value & 0xff; +}; + +exports.ip = function ip(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + for (var i = 6; i >= 0; i -= 2) { + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inR >>> (j + i)) & 1; + } + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inL >>> (j + i)) & 1; + } + } + + for (var i = 6; i >= 0; i -= 2) { + for (var j = 1; j <= 25; j += 8) { + outR <<= 1; + outR |= (inR >>> (j + i)) & 1; + } + for (var j = 1; j <= 25; j += 8) { + outR <<= 1; + outR |= (inL >>> (j + i)) & 1; + } + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.rip = function rip(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + for (var i = 0; i < 4; i++) { + for (var j = 24; j >= 0; j -= 8) { + outL <<= 1; + outL |= (inR >>> (j + i)) & 1; + outL <<= 1; + outL |= (inL >>> (j + i)) & 1; + } + } + for (var i = 4; i < 8; i++) { + for (var j = 24; j >= 0; j -= 8) { + outR <<= 1; + outR |= (inR >>> (j + i)) & 1; + outR <<= 1; + outR |= (inL >>> (j + i)) & 1; + } + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.pc1 = function pc1(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + // 7, 15, 23, 31, 39, 47, 55, 63 + // 6, 14, 22, 30, 39, 47, 55, 63 + // 5, 13, 21, 29, 39, 47, 55, 63 + // 4, 12, 20, 28 + for (var i = 7; i >= 5; i--) { + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inR >> (j + i)) & 1; + } + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inL >> (j + i)) & 1; + } + } + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inR >> (j + i)) & 1; + } + + // 1, 9, 17, 25, 33, 41, 49, 57 + // 2, 10, 18, 26, 34, 42, 50, 58 + // 3, 11, 19, 27, 35, 43, 51, 59 + // 36, 44, 52, 60 + for (var i = 1; i <= 3; i++) { + for (var j = 0; j <= 24; j += 8) { + outR <<= 1; + outR |= (inR >> (j + i)) & 1; + } + for (var j = 0; j <= 24; j += 8) { + outR <<= 1; + outR |= (inL >> (j + i)) & 1; + } + } + for (var j = 0; j <= 24; j += 8) { + outR <<= 1; + outR |= (inL >> (j + i)) & 1; + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.r28shl = function r28shl(num, shift) { + return ((num << shift) & 0xfffffff) | (num >>> (28 - shift)); +}; + +var pc2table = [ + // inL => outL + 14, 11, 17, 4, 27, 23, 25, 0, + 13, 22, 7, 18, 5, 9, 16, 24, + 2, 20, 12, 21, 1, 8, 15, 26, + + // inR => outR + 15, 4, 25, 19, 9, 1, 26, 16, + 5, 11, 23, 8, 12, 7, 17, 0, + 22, 3, 10, 14, 6, 20, 27, 24 +]; + +exports.pc2 = function pc2(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + var len = pc2table.length >>> 1; + for (var i = 0; i < len; i++) { + outL <<= 1; + outL |= (inL >>> pc2table[i]) & 0x1; + } + for (var i = len; i < pc2table.length; i++) { + outR <<= 1; + outR |= (inR >>> pc2table[i]) & 0x1; + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.expand = function expand(r, out, off) { + var outL = 0; + var outR = 0; + + outL = ((r & 1) << 5) | (r >>> 27); + for (var i = 23; i >= 15; i -= 4) { + outL <<= 6; + outL |= (r >>> i) & 0x3f; + } + for (var i = 11; i >= 3; i -= 4) { + outR |= (r >>> i) & 0x3f; + outR <<= 6; + } + outR |= ((r & 0x1f) << 1) | (r >>> 31); + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +var sTable = [ + 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, + 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, + 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7, + 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13, + + 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14, + 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, + 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2, + 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9, + + 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10, + 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1, + 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7, + 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, + + 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3, + 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9, + 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8, + 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14, + + 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1, + 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6, + 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13, + 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3, + + 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, + 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8, + 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10, + 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13, + + 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, + 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6, + 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7, + 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12, + + 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4, + 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, + 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, + 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11 +]; + +exports.substitute = function substitute(inL, inR) { + var out = 0; + for (var i = 0; i < 4; i++) { + var b = (inL >>> (18 - i * 6)) & 0x3f; + var sb = sTable[i * 0x40 + b]; + + out <<= 4; + out |= sb; + } + for (var i = 0; i < 4; i++) { + var b = (inR >>> (18 - i * 6)) & 0x3f; + var sb = sTable[4 * 0x40 + i * 0x40 + b]; + + out <<= 4; + out |= sb; + } + return out >>> 0; +}; + +var permuteTable = [ + 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, + 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7 +]; + +exports.permute = function permute(num) { + var out = 0; + for (var i = 0; i < permuteTable.length; i++) { + out <<= 1; + out |= (num >>> permuteTable[i]) & 0x1; + } + return out >>> 0; +}; + +exports.padSplit = function padSplit(num, size, group) { + var str = num.toString(2); + while (str.length < size) + str = '0' + str; + + var out = []; + for (var i = 0; i < size; i += group) + out.push(str.slice(i, i + group)); + return out.join(' '); +}; + +},{}],66:[function(require,module,exports){ +(function (Buffer){ +var generatePrime = require('./lib/generatePrime') +var primes = require('./lib/primes.json') + +var DH = require('./lib/dh') + +function getDiffieHellman (mod) { + var prime = new Buffer(primes[mod].prime, 'hex') + var gen = new Buffer(primes[mod].gen, 'hex') + + return new DH(prime, gen) +} + +var ENCODINGS = { + 'binary': true, 'hex': true, 'base64': true +} + +function createDiffieHellman (prime, enc, generator, genc) { + if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) { + return createDiffieHellman(prime, 'binary', enc, generator) + } + + enc = enc || 'binary' + genc = genc || 'binary' + generator = generator || new Buffer([2]) + + if (!Buffer.isBuffer(generator)) { + generator = new Buffer(generator, genc) + } + + if (typeof prime === 'number') { + return new DH(generatePrime(prime, generator), generator, true) + } + + if (!Buffer.isBuffer(prime)) { + prime = new Buffer(prime, enc) + } + + return new DH(prime, generator, true) +} + +exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman +exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman + +}).call(this,require("buffer").Buffer) +},{"./lib/dh":67,"./lib/generatePrime":68,"./lib/primes.json":69,"buffer":49}],67:[function(require,module,exports){ +(function (Buffer){ +var BN = require('bn.js'); +var MillerRabin = require('miller-rabin'); +var millerRabin = new MillerRabin(); +var TWENTYFOUR = new BN(24); +var ELEVEN = new BN(11); +var TEN = new BN(10); +var THREE = new BN(3); +var SEVEN = new BN(7); +var primes = require('./generatePrime'); +var randomBytes = require('randombytes'); +module.exports = DH; + +function setPublicKey(pub, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(pub)) { + pub = new Buffer(pub, enc); + } + this._pub = new BN(pub); + return this; +} + +function setPrivateKey(priv, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(priv)) { + priv = new Buffer(priv, enc); + } + this._priv = new BN(priv); + return this; +} + +var primeCache = {}; +function checkPrime(prime, generator) { + var gen = generator.toString('hex'); + var hex = [gen, prime.toString(16)].join('_'); + if (hex in primeCache) { + return primeCache[hex]; + } + var error = 0; + + if (prime.isEven() || + !primes.simpleSieve || + !primes.fermatTest(prime) || + !millerRabin.test(prime)) { + //not a prime so +1 + error += 1; + + if (gen === '02' || gen === '05') { + // we'd be able to check the generator + // it would fail so +8 + error += 8; + } else { + //we wouldn't be able to test the generator + // so +4 + error += 4; + } + primeCache[hex] = error; + return error; + } + if (!millerRabin.test(prime.shrn(1))) { + //not a safe prime + error += 2; + } + var rem; + switch (gen) { + case '02': + if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) { + // unsuidable generator + error += 8; + } + break; + case '05': + rem = prime.mod(TEN); + if (rem.cmp(THREE) && rem.cmp(SEVEN)) { + // prime mod 10 needs to equal 3 or 7 + error += 8; + } + break; + default: + error += 4; + } + primeCache[hex] = error; + return error; +} + +function DH(prime, generator, malleable) { + this.setGenerator(generator); + this.__prime = new BN(prime); + this._prime = BN.mont(this.__prime); + this._primeLen = prime.length; + this._pub = undefined; + this._priv = undefined; + this._primeCode = undefined; + if (malleable) { + this.setPublicKey = setPublicKey; + this.setPrivateKey = setPrivateKey; + } else { + this._primeCode = 8; + } +} +Object.defineProperty(DH.prototype, 'verifyError', { + enumerable: true, + get: function () { + if (typeof this._primeCode !== 'number') { + this._primeCode = checkPrime(this.__prime, this.__gen); + } + return this._primeCode; + } +}); +DH.prototype.generateKeys = function () { + if (!this._priv) { + this._priv = new BN(randomBytes(this._primeLen)); + } + this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed(); + return this.getPublicKey(); +}; + +DH.prototype.computeSecret = function (other) { + other = new BN(other); + other = other.toRed(this._prime); + var secret = other.redPow(this._priv).fromRed(); + var out = new Buffer(secret.toArray()); + var prime = this.getPrime(); + if (out.length < prime.length) { + var front = new Buffer(prime.length - out.length); + front.fill(0); + out = Buffer.concat([front, out]); + } + return out; +}; + +DH.prototype.getPublicKey = function getPublicKey(enc) { + return formatReturnValue(this._pub, enc); +}; + +DH.prototype.getPrivateKey = function getPrivateKey(enc) { + return formatReturnValue(this._priv, enc); +}; + +DH.prototype.getPrime = function (enc) { + return formatReturnValue(this.__prime, enc); +}; + +DH.prototype.getGenerator = function (enc) { + return formatReturnValue(this._gen, enc); +}; + +DH.prototype.setGenerator = function (gen, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(gen)) { + gen = new Buffer(gen, enc); + } + this.__gen = gen; + this._gen = new BN(gen); + return this; +}; + +function formatReturnValue(bn, enc) { + var buf = new Buffer(bn.toArray()); + if (!enc) { + return buf; + } else { + return buf.toString(enc); + } +} + +}).call(this,require("buffer").Buffer) +},{"./generatePrime":68,"bn.js":19,"buffer":49,"miller-rabin":101,"randombytes":118}],68:[function(require,module,exports){ +var randomBytes = require('randombytes'); +module.exports = findPrime; +findPrime.simpleSieve = simpleSieve; +findPrime.fermatTest = fermatTest; +var BN = require('bn.js'); +var TWENTYFOUR = new BN(24); +var MillerRabin = require('miller-rabin'); +var millerRabin = new MillerRabin(); +var ONE = new BN(1); +var TWO = new BN(2); +var FIVE = new BN(5); +var SIXTEEN = new BN(16); +var EIGHT = new BN(8); +var TEN = new BN(10); +var THREE = new BN(3); +var SEVEN = new BN(7); +var ELEVEN = new BN(11); +var FOUR = new BN(4); +var TWELVE = new BN(12); +var primes = null; + +function _getPrimes() { + if (primes !== null) + return primes; + + var limit = 0x100000; + var res = []; + res[0] = 2; + for (var i = 1, k = 3; k < limit; k += 2) { + var sqrt = Math.ceil(Math.sqrt(k)); + for (var j = 0; j < i && res[j] <= sqrt; j++) + if (k % res[j] === 0) + break; + + if (i !== j && res[j] <= sqrt) + continue; + + res[i++] = k; + } + primes = res; + return res; +} + +function simpleSieve(p) { + var primes = _getPrimes(); + + for (var i = 0; i < primes.length; i++) + if (p.modn(primes[i]) === 0) { + if (p.cmpn(primes[i]) === 0) { + return true; + } else { + return false; + } + } + + return true; +} + +function fermatTest(p) { + var red = BN.mont(p); + return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0; +} + +function findPrime(bits, gen) { + if (bits < 16) { + // this is what openssl does + if (gen === 2 || gen === 5) { + return new BN([0x8c, 0x7b]); + } else { + return new BN([0x8c, 0x27]); + } + } + gen = new BN(gen); + + var num, n2; + + while (true) { + num = new BN(randomBytes(Math.ceil(bits / 8))); + while (num.bitLength() > bits) { + num.ishrn(1); + } + if (num.isEven()) { + num.iadd(ONE); + } + if (!num.testn(1)) { + num.iadd(TWO); + } + if (!gen.cmp(TWO)) { + while (num.mod(TWENTYFOUR).cmp(ELEVEN)) { + num.iadd(FOUR); + } + } else if (!gen.cmp(FIVE)) { + while (num.mod(TEN).cmp(THREE)) { + num.iadd(FOUR); + } + } + n2 = num.shrn(1); + if (simpleSieve(n2) && simpleSieve(num) && + fermatTest(n2) && fermatTest(num) && + millerRabin.test(n2) && millerRabin.test(num)) { + return num; + } + } + +} + +},{"bn.js":19,"miller-rabin":101,"randombytes":118}],69:[function(require,module,exports){ +module.exports={ + "modp1": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff" + }, + "modp2": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff" + }, + "modp5": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff" + }, + "modp14": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff" + }, + "modp15": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff" + }, + "modp16": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff" + }, + "modp17": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff" + }, + "modp18": { + "gen": "02", + "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff" + } +} +},{}],70:[function(require,module,exports){ +'use strict'; + +var elliptic = exports; + +elliptic.version = require('../package.json').version; +elliptic.utils = require('./elliptic/utils'); +elliptic.rand = require('brorand'); +elliptic.hmacDRBG = require('./elliptic/hmac-drbg'); +elliptic.curve = require('./elliptic/curve'); +elliptic.curves = require('./elliptic/curves'); + +// Protocols +elliptic.ec = require('./elliptic/ec'); +elliptic.eddsa = require('./elliptic/eddsa'); + +},{"../package.json":86,"./elliptic/curve":73,"./elliptic/curves":76,"./elliptic/ec":77,"./elliptic/eddsa":80,"./elliptic/hmac-drbg":83,"./elliptic/utils":85,"brorand":20}],71:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var getNAF = utils.getNAF; +var getJSF = utils.getJSF; +var assert = utils.assert; + +function BaseCurve(type, conf) { + this.type = type; + this.p = new BN(conf.p, 16); + + // Use Montgomery, when there is no fast reduction for the prime + this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); + + // Useful for many curves + this.zero = new BN(0).toRed(this.red); + this.one = new BN(1).toRed(this.red); + this.two = new BN(2).toRed(this.red); + + // Curve configuration, optional + this.n = conf.n && new BN(conf.n, 16); + this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); + + // Temporary arrays + this._wnafT1 = new Array(4); + this._wnafT2 = new Array(4); + this._wnafT3 = new Array(4); + this._wnafT4 = new Array(4); + + // Generalized Greg Maxwell's trick + var adjustCount = this.n && this.p.div(this.n); + if (!adjustCount || adjustCount.cmpn(100) > 0) { + this.redN = null; + } else { + this._maxwellTrick = true; + this.redN = this.n.toRed(this.red); + } +} +module.exports = BaseCurve; + +BaseCurve.prototype.point = function point() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype.validate = function validate() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { + assert(p.precomputed); + var doubles = p._getDoubles(); + + var naf = getNAF(k, 1); + var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); + I /= 3; + + // Translate into more windowed form + var repr = []; + for (var j = 0; j < naf.length; j += doubles.step) { + var nafW = 0; + for (var k = j + doubles.step - 1; k >= j; k--) + nafW = (nafW << 1) + naf[k]; + repr.push(nafW); + } + + var a = this.jpoint(null, null, null); + var b = this.jpoint(null, null, null); + for (var i = I; i > 0; i--) { + for (var j = 0; j < repr.length; j++) { + var nafW = repr[j]; + if (nafW === i) + b = b.mixedAdd(doubles.points[j]); + else if (nafW === -i) + b = b.mixedAdd(doubles.points[j].neg()); + } + a = a.add(b); + } + return a.toP(); +}; + +BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { + var w = 4; + + // Precompute window + var nafPoints = p._getNAFPoints(w); + w = nafPoints.wnd; + var wnd = nafPoints.points; + + // Get NAF form + var naf = getNAF(k, w); + + // Add `this`*(N+1) for every w-NAF index + var acc = this.jpoint(null, null, null); + for (var i = naf.length - 1; i >= 0; i--) { + // Count zeroes + for (var k = 0; i >= 0 && naf[i] === 0; i--) + k++; + if (i >= 0) + k++; + acc = acc.dblp(k); + + if (i < 0) + break; + var z = naf[i]; + assert(z !== 0); + if (p.type === 'affine') { + // J +- P + if (z > 0) + acc = acc.mixedAdd(wnd[(z - 1) >> 1]); + else + acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); + } else { + // J +- J + if (z > 0) + acc = acc.add(wnd[(z - 1) >> 1]); + else + acc = acc.add(wnd[(-z - 1) >> 1].neg()); + } + } + return p.type === 'affine' ? acc.toP() : acc; +}; + +BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, + points, + coeffs, + len, + jacobianResult) { + var wndWidth = this._wnafT1; + var wnd = this._wnafT2; + var naf = this._wnafT3; + + // Fill all arrays + var max = 0; + for (var i = 0; i < len; i++) { + var p = points[i]; + var nafPoints = p._getNAFPoints(defW); + wndWidth[i] = nafPoints.wnd; + wnd[i] = nafPoints.points; + } + + // Comb small window NAFs + for (var i = len - 1; i >= 1; i -= 2) { + var a = i - 1; + var b = i; + if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { + naf[a] = getNAF(coeffs[a], wndWidth[a]); + naf[b] = getNAF(coeffs[b], wndWidth[b]); + max = Math.max(naf[a].length, max); + max = Math.max(naf[b].length, max); + continue; + } + + var comb = [ + points[a], /* 1 */ + null, /* 3 */ + null, /* 5 */ + points[b] /* 7 */ + ]; + + // Try to avoid Projective points, if possible + if (points[a].y.cmp(points[b].y) === 0) { + comb[1] = points[a].add(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].add(points[b].neg()); + } else { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } + + var index = [ + -3, /* -1 -1 */ + -1, /* -1 0 */ + -5, /* -1 1 */ + -7, /* 0 -1 */ + 0, /* 0 0 */ + 7, /* 0 1 */ + 5, /* 1 -1 */ + 1, /* 1 0 */ + 3 /* 1 1 */ + ]; + + var jsf = getJSF(coeffs[a], coeffs[b]); + max = Math.max(jsf[0].length, max); + naf[a] = new Array(max); + naf[b] = new Array(max); + for (var j = 0; j < max; j++) { + var ja = jsf[0][j] | 0; + var jb = jsf[1][j] | 0; + + naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; + naf[b][j] = 0; + wnd[a] = comb; + } + } + + var acc = this.jpoint(null, null, null); + var tmp = this._wnafT4; + for (var i = max; i >= 0; i--) { + var k = 0; + + while (i >= 0) { + var zero = true; + for (var j = 0; j < len; j++) { + tmp[j] = naf[j][i] | 0; + if (tmp[j] !== 0) + zero = false; + } + if (!zero) + break; + k++; + i--; + } + if (i >= 0) + k++; + acc = acc.dblp(k); + if (i < 0) + break; + + for (var j = 0; j < len; j++) { + var z = tmp[j]; + var p; + if (z === 0) + continue; + else if (z > 0) + p = wnd[j][(z - 1) >> 1]; + else if (z < 0) + p = wnd[j][(-z - 1) >> 1].neg(); + + if (p.type === 'affine') + acc = acc.mixedAdd(p); + else + acc = acc.add(p); + } + } + // Zeroify references + for (var i = 0; i < len; i++) + wnd[i] = null; + + if (jacobianResult) + return acc; + else + return acc.toP(); +}; + +function BasePoint(curve, type) { + this.curve = curve; + this.type = type; + this.precomputed = null; +} +BaseCurve.BasePoint = BasePoint; + +BasePoint.prototype.eq = function eq(/*other*/) { + throw new Error('Not implemented'); +}; + +BasePoint.prototype.validate = function validate() { + return this.curve.validate(this); +}; + +BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + bytes = utils.toArray(bytes, enc); + + var len = this.p.byteLength(); + + // uncompressed, hybrid-odd, hybrid-even + if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && + bytes.length - 1 === 2 * len) { + if (bytes[0] === 0x06) + assert(bytes[bytes.length - 1] % 2 === 0); + else if (bytes[0] === 0x07) + assert(bytes[bytes.length - 1] % 2 === 1); + + var res = this.point(bytes.slice(1, 1 + len), + bytes.slice(1 + len, 1 + 2 * len)); + + return res; + } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && + bytes.length - 1 === len) { + return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); + } + throw new Error('Unknown point format'); +}; + +BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { + return this.encode(enc, true); +}; + +BasePoint.prototype._encode = function _encode(compact) { + var len = this.curve.p.byteLength(); + var x = this.getX().toArray('be', len); + + if (compact) + return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); + + return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ; +}; + +BasePoint.prototype.encode = function encode(enc, compact) { + return utils.encode(this._encode(compact), enc); +}; + +BasePoint.prototype.precompute = function precompute(power) { + if (this.precomputed) + return this; + + var precomputed = { + doubles: null, + naf: null, + beta: null + }; + precomputed.naf = this._getNAFPoints(8); + precomputed.doubles = this._getDoubles(4, power); + precomputed.beta = this._getBeta(); + this.precomputed = precomputed; + + return this; +}; + +BasePoint.prototype._hasDoubles = function _hasDoubles(k) { + if (!this.precomputed) + return false; + + var doubles = this.precomputed.doubles; + if (!doubles) + return false; + + return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); +}; + +BasePoint.prototype._getDoubles = function _getDoubles(step, power) { + if (this.precomputed && this.precomputed.doubles) + return this.precomputed.doubles; + + var doubles = [ this ]; + var acc = this; + for (var i = 0; i < power; i += step) { + for (var j = 0; j < step; j++) + acc = acc.dbl(); + doubles.push(acc); + } + return { + step: step, + points: doubles + }; +}; + +BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { + if (this.precomputed && this.precomputed.naf) + return this.precomputed.naf; + + var res = [ this ]; + var max = (1 << wnd) - 1; + var dbl = max === 1 ? null : this.dbl(); + for (var i = 1; i < max; i++) + res[i] = res[i - 1].add(dbl); + return { + wnd: wnd, + points: res + }; +}; + +BasePoint.prototype._getBeta = function _getBeta() { + return null; +}; + +BasePoint.prototype.dblp = function dblp(k) { + var r = this; + for (var i = 0; i < k; i++) + r = r.dbl(); + return r; +}; + +},{"../../elliptic":70,"bn.js":19}],72:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var elliptic = require('../../elliptic'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var assert = elliptic.utils.assert; + +function EdwardsCurve(conf) { + // NOTE: Important as we are creating point in Base.call() + this.twisted = (conf.a | 0) !== 1; + this.mOneA = this.twisted && (conf.a | 0) === -1; + this.extended = this.mOneA; + + Base.call(this, 'edwards', conf); + + this.a = new BN(conf.a, 16).umod(this.red.m); + this.a = this.a.toRed(this.red); + this.c = new BN(conf.c, 16).toRed(this.red); + this.c2 = this.c.redSqr(); + this.d = new BN(conf.d, 16).toRed(this.red); + this.dd = this.d.redAdd(this.d); + + assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); + this.oneC = (conf.c | 0) === 1; +} +inherits(EdwardsCurve, Base); +module.exports = EdwardsCurve; + +EdwardsCurve.prototype._mulA = function _mulA(num) { + if (this.mOneA) + return num.redNeg(); + else + return this.a.redMul(num); +}; + +EdwardsCurve.prototype._mulC = function _mulC(num) { + if (this.oneC) + return num; + else + return this.c.redMul(num); +}; + +// Just for compatibility with Short curve +EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { + return this.point(x, y, z, t); +}; + +EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var x2 = x.redSqr(); + var rhs = this.c2.redSub(this.a.redMul(x2)); + var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); + + var y2 = rhs.redMul(lhs.redInvm()); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { + y = new BN(y, 16); + if (!y.red) + y = y.toRed(this.red); + + // x^2 = (y^2 - 1) / (d y^2 + 1) + var y2 = y.redSqr(); + var lhs = y2.redSub(this.one); + var rhs = y2.redMul(this.d).redAdd(this.one); + var x2 = lhs.redMul(rhs.redInvm()); + + if (x2.cmp(this.zero) === 0) { + if (odd) + throw new Error('invalid point'); + else + return this.point(this.zero, y); + } + + var x = x2.redSqrt(); + if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + if (x.isOdd() !== odd) + x = x.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.validate = function validate(point) { + if (point.isInfinity()) + return true; + + // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2) + point.normalize(); + + var x2 = point.x.redSqr(); + var y2 = point.y.redSqr(); + var lhs = x2.redMul(this.a).redAdd(y2); + var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); + + return lhs.cmp(rhs) === 0; +}; + +function Point(curve, x, y, z, t) { + Base.BasePoint.call(this, curve, 'projective'); + if (x === null && y === null && z === null) { + this.x = this.curve.zero; + this.y = this.curve.one; + this.z = this.curve.one; + this.t = this.curve.zero; + this.zOne = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = z ? new BN(z, 16) : this.curve.one; + this.t = t && new BN(t, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + if (this.t && !this.t.red) + this.t = this.t.toRed(this.curve.red); + this.zOne = this.z === this.curve.one; + + // Use extended coordinates + if (this.curve.extended && !this.t) { + this.t = this.x.redMul(this.y); + if (!this.zOne) + this.t = this.t.redMul(this.z.redInvm()); + } + } +} +inherits(Point, Base.BasePoint); + +EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) { + return Point.fromJSON(this, obj); +}; + +EdwardsCurve.prototype.point = function point(x, y, z, t) { + return new Point(this, x, y, z, t); +}; + +Point.fromJSON = function fromJSON(curve, obj) { + return new Point(curve, obj[0], obj[1], obj[2]); +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.x.cmpn(0) === 0 && + this.y.cmp(this.z) === 0; +}; + +Point.prototype._extDbl = function _extDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #doubling-dbl-2008-hwcd + // 4M + 4S + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = 2 * Z1^2 + var c = this.z.redSqr(); + c = c.redIAdd(c); + // D = a * A + var d = this.curve._mulA(a); + // E = (X1 + Y1)^2 - A - B + var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); + // G = D + B + var g = d.redAdd(b); + // F = G - C + var f = g.redSub(c); + // H = D - B + var h = d.redSub(b); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projDbl = function _projDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #doubling-dbl-2008-bbjlp + // #doubling-dbl-2007-bl + // and others + // Generally 3M + 4S or 2M + 4S + + // B = (X1 + Y1)^2 + var b = this.x.redAdd(this.y).redSqr(); + // C = X1^2 + var c = this.x.redSqr(); + // D = Y1^2 + var d = this.y.redSqr(); + + var nx; + var ny; + var nz; + if (this.curve.twisted) { + // E = a * C + var e = this.curve._mulA(c); + // F = E + D + var f = e.redAdd(d); + if (this.zOne) { + // X3 = (B - C - D) * (F - 2) + nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F^2 - 2 * F + nz = f.redSqr().redSub(f).redSub(f); + } else { + // H = Z1^2 + var h = this.z.redSqr(); + // J = F - 2 * H + var j = f.redSub(h).redISub(h); + // X3 = (B-C-D)*J + nx = b.redSub(c).redISub(d).redMul(j); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F * J + nz = f.redMul(j); + } + } else { + // E = C + D + var e = c.redAdd(d); + // H = (c * Z1)^2 + var h = this.curve._mulC(this.c.redMul(this.z)).redSqr(); + // J = E - 2 * H + var j = e.redSub(h).redSub(h); + // X3 = c * (B - E) * J + nx = this.curve._mulC(b.redISub(e)).redMul(j); + // Y3 = c * E * (C - D) + ny = this.curve._mulC(e).redMul(c.redISub(d)); + // Z3 = E * J + nz = e.redMul(j); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + // Double in extended coordinates + if (this.curve.extended) + return this._extDbl(); + else + return this._projDbl(); +}; + +Point.prototype._extAdd = function _extAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #addition-add-2008-hwcd-3 + // 8M + + // A = (Y1 - X1) * (Y2 - X2) + var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); + // B = (Y1 + X1) * (Y2 + X2) + var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); + // C = T1 * k * T2 + var c = this.t.redMul(this.curve.dd).redMul(p.t); + // D = Z1 * 2 * Z2 + var d = this.z.redMul(p.z.redAdd(p.z)); + // E = B - A + var e = b.redSub(a); + // F = D - C + var f = d.redSub(c); + // G = D + C + var g = d.redAdd(c); + // H = B + A + var h = b.redAdd(a); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projAdd = function _projAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #addition-add-2008-bbjlp + // #addition-add-2007-bl + // 10M + 1S + + // A = Z1 * Z2 + var a = this.z.redMul(p.z); + // B = A^2 + var b = a.redSqr(); + // C = X1 * X2 + var c = this.x.redMul(p.x); + // D = Y1 * Y2 + var d = this.y.redMul(p.y); + // E = d * C * D + var e = this.curve.d.redMul(c).redMul(d); + // F = B - E + var f = b.redSub(e); + // G = B + E + var g = b.redAdd(e); + // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D) + var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); + var nx = a.redMul(f).redMul(tmp); + var ny; + var nz; + if (this.curve.twisted) { + // Y3 = A * G * (D - a * C) + ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); + // Z3 = F * G + nz = f.redMul(g); + } else { + // Y3 = A * G * (D - C) + ny = a.redMul(g).redMul(d.redSub(c)); + // Z3 = c * F * G + nz = this.curve._mulC(f).redMul(g); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.add = function add(p) { + if (this.isInfinity()) + return p; + if (p.isInfinity()) + return this; + + if (this.curve.extended) + return this._extAdd(p); + else + return this._projAdd(p); +}; + +Point.prototype.mul = function mul(k) { + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); +}; + +Point.prototype.normalize = function normalize() { + if (this.zOne) + return this; + + // Normalize coordinates + var zi = this.z.redInvm(); + this.x = this.x.redMul(zi); + this.y = this.y.redMul(zi); + if (this.t) + this.t = this.t.redMul(zi); + this.z = this.curve.one; + this.zOne = true; + return this; +}; + +Point.prototype.neg = function neg() { + return this.curve.point(this.x.redNeg(), + this.y, + this.z, + this.t && this.t.redNeg()); +}; + +Point.prototype.getX = function getX() { + this.normalize(); + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + this.normalize(); + return this.y.fromRed(); +}; + +Point.prototype.eq = function eq(other) { + return this === other || + this.getX().cmp(other.getX()) === 0 && + this.getY().cmp(other.getY()) === 0; +}; + +Point.prototype.eqXToP = function eqXToP(x) { + var rx = x.toRed(this.curve.red).redMul(this.z); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(this.z); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + return false; +}; + +// Compatibility with BaseCurve +Point.prototype.toP = Point.prototype.normalize; +Point.prototype.mixedAdd = Point.prototype.add; + +},{"../../elliptic":70,"../curve":73,"bn.js":19,"inherits":97}],73:[function(require,module,exports){ +'use strict'; + +var curve = exports; + +curve.base = require('./base'); +curve.short = require('./short'); +curve.mont = require('./mont'); +curve.edwards = require('./edwards'); + +},{"./base":71,"./edwards":72,"./mont":74,"./short":75}],74:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; + +function MontCurve(conf) { + Base.call(this, 'mont', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.i4 = new BN(4).toRed(this.red).redInvm(); + this.two = new BN(2).toRed(this.red); + this.a24 = this.i4.redMul(this.a.redAdd(this.two)); +} +inherits(MontCurve, Base); +module.exports = MontCurve; + +MontCurve.prototype.validate = function validate(point) { + var x = point.normalize().x; + var x2 = x.redSqr(); + var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); + var y = rhs.redSqrt(); + + return y.redSqr().cmp(rhs) === 0; +}; + +function Point(curve, x, z) { + Base.BasePoint.call(this, curve, 'projective'); + if (x === null && z === null) { + this.x = this.curve.one; + this.z = this.curve.zero; + } else { + this.x = new BN(x, 16); + this.z = new BN(z, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + } +} +inherits(Point, Base.BasePoint); + +MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + return this.point(utils.toArray(bytes, enc), 1); +}; + +MontCurve.prototype.point = function point(x, z) { + return new Point(this, x, z); +}; + +MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) { + return Point.fromJSON(this, obj); +}; + +Point.prototype.precompute = function precompute() { + // No-op +}; + +Point.prototype._encode = function _encode() { + return this.getX().toArray('be', this.curve.p.byteLength()); +}; + +Point.fromJSON = function fromJSON(curve, obj) { + return new Point(curve, obj[0], obj[1] || curve.one); +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +Point.prototype.dbl = function dbl() { + // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3 + // 2M + 2S + 4A + + // A = X1 + Z1 + var a = this.x.redAdd(this.z); + // AA = A^2 + var aa = a.redSqr(); + // B = X1 - Z1 + var b = this.x.redSub(this.z); + // BB = B^2 + var bb = b.redSqr(); + // C = AA - BB + var c = aa.redSub(bb); + // X3 = AA * BB + var nx = aa.redMul(bb); + // Z3 = C * (BB + A24 * C) + var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); + return this.curve.point(nx, nz); +}; + +Point.prototype.add = function add() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.diffAdd = function diffAdd(p, diff) { + // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3 + // 4M + 2S + 6A + + // A = X2 + Z2 + var a = this.x.redAdd(this.z); + // B = X2 - Z2 + var b = this.x.redSub(this.z); + // C = X3 + Z3 + var c = p.x.redAdd(p.z); + // D = X3 - Z3 + var d = p.x.redSub(p.z); + // DA = D * A + var da = d.redMul(a); + // CB = C * B + var cb = c.redMul(b); + // X5 = Z1 * (DA + CB)^2 + var nx = diff.z.redMul(da.redAdd(cb).redSqr()); + // Z5 = X1 * (DA - CB)^2 + var nz = diff.x.redMul(da.redISub(cb).redSqr()); + return this.curve.point(nx, nz); +}; + +Point.prototype.mul = function mul(k) { + var t = k.clone(); + var a = this; // (N / 2) * Q + Q + var b = this.curve.point(null, null); // (N / 2) * Q + var c = this; // Q + + for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) + bits.push(t.andln(1)); + + for (var i = bits.length - 1; i >= 0; i--) { + if (bits[i] === 0) { + // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q + a = a.diffAdd(b, c); + // N * Q = 2 * ((N / 2) * Q + Q)) + b = b.dbl(); + } else { + // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q) + b = a.diffAdd(b, c); + // N * Q + Q = 2 * ((N / 2) * Q + Q) + a = a.dbl(); + } + } + return b; +}; + +Point.prototype.mulAdd = function mulAdd() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.jumlAdd = function jumlAdd() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.eq = function eq(other) { + return this.getX().cmp(other.getX()) === 0; +}; + +Point.prototype.normalize = function normalize() { + this.x = this.x.redMul(this.z.redInvm()); + this.z = this.curve.one; + return this; +}; + +Point.prototype.getX = function getX() { + // Normalize coordinates + this.normalize(); + + return this.x.fromRed(); +}; + +},{"../../elliptic":70,"../curve":73,"bn.js":19,"inherits":97}],75:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var elliptic = require('../../elliptic'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var assert = elliptic.utils.assert; + +function ShortCurve(conf) { + Base.call(this, 'short', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.tinv = this.two.redInvm(); + + this.zeroA = this.a.fromRed().cmpn(0) === 0; + this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; + + // If the curve is endomorphic, precalculate beta and lambda + this.endo = this._getEndomorphism(conf); + this._endoWnafT1 = new Array(4); + this._endoWnafT2 = new Array(4); +} +inherits(ShortCurve, Base); +module.exports = ShortCurve; + +ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { + // No efficient endomorphism + if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) + return; + + // Compute beta and lambda, that lambda * P = (beta * Px; Py) + var beta; + var lambda; + if (conf.beta) { + beta = new BN(conf.beta, 16).toRed(this.red); + } else { + var betas = this._getEndoRoots(this.p); + // Choose the smallest beta + beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; + beta = beta.toRed(this.red); + } + if (conf.lambda) { + lambda = new BN(conf.lambda, 16); + } else { + // Choose the lambda that is matching selected beta + var lambdas = this._getEndoRoots(this.n); + if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { + lambda = lambdas[0]; + } else { + lambda = lambdas[1]; + assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); + } + } + + // Get basis vectors, used for balanced length-two representation + var basis; + if (conf.basis) { + basis = conf.basis.map(function(vec) { + return { + a: new BN(vec.a, 16), + b: new BN(vec.b, 16) + }; + }); + } else { + basis = this._getEndoBasis(lambda); + } + + return { + beta: beta, + lambda: lambda, + basis: basis + }; +}; + +ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { + // Find roots of for x^2 + x + 1 in F + // Root = (-1 +- Sqrt(-3)) / 2 + // + var red = num === this.p ? this.red : BN.mont(num); + var tinv = new BN(2).toRed(red).redInvm(); + var ntinv = tinv.redNeg(); + + var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); + + var l1 = ntinv.redAdd(s).fromRed(); + var l2 = ntinv.redSub(s).fromRed(); + return [ l1, l2 ]; +}; + +ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { + // aprxSqrt >= sqrt(this.n) + var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); + + // 3.74 + // Run EGCD, until r(L + 1) < aprxSqrt + var u = lambda; + var v = this.n.clone(); + var x1 = new BN(1); + var y1 = new BN(0); + var x2 = new BN(0); + var y2 = new BN(1); + + // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) + var a0; + var b0; + // First vector + var a1; + var b1; + // Second vector + var a2; + var b2; + + var prevR; + var i = 0; + var r; + var x; + while (u.cmpn(0) !== 0) { + var q = v.div(u); + r = v.sub(q.mul(u)); + x = x2.sub(q.mul(x1)); + var y = y2.sub(q.mul(y1)); + + if (!a1 && r.cmp(aprxSqrt) < 0) { + a0 = prevR.neg(); + b0 = x1; + a1 = r.neg(); + b1 = x; + } else if (a1 && ++i === 2) { + break; + } + prevR = r; + + v = u; + u = r; + x2 = x1; + x1 = x; + y2 = y1; + y1 = y; + } + a2 = r.neg(); + b2 = x; + + var len1 = a1.sqr().add(b1.sqr()); + var len2 = a2.sqr().add(b2.sqr()); + if (len2.cmp(len1) >= 0) { + a2 = a0; + b2 = b0; + } + + // Normalize signs + if (a1.negative) { + a1 = a1.neg(); + b1 = b1.neg(); + } + if (a2.negative) { + a2 = a2.neg(); + b2 = b2.neg(); + } + + return [ + { a: a1, b: b1 }, + { a: a2, b: b2 } + ]; +}; + +ShortCurve.prototype._endoSplit = function _endoSplit(k) { + var basis = this.endo.basis; + var v1 = basis[0]; + var v2 = basis[1]; + + var c1 = v2.b.mul(k).divRound(this.n); + var c2 = v1.b.neg().mul(k).divRound(this.n); + + var p1 = c1.mul(v1.a); + var p2 = c2.mul(v2.a); + var q1 = c1.mul(v1.b); + var q2 = c2.mul(v2.b); + + // Calculate answer + var k1 = k.sub(p1).sub(p2); + var k2 = q1.add(q2).neg(); + return { k1: k1, k2: k2 }; +}; + +ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + // XXX Is there any way to tell if the number is odd without converting it + // to non-red form? + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +ShortCurve.prototype.validate = function validate(point) { + if (point.inf) + return true; + + var x = point.x; + var y = point.y; + + var ax = this.a.redMul(x); + var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); + return y.redSqr().redISub(rhs).cmpn(0) === 0; +}; + +ShortCurve.prototype._endoWnafMulAdd = + function _endoWnafMulAdd(points, coeffs, jacobianResult) { + var npoints = this._endoWnafT1; + var ncoeffs = this._endoWnafT2; + for (var i = 0; i < points.length; i++) { + var split = this._endoSplit(coeffs[i]); + var p = points[i]; + var beta = p._getBeta(); + + if (split.k1.negative) { + split.k1.ineg(); + p = p.neg(true); + } + if (split.k2.negative) { + split.k2.ineg(); + beta = beta.neg(true); + } + + npoints[i * 2] = p; + npoints[i * 2 + 1] = beta; + ncoeffs[i * 2] = split.k1; + ncoeffs[i * 2 + 1] = split.k2; + } + var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); + + // Clean-up references to points and coefficients + for (var j = 0; j < i * 2; j++) { + npoints[j] = null; + ncoeffs[j] = null; + } + return res; +}; + +function Point(curve, x, y, isRed) { + Base.BasePoint.call(this, curve, 'affine'); + if (x === null && y === null) { + this.x = null; + this.y = null; + this.inf = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + // Force redgomery representation when loading from JSON + if (isRed) { + this.x.forceRed(this.curve.red); + this.y.forceRed(this.curve.red); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + this.inf = false; + } +} +inherits(Point, Base.BasePoint); + +ShortCurve.prototype.point = function point(x, y, isRed) { + return new Point(this, x, y, isRed); +}; + +ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { + return Point.fromJSON(this, obj, red); +}; + +Point.prototype._getBeta = function _getBeta() { + if (!this.curve.endo) + return; + + var pre = this.precomputed; + if (pre && pre.beta) + return pre.beta; + + var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (pre) { + var curve = this.curve; + var endoMul = function(p) { + return curve.point(p.x.redMul(curve.endo.beta), p.y); + }; + pre.beta = beta; + beta.precomputed = { + beta: null, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(endoMul) + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(endoMul) + } + }; + } + return beta; +}; + +Point.prototype.toJSON = function toJSON() { + if (!this.precomputed) + return [ this.x, this.y ]; + + return [ this.x, this.y, this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1) + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1) + } + } ]; +}; + +Point.fromJSON = function fromJSON(curve, obj, red) { + if (typeof obj === 'string') + obj = JSON.parse(obj); + var res = curve.point(obj[0], obj[1], red); + if (!obj[2]) + return res; + + function obj2point(obj) { + return curve.point(obj[0], obj[1], red); + } + + var pre = obj[2]; + res.precomputed = { + beta: null, + doubles: pre.doubles && { + step: pre.doubles.step, + points: [ res ].concat(pre.doubles.points.map(obj2point)) + }, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: [ res ].concat(pre.naf.points.map(obj2point)) + } + }; + return res; +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + return this.inf; +}; + +Point.prototype.add = function add(p) { + // O + P = P + if (this.inf) + return p; + + // P + O = P + if (p.inf) + return this; + + // P + P = 2P + if (this.eq(p)) + return this.dbl(); + + // P + (-P) = O + if (this.neg().eq(p)) + return this.curve.point(null, null); + + // P + Q = O + if (this.x.cmp(p.x) === 0) + return this.curve.point(null, null); + + var c = this.y.redSub(p.y); + if (c.cmpn(0) !== 0) + c = c.redMul(this.x.redSub(p.x).redInvm()); + var nx = c.redSqr().redISub(this.x).redISub(p.x); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.dbl = function dbl() { + if (this.inf) + return this; + + // 2P = O + var ys1 = this.y.redAdd(this.y); + if (ys1.cmpn(0) === 0) + return this.curve.point(null, null); + + var a = this.curve.a; + + var x2 = this.x.redSqr(); + var dyinv = ys1.redInvm(); + var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); + + var nx = c.redSqr().redISub(this.x.redAdd(this.x)); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.getX = function getX() { + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + return this.y.fromRed(); +}; + +Point.prototype.mul = function mul(k) { + k = new BN(k, 16); + + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else if (this.curve.endo) + return this.curve._endoWnafMulAdd([ this ], [ k ]); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs, true); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2, true); +}; + +Point.prototype.eq = function eq(p) { + return this === p || + this.inf === p.inf && + (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); +}; + +Point.prototype.neg = function neg(_precompute) { + if (this.inf) + return this; + + var res = this.curve.point(this.x, this.y.redNeg()); + if (_precompute && this.precomputed) { + var pre = this.precomputed; + var negate = function(p) { + return p.neg(); + }; + res.precomputed = { + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(negate) + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(negate) + } + }; + } + return res; +}; + +Point.prototype.toJ = function toJ() { + if (this.inf) + return this.curve.jpoint(null, null, null); + + var res = this.curve.jpoint(this.x, this.y, this.curve.one); + return res; +}; + +function JPoint(curve, x, y, z) { + Base.BasePoint.call(this, curve, 'jacobian'); + if (x === null && y === null && z === null) { + this.x = this.curve.one; + this.y = this.curve.one; + this.z = new BN(0); + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = new BN(z, 16); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + + this.zOne = this.z === this.curve.one; +} +inherits(JPoint, Base.BasePoint); + +ShortCurve.prototype.jpoint = function jpoint(x, y, z) { + return new JPoint(this, x, y, z); +}; + +JPoint.prototype.toP = function toP() { + if (this.isInfinity()) + return this.curve.point(null, null); + + var zinv = this.z.redInvm(); + var zinv2 = zinv.redSqr(); + var ax = this.x.redMul(zinv2); + var ay = this.y.redMul(zinv2).redMul(zinv); + + return this.curve.point(ax, ay); +}; + +JPoint.prototype.neg = function neg() { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z); +}; + +JPoint.prototype.add = function add(p) { + // O + P = P + if (this.isInfinity()) + return p; + + // P + O = P + if (p.isInfinity()) + return this; + + // 12M + 4S + 7A + var pz2 = p.z.redSqr(); + var z2 = this.z.redSqr(); + var u1 = this.x.redMul(pz2); + var u2 = p.x.redMul(z2); + var s1 = this.y.redMul(pz2.redMul(p.z)); + var s2 = p.y.redMul(z2.redMul(this.z)); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(p.z).redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mixedAdd = function mixedAdd(p) { + // O + P = P + if (this.isInfinity()) + return p.toJ(); + + // P + O = P + if (p.isInfinity()) + return this; + + // 8M + 3S + 7A + var z2 = this.z.redSqr(); + var u1 = this.x; + var u2 = p.x.redMul(z2); + var s1 = this.y; + var s2 = p.y.redMul(z2).redMul(this.z); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.dblp = function dblp(pow) { + if (pow === 0) + return this; + if (this.isInfinity()) + return this; + if (!pow) + return this.dbl(); + + if (this.curve.zeroA || this.curve.threeA) { + var r = this; + for (var i = 0; i < pow; i++) + r = r.dbl(); + return r; + } + + // 1M + 2S + 1A + N * (4S + 5M + 8A) + // N = 1 => 6M + 6S + 9A + var a = this.curve.a; + var tinv = this.curve.tinv; + + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + // Reuse results + var jyd = jy.redAdd(jy); + for (var i = 0; i < pow; i++) { + var jx2 = jx.redSqr(); + var jyd2 = jyd.redSqr(); + var jyd4 = jyd2.redSqr(); + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var t1 = jx.redMul(jyd2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + var dny = c.redMul(t2); + dny = dny.redIAdd(dny).redISub(jyd4); + var nz = jyd.redMul(jz); + if (i + 1 < pow) + jz4 = jz4.redMul(jyd4); + + jx = nx; + jz = nz; + jyd = dny; + } + + return this.curve.jpoint(jx, jyd.redMul(tinv), jz); +}; + +JPoint.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + if (this.curve.zeroA) + return this._zeroDbl(); + else if (this.curve.threeA) + return this._threeDbl(); + else + return this._dbl(); +}; + +JPoint.prototype._zeroDbl = function _zeroDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 14A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // T = M ^ 2 - 2*S + var t = m.redSqr().redISub(s).redISub(s); + + // 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2*Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-dbl-2009-l + // 2M + 5S + 13A + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = B^2 + var c = b.redSqr(); + // D = 2 * ((X1 + B)^2 - A - C) + var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); + d = d.redIAdd(d); + // E = 3 * A + var e = a.redAdd(a).redIAdd(a); + // F = E^2 + var f = e.redSqr(); + + // 8 * C + var c8 = c.redIAdd(c); + c8 = c8.redIAdd(c8); + c8 = c8.redIAdd(c8); + + // X3 = F - 2 * D + nx = f.redISub(d).redISub(d); + // Y3 = E * (D - X3) - 8 * C + ny = e.redMul(d.redISub(nx)).redISub(c8); + // Z3 = 2 * Y1 * Z1 + nz = this.y.redMul(this.z); + nz = nz.redIAdd(nz); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._threeDbl = function _threeDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 15A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a + var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); + // T = M^2 - 2 * S + var t = m.redSqr().redISub(s).redISub(s); + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2 * Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b + // 3M + 5S + + // delta = Z1^2 + var delta = this.z.redSqr(); + // gamma = Y1^2 + var gamma = this.y.redSqr(); + // beta = X1 * gamma + var beta = this.x.redMul(gamma); + // alpha = 3 * (X1 - delta) * (X1 + delta) + var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); + alpha = alpha.redAdd(alpha).redIAdd(alpha); + // X3 = alpha^2 - 8 * beta + var beta4 = beta.redIAdd(beta); + beta4 = beta4.redIAdd(beta4); + var beta8 = beta4.redAdd(beta4); + nx = alpha.redSqr().redISub(beta8); + // Z3 = (Y1 + Z1)^2 - gamma - delta + nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); + // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 + var ggamma8 = gamma.redSqr(); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._dbl = function _dbl() { + var a = this.curve.a; + + // 4M + 6S + 10A + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + var jx2 = jx.redSqr(); + var jy2 = jy.redSqr(); + + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var jxd4 = jx.redAdd(jx); + jxd4 = jxd4.redIAdd(jxd4); + var t1 = jxd4.redMul(jy2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + + var jyd8 = jy2.redSqr(); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + var ny = c.redMul(t2).redISub(jyd8); + var nz = jy.redAdd(jy).redMul(jz); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.trpl = function trpl() { + if (!this.curve.zeroA) + return this.dbl().add(this); + + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl + // 5M + 10S + ... + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // ZZ = Z1^2 + var zz = this.z.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // M = 3 * XX + a * ZZ2; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // MM = M^2 + var mm = m.redSqr(); + // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM + var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + e = e.redIAdd(e); + e = e.redAdd(e).redIAdd(e); + e = e.redISub(mm); + // EE = E^2 + var ee = e.redSqr(); + // T = 16*YYYY + var t = yyyy.redIAdd(yyyy); + t = t.redIAdd(t); + t = t.redIAdd(t); + t = t.redIAdd(t); + // U = (M + E)^2 - MM - EE - T + var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); + // X3 = 4 * (X1 * EE - 4 * YY * U) + var yyu4 = yy.redMul(u); + yyu4 = yyu4.redIAdd(yyu4); + yyu4 = yyu4.redIAdd(yyu4); + var nx = this.x.redMul(ee).redISub(yyu4); + nx = nx.redIAdd(nx); + nx = nx.redIAdd(nx); + // Y3 = 8 * Y1 * (U * (T - U) - E * EE) + var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + // Z3 = (Z1 + E)^2 - ZZ - EE + var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mul = function mul(k, kbase) { + k = new BN(k, kbase); + + return this.curve._wnafMul(this, k); +}; + +JPoint.prototype.eq = function eq(p) { + if (p.type === 'affine') + return this.eq(p.toJ()); + + if (this === p) + return true; + + // x1 * z2^2 == x2 * z1^2 + var z2 = this.z.redSqr(); + var pz2 = p.z.redSqr(); + if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) + return false; + + // y1 * z2^3 == y2 * z1^3 + var z3 = z2.redMul(this.z); + var pz3 = pz2.redMul(p.z); + return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; +}; + +JPoint.prototype.eqXToP = function eqXToP(x) { + var zs = this.z.redSqr(); + var rx = x.toRed(this.curve.red).redMul(zs); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(zs); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + return false; +}; + +JPoint.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +JPoint.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +},{"../../elliptic":70,"../curve":73,"bn.js":19,"inherits":97}],76:[function(require,module,exports){ +'use strict'; + +var curves = exports; + +var hash = require('hash.js'); +var elliptic = require('../elliptic'); + +var assert = elliptic.utils.assert; + +function PresetCurve(options) { + if (options.type === 'short') + this.curve = new elliptic.curve.short(options); + else if (options.type === 'edwards') + this.curve = new elliptic.curve.edwards(options); + else + this.curve = new elliptic.curve.mont(options); + this.g = this.curve.g; + this.n = this.curve.n; + this.hash = options.hash; + + assert(this.g.validate(), 'Invalid curve'); + assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); +} +curves.PresetCurve = PresetCurve; + +function defineCurve(name, options) { + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + get: function() { + var curve = new PresetCurve(options); + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + value: curve + }); + return curve; + } + }); +} + +defineCurve('p192', { + type: 'short', + prime: 'p192', + p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', + b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', + n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', + hash: hash.sha256, + gRed: false, + g: [ + '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', + '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811' + ] +}); + +defineCurve('p224', { + type: 'short', + prime: 'p224', + p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', + b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', + n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', + hash: hash.sha256, + gRed: false, + g: [ + 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', + 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34' + ] +}); + +defineCurve('p256', { + type: 'short', + prime: null, + p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', + a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', + b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', + n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', + hash: hash.sha256, + gRed: false, + g: [ + '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5' + ] +}); + +defineCurve('p384', { + type: 'short', + prime: null, + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 ffffffff', + a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'fffffffe ffffffff 00000000 00000000 fffffffc', + b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + + '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', + n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + + 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', + hash: hash.sha384, + gRed: false, + g: [ + 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + + '5502f25d bf55296c 3a545e38 72760ab7', + '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f' + ] +}); + +defineCurve('p521', { + type: 'short', + prime: null, + p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff', + a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff ffffffff ffffffff fffffffc', + b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + + '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + + '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', + n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + + 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + + 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', + hash: hash.sha512, + gRed: false, + g: [ + '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + + '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + + 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', + '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + + '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + + '3fad0761 353c7086 a272c240 88be9476 9fd16650' + ] +}); + +defineCurve('curve25519', { + type: 'mont', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '76d06', + b: '0', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '9' + ] +}); + +defineCurve('ed25519', { + type: 'edwards', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '-1', + c: '1', + // -121665 * (121666^(-1)) (mod P) + d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', + + // 4/5 + '6666666666666666666666666666666666666666666666666666666666666658' + ] +}); + +var pre; +try { + pre = require('./precomputed/secp256k1'); +} catch (e) { + pre = undefined; +} + +defineCurve('secp256k1', { + type: 'short', + prime: 'k256', + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', + a: '0', + b: '7', + n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', + h: '1', + hash: hash.sha256, + + // Precomputed endomorphism + beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', + lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', + basis: [ + { + a: '3086d221a7d46bcde86c90e49284eb15', + b: '-e4437ed6010e88286f547fa90abfe4c3' + }, + { + a: '114ca50f7a8e2f3f657c1108d9d44cfd8', + b: '3086d221a7d46bcde86c90e49284eb15' + } + ], + + gRed: false, + g: [ + '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', + '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', + pre + ] +}); + +},{"../elliptic":70,"./precomputed/secp256k1":84,"hash.js":89}],77:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +var KeyPair = require('./key'); +var Signature = require('./signature'); + +function EC(options) { + if (!(this instanceof EC)) + return new EC(options); + + // Shortcut `elliptic.ec(curve-name)` + if (typeof options === 'string') { + assert(elliptic.curves.hasOwnProperty(options), 'Unknown curve ' + options); + + options = elliptic.curves[options]; + } + + // Shortcut for `elliptic.ec(elliptic.curves.curveName)` + if (options instanceof elliptic.curves.PresetCurve) + options = { curve: options }; + + this.curve = options.curve.curve; + this.n = this.curve.n; + this.nh = this.n.ushrn(1); + this.g = this.curve.g; + + // Point on curve + this.g = options.curve.g; + this.g.precompute(options.curve.n.bitLength() + 1); + + // Hash for function for DRBG + this.hash = options.hash || options.curve.hash; +} +module.exports = EC; + +EC.prototype.keyPair = function keyPair(options) { + return new KeyPair(this, options); +}; + +EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { + return KeyPair.fromPrivate(this, priv, enc); +}; + +EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { + return KeyPair.fromPublic(this, pub, enc); +}; + +EC.prototype.genKeyPair = function genKeyPair(options) { + if (!options) + options = {}; + + // Instantiate Hmac_DRBG + var drbg = new elliptic.hmacDRBG({ + hash: this.hash, + pers: options.pers, + entropy: options.entropy || elliptic.rand(this.hash.hmacStrength), + nonce: this.n.toArray() + }); + + var bytes = this.n.byteLength(); + var ns2 = this.n.sub(new BN(2)); + do { + var priv = new BN(drbg.generate(bytes)); + if (priv.cmp(ns2) > 0) + continue; + + priv.iaddn(1); + return this.keyFromPrivate(priv); + } while (true); +}; + +EC.prototype._truncateToN = function truncateToN(msg, truncOnly) { + var delta = msg.byteLength() * 8 - this.n.bitLength(); + if (delta > 0) + msg = msg.ushrn(delta); + if (!truncOnly && msg.cmp(this.n) >= 0) + return msg.sub(this.n); + else + return msg; +}; + +EC.prototype.sign = function sign(msg, key, enc, options) { + if (typeof enc === 'object') { + options = enc; + enc = null; + } + if (!options) + options = {}; + + key = this.keyFromPrivate(key, enc); + msg = this._truncateToN(new BN(msg, 16)); + + // Zero-extend key to provide enough entropy + var bytes = this.n.byteLength(); + var bkey = key.getPrivate().toArray('be', bytes); + + // Zero-extend nonce to have the same byte size as N + var nonce = msg.toArray('be', bytes); + + // Instantiate Hmac_DRBG + var drbg = new elliptic.hmacDRBG({ + hash: this.hash, + entropy: bkey, + nonce: nonce, + pers: options.pers, + persEnc: options.persEnc + }); + + // Number of bytes to generate + var ns1 = this.n.sub(new BN(1)); + + for (var iter = 0; true; iter++) { + var k = options.k ? + options.k(iter) : + new BN(drbg.generate(this.n.byteLength())); + k = this._truncateToN(k, true); + if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) + continue; + + var kp = this.g.mul(k); + if (kp.isInfinity()) + continue; + + var kpX = kp.getX(); + var r = kpX.umod(this.n); + if (r.cmpn(0) === 0) + continue; + + var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); + s = s.umod(this.n); + if (s.cmpn(0) === 0) + continue; + + var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | + (kpX.cmp(r) !== 0 ? 2 : 0); + + // Use complement of `s`, if it is > `n / 2` + if (options.canonical && s.cmp(this.nh) > 0) { + s = this.n.sub(s); + recoveryParam ^= 1; + } + + return new Signature({ r: r, s: s, recoveryParam: recoveryParam }); + } +}; + +EC.prototype.verify = function verify(msg, signature, key, enc) { + msg = this._truncateToN(new BN(msg, 16)); + key = this.keyFromPublic(key, enc); + signature = new Signature(signature, 'hex'); + + // Perform primitive values validation + var r = signature.r; + var s = signature.s; + if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) + return false; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) + return false; + + // Validate signature + var sinv = s.invm(this.n); + var u1 = sinv.mul(msg).umod(this.n); + var u2 = sinv.mul(r).umod(this.n); + + if (!this.curve._maxwellTrick) { + var p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + return p.getX().umod(this.n).cmp(r) === 0; + } + + // NOTE: Greg Maxwell's trick, inspired by: + // https://git.io/vad3K + + var p = this.g.jmulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + // Compare `p.x` of Jacobian point with `r`, + // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the + // inverse of `p.z^2` + return p.eqXToP(r); +}; + +EC.prototype.recoverPubKey = function(msg, signature, j, enc) { + assert((3 & j) === j, 'The recovery param is more than two bits'); + signature = new Signature(signature, enc); + + var n = this.n; + var e = new BN(msg); + var r = signature.r; + var s = signature.s; + + // A set LSB signifies that the y-coordinate is odd + var isYOdd = j & 1; + var isSecondKey = j >> 1; + if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) + throw new Error('Unable to find sencond key candinate'); + + // 1.1. Let x = r + jn. + if (isSecondKey) + r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); + else + r = this.curve.pointFromX(r, isYOdd); + + var rInv = signature.r.invm(n); + var s1 = n.sub(e).mul(rInv).umod(n); + var s2 = s.mul(rInv).umod(n); + + // 1.6.1 Compute Q = r^-1 (sR - eG) + // Q = r^-1 (sR + -eG) + return this.g.mulAdd(s1, r, s2); +}; + +EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { + signature = new Signature(signature, enc); + if (signature.recoveryParam !== null) + return signature.recoveryParam; + + for (var i = 0; i < 4; i++) { + var Qprime; + try { + Qprime = this.recoverPubKey(e, signature, i); + } catch (e) { + continue; + } + + if (Qprime.eq(Q)) + return i; + } + throw new Error('Unable to find valid recovery factor'); +}; + +},{"../../elliptic":70,"./key":78,"./signature":79,"bn.js":19}],78:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); + +function KeyPair(ec, options) { + this.ec = ec; + this.priv = null; + this.pub = null; + + // KeyPair(ec, { priv: ..., pub: ... }) + if (options.priv) + this._importPrivate(options.priv, options.privEnc); + if (options.pub) + this._importPublic(options.pub, options.pubEnc); +} +module.exports = KeyPair; + +KeyPair.fromPublic = function fromPublic(ec, pub, enc) { + if (pub instanceof KeyPair) + return pub; + + return new KeyPair(ec, { + pub: pub, + pubEnc: enc + }); +}; + +KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { + if (priv instanceof KeyPair) + return priv; + + return new KeyPair(ec, { + priv: priv, + privEnc: enc + }); +}; + +KeyPair.prototype.validate = function validate() { + var pub = this.getPublic(); + + if (pub.isInfinity()) + return { result: false, reason: 'Invalid public key' }; + if (!pub.validate()) + return { result: false, reason: 'Public key is not a point' }; + if (!pub.mul(this.ec.curve.n).isInfinity()) + return { result: false, reason: 'Public key * N != O' }; + + return { result: true, reason: null }; +}; + +KeyPair.prototype.getPublic = function getPublic(compact, enc) { + // compact is optional argument + if (typeof compact === 'string') { + enc = compact; + compact = null; + } + + if (!this.pub) + this.pub = this.ec.g.mul(this.priv); + + if (!enc) + return this.pub; + + return this.pub.encode(enc, compact); +}; + +KeyPair.prototype.getPrivate = function getPrivate(enc) { + if (enc === 'hex') + return this.priv.toString(16, 2); + else + return this.priv; +}; + +KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { + this.priv = new BN(key, enc || 16); + + // Ensure that the priv won't be bigger than n, otherwise we may fail + // in fixed multiplication method + this.priv = this.priv.umod(this.ec.curve.n); +}; + +KeyPair.prototype._importPublic = function _importPublic(key, enc) { + if (key.x || key.y) { + this.pub = this.ec.curve.point(key.x, key.y); + return; + } + this.pub = this.ec.curve.decodePoint(key, enc); +}; + +// ECDH +KeyPair.prototype.derive = function derive(pub) { + return pub.mul(this.priv).getX(); +}; + +// ECDSA +KeyPair.prototype.sign = function sign(msg, enc, options) { + return this.ec.sign(msg, this, enc, options); +}; + +KeyPair.prototype.verify = function verify(msg, signature) { + return this.ec.verify(msg, signature, this); +}; + +KeyPair.prototype.inspect = function inspect() { + return ''; +}; + +},{"bn.js":19}],79:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); + +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +function Signature(options, enc) { + if (options instanceof Signature) + return options; + + if (this._importDER(options, enc)) + return; + + assert(options.r && options.s, 'Signature without r or s'); + this.r = new BN(options.r, 16); + this.s = new BN(options.s, 16); + if (options.recoveryParam === undefined) + this.recoveryParam = null; + else + this.recoveryParam = options.recoveryParam; +} +module.exports = Signature; + +function Position() { + this.place = 0; +} + +function getLength(buf, p) { + var initial = buf[p.place++]; + if (!(initial & 0x80)) { + return initial; + } + var octetLen = initial & 0xf; + var val = 0; + for (var i = 0, off = p.place; i < octetLen; i++, off++) { + val <<= 8; + val |= buf[off]; + } + p.place = off; + return val; +} + +function rmPadding(buf) { + var i = 0; + var len = buf.length - 1; + while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { + i++; + } + if (i === 0) { + return buf; + } + return buf.slice(i); +} + +Signature.prototype._importDER = function _importDER(data, enc) { + data = utils.toArray(data, enc); + var p = new Position(); + if (data[p.place++] !== 0x30) { + return false; + } + var len = getLength(data, p); + if ((len + p.place) !== data.length) { + return false; + } + if (data[p.place++] !== 0x02) { + return false; + } + var rlen = getLength(data, p); + var r = data.slice(p.place, rlen + p.place); + p.place += rlen; + if (data[p.place++] !== 0x02) { + return false; + } + var slen = getLength(data, p); + if (data.length !== slen + p.place) { + return false; + } + var s = data.slice(p.place, slen + p.place); + if (r[0] === 0 && (r[1] & 0x80)) { + r = r.slice(1); + } + if (s[0] === 0 && (s[1] & 0x80)) { + s = s.slice(1); + } + + this.r = new BN(r); + this.s = new BN(s); + this.recoveryParam = null; + + return true; +}; + +function constructLength(arr, len) { + if (len < 0x80) { + arr.push(len); + return; + } + var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); + arr.push(octets | 0x80); + while (--octets) { + arr.push((len >>> (octets << 3)) & 0xff); + } + arr.push(len); +} + +Signature.prototype.toDER = function toDER(enc) { + var r = this.r.toArray(); + var s = this.s.toArray(); + + // Pad values + if (r[0] & 0x80) + r = [ 0 ].concat(r); + // Pad values + if (s[0] & 0x80) + s = [ 0 ].concat(s); + + r = rmPadding(r); + s = rmPadding(s); + + while (!s[0] && !(s[1] & 0x80)) { + s = s.slice(1); + } + var arr = [ 0x02 ]; + constructLength(arr, r.length); + arr = arr.concat(r); + arr.push(0x02); + constructLength(arr, s.length); + var backHalf = arr.concat(s); + var res = [ 0x30 ]; + constructLength(res, backHalf.length); + res = res.concat(backHalf); + return utils.encode(res, enc); +}; + +},{"../../elliptic":70,"bn.js":19}],80:[function(require,module,exports){ +'use strict'; + +var hash = require('hash.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; +var parseBytes = utils.parseBytes; +var KeyPair = require('./key'); +var Signature = require('./signature'); + +function EDDSA(curve) { + assert(curve === 'ed25519', 'only tested with ed25519 so far'); + + if (!(this instanceof EDDSA)) + return new EDDSA(curve); + + var curve = elliptic.curves[curve].curve; + this.curve = curve; + this.g = curve.g; + this.g.precompute(curve.n.bitLength() + 1); + + this.pointClass = curve.point().constructor; + this.encodingLength = Math.ceil(curve.n.bitLength() / 8); + this.hash = hash.sha512; +} + +module.exports = EDDSA; + +/** +* @param {Array|String} message - message bytes +* @param {Array|String|KeyPair} secret - secret bytes or a keypair +* @returns {Signature} - signature +*/ +EDDSA.prototype.sign = function sign(message, secret) { + message = parseBytes(message); + var key = this.keyFromSecret(secret); + var r = this.hashInt(key.messagePrefix(), message); + var R = this.g.mul(r); + var Rencoded = this.encodePoint(R); + var s_ = this.hashInt(Rencoded, key.pubBytes(), message) + .mul(key.priv()); + var S = r.add(s_).umod(this.curve.n); + return this.makeSignature({ R: R, S: S, Rencoded: Rencoded }); +}; + +/** +* @param {Array} message - message bytes +* @param {Array|String|Signature} sig - sig bytes +* @param {Array|String|Point|KeyPair} pub - public key +* @returns {Boolean} - true if public key matches sig of message +*/ +EDDSA.prototype.verify = function verify(message, sig, pub) { + message = parseBytes(message); + sig = this.makeSignature(sig); + var key = this.keyFromPublic(pub); + var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); + var SG = this.g.mul(sig.S()); + var RplusAh = sig.R().add(key.pub().mul(h)); + return RplusAh.eq(SG); +}; + +EDDSA.prototype.hashInt = function hashInt() { + var hash = this.hash(); + for (var i = 0; i < arguments.length; i++) + hash.update(arguments[i]); + return utils.intFromLE(hash.digest()).umod(this.curve.n); +}; + +EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { + return KeyPair.fromPublic(this, pub); +}; + +EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { + return KeyPair.fromSecret(this, secret); +}; + +EDDSA.prototype.makeSignature = function makeSignature(sig) { + if (sig instanceof Signature) + return sig; + return new Signature(this, sig); +}; + +/** +* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2 +* +* EDDSA defines methods for encoding and decoding points and integers. These are +* helper convenience methods, that pass along to utility functions implied +* parameters. +* +*/ +EDDSA.prototype.encodePoint = function encodePoint(point) { + var enc = point.getY().toArray('le', this.encodingLength); + enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0; + return enc; +}; + +EDDSA.prototype.decodePoint = function decodePoint(bytes) { + bytes = utils.parseBytes(bytes); + + var lastIx = bytes.length - 1; + var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80); + var xIsOdd = (bytes[lastIx] & 0x80) !== 0; + + var y = utils.intFromLE(normed); + return this.curve.pointFromY(y, xIsOdd); +}; + +EDDSA.prototype.encodeInt = function encodeInt(num) { + return num.toArray('le', this.encodingLength); +}; + +EDDSA.prototype.decodeInt = function decodeInt(bytes) { + return utils.intFromLE(bytes); +}; + +EDDSA.prototype.isPoint = function isPoint(val) { + return val instanceof this.pointClass; +}; + +},{"../../elliptic":70,"./key":81,"./signature":82,"hash.js":89}],81:[function(require,module,exports){ +'use strict'; + +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; +var parseBytes = utils.parseBytes; +var cachedProperty = utils.cachedProperty; + +/** +* @param {EDDSA} eddsa - instance +* @param {Object} params - public/private key parameters +* +* @param {Array} [params.secret] - secret seed bytes +* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms) +* @param {Array} [params.pub] - public key point encoded as bytes +* +*/ +function KeyPair(eddsa, params) { + this.eddsa = eddsa; + this._secret = parseBytes(params.secret); + if (eddsa.isPoint(params.pub)) + this._pub = params.pub; + else + this._pubBytes = parseBytes(params.pub); +} + +KeyPair.fromPublic = function fromPublic(eddsa, pub) { + if (pub instanceof KeyPair) + return pub; + return new KeyPair(eddsa, { pub: pub }); +}; + +KeyPair.fromSecret = function fromSecret(eddsa, secret) { + if (secret instanceof KeyPair) + return secret; + return new KeyPair(eddsa, { secret: secret }); +}; + +KeyPair.prototype.secret = function secret() { + return this._secret; +}; + +cachedProperty(KeyPair, 'pubBytes', function pubBytes() { + return this.eddsa.encodePoint(this.pub()); +}); + +cachedProperty(KeyPair, 'pub', function pub() { + if (this._pubBytes) + return this.eddsa.decodePoint(this._pubBytes); + return this.eddsa.g.mul(this.priv()); +}); + +cachedProperty(KeyPair, 'privBytes', function privBytes() { + var eddsa = this.eddsa; + var hash = this.hash(); + var lastIx = eddsa.encodingLength - 1; + + var a = hash.slice(0, eddsa.encodingLength); + a[0] &= 248; + a[lastIx] &= 127; + a[lastIx] |= 64; + + return a; +}); + +cachedProperty(KeyPair, 'priv', function priv() { + return this.eddsa.decodeInt(this.privBytes()); +}); + +cachedProperty(KeyPair, 'hash', function hash() { + return this.eddsa.hash().update(this.secret()).digest(); +}); + +cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() { + return this.hash().slice(this.eddsa.encodingLength); +}); + +KeyPair.prototype.sign = function sign(message) { + assert(this._secret, 'KeyPair can only verify'); + return this.eddsa.sign(message, this); +}; + +KeyPair.prototype.verify = function verify(message, sig) { + return this.eddsa.verify(message, sig, this); +}; + +KeyPair.prototype.getSecret = function getSecret(enc) { + assert(this._secret, 'KeyPair is public only'); + return utils.encode(this.secret(), enc); +}; + +KeyPair.prototype.getPublic = function getPublic(enc) { + return utils.encode(this.pubBytes(), enc); +}; + +module.exports = KeyPair; + +},{"../../elliptic":70}],82:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; +var cachedProperty = utils.cachedProperty; +var parseBytes = utils.parseBytes; + +/** +* @param {EDDSA} eddsa - eddsa instance +* @param {Array|Object} sig - +* @param {Array|Point} [sig.R] - R point as Point or bytes +* @param {Array|bn} [sig.S] - S scalar as bn or bytes +* @param {Array} [sig.Rencoded] - R point encoded +* @param {Array} [sig.Sencoded] - S scalar encoded +*/ +function Signature(eddsa, sig) { + this.eddsa = eddsa; + + if (typeof sig !== 'object') + sig = parseBytes(sig); + + if (Array.isArray(sig)) { + sig = { + R: sig.slice(0, eddsa.encodingLength), + S: sig.slice(eddsa.encodingLength) + }; + } + + assert(sig.R && sig.S, 'Signature without R or S'); + + if (eddsa.isPoint(sig.R)) + this._R = sig.R; + if (sig.S instanceof BN) + this._S = sig.S; + + this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; + this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; +} + +cachedProperty(Signature, 'S', function S() { + return this.eddsa.decodeInt(this.Sencoded()); +}); + +cachedProperty(Signature, 'R', function R() { + return this.eddsa.decodePoint(this.Rencoded()); +}); + +cachedProperty(Signature, 'Rencoded', function Rencoded() { + return this.eddsa.encodePoint(this.R()); +}); + +cachedProperty(Signature, 'Sencoded', function Sencoded() { + return this.eddsa.encodeInt(this.S()); +}); + +Signature.prototype.toBytes = function toBytes() { + return this.Rencoded().concat(this.Sencoded()); +}; + +Signature.prototype.toHex = function toHex() { + return utils.encode(this.toBytes(), 'hex').toUpperCase(); +}; + +module.exports = Signature; + +},{"../../elliptic":70,"bn.js":19}],83:[function(require,module,exports){ +'use strict'; + +var hash = require('hash.js'); +var elliptic = require('../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +function HmacDRBG(options) { + if (!(this instanceof HmacDRBG)) + return new HmacDRBG(options); + this.hash = options.hash; + this.predResist = !!options.predResist; + + this.outLen = this.hash.outSize; + this.minEntropy = options.minEntropy || this.hash.hmacStrength; + + this.reseed = null; + this.reseedInterval = null; + this.K = null; + this.V = null; + + var entropy = utils.toArray(options.entropy, options.entropyEnc); + var nonce = utils.toArray(options.nonce, options.nonceEnc); + var pers = utils.toArray(options.pers, options.persEnc); + assert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + this._init(entropy, nonce, pers); +} +module.exports = HmacDRBG; + +HmacDRBG.prototype._init = function init(entropy, nonce, pers) { + var seed = entropy.concat(nonce).concat(pers); + + this.K = new Array(this.outLen / 8); + this.V = new Array(this.outLen / 8); + for (var i = 0; i < this.V.length; i++) { + this.K[i] = 0x00; + this.V[i] = 0x01; + } + + this._update(seed); + this.reseed = 1; + this.reseedInterval = 0x1000000000000; // 2^48 +}; + +HmacDRBG.prototype._hmac = function hmac() { + return new hash.hmac(this.hash, this.K); +}; + +HmacDRBG.prototype._update = function update(seed) { + var kmac = this._hmac() + .update(this.V) + .update([ 0x00 ]); + if (seed) + kmac = kmac.update(seed); + this.K = kmac.digest(); + this.V = this._hmac().update(this.V).digest(); + if (!seed) + return; + + this.K = this._hmac() + .update(this.V) + .update([ 0x01 ]) + .update(seed) + .digest(); + this.V = this._hmac().update(this.V).digest(); +}; + +HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { + // Optional entropy enc + if (typeof entropyEnc !== 'string') { + addEnc = add; + add = entropyEnc; + entropyEnc = null; + } + + entropy = utils.toBuffer(entropy, entropyEnc); + add = utils.toBuffer(add, addEnc); + + assert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + + this._update(entropy.concat(add || [])); + this.reseed = 1; +}; + +HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { + if (this.reseed > this.reseedInterval) + throw new Error('Reseed is required'); + + // Optional encoding + if (typeof enc !== 'string') { + addEnc = add; + add = enc; + enc = null; + } + + // Optional additional data + if (add) { + add = utils.toArray(add, addEnc); + this._update(add); + } + + var temp = []; + while (temp.length < len) { + this.V = this._hmac().update(this.V).digest(); + temp = temp.concat(this.V); + } + + var res = temp.slice(0, len); + this._update(add); + this.reseed++; + return utils.encode(res, enc); +}; + +},{"../elliptic":70,"hash.js":89}],84:[function(require,module,exports){ +module.exports = { + doubles: { + step: 4, + points: [ + [ + 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', + 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821' + ], + [ + '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', + '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf' + ], + [ + '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', + 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695' + ], + [ + '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', + '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9' + ], + [ + '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', + '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36' + ], + [ + '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', + '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f' + ], + [ + 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', + '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999' + ], + [ + '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', + 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09' + ], + [ + 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', + '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d' + ], + [ + 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', + 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088' + ], + [ + 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', + '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d' + ], + [ + '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', + '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8' + ], + [ + '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', + '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a' + ], + [ + '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', + '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453' + ], + [ + '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', + '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160' + ], + [ + '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', + '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0' + ], + [ + '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', + '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6' + ], + [ + '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', + '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589' + ], + [ + '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', + 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17' + ], + [ + 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', + '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda' + ], + [ + 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', + '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd' + ], + [ + '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', + '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2' + ], + [ + '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', + '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6' + ], + [ + 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', + '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f' + ], + [ + '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', + 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01' + ], + [ + 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', + '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3' + ], + [ + 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', + 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f' + ], + [ + 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', + '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7' + ], + [ + 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', + 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78' + ], + [ + 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', + '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1' + ], + [ + '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', + 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150' + ], + [ + '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', + '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82' + ], + [ + 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', + '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc' + ], + [ + '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', + 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b' + ], + [ + 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', + '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51' + ], + [ + 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', + '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45' + ], + [ + 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', + 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120' + ], + [ + '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', + '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84' + ], + [ + '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', + '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d' + ], + [ + '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', + 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d' + ], + [ + '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', + '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8' + ], + [ + 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', + '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8' + ], + [ + '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', + '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac' + ], + [ + '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', + 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f' + ], + [ + '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', + '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962' + ], + [ + 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', + '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907' + ], + [ + '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', + 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec' + ], + [ + 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', + 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d' + ], + [ + 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', + '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414' + ], + [ + '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', + 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd' + ], + [ + '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', + 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0' + ], + [ + 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', + '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811' + ], + [ + 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', + '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1' + ], + [ + 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', + '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c' + ], + [ + '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', + 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73' + ], + [ + '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', + '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd' + ], + [ + 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', + 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405' + ], + [ + '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', + 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589' + ], + [ + '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', + '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e' + ], + [ + '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', + '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27' + ], + [ + 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', + 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1' + ], + [ + '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', + '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482' + ], + [ + '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', + '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945' + ], + [ + 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', + '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573' + ], + [ + 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', + 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82' + ] + ] + }, + naf: { + wnd: 7, + points: [ + [ + 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', + '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672' + ], + [ + '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', + 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6' + ], + [ + '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', + '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da' + ], + [ + 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', + 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37' + ], + [ + '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', + 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b' + ], + [ + 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', + 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81' + ], + [ + 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', + '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58' + ], + [ + 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', + '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77' + ], + [ + '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', + '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a' + ], + [ + '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', + '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c' + ], + [ + '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', + '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67' + ], + [ + '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', + '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402' + ], + [ + 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', + 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55' + ], + [ + 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', + '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482' + ], + [ + '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', + 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82' + ], + [ + '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', + 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396' + ], + [ + '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', + '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49' + ], + [ + '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', + '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf' + ], + [ + '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', + '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a' + ], + [ + '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', + 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7' + ], + [ + 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', + 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933' + ], + [ + '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', + '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a' + ], + [ + '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', + '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6' + ], + [ + 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', + 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37' + ], + [ + '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', + '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e' + ], + [ + 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', + 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6' + ], + [ + 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', + 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476' + ], + [ + '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', + '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40' + ], + [ + '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', + '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61' + ], + [ + '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', + '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683' + ], + [ + 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', + '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5' + ], + [ + '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', + '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b' + ], + [ + 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', + '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417' + ], + [ + '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', + 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868' + ], + [ + '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', + 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a' + ], + [ + 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', + 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6' + ], + [ + '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', + '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996' + ], + [ + '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', + 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e' + ], + [ + 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', + 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d' + ], + [ + '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', + '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2' + ], + [ + '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', + 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e' + ], + [ + '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', + '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437' + ], + [ + '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', + 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311' + ], + [ + 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', + '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4' + ], + [ + '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', + '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575' + ], + [ + '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', + 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d' + ], + [ + '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', + 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d' + ], + [ + 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', + 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629' + ], + [ + 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', + 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06' + ], + [ + '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', + '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374' + ], + [ + '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', + '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee' + ], + [ + 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', + '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1' + ], + [ + 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', + 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b' + ], + [ + '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', + '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661' + ], + [ + '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', + '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6' + ], + [ + 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', + '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e' + ], + [ + '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', + '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d' + ], + [ + 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', + 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc' + ], + [ + '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', + 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4' + ], + [ + '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', + '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c' + ], + [ + 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', + '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b' + ], + [ + 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', + '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913' + ], + [ + '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', + '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154' + ], + [ + '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', + '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865' + ], + [ + '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', + 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc' + ], + [ + '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', + 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224' + ], + [ + '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', + '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e' + ], + [ + '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', + '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6' + ], + [ + '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', + '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511' + ], + [ + '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', + 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b' + ], + [ + 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', + 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2' + ], + [ + '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', + 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c' + ], + [ + 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', + '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3' + ], + [ + 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', + '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d' + ], + [ + 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', + '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700' + ], + [ + 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', + '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4' + ], + [ + '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', + 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196' + ], + [ + '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', + '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4' + ], + [ + '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', + 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257' + ], + [ + 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', + 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13' + ], + [ + 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', + '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096' + ], + [ + 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', + 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38' + ], + [ + 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', + '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f' + ], + [ + '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', + '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448' + ], + [ + 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', + '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a' + ], + [ + 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', + '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4' + ], + [ + '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', + '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437' + ], + [ + '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', + 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7' + ], + [ + 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', + '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d' + ], + [ + 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', + '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a' + ], + [ + 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', + '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54' + ], + [ + '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', + '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77' + ], + [ + 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', + 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517' + ], + [ + '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', + 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10' + ], + [ + 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', + 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125' + ], + [ + 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', + '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e' + ], + [ + '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', + 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1' + ], + [ + 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', + '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2' + ], + [ + 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', + '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423' + ], + [ + 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', + '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8' + ], + [ + '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', + 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758' + ], + [ + '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', + 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375' + ], + [ + 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', + '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d' + ], + [ + '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', + 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec' + ], + [ + '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', + '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0' + ], + [ + '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', + 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c' + ], + [ + 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', + 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4' + ], + [ + '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', + 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f' + ], + [ + '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', + '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649' + ], + [ + '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', + 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826' + ], + [ + '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', + '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5' + ], + [ + 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', + 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87' + ], + [ + '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', + '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b' + ], + [ + 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', + '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc' + ], + [ + '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', + '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c' + ], + [ + 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', + 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f' + ], + [ + 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', + '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a' + ], + [ + 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', + 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46' + ], + [ + '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', + 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f' + ], + [ + '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', + '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03' + ], + [ + '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', + 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08' + ], + [ + '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', + '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8' + ], + [ + '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', + '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373' + ], + [ + '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', + 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3' + ], + [ + '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', + '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8' + ], + [ + '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', + '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1' + ], + [ + '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', + '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9' + ] + ] + } +}; + +},{}],85:[function(require,module,exports){ +'use strict'; + +var utils = exports; +var BN = require('bn.js'); + +utils.assert = function assert(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); +}; + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg !== 'string') { + for (var i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + return res; + } + if (!enc) { + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + var hi = c >> 8; + var lo = c & 0xff; + if (hi) + res.push(hi, lo); + else + res.push(lo); + } + } else if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (var i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + return res; +} +utils.toArray = toArray; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +utils.zero2 = zero2; + +function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +utils.toHex = toHex; + +utils.encode = function encode(arr, enc) { + if (enc === 'hex') + return toHex(arr); + else + return arr; +}; + +// Represent num in a w-NAF form +function getNAF(num, w) { + var naf = []; + var ws = 1 << (w + 1); + var k = num.clone(); + while (k.cmpn(1) >= 0) { + var z; + if (k.isOdd()) { + var mod = k.andln(ws - 1); + if (mod > (ws >> 1) - 1) + z = (ws >> 1) - mod; + else + z = mod; + k.isubn(z); + } else { + z = 0; + } + naf.push(z); + + // Optimization, shift by word if possible + var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1; + for (var i = 1; i < shift; i++) + naf.push(0); + k.iushrn(shift); + } + + return naf; +} +utils.getNAF = getNAF; + +// Represent k1, k2 in a Joint Sparse Form +function getJSF(k1, k2) { + var jsf = [ + [], + [] + ]; + + k1 = k1.clone(); + k2 = k2.clone(); + var d1 = 0; + var d2 = 0; + while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { + + // First phase + var m14 = (k1.andln(3) + d1) & 3; + var m24 = (k2.andln(3) + d2) & 3; + if (m14 === 3) + m14 = -1; + if (m24 === 3) + m24 = -1; + var u1; + if ((m14 & 1) === 0) { + u1 = 0; + } else { + var m8 = (k1.andln(7) + d1) & 7; + if ((m8 === 3 || m8 === 5) && m24 === 2) + u1 = -m14; + else + u1 = m14; + } + jsf[0].push(u1); + + var u2; + if ((m24 & 1) === 0) { + u2 = 0; + } else { + var m8 = (k2.andln(7) + d2) & 7; + if ((m8 === 3 || m8 === 5) && m14 === 2) + u2 = -m24; + else + u2 = m24; + } + jsf[1].push(u2); + + // Second phase + if (2 * d1 === u1 + 1) + d1 = 1 - d1; + if (2 * d2 === u2 + 1) + d2 = 1 - d2; + k1.iushrn(1); + k2.iushrn(1); + } + + return jsf; +} +utils.getJSF = getJSF; + +function cachedProperty(obj, name, computer) { + var key = '_' + name; + obj.prototype[name] = function cachedProperty() { + return this[key] !== undefined ? this[key] : + this[key] = computer.call(this); + }; +} +utils.cachedProperty = cachedProperty; + +function parseBytes(bytes) { + return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : + bytes; +} +utils.parseBytes = parseBytes; + +function intFromLE(bytes) { + return new BN(bytes, 'hex', 'le'); +} +utils.intFromLE = intFromLE; + + +},{"bn.js":19}],86:[function(require,module,exports){ +module.exports={ + "_args": [ + [ + { + "raw": "elliptic@^6.0.0", + "scope": null, + "escapedName": "elliptic", + "name": "elliptic", + "rawSpec": "^6.0.0", + "spec": ">=6.0.0 <7.0.0", + "type": "range" + }, + "/Users/ffff/Projects/libsignal-protocol-javascript/node_modules/browserify-sign" + ] + ], + "_from": "elliptic@>=6.0.0 <7.0.0", + "_id": "elliptic@6.3.2", + "_inCache": true, + "_location": "/elliptic", + "_nodeVersion": "6.3.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/elliptic-6.3.2.tgz_1473938837205_0.3108903462998569" + }, + "_npmUser": { + "name": "indutny", + "email": "fedor@indutny.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "elliptic@^6.0.0", + "scope": null, + "escapedName": "elliptic", + "name": "elliptic", + "rawSpec": "^6.0.0", + "spec": ">=6.0.0 <7.0.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify-sign", + "/create-ecdh" + ], + "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz", + "_shasum": "e4c81e0829cf0a65ab70e998b8232723b5c1bc48", + "_shrinkwrap": null, + "_spec": "elliptic@^6.0.0", + "_where": "/Users/ffff/Projects/libsignal-protocol-javascript/node_modules/browserify-sign", + "author": { + "name": "Fedor Indutny", + "email": "fedor@indutny.com" + }, + "bugs": { + "url": "https://github.com/indutny/elliptic/issues" + }, + "dependencies": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + }, + "description": "EC cryptography", + "devDependencies": { + "brfs": "^1.4.3", + "coveralls": "^2.11.3", + "grunt": "^0.4.5", + "grunt-browserify": "^5.0.0", + "grunt-contrib-connect": "^1.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "^1.0.1", + "grunt-mocha-istanbul": "^3.0.1", + "grunt-saucelabs": "^8.6.2", + "istanbul": "^0.4.2", + "jscs": "^2.9.0", + "jshint": "^2.6.0", + "mocha": "^2.1.0" + }, + "directories": {}, + "dist": { + "shasum": "e4c81e0829cf0a65ab70e998b8232723b5c1bc48", + "tarball": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz" + }, + "files": [ + "lib" + ], + "gitHead": "cbace4683a4a548dc0306ef36756151a20299cd5", + "homepage": "https://github.com/indutny/elliptic", + "keywords": [ + "EC", + "Elliptic", + "curve", + "Cryptography" + ], + "license": "MIT", + "main": "lib/elliptic.js", + "maintainers": [ + { + "name": "indutny", + "email": "fedor@indutny.com" + } + ], + "name": "elliptic", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/indutny/elliptic.git" + }, + "scripts": { + "jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + "jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + "lint": "npm run jscs && npm run jshint", + "test": "npm run lint && npm run unit", + "unit": "istanbul test _mocha --reporter=spec test/index.js", + "version": "grunt dist && git add dist/" + }, + "version": "6.3.2" +} + +},{}],87:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; +} +module.exports = EventEmitter; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +EventEmitter.defaultMaxListeners = 10; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError('n must be a positive number'); + this._maxListeners = n; + return this; +}; + +EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + + if (!this._events) + this._events = {}; + + // If there is no 'error' event listener then throw. + if (type === 'error') { + if (!this._events.error || + (isObject(this._events.error) && !this._events.error.length)) { + er = arguments[1]; + if (er instanceof Error) { + throw er; // Unhandled 'error' event + } else { + // At least give some kind of context to the user + var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); + err.context = er; + throw err; + } + } + } + + handler = this._events[type]; + + if (isUndefined(handler)) + return false; + + if (isFunction(handler)) { + switch (arguments.length) { + // fast cases + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower + default: + args = Array.prototype.slice.call(arguments, 1); + handler.apply(this, args); + } + } else if (isObject(handler)) { + args = Array.prototype.slice.call(arguments, 1); + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } + + return true; +}; + +EventEmitter.prototype.addListener = function(type, listener) { + var m; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events) + this._events = {}; + + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (this._events.newListener) + this.emit('newListener', type, + isFunction(listener.listener) ? + listener.listener : listener); + + if (!this._events[type]) + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + else if (isObject(this._events[type])) + // If we've already got an array, just append. + this._events[type].push(listener); + else + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } + + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + if (typeof console.trace === 'function') { + // not supported in IE 10 + console.trace(); + } + } + } + + return this; +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + var fired = false; + + function g() { + this.removeListener(type, g); + + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } + + g.listener = listener; + this.on(type, g); + + return this; +}; + +// emits a 'removeListener' event iff the listener was removed +EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events || !this._events[type]) + return this; + + list = this._events[type]; + length = list.length; + position = -1; + + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } + + if (position < 0) + return this; + + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } + + return this; +}; + +EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + + if (!this._events) + return this; + + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = {}; + return this; + } + + listeners = this._events[type]; + + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else if (listeners) { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + + return this; +}; + +EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; +}; + +EventEmitter.prototype.listenerCount = function(type) { + if (this._events) { + var evlistener = this._events[type]; + + if (isFunction(evlistener)) + return 1; + else if (evlistener) + return evlistener.length; + } + return 0; +}; + +EventEmitter.listenerCount = function(emitter, type) { + return emitter.listenerCount(type); +}; + +function isFunction(arg) { + return typeof arg === 'function'; +} + +function isNumber(arg) { + return typeof arg === 'number'; +} + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isUndefined(arg) { + return arg === void 0; +} + +},{}],88:[function(require,module,exports){ +(function (Buffer){ +var md5 = require('create-hash/md5') +module.exports = EVP_BytesToKey +function EVP_BytesToKey (password, salt, keyLen, ivLen) { + if (!Buffer.isBuffer(password)) { + password = new Buffer(password, 'binary') + } + if (salt && !Buffer.isBuffer(salt)) { + salt = new Buffer(salt, 'binary') + } + keyLen = keyLen / 8 + ivLen = ivLen || 0 + var ki = 0 + var ii = 0 + var key = new Buffer(keyLen) + var iv = new Buffer(ivLen) + var addmd = 0 + var md_buf + var i + var bufs = [] + while (true) { + if (addmd++ > 0) { + bufs.push(md_buf) + } + bufs.push(password) + if (salt) { + bufs.push(salt) + } + md_buf = md5(Buffer.concat(bufs)) + bufs = [] + i = 0 + if (keyLen > 0) { + while (true) { + if (keyLen === 0) { + break + } + if (i === md_buf.length) { + break + } + key[ki++] = md_buf[i] + keyLen-- + i++ + } + } + if (ivLen > 0 && i !== md_buf.length) { + while (true) { + if (ivLen === 0) { + break + } + if (i === md_buf.length) { + break + } + iv[ii++] = md_buf[i] + ivLen-- + i++ + } + } + if (keyLen === 0 && ivLen === 0) { + break + } + } + for (i = 0; i < md_buf.length; i++) { + md_buf[i] = 0 + } + return { + key: key, + iv: iv + } +} + +}).call(this,require("buffer").Buffer) +},{"buffer":49,"create-hash/md5":57}],89:[function(require,module,exports){ +var hash = exports; + +hash.utils = require('./hash/utils'); +hash.common = require('./hash/common'); +hash.sha = require('./hash/sha'); +hash.ripemd = require('./hash/ripemd'); +hash.hmac = require('./hash/hmac'); + +// Proxy hash functions to the main object +hash.sha1 = hash.sha.sha1; +hash.sha256 = hash.sha.sha256; +hash.sha224 = hash.sha.sha224; +hash.sha384 = hash.sha.sha384; +hash.sha512 = hash.sha.sha512; +hash.ripemd160 = hash.ripemd.ripemd160; + +},{"./hash/common":90,"./hash/hmac":91,"./hash/ripemd":92,"./hash/sha":93,"./hash/utils":94}],90:[function(require,module,exports){ +var hash = require('../hash'); +var utils = hash.utils; +var assert = utils.assert; + +function BlockHash() { + this.pending = null; + this.pendingTotal = 0; + this.blockSize = this.constructor.blockSize; + this.outSize = this.constructor.outSize; + this.hmacStrength = this.constructor.hmacStrength; + this.padLength = this.constructor.padLength / 8; + this.endian = 'big'; + + this._delta8 = this.blockSize / 8; + this._delta32 = this.blockSize / 32; +} +exports.BlockHash = BlockHash; + +BlockHash.prototype.update = function update(msg, enc) { + // Convert message to array, pad it, and join into 32bit blocks + msg = utils.toArray(msg, enc); + if (!this.pending) + this.pending = msg; + else + this.pending = this.pending.concat(msg); + this.pendingTotal += msg.length; + + // Enough data, try updating + if (this.pending.length >= this._delta8) { + msg = this.pending; + + // Process pending data in blocks + var r = msg.length % this._delta8; + this.pending = msg.slice(msg.length - r, msg.length); + if (this.pending.length === 0) + this.pending = null; + + msg = utils.join32(msg, 0, msg.length - r, this.endian); + for (var i = 0; i < msg.length; i += this._delta32) + this._update(msg, i, i + this._delta32); + } + + return this; +}; + +BlockHash.prototype.digest = function digest(enc) { + this.update(this._pad()); + assert(this.pending === null); + + return this._digest(enc); +}; + +BlockHash.prototype._pad = function pad() { + var len = this.pendingTotal; + var bytes = this._delta8; + var k = bytes - ((len + this.padLength) % bytes); + var res = new Array(k + this.padLength); + res[0] = 0x80; + for (var i = 1; i < k; i++) + res[i] = 0; + + // Append length + len <<= 3; + if (this.endian === 'big') { + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = (len >>> 24) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = len & 0xff; + } else { + res[i++] = len & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 24) & 0xff; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + } + + return res; +}; + +},{"../hash":89}],91:[function(require,module,exports){ +var hmac = exports; + +var hash = require('../hash'); +var utils = hash.utils; +var assert = utils.assert; + +function Hmac(hash, key, enc) { + if (!(this instanceof Hmac)) + return new Hmac(hash, key, enc); + this.Hash = hash; + this.blockSize = hash.blockSize / 8; + this.outSize = hash.outSize / 8; + this.inner = null; + this.outer = null; + + this._init(utils.toArray(key, enc)); +} +module.exports = Hmac; + +Hmac.prototype._init = function init(key) { + // Shorten key, if needed + if (key.length > this.blockSize) + key = new this.Hash().update(key).digest(); + assert(key.length <= this.blockSize); + + // Add padding to key + for (var i = key.length; i < this.blockSize; i++) + key.push(0); + + for (var i = 0; i < key.length; i++) + key[i] ^= 0x36; + this.inner = new this.Hash().update(key); + + // 0x36 ^ 0x5c = 0x6a + for (var i = 0; i < key.length; i++) + key[i] ^= 0x6a; + this.outer = new this.Hash().update(key); +}; + +Hmac.prototype.update = function update(msg, enc) { + this.inner.update(msg, enc); + return this; +}; + +Hmac.prototype.digest = function digest(enc) { + this.outer.update(this.inner.digest()); + return this.outer.digest(enc); +}; + +},{"../hash":89}],92:[function(require,module,exports){ +var hash = require('../hash'); +var utils = hash.utils; + +var rotl32 = utils.rotl32; +var sum32 = utils.sum32; +var sum32_3 = utils.sum32_3; +var sum32_4 = utils.sum32_4; +var BlockHash = hash.common.BlockHash; + +function RIPEMD160() { + if (!(this instanceof RIPEMD160)) + return new RIPEMD160(); + + BlockHash.call(this); + + this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; + this.endian = 'little'; +} +utils.inherits(RIPEMD160, BlockHash); +exports.ripemd160 = RIPEMD160; + +RIPEMD160.blockSize = 512; +RIPEMD160.outSize = 160; +RIPEMD160.hmacStrength = 192; +RIPEMD160.padLength = 64; + +RIPEMD160.prototype._update = function update(msg, start) { + var A = this.h[0]; + var B = this.h[1]; + var C = this.h[2]; + var D = this.h[3]; + var E = this.h[4]; + var Ah = A; + var Bh = B; + var Ch = C; + var Dh = D; + var Eh = E; + for (var j = 0; j < 80; j++) { + var T = sum32( + rotl32( + sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), + s[j]), + E); + A = E; + E = D; + D = rotl32(C, 10); + C = B; + B = T; + T = sum32( + rotl32( + sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), + sh[j]), + Eh); + Ah = Eh; + Eh = Dh; + Dh = rotl32(Ch, 10); + Ch = Bh; + Bh = T; + } + T = sum32_3(this.h[1], C, Dh); + this.h[1] = sum32_3(this.h[2], D, Eh); + this.h[2] = sum32_3(this.h[3], E, Ah); + this.h[3] = sum32_3(this.h[4], A, Bh); + this.h[4] = sum32_3(this.h[0], B, Ch); + this.h[0] = T; +}; + +RIPEMD160.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'little'); + else + return utils.split32(this.h, 'little'); +}; + +function f(j, x, y, z) { + if (j <= 15) + return x ^ y ^ z; + else if (j <= 31) + return (x & y) | ((~x) & z); + else if (j <= 47) + return (x | (~y)) ^ z; + else if (j <= 63) + return (x & z) | (y & (~z)); + else + return x ^ (y | (~z)); +} + +function K(j) { + if (j <= 15) + return 0x00000000; + else if (j <= 31) + return 0x5a827999; + else if (j <= 47) + return 0x6ed9eba1; + else if (j <= 63) + return 0x8f1bbcdc; + else + return 0xa953fd4e; +} + +function Kh(j) { + if (j <= 15) + return 0x50a28be6; + else if (j <= 31) + return 0x5c4dd124; + else if (j <= 47) + return 0x6d703ef3; + else if (j <= 63) + return 0x7a6d76e9; + else + return 0x00000000; +} + +var r = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 +]; + +var rh = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 +]; + +var s = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 +]; + +var sh = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 +]; + +},{"../hash":89}],93:[function(require,module,exports){ +var hash = require('../hash'); +var utils = hash.utils; +var assert = utils.assert; + +var rotr32 = utils.rotr32; +var rotl32 = utils.rotl32; +var sum32 = utils.sum32; +var sum32_4 = utils.sum32_4; +var sum32_5 = utils.sum32_5; +var rotr64_hi = utils.rotr64_hi; +var rotr64_lo = utils.rotr64_lo; +var shr64_hi = utils.shr64_hi; +var shr64_lo = utils.shr64_lo; +var sum64 = utils.sum64; +var sum64_hi = utils.sum64_hi; +var sum64_lo = utils.sum64_lo; +var sum64_4_hi = utils.sum64_4_hi; +var sum64_4_lo = utils.sum64_4_lo; +var sum64_5_hi = utils.sum64_5_hi; +var sum64_5_lo = utils.sum64_5_lo; +var BlockHash = hash.common.BlockHash; + +var sha256_K = [ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +]; + +var sha512_K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +]; + +var sha1_K = [ + 0x5A827999, 0x6ED9EBA1, + 0x8F1BBCDC, 0xCA62C1D6 +]; + +function SHA256() { + if (!(this instanceof SHA256)) + return new SHA256(); + + BlockHash.call(this); + this.h = [ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, + 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 ]; + this.k = sha256_K; + this.W = new Array(64); +} +utils.inherits(SHA256, BlockHash); +exports.sha256 = SHA256; + +SHA256.blockSize = 512; +SHA256.outSize = 256; +SHA256.hmacStrength = 192; +SHA256.padLength = 64; + +SHA256.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + var f = this.h[5]; + var g = this.h[6]; + var h = this.h[7]; + + assert(this.k.length === W.length); + for (var i = 0; i < W.length; i++) { + var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); + var T2 = sum32(s0_256(a), maj32(a, b, c)); + h = g; + g = f; + f = e; + e = sum32(d, T1); + d = c; + c = b; + b = a; + a = sum32(T1, T2); + } + + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); + this.h[5] = sum32(this.h[5], f); + this.h[6] = sum32(this.h[6], g); + this.h[7] = sum32(this.h[7], h); +}; + +SHA256.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +function SHA224() { + if (!(this instanceof SHA224)) + return new SHA224(); + + SHA256.call(this); + this.h = [ 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; +} +utils.inherits(SHA224, SHA256); +exports.sha224 = SHA224; + +SHA224.blockSize = 512; +SHA224.outSize = 224; +SHA224.hmacStrength = 192; +SHA224.padLength = 64; + +SHA224.prototype._digest = function digest(enc) { + // Just truncate output + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 7), 'big'); + else + return utils.split32(this.h.slice(0, 7), 'big'); +}; + +function SHA512() { + if (!(this instanceof SHA512)) + return new SHA512(); + + BlockHash.call(this); + this.h = [ 0x6a09e667, 0xf3bcc908, + 0xbb67ae85, 0x84caa73b, + 0x3c6ef372, 0xfe94f82b, + 0xa54ff53a, 0x5f1d36f1, + 0x510e527f, 0xade682d1, + 0x9b05688c, 0x2b3e6c1f, + 0x1f83d9ab, 0xfb41bd6b, + 0x5be0cd19, 0x137e2179 ]; + this.k = sha512_K; + this.W = new Array(160); +} +utils.inherits(SHA512, BlockHash); +exports.sha512 = SHA512; + +SHA512.blockSize = 1024; +SHA512.outSize = 512; +SHA512.hmacStrength = 192; +SHA512.padLength = 128; + +SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { + var W = this.W; + + // 32 x 32bit words + for (var i = 0; i < 32; i++) + W[i] = msg[start + i]; + for (; i < W.length; i += 2) { + var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2 + var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); + var c1_hi = W[i - 14]; // i - 7 + var c1_lo = W[i - 13]; + var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15 + var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); + var c3_hi = W[i - 32]; // i - 16 + var c3_lo = W[i - 31]; + + W[i] = sum64_4_hi(c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + W[i + 1] = sum64_4_lo(c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo); + } +}; + +SHA512.prototype._update = function _update(msg, start) { + this._prepareBlock(msg, start); + + var W = this.W; + + var ah = this.h[0]; + var al = this.h[1]; + var bh = this.h[2]; + var bl = this.h[3]; + var ch = this.h[4]; + var cl = this.h[5]; + var dh = this.h[6]; + var dl = this.h[7]; + var eh = this.h[8]; + var el = this.h[9]; + var fh = this.h[10]; + var fl = this.h[11]; + var gh = this.h[12]; + var gl = this.h[13]; + var hh = this.h[14]; + var hl = this.h[15]; + + assert(this.k.length === W.length); + for (var i = 0; i < W.length; i += 2) { + var c0_hi = hh; + var c0_lo = hl; + var c1_hi = s1_512_hi(eh, el); + var c1_lo = s1_512_lo(eh, el); + var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); + var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); + var c3_hi = this.k[i]; + var c3_lo = this.k[i + 1]; + var c4_hi = W[i]; + var c4_lo = W[i + 1]; + + var T1_hi = sum64_5_hi(c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + var T1_lo = sum64_5_lo(c0_hi, c0_lo, + c1_hi, c1_lo, + c2_hi, c2_lo, + c3_hi, c3_lo, + c4_hi, c4_lo); + + var c0_hi = s0_512_hi(ah, al); + var c0_lo = s0_512_lo(ah, al); + var c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); + var c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); + + var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); + var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); + + hh = gh; + hl = gl; + + gh = fh; + gl = fl; + + fh = eh; + fl = el; + + eh = sum64_hi(dh, dl, T1_hi, T1_lo); + el = sum64_lo(dl, dl, T1_hi, T1_lo); + + dh = ch; + dl = cl; + + ch = bh; + cl = bl; + + bh = ah; + bl = al; + + ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); + al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); + } + + sum64(this.h, 0, ah, al); + sum64(this.h, 2, bh, bl); + sum64(this.h, 4, ch, cl); + sum64(this.h, 6, dh, dl); + sum64(this.h, 8, eh, el); + sum64(this.h, 10, fh, fl); + sum64(this.h, 12, gh, gl); + sum64(this.h, 14, hh, hl); +}; + +SHA512.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +function SHA384() { + if (!(this instanceof SHA384)) + return new SHA384(); + + SHA512.call(this); + this.h = [ 0xcbbb9d5d, 0xc1059ed8, + 0x629a292a, 0x367cd507, + 0x9159015a, 0x3070dd17, + 0x152fecd8, 0xf70e5939, + 0x67332667, 0xffc00b31, + 0x8eb44a87, 0x68581511, + 0xdb0c2e0d, 0x64f98fa7, + 0x47b5481d, 0xbefa4fa4 ]; +} +utils.inherits(SHA384, SHA512); +exports.sha384 = SHA384; + +SHA384.blockSize = 1024; +SHA384.outSize = 384; +SHA384.hmacStrength = 192; +SHA384.padLength = 128; + +SHA384.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 12), 'big'); + else + return utils.split32(this.h.slice(0, 12), 'big'); +}; + +function SHA1() { + if (!(this instanceof SHA1)) + return new SHA1(); + + BlockHash.call(this); + this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, + 0x10325476, 0xc3d2e1f0 ]; + this.W = new Array(80); +} + +utils.inherits(SHA1, BlockHash); +exports.sha1 = SHA1; + +SHA1.blockSize = 512; +SHA1.outSize = 160; +SHA1.hmacStrength = 80; +SHA1.padLength = 64; + +SHA1.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + + for(; i < W.length; i++) + W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + + for (var i = 0; i < W.length; i++) { + var s = ~~(i / 20); + var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); + e = d; + d = c; + c = rotl32(b, 30); + b = a; + a = t; + } + + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); +}; + +SHA1.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + +function ch32(x, y, z) { + return (x & y) ^ ((~x) & z); +} + +function maj32(x, y, z) { + return (x & y) ^ (x & z) ^ (y & z); +} + +function p32(x, y, z) { + return x ^ y ^ z; +} + +function s0_256(x) { + return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); +} + +function s1_256(x) { + return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); +} + +function g0_256(x) { + return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3); +} + +function g1_256(x) { + return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10); +} + +function ft_1(s, x, y, z) { + if (s === 0) + return ch32(x, y, z); + if (s === 1 || s === 3) + return p32(x, y, z); + if (s === 2) + return maj32(x, y, z); +} + +function ch64_hi(xh, xl, yh, yl, zh, zl) { + var r = (xh & yh) ^ ((~xh) & zh); + if (r < 0) + r += 0x100000000; + return r; +} + +function ch64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ ((~xl) & zl); + if (r < 0) + r += 0x100000000; + return r; +} + +function maj64_hi(xh, xl, yh, yl, zh, zl) { + var r = (xh & yh) ^ (xh & zh) ^ (yh & zh); + if (r < 0) + r += 0x100000000; + return r; +} + +function maj64_lo(xh, xl, yh, yl, zh, zl) { + var r = (xl & yl) ^ (xl & zl) ^ (yl & zl); + if (r < 0) + r += 0x100000000; + return r; +} + +function s0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 28); + var c1_hi = rotr64_hi(xl, xh, 2); // 34 + var c2_hi = rotr64_hi(xl, xh, 7); // 39 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function s0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 28); + var c1_lo = rotr64_lo(xl, xh, 2); // 34 + var c2_lo = rotr64_lo(xl, xh, 7); // 39 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function s1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 14); + var c1_hi = rotr64_hi(xh, xl, 18); + var c2_hi = rotr64_hi(xl, xh, 9); // 41 + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function s1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 14); + var c1_lo = rotr64_lo(xh, xl, 18); + var c2_lo = rotr64_lo(xl, xh, 9); // 41 + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function g0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 1); + var c1_hi = rotr64_hi(xh, xl, 8); + var c2_hi = shr64_hi(xh, xl, 7); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function g0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 1); + var c1_lo = rotr64_lo(xh, xl, 8); + var c2_lo = shr64_lo(xh, xl, 7); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +function g1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 19); + var c1_hi = rotr64_hi(xl, xh, 29); // 61 + var c2_hi = shr64_hi(xh, xl, 6); + + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 0x100000000; + return r; +} + +function g1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 19); + var c1_lo = rotr64_lo(xl, xh, 29); // 61 + var c2_lo = shr64_lo(xh, xl, 6); + + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 0x100000000; + return r; +} + +},{"../hash":89}],94:[function(require,module,exports){ +var utils = exports; +var inherits = require('inherits'); + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg === 'string') { + if (!enc) { + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + var hi = c >> 8; + var lo = c & 0xff; + if (hi) + res.push(hi, lo); + else + res.push(lo); + } + } else if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (var i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + } else { + for (var i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + } + return res; +} +utils.toArray = toArray; + +function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +utils.toHex = toHex; + +function htonl(w) { + var res = (w >>> 24) | + ((w >>> 8) & 0xff00) | + ((w << 8) & 0xff0000) | + ((w & 0xff) << 24); + return res >>> 0; +} +utils.htonl = htonl; + +function toHex32(msg, endian) { + var res = ''; + for (var i = 0; i < msg.length; i++) { + var w = msg[i]; + if (endian === 'little') + w = htonl(w); + res += zero8(w.toString(16)); + } + return res; +} +utils.toHex32 = toHex32; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +utils.zero2 = zero2; + +function zero8(word) { + if (word.length === 7) + return '0' + word; + else if (word.length === 6) + return '00' + word; + else if (word.length === 5) + return '000' + word; + else if (word.length === 4) + return '0000' + word; + else if (word.length === 3) + return '00000' + word; + else if (word.length === 2) + return '000000' + word; + else if (word.length === 1) + return '0000000' + word; + else + return word; +} +utils.zero8 = zero8; + +function join32(msg, start, end, endian) { + var len = end - start; + assert(len % 4 === 0); + var res = new Array(len / 4); + for (var i = 0, k = start; i < res.length; i++, k += 4) { + var w; + if (endian === 'big') + w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; + else + w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; + res[i] = w >>> 0; + } + return res; +} +utils.join32 = join32; + +function split32(msg, endian) { + var res = new Array(msg.length * 4); + for (var i = 0, k = 0; i < msg.length; i++, k += 4) { + var m = msg[i]; + if (endian === 'big') { + res[k] = m >>> 24; + res[k + 1] = (m >>> 16) & 0xff; + res[k + 2] = (m >>> 8) & 0xff; + res[k + 3] = m & 0xff; + } else { + res[k + 3] = m >>> 24; + res[k + 2] = (m >>> 16) & 0xff; + res[k + 1] = (m >>> 8) & 0xff; + res[k] = m & 0xff; + } + } + return res; +} +utils.split32 = split32; + +function rotr32(w, b) { + return (w >>> b) | (w << (32 - b)); +} +utils.rotr32 = rotr32; + +function rotl32(w, b) { + return (w << b) | (w >>> (32 - b)); +} +utils.rotl32 = rotl32; + +function sum32(a, b) { + return (a + b) >>> 0; +} +utils.sum32 = sum32; + +function sum32_3(a, b, c) { + return (a + b + c) >>> 0; +} +utils.sum32_3 = sum32_3; + +function sum32_4(a, b, c, d) { + return (a + b + c + d) >>> 0; +} +utils.sum32_4 = sum32_4; + +function sum32_5(a, b, c, d, e) { + return (a + b + c + d + e) >>> 0; +} +utils.sum32_5 = sum32_5; + +function assert(cond, msg) { + if (!cond) + throw new Error(msg || 'Assertion failed'); +} +utils.assert = assert; + +utils.inherits = inherits; + +function sum64(buf, pos, ah, al) { + var bh = buf[pos]; + var bl = buf[pos + 1]; + + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + buf[pos] = hi >>> 0; + buf[pos + 1] = lo; +} +exports.sum64 = sum64; + +function sum64_hi(ah, al, bh, bl) { + var lo = (al + bl) >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + return hi >>> 0; +}; +exports.sum64_hi = sum64_hi; + +function sum64_lo(ah, al, bh, bl) { + var lo = al + bl; + return lo >>> 0; +}; +exports.sum64_lo = sum64_lo; + +function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + + var hi = ah + bh + ch + dh + carry; + return hi >>> 0; +}; +exports.sum64_4_hi = sum64_4_hi; + +function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { + var lo = al + bl + cl + dl; + return lo >>> 0; +}; +exports.sum64_4_lo = sum64_4_lo; + +function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var carry = 0; + var lo = al; + lo = (lo + bl) >>> 0; + carry += lo < al ? 1 : 0; + lo = (lo + cl) >>> 0; + carry += lo < cl ? 1 : 0; + lo = (lo + dl) >>> 0; + carry += lo < dl ? 1 : 0; + lo = (lo + el) >>> 0; + carry += lo < el ? 1 : 0; + + var hi = ah + bh + ch + dh + eh + carry; + return hi >>> 0; +}; +exports.sum64_5_hi = sum64_5_hi; + +function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var lo = al + bl + cl + dl + el; + + return lo >>> 0; +}; +exports.sum64_5_lo = sum64_5_lo; + +function rotr64_hi(ah, al, num) { + var r = (al << (32 - num)) | (ah >>> num); + return r >>> 0; +}; +exports.rotr64_hi = rotr64_hi; + +function rotr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; +}; +exports.rotr64_lo = rotr64_lo; + +function shr64_hi(ah, al, num) { + return ah >>> num; +}; +exports.shr64_hi = shr64_hi; + +function shr64_lo(ah, al, num) { + var r = (ah << (32 - num)) | (al >>> num); + return r >>> 0; +}; +exports.shr64_lo = shr64_lo; + +},{"inherits":97}],95:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],96:[function(require,module,exports){ + +var indexOf = [].indexOf; + +module.exports = function(arr, obj){ + if (indexOf) return arr.indexOf(obj); + for (var i = 0; i < arr.length; ++i) { + if (arr[i] === obj) return i; + } + return -1; +}; +},{}],97:[function(require,module,exports){ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} + +},{}],98:[function(require,module,exports){ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} + +},{}],99:[function(require,module,exports){ +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + +},{}],100:[function(require,module,exports){ +/* + Copyright 2013 Daniel Wirtz + Copyright 2009 The Closure Library Authors. All Rights Reserved. - return Service; + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - })(ProtoBuf, this); - }; + http://www.apache.org/licenses/LICENSE-2.0 - /** - * @alias ProtoBuf.Reflect.Service - * @expose - */ - Reflect.Service = Service; + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS-IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ - /** - * Abstract service method. - * @exports ProtoBuf.Reflect.Service.Method - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {!ProtoBuf.Reflect.Service} svc Service - * @param {string} name Method name - * @param {Object.=} options Options - * @constructor - * @extends ProtoBuf.Reflect.T - */ - var Method = function(builder, svc, name, options) { - T.call(this, builder, svc, name); +/** + * @license long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/long.js for details + */ +(function(global, factory) { - /** - * @override - */ - this.className = "Service.Method"; + /* AMD */ if (typeof define === 'function' && define["amd"]) + define([], factory); + /* CommonJS */ else if (typeof require === 'function' && typeof module === "object" && module && module["exports"]) + module["exports"] = factory(); + /* Global */ else + (global["dcodeIO"] = global["dcodeIO"] || {})["Long"] = factory(); - /** - * Options. - * @type {Object.} - * @expose - */ - this.options = options || {}; - }; +})(this, function() { + "use strict"; - /** - * @alias ProtoBuf.Reflect.Service.Method.prototype - * @inner - */ - var MethodPrototype = Method.prototype = Object.create(T.prototype); + /** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @constructor + */ + function Long(low, high, unsigned) { /** - * Builds the method's '$options' property. - * @name ProtoBuf.Reflect.Service.Method#buildOpt - * @function - * @return {Object.} + * The low 32 bits as a signed value. + * @type {number} */ - MethodPrototype.buildOpt = NamespacePrototype.buildOpt; + this.low = low | 0; /** - * @alias ProtoBuf.Reflect.Service.Method - * @expose + * The high 32 bits as a signed value. + * @type {number} */ - Reflect.Service.Method = Method; + this.high = high | 0; /** - * RPC service method. - * @exports ProtoBuf.Reflect.Service.RPCMethod - * @param {!ProtoBuf.Builder} builder Builder reference - * @param {!ProtoBuf.Reflect.Service} svc Service - * @param {string} name Method name - * @param {string} request Request message name - * @param {string} response Response message name - * @param {boolean} request_stream Whether requests are streamed - * @param {boolean} response_stream Whether responses are streamed - * @param {Object.=} options Options - * @constructor - * @extends ProtoBuf.Reflect.Service.Method + * Whether unsigned or not. + * @type {boolean} */ - var RPCMethod = function(builder, svc, name, request, response, request_stream, response_stream, options) { - Method.call(this, builder, svc, name, options); - - /** - * @override - */ - this.className = "Service.RPCMethod"; - - /** - * Request message name. - * @type {string} - * @expose - */ - this.requestName = request; - - /** - * Response message name. - * @type {string} - * @expose - */ - this.responseName = response; - - /** - * Whether requests are streamed - * @type {bool} - * @expose - */ - this.requestStream = request_stream; - - /** - * Whether responses are streamed - * @type {bool} - * @expose - */ - this.responseStream = response_stream; - - /** - * Resolved request message type. - * @type {ProtoBuf.Reflect.Message} - * @expose - */ - this.resolvedRequestType = null; - - /** - * Resolved response message type. - * @type {ProtoBuf.Reflect.Message} - * @expose - */ - this.resolvedResponseType = null; - }; - - // Extends Method - RPCMethod.prototype = Object.create(Method.prototype); + this.unsigned = !!unsigned; + } - /** - * @alias ProtoBuf.Reflect.Service.RPCMethod - * @expose - */ - Reflect.Service.RPCMethod = RPCMethod; + // The internal representation of a long is the two given signed, 32-bit values. + // We use 32-bit pieces because these are the size of integers on which + // Javascript performs bit-operations. For operations like addition and + // multiplication, we split each number into 16 bit pieces, which can easily be + // multiplied within Javascript's floating-point representation without overflow + // or change in sign. + // + // In the algorithms below, we frequently reduce the negative case to the + // positive case by negating the input(s) and then post-processing the result. + // Note that we must ALWAYS check specially whether those values are MIN_VALUE + // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as + // a positive number, it overflows back into a negative). Not handling this + // case would often result in infinite recursion. + // + // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* + // methods on which they depend. - return Reflect; + /** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private + */ + Long.prototype.__isLong__; - })(ProtoBuf); + Object.defineProperty(Long.prototype, "__isLong__", { + value: true, + enumerable: false, + configurable: false + }); /** - * @alias ProtoBuf.Builder - * @expose + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner */ - ProtoBuf.Builder = (function(ProtoBuf, Lang, Reflect) { - "use strict"; - - /** - * Constructs a new Builder. - * @exports ProtoBuf.Builder - * @class Provides the functionality to build protocol messages. - * @param {Object.=} options Options - * @constructor - */ - var Builder = function(options) { + function isLong(obj) { + return (obj && obj["__isLong__"]) === true; + } - /** - * Namespace. - * @type {ProtoBuf.Reflect.Namespace} - * @expose - */ - this.ns = new Reflect.Namespace(this, null, ""); // Global namespace + /** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} + */ + Long.isLong = isLong; - /** - * Namespace pointer. - * @type {ProtoBuf.Reflect.T} - * @expose - */ - this.ptr = this.ns; + /** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner + */ + var INT_CACHE = {}; - /** - * Resolved flag. - * @type {boolean} - * @expose - */ - this.resolved = false; + /** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner + */ + var UINT_CACHE = {}; - /** - * The current building result. - * @type {Object.|null} - * @expose - */ - this.result = null; + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromInt(value, unsigned) { + var obj, cachedObj, cache; + if (unsigned) { + value >>>= 0; + if (cache = (0 <= value && value < 256)) { + cachedObj = UINT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true); + if (cache) + UINT_CACHE[value] = obj; + return obj; + } else { + value |= 0; + if (cache = (-128 <= value && value < 128)) { + cachedObj = INT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, value < 0 ? -1 : 0, false); + if (cache) + INT_CACHE[value] = obj; + return obj; + } + } - /** - * Imported files. - * @type {Array.} - * @expose - */ - this.files = {}; + /** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromInt = fromInt; - /** - * Import root override. - * @type {?string} - * @expose - */ - this.importRoot = null; + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromNumber(value, unsigned) { + if (isNaN(value) || !isFinite(value)) + return unsigned ? UZERO : ZERO; + if (unsigned) { + if (value < 0) + return UZERO; + if (value >= TWO_PWR_64_DBL) + return MAX_UNSIGNED_VALUE; + } else { + if (value <= -TWO_PWR_63_DBL) + return MIN_VALUE; + if (value + 1 >= TWO_PWR_63_DBL) + return MAX_VALUE; + } + if (value < 0) + return fromNumber(-value, unsigned).neg(); + return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned); + } - /** - * Options. - * @type {!Object.} - * @expose - */ - this.options = options || {}; - }; + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromNumber = fromNumber; - /** - * @alias ProtoBuf.Builder.prototype - * @inner - */ - var BuilderPrototype = Builder.prototype; + /** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ + function fromBits(lowBits, highBits, unsigned) { + return new Long(lowBits, highBits, unsigned); + } - // ----- Definition tests ----- + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value + */ + Long.fromBits = fromBits; - /** - * Tests if a definition most likely describes a message. - * @param {!Object} def - * @returns {boolean} - * @expose - */ - Builder.isMessage = function(def) { - // Messages require a string name - if (typeof def["name"] !== 'string') - return false; - // Messages do not contain values (enum) or rpc methods (service) - if (typeof def["values"] !== 'undefined' || typeof def["rpc"] !== 'undefined') - return false; - return true; - }; + /** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner + */ + var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) - /** - * Tests if a definition most likely describes a message field. - * @param {!Object} def - * @returns {boolean} - * @expose - */ - Builder.isMessageField = function(def) { - // Message fields require a string rule, name and type and an id - if (typeof def["rule"] !== 'string' || typeof def["name"] !== 'string' || typeof def["type"] !== 'string' || typeof def["id"] === 'undefined') - return false; - return true; - }; + /** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner + */ + function fromString(str, unsigned, radix) { + if (str.length === 0) + throw Error('empty string'); + if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") + return ZERO; + if (typeof unsigned === 'number') { + // For goog.math.long compatibility + radix = unsigned, + unsigned = false; + } else { + unsigned = !! unsigned; + } + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); - /** - * Tests if a definition most likely describes an enum. - * @param {!Object} def - * @returns {boolean} - * @expose - */ - Builder.isEnum = function(def) { - // Enums require a string name - if (typeof def["name"] !== 'string') - return false; - // Enums require at least one value - if (typeof def["values"] === 'undefined' || !Array.isArray(def["values"]) || def["values"].length === 0) - return false; - return true; - }; + var p; + if ((p = str.indexOf('-')) > 0) + throw Error('interior hyphen'); + else if (p === 0) { + return fromString(str.substring(1), unsigned, radix).neg(); + } - /** - * Tests if a definition most likely describes a service. - * @param {!Object} def - * @returns {boolean} - * @expose - */ - Builder.isService = function(def) { - // Services require a string name and an rpc object - if (typeof def["name"] !== 'string' || typeof def["rpc"] !== 'object' || !def["rpc"]) - return false; - return true; - }; + // Do several (8) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 8)); - /** - * Tests if a definition most likely describes an extended message - * @param {!Object} def - * @returns {boolean} - * @expose - */ - Builder.isExtend = function(def) { - // Extends rquire a string ref - if (typeof def["ref"] !== 'string') - return false; - return true; - }; + var result = ZERO; + for (var i = 0; i < str.length; i += 8) { + var size = Math.min(8, str.length - i), + value = parseInt(str.substring(i, i + size), radix); + if (size < 8) { + var power = fromNumber(pow_dbl(radix, size)); + result = result.mul(power).add(fromNumber(value)); + } else { + result = result.mul(radixToPower); + result = result.add(fromNumber(value)); + } + } + result.unsigned = unsigned; + return result; + } - // ----- Building ----- + /** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value + */ + Long.fromString = fromString; - /** - * Resets the pointer to the root namespace. - * @returns {!ProtoBuf.Builder} this - * @expose - */ - BuilderPrototype.reset = function() { - this.ptr = this.ns; - return this; - }; + /** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @returns {!Long} + * @inner + */ + function fromValue(val) { + if (val /* is compatible */ instanceof Long) + return val; + if (typeof val === 'number') + return fromNumber(val); + if (typeof val === 'string') + return fromString(val); + // Throws for non-objects, converts non-instanceof Long: + return fromBits(val.low, val.high, val.unsigned); + } - /** - * Defines a namespace on top of the current pointer position and places the pointer on it. - * @param {string} namespace - * @return {!ProtoBuf.Builder} this - * @expose - */ - BuilderPrototype.define = function(namespace) { - if (typeof namespace !== 'string' || !Lang.TYPEREF.test(namespace)) - throw Error("illegal namespace: "+namespace); - namespace.split(".").forEach(function(part) { - var ns = this.ptr.getChild(part); - if (ns === null) // Keep existing - this.ptr.addChild(ns = new Reflect.Namespace(this, this.ptr, part)); - this.ptr = ns; - }, this); - return this; - }; + /** + * Converts the specified value to a Long. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @returns {!Long} + */ + Long.fromValue = fromValue; - /** - * Creates the specified definitions at the current pointer position. - * @param {!Array.} defs Messages, enums or services to create - * @returns {!ProtoBuf.Builder} this - * @throws {Error} If a message definition is invalid - * @expose - */ - BuilderPrototype.create = function(defs) { - if (!defs) - return this; // Nothing to create - if (!Array.isArray(defs)) - defs = [defs]; - else { - if (defs.length === 0) - return this; - defs = defs.slice(); - } + // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be + // no runtime penalty for these. - // It's quite hard to keep track of scopes and memory here, so let's do this iteratively. - var stack = [defs]; - while (stack.length > 0) { - defs = stack.pop(); + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_16_DBL = 1 << 16; - if (!Array.isArray(defs)) // Stack always contains entire namespaces - throw Error("not a valid namespace: "+JSON.stringify(defs)); + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_24_DBL = 1 << 24; - while (defs.length > 0) { - var def = defs.shift(); // Namespaces always contain an array of messages, enums and services + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; - if (Builder.isMessage(def)) { - var obj = new Reflect.Message(this, this.ptr, def["name"], def["options"], def["isGroup"], def["syntax"]); + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; - // Create OneOfs - var oneofs = {}; - if (def["oneofs"]) - Object.keys(def["oneofs"]).forEach(function(name) { - obj.addChild(oneofs[name] = new Reflect.Message.OneOf(this, obj, name)); - }, this); + /** + * @type {number} + * @const + * @inner + */ + var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; - // Create fields - if (def["fields"]) - def["fields"].forEach(function(fld) { - if (obj.getChild(fld["id"]|0) !== null) - throw Error("duplicate or invalid field id in "+obj.name+": "+fld['id']); - if (fld["options"] && typeof fld["options"] !== 'object') - throw Error("illegal field options in "+obj.name+"#"+fld["name"]); - var oneof = null; - if (typeof fld["oneof"] === 'string' && !(oneof = oneofs[fld["oneof"]])) - throw Error("illegal oneof in "+obj.name+"#"+fld["name"]+": "+fld["oneof"]); - fld = new Reflect.Message.Field(this, obj, fld["rule"], fld["keytype"], fld["type"], fld["name"], fld["id"], fld["options"], oneof, def["syntax"]); - if (oneof) - oneof.fields.push(fld); - obj.addChild(fld); - }, this); + /** + * @type {!Long} + * @const + * @inner + */ + var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); - // Push children to stack - var subObj = []; - if (def["enums"]) - def["enums"].forEach(function(enm) { - subObj.push(enm); - }); - if (def["messages"]) - def["messages"].forEach(function(msg) { - subObj.push(msg); - }); - if (def["services"]) - def["services"].forEach(function(svc) { - subObj.push(svc); - }); + /** + * @type {!Long} + * @inner + */ + var ZERO = fromInt(0); - // Set extension ranges - if (def["extensions"]) { - if (typeof def["extensions"][0] === 'number') // pre 5.0.1 - obj.extensions = [ def["extensions"] ]; - else - obj.extensions = def["extensions"]; - } + /** + * Signed zero. + * @type {!Long} + */ + Long.ZERO = ZERO; - // Create on top of current namespace - this.ptr.addChild(obj); - if (subObj.length > 0) { - stack.push(defs); // Push the current level back - defs = subObj; // Continue processing sub level - subObj = null; - this.ptr = obj; // And move the pointer to this namespace - obj = null; - continue; - } - subObj = null; + /** + * @type {!Long} + * @inner + */ + var UZERO = fromInt(0, true); - } else if (Builder.isEnum(def)) { + /** + * Unsigned zero. + * @type {!Long} + */ + Long.UZERO = UZERO; - obj = new Reflect.Enum(this, this.ptr, def["name"], def["options"], def["syntax"]); - def["values"].forEach(function(val) { - obj.addChild(new Reflect.Enum.Value(this, obj, val["name"], val["id"])); - }, this); - this.ptr.addChild(obj); + /** + * @type {!Long} + * @inner + */ + var ONE = fromInt(1); - } else if (Builder.isService(def)) { + /** + * Signed one. + * @type {!Long} + */ + Long.ONE = ONE; - obj = new Reflect.Service(this, this.ptr, def["name"], def["options"]); - Object.keys(def["rpc"]).forEach(function(name) { - var mtd = def["rpc"][name]; - obj.addChild(new Reflect.Service.RPCMethod(this, obj, name, mtd["request"], mtd["response"], !!mtd["request_stream"], !!mtd["response_stream"], mtd["options"])); - }, this); - this.ptr.addChild(obj); + /** + * @type {!Long} + * @inner + */ + var UONE = fromInt(1, true); - } else if (Builder.isExtend(def)) { + /** + * Unsigned one. + * @type {!Long} + */ + Long.UONE = UONE; - obj = this.ptr.resolve(def["ref"], true); - if (obj) { - def["fields"].forEach(function(fld) { - if (obj.getChild(fld['id']|0) !== null) - throw Error("duplicate extended field id in "+obj.name+": "+fld['id']); - // Check if field id is allowed to be extended - if (obj.extensions) { - var valid = false; - obj.extensions.forEach(function(range) { - if (fld["id"] >= range[0] && fld["id"] <= range[1]) - valid = true; - }); - if (!valid) - throw Error("illegal extended field id in "+obj.name+": "+fld['id']+" (not within valid ranges)"); - } - // Convert extension field names to camel case notation if the override is set - var name = fld["name"]; - if (this.options['convertFieldsToCamelCase']) - name = ProtoBuf.Util.toCamelCase(name); - // see #161: Extensions use their fully qualified name as their runtime key and... - var field = new Reflect.Message.ExtensionField(this, obj, fld["rule"], fld["type"], this.ptr.fqn()+'.'+name, fld["id"], fld["options"]); - // ...are added on top of the current namespace as an extension which is used for - // resolving their type later on (the extension always keeps the original name to - // prevent naming collisions) - var ext = new Reflect.Extension(this, this.ptr, fld["name"], field); - field.extension = ext; - this.ptr.addChild(ext); - obj.addChild(field); - }, this); + /** + * @type {!Long} + * @inner + */ + var NEG_ONE = fromInt(-1); - } else if (!/\.?google\.protobuf\./.test(def["ref"])) // Silently skip internal extensions - throw Error("extended message "+def["ref"]+" is not defined"); + /** + * Signed negative one. + * @type {!Long} + */ + Long.NEG_ONE = NEG_ONE; - } else - throw Error("not a valid definition: "+JSON.stringify(def)); + /** + * @type {!Long} + * @inner + */ + var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false); - def = null; - obj = null; - } - // Break goes here - defs = null; - this.ptr = this.ptr.parent; // Namespace done, continue at parent - } - this.resolved = false; // Require re-resolve - this.result = null; // Require re-build - return this; - }; + /** + * Maximum signed value. + * @type {!Long} + */ + Long.MAX_VALUE = MAX_VALUE; - /** - * Propagates syntax to all children. - * @param {!Object} parent - * @inner - */ - function propagateSyntax(parent) { - if (parent['messages']) { - parent['messages'].forEach(function(child) { - child["syntax"] = parent["syntax"]; - propagateSyntax(child); - }); - } - if (parent['enums']) { - parent['enums'].forEach(function(child) { - child["syntax"] = parent["syntax"]; - }); - } - } + /** + * @type {!Long} + * @inner + */ + var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true); - /** - * Imports another definition into this builder. - * @param {Object.} json Parsed import - * @param {(string|{root: string, file: string})=} filename Imported file name - * @returns {!ProtoBuf.Builder} this - * @throws {Error} If the definition or file cannot be imported - * @expose - */ - BuilderPrototype["import"] = function(json, filename) { - var delim = '/'; + /** + * Maximum unsigned value. + * @type {!Long} + */ + Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; - // Make sure to skip duplicate imports + /** + * @type {!Long} + * @inner + */ + var MIN_VALUE = fromBits(0, 0x80000000|0, false); - if (typeof filename === 'string') { + /** + * Minimum signed value. + * @type {!Long} + */ + Long.MIN_VALUE = MIN_VALUE; - if (ProtoBuf.Util.IS_NODE) - filename = require("path")['resolve'](filename); - if (this.files[filename] === true) - return this.reset(); - this.files[filename] = true; + /** + * @alias Long.prototype + * @inner + */ + var LongPrototype = Long.prototype; - } else if (typeof filename === 'object') { // Object with root, file. + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} + */ + LongPrototype.toInt = function toInt() { + return this.unsigned ? this.low >>> 0 : this.low; + }; - var root = filename.root; - if (ProtoBuf.Util.IS_NODE) - root = require("path")['resolve'](root); - if (root.indexOf("\\") >= 0 || filename.file.indexOf("\\") >= 0) - delim = '\\'; - var fname = root + delim + filename.file; - if (this.files[fname] === true) - return this.reset(); - this.files[fname] = true; + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} + */ + LongPrototype.toNumber = function toNumber() { + if (this.unsigned) + return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0); + return this.high * TWO_PWR_32_DBL + (this.low >>> 0); + }; + + /** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range + */ + LongPrototype.toString = function toString(radix) { + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + if (this.isZero()) + return '0'; + if (this.isNegative()) { // Unsigned Longs are never negative + if (this.eq(MIN_VALUE)) { + // We need to change the Long value before it can be negated, so we remove + // the bottom-most digit in this base and then recurse to do the rest. + var radixLong = fromNumber(radix), + div = this.div(radixLong), + rem1 = div.mul(radixLong).sub(this); + return div.toString(radix) + rem1.toInt().toString(radix); + } else + return '-' + this.neg().toString(radix); + } + + // Do several (6) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), + rem = this; + var result = ''; + while (true) { + var remDiv = rem.div(radixToPower), + intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, + digits = intval.toString(radix); + rem = remDiv; + if (rem.isZero()) + return digits + result; + else { + while (digits.length < 6) + digits = '0' + digits; + result = '' + digits + result; } + } + }; - // Import imports + /** + * Gets the high 32 bits as a signed integer. + * @returns {number} Signed high bits + */ + LongPrototype.getHighBits = function getHighBits() { + return this.high; + }; - if (json['imports'] && json['imports'].length > 0) { - var importRoot, - resetRoot = false; + /** + * Gets the high 32 bits as an unsigned integer. + * @returns {number} Unsigned high bits + */ + LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { + return this.high >>> 0; + }; - if (typeof filename === 'object') { // If an import root is specified, override + /** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits + */ + LongPrototype.getLowBits = function getLowBits() { + return this.low; + }; - this.importRoot = filename["root"]; resetRoot = true; // ... and reset afterwards - importRoot = this.importRoot; - filename = filename["file"]; - if (importRoot.indexOf("\\") >= 0 || filename.indexOf("\\") >= 0) - delim = '\\'; + /** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits + */ + LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { + return this.low >>> 0; + }; - } else if (typeof filename === 'string') { + /** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} + */ + LongPrototype.getNumBitsAbs = function getNumBitsAbs() { + if (this.isNegative()) // Unsigned Longs are never negative + return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) + if ((val & (1 << bit)) != 0) + break; + return this.high != 0 ? bit + 33 : bit + 1; + }; - if (this.importRoot) // If import root is overridden, use it - importRoot = this.importRoot; - else { // Otherwise compute from filename - if (filename.indexOf("/") >= 0) { // Unix - importRoot = filename.replace(/\/[^\/]*$/, ""); - if (/* /file.proto */ importRoot === "") - importRoot = "/"; - } else if (filename.indexOf("\\") >= 0) { // Windows - importRoot = filename.replace(/\\[^\\]*$/, ""); - delim = '\\'; - } else - importRoot = "."; - } + /** + * Tests if this Long's value equals zero. + * @returns {boolean} + */ + LongPrototype.isZero = function isZero() { + return this.high === 0 && this.low === 0; + }; - } else - importRoot = null; + /** + * Tests if this Long's value is negative. + * @returns {boolean} + */ + LongPrototype.isNegative = function isNegative() { + return !this.unsigned && this.high < 0; + }; - for (var i=0; i= 0; + }; - // Import structures + /** + * Tests if this Long's value is odd. + * @returns {boolean} + */ + LongPrototype.isOdd = function isOdd() { + return (this.low & 1) === 1; + }; + + /** + * Tests if this Long's value is even. + * @returns {boolean} + */ + LongPrototype.isEven = function isEven() { + return (this.low & 1) === 0; + }; + + /** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.equals = function equals(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1) + return false; + return this.high === other.high && this.low === other.low; + }; - if (json['package']) - this.define(json['package']); - if (json['syntax']) - propagateSyntax(json); - var base = this.ptr; - if (json['options']) - Object.keys(json['options']).forEach(function(key) { - base.options[key] = json['options'][key]; - }); - if (json['messages']) - this.create(json['messages']), - this.ptr = base; - if (json['enums']) - this.create(json['enums']), - this.ptr = base; - if (json['services']) - this.create(json['services']), - this.ptr = base; - if (json['extends']) - this.create(json['extends']); + /** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.eq = LongPrototype.equals; - return this.reset(); - }; + /** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.notEquals = function notEquals(other) { + return !this.eq(/* validates */ other); + }; - /** - * Resolves all namespace objects. - * @throws {Error} If a type cannot be resolved - * @returns {!ProtoBuf.Builder} this - * @expose - */ - BuilderPrototype.resolveAll = function() { - // Resolve all reflected objects - var res; - if (this.ptr == null || typeof this.ptr.type === 'object') - return this; // Done (already resolved) + /** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.neq = LongPrototype.notEquals; - if (this.ptr instanceof Reflect.Namespace) { // Resolve children + /** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThan = function lessThan(other) { + return this.comp(/* validates */ other) < 0; + }; - this.ptr.children.forEach(function(child) { - this.ptr = child; - this.resolveAll(); - }, this); + /** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lt = LongPrototype.lessThan; - } else if (this.ptr instanceof Reflect.Message.Field) { // Resolve type + /** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { + return this.comp(/* validates */ other) <= 0; + }; - if (!Lang.TYPE.test(this.ptr.type)) { - if (!Lang.TYPEREF.test(this.ptr.type)) - throw Error("illegal type reference in "+this.ptr.toString(true)+": "+this.ptr.type); - res = (this.ptr instanceof Reflect.Message.ExtensionField ? this.ptr.extension.parent : this.ptr.parent).resolve(this.ptr.type, true); - if (!res) - throw Error("unresolvable type reference in "+this.ptr.toString(true)+": "+this.ptr.type); - this.ptr.resolvedType = res; - if (res instanceof Reflect.Enum) { - this.ptr.type = ProtoBuf.TYPES["enum"]; - if (this.ptr.syntax === 'proto3' && res.syntax !== 'proto3') - throw Error("proto3 message cannot reference proto2 enum"); - } - else if (res instanceof Reflect.Message) - this.ptr.type = res.isGroup ? ProtoBuf.TYPES["group"] : ProtoBuf.TYPES["message"]; - else - throw Error("illegal type reference in "+this.ptr.toString(true)+": "+this.ptr.type); - } else - this.ptr.type = ProtoBuf.TYPES[this.ptr.type]; + /** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.lte = LongPrototype.lessThanOrEqual; - // If it's a map field, also resolve the key type. The key type can be only a numeric, string, or bool type - // (i.e., no enums or messages), so we don't need to resolve against the current namespace. - if (this.ptr.map) { - if (!Lang.TYPE.test(this.ptr.keyType)) - throw Error("illegal key type for map field in "+this.ptr.toString(true)+": "+this.ptr.keyType); - this.ptr.keyType = ProtoBuf.TYPES[this.ptr.keyType]; - } + /** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThan = function greaterThan(other) { + return this.comp(/* validates */ other) > 0; + }; - } else if (this.ptr instanceof ProtoBuf.Reflect.Service.Method) { + /** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gt = LongPrototype.greaterThan; - if (this.ptr instanceof ProtoBuf.Reflect.Service.RPCMethod) { - res = this.ptr.parent.resolve(this.ptr.requestName, true); - if (!res || !(res instanceof ProtoBuf.Reflect.Message)) - throw Error("Illegal type reference in "+this.ptr.toString(true)+": "+this.ptr.requestName); - this.ptr.resolvedRequestType = res; - res = this.ptr.parent.resolve(this.ptr.responseName, true); - if (!res || !(res instanceof ProtoBuf.Reflect.Message)) - throw Error("Illegal type reference in "+this.ptr.toString(true)+": "+this.ptr.responseName); - this.ptr.resolvedResponseType = res; - } else // Should not happen as nothing else is implemented - throw Error("illegal service type in "+this.ptr.toString(true)); + /** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { + return this.comp(/* validates */ other) >= 0; + }; - } else if ( - !(this.ptr instanceof ProtoBuf.Reflect.Message.OneOf) && // Not built - !(this.ptr instanceof ProtoBuf.Reflect.Extension) && // Not built - !(this.ptr instanceof ProtoBuf.Reflect.Enum.Value) // Built in enum - ) - throw Error("illegal object in namespace: "+typeof(this.ptr)+": "+this.ptr); + /** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ + LongPrototype.gte = LongPrototype.greaterThanOrEqual; - return this.reset(); - }; + /** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ + LongPrototype.compare = function compare(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.eq(other)) + return 0; + var thisNeg = this.isNegative(), + otherNeg = other.isNegative(); + if (thisNeg && !otherNeg) + return -1; + if (!thisNeg && otherNeg) + return 1; + // At this point the sign bits are the same + if (!this.unsigned) + return this.sub(other).isNegative() ? -1 : 1; + // Both are positive if at least one is unsigned + return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1; + }; - /** - * Builds the protocol. This will first try to resolve all definitions and, if this has been successful, - * return the built package. - * @param {(string|Array.)=} path Specifies what to return. If omitted, the entire namespace will be returned. - * @returns {!ProtoBuf.Builder.Message|!Object.} - * @throws {Error} If a type could not be resolved - * @expose - */ - BuilderPrototype.build = function(path) { - this.reset(); - if (!this.resolved) - this.resolveAll(), - this.resolved = true, - this.result = null; // Require re-build - if (this.result === null) // (Re-)Build - this.result = this.ns.build(); - if (!path) - return this.result; - var part = typeof path === 'string' ? path.split(".") : path, - ptr = this.result; // Build namespace pointer (no hasChild etc.) - for (var i=0; i>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; - /** - * @alias ProtoBuf.Builder.Message - */ - Builder.Service = function() {}; + var b48 = addend.high >>> 16; + var b32 = addend.high & 0xFFFF; + var b16 = addend.low >>> 16; + var b00 = addend.low & 0xFFFF; - return Builder; + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 + b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 + b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 + b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 + b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; - })(ProtoBuf, ProtoBuf.Lang, ProtoBuf.Reflect); + /** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ + LongPrototype.subtract = function subtract(subtrahend) { + if (!isLong(subtrahend)) + subtrahend = fromValue(subtrahend); + return this.add(subtrahend.neg()); + }; /** - * @alias ProtoBuf.Map - * @expose + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference */ - ProtoBuf.Map = (function(ProtoBuf, Reflect) { - "use strict"; + LongPrototype.sub = LongPrototype.subtract; - /** - * Constructs a new Map. A Map is a container that is used to implement map - * fields on message objects. It closely follows the ES6 Map API; however, - * it is distinct because we do not want to depend on external polyfills or - * on ES6 itself. - * - * @exports ProtoBuf.Map - * @param {!ProtoBuf.Reflect.Field} field Map field - * @param {Object.=} contents Initial contents - * @constructor - */ - var Map = function(field, contents) { - if (!field.map) - throw Error("field is not a map"); + /** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.multiply = function multiply(multiplier) { + if (this.isZero()) + return ZERO; + if (!isLong(multiplier)) + multiplier = fromValue(multiplier); + if (multiplier.isZero()) + return ZERO; + if (this.eq(MIN_VALUE)) + return multiplier.isOdd() ? MIN_VALUE : ZERO; + if (multiplier.eq(MIN_VALUE)) + return this.isOdd() ? MIN_VALUE : ZERO; - /** - * The field corresponding to this map. - * @type {!ProtoBuf.Reflect.Field} - */ - this.field = field; + if (this.isNegative()) { + if (multiplier.isNegative()) + return this.neg().mul(multiplier.neg()); + else + return this.neg().mul(multiplier).neg(); + } else if (multiplier.isNegative()) + return this.mul(multiplier.neg()).neg(); - /** - * Element instance corresponding to key type. - * @type {!ProtoBuf.Reflect.Element} - */ - this.keyElem = new Reflect.Element(field.keyType, null, true, field.syntax); + // If both longs are small, use float multiplication + if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24)) + return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned); - /** - * Element instance corresponding to value type. - * @type {!ProtoBuf.Reflect.Element} - */ - this.valueElem = new Reflect.Element(field.type, field.resolvedType, false, field.syntax); + // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. + // We can skip products that would overflow. - /** - * Internal map: stores mapping of (string form of key) -> (key, value) - * pair. - * - * We provide map semantics for arbitrary key types, but we build on top - * of an Object, which has only string keys. In order to avoid the need - * to convert a string key back to its native type in many situations, - * we store the native key value alongside the value. Thus, we only need - * a one-way mapping from a key type to its string form that guarantees - * uniqueness and equality (i.e., str(K1) === str(K2) if and only if K1 - * === K2). - * - * @type {!Object} - */ - this.map = {}; + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; - /** - * Returns the number of elements in the map. - */ - Object.defineProperty(this, "size", { - get: function() { return Object.keys(this.map).length; } - }); + var b48 = multiplier.high >>> 16; + var b32 = multiplier.high & 0xFFFF; + var b16 = multiplier.low >>> 16; + var b00 = multiplier.low & 0xFFFF; - // Fill initial contents from a raw object. - if (contents) { - var keys = Object.keys(contents); - for (var i = 0; i < keys.length; i++) { - var key = this.keyElem.valueFromString(keys[i]); - var val = this.valueElem.verifyValue(contents[keys[i]]); - this.map[this.keyElem.valueToString(key)] = - { key: key, value: val }; - } - } - }; + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 * b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 * b00; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c16 += a00 * b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 * b00; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a16 * b16; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a00 * b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); + }; - var MapPrototype = Map.prototype; + /** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ + LongPrototype.mul = LongPrototype.multiply; - /** - * Helper: return an iterator over an array. - * @param {!Array<*>} arr the array - * @returns {!Object} an iterator - * @inner - */ - function arrayIterator(arr) { - var idx = 0; - return { - next: function() { - if (idx < arr.length) - return { done: false, value: arr[idx++] }; - return { done: true }; + /** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.divide = function divide(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + if (divisor.isZero()) + throw Error('division by zero'); + if (this.isZero()) + return this.unsigned ? UZERO : ZERO; + var approx, rem, res; + if (!this.unsigned) { + // This section is only relevant for signed longs and is derived from the + // closure library as a whole. + if (this.eq(MIN_VALUE)) { + if (divisor.eq(ONE) || divisor.eq(NEG_ONE)) + return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE + else if (divisor.eq(MIN_VALUE)) + return ONE; + else { + // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. + var halfThis = this.shr(1); + approx = halfThis.div(divisor).shl(1); + if (approx.eq(ZERO)) { + return divisor.isNegative() ? ONE : NEG_ONE; + } else { + rem = this.sub(divisor.mul(approx)); + res = approx.add(rem.div(divisor)); + return res; + } } - } + } else if (divisor.eq(MIN_VALUE)) + return this.unsigned ? UZERO : ZERO; + if (this.isNegative()) { + if (divisor.isNegative()) + return this.neg().div(divisor.neg()); + return this.neg().div(divisor).neg(); + } else if (divisor.isNegative()) + return this.div(divisor.neg()).neg(); + res = ZERO; + } else { + // The algorithm below has not been made for unsigned longs. It's therefore + // required to take special care of the MSB prior to running it. + if (!divisor.unsigned) + divisor = divisor.toUnsigned(); + if (divisor.gt(this)) + return UZERO; + if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true + return UONE; + res = UZERO; } - /** - * Clears the map. - */ - MapPrototype.clear = function() { - this.map = {}; - }; + // Repeat the following until the remainder is less than other: find a + // floating-point that approximates remainder / other *from below*, add this + // into the result, and subtract it from the remainder. It is critical that + // the approximate value is less than or equal to the real value so that the + // remainder never becomes negative. + rem = this; + while (rem.gte(divisor)) { + // Approximate the result of division. This may be a little greater or + // smaller than the actual value. + approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber())); - /** - * Deletes a particular key from the map. - * @returns {boolean} Whether any entry with this key was deleted. - */ - MapPrototype["delete"] = function(key) { - var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); - var hadKey = keyValue in this.map; - delete this.map[keyValue]; - return hadKey; - }; + // We will tweak the approximate result by changing it in the 48-th digit or + // the smallest non-fractional digit, whichever is larger. + var log2 = Math.ceil(Math.log(approx) / Math.LN2), + delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48), - /** - * Returns an iterator over [key, value] pairs in the map. - * @returns {Object} The iterator - */ - MapPrototype.entries = function() { - var entries = []; - var strKeys = Object.keys(this.map); - for (var i = 0, entry; i < strKeys.length; i++) - entries.push([(entry=this.map[strKeys[i]]).key, entry.value]); - return arrayIterator(entries); - }; + // Decrease the approximation until it is smaller than the remainder. Note + // that if it is too large, the product overflows and is negative. + approxRes = fromNumber(approx), + approxRem = approxRes.mul(divisor); + while (approxRem.isNegative() || approxRem.gt(rem)) { + approx -= delta; + approxRes = fromNumber(approx, this.unsigned); + approxRem = approxRes.mul(divisor); + } - /** - * Returns an iterator over keys in the map. - * @returns {Object} The iterator - */ - MapPrototype.keys = function() { - var keys = []; - var strKeys = Object.keys(this.map); - for (var i = 0; i < strKeys.length; i++) - keys.push(this.map[strKeys[i]].key); - return arrayIterator(keys); - }; + // We know the answer can't be zero... and actually, zero would cause + // infinite recursion since we would make no progress. + if (approxRes.isZero()) + approxRes = ONE; - /** - * Returns an iterator over values in the map. - * @returns {!Object} The iterator - */ - MapPrototype.values = function() { - var values = []; - var strKeys = Object.keys(this.map); - for (var i = 0; i < strKeys.length; i++) - values.push(this.map[strKeys[i]].value); - return arrayIterator(values); - }; + res = res.add(approxRes); + rem = rem.sub(approxRem); + } + return res; + }; - /** - * Iterates over entries in the map, calling a function on each. - * @param {function(this:*, *, *, *)} cb The callback to invoke with value, key, and map arguments. - * @param {Object=} thisArg The `this` value for the callback - */ - MapPrototype.forEach = function(cb, thisArg) { - var strKeys = Object.keys(this.map); - for (var i = 0, entry; i < strKeys.length; i++) - cb.call(thisArg, (entry=this.map[strKeys[i]]).value, entry.key, this); - }; + /** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ + LongPrototype.div = LongPrototype.divide; - /** - * Sets a key in the map to the given value. - * @param {*} key The key - * @param {*} value The value - * @returns {!ProtoBuf.Map} The map instance - */ - MapPrototype.set = function(key, value) { - var keyValue = this.keyElem.verifyValue(key); - var valValue = this.valueElem.verifyValue(value); - this.map[this.keyElem.valueToString(keyValue)] = - { key: keyValue, value: valValue }; - return this; - }; + /** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.modulo = function modulo(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + return this.sub(this.div(divisor).mul(divisor)); + }; - /** - * Gets the value corresponding to a key in the map. - * @param {*} key The key - * @returns {*|undefined} The value, or `undefined` if key not present - */ - MapPrototype.get = function(key) { - var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); - if (!(keyValue in this.map)) - return undefined; - return this.map[keyValue].value; - }; + /** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ + LongPrototype.mod = LongPrototype.modulo; - /** - * Determines whether the given key is present in the map. - * @param {*} key The key - * @returns {boolean} `true` if the key is present - */ - MapPrototype.has = function(key) { - var keyValue = this.keyElem.valueToString(this.keyElem.verifyValue(key)); - return (keyValue in this.map); - }; + /** + * Returns the bitwise NOT of this Long. + * @returns {!Long} + */ + LongPrototype.not = function not() { + return fromBits(~this.low, ~this.high, this.unsigned); + }; - return Map; - })(ProtoBuf, ProtoBuf.Reflect); + /** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.and = function and(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low & other.low, this.high & other.high, this.unsigned); + }; + /** + * Returns the bitwise OR of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ + LongPrototype.or = function or(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low | other.low, this.high | other.high, this.unsigned); + }; /** - * Loads a .proto string and returns the Builder. - * @param {string} proto .proto file contents - * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted. - * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports. - * @return {ProtoBuf.Builder} Builder to create new messages - * @throws {Error} If the definition cannot be parsed or built - * @expose + * Returns the bitwise XOR of this Long and the given one. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ - ProtoBuf.loadProto = function(proto, builder, filename) { - if (typeof builder === 'string' || (builder && typeof builder["file"] === 'string' && typeof builder["root"] === 'string')) - filename = builder, - builder = undefined; - return ProtoBuf.loadJson(ProtoBuf.DotProto.Parser.parse(proto), builder, filename); + LongPrototype.xor = function xor(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); }; /** - * Loads a .proto string and returns the Builder. This is an alias of {@link ProtoBuf.loadProto}. + * Returns this Long with bits shifted to the left by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ + LongPrototype.shiftLeft = function shiftLeft(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned); + else + return fromBits(0, this.low << (numBits - 32), this.unsigned); + }; + + /** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. * @function - * @param {string} proto .proto file contents - * @param {(ProtoBuf.Builder|string)=} builder Builder to append to. Will create a new one if omitted. - * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports. - * @return {ProtoBuf.Builder} Builder to create new messages - * @throws {Error} If the definition cannot be parsed or built - * @expose + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ - ProtoBuf.protoFromString = ProtoBuf.loadProto; // Legacy + LongPrototype.shl = LongPrototype.shiftLeft; /** - * Loads a .proto file and returns the Builder. - * @param {string|{root: string, file: string}} filename Path to proto file or an object specifying 'file' with - * an overridden 'root' path for all imported files. - * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and - * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the - * file will be read synchronously and this function will return the Builder. - * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted. - * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the - * request has failed), else undefined - * @expose + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ - ProtoBuf.loadProtoFile = function(filename, callback, builder) { - if (callback && typeof callback === 'object') - builder = callback, - callback = null; - else if (!callback || typeof callback !== 'function') - callback = null; - if (callback) - return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename["root"]+"/"+filename["file"], function(contents) { - if (contents === null) { - callback(Error("Failed to fetch file")); - return; - } - try { - callback(null, ProtoBuf.loadProto(contents, builder, filename)); - } catch (e) { - callback(e); - } - }); - var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename["root"]+"/"+filename["file"] : filename); - return contents === null ? null : ProtoBuf.loadProto(contents, builder, filename); + LongPrototype.shiftRight = function shiftRight(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned); + else + return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned); }; /** - * Loads a .proto file and returns the Builder. This is an alias of {@link ProtoBuf.loadProtoFile}. + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. * @function - * @param {string|{root: string, file: string}} filename Path to proto file or an object specifying 'file' with - * an overridden 'root' path for all imported files. - * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and - * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the - * file will be read synchronously and this function will return the Builder. - * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted. - * @return {!ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the - * request has failed), else undefined - * @expose + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ - ProtoBuf.protoFromFile = ProtoBuf.loadProtoFile; // Legacy - + LongPrototype.shr = LongPrototype.shiftRight; /** - * Constructs a new empty Builder. - * @param {Object.=} options Builder options, defaults to global options set on ProtoBuf - * @return {!ProtoBuf.Builder} Builder - * @expose + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ - ProtoBuf.newBuilder = function(options) { - options = options || {}; - if (typeof options['convertFieldsToCamelCase'] === 'undefined') - options['convertFieldsToCamelCase'] = ProtoBuf.convertFieldsToCamelCase; - if (typeof options['populateAccessors'] === 'undefined') - options['populateAccessors'] = ProtoBuf.populateAccessors; - return new ProtoBuf.Builder(options); + LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + numBits &= 63; + if (numBits === 0) + return this; + else { + var high = this.high; + if (numBits < 32) { + var low = this.low; + return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned); + } else if (numBits === 32) + return fromBits(high, 0, this.unsigned); + else + return fromBits(high >>> (numBits - 32), 0, this.unsigned); + } }; /** - * Loads a .json definition and returns the Builder. - * @param {!*|string} json JSON definition - * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder Builder to append to. Will create a new one if omitted. - * @param {(string|{root: string, file: string})=} filename The corresponding file name if known. Must be specified for imports. - * @return {ProtoBuf.Builder} Builder to create new messages - * @throws {Error} If the definition cannot be parsed or built - * @expose + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ - ProtoBuf.loadJson = function(json, builder, filename) { - if (typeof builder === 'string' || (builder && typeof builder["file"] === 'string' && typeof builder["root"] === 'string')) - filename = builder, - builder = null; - if (!builder || typeof builder !== 'object') - builder = ProtoBuf.newBuilder(); - if (typeof json === 'string') - json = JSON.parse(json); - builder["import"](json, filename); - builder.resolveAll(); - return builder; + LongPrototype.shru = LongPrototype.shiftRightUnsigned; + + /** + * Converts this Long to signed. + * @returns {!Long} Signed long + */ + LongPrototype.toSigned = function toSigned() { + if (!this.unsigned) + return this; + return fromBits(this.low, this.high, false); }; /** - * Loads a .json file and returns the Builder. - * @param {string|!{root: string, file: string}} filename Path to json file or an object specifying 'file' with - * an overridden 'root' path for all imported files. - * @param {function(?Error, !ProtoBuf.Builder=)=} callback Callback that will receive `null` as the first and - * the Builder as its second argument on success, otherwise the error as its first argument. If omitted, the - * file will be read synchronously and this function will return the Builder. - * @param {ProtoBuf.Builder=} builder Builder to append to. Will create a new one if omitted. - * @return {?ProtoBuf.Builder|undefined} The Builder if synchronous (no callback specified, will be NULL if the - * request has failed), else undefined - * @expose + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long */ - ProtoBuf.loadJsonFile = function(filename, callback, builder) { - if (callback && typeof callback === 'object') - builder = callback, - callback = null; - else if (!callback || typeof callback !== 'function') - callback = null; - if (callback) - return ProtoBuf.Util.fetch(typeof filename === 'string' ? filename : filename["root"]+"/"+filename["file"], function(contents) { - if (contents === null) { - callback(Error("Failed to fetch file")); - return; - } - try { - callback(null, ProtoBuf.loadJson(JSON.parse(contents), builder, filename)); - } catch (e) { - callback(e); - } - }); - var contents = ProtoBuf.Util.fetch(typeof filename === 'object' ? filename["root"]+"/"+filename["file"] : filename); - return contents === null ? null : ProtoBuf.loadJson(JSON.parse(contents), builder, filename); + LongPrototype.toUnsigned = function toUnsigned() { + if (this.unsigned) + return this; + return fromBits(this.low, this.high, true); }; - return ProtoBuf; + /** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation + */ + LongPrototype.toBytes = function(le) { + return le ? this.toBytesLE() : this.toBytesBE(); + } + + /** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation + */ + LongPrototype.toBytesLE = function() { + var hi = this.high, + lo = this.low; + return [ + lo & 0xff, + (lo >>> 8) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 24) & 0xff, + hi & 0xff, + (hi >>> 8) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 24) & 0xff + ]; + } + + /** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation + */ + LongPrototype.toBytesBE = function() { + var hi = this.high, + lo = this.low; + return [ + (hi >>> 24) & 0xff, + (hi >>> 16) & 0xff, + (hi >>> 8) & 0xff, + hi & 0xff, + (lo >>> 24) & 0xff, + (lo >>> 16) & 0xff, + (lo >>> 8) & 0xff, + lo & 0xff + ]; + } + + return Long; }); -(function() { - 'use strict'; +},{}],101:[function(require,module,exports){ +var bn = require('bn.js'); +var brorand = require('brorand'); + +function MillerRabin(rand) { + this.rand = rand || new brorand.Rand(); +} +module.exports = MillerRabin; + +MillerRabin.create = function create(rand) { + return new MillerRabin(rand); +}; + +MillerRabin.prototype._rand = function _rand(n) { + var len = n.bitLength(); + var buf = this.rand.generate(Math.ceil(len / 8)); + + // Set low bits + buf[0] |= 3; + + // Mask high bits + var mask = len & 0x7; + if (mask !== 0) + buf[buf.length - 1] >>= 7 - mask; + + return new bn(buf); +} + +MillerRabin.prototype.test = function test(n, k, cb) { + var len = n.bitLength(); + var red = bn.mont(n); + var rone = new bn(1).toRed(red); + + if (!k) + k = Math.max(1, (len / 48) | 0); + + // Find d and s, (n - 1) = (2 ^ s) * d; + var n1 = n.subn(1); + var n2 = n1.subn(1); + for (var s = 0; !n1.testn(s); s++) {} + var d = n.shrn(s); + + var rn1 = n1.toRed(red); + + var prime = true; + for (; k > 0; k--) { + var a = this._rand(n2); + if (cb) + cb(a); + + var x = a.toRed(red).redPow(d); + if (x.cmp(rone) === 0 || x.cmp(rn1) === 0) + continue; + + for (var i = 1; i < s; i++) { + x = x.redSqr(); + + if (x.cmp(rone) === 0) + return false; + if (x.cmp(rn1) === 0) + break; + } + + if (i === s) + return false; + } + + return prime; +}; + +MillerRabin.prototype.getDivisor = function getDivisor(n, k) { + var len = n.bitLength(); + var red = bn.mont(n); + var rone = new bn(1).toRed(red); + + if (!k) + k = Math.max(1, (len / 48) | 0); + + // Find d and s, (n - 1) = (2 ^ s) * d; + var n1 = n.subn(1); + var n2 = n1.subn(1); + for (var s = 0; !n1.testn(s); s++) {} + var d = n.shrn(s); + + var rn1 = n1.toRed(red); + + for (; k > 0; k--) { + var a = this._rand(n2); + + var g = n.gcd(a); + if (g.cmpn(1) !== 0) + return g; + + var x = a.toRed(red).redPow(d); + if (x.cmp(rone) === 0 || x.cmp(rn1) === 0) + continue; + + for (var i = 1; i < s; i++) { + x = x.redSqr(); + + if (x.cmp(rone) === 0) + return x.fromRed().subn(1).gcd(n); + if (x.cmp(rn1) === 0) + break; + } + + if (i === s) { + x = x.redSqr(); + return x.fromRed().subn(1).gcd(n); + } + } + + return false; +}; + +},{"bn.js":19,"brorand":20}],102:[function(require,module,exports){ +module.exports = assert; + +function assert(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); +} + +assert.equal = function assertEqual(l, r, msg) { + if (l != r) + throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); +}; + +},{}],103:[function(require,module,exports){ +module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb", +"2.16.840.1.101.3.4.1.2": "aes-128-cbc", +"2.16.840.1.101.3.4.1.3": "aes-128-ofb", +"2.16.840.1.101.3.4.1.4": "aes-128-cfb", +"2.16.840.1.101.3.4.1.21": "aes-192-ecb", +"2.16.840.1.101.3.4.1.22": "aes-192-cbc", +"2.16.840.1.101.3.4.1.23": "aes-192-ofb", +"2.16.840.1.101.3.4.1.24": "aes-192-cfb", +"2.16.840.1.101.3.4.1.41": "aes-256-ecb", +"2.16.840.1.101.3.4.1.42": "aes-256-cbc", +"2.16.840.1.101.3.4.1.43": "aes-256-ofb", +"2.16.840.1.101.3.4.1.44": "aes-256-cfb" +} +},{}],104:[function(require,module,exports){ +// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js +// Fedor, you are amazing. + +var asn1 = require('asn1.js') + +var RSAPrivateKey = asn1.define('RSAPrivateKey', function () { + this.seq().obj( + this.key('version').int(), + this.key('modulus').int(), + this.key('publicExponent').int(), + this.key('privateExponent').int(), + this.key('prime1').int(), + this.key('prime2').int(), + this.key('exponent1').int(), + this.key('exponent2').int(), + this.key('coefficient').int() + ) +}) +exports.RSAPrivateKey = RSAPrivateKey + +var RSAPublicKey = asn1.define('RSAPublicKey', function () { + this.seq().obj( + this.key('modulus').int(), + this.key('publicExponent').int() + ) +}) +exports.RSAPublicKey = RSAPublicKey + +var PublicKey = asn1.define('SubjectPublicKeyInfo', function () { + this.seq().obj( + this.key('algorithm').use(AlgorithmIdentifier), + this.key('subjectPublicKey').bitstr() + ) +}) +exports.PublicKey = PublicKey + +var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () { + this.seq().obj( + this.key('algorithm').objid(), + this.key('none').null_().optional(), + this.key('curve').objid().optional(), + this.key('params').seq().obj( + this.key('p').int(), + this.key('q').int(), + this.key('g').int() + ).optional() + ) +}) + +var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () { + this.seq().obj( + this.key('version').int(), + this.key('algorithm').use(AlgorithmIdentifier), + this.key('subjectPrivateKey').octstr() + ) +}) +exports.PrivateKey = PrivateKeyInfo +var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () { + this.seq().obj( + this.key('algorithm').seq().obj( + this.key('id').objid(), + this.key('decrypt').seq().obj( + this.key('kde').seq().obj( + this.key('id').objid(), + this.key('kdeparams').seq().obj( + this.key('salt').octstr(), + this.key('iters').int() + ) + ), + this.key('cipher').seq().obj( + this.key('algo').objid(), + this.key('iv').octstr() + ) + ) + ), + this.key('subjectPrivateKey').octstr() + ) +}) + +exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo + +var DSAPrivateKey = asn1.define('DSAPrivateKey', function () { + this.seq().obj( + this.key('version').int(), + this.key('p').int(), + this.key('q').int(), + this.key('g').int(), + this.key('pub_key').int(), + this.key('priv_key').int() + ) +}) +exports.DSAPrivateKey = DSAPrivateKey + +exports.DSAparam = asn1.define('DSAparam', function () { + this.int() +}) +var ECPrivateKey = asn1.define('ECPrivateKey', function () { + this.seq().obj( + this.key('version').int(), + this.key('privateKey').octstr(), + this.key('parameters').optional().explicit(0).use(ECParameters), + this.key('publicKey').optional().explicit(1).bitstr() + ) +}) +exports.ECPrivateKey = ECPrivateKey +var ECParameters = asn1.define('ECParameters', function () { + this.choice({ + namedCurve: this.objid() + }) +}) + +exports.signature = asn1.define('signature', function () { + this.seq().obj( + this.key('r').int(), + this.key('s').int() + ) +}) + +},{"asn1.js":4}],105:[function(require,module,exports){ +(function (Buffer){ +// adapted from https://github.com/apatil/pemstrip +var findProc = /Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m +var startRegex = /^-----BEGIN (.*) KEY-----\r?\n/m +var fullRegex = /^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m +var evp = require('evp_bytestokey') +var ciphers = require('browserify-aes') +module.exports = function (okey, password) { + var key = okey.toString() + var match = key.match(findProc) + var decrypted + if (!match) { + var match2 = key.match(fullRegex) + decrypted = new Buffer(match2[2].replace(/\r?\n/g, ''), 'base64') + } else { + var suite = 'aes' + match[1] + var iv = new Buffer(match[2], 'hex') + var cipherText = new Buffer(match[3].replace(/\r?\n/g, ''), 'base64') + var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key + var out = [] + var cipher = ciphers.createDecipheriv(suite, cipherKey, iv) + out.push(cipher.update(cipherText)) + out.push(cipher.final()) + decrypted = Buffer.concat(out) + } + var tag = key.match(startRegex)[1] + ' KEY' + return { + tag: tag, + data: decrypted + } +} + +}).call(this,require("buffer").Buffer) +},{"browserify-aes":24,"buffer":49,"evp_bytestokey":88}],106:[function(require,module,exports){ +(function (Buffer){ +var asn1 = require('./asn1') +var aesid = require('./aesid.json') +var fixProc = require('./fixProc') +var ciphers = require('browserify-aes') +var compat = require('pbkdf2') +module.exports = parseKeys + +function parseKeys (buffer) { + var password + if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) { + password = buffer.passphrase + buffer = buffer.key + } + if (typeof buffer === 'string') { + buffer = new Buffer(buffer) + } + + var stripped = fixProc(buffer, password) + + var type = stripped.tag + var data = stripped.data + var subtype, ndata + switch (type) { + case 'PUBLIC KEY': + ndata = asn1.PublicKey.decode(data, 'der') + subtype = ndata.algorithm.algorithm.join('.') + switch (subtype) { + case '1.2.840.113549.1.1.1': + return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der') + case '1.2.840.10045.2.1': + ndata.subjectPrivateKey = ndata.subjectPublicKey + return { + type: 'ec', + data: ndata + } + case '1.2.840.10040.4.1': + ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der') + return { + type: 'dsa', + data: ndata.algorithm.params + } + default: throw new Error('unknown key id ' + subtype) + } + throw new Error('unknown key type ' + type) + case 'ENCRYPTED PRIVATE KEY': + data = asn1.EncryptedPrivateKey.decode(data, 'der') + data = decrypt(data, password) + // falls through + case 'PRIVATE KEY': + ndata = asn1.PrivateKey.decode(data, 'der') + subtype = ndata.algorithm.algorithm.join('.') + switch (subtype) { + case '1.2.840.113549.1.1.1': + return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der') + case '1.2.840.10045.2.1': + return { + curve: ndata.algorithm.curve, + privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey + } + case '1.2.840.10040.4.1': + ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der') + return { + type: 'dsa', + params: ndata.algorithm.params + } + default: throw new Error('unknown key id ' + subtype) + } + throw new Error('unknown key type ' + type) + case 'RSA PUBLIC KEY': + return asn1.RSAPublicKey.decode(data, 'der') + case 'RSA PRIVATE KEY': + return asn1.RSAPrivateKey.decode(data, 'der') + case 'DSA PRIVATE KEY': + return { + type: 'dsa', + params: asn1.DSAPrivateKey.decode(data, 'der') + } + case 'EC PRIVATE KEY': + data = asn1.ECPrivateKey.decode(data, 'der') + return { + curve: data.parameters.value, + privateKey: data.privateKey + } + default: throw new Error('unknown key type ' + type) + } +} +parseKeys.signature = asn1.signature +function decrypt (data, password) { + var salt = data.algorithm.decrypt.kde.kdeparams.salt + var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10) + var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')] + var iv = data.algorithm.decrypt.cipher.iv + var cipherText = data.subjectPrivateKey + var keylen = parseInt(algo.split('-')[1], 10) / 8 + var key = compat.pbkdf2Sync(password, salt, iters, keylen) + var cipher = ciphers.createDecipheriv(algo, key, iv) + var out = [] + out.push(cipher.update(cipherText)) + out.push(cipher.final()) + return Buffer.concat(out) +} + +}).call(this,require("buffer").Buffer) +},{"./aesid.json":103,"./asn1":104,"./fixProc":105,"browserify-aes":24,"buffer":49,"pbkdf2":108}],107:[function(require,module,exports){ +(function (process){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; +var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); +}; + +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : process.cwd(); + + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; + +// path.normalize(path) +// posix version +exports.normalize = function(path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; + + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + +// posix version +exports.isAbsolute = function(path) { + return path.charAt(0) === '/'; +}; + +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); +}; + + +// path.relative(from, to) +// posix version +exports.relative = function(from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); + + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +}; + +exports.sep = '/'; +exports.delimiter = ':'; + +exports.dirname = function(path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +}; + + +exports.basename = function(path, ext) { + var f = splitPath(path)[2]; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +}; + + +exports.extname = function(path) { + return splitPath(path)[3]; +}; + +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' + ? function (str, start, len) { return str.substr(start, len) } + : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; + +}).call(this,require('_process')) +},{"_process":111}],108:[function(require,module,exports){ +(function (process,Buffer){ +var createHmac = require('create-hmac') +var checkParameters = require('./precondition') + +exports.pbkdf2 = function (password, salt, iterations, keylen, digest, callback) { + if (typeof digest === 'function') { + callback = digest + digest = undefined + } + + checkParameters(iterations, keylen) + if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2') + + setTimeout(function () { + callback(null, exports.pbkdf2Sync(password, salt, iterations, keylen, digest)) + }) +} + +var defaultEncoding +if (process.browser) { + defaultEncoding = 'utf-8' +} else { + var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10) + + defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary' +} + +exports.pbkdf2Sync = function (password, salt, iterations, keylen, digest) { + if (!Buffer.isBuffer(password)) password = new Buffer(password, defaultEncoding) + if (!Buffer.isBuffer(salt)) salt = new Buffer(salt, defaultEncoding) + + checkParameters(iterations, keylen) + + digest = digest || 'sha1' + + var hLen + var l = 1 + var DK = new Buffer(keylen) + var block1 = new Buffer(salt.length + 4) + salt.copy(block1, 0, 0, salt.length) + + var r + var T + + for (var i = 1; i <= l; i++) { + block1.writeUInt32BE(i, salt.length) + var U = createHmac(digest, password).update(block1).digest() + + if (!hLen) { + hLen = U.length + T = new Buffer(hLen) + l = Math.ceil(keylen / hLen) + r = keylen - (l - 1) * hLen + } + + U.copy(T, 0, 0, hLen) + + for (var j = 1; j < iterations; j++) { + U = createHmac(digest, password).update(U).digest() + for (var k = 0; k < hLen; k++) T[k] ^= U[k] + } + + var destPos = (i - 1) * hLen + var len = (i === l ? r : hLen) + T.copy(DK, destPos, 0, len) + } + + return DK +} + +}).call(this,require('_process'),require("buffer").Buffer) +},{"./precondition":109,"_process":111,"buffer":49,"create-hmac":58}],109:[function(require,module,exports){ +var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs +module.exports = function (iterations, keylen) { + if (typeof iterations !== 'number') { + throw new TypeError('Iterations not a number') + } + + if (iterations < 0) { + throw new TypeError('Bad iterations') + } + + if (typeof keylen !== 'number') { + throw new TypeError('Key length not a number') + } + + if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */ + throw new TypeError('Bad key length') + } +} + +},{}],110:[function(require,module,exports){ +(function (process){ +'use strict'; + +if (!process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = nextTick; +} else { + module.exports = process.nextTick; +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + +}).call(this,require('_process')) +},{"_process":111}],111:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],112:[function(require,module,exports){ +exports.publicEncrypt = require('./publicEncrypt'); +exports.privateDecrypt = require('./privateDecrypt'); + +exports.privateEncrypt = function privateEncrypt(key, buf) { + return exports.publicEncrypt(key, buf, true); +}; + +exports.publicDecrypt = function publicDecrypt(key, buf) { + return exports.privateDecrypt(key, buf, true); +}; +},{"./privateDecrypt":114,"./publicEncrypt":115}],113:[function(require,module,exports){ +(function (Buffer){ +var createHash = require('create-hash'); +module.exports = function (seed, len) { + var t = new Buffer(''); + var i = 0, c; + while (t.length < len) { + c = i2ops(i++); + t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()]); + } + return t.slice(0, len); +}; + +function i2ops(c) { + var out = new Buffer(4); + out.writeUInt32BE(c,0); + return out; +} +}).call(this,require("buffer").Buffer) +},{"buffer":49,"create-hash":55}],114:[function(require,module,exports){ +(function (Buffer){ +var parseKeys = require('parse-asn1'); +var mgf = require('./mgf'); +var xor = require('./xor'); +var bn = require('bn.js'); +var crt = require('browserify-rsa'); +var createHash = require('create-hash'); +var withPublic = require('./withPublic'); +module.exports = function privateDecrypt(private_key, enc, reverse) { + var padding; + if (private_key.padding) { + padding = private_key.padding; + } else if (reverse) { + padding = 1; + } else { + padding = 4; + } + + var key = parseKeys(private_key); + var k = key.modulus.byteLength(); + if (enc.length > k || new bn(enc).cmp(key.modulus) >= 0) { + throw new Error('decryption error'); + } + var msg; + if (reverse) { + msg = withPublic(new bn(enc), key); + } else { + msg = crt(enc, key); + } + var zBuffer = new Buffer(k - msg.length); + zBuffer.fill(0); + msg = Buffer.concat([zBuffer, msg], k); + if (padding === 4) { + return oaep(key, msg); + } else if (padding === 1) { + return pkcs1(key, msg, reverse); + } else if (padding === 3) { + return msg; + } else { + throw new Error('unknown padding'); + } +}; + +function oaep(key, msg){ + var n = key.modulus; + var k = key.modulus.byteLength(); + var mLen = msg.length; + var iHash = createHash('sha1').update(new Buffer('')).digest(); + var hLen = iHash.length; + var hLen2 = 2 * hLen; + if (msg[0] !== 0) { + throw new Error('decryption error'); + } + var maskedSeed = msg.slice(1, hLen + 1); + var maskedDb = msg.slice(hLen + 1); + var seed = xor(maskedSeed, mgf(maskedDb, hLen)); + var db = xor(maskedDb, mgf(seed, k - hLen - 1)); + if (compare(iHash, db.slice(0, hLen))) { + throw new Error('decryption error'); + } + var i = hLen; + while (db[i] === 0) { + i++; + } + if (db[i++] !== 1) { + throw new Error('decryption error'); + } + return db.slice(i); +} + +function pkcs1(key, msg, reverse){ + var p1 = msg.slice(0, 2); + var i = 2; + var status = 0; + while (msg[i++] !== 0) { + if (i >= msg.length) { + status++; + break; + } + } + var ps = msg.slice(2, i - 1); + var p2 = msg.slice(i - 1, i); + + if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)){ + status++; + } + if (ps.length < 8) { + status++; + } + if (status) { + throw new Error('decryption error'); + } + return msg.slice(i); +} +function compare(a, b){ + a = new Buffer(a); + b = new Buffer(b); + var dif = 0; + var len = a.length; + if (a.length !== b.length) { + dif++; + len = Math.min(a.length, b.length); + } + var i = -1; + while (++i < len) { + dif += (a[i] ^ b[i]); + } + return dif; +} +}).call(this,require("buffer").Buffer) +},{"./mgf":113,"./withPublic":116,"./xor":117,"bn.js":19,"browserify-rsa":40,"buffer":49,"create-hash":55,"parse-asn1":106}],115:[function(require,module,exports){ +(function (Buffer){ +var parseKeys = require('parse-asn1'); +var randomBytes = require('randombytes'); +var createHash = require('create-hash'); +var mgf = require('./mgf'); +var xor = require('./xor'); +var bn = require('bn.js'); +var withPublic = require('./withPublic'); +var crt = require('browserify-rsa'); + +var constants = { + RSA_PKCS1_OAEP_PADDING: 4, + RSA_PKCS1_PADDIN: 1, + RSA_NO_PADDING: 3 +}; + +module.exports = function publicEncrypt(public_key, msg, reverse) { + var padding; + if (public_key.padding) { + padding = public_key.padding; + } else if (reverse) { + padding = 1; + } else { + padding = 4; + } + var key = parseKeys(public_key); + var paddedMsg; + if (padding === 4) { + paddedMsg = oaep(key, msg); + } else if (padding === 1) { + paddedMsg = pkcs1(key, msg, reverse); + } else if (padding === 3) { + paddedMsg = new bn(msg); + if (paddedMsg.cmp(key.modulus) >= 0) { + throw new Error('data too long for modulus'); + } + } else { + throw new Error('unknown padding'); + } + if (reverse) { + return crt(paddedMsg, key); + } else { + return withPublic(paddedMsg, key); + } +}; + +function oaep(key, msg){ + var k = key.modulus.byteLength(); + var mLen = msg.length; + var iHash = createHash('sha1').update(new Buffer('')).digest(); + var hLen = iHash.length; + var hLen2 = 2 * hLen; + if (mLen > k - hLen2 - 2) { + throw new Error('message too long'); + } + var ps = new Buffer(k - mLen - hLen2 - 2); + ps.fill(0); + var dblen = k - hLen - 1; + var seed = randomBytes(hLen); + var maskedDb = xor(Buffer.concat([iHash, ps, new Buffer([1]), msg], dblen), mgf(seed, dblen)); + var maskedSeed = xor(seed, mgf(maskedDb, hLen)); + return new bn(Buffer.concat([new Buffer([0]), maskedSeed, maskedDb], k)); +} +function pkcs1(key, msg, reverse){ + var mLen = msg.length; + var k = key.modulus.byteLength(); + if (mLen > k - 11) { + throw new Error('message too long'); + } + var ps; + if (reverse) { + ps = new Buffer(k - mLen - 3); + ps.fill(0xff); + } else { + ps = nonZero(k - mLen - 3); + } + return new bn(Buffer.concat([new Buffer([0, reverse?1:2]), ps, new Buffer([0]), msg], k)); +} +function nonZero(len, crypto) { + var out = new Buffer(len); + var i = 0; + var cache = randomBytes(len*2); + var cur = 0; + var num; + while (i < len) { + if (cur === cache.length) { + cache = randomBytes(len*2); + cur = 0; + } + num = cache[cur++]; + if (num) { + out[i++] = num; + } + } + return out; +} +}).call(this,require("buffer").Buffer) +},{"./mgf":113,"./withPublic":116,"./xor":117,"bn.js":19,"browserify-rsa":40,"buffer":49,"create-hash":55,"parse-asn1":106,"randombytes":118}],116:[function(require,module,exports){ +(function (Buffer){ +var bn = require('bn.js'); +function withPublic(paddedMsg, key) { + return new Buffer(paddedMsg + .toRed(bn.mont(key.modulus)) + .redPow(new bn(key.publicExponent)) + .fromRed() + .toArray()); +} + +module.exports = withPublic; +}).call(this,require("buffer").Buffer) +},{"bn.js":19,"buffer":49}],117:[function(require,module,exports){ +module.exports = function xor(a, b) { + var len = a.length; + var i = -1; + while (++i < len) { + a[i] ^= b[i]; + } + return a +}; +},{}],118:[function(require,module,exports){ +(function (process,global,Buffer){ +'use strict' + +function oldBrowser () { + throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11') +} + +var crypto = global.crypto || global.msCrypto + +if (crypto && crypto.getRandomValues) { + module.exports = randomBytes +} else { + module.exports = oldBrowser +} + +function randomBytes (size, cb) { + // phantomjs needs to throw + if (size > 65536) throw new Error('requested too many random bytes') + // in case browserify isn't using the Uint8Array version + var rawBytes = new global.Uint8Array(size) + + // This will not work in older browsers. + // See https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues + if (size > 0) { // getRandomValues fails on IE if size == 0 + crypto.getRandomValues(rawBytes) + } + // phantomjs doesn't like a buffer being passed here + var bytes = new Buffer(rawBytes.buffer) + + if (typeof cb === 'function') { + return process.nextTick(function () { + cb(null, bytes) + }) + } + + return bytes +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) +},{"_process":111,"buffer":49}],119:[function(require,module,exports){ +module.exports = require("./lib/_stream_duplex.js") + +},{"./lib/_stream_duplex.js":120}],120:[function(require,module,exports){ +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +var keys = objectKeys(Writable.prototype); +for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + processNextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} +},{"./_stream_readable":122,"./_stream_writable":124,"core-util-is":53,"inherits":97,"process-nextick-args":110}],121:[function(require,module,exports){ +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; +},{"./_stream_transform":123,"core-util-is":53,"inherits":97}],122:[function(require,module,exports){ +(function (process){ +'use strict'; + +module.exports = Readable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream; +(function () { + try { + Stream = require('st' + 'ream'); + } catch (_) {} finally { + if (!Stream) Stream = require('events').EventEmitter; + } +})(); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var StringDecoder; + +util.inherits(Readable, Stream); + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') { + return emitter.prependListener(event, fn); + } else { + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; + } +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~ ~this.highWaterMark; + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options && typeof options.read === 'function') this._read = options.read; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + + if (!state.objectMode && typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = bufferShim.from(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var _e = new Error('stream.unshift() after end event'); + stream.emit('error', _e); + } else { + var skipAdd; + if (state.decoder && !addToFront && !encoding) { + chunk = state.decoder.write(chunk); + skipAdd = !state.objectMode && chunk.length === 0; + } + + if (!addToFront) state.reading = false; + + // Don't add to the buffer if we've decoded to an empty string chunk and + // we're not in object mode + if (!skipAdd) { + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + } + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + processNextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug('onunpipe'); + if (readable === src) { + cleanup(); + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + processNextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + processNextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function (ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = bufferShim.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + processNextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} +}).call(this,require('_process')) +},{"./_stream_duplex":120,"./internal/streams/BufferList":125,"_process":111,"buffer":49,"buffer-shims":47,"core-util-is":53,"events":87,"inherits":97,"isarray":99,"process-nextick-args":110,"string_decoder/":140,"util":21}],123:[function(require,module,exports){ +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function TransformState(stream) { + this.afterTransform = function (er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; + this.writeencoding = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) stream.push(data); + + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = new TransformState(this); + + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.once('prefinish', function () { + if (typeof this._flush === 'function') this._flush(function (er, data) { + done(stream, er, data); + });else done(stream); + }); +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data !== null && data !== undefined) stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var ts = stream._transformState; + + if (ws.length) throw new Error('Calling transform done when ws.length != 0'); + + if (ts.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} +},{"./_stream_duplex":120,"core-util-is":53,"inherits":97}],124:[function(require,module,exports){ +(function (process){ +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +module.exports = Writable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream; +(function () { + try { + Stream = require('st' + 'ream'); + } catch (_) {} finally { + if (!Stream) Stream = require('events').EventEmitter; + } +})(); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +util.inherits(Writable, Stream); + +function nop() {} + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~ ~this.highWaterMark; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + processNextTick(cb, er); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + // Always throw error if a null is written + // if we are not in object mode then throw + // if it is not a buffer, string, or undefined. + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + processNextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = bufferShim.from(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + + if (Buffer.isBuffer(chunk)) encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) processNextTick(cb, er);else cb(er); + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + while (entry) { + buffer[count] = entry; + entry = entry.next; + count += 1; + } + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequestCount = 0; + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} + +function prefinish(stream, state) { + if (!state.prefinished) { + state.prefinished = true; + stream.emit('prefinish'); + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + if (state.pendingcb === 0) { + prefinish(stream, state); + state.finished = true; + stream.emit('finish'); + } else { + prefinish(stream, state); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) processNextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + + this.finish = function (err) { + var entry = _this.entry; + _this.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = _this; + } else { + state.corkedRequestsFree = _this; + } + }; +} +}).call(this,require('_process')) +},{"./_stream_duplex":120,"_process":111,"buffer":49,"buffer-shims":47,"core-util-is":53,"events":87,"inherits":97,"process-nextick-args":110,"util-deprecate":141}],125:[function(require,module,exports){ +'use strict'; + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +module.exports = BufferList; + +function BufferList() { + this.head = null; + this.tail = null; + this.length = 0; +} + +BufferList.prototype.push = function (v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; +}; + +BufferList.prototype.unshift = function (v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; +}; + +BufferList.prototype.shift = function () { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; +}; + +BufferList.prototype.clear = function () { + this.head = this.tail = null; + this.length = 0; +}; + +BufferList.prototype.join = function (s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; +}; + +BufferList.prototype.concat = function (n) { + if (this.length === 0) return bufferShim.alloc(0); + if (this.length === 1) return this.head.data; + var ret = bufferShim.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + p.data.copy(ret, i); + i += p.data.length; + p = p.next; + } + return ret; +}; +},{"buffer":49,"buffer-shims":47}],126:[function(require,module,exports){ +module.exports = require("./lib/_stream_passthrough.js") + +},{"./lib/_stream_passthrough.js":121}],127:[function(require,module,exports){ +(function (process){ +var Stream = (function (){ + try { + return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify + } catch(_){} +}()); +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = Stream || exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); + +if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; +} + +}).call(this,require('_process')) +},{"./lib/_stream_duplex.js":120,"./lib/_stream_passthrough.js":121,"./lib/_stream_readable.js":122,"./lib/_stream_transform.js":123,"./lib/_stream_writable.js":124,"_process":111}],128:[function(require,module,exports){ +module.exports = require("./lib/_stream_transform.js") + +},{"./lib/_stream_transform.js":123}],129:[function(require,module,exports){ +module.exports = require("./lib/_stream_writable.js") + +},{"./lib/_stream_writable.js":124}],130:[function(require,module,exports){ +(function (Buffer){ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** @preserve +(c) 2012 by Cédric Mesnil. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// constants table +var zl = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 +] + +var zr = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 +] + +var sl = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 +] + +var sr = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 +] + +var hl = [0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E] +var hr = [0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000] + +function bytesToWords (bytes) { + var words = [] + for (var i = 0, b = 0; i < bytes.length; i++, b += 8) { + words[b >>> 5] |= bytes[i] << (24 - b % 32) + } + return words +} + +function wordsToBytes (words) { + var bytes = [] + for (var b = 0; b < words.length * 32; b += 8) { + bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF) + } + return bytes +} + +function processBlock (H, M, offset) { + // swap endian + for (var i = 0; i < 16; i++) { + var offset_i = offset + i + var M_offset_i = M[offset_i] + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ) + } + + // Working variables + var al, bl, cl, dl, el + var ar, br, cr, dr, er + + ar = al = H[0] + br = bl = H[1] + cr = cl = H[2] + dr = dl = H[3] + er = el = H[4] + + // computation + var t + for (i = 0; i < 80; i += 1) { + t = (al + M[offset + zl[i]]) | 0 + if (i < 16) { + t += f1(bl, cl, dl) + hl[0] + } else if (i < 32) { + t += f2(bl, cl, dl) + hl[1] + } else if (i < 48) { + t += f3(bl, cl, dl) + hl[2] + } else if (i < 64) { + t += f4(bl, cl, dl) + hl[3] + } else {// if (i<80) { + t += f5(bl, cl, dl) + hl[4] + } + t = t | 0 + t = rotl(t, sl[i]) + t = (t + el) | 0 + al = el + el = dl + dl = rotl(cl, 10) + cl = bl + bl = t + + t = (ar + M[offset + zr[i]]) | 0 + if (i < 16) { + t += f5(br, cr, dr) + hr[0] + } else if (i < 32) { + t += f4(br, cr, dr) + hr[1] + } else if (i < 48) { + t += f3(br, cr, dr) + hr[2] + } else if (i < 64) { + t += f2(br, cr, dr) + hr[3] + } else {// if (i<80) { + t += f1(br, cr, dr) + hr[4] + } + + t = t | 0 + t = rotl(t, sr[i]) + t = (t + er) | 0 + ar = er + er = dr + dr = rotl(cr, 10) + cr = br + br = t + } + + // intermediate hash value + t = (H[1] + cl + dr) | 0 + H[1] = (H[2] + dl + er) | 0 + H[2] = (H[3] + el + ar) | 0 + H[3] = (H[4] + al + br) | 0 + H[4] = (H[0] + bl + cr) | 0 + H[0] = t +} + +function f1 (x, y, z) { + return ((x) ^ (y) ^ (z)) +} + +function f2 (x, y, z) { + return (((x) & (y)) | ((~x) & (z))) +} + +function f3 (x, y, z) { + return (((x) | (~(y))) ^ (z)) +} + +function f4 (x, y, z) { + return (((x) & (z)) | ((y) & (~(z)))) +} + +function f5 (x, y, z) { + return ((x) ^ ((y) | (~(z)))) +} + +function rotl (x, n) { + return (x << n) | (x >>> (32 - n)) +} + +function ripemd160 (message) { + var H = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0] + + if (typeof message === 'string') { + message = new Buffer(message, 'utf8') + } + + var m = bytesToWords(message) + + var nBitsLeft = message.length * 8 + var nBitsTotal = message.length * 8 + + // Add padding + m[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32) + m[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ) + + for (var i = 0; i < m.length; i += 16) { + processBlock(H, m, i) + } + + // swap endian + for (i = 0; i < 5; i++) { + // shortcut + var H_i = H[i] + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00) + } + + var digestbytes = wordsToBytes(H) + return new Buffer(digestbytes) +} + +module.exports = ripemd160 + +}).call(this,require("buffer").Buffer) +},{"buffer":49}],131:[function(require,module,exports){ +(function (Buffer){ +// prototype class for hash functions +function Hash (blockSize, finalSize) { + this._block = new Buffer(blockSize) + this._finalSize = finalSize + this._blockSize = blockSize + this._len = 0 + this._s = 0 +} + +Hash.prototype.update = function (data, enc) { + if (typeof data === 'string') { + enc = enc || 'utf8' + data = new Buffer(data, enc) + } + + var l = this._len += data.length + var s = this._s || 0 + var f = 0 + var buffer = this._block + + while (s < l) { + var t = Math.min(data.length, f + this._blockSize - (s % this._blockSize)) + var ch = (t - f) + + for (var i = 0; i < ch; i++) { + buffer[(s % this._blockSize) + i] = data[i + f] + } + + s += ch + f += ch + + if ((s % this._blockSize) === 0) { + this._update(buffer) + } + } + this._s = s + + return this +} + +Hash.prototype.digest = function (enc) { + // Suppose the length of the message M, in bits, is l + var l = this._len * 8 + + // Append the bit 1 to the end of the message + this._block[this._len % this._blockSize] = 0x80 + + // and then k zero bits, where k is the smallest non-negative solution to the equation (l + 1 + k) === finalSize mod blockSize + this._block.fill(0, this._len % this._blockSize + 1) + + if (l % (this._blockSize * 8) >= this._finalSize * 8) { + this._update(this._block) + this._block.fill(0) + } + + // to this append the block which is equal to the number l written in binary + // TODO: handle case where l is > Math.pow(2, 29) + this._block.writeInt32BE(l, this._blockSize - 4) + + var hash = this._update(this._block) || this._hash() + + return enc ? hash.toString(enc) : hash +} + +Hash.prototype._update = function () { + throw new Error('_update must be implemented by subclass') +} + +module.exports = Hash + +}).call(this,require("buffer").Buffer) +},{"buffer":49}],132:[function(require,module,exports){ +var exports = module.exports = function SHA (algorithm) { + algorithm = algorithm.toLowerCase() + + var Algorithm = exports[algorithm] + if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)') + + return new Algorithm() +} + +exports.sha = require('./sha') +exports.sha1 = require('./sha1') +exports.sha224 = require('./sha224') +exports.sha256 = require('./sha256') +exports.sha384 = require('./sha384') +exports.sha512 = require('./sha512') + +},{"./sha":133,"./sha1":134,"./sha224":135,"./sha256":136,"./sha384":137,"./sha512":138}],133:[function(require,module,exports){ +(function (Buffer){ +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined + * in FIPS PUB 180-1 + * This source code is derived from sha1.js of the same repository. + * The difference between SHA-0 and SHA-1 is just a bitwise rotate left + * operation was added. + */ + +var inherits = require('inherits') +var Hash = require('./hash') + +var K = [ + 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 +] + +var W = new Array(80) + +function Sha () { + this.init() + this._w = W + + Hash.call(this, 64, 56) +} + +inherits(Sha, Hash) + +Sha.prototype.init = function () { + this._a = 0x67452301 + this._b = 0xefcdab89 + this._c = 0x98badcfe + this._d = 0x10325476 + this._e = 0xc3d2e1f0 + + return this +} + +function rotl5 (num) { + return (num << 5) | (num >>> 27) +} + +function rotl30 (num) { + return (num << 30) | (num >>> 2) +} + +function ft (s, b, c, d) { + if (s === 0) return (b & c) | ((~b) & d) + if (s === 2) return (b & c) | (b & d) | (c & d) + return b ^ c ^ d +} + +Sha.prototype._update = function (M) { + var W = this._w + + var a = this._a | 0 + var b = this._b | 0 + var c = this._c | 0 + var d = this._d | 0 + var e = this._e | 0 + + for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) + for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16] + + for (var j = 0; j < 80; ++j) { + var s = ~~(j / 20) + var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 + + e = d + d = c + c = rotl30(b) + b = a + a = t + } + + this._a = (a + this._a) | 0 + this._b = (b + this._b) | 0 + this._c = (c + this._c) | 0 + this._d = (d + this._d) | 0 + this._e = (e + this._e) | 0 +} + +Sha.prototype._hash = function () { + var H = new Buffer(20) + + H.writeInt32BE(this._a | 0, 0) + H.writeInt32BE(this._b | 0, 4) + H.writeInt32BE(this._c | 0, 8) + H.writeInt32BE(this._d | 0, 12) + H.writeInt32BE(this._e | 0, 16) + + return H +} + +module.exports = Sha + +}).call(this,require("buffer").Buffer) +},{"./hash":131,"buffer":49,"inherits":97}],134:[function(require,module,exports){ +(function (Buffer){ +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined + * in FIPS PUB 180-1 + * Version 2.1a Copyright Paul Johnston 2000 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for details. + */ + +var inherits = require('inherits') +var Hash = require('./hash') + +var K = [ + 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 +] + +var W = new Array(80) + +function Sha1 () { + this.init() + this._w = W + + Hash.call(this, 64, 56) +} + +inherits(Sha1, Hash) + +Sha1.prototype.init = function () { + this._a = 0x67452301 + this._b = 0xefcdab89 + this._c = 0x98badcfe + this._d = 0x10325476 + this._e = 0xc3d2e1f0 + + return this +} + +function rotl1 (num) { + return (num << 1) | (num >>> 31) +} + +function rotl5 (num) { + return (num << 5) | (num >>> 27) +} + +function rotl30 (num) { + return (num << 30) | (num >>> 2) +} + +function ft (s, b, c, d) { + if (s === 0) return (b & c) | ((~b) & d) + if (s === 2) return (b & c) | (b & d) | (c & d) + return b ^ c ^ d +} + +Sha1.prototype._update = function (M) { + var W = this._w + + var a = this._a | 0 + var b = this._b | 0 + var c = this._c | 0 + var d = this._d | 0 + var e = this._e | 0 + + for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) + for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]) + + for (var j = 0; j < 80; ++j) { + var s = ~~(j / 20) + var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 + + e = d + d = c + c = rotl30(b) + b = a + a = t + } + + this._a = (a + this._a) | 0 + this._b = (b + this._b) | 0 + this._c = (c + this._c) | 0 + this._d = (d + this._d) | 0 + this._e = (e + this._e) | 0 +} + +Sha1.prototype._hash = function () { + var H = new Buffer(20) + + H.writeInt32BE(this._a | 0, 0) + H.writeInt32BE(this._b | 0, 4) + H.writeInt32BE(this._c | 0, 8) + H.writeInt32BE(this._d | 0, 12) + H.writeInt32BE(this._e | 0, 16) + + return H +} + +module.exports = Sha1 + +}).call(this,require("buffer").Buffer) +},{"./hash":131,"buffer":49,"inherits":97}],135:[function(require,module,exports){ +(function (Buffer){ +/** + * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined + * in FIPS 180-2 + * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * + */ + +var inherits = require('inherits') +var Sha256 = require('./sha256') +var Hash = require('./hash') + +var W = new Array(64) + +function Sha224 () { + this.init() + + this._w = W // new Array(64) + + Hash.call(this, 64, 56) +} + +inherits(Sha224, Sha256) + +Sha224.prototype.init = function () { + this._a = 0xc1059ed8 + this._b = 0x367cd507 + this._c = 0x3070dd17 + this._d = 0xf70e5939 + this._e = 0xffc00b31 + this._f = 0x68581511 + this._g = 0x64f98fa7 + this._h = 0xbefa4fa4 + + return this +} + +Sha224.prototype._hash = function () { + var H = new Buffer(28) + + H.writeInt32BE(this._a, 0) + H.writeInt32BE(this._b, 4) + H.writeInt32BE(this._c, 8) + H.writeInt32BE(this._d, 12) + H.writeInt32BE(this._e, 16) + H.writeInt32BE(this._f, 20) + H.writeInt32BE(this._g, 24) + + return H +} + +module.exports = Sha224 + +}).call(this,require("buffer").Buffer) +},{"./hash":131,"./sha256":136,"buffer":49,"inherits":97}],136:[function(require,module,exports){ +(function (Buffer){ +/** + * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined + * in FIPS 180-2 + * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * + */ + +var inherits = require('inherits') +var Hash = require('./hash') + +var K = [ + 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, + 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, + 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, + 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, + 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, + 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, + 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, + 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, + 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, + 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, + 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, + 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, + 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, + 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, + 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, + 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 +] + +var W = new Array(64) + +function Sha256 () { + this.init() + + this._w = W // new Array(64) + + Hash.call(this, 64, 56) +} + +inherits(Sha256, Hash) + +Sha256.prototype.init = function () { + this._a = 0x6a09e667 + this._b = 0xbb67ae85 + this._c = 0x3c6ef372 + this._d = 0xa54ff53a + this._e = 0x510e527f + this._f = 0x9b05688c + this._g = 0x1f83d9ab + this._h = 0x5be0cd19 + + return this +} + +function ch (x, y, z) { + return z ^ (x & (y ^ z)) +} + +function maj (x, y, z) { + return (x & y) | (z & (x | y)) +} + +function sigma0 (x) { + return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10) +} + +function sigma1 (x) { + return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7) +} + +function gamma0 (x) { + return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3) +} + +function gamma1 (x) { + return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10) +} + +Sha256.prototype._update = function (M) { + var W = this._w + + var a = this._a | 0 + var b = this._b | 0 + var c = this._c | 0 + var d = this._d | 0 + var e = this._e | 0 + var f = this._f | 0 + var g = this._g | 0 + var h = this._h | 0 + + for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) + for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0 + + for (var j = 0; j < 64; ++j) { + var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0 + var T2 = (sigma0(a) + maj(a, b, c)) | 0 + + h = g + g = f + f = e + e = (d + T1) | 0 + d = c + c = b + b = a + a = (T1 + T2) | 0 + } + + this._a = (a + this._a) | 0 + this._b = (b + this._b) | 0 + this._c = (c + this._c) | 0 + this._d = (d + this._d) | 0 + this._e = (e + this._e) | 0 + this._f = (f + this._f) | 0 + this._g = (g + this._g) | 0 + this._h = (h + this._h) | 0 +} + +Sha256.prototype._hash = function () { + var H = new Buffer(32) + + H.writeInt32BE(this._a, 0) + H.writeInt32BE(this._b, 4) + H.writeInt32BE(this._c, 8) + H.writeInt32BE(this._d, 12) + H.writeInt32BE(this._e, 16) + H.writeInt32BE(this._f, 20) + H.writeInt32BE(this._g, 24) + H.writeInt32BE(this._h, 28) + + return H +} + +module.exports = Sha256 + +}).call(this,require("buffer").Buffer) +},{"./hash":131,"buffer":49,"inherits":97}],137:[function(require,module,exports){ +(function (Buffer){ +var inherits = require('inherits') +var SHA512 = require('./sha512') +var Hash = require('./hash') + +var W = new Array(160) + +function Sha384 () { + this.init() + this._w = W + + Hash.call(this, 128, 112) +} + +inherits(Sha384, SHA512) + +Sha384.prototype.init = function () { + this._ah = 0xcbbb9d5d + this._bh = 0x629a292a + this._ch = 0x9159015a + this._dh = 0x152fecd8 + this._eh = 0x67332667 + this._fh = 0x8eb44a87 + this._gh = 0xdb0c2e0d + this._hh = 0x47b5481d + + this._al = 0xc1059ed8 + this._bl = 0x367cd507 + this._cl = 0x3070dd17 + this._dl = 0xf70e5939 + this._el = 0xffc00b31 + this._fl = 0x68581511 + this._gl = 0x64f98fa7 + this._hl = 0xbefa4fa4 + + return this +} + +Sha384.prototype._hash = function () { + var H = new Buffer(48) + + function writeInt64BE (h, l, offset) { + H.writeInt32BE(h, offset) + H.writeInt32BE(l, offset + 4) + } + + writeInt64BE(this._ah, this._al, 0) + writeInt64BE(this._bh, this._bl, 8) + writeInt64BE(this._ch, this._cl, 16) + writeInt64BE(this._dh, this._dl, 24) + writeInt64BE(this._eh, this._el, 32) + writeInt64BE(this._fh, this._fl, 40) + + return H +} + +module.exports = Sha384 + +}).call(this,require("buffer").Buffer) +},{"./hash":131,"./sha512":138,"buffer":49,"inherits":97}],138:[function(require,module,exports){ +(function (Buffer){ +var inherits = require('inherits') +var Hash = require('./hash') + +var K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +] + +var W = new Array(160) + +function Sha512 () { + this.init() + this._w = W + + Hash.call(this, 128, 112) +} + +inherits(Sha512, Hash) + +Sha512.prototype.init = function () { + this._ah = 0x6a09e667 + this._bh = 0xbb67ae85 + this._ch = 0x3c6ef372 + this._dh = 0xa54ff53a + this._eh = 0x510e527f + this._fh = 0x9b05688c + this._gh = 0x1f83d9ab + this._hh = 0x5be0cd19 + + this._al = 0xf3bcc908 + this._bl = 0x84caa73b + this._cl = 0xfe94f82b + this._dl = 0x5f1d36f1 + this._el = 0xade682d1 + this._fl = 0x2b3e6c1f + this._gl = 0xfb41bd6b + this._hl = 0x137e2179 + + return this +} + +function Ch (x, y, z) { + return z ^ (x & (y ^ z)) +} + +function maj (x, y, z) { + return (x & y) | (z & (x | y)) +} + +function sigma0 (x, xl) { + return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25) +} + +function sigma1 (x, xl) { + return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23) +} + +function Gamma0 (x, xl) { + return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7) +} + +function Gamma0l (x, xl) { + return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25) +} + +function Gamma1 (x, xl) { + return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6) +} + +function Gamma1l (x, xl) { + return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26) +} + +function getCarry (a, b) { + return (a >>> 0) < (b >>> 0) ? 1 : 0 +} + +Sha512.prototype._update = function (M) { + var W = this._w + + var ah = this._ah | 0 + var bh = this._bh | 0 + var ch = this._ch | 0 + var dh = this._dh | 0 + var eh = this._eh | 0 + var fh = this._fh | 0 + var gh = this._gh | 0 + var hh = this._hh | 0 + + var al = this._al | 0 + var bl = this._bl | 0 + var cl = this._cl | 0 + var dl = this._dl | 0 + var el = this._el | 0 + var fl = this._fl | 0 + var gl = this._gl | 0 + var hl = this._hl | 0 + + for (var i = 0; i < 32; i += 2) { + W[i] = M.readInt32BE(i * 4) + W[i + 1] = M.readInt32BE(i * 4 + 4) + } + for (; i < 160; i += 2) { + var xh = W[i - 15 * 2] + var xl = W[i - 15 * 2 + 1] + var gamma0 = Gamma0(xh, xl) + var gamma0l = Gamma0l(xl, xh) + + xh = W[i - 2 * 2] + xl = W[i - 2 * 2 + 1] + var gamma1 = Gamma1(xh, xl) + var gamma1l = Gamma1l(xl, xh) + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7h = W[i - 7 * 2] + var Wi7l = W[i - 7 * 2 + 1] + + var Wi16h = W[i - 16 * 2] + var Wi16l = W[i - 16 * 2 + 1] + + var Wil = (gamma0l + Wi7l) | 0 + var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0 + Wil = (Wil + gamma1l) | 0 + Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0 + Wil = (Wil + Wi16l) | 0 + Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0 + + W[i] = Wih + W[i + 1] = Wil + } + + for (var j = 0; j < 160; j += 2) { + Wih = W[j] + Wil = W[j + 1] + + var majh = maj(ah, bh, ch) + var majl = maj(al, bl, cl) + + var sigma0h = sigma0(ah, al) + var sigma0l = sigma0(al, ah) + var sigma1h = sigma1(eh, el) + var sigma1l = sigma1(el, eh) + + // t1 = h + sigma1 + ch + K[j] + W[j] + var Kih = K[j] + var Kil = K[j + 1] + + var chh = Ch(eh, fh, gh) + var chl = Ch(el, fl, gl) + + var t1l = (hl + sigma1l) | 0 + var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0 + t1l = (t1l + chl) | 0 + t1h = (t1h + chh + getCarry(t1l, chl)) | 0 + t1l = (t1l + Kil) | 0 + t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0 + t1l = (t1l + Wil) | 0 + t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0 + + // t2 = sigma0 + maj + var t2l = (sigma0l + majl) | 0 + var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0 + + hh = gh + hl = gl + gh = fh + gl = fl + fh = eh + fl = el + el = (dl + t1l) | 0 + eh = (dh + t1h + getCarry(el, dl)) | 0 + dh = ch + dl = cl + ch = bh + cl = bl + bh = ah + bl = al + al = (t1l + t2l) | 0 + ah = (t1h + t2h + getCarry(al, t1l)) | 0 + } + + this._al = (this._al + al) | 0 + this._bl = (this._bl + bl) | 0 + this._cl = (this._cl + cl) | 0 + this._dl = (this._dl + dl) | 0 + this._el = (this._el + el) | 0 + this._fl = (this._fl + fl) | 0 + this._gl = (this._gl + gl) | 0 + this._hl = (this._hl + hl) | 0 + + this._ah = (this._ah + ah + getCarry(this._al, al)) | 0 + this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0 + this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0 + this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0 + this._eh = (this._eh + eh + getCarry(this._el, el)) | 0 + this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0 + this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0 + this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0 +} + +Sha512.prototype._hash = function () { + var H = new Buffer(64) + + function writeInt64BE (h, l, offset) { + H.writeInt32BE(h, offset) + H.writeInt32BE(l, offset + 4) + } + + writeInt64BE(this._ah, this._al, 0) + writeInt64BE(this._bh, this._bl, 8) + writeInt64BE(this._ch, this._cl, 16) + writeInt64BE(this._dh, this._dl, 24) + writeInt64BE(this._eh, this._el, 32) + writeInt64BE(this._fh, this._fl, 40) + writeInt64BE(this._gh, this._gl, 48) + writeInt64BE(this._hh, this._hl, 56) + + return H +} + +module.exports = Sha512 + +}).call(this,require("buffer").Buffer) +},{"./hash":131,"buffer":49,"inherits":97}],139:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +module.exports = Stream; + +var EE = require('events').EventEmitter; +var inherits = require('inherits'); + +inherits(Stream, EE); +Stream.Readable = require('readable-stream/readable.js'); +Stream.Writable = require('readable-stream/writable.js'); +Stream.Duplex = require('readable-stream/duplex.js'); +Stream.Transform = require('readable-stream/transform.js'); +Stream.PassThrough = require('readable-stream/passthrough.js'); + +// Backwards-compat with node 0.4.x +Stream.Stream = Stream; + + + +// old-style streams. Note that the pipe method (the only relevant +// part of this class) is overridden in the Readable class. + +function Stream() { + EE.call(this); +} + +Stream.prototype.pipe = function(dest, options) { + var source = this; + + function ondata(chunk) { + if (dest.writable) { + if (false === dest.write(chunk) && source.pause) { + source.pause(); + } + } + } + + source.on('data', ondata); + + function ondrain() { + if (source.readable && source.resume) { + source.resume(); + } + } + + dest.on('drain', ondrain); + + // If the 'end' option is not supplied, dest.end() will be called when + // source gets the 'end' or 'close' events. Only dest.end() once. + if (!dest._isStdio && (!options || options.end !== false)) { + source.on('end', onend); + source.on('close', onclose); + } + + var didOnEnd = false; + function onend() { + if (didOnEnd) return; + didOnEnd = true; + + dest.end(); + } + + + function onclose() { + if (didOnEnd) return; + didOnEnd = true; - function validatePrivKey(privKey) { - if (privKey === undefined || !(privKey instanceof ArrayBuffer) || privKey.byteLength != 32) { - throw new Error("Invalid private key"); - } - } - function validatePubKeyFormat(pubKey) { - if (pubKey === undefined || ((pubKey.byteLength != 33 || new Uint8Array(pubKey)[0] != 5) && pubKey.byteLength != 32)) { - throw new Error("Invalid public key"); - } - if (pubKey.byteLength == 33) { - return pubKey.slice(1); - } else { - console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"); - return pubKey; - } + if (typeof dest.destroy === 'function') dest.destroy(); + } + + // don't leave dangling pipes when there are errors. + function onerror(er) { + cleanup(); + if (EE.listenerCount(this, 'error') === 0) { + throw er; // Unhandled stream error in pipe. } + } - function processKeys(raw_keys) { - // prepend version byte - var origPub = new Uint8Array(raw_keys.pubKey); - var pub = new Uint8Array(33); - pub.set(origPub, 1); - pub[0] = 5; + source.on('error', onerror); + dest.on('error', onerror); - return { pubKey: pub.buffer, privKey: raw_keys.privKey }; - } + // remove all the event listeners that were added. + function cleanup() { + source.removeListener('data', ondata); + dest.removeListener('drain', ondrain); - function wrapCurve25519(curve25519) { - return { - // Curve 25519 crypto - createKeyPair: function(privKey) { - validatePrivKey(privKey); - var raw_keys = curve25519.keyPair(privKey); - if (raw_keys instanceof Promise) { - return raw_keys.then(processKeys); - } else { - return processKeys(raw_keys); - } - }, - ECDHE: function(pubKey, privKey) { - pubKey = validatePubKeyFormat(pubKey); - validatePrivKey(privKey); + source.removeListener('end', onend); + source.removeListener('close', onclose); - if (pubKey === undefined || pubKey.byteLength != 32) { - throw new Error("Invalid public key"); - } + source.removeListener('error', onerror); + dest.removeListener('error', onerror); - return curve25519.sharedSecret(pubKey, privKey); - }, - Ed25519Sign: function(privKey, message) { - validatePrivKey(privKey); + source.removeListener('end', cleanup); + source.removeListener('close', cleanup); - if (message === undefined) { - throw new Error("Invalid message"); - } + dest.removeListener('close', cleanup); + } - return curve25519.sign(privKey, message); - }, - Ed25519Verify: function(pubKey, msg, sig) { - pubKey = validatePubKeyFormat(pubKey); + source.on('end', cleanup); + source.on('close', cleanup); - if (pubKey === undefined || pubKey.byteLength != 32) { - throw new Error("Invalid public key"); - } + dest.on('close', cleanup); - if (msg === undefined) { - throw new Error("Invalid message"); - } + dest.emit('pipe', source); - if (sig === undefined || sig.byteLength != 64) { - throw new Error("Invalid signature"); - } + // Allow for unix-like usage: A.pipe(B).pipe(C) + return dest; +}; - return curve25519.verify(pubKey, msg, sig); - } - }; +},{"events":87,"inherits":97,"readable-stream/duplex.js":119,"readable-stream/passthrough.js":126,"readable-stream/readable.js":127,"readable-stream/transform.js":128,"readable-stream/writable.js":129}],140:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Buffer = require('buffer').Buffer; + +var isBufferEncoding = Buffer.isEncoding + || function(encoding) { + switch (encoding && encoding.toLowerCase()) { + case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; + default: return false; + } + } + + +function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). + this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. + this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. + this.charLength = 0; +}; + + +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var available = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; } - Internal.Curve = wrapCurve25519(Internal.curve25519); - Internal.Curve.async = wrapCurve25519(Internal.curve25519_async); + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); - function wrapCurve(curve) { - return { - generateKeyPair: function() { - var privKey = Internal.crypto.getRandomBytes(32); - return curve.createKeyPair(privKey); - }, - createKeyPair: function(privKey) { - return curve.createKeyPair(privKey); - }, - calculateAgreement: function(pubKey, privKey) { - return curve.ECDHE(pubKey, privKey); - }, - verifySignature: function(pubKey, msg, sig) { - return curve.Ed25519Verify(pubKey, msg, sig); - }, - calculateSignature: function(privKey, message) { - return curve.Ed25519Sign(privKey, message); - } - }; + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; } + this.charReceived = this.charLength = 0; - libsignal.Curve = wrapCurve(Internal.Curve); - libsignal.Curve.async = wrapCurve(Internal.Curve.async); + // if there are no more bytes in this buffer, just emit our char + if (buffer.length === 0) { + return charStr; + } + break; + } -})(); + // determine and set charLength / charReceived + this.detectIncompleteChar(buffer); -/* - * vim: ts=4:sw=4 - */ + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; + } -var Internal = Internal || {}; + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + buffer.copy(this.charBuffer, 0, 0, size); + return charStr.substring(0, end); + } -(function() { - 'use strict'; + // or just emit the charStr + return charStr; +}; - var crypto = window.crypto; +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; - if (!crypto || !crypto.subtle || typeof crypto.getRandomValues !== 'function') { - throw new Error('WebCrypto not found'); - } + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; - Internal.crypto = { - getRandomBytes: function(size) { - var array = new Uint8Array(size); - crypto.getRandomValues(array); - return array.buffer; - }, - encrypt: function(key, data, iv) { - return crypto.subtle.importKey('raw', key, {name: 'AES-CBC'}, false, ['encrypt']).then(function(key) { - return crypto.subtle.encrypt({name: 'AES-CBC', iv: new Uint8Array(iv)}, key, data); - }); - }, - decrypt: function(key, data, iv) { - return crypto.subtle.importKey('raw', key, {name: 'AES-CBC'}, false, ['decrypt']).then(function(key) { - return crypto.subtle.decrypt({name: 'AES-CBC', iv: new Uint8Array(iv)}, key, data); - }); - }, - sign: function(key, data) { - return crypto.subtle.importKey('raw', key, {name: 'HMAC', hash: {name: 'SHA-256'}}, false, ['sign']).then(function(key) { - return crypto.subtle.sign( {name: 'HMAC', hash: 'SHA-256'}, key, data); - }); - }, + // See http://en.wikipedia.org/wiki/UTF-8#Description - hash: function(data) { - return crypto.subtle.digest({name: 'SHA-512'}, data); - }, + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } - HKDF: function(input, salt, info) { - // Specific implementation of RFC 5869 that only returns the first 3 32-byte chunks - // TODO: We dont always need the third chunk, we might skip it - return Internal.crypto.sign(salt, input).then(function(PRK) { - var infoBuffer = new ArrayBuffer(info.byteLength + 1 + 32); - var infoArray = new Uint8Array(infoBuffer); - infoArray.set(new Uint8Array(info), 32); - infoArray[infoArray.length - 1] = 1; - return Internal.crypto.sign(PRK, infoBuffer.slice(32)).then(function(T1) { - infoArray.set(new Uint8Array(T1)); - infoArray[infoArray.length - 1] = 2; - return Internal.crypto.sign(PRK, infoBuffer).then(function(T2) { - infoArray.set(new Uint8Array(T2)); - infoArray[infoArray.length - 1] = 3; - return Internal.crypto.sign(PRK, infoBuffer).then(function(T3) { - return [ T1, T2, T3 ]; - }); - }); - }); - }); - }, + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } - // Curve 25519 crypto - createKeyPair: function(privKey) { - if (privKey === undefined) { - privKey = Internal.crypto.getRandomBytes(32); - } - return Internal.Curve.async.createKeyPair(privKey); - }, - ECDHE: function(pubKey, privKey) { - return Internal.Curve.async.ECDHE(pubKey, privKey); - }, - Ed25519Sign: function(privKey, message) { - return Internal.Curve.async.Ed25519Sign(privKey, message); - }, - Ed25519Verify: function(pubKey, msg, sig) { - return Internal.Curve.async.Ed25519Verify(pubKey, msg, sig); - } - }; + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + this.charReceived = i; +}; +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); - // HKDF for TextSecure has a bit of additional handling - salts always end up being 32 bytes - Internal.HKDF = function(input, salt, info) { - if (salt.byteLength != 32) { - throw new Error("Got salt of incorrect length"); - } + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } - return Internal.crypto.HKDF(input, salt, util.toArrayBuffer(info)); - }; + return res; +}; - Internal.verifyMAC = function(data, key, mac, length) { - return Internal.crypto.sign(key, data).then(function(calculated_mac) { - if (mac.byteLength != length || calculated_mac.byteLength < length) { - throw new Error("Bad MAC length"); - } - var a = new Uint8Array(calculated_mac); - var b = new Uint8Array(mac); - var result = 0; - for (var i=0; i < mac.byteLength; ++i) { - result = result | (a[i] ^ b[i]); - } - if (result !== 0) { - console.log('Our MAC ', dcodeIO.ByteBuffer.wrap(calculated_mac).toHex()); - console.log('Their MAC', dcodeIO.ByteBuffer.wrap(mac).toHex()); - throw new Error("Bad MAC"); - } - }); - }; +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} - libsignal.HKDF = { - deriveSecrets: function(input, salt, info) { - return Internal.HKDF(input, salt, info); - } - }; +function utf16DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; +} - libsignal.crypto = { - encrypt: function(key, data, iv) { - return Internal.crypto.encrypt(key, data, iv); - }, - decrypt: function(key, data, iv) { - return Internal.crypto.decrypt(key, data, iv); - }, - calculateMAC: function(key, data) { - return Internal.crypto.sign(key, data); - }, - verifyMAC: function(data, key, mac, length) { - return Internal.verifyMAC(data, key, mac, length); - }, - getRandomBytes: function(size) { - return Internal.crypto.getRandomBytes(size); - } - }; +function base64DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; +} -})(); +},{"buffer":49}],141:[function(require,module,exports){ +(function (global){ -/* - * vim: ts=4:sw=4 +/** + * Module exports. */ -var util = (function() { - 'use strict'; +module.exports = deprecate; - var StaticArrayBufferProto = new ArrayBuffer().__proto__; +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ - return { - toString: function(thing) { - if (typeof thing == 'string') { - return thing; - } - return new dcodeIO.ByteBuffer.wrap(thing).toString('binary'); - }, - toArrayBuffer: function(thing) { - if (thing === undefined) { - return undefined; - } - if (thing === Object(thing)) { - if (thing.__proto__ == StaticArrayBufferProto) { - return thing; - } - } +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } - var str; - if (typeof thing == "string") { - str = thing; - } else { - throw new Error("Tried to convert a non-string of type " + typeof thing + " to an array buffer"); - } - return new dcodeIO.ByteBuffer.wrap(thing, 'binary').toArrayBuffer(); - }, - isEqual: function(a, b) { - // TODO: Special-case arraybuffers, etc - if (a === undefined || b === undefined) { - return false; - } - a = util.toString(a); - b = util.toString(b); - var maxLength = Math.max(a.length, b.length); - if (maxLength < 5) { - throw new Error("a/b compare too short"); - } - return a.substring(0, Math.min(maxLength, a.length)) == b.substring(0, Math.min(maxLength, b.length)); - } - }; -})(); + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } -function isNonNegativeInteger(n) { - return (typeof n === 'number' && (n % 1) === 0 && n >= 0); + return deprecated; } -var KeyHelper = { - generateIdentityKeyPair: function() { - return Internal.crypto.createKeyPair(); - }, - - generateRegistrationId: function() { - var registrationId = new Uint16Array(Internal.crypto.getRandomBytes(2))[0]; - return registrationId & 0x3fff; - }, +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ - generateSignedPreKey: function (identityKeyPair, signedKeyId) { - if (!(identityKeyPair.privKey instanceof ArrayBuffer) || - identityKeyPair.privKey.byteLength != 32 || - !(identityKeyPair.pubKey instanceof ArrayBuffer) || - identityKeyPair.pubKey.byteLength != 33) { - throw new TypeError('Invalid argument for identityKeyPair'); - } - if (!isNonNegativeInteger(signedKeyId)) { - throw new TypeError( - 'Invalid argument for signedKeyId: ' + signedKeyId - ); - } +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} - return Internal.crypto.createKeyPair().then(function(keyPair) { - return Internal.crypto.Ed25519Sign(identityKeyPair.privKey, keyPair.pubKey).then(function(sig) { - return { - keyId : signedKeyId, - keyPair : keyPair, - signature : sig - }; - }); - }); - }, +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],142:[function(require,module,exports){ +var indexOf = require('indexof'); - generatePreKey: function(keyId) { - if (!isNonNegativeInteger(keyId)) { - throw new TypeError('Invalid argument for keyId: ' + keyId); - } +var Object_keys = function (obj) { + if (Object.keys) return Object.keys(obj) + else { + var res = []; + for (var key in obj) res.push(key) + return res; + } +}; - return Internal.crypto.createKeyPair().then(function(keyPair) { - return { keyId: keyId, keyPair: keyPair }; - }); +var forEach = function (xs, fn) { + if (xs.forEach) return xs.forEach(fn) + else for (var i = 0; i < xs.length; i++) { + fn(xs[i], i, xs); } }; -libsignal.KeyHelper = KeyHelper; +var defineProp = (function() { + try { + Object.defineProperty({}, '_', {}); + return function(obj, name, value) { + Object.defineProperty(obj, name, { + writable: true, + enumerable: false, + configurable: true, + value: value + }) + }; + } catch(e) { + return function(obj, name, value) { + obj[name] = value; + }; + } +}()); + +var globals = ['Array', 'Boolean', 'Date', 'Error', 'EvalError', 'Function', +'Infinity', 'JSON', 'Math', 'NaN', 'Number', 'Object', 'RangeError', +'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError', +'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape', +'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape']; -var Internal = Internal || {}; +function Context() {} +Context.prototype = {}; -Internal.protoText = function() { - var protoText = {}; +var Script = exports.Script = function NodeScript (code) { + if (!(this instanceof Script)) return new Script(code); + this.code = code; +}; - protoText['protos/WhisperTextProtocol.proto'] = - 'package textsecure;\n' + - 'option java_package = "org.whispersystems.libsignal.protocol";\n' + - 'option java_outer_classname = "WhisperProtos";\n' + - 'message WhisperMessage {\n' + - ' optional bytes ephemeralKey = 1;\n' + - ' optional uint32 counter = 2;\n' + - ' optional uint32 previousCounter = 3;\n' + - ' optional bytes ciphertext = 4; // PushMessageContent\n' + - '}\n' + - 'message PreKeyWhisperMessage {\n' + - ' optional uint32 registrationId = 5;\n' + - ' optional uint32 preKeyId = 1;\n' + - ' optional uint32 signedPreKeyId = 6;\n' + - ' optional bytes baseKey = 2;\n' + - ' optional bytes identityKey = 3;\n' + - ' optional bytes message = 4; // WhisperMessage\n' + - '}\n' + - 'message KeyExchangeMessage {\n' + - ' optional uint32 id = 1;\n' + - ' optional bytes baseKey = 2;\n' + - ' optional bytes ephemeralKey = 3;\n' + - ' optional bytes identityKey = 4;\n' + - ' optional bytes baseKeySignature = 5;\n' + - '}\n' + -'' ; +Script.prototype.runInContext = function (context) { + if (!(context instanceof Context)) { + throw new TypeError("needs a 'context' argument."); + } + + var iframe = document.createElement('iframe'); + if (!iframe.style) iframe.style = {}; + iframe.style.display = 'none'; + + document.body.appendChild(iframe); + + var win = iframe.contentWindow; + var wEval = win.eval, wExecScript = win.execScript; + + if (!wEval && wExecScript) { + // win.eval() magically appears when this is called in IE: + wExecScript.call(win, 'null'); + wEval = win.eval; + } + + forEach(Object_keys(context), function (key) { + win[key] = context[key]; + }); + forEach(globals, function (key) { + if (context[key]) { + win[key] = context[key]; + } + }); + + var winKeys = Object_keys(win); + + var res = wEval.call(win, this.code); + + forEach(Object_keys(win), function (key) { + // Avoid copying circular objects like `top` and `window` by only + // updating existing context properties or new properties in the `win` + // that was only introduced after the eval. + if (key in context || indexOf(winKeys, key) === -1) { + context[key] = win[key]; + } + }); - return protoText; -}(); -/* vim: ts=4:sw=4 */ -var Internal = Internal || {}; + forEach(globals, function (key) { + if (!(key in context)) { + defineProp(context, key, win[key]); + } + }); + + document.body.removeChild(iframe); + + return res; +}; -Internal.protobuf = function() { - 'use strict'; +Script.prototype.runInThisContext = function () { + return eval(this.code); // maybe... +}; - function loadProtoBufs(filename) { - return dcodeIO.ProtoBuf.loadProto(Internal.protoText['protos/' + filename]).build('textsecure'); - } +Script.prototype.runInNewContext = function (context) { + var ctx = Script.createContext(context); + var res = this.runInContext(ctx); - var protocolMessages = loadProtoBufs('WhisperTextProtocol.proto'); + forEach(Object_keys(ctx), function (key) { + context[key] = ctx[key]; + }); - return { - WhisperMessage : protocolMessages.WhisperMessage, - PreKeyWhisperMessage : protocolMessages.PreKeyWhisperMessage + return res; +}; + +forEach(Object_keys(Script.prototype), function (name) { + exports[name] = Script[name] = function (code) { + var s = Script(code); + return s[name].apply(s, [].slice.call(arguments, 1)); }; -}(); +}); -/* - * vim: ts=4:sw=4 - */ +exports.createScript = function (code) { + return exports.Script(code); +}; -var Internal = Internal || {}; +exports.createContext = Script.createContext = function (context) { + var copy = new Context(); + if(typeof context === 'object') { + forEach(Object_keys(context), function (key) { + copy[key] = context[key]; + }); + } + return copy; +}; -Internal.BaseKeyType = { +},{"indexof":96}],143:[function(require,module,exports){ +var BaseKeyType = { OURS: 1, THEIRS: 2 }; -Internal.ChainType = { + +module.exports = BaseKeyType; + +},{}],144:[function(require,module,exports){ +var ChainType = { SENDING: 1, RECEIVING: 2 }; -var ARCHIVED_STATES_MAX_LENGTH = 40; +module.exports = ChainType; -Internal.SessionRecord = function() { - 'use strict'; - var MESSAGE_LOST_THRESHOLD_MS = 1000*60*60*24*7; +},{}],145:[function(require,module,exports){ +'use strict'; - var StaticByteBufferProto = new dcodeIO.ByteBuffer().__proto__; - var StaticArrayBufferProto = new ArrayBuffer().__proto__; - var StaticUint8ArrayProto = new Uint8Array().__proto__; +var Crypto = require('crypto'); +var CurveWrapper = require('./curve25519_wrapper.js'); - function isStringable(thing) { - return (thing === Object(thing) && - (thing.__proto__ == StaticArrayBufferProto || - thing.__proto__ == StaticUint8ArrayProto || - thing.__proto__ == StaticByteBufferProto)); - } - function ensureStringed(thing) { - if (typeof thing == "string" || typeof thing == "number" || typeof thing == "boolean") { - return thing; - } else if (isStringable(thing)) { - return util.toString(thing); - } else if (thing instanceof Array) { - var array = []; - for (var i = 0; i < thing.length; i++) { - array[i] = ensureStringed(thing[i]); - } - return array; - } else if (thing === Object(thing)) { - var obj = {}; - for (var key in thing) { - obj[key] = ensureStringed(thing[key]); - } - return obj; - } else if (thing === null) { - return null; - } else { - throw new Error("unsure of how to jsonify object of type " + typeof thing); - } - } +function validatePrivKey(privKey) { + if (privKey === undefined || !(privKey instanceof ArrayBuffer) || privKey.byteLength != 32) { + throw new Error("Invalid private key"); + } +} - function jsonThing(thing) { - return JSON.stringify(ensureStringed(thing)); //TODO: jquery??? - } +function validatePubKeyFormat(pubKey) { + if (pubKey === undefined || ((pubKey.byteLength != 33 || new Uint8Array(pubKey)[0] != 5) && pubKey.byteLength != 32)) { + throw new Error("Invalid public key"); + } + if (pubKey.byteLength == 33) { + return pubKey.slice(1); + } else { + console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"); + return pubKey; + } +} - var SessionRecord = function(identityKey, registrationId) { - this._sessions = {}; - identityKey = util.toString(identityKey); - if (typeof identityKey !== 'string') { - throw new Error('SessionRecord: Invalid identityKey'); - } - this.identityKey = identityKey; - this.registrationId = registrationId; +function processKeys(raw_keys) { + // prepend version byte + var origPub = new Uint8Array(raw_keys.pubKey); + var pub = new Uint8Array(33); + pub.set(origPub, 1); + pub[0] = 5; - if (this.registrationId === undefined || typeof this.registrationId !== 'number') { - this.registrationId = null; - } - }; + return { pubKey: pub.buffer, privKey: raw_keys.privKey }; +} - SessionRecord.deserialize = function(serialized) { - var data = JSON.parse(serialized); - var record = new SessionRecord(data.identityKey, data.registrationId); - record._sessions = data.sessions; - if (record._sessions === undefined || record._sessions === null || typeof record._sessions !== "object" || Array.isArray(record._sessions)) { - throw new Error("Error deserializing SessionRecord"); - } - if (record.identityKey === undefined || record.registrationId === undefined) { - throw new Error("Error deserializing SessionRecord"); - } - return record; - }; +function wrapCurve25519(curve25519) { + return { + // Curve 25519 crypto + createKeyPair: function(privKey) { + validatePrivKey(privKey); + var raw_keys = curve25519.keyPair(privKey); + if (raw_keys instanceof Promise) { + return raw_keys.then(processKeys); + } else { + return processKeys(raw_keys); + } + }, + ECDHE: function(pubKey, privKey) { + pubKey = validatePubKeyFormat(pubKey); + validatePrivKey(privKey); - SessionRecord.prototype = { - serialize: function() { - return jsonThing({ - sessions : this._sessions, - registrationId : this.registrationId, - identityKey : this.identityKey - }); - }, - haveOpenSession: function() { - return this.registrationId !== null; - }, + if (pubKey === undefined || pubKey.byteLength != 32) { + throw new Error("Invalid public key"); + } - getSessionByBaseKey: function(baseKey) { - var session = this._sessions[util.toString(baseKey)]; - if (session && session.indexInfo.baseKeyType === Internal.BaseKeyType.OURS) { - console.log("Tried to lookup a session using our basekey"); - return undefined; - } - return session; - }, - getSessionByRemoteEphemeralKey: function(remoteEphemeralKey) { - this.detectDuplicateOpenSessions(); - var sessions = this._sessions; + return curve25519.sharedSecret(pubKey, privKey); + }, + Ed25519Sign: function(privKey, message) { + validatePrivKey(privKey); - var searchKey = util.toString(remoteEphemeralKey); + if (message === undefined) { + throw new Error("Invalid message"); + } - var openSession; - for (var key in sessions) { - if (sessions[key].indexInfo.closed == -1) { - openSession = sessions[key]; - } - if (sessions[key][searchKey] !== undefined) { - return sessions[key]; - } - } - if (openSession !== undefined) { - return openSession; - } + return curve25519.sign(privKey, message); + }, + Ed25519Verify: function(pubKey, msg, sig) { + pubKey = validatePubKeyFormat(pubKey); - return undefined; - }, - getOpenSession: function() { - var sessions = this._sessions; - if (sessions === undefined) { - return undefined; - } + if (pubKey === undefined || pubKey.byteLength != 32) { + throw new Error("Invalid public key"); + } - this.detectDuplicateOpenSessions(); + if (msg === undefined) { + throw new Error("Invalid message"); + } - for (var key in sessions) { - if (sessions[key].indexInfo.closed == -1) { - return sessions[key]; - } - } - return undefined; - }, - detectDuplicateOpenSessions: function() { - var openSession; - var sessions = this._sessions; - for (var key in sessions) { - if (sessions[key].indexInfo.closed == -1) { - if (openSession !== undefined) { - throw new Error("Datastore inconsistensy: multiple open sessions"); - } - openSession = sessions[key]; - } - } - }, - updateSessionState: function(session, registrationId) { - var sessions = this._sessions; + if (sig === undefined || sig.byteLength != 64) { + throw new Error("Invalid signature"); + } - this.removeOldChains(session); + return curve25519.verify(pubKey, msg, sig); + } + }; +} - if (this.identityKey === null) { - this.identityKey = session.indexInfo.remoteIdentityKey; - } - if (util.toString(this.identityKey) !== util.toString(session.indexInfo.remoteIdentityKey)) { - var e = new Error("Identity key changed at session save time"); - e.identityKey = session.indexInfo.remoteIdentityKey.toArrayBuffer(); - throw e; - } +function wrapCurve(curve) { + return { + generateKeyPair: function() { + var privKey = Crypto.crypto.getRandomBytes(32); + return curve.createKeyPair(privKey); + }, + createKeyPair: function(privKey) { + return curve.createKeyPair(privKey); + }, + calculateAgreement: function(pubKey, privKey) { + return curve.ECDHE(pubKey, privKey); + }, + verifySignature: function(pubKey, msg, sig) { + return curve.Ed25519Verify(pubKey, msg, sig); + }, + calculateSignature: function(privKey, message) { + return curve.Ed25519Sign(privKey, message); + } + }; +} - sessions[util.toString(session.indexInfo.baseKey)] = session; +var curve = wrapCurve25519(CurveWrapper.curve25519); +var async = wrapCurve25519(CurveWrapper.curve25519_async); +var libsignal_Curve = wrapCurve(curve); +var libsignal_Curve_async = wrapCurve(async); - this.removeOldSessions(); +module.exports = { + Curve: curve, + async: async, + libsignal_Curve: libsignal_Curve, + libsignal_Curve_async: libsignal_Curve_async +}; - var openSessionRemaining = false; - for (var key in sessions) { - if (sessions[key].indexInfo.closed == -1) { - openSessionRemaining = true; - } - } - if (!openSessionRemaining) { // Used as a flag to get new pre keys for the next session - this.registrationId = null; - } else if (this.registrationId === null && registrationId !== undefined) { - this.registrationId = registrationId; - } else if (this.registrationId === null) { - throw new Error("Had open sessions on a record that had no registrationId set"); - } - }, - getSessions: function() { - // return an array of sessions ordered by time closed, - // followed by the open session - var list = []; - var openSession; - for (var k in this._sessions) { - if (this._sessions[k].indexInfo.closed === -1) { - openSession = this._sessions[k]; - } else { - list.push(this._sessions[k]); - } - } - list = list.sort(function(s1, s2) { - return s1.indexInfo.closed - s2.indexInfo.closed; +},{"./curve25519_wrapper.js":154,"crypto":59}],146:[function(require,module,exports){ +var Crypto = require('./crypto.js'); + +function isNonNegativeInteger(n) { + return (typeof n === 'number' && (n % 1) === 0 && n >= 0); +} + +var KeyHelper = { + generateIdentityKeyPair: function() { + return Crypto.crypto.createKeyPair(); + }, + + generateRegistrationId: function() { + var registrationId = new Uint16Array(Crypto.crypto.getRandomBytes(2))[0]; + return registrationId & 0x3fff; + }, + + generateSignedPreKey: function (identityKeyPair, signedKeyId) { + if (!(identityKeyPair.privKey instanceof ArrayBuffer) || + identityKeyPair.privKey.byteLength != 32 || + !(identityKeyPair.pubKey instanceof ArrayBuffer) || + identityKeyPair.pubKey.byteLength != 33) { + throw new TypeError('Invalid argument for identityKeyPair'); + } + if (!isNonNegativeInteger(signedKeyId)) { + throw new TypeError( + 'Invalid argument for signedKeyId: ' + signedKeyId + ); + } + + return Crypto.crypto.createKeyPair().then(function(keyPair) { + return Crypto.crypto.Ed25519Sign(identityKeyPair.privKey, keyPair.pubKey).then(function(sig) { + return { + keyId : signedKeyId, + keyPair : keyPair, + signature : sig + }; }); - if (openSession) { - list.push(openSession); - } - return list; - }, - archiveCurrentState: function() { - var open_session = this.getOpenSession(); - if (open_session !== undefined) { - this.closeSession(open_session); - this.updateSessionState(open_session); - } - }, - closeSession: function(session) { - if (session.indexInfo.closed > -1) { - return; - } - console.log('closing session', session.indexInfo.baseKey); + }); + }, + + generatePreKey: function(keyId) { + if (!isNonNegativeInteger(keyId)) { + throw new TypeError('Invalid argument for keyId: ' + keyId); + } + + return Crypto.crypto.createKeyPair().then(function(keyPair) { + return { keyId: keyId, keyPair: keyPair }; + }); + } +}; - // After this has run, we can still receive messages on ratchet chains which - // were already open (unless we know we dont need them), - // but we cannot send messages or step the ratchet +module.exports = KeyHelper; - // Delete current sending ratchet - delete session[util.toString(session.currentRatchet.ephemeralKeyPair.pubKey)]; - // Move all receive ratchets to the oldRatchetList to mark them for deletion - for (var i in session) { - if (session[i].chainKey !== undefined && session[i].chainKey.key !== undefined) { - session.oldRatchetList[session.oldRatchetList.length] = { - added: Date.now(), ephemeralKey: i - }; - } - } - session.indexInfo.closed = Date.now(); - this.removeOldChains(session); - }, - removeOldChains: function(session) { - // Sending ratchets are always removed when we step because we never need them again - // Receiving ratchets are added to the oldRatchetList, which we parse - // here and remove all but the last five. - while (session.oldRatchetList.length > 5) { - var index = 0; - var oldest = session.oldRatchetList[0]; - for (var i = 0; i < session.oldRatchetList.length; i++) { - if (session.oldRatchetList[i].added < oldest.added) { - oldest = session.oldRatchetList[i]; - index = i; - } - } - console.log("Deleting chain closed at", oldest.added); - delete session[util.toString(oldest.ephemeralKey)]; - session.oldRatchetList.splice(index, 1); - } - }, - removeOldSessions: function() { - // Retain only the last 20 sessions - var sessions = this._sessions; - var oldestBaseKey, oldestSession; - while (Object.keys(sessions).length > ARCHIVED_STATES_MAX_LENGTH) { - for (var key in sessions) { - var session = sessions[key]; - if (session.indexInfo.closed > -1 && // session is closed - (!oldestSession || session.indexInfo.closed < oldestSession.indexInfo.closed)) { - oldestBaseKey = key; - oldestSession = session; - } - } - console.log("Deleting session closed at", oldestSession.indexInfo.closed); - delete sessions[util.toString(oldestBaseKey)]; - } - }, - }; +},{"./crypto.js":153}],147:[function(require,module,exports){ +var VERSION = 0; - return SessionRecord; -}(); +var Crypto = require('./crypto.js'); +var dcodeIO = require('../build/dcodeIO.js'); -function SignalProtocolAddress(name, deviceId) { - this.name = name; - this.deviceId = deviceId; +function iterateHash(data, key, count) { + data = dcodeIO.ByteBuffer.concat([data, key]).toArrayBuffer(); + return Crypto.crypto.hash(data).then(function(result) { + if (--count === 0) { + return result; + } else { + return iterateHash(result, key, count); + } + }); } -SignalProtocolAddress.prototype = { - getName: function() { - return this.name; - }, - getDeviceId: function() { - return this.deviceId; - }, - toString: function() { - return this.name + '.' + this.deviceId; - }, - equals: function(other) { - if (!(other instanceof SignalProtocolAddress)) { return false; } - return other.name === this.name && other.deviceId === this.deviceId; +function shortToArrayBuffer(number) { + return new Uint16Array([number]).buffer; +} + +function getEncodedChunk(hash, offset) { + var chunk = ( hash[offset] * Math.pow(2,32) + + hash[offset+1] * Math.pow(2,24) + + hash[offset+2] * Math.pow(2,16) + + hash[offset+3] * Math.pow(2,8) + + hash[offset+4] ) % 100000; + var s = chunk.toString(); + while (s.length < 5) { + s = '0' + s; } -}; + return s; +} -libsignal.SignalProtocolAddress = function(name, deviceId) { - var address = new SignalProtocolAddress(name, deviceId); +function getDisplayStringFor(identifier, key, iterations) { + var bytes = dcodeIO.ByteBuffer.concat([ + shortToArrayBuffer(VERSION), key, identifier + ]).toArrayBuffer(); + return iterateHash(bytes, key, iterations).then(function(output) { + output = new Uint8Array(output); + return getEncodedChunk(output, 0) + + getEncodedChunk(output, 5) + + getEncodedChunk(output, 10) + + getEncodedChunk(output, 15) + + getEncodedChunk(output, 20) + + getEncodedChunk(output, 25); + }); +} - ['getName', 'getDeviceId', 'toString', 'equals'].forEach(function(method) { - this[method] = address[method].bind(address); - }.bind(this)); +var FingerprintGenerator = function(iterations) { + this.iterations = iterations; }; -libsignal.SignalProtocolAddress.fromString = function(encodedAddress) { - if (typeof encodedAddress !== 'string' || !encodedAddress.match(/.*\.\d+/)) { - throw new Error('Invalid SignalProtocolAddress string'); +FingerprintGenerator.prototype = { + createFor: function(localIdentifier, localIdentityKey, + remoteIdentifier, remoteIdentityKey) { + if (typeof localIdentifier !== 'string' || + typeof remoteIdentifier !== 'string' || + !(localIdentityKey instanceof ArrayBuffer) || + !(remoteIdentityKey instanceof ArrayBuffer)) { + + throw new Error('Invalid arguments'); + } + + return Promise.all([ + getDisplayStringFor(localIdentifier, localIdentityKey, this.iterations), + getDisplayStringFor(remoteIdentifier, remoteIdentityKey, this.iterations) + ]).then(function(fingerprints) { + return fingerprints.sort().join(''); + }); } - var parts = encodedAddress.split('.'); - return new libsignal.SignalProtocolAddress(parts[0], parseInt(parts[1])); }; +module.exports = FingerprintGenerator; + +},{"../build/dcodeIO.js":2,"./crypto.js":153}],148:[function(require,module,exports){ +var SessionLock = require('./SessionLock.js'); +var Crypto = require('./crypto.js'); +var SessionRecord = require('./SessionRecord.js'); +var ChainType = require('./ChainType.js'); +var BaseKeyType = require('./BaseKeyType.js'); +var util = require('./helpers.js'); + function SessionBuilder(storage, remoteAddress) { this.remoteAddress = remoteAddress; this.storage = storage; @@ -35817,7 +61565,7 @@ function SessionBuilder(storage, remoteAddress) { SessionBuilder.prototype = { processPreKey: function(device) { - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { return this.storage.isTrustedIdentity( this.remoteAddress.getName(), device.identityKey ).then(function(trusted) { @@ -35825,13 +61573,13 @@ SessionBuilder.prototype = { throw new Error('Identity key changed'); } - return Internal.crypto.Ed25519Verify( + return Crypto.crypto.Ed25519Verify( device.identityKey, device.signedPreKey.publicKey, device.signedPreKey.signature ); }).then(function() { - return Internal.crypto.createKeyPair(); + return Crypto.crypto.createKeyPair(); }).then(function(baseKey) { var devicePreKey = (device.preKey.publicKey); return this.initSession(true, baseKey, undefined, device.identityKey, @@ -35849,9 +61597,9 @@ SessionBuilder.prototype = { return this.storage.loadSession(address).then(function(serialized) { var record; if (serialized !== undefined) { - record = Internal.SessionRecord.deserialize(serialized); + record = SessionRecord.deserialize(serialized); } else { - record = new Internal.SessionRecord(device.identityKey, device.registrationId); + record = new SessionRecord(device.identityKey, device.registrationId); } record.archiveCurrentState(); @@ -35949,9 +61697,9 @@ SessionBuilder.prototype = { } return Promise.all([ - Internal.crypto.ECDHE(theirSignedPubKey, ourIdentityKey.privKey), - Internal.crypto.ECDHE(theirIdentityPubKey, ourSignedKey.privKey), - Internal.crypto.ECDHE(theirSignedPubKey, ourSignedKey.privKey) + Crypto.crypto.ECDHE(theirSignedPubKey, ourIdentityKey.privKey), + Crypto.crypto.ECDHE(theirIdentityPubKey, ourSignedKey.privKey), + Crypto.crypto.ECDHE(theirSignedPubKey, ourSignedKey.privKey) ]).then(function(ecRes) { if (isInitiator) { sharedSecret.set(new Uint8Array(ecRes[0]), 32); @@ -35963,14 +61711,14 @@ SessionBuilder.prototype = { sharedSecret.set(new Uint8Array(ecRes[2]), 32 * 3); if (ourEphemeralKey !== undefined && theirEphemeralPubKey !== undefined) { - return Internal.crypto.ECDHE( + return Crypto.crypto.ECDHE( theirEphemeralPubKey, ourEphemeralKey.privKey ).then(function(ecRes4) { sharedSecret.set(new Uint8Array(ecRes4), 32 * 4); }); } }).then(function() { - return Internal.HKDF(sharedSecret.buffer, new ArrayBuffer(32), "WhisperText"); + return Crypto.HKDF(sharedSecret.buffer, new ArrayBuffer(32), "WhisperText"); }).then(function(masterKey) { var session = { currentRatchet: { @@ -35989,8 +61737,8 @@ SessionBuilder.prototype = { // otherwise we figure it out when we first maybeStepRatchet with the remote's ephemeral key if (isInitiator) { session.indexInfo.baseKey = ourEphemeralKey.pubKey; - session.indexInfo.baseKeyType = Internal.BaseKeyType.OURS; - return Internal.crypto.createKeyPair().then(function(ourSendingEphemeralKey) { + session.indexInfo.baseKeyType = BaseKeyType.OURS; + return Crypto.crypto.createKeyPair().then(function(ourSendingEphemeralKey) { session.currentRatchet.ephemeralKeyPair = ourSendingEphemeralKey; return this.calculateSendingRatchet(session, theirSignedPubKey).then(function() { return session; @@ -35998,7 +61746,7 @@ SessionBuilder.prototype = { }.bind(this)); } else { session.indexInfo.baseKey = theirEphemeralPubKey; - session.indexInfo.baseKeyType = Internal.BaseKeyType.THEIRS; + session.indexInfo.baseKeyType = BaseKeyType.THEIRS; session.currentRatchet.ephemeralKeyPair = ourSignedKey; return session; } @@ -36008,17 +61756,17 @@ SessionBuilder.prototype = { calculateSendingRatchet: function(session, remoteKey) { var ratchet = session.currentRatchet; - return Internal.crypto.ECDHE( + return Crypto.crypto.ECDHE( remoteKey, util.toArrayBuffer(ratchet.ephemeralKeyPair.privKey) ).then(function(sharedSecret) { - return Internal.HKDF( + return Crypto.HKDF( sharedSecret, util.toArrayBuffer(ratchet.rootKey), "WhisperRatchet" ); }).then(function(masterKey) { session[util.toString(ratchet.ephemeralKeyPair.pubKey)] = { messageKeys : {}, chainKey : { counter : -1, key : masterKey[1] }, - chainType : Internal.ChainType.SENDING + chainType : ChainType.SENDING }; ratchet.rootKey = masterKey[0]; }); @@ -36026,12 +61774,25 @@ SessionBuilder.prototype = { }; -libsignal.SessionBuilder = function (storage, remoteAddress) { +var mySessionBuilder = function (storage, remoteAddress) { var builder = new SessionBuilder(storage, remoteAddress); this.processPreKey = builder.processPreKey.bind(builder); this.processV3 = builder.processV3.bind(builder); }; +module.exports = mySessionBuilder; + +},{"./BaseKeyType.js":143,"./ChainType.js":144,"./SessionLock.js":150,"./SessionRecord.js":151,"./crypto.js":153,"./helpers.js":155}],149:[function(require,module,exports){ +var util = require('../src/helpers.js'); + +var SessionLock = require('./SessionLock.js'); +var SessionRecord = require('./SessionRecord.js'); +var SessionBuilder = require('./SessionBuilder.js'); +var Crypto = require('./crypto.js'); +var ChainType = require('./ChainType.js'); +var protobuf = require('../build/protobufs_concat.js'); +var dcodeIO = require('../build/dcodeIO.js'); + function SessionCipher(storage, remoteAddress) { this.remoteAddress = remoteAddress; this.storage = storage; @@ -36043,12 +61804,12 @@ SessionCipher.prototype = { if (serialized === undefined) { return undefined; } - return Internal.SessionRecord.deserialize(serialized); + return SessionRecord.deserialize(serialized); }); }, encrypt: function(buffer, encoding) { buffer = dcodeIO.ByteBuffer.wrap(buffer, encoding).toArrayBuffer(); - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { if (!(buffer instanceof ArrayBuffer)) { throw new Error("Expected buffer to be an ArrayBuffer"); } @@ -36056,7 +61817,7 @@ SessionCipher.prototype = { var address = this.remoteAddress.toString(); var ourIdentityKey, myRegistrationId, record, session, chain; - var msg = new Internal.protobuf.WhisperMessage(); + var msg = new protobuf.WhisperMessage(); return Promise.all([ this.storage.getIdentityKeyPair(), @@ -36078,13 +61839,13 @@ SessionCipher.prototype = { session.currentRatchet.ephemeralKeyPair.pubKey ); chain = session[util.toString(msg.ephemeralKey)]; - if (chain.chainType === Internal.ChainType.RECEIVING) { + if (chain.chainType === ChainType.RECEIVING) { throw new Error("Tried to encrypt on a receiving chain"); } return this.fillMessageKeys(chain, chain.chainKey.counter + 1); }.bind(this)).then(function() { - return Internal.HKDF( + return Crypto.HKDF( util.toArrayBuffer(chain.messageKeys[chain.chainKey.counter]), new ArrayBuffer(32), "WhisperMessageKeys"); }).then(function(keys) { @@ -36092,7 +61853,7 @@ SessionCipher.prototype = { msg.counter = chain.chainKey.counter; msg.previousCounter = session.currentRatchet.previousCounter; - return Internal.crypto.encrypt( + return Crypto.crypto.encrypt( keys[0], buffer, keys[2].slice(0, 16) ).then(function(ciphertext) { msg.ciphertext = ciphertext; @@ -36104,7 +61865,7 @@ SessionCipher.prototype = { macInput[33*2] = (3 << 4) | 3; macInput.set(new Uint8Array(encodedMsg), 33*2 + 1); - return Internal.crypto.sign(keys[1], macInput.buffer).then(function(mac) { + return Crypto.crypto.sign(keys[1], macInput.buffer).then(function(mac) { var result = new Uint8Array(encodedMsg.byteLength + 9); result[0] = (3 << 4) | 3; result.set(new Uint8Array(encodedMsg), 1); @@ -36118,7 +61879,7 @@ SessionCipher.prototype = { }.bind(this)); }.bind(this)).then(function(message) { if (session.pendingPreKey !== undefined) { - var preKeyMsg = new Internal.protobuf.PreKeyWhisperMessage(); + var preKeyMsg = new protobuf.PreKeyWhisperMessage(); preKeyMsg.identityKey = util.toArrayBuffer(ourIdentityKey.pubKey); preKeyMsg.registrationId = myRegistrationId; @@ -36162,7 +61923,7 @@ SessionCipher.prototype = { }, decryptWhisperMessage: function(buffer, encoding) { buffer = dcodeIO.ByteBuffer.wrap(buffer, encoding).toArrayBuffer(); - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { var address = this.remoteAddress.toString(); return this.getRecord(address).then(function(record) { if (!record) { @@ -36186,15 +61947,15 @@ SessionCipher.prototype = { if ((version & 0xF) > 3 || (version >> 4) < 3) { // min version > 3 or max version < 3 throw new Error("Incompatible version number on PreKeyWhisperMessage"); } - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { var address = this.remoteAddress.toString(); return this.getRecord(address).then(function(record) { - var preKeyProto = Internal.protobuf.PreKeyWhisperMessage.decode(buffer); + var preKeyProto = protobuf.PreKeyWhisperMessage.decode(buffer); if (!record) { if (preKeyProto.registrationId === undefined) { throw new Error("No registrationId"); } - record = new Internal.SessionRecord( + record = new SessionRecord( util.toString(preKeyProto.identityKey), preKeyProto.registrationId ); @@ -36229,7 +61990,7 @@ SessionCipher.prototype = { var messageProto = messageBytes.slice(1, messageBytes.byteLength- 8); var mac = messageBytes.slice(messageBytes.byteLength - 8, messageBytes.byteLength); - var message = Internal.protobuf.WhisperMessage.decode(messageProto); + var message = protobuf.WhisperMessage.decode(messageProto); var remoteEphemeralKey = message.ephemeralKey.toArrayBuffer(); if (session === undefined) { @@ -36241,7 +62002,7 @@ SessionCipher.prototype = { return this.maybeStepRatchet(session, remoteEphemeralKey, message.previousCounter).then(function() { var chain = session[util.toString(message.ephemeralKey)]; - if (chain.chainType === Internal.ChainType.SENDING) { + if (chain.chainType === ChainType.SENDING) { throw new Error("Tried to decrypt on a sending chain"); } @@ -36253,7 +62014,7 @@ SessionCipher.prototype = { throw e; } delete chain.messageKeys[message.counter]; - return Internal.HKDF(util.toArrayBuffer(messageKey), new ArrayBuffer(32), "WhisperMessageKeys"); + return Crypto.HKDF(util.toArrayBuffer(messageKey), new ArrayBuffer(32), "WhisperMessageKeys"); }); }.bind(this)).then(function(keys) { return this.storage.getIdentityKeyPair().then(function(ourIdentityKey) { @@ -36264,9 +62025,9 @@ SessionCipher.prototype = { macInput[33*2] = (3 << 4) | 3; macInput.set(new Uint8Array(messageProto), 33*2 + 1); - return Internal.verifyMAC(macInput.buffer, keys[1], mac, 8); + return Crypto.verifyMAC(macInput.buffer, keys[1], mac, 8); }.bind(this)).then(function() { - return Internal.crypto.decrypt(keys[0], message.ciphertext.toArrayBuffer(), keys[2].slice(0, 16)); + return Crypto.crypto.decrypt(keys[0], message.ciphertext.toArrayBuffer(), keys[2].slice(0, 16)); }); }.bind(this)).then(function(plaintext) { delete session.pendingPreKey; @@ -36290,9 +62051,9 @@ SessionCipher.prototype = { var key = util.toArrayBuffer(chain.chainKey.key); var byteArray = new Uint8Array(1); byteArray[0] = 1; - return Internal.crypto.sign(key, byteArray.buffer).then(function(mac) { + return Crypto.crypto.sign(key, byteArray.buffer).then(function(mac) { byteArray[0] = 2; - return Internal.crypto.sign(key, byteArray.buffer).then(function(key) { + return Crypto.crypto.sign(key, byteArray.buffer).then(function(key) { chain.messageKeys[chain.chainKey.counter + 1] = mac; chain.chainKey.key = key; chain.chainKey.counter += 1; @@ -36328,7 +62089,7 @@ SessionCipher.prototype = { delete session[previousRatchet]; } - return Internal.crypto.createKeyPair().then(function(keyPair) { + return Crypto.crypto.createKeyPair().then(function(keyPair) { ratchet.ephemeralKeyPair = keyPair; return this.calculateRatchet(session, remoteKey, true).then(function() { ratchet.lastRemoteEphemeralKey = remoteKey; @@ -36340,8 +62101,8 @@ SessionCipher.prototype = { calculateRatchet: function(session, remoteKey, sending) { var ratchet = session.currentRatchet; - return Internal.crypto.ECDHE(remoteKey, util.toArrayBuffer(ratchet.ephemeralKeyPair.privKey)).then(function(sharedSecret) { - return Internal.HKDF(sharedSecret, util.toArrayBuffer(ratchet.rootKey), "WhisperRatchet").then(function(masterKey) { + return Crypto.crypto.ECDHE(remoteKey, util.toArrayBuffer(ratchet.ephemeralKeyPair.privKey)).then(function(sharedSecret) { + return Crypto.HKDF(sharedSecret, util.toArrayBuffer(ratchet.rootKey), "WhisperRatchet").then(function(masterKey) { var ephemeralPublicKey; if (sending) { ephemeralPublicKey = ratchet.ephemeralKeyPair.pubKey; @@ -36352,14 +62113,14 @@ SessionCipher.prototype = { session[util.toString(ephemeralPublicKey)] = { messageKeys: {}, chainKey: { counter: -1, key: masterKey[1] }, - chainType: sending ? Internal.ChainType.SENDING : Internal.ChainType.RECEIVING + chainType: sending ? ChainType.SENDING : ChainType.RECEIVING }; ratchet.rootKey = masterKey[0]; }); }); }, getRemoteRegistrationId: function() { - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { return this.getRecord(this.remoteAddress.toString()).then(function(record) { if (record === undefined) { return undefined; @@ -36369,7 +62130,7 @@ SessionCipher.prototype = { }.bind(this)); }, hasOpenSession: function() { - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { return this.getRecord(this.remoteAddress.toString()).then(function(record) { if (record === undefined) { return false; @@ -36380,7 +62141,7 @@ SessionCipher.prototype = { }, closeOpenSessionForDevice: function() { var address = this.remoteAddress.toString(); - return Internal.SessionLock.queueJobForNumber(address, function() { + return SessionLock.queueJobForNumber(address, function() { return this.getRecord(address).then(function(record) { if (record === undefined || record.getOpenSession() === undefined) { return; @@ -36393,7 +62154,7 @@ SessionCipher.prototype = { } }; -libsignal.SessionCipher = function(storage, remoteAddress) { +var mySessionCipher = function(storage, remoteAddress) { var cipher = new SessionCipher(storage, remoteAddress); // returns a Promise that resolves to a ciphertext object @@ -36411,18 +62172,20 @@ libsignal.SessionCipher = function(storage, remoteAddress) { this.closeOpenSessionForDevice = cipher.closeOpenSessionForDevice.bind(cipher); }; +module.exports = mySessionCipher; + +},{"../build/dcodeIO.js":2,"../build/protobufs_concat.js":3,"../src/helpers.js":155,"./ChainType.js":144,"./SessionBuilder.js":148,"./SessionLock.js":150,"./SessionRecord.js":151,"./crypto.js":153}],150:[function(require,module,exports){ /* * jobQueue manages multiple queues indexed by device to serialize * session io ops on the database. */ -;(function() { 'use strict'; -Internal.SessionLock = {}; +var SessionLock = {}; var jobQueue = {}; -Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJob) { +SessionLock.queueJobForNumber = function queueJobForNumber(number, runJob) { var runPrevious = jobQueue[number] || Promise.resolve(); var runCurrent = jobQueue[number] = runPrevious.then(runJob, runJob); runCurrent.then(function() { @@ -36433,78 +62196,689 @@ Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJ return runCurrent; }; -})(); +module.exports = SessionLock; + +},{}],151:[function(require,module,exports){ +/* + * vim: ts=4:sw=4 + */ -(function() { - var VERSION = 0; +var util = require('./helpers.js'); +var dcodeIO = require('../build/dcodeIO.js'); - function iterateHash(data, key, count) { - data = dcodeIO.ByteBuffer.concat([data, key]).toArrayBuffer(); - return Internal.crypto.hash(data).then(function(result) { - if (--count === 0) { - return result; - } else { - return iterateHash(result, key, count); +var BaseKeyType = require('./BaseKeyType.js'); + +var ARCHIVED_STATES_MAX_LENGTH = 40; + +var SessionRecord = function() { + 'use strict'; + var MESSAGE_LOST_THRESHOLD_MS = 1000*60*60*24*7; + + var StaticByteBufferProto = new dcodeIO.ByteBuffer().__proto__; + var StaticArrayBufferProto = new ArrayBuffer().__proto__; + var StaticUint8ArrayProto = new Uint8Array().__proto__; + + function isStringable(thing) { + return (thing === Object(thing) && + (thing.__proto__ == StaticArrayBufferProto || + thing.__proto__ == StaticUint8ArrayProto || + thing.__proto__ == StaticByteBufferProto)); + } + function ensureStringed(thing) { + if (typeof thing == "string" || typeof thing == "number" || typeof thing == "boolean") { + return thing; + } else if (isStringable(thing)) { + return util.toString(thing); + } else if (thing instanceof Array) { + var array = []; + for (var i = 0; i < thing.length; i++) { + array[i] = ensureStringed(thing[i]); } - }); + return array; + } else if (thing === Object(thing)) { + var obj = {}; + for (var key in thing) { + obj[key] = ensureStringed(thing[key]); + } + return obj; + } else if (thing === null) { + return null; + } else { + throw new Error("unsure of how to jsonify object of type " + typeof thing); + } } - function shortToArrayBuffer(number) { - return new Uint16Array([number]).buffer; + function jsonThing(thing) { + return JSON.stringify(ensureStringed(thing)); //TODO: jquery??? } - function getEncodedChunk(hash, offset) { - var chunk = ( hash[offset] * Math.pow(2,32) + - hash[offset+1] * Math.pow(2,24) + - hash[offset+2] * Math.pow(2,16) + - hash[offset+3] * Math.pow(2,8) + - hash[offset+4] ) % 100000; - var s = chunk.toString(); - while (s.length < 5) { - s = '0' + s; + var SessionRecord = function(identityKey, registrationId) { + this._sessions = {}; + identityKey = util.toString(identityKey); + if (typeof identityKey !== 'string') { + throw new Error('SessionRecord: Invalid identityKey'); } - return s; - } + this.identityKey = identityKey; + this.registrationId = registrationId; - function getDisplayStringFor(identifier, key, iterations) { - var bytes = dcodeIO.ByteBuffer.concat([ - shortToArrayBuffer(VERSION), key, identifier - ]).toArrayBuffer(); - return iterateHash(bytes, key, iterations).then(function(output) { - output = new Uint8Array(output); - return getEncodedChunk(output, 0) + - getEncodedChunk(output, 5) + - getEncodedChunk(output, 10) + - getEncodedChunk(output, 15) + - getEncodedChunk(output, 20) + - getEncodedChunk(output, 25); - }); - } + if (this.registrationId === undefined || typeof this.registrationId !== 'number') { + this.registrationId = null; + } + }; - libsignal.FingerprintGenerator = function(iterations) { - this.iterations = iterations; + SessionRecord.deserialize = function(serialized) { + var data = JSON.parse(serialized); + var record = new SessionRecord(data.identityKey, data.registrationId); + record._sessions = data.sessions; + if (record._sessions === undefined || record._sessions === null || typeof record._sessions !== "object" || Array.isArray(record._sessions)) { + throw new Error("Error deserializing SessionRecord"); + } + if (record.identityKey === undefined || record.registrationId === undefined) { + throw new Error("Error deserializing SessionRecord"); + } + return record; }; - libsignal.FingerprintGenerator.prototype = { - createFor: function(localIdentifier, localIdentityKey, - remoteIdentifier, remoteIdentityKey) { - if (typeof localIdentifier !== 'string' || - typeof remoteIdentifier !== 'string' || - !(localIdentityKey instanceof ArrayBuffer) || - !(remoteIdentityKey instanceof ArrayBuffer)) { - - throw new Error('Invalid arguments'); + + SessionRecord.prototype = { + serialize: function() { + return jsonThing({ + sessions : this._sessions, + registrationId : this.registrationId, + identityKey : this.identityKey + }); + }, + haveOpenSession: function() { + return this.registrationId !== null; + }, + + getSessionByBaseKey: function(baseKey) { + var session = this._sessions[util.toString(baseKey)]; + if (session && session.indexInfo.baseKeyType === BaseKeyType.OURS) { + console.log("Tried to lookup a session using our basekey"); + return undefined; + } + return session; + }, + getSessionByRemoteEphemeralKey: function(remoteEphemeralKey) { + this.detectDuplicateOpenSessions(); + var sessions = this._sessions; + + var searchKey = util.toString(remoteEphemeralKey); + + var openSession; + for (var key in sessions) { + if (sessions[key].indexInfo.closed == -1) { + openSession = sessions[key]; + } + if (sessions[key][searchKey] !== undefined) { + return sessions[key]; + } + } + if (openSession !== undefined) { + return openSession; + } + + return undefined; + }, + getOpenSession: function() { + var sessions = this._sessions; + if (sessions === undefined) { + return undefined; + } + + this.detectDuplicateOpenSessions(); + + for (var key in sessions) { + if (sessions[key].indexInfo.closed == -1) { + return sessions[key]; + } + } + return undefined; + }, + detectDuplicateOpenSessions: function() { + var openSession; + var sessions = this._sessions; + for (var key in sessions) { + if (sessions[key].indexInfo.closed == -1) { + if (openSession !== undefined) { + throw new Error("Datastore inconsistensy: multiple open sessions"); + } + openSession = sessions[key]; + } + } + }, + updateSessionState: function(session, registrationId) { + var sessions = this._sessions; + + this.removeOldChains(session); + + if (this.identityKey === null) { + this.identityKey = session.indexInfo.remoteIdentityKey; + } + if (util.toString(this.identityKey) !== util.toString(session.indexInfo.remoteIdentityKey)) { + var e = new Error("Identity key changed at session save time"); + e.identityKey = session.indexInfo.remoteIdentityKey.toArrayBuffer(); + throw e; } - return Promise.all([ - getDisplayStringFor(localIdentifier, localIdentityKey, this.iterations), - getDisplayStringFor(remoteIdentifier, remoteIdentityKey, this.iterations) - ]).then(function(fingerprints) { - return fingerprints.sort().join(''); + sessions[util.toString(session.indexInfo.baseKey)] = session; + + this.removeOldSessions(); + + var openSessionRemaining = false; + for (var key in sessions) { + if (sessions[key].indexInfo.closed == -1) { + openSessionRemaining = true; + } + } + if (!openSessionRemaining) { // Used as a flag to get new pre keys for the next session + this.registrationId = null; + } else if (this.registrationId === null && registrationId !== undefined) { + this.registrationId = registrationId; + } else if (this.registrationId === null) { + throw new Error("Had open sessions on a record that had no registrationId set"); + } + }, + getSessions: function() { + // return an array of sessions ordered by time closed, + // followed by the open session + var list = []; + var openSession; + for (var k in this._sessions) { + if (this._sessions[k].indexInfo.closed === -1) { + openSession = this._sessions[k]; + } else { + list.push(this._sessions[k]); + } + } + list = list.sort(function(s1, s2) { + return s1.indexInfo.closed - s2.indexInfo.closed; }); - } + if (openSession) { + list.push(openSession); + } + return list; + }, + archiveCurrentState: function() { + var open_session = this.getOpenSession(); + if (open_session !== undefined) { + this.closeSession(open_session); + this.updateSessionState(open_session); + } + }, + closeSession: function(session) { + if (session.indexInfo.closed > -1) { + return; + } + console.log('closing session', session.indexInfo.baseKey); + + // After this has run, we can still receive messages on ratchet chains which + // were already open (unless we know we dont need them), + // but we cannot send messages or step the ratchet + + // Delete current sending ratchet + delete session[util.toString(session.currentRatchet.ephemeralKeyPair.pubKey)]; + // Move all receive ratchets to the oldRatchetList to mark them for deletion + for (var i in session) { + if (session[i].chainKey !== undefined && session[i].chainKey.key !== undefined) { + session.oldRatchetList[session.oldRatchetList.length] = { + added: Date.now(), ephemeralKey: i + }; + } + } + session.indexInfo.closed = Date.now(); + this.removeOldChains(session); + }, + removeOldChains: function(session) { + // Sending ratchets are always removed when we step because we never need them again + // Receiving ratchets are added to the oldRatchetList, which we parse + // here and remove all but the last five. + while (session.oldRatchetList.length > 5) { + var index = 0; + var oldest = session.oldRatchetList[0]; + for (var i = 0; i < session.oldRatchetList.length; i++) { + if (session.oldRatchetList[i].added < oldest.added) { + oldest = session.oldRatchetList[i]; + index = i; + } + } + console.log("Deleting chain closed at", oldest.added); + delete session[util.toString(oldest.ephemeralKey)]; + session.oldRatchetList.splice(index, 1); + } + }, + removeOldSessions: function() { + // Retain only the last 20 sessions + var sessions = this._sessions; + var oldestBaseKey, oldestSession; + while (Object.keys(sessions).length > ARCHIVED_STATES_MAX_LENGTH) { + for (var key in sessions) { + var session = sessions[key]; + if (session.indexInfo.closed > -1 && // session is closed + (!oldestSession || session.indexInfo.closed < oldestSession.indexInfo.closed)) { + oldestBaseKey = key; + oldestSession = session; + } + } + console.log("Deleting session closed at", oldestSession.indexInfo.closed); + delete sessions[util.toString(oldestBaseKey)]; + } + }, }; -})(); + return SessionRecord; +}(); + +module.exports = SessionRecord; + +},{"../build/dcodeIO.js":2,"./BaseKeyType.js":143,"./helpers.js":155}],152:[function(require,module,exports){ +function SignalProtocolAddress(name, deviceId) { + this.name = name; + this.deviceId = deviceId; +} + +SignalProtocolAddress.prototype = { + getName: function() { + return this.name; + }, + getDeviceId: function() { + return this.deviceId; + }, + toString: function() { + return this.name + '.' + this.deviceId; + }, + equals: function(other) { + if (!(other instanceof SignalProtocolAddress)) { return false; } + return other.name === this.name && other.deviceId === this.deviceId; + } +}; + +var mySignalProtocolAddress = function(name, deviceId) { + var address = new SignalProtocolAddress(name, deviceId); + + ['getName', 'getDeviceId', 'toString', 'equals'].forEach(function(method) { + this[method] = address[method].bind(address); + }.bind(this)); +}; + +mySignalProtocolAddress.fromString = function(encodedAddress) { + if (typeof encodedAddress !== 'string' || !encodedAddress.match(/.*\.\d+/)) { + throw new Error('Invalid SignalProtocolAddress string'); + } + var parts = encodedAddress.split('.'); + return new mySignalProtocolAddress(parts[0], parseInt(parts[1])); +}; + +module.exports = mySignalProtocolAddress; + +},{}],153:[function(require,module,exports){ +/* + * vim: ts=4:sw=4 + */ +'use strict'; + +// TODO polyfill window.crypto for node? +var crypto = window.crypto; + +var Curve = require('./Curve.js'); +var util = require('./helpers.js'); +var dcodeIO = require('../build/dcodeIO.js'); + +if (!crypto || !crypto.subtle || typeof crypto.getRandomValues !== 'function') { + throw new Error('WebCrypto not found'); +} + +// object for this crypto.js scope +var myCrypto = {}; + +myCrypto.crypto = { + getRandomBytes: function(size) { + var array = new Uint8Array(size); + crypto.getRandomValues(array); + return array.buffer; + }, + encrypt: function(key, data, iv) { + return crypto.subtle.importKey('raw', key, {name: 'AES-CBC'}, false, ['encrypt']).then(function(key) { + return crypto.subtle.encrypt({name: 'AES-CBC', iv: new Uint8Array(iv)}, key, data); + }); + }, + decrypt: function(key, data, iv) { + return crypto.subtle.importKey('raw', key, {name: 'AES-CBC'}, false, ['decrypt']).then(function(key) { + return crypto.subtle.decrypt({name: 'AES-CBC', iv: new Uint8Array(iv)}, key, data); + }); + }, + sign: function(key, data) { + return crypto.subtle.importKey('raw', key, {name: 'HMAC', hash: {name: 'SHA-256'}}, false, ['sign']).then(function(key) { + return crypto.subtle.sign( {name: 'HMAC', hash: 'SHA-256'}, key, data); + }); + }, + + hash: function(data) { + return crypto.subtle.digest({name: 'SHA-512'}, data); + }, + + HKDF: function(input, salt, info) { + // Specific implementation of RFC 5869 that only returns the first 3 32-byte chunks + // TODO: We dont always need the third chunk, we might skip it + return myCrypto.crypto.sign(salt, input).then(function(PRK) { + var infoBuffer = new ArrayBuffer(info.byteLength + 1 + 32); + var infoArray = new Uint8Array(infoBuffer); + infoArray.set(new Uint8Array(info), 32); + infoArray[infoArray.length - 1] = 1; + return myCrypto.crypto.sign(PRK, infoBuffer.slice(32)).then(function(T1) { + infoArray.set(new Uint8Array(T1)); + infoArray[infoArray.length - 1] = 2; + return myCrypto.crypto.sign(PRK, infoBuffer).then(function(T2) { + infoArray.set(new Uint8Array(T2)); + infoArray[infoArray.length - 1] = 3; + return myCrypto.crypto.sign(PRK, infoBuffer).then(function(T3) { + return [ T1, T2, T3 ]; + }); + }); + }); + }); + }, + + // Curve 25519 crypto + createKeyPair: function(privKey) { + if (privKey === undefined) { + privKey = myCrypto.crypto.getRandomBytes(32); + } + return Curve.async.createKeyPair(privKey); + }, + ECDHE: function(pubKey, privKey) { + return Curve.async.ECDHE(pubKey, privKey); + }, + Ed25519Sign: function(privKey, message) { + return Curve.async.Ed25519Sign(privKey, message); + }, + Ed25519Verify: function(pubKey, msg, sig) { + return Curve.async.Ed25519Verify(pubKey, msg, sig); + } +}; + + +// HKDF for TextSecure has a bit of additional handling - salts always end up being 32 bytes +myCrypto.HKDF = function(input, salt, info) { + if (salt.byteLength != 32) { + throw new Error("Got salt of incorrect length"); + } + + return myCrypto.crypto.HKDF(input, salt, util.toArrayBuffer(info)); +}; + +myCrypto.verifyMAC = function(data, key, mac, length) { + return myCrypto.crypto.sign(key, data).then(function(calculated_mac) { + if (mac.byteLength != length || calculated_mac.byteLength < length) { + throw new Error("Bad MAC length"); + } + var a = new Uint8Array(calculated_mac); + var b = new Uint8Array(mac); + var result = 0; + for (var i=0; i < mac.byteLength; ++i) { + result = result | (a[i] ^ b[i]); + } + if (result !== 0) { + console.log('Our MAC ', dcodeIO.ByteBuffer.wrap(calculated_mac).toHex()); + console.log('Their MAC', dcodeIO.ByteBuffer.wrap(mac).toHex()); + throw new Error("Bad MAC"); + } + }); +}; + +module.exports = myCrypto; + +// TODO will need to include these later...maybe? +// module.exports = { +// HKDF: { +// deriveSecrets: function(input, salt, info) { +// return myCrypto.HKDF(input, salt, info); +// }, +// }, +// crypto: { +// encrypt: function(key, data, iv) { +// return myCrypto.crypto.encrypt(key, data, iv); +// }, +// decrypt: function(key, data, iv) { +// return myCrypto.crypto.decrypt(key, data, iv); +// }, +// calculateMAC: function(key, data) { +// return myCrypto.crypto.sign(key, data); +// }, +// verifyMAC: function(data, key, mac, length) { +// return myCrypto.verifyMAC(data, key, mac, length); +// }, +// getRandomBytes: function(size) { +// return myCrypto.crypto.getRandomBytes(size); +// } +// } +// }; + +},{"../build/dcodeIO.js":2,"./Curve.js":145,"./helpers.js":155}],154:[function(require,module,exports){ +'use strict'; + +var Internal = Internal || {}; +var Module = require('../build/curve25519_concat.js'); + +// Insert some bytes into the emscripten memory and return a pointer +function _allocate(bytes) { + var address = Module._malloc(bytes.length); + Module.HEAPU8.set(bytes, address); + + return address; +} + +function _readBytes(address, length, array) { + array.set(Module.HEAPU8.subarray(address, address + length)); +} + +var basepoint = new Uint8Array(32); +basepoint[0] = 9; + +Internal.curve25519 = { + keyPair: function(privKey) { + var priv = new Uint8Array(privKey); + priv[0] &= 248; + priv[31] &= 127; + priv[31] |= 64; + + // Where to store the result + var publicKey_ptr = Module._malloc(32); + + // Get a pointer to the private key + var privateKey_ptr = _allocate(priv); + + // The basepoint for generating public keys + var basepoint_ptr = _allocate(basepoint); + + // The return value is just 0, the operation is done in place + var err = Module._curve25519_donna(publicKey_ptr, + privateKey_ptr, + basepoint_ptr); + + var res = new Uint8Array(32); + _readBytes(publicKey_ptr, 32, res); + + Module._free(publicKey_ptr); + Module._free(privateKey_ptr); + Module._free(basepoint_ptr); + + return { pubKey: res.buffer, privKey: priv.buffer }; + }, + sharedSecret: function(pubKey, privKey) { + // Where to store the result + var sharedKey_ptr = Module._malloc(32); + + // Get a pointer to our private key + var privateKey_ptr = _allocate(new Uint8Array(privKey)); + + // Get a pointer to their public key, the basepoint when you're + // generating a shared secret + var basepoint_ptr = _allocate(new Uint8Array(pubKey)); + + // Return value is 0 here too of course + var err = Module._curve25519_donna(sharedKey_ptr, + privateKey_ptr, + basepoint_ptr); + + var res = new Uint8Array(32); + _readBytes(sharedKey_ptr, 32, res); + + Module._free(sharedKey_ptr); + Module._free(privateKey_ptr); + Module._free(basepoint_ptr); + + return res.buffer; + }, + sign: function(privKey, message) { + // Where to store the result + var signature_ptr = Module._malloc(64); + + // Get a pointer to our private key + var privateKey_ptr = _allocate(new Uint8Array(privKey)); + + // Get a pointer to the message + var message_ptr = _allocate(new Uint8Array(message)); + + var err = Module._curve25519_sign(signature_ptr, + privateKey_ptr, + message_ptr, + message.byteLength); + + var res = new Uint8Array(64); + _readBytes(signature_ptr, 64, res); + + Module._free(signature_ptr); + Module._free(privateKey_ptr); + Module._free(message_ptr); + + return res.buffer; + }, + verify: function(pubKey, message, sig) { + // Get a pointer to their public key + var publicKey_ptr = _allocate(new Uint8Array(pubKey)); + + // Get a pointer to the signature + var signature_ptr = _allocate(new Uint8Array(sig)); + + // Get a pointer to the message + var message_ptr = _allocate(new Uint8Array(message)); + + var res = Module._curve25519_verify(signature_ptr, + publicKey_ptr, + message_ptr, + message.byteLength); + + Module._free(publicKey_ptr); + Module._free(signature_ptr); + Module._free(message_ptr); + + return res !== 0; + } +}; + +Internal.curve25519_async = { + keyPair: function(privKey) { + return new Promise(function(resolve) { + resolve(Internal.curve25519.keyPair(privKey)); + }); + }, + sharedSecret: function(pubKey, privKey) { + return new Promise(function(resolve) { + resolve(Internal.curve25519.sharedSecret(pubKey, privKey)); + }); + }, + sign: function(privKey, message) { + return new Promise(function(resolve) { + resolve(Internal.curve25519.sign(privKey, message)); + }); + }, + verify: function(pubKey, message, sig) { + return new Promise(function(resolve, reject) { + if (Internal.curve25519.verify(pubKey, message, sig)) { + reject(new Error("Invalid signature")); + } else { + resolve(); + } + }); + }, +}; + +module.exports = Internal; + +},{"../build/curve25519_concat.js":1}],155:[function(require,module,exports){ +/* + * vim: ts=4:sw=4 + */ +'use strict'; + + +var dcodeIO = require('../build/dcodeIO.js'); +var StaticArrayBufferProto = new ArrayBuffer().__proto__; + +function toString (thing) { + if (typeof thing == 'string') { + return thing; + } + return new dcodeIO.ByteBuffer.wrap(thing).toString('binary'); +} + +function toArrayBuffer (thing) { + if (thing === undefined) { + return undefined; + } + if (thing === Object(thing)) { + if (thing.__proto__ == StaticArrayBufferProto) { + return thing; + } + } + var str; + if (typeof thing == "string") { + str = thing; + } else { + throw new Error("Tried to convert a non-string of type " + typeof thing + " to an array buffer"); + } + return new dcodeIO.ByteBuffer.wrap(thing, 'binary').toArrayBuffer(); +} + +function isEqual (a, b) { + // TODO: Special-case arraybuffers, etc + if (a === undefined || b === undefined) { + return false; + } + a = toString(a); + b = toString(b); + var maxLength = Math.max(a.length, b.length); + if (maxLength < 5) { + throw new Error("a/b compare too short"); + } + return a.substring(0, Math.min(maxLength, a.length)) == b.substring(0, Math.min(maxLength, b.length)); +} + +var util = { + toString: toString, + toArrayBuffer: toArrayBuffer, + isEqual: isEqual +}; + +module.exports = util; + +},{"../build/dcodeIO.js":2}],156:[function(require,module,exports){ +module.exports = { + KeyHelper: require('./KeyHelper.js'), + SignalProtocolAddress: require('./SignalProtocolAddress.js'), + SessionBuilder: require('./SessionBuilder.js'), + SessionCipher: require('./SessionCipher.js'), + FingerprintGenerator: require('./NumericFingerprint.js'), + // internal stuff + _crypto: require('./crypto.js'), + _curve: require('./Curve.js') +} +},{"./Curve.js":145,"./KeyHelper.js":146,"./NumericFingerprint.js":147,"./SessionBuilder.js":148,"./SessionCipher.js":149,"./SignalProtocolAddress.js":152,"./crypto.js":153}],157:[function(require,module,exports){ +// for legacy builds +// we browserify bundle this into a js file for folks to include in their html +var libsignal = require('./main.js'); +window.libsignal = libsignal; -})(); \ No newline at end of file +},{"./main.js":156}]},{},[157]); diff --git a/package.json b/package.json index c4d53c1..08ba996 100644 --- a/package.json +++ b/package.json @@ -2,20 +2,23 @@ "name": "libsignal-protocol", "repository": "https://github.com/WhisperSystems/libsignal-protocol-javascript.git", "version": "1.1.2", + "main": "src/main.js", "license": "GPL-3.0", "dependencies": { - "long": "^3.1.0", "bytebuffer": "^3.5.5", - "protobufjs": "5.0.1" + "long": "^3.1.0", + "protobufjs": "5.0.1", + "webworkify": "^1.4.0" }, "devDependencies": { "blanket": "1.1.7", "chai": "^3.5.0", "grunt": "^0.4.5", + "grunt-browserify": "^5.0.0", "grunt-cli": "^0.1.13", "grunt-contrib-concat": "^0.5.0", "grunt-contrib-connect": "^0.9.0", - "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-jshint": "^1.1.0", "grunt-contrib-watch": "^0.6.1", "grunt-jscs": "^1.1.0", "grunt-preen": "^1.0.0", diff --git a/src/BaseKeyType.js b/src/BaseKeyType.js new file mode 100644 index 0000000..e9b5d37 --- /dev/null +++ b/src/BaseKeyType.js @@ -0,0 +1,6 @@ +var BaseKeyType = { + OURS: 1, + THEIRS: 2 +}; + +module.exports = BaseKeyType; diff --git a/src/ChainType.js b/src/ChainType.js new file mode 100644 index 0000000..4327dd6 --- /dev/null +++ b/src/ChainType.js @@ -0,0 +1,6 @@ +var ChainType = { + SENDING: 1, + RECEIVING: 2 +}; + +module.exports = ChainType; diff --git a/src/Curve.js b/src/Curve.js index 4bb7cf7..d9c46cb 100644 --- a/src/Curve.js +++ b/src/Curve.js @@ -1,109 +1,116 @@ -(function() { - 'use strict'; - - function validatePrivKey(privKey) { - if (privKey === undefined || !(privKey instanceof ArrayBuffer) || privKey.byteLength != 32) { - throw new Error("Invalid private key"); - } - } - function validatePubKeyFormat(pubKey) { - if (pubKey === undefined || ((pubKey.byteLength != 33 || new Uint8Array(pubKey)[0] != 5) && pubKey.byteLength != 32)) { - throw new Error("Invalid public key"); - } - if (pubKey.byteLength == 33) { - return pubKey.slice(1); - } else { - console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"); - return pubKey; - } - } - - function processKeys(raw_keys) { - // prepend version byte - var origPub = new Uint8Array(raw_keys.pubKey); - var pub = new Uint8Array(33); - pub.set(origPub, 1); - pub[0] = 5; - - return { pubKey: pub.buffer, privKey: raw_keys.privKey }; +'use strict'; + +var Crypto = require('crypto'); +var CurveWrapper = require('./curve25519_wrapper.js'); + +function validatePrivKey(privKey) { + if (privKey === undefined || !(privKey instanceof ArrayBuffer) || privKey.byteLength != 32) { + throw new Error("Invalid private key"); + } +} + +function validatePubKeyFormat(pubKey) { + if (pubKey === undefined || ((pubKey.byteLength != 33 || new Uint8Array(pubKey)[0] != 5) && pubKey.byteLength != 32)) { + throw new Error("Invalid public key"); + } + if (pubKey.byteLength == 33) { + return pubKey.slice(1); + } else { + console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"); + return pubKey; + } +} + +function processKeys(raw_keys) { + // prepend version byte + var origPub = new Uint8Array(raw_keys.pubKey); + var pub = new Uint8Array(33); + pub.set(origPub, 1); + pub[0] = 5; + + return { pubKey: pub.buffer, privKey: raw_keys.privKey }; +} + +function wrapCurve25519(curve25519) { + return { + // Curve 25519 crypto + createKeyPair: function(privKey) { + validatePrivKey(privKey); + var raw_keys = curve25519.keyPair(privKey); + if (raw_keys instanceof Promise) { + return raw_keys.then(processKeys); + } else { + return processKeys(raw_keys); + } + }, + ECDHE: function(pubKey, privKey) { + pubKey = validatePubKeyFormat(pubKey); + validatePrivKey(privKey); + + if (pubKey === undefined || pubKey.byteLength != 32) { + throw new Error("Invalid public key"); + } + + return curve25519.sharedSecret(pubKey, privKey); + }, + Ed25519Sign: function(privKey, message) { + validatePrivKey(privKey); + + if (message === undefined) { + throw new Error("Invalid message"); + } + + return curve25519.sign(privKey, message); + }, + Ed25519Verify: function(pubKey, msg, sig) { + pubKey = validatePubKeyFormat(pubKey); + + if (pubKey === undefined || pubKey.byteLength != 32) { + throw new Error("Invalid public key"); + } + + if (msg === undefined) { + throw new Error("Invalid message"); + } + + if (sig === undefined || sig.byteLength != 64) { + throw new Error("Invalid signature"); + } + + return curve25519.verify(pubKey, msg, sig); } - - function wrapCurve25519(curve25519) { - return { - // Curve 25519 crypto - createKeyPair: function(privKey) { - validatePrivKey(privKey); - var raw_keys = curve25519.keyPair(privKey); - if (raw_keys instanceof Promise) { - return raw_keys.then(processKeys); - } else { - return processKeys(raw_keys); - } - }, - ECDHE: function(pubKey, privKey) { - pubKey = validatePubKeyFormat(pubKey); - validatePrivKey(privKey); - - if (pubKey === undefined || pubKey.byteLength != 32) { - throw new Error("Invalid public key"); - } - - return curve25519.sharedSecret(pubKey, privKey); - }, - Ed25519Sign: function(privKey, message) { - validatePrivKey(privKey); - - if (message === undefined) { - throw new Error("Invalid message"); - } - - return curve25519.sign(privKey, message); - }, - Ed25519Verify: function(pubKey, msg, sig) { - pubKey = validatePubKeyFormat(pubKey); - - if (pubKey === undefined || pubKey.byteLength != 32) { - throw new Error("Invalid public key"); - } - - if (msg === undefined) { - throw new Error("Invalid message"); - } - - if (sig === undefined || sig.byteLength != 64) { - throw new Error("Invalid signature"); - } - - return curve25519.verify(pubKey, msg, sig); - } - }; - } - - Internal.Curve = wrapCurve25519(Internal.curve25519); - Internal.Curve.async = wrapCurve25519(Internal.curve25519_async); - - function wrapCurve(curve) { - return { - generateKeyPair: function() { - var privKey = Internal.crypto.getRandomBytes(32); - return curve.createKeyPair(privKey); - }, - createKeyPair: function(privKey) { - return curve.createKeyPair(privKey); - }, - calculateAgreement: function(pubKey, privKey) { - return curve.ECDHE(pubKey, privKey); - }, - verifySignature: function(pubKey, msg, sig) { - return curve.Ed25519Verify(pubKey, msg, sig); - }, - calculateSignature: function(privKey, message) { - return curve.Ed25519Sign(privKey, message); - } - }; + }; +} + +function wrapCurve(curve) { + return { + generateKeyPair: function() { + var privKey = Crypto.crypto.getRandomBytes(32); + return curve.createKeyPair(privKey); + }, + createKeyPair: function(privKey) { + return curve.createKeyPair(privKey); + }, + calculateAgreement: function(pubKey, privKey) { + return curve.ECDHE(pubKey, privKey); + }, + verifySignature: function(pubKey, msg, sig) { + return curve.Ed25519Verify(pubKey, msg, sig); + }, + calculateSignature: function(privKey, message) { + return curve.Ed25519Sign(privKey, message); } - - libsignal.Curve = wrapCurve(Internal.Curve); - libsignal.Curve.async = wrapCurve(Internal.Curve.async); - -})(); + }; +} + +var curve = wrapCurve25519(CurveWrapper.curve25519); +var async = wrapCurve25519(CurveWrapper.curve25519_async); +var libsignal_Curve = wrapCurve(curve); +var libsignal_Curve_async = wrapCurve(async); + +module.exports = { + Curve: curve, + async: async, + libsignal_Curve: libsignal_Curve, + libsignal_Curve_async: libsignal_Curve_async +}; diff --git a/src/KeyHelper.js b/src/KeyHelper.js index c1a3f3e..720ad29 100644 --- a/src/KeyHelper.js +++ b/src/KeyHelper.js @@ -1,14 +1,16 @@ +var Crypto = require('./crypto.js'); + function isNonNegativeInteger(n) { return (typeof n === 'number' && (n % 1) === 0 && n >= 0); } var KeyHelper = { generateIdentityKeyPair: function() { - return Internal.crypto.createKeyPair(); + return Crypto.crypto.createKeyPair(); }, generateRegistrationId: function() { - var registrationId = new Uint16Array(Internal.crypto.getRandomBytes(2))[0]; + var registrationId = new Uint16Array(Crypto.crypto.getRandomBytes(2))[0]; return registrationId & 0x3fff; }, @@ -25,8 +27,8 @@ var KeyHelper = { ); } - return Internal.crypto.createKeyPair().then(function(keyPair) { - return Internal.crypto.Ed25519Sign(identityKeyPair.privKey, keyPair.pubKey).then(function(sig) { + return Crypto.crypto.createKeyPair().then(function(keyPair) { + return Crypto.crypto.Ed25519Sign(identityKeyPair.privKey, keyPair.pubKey).then(function(sig) { return { keyId : signedKeyId, keyPair : keyPair, @@ -41,10 +43,10 @@ var KeyHelper = { throw new TypeError('Invalid argument for keyId: ' + keyId); } - return Internal.crypto.createKeyPair().then(function(keyPair) { + return Crypto.crypto.createKeyPair().then(function(keyPair) { return { keyId: keyId, keyPair: keyPair }; }); } }; -libsignal.KeyHelper = KeyHelper; +module.exports = KeyHelper; diff --git a/src/NumericFingerprint.js b/src/NumericFingerprint.js index b4a3fd9..475b8b8 100644 --- a/src/NumericFingerprint.js +++ b/src/NumericFingerprint.js @@ -1,71 +1,73 @@ -(function() { - var VERSION = 0; +var VERSION = 0; - function iterateHash(data, key, count) { - data = dcodeIO.ByteBuffer.concat([data, key]).toArrayBuffer(); - return Internal.crypto.hash(data).then(function(result) { - if (--count === 0) { - return result; - } else { - return iterateHash(result, key, count); - } - }); - } +var Crypto = require('./crypto.js'); +var dcodeIO = require('../build/dcodeIO.js'); - function shortToArrayBuffer(number) { - return new Uint16Array([number]).buffer; +function iterateHash(data, key, count) { + data = dcodeIO.ByteBuffer.concat([data, key]).toArrayBuffer(); + return Crypto.crypto.hash(data).then(function(result) { + if (--count === 0) { + return result; + } else { + return iterateHash(result, key, count); } + }); +} - function getEncodedChunk(hash, offset) { - var chunk = ( hash[offset] * Math.pow(2,32) + - hash[offset+1] * Math.pow(2,24) + - hash[offset+2] * Math.pow(2,16) + - hash[offset+3] * Math.pow(2,8) + - hash[offset+4] ) % 100000; - var s = chunk.toString(); - while (s.length < 5) { - s = '0' + s; - } - return s; - } +function shortToArrayBuffer(number) { + return new Uint16Array([number]).buffer; +} - function getDisplayStringFor(identifier, key, iterations) { - var bytes = dcodeIO.ByteBuffer.concat([ - shortToArrayBuffer(VERSION), key, identifier - ]).toArrayBuffer(); - return iterateHash(bytes, key, iterations).then(function(output) { - output = new Uint8Array(output); - return getEncodedChunk(output, 0) + - getEncodedChunk(output, 5) + - getEncodedChunk(output, 10) + - getEncodedChunk(output, 15) + - getEncodedChunk(output, 20) + - getEncodedChunk(output, 25); - }); - } +function getEncodedChunk(hash, offset) { + var chunk = ( hash[offset] * Math.pow(2,32) + + hash[offset+1] * Math.pow(2,24) + + hash[offset+2] * Math.pow(2,16) + + hash[offset+3] * Math.pow(2,8) + + hash[offset+4] ) % 100000; + var s = chunk.toString(); + while (s.length < 5) { + s = '0' + s; + } + return s; +} - libsignal.FingerprintGenerator = function(iterations) { - this.iterations = iterations; - }; - libsignal.FingerprintGenerator.prototype = { - createFor: function(localIdentifier, localIdentityKey, - remoteIdentifier, remoteIdentityKey) { - if (typeof localIdentifier !== 'string' || - typeof remoteIdentifier !== 'string' || - !(localIdentityKey instanceof ArrayBuffer) || - !(remoteIdentityKey instanceof ArrayBuffer)) { +function getDisplayStringFor(identifier, key, iterations) { + var bytes = dcodeIO.ByteBuffer.concat([ + shortToArrayBuffer(VERSION), key, identifier + ]).toArrayBuffer(); + return iterateHash(bytes, key, iterations).then(function(output) { + output = new Uint8Array(output); + return getEncodedChunk(output, 0) + + getEncodedChunk(output, 5) + + getEncodedChunk(output, 10) + + getEncodedChunk(output, 15) + + getEncodedChunk(output, 20) + + getEncodedChunk(output, 25); + }); +} - throw new Error('Invalid arguments'); - } +var FingerprintGenerator = function(iterations) { + this.iterations = iterations; +}; - return Promise.all([ - getDisplayStringFor(localIdentifier, localIdentityKey, this.iterations), - getDisplayStringFor(remoteIdentifier, remoteIdentityKey, this.iterations) - ]).then(function(fingerprints) { - return fingerprints.sort().join(''); - }); - } - }; +FingerprintGenerator.prototype = { + createFor: function(localIdentifier, localIdentityKey, + remoteIdentifier, remoteIdentityKey) { + if (typeof localIdentifier !== 'string' || + typeof remoteIdentifier !== 'string' || + !(localIdentityKey instanceof ArrayBuffer) || + !(remoteIdentityKey instanceof ArrayBuffer)) { + + throw new Error('Invalid arguments'); + } -})(); + return Promise.all([ + getDisplayStringFor(localIdentifier, localIdentityKey, this.iterations), + getDisplayStringFor(remoteIdentifier, remoteIdentityKey, this.iterations) + ]).then(function(fingerprints) { + return fingerprints.sort().join(''); + }); + } +}; +module.exports = FingerprintGenerator; diff --git a/src/SessionBuilder.js b/src/SessionBuilder.js index 9895360..7426802 100644 --- a/src/SessionBuilder.js +++ b/src/SessionBuilder.js @@ -1,3 +1,10 @@ +var SessionLock = require('./SessionLock.js'); +var Crypto = require('./crypto.js'); +var SessionRecord = require('./SessionRecord.js'); +var ChainType = require('./ChainType.js'); +var BaseKeyType = require('./BaseKeyType.js'); +var util = require('./helpers.js'); + function SessionBuilder(storage, remoteAddress) { this.remoteAddress = remoteAddress; this.storage = storage; @@ -5,7 +12,7 @@ function SessionBuilder(storage, remoteAddress) { SessionBuilder.prototype = { processPreKey: function(device) { - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { return this.storage.isTrustedIdentity( this.remoteAddress.getName(), device.identityKey ).then(function(trusted) { @@ -13,13 +20,13 @@ SessionBuilder.prototype = { throw new Error('Identity key changed'); } - return Internal.crypto.Ed25519Verify( + return Crypto.crypto.Ed25519Verify( device.identityKey, device.signedPreKey.publicKey, device.signedPreKey.signature ); }).then(function() { - return Internal.crypto.createKeyPair(); + return Crypto.crypto.createKeyPair(); }).then(function(baseKey) { var devicePreKey = (device.preKey.publicKey); return this.initSession(true, baseKey, undefined, device.identityKey, @@ -37,9 +44,9 @@ SessionBuilder.prototype = { return this.storage.loadSession(address).then(function(serialized) { var record; if (serialized !== undefined) { - record = Internal.SessionRecord.deserialize(serialized); + record = SessionRecord.deserialize(serialized); } else { - record = new Internal.SessionRecord(device.identityKey, device.registrationId); + record = new SessionRecord(device.identityKey, device.registrationId); } record.archiveCurrentState(); @@ -137,9 +144,9 @@ SessionBuilder.prototype = { } return Promise.all([ - Internal.crypto.ECDHE(theirSignedPubKey, ourIdentityKey.privKey), - Internal.crypto.ECDHE(theirIdentityPubKey, ourSignedKey.privKey), - Internal.crypto.ECDHE(theirSignedPubKey, ourSignedKey.privKey) + Crypto.crypto.ECDHE(theirSignedPubKey, ourIdentityKey.privKey), + Crypto.crypto.ECDHE(theirIdentityPubKey, ourSignedKey.privKey), + Crypto.crypto.ECDHE(theirSignedPubKey, ourSignedKey.privKey) ]).then(function(ecRes) { if (isInitiator) { sharedSecret.set(new Uint8Array(ecRes[0]), 32); @@ -151,14 +158,14 @@ SessionBuilder.prototype = { sharedSecret.set(new Uint8Array(ecRes[2]), 32 * 3); if (ourEphemeralKey !== undefined && theirEphemeralPubKey !== undefined) { - return Internal.crypto.ECDHE( + return Crypto.crypto.ECDHE( theirEphemeralPubKey, ourEphemeralKey.privKey ).then(function(ecRes4) { sharedSecret.set(new Uint8Array(ecRes4), 32 * 4); }); } }).then(function() { - return Internal.HKDF(sharedSecret.buffer, new ArrayBuffer(32), "WhisperText"); + return Crypto.HKDF(sharedSecret.buffer, new ArrayBuffer(32), "WhisperText"); }).then(function(masterKey) { var session = { currentRatchet: { @@ -177,8 +184,8 @@ SessionBuilder.prototype = { // otherwise we figure it out when we first maybeStepRatchet with the remote's ephemeral key if (isInitiator) { session.indexInfo.baseKey = ourEphemeralKey.pubKey; - session.indexInfo.baseKeyType = Internal.BaseKeyType.OURS; - return Internal.crypto.createKeyPair().then(function(ourSendingEphemeralKey) { + session.indexInfo.baseKeyType = BaseKeyType.OURS; + return Crypto.crypto.createKeyPair().then(function(ourSendingEphemeralKey) { session.currentRatchet.ephemeralKeyPair = ourSendingEphemeralKey; return this.calculateSendingRatchet(session, theirSignedPubKey).then(function() { return session; @@ -186,7 +193,7 @@ SessionBuilder.prototype = { }.bind(this)); } else { session.indexInfo.baseKey = theirEphemeralPubKey; - session.indexInfo.baseKeyType = Internal.BaseKeyType.THEIRS; + session.indexInfo.baseKeyType = BaseKeyType.THEIRS; session.currentRatchet.ephemeralKeyPair = ourSignedKey; return session; } @@ -196,17 +203,17 @@ SessionBuilder.prototype = { calculateSendingRatchet: function(session, remoteKey) { var ratchet = session.currentRatchet; - return Internal.crypto.ECDHE( + return Crypto.crypto.ECDHE( remoteKey, util.toArrayBuffer(ratchet.ephemeralKeyPair.privKey) ).then(function(sharedSecret) { - return Internal.HKDF( + return Crypto.HKDF( sharedSecret, util.toArrayBuffer(ratchet.rootKey), "WhisperRatchet" ); }).then(function(masterKey) { session[util.toString(ratchet.ephemeralKeyPair.pubKey)] = { messageKeys : {}, chainKey : { counter : -1, key : masterKey[1] }, - chainType : Internal.ChainType.SENDING + chainType : ChainType.SENDING }; ratchet.rootKey = masterKey[0]; }); @@ -214,8 +221,10 @@ SessionBuilder.prototype = { }; -libsignal.SessionBuilder = function (storage, remoteAddress) { +var mySessionBuilder = function (storage, remoteAddress) { var builder = new SessionBuilder(storage, remoteAddress); this.processPreKey = builder.processPreKey.bind(builder); this.processV3 = builder.processV3.bind(builder); }; + +module.exports = mySessionBuilder; diff --git a/src/SessionCipher.js b/src/SessionCipher.js index 5c6b914..d9fb3c8 100644 --- a/src/SessionCipher.js +++ b/src/SessionCipher.js @@ -1,3 +1,13 @@ +var util = require('../src/helpers.js'); + +var SessionLock = require('./SessionLock.js'); +var SessionRecord = require('./SessionRecord.js'); +var SessionBuilder = require('./SessionBuilder.js'); +var Crypto = require('./crypto.js'); +var ChainType = require('./ChainType.js'); +var protobuf = require('../build/protobufs_concat.js'); +var dcodeIO = require('../build/dcodeIO.js'); + function SessionCipher(storage, remoteAddress) { this.remoteAddress = remoteAddress; this.storage = storage; @@ -9,12 +19,12 @@ SessionCipher.prototype = { if (serialized === undefined) { return undefined; } - return Internal.SessionRecord.deserialize(serialized); + return SessionRecord.deserialize(serialized); }); }, encrypt: function(buffer, encoding) { buffer = dcodeIO.ByteBuffer.wrap(buffer, encoding).toArrayBuffer(); - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { if (!(buffer instanceof ArrayBuffer)) { throw new Error("Expected buffer to be an ArrayBuffer"); } @@ -22,7 +32,7 @@ SessionCipher.prototype = { var address = this.remoteAddress.toString(); var ourIdentityKey, myRegistrationId, record, session, chain; - var msg = new Internal.protobuf.WhisperMessage(); + var msg = new protobuf.WhisperMessage(); return Promise.all([ this.storage.getIdentityKeyPair(), @@ -44,13 +54,13 @@ SessionCipher.prototype = { session.currentRatchet.ephemeralKeyPair.pubKey ); chain = session[util.toString(msg.ephemeralKey)]; - if (chain.chainType === Internal.ChainType.RECEIVING) { + if (chain.chainType === ChainType.RECEIVING) { throw new Error("Tried to encrypt on a receiving chain"); } return this.fillMessageKeys(chain, chain.chainKey.counter + 1); }.bind(this)).then(function() { - return Internal.HKDF( + return Crypto.HKDF( util.toArrayBuffer(chain.messageKeys[chain.chainKey.counter]), new ArrayBuffer(32), "WhisperMessageKeys"); }).then(function(keys) { @@ -58,7 +68,7 @@ SessionCipher.prototype = { msg.counter = chain.chainKey.counter; msg.previousCounter = session.currentRatchet.previousCounter; - return Internal.crypto.encrypt( + return Crypto.crypto.encrypt( keys[0], buffer, keys[2].slice(0, 16) ).then(function(ciphertext) { msg.ciphertext = ciphertext; @@ -70,7 +80,7 @@ SessionCipher.prototype = { macInput[33*2] = (3 << 4) | 3; macInput.set(new Uint8Array(encodedMsg), 33*2 + 1); - return Internal.crypto.sign(keys[1], macInput.buffer).then(function(mac) { + return Crypto.crypto.sign(keys[1], macInput.buffer).then(function(mac) { var result = new Uint8Array(encodedMsg.byteLength + 9); result[0] = (3 << 4) | 3; result.set(new Uint8Array(encodedMsg), 1); @@ -84,7 +94,7 @@ SessionCipher.prototype = { }.bind(this)); }.bind(this)).then(function(message) { if (session.pendingPreKey !== undefined) { - var preKeyMsg = new Internal.protobuf.PreKeyWhisperMessage(); + var preKeyMsg = new protobuf.PreKeyWhisperMessage(); preKeyMsg.identityKey = util.toArrayBuffer(ourIdentityKey.pubKey); preKeyMsg.registrationId = myRegistrationId; @@ -128,7 +138,7 @@ SessionCipher.prototype = { }, decryptWhisperMessage: function(buffer, encoding) { buffer = dcodeIO.ByteBuffer.wrap(buffer, encoding).toArrayBuffer(); - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { var address = this.remoteAddress.toString(); return this.getRecord(address).then(function(record) { if (!record) { @@ -152,15 +162,15 @@ SessionCipher.prototype = { if ((version & 0xF) > 3 || (version >> 4) < 3) { // min version > 3 or max version < 3 throw new Error("Incompatible version number on PreKeyWhisperMessage"); } - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { var address = this.remoteAddress.toString(); return this.getRecord(address).then(function(record) { - var preKeyProto = Internal.protobuf.PreKeyWhisperMessage.decode(buffer); + var preKeyProto = protobuf.PreKeyWhisperMessage.decode(buffer); if (!record) { if (preKeyProto.registrationId === undefined) { throw new Error("No registrationId"); } - record = new Internal.SessionRecord( + record = new SessionRecord( util.toString(preKeyProto.identityKey), preKeyProto.registrationId ); @@ -185,7 +195,7 @@ SessionCipher.prototype = { }.bind(this)); }, doDecryptWhisperMessage: function(messageBytes, session) { - if (!messageBytes instanceof ArrayBuffer) { + if (!(messageBytes instanceof ArrayBuffer)) { throw new Error("Expected messageBytes to be an ArrayBuffer"); } var version = (new Uint8Array(messageBytes))[0]; @@ -195,7 +205,7 @@ SessionCipher.prototype = { var messageProto = messageBytes.slice(1, messageBytes.byteLength- 8); var mac = messageBytes.slice(messageBytes.byteLength - 8, messageBytes.byteLength); - var message = Internal.protobuf.WhisperMessage.decode(messageProto); + var message = protobuf.WhisperMessage.decode(messageProto); var remoteEphemeralKey = message.ephemeralKey.toArrayBuffer(); if (session === undefined) { @@ -207,7 +217,7 @@ SessionCipher.prototype = { return this.maybeStepRatchet(session, remoteEphemeralKey, message.previousCounter).then(function() { var chain = session[util.toString(message.ephemeralKey)]; - if (chain.chainType === Internal.ChainType.SENDING) { + if (chain.chainType === ChainType.SENDING) { throw new Error("Tried to decrypt on a sending chain"); } @@ -219,7 +229,7 @@ SessionCipher.prototype = { throw e; } delete chain.messageKeys[message.counter]; - return Internal.HKDF(util.toArrayBuffer(messageKey), new ArrayBuffer(32), "WhisperMessageKeys"); + return Crypto.HKDF(util.toArrayBuffer(messageKey), new ArrayBuffer(32), "WhisperMessageKeys"); }); }.bind(this)).then(function(keys) { return this.storage.getIdentityKeyPair().then(function(ourIdentityKey) { @@ -230,9 +240,9 @@ SessionCipher.prototype = { macInput[33*2] = (3 << 4) | 3; macInput.set(new Uint8Array(messageProto), 33*2 + 1); - return Internal.verifyMAC(macInput.buffer, keys[1], mac, 8); + return Crypto.verifyMAC(macInput.buffer, keys[1], mac, 8); }.bind(this)).then(function() { - return Internal.crypto.decrypt(keys[0], message.ciphertext.toArrayBuffer(), keys[2].slice(0, 16)); + return Crypto.crypto.decrypt(keys[0], message.ciphertext.toArrayBuffer(), keys[2].slice(0, 16)); }); }.bind(this)).then(function(plaintext) { delete session.pendingPreKey; @@ -256,9 +266,9 @@ SessionCipher.prototype = { var key = util.toArrayBuffer(chain.chainKey.key); var byteArray = new Uint8Array(1); byteArray[0] = 1; - return Internal.crypto.sign(key, byteArray.buffer).then(function(mac) { + return Crypto.crypto.sign(key, byteArray.buffer).then(function(mac) { byteArray[0] = 2; - return Internal.crypto.sign(key, byteArray.buffer).then(function(key) { + return Crypto.crypto.sign(key, byteArray.buffer).then(function(key) { chain.messageKeys[chain.chainKey.counter + 1] = mac; chain.chainKey.key = key; chain.chainKey.counter += 1; @@ -294,7 +304,7 @@ SessionCipher.prototype = { delete session[previousRatchet]; } - return Internal.crypto.createKeyPair().then(function(keyPair) { + return Crypto.crypto.createKeyPair().then(function(keyPair) { ratchet.ephemeralKeyPair = keyPair; return this.calculateRatchet(session, remoteKey, true).then(function() { ratchet.lastRemoteEphemeralKey = remoteKey; @@ -306,8 +316,8 @@ SessionCipher.prototype = { calculateRatchet: function(session, remoteKey, sending) { var ratchet = session.currentRatchet; - return Internal.crypto.ECDHE(remoteKey, util.toArrayBuffer(ratchet.ephemeralKeyPair.privKey)).then(function(sharedSecret) { - return Internal.HKDF(sharedSecret, util.toArrayBuffer(ratchet.rootKey), "WhisperRatchet").then(function(masterKey) { + return Crypto.crypto.ECDHE(remoteKey, util.toArrayBuffer(ratchet.ephemeralKeyPair.privKey)).then(function(sharedSecret) { + return Crypto.HKDF(sharedSecret, util.toArrayBuffer(ratchet.rootKey), "WhisperRatchet").then(function(masterKey) { var ephemeralPublicKey; if (sending) { ephemeralPublicKey = ratchet.ephemeralKeyPair.pubKey; @@ -318,14 +328,14 @@ SessionCipher.prototype = { session[util.toString(ephemeralPublicKey)] = { messageKeys: {}, chainKey: { counter: -1, key: masterKey[1] }, - chainType: sending ? Internal.ChainType.SENDING : Internal.ChainType.RECEIVING + chainType: sending ? ChainType.SENDING : ChainType.RECEIVING }; ratchet.rootKey = masterKey[0]; }); }); }, getRemoteRegistrationId: function() { - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { return this.getRecord(this.remoteAddress.toString()).then(function(record) { if (record === undefined) { return undefined; @@ -335,7 +345,7 @@ SessionCipher.prototype = { }.bind(this)); }, hasOpenSession: function() { - return Internal.SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { + return SessionLock.queueJobForNumber(this.remoteAddress.toString(), function() { return this.getRecord(this.remoteAddress.toString()).then(function(record) { if (record === undefined) { return false; @@ -346,7 +356,7 @@ SessionCipher.prototype = { }, closeOpenSessionForDevice: function() { var address = this.remoteAddress.toString(); - return Internal.SessionLock.queueJobForNumber(address, function() { + return SessionLock.queueJobForNumber(address, function() { return this.getRecord(address).then(function(record) { if (record === undefined || record.getOpenSession() === undefined) { return; @@ -359,7 +369,7 @@ SessionCipher.prototype = { } }; -libsignal.SessionCipher = function(storage, remoteAddress) { +var mySessionCipher = function(storage, remoteAddress) { var cipher = new SessionCipher(storage, remoteAddress); // returns a Promise that resolves to a ciphertext object @@ -376,3 +386,5 @@ libsignal.SessionCipher = function(storage, remoteAddress) { this.hasOpenSession = cipher.hasOpenSession.bind(cipher); this.closeOpenSessionForDevice = cipher.closeOpenSessionForDevice.bind(cipher); }; + +module.exports = mySessionCipher; diff --git a/src/SessionLock.js b/src/SessionLock.js index 31935f4..27dde25 100644 --- a/src/SessionLock.js +++ b/src/SessionLock.js @@ -2,14 +2,13 @@ * jobQueue manages multiple queues indexed by device to serialize * session io ops on the database. */ -;(function() { 'use strict'; -Internal.SessionLock = {}; +var SessionLock = {}; var jobQueue = {}; -Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJob) { +SessionLock.queueJobForNumber = function queueJobForNumber(number, runJob) { var runPrevious = jobQueue[number] || Promise.resolve(); var runCurrent = jobQueue[number] = runPrevious.then(runJob, runJob); runCurrent.then(function() { @@ -20,4 +19,4 @@ Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJ return runCurrent; }; -})(); +module.exports = SessionLock; diff --git a/src/SessionRecord.js b/src/SessionRecord.js index eec9d86..8248f6a 100644 --- a/src/SessionRecord.js +++ b/src/SessionRecord.js @@ -2,20 +2,14 @@ * vim: ts=4:sw=4 */ -var Internal = Internal || {}; +var util = require('./helpers.js'); +var dcodeIO = require('../build/dcodeIO.js'); -Internal.BaseKeyType = { - OURS: 1, - THEIRS: 2 -}; -Internal.ChainType = { - SENDING: 1, - RECEIVING: 2 -}; +var BaseKeyType = require('./BaseKeyType.js'); var ARCHIVED_STATES_MAX_LENGTH = 40; -Internal.SessionRecord = function() { +var SessionRecord = function() { 'use strict'; var MESSAGE_LOST_THRESHOLD_MS = 1000*60*60*24*7; @@ -98,7 +92,7 @@ Internal.SessionRecord = function() { getSessionByBaseKey: function(baseKey) { var session = this._sessions[util.toString(baseKey)]; - if (session && session.indexInfo.baseKeyType === Internal.BaseKeyType.OURS) { + if (session && session.indexInfo.baseKeyType === BaseKeyType.OURS) { console.log("Tried to lookup a session using our basekey"); return undefined; } @@ -273,3 +267,5 @@ Internal.SessionRecord = function() { return SessionRecord; }(); + +module.exports = SessionRecord; diff --git a/src/SignalProtocolAddress.js b/src/SignalProtocolAddress.js index bc95911..fb24ddf 100644 --- a/src/SignalProtocolAddress.js +++ b/src/SignalProtocolAddress.js @@ -19,7 +19,7 @@ SignalProtocolAddress.prototype = { } }; -libsignal.SignalProtocolAddress = function(name, deviceId) { +var mySignalProtocolAddress = function(name, deviceId) { var address = new SignalProtocolAddress(name, deviceId); ['getName', 'getDeviceId', 'toString', 'equals'].forEach(function(method) { @@ -27,10 +27,12 @@ libsignal.SignalProtocolAddress = function(name, deviceId) { }.bind(this)); }; -libsignal.SignalProtocolAddress.fromString = function(encodedAddress) { +mySignalProtocolAddress.fromString = function(encodedAddress) { if (typeof encodedAddress !== 'string' || !encodedAddress.match(/.*\.\d+/)) { throw new Error('Invalid SignalProtocolAddress string'); } var parts = encodedAddress.split('.'); - return new libsignal.SignalProtocolAddress(parts[0], parseInt(parts[1])); + return new mySignalProtocolAddress(parts[0], parseInt(parts[1])); }; + +module.exports = mySignalProtocolAddress; diff --git a/src/crypto.js b/src/crypto.js index 26df2f8..05e8387 100644 --- a/src/crypto.js +++ b/src/crypto.js @@ -1,135 +1,141 @@ /* * vim: ts=4:sw=4 */ +'use strict'; -var Internal = Internal || {}; +// TODO polyfill window.crypto for node? +var crypto = window.crypto; -(function() { - 'use strict'; +var Curve = require('./Curve.js'); +var util = require('./helpers.js'); +var dcodeIO = require('../build/dcodeIO.js'); - var crypto = window.crypto; +if (!crypto || !crypto.subtle || typeof crypto.getRandomValues !== 'function') { + throw new Error('WebCrypto not found'); +} - if (!crypto || !crypto.subtle || typeof crypto.getRandomValues !== 'function') { - throw new Error('WebCrypto not found'); - } - - Internal.crypto = { - getRandomBytes: function(size) { - var array = new Uint8Array(size); - crypto.getRandomValues(array); - return array.buffer; - }, - encrypt: function(key, data, iv) { - return crypto.subtle.importKey('raw', key, {name: 'AES-CBC'}, false, ['encrypt']).then(function(key) { - return crypto.subtle.encrypt({name: 'AES-CBC', iv: new Uint8Array(iv)}, key, data); - }); - }, - decrypt: function(key, data, iv) { - return crypto.subtle.importKey('raw', key, {name: 'AES-CBC'}, false, ['decrypt']).then(function(key) { - return crypto.subtle.decrypt({name: 'AES-CBC', iv: new Uint8Array(iv)}, key, data); - }); - }, - sign: function(key, data) { - return crypto.subtle.importKey('raw', key, {name: 'HMAC', hash: {name: 'SHA-256'}}, false, ['sign']).then(function(key) { - return crypto.subtle.sign( {name: 'HMAC', hash: 'SHA-256'}, key, data); - }); - }, +// object for this crypto.js scope +var myCrypto = {}; - hash: function(data) { - return crypto.subtle.digest({name: 'SHA-512'}, data); - }, +myCrypto.crypto = { + getRandomBytes: function(size) { + var array = new Uint8Array(size); + crypto.getRandomValues(array); + return array.buffer; + }, + encrypt: function(key, data, iv) { + return crypto.subtle.importKey('raw', key, {name: 'AES-CBC'}, false, ['encrypt']).then(function(key) { + return crypto.subtle.encrypt({name: 'AES-CBC', iv: new Uint8Array(iv)}, key, data); + }); + }, + decrypt: function(key, data, iv) { + return crypto.subtle.importKey('raw', key, {name: 'AES-CBC'}, false, ['decrypt']).then(function(key) { + return crypto.subtle.decrypt({name: 'AES-CBC', iv: new Uint8Array(iv)}, key, data); + }); + }, + sign: function(key, data) { + return crypto.subtle.importKey('raw', key, {name: 'HMAC', hash: {name: 'SHA-256'}}, false, ['sign']).then(function(key) { + return crypto.subtle.sign( {name: 'HMAC', hash: 'SHA-256'}, key, data); + }); + }, - HKDF: function(input, salt, info) { - // Specific implementation of RFC 5869 that only returns the first 3 32-byte chunks - // TODO: We dont always need the third chunk, we might skip it - return Internal.crypto.sign(salt, input).then(function(PRK) { - var infoBuffer = new ArrayBuffer(info.byteLength + 1 + 32); - var infoArray = new Uint8Array(infoBuffer); - infoArray.set(new Uint8Array(info), 32); - infoArray[infoArray.length - 1] = 1; - return Internal.crypto.sign(PRK, infoBuffer.slice(32)).then(function(T1) { - infoArray.set(new Uint8Array(T1)); - infoArray[infoArray.length - 1] = 2; - return Internal.crypto.sign(PRK, infoBuffer).then(function(T2) { - infoArray.set(new Uint8Array(T2)); - infoArray[infoArray.length - 1] = 3; - return Internal.crypto.sign(PRK, infoBuffer).then(function(T3) { - return [ T1, T2, T3 ]; - }); - }); - }); - }); - }, + hash: function(data) { + return crypto.subtle.digest({name: 'SHA-512'}, data); + }, - // Curve 25519 crypto - createKeyPair: function(privKey) { - if (privKey === undefined) { - privKey = Internal.crypto.getRandomBytes(32); - } - return Internal.Curve.async.createKeyPair(privKey); - }, - ECDHE: function(pubKey, privKey) { - return Internal.Curve.async.ECDHE(pubKey, privKey); - }, - Ed25519Sign: function(privKey, message) { - return Internal.Curve.async.Ed25519Sign(privKey, message); - }, - Ed25519Verify: function(pubKey, msg, sig) { - return Internal.Curve.async.Ed25519Verify(pubKey, msg, sig); - } - }; + HKDF: function(input, salt, info) { + // Specific implementation of RFC 5869 that only returns the first 3 32-byte chunks + // TODO: We dont always need the third chunk, we might skip it + return myCrypto.crypto.sign(salt, input).then(function(PRK) { + var infoBuffer = new ArrayBuffer(info.byteLength + 1 + 32); + var infoArray = new Uint8Array(infoBuffer); + infoArray.set(new Uint8Array(info), 32); + infoArray[infoArray.length - 1] = 1; + return myCrypto.crypto.sign(PRK, infoBuffer.slice(32)).then(function(T1) { + infoArray.set(new Uint8Array(T1)); + infoArray[infoArray.length - 1] = 2; + return myCrypto.crypto.sign(PRK, infoBuffer).then(function(T2) { + infoArray.set(new Uint8Array(T2)); + infoArray[infoArray.length - 1] = 3; + return myCrypto.crypto.sign(PRK, infoBuffer).then(function(T3) { + return [ T1, T2, T3 ]; + }); + }); + }); + }); + }, + // Curve 25519 crypto + createKeyPair: function(privKey) { + if (privKey === undefined) { + privKey = myCrypto.crypto.getRandomBytes(32); + } + return Curve.async.createKeyPair(privKey); + }, + ECDHE: function(pubKey, privKey) { + return Curve.async.ECDHE(pubKey, privKey); + }, + Ed25519Sign: function(privKey, message) { + return Curve.async.Ed25519Sign(privKey, message); + }, + Ed25519Verify: function(pubKey, msg, sig) { + return Curve.async.Ed25519Verify(pubKey, msg, sig); + } +}; - // HKDF for TextSecure has a bit of additional handling - salts always end up being 32 bytes - Internal.HKDF = function(input, salt, info) { - if (salt.byteLength != 32) { - throw new Error("Got salt of incorrect length"); - } - return Internal.crypto.HKDF(input, salt, util.toArrayBuffer(info)); - }; +// HKDF for TextSecure has a bit of additional handling - salts always end up being 32 bytes +myCrypto.HKDF = function(input, salt, info) { + if (salt.byteLength != 32) { + throw new Error("Got salt of incorrect length"); + } - Internal.verifyMAC = function(data, key, mac, length) { - return Internal.crypto.sign(key, data).then(function(calculated_mac) { - if (mac.byteLength != length || calculated_mac.byteLength < length) { - throw new Error("Bad MAC length"); - } - var a = new Uint8Array(calculated_mac); - var b = new Uint8Array(mac); - var result = 0; - for (var i=0; i < mac.byteLength; ++i) { - result = result | (a[i] ^ b[i]); - } - if (result !== 0) { - console.log('Our MAC ', dcodeIO.ByteBuffer.wrap(calculated_mac).toHex()); - console.log('Their MAC', dcodeIO.ByteBuffer.wrap(mac).toHex()); - throw new Error("Bad MAC"); - } - }); - }; + return myCrypto.crypto.HKDF(input, salt, util.toArrayBuffer(info)); +}; - libsignal.HKDF = { - deriveSecrets: function(input, salt, info) { - return Internal.HKDF(input, salt, info); - } - }; +myCrypto.verifyMAC = function(data, key, mac, length) { + return myCrypto.crypto.sign(key, data).then(function(calculated_mac) { + if (mac.byteLength != length || calculated_mac.byteLength < length) { + throw new Error("Bad MAC length"); + } + var a = new Uint8Array(calculated_mac); + var b = new Uint8Array(mac); + var result = 0; + for (var i=0; i < mac.byteLength; ++i) { + result = result | (a[i] ^ b[i]); + } + if (result !== 0) { + console.log('Our MAC ', dcodeIO.ByteBuffer.wrap(calculated_mac).toHex()); + console.log('Their MAC', dcodeIO.ByteBuffer.wrap(mac).toHex()); + throw new Error("Bad MAC"); + } + }); +}; - libsignal.crypto = { - encrypt: function(key, data, iv) { - return Internal.crypto.encrypt(key, data, iv); - }, - decrypt: function(key, data, iv) { - return Internal.crypto.decrypt(key, data, iv); - }, - calculateMAC: function(key, data) { - return Internal.crypto.sign(key, data); - }, - verifyMAC: function(data, key, mac, length) { - return Internal.verifyMAC(data, key, mac, length); - }, - getRandomBytes: function(size) { - return Internal.crypto.getRandomBytes(size); - } - }; +module.exports = myCrypto; -})(); +// TODO will need to include these later...maybe? +// module.exports = { +// HKDF: { +// deriveSecrets: function(input, salt, info) { +// return myCrypto.HKDF(input, salt, info); +// }, +// }, +// crypto: { +// encrypt: function(key, data, iv) { +// return myCrypto.crypto.encrypt(key, data, iv); +// }, +// decrypt: function(key, data, iv) { +// return myCrypto.crypto.decrypt(key, data, iv); +// }, +// calculateMAC: function(key, data) { +// return myCrypto.crypto.sign(key, data); +// }, +// verifyMAC: function(data, key, mac, length) { +// return myCrypto.verifyMAC(data, key, mac, length); +// }, +// getRandomBytes: function(size) { +// return myCrypto.crypto.getRandomBytes(size); +// } +// } +// }; diff --git a/src/curve25519_worker.js b/src/curve25519_worker.js index dca8d08..d85e4ec 100644 --- a/src/curve25519_worker.js +++ b/src/curve25519_worker.js @@ -1,9 +1,12 @@ -var Internal = Internal || {}; +var CurveWrapper = require('./curve25519_wrapper.js'); // I am the worker -this.onmessage = function(e) { - Internal.curve25519_async[e.data.methodName].apply(null, e.data.args).then(function(result) { - postMessage({ id: e.data.id, result: result }); + +module.exports = function (self) { + self.onmessage = function(e) { + CurveWrapper.curve25519_async[e.data.methodName].apply(null, e.data.args).then(function(result) { + self.postMessage({ id: e.data.id, result: result }); }).catch(function(error) { - postMessage({ id: e.data.id, error: error.message }); + self.postMessage({ id: e.data.id, error: error.message }); }); + }; }; diff --git a/src/curve25519_worker_manager.js b/src/curve25519_worker_manager.js index a33b854..46bcc19 100644 --- a/src/curve25519_worker_manager.js +++ b/src/curve25519_worker_manager.js @@ -1,64 +1,74 @@ -;(function() { - 'use strict'; + +// TODO +// +// +// turn this into a working worker +// +// +// +// hints +// - follow substacks model so that worker will at least log +// - see that its sending messages back +// - see that we can see those messages here + +var work = require('webworkify'); +var Internal = {}; + // I am the...workee? -var origCurve25519 = Internal.curve25519_async; +var origCurve25519 = require('./curve25519_wrapper.js'); Internal.startWorker = function(url) { - Internal.stopWorker(); // there can be only one - Internal.curve25519_async = new Curve25519Worker(url); + Internal.stopWorker(); // there can be only one + Internal.curve25519_async = new Curve25519Worker(url); }; Internal.stopWorker = function() { - if (Internal.curve25519_async instanceof Curve25519Worker) { - var worker = Internal.curve25519_async.worker; - Internal.curve25519_async = origCurve25519; - worker.terminate(); - } + if (Internal.curve25519_async instanceof Curve25519Worker) { + var worker = Internal.curve25519_async.worker; + Internal.curve25519_async = origCurve25519; + worker.terminate(); + } }; -libsignal.worker = { - startWorker: Internal.startWorker, - stopWorker: Internal.stopWorker, -}; - -function Curve25519Worker(url) { - this.jobs = {}; - this.jobId = 0; - this.worker = new Worker(url); - this.worker.onmessage = function(e) { - var job = this.jobs[e.data.id]; - if (e.data.error && typeof job.onerror === 'function') { - job.onerror(new Error(e.data.error)); - } else if (typeof job.onsuccess === 'function') { - job.onsuccess(e.data.result); - } - delete this.jobs[e.data.id]; - }.bind(this); +function Curve25519Worker() { + this.jobs = {}; + this.jobId = 0; + this.worker = work(require('./curve25519_worker.js')); + // this.worker = new Worker(url); + this.worker.onmessage = function(e) { + var job = this.jobs[e.data.id]; + if (e.data.error && typeof job.onerror === 'function') { + job.onerror(new Error(e.data.error)); + } else if (typeof job.onsuccess === 'function') { + job.onsuccess(e.data.result); + } + delete this.jobs[e.data.id]; + }.bind(this); } Curve25519Worker.prototype = { - constructor: Curve25519Worker, - postMessage: function(methodName, args, onsuccess, onerror) { - return new Promise(function(resolve, reject) { - this.jobs[this.jobId] = { onsuccess: resolve, onerror: reject }; - this.worker.postMessage({ id: this.jobId, methodName: methodName, args: args }); - this.jobId++; - }.bind(this)); - }, - keyPair: function(privKey) { - return this.postMessage('keyPair', [privKey]); - }, - sharedSecret: function(pubKey, privKey) { - return this.postMessage('sharedSecret', [pubKey, privKey]); - }, - sign: function(privKey, message) { - return this.postMessage('sign', [privKey, message]); - }, - verify: function(pubKey, message, sig) { - return this.postMessage('verify', [pubKey, message, sig]); - } + constructor: Curve25519Worker, + postMessage: function(methodName, args, onsuccess, onerror) { + return new Promise(function(resolve, reject) { + this.jobs[this.jobId] = { onsuccess: resolve, onerror: reject }; + this.worker.postMessage({ id: this.jobId, methodName: methodName, args: args }); + this.jobId++; + }.bind(this)); + }, + keyPair: function(privKey) { + return this.postMessage('keyPair', [privKey]); + }, + sharedSecret: function(pubKey, privKey) { + return this.postMessage('sharedSecret', [pubKey, privKey]); + }, + sign: function(privKey, message) { + return this.postMessage('sign', [privKey, message]); + }, + verify: function(pubKey, message, sig) { + return this.postMessage('verify', [pubKey, message, sig]); + } }; -})(); +module.exports = Internal; diff --git a/src/curve25519_wrapper.js b/src/curve25519_wrapper.js index ed45715..2bddbe9 100644 --- a/src/curve25519_wrapper.js +++ b/src/curve25519_wrapper.js @@ -1,151 +1,150 @@ -/* vim: ts=4:sw=4:expandtab */ -var Internal = Internal || {}; - -(function() { - 'use strict'; +'use strict'; - // Insert some bytes into the emscripten memory and return a pointer - function _allocate(bytes) { - var address = Module._malloc(bytes.length); - Module.HEAPU8.set(bytes, address); +var Internal = Internal || {}; +var Module = require('../build/curve25519_concat.js'); - return address; - } +// Insert some bytes into the emscripten memory and return a pointer +function _allocate(bytes) { + var address = Module._malloc(bytes.length); + Module.HEAPU8.set(bytes, address); - function _readBytes(address, length, array) { - array.set(Module.HEAPU8.subarray(address, address + length)); - } + return address; +} - var basepoint = new Uint8Array(32); - basepoint[0] = 9; +function _readBytes(address, length, array) { + array.set(Module.HEAPU8.subarray(address, address + length)); +} - Internal.curve25519 = { - keyPair: function(privKey) { - var priv = new Uint8Array(privKey); - priv[0] &= 248; - priv[31] &= 127; - priv[31] |= 64; +var basepoint = new Uint8Array(32); +basepoint[0] = 9; - // Where to store the result - var publicKey_ptr = Module._malloc(32); - - // Get a pointer to the private key - var privateKey_ptr = _allocate(priv); - - // The basepoint for generating public keys - var basepoint_ptr = _allocate(basepoint); - - // The return value is just 0, the operation is done in place - var err = Module._curve25519_donna(publicKey_ptr, - privateKey_ptr, - basepoint_ptr); - - var res = new Uint8Array(32); - _readBytes(publicKey_ptr, 32, res); - - Module._free(publicKey_ptr); - Module._free(privateKey_ptr); - Module._free(basepoint_ptr); - - return { pubKey: res.buffer, privKey: priv.buffer }; - }, - sharedSecret: function(pubKey, privKey) { - // Where to store the result - var sharedKey_ptr = Module._malloc(32); - - // Get a pointer to our private key - var privateKey_ptr = _allocate(new Uint8Array(privKey)); - - // Get a pointer to their public key, the basepoint when you're - // generating a shared secret - var basepoint_ptr = _allocate(new Uint8Array(pubKey)); - - // Return value is 0 here too of course - var err = Module._curve25519_donna(sharedKey_ptr, - privateKey_ptr, - basepoint_ptr); - - var res = new Uint8Array(32); - _readBytes(sharedKey_ptr, 32, res); - - Module._free(sharedKey_ptr); - Module._free(privateKey_ptr); - Module._free(basepoint_ptr); - - return res.buffer; - }, - sign: function(privKey, message) { - // Where to store the result - var signature_ptr = Module._malloc(64); - - // Get a pointer to our private key - var privateKey_ptr = _allocate(new Uint8Array(privKey)); - - // Get a pointer to the message - var message_ptr = _allocate(new Uint8Array(message)); - - var err = Module._curve25519_sign(signature_ptr, - privateKey_ptr, - message_ptr, - message.byteLength); - - var res = new Uint8Array(64); - _readBytes(signature_ptr, 64, res); - - Module._free(signature_ptr); - Module._free(privateKey_ptr); - Module._free(message_ptr); - - return res.buffer; - }, - verify: function(pubKey, message, sig) { - // Get a pointer to their public key - var publicKey_ptr = _allocate(new Uint8Array(pubKey)); - - // Get a pointer to the signature - var signature_ptr = _allocate(new Uint8Array(sig)); - - // Get a pointer to the message - var message_ptr = _allocate(new Uint8Array(message)); - - var res = Module._curve25519_verify(signature_ptr, - publicKey_ptr, - message_ptr, - message.byteLength); - - Module._free(publicKey_ptr); - Module._free(signature_ptr); - Module._free(message_ptr); - - return res !== 0; - } - }; - - Internal.curve25519_async = { - keyPair: function(privKey) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.keyPair(privKey)); - }); - }, - sharedSecret: function(pubKey, privKey) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.sharedSecret(pubKey, privKey)); - }); - }, - sign: function(privKey, message) { - return new Promise(function(resolve) { - resolve(Internal.curve25519.sign(privKey, message)); - }); - }, - verify: function(pubKey, message, sig) { - return new Promise(function(resolve, reject) { - if (Internal.curve25519.verify(pubKey, message, sig)) { - reject(new Error("Invalid signature")); - } else { - resolve(); - } - }); - }, - }; - -})(); +Internal.curve25519 = { + keyPair: function(privKey) { + var priv = new Uint8Array(privKey); + priv[0] &= 248; + priv[31] &= 127; + priv[31] |= 64; + + // Where to store the result + var publicKey_ptr = Module._malloc(32); + + // Get a pointer to the private key + var privateKey_ptr = _allocate(priv); + + // The basepoint for generating public keys + var basepoint_ptr = _allocate(basepoint); + + // The return value is just 0, the operation is done in place + var err = Module._curve25519_donna(publicKey_ptr, + privateKey_ptr, + basepoint_ptr); + + var res = new Uint8Array(32); + _readBytes(publicKey_ptr, 32, res); + + Module._free(publicKey_ptr); + Module._free(privateKey_ptr); + Module._free(basepoint_ptr); + + return { pubKey: res.buffer, privKey: priv.buffer }; + }, + sharedSecret: function(pubKey, privKey) { + // Where to store the result + var sharedKey_ptr = Module._malloc(32); + + // Get a pointer to our private key + var privateKey_ptr = _allocate(new Uint8Array(privKey)); + + // Get a pointer to their public key, the basepoint when you're + // generating a shared secret + var basepoint_ptr = _allocate(new Uint8Array(pubKey)); + + // Return value is 0 here too of course + var err = Module._curve25519_donna(sharedKey_ptr, + privateKey_ptr, + basepoint_ptr); + + var res = new Uint8Array(32); + _readBytes(sharedKey_ptr, 32, res); + + Module._free(sharedKey_ptr); + Module._free(privateKey_ptr); + Module._free(basepoint_ptr); + + return res.buffer; + }, + sign: function(privKey, message) { + // Where to store the result + var signature_ptr = Module._malloc(64); + + // Get a pointer to our private key + var privateKey_ptr = _allocate(new Uint8Array(privKey)); + + // Get a pointer to the message + var message_ptr = _allocate(new Uint8Array(message)); + + var err = Module._curve25519_sign(signature_ptr, + privateKey_ptr, + message_ptr, + message.byteLength); + + var res = new Uint8Array(64); + _readBytes(signature_ptr, 64, res); + + Module._free(signature_ptr); + Module._free(privateKey_ptr); + Module._free(message_ptr); + + return res.buffer; + }, + verify: function(pubKey, message, sig) { + // Get a pointer to their public key + var publicKey_ptr = _allocate(new Uint8Array(pubKey)); + + // Get a pointer to the signature + var signature_ptr = _allocate(new Uint8Array(sig)); + + // Get a pointer to the message + var message_ptr = _allocate(new Uint8Array(message)); + + var res = Module._curve25519_verify(signature_ptr, + publicKey_ptr, + message_ptr, + message.byteLength); + + Module._free(publicKey_ptr); + Module._free(signature_ptr); + Module._free(message_ptr); + + return res !== 0; + } +}; + +Internal.curve25519_async = { + keyPair: function(privKey) { + return new Promise(function(resolve) { + resolve(Internal.curve25519.keyPair(privKey)); + }); + }, + sharedSecret: function(pubKey, privKey) { + return new Promise(function(resolve) { + resolve(Internal.curve25519.sharedSecret(pubKey, privKey)); + }); + }, + sign: function(privKey, message) { + return new Promise(function(resolve) { + resolve(Internal.curve25519.sign(privKey, message)); + }); + }, + verify: function(pubKey, message, sig) { + return new Promise(function(resolve, reject) { + if (Internal.curve25519.verify(pubKey, message, sig)) { + reject(new Error("Invalid signature")); + } else { + resolve(); + } + }); + }, +}; + +module.exports = Internal; diff --git a/src/helpers.js b/src/helpers.js index b3c800f..f2a3598 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -1,49 +1,55 @@ /* * vim: ts=4:sw=4 */ +'use strict'; -var util = (function() { - 'use strict'; - var StaticArrayBufferProto = new ArrayBuffer().__proto__; +var dcodeIO = require('../build/dcodeIO.js'); +var StaticArrayBufferProto = new ArrayBuffer().__proto__; - return { - toString: function(thing) { - if (typeof thing == 'string') { - return thing; - } - return new dcodeIO.ByteBuffer.wrap(thing).toString('binary'); - }, - toArrayBuffer: function(thing) { - if (thing === undefined) { - return undefined; - } - if (thing === Object(thing)) { - if (thing.__proto__ == StaticArrayBufferProto) { - return thing; - } - } +function toString (thing) { + if (typeof thing == 'string') { + return thing; + } + return new dcodeIO.ByteBuffer.wrap(thing).toString('binary'); +} - var str; - if (typeof thing == "string") { - str = thing; - } else { - throw new Error("Tried to convert a non-string of type " + typeof thing + " to an array buffer"); - } - return new dcodeIO.ByteBuffer.wrap(thing, 'binary').toArrayBuffer(); - }, - isEqual: function(a, b) { - // TODO: Special-case arraybuffers, etc - if (a === undefined || b === undefined) { - return false; - } - a = util.toString(a); - b = util.toString(b); - var maxLength = Math.max(a.length, b.length); - if (maxLength < 5) { - throw new Error("a/b compare too short"); - } - return a.substring(0, Math.min(maxLength, a.length)) == b.substring(0, Math.min(maxLength, b.length)); - } - }; -})(); +function toArrayBuffer (thing) { + if (thing === undefined) { + return undefined; + } + if (thing === Object(thing)) { + if (thing.__proto__ == StaticArrayBufferProto) { + return thing; + } + } + var str; + if (typeof thing == "string") { + str = thing; + } else { + throw new Error("Tried to convert a non-string of type " + typeof thing + " to an array buffer"); + } + return new dcodeIO.ByteBuffer.wrap(thing, 'binary').toArrayBuffer(); +} + +function isEqual (a, b) { + // TODO: Special-case arraybuffers, etc + if (a === undefined || b === undefined) { + return false; + } + a = toString(a); + b = toString(b); + var maxLength = Math.max(a.length, b.length); + if (maxLength < 5) { + throw new Error("a/b compare too short"); + } + return a.substring(0, Math.min(maxLength, a.length)) == b.substring(0, Math.min(maxLength, b.length)); +} + +var util = { + toString: toString, + toArrayBuffer: toArrayBuffer, + isEqual: isEqual +}; + +module.exports = util; diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..acb7dcf --- /dev/null +++ b/src/main.js @@ -0,0 +1,10 @@ +module.exports = { + KeyHelper: require('./KeyHelper.js'), + SignalProtocolAddress: require('./SignalProtocolAddress.js'), + SessionBuilder: require('./SessionBuilder.js'), + SessionCipher: require('./SessionCipher.js'), + FingerprintGenerator: require('./NumericFingerprint.js'), + // internal stuff + _crypto: require('./crypto.js'), + _curve: require('./Curve.js') +}; diff --git a/src/main_window.js b/src/main_window.js new file mode 100644 index 0000000..5a2fd1f --- /dev/null +++ b/src/main_window.js @@ -0,0 +1,4 @@ +// for legacy builds +// we browserify bundle this into a js file for folks to include in their html +var libsignal = require('./main.js'); +window.libsignal = libsignal; diff --git a/src/protobufs.js b/src/protobufs.js index a16019c..cbecc23 100644 --- a/src/protobufs.js +++ b/src/protobufs.js @@ -1,17 +1,22 @@ /* vim: ts=4:sw=4 */ -var Internal = Internal || {}; -Internal.protobuf = function() { - 'use strict'; +// this is concatinated after ../protos/WhisperTextProtocol.proto +// Internal.protoText is getting passed in from that file +// (see the Gruntfile's `protos_concat` routine) +// here we export the loaded protobuf, an object +// { WhisperMessage, PreKeyWhisperMessage } +module.exports = function protobuf() { + 'use strict'; + var dcodeIO = require('../build/dcodeIO.js'); - function loadProtoBufs(filename) { - return dcodeIO.ProtoBuf.loadProto(Internal.protoText['protos/' + filename]).build('textsecure'); - } + function loadProtoBufs(filename) { + return dcodeIO.loadProto(Internal.protoText['protos/' + filename]).build('textsecure'); + } - var protocolMessages = loadProtoBufs('WhisperTextProtocol.proto'); + var protocolMessages = loadProtoBufs('WhisperTextProtocol.proto'); - return { - WhisperMessage : protocolMessages.WhisperMessage, - PreKeyWhisperMessage : protocolMessages.PreKeyWhisperMessage - }; + return { + WhisperMessage : protocolMessages.WhisperMessage, + PreKeyWhisperMessage : protocolMessages.PreKeyWhisperMessage + }; }(); diff --git a/test/IdentityKeyStore_test.js b/test/IdentityKeyStore_test.js index 45c1724..864420c 100644 --- a/test/IdentityKeyStore_test.js +++ b/test/IdentityKeyStore_test.js @@ -1,61 +1,65 @@ +var Crypto = require('../src/crypto.js'); + function testIdentityKeyStore(store, registrationId, identityKey) { - describe('IdentityKeyStore', function() { - var number = '+5558675309'; - var testKey; - before(function(done) { - Internal.crypto.createKeyPair().then(function(keyPair) { - testKey = keyPair; - }).then(done,done); - }); + describe('IdentityKeyStore', function() { + var number = '+5558675309'; + var testKey; + before(function(done) { + Crypto.crypto.createKeyPair().then(function(keyPair) { + testKey = keyPair; + }).then(done,done); + }); - describe('getLocalRegistrationId', function() { - it('retrieves my registration id', function(done) { - store.getLocalRegistrationId().then(function(reg) { - assert.strictEqual(reg, registrationId); - }).then(done, done); - }); - }); - describe('getIdentityKeyPair', function() { - it('retrieves my identity key', function(done) { - store.getIdentityKeyPair().then(function(key) { - assertEqualArrayBuffers(key.pubKey, identityKey.pubKey); - assertEqualArrayBuffers(key.privKey, identityKey.privKey); - }).then(done,done); - }); - }); - describe('saveIdentity', function() { - it('stores identity keys', function(done) { - store.saveIdentity(number, testKey.pubKey).then(function() { - return store.loadIdentityKey(number).then(function(key) { - assertEqualArrayBuffers(key, testKey.pubKey); - }); - }).then(done,done); - }); + describe('getLocalRegistrationId', function() { + it('retrieves my registration id', function(done) { + store.getLocalRegistrationId().then(function(reg) { + assert.strictEqual(reg, registrationId); + }).then(done, done); + }); + }); + describe('getIdentityKeyPair', function() { + it('retrieves my identity key', function(done) { + store.getIdentityKeyPair().then(function(key) { + assertEqualArrayBuffers(key.pubKey, identityKey.pubKey); + assertEqualArrayBuffers(key.privKey, identityKey.privKey); + }).then(done,done); + }); + }); + describe('saveIdentity', function() { + it('stores identity keys', function(done) { + store.saveIdentity(number, testKey.pubKey).then(function() { + return store.loadIdentityKey(number).then(function(key) { + assertEqualArrayBuffers(key, testKey.pubKey); + }); + }).then(done,done); + }); + }); + describe('isTrustedIdentity', function() { + it('returns true if a key is trusted', function(done) { + store.saveIdentity(number, testKey.pubKey).then(function() { + store.isTrustedIdentity(number, testKey.pubKey).then(function(trusted) { + if (trusted) { + done(); + } else { + done(new Error('Wrong value for trusted key')); + } + }).catch(done); }); - describe('isTrustedIdentity', function() { - it('returns true if a key is trusted', function(done) { - store.saveIdentity(number, testKey.pubKey).then(function() { - store.isTrustedIdentity(number, testKey.pubKey).then(function(trusted) { - if (trusted) { - done(); - } else { - done(new Error('Wrong value for trusted key')); - } - }).catch(done); - }); - }); - it('returns false if a key is untrusted', function(done) { - var newIdentity = libsignal.crypto.getRandomBytes(33); - store.saveIdentity(number, testKey.pubKey).then(function() { - store.isTrustedIdentity(number, newIdentity).then(function(trusted) { - if (trusted) { - done(new Error('Wrong value for untrusted key')); - } else { - done(); - } - }).catch(done); - }); - }); + }); + it('returns false if a key is untrusted', function(done) { + var newIdentity = Crypto.crypto.getRandomBytes(33); + store.saveIdentity(number, testKey.pubKey).then(function() { + store.isTrustedIdentity(number, newIdentity).then(function(trusted) { + if (trusted) { + done(new Error('Wrong value for untrusted key')); + } else { + done(); + } + }).catch(done); }); + }); }); + }); } + +module.exports = testIdentityKeyStore; diff --git a/test/InMemorySignalProtocolStore.js b/test/InMemorySignalProtocolStore.js index 35f48db..6925327 100644 --- a/test/InMemorySignalProtocolStore.js +++ b/test/InMemorySignalProtocolStore.js @@ -1,3 +1,5 @@ +var util = require('../src/helpers.js'); + function SignalProtocolStore() { this.store = {}; } @@ -101,3 +103,5 @@ SignalProtocolStore.prototype = { return Promise.resolve(); } }; + +module.exports = SignalProtocolStore; diff --git a/test/IntegrationTest.js b/test/IntegrationTest.js new file mode 100644 index 0000000..17de654 --- /dev/null +++ b/test/IntegrationTest.js @@ -0,0 +1,109 @@ +let signal = require('..'); + +describe('Integration test', function() { + it('imports all methods', function(done) { + assert.isDefined(signal); + assert.isDefined(signal.KeyHelper); + assert.isDefined(signal.SignalProtocolAddress); + assert.isDefined(signal.SessionBuilder); + assert.isDefined(signal.SessionCipher); + assert.isDefined(signal.FingerprintGenerator); + assert.isDefined(signal._crypto); + assert.isDefined(signal._curve); + done(); + }); + + it('can play out install-time key stuff', function (done) { + var KeyHelper = signal.KeyHelper; + var registrationId = KeyHelper.generateRegistrationId(); + var keyId = 1337; + var ikp = null; // ref for later + assert.isDefined(registrationId); + KeyHelper.generateIdentityKeyPair().then(function(identityKeyPair) { + assert.isDefined(identityKeyPair.pubKey); + assert.isDefined(identityKeyPair.privKey); + ikp = identityKeyPair; + }).then(function () { + return KeyHelper.generatePreKey(keyId); + }).then(function(preKey) { + assert.isDefined(preKey.keyId); + assert.isDefined(preKey.keyPair); + }).then(function () { + return KeyHelper.generateSignedPreKey(ikp, keyId); + }).then(function(signedPreKey) { + assert.isDefined(signedPreKey.keyId); + assert.isDefined(signedPreKey.keyPair); + }).then(done, done); + }); + + function generateIdentity(store) { + return Promise.all([ + signal.KeyHelper.generateIdentityKeyPair(), + signal.KeyHelper.generateRegistrationId(), + ]).then(function(result) { + store.put('identityKey', result[0]); + store.put('registrationId', result[1]); + }); + } + + function generatePreKeyBundle(store, preKeyId, signedPreKeyId) { + return Promise.all([ + store.getIdentityKeyPair(), + store.getLocalRegistrationId() + ]).then(function(result) { + var identity = result[0]; + var registrationId = result[1]; + + return Promise.all([ + signal.KeyHelper.generatePreKey(preKeyId), + signal.KeyHelper.generateSignedPreKey(identity, signedPreKeyId), + ]).then(function(keys) { + var preKey = keys[0]; + var signedPreKey = keys[1]; + + store.storePreKey(preKeyId, preKey.keyPair); + store.storeSignedPreKey(signedPreKeyId, signedPreKey.keyPair); + + return { + identityKey: identity.pubKey, + registrationId : registrationId, + preKey: { + keyId : preKeyId, + publicKey : preKey.keyPair.pubKey + }, + signedPreKey: { + keyId : signedPreKeyId, + publicKey : signedPreKey.keyPair.pubKey, + signature : signedPreKey.signature + } + }; + }); + }); + } + + it('can play out session building stuff + encrypt', function (done) { + var name = 'name'; + var deviceId = 42; + var MySignalProtocolStore = require('./InMemorySignalProtocolStore.js'); + var store = new MySignalProtocolStore(); + var address = new signal.SignalProtocolAddress(name, deviceId); + var sessionBuilder = new signal.SessionBuilder(store, address); + + generateIdentity(store) + .then(function () { + return generatePreKeyBundle(store, 1337, 1); + }).then(function (bundle) { + return sessionBuilder.processPreKey(bundle); + }).then(function () { + var plaintext = "Hello world"; + var sessionCipher = new signal.SessionCipher(store, address); + sessionCipher.encrypt(plaintext).then(function(ciphertext) { + assert.isDefined(ciphertext.type); + assert.isDefined(ciphertext.body); + done(); + }); + }).catch(function (err) { + assert.isUndefined(err); + }); + }); +}); diff --git a/test/KeyHelperTest.js b/test/KeyHelperTest.js index 43651f0..b8ecf8f 100644 --- a/test/KeyHelperTest.js +++ b/test/KeyHelperTest.js @@ -1,3 +1,5 @@ +var KeyHelper = require('../src/KeyHelper.js'); + describe('KeyHelper', function() { function validateKeyPair(keyPair) { assert.isDefined(keyPair.pubKey); @@ -9,7 +11,7 @@ describe('KeyHelper', function() { describe('generateIdentityKeyPair', function() { it ('works', function() { - libsignal.KeyHelper.generateIdentityKeyPair().then(function(keyPair) { + KeyHelper.generateIdentityKeyPair().then(function(keyPair) { validateKeyPair(keyPair); }); }); @@ -17,7 +19,7 @@ describe('KeyHelper', function() { describe('generateRegistrationId', function() { it('generates a 14-bit integer', function() { - var registrationId = libsignal.KeyHelper.generateRegistrationId(); + var registrationId = KeyHelper.generateRegistrationId(); assert.isNumber(registrationId); assert(registrationId >= 0); assert(registrationId < 16384); @@ -27,22 +29,22 @@ describe('KeyHelper', function() { describe("generatePreKey", function() { it('generates a preKey', function(done) { - libsignal.KeyHelper.generatePreKey(1337).then(function(result) { + KeyHelper.generatePreKey(1337).then(function(result) { validateKeyPair(result.keyPair); assert.strictEqual(result.keyId, 1337); }).then(done, done); }); it('throws on bad keyId', function() { assert.throws(function(done) { - libsignal.KeyHelper.generatePreKey('bad'); + KeyHelper.generatePreKey('bad'); }, TypeError); }); }); describe("generateSignedPreKey", function() { it('generates a preKey', function(done) { - libsignal.KeyHelper.generateIdentityKeyPair().then(function(identityKey) { - libsignal.KeyHelper.generateSignedPreKey(identityKey, 1337).then(function(result) { + KeyHelper.generateIdentityKeyPair().then(function(identityKey) { + KeyHelper.generateSignedPreKey(identityKey, 1337).then(function(result) { validateKeyPair(result.keyPair); assert.strictEqual(result.keyId, 1337); //todo: validate result.signature @@ -51,7 +53,7 @@ describe('KeyHelper', function() { }); it('throws on bad keyId', function() { assert.throws(function(done) { - libsignal.KeyHelper.generateSignedPreKey('bad'); + KeyHelper.generateSignedPreKey('bad'); }, TypeError); }); }); diff --git a/test/NumericFingerprintTest.js b/test/NumericFingerprintTest.js index b5b5a66..b633508 100644 --- a/test/NumericFingerprintTest.js +++ b/test/NumericFingerprintTest.js @@ -3,6 +3,10 @@ */ 'use strict'; + +var Crypto = require('../src/crypto.js'); +var FingerprintGenerator = require('../src/NumericFingerprint.js'); + describe('NumericFingerprint', function() { this.timeout(5000); var ALICE_IDENTITY = [ @@ -27,7 +31,7 @@ describe('NumericFingerprint', function() { }; it('returns the correct fingerprint', function(done) { - var generator = new libsignal.FingerprintGenerator(5200); + var generator = new FingerprintGenerator(5200); generator.createFor( alice.identifier, alice.key, bob.identifier, bob.key ).then(function(fingerprint) { @@ -36,7 +40,7 @@ describe('NumericFingerprint', function() { }); it ('alice and bob results match', function(done) { - var generator = new libsignal.FingerprintGenerator(1024); + var generator = new FingerprintGenerator(1024); Promise.all([ generator.createFor( alice.identifier, alice.key, bob.identifier, bob.key @@ -50,7 +54,7 @@ describe('NumericFingerprint', function() { }); it ('alice and !bob results mismatch', function(done) { - var generator = new libsignal.FingerprintGenerator(1024); + var generator = new FingerprintGenerator(1024); Promise.all([ generator.createFor( alice.identifier, alice.key, '+15558675309', bob.key @@ -64,8 +68,8 @@ describe('NumericFingerprint', function() { }); it ('alice and mitm results mismatch', function(done) { - var mitm = libsignal.crypto.getRandomBytes(33); - var generator = new libsignal.FingerprintGenerator(1024); + var mitm = Crypto.crypto.getRandomBytes(33); + var generator = new FingerprintGenerator(1024); Promise.all([ generator.createFor( alice.identifier, alice.key, bob.identifier, mitm diff --git a/test/PreKeyStore_test.js b/test/PreKeyStore_test.js index 27787b9..203cf09 100644 --- a/test/PreKeyStore_test.js +++ b/test/PreKeyStore_test.js @@ -1,52 +1,57 @@ +var Crypto = require('../src/crypto.js'); +var SignalProtocolAddress = require('../src/SignalProtocolAddress.js'); + function testPreKeyStore(store) { - var number = '+5558675309'; - var testKey; - describe('PreKeyStore', function() { + var number = '+5558675309'; + var testKey; + describe('PreKeyStore', function() { + before(function(done) { + Crypto.crypto.createKeyPair().then(function(keyPair) { + testKey = keyPair; + }).then(done,done); + }); + describe('storePreKey', function() { + it('stores prekeys', function(done) { + var address = new SignalProtocolAddress(number, 1); + store.storePreKey(address.toString(), testKey).then(function() { + return store.loadPreKey(address.toString()).then(function(key) { + assertEqualArrayBuffers(key.pubKey, testKey.pubKey); + assertEqualArrayBuffers(key.privKey, testKey.privKey); + }); + }).then(done,done); + }); + }); + describe('loadPreKey', function() { + it('returns prekeys that exist', function(done) { + var address = new SignalProtocolAddress(number, 1); + store.storePreKey(address.toString(), testKey).then(function() { + return store.loadPreKey(address.toString()).then(function(key) { + assertEqualArrayBuffers(key.pubKey, testKey.pubKey); + assertEqualArrayBuffers(key.privKey, testKey.privKey); + }); + }).then(done,done); + }); + it('returns undefined for prekeys that do not exist', function(done) { + var address = new SignalProtocolAddress(number, 2); + return store.loadPreKey(2).then(function(key) { + assert.isUndefined(key); + }).then(done,done); + }); + }); + describe('removePreKey', function() { + it('deletes prekeys', function(done) { + var address = new SignalProtocolAddress(number, 2); before(function(done) { - Internal.crypto.createKeyPair().then(function(keyPair) { - testKey = keyPair; - }).then(done,done); - }); - describe('storePreKey', function() { - it('stores prekeys', function(done) { - var address = new SignalProtocolAddress(number, 1); - store.storePreKey(address.toString(), testKey).then(function() { - return store.loadPreKey(address.toString()).then(function(key) { - assertEqualArrayBuffers(key.pubKey, testKey.pubKey); - assertEqualArrayBuffers(key.privKey, testKey.privKey); - }); - }).then(done,done); - }); - }); - describe('loadPreKey', function() { - it('returns prekeys that exist', function(done) { - var address = new SignalProtocolAddress(number, 1); - store.storePreKey(address.toString(), testKey).then(function() { - return store.loadPreKey(address.toString()).then(function(key) { - assertEqualArrayBuffers(key.pubKey, testKey.pubKey); - assertEqualArrayBuffers(key.privKey, testKey.privKey); - }); - }).then(done,done); - }); - it('returns undefined for prekeys that do not exist', function(done) { - var address = new SignalProtocolAddress(number, 2); - return store.loadPreKey(2).then(function(key) { - assert.isUndefined(key); - }).then(done,done); - }); - }); - describe('removePreKey', function() { - it('deletes prekeys', function(done) { - var address = new SignalProtocolAddress(number, 2); - before(function(done) { - store.storePreKey(address.toString(), testKey).then(done); - }); - store.removePreKey(address.toString()).then(function() { - return store.loadPreKey(address.toString()).then(function(key) { - assert.isUndefined(key); - }); - }).then(done,done); - }); + store.storePreKey(address.toString(), testKey).then(done); }); + store.removePreKey(address.toString()).then(function() { + return store.loadPreKey(address.toString()).then(function(key) { + assert.isUndefined(key); + }); + }).then(done,done); + }); }); + }); } + +module.exports = testPreKeyStore; diff --git a/test/SessionBuilderTest.js b/test/SessionBuilderTest.js index 3f94ab8..3de9904 100644 --- a/test/SessionBuilderTest.js +++ b/test/SessionBuilderTest.js @@ -1,6 +1,15 @@ +var SessionRecord = require('../src/SessionRecord.js'); +var KeyHelper = require('../src/KeyHelper.js'); +var SessionCipher = require('../src/SessionCipher.js'); +var SessionBuilder = require('../src/SessionBuilder.js'); +var SignalProtocolAddress = require('../src/SignalProtocolAddress.js'); +var util = require('../src/helpers.js'); + +var SignalProtocolStore = require('./InMemorySignalProtocolStore.js'); + describe('SessionBuilder', function() { this.timeout(5000); - var KeyHelper = libsignal.KeyHelper; + // var KeyHelper = KeyHelper; function generateIdentity(store) { return Promise.all([ @@ -57,7 +66,7 @@ describe('SessionBuilder', function() { var bobPreKeyId = 1337; var bobSignedKeyId = 1; - var Curve = libsignal.Curve; + var Curve = require('../src/Curve.js').Curve; before(function(done) { Promise.all([ @@ -66,7 +75,7 @@ describe('SessionBuilder', function() { ]).then(function() { return generatePreKeyBundle(bobStore, bobPreKeyId, bobSignedKeyId); }).then(function(preKeyBundle) { - var builder = new libsignal.SessionBuilder(aliceStore, BOB_ADDRESS); + var builder = new SessionBuilder(aliceStore, BOB_ADDRESS); return builder.processPreKey(preKeyBundle).then(function() { done(); }); @@ -74,13 +83,13 @@ describe('SessionBuilder', function() { }); var originalMessage = util.toArrayBuffer("L'homme est condamné à être libre"); - var aliceSessionCipher = new libsignal.SessionCipher(aliceStore, BOB_ADDRESS); - var bobSessionCipher = new libsignal.SessionCipher(bobStore, ALICE_ADDRESS); + var aliceSessionCipher = new SessionCipher(aliceStore, BOB_ADDRESS); + var bobSessionCipher = new SessionCipher(bobStore, ALICE_ADDRESS); it('creates a session', function(done) { return aliceStore.loadSession(BOB_ADDRESS.toString()).then(function(record) { assert.isDefined(record); - var sessionRecord = Internal.SessionRecord.deserialize(record); + var sessionRecord = SessionRecord.deserialize(record); assert.isTrue(sessionRecord.haveOpenSession()); assert.isDefined(sessionRecord.getOpenSession()); }).then(done, done); @@ -114,11 +123,11 @@ describe('SessionBuilder', function() { it('accepts a new preKey with the same identity', function(done) { generatePreKeyBundle(bobStore, bobPreKeyId + 1, bobSignedKeyId + 1).then(function(preKeyBundle) { - var builder = new libsignal.SessionBuilder(aliceStore, BOB_ADDRESS); + var builder = new SessionBuilder(aliceStore, BOB_ADDRESS); return builder.processPreKey(preKeyBundle).then(function() { return aliceStore.loadSession(BOB_ADDRESS.toString()).then(function(record) { assert.isDefined(record); - var sessionRecord = Internal.SessionRecord.deserialize(record); + var sessionRecord = SessionRecord.deserialize(record); assert.isTrue(sessionRecord.haveOpenSession()); assert.isDefined(sessionRecord.getOpenSession()); done(); @@ -129,7 +138,7 @@ describe('SessionBuilder', function() { it('rejects untrusted identity keys', function(done) { KeyHelper.generateIdentityKeyPair().then(function(newIdentity) { - var builder = new libsignal.SessionBuilder(aliceStore, BOB_ADDRESS); + var builder = new SessionBuilder(aliceStore, BOB_ADDRESS); return builder.processPreKey({ identityKey: newIdentity.pubKey, registrationId : 12356 diff --git a/test/SessionCipherTest.js b/test/SessionCipherTest.js index 96c5c92..b4d9d97 100644 --- a/test/SessionCipherTest.js +++ b/test/SessionCipherTest.js @@ -1,17 +1,28 @@ /* * vim: ts=4:sw=4 */ - 'use strict'; + +var util = require('../src/helpers.js'); +var TestVectors = require('./testvectors.js'); +var SignalProtocolStore = require('./InMemorySignalProtocolStore.js'); +var SignalProtocolAddress = require('../src/SignalProtocolAddress.js'); +var SessionCipher = require('../src/SessionCipher.js'); +var Crypto = require('../src/crypto.js'); +var SessionRecord = require('../src/SessionRecord.js'); +var SessionBuilder = require('../src/SessionBuilder.js'); +var textsecure = require('./temp_helpers.js'); +var protobuf = require('../build/protobufs_concat.js'); + describe('SessionCipher', function() { describe('getRemoteRegistrationId', function() { var store = new SignalProtocolStore(); var registrationId = 1337; - var address = new libsignal.SignalProtocolAddress('foo', 1); - var sessionCipher = new libsignal.SessionCipher(store, address.toString()); + var address = new SignalProtocolAddress('foo', 1); + var sessionCipher = new SessionCipher(store, address.toString()); describe('when a record exists', function() { before(function(done) { - var record = new Internal.SessionRecord('identityKey', registrationId); + var record = new SessionRecord('identityKey', registrationId); store.storeSession(address.toString(), record.serialize()).then(done); }); it('returns a valid registrationId', function(done) { @@ -22,7 +33,7 @@ describe('SessionCipher', function() { }); describe('when a record does not exist', function() { it('returns undefined', function(done) { - var sessionCipher = new libsignal.SessionCipher(store, 'bar.1'); + var sessionCipher = new SessionCipher(store, 'bar.1'); sessionCipher.getRemoteRegistrationId().then(function(value) { assert.isUndefined(value); }).then(done,done); @@ -32,11 +43,11 @@ describe('SessionCipher', function() { describe('hasOpenSession', function() { var store = new SignalProtocolStore(); - var address = new libsignal.SignalProtocolAddress('foo', 1); - var sessionCipher = new libsignal.SessionCipher(store, address.toString()); + var address = new SignalProtocolAddress('foo', 1); + var sessionCipher = new SessionCipher(store, address.toString()); describe('registrationId is valid', function() { before(function(done) { - var record = new Internal.SessionRecord('identityKey', 1); + var record = new SessionRecord('identityKey', 1); store.storeSession(address.toString(), record.serialize()).then(done); }); it('returns true for a session with a valid registrationId', function(done) { @@ -47,7 +58,7 @@ describe('SessionCipher', function() { }); describe('registrationId is null', function() { before(function(done) { - var record = new Internal.SessionRecord('identityKey'); + var record = new SessionRecord('identityKey'); store.storeSession(address.toString(), record.serialize()).then(done); }); it('returns false for a session with a null registrationId', function(done) { @@ -75,15 +86,15 @@ describe('SessionCipher', function() { return Promise.resolve(); } - return Internal.crypto.createKeyPair(data.ourIdentityKey).then(function(keyPair) { + return Crypto.crypto.createKeyPair(data.ourIdentityKey).then(function(keyPair) { store.put('identityKey', keyPair); }).then(function() { - return Internal.crypto.createKeyPair(data.ourSignedPreKey); + return Crypto.crypto.createKeyPair(data.ourSignedPreKey); }).then(function(signedKeyPair) { store.storeSignedPreKey(data.signedPreKeyId, signedKeyPair); }).then(function() { if (data.ourPreKey !== undefined) { - return Internal.crypto.createKeyPair(data.ourPreKey).then(function(keyPair) { + return Crypto.crypto.createKeyPair(data.ourPreKey).then(function(keyPair) { store.storePreKey(data.preKeyId, keyPair); }); } @@ -128,7 +139,7 @@ describe('SessionCipher', function() { function doReceiveStep(store, data, privKeyQueue, address) { return setupReceiveStep(store, data, privKeyQueue).then(function() { - var sessionCipher = new libsignal.SessionCipher(store, address); + var sessionCipher = new SessionCipher(store, address); if (data.type == textsecure.protobuf.IncomingPushMessageSignal.Type.CIPHERTEXT) { return sessionCipher.decryptWhisperMessage(data.message).then(unpad); @@ -169,7 +180,7 @@ describe('SessionCipher', function() { } if (data.ourIdentityKey !== undefined) { - return Internal.crypto.createKeyPair(data.ourIdentityKey).then(function(keyPair) { + return Crypto.crypto.createKeyPair(data.ourIdentityKey).then(function(keyPair) { store.put('identityKey', keyPair); }); } @@ -187,7 +198,7 @@ describe('SessionCipher', function() { registrationId : data.getKeys.devices[0].registrationId }; - var builder = new libsignal.SessionBuilder(store, address); + var builder = new SessionBuilder(store, address); return builder.processPreKey(deviceObject); } @@ -210,7 +221,7 @@ describe('SessionCipher', function() { throw new Error("Bad version byte"); } - var expected = Internal.protobuf.PreKeyWhisperMessage.decode( + var expected = protobuf.PreKeyWhisperMessage.decode( data.expectedCiphertext.slice(1) ).encode(); @@ -258,12 +269,12 @@ describe('SessionCipher', function() { this.timeout(20000); var privKeyQueue = []; - var origCreateKeyPair = Internal.crypto.createKeyPair; + var origCreateKeyPair = Crypto.crypto.createKeyPair; before(function() { // Shim createKeyPair to return predetermined keys from // privKeyQueue instead of random keys. - Internal.crypto.createKeyPair = function(privKey) { + Crypto.crypto.createKeyPair = function(privKey) { if (privKey !== undefined) { return origCreateKeyPair(privKey); } @@ -271,7 +282,7 @@ describe('SessionCipher', function() { throw new Error('Out of private keys'); } else { var privKey = privKeyQueue.shift(); - return Internal.crypto.createKeyPair(privKey).then(function(keyPair) { + return Crypto.crypto.createKeyPair(privKey).then(function(keyPair) { var a = btoa(util.toString(keyPair.privKey)); var b = btoa(util.toString(privKey)); if (util.toString(keyPair.privKey) != util.toString(privKey)) @@ -284,7 +295,7 @@ describe('SessionCipher', function() { }); after(function() { - Internal.crypto.createKeyPair = origCreateKeyPair; + Crypto.crypto.createKeyPair = origCreateKeyPair; if (privKeyQueue.length != 0) { throw new Error('Leftover private keys'); } @@ -313,7 +324,7 @@ describe('SessionCipher', function() { } var store = new SignalProtocolStore(); - var address = libsignal.SignalProtocolAddress.fromString("SNOWDEN.1"); + var address = SignalProtocolAddress.fromString("SNOWDEN.1"); test.vectors.forEach(function(step) { it(getDescription(step), function(done) { var doStep; diff --git a/test/SessionStore_test.js b/test/SessionStore_test.js index 2ecb932..8469c0c 100644 --- a/test/SessionStore_test.js +++ b/test/SessionStore_test.js @@ -1,77 +1,81 @@ +var SignalProtocolAddress = require('../src/SignalProtocolAddress.js'); + function testSessionStore(store) { - describe('SessionStore', function() { - var number = '+5558675309'; + describe('SessionStore', function() { + var number = '+5558675309'; + var testRecord = 'an opaque string'; + describe('storeSession', function() { + var address = new SignalProtocolAddress(number, 1); + it('stores sessions encoded as strings', function(done) { + store.storeSession(address.toString(), testRecord).then(function() { + return store.loadSession(address.toString()).then(function(record) { + assert.strictEqual(record, testRecord); + }); + }).then(done,done); + }); + it('stores sessions encoded as array buffers', function(done) { + var testRecord = new Uint8Array([1,2,3]).buffer; + store.storeSession(address.toString(), testRecord).then(function() { + return store.loadSession(address.toString()).then(function(record) { + assertEqualArrayBuffers(testRecord, record); + }); + }).then(done,done); + }); + }); + describe('loadSession', function() { + it('returns sessions that exist', function(done) { + var address = new SignalProtocolAddress(number, 1); var testRecord = 'an opaque string'; - describe('storeSession', function() { - var address = new SignalProtocolAddress(number, 1); - it('stores sessions encoded as strings', function(done) { - store.storeSession(address.toString(), testRecord).then(function() { - return store.loadSession(address.toString()).then(function(record) { - assert.strictEqual(record, testRecord); - }); - }).then(done,done); - }); - it('stores sessions encoded as array buffers', function(done) { - var testRecord = new Uint8Array([1,2,3]).buffer; - store.storeSession(address.toString(), testRecord).then(function() { - return store.loadSession(address.toString()).then(function(record) { - assertEqualArrayBuffers(testRecord, record); - }); - }).then(done,done); - }); + store.storeSession(address.toString(), testRecord).then(function() { + return store.loadSession(address.toString()).then(function(record) { + assert.strictEqual(record, testRecord); + }); + }).then(done,done); + }); + it('returns undefined for sessions that do not exist', function(done) { + var address = new SignalProtocolAddress(number, 2); + return store.loadSession(address.toString()).then(function(record) { + assert.isUndefined(record); + }).then(done,done); + }); + }); + describe('removeSession', function() { + it('deletes sessions', function(done) { + var address = new SignalProtocolAddress(number, 1); + before(function(done) { + store.storeSession(address.toString(), testRecord).then(done); }); - describe('loadSession', function() { - it('returns sessions that exist', function(done) { - var address = new SignalProtocolAddress(number, 1); - var testRecord = 'an opaque string'; - store.storeSession(address.toString(), testRecord).then(function() { - return store.loadSession(address.toString()).then(function(record) { - assert.strictEqual(record, testRecord); - }); - }).then(done,done); - }); - it('returns undefined for sessions that do not exist', function(done) { - var address = new SignalProtocolAddress(number, 2); - return store.loadSession(address.toString()).then(function(record) { - assert.isUndefined(record); - }).then(done,done); - }); + store.removeSession(address.toString()).then(function() { + return store.loadSession(address.toString()).then(function(record) { + assert.isUndefined(record); + }); + }).then(done,done); + }); + }); + describe('removeAllSessions', function() { + it('removes all sessions for a number', function(done) { + var devices = [1, 2, 3].map(function(deviceId) { + var address = new SignalProtocolAddress(number, deviceId); + return address.toString(); }); - describe('removeSession', function() { - it('deletes sessions', function(done) { - var address = new SignalProtocolAddress(number, 1); - before(function(done) { - store.storeSession(address.toString(), testRecord).then(done); - }); - store.removeSession(address.toString()).then(function() { - return store.loadSession(address.toString()).then(function(record) { - assert.isUndefined(record); - }); - }).then(done,done); - }); + var promise = Promise.resolve(); + devices.forEach(function(encodedNumber) { + promise = promise.then(function() { + return store.storeSession(encodedNumber, testRecord + encodedNumber); + }); }); - describe('removeAllSessions', function() { - it('removes all sessions for a number', function(done) { - var devices = [1, 2, 3].map(function(deviceId) { - var address = new SignalProtocolAddress(number, deviceId); - return address.toString(); - }); - var promise = Promise.resolve(); - devices.forEach(function(encodedNumber) { - promise = promise.then(function() { - return store.storeSession(encodedNumber, testRecord + encodedNumber); - }); - }); - promise.then(function() { - return store.removeAllSessions(number).then(function(record) { - return Promise.all(devices.map(store.loadSession.bind(store))).then(function(records) { - for (var i in records) { - assert.isUndefined(records[i]); - }; - }); - }); - }).then(done,done); + promise.then(function() { + return store.removeAllSessions(number).then(function(record) { + return Promise.all(devices.map(store.loadSession.bind(store))).then(function(records) { + for (var i in records) { + assert.isUndefined(records[i]); + }; }); - }); + }); + }).then(done,done); + }); }); + }); } + +module.exports = testSessionStore; diff --git a/test/SignalProtocolAddressTest.js b/test/SignalProtocolAddressTest.js index 5e52f76..e9c61f1 100644 --- a/test/SignalProtocolAddressTest.js +++ b/test/SignalProtocolAddressTest.js @@ -1,3 +1,5 @@ +var SignalProtocolAddress = require('../src/SignalProtocolAddress.js'); + describe('SignalProtocolAddress', function() { var name = 'name'; var deviceId = 42; @@ -24,12 +26,12 @@ describe('SignalProtocolAddress', function() { it('throws on a bad inputs', function() { [ '', null, {} ].forEach(function(input) { assert.throws(function() { - var address = libsignal.SignalProtocolAddress.fromString(input); + var address = SignalProtocolAddress.fromString(input); }); }); }); it('constructs the address', function() { - var address = libsignal.SignalProtocolAddress.fromString(string); + var address = SignalProtocolAddress.fromString(string); assert.strictEqual(deviceId, address.getDeviceId()); assert.strictEqual(name, address.getName()); }); diff --git a/test/SignalProtocolStore_test.js b/test/SignalProtocolStore_test.js index 97d40f2..acbcc45 100644 --- a/test/SignalProtocolStore_test.js +++ b/test/SignalProtocolStore_test.js @@ -2,19 +2,28 @@ 'use strict'; -describe("SignalProtocolStore", function() { +var Crypto = require('../src/crypto.js'); + +var SignalProtocolStore = require('./InMemorySignalProtocolStore.js'); + + +function testSignalProtocolStore (testIdentityKeyStore, testPreKeyStore, testSignedPreKeyStore, testSessionStore) { + describe("SignalProtocolStore", function() { var store = new SignalProtocolStore(); var registrationId = 1337; var identityKey = { - pubKey: Internal.crypto.getRandomBytes(33), - privKey: Internal.crypto.getRandomBytes(32), + pubKey: Crypto.crypto.getRandomBytes(33), + privKey: Crypto.crypto.getRandomBytes(32), }; before(function() { - store.put('registrationId', registrationId); - store.put('identityKey', identityKey); + store.put('registrationId', registrationId); + store.put('identityKey', identityKey); }); testIdentityKeyStore(store, registrationId, identityKey); testPreKeyStore(store); testSignedPreKeyStore(store); testSessionStore(store); -}); + }); +} + +module.exports = testSignalProtocolStore; diff --git a/test/SignedPreKeyStore_test.js b/test/SignedPreKeyStore_test.js index 4df15a7..a480e11 100644 --- a/test/SignedPreKeyStore_test.js +++ b/test/SignedPreKeyStore_test.js @@ -1,49 +1,53 @@ +var Crypto = require('../src/crypto.js'); + function testSignedPreKeyStore(store) { - describe('SignedPreKeyStore', function() { - var testKey; + describe('SignedPreKeyStore', function() { + var testKey; + before(function(done) { + Crypto.crypto.createKeyPair().then(function(keyPair) { + testKey = keyPair; + }).then(done,done); + }); + describe('storeSignedPreKey', function() { + it('stores signed prekeys', function(done) { + store.storeSignedPreKey(3, testKey).then(function() { + return store.loadSignedPreKey(3).then(function(key) { + assertEqualArrayBuffers(key.pubKey, testKey.pubKey); + assertEqualArrayBuffers(key.privKey, testKey.privKey); + }); + }).then(done,done); + }); + }); + describe('loadSignedPreKey', function() { + it('returns prekeys that exist', function(done) { + store.storeSignedPreKey(1, testKey).then(function() { + return store.loadSignedPreKey(1).then(function(key) { + assertEqualArrayBuffers(key.pubKey, testKey.pubKey); + assertEqualArrayBuffers(key.privKey, testKey.privKey); + }); + }).then(done,done); + }); + it('returns undefined for prekeys that do not exist', function(done) { + store.storeSignedPreKey(1, testKey).then(function() { + return store.loadSignedPreKey(2).then(function(key) { + assert.isUndefined(key); + }); + }).then(done,done); + }); + }); + describe('removeSignedPreKey', function() { + it('deletes signed prekeys', function(done) { before(function(done) { - Internal.crypto.createKeyPair().then(function(keyPair) { - testKey = keyPair; - }).then(done,done); - }); - describe('storeSignedPreKey', function() { - it('stores signed prekeys', function(done) { - store.storeSignedPreKey(3, testKey).then(function() { - return store.loadSignedPreKey(3).then(function(key) { - assertEqualArrayBuffers(key.pubKey, testKey.pubKey); - assertEqualArrayBuffers(key.privKey, testKey.privKey); - }); - }).then(done,done); - }); - }); - describe('loadSignedPreKey', function() { - it('returns prekeys that exist', function(done) { - store.storeSignedPreKey(1, testKey).then(function() { - return store.loadSignedPreKey(1).then(function(key) { - assertEqualArrayBuffers(key.pubKey, testKey.pubKey); - assertEqualArrayBuffers(key.privKey, testKey.privKey); - }); - }).then(done,done); - }); - it('returns undefined for prekeys that do not exist', function(done) { - store.storeSignedPreKey(1, testKey).then(function() { - return store.loadSignedPreKey(2).then(function(key) { - assert.isUndefined(key); - }); - }).then(done,done); - }); - }); - describe('removeSignedPreKey', function() { - it('deletes signed prekeys', function(done) { - before(function(done) { - store.storeSignedPreKey(4, testKey).then(done); - }); - store.removeSignedPreKey(4, testKey).then(function() { - return store.loadSignedPreKey(4).then(function(key) { - assert.isUndefined(key); - }); - }).then(done,done); - }); + store.storeSignedPreKey(4, testKey).then(done); }); + store.removeSignedPreKey(4, testKey).then(function() { + return store.loadSignedPreKey(4).then(function(key) { + assert.isUndefined(key); + }); + }).then(done,done); + }); }); + }); } + +module.exports = testSignedPreKeyStore; diff --git a/test/crypto_test.js b/test/crypto_test.js index 233606a..1b0335e 100644 --- a/test/crypto_test.js +++ b/test/crypto_test.js @@ -3,161 +3,164 @@ */ 'use strict'; -window.assert = chai.assert; +// window.assert = chai.assert; + +var Crypto = require('../src/crypto.js'); +var worker = require('../src/curve25519_worker_manager.js'); describe("Crypto", function() { - describe("Encrypt AES-CBC", function() { - it('works', function(done) { - var key = hexToArrayBuffer('603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4'); - var iv = hexToArrayBuffer('000102030405060708090a0b0c0d0e0f'); - var plaintext = hexToArrayBuffer('6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710'); - var ciphertext = hexToArrayBuffer('f58c4c04d6e5f1ba779eabfb5f7bfbd69cfc4e967edb808d679f777bc6702c7d39f23369a9d9bacfa530e26304231461b2eb05e2c39be9fcda6c19078c6a9d1b3f461796d6b0d6b2e0c2a72b4d80e644'); - Internal.crypto.encrypt(key, plaintext, iv).then(function(result) { - assertEqualArrayBuffers(result, ciphertext); - }).then(done).catch(done); - }); + describe("Encrypt AES-CBC", function() { + it('works', function(done) { + var key = hexToArrayBuffer('603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4'); + var iv = hexToArrayBuffer('000102030405060708090a0b0c0d0e0f'); + var plaintext = hexToArrayBuffer('6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710'); + var ciphertext = hexToArrayBuffer('f58c4c04d6e5f1ba779eabfb5f7bfbd69cfc4e967edb808d679f777bc6702c7d39f23369a9d9bacfa530e26304231461b2eb05e2c39be9fcda6c19078c6a9d1b3f461796d6b0d6b2e0c2a72b4d80e644'); + Crypto.crypto.encrypt(key, plaintext, iv).then(function(result) { + assertEqualArrayBuffers(result, ciphertext); + }).then(done).catch(done); }); - - describe("Decrypt AES-CBC", function() { - it('works', function(done) { - var key = hexToArrayBuffer('603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4'); - var iv = hexToArrayBuffer('000102030405060708090a0b0c0d0e0f'); - var plaintext = hexToArrayBuffer('6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710'); - var ciphertext = hexToArrayBuffer('f58c4c04d6e5f1ba779eabfb5f7bfbd69cfc4e967edb808d679f777bc6702c7d39f23369a9d9bacfa530e26304231461b2eb05e2c39be9fcda6c19078c6a9d1b3f461796d6b0d6b2e0c2a72b4d80e644'); - Internal.crypto.decrypt(key, ciphertext, iv).then(function(result) { - assertEqualArrayBuffers(result, plaintext); - }).then(done).catch(done); - }); + }); + + describe("Decrypt AES-CBC", function() { + it('works', function(done) { + var key = hexToArrayBuffer('603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4'); + var iv = hexToArrayBuffer('000102030405060708090a0b0c0d0e0f'); + var plaintext = hexToArrayBuffer('6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710'); + var ciphertext = hexToArrayBuffer('f58c4c04d6e5f1ba779eabfb5f7bfbd69cfc4e967edb808d679f777bc6702c7d39f23369a9d9bacfa530e26304231461b2eb05e2c39be9fcda6c19078c6a9d1b3f461796d6b0d6b2e0c2a72b4d80e644'); + Crypto.crypto.decrypt(key, ciphertext, iv).then(function(result) { + assertEqualArrayBuffers(result, plaintext); + }).then(done).catch(done); }); - - describe("HMAC SHA-256", function() { - it("works", function(done) { - var key = hexToArrayBuffer('6f35628d65813435534b5d67fbdb54cb33403d04e843103e6399f806cb5df95febbdd61236f33245'); - var input = hexToArrayBuffer('752cff52e4b90768558e5369e75d97c69643509a5e5904e0a386cbe4d0970ef73f918f675945a9aefe26daea27587e8dc909dd56fd0468805f834039b345f855cfe19c44b55af241fff3ffcd8045cd5c288e6c4e284c3720570b58e4d47b8feeedc52fd1401f698a209fccfa3b4c0d9a797b046a2759f82a54c41ccd7b5f592b'); - var mac = hexToArrayBuffer('05d1243e6465ed9620c9aec1c351a186'); - Internal.crypto.sign(key, input).then(function(result) { - assertEqualArrayBuffers(result.slice(0, mac.byteLength), mac); - }).then(done).catch(done); - }); + }); + + describe("HMAC SHA-256", function() { + it("works", function(done) { + var key = hexToArrayBuffer('6f35628d65813435534b5d67fbdb54cb33403d04e843103e6399f806cb5df95febbdd61236f33245'); + var input = hexToArrayBuffer('752cff52e4b90768558e5369e75d97c69643509a5e5904e0a386cbe4d0970ef73f918f675945a9aefe26daea27587e8dc909dd56fd0468805f834039b345f855cfe19c44b55af241fff3ffcd8045cd5c288e6c4e284c3720570b58e4d47b8feeedc52fd1401f698a209fccfa3b4c0d9a797b046a2759f82a54c41ccd7b5f592b'); + var mac = hexToArrayBuffer('05d1243e6465ed9620c9aec1c351a186'); + Crypto.crypto.sign(key, input).then(function(result) { + assertEqualArrayBuffers(result.slice(0, mac.byteLength), mac); + }).then(done).catch(done); + }); + }); + + + describe("HKDF", function() { + it('works', function(done) { + // HMAC RFC5869 Test vectors + var T1 = hexToArrayBuffer("3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf"); + var T2 = hexToArrayBuffer("34007208d5b887185865"); + var IKM = new Uint8Array(new ArrayBuffer(22)); + for (var i = 0; i < 22; i++) + IKM[i] = 11; + + var salt = new Uint8Array(new ArrayBuffer(13)); + for (var i = 0; i < 13; i++) + salt[i] = i; + + var info = new Uint8Array(new ArrayBuffer(10)); + for (var i = 0; i < 10; i++) + info[i] = 240 + i; + + return Crypto.crypto.HKDF(IKM.buffer, salt.buffer, info.buffer).then(function(OKM){ + assertEqualArrayBuffers(OKM[0], T1); + assertEqualArrayBuffers(OKM[1].slice(0, 10), T2); + }).then(done).catch(done); + }); + }); + + function testCurve25519() { + var alice_bytes = hexToArrayBuffer("77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a"); + var alice_priv = hexToArrayBuffer("70076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c6a"); + var alice_pub = hexToArrayBuffer("058520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a"); + var bob_bytes = hexToArrayBuffer("5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb"); + var bob_priv = hexToArrayBuffer("58ab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e06b"); + var bob_pub = hexToArrayBuffer("05de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f"); + var shared_sec = hexToArrayBuffer("4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742"); + + describe("createKeyPair", function() { + it ('converts alice private keys to a keypair', function(done) { + Crypto.crypto.createKeyPair(alice_bytes).then(function(keypair) { + assertEqualArrayBuffers(keypair.privKey, alice_priv); + assertEqualArrayBuffers(keypair.pubKey, alice_pub); + done(); + }).catch(done); + }); + it ('converts bob private keys to a keypair', function(done) { + Crypto.crypto.createKeyPair(bob_bytes).then(function(keypair) { + assertEqualArrayBuffers(keypair.privKey, bob_priv); + assertEqualArrayBuffers(keypair.pubKey, bob_pub); + done(); + }).catch(done); + }); + it ('generates a key if one is not provided', function(done) { + Crypto.crypto.createKeyPair().then(function(keypair) { + assert.strictEqual(keypair.privKey.byteLength, 32); + assert.strictEqual(keypair.pubKey.byteLength, 33); + assert.strictEqual(new Uint8Array(keypair.pubKey)[0], 5); + done(); + }).catch(done); + }); }); + describe("ECDHE", function() { + it("computes the shared secret for alice", function(done) { + Crypto.crypto.ECDHE(bob_pub, alice_priv).then(function(secret) { + assertEqualArrayBuffers(shared_sec, secret); + done(); + }).catch(done); + }); + it("computes the shared secret for bob", function(done) { + Crypto.crypto.ECDHE(alice_pub, bob_priv).then(function(secret) { + assertEqualArrayBuffers(shared_sec, secret); + done(); + }).catch(done); + }); + }); - describe("HKDF", function() { - it('works', function(done) { - // HMAC RFC5869 Test vectors - var T1 = hexToArrayBuffer("3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf"); - var T2 = hexToArrayBuffer("34007208d5b887185865"); - var IKM = new Uint8Array(new ArrayBuffer(22)); - for (var i = 0; i < 22; i++) - IKM[i] = 11; - - var salt = new Uint8Array(new ArrayBuffer(13)); - for (var i = 0; i < 13; i++) - salt[i] = i; - - var info = new Uint8Array(new ArrayBuffer(10)); - for (var i = 0; i < 10; i++) - info[i] = 240 + i; - - return Internal.crypto.HKDF(IKM.buffer, salt.buffer, info.buffer).then(function(OKM){ - assertEqualArrayBuffers(OKM[0], T1); - assertEqualArrayBuffers(OKM[1].slice(0, 10), T2); - }).then(done).catch(done); - }); + var priv = hexToArrayBuffer("48a8892cc4e49124b7b57d94fa15becfce071830d6449004685e387c62409973"); + var pub = hexToArrayBuffer("0555f1bfede27b6a03e0dd389478ffb01462e5c52dbbac32cf870f00af1ed9af3a"); + var msg = hexToArrayBuffer("617364666173646661736466"); + var sig = hexToArrayBuffer("2bc06c745acb8bae10fbc607ee306084d0c28e2b3bb819133392473431291fd0dfa9c7f11479996cf520730d2901267387e08d85bbf2af941590e3035a545285"); + describe("Ed25519Sign", function() { + // Some self-generated test vectors + it('works', function(done) { + return Crypto.crypto.Ed25519Sign(priv, msg).then(function(sigCalc) { + assertEqualArrayBuffers(sig, sigCalc); + }).then(done).catch(done); + }); }); - function testCurve25519() { - var alice_bytes = hexToArrayBuffer("77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a"); - var alice_priv = hexToArrayBuffer("70076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c6a"); - var alice_pub = hexToArrayBuffer("058520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a"); - var bob_bytes = hexToArrayBuffer("5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb"); - var bob_priv = hexToArrayBuffer("58ab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e06b"); - var bob_pub = hexToArrayBuffer("05de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f"); - var shared_sec = hexToArrayBuffer("4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742"); - - describe("createKeyPair", function() { - it ('converts alice private keys to a keypair', function(done) { - Internal.crypto.createKeyPair(alice_bytes).then(function(keypair) { - assertEqualArrayBuffers(keypair.privKey, alice_priv); - assertEqualArrayBuffers(keypair.pubKey, alice_pub); - done(); - }).catch(done); - }); - it ('converts bob private keys to a keypair', function(done) { - Internal.crypto.createKeyPair(bob_bytes).then(function(keypair) { - assertEqualArrayBuffers(keypair.privKey, bob_priv); - assertEqualArrayBuffers(keypair.pubKey, bob_pub); - done(); - }).catch(done); - }); - it ('generates a key if one is not provided', function(done) { - Internal.crypto.createKeyPair().then(function(keypair) { - assert.strictEqual(keypair.privKey.byteLength, 32); - assert.strictEqual(keypair.pubKey.byteLength, 33); - assert.strictEqual(new Uint8Array(keypair.pubKey)[0], 5); - done(); - }).catch(done); - }); - }); - - describe("ECDHE", function() { - it("computes the shared secret for alice", function(done) { - Internal.crypto.ECDHE(bob_pub, alice_priv).then(function(secret) { - assertEqualArrayBuffers(shared_sec, secret); - done(); - }).catch(done); - }); - it("computes the shared secret for bob", function(done) { - Internal.crypto.ECDHE(alice_pub, bob_priv).then(function(secret) { - assertEqualArrayBuffers(shared_sec, secret); - done(); - }).catch(done); - }); - }); - - var priv = hexToArrayBuffer("48a8892cc4e49124b7b57d94fa15becfce071830d6449004685e387c62409973"); - var pub = hexToArrayBuffer("0555f1bfede27b6a03e0dd389478ffb01462e5c52dbbac32cf870f00af1ed9af3a"); - var msg = hexToArrayBuffer("617364666173646661736466"); - var sig = hexToArrayBuffer("2bc06c745acb8bae10fbc607ee306084d0c28e2b3bb819133392473431291fd0dfa9c7f11479996cf520730d2901267387e08d85bbf2af941590e3035a545285"); - describe("Ed25519Sign", function() { - // Some self-generated test vectors - it('works', function(done) { - return Internal.crypto.Ed25519Sign(priv, msg).then(function(sigCalc) { - assertEqualArrayBuffers(sig, sigCalc); - }).then(done).catch(done); - }); - }); - - describe("Ed25519Verify", function() { - it("throws on bad signature", function(done) { - var badsig = sig.slice(0); - new Uint8Array(badsig).set([0], 0); - - Internal.crypto.Ed25519Verify(pub, msg, badsig).catch(function(e) { - if (e.message === 'Invalid signature') { - done(); - } else { throw e; } - }).catch(done); - }); - - it("does not throw on good signature", function(done) { - return Internal.crypto.Ed25519Verify(pub, msg, sig).then(done).catch(done); - }); - }); - } - - describe('curve25519', function() { - this.timeout(5000); - testCurve25519(); + describe("Ed25519Verify", function() { + it("throws on bad signature", function(done) { + var badsig = sig.slice(0); + new Uint8Array(badsig).set([0], 0); + + Crypto.crypto.Ed25519Verify(pub, msg, badsig).catch(function(e) { + if (e.message === 'Invalid signature') { + done(); + } else { throw e; } + }).catch(done); + }); + + it("does not throw on good signature", function(done) { + return Crypto.crypto.Ed25519Verify(pub, msg, sig).then(done).catch(done); + }); + }); + } + + describe('curve25519', function() { + this.timeout(5000); + testCurve25519(); + }); + describe('curve25519 in a worker', function() { + before(function() { + worker.startWorker(); }); - describe('curve25519 in a worker', function() { - before(function() { - libsignal.worker.startWorker('../../dist/libsignal-protocol-worker.js'); - }); - after(function() { - libsignal.worker.stopWorker(); - }); - this.timeout(5000); - testCurve25519(); + after(function() { + worker.stopWorker(); }); + this.timeout(5000); + testCurve25519(); + }); }); diff --git a/test/helpers_test.js b/test/helpers_test.js index 0b671b0..edee15f 100644 --- a/test/helpers_test.js +++ b/test/helpers_test.js @@ -1,6 +1,8 @@ /* vim: ts=4:sw=4 */ - 'use strict'; + +var util = require('../src/helpers.js'); + describe('util', function() { describe("isEqual", function(){ it('returns false when a or b is undefined', function(){ diff --git a/test/index.html b/test/index.html index 71a43d5..9825567 100644 --- a/test/index.html +++ b/test/index.html @@ -4,48 +4,11 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/test/main.js b/test/main.js new file mode 100644 index 0000000..8282af3 --- /dev/null +++ b/test/main.js @@ -0,0 +1,22 @@ +/* vim: ts=4:sw=4 */ +mocha.setup("bdd"); +window.assert = chai.assert; + +require('./helpers_test.js'); +require('./crypto_test.js'); +require('./SessionCipherTest.js'); +require('./KeyHelperTest.js'); +require('./NumericFingerprintTest.js'); +require('./SessionBuilderTest.js'); +var testIdentityKeyStore = require('./IdentityKeyStore_test.js'); +var testPreKeyStore = require('./PreKeyStore_test.js'); +var testSignedPreKeyStore = require('./SignedPreKeyStore_test.js'); +var testSessionStore = require('./SessionStore_test.js'); +require('./SignalProtocolStore_test.js')( + testIdentityKeyStore, + testPreKeyStore, + testSignedPreKeyStore, + testSessionStore +); +require('./SignalProtocolAddressTest.js'); +require('./IntegrationTest.js'); diff --git a/test/temp_helpers.js b/test/temp_helpers.js index d3ee2f8..b52749d 100644 --- a/test/temp_helpers.js +++ b/test/temp_helpers.js @@ -1,4 +1,5 @@ -var pushMessages = dcodeIO.ProtoBuf.loadProto('package textsecure;\n' + +var dcodeIO = require('../build/dcodeIO.js'); +var pushMessages = dcodeIO.loadProto('package textsecure;\n' + '\n' + 'option java_package = "org.whispersystems.textsecure.push";\n' + 'option java_outer_classname = "PushMessageProtos";\n' + @@ -54,7 +55,7 @@ var pushMessages = dcodeIO.ProtoBuf.loadProto('package textsecure;\n' + ' optional uint32 flags = 4;\n' + '}').build('textsecure'); -window.textsecure = { +module.exports = { protobuf: { IncomingPushMessageSignal : pushMessages.IncomingPushMessageSignal, PushMessageContent : pushMessages.PushMessageContent, diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 3ce94b3..0000000 --- a/test/test.js +++ /dev/null @@ -1,34455 +0,0 @@ -var Internal = {}; -window.libsignal = {}; -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1) { - suites.shift(); - } - var suite = Suite.create(suites[0], title); - suite.file = file; - suites.unshift(suite); - return suite; - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn) { - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn) { - var test = new Test(title, fn); - test.file = file; - suites[0].addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn) { - var test = context.test(title, fn); - var reString = '^' + escapeRe(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - context.test.skip = common.test.skip; - context.test.retries = common.test.retries; - }); -}; - -},{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":49}],13:[function(require,module,exports){ -/** - * Module dependencies. - */ - -var Suite = require('../suite'); -var Test = require('../test'); -var escapeRe = require('escape-string-regexp'); - -/** - * TDD-style interface: - * - * suite('Array', function() { - * suite('#indexOf()', function() { - * suiteSetup(function() { - * - * }); - * - * test('should return -1 when not present', function() { - * - * }); - * - * test('should return the index when present', function() { - * - * }); - * - * suiteTeardown(function() { - * - * }); - * }); - * }); - * - * @param {Suite} suite Root suite. - */ -module.exports = function(suite) { - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha) { - var common = require('./common')(suites, context); - - context.setup = common.beforeEach; - context.teardown = common.afterEach; - context.suiteSetup = common.before; - context.suiteTeardown = common.after; - context.run = mocha.options.delay && common.runWithSuite(suite); - - /** - * Describe a "suite" with the given `title` and callback `fn` containing - * nested suites and/or tests. - */ - context.suite = function(title, fn) { - var suite = Suite.create(suites[0], title); - suite.file = file; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending suite. - */ - context.suite.skip = function(title, fn) { - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive test-case. - */ - context.suite.only = function(title, fn) { - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case with the given `title` and - * callback `fn` acting as a thunk. - */ - context.test = function(title, fn) { - var suite = suites[0]; - if (suite.isPending()) { - fn = null; - } - var test = new Test(title, fn); - test.file = file; - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn) { - var test = context.test(title, fn); - var reString = '^' + escapeRe(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - context.test.skip = common.test.skip; - context.test.retries = common.test.retries; - }); -}; - -},{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":49}],14:[function(require,module,exports){ -(function (process,global,__dirname){ -/*! - * mocha - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var escapeRe = require('escape-string-regexp'); -var path = require('path'); -var reporters = require('./reporters'); -var utils = require('./utils'); - -/** - * Expose `Mocha`. - */ - -exports = module.exports = Mocha; - -/** - * To require local UIs and reporters when running in node. - */ - -if (!process.browser) { - var cwd = process.cwd(); - module.paths.push(cwd, path.join(cwd, 'node_modules')); -} - -/** - * Expose internals. - */ - -exports.utils = utils; -exports.interfaces = require('./interfaces'); -exports.reporters = reporters; -exports.Runnable = require('./runnable'); -exports.Context = require('./context'); -exports.Runner = require('./runner'); -exports.Suite = require('./suite'); -exports.Hook = require('./hook'); -exports.Test = require('./test'); - -/** - * Return image `name` path. - * - * @api private - * @param {string} name - * @return {string} - */ -function image(name) { - return path.join(__dirname, '../images', name + '.png'); -} - -/** - * Set up mocha with `options`. - * - * Options: - * - * - `ui` name "bdd", "tdd", "exports" etc - * - `reporter` reporter instance, defaults to `mocha.reporters.spec` - * - `globals` array of accepted globals - * - `timeout` timeout in milliseconds - * - `retries` number of times to retry failed tests - * - `bail` bail on the first test failure - * - `slow` milliseconds to wait before considering a test slow - * - `ignoreLeaks` ignore global leaks - * - `fullTrace` display the full stack-trace on failing - * - `grep` string or regexp to filter tests with - * - * @param {Object} options - * @api public - */ -function Mocha(options) { - options = options || {}; - this.files = []; - this.options = options; - if (options.grep) { - this.grep(new RegExp(options.grep)); - } - if (options.fgrep) { - this.grep(options.fgrep); - } - this.suite = new exports.Suite('', new exports.Context()); - this.ui(options.ui); - this.bail(options.bail); - this.reporter(options.reporter, options.reporterOptions); - if (typeof options.timeout !== 'undefined' && options.timeout !== null) { - this.timeout(options.timeout); - } - if (typeof options.retries !== 'undefined' && options.retries !== null) { - this.retries(options.retries); - } - this.useColors(options.useColors); - if (options.enableTimeouts !== null) { - this.enableTimeouts(options.enableTimeouts); - } - if (options.slow) { - this.slow(options.slow); - } -} - -/** - * Enable or disable bailing on the first failure. - * - * @api public - * @param {boolean} [bail] - */ -Mocha.prototype.bail = function(bail) { - if (!arguments.length) { - bail = true; - } - this.suite.bail(bail); - return this; -}; - -/** - * Add test `file`. - * - * @api public - * @param {string} file - */ -Mocha.prototype.addFile = function(file) { - this.files.push(file); - return this; -}; - -/** - * Set reporter to `reporter`, defaults to "spec". - * - * @param {String|Function} reporter name or constructor - * @param {Object} reporterOptions optional options - * @api public - * @param {string|Function} reporter name or constructor - * @param {Object} reporterOptions optional options - */ -Mocha.prototype.reporter = function(reporter, reporterOptions) { - if (typeof reporter === 'function') { - this._reporter = reporter; - } else { - reporter = reporter || 'spec'; - var _reporter; - // Try to load a built-in reporter. - if (reporters[reporter]) { - _reporter = reporters[reporter]; - } - // Try to load reporters from process.cwd() and node_modules - if (!_reporter) { - try { - _reporter = require(reporter); - } catch (err) { - err.message.indexOf('Cannot find module') !== -1 - ? console.warn('"' + reporter + '" reporter not found') - : console.warn('"' + reporter + '" reporter blew up with error:\n' + err.stack); - } - } - if (!_reporter && reporter === 'teamcity') { - console.warn('The Teamcity reporter was moved to a package named ' - + 'mocha-teamcity-reporter ' - + '(https://npmjs.org/package/mocha-teamcity-reporter).'); - } - if (!_reporter) { - throw new Error('invalid reporter "' + reporter + '"'); - } - this._reporter = _reporter; - } - this.options.reporterOptions = reporterOptions; - return this; -}; - -/** - * Set test UI `name`, defaults to "bdd". - * - * @api public - * @param {string} bdd - */ -Mocha.prototype.ui = function(name) { - name = name || 'bdd'; - this._ui = exports.interfaces[name]; - if (!this._ui) { - try { - this._ui = require(name); - } catch (err) { - throw new Error('invalid interface "' + name + '"'); - } - } - this._ui = this._ui(this.suite); - - this.suite.on('pre-require', function(context) { - exports.afterEach = context.afterEach || context.teardown; - exports.after = context.after || context.suiteTeardown; - exports.beforeEach = context.beforeEach || context.setup; - exports.before = context.before || context.suiteSetup; - exports.describe = context.describe || context.suite; - exports.it = context.it || context.test; - exports.setup = context.setup || context.beforeEach; - exports.suiteSetup = context.suiteSetup || context.before; - exports.suiteTeardown = context.suiteTeardown || context.after; - exports.suite = context.suite || context.describe; - exports.teardown = context.teardown || context.afterEach; - exports.test = context.test || context.it; - exports.run = context.run; - }); - - return this; -}; - -/** - * Load registered files. - * - * @api private - */ -Mocha.prototype.loadFiles = function(fn) { - var self = this; - var suite = this.suite; - this.files.forEach(function(file) { - file = path.resolve(file); - suite.emit('pre-require', global, file, self); - suite.emit('require', require(file), file, self); - suite.emit('post-require', global, file, self); - }); - fn && fn(); -}; - -/** - * Enable growl support. - * - * @api private - */ -Mocha.prototype._growl = function(runner, reporter) { - var notify = require('growl'); - - runner.on('end', function() { - var stats = reporter.stats; - if (stats.failures) { - var msg = stats.failures + ' of ' + runner.total + ' tests failed'; - notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); - } else { - notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { - name: 'mocha', - title: 'Passed', - image: image('ok') - }); - } - }); -}; - -/** - * Add regexp to grep, if `re` is a string it is escaped. - * - * @param {RegExp|String} re - * @return {Mocha} - * @api public - * @param {RegExp|string} re - * @return {Mocha} - */ -Mocha.prototype.grep = function(re) { - this.options.grep = typeof re === 'string' ? new RegExp(escapeRe(re)) : re; - return this; -}; - -/** - * Invert `.grep()` matches. - * - * @return {Mocha} - * @api public - */ -Mocha.prototype.invert = function() { - this.options.invert = true; - return this; -}; - -/** - * Ignore global leaks. - * - * @param {Boolean} ignore - * @return {Mocha} - * @api public - * @param {boolean} ignore - * @return {Mocha} - */ -Mocha.prototype.ignoreLeaks = function(ignore) { - this.options.ignoreLeaks = Boolean(ignore); - return this; -}; - -/** - * Enable global leak checking. - * - * @return {Mocha} - * @api public - */ -Mocha.prototype.checkLeaks = function() { - this.options.ignoreLeaks = false; - return this; -}; - -/** - * Display long stack-trace on failing - * - * @return {Mocha} - * @api public - */ -Mocha.prototype.fullTrace = function() { - this.options.fullStackTrace = true; - return this; -}; - -/** - * Enable growl support. - * - * @return {Mocha} - * @api public - */ -Mocha.prototype.growl = function() { - this.options.growl = true; - return this; -}; - -/** - * Ignore `globals` array or string. - * - * @param {Array|String} globals - * @return {Mocha} - * @api public - * @param {Array|string} globals - * @return {Mocha} - */ -Mocha.prototype.globals = function(globals) { - this.options.globals = (this.options.globals || []).concat(globals); - return this; -}; - -/** - * Emit color output. - * - * @param {Boolean} colors - * @return {Mocha} - * @api public - * @param {boolean} colors - * @return {Mocha} - */ -Mocha.prototype.useColors = function(colors) { - if (colors !== undefined) { - this.options.useColors = colors; - } - return this; -}; - -/** - * Use inline diffs rather than +/-. - * - * @param {Boolean} inlineDiffs - * @return {Mocha} - * @api public - * @param {boolean} inlineDiffs - * @return {Mocha} - */ -Mocha.prototype.useInlineDiffs = function(inlineDiffs) { - this.options.useInlineDiffs = inlineDiffs !== undefined && inlineDiffs; - return this; -}; - -/** - * Set the timeout in milliseconds. - * - * @param {Number} timeout - * @return {Mocha} - * @api public - * @param {number} timeout - * @return {Mocha} - */ -Mocha.prototype.timeout = function(timeout) { - this.suite.timeout(timeout); - return this; -}; - -/** - * Set the number of times to retry failed tests. - * - * @param {Number} retry times - * @return {Mocha} - * @api public - */ -Mocha.prototype.retries = function(n) { - this.suite.retries(n); - return this; -}; - -/** - * Set slowness threshold in milliseconds. - * - * @param {Number} slow - * @return {Mocha} - * @api public - * @param {number} slow - * @return {Mocha} - */ -Mocha.prototype.slow = function(slow) { - this.suite.slow(slow); - return this; -}; - -/** - * Enable timeouts. - * - * @param {Boolean} enabled - * @return {Mocha} - * @api public - * @param {boolean} enabled - * @return {Mocha} - */ -Mocha.prototype.enableTimeouts = function(enabled) { - this.suite.enableTimeouts(arguments.length && enabled !== undefined ? enabled : true); - return this; -}; - -/** - * Makes all tests async (accepting a callback) - * - * @return {Mocha} - * @api public - */ -Mocha.prototype.asyncOnly = function() { - this.options.asyncOnly = true; - return this; -}; - -/** - * Disable syntax highlighting (in browser). - * - * @api public - */ -Mocha.prototype.noHighlighting = function() { - this.options.noHighlighting = true; - return this; -}; - -/** - * Enable uncaught errors to propagate (in browser). - * - * @return {Mocha} - * @api public - */ -Mocha.prototype.allowUncaught = function() { - this.options.allowUncaught = true; - return this; -}; - -/** - * Delay root suite execution. - * @returns {Mocha} - */ -Mocha.prototype.delay = function delay() { - this.options.delay = true; - return this; -}; - -/** - * Run tests and invoke `fn()` when complete. - * - * @api public - * @param {Function} fn - * @return {Runner} - */ -Mocha.prototype.run = function(fn) { - if (this.files.length) { - this.loadFiles(); - } - var suite = this.suite; - var options = this.options; - options.files = this.files; - var runner = new exports.Runner(suite, options.delay); - var reporter = new this._reporter(runner, options); - runner.ignoreLeaks = options.ignoreLeaks !== false; - runner.fullStackTrace = options.fullStackTrace; - runner.asyncOnly = options.asyncOnly; - runner.allowUncaught = options.allowUncaught; - if (options.grep) { - runner.grep(options.grep, options.invert); - } - if (options.globals) { - runner.globals(options.globals); - } - if (options.growl) { - this._growl(runner, reporter); - } - if (options.useColors !== undefined) { - exports.reporters.Base.useColors = options.useColors; - } - exports.reporters.Base.inlineDiffs = options.useInlineDiffs; - - function done(failures) { - if (reporter.done) { - reporter.done(failures, fn); - } else { - fn && fn(failures); - } - } - - return runner.run(done); -}; - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},"/lib") -},{"./context":6,"./hook":7,"./interfaces":11,"./reporters":22,"./runnable":35,"./runner":36,"./suite":37,"./test":38,"./utils":39,"_process":58,"escape-string-regexp":49,"growl":51,"path":43}],15:[function(require,module,exports){ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @api public - * @param {string|number} val - * @param {Object} options - * @return {string|number} - */ -module.exports = function(val, options) { - options = options || {}; - if (typeof val === 'string') { - return parse(val); - } - // https://github.com/mochajs/mocha/pull/1035 - return options['long'] ? longFormat(val) : shortFormat(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @api private - * @param {string} str - * @return {number} - */ -function parse(str) { - var match = (/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i).exec(str); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - default: - // No default case - } -} - -/** - * Short format for `ms`. - * - * @api private - * @param {number} ms - * @return {string} - */ -function shortFormat(ms) { - if (ms >= d) { - return Math.round(ms / d) + 'd'; - } - if (ms >= h) { - return Math.round(ms / h) + 'h'; - } - if (ms >= m) { - return Math.round(ms / m) + 'm'; - } - if (ms >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @api private - * @param {number} ms - * @return {string} - */ -function longFormat(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - * - * @api private - * @param {number} ms - * @param {number} n - * @param {string} name - */ -function plural(ms, n, name) { - if (ms < n) { - return; - } - if (ms < n * 1.5) { - return Math.floor(ms / n) + ' ' + name; - } - return Math.ceil(ms / n) + ' ' + name + 's'; -} - -},{}],16:[function(require,module,exports){ - -/** - * Expose `Pending`. - */ - -module.exports = Pending; - -/** - * Initialize a new `Pending` error with the given message. - * - * @param {string} message - */ -function Pending(message) { - this.message = message; -} - -},{}],17:[function(require,module,exports){ -(function (process,global){ -/** - * Module dependencies. - */ - -var tty = require('tty'); -var diff = require('diff'); -var ms = require('../ms'); -var utils = require('../utils'); -var supportsColor = process.browser ? null : require('supports-color'); - -/** - * Expose `Base`. - */ - -exports = module.exports = Base; - -/** - * Save timer references to avoid Sinon interfering. - * See: https://github.com/mochajs/mocha/issues/237 - */ - -/* eslint-disable no-unused-vars, no-native-reassign */ -var Date = global.Date; -var setTimeout = global.setTimeout; -var setInterval = global.setInterval; -var clearTimeout = global.clearTimeout; -var clearInterval = global.clearInterval; -/* eslint-enable no-unused-vars, no-native-reassign */ - -/** - * Check if both stdio streams are associated with a tty. - */ - -var isatty = tty.isatty(1) && tty.isatty(2); - -/** - * Enable coloring by default, except in the browser interface. - */ - -exports.useColors = !process.browser && (supportsColor || (process.env.MOCHA_COLORS !== undefined)); - -/** - * Inline diffs instead of +/- - */ - -exports.inlineDiffs = false; - -/** - * Default color map. - */ - -exports.colors = { - pass: 90, - fail: 31, - 'bright pass': 92, - 'bright fail': 91, - 'bright yellow': 93, - pending: 36, - suite: 0, - 'error title': 0, - 'error message': 31, - 'error stack': 90, - checkmark: 32, - fast: 90, - medium: 33, - slow: 31, - green: 32, - light: 90, - 'diff gutter': 90, - 'diff added': 32, - 'diff removed': 31 -}; - -/** - * Default symbol map. - */ - -exports.symbols = { - ok: '✓', - err: '✖', - dot: '․' -}; - -// With node.js on Windows: use symbols available in terminal default fonts -if (process.platform === 'win32') { - exports.symbols.ok = '\u221A'; - exports.symbols.err = '\u00D7'; - exports.symbols.dot = '.'; -} - -/** - * Color `str` with the given `type`, - * allowing colors to be disabled, - * as well as user-defined color - * schemes. - * - * @param {string} type - * @param {string} str - * @return {string} - * @api private - */ -var color = exports.color = function(type, str) { - if (!exports.useColors) { - return String(str); - } - return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; -}; - -/** - * Expose term window size, with some defaults for when stderr is not a tty. - */ - -exports.window = { - width: 75 -}; - -if (isatty) { - exports.window.width = process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1]; -} - -/** - * Expose some basic cursor interactions that are common among reporters. - */ - -exports.cursor = { - hide: function() { - isatty && process.stdout.write('\u001b[?25l'); - }, - - show: function() { - isatty && process.stdout.write('\u001b[?25h'); - }, - - deleteLine: function() { - isatty && process.stdout.write('\u001b[2K'); - }, - - beginningOfLine: function() { - isatty && process.stdout.write('\u001b[0G'); - }, - - CR: function() { - if (isatty) { - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); - } else { - process.stdout.write('\r'); - } - } -}; - -/** - * Outut the given `failures` as a list. - * - * @param {Array} failures - * @api public - */ - -exports.list = function(failures) { - console.log(); - failures.forEach(function(test, i) { - // format - var fmt = color('error title', ' %s) %s:\n') - + color('error message', ' %s') - + color('error stack', '\n%s\n'); - - // msg - var msg; - var err = test.err; - var message; - if (err.message && typeof err.message.toString === 'function') { - message = err.message + ''; - } else if (typeof err.inspect === 'function') { - message = err.inspect() + ''; - } else { - message = ''; - } - var stack = err.stack || message; - var index = stack.indexOf(message); - var actual = err.actual; - var expected = err.expected; - var escape = true; - - if (index === -1) { - msg = message; - } else { - index += message.length; - msg = stack.slice(0, index); - // remove msg from stack - stack = stack.slice(index + 1); - } - - // uncaught - if (err.uncaught) { - msg = 'Uncaught ' + msg; - } - // explicitly show diff - if (err.showDiff !== false && sameType(actual, expected) && expected !== undefined) { - escape = false; - if (!(utils.isString(actual) && utils.isString(expected))) { - err.actual = actual = utils.stringify(actual); - err.expected = expected = utils.stringify(expected); - } - - fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n'); - var match = message.match(/^([^:]+): expected/); - msg = '\n ' + color('error message', match ? match[1] : msg); - - if (exports.inlineDiffs) { - msg += inlineDiff(err, escape); - } else { - msg += unifiedDiff(err, escape); - } - } - - // indent stack trace - stack = stack.replace(/^/gm, ' '); - - console.log(fmt, (i + 1), test.fullTitle(), msg, stack); - }); -}; - -/** - * Initialize a new `Base` reporter. - * - * All other reporters generally - * inherit from this reporter, providing - * stats such as test duration, number - * of tests passed / failed etc. - * - * @param {Runner} runner - * @api public - */ - -function Base(runner) { - var stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 }; - var failures = this.failures = []; - - if (!runner) { - return; - } - this.runner = runner; - - runner.stats = stats; - - runner.on('start', function() { - stats.start = new Date(); - }); - - runner.on('suite', function(suite) { - stats.suites = stats.suites || 0; - suite.root || stats.suites++; - }); - - runner.on('test end', function() { - stats.tests = stats.tests || 0; - stats.tests++; - }); - - runner.on('pass', function(test) { - stats.passes = stats.passes || 0; - - if (test.duration > test.slow()) { - test.speed = 'slow'; - } else if (test.duration > test.slow() / 2) { - test.speed = 'medium'; - } else { - test.speed = 'fast'; - } - - stats.passes++; - }); - - runner.on('fail', function(test, err) { - stats.failures = stats.failures || 0; - stats.failures++; - test.err = err; - failures.push(test); - }); - - runner.on('end', function() { - stats.end = new Date(); - stats.duration = new Date() - stats.start; - }); - - runner.on('pending', function() { - stats.pending++; - }); -} - -/** - * Output common epilogue used by many of - * the bundled reporters. - * - * @api public - */ -Base.prototype.epilogue = function() { - var stats = this.stats; - var fmt; - - console.log(); - - // passes - fmt = color('bright pass', ' ') - + color('green', ' %d passing') - + color('light', ' (%s)'); - - console.log(fmt, - stats.passes || 0, - ms(stats.duration)); - - // pending - if (stats.pending) { - fmt = color('pending', ' ') - + color('pending', ' %d pending'); - - console.log(fmt, stats.pending); - } - - // failures - if (stats.failures) { - fmt = color('fail', ' %d failing'); - - console.log(fmt, stats.failures); - - Base.list(this.failures); - console.log(); - } - - console.log(); -}; - -/** - * Pad the given `str` to `len`. - * - * @api private - * @param {string} str - * @param {string} len - * @return {string} - */ -function pad(str, len) { - str = String(str); - return Array(len - str.length + 1).join(' ') + str; -} - -/** - * Returns an inline diff between 2 strings with coloured ANSI output - * - * @api private - * @param {Error} err with actual/expected - * @param {boolean} escape - * @return {string} Diff - */ -function inlineDiff(err, escape) { - var msg = errorDiff(err, 'WordsWithSpace', escape); - - // linenos - var lines = msg.split('\n'); - if (lines.length > 4) { - var width = String(lines.length).length; - msg = lines.map(function(str, i) { - return pad(++i, width) + ' |' + ' ' + str; - }).join('\n'); - } - - // legend - msg = '\n' - + color('diff removed', 'actual') - + ' ' - + color('diff added', 'expected') - + '\n\n' - + msg - + '\n'; - - // indent - msg = msg.replace(/^/gm, ' '); - return msg; -} - -/** - * Returns a unified diff between two strings. - * - * @api private - * @param {Error} err with actual/expected - * @param {boolean} escape - * @return {string} The diff. - */ -function unifiedDiff(err, escape) { - var indent = ' '; - function cleanUp(line) { - if (escape) { - line = escapeInvisibles(line); - } - if (line[0] === '+') { - return indent + colorLines('diff added', line); - } - if (line[0] === '-') { - return indent + colorLines('diff removed', line); - } - if (line.match(/\@\@/)) { - return null; - } - if (line.match(/\\ No newline/)) { - return null; - } - return indent + line; - } - function notBlank(line) { - return typeof line !== 'undefined' && line !== null; - } - var msg = diff.createPatch('string', err.actual, err.expected); - var lines = msg.split('\n').splice(4); - return '\n ' - + colorLines('diff added', '+ expected') + ' ' - + colorLines('diff removed', '- actual') - + '\n\n' - + lines.map(cleanUp).filter(notBlank).join('\n'); -} - -/** - * Return a character diff for `err`. - * - * @api private - * @param {Error} err - * @param {string} type - * @param {boolean} escape - * @return {string} - */ -function errorDiff(err, type, escape) { - var actual = escape ? escapeInvisibles(err.actual) : err.actual; - var expected = escape ? escapeInvisibles(err.expected) : err.expected; - return diff['diff' + type](actual, expected).map(function(str) { - if (str.added) { - return colorLines('diff added', str.value); - } - if (str.removed) { - return colorLines('diff removed', str.value); - } - return str.value; - }).join(''); -} - -/** - * Returns a string with all invisible characters in plain text - * - * @api private - * @param {string} line - * @return {string} - */ -function escapeInvisibles(line) { - return line.replace(/\t/g, '') - .replace(/\r/g, '') - .replace(/\n/g, '\n'); -} - -/** - * Color lines for `str`, using the color `name`. - * - * @api private - * @param {string} name - * @param {string} str - * @return {string} - */ -function colorLines(name, str) { - return str.split('\n').map(function(str) { - return color(name, str); - }).join('\n'); -} - -/** - * Object#toString reference. - */ -var objToString = Object.prototype.toString; - -/** - * Check that a / b have the same type. - * - * @api private - * @param {Object} a - * @param {Object} b - * @return {boolean} - */ -function sameType(a, b) { - return objToString.call(a) === objToString.call(b); -} - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../ms":15,"../utils":39,"_process":58,"diff":48,"supports-color":43,"tty":5}],18:[function(require,module,exports){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var utils = require('../utils'); - -/** - * Expose `Doc`. - */ - -exports = module.exports = Doc; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ -function Doc(runner) { - Base.call(this, runner); - - var indents = 2; - - function indent() { - return Array(indents).join(' '); - } - - runner.on('suite', function(suite) { - if (suite.root) { - return; - } - ++indents; - console.log('%s
', indent()); - ++indents; - console.log('%s

%s

', indent(), utils.escape(suite.title)); - console.log('%s
', indent()); - }); - - runner.on('suite end', function(suite) { - if (suite.root) { - return; - } - console.log('%s
', indent()); - --indents; - console.log('%s
', indent()); - --indents; - }); - - runner.on('pass', function(test) { - console.log('%s
%s
', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.body)); - console.log('%s
%s
', indent(), code); - }); - - runner.on('fail', function(test, err) { - console.log('%s
%s
', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.body)); - console.log('%s
%s
', indent(), code); - console.log('%s
%s
', indent(), utils.escape(err)); - }); -} - -},{"../utils":39,"./base":17}],19:[function(require,module,exports){ -(function (process){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; -var color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = Dot; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @api public - * @param {Runner} runner - */ -function Dot(runner) { - Base.call(this, runner); - - var self = this; - var width = Base.window.width * .75 | 0; - var n = -1; - - runner.on('start', function() { - process.stdout.write('\n'); - }); - - runner.on('pending', function() { - if (++n % width === 0) { - process.stdout.write('\n '); - } - process.stdout.write(color('pending', Base.symbols.dot)); - }); - - runner.on('pass', function(test) { - if (++n % width === 0) { - process.stdout.write('\n '); - } - if (test.speed === 'slow') { - process.stdout.write(color('bright yellow', Base.symbols.dot)); - } else { - process.stdout.write(color(test.speed, Base.symbols.dot)); - } - }); - - runner.on('fail', function() { - if (++n % width === 0) { - process.stdout.write('\n '); - } - process.stdout.write(color('fail', Base.symbols.dot)); - }); - - runner.on('end', function() { - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Dot, Base); - -}).call(this,require('_process')) -},{"../utils":39,"./base":17,"_process":58}],20:[function(require,module,exports){ -(function (process,__dirname){ -/** - * Module dependencies. - */ - -var JSONCov = require('./json-cov'); -var readFileSync = require('fs').readFileSync; -var join = require('path').join; - -/** - * Expose `HTMLCov`. - */ - -exports = module.exports = HTMLCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @api public - * @param {Runner} runner - */ -function HTMLCov(runner) { - var jade = require('jade'); - var file = join(__dirname, '/templates/coverage.jade'); - var str = readFileSync(file, 'utf8'); - var fn = jade.compile(str, { filename: file }); - var self = this; - - JSONCov.call(this, runner, false); - - runner.on('end', function() { - process.stdout.write(fn({ - cov: self.cov, - coverageClass: coverageClass - })); - }); -} - -/** - * Return coverage class for a given coverage percentage. - * - * @api private - * @param {number} coveragePctg - * @return {string} - */ -function coverageClass(coveragePctg) { - if (coveragePctg >= 75) { - return 'high'; - } - if (coveragePctg >= 50) { - return 'medium'; - } - if (coveragePctg >= 25) { - return 'low'; - } - return 'terrible'; -} - -}).call(this,require('_process'),"/lib/reporters") -},{"./json-cov":23,"_process":58,"fs":43,"jade":43,"path":43}],21:[function(require,module,exports){ -(function (global){ -/* eslint-env browser */ - -/** - * Module dependencies. - */ - -var Base = require('./base'); -var utils = require('../utils'); -var Progress = require('../browser/progress'); -var escapeRe = require('escape-string-regexp'); -var escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -/* eslint-disable no-unused-vars, no-native-reassign */ -var Date = global.Date; -var setTimeout = global.setTimeout; -var setInterval = global.setInterval; -var clearTimeout = global.clearTimeout; -var clearInterval = global.clearInterval; -/* eslint-enable no-unused-vars, no-native-reassign */ - -/** - * Expose `HTML`. - */ - -exports = module.exports = HTML; - -/** - * Stats template. - */ - -var statsTemplate = ''; - -/** - * Initialize a new `HTML` reporter. - * - * @api public - * @param {Runner} runner - */ -function HTML(runner) { - Base.call(this, runner); - - var self = this; - var stats = this.stats; - var stat = fragment(statsTemplate); - var items = stat.getElementsByTagName('li'); - var passes = items[1].getElementsByTagName('em')[0]; - var passesLink = items[1].getElementsByTagName('a')[0]; - var failures = items[2].getElementsByTagName('em')[0]; - var failuresLink = items[2].getElementsByTagName('a')[0]; - var duration = items[3].getElementsByTagName('em')[0]; - var canvas = stat.getElementsByTagName('canvas')[0]; - var report = fragment('
    '); - var stack = [report]; - var progress; - var ctx; - var root = document.getElementById('mocha'); - - if (canvas.getContext) { - var ratio = window.devicePixelRatio || 1; - canvas.style.width = canvas.width; - canvas.style.height = canvas.height; - canvas.width *= ratio; - canvas.height *= ratio; - ctx = canvas.getContext('2d'); - ctx.scale(ratio, ratio); - progress = new Progress(); - } - - if (!root) { - return error('#mocha div missing, add it to your document'); - } - - // pass toggle - on(passesLink, 'click', function(evt) { - evt.preventDefault(); - unhide(); - var name = (/pass/).test(report.className) ? '' : ' pass'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) { - hideSuitesWithout('test pass'); - } - }); - - // failure toggle - on(failuresLink, 'click', function(evt) { - evt.preventDefault(); - unhide(); - var name = (/fail/).test(report.className) ? '' : ' fail'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) { - hideSuitesWithout('test fail'); - } - }); - - root.appendChild(stat); - root.appendChild(report); - - if (progress) { - progress.size(40); - } - - runner.on('suite', function(suite) { - if (suite.root) { - return; - } - - // suite - var url = self.suiteURL(suite); - var el = fragment('
  • %s

  • ', url, escape(suite.title)); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement('ul')); - el.appendChild(stack[0]); - }); - - runner.on('suite end', function(suite) { - if (suite.root) { - return; - } - stack.shift(); - }); - - runner.on('pass', function(test) { - var url = self.testURL(test); - var markup = '
  • %e%ems ' - + '‣

  • '; - var el = fragment(markup, test.speed, test.title, test.duration, url); - self.addCodeToggle(el, test.body); - appendToStack(el); - updateStats(); - }); - - runner.on('fail', function(test) { - var el = fragment('
  • %e ‣

  • ', - test.title, self.testURL(test)); - var stackString; // Note: Includes leading newline - var message = test.err.toString(); - - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if (message === '[object Error]') { - message = test.err.message; - } - - if (test.err.stack) { - var indexOfMessage = test.err.stack.indexOf(test.err.message); - if (indexOfMessage === -1) { - stackString = test.err.stack; - } else { - stackString = test.err.stack.substr(test.err.message.length + indexOfMessage); - } - } else if (test.err.sourceURL && test.err.line !== undefined) { - // Safari doesn't give you a stack. Let's at least provide a source line. - stackString = '\n(' + test.err.sourceURL + ':' + test.err.line + ')'; - } - - stackString = stackString || ''; - - if (test.err.htmlMessage && stackString) { - el.appendChild(fragment('
    %s\n
    %e
    ', - test.err.htmlMessage, stackString)); - } else if (test.err.htmlMessage) { - el.appendChild(fragment('
    %s
    ', test.err.htmlMessage)); - } else { - el.appendChild(fragment('
    %e%e
    ', message, stackString)); - } - - self.addCodeToggle(el, test.body); - appendToStack(el); - updateStats(); - }); - - runner.on('pending', function(test) { - var el = fragment('
  • %e

  • ', test.title); - appendToStack(el); - updateStats(); - }); - - function appendToStack(el) { - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) { - stack[0].appendChild(el); - } - } - - function updateStats() { - // TODO: add to stats - var percent = stats.tests / this.total * 100 | 0; - if (progress) { - progress.update(percent).draw(ctx); - } - - // update stats - var ms = new Date() - stats.start; - text(passes, stats.passes); - text(failures, stats.failures); - text(duration, (ms / 1000).toFixed(2)); - } -} - -/** - * Makes a URL, preserving querystring ("search") parameters. - * - * @param {string} s - * @return {string} A new URL. - */ -function makeUrl(s) { - var search = window.location.search; - - // Remove previous grep query parameter if present - if (search) { - search = search.replace(/[?&]grep=[^&\s]*/g, '').replace(/^&/, '?'); - } - - return window.location.pathname + (search ? search + '&' : '?') + 'grep=' + encodeURIComponent(escapeRe(s)); -} - -/** - * Provide suite URL. - * - * @param {Object} [suite] - */ -HTML.prototype.suiteURL = function(suite) { - return makeUrl(suite.fullTitle()); -}; - -/** - * Provide test URL. - * - * @param {Object} [test] - */ -HTML.prototype.testURL = function(test) { - return makeUrl(test.fullTitle()); -}; - -/** - * Adds code toggle functionality for the provided test's list element. - * - * @param {HTMLLIElement} el - * @param {string} contents - */ -HTML.prototype.addCodeToggle = function(el, contents) { - var h2 = el.getElementsByTagName('h2')[0]; - - on(h2, 'click', function() { - pre.style.display = pre.style.display === 'none' ? 'block' : 'none'; - }); - - var pre = fragment('
    %e
    ', utils.clean(contents)); - el.appendChild(pre); - pre.style.display = 'none'; -}; - -/** - * Display error `msg`. - * - * @param {string} msg - */ -function error(msg) { - document.body.appendChild(fragment('
    %s
    ', msg)); -} - -/** - * Return a DOM fragment from `html`. - * - * @param {string} html - */ -function fragment(html) { - var args = arguments; - var div = document.createElement('div'); - var i = 1; - - div.innerHTML = html.replace(/%([se])/g, function(_, type) { - switch (type) { - case 's': return String(args[i++]); - case 'e': return escape(args[i++]); - // no default - } - }); - - return div.firstChild; -} - -/** - * Check for suites that do not have elements - * with `classname`, and hide them. - * - * @param {text} classname - */ -function hideSuitesWithout(classname) { - var suites = document.getElementsByClassName('suite'); - for (var i = 0; i < suites.length; i++) { - var els = suites[i].getElementsByClassName(classname); - if (!els.length) { - suites[i].className += ' hidden'; - } - } -} - -/** - * Unhide .hidden suites. - */ -function unhide() { - var els = document.getElementsByClassName('suite hidden'); - for (var i = 0; i < els.length; ++i) { - els[i].className = els[i].className.replace('suite hidden', 'suite'); - } -} - -/** - * Set an element's text contents. - * - * @param {HTMLElement} el - * @param {string} contents - */ -function text(el, contents) { - if (el.textContent) { - el.textContent = contents; - } else { - el.innerText = contents; - } -} - -/** - * Listen on `event` with callback `fn`. - */ -function on(el, event, fn) { - if (el.addEventListener) { - el.addEventListener(event, fn, false); - } else { - el.attachEvent('on' + event, fn); - } -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../browser/progress":4,"../utils":39,"./base":17,"escape-string-regexp":49}],22:[function(require,module,exports){ -// Alias exports to a their normalized format Mocha#reporter to prevent a need -// for dynamic (try/catch) requires, which Browserify doesn't handle. -exports.Base = exports.base = require('./base'); -exports.Dot = exports.dot = require('./dot'); -exports.Doc = exports.doc = require('./doc'); -exports.TAP = exports.tap = require('./tap'); -exports.JSON = exports.json = require('./json'); -exports.HTML = exports.html = require('./html'); -exports.List = exports.list = require('./list'); -exports.Min = exports.min = require('./min'); -exports.Spec = exports.spec = require('./spec'); -exports.Nyan = exports.nyan = require('./nyan'); -exports.XUnit = exports.xunit = require('./xunit'); -exports.Markdown = exports.markdown = require('./markdown'); -exports.Progress = exports.progress = require('./progress'); -exports.Landing = exports.landing = require('./landing'); -exports.JSONCov = exports['json-cov'] = require('./json-cov'); -exports.HTMLCov = exports['html-cov'] = require('./html-cov'); -exports.JSONStream = exports['json-stream'] = require('./json-stream'); - -},{"./base":17,"./doc":18,"./dot":19,"./html":21,"./html-cov":20,"./json":25,"./json-cov":23,"./json-stream":24,"./landing":26,"./list":27,"./markdown":28,"./min":29,"./nyan":30,"./progress":31,"./spec":32,"./tap":33,"./xunit":34}],23:[function(require,module,exports){ -(function (process,global){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `JSONCov`. - */ - -exports = module.exports = JSONCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @api public - * @param {Runner} runner - * @param {boolean} output - */ -function JSONCov(runner, output) { - Base.call(this, runner); - - output = arguments.length === 1 || output; - var self = this; - var tests = []; - var failures = []; - var passes = []; - - runner.on('test end', function(test) { - tests.push(test); - }); - - runner.on('pass', function(test) { - passes.push(test); - }); - - runner.on('fail', function(test) { - failures.push(test); - }); - - runner.on('end', function() { - var cov = global._$jscoverage || {}; - var result = self.cov = map(cov); - result.stats = self.stats; - result.tests = tests.map(clean); - result.failures = failures.map(clean); - result.passes = passes.map(clean); - if (!output) { - return; - } - process.stdout.write(JSON.stringify(result, null, 2)); - }); -} - -/** - * Map jscoverage data to a JSON structure - * suitable for reporting. - * - * @api private - * @param {Object} cov - * @return {Object} - */ - -function map(cov) { - var ret = { - instrumentation: 'node-jscoverage', - sloc: 0, - hits: 0, - misses: 0, - coverage: 0, - files: [] - }; - - for (var filename in cov) { - if (Object.prototype.hasOwnProperty.call(cov, filename)) { - var data = coverage(filename, cov[filename]); - ret.files.push(data); - ret.hits += data.hits; - ret.misses += data.misses; - ret.sloc += data.sloc; - } - } - - ret.files.sort(function(a, b) { - return a.filename.localeCompare(b.filename); - }); - - if (ret.sloc > 0) { - ret.coverage = (ret.hits / ret.sloc) * 100; - } - - return ret; -} - -/** - * Map jscoverage data for a single source file - * to a JSON structure suitable for reporting. - * - * @api private - * @param {string} filename name of the source file - * @param {Object} data jscoverage coverage data - * @return {Object} - */ -function coverage(filename, data) { - var ret = { - filename: filename, - coverage: 0, - hits: 0, - misses: 0, - sloc: 0, - source: {} - }; - - data.source.forEach(function(line, num) { - num++; - - if (data[num] === 0) { - ret.misses++; - ret.sloc++; - } else if (data[num] !== undefined) { - ret.hits++; - ret.sloc++; - } - - ret.source[num] = { - source: line, - coverage: data[num] === undefined ? '' : data[num] - }; - }); - - ret.coverage = ret.hits / ret.sloc * 100; - - return ret; -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @api private - * @param {Object} test - * @return {Object} - */ -function clean(test) { - return { - duration: test.duration, - currentRetry: test.currentRetry(), - fullTitle: test.fullTitle(), - title: test.title - }; -} - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./base":17,"_process":58}],24:[function(require,module,exports){ -(function (process){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @api public - * @param {Runner} runner - */ -function List(runner) { - Base.call(this, runner); - - var self = this; - var total = runner.total; - - runner.on('start', function() { - console.log(JSON.stringify(['start', { total: total }])); - }); - - runner.on('pass', function(test) { - console.log(JSON.stringify(['pass', clean(test)])); - }); - - runner.on('fail', function(test, err) { - test = clean(test); - test.err = err.message; - test.stack = err.stack || null; - console.log(JSON.stringify(['fail', test])); - }); - - runner.on('end', function() { - process.stdout.write(JSON.stringify(['end', self.stats])); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @api private - * @param {Object} test - * @return {Object} - */ -function clean(test) { - return { - title: test.title, - fullTitle: test.fullTitle(), - duration: test.duration, - currentRetry: test.currentRetry() - }; -} - -}).call(this,require('_process')) -},{"./base":17,"_process":58}],25:[function(require,module,exports){ -(function (process){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `JSON`. - */ - -exports = module.exports = JSONReporter; - -/** - * Initialize a new `JSON` reporter. - * - * @api public - * @param {Runner} runner - */ -function JSONReporter(runner) { - Base.call(this, runner); - - var self = this; - var tests = []; - var pending = []; - var failures = []; - var passes = []; - - runner.on('test end', function(test) { - tests.push(test); - }); - - runner.on('pass', function(test) { - passes.push(test); - }); - - runner.on('fail', function(test) { - failures.push(test); - }); - - runner.on('pending', function(test) { - pending.push(test); - }); - - runner.on('end', function() { - var obj = { - stats: self.stats, - tests: tests.map(clean), - pending: pending.map(clean), - failures: failures.map(clean), - passes: passes.map(clean) - }; - - runner.testResults = obj; - - process.stdout.write(JSON.stringify(obj, null, 2)); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @api private - * @param {Object} test - * @return {Object} - */ -function clean(test) { - return { - title: test.title, - fullTitle: test.fullTitle(), - duration: test.duration, - currentRetry: test.currentRetry(), - err: errorJSON(test.err || {}) - }; -} - -/** - * Transform `error` into a JSON object. - * - * @api private - * @param {Error} err - * @return {Object} - */ -function errorJSON(err) { - var res = {}; - Object.getOwnPropertyNames(err).forEach(function(key) { - res[key] = err[key]; - }, err); - return res; -} - -}).call(this,require('_process')) -},{"./base":17,"_process":58}],26:[function(require,module,exports){ -(function (process){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; -var cursor = Base.cursor; -var color = Base.color; - -/** - * Expose `Landing`. - */ - -exports = module.exports = Landing; - -/** - * Airplane color. - */ - -Base.colors.plane = 0; - -/** - * Airplane crash color. - */ - -Base.colors['plane crash'] = 31; - -/** - * Runway color. - */ - -Base.colors.runway = 90; - -/** - * Initialize a new `Landing` reporter. - * - * @api public - * @param {Runner} runner - */ -function Landing(runner) { - Base.call(this, runner); - - var self = this; - var width = Base.window.width * .75 | 0; - var total = runner.total; - var stream = process.stdout; - var plane = color('plane', '✈'); - var crashed = -1; - var n = 0; - - function runway() { - var buf = Array(width).join('-'); - return ' ' + color('runway', buf); - } - - runner.on('start', function() { - stream.write('\n\n\n '); - cursor.hide(); - }); - - runner.on('test end', function(test) { - // check if the plane crashed - var col = crashed === -1 ? width * ++n / total | 0 : crashed; - - // show the crash - if (test.state === 'failed') { - plane = color('plane crash', '✈'); - crashed = col; - } - - // render landing strip - stream.write('\u001b[' + (width + 1) + 'D\u001b[2A'); - stream.write(runway()); - stream.write('\n '); - stream.write(color('runway', Array(col).join('⋅'))); - stream.write(plane); - stream.write(color('runway', Array(width - col).join('⋅') + '\n')); - stream.write(runway()); - stream.write('\u001b[0m'); - }); - - runner.on('end', function() { - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Landing, Base); - -}).call(this,require('_process')) -},{"../utils":39,"./base":17,"_process":58}],27:[function(require,module,exports){ -(function (process){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; -var color = Base.color; -var cursor = Base.cursor; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @api public - * @param {Runner} runner - */ -function List(runner) { - Base.call(this, runner); - - var self = this; - var n = 0; - - runner.on('start', function() { - console.log(); - }); - - runner.on('test', function(test) { - process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); - }); - - runner.on('pending', function(test) { - var fmt = color('checkmark', ' -') - + color('pending', ' %s'); - console.log(fmt, test.fullTitle()); - }); - - runner.on('pass', function(test) { - var fmt = color('checkmark', ' ' + Base.symbols.dot) - + color('pass', ' %s: ') - + color(test.speed, '%dms'); - cursor.CR(); - console.log(fmt, test.fullTitle(), test.duration); - }); - - runner.on('fail', function(test) { - cursor.CR(); - console.log(color('fail', ' %d) %s'), ++n, test.fullTitle()); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(List, Base); - -}).call(this,require('_process')) -},{"../utils":39,"./base":17,"_process":58}],28:[function(require,module,exports){ -(function (process){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var utils = require('../utils'); - -/** - * Constants - */ - -var SUITE_PREFIX = '$'; - -/** - * Expose `Markdown`. - */ - -exports = module.exports = Markdown; - -/** - * Initialize a new `Markdown` reporter. - * - * @api public - * @param {Runner} runner - */ -function Markdown(runner) { - Base.call(this, runner); - - var level = 0; - var buf = ''; - - function title(str) { - return Array(level).join('#') + ' ' + str; - } - - function mapTOC(suite, obj) { - var ret = obj; - var key = SUITE_PREFIX + suite.title; - - obj = obj[key] = obj[key] || { suite: suite }; - suite.suites.forEach(function(suite) { - mapTOC(suite, obj); - }); - - return ret; - } - - function stringifyTOC(obj, level) { - ++level; - var buf = ''; - var link; - for (var key in obj) { - if (key === 'suite') { - continue; - } - if (key !== SUITE_PREFIX) { - link = ' - [' + key.substring(1) + ']'; - link += '(#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; - buf += Array(level).join(' ') + link; - } - buf += stringifyTOC(obj[key], level); - } - return buf; - } - - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } - - generateTOC(runner.suite); - - runner.on('suite', function(suite) { - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + '\n'; - buf += title(suite.title) + '\n'; - }); - - runner.on('suite end', function() { - --level; - }); - - runner.on('pass', function(test) { - var code = utils.clean(test.body); - buf += test.title + '.\n'; - buf += '\n```js\n'; - buf += code + '\n'; - buf += '```\n\n'; - }); - - runner.on('end', function() { - process.stdout.write('# TOC\n'); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); -} - -}).call(this,require('_process')) -},{"../utils":39,"./base":17,"_process":58}],29:[function(require,module,exports){ -(function (process){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; - -/** - * Expose `Min`. - */ - -exports = module.exports = Min; - -/** - * Initialize a new `Min` minimal test reporter (best used with --watch). - * - * @api public - * @param {Runner} runner - */ -function Min(runner) { - Base.call(this, runner); - - runner.on('start', function() { - // clear screen - process.stdout.write('\u001b[2J'); - // set cursor position - process.stdout.write('\u001b[1;3H'); - }); - - runner.on('end', this.epilogue.bind(this)); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Min, Base); - -}).call(this,require('_process')) -},{"../utils":39,"./base":17,"_process":58}],30:[function(require,module,exports){ -(function (process){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; - -/** - * Expose `Dot`. - */ - -exports = module.exports = NyanCat; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function NyanCat(runner) { - Base.call(this, runner); - - var self = this; - var width = Base.window.width * .75 | 0; - var nyanCatWidth = this.nyanCatWidth = 11; - - this.colorIndex = 0; - this.numberOfLines = 4; - this.rainbowColors = self.generateColors(); - this.scoreboardWidth = 5; - this.tick = 0; - this.trajectories = [[], [], [], []]; - this.trajectoryWidthMax = (width - nyanCatWidth); - - runner.on('start', function() { - Base.cursor.hide(); - self.draw(); - }); - - runner.on('pending', function() { - self.draw(); - }); - - runner.on('pass', function() { - self.draw(); - }); - - runner.on('fail', function() { - self.draw(); - }); - - runner.on('end', function() { - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) { - write('\n'); - } - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(NyanCat, Base); - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.draw = function() { - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; -}; - -/** - * Draw the "scoreboard" showing the number - * of passes, failures and pending tests. - * - * @api private - */ - -NyanCat.prototype.drawScoreboard = function() { - var stats = this.stats; - - function draw(type, n) { - write(' '); - write(Base.color(type, n)); - write('\n'); - } - - draw('green', stats.passes); - draw('fail', stats.failures); - draw('pending', stats.pending); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Append the rainbow. - * - * @api private - */ - -NyanCat.prototype.appendRainbow = function() { - var segment = this.tick ? '_' : '-'; - var rainbowified = this.rainbowify(segment); - - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) { - trajectory.shift(); - } - trajectory.push(rainbowified); - } -}; - -/** - * Draw the rainbow. - * - * @api private - */ - -NyanCat.prototype.drawRainbow = function() { - var self = this; - - this.trajectories.forEach(function(line) { - write('\u001b[' + self.scoreboardWidth + 'C'); - write(line.join('')); - write('\n'); - }); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw the nyan cat - * - * @api private - */ -NyanCat.prototype.drawNyanCat = function() { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var dist = '\u001b[' + startWidth + 'C'; - var padding = ''; - - write(dist); - write('_,------,'); - write('\n'); - - write(dist); - padding = self.tick ? ' ' : ' '; - write('_|' + padding + '/\\_/\\ '); - write('\n'); - - write(dist); - padding = self.tick ? '_' : '__'; - var tail = self.tick ? '~' : '^'; - write(tail + '|' + padding + this.face() + ' '); - write('\n'); - - write(dist); - padding = self.tick ? ' ' : ' '; - write(padding + '"" "" '); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw nyan cat face. - * - * @api private - * @return {string} - */ - -NyanCat.prototype.face = function() { - var stats = this.stats; - if (stats.failures) { - return '( x .x)'; - } else if (stats.pending) { - return '( o .o)'; - } else if (stats.passes) { - return '( ^ .^)'; - } - return '( - .-)'; -}; - -/** - * Move cursor up `n`. - * - * @api private - * @param {number} n - */ - -NyanCat.prototype.cursorUp = function(n) { - write('\u001b[' + n + 'A'); -}; - -/** - * Move cursor down `n`. - * - * @api private - * @param {number} n - */ - -NyanCat.prototype.cursorDown = function(n) { - write('\u001b[' + n + 'B'); -}; - -/** - * Generate rainbow colors. - * - * @api private - * @return {Array} - */ -NyanCat.prototype.generateColors = function() { - var colors = []; - - for (var i = 0; i < (6 * 7); i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = (i * (1.0 / 6)); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); - } - - return colors; -}; - -/** - * Apply rainbow to the given `str`. - * - * @api private - * @param {string} str - * @return {string} - */ -NyanCat.prototype.rainbowify = function(str) { - if (!Base.useColors) { - return str; - } - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; -}; - -/** - * Stdout helper. - * - * @param {string} string A message to write to stdout. - */ -function write(string) { - process.stdout.write(string); -} - -}).call(this,require('_process')) -},{"../utils":39,"./base":17,"_process":58}],31:[function(require,module,exports){ -(function (process){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; -var color = Base.color; -var cursor = Base.cursor; - -/** - * Expose `Progress`. - */ - -exports = module.exports = Progress; - -/** - * General progress bar color. - */ - -Base.colors.progress = 90; - -/** - * Initialize a new `Progress` bar test reporter. - * - * @api public - * @param {Runner} runner - * @param {Object} options - */ -function Progress(runner, options) { - Base.call(this, runner); - - var self = this; - var width = Base.window.width * .50 | 0; - var total = runner.total; - var complete = 0; - var lastN = -1; - - // default chars - options = options || {}; - options.open = options.open || '['; - options.complete = options.complete || '▬'; - options.incomplete = options.incomplete || Base.symbols.dot; - options.close = options.close || ']'; - options.verbose = false; - - // tests started - runner.on('start', function() { - console.log(); - cursor.hide(); - }); - - // tests complete - runner.on('test end', function() { - complete++; - - var percent = complete / total; - var n = width * percent | 0; - var i = width - n; - - if (n === lastN && !options.verbose) { - // Don't re-render the line if it hasn't changed - return; - } - lastN = n; - - cursor.CR(); - process.stdout.write('\u001b[J'); - process.stdout.write(color('progress', ' ' + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color('progress', options.close)); - if (options.verbose) { - process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); - } - }); - - // tests are complete, output some stats - // and the failures if any - runner.on('end', function() { - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Progress, Base); - -}).call(this,require('_process')) -},{"../utils":39,"./base":17,"_process":58}],32:[function(require,module,exports){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var inherits = require('../utils').inherits; -var color = Base.color; -var cursor = Base.cursor; - -/** - * Expose `Spec`. - */ - -exports = module.exports = Spec; - -/** - * Initialize a new `Spec` test reporter. - * - * @api public - * @param {Runner} runner - */ -function Spec(runner) { - Base.call(this, runner); - - var self = this; - var indents = 0; - var n = 0; - - function indent() { - return Array(indents).join(' '); - } - - runner.on('start', function() { - console.log(); - }); - - runner.on('suite', function(suite) { - ++indents; - console.log(color('suite', '%s%s'), indent(), suite.title); - }); - - runner.on('suite end', function() { - --indents; - if (indents === 1) { - console.log(); - } - }); - - runner.on('pending', function(test) { - var fmt = indent() + color('pending', ' - %s'); - console.log(fmt, test.title); - }); - - runner.on('pass', function(test) { - var fmt; - if (test.speed === 'fast') { - fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s'); - cursor.CR(); - console.log(fmt, test.title); - } else { - fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s') - + color(test.speed, ' (%dms)'); - cursor.CR(); - console.log(fmt, test.title, test.duration); - } - }); - - runner.on('fail', function(test) { - cursor.CR(); - console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(Spec, Base); - -},{"../utils":39,"./base":17}],33:[function(require,module,exports){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `TAP`. - */ - -exports = module.exports = TAP; - -/** - * Initialize a new `TAP` reporter. - * - * @api public - * @param {Runner} runner - */ -function TAP(runner) { - Base.call(this, runner); - - var n = 1; - var passes = 0; - var failures = 0; - - runner.on('start', function() { - var total = runner.grepTotal(runner.suite); - console.log('%d..%d', 1, total); - }); - - runner.on('test end', function() { - ++n; - }); - - runner.on('pending', function(test) { - console.log('ok %d %s # SKIP -', n, title(test)); - }); - - runner.on('pass', function(test) { - passes++; - console.log('ok %d %s', n, title(test)); - }); - - runner.on('fail', function(test, err) { - failures++; - console.log('not ok %d %s', n, title(test)); - if (err.stack) { - console.log(err.stack.replace(/^/gm, ' ')); - } - }); - - runner.on('end', function() { - console.log('# tests ' + (passes + failures)); - console.log('# pass ' + passes); - console.log('# fail ' + failures); - }); -} - -/** - * Return a TAP-safe title of `test` - * - * @api private - * @param {Object} test - * @return {String} - */ -function title(test) { - return test.fullTitle().replace(/#/g, ''); -} - -},{"./base":17}],34:[function(require,module,exports){ -(function (process,global){ -/** - * Module dependencies. - */ - -var Base = require('./base'); -var utils = require('../utils'); -var inherits = utils.inherits; -var fs = require('fs'); -var escape = utils.escape; -var mkdirp = require('mkdirp'); -var path = require('path'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -/* eslint-disable no-unused-vars, no-native-reassign */ -var Date = global.Date; -var setTimeout = global.setTimeout; -var setInterval = global.setInterval; -var clearTimeout = global.clearTimeout; -var clearInterval = global.clearInterval; -/* eslint-enable no-unused-vars, no-native-reassign */ - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Initialize a new `XUnit` reporter. - * - * @api public - * @param {Runner} runner - */ -function XUnit(runner, options) { - Base.call(this, runner); - - var stats = this.stats; - var tests = []; - var self = this; - - if (options.reporterOptions && options.reporterOptions.output) { - if (!fs.createWriteStream) { - throw new Error('file output not supported in browser'); - } - mkdirp.sync(path.dirname(options.reporterOptions.output)); - self.fileStream = fs.createWriteStream(options.reporterOptions.output); - } - - runner.on('pending', function(test) { - tests.push(test); - }); - - runner.on('pass', function(test) { - tests.push(test); - }); - - runner.on('fail', function(test) { - tests.push(test); - }); - - runner.on('end', function() { - self.write(tag('testsuite', { - name: 'Mocha Tests', - tests: stats.tests, - failures: stats.failures, - errors: stats.failures, - skipped: stats.tests - stats.failures - stats.passes, - timestamp: (new Date()).toUTCString(), - time: (stats.duration / 1000) || 0 - }, false)); - - tests.forEach(function(t) { - self.test(t); - }); - - self.write(''); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(XUnit, Base); - -/** - * Override done to close the stream (if it's a file). - * - * @param failures - * @param {Function} fn - */ -XUnit.prototype.done = function(failures, fn) { - if (this.fileStream) { - this.fileStream.end(function() { - fn(failures); - }); - } else { - fn(failures); - } -}; - -/** - * Write out the given line. - * - * @param {string} line - */ -XUnit.prototype.write = function(line) { - if (this.fileStream) { - this.fileStream.write(line + '\n'); - } else if (typeof process === 'object' && process.stdout) { - process.stdout.write(line + '\n'); - } else { - console.log(line); - } -}; - -/** - * Output tag for the given `test.` - * - * @param {Test} test - */ -XUnit.prototype.test = function(test) { - var attrs = { - classname: test.parent.fullTitle(), - name: test.title, - time: (test.duration / 1000) || 0 - }; - - if (test.state === 'failed') { - var err = test.err; - this.write(tag('testcase', attrs, false, tag('failure', {}, false, escape(err.message) + '\n' + escape(err.stack)))); - } else if (test.isPending()) { - this.write(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - this.write(tag('testcase', attrs, true)); - } -}; - -/** - * HTML tag helper. - * - * @param name - * @param attrs - * @param close - * @param content - * @return {string} - */ -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>'; - var pairs = []; - var tag; - - for (var key in attrs) { - if (Object.prototype.hasOwnProperty.call(attrs, key)) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) { - tag += content + ''; - } - if (key === 'ctx') { - return '#'; - } - return val; - }, 2); -}; - -/** - * Reset the timeout. - * - * @api private - */ -Runnable.prototype.resetTimeout = function() { - var self = this; - var ms = this.timeout() || 1e9; - - if (!this._enableTimeouts) { - return; - } - this.clearTimeout(); - this.timer = setTimeout(function() { - if (!self._enableTimeouts) { - return; - } - self.callback(new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.')); - self.timedOut = true; - }, ms); -}; - -/** - * Whitelist a list of globals for this test run. - * - * @api private - * @param {string[]} globals - */ -Runnable.prototype.globals = function(globals) { - if (!arguments.length) { - return this._allowedGlobals; - } - this._allowedGlobals = globals; -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @api private - */ -Runnable.prototype.run = function(fn) { - var self = this; - var start = new Date(); - var ctx = this.ctx; - var finished; - var emitted; - - // Sometimes the ctx exists, but it is not runnable - if (ctx && ctx.runnable) { - ctx.runnable(this); - } - - // called multiple times - function multiple(err) { - if (emitted) { - return; - } - emitted = true; - self.emit('error', err || new Error('done() called multiple times; stacktrace may be inaccurate')); - } - - // finished - function done(err) { - var ms = self.timeout(); - if (self.timedOut) { - return; - } - if (finished) { - return multiple(err || self._trace); - } - - self.clearTimeout(); - self.duration = new Date() - start; - finished = true; - if (!err && self.duration > ms && self._enableTimeouts) { - err = new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.'); - } - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // explicit async with `done` argument - if (this.async) { - this.resetTimeout(); - - if (this.allowUncaught) { - return callFnAsync(this.fn); - } - try { - callFnAsync(this.fn); - } catch (err) { - done(utils.getError(err)); - } - return; - } - - if (this.allowUncaught) { - callFn(this.fn); - done(); - return; - } - - // sync or promise-returning - try { - if (this.isPending()) { - done(); - } else { - callFn(this.fn); - } - } catch (err) { - done(utils.getError(err)); - } - - function callFn(fn) { - var result = fn.call(ctx); - if (result && typeof result.then === 'function') { - self.resetTimeout(); - result - .then(function() { - done(); - // Return null so libraries like bluebird do not warn about - // subsequently constructed Promises. - return null; - }, - function(reason) { - done(reason || new Error('Promise rejected with no or falsy reason')); - }); - } else { - if (self.asyncOnly) { - return done(new Error('--async-only option in use without declaring `done()` or returning a promise')); - } - - done(); - } - } - - function callFnAsync(fn) { - fn.call(ctx, function(err) { - if (err instanceof Error || toString.call(err) === '[object Error]') { - return done(err); - } - if (err) { - if (Object.prototype.toString.call(err) === '[object Object]') { - return done(new Error('done() invoked with non-Error: ' - + JSON.stringify(err))); - } - return done(new Error('done() invoked with non-Error: ' + err)); - } - done(); - }); - } -}; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./ms":15,"./pending":16,"./utils":39,"debug":2,"events":3}],36:[function(require,module,exports){ -(function (process,global){ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var Pending = require('./pending'); -var utils = require('./utils'); -var inherits = utils.inherits; -var debug = require('debug')('mocha:runner'); -var Runnable = require('./runnable'); -var filter = utils.filter; -var indexOf = utils.indexOf; -var keys = utils.keys; -var stackFilter = utils.stackTraceFilter(); -var stringify = utils.stringify; -var type = utils.type; -var undefinedError = utils.undefinedError; -var isArray = utils.isArray; - -/** - * Non-enumerable globals. - */ - -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date', - 'setImmediate', - 'clearImmediate' -]; - -/** - * Expose `Runner`. - */ - -module.exports = Runner; - -/** - * Initialize a `Runner` for the given `suite`. - * - * Events: - * - * - `start` execution started - * - `end` execution complete - * - `suite` (suite) test suite execution started - * - `suite end` (suite) all tests (and sub-suites) have finished - * - `test` (test) test execution started - * - `test end` (test) test completed - * - `hook` (hook) hook execution started - * - `hook end` (hook) hook complete - * - `pass` (test) test passed - * - `fail` (test, err) test failed - * - `pending` (test) test pending - * - * @api public - * @param {Suite} suite Root suite - * @param {boolean} [delay] Whether or not to delay execution of root suite - * until ready. - */ -function Runner(suite, delay) { - var self = this; - this._globals = []; - this._abort = false; - this._delay = delay; - this.suite = suite; - this.started = false; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test) { - self.checkGlobals(test); - }); - this.on('hook end', function(hook) { - self.checkGlobals(hook); - }); - this._defaultGrep = /.*/; - this.grep(this._defaultGrep); - this.globals(this.globalProps().concat(extraGlobals())); -} - -/** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @api private - */ -Runner.immediately = global.setImmediate || process.nextTick; - -/** - * Inherit from `EventEmitter.prototype`. - */ -inherits(Runner, EventEmitter); - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @param {RegExp} re - * @param {Boolean} invert - * @return {Runner} for chaining - * @api public - * @param {RegExp} re - * @param {boolean} invert - * @return {Runner} Runner instance. - */ -Runner.prototype.grep = function(re, invert) { - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @param {Suite} suite - * @return {Number} - * @api public - * @param {Suite} suite - * @return {number} - */ -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test) { - var match = self._grep.test(test.fullTitle()); - if (self._invert) { - match = !match; - } - if (match) { - total++; - } - }); - - return total; -}; - -/** - * Return a list of global properties. - * - * @return {Array} - * @api private - */ -Runner.prototype.globalProps = function() { - var props = keys(global); - - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~indexOf(props, globals[i])) { - continue; - } - props.push(globals[i]); - } - - return props; -}; - -/** - * Allow the given `arr` of globals. - * - * @param {Array} arr - * @return {Runner} for chaining - * @api public - * @param {Array} arr - * @return {Runner} Runner instance. - */ -Runner.prototype.globals = function(arr) { - if (!arguments.length) { - return this._globals; - } - debug('globals %j', arr); - this._globals = this._globals.concat(arr); - return this; -}; - -/** - * Check for global variable leaks. - * - * @api private - */ -Runner.prototype.checkGlobals = function(test) { - if (this.ignoreLeaks) { - return; - } - var ok = this._globals; - - var globals = this.globalProps(); - var leaks; - - if (test) { - ok = ok.concat(test._allowedGlobals || []); - } - - if (this.prevGlobalsLength === globals.length) { - return; - } - this.prevGlobalsLength = globals.length; - - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); - - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; - -/** - * Fail the given `test`. - * - * @api private - * @param {Test} test - * @param {Error} err - */ -Runner.prototype.fail = function(test, err) { - ++this.failures; - test.state = 'failed'; - - if (!(err instanceof Error || err && typeof err.message === 'string')) { - err = new Error('the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)'); - } - - err.stack = (this.fullStackTrace || !err.stack) - ? err.stack - : stackFilter(err.stack); - - this.emit('fail', test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures work in the following pattern: - * - If bail, then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter - * execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @api private - * @param {Hook} hook - * @param {Error} err - */ -Runner.prototype.failHook = function(hook, err) { - if (hook.ctx && hook.ctx.currentTest) { - hook.originalTitle = hook.originalTitle || hook.title; - hook.title = hook.originalTitle + ' for "' + hook.ctx.currentTest.title + '"'; - } - - this.fail(hook, err); - if (this.suite.bail()) { - this.emit('end'); - } -}; - -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @api private - * @param {string} name - * @param {Function} fn - */ - -Runner.prototype.hook = function(name, fn) { - var suite = this.suite; - var hooks = suite['_' + name]; - var self = this; - - function next(i) { - var hook = hooks[i]; - if (!hook) { - return fn(); - } - self.currentRunnable = hook; - - hook.ctx.currentTest = self.test; - - self.emit('hook', hook); - - if (!hook.listeners('error').length) { - hook.on('error', function(err) { - self.failHook(hook, err); - }); - } - - hook.run(function(err) { - var testError = hook.error(); - if (testError) { - self.fail(self.test, testError); - } - if (err) { - if (err instanceof Pending) { - suite.pending = true; - } else { - self.failHook(hook, err); - - // stop executing hooks, notify callee of hook err - return fn(err); - } - } - self.emit('hook end', hook); - delete hook.ctx.currentTest; - next(++i); - }); - } - - Runner.immediately(function() { - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err, errSuite)`. - * - * @api private - * @param {string} name - * @param {Array} suites - * @param {Function} fn - */ -Runner.prototype.hooks = function(name, suites, fn) { - var self = this; - var orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); - } - - self.hook(name, function(err) { - if (err) { - var errSuite = self.suite; - self.suite = orig; - return fn(err, errSuite); - } - - next(suites.pop()); - }); - } - - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @api private - */ -Runner.prototype.hookUp = function(name, fn) { - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @api private - */ -Runner.prototype.hookDown = function(name, fn) { - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @api private - */ -Runner.prototype.parents = function() { - var suite = this.suite; - var suites = []; - while (suite.parent) { - suite = suite.parent; - suites.push(suite); - } - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @api private - */ -Runner.prototype.runTest = function(fn) { - var self = this; - var test = this.test; - - if (this.asyncOnly) { - test.asyncOnly = true; - } - - if (this.allowUncaught) { - test.allowUncaught = true; - return test.run(fn); - } - try { - test.on('error', function(err) { - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke the callback `fn()` when complete. - * - * @api private - * @param {Suite} suite - * @param {Function} fn - */ -Runner.prototype.runTests = function(suite, fn) { - var self = this; - var tests = suite.tests.slice(); - var test; - - function hookErr(_, errSuite, after) { - // before/after Each hook for errSuite failed: - var orig = self.suite; - - // for failed 'after each' hook start from errSuite parent, - // otherwise start from errSuite itself - self.suite = after ? errSuite.parent : errSuite; - - if (self.suite) { - // call hookUp afterEach - self.hookUp('afterEach', function(err2, errSuite2) { - self.suite = orig; - // some hooks may fail even now - if (err2) { - return hookErr(err2, errSuite2, true); - } - // report error suite - fn(errSuite); - }); - } else { - // there is no need calling other 'after each' hooks - self.suite = orig; - fn(errSuite); - } - } - - function next(err, errSuite) { - // if we bail after first err - if (self.failures && suite._bail) { - return fn(); - } - - if (self._abort) { - return fn(); - } - - if (err) { - return hookErr(err, errSuite, true); - } - - // next test - test = tests.shift(); - - // all done - if (!test) { - return fn(); - } - - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) { - match = !match; - } - if (!match) { - // Run immediately only if we have defined a grep. When we - // define a grep — It can cause maximum callstack error if - // the grep is doing a large recursive loop by neglecting - // all tests. The run immediately function also comes with - // a performance cost. So we don't want to run immediately - // if we run the whole test suite, because running the whole - // test suite don't do any immediate recursive loops. Thus, - // allowing a JS runtime to breathe. - if (self._grep !== self._defaultGrep) { - Runner.immediately(next); - } else { - next(); - } - return; - } - - if (test.isPending()) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(err, errSuite) { - if (suite.isPending()) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - if (err) { - return hookErr(err, errSuite, false); - } - self.currentRunnable = self.test; - self.runTest(function(err) { - test = self.test; - if (err) { - var retry = test.currentRetry(); - if (err instanceof Pending) { - test.pending = true; - self.emit('pending', test); - } else if (retry < test.retries()) { - var clonedTest = test.clone(); - clonedTest.currentRetry(retry + 1); - tests.unshift(clonedTest); - - // Early return + hook trigger so that it doesn't - // increment the count wrong - return self.hookUp('afterEach', next); - } else { - self.fail(test, err); - } - self.emit('test end', test); - - if (err instanceof Pending) { - return next(); - } - - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - this.hookErr = hookErr; - next(); -}; - -/** - * Run the given `suite` and invoke the callback `fn()` when complete. - * - * @api private - * @param {Suite} suite - * @param {Function} fn - */ -Runner.prototype.runSuite = function(suite, fn) { - var i = 0; - var self = this; - var total = this.grepTotal(suite); - var afterAllHookCalled = false; - - debug('run suite %s', suite.fullTitle()); - - if (!total || (self.failures && suite._bail)) { - return fn(); - } - - this.emit('suite', this.suite = suite); - - function next(errSuite) { - if (errSuite) { - // current suite failed on a hook from errSuite - if (errSuite === suite) { - // if errSuite is current suite - // continue to the next sibling suite - return done(); - } - // errSuite is among the parents of current suite - // stop execution of errSuite and all sub-suites - return done(errSuite); - } - - if (self._abort) { - return done(); - } - - var curr = suite.suites[i++]; - if (!curr) { - return done(); - } - - // Avoid grep neglecting large number of tests causing a - // huge recursive loop and thus a maximum call stack error. - // See comment in `this.runTests()` for more information. - if (self._grep !== self._defaultGrep) { - Runner.immediately(function() { - self.runSuite(curr, next); - }); - } else { - self.runSuite(curr, next); - } - } - - function done(errSuite) { - self.suite = suite; - self.nextSuite = next; - - if (afterAllHookCalled) { - fn(errSuite); - } else { - // mark that the afterAll block has been called once - // and so can be skipped if there is an error in it. - afterAllHookCalled = true; - - // remove reference to test - delete self.test; - - self.hook('afterAll', function() { - self.emit('suite end', suite); - fn(errSuite); - }); - } - } - - this.nextSuite = next; - - this.hook('beforeAll', function(err) { - if (err) { - return done(); - } - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @api private - */ -Runner.prototype.uncaught = function(err) { - if (err) { - debug('uncaught exception %s', err !== function() { - return this; - }.call(err) ? err : (err.message || err)); - } else { - debug('uncaught undefined exception'); - err = undefinedError(); - } - err.uncaught = true; - - var runnable = this.currentRunnable; - - if (!runnable) { - runnable = new Runnable('Uncaught error outside test suite'); - runnable.parent = this.suite; - - if (this.started) { - this.fail(runnable, err); - } else { - // Can't recover from this failure - this.emit('start'); - this.fail(runnable, err); - this.emit('end'); - } - - return; - } - - runnable.clearTimeout(); - - // Ignore errors if complete - if (runnable.state) { - return; - } - this.fail(runnable, err); - - // recover from test - if (runnable.type === 'test') { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } - - // recover from hooks - if (runnable.type === 'hook') { - var errSuite = this.suite; - // if hook failure is in afterEach block - if (runnable.fullTitle().indexOf('after each') > -1) { - return this.hookErr(err, errSuite, true); - } - // if hook failure is in beforeEach block - if (runnable.fullTitle().indexOf('before each') > -1) { - return this.hookErr(err, errSuite, false); - } - // if hook failure is in after or before blocks - return this.nextSuite(errSuite); - } - - // bail - this.emit('end'); -}; - -/** - * Cleans up the references to all the deferred functions - * (before/after/beforeEach/afterEach) and tests of a Suite. - * These must be deleted otherwise a memory leak can happen, - * as those functions may reference variables from closures, - * thus those variables can never be garbage collected as long - * as the deferred functions exist. - * - * @param {Suite} suite - */ -function cleanSuiteReferences(suite) { - function cleanArrReferences(arr) { - for (var i = 0; i < arr.length; i++) { - delete arr[i].fn; - } - } - - if (isArray(suite._beforeAll)) { - cleanArrReferences(suite._beforeAll); - } - - if (isArray(suite._beforeEach)) { - cleanArrReferences(suite._beforeEach); - } - - if (isArray(suite._afterAll)) { - cleanArrReferences(suite._afterAll); - } - - if (isArray(suite._afterEach)) { - cleanArrReferences(suite._afterEach); - } - - for (var i = 0; i < suite.tests.length; i++) { - delete suite.tests[i].fn; - } -} - -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @param {Function} fn - * @return {Runner} for chaining - * @api public - * @param {Function} fn - * @return {Runner} Runner instance. - */ -Runner.prototype.run = function(fn) { - var self = this; - var rootSuite = this.suite; - - fn = fn || function() {}; - - function uncaught(err) { - self.uncaught(err); - } - - function start() { - self.started = true; - self.emit('start'); - self.runSuite(rootSuite, function() { - debug('finished running'); - self.emit('end'); - }); - } - - debug('start'); - - // references cleanup to avoid memory leaks - this.on('suite end', cleanSuiteReferences); - - // callback - this.on('end', function() { - debug('end'); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); - - // uncaught exception - process.on('uncaughtException', uncaught); - - if (this._delay) { - // for reporters, I guess. - // might be nice to debounce some dots while we wait. - this.emit('waiting', rootSuite); - rootSuite.once('run', start); - } else { - start(); - } - - return this; -}; - -/** - * Cleanly abort execution. - * - * @api public - * @return {Runner} Runner instance. - */ -Runner.prototype.abort = function() { - debug('aborting'); - this._abort = true; - - return this; -}; - -/** - * Filter leaks with the given globals flagged as `ok`. - * - * @api private - * @param {Array} ok - * @param {Array} globals - * @return {Array} - */ -function filterLeaks(ok, globals) { - return filter(globals, function(key) { - // Firefox and Chrome exposes iframes as index inside the window object - if (/^d+/.test(key)) { - return false; - } - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method not init at first - // it is assigned in some seconds - if (global.navigator && (/^getInterface/).test(key)) { - return false; - } - - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && (/^\d+/).test(key)) { - return false; - } - - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) { - return false; - } - - var matched = filter(ok, function(ok) { - if (~ok.indexOf('*')) { - return key.indexOf(ok.split('*')[0]) === 0; - } - return key === ok; - }); - return !matched.length && (!global.navigator || key !== 'onerror'); - }); -} - -/** - * Array of globals dependent on the environment. - * - * @return {Array} - * @api private - */ -function extraGlobals() { - if (typeof process === 'object' && typeof process.version === 'string') { - var parts = process.version.split('.'); - var nodeVersion = utils.reduce(parts, function(a, v) { - return a << 8 | v; - }); - - // 'errno' was renamed to process._errno in v0.9.11. - - if (nodeVersion < 0x00090B) { - return ['errno']; - } - } - - return []; -} - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./pending":16,"./runnable":35,"./utils":39,"_process":58,"debug":2,"events":3}],37:[function(require,module,exports){ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var Hook = require('./hook'); -var utils = require('./utils'); -var inherits = utils.inherits; -var debug = require('debug')('mocha:suite'); -var milliseconds = require('./ms'); - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` and parent `Suite`. When a suite - * with the same title is already present, that suite is returned to provide - * nicer reporter and more flexible meta-testing. - * - * @api public - * @param {Suite} parent - * @param {string} title - * @return {Suite} - */ -exports.create = function(parent, title) { - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Initialize a new `Suite` with the given `title` and `ctx`. - * - * @api private - * @param {string} title - * @param {Context} parentContext - */ -function Suite(title, parentContext) { - this.title = title; - function Context() {} - Context.prototype = parentContext; - this.ctx = new Context(); - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._enableTimeouts = true; - this._slow = 75; - this._bail = false; - this._retries = -1; - this.delayed = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ -inherits(Suite, EventEmitter); - -/** - * Return a clone of this `Suite`. - * - * @api private - * @return {Suite} - */ -Suite.prototype.clone = function() { - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.retries(this.retries()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set timeout `ms` or short-hand such as "2s". - * - * @api private - * @param {number|string} ms - * @return {Suite|number} for chaining - */ -Suite.prototype.timeout = function(ms) { - if (!arguments.length) { - return this._timeout; - } - if (ms.toString() === '0') { - this._enableTimeouts = false; - } - if (typeof ms === 'string') { - ms = milliseconds(ms); - } - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Set number of times to retry a failed test. - * - * @api private - * @param {number|string} n - * @return {Suite|number} for chaining - */ -Suite.prototype.retries = function(n) { - if (!arguments.length) { - return this._retries; - } - debug('retries %d', n); - this._retries = parseInt(n, 10) || 0; - return this; -}; - -/** - * Set timeout to `enabled`. - * - * @api private - * @param {boolean} enabled - * @return {Suite|boolean} self or enabled - */ -Suite.prototype.enableTimeouts = function(enabled) { - if (!arguments.length) { - return this._enableTimeouts; - } - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - -/** - * Set slow `ms` or short-hand such as "2s". - * - * @api private - * @param {number|string} ms - * @return {Suite|number} for chaining - */ -Suite.prototype.slow = function(ms) { - if (!arguments.length) { - return this._slow; - } - if (typeof ms === 'string') { - ms = milliseconds(ms); - } - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Sets whether to bail after first error. - * - * @api private - * @param {boolean} bail - * @return {Suite|number} for chaining - */ -Suite.prototype.bail = function(bail) { - if (!arguments.length) { - return this._bail; - } - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Check if this suite or its parent suite is marked as pending. - * - * @api private - */ -Suite.prototype.isPending = function() { - return this.pending || (this.parent && this.parent.isPending()); -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @api private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.beforeAll = function(title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === 'function') { - fn = title; - title = fn.name; - } - title = '"before all" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.retries(this.retries()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @api private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.afterAll = function(title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === 'function') { - fn = title; - title = fn.name; - } - title = '"after all" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.retries(this.retries()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @api private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.beforeEach = function(title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === 'function') { - fn = title; - title = fn.name; - } - title = '"before each" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.retries(this.retries()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @api private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.afterEach = function(title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === 'function') { - fn = title; - title = fn.name; - } - title = '"after each" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.retries(this.retries()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @api private - * @param {Suite} suite - * @return {Suite} for chaining - */ -Suite.prototype.addSuite = function(suite) { - suite.parent = this; - suite.timeout(this.timeout()); - suite.retries(this.retries()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @api private - * @param {Test} test - * @return {Suite} for chaining - */ -Suite.prototype.addTest = function(test) { - test.parent = this; - test.timeout(this.timeout()); - test.retries(this.retries()); - test.enableTimeouts(this.enableTimeouts()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; - -/** - * Return the full title generated by recursively concatenating the parent's - * full title. - * - * @api public - * @return {string} - */ -Suite.prototype.fullTitle = function() { - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) { - return full + ' ' + this.title; - } - } - return this.title; -}; - -/** - * Return the total number of tests. - * - * @api public - * @return {number} - */ -Suite.prototype.total = function() { - return utils.reduce(this.suites, function(sum, suite) { - return sum + suite.total(); - }, 0) + this.tests.length; -}; - -/** - * Iterates through each suite recursively to find all tests. Applies a - * function in the format `fn(test)`. - * - * @api private - * @param {Function} fn - * @return {Suite} - */ -Suite.prototype.eachTest = function(fn) { - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite) { - suite.eachTest(fn); - }); - return this; -}; - -/** - * This will run the root suite if we happen to be running in delayed mode. - */ -Suite.prototype.run = function run() { - if (this.root) { - this.emit('run'); - } -}; - -},{"./hook":7,"./ms":15,"./utils":39,"debug":2,"events":3}],38:[function(require,module,exports){ -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); -var inherits = require('./utils').inherits; - -/** - * Expose `Test`. - */ - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @api private - * @param {String} title - * @param {Function} fn - */ -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ -inherits(Test, Runnable); - -Test.prototype.clone = function() { - var test = new Test(this.title, this.fn); - test.timeout(this.timeout()); - test.slow(this.slow()); - test.enableTimeouts(this.enableTimeouts()); - test.retries(this.retries()); - test.currentRetry(this.currentRetry()); - test.globals(this.globals()); - test.parent = this.parent; - test.file = this.file; - test.ctx = this.ctx; - return test; -}; - -},{"./runnable":35,"./utils":39}],39:[function(require,module,exports){ -(function (process,Buffer){ -/* eslint-env browser */ - -/** - * Module dependencies. - */ - -var basename = require('path').basename; -var debug = require('debug')('mocha:watch'); -var exists = require('fs').existsSync || require('path').existsSync; -var glob = require('glob'); -var join = require('path').join; -var readdirSync = require('fs').readdirSync; -var statSync = require('fs').statSync; -var watchFile = require('fs').watchFile; -var toISOString = require('to-iso-string'); - -/** - * Ignored directories. - */ - -var ignore = ['node_modules', '.git']; - -exports.inherits = require('util').inherits; - -/** - * Escape special characters in the given string of html. - * - * @api private - * @param {string} html - * @return {string} - */ -exports.escape = function(html) { - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Array#forEach (<=IE8) - * - * @api private - * @param {Array} arr - * @param {Function} fn - * @param {Object} scope - */ -exports.forEach = function(arr, fn, scope) { - for (var i = 0, l = arr.length; i < l; i++) { - fn.call(scope, arr[i], i); - } -}; - -/** - * Test if the given obj is type of string. - * - * @api private - * @param {Object} obj - * @return {boolean} - */ -exports.isString = function(obj) { - return typeof obj === 'string'; -}; - -/** - * Array#map (<=IE8) - * - * @api private - * @param {Array} arr - * @param {Function} fn - * @param {Object} scope - * @return {Array} - */ -exports.map = function(arr, fn, scope) { - var result = []; - for (var i = 0, l = arr.length; i < l; i++) { - result.push(fn.call(scope, arr[i], i, arr)); - } - return result; -}; - -/** - * Array#indexOf (<=IE8) - * - * @api private - * @param {Array} arr - * @param {Object} obj to find index of - * @param {number} start - * @return {number} - */ -exports.indexOf = function(arr, obj, start) { - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) { - return i; - } - } - return -1; -}; - -/** - * Array#reduce (<=IE8) - * - * @api private - * @param {Array} arr - * @param {Function} fn - * @param {Object} val Initial value. - * @return {*} - */ -exports.reduce = function(arr, fn, val) { - var rval = val; - - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn(rval, arr[i], i, arr); - } - - return rval; -}; - -/** - * Array#filter (<=IE8) - * - * @api private - * @param {Array} arr - * @param {Function} fn - * @return {Array} - */ -exports.filter = function(arr, fn) { - var ret = []; - - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn(val, i, arr)) { - ret.push(val); - } - } - - return ret; -}; - -/** - * Object.keys (<=IE8) - * - * @api private - * @param {Object} obj - * @return {Array} keys - */ -exports.keys = typeof Object.keys === 'function' ? Object.keys : function(obj) { - var keys = []; - var has = Object.prototype.hasOwnProperty; // for `window` on <=IE8 - - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } - - return keys; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @api private - * @param {Array} files - * @param {Function} fn - */ -exports.watch = function(files, fn) { - var options = { interval: 100 }; - files.forEach(function(file) { - debug('file %s', file); - watchFile(file, options, function(curr, prev) { - if (prev.mtime < curr.mtime) { - fn(file); - } - }); - }); -}; - -/** - * Array.isArray (<=IE8) - * - * @api private - * @param {Object} obj - * @return {Boolean} - */ -var isArray = typeof Array.isArray === 'function' ? Array.isArray : function(obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; -}; - -exports.isArray = isArray; - -/** - * Buffer.prototype.toJSON polyfill. - * - * @type {Function} - */ -if (typeof Buffer !== 'undefined' && Buffer.prototype) { - Buffer.prototype.toJSON = Buffer.prototype.toJSON || function() { - return Array.prototype.slice.call(this, 0); - }; -} - -/** - * Ignored files. - * - * @api private - * @param {string} path - * @return {boolean} - */ -function ignored(path) { - return !~ignore.indexOf(path); -} - -/** - * Lookup files in the given `dir`. - * - * @api private - * @param {string} dir - * @param {string[]} [ext=['.js']] - * @param {Array} [ret=[]] - * @return {Array} - */ -exports.files = function(dir, ext, ret) { - ret = ret || []; - ext = ext || ['js']; - - var re = new RegExp('\\.(' + ext.join('|') + ')$'); - - readdirSync(dir) - .filter(ignored) - .forEach(function(path) { - path = join(dir, path); - if (statSync(path).isDirectory()) { - exports.files(path, ext, ret); - } else if (path.match(re)) { - ret.push(path); - } - }); - - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @api private - * @param {string} str - * @return {string} - */ -exports.slug = function(str) { - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Strip the function definition from `str`, and re-indent for pre whitespace. - * - * @param {string} str - * @return {string} - */ -exports.clean = function(str) { - str = str - .replace(/\r\n?|[\n\u2028\u2029]/g, '\n').replace(/^\uFEFF/, '') - .replace(/^function *\(.*\)\s*\{|\(.*\) *=> *\{?/, '') - .replace(/\s+\}$/, ''); - - var spaces = str.match(/^\n?( *)/)[1].length; - var tabs = str.match(/^\n?(\t*)/)[1].length; - var re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm'); - - str = str.replace(re, ''); - - return exports.trim(str); -}; - -/** - * Trim the given `str`. - * - * @api private - * @param {string} str - * @return {string} - */ -exports.trim = function(str) { - return str.replace(/^\s+|\s+$/g, ''); -}; - -/** - * Parse the given `qs`. - * - * @api private - * @param {string} qs - * @return {Object} - */ -exports.parseQuery = function(qs) { - return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair) { - var i = pair.indexOf('='); - var key = pair.slice(0, i); - var val = pair.slice(++i); - - obj[key] = decodeURIComponent(val); - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @api private - * @param {string} js - * @return {string} - */ -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew[ \t]+(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1'); -} - -/** - * Highlight the contents of tag `name`. - * - * @api private - * @param {string} name - */ -exports.highlightTags = function(name) { - var code = document.getElementById('mocha').getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; - -/** - * If a value could have properties, and has none, this function is called, - * which returns a string representation of the empty value. - * - * Functions w/ no properties return `'[Function]'` - * Arrays w/ length === 0 return `'[]'` - * Objects w/ no properties return `'{}'` - * All else: return result of `value.toString()` - * - * @api private - * @param {*} value The value to inspect. - * @param {string} [type] The type of the value, if known. - * @returns {string} - */ -function emptyRepresentation(value, type) { - type = type || exports.type(value); - - switch (type) { - case 'function': - return '[Function]'; - case 'object': - return '{}'; - case 'array': - return '[]'; - default: - return value.toString(); - } -} - -/** - * Takes some variable and asks `Object.prototype.toString()` what it thinks it - * is. - * - * @api private - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString - * @param {*} value The value to test. - * @returns {string} - * @example - * type({}) // 'object' - * type([]) // 'array' - * type(1) // 'number' - * type(false) // 'boolean' - * type(Infinity) // 'number' - * type(null) // 'null' - * type(new Date()) // 'date' - * type(/foo/) // 'regexp' - * type('type') // 'string' - * type(global) // 'global' - */ -exports.type = function type(value) { - if (value === undefined) { - return 'undefined'; - } else if (value === null) { - return 'null'; - } else if (typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) { - return 'buffer'; - } - return Object.prototype.toString.call(value) - .replace(/^\[.+\s(.+?)\]$/, '$1') - .toLowerCase(); -}; - -/** - * Stringify `value`. Different behavior depending on type of value: - * - * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. - * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. - * - If `value` is an *empty* object, function, or array, return result of function - * {@link emptyRepresentation}. - * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of - * JSON.stringify(). - * - * @api private - * @see exports.type - * @param {*} value - * @return {string} - */ -exports.stringify = function(value) { - var type = exports.type(value); - - if (!~exports.indexOf(['object', 'array', 'function'], type)) { - if (type !== 'buffer') { - return jsonStringify(value); - } - var json = value.toJSON(); - // Based on the toJSON result - return jsonStringify(json.data && json.type ? json.data : json, 2) - .replace(/,(\n|$)/g, '$1'); - } - - for (var prop in value) { - if (Object.prototype.hasOwnProperty.call(value, prop)) { - return jsonStringify(exports.canonicalize(value), 2).replace(/,(\n|$)/g, '$1'); - } - } - - return emptyRepresentation(value, type); -}; - -/** - * like JSON.stringify but more sense. - * - * @api private - * @param {Object} object - * @param {number=} spaces - * @param {number=} depth - * @returns {*} - */ -function jsonStringify(object, spaces, depth) { - if (typeof spaces === 'undefined') { - // primitive types - return _stringify(object); - } - - depth = depth || 1; - var space = spaces * depth; - var str = isArray(object) ? '[' : '{'; - var end = isArray(object) ? ']' : '}'; - var length = typeof object.length === 'number' ? object.length : exports.keys(object).length; - // `.repeat()` polyfill - function repeat(s, n) { - return new Array(n).join(s); - } - - function _stringify(val) { - switch (exports.type(val)) { - case 'null': - case 'undefined': - val = '[' + val + ']'; - break; - case 'array': - case 'object': - val = jsonStringify(val, spaces, depth + 1); - break; - case 'boolean': - case 'regexp': - case 'symbol': - case 'number': - val = val === 0 && (1 / val) === -Infinity // `-0` - ? '-0' - : val.toString(); - break; - case 'date': - var sDate; - if (isNaN(val.getTime())) { // Invalid date - sDate = val.toString(); - } else { - sDate = val.toISOString ? val.toISOString() : toISOString(val); - } - val = '[Date: ' + sDate + ']'; - break; - case 'buffer': - var json = val.toJSON(); - // Based on the toJSON result - json = json.data && json.type ? json.data : json; - val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']'; - break; - default: - val = (val === '[Function]' || val === '[Circular]') - ? val - : JSON.stringify(val); // string - } - return val; - } - - for (var i in object) { - if (!Object.prototype.hasOwnProperty.call(object, i)) { - continue; // not my business - } - --length; - str += '\n ' + repeat(' ', space) - + (isArray(object) ? '' : '"' + i + '": ') // key - + _stringify(object[i]) // value - + (length ? ',' : ''); // comma - } - - return str - // [], {} - + (str.length !== 1 ? '\n' + repeat(' ', --space) + end : end); -} - -/** - * Test if a value is a buffer. - * - * @api private - * @param {*} value The value to test. - * @return {boolean} True if `value` is a buffer, otherwise false - */ -exports.isBuffer = function(value) { - return typeof Buffer !== 'undefined' && Buffer.isBuffer(value); -}; - -/** - * Return a new Thing that has the keys in sorted order. Recursive. - * - * If the Thing... - * - has already been seen, return string `'[Circular]'` - * - is `undefined`, return string `'[undefined]'` - * - is `null`, return value `null` - * - is some other primitive, return the value - * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method - * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. - * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()` - * - * @api private - * @see {@link exports.stringify} - * @param {*} value Thing to inspect. May or may not have properties. - * @param {Array} [stack=[]] Stack of seen values - * @return {(Object|Array|Function|string|undefined)} - */ -exports.canonicalize = function(value, stack) { - var canonicalizedObj; - /* eslint-disable no-unused-vars */ - var prop; - /* eslint-enable no-unused-vars */ - var type = exports.type(value); - function withStack(value, fn) { - stack.push(value); - fn(); - stack.pop(); - } - - stack = stack || []; - - if (exports.indexOf(stack, value) !== -1) { - return '[Circular]'; - } - - switch (type) { - case 'undefined': - case 'buffer': - case 'null': - canonicalizedObj = value; - break; - case 'array': - withStack(value, function() { - canonicalizedObj = exports.map(value, function(item) { - return exports.canonicalize(item, stack); - }); - }); - break; - case 'function': - /* eslint-disable guard-for-in */ - for (prop in value) { - canonicalizedObj = {}; - break; - } - /* eslint-enable guard-for-in */ - if (!canonicalizedObj) { - canonicalizedObj = emptyRepresentation(value, type); - break; - } - /* falls through */ - case 'object': - canonicalizedObj = canonicalizedObj || {}; - withStack(value, function() { - exports.forEach(exports.keys(value).sort(), function(key) { - canonicalizedObj[key] = exports.canonicalize(value[key], stack); - }); - }); - break; - case 'date': - case 'number': - case 'regexp': - case 'boolean': - case 'symbol': - canonicalizedObj = value; - break; - default: - canonicalizedObj = value + ''; - } - - return canonicalizedObj; -}; - -/** - * Lookup file names at the given `path`. - * - * @api public - * @param {string} path Base path to start searching from. - * @param {string[]} extensions File extensions to look for. - * @param {boolean} recursive Whether or not to recurse into subdirectories. - * @return {string[]} An array of paths. - */ -exports.lookupFiles = function lookupFiles(path, extensions, recursive) { - var files = []; - var re = new RegExp('\\.(' + extensions.join('|') + ')$'); - - if (!exists(path)) { - if (exists(path + '.js')) { - path += '.js'; - } else { - files = glob.sync(path); - if (!files.length) { - throw new Error("cannot resolve path (or pattern) '" + path + "'"); - } - return files; - } - } - - try { - var stat = statSync(path); - if (stat.isFile()) { - return path; - } - } catch (err) { - // ignore error - return; - } - - readdirSync(path).forEach(function(file) { - file = join(path, file); - try { - var stat = statSync(file); - if (stat.isDirectory()) { - if (recursive) { - files = files.concat(lookupFiles(file, extensions, recursive)); - } - return; - } - } catch (err) { - // ignore error - return; - } - if (!stat.isFile() || !re.test(file) || basename(file)[0] === '.') { - return; - } - files.push(file); - }); - - return files; -}; - -/** - * Generate an undefined error with a message warning the user. - * - * @return {Error} - */ - -exports.undefinedError = function() { - return new Error('Caught undefined error, did you throw without specifying what?'); -}; - -/** - * Generate an undefined error if `err` is not defined. - * - * @param {Error} err - * @return {Error} - */ - -exports.getError = function(err) { - return err || exports.undefinedError(); -}; - -/** - * @summary - * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`) - * @description - * When invoking this function you get a filter function that get the Error.stack as an input, - * and return a prettify output. - * (i.e: strip Mocha and internal node functions from stack trace). - * @returns {Function} - */ -exports.stackTraceFilter = function() { - // TODO: Replace with `process.browser` - var slash = '/'; - var is = typeof document === 'undefined' ? { node: true } : { browser: true }; - var cwd = is.node - ? process.cwd() + slash - : (typeof location === 'undefined' ? window.location : location).href.replace(/\/[^\/]*$/, '/'); - - function isMochaInternal(line) { - return (~line.indexOf('node_modules' + slash + 'mocha' + slash)) - || (~line.indexOf('components' + slash + 'mochajs' + slash)) - || (~line.indexOf('components' + slash + 'mocha' + slash)) - || (~line.indexOf(slash + 'mocha.js')); - } - - function isNodeInternal(line) { - return (~line.indexOf('(timers.js:')) - || (~line.indexOf('(events.js:')) - || (~line.indexOf('(node.js:')) - || (~line.indexOf('(module.js:')) - || (~line.indexOf('GeneratorFunctionPrototype.next (native)')) - || false; - } - - return function(stack) { - stack = stack.split('\n'); - - stack = exports.reduce(stack, function(list, line) { - if (isMochaInternal(line)) { - return list; - } - - if (is.node && isNodeInternal(line)) { - return list; - } - - // Clean up cwd(absolute) - if (/\(?.+:\d+:\d+\)?$/.test(line)) { - line = line.replace(cwd, ''); - } - - list.push(line); - return list; - }, []); - - return stack.join('\n'); - }; -}; - -}).call(this,require('_process'),require("buffer").Buffer) -},{"_process":58,"buffer":45,"debug":2,"fs":43,"glob":43,"path":43,"to-iso-string":72,"util":75}],40:[function(require,module,exports){ -'use strict' - -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - -function init () { - var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' - for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i - } - - revLookup['-'.charCodeAt(0)] = 62 - revLookup['_'.charCodeAt(0)] = 63 -} - -init() - -function toByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - var len = b64.length - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(len * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? len - 4 : len - - var L = 0 - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] - arr[L++] = (tmp >> 16) & 0xFF - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } - - if (placeHolders === 2) { - tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[L++] = tmp & 0xFF - } else if (placeHolders === 1) { - tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var output = '' - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - output += lookup[tmp >> 2] - output += lookup[(tmp << 4) & 0x3F] - output += '==' - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) - output += lookup[tmp >> 10] - output += lookup[(tmp >> 4) & 0x3F] - output += lookup[(tmp << 2) & 0x3F] - output += '=' - } - - parts.push(output) - - return parts.join('') -} - -},{}],41:[function(require,module,exports){ - -},{}],42:[function(require,module,exports){ -(function (process){ -var WritableStream = require('stream').Writable -var inherits = require('util').inherits - -module.exports = BrowserStdout - - -inherits(BrowserStdout, WritableStream) - -function BrowserStdout(opts) { - if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts) - - opts = opts || {} - WritableStream.call(this, opts) - this.label = (opts.label !== undefined) ? opts.label : 'stdout' -} - -BrowserStdout.prototype._write = function(chunks, encoding, cb) { - var output = chunks.toString ? chunks.toString() : chunks - if (this.label === false) { - console.log(output) - } else { - console.log(this.label+':', output) - } - process.nextTick(cb) -} - -}).call(this,require('_process')) -},{"_process":58,"stream":59,"util":75}],43:[function(require,module,exports){ -arguments[4][41][0].apply(exports,arguments) -},{"dup":41}],44:[function(require,module,exports){ -(function (global){ -'use strict'; - -var buffer = require('buffer'); -var Buffer = buffer.Buffer; -var SlowBuffer = buffer.SlowBuffer; -var MAX_LEN = buffer.kMaxLength || 2147483647; -exports.alloc = function alloc(size, fill, encoding) { - if (typeof Buffer.alloc === 'function') { - return Buffer.alloc(size, fill, encoding); - } - if (typeof encoding === 'number') { - throw new TypeError('encoding must not be number'); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - var enc = encoding; - var _fill = fill; - if (_fill === undefined) { - enc = undefined; - _fill = 0; - } - var buf = new Buffer(size); - if (typeof _fill === 'string') { - var fillBuf = new Buffer(_fill, enc); - var flen = fillBuf.length; - var i = -1; - while (++i < size) { - buf[i] = fillBuf[i % flen]; - } - } else { - buf.fill(_fill); - } - return buf; -} -exports.allocUnsafe = function allocUnsafe(size) { - if (typeof Buffer.allocUnsafe === 'function') { - return Buffer.allocUnsafe(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - return new Buffer(size); -} -exports.from = function from(value, encodingOrOffset, length) { - if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) { - return Buffer.from(value, encodingOrOffset, length); - } - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number'); - } - if (typeof value === 'string') { - return new Buffer(value, encodingOrOffset); - } - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - var offset = encodingOrOffset; - if (arguments.length === 1) { - return new Buffer(value); - } - if (typeof offset === 'undefined') { - offset = 0; - } - var len = length; - if (typeof len === 'undefined') { - len = value.byteLength - offset; - } - if (offset >= value.byteLength) { - throw new RangeError('\'offset\' is out of bounds'); - } - if (len > value.byteLength - offset) { - throw new RangeError('\'length\' is out of bounds'); - } - return new Buffer(value.slice(offset, offset + len)); - } - if (Buffer.isBuffer(value)) { - var out = new Buffer(value.length); - value.copy(out, 0, 0, value.length); - return out; - } - if (value) { - if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) { - return new Buffer(value); - } - if (value.type === 'Buffer' && Array.isArray(value.data)) { - return new Buffer(value.data); - } - } - - throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.'); -} -exports.allocUnsafeSlow = function allocUnsafeSlow(size) { - if (typeof Buffer.allocUnsafeSlow === 'function') { - return Buffer.allocUnsafeSlow(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size >= MAX_LEN) { - throw new RangeError('size is too large'); - } - return new SlowBuffer(size); -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"buffer":45}],45:[function(require,module,exports){ -(function (global){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var isArray = require('isarray') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -/* - * Export kMaxLength after typed array support is determined. - */ -exports.kMaxLength = kMaxLength() - -function typedArraySupport () { - try { - var arr = new Uint8Array(1) - arr.foo = function () { return 42 } - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length) - } - that.length = length - } - - return that -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } - - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192 // not used by this implementation - -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype - return arr -} - -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } - - return fromObject(that, value) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer[Symbol.species] === Buffer) { - // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true - }) - } -} - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } -} - -function alloc (that, size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -} - -function allocUnsafe (that, size) { - assertSize(size) - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; i++) { - that[i] = 0 - } - } - return that -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - var length = byteLength(string, encoding) | 0 - that = createBuffer(that, length) - - that.write(string, encoding) - return that -} - -function fromArrayLike (that, array) { - var length = checked(array.length) | 0 - that = createBuffer(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength // this throws if `array` is not a valid ArrayBuffer - - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - - if (length === undefined) { - array = new Uint8Array(array, byteOffset) - } else { - array = new Uint8Array(array, byteOffset, length) - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array) - } - return that -} - -function fromObject (that, obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - that = createBuffer(that, len) - - if (that.length === 0) { - return that - } - - obj.copy(that, 0, 0, len) - return that - } - - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data) - } - } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} - -function checked (length) { - // Note: cannot use `length < kMaxLength` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; i++) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; i++) { - var buf = list[i] - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string - } - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'binary': - // Deprecated - case 'raw': - case 'raws': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'binary': - return binarySlice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!Buffer.isBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -function arrayIndexOf (arr, val, byteOffset, encoding) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var foundIndex = -1 - for (var i = 0; byteOffset + i < arrLength; i++) { - if (read(arr, byteOffset + i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return (byteOffset + foundIndex) * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - return -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset >>= 0 - - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - if (Buffer.isBuffer(val)) { - // special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(this, val, byteOffset, encoding) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset, encoding) - } - - throw new TypeError('val must be string, number or Buffer') -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'binary': - return binaryWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end) - newBuf.__proto__ = Buffer.prototype - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] - } - } - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; i--) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; i++) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if (code < 256) { - val = code - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255 - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; i++) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()) - var len = bytes.length - for (i = 0; i < end - start; i++) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; i++) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"base64-js":40,"ieee754":52,"isarray":46}],46:[function(require,module,exports){ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; - -},{}],47:[function(require,module,exports){ -(function (Buffer){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -}).call(this,{"isBuffer":require("../../is-buffer/index.js")}) -},{"../../is-buffer/index.js":54}],48:[function(require,module,exports){ -/* See LICENSE file for terms of use */ - -/* - * Text diff implementation. - * - * This library supports the following APIS: - * JsDiff.diffChars: Character by character diff - * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace - * JsDiff.diffLines: Line based diff - * - * JsDiff.diffCss: Diff targeted at CSS content - * - * These methods are based on the implementation proposed in - * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). - * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 - */ -(function(global, undefined) { - var objectPrototypeToString = Object.prototype.toString; - - /*istanbul ignore next*/ - function map(arr, mapper, that) { - if (Array.prototype.map) { - return Array.prototype.map.call(arr, mapper, that); - } - - var other = new Array(arr.length); - - for (var i = 0, n = arr.length; i < n; i++) { - other[i] = mapper.call(that, arr[i], i, arr); - } - return other; - } - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - - // This function handles the presence of circular references by bailing out when encountering an - // object that is already on the "stack" of items being processed. - function canonicalize(obj, stack, replacementStack) { - stack = stack || []; - replacementStack = replacementStack || []; - - var i; - - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - - var canonicalizedObj; - - if ('[object Array]' === objectPrototypeToString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack); - } - stack.pop(); - replacementStack.pop(); - } else if (typeof obj === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - var sortedKeys = [], - key; - for (key in obj) { - sortedKeys.push(key); - } - sortedKeys.sort(); - for (i = 0; i < sortedKeys.length; i += 1) { - key = sortedKeys[i]; - canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack); - } - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - return canonicalizedObj; - } - - function buildValues(components, newString, oldString, useLongestToken) { - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = map(value, function(value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - - component.value = value.join(''); - } else { - component.value = newString.slice(newPos, newPos + component.count).join(''); - } - newPos += component.count; - - // Common case - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = oldString.slice(oldPos, oldPos + component.count).join(''); - oldPos += component.count; - - // Reverse add and remove so removes are output first to match common convention - // The diffing algorithm is tied to add then remove output and this is the simplest - // route to get the desired output with minimal overhead. - if (componentPos && components[componentPos - 1].added) { - var tmp = components[componentPos - 1]; - components[componentPos - 1] = components[componentPos]; - components[componentPos] = tmp; - } - } - } - - return components; - } - - function Diff(ignoreWhitespace) { - this.ignoreWhitespace = ignoreWhitespace; - } - Diff.prototype = { - diff: function(oldString, newString, callback) { - var self = this; - - function done(value) { - if (callback) { - setTimeout(function() { callback(undefined, value); }, 0); - return true; - } else { - return value; - } - } - - // Handle the identity case (this is due to unrolling editLength == 0 - if (newString === oldString) { - return done([{ value: newString }]); - } - if (!newString) { - return done([{ value: oldString, removed: true }]); - } - if (!oldString) { - return done([{ value: newString, added: true }]); - } - - newString = this.tokenize(newString); - oldString = this.tokenize(oldString); - - var newLen = newString.length, oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - // Seed editLength = 0, i.e. the content starts with the same values - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - // Identity per the equality and tokenizer - return done([{value: newString.join('')}]); - } - - // Main worker method. checks all permutations of a given edit length for acceptance. - function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { - var basePath; - var addPath = bestPath[diagonalPath - 1], - removePath = bestPath[diagonalPath + 1], - oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - - var canAdd = addPath && addPath.newPos + 1 < newLen, - canRemove = removePath && 0 <= oldPos && oldPos < oldLen; - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { - basePath = clonePath(removePath); - self.pushComponent(basePath.components, undefined, true); - } else { - basePath = addPath; // No need to clone, we've pulled it from the list - basePath.newPos++; - self.pushComponent(basePath.components, true, undefined); - } - - oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); - - // If we have hit the end of both strings, then we are done - if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - return done(buildValues(basePath.components, newString, oldString, self.useLongestToken)); - } else { - // Otherwise track this path as a potential candidate and continue. - bestPath[diagonalPath] = basePath; - } - } - - editLength++; - } - - // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced. - if (callback) { - (function exec() { - setTimeout(function() { - // This should not happen, but we want to be safe. - /*istanbul ignore next */ - if (editLength > maxEditLength) { - return callback(); - } - - if (!execEditLength()) { - exec(); - } - }, 0); - }()); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - if (ret) { - return ret; - } - } - } - }, - - pushComponent: function(components, added, removed) { - var last = components[components.length - 1]; - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length - 1] = {count: last.count + 1, added: added, removed: removed }; - } else { - components.push({count: 1, added: added, removed: removed }); - } - }, - extractCommon: function(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath, - - commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { - newPos++; - oldPos++; - commonCount++; - } - - if (commonCount) { - basePath.components.push({count: commonCount}); - } - - basePath.newPos = newPos; - return oldPos; - }, - - equals: function(left, right) { - var reWhitespace = /\S/; - return left === right || (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)); - }, - tokenize: function(value) { - return value.split(''); - } - }; - - var CharDiff = new Diff(); - - var WordDiff = new Diff(true); - var WordWithSpaceDiff = new Diff(); - WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) { - return removeEmpty(value.split(/(\s+|\b)/)); - }; - - var CssDiff = new Diff(true); - CssDiff.tokenize = function(value) { - return removeEmpty(value.split(/([{}:;,]|\s+)/)); - }; - - var LineDiff = new Diff(); - - var TrimmedLineDiff = new Diff(); - TrimmedLineDiff.ignoreTrim = true; - - LineDiff.tokenize = TrimmedLineDiff.tokenize = function(value) { - var retLines = [], - lines = value.split(/^/m); - for (var i = 0; i < lines.length; i++) { - var line = lines[i], - lastLine = lines[i - 1], - lastLineLastChar = lastLine && lastLine[lastLine.length - 1]; - - // Merge lines that may contain windows new lines - if (line === '\n' && lastLineLastChar === '\r') { - retLines[retLines.length - 1] = retLines[retLines.length - 1].slice(0, -1) + '\r\n'; - } else { - if (this.ignoreTrim) { - line = line.trim(); - // add a newline unless this is the last line. - if (i < lines.length - 1) { - line += '\n'; - } - } - retLines.push(line); - } - } - - return retLines; - }; - - var PatchDiff = new Diff(); - PatchDiff.tokenize = function(value) { - var ret = [], - linesAndNewlines = value.split(/(\n|\r\n)/); - - // Ignore the final empty token that occurs if the string ends with a new line - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } - - // Merge the content and line separators into single tokens - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - - if (i % 2) { - ret[ret.length - 1] += line; - } else { - ret.push(line); - } - } - return ret; - }; - - var SentenceDiff = new Diff(); - SentenceDiff.tokenize = function(value) { - return removeEmpty(value.split(/(\S.+?[.!?])(?=\s+|$)/)); - }; - - var JsonDiff = new Diff(); - // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a - // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: - JsonDiff.useLongestToken = true; - JsonDiff.tokenize = LineDiff.tokenize; - JsonDiff.equals = function(left, right) { - return LineDiff.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')); - }; - - var JsDiff = { - Diff: Diff, - - diffChars: function(oldStr, newStr, callback) { return CharDiff.diff(oldStr, newStr, callback); }, - diffWords: function(oldStr, newStr, callback) { return WordDiff.diff(oldStr, newStr, callback); }, - diffWordsWithSpace: function(oldStr, newStr, callback) { return WordWithSpaceDiff.diff(oldStr, newStr, callback); }, - diffLines: function(oldStr, newStr, callback) { return LineDiff.diff(oldStr, newStr, callback); }, - diffTrimmedLines: function(oldStr, newStr, callback) { return TrimmedLineDiff.diff(oldStr, newStr, callback); }, - - diffSentences: function(oldStr, newStr, callback) { return SentenceDiff.diff(oldStr, newStr, callback); }, - - diffCss: function(oldStr, newStr, callback) { return CssDiff.diff(oldStr, newStr, callback); }, - diffJson: function(oldObj, newObj, callback) { - return JsonDiff.diff( - typeof oldObj === 'string' ? oldObj : JSON.stringify(canonicalize(oldObj), undefined, ' '), - typeof newObj === 'string' ? newObj : JSON.stringify(canonicalize(newObj), undefined, ' '), - callback - ); - }, - - createTwoFilesPatch: function(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader) { - var ret = []; - - if (oldFileName == newFileName) { - ret.push('Index: ' + oldFileName); - } - ret.push('==================================================================='); - ret.push('--- ' + oldFileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader)); - ret.push('+++ ' + newFileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader)); - - var diff = PatchDiff.diff(oldStr, newStr); - diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier - - // Formats a given set of lines for printing as context lines in a patch - function contextLines(lines) { - return map(lines, function(entry) { return ' ' + entry; }); - } - - // Outputs the no newline at end of file warning if needed - function eofNL(curRange, i, current) { - var last = diff[diff.length - 2], - isLast = i === diff.length - 2, - isLastOfType = i === diff.length - 3 && current.added !== last.added; - - // Figure out if this is the last line for the given file and missing NL - if (!(/\n$/.test(current.value)) && (isLast || isLastOfType)) { - curRange.push('\\ No newline at end of file'); - } - } - - var oldRangeStart = 0, newRangeStart = 0, curRange = [], - oldLine = 1, newLine = 1; - for (var i = 0; i < diff.length; i++) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = contextLines(prev.lines.slice(-4)); - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - - // Output our changes - curRange.push.apply(curRange, map(lines, function(entry) { - return (current.added ? '+' : '-') + entry; - })); - eofNL(curRange, i, current); - - // Track the updated file position - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= 8 && i < diff.length - 2) { - // Overlapping - curRange.push.apply(curRange, contextLines(lines)); - } else { - // end the range and output - var contextSize = Math.min(lines.length, 4); - ret.push( - '@@ -' + oldRangeStart + ',' + (oldLine - oldRangeStart + contextSize) - + ' +' + newRangeStart + ',' + (newLine - newRangeStart + contextSize) - + ' @@'); - ret.push.apply(ret, curRange); - ret.push.apply(ret, contextLines(lines.slice(0, contextSize))); - if (lines.length <= 4) { - eofNL(ret, i, current); - } - - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - } - - return ret.join('\n') + '\n'; - }, - - createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) { - return JsDiff.createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader); - }, - - applyPatch: function(oldStr, uniDiff) { - var diffstr = uniDiff.split('\n'), - hunks = [], - i = 0, - remEOFNL = false, - addEOFNL = false; - - // Skip to the first change hunk - while (i < diffstr.length && !(/^@@/.test(diffstr[i]))) { - i++; - } - - // Parse the unified diff - for (; i < diffstr.length; i++) { - if (diffstr[i][0] === '@') { - var chnukHeader = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); - hunks.unshift({ - start: chnukHeader[3], - oldlength: +chnukHeader[2], - removed: [], - newlength: chnukHeader[4], - added: [] - }); - } else if (diffstr[i][0] === '+') { - hunks[0].added.push(diffstr[i].substr(1)); - } else if (diffstr[i][0] === '-') { - hunks[0].removed.push(diffstr[i].substr(1)); - } else if (diffstr[i][0] === ' ') { - hunks[0].added.push(diffstr[i].substr(1)); - hunks[0].removed.push(diffstr[i].substr(1)); - } else if (diffstr[i][0] === '\\') { - if (diffstr[i - 1][0] === '+') { - remEOFNL = true; - } else if (diffstr[i - 1][0] === '-') { - addEOFNL = true; - } - } - } - - // Apply the diff to the input - var lines = oldStr.split('\n'); - for (i = hunks.length - 1; i >= 0; i--) { - var hunk = hunks[i]; - // Sanity check the input string. Bail if we don't match. - for (var j = 0; j < hunk.oldlength; j++) { - if (lines[hunk.start - 1 + j] !== hunk.removed[j]) { - return false; - } - } - Array.prototype.splice.apply(lines, [hunk.start - 1, hunk.oldlength].concat(hunk.added)); - } - - // Handle EOFNL insertion/removal - if (remEOFNL) { - while (!lines[lines.length - 1]) { - lines.pop(); - } - } else if (addEOFNL) { - lines.push(''); - } - return lines.join('\n'); - }, - - convertChangesToXML: function(changes) { - var ret = []; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - }, - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - convertChangesToDMP: function(changes) { - var ret = [], - change, - operation; - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - - ret.push([operation, change.value]); - } - return ret; - }, - - canonicalize: canonicalize - }; - - /*istanbul ignore next */ - /*global module */ - if (typeof module !== 'undefined' && module.exports) { - module.exports = JsDiff; - } else if (typeof define === 'function' && define.amd) { - /*global define */ - define([], function() { return JsDiff; }); - } else if (typeof global.JsDiff === 'undefined') { - global.JsDiff = JsDiff; - } -}(this)); - -},{}],49:[function(require,module,exports){ -'use strict'; - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); -}; - -},{}],50:[function(require,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -function EventEmitter() { - this._events = this._events || {}; - this._maxListeners = this._maxListeners || undefined; -} -module.exports = EventEmitter; - -// Backwards-compat with node 0.10.x -EventEmitter.EventEmitter = EventEmitter; - -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; - -// By default EventEmitters will print a warning if more than 10 listeners are -// added to it. This is a useful default which helps finding memory leaks. -EventEmitter.defaultMaxListeners = 10; - -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -EventEmitter.prototype.setMaxListeners = function(n) { - if (!isNumber(n) || n < 0 || isNaN(n)) - throw TypeError('n must be a positive number'); - this._maxListeners = n; - return this; -}; - -EventEmitter.prototype.emit = function(type) { - var er, handler, len, args, i, listeners; - - if (!this._events) - this._events = {}; - - // If there is no 'error' event listener then throw. - if (type === 'error') { - if (!this._events.error || - (isObject(this._events.error) && !this._events.error.length)) { - er = arguments[1]; - if (er instanceof Error) { - throw er; // Unhandled 'error' event - } - throw TypeError('Uncaught, unspecified "error" event.'); - } - } - - handler = this._events[type]; - - if (isUndefined(handler)) - return false; - - if (isFunction(handler)) { - switch (arguments.length) { - // fast cases - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - // slower - default: - args = Array.prototype.slice.call(arguments, 1); - handler.apply(this, args); - } - } else if (isObject(handler)) { - args = Array.prototype.slice.call(arguments, 1); - listeners = handler.slice(); - len = listeners.length; - for (i = 0; i < len; i++) - listeners[i].apply(this, args); - } - - return true; -}; - -EventEmitter.prototype.addListener = function(type, listener) { - var m; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events) - this._events = {}; - - // To avoid recursion in the case that type === "newListener"! Before - // adding it to the listeners, first emit "newListener". - if (this._events.newListener) - this.emit('newListener', type, - isFunction(listener.listener) ? - listener.listener : listener); - - if (!this._events[type]) - // Optimize the case of one listener. Don't need the extra array object. - this._events[type] = listener; - else if (isObject(this._events[type])) - // If we've already got an array, just append. - this._events[type].push(listener); - else - // Adding the second element, need to change to array. - this._events[type] = [this._events[type], listener]; - - // Check for listener leak - if (isObject(this._events[type]) && !this._events[type].warned) { - if (!isUndefined(this._maxListeners)) { - m = this._maxListeners; - } else { - m = EventEmitter.defaultMaxListeners; - } - - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - if (typeof console.trace === 'function') { - // not supported in IE 10 - console.trace(); - } - } - } - - return this; -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.once = function(type, listener) { - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - var fired = false; - - function g() { - this.removeListener(type, g); - - if (!fired) { - fired = true; - listener.apply(this, arguments); - } - } - - g.listener = listener; - this.on(type, g); - - return this; -}; - -// emits a 'removeListener' event iff the listener was removed -EventEmitter.prototype.removeListener = function(type, listener) { - var list, position, length, i; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events || !this._events[type]) - return this; - - list = this._events[type]; - length = list.length; - position = -1; - - if (list === listener || - (isFunction(list.listener) && list.listener === listener)) { - delete this._events[type]; - if (this._events.removeListener) - this.emit('removeListener', type, listener); - - } else if (isObject(list)) { - for (i = length; i-- > 0;) { - if (list[i] === listener || - (list[i].listener && list[i].listener === listener)) { - position = i; - break; - } - } - - if (position < 0) - return this; - - if (list.length === 1) { - list.length = 0; - delete this._events[type]; - } else { - list.splice(position, 1); - } - - if (this._events.removeListener) - this.emit('removeListener', type, listener); - } - - return this; -}; - -EventEmitter.prototype.removeAllListeners = function(type) { - var key, listeners; - - if (!this._events) - return this; - - // not listening for removeListener, no need to emit - if (!this._events.removeListener) { - if (arguments.length === 0) - this._events = {}; - else if (this._events[type]) - delete this._events[type]; - return this; - } - - // emit removeListener for all listeners on all events - if (arguments.length === 0) { - for (key in this._events) { - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = {}; - return this; - } - - listeners = this._events[type]; - - if (isFunction(listeners)) { - this.removeListener(type, listeners); - } else if (listeners) { - // LIFO order - while (listeners.length) - this.removeListener(type, listeners[listeners.length - 1]); - } - delete this._events[type]; - - return this; -}; - -EventEmitter.prototype.listeners = function(type) { - var ret; - if (!this._events || !this._events[type]) - ret = []; - else if (isFunction(this._events[type])) - ret = [this._events[type]]; - else - ret = this._events[type].slice(); - return ret; -}; - -EventEmitter.prototype.listenerCount = function(type) { - if (this._events) { - var evlistener = this._events[type]; - - if (isFunction(evlistener)) - return 1; - else if (evlistener) - return evlistener.length; - } - return 0; -}; - -EventEmitter.listenerCount = function(emitter, type) { - return emitter.listenerCount(type); -}; - -function isFunction(arg) { - return typeof arg === 'function'; -} - -function isNumber(arg) { - return typeof arg === 'number'; -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -function isUndefined(arg) { - return arg === void 0; -} - -},{}],51:[function(require,module,exports){ -(function (process){ -// Growl - Copyright TJ Holowaychuk (MIT Licensed) - -/** - * Module dependencies. - */ - -var exec = require('child_process').exec - , fs = require('fs') - , path = require('path') - , exists = fs.existsSync || path.existsSync - , os = require('os') - , quote = JSON.stringify - , cmd; - -function which(name) { - var paths = process.env.PATH.split(':'); - var loc; - - for (var i = 0, len = paths.length; i < len; ++i) { - loc = path.join(paths[i], name); - if (exists(loc)) return loc; - } -} - -switch(os.type()) { - case 'Darwin': - if (which('terminal-notifier')) { - cmd = { - type: "Darwin-NotificationCenter" - , pkg: "terminal-notifier" - , msg: '-message' - , title: '-title' - , subtitle: '-subtitle' - , icon: '-appIcon' - , sound: '-sound' - , url: '-open' - , priority: { - cmd: '-execute' - , range: [] - } - }; - } else { - cmd = { - type: "Darwin-Growl" - , pkg: "growlnotify" - , msg: '-m' - , sticky: '--sticky' - , priority: { - cmd: '--priority' - , range: [ - -2 - , -1 - , 0 - , 1 - , 2 - , "Very Low" - , "Moderate" - , "Normal" - , "High" - , "Emergency" - ] - } - }; - } - break; - case 'Linux': - if (which('growl')) { - cmd = { - type: "Linux-Growl" - , pkg: "growl" - , msg: '-m' - , title: '-title' - , subtitle: '-subtitle' - , host: { - cmd: '-H' - , hostname: '192.168.33.1' - } - }; - } else { - cmd = { - type: "Linux" - , pkg: "notify-send" - , msg: '' - , sticky: '-t 0' - , icon: '-i' - , priority: { - cmd: '-u' - , range: [ - "low" - , "normal" - , "critical" - ] - } - }; - } - break; - case 'Windows_NT': - cmd = { - type: "Windows" - , pkg: "growlnotify" - , msg: '' - , sticky: '/s:true' - , title: '/t:' - , icon: '/i:' - , url: '/cu:' - , priority: { - cmd: '/p:' - , range: [ - -2 - , -1 - , 0 - , 1 - , 2 - ] - } - }; - break; -} - -/** - * Expose `growl`. - */ - -exports = module.exports = growl; - -/** - * Node-growl version. - */ - -exports.version = '1.4.1' - -/** - * Send growl notification _msg_ with _options_. - * - * Options: - * - * - title Notification title - * - sticky Make the notification stick (defaults to false) - * - priority Specify an int or named key (default is 0) - * - name Application name (defaults to growlnotify) - * - sound Sound efect ( in OSx defined in preferences -> sound -> effects) * works only in OSX > 10.8x - * - image - * - path to an icon sets --iconpath - * - path to an image sets --image - * - capitalized word sets --appIcon - * - filename uses extname as --icon - * - otherwise treated as --icon - * - * Examples: - * - * growl('New email') - * growl('5 new emails', { title: 'Thunderbird' }) - * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' }) - * growl('Email sent', function(){ - * // ... notification sent - * }) - * - * @param {string} msg - * @param {object} options - * @param {function} fn - * @api public - */ - -function growl(msg, options, fn) { - var image - , args - , options = options || {} - , fn = fn || function(){}; - - if (options.exec) { - cmd = { - type: "Custom" - , pkg: options.exec - , range: [] - }; - } - - // noop - if (!cmd) return fn(new Error('growl not supported on this platform')); - args = [cmd.pkg]; - - // image - if (image = options.image) { - switch(cmd.type) { - case 'Darwin-Growl': - var flag, ext = path.extname(image).substr(1) - flag = flag || ext == 'icns' && 'iconpath' - flag = flag || /^[A-Z]/.test(image) && 'appIcon' - flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image' - flag = flag || ext && (image = ext) && 'icon' - flag = flag || 'icon' - args.push('--' + flag, quote(image)) - break; - case 'Darwin-NotificationCenter': - args.push(cmd.icon, quote(image)); - break; - case 'Linux': - args.push(cmd.icon, quote(image)); - // libnotify defaults to sticky, set a hint for transient notifications - if (!options.sticky) args.push('--hint=int:transient:1'); - break; - case 'Windows': - args.push(cmd.icon + quote(image)); - break; - } - } - - // sticky - if (options.sticky) args.push(cmd.sticky); - - // priority - if (options.priority) { - var priority = options.priority + ''; - var checkindexOf = cmd.priority.range.indexOf(priority); - if (~cmd.priority.range.indexOf(priority)) { - args.push(cmd.priority, options.priority); - } - } - - //sound - if(options.sound && cmd.type === 'Darwin-NotificationCenter'){ - args.push(cmd.sound, options.sound) - } - - // name - if (options.name && cmd.type === "Darwin-Growl") { - args.push('--name', options.name); - } - - switch(cmd.type) { - case 'Darwin-Growl': - args.push(cmd.msg); - args.push(quote(msg).replace(/\\n/g, '\n')); - if (options.title) args.push(quote(options.title)); - break; - case 'Darwin-NotificationCenter': - args.push(cmd.msg); - var stringifiedMsg = quote(msg); - var escapedMsg = stringifiedMsg.replace(/\\n/g, '\n'); - args.push(escapedMsg); - if (options.title) { - args.push(cmd.title); - args.push(quote(options.title)); - } - if (options.subtitle) { - args.push(cmd.subtitle); - args.push(quote(options.subtitle)); - } - if (options.url) { - args.push(cmd.url); - args.push(quote(options.url)); - } - break; - case 'Linux-Growl': - args.push(cmd.msg); - args.push(quote(msg).replace(/\\n/g, '\n')); - if (options.title) args.push(quote(options.title)); - if (cmd.host) { - args.push(cmd.host.cmd, cmd.host.hostname) - } - break; - case 'Linux': - if (options.title) { - args.push(quote(options.title)); - args.push(cmd.msg); - args.push(quote(msg).replace(/\\n/g, '\n')); - } else { - args.push(quote(msg).replace(/\\n/g, '\n')); - } - break; - case 'Windows': - args.push(quote(msg).replace(/\\n/g, '\n')); - if (options.title) args.push(cmd.title + quote(options.title)); - if (options.url) args.push(cmd.url + quote(options.url)); - break; - case 'Custom': - args[0] = (function(origCommand) { - var message = options.title - ? options.title + ': ' + msg - : msg; - var command = origCommand.replace(/(^|[^%])%s/g, '$1' + quote(message)); - if (command === origCommand) args.push(quote(message)); - return command; - })(args[0]); - break; - } - - // execute - exec(args.join(' '), fn); -}; - -}).call(this,require('_process')) -},{"_process":58,"child_process":43,"fs":43,"os":56,"path":43}],52:[function(require,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - -},{}],53:[function(require,module,exports){ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -},{}],54:[function(require,module,exports){ -/** - * Determine if an object is Buffer - * - * Author: Feross Aboukhadijeh - * License: MIT - * - * `npm install is-buffer` - */ - -module.exports = function (obj) { - return !!(obj != null && - (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) - (obj.constructor && - typeof obj.constructor.isBuffer === 'function' && - obj.constructor.isBuffer(obj)) - )) -} - -},{}],55:[function(require,module,exports){ -(function (process){ -var path = require('path'); -var fs = require('fs'); -var _0777 = parseInt('0777', 8); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), opts, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - p = path.resolve(p); - - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; - -}).call(this,require('_process')) -},{"_process":58,"fs":43,"path":43}],56:[function(require,module,exports){ -exports.endianness = function () { return 'LE' }; - -exports.hostname = function () { - if (typeof location !== 'undefined') { - return location.hostname - } - else return ''; -}; - -exports.loadavg = function () { return [] }; - -exports.uptime = function () { return 0 }; - -exports.freemem = function () { - return Number.MAX_VALUE; -}; - -exports.totalmem = function () { - return Number.MAX_VALUE; -}; - -exports.cpus = function () { return [] }; - -exports.type = function () { return 'Browser' }; - -exports.release = function () { - if (typeof navigator !== 'undefined') { - return navigator.appVersion; - } - return ''; -}; - -exports.networkInterfaces -= exports.getNetworkInterfaces -= function () { return {} }; - -exports.arch = function () { return 'javascript' }; - -exports.platform = function () { return 'browser' }; - -exports.tmpdir = exports.tmpDir = function () { - return '/tmp'; -}; - -exports.EOL = '\n'; - -},{}],57:[function(require,module,exports){ -(function (process){ -'use strict'; - -if (!process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = nextTick; -} else { - module.exports = process.nextTick; -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} - -}).call(this,require('_process')) -},{"_process":58}],58:[function(require,module,exports){ -// shim for using process in browser - -var process = module.exports = {}; -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = setTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - clearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - setTimeout(drainQueue, 0); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],59:[function(require,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Stream; - -var EE = require('events').EventEmitter; -var inherits = require('inherits'); - -inherits(Stream, EE); -Stream.Readable = require('readable-stream/readable.js'); -Stream.Writable = require('readable-stream/writable.js'); -Stream.Duplex = require('readable-stream/duplex.js'); -Stream.Transform = require('readable-stream/transform.js'); -Stream.PassThrough = require('readable-stream/passthrough.js'); - -// Backwards-compat with node 0.4.x -Stream.Stream = Stream; - - - -// old-style streams. Note that the pipe method (the only relevant -// part of this class) is overridden in the Readable class. - -function Stream() { - EE.call(this); -} - -Stream.prototype.pipe = function(dest, options) { - var source = this; - - function ondata(chunk) { - if (dest.writable) { - if (false === dest.write(chunk) && source.pause) { - source.pause(); - } - } - } - - source.on('data', ondata); - - function ondrain() { - if (source.readable && source.resume) { - source.resume(); - } - } - - dest.on('drain', ondrain); - - // If the 'end' option is not supplied, dest.end() will be called when - // source gets the 'end' or 'close' events. Only dest.end() once. - if (!dest._isStdio && (!options || options.end !== false)) { - source.on('end', onend); - source.on('close', onclose); - } - - var didOnEnd = false; - function onend() { - if (didOnEnd) return; - didOnEnd = true; - - dest.end(); - } - - - function onclose() { - if (didOnEnd) return; - didOnEnd = true; - - if (typeof dest.destroy === 'function') dest.destroy(); - } - - // don't leave dangling pipes when there are errors. - function onerror(er) { - cleanup(); - if (EE.listenerCount(this, 'error') === 0) { - throw er; // Unhandled stream error in pipe. - } - } - - source.on('error', onerror); - dest.on('error', onerror); - - // remove all the event listeners that were added. - function cleanup() { - source.removeListener('data', ondata); - dest.removeListener('drain', ondrain); - - source.removeListener('end', onend); - source.removeListener('close', onclose); - - source.removeListener('error', onerror); - dest.removeListener('error', onerror); - - source.removeListener('end', cleanup); - source.removeListener('close', cleanup); - - dest.removeListener('close', cleanup); - } - - source.on('end', cleanup); - source.on('close', cleanup); - - dest.on('close', cleanup); - - dest.emit('pipe', source); - - // Allow for unix-like usage: A.pipe(B).pipe(C) - return dest; -}; - -},{"events":50,"inherits":53,"readable-stream/duplex.js":61,"readable-stream/passthrough.js":67,"readable-stream/readable.js":68,"readable-stream/transform.js":69,"readable-stream/writable.js":70}],60:[function(require,module,exports){ -arguments[4][46][0].apply(exports,arguments) -},{"dup":46}],61:[function(require,module,exports){ -module.exports = require("./lib/_stream_duplex.js") - -},{"./lib/_stream_duplex.js":62}],62:[function(require,module,exports){ -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} -},{"./_stream_readable":64,"./_stream_writable":66,"core-util-is":47,"inherits":53,"process-nextick-args":57}],63:[function(require,module,exports){ -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; -},{"./_stream_transform":65,"core-util-is":47,"inherits":53}],64:[function(require,module,exports){ -(function (process){ -'use strict'; - -module.exports = Readable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var isArray = require('isarray'); -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; -/**/ -var bufferShim = require('buffer-shims'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -var hasPrependListener = typeof EE.prototype.prependListener === 'function'; - -function prependListener(emitter, event, fn) { - if (hasPrependListener) return emitter.prependListener(event, fn); - - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. This is here - // only because this code needs to continue to work with older versions - // of Node.js that do not include the prependListener() method. The goal - // is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -var Duplex; -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -var Duplex; -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options && typeof options.read === 'function') this._read = options.read; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - - if (!state.objectMode && typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = bufferShim.from(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var _e = new Error('stream.unshift() after end event'); - stream.emit('error', _e); - } else { - var skipAdd; - if (state.decoder && !addToFront && !encoding) { - chunk = state.decoder.write(chunk); - skipAdd = !state.objectMode && chunk.length === 0; - } - - if (!addToFront) state.reading = false; - - // Don't add to the buffer if we've decoded to an empty string chunk and - // we're not in object mode - if (!skipAdd) { - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) return 0; - - if (state.objectMode) return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; - } - - if (n <= 0) return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else { - return state.length; - } - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) endReadable(this); - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var _i = 0; _i < len; _i++) { - dests[_i].emit('unpipe', this); - }return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && !this._readableState.endEmitted) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - processNextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - processNextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function (ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) return null; - - if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var _buf = list[0]; - var cpy = Math.min(n - c, _buf.length); - - if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy); - - if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - processNextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} -}).call(this,require('_process')) -},{"./_stream_duplex":62,"_process":58,"buffer":45,"buffer-shims":44,"core-util-is":47,"events":50,"inherits":53,"isarray":60,"process-nextick-args":57,"string_decoder/":71,"util":41}],65:[function(require,module,exports){ -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) stream.push(data); - - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er) { - done(stream, er); - });else done(stream); - }); -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('Not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -function done(stream, er) { - if (er) return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) throw new Error('Calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} -},{"./_stream_duplex":62,"core-util-is":47,"inherits":53}],66:[function(require,module,exports){ -(function (process){ -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -module.exports = Writable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; -/**/ -var bufferShim = require('buffer-shims'); -/**/ - -util.inherits(Writable, Stream); - -function nop() {} - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -var Duplex; -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function writableStateGetBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') - }); - } catch (_) {} -})(); - -var Duplex; -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - processNextTick(cb, er); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - // Always throw error if a null is written - // if we are not in object mode then throw - // if it is not a buffer, string, or undefined. - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - processNextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = bufferShim.from(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - - if (Buffer.isBuffer(chunk)) encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) processNextTick(cb, er);else cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - while (entry) { - buffer[count] = entry; - entry = entry.next; - count += 1; - } - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequestCount = 0; - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else { - prefinish(stream, state); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function (err) { - var entry = _this.entry; - _this.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = _this; - } else { - state.corkedRequestsFree = _this; - } - }; -} -}).call(this,require('_process')) -},{"./_stream_duplex":62,"_process":58,"buffer":45,"buffer-shims":44,"core-util-is":47,"events":50,"inherits":53,"process-nextick-args":57,"util-deprecate":73}],67:[function(require,module,exports){ -module.exports = require("./lib/_stream_passthrough.js") - -},{"./lib/_stream_passthrough.js":63}],68:[function(require,module,exports){ -(function (process){ -var Stream = (function (){ - try { - return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify - } catch(_){} -}()); -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream || exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); - -if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; -} - -}).call(this,require('_process')) -},{"./lib/_stream_duplex.js":62,"./lib/_stream_passthrough.js":63,"./lib/_stream_readable.js":64,"./lib/_stream_transform.js":65,"./lib/_stream_writable.js":66,"_process":58}],69:[function(require,module,exports){ -module.exports = require("./lib/_stream_transform.js") - -},{"./lib/_stream_transform.js":65}],70:[function(require,module,exports){ -module.exports = require("./lib/_stream_writable.js") - -},{"./lib/_stream_writable.js":66}],71:[function(require,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} - -},{"buffer":45}],72:[function(require,module,exports){ - -/** - * Expose `toIsoString`. - */ - -module.exports = toIsoString; - - -/** - * Turn a `date` into an ISO string. - * - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString - * - * @param {Date} date - * @return {String} - */ - -function toIsoString (date) { - return date.getUTCFullYear() - + '-' + pad(date.getUTCMonth() + 1) - + '-' + pad(date.getUTCDate()) - + 'T' + pad(date.getUTCHours()) - + ':' + pad(date.getUTCMinutes()) - + ':' + pad(date.getUTCSeconds()) - + '.' + String((date.getUTCMilliseconds()/1000).toFixed(3)).slice(2, 5) - + 'Z'; -} - - -/** - * Pad a `number` with a ten's place zero. - * - * @param {Number} number - * @return {String} - */ - -function pad (number) { - var n = number.toString(); - return n.length === 1 ? '0' + n : n; -} -},{}],73:[function(require,module,exports){ -(function (global){ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],74:[function(require,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} -},{}],75:[function(require,module,exports){ -(function (process,global){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = require('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = require('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":74,"_process":58,"inherits":53}]},{},[1]); - -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.chai = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o - * MIT Licensed - */ - -var used = [] - , exports = module.exports = {}; - -/*! - * Chai version - */ - -exports.version = '3.5.0'; - -/*! - * Assertion Error - */ - -exports.AssertionError = require('assertion-error'); - -/*! - * Utils for plugins (not exported) - */ - -var util = require('./chai/utils'); - -/** - * # .use(function) - * - * Provides a way to extend the internals of Chai - * - * @param {Function} - * @returns {this} for chaining - * @api public - */ - -exports.use = function (fn) { - if (!~used.indexOf(fn)) { - fn(this, util); - used.push(fn); - } - - return this; -}; - -/*! - * Utility Functions - */ - -exports.util = util; - -/*! - * Configuration - */ - -var config = require('./chai/config'); -exports.config = config; - -/*! - * Primary `Assertion` prototype - */ - -var assertion = require('./chai/assertion'); -exports.use(assertion); - -/*! - * Core Assertions - */ - -var core = require('./chai/core/assertions'); -exports.use(core); - -/*! - * Expect interface - */ - -var expect = require('./chai/interface/expect'); -exports.use(expect); - -/*! - * Should interface - */ - -var should = require('./chai/interface/should'); -exports.use(should); - -/*! - * Assert interface - */ - -var assert = require('./chai/interface/assert'); -exports.use(assert); - -},{"./chai/assertion":3,"./chai/config":4,"./chai/core/assertions":5,"./chai/interface/assert":6,"./chai/interface/expect":7,"./chai/interface/should":8,"./chai/utils":22,"assertion-error":30}],3:[function(require,module,exports){ -/*! - * chai - * http://chaijs.com - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -var config = require('./config'); - -module.exports = function (_chai, util) { - /*! - * Module dependencies. - */ - - var AssertionError = _chai.AssertionError - , flag = util.flag; - - /*! - * Module export. - */ - - _chai.Assertion = Assertion; - - /*! - * Assertion Constructor - * - * Creates object for chaining. - * - * @api private - */ - - function Assertion (obj, msg, stack) { - flag(this, 'ssfi', stack || arguments.callee); - flag(this, 'object', obj); - flag(this, 'message', msg); - } - - Object.defineProperty(Assertion, 'includeStack', { - get: function() { - console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); - return config.includeStack; - }, - set: function(value) { - console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); - config.includeStack = value; - } - }); - - Object.defineProperty(Assertion, 'showDiff', { - get: function() { - console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); - return config.showDiff; - }, - set: function(value) { - console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); - config.showDiff = value; - } - }); - - Assertion.addProperty = function (name, fn) { - util.addProperty(this.prototype, name, fn); - }; - - Assertion.addMethod = function (name, fn) { - util.addMethod(this.prototype, name, fn); - }; - - Assertion.addChainableMethod = function (name, fn, chainingBehavior) { - util.addChainableMethod(this.prototype, name, fn, chainingBehavior); - }; - - Assertion.overwriteProperty = function (name, fn) { - util.overwriteProperty(this.prototype, name, fn); - }; - - Assertion.overwriteMethod = function (name, fn) { - util.overwriteMethod(this.prototype, name, fn); - }; - - Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) { - util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior); - }; - - /** - * ### .assert(expression, message, negateMessage, expected, actual, showDiff) - * - * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. - * - * @name assert - * @param {Philosophical} expression to be tested - * @param {String|Function} message or function that returns message to display if expression fails - * @param {String|Function} negatedMessage or function that returns negatedMessage to display if negated expression fails - * @param {Mixed} expected value (remember to check for negation) - * @param {Mixed} actual (optional) will default to `this.obj` - * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails - * @api private - */ - - Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) { - var ok = util.test(this, arguments); - if (true !== showDiff) showDiff = false; - if (true !== config.showDiff) showDiff = false; - - if (!ok) { - var msg = util.getMessage(this, arguments) - , actual = util.getActual(this, arguments); - throw new AssertionError(msg, { - actual: actual - , expected: expected - , showDiff: showDiff - }, (config.includeStack) ? this.assert : flag(this, 'ssfi')); - } - }; - - /*! - * ### ._obj - * - * Quick reference to stored `actual` value for plugin developers. - * - * @api private - */ - - Object.defineProperty(Assertion.prototype, '_obj', - { get: function () { - return flag(this, 'object'); - } - , set: function (val) { - flag(this, 'object', val); - } - }); -}; - -},{"./config":4}],4:[function(require,module,exports){ -module.exports = { - - /** - * ### config.includeStack - * - * User configurable property, influences whether stack trace - * is included in Assertion error message. Default of false - * suppresses stack trace in the error message. - * - * chai.config.includeStack = true; // enable stack on error - * - * @param {Boolean} - * @api public - */ - - includeStack: false, - - /** - * ### config.showDiff - * - * User configurable property, influences whether or not - * the `showDiff` flag should be included in the thrown - * AssertionErrors. `false` will always be `false`; `true` - * will be true when the assertion has requested a diff - * be shown. - * - * @param {Boolean} - * @api public - */ - - showDiff: true, - - /** - * ### config.truncateThreshold - * - * User configurable property, sets length threshold for actual and - * expected values in assertion errors. If this threshold is exceeded, for - * example for large data structures, the value is replaced with something - * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`. - * - * Set it to zero if you want to disable truncating altogether. - * - * This is especially userful when doing assertions on arrays: having this - * set to a reasonable large value makes the failure messages readily - * inspectable. - * - * chai.config.truncateThreshold = 0; // disable truncating - * - * @param {Number} - * @api public - */ - - truncateThreshold: 40 - -}; - -},{}],5:[function(require,module,exports){ -/*! - * chai - * http://chaijs.com - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, _) { - var Assertion = chai.Assertion - , toString = Object.prototype.toString - , flag = _.flag; - - /** - * ### Language Chains - * - * The following are provided as chainable getters to - * improve the readability of your assertions. They - * do not provide testing capabilities unless they - * have been overwritten by a plugin. - * - * **Chains** - * - * - to - * - be - * - been - * - is - * - that - * - which - * - and - * - has - * - have - * - with - * - at - * - of - * - same - * - * @name language chains - * @namespace BDD - * @api public - */ - - [ 'to', 'be', 'been' - , 'is', 'and', 'has', 'have' - , 'with', 'that', 'which', 'at' - , 'of', 'same' ].forEach(function (chain) { - Assertion.addProperty(chain, function () { - return this; - }); - }); - - /** - * ### .not - * - * Negates any of assertions following in the chain. - * - * expect(foo).to.not.equal('bar'); - * expect(goodFn).to.not.throw(Error); - * expect({ foo: 'baz' }).to.have.property('foo') - * .and.not.equal('bar'); - * - * @name not - * @namespace BDD - * @api public - */ - - Assertion.addProperty('not', function () { - flag(this, 'negate', true); - }); - - /** - * ### .deep - * - * Sets the `deep` flag, later used by the `equal` and - * `property` assertions. - * - * expect(foo).to.deep.equal({ bar: 'baz' }); - * expect({ foo: { bar: { baz: 'quux' } } }) - * .to.have.deep.property('foo.bar.baz', 'quux'); - * - * `.deep.property` special characters can be escaped - * by adding two slashes before the `.` or `[]`. - * - * var deepCss = { '.link': { '[target]': 42 }}; - * expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42); - * - * @name deep - * @namespace BDD - * @api public - */ - - Assertion.addProperty('deep', function () { - flag(this, 'deep', true); - }); - - /** - * ### .any - * - * Sets the `any` flag, (opposite of the `all` flag) - * later used in the `keys` assertion. - * - * expect(foo).to.have.any.keys('bar', 'baz'); - * - * @name any - * @namespace BDD - * @api public - */ - - Assertion.addProperty('any', function () { - flag(this, 'any', true); - flag(this, 'all', false) - }); - - - /** - * ### .all - * - * Sets the `all` flag (opposite of the `any` flag) - * later used by the `keys` assertion. - * - * expect(foo).to.have.all.keys('bar', 'baz'); - * - * @name all - * @namespace BDD - * @api public - */ - - Assertion.addProperty('all', function () { - flag(this, 'all', true); - flag(this, 'any', false); - }); - - /** - * ### .a(type) - * - * The `a` and `an` assertions are aliases that can be - * used either as language chains or to assert a value's - * type. - * - * // typeof - * expect('test').to.be.a('string'); - * expect({ foo: 'bar' }).to.be.an('object'); - * expect(null).to.be.a('null'); - * expect(undefined).to.be.an('undefined'); - * expect(new Error).to.be.an('error'); - * expect(new Promise).to.be.a('promise'); - * expect(new Float32Array()).to.be.a('float32array'); - * expect(Symbol()).to.be.a('symbol'); - * - * // es6 overrides - * expect({[Symbol.toStringTag]:()=>'foo'}).to.be.a('foo'); - * - * // language chain - * expect(foo).to.be.an.instanceof(Foo); - * - * @name a - * @alias an - * @param {String} type - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function an (type, msg) { - if (msg) flag(this, 'message', msg); - type = type.toLowerCase(); - var obj = flag(this, 'object') - , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a '; - - this.assert( - type === _.type(obj) - , 'expected #{this} to be ' + article + type - , 'expected #{this} not to be ' + article + type - ); - } - - Assertion.addChainableMethod('an', an); - Assertion.addChainableMethod('a', an); - - /** - * ### .include(value) - * - * The `include` and `contain` assertions can be used as either property - * based language chains or as methods to assert the inclusion of an object - * in an array or a substring in a string. When used as language chains, - * they toggle the `contains` flag for the `keys` assertion. - * - * expect([1,2,3]).to.include(2); - * expect('foobar').to.contain('foo'); - * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo'); - * - * @name include - * @alias contain - * @alias includes - * @alias contains - * @param {Object|String|Number} obj - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function includeChainingBehavior () { - flag(this, 'contains', true); - } - - function include (val, msg) { - _.expectTypes(this, ['array', 'object', 'string']); - - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - var expected = false; - - if (_.type(obj) === 'array' && _.type(val) === 'object') { - for (var i in obj) { - if (_.eql(obj[i], val)) { - expected = true; - break; - } - } - } else if (_.type(val) === 'object') { - if (!flag(this, 'negate')) { - for (var k in val) new Assertion(obj).property(k, val[k]); - return; - } - var subset = {}; - for (var k in val) subset[k] = obj[k]; - expected = _.eql(subset, val); - } else { - expected = (obj != undefined) && ~obj.indexOf(val); - } - this.assert( - expected - , 'expected #{this} to include ' + _.inspect(val) - , 'expected #{this} to not include ' + _.inspect(val)); - } - - Assertion.addChainableMethod('include', include, includeChainingBehavior); - Assertion.addChainableMethod('contain', include, includeChainingBehavior); - Assertion.addChainableMethod('contains', include, includeChainingBehavior); - Assertion.addChainableMethod('includes', include, includeChainingBehavior); - - /** - * ### .ok - * - * Asserts that the target is truthy. - * - * expect('everything').to.be.ok; - * expect(1).to.be.ok; - * expect(false).to.not.be.ok; - * expect(undefined).to.not.be.ok; - * expect(null).to.not.be.ok; - * - * @name ok - * @namespace BDD - * @api public - */ - - Assertion.addProperty('ok', function () { - this.assert( - flag(this, 'object') - , 'expected #{this} to be truthy' - , 'expected #{this} to be falsy'); - }); - - /** - * ### .true - * - * Asserts that the target is `true`. - * - * expect(true).to.be.true; - * expect(1).to.not.be.true; - * - * @name true - * @namespace BDD - * @api public - */ - - Assertion.addProperty('true', function () { - this.assert( - true === flag(this, 'object') - , 'expected #{this} to be true' - , 'expected #{this} to be false' - , this.negate ? false : true - ); - }); - - /** - * ### .false - * - * Asserts that the target is `false`. - * - * expect(false).to.be.false; - * expect(0).to.not.be.false; - * - * @name false - * @namespace BDD - * @api public - */ - - Assertion.addProperty('false', function () { - this.assert( - false === flag(this, 'object') - , 'expected #{this} to be false' - , 'expected #{this} to be true' - , this.negate ? true : false - ); - }); - - /** - * ### .null - * - * Asserts that the target is `null`. - * - * expect(null).to.be.null; - * expect(undefined).to.not.be.null; - * - * @name null - * @namespace BDD - * @api public - */ - - Assertion.addProperty('null', function () { - this.assert( - null === flag(this, 'object') - , 'expected #{this} to be null' - , 'expected #{this} not to be null' - ); - }); - - /** - * ### .undefined - * - * Asserts that the target is `undefined`. - * - * expect(undefined).to.be.undefined; - * expect(null).to.not.be.undefined; - * - * @name undefined - * @namespace BDD - * @api public - */ - - Assertion.addProperty('undefined', function () { - this.assert( - undefined === flag(this, 'object') - , 'expected #{this} to be undefined' - , 'expected #{this} not to be undefined' - ); - }); - - /** - * ### .NaN - * Asserts that the target is `NaN`. - * - * expect('foo').to.be.NaN; - * expect(4).not.to.be.NaN; - * - * @name NaN - * @namespace BDD - * @api public - */ - - Assertion.addProperty('NaN', function () { - this.assert( - isNaN(flag(this, 'object')) - , 'expected #{this} to be NaN' - , 'expected #{this} not to be NaN' - ); - }); - - /** - * ### .exist - * - * Asserts that the target is neither `null` nor `undefined`. - * - * var foo = 'hi' - * , bar = null - * , baz; - * - * expect(foo).to.exist; - * expect(bar).to.not.exist; - * expect(baz).to.not.exist; - * - * @name exist - * @namespace BDD - * @api public - */ - - Assertion.addProperty('exist', function () { - this.assert( - null != flag(this, 'object') - , 'expected #{this} to exist' - , 'expected #{this} to not exist' - ); - }); - - - /** - * ### .empty - * - * Asserts that the target's length is `0`. For arrays and strings, it checks - * the `length` property. For objects, it gets the count of - * enumerable keys. - * - * expect([]).to.be.empty; - * expect('').to.be.empty; - * expect({}).to.be.empty; - * - * @name empty - * @namespace BDD - * @api public - */ - - Assertion.addProperty('empty', function () { - var obj = flag(this, 'object') - , expected = obj; - - if (Array.isArray(obj) || 'string' === typeof object) { - expected = obj.length; - } else if (typeof obj === 'object') { - expected = Object.keys(obj).length; - } - - this.assert( - !expected - , 'expected #{this} to be empty' - , 'expected #{this} not to be empty' - ); - }); - - /** - * ### .arguments - * - * Asserts that the target is an arguments object. - * - * function test () { - * expect(arguments).to.be.arguments; - * } - * - * @name arguments - * @alias Arguments - * @namespace BDD - * @api public - */ - - function checkArguments () { - var obj = flag(this, 'object') - , type = Object.prototype.toString.call(obj); - this.assert( - '[object Arguments]' === type - , 'expected #{this} to be arguments but got ' + type - , 'expected #{this} to not be arguments' - ); - } - - Assertion.addProperty('arguments', checkArguments); - Assertion.addProperty('Arguments', checkArguments); - - /** - * ### .equal(value) - * - * Asserts that the target is strictly equal (`===`) to `value`. - * Alternately, if the `deep` flag is set, asserts that - * the target is deeply equal to `value`. - * - * expect('hello').to.equal('hello'); - * expect(42).to.equal(42); - * expect(1).to.not.equal(true); - * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' }); - * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' }); - * - * @name equal - * @alias equals - * @alias eq - * @alias deep.equal - * @param {Mixed} value - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertEqual (val, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'deep')) { - return this.eql(val); - } else { - this.assert( - val === obj - , 'expected #{this} to equal #{exp}' - , 'expected #{this} to not equal #{exp}' - , val - , this._obj - , true - ); - } - } - - Assertion.addMethod('equal', assertEqual); - Assertion.addMethod('equals', assertEqual); - Assertion.addMethod('eq', assertEqual); - - /** - * ### .eql(value) - * - * Asserts that the target is deeply equal to `value`. - * - * expect({ foo: 'bar' }).to.eql({ foo: 'bar' }); - * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]); - * - * @name eql - * @alias eqls - * @param {Mixed} value - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertEql(obj, msg) { - if (msg) flag(this, 'message', msg); - this.assert( - _.eql(obj, flag(this, 'object')) - , 'expected #{this} to deeply equal #{exp}' - , 'expected #{this} to not deeply equal #{exp}' - , obj - , this._obj - , true - ); - } - - Assertion.addMethod('eql', assertEql); - Assertion.addMethod('eqls', assertEql); - - /** - * ### .above(value) - * - * Asserts that the target is greater than `value`. - * - * expect(10).to.be.above(5); - * - * Can also be used in conjunction with `length` to - * assert a minimum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.above(2); - * expect([ 1, 2, 3 ]).to.have.length.above(2); - * - * @name above - * @alias gt - * @alias greaterThan - * @param {Number} value - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertAbove (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len > n - , 'expected #{this} to have a length above #{exp} but got #{act}' - , 'expected #{this} to not have a length above #{exp}' - , n - , len - ); - } else { - this.assert( - obj > n - , 'expected #{this} to be above ' + n - , 'expected #{this} to be at most ' + n - ); - } - } - - Assertion.addMethod('above', assertAbove); - Assertion.addMethod('gt', assertAbove); - Assertion.addMethod('greaterThan', assertAbove); - - /** - * ### .least(value) - * - * Asserts that the target is greater than or equal to `value`. - * - * expect(10).to.be.at.least(10); - * - * Can also be used in conjunction with `length` to - * assert a minimum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.of.at.least(2); - * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3); - * - * @name least - * @alias gte - * @param {Number} value - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertLeast (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len >= n - , 'expected #{this} to have a length at least #{exp} but got #{act}' - , 'expected #{this} to have a length below #{exp}' - , n - , len - ); - } else { - this.assert( - obj >= n - , 'expected #{this} to be at least ' + n - , 'expected #{this} to be below ' + n - ); - } - } - - Assertion.addMethod('least', assertLeast); - Assertion.addMethod('gte', assertLeast); - - /** - * ### .below(value) - * - * Asserts that the target is less than `value`. - * - * expect(5).to.be.below(10); - * - * Can also be used in conjunction with `length` to - * assert a maximum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.below(4); - * expect([ 1, 2, 3 ]).to.have.length.below(4); - * - * @name below - * @alias lt - * @alias lessThan - * @param {Number} value - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertBelow (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len < n - , 'expected #{this} to have a length below #{exp} but got #{act}' - , 'expected #{this} to not have a length below #{exp}' - , n - , len - ); - } else { - this.assert( - obj < n - , 'expected #{this} to be below ' + n - , 'expected #{this} to be at least ' + n - ); - } - } - - Assertion.addMethod('below', assertBelow); - Assertion.addMethod('lt', assertBelow); - Assertion.addMethod('lessThan', assertBelow); - - /** - * ### .most(value) - * - * Asserts that the target is less than or equal to `value`. - * - * expect(5).to.be.at.most(5); - * - * Can also be used in conjunction with `length` to - * assert a maximum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.of.at.most(4); - * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3); - * - * @name most - * @alias lte - * @param {Number} value - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertMost (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len <= n - , 'expected #{this} to have a length at most #{exp} but got #{act}' - , 'expected #{this} to have a length above #{exp}' - , n - , len - ); - } else { - this.assert( - obj <= n - , 'expected #{this} to be at most ' + n - , 'expected #{this} to be above ' + n - ); - } - } - - Assertion.addMethod('most', assertMost); - Assertion.addMethod('lte', assertMost); - - /** - * ### .within(start, finish) - * - * Asserts that the target is within a range. - * - * expect(7).to.be.within(5,10); - * - * Can also be used in conjunction with `length` to - * assert a length range. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.within(2,4); - * expect([ 1, 2, 3 ]).to.have.length.within(2,4); - * - * @name within - * @param {Number} start lowerbound inclusive - * @param {Number} finish upperbound inclusive - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - Assertion.addMethod('within', function (start, finish, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object') - , range = start + '..' + finish; - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len >= start && len <= finish - , 'expected #{this} to have a length within ' + range - , 'expected #{this} to not have a length within ' + range - ); - } else { - this.assert( - obj >= start && obj <= finish - , 'expected #{this} to be within ' + range - , 'expected #{this} to not be within ' + range - ); - } - }); - - /** - * ### .instanceof(constructor) - * - * Asserts that the target is an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , Chai = new Tea('chai'); - * - * expect(Chai).to.be.an.instanceof(Tea); - * expect([ 1, 2, 3 ]).to.be.instanceof(Array); - * - * @name instanceof - * @param {Constructor} constructor - * @param {String} message _optional_ - * @alias instanceOf - * @namespace BDD - * @api public - */ - - function assertInstanceOf (constructor, msg) { - if (msg) flag(this, 'message', msg); - var name = _.getName(constructor); - this.assert( - flag(this, 'object') instanceof constructor - , 'expected #{this} to be an instance of ' + name - , 'expected #{this} to not be an instance of ' + name - ); - }; - - Assertion.addMethod('instanceof', assertInstanceOf); - Assertion.addMethod('instanceOf', assertInstanceOf); - - /** - * ### .property(name, [value]) - * - * Asserts that the target has a property `name`, optionally asserting that - * the value of that property is strictly equal to `value`. - * If the `deep` flag is set, you can use dot- and bracket-notation for deep - * references into objects and arrays. - * - * // simple referencing - * var obj = { foo: 'bar' }; - * expect(obj).to.have.property('foo'); - * expect(obj).to.have.property('foo', 'bar'); - * - * // deep referencing - * var deepObj = { - * green: { tea: 'matcha' } - * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ] - * }; - * - * expect(deepObj).to.have.deep.property('green.tea', 'matcha'); - * expect(deepObj).to.have.deep.property('teas[1]', 'matcha'); - * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha'); - * - * You can also use an array as the starting point of a `deep.property` - * assertion, or traverse nested arrays. - * - * var arr = [ - * [ 'chai', 'matcha', 'konacha' ] - * , [ { tea: 'chai' } - * , { tea: 'matcha' } - * , { tea: 'konacha' } ] - * ]; - * - * expect(arr).to.have.deep.property('[0][1]', 'matcha'); - * expect(arr).to.have.deep.property('[1][2].tea', 'konacha'); - * - * Furthermore, `property` changes the subject of the assertion - * to be the value of that property from the original object. This - * permits for further chainable assertions on that property. - * - * expect(obj).to.have.property('foo') - * .that.is.a('string'); - * expect(deepObj).to.have.property('green') - * .that.is.an('object') - * .that.deep.equals({ tea: 'matcha' }); - * expect(deepObj).to.have.property('teas') - * .that.is.an('array') - * .with.deep.property('[2]') - * .that.deep.equals({ tea: 'konacha' }); - * - * Note that dots and bracket in `name` must be backslash-escaped when - * the `deep` flag is set, while they must NOT be escaped when the `deep` - * flag is not set. - * - * // simple referencing - * var css = { '.link[target]': 42 }; - * expect(css).to.have.property('.link[target]', 42); - * - * // deep referencing - * var deepCss = { '.link': { '[target]': 42 }}; - * expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42); - * - * @name property - * @alias deep.property - * @param {String} name - * @param {Mixed} value (optional) - * @param {String} message _optional_ - * @returns value of property for chaining - * @namespace BDD - * @api public - */ - - Assertion.addMethod('property', function (name, val, msg) { - if (msg) flag(this, 'message', msg); - - var isDeep = !!flag(this, 'deep') - , descriptor = isDeep ? 'deep property ' : 'property ' - , negate = flag(this, 'negate') - , obj = flag(this, 'object') - , pathInfo = isDeep ? _.getPathInfo(name, obj) : null - , hasProperty = isDeep - ? pathInfo.exists - : _.hasProperty(name, obj) - , value = isDeep - ? pathInfo.value - : obj[name]; - - if (negate && arguments.length > 1) { - if (undefined === value) { - msg = (msg != null) ? msg + ': ' : ''; - throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name)); - } - } else { - this.assert( - hasProperty - , 'expected #{this} to have a ' + descriptor + _.inspect(name) - , 'expected #{this} to not have ' + descriptor + _.inspect(name)); - } - - if (arguments.length > 1) { - this.assert( - val === value - , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}' - , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}' - , val - , value - ); - } - - flag(this, 'object', value); - }); - - - /** - * ### .ownProperty(name) - * - * Asserts that the target has an own property `name`. - * - * expect('test').to.have.ownProperty('length'); - * - * @name ownProperty - * @alias haveOwnProperty - * @param {String} name - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertOwnProperty (name, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - obj.hasOwnProperty(name) - , 'expected #{this} to have own property ' + _.inspect(name) - , 'expected #{this} to not have own property ' + _.inspect(name) - ); - } - - Assertion.addMethod('ownProperty', assertOwnProperty); - Assertion.addMethod('haveOwnProperty', assertOwnProperty); - - /** - * ### .ownPropertyDescriptor(name[, descriptor[, message]]) - * - * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`. - * - * expect('test').to.have.ownPropertyDescriptor('length'); - * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 }); - * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 }); - * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false); - * expect('test').ownPropertyDescriptor('length').to.have.keys('value'); - * - * @name ownPropertyDescriptor - * @alias haveOwnPropertyDescriptor - * @param {String} name - * @param {Object} descriptor _optional_ - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertOwnPropertyDescriptor (name, descriptor, msg) { - if (typeof descriptor === 'string') { - msg = descriptor; - descriptor = null; - } - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name); - if (actualDescriptor && descriptor) { - this.assert( - _.eql(descriptor, actualDescriptor) - , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor) - , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor) - , descriptor - , actualDescriptor - , true - ); - } else { - this.assert( - actualDescriptor - , 'expected #{this} to have an own property descriptor for ' + _.inspect(name) - , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name) - ); - } - flag(this, 'object', actualDescriptor); - } - - Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor); - Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor); - - /** - * ### .length - * - * Sets the `doLength` flag later used as a chain precursor to a value - * comparison for the `length` property. - * - * expect('foo').to.have.length.above(2); - * expect([ 1, 2, 3 ]).to.have.length.above(2); - * expect('foo').to.have.length.below(4); - * expect([ 1, 2, 3 ]).to.have.length.below(4); - * expect('foo').to.have.length.within(2,4); - * expect([ 1, 2, 3 ]).to.have.length.within(2,4); - * - * *Deprecation notice:* Using `length` as an assertion will be deprecated - * in version 2.4.0 and removed in 3.0.0. Code using the old style of - * asserting for `length` property value using `length(value)` should be - * switched to use `lengthOf(value)` instead. - * - * @name length - * @namespace BDD - * @api public - */ - - /** - * ### .lengthOf(value[, message]) - * - * Asserts that the target's `length` property has - * the expected value. - * - * expect([ 1, 2, 3]).to.have.lengthOf(3); - * expect('foobar').to.have.lengthOf(6); - * - * @name lengthOf - * @param {Number} length - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertLengthChain () { - flag(this, 'doLength', true); - } - - function assertLength (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - - this.assert( - len == n - , 'expected #{this} to have a length of #{exp} but got #{act}' - , 'expected #{this} to not have a length of #{act}' - , n - , len - ); - } - - Assertion.addChainableMethod('length', assertLength, assertLengthChain); - Assertion.addMethod('lengthOf', assertLength); - - /** - * ### .match(regexp) - * - * Asserts that the target matches a regular expression. - * - * expect('foobar').to.match(/^foo/); - * - * @name match - * @alias matches - * @param {RegExp} RegularExpression - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - function assertMatch(re, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - re.exec(obj) - , 'expected #{this} to match ' + re - , 'expected #{this} not to match ' + re - ); - } - - Assertion.addMethod('match', assertMatch); - Assertion.addMethod('matches', assertMatch); - - /** - * ### .string(string) - * - * Asserts that the string target contains another string. - * - * expect('foobar').to.have.string('bar'); - * - * @name string - * @param {String} string - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - Assertion.addMethod('string', function (str, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).is.a('string'); - - this.assert( - ~obj.indexOf(str) - , 'expected #{this} to contain ' + _.inspect(str) - , 'expected #{this} to not contain ' + _.inspect(str) - ); - }); - - - /** - * ### .keys(key1, [key2], [...]) - * - * Asserts that the target contains any or all of the passed-in keys. - * Use in combination with `any`, `all`, `contains`, or `have` will affect - * what will pass. - * - * When used in conjunction with `any`, at least one key that is passed - * in must exist in the target object. This is regardless whether or not - * the `have` or `contain` qualifiers are used. Note, either `any` or `all` - * should be used in the assertion. If neither are used, the assertion is - * defaulted to `all`. - * - * When both `all` and `contain` are used, the target object must have at - * least all of the passed-in keys but may have more keys not listed. - * - * When both `all` and `have` are used, the target object must both contain - * all of the passed-in keys AND the number of keys in the target object must - * match the number of keys passed in (in other words, a target object must - * have all and only all of the passed-in keys). - * - * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz'); - * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo'); - * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz'); - * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']); - * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6}); - * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']); - * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7}); - * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']); - * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({'bar': 6}); - * - * - * @name keys - * @alias key - * @param {...String|Array|Object} keys - * @namespace BDD - * @api public - */ - - function assertKeys (keys) { - var obj = flag(this, 'object') - , str - , ok = true - , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments'; - - switch (_.type(keys)) { - case "array": - if (arguments.length > 1) throw (new Error(mixedArgsMsg)); - break; - case "object": - if (arguments.length > 1) throw (new Error(mixedArgsMsg)); - keys = Object.keys(keys); - break; - default: - keys = Array.prototype.slice.call(arguments); - } - - if (!keys.length) throw new Error('keys required'); - - var actual = Object.keys(obj) - , expected = keys - , len = keys.length - , any = flag(this, 'any') - , all = flag(this, 'all'); - - if (!any && !all) { - all = true; - } - - // Has any - if (any) { - var intersection = expected.filter(function(key) { - return ~actual.indexOf(key); - }); - ok = intersection.length > 0; - } - - // Has all - if (all) { - ok = keys.every(function(key){ - return ~actual.indexOf(key); - }); - if (!flag(this, 'negate') && !flag(this, 'contains')) { - ok = ok && keys.length == actual.length; - } - } - - // Key string - if (len > 1) { - keys = keys.map(function(key){ - return _.inspect(key); - }); - var last = keys.pop(); - if (all) { - str = keys.join(', ') + ', and ' + last; - } - if (any) { - str = keys.join(', ') + ', or ' + last; - } - } else { - str = _.inspect(keys[0]); - } - - // Form - str = (len > 1 ? 'keys ' : 'key ') + str; - - // Have / include - str = (flag(this, 'contains') ? 'contain ' : 'have ') + str; - - // Assertion - this.assert( - ok - , 'expected #{this} to ' + str - , 'expected #{this} to not ' + str - , expected.slice(0).sort() - , actual.sort() - , true - ); - } - - Assertion.addMethod('keys', assertKeys); - Assertion.addMethod('key', assertKeys); - - /** - * ### .throw(constructor) - * - * Asserts that the function target will throw a specific error, or specific type of error - * (as determined using `instanceof`), optionally with a RegExp or string inclusion test - * for the error's message. - * - * var err = new ReferenceError('This is a bad function.'); - * var fn = function () { throw err; } - * expect(fn).to.throw(ReferenceError); - * expect(fn).to.throw(Error); - * expect(fn).to.throw(/bad function/); - * expect(fn).to.not.throw('good function'); - * expect(fn).to.throw(ReferenceError, /bad function/); - * expect(fn).to.throw(err); - * - * Please note that when a throw expectation is negated, it will check each - * parameter independently, starting with error constructor type. The appropriate way - * to check for the existence of a type of error but for a message that does not match - * is to use `and`. - * - * expect(fn).to.throw(ReferenceError) - * .and.not.throw(/good function/); - * - * @name throw - * @alias throws - * @alias Throw - * @param {ErrorConstructor} constructor - * @param {String|RegExp} expected error message - * @param {String} message _optional_ - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @returns error for chaining (null if no error) - * @namespace BDD - * @api public - */ - - function assertThrows (constructor, errMsg, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).is.a('function'); - - var thrown = false - , desiredError = null - , name = null - , thrownError = null; - - if (arguments.length === 0) { - errMsg = null; - constructor = null; - } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) { - errMsg = constructor; - constructor = null; - } else if (constructor && constructor instanceof Error) { - desiredError = constructor; - constructor = null; - errMsg = null; - } else if (typeof constructor === 'function') { - name = constructor.prototype.name; - if (!name || (name === 'Error' && constructor !== Error)) { - name = constructor.name || (new constructor()).name; - } - } else { - constructor = null; - } - - try { - obj(); - } catch (err) { - // first, check desired error - if (desiredError) { - this.assert( - err === desiredError - , 'expected #{this} to throw #{exp} but #{act} was thrown' - , 'expected #{this} to not throw #{exp}' - , (desiredError instanceof Error ? desiredError.toString() : desiredError) - , (err instanceof Error ? err.toString() : err) - ); - - flag(this, 'object', err); - return this; - } - - // next, check constructor - if (constructor) { - this.assert( - err instanceof constructor - , 'expected #{this} to throw #{exp} but #{act} was thrown' - , 'expected #{this} to not throw #{exp} but #{act} was thrown' - , name - , (err instanceof Error ? err.toString() : err) - ); - - if (!errMsg) { - flag(this, 'object', err); - return this; - } - } - - // next, check message - var message = 'error' === _.type(err) && "message" in err - ? err.message - : '' + err; - - if ((message != null) && errMsg && errMsg instanceof RegExp) { - this.assert( - errMsg.exec(message) - , 'expected #{this} to throw error matching #{exp} but got #{act}' - , 'expected #{this} to throw error not matching #{exp}' - , errMsg - , message - ); - - flag(this, 'object', err); - return this; - } else if ((message != null) && errMsg && 'string' === typeof errMsg) { - this.assert( - ~message.indexOf(errMsg) - , 'expected #{this} to throw error including #{exp} but got #{act}' - , 'expected #{this} to throw error not including #{act}' - , errMsg - , message - ); - - flag(this, 'object', err); - return this; - } else { - thrown = true; - thrownError = err; - } - } - - var actuallyGot = '' - , expectedThrown = name !== null - ? name - : desiredError - ? '#{exp}' //_.inspect(desiredError) - : 'an error'; - - if (thrown) { - actuallyGot = ' but #{act} was thrown' - } - - this.assert( - thrown === true - , 'expected #{this} to throw ' + expectedThrown + actuallyGot - , 'expected #{this} to not throw ' + expectedThrown + actuallyGot - , (desiredError instanceof Error ? desiredError.toString() : desiredError) - , (thrownError instanceof Error ? thrownError.toString() : thrownError) - ); - - flag(this, 'object', thrownError); - }; - - Assertion.addMethod('throw', assertThrows); - Assertion.addMethod('throws', assertThrows); - Assertion.addMethod('Throw', assertThrows); - - /** - * ### .respondTo(method) - * - * Asserts that the object or class target will respond to a method. - * - * Klass.prototype.bar = function(){}; - * expect(Klass).to.respondTo('bar'); - * expect(obj).to.respondTo('bar'); - * - * To check if a constructor will respond to a static function, - * set the `itself` flag. - * - * Klass.baz = function(){}; - * expect(Klass).itself.to.respondTo('baz'); - * - * @name respondTo - * @alias respondsTo - * @param {String} method - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function respondTo (method, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object') - , itself = flag(this, 'itself') - , context = ('function' === _.type(obj) && !itself) - ? obj.prototype[method] - : obj[method]; - - this.assert( - 'function' === typeof context - , 'expected #{this} to respond to ' + _.inspect(method) - , 'expected #{this} to not respond to ' + _.inspect(method) - ); - } - - Assertion.addMethod('respondTo', respondTo); - Assertion.addMethod('respondsTo', respondTo); - - /** - * ### .itself - * - * Sets the `itself` flag, later used by the `respondTo` assertion. - * - * function Foo() {} - * Foo.bar = function() {} - * Foo.prototype.baz = function() {} - * - * expect(Foo).itself.to.respondTo('bar'); - * expect(Foo).itself.not.to.respondTo('baz'); - * - * @name itself - * @namespace BDD - * @api public - */ - - Assertion.addProperty('itself', function () { - flag(this, 'itself', true); - }); - - /** - * ### .satisfy(method) - * - * Asserts that the target passes a given truth test. - * - * expect(1).to.satisfy(function(num) { return num > 0; }); - * - * @name satisfy - * @alias satisfies - * @param {Function} matcher - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function satisfy (matcher, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - var result = matcher(obj); - this.assert( - result - , 'expected #{this} to satisfy ' + _.objDisplay(matcher) - , 'expected #{this} to not satisfy' + _.objDisplay(matcher) - , this.negate ? false : true - , result - ); - } - - Assertion.addMethod('satisfy', satisfy); - Assertion.addMethod('satisfies', satisfy); - - /** - * ### .closeTo(expected, delta) - * - * Asserts that the target is equal `expected`, to within a +/- `delta` range. - * - * expect(1.5).to.be.closeTo(1, 0.5); - * - * @name closeTo - * @alias approximately - * @param {Number} expected - * @param {Number} delta - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function closeTo(expected, delta, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - - new Assertion(obj, msg).is.a('number'); - if (_.type(expected) !== 'number' || _.type(delta) !== 'number') { - throw new Error('the arguments to closeTo or approximately must be numbers'); - } - - this.assert( - Math.abs(obj - expected) <= delta - , 'expected #{this} to be close to ' + expected + ' +/- ' + delta - , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta - ); - } - - Assertion.addMethod('closeTo', closeTo); - Assertion.addMethod('approximately', closeTo); - - function isSubsetOf(subset, superset, cmp) { - return subset.every(function(elem) { - if (!cmp) return superset.indexOf(elem) !== -1; - - return superset.some(function(elem2) { - return cmp(elem, elem2); - }); - }) - } - - /** - * ### .members(set) - * - * Asserts that the target is a superset of `set`, - * or that the target and `set` have the same strictly-equal (===) members. - * Alternately, if the `deep` flag is set, set members are compared for deep - * equality. - * - * expect([1, 2, 3]).to.include.members([3, 2]); - * expect([1, 2, 3]).to.not.include.members([3, 2, 8]); - * - * expect([4, 2]).to.have.members([2, 4]); - * expect([5, 2]).to.not.have.members([5, 2, 1]); - * - * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]); - * - * @name members - * @param {Array} set - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - Assertion.addMethod('members', function (subset, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - - new Assertion(obj).to.be.an('array'); - new Assertion(subset).to.be.an('array'); - - var cmp = flag(this, 'deep') ? _.eql : undefined; - - if (flag(this, 'contains')) { - return this.assert( - isSubsetOf(subset, obj, cmp) - , 'expected #{this} to be a superset of #{act}' - , 'expected #{this} to not be a superset of #{act}' - , obj - , subset - ); - } - - this.assert( - isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp) - , 'expected #{this} to have the same members as #{act}' - , 'expected #{this} to not have the same members as #{act}' - , obj - , subset - ); - }); - - /** - * ### .oneOf(list) - * - * Assert that a value appears somewhere in the top level of array `list`. - * - * expect('a').to.be.oneOf(['a', 'b', 'c']); - * expect(9).to.not.be.oneOf(['z']); - * expect([3]).to.not.be.oneOf([1, 2, [3]]); - * - * var three = [3]; - * // for object-types, contents are not compared - * expect(three).to.not.be.oneOf([1, 2, [3]]); - * // comparing references works - * expect(three).to.be.oneOf([1, 2, three]); - * - * @name oneOf - * @param {Array<*>} list - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function oneOf (list, msg) { - if (msg) flag(this, 'message', msg); - var expected = flag(this, 'object'); - new Assertion(list).to.be.an('array'); - - this.assert( - list.indexOf(expected) > -1 - , 'expected #{this} to be one of #{exp}' - , 'expected #{this} to not be one of #{exp}' - , list - , expected - ); - } - - Assertion.addMethod('oneOf', oneOf); - - - /** - * ### .change(function) - * - * Asserts that a function changes an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val += 3 }; - * var noChangeFn = function() { return 'foo' + 'bar'; } - * expect(fn).to.change(obj, 'val'); - * expect(noChangeFn).to.not.change(obj, 'val') - * - * @name change - * @alias changes - * @alias Change - * @param {String} object - * @param {String} property name - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertChanges (object, prop, msg) { - if (msg) flag(this, 'message', msg); - var fn = flag(this, 'object'); - new Assertion(object, msg).to.have.property(prop); - new Assertion(fn).is.a('function'); - - var initial = object[prop]; - fn(); - - this.assert( - initial !== object[prop] - , 'expected .' + prop + ' to change' - , 'expected .' + prop + ' to not change' - ); - } - - Assertion.addChainableMethod('change', assertChanges); - Assertion.addChainableMethod('changes', assertChanges); - - /** - * ### .increase(function) - * - * Asserts that a function increases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 15 }; - * expect(fn).to.increase(obj, 'val'); - * - * @name increase - * @alias increases - * @alias Increase - * @param {String} object - * @param {String} property name - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertIncreases (object, prop, msg) { - if (msg) flag(this, 'message', msg); - var fn = flag(this, 'object'); - new Assertion(object, msg).to.have.property(prop); - new Assertion(fn).is.a('function'); - - var initial = object[prop]; - fn(); - - this.assert( - object[prop] - initial > 0 - , 'expected .' + prop + ' to increase' - , 'expected .' + prop + ' to not increase' - ); - } - - Assertion.addChainableMethod('increase', assertIncreases); - Assertion.addChainableMethod('increases', assertIncreases); - - /** - * ### .decrease(function) - * - * Asserts that a function decreases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 5 }; - * expect(fn).to.decrease(obj, 'val'); - * - * @name decrease - * @alias decreases - * @alias Decrease - * @param {String} object - * @param {String} property name - * @param {String} message _optional_ - * @namespace BDD - * @api public - */ - - function assertDecreases (object, prop, msg) { - if (msg) flag(this, 'message', msg); - var fn = flag(this, 'object'); - new Assertion(object, msg).to.have.property(prop); - new Assertion(fn).is.a('function'); - - var initial = object[prop]; - fn(); - - this.assert( - object[prop] - initial < 0 - , 'expected .' + prop + ' to decrease' - , 'expected .' + prop + ' to not decrease' - ); - } - - Assertion.addChainableMethod('decrease', assertDecreases); - Assertion.addChainableMethod('decreases', assertDecreases); - - /** - * ### .extensible - * - * Asserts that the target is extensible (can have new properties added to - * it). - * - * var nonExtensibleObject = Object.preventExtensions({}); - * var sealedObject = Object.seal({}); - * var frozenObject = Object.freeze({}); - * - * expect({}).to.be.extensible; - * expect(nonExtensibleObject).to.not.be.extensible; - * expect(sealedObject).to.not.be.extensible; - * expect(frozenObject).to.not.be.extensible; - * - * @name extensible - * @namespace BDD - * @api public - */ - - Assertion.addProperty('extensible', function() { - var obj = flag(this, 'object'); - - // In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError. - // In ES6, a non-object argument will be treated as if it was a non-extensible ordinary object, simply return false. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible - // The following provides ES6 behavior when a TypeError is thrown under ES5. - - var isExtensible; - - try { - isExtensible = Object.isExtensible(obj); - } catch (err) { - if (err instanceof TypeError) isExtensible = false; - else throw err; - } - - this.assert( - isExtensible - , 'expected #{this} to be extensible' - , 'expected #{this} to not be extensible' - ); - }); - - /** - * ### .sealed - * - * Asserts that the target is sealed (cannot have new properties added to it - * and its existing properties cannot be removed). - * - * var sealedObject = Object.seal({}); - * var frozenObject = Object.freeze({}); - * - * expect(sealedObject).to.be.sealed; - * expect(frozenObject).to.be.sealed; - * expect({}).to.not.be.sealed; - * - * @name sealed - * @namespace BDD - * @api public - */ - - Assertion.addProperty('sealed', function() { - var obj = flag(this, 'object'); - - // In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError. - // In ES6, a non-object argument will be treated as if it was a sealed ordinary object, simply return true. - // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed - // The following provides ES6 behavior when a TypeError is thrown under ES5. - - var isSealed; - - try { - isSealed = Object.isSealed(obj); - } catch (err) { - if (err instanceof TypeError) isSealed = true; - else throw err; - } - - this.assert( - isSealed - , 'expected #{this} to be sealed' - , 'expected #{this} to not be sealed' - ); - }); - - /** - * ### .frozen - * - * Asserts that the target is frozen (cannot have new properties added to it - * and its existing properties cannot be modified). - * - * var frozenObject = Object.freeze({}); - * - * expect(frozenObject).to.be.frozen; - * expect({}).to.not.be.frozen; - * - * @name frozen - * @namespace BDD - * @api public - */ - - Assertion.addProperty('frozen', function() { - var obj = flag(this, 'object'); - - // In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError. - // In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return true. - // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen - // The following provides ES6 behavior when a TypeError is thrown under ES5. - - var isFrozen; - - try { - isFrozen = Object.isFrozen(obj); - } catch (err) { - if (err instanceof TypeError) isFrozen = true; - else throw err; - } - - this.assert( - isFrozen - , 'expected #{this} to be frozen' - , 'expected #{this} to not be frozen' - ); - }); -}; - -},{}],6:[function(require,module,exports){ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - - -module.exports = function (chai, util) { - - /*! - * Chai dependencies. - */ - - var Assertion = chai.Assertion - , flag = util.flag; - - /*! - * Module export. - */ - - /** - * ### assert(expression, message) - * - * Write your own test expressions. - * - * assert('foo' !== 'bar', 'foo is not bar'); - * assert(Array.isArray([]), 'empty arrays are arrays'); - * - * @param {Mixed} expression to test for truthiness - * @param {String} message to display on error - * @name assert - * @namespace Assert - * @api public - */ - - var assert = chai.assert = function (express, errmsg) { - var test = new Assertion(null, null, chai.assert); - test.assert( - express - , errmsg - , '[ negation message unavailable ]' - ); - }; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. Node.js `assert` module-compatible. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @namespace Assert - * @api public - */ - - assert.fail = function (actual, expected, message, operator) { - message = message || 'assert.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, assert.fail); - }; - - /** - * ### .isOk(object, [message]) - * - * Asserts that `object` is truthy. - * - * assert.isOk('everything', 'everything is ok'); - * assert.isOk(false, 'this will fail'); - * - * @name isOk - * @alias ok - * @param {Mixed} object to test - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isOk = function (val, msg) { - new Assertion(val, msg).is.ok; - }; - - /** - * ### .isNotOk(object, [message]) - * - * Asserts that `object` is falsy. - * - * assert.isNotOk('everything', 'this will fail'); - * assert.isNotOk(false, 'this will pass'); - * - * @name isNotOk - * @alias notOk - * @param {Mixed} object to test - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotOk = function (val, msg) { - new Assertion(val, msg).is.not.ok; - }; - - /** - * ### .equal(actual, expected, [message]) - * - * Asserts non-strict equality (`==`) of `actual` and `expected`. - * - * assert.equal(3, '3', '== coerces values to strings'); - * - * @name equal - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.equal = function (act, exp, msg) { - var test = new Assertion(act, msg, assert.equal); - - test.assert( - exp == flag(test, 'object') - , 'expected #{this} to equal #{exp}' - , 'expected #{this} to not equal #{act}' - , exp - , act - ); - }; - - /** - * ### .notEqual(actual, expected, [message]) - * - * Asserts non-strict inequality (`!=`) of `actual` and `expected`. - * - * assert.notEqual(3, 4, 'these numbers are not equal'); - * - * @name notEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.notEqual = function (act, exp, msg) { - var test = new Assertion(act, msg, assert.notEqual); - - test.assert( - exp != flag(test, 'object') - , 'expected #{this} to not equal #{exp}' - , 'expected #{this} to equal #{act}' - , exp - , act - ); - }; - - /** - * ### .strictEqual(actual, expected, [message]) - * - * Asserts strict equality (`===`) of `actual` and `expected`. - * - * assert.strictEqual(true, true, 'these booleans are strictly equal'); - * - * @name strictEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.strictEqual = function (act, exp, msg) { - new Assertion(act, msg).to.equal(exp); - }; - - /** - * ### .notStrictEqual(actual, expected, [message]) - * - * Asserts strict inequality (`!==`) of `actual` and `expected`. - * - * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); - * - * @name notStrictEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.notStrictEqual = function (act, exp, msg) { - new Assertion(act, msg).to.not.equal(exp); - }; - - /** - * ### .deepEqual(actual, expected, [message]) - * - * Asserts that `actual` is deeply equal to `expected`. - * - * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); - * - * @name deepEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.deepEqual = function (act, exp, msg) { - new Assertion(act, msg).to.eql(exp); - }; - - /** - * ### .notDeepEqual(actual, expected, [message]) - * - * Assert that `actual` is not deeply equal to `expected`. - * - * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); - * - * @name notDeepEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.notDeepEqual = function (act, exp, msg) { - new Assertion(act, msg).to.not.eql(exp); - }; - - /** - * ### .isAbove(valueToCheck, valueToBeAbove, [message]) - * - * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove` - * - * assert.isAbove(5, 2, '5 is strictly greater than 2'); - * - * @name isAbove - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeAbove - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isAbove = function (val, abv, msg) { - new Assertion(val, msg).to.be.above(abv); - }; - - /** - * ### .isAtLeast(valueToCheck, valueToBeAtLeast, [message]) - * - * Asserts `valueToCheck` is greater than or equal to (>=) `valueToBeAtLeast` - * - * assert.isAtLeast(5, 2, '5 is greater or equal to 2'); - * assert.isAtLeast(3, 3, '3 is greater or equal to 3'); - * - * @name isAtLeast - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeAtLeast - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isAtLeast = function (val, atlst, msg) { - new Assertion(val, msg).to.be.least(atlst); - }; - - /** - * ### .isBelow(valueToCheck, valueToBeBelow, [message]) - * - * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow` - * - * assert.isBelow(3, 6, '3 is strictly less than 6'); - * - * @name isBelow - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeBelow - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isBelow = function (val, blw, msg) { - new Assertion(val, msg).to.be.below(blw); - }; - - /** - * ### .isAtMost(valueToCheck, valueToBeAtMost, [message]) - * - * Asserts `valueToCheck` is less than or equal to (<=) `valueToBeAtMost` - * - * assert.isAtMost(3, 6, '3 is less than or equal to 6'); - * assert.isAtMost(4, 4, '4 is less than or equal to 4'); - * - * @name isAtMost - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeAtMost - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isAtMost = function (val, atmst, msg) { - new Assertion(val, msg).to.be.most(atmst); - }; - - /** - * ### .isTrue(value, [message]) - * - * Asserts that `value` is true. - * - * var teaServed = true; - * assert.isTrue(teaServed, 'the tea has been served'); - * - * @name isTrue - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isTrue = function (val, msg) { - new Assertion(val, msg).is['true']; - }; - - /** - * ### .isNotTrue(value, [message]) - * - * Asserts that `value` is not true. - * - * var tea = 'tasty chai'; - * assert.isNotTrue(tea, 'great, time for tea!'); - * - * @name isNotTrue - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotTrue = function (val, msg) { - new Assertion(val, msg).to.not.equal(true); - }; - - /** - * ### .isFalse(value, [message]) - * - * Asserts that `value` is false. - * - * var teaServed = false; - * assert.isFalse(teaServed, 'no tea yet? hmm...'); - * - * @name isFalse - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isFalse = function (val, msg) { - new Assertion(val, msg).is['false']; - }; - - /** - * ### .isNotFalse(value, [message]) - * - * Asserts that `value` is not false. - * - * var tea = 'tasty chai'; - * assert.isNotFalse(tea, 'great, time for tea!'); - * - * @name isNotFalse - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotFalse = function (val, msg) { - new Assertion(val, msg).to.not.equal(false); - }; - - /** - * ### .isNull(value, [message]) - * - * Asserts that `value` is null. - * - * assert.isNull(err, 'there was no error'); - * - * @name isNull - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNull = function (val, msg) { - new Assertion(val, msg).to.equal(null); - }; - - /** - * ### .isNotNull(value, [message]) - * - * Asserts that `value` is not null. - * - * var tea = 'tasty chai'; - * assert.isNotNull(tea, 'great, time for tea!'); - * - * @name isNotNull - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotNull = function (val, msg) { - new Assertion(val, msg).to.not.equal(null); - }; - - /** - * ### .isNaN - * Asserts that value is NaN - * - * assert.isNaN('foo', 'foo is NaN'); - * - * @name isNaN - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNaN = function (val, msg) { - new Assertion(val, msg).to.be.NaN; - }; - - /** - * ### .isNotNaN - * Asserts that value is not NaN - * - * assert.isNotNaN(4, '4 is not NaN'); - * - * @name isNotNaN - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - assert.isNotNaN = function (val, msg) { - new Assertion(val, msg).not.to.be.NaN; - }; - - /** - * ### .isUndefined(value, [message]) - * - * Asserts that `value` is `undefined`. - * - * var tea; - * assert.isUndefined(tea, 'no tea defined'); - * - * @name isUndefined - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isUndefined = function (val, msg) { - new Assertion(val, msg).to.equal(undefined); - }; - - /** - * ### .isDefined(value, [message]) - * - * Asserts that `value` is not `undefined`. - * - * var tea = 'cup of chai'; - * assert.isDefined(tea, 'tea has been defined'); - * - * @name isDefined - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isDefined = function (val, msg) { - new Assertion(val, msg).to.not.equal(undefined); - }; - - /** - * ### .isFunction(value, [message]) - * - * Asserts that `value` is a function. - * - * function serveTea() { return 'cup of tea'; }; - * assert.isFunction(serveTea, 'great, we can have tea now'); - * - * @name isFunction - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isFunction = function (val, msg) { - new Assertion(val, msg).to.be.a('function'); - }; - - /** - * ### .isNotFunction(value, [message]) - * - * Asserts that `value` is _not_ a function. - * - * var serveTea = [ 'heat', 'pour', 'sip' ]; - * assert.isNotFunction(serveTea, 'great, we have listed the steps'); - * - * @name isNotFunction - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotFunction = function (val, msg) { - new Assertion(val, msg).to.not.be.a('function'); - }; - - /** - * ### .isObject(value, [message]) - * - * Asserts that `value` is an object of type 'Object' (as revealed by `Object.prototype.toString`). - * _The assertion does not match subclassed objects._ - * - * var selection = { name: 'Chai', serve: 'with spices' }; - * assert.isObject(selection, 'tea selection is an object'); - * - * @name isObject - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isObject = function (val, msg) { - new Assertion(val, msg).to.be.a('object'); - }; - - /** - * ### .isNotObject(value, [message]) - * - * Asserts that `value` is _not_ an object of type 'Object' (as revealed by `Object.prototype.toString`). - * - * var selection = 'chai' - * assert.isNotObject(selection, 'tea selection is not an object'); - * assert.isNotObject(null, 'null is not an object'); - * - * @name isNotObject - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotObject = function (val, msg) { - new Assertion(val, msg).to.not.be.a('object'); - }; - - /** - * ### .isArray(value, [message]) - * - * Asserts that `value` is an array. - * - * var menu = [ 'green', 'chai', 'oolong' ]; - * assert.isArray(menu, 'what kind of tea do we want?'); - * - * @name isArray - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isArray = function (val, msg) { - new Assertion(val, msg).to.be.an('array'); - }; - - /** - * ### .isNotArray(value, [message]) - * - * Asserts that `value` is _not_ an array. - * - * var menu = 'green|chai|oolong'; - * assert.isNotArray(menu, 'what kind of tea do we want?'); - * - * @name isNotArray - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotArray = function (val, msg) { - new Assertion(val, msg).to.not.be.an('array'); - }; - - /** - * ### .isString(value, [message]) - * - * Asserts that `value` is a string. - * - * var teaOrder = 'chai'; - * assert.isString(teaOrder, 'order placed'); - * - * @name isString - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isString = function (val, msg) { - new Assertion(val, msg).to.be.a('string'); - }; - - /** - * ### .isNotString(value, [message]) - * - * Asserts that `value` is _not_ a string. - * - * var teaOrder = 4; - * assert.isNotString(teaOrder, 'order placed'); - * - * @name isNotString - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotString = function (val, msg) { - new Assertion(val, msg).to.not.be.a('string'); - }; - - /** - * ### .isNumber(value, [message]) - * - * Asserts that `value` is a number. - * - * var cups = 2; - * assert.isNumber(cups, 'how many cups'); - * - * @name isNumber - * @param {Number} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNumber = function (val, msg) { - new Assertion(val, msg).to.be.a('number'); - }; - - /** - * ### .isNotNumber(value, [message]) - * - * Asserts that `value` is _not_ a number. - * - * var cups = '2 cups please'; - * assert.isNotNumber(cups, 'how many cups'); - * - * @name isNotNumber - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotNumber = function (val, msg) { - new Assertion(val, msg).to.not.be.a('number'); - }; - - /** - * ### .isBoolean(value, [message]) - * - * Asserts that `value` is a boolean. - * - * var teaReady = true - * , teaServed = false; - * - * assert.isBoolean(teaReady, 'is the tea ready'); - * assert.isBoolean(teaServed, 'has tea been served'); - * - * @name isBoolean - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isBoolean = function (val, msg) { - new Assertion(val, msg).to.be.a('boolean'); - }; - - /** - * ### .isNotBoolean(value, [message]) - * - * Asserts that `value` is _not_ a boolean. - * - * var teaReady = 'yep' - * , teaServed = 'nope'; - * - * assert.isNotBoolean(teaReady, 'is the tea ready'); - * assert.isNotBoolean(teaServed, 'has tea been served'); - * - * @name isNotBoolean - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.isNotBoolean = function (val, msg) { - new Assertion(val, msg).to.not.be.a('boolean'); - }; - - /** - * ### .typeOf(value, name, [message]) - * - * Asserts that `value`'s type is `name`, as determined by - * `Object.prototype.toString`. - * - * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object'); - * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array'); - * assert.typeOf('tea', 'string', 'we have a string'); - * assert.typeOf(/tea/, 'regexp', 'we have a regular expression'); - * assert.typeOf(null, 'null', 'we have a null'); - * assert.typeOf(undefined, 'undefined', 'we have an undefined'); - * - * @name typeOf - * @param {Mixed} value - * @param {String} name - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.typeOf = function (val, type, msg) { - new Assertion(val, msg).to.be.a(type); - }; - - /** - * ### .notTypeOf(value, name, [message]) - * - * Asserts that `value`'s type is _not_ `name`, as determined by - * `Object.prototype.toString`. - * - * assert.notTypeOf('tea', 'number', 'strings are not numbers'); - * - * @name notTypeOf - * @param {Mixed} value - * @param {String} typeof name - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.notTypeOf = function (val, type, msg) { - new Assertion(val, msg).to.not.be.a(type); - }; - - /** - * ### .instanceOf(object, constructor, [message]) - * - * Asserts that `value` is an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , chai = new Tea('chai'); - * - * assert.instanceOf(chai, Tea, 'chai is an instance of tea'); - * - * @name instanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.instanceOf = function (val, type, msg) { - new Assertion(val, msg).to.be.instanceOf(type); - }; - - /** - * ### .notInstanceOf(object, constructor, [message]) - * - * Asserts `value` is not an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , chai = new String('chai'); - * - * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea'); - * - * @name notInstanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.notInstanceOf = function (val, type, msg) { - new Assertion(val, msg).to.not.be.instanceOf(type); - }; - - /** - * ### .include(haystack, needle, [message]) - * - * Asserts that `haystack` includes `needle`. Works - * for strings and arrays. - * - * assert.include('foobar', 'bar', 'foobar contains string "bar"'); - * assert.include([ 1, 2, 3 ], 3, 'array contains value'); - * - * @name include - * @param {Array|String} haystack - * @param {Mixed} needle - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.include = function (exp, inc, msg) { - new Assertion(exp, msg, assert.include).include(inc); - }; - - /** - * ### .notInclude(haystack, needle, [message]) - * - * Asserts that `haystack` does not include `needle`. Works - * for strings and arrays. - * - * assert.notInclude('foobar', 'baz', 'string not include substring'); - * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value'); - * - * @name notInclude - * @param {Array|String} haystack - * @param {Mixed} needle - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.notInclude = function (exp, inc, msg) { - new Assertion(exp, msg, assert.notInclude).not.include(inc); - }; - - /** - * ### .match(value, regexp, [message]) - * - * Asserts that `value` matches the regular expression `regexp`. - * - * assert.match('foobar', /^foo/, 'regexp matches'); - * - * @name match - * @param {Mixed} value - * @param {RegExp} regexp - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.match = function (exp, re, msg) { - new Assertion(exp, msg).to.match(re); - }; - - /** - * ### .notMatch(value, regexp, [message]) - * - * Asserts that `value` does not match the regular expression `regexp`. - * - * assert.notMatch('foobar', /^foo/, 'regexp does not match'); - * - * @name notMatch - * @param {Mixed} value - * @param {RegExp} regexp - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.notMatch = function (exp, re, msg) { - new Assertion(exp, msg).to.not.match(re); - }; - - /** - * ### .property(object, property, [message]) - * - * Asserts that `object` has a property named by `property`. - * - * assert.property({ tea: { green: 'matcha' }}, 'tea'); - * - * @name property - * @param {Object} object - * @param {String} property - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.property = function (obj, prop, msg) { - new Assertion(obj, msg).to.have.property(prop); - }; - - /** - * ### .notProperty(object, property, [message]) - * - * Asserts that `object` does _not_ have a property named by `property`. - * - * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee'); - * - * @name notProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.notProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.not.have.property(prop); - }; - - /** - * ### .deepProperty(object, property, [message]) - * - * Asserts that `object` has a property named by `property`, which can be a - * string using dot- and bracket-notation for deep reference. - * - * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green'); - * - * @name deepProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.deepProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.have.deep.property(prop); - }; - - /** - * ### .notDeepProperty(object, property, [message]) - * - * Asserts that `object` does _not_ have a property named by `property`, which - * can be a string using dot- and bracket-notation for deep reference. - * - * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong'); - * - * @name notDeepProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.notDeepProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.not.have.deep.property(prop); - }; - - /** - * ### .propertyVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property` with value given - * by `value`. - * - * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good'); - * - * @name propertyVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.propertyVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.have.property(prop, val); - }; - - /** - * ### .propertyNotVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property`, but with a value - * different from that given by `value`. - * - * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad'); - * - * @name propertyNotVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.propertyNotVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.not.have.property(prop, val); - }; - - /** - * ### .deepPropertyVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property` with value given - * by `value`. `property` can use dot- and bracket-notation for deep - * reference. - * - * assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha'); - * - * @name deepPropertyVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.deepPropertyVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.have.deep.property(prop, val); - }; - - /** - * ### .deepPropertyNotVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property`, but with a value - * different from that given by `value`. `property` can use dot- and - * bracket-notation for deep reference. - * - * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha'); - * - * @name deepPropertyNotVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.deepPropertyNotVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.not.have.deep.property(prop, val); - }; - - /** - * ### .lengthOf(object, length, [message]) - * - * Asserts that `object` has a `length` property with the expected value. - * - * assert.lengthOf([1,2,3], 3, 'array has length of 3'); - * assert.lengthOf('foobar', 6, 'string has length of 6'); - * - * @name lengthOf - * @param {Mixed} object - * @param {Number} length - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.lengthOf = function (exp, len, msg) { - new Assertion(exp, msg).to.have.length(len); - }; - - /** - * ### .throws(function, [constructor/string/regexp], [string/regexp], [message]) - * - * Asserts that `function` will throw an error that is an instance of - * `constructor`, or alternately that it will throw an error with message - * matching `regexp`. - * - * assert.throws(fn, 'function throws a reference error'); - * assert.throws(fn, /function throws a reference error/); - * assert.throws(fn, ReferenceError); - * assert.throws(fn, ReferenceError, 'function throws a reference error'); - * assert.throws(fn, ReferenceError, /function throws a reference error/); - * - * @name throws - * @alias throw - * @alias Throw - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @namespace Assert - * @api public - */ - - assert.throws = function (fn, errt, errs, msg) { - if ('string' === typeof errt || errt instanceof RegExp) { - errs = errt; - errt = null; - } - - var assertErr = new Assertion(fn, msg).to.throw(errt, errs); - return flag(assertErr, 'object'); - }; - - /** - * ### .doesNotThrow(function, [constructor/regexp], [message]) - * - * Asserts that `function` will _not_ throw an error that is an instance of - * `constructor`, or alternately that it will not throw an error with message - * matching `regexp`. - * - * assert.doesNotThrow(fn, Error, 'function does not throw'); - * - * @name doesNotThrow - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @namespace Assert - * @api public - */ - - assert.doesNotThrow = function (fn, type, msg) { - if ('string' === typeof type) { - msg = type; - type = null; - } - - new Assertion(fn, msg).to.not.Throw(type); - }; - - /** - * ### .operator(val1, operator, val2, [message]) - * - * Compares two values using `operator`. - * - * assert.operator(1, '<', 2, 'everything is ok'); - * assert.operator(1, '>', 2, 'this will fail'); - * - * @name operator - * @param {Mixed} val1 - * @param {String} operator - * @param {Mixed} val2 - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.operator = function (val, operator, val2, msg) { - var ok; - switch(operator) { - case '==': - ok = val == val2; - break; - case '===': - ok = val === val2; - break; - case '>': - ok = val > val2; - break; - case '>=': - ok = val >= val2; - break; - case '<': - ok = val < val2; - break; - case '<=': - ok = val <= val2; - break; - case '!=': - ok = val != val2; - break; - case '!==': - ok = val !== val2; - break; - default: - throw new Error('Invalid operator "' + operator + '"'); - } - var test = new Assertion(ok, msg); - test.assert( - true === flag(test, 'object') - , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2) - , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) ); - }; - - /** - * ### .closeTo(actual, expected, delta, [message]) - * - * Asserts that the target is equal `expected`, to within a +/- `delta` range. - * - * assert.closeTo(1.5, 1, 0.5, 'numbers are close'); - * - * @name closeTo - * @param {Number} actual - * @param {Number} expected - * @param {Number} delta - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.closeTo = function (act, exp, delta, msg) { - new Assertion(act, msg).to.be.closeTo(exp, delta); - }; - - /** - * ### .approximately(actual, expected, delta, [message]) - * - * Asserts that the target is equal `expected`, to within a +/- `delta` range. - * - * assert.approximately(1.5, 1, 0.5, 'numbers are close'); - * - * @name approximately - * @param {Number} actual - * @param {Number} expected - * @param {Number} delta - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.approximately = function (act, exp, delta, msg) { - new Assertion(act, msg).to.be.approximately(exp, delta); - }; - - /** - * ### .sameMembers(set1, set2, [message]) - * - * Asserts that `set1` and `set2` have the same members. - * Order is not taken into account. - * - * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); - * - * @name sameMembers - * @param {Array} set1 - * @param {Array} set2 - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.sameMembers = function (set1, set2, msg) { - new Assertion(set1, msg).to.have.same.members(set2); - } - - /** - * ### .sameDeepMembers(set1, set2, [message]) - * - * Asserts that `set1` and `set2` have the same members - using a deep equality checking. - * Order is not taken into account. - * - * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], 'same deep members'); - * - * @name sameDeepMembers - * @param {Array} set1 - * @param {Array} set2 - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.sameDeepMembers = function (set1, set2, msg) { - new Assertion(set1, msg).to.have.same.deep.members(set2); - } - - /** - * ### .includeMembers(superset, subset, [message]) - * - * Asserts that `subset` is included in `superset`. - * Order is not taken into account. - * - * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members'); - * - * @name includeMembers - * @param {Array} superset - * @param {Array} subset - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.includeMembers = function (superset, subset, msg) { - new Assertion(superset, msg).to.include.members(subset); - } - - /** - * ### .includeDeepMembers(superset, subset, [message]) - * - * Asserts that `subset` is included in `superset` - using deep equality checking. - * Order is not taken into account. - * Duplicates are ignored. - * - * assert.includeDeepMembers([ {a: 1}, {b: 2}, {c: 3} ], [ {b: 2}, {a: 1}, {b: 2} ], 'include deep members'); - * - * @name includeDeepMembers - * @param {Array} superset - * @param {Array} subset - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.includeDeepMembers = function (superset, subset, msg) { - new Assertion(superset, msg).to.include.deep.members(subset); - } - - /** - * ### .oneOf(inList, list, [message]) - * - * Asserts that non-object, non-array value `inList` appears in the flat array `list`. - * - * assert.oneOf(1, [ 2, 1 ], 'Not found in list'); - * - * @name oneOf - * @param {*} inList - * @param {Array<*>} list - * @param {String} message - * @namespace Assert - * @api public - */ - - assert.oneOf = function (inList, list, msg) { - new Assertion(inList, msg).to.be.oneOf(list); - } - - /** - * ### .changes(function, object, property) - * - * Asserts that a function changes the value of a property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 22 }; - * assert.changes(fn, obj, 'val'); - * - * @name changes - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.changes = function (fn, obj, prop) { - new Assertion(fn).to.change(obj, prop); - } - - /** - * ### .doesNotChange(function, object, property) - * - * Asserts that a function does not changes the value of a property - * - * var obj = { val: 10 }; - * var fn = function() { console.log('foo'); }; - * assert.doesNotChange(fn, obj, 'val'); - * - * @name doesNotChange - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.doesNotChange = function (fn, obj, prop) { - new Assertion(fn).to.not.change(obj, prop); - } - - /** - * ### .increases(function, object, property) - * - * Asserts that a function increases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 13 }; - * assert.increases(fn, obj, 'val'); - * - * @name increases - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.increases = function (fn, obj, prop) { - new Assertion(fn).to.increase(obj, prop); - } - - /** - * ### .doesNotIncrease(function, object, property) - * - * Asserts that a function does not increase object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 8 }; - * assert.doesNotIncrease(fn, obj, 'val'); - * - * @name doesNotIncrease - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.doesNotIncrease = function (fn, obj, prop) { - new Assertion(fn).to.not.increase(obj, prop); - } - - /** - * ### .decreases(function, object, property) - * - * Asserts that a function decreases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 5 }; - * assert.decreases(fn, obj, 'val'); - * - * @name decreases - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.decreases = function (fn, obj, prop) { - new Assertion(fn).to.decrease(obj, prop); - } - - /** - * ### .doesNotDecrease(function, object, property) - * - * Asserts that a function does not decreases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 15 }; - * assert.doesNotDecrease(fn, obj, 'val'); - * - * @name doesNotDecrease - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.doesNotDecrease = function (fn, obj, prop) { - new Assertion(fn).to.not.decrease(obj, prop); - } - - /*! - * ### .ifError(object) - * - * Asserts if value is not a false value, and throws if it is a true value. - * This is added to allow for chai to be a drop-in replacement for Node's - * assert class. - * - * var err = new Error('I am a custom error'); - * assert.ifError(err); // Rethrows err! - * - * @name ifError - * @param {Object} object - * @namespace Assert - * @api public - */ - - assert.ifError = function (val) { - if (val) { - throw(val); - } - }; - - /** - * ### .isExtensible(object) - * - * Asserts that `object` is extensible (can have new properties added to it). - * - * assert.isExtensible({}); - * - * @name isExtensible - * @alias extensible - * @param {Object} object - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.isExtensible = function (obj, msg) { - new Assertion(obj, msg).to.be.extensible; - }; - - /** - * ### .isNotExtensible(object) - * - * Asserts that `object` is _not_ extensible. - * - * var nonExtensibleObject = Object.preventExtensions({}); - * var sealedObject = Object.seal({}); - * var frozenObject = Object.freese({}); - * - * assert.isNotExtensible(nonExtensibleObject); - * assert.isNotExtensible(sealedObject); - * assert.isNotExtensible(frozenObject); - * - * @name isNotExtensible - * @alias notExtensible - * @param {Object} object - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.isNotExtensible = function (obj, msg) { - new Assertion(obj, msg).to.not.be.extensible; - }; - - /** - * ### .isSealed(object) - * - * Asserts that `object` is sealed (cannot have new properties added to it - * and its existing properties cannot be removed). - * - * var sealedObject = Object.seal({}); - * var frozenObject = Object.seal({}); - * - * assert.isSealed(sealedObject); - * assert.isSealed(frozenObject); - * - * @name isSealed - * @alias sealed - * @param {Object} object - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.isSealed = function (obj, msg) { - new Assertion(obj, msg).to.be.sealed; - }; - - /** - * ### .isNotSealed(object) - * - * Asserts that `object` is _not_ sealed. - * - * assert.isNotSealed({}); - * - * @name isNotSealed - * @alias notSealed - * @param {Object} object - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.isNotSealed = function (obj, msg) { - new Assertion(obj, msg).to.not.be.sealed; - }; - - /** - * ### .isFrozen(object) - * - * Asserts that `object` is frozen (cannot have new properties added to it - * and its existing properties cannot be modified). - * - * var frozenObject = Object.freeze({}); - * assert.frozen(frozenObject); - * - * @name isFrozen - * @alias frozen - * @param {Object} object - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.isFrozen = function (obj, msg) { - new Assertion(obj, msg).to.be.frozen; - }; - - /** - * ### .isNotFrozen(object) - * - * Asserts that `object` is _not_ frozen. - * - * assert.isNotFrozen({}); - * - * @name isNotFrozen - * @alias notFrozen - * @param {Object} object - * @param {String} message _optional_ - * @namespace Assert - * @api public - */ - - assert.isNotFrozen = function (obj, msg) { - new Assertion(obj, msg).to.not.be.frozen; - }; - - /*! - * Aliases. - */ - - (function alias(name, as){ - assert[as] = assert[name]; - return alias; - }) - ('isOk', 'ok') - ('isNotOk', 'notOk') - ('throws', 'throw') - ('throws', 'Throw') - ('isExtensible', 'extensible') - ('isNotExtensible', 'notExtensible') - ('isSealed', 'sealed') - ('isNotSealed', 'notSealed') - ('isFrozen', 'frozen') - ('isNotFrozen', 'notFrozen'); -}; - -},{}],7:[function(require,module,exports){ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, util) { - chai.expect = function (val, message) { - return new chai.Assertion(val, message); - }; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @namespace Expect - * @api public - */ - - chai.expect.fail = function (actual, expected, message, operator) { - message = message || 'expect.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, chai.expect.fail); - }; -}; - -},{}],8:[function(require,module,exports){ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, util) { - var Assertion = chai.Assertion; - - function loadShould () { - // explicitly define this method as function as to have it's name to include as `ssfi` - function shouldGetter() { - if (this instanceof String || this instanceof Number || this instanceof Boolean ) { - return new Assertion(this.valueOf(), null, shouldGetter); - } - return new Assertion(this, null, shouldGetter); - } - function shouldSetter(value) { - // See https://github.com/chaijs/chai/issues/86: this makes - // `whatever.should = someValue` actually set `someValue`, which is - // especially useful for `global.should = require('chai').should()`. - // - // Note that we have to use [[DefineProperty]] instead of [[Put]] - // since otherwise we would trigger this very setter! - Object.defineProperty(this, 'should', { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } - // modify Object.prototype to have `should` - Object.defineProperty(Object.prototype, 'should', { - set: shouldSetter - , get: shouldGetter - , configurable: true - }); - - var should = {}; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @namespace Should - * @api public - */ - - should.fail = function (actual, expected, message, operator) { - message = message || 'should.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, should.fail); - }; - - /** - * ### .equal(actual, expected, [message]) - * - * Asserts non-strict equality (`==`) of `actual` and `expected`. - * - * should.equal(3, '3', '== coerces values to strings'); - * - * @name equal - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @namespace Should - * @api public - */ - - should.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.equal(val2); - }; - - /** - * ### .throw(function, [constructor/string/regexp], [string/regexp], [message]) - * - * Asserts that `function` will throw an error that is an instance of - * `constructor`, or alternately that it will throw an error with message - * matching `regexp`. - * - * should.throw(fn, 'function throws a reference error'); - * should.throw(fn, /function throws a reference error/); - * should.throw(fn, ReferenceError); - * should.throw(fn, ReferenceError, 'function throws a reference error'); - * should.throw(fn, ReferenceError, /function throws a reference error/); - * - * @name throw - * @alias Throw - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @namespace Should - * @api public - */ - - should.Throw = function (fn, errt, errs, msg) { - new Assertion(fn, msg).to.Throw(errt, errs); - }; - - /** - * ### .exist - * - * Asserts that the target is neither `null` nor `undefined`. - * - * var foo = 'hi'; - * - * should.exist(foo, 'foo exists'); - * - * @name exist - * @namespace Should - * @api public - */ - - should.exist = function (val, msg) { - new Assertion(val, msg).to.exist; - } - - // negation - should.not = {} - - /** - * ### .not.equal(actual, expected, [message]) - * - * Asserts non-strict inequality (`!=`) of `actual` and `expected`. - * - * should.not.equal(3, 4, 'these numbers are not equal'); - * - * @name not.equal - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @namespace Should - * @api public - */ - - should.not.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.not.equal(val2); - }; - - /** - * ### .throw(function, [constructor/regexp], [message]) - * - * Asserts that `function` will _not_ throw an error that is an instance of - * `constructor`, or alternately that it will not throw an error with message - * matching `regexp`. - * - * should.not.throw(fn, Error, 'function does not throw'); - * - * @name not.throw - * @alias not.Throw - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @namespace Should - * @api public - */ - - should.not.Throw = function (fn, errt, errs, msg) { - new Assertion(fn, msg).to.not.Throw(errt, errs); - }; - - /** - * ### .not.exist - * - * Asserts that the target is neither `null` nor `undefined`. - * - * var bar = null; - * - * should.not.exist(bar, 'bar does not exist'); - * - * @name not.exist - * @namespace Should - * @api public - */ - - should.not.exist = function (val, msg) { - new Assertion(val, msg).to.not.exist; - } - - should['throw'] = should['Throw']; - should.not['throw'] = should.not['Throw']; - - return should; - }; - - chai.should = loadShould; - chai.Should = loadShould; -}; - -},{}],9:[function(require,module,exports){ -/*! - * Chai - addChainingMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependencies - */ - -var transferFlags = require('./transferFlags'); -var flag = require('./flag'); -var config = require('../config'); - -/*! - * Module variables - */ - -// Check whether `__proto__` is supported -var hasProtoSupport = '__proto__' in Object; - -// Without `__proto__` support, this module will need to add properties to a function. -// However, some Function.prototype methods cannot be overwritten, -// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69). -var excludeNames = /^(?:length|name|arguments|caller)$/; - -// Cache `Function` properties -var call = Function.prototype.call, - apply = Function.prototype.apply; - -/** - * ### addChainableMethod (ctx, name, method, chainingBehavior) - * - * Adds a method to an object, such that the method can also be chained. - * - * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior); - * - * The result can then be used as both a method assertion, executing both `method` and - * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`. - * - * expect(fooStr).to.be.foo('bar'); - * expect(fooStr).to.be.foo.equal('foo'); - * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add - * @param {Function} method function to be used for `name`, when called - * @param {Function} chainingBehavior function to be called every time the property is accessed - * @namespace Utils - * @name addChainableMethod - * @api public - */ - -module.exports = function (ctx, name, method, chainingBehavior) { - if (typeof chainingBehavior !== 'function') { - chainingBehavior = function () { }; - } - - var chainableBehavior = { - method: method - , chainingBehavior: chainingBehavior - }; - - // save the methods so we can overwrite them later, if we need to. - if (!ctx.__methods) { - ctx.__methods = {}; - } - ctx.__methods[name] = chainableBehavior; - - Object.defineProperty(ctx, name, - { get: function () { - chainableBehavior.chainingBehavior.call(this); - - var assert = function assert() { - var old_ssfi = flag(this, 'ssfi'); - if (old_ssfi && config.includeStack === false) - flag(this, 'ssfi', assert); - var result = chainableBehavior.method.apply(this, arguments); - return result === undefined ? this : result; - }; - - // Use `__proto__` if available - if (hasProtoSupport) { - // Inherit all properties from the object by replacing the `Function` prototype - var prototype = assert.__proto__ = Object.create(this); - // Restore the `call` and `apply` methods from `Function` - prototype.call = call; - prototype.apply = apply; - } - // Otherwise, redefine all properties (slow!) - else { - var asserterNames = Object.getOwnPropertyNames(ctx); - asserterNames.forEach(function (asserterName) { - if (!excludeNames.test(asserterName)) { - var pd = Object.getOwnPropertyDescriptor(ctx, asserterName); - Object.defineProperty(assert, asserterName, pd); - } - }); - } - - transferFlags(this, assert); - return assert; - } - , configurable: true - }); -}; - -},{"../config":4,"./flag":13,"./transferFlags":29}],10:[function(require,module,exports){ -/*! - * Chai - addMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var config = require('../config'); - -/** - * ### .addMethod (ctx, name, method) - * - * Adds a method to the prototype of an object. - * - * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addMethod('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(fooStr).to.be.foo('bar'); - * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add - * @param {Function} method function to be used for name - * @namespace Utils - * @name addMethod - * @api public - */ -var flag = require('./flag'); - -module.exports = function (ctx, name, method) { - ctx[name] = function () { - var old_ssfi = flag(this, 'ssfi'); - if (old_ssfi && config.includeStack === false) - flag(this, 'ssfi', ctx[name]); - var result = method.apply(this, arguments); - return result === undefined ? this : result; - }; -}; - -},{"../config":4,"./flag":13}],11:[function(require,module,exports){ -/*! - * Chai - addProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var config = require('../config'); -var flag = require('./flag'); - -/** - * ### addProperty (ctx, name, getter) - * - * Adds a property to the prototype of an object. - * - * utils.addProperty(chai.Assertion.prototype, 'foo', function () { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.instanceof(Foo); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addProperty('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.be.foo; - * - * @param {Object} ctx object to which the property is added - * @param {String} name of property to add - * @param {Function} getter function to be used for name - * @namespace Utils - * @name addProperty - * @api public - */ - -module.exports = function (ctx, name, getter) { - Object.defineProperty(ctx, name, - { get: function addProperty() { - var old_ssfi = flag(this, 'ssfi'); - if (old_ssfi && config.includeStack === false) - flag(this, 'ssfi', addProperty); - - var result = getter.call(this); - return result === undefined ? this : result; - } - , configurable: true - }); -}; - -},{"../config":4,"./flag":13}],12:[function(require,module,exports){ -/*! - * Chai - expectTypes utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### expectTypes(obj, types) - * - * Ensures that the object being tested against is of a valid type. - * - * utils.expectTypes(this, ['array', 'object', 'string']); - * - * @param {Mixed} obj constructed Assertion - * @param {Array} type A list of allowed types for this assertion - * @namespace Utils - * @name expectTypes - * @api public - */ - -var AssertionError = require('assertion-error'); -var flag = require('./flag'); -var type = require('type-detect'); - -module.exports = function (obj, types) { - var obj = flag(obj, 'object'); - types = types.map(function (t) { return t.toLowerCase(); }); - types.sort(); - - // Transforms ['lorem', 'ipsum'] into 'a lirum, or an ipsum' - var str = types.map(function (t, index) { - var art = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(t.charAt(0)) ? 'an' : 'a'; - var or = types.length > 1 && index === types.length - 1 ? 'or ' : ''; - return or + art + ' ' + t; - }).join(', '); - - if (!types.some(function (expected) { return type(obj) === expected; })) { - throw new AssertionError( - 'object tested must be ' + str + ', but ' + type(obj) + ' given' - ); - } -}; - -},{"./flag":13,"assertion-error":30,"type-detect":35}],13:[function(require,module,exports){ -/*! - * Chai - flag utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### flag(object, key, [value]) - * - * Get or set a flag value on an object. If a - * value is provided it will be set, else it will - * return the currently set value or `undefined` if - * the value is not set. - * - * utils.flag(this, 'foo', 'bar'); // setter - * utils.flag(this, 'foo'); // getter, returns `bar` - * - * @param {Object} object constructed Assertion - * @param {String} key - * @param {Mixed} value (optional) - * @namespace Utils - * @name flag - * @api private - */ - -module.exports = function (obj, key, value) { - var flags = obj.__flags || (obj.__flags = Object.create(null)); - if (arguments.length === 3) { - flags[key] = value; - } else { - return flags[key]; - } -}; - -},{}],14:[function(require,module,exports){ -/*! - * Chai - getActual utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * # getActual(object, [actual]) - * - * Returns the `actual` value for an Assertion - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - * @namespace Utils - * @name getActual - */ - -module.exports = function (obj, args) { - return args.length > 4 ? args[4] : obj._obj; -}; - -},{}],15:[function(require,module,exports){ -/*! - * Chai - getEnumerableProperties utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### .getEnumerableProperties(object) - * - * This allows the retrieval of enumerable property names of an object, - * inherited or not. - * - * @param {Object} object - * @returns {Array} - * @namespace Utils - * @name getEnumerableProperties - * @api public - */ - -module.exports = function getEnumerableProperties(object) { - var result = []; - for (var name in object) { - result.push(name); - } - return result; -}; - -},{}],16:[function(require,module,exports){ -/*! - * Chai - message composition utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var flag = require('./flag') - , getActual = require('./getActual') - , inspect = require('./inspect') - , objDisplay = require('./objDisplay'); - -/** - * ### .getMessage(object, message, negateMessage) - * - * Construct the error message based on flags - * and template tags. Template tags will return - * a stringified inspection of the object referenced. - * - * Message template tags: - * - `#{this}` current asserted object - * - `#{act}` actual value - * - `#{exp}` expected value - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - * @namespace Utils - * @name getMessage - * @api public - */ - -module.exports = function (obj, args) { - var negate = flag(obj, 'negate') - , val = flag(obj, 'object') - , expected = args[3] - , actual = getActual(obj, args) - , msg = negate ? args[2] : args[1] - , flagMsg = flag(obj, 'message'); - - if(typeof msg === "function") msg = msg(); - msg = msg || ''; - msg = msg - .replace(/#\{this\}/g, function () { return objDisplay(val); }) - .replace(/#\{act\}/g, function () { return objDisplay(actual); }) - .replace(/#\{exp\}/g, function () { return objDisplay(expected); }); - - return flagMsg ? flagMsg + ': ' + msg : msg; -}; - -},{"./flag":13,"./getActual":14,"./inspect":23,"./objDisplay":24}],17:[function(require,module,exports){ -/*! - * Chai - getName utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * # getName(func) - * - * Gets the name of a function, in a cross-browser way. - * - * @param {Function} a function (usually a constructor) - * @namespace Utils - * @name getName - */ - -module.exports = function (func) { - if (func.name) return func.name; - - var match = /^\s?function ([^(]*)\(/.exec(func); - return match && match[1] ? match[1] : ""; -}; - -},{}],18:[function(require,module,exports){ -/*! - * Chai - getPathInfo utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var hasProperty = require('./hasProperty'); - -/** - * ### .getPathInfo(path, object) - * - * This allows the retrieval of property info in an - * object given a string path. - * - * The path info consists of an object with the - * following properties: - * - * * parent - The parent object of the property referenced by `path` - * * name - The name of the final property, a number if it was an array indexer - * * value - The value of the property, if it exists, otherwise `undefined` - * * exists - Whether the property exists or not - * - * @param {String} path - * @param {Object} object - * @returns {Object} info - * @namespace Utils - * @name getPathInfo - * @api public - */ - -module.exports = function getPathInfo(path, obj) { - var parsed = parsePath(path), - last = parsed[parsed.length - 1]; - - var info = { - parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj, - name: last.p || last.i, - value: _getPathValue(parsed, obj) - }; - info.exists = hasProperty(info.name, info.parent); - - return info; -}; - - -/*! - * ## parsePath(path) - * - * Helper function used to parse string object - * paths. Use in conjunction with `_getPathValue`. - * - * var parsed = parsePath('myobject.property.subprop'); - * - * ### Paths: - * - * * Can be as near infinitely deep and nested - * * Arrays are also valid using the formal `myobject.document[3].property`. - * * Literal dots and brackets (not delimiter) must be backslash-escaped. - * - * @param {String} path - * @returns {Object} parsed - * @api private - */ - -function parsePath (path) { - var str = path.replace(/([^\\])\[/g, '$1.[') - , parts = str.match(/(\\\.|[^.]+?)+/g); - return parts.map(function (value) { - var re = /^\[(\d+)\]$/ - , mArr = re.exec(value); - if (mArr) return { i: parseFloat(mArr[1]) }; - else return { p: value.replace(/\\([.\[\]])/g, '$1') }; - }); -} - - -/*! - * ## _getPathValue(parsed, obj) - * - * Helper companion function for `.parsePath` that returns - * the value located at the parsed address. - * - * var value = getPathValue(parsed, obj); - * - * @param {Object} parsed definition from `parsePath`. - * @param {Object} object to search against - * @param {Number} object to search against - * @returns {Object|Undefined} value - * @api private - */ - -function _getPathValue (parsed, obj, index) { - var tmp = obj - , res; - - index = (index === undefined ? parsed.length : index); - - for (var i = 0, l = index; i < l; i++) { - var part = parsed[i]; - if (tmp) { - if ('undefined' !== typeof part.p) - tmp = tmp[part.p]; - else if ('undefined' !== typeof part.i) - tmp = tmp[part.i]; - if (i == (l - 1)) res = tmp; - } else { - res = undefined; - } - } - return res; -} - -},{"./hasProperty":21}],19:[function(require,module,exports){ -/*! - * Chai - getPathValue utility - * Copyright(c) 2012-2014 Jake Luer - * @see https://github.com/logicalparadox/filtr - * MIT Licensed - */ - -var getPathInfo = require('./getPathInfo'); - -/** - * ### .getPathValue(path, object) - * - * This allows the retrieval of values in an - * object given a string path. - * - * var obj = { - * prop1: { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * , prop2: { - * arr: [ { nested: 'Universe' } ] - * , str: 'Hello again!' - * } - * } - * - * The following would be the results. - * - * getPathValue('prop1.str', obj); // Hello - * getPathValue('prop1.att[2]', obj); // b - * getPathValue('prop2.arr[0].nested', obj); // Universe - * - * @param {String} path - * @param {Object} object - * @returns {Object} value or `undefined` - * @namespace Utils - * @name getPathValue - * @api public - */ -module.exports = function(path, obj) { - var info = getPathInfo(path, obj); - return info.value; -}; - -},{"./getPathInfo":18}],20:[function(require,module,exports){ -/*! - * Chai - getProperties utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### .getProperties(object) - * - * This allows the retrieval of property names of an object, enumerable or not, - * inherited or not. - * - * @param {Object} object - * @returns {Array} - * @namespace Utils - * @name getProperties - * @api public - */ - -module.exports = function getProperties(object) { - var result = Object.getOwnPropertyNames(object); - - function addProperty(property) { - if (result.indexOf(property) === -1) { - result.push(property); - } - } - - var proto = Object.getPrototypeOf(object); - while (proto !== null) { - Object.getOwnPropertyNames(proto).forEach(addProperty); - proto = Object.getPrototypeOf(proto); - } - - return result; -}; - -},{}],21:[function(require,module,exports){ -/*! - * Chai - hasProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var type = require('type-detect'); - -/** - * ### .hasProperty(object, name) - * - * This allows checking whether an object has - * named property or numeric array index. - * - * Basically does the same thing as the `in` - * operator but works properly with natives - * and null/undefined values. - * - * var obj = { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * - * The following would be the results. - * - * hasProperty('str', obj); // true - * hasProperty('constructor', obj); // true - * hasProperty('bar', obj); // false - * - * hasProperty('length', obj.str); // true - * hasProperty(1, obj.str); // true - * hasProperty(5, obj.str); // false - * - * hasProperty('length', obj.arr); // true - * hasProperty(2, obj.arr); // true - * hasProperty(3, obj.arr); // false - * - * @param {Objuect} object - * @param {String|Number} name - * @returns {Boolean} whether it exists - * @namespace Utils - * @name getPathInfo - * @api public - */ - -var literals = { - 'number': Number - , 'string': String -}; - -module.exports = function hasProperty(name, obj) { - var ot = type(obj); - - // Bad Object, obviously no props at all - if(ot === 'null' || ot === 'undefined') - return false; - - // The `in` operator does not work with certain literals - // box these before the check - if(literals[ot] && typeof obj !== 'object') - obj = new literals[ot](obj); - - return name in obj; -}; - -},{"type-detect":35}],22:[function(require,module,exports){ -/*! - * chai - * Copyright(c) 2011 Jake Luer - * MIT Licensed - */ - -/*! - * Main exports - */ - -var exports = module.exports = {}; - -/*! - * test utility - */ - -exports.test = require('./test'); - -/*! - * type utility - */ - -exports.type = require('type-detect'); - -/*! - * expectTypes utility - */ -exports.expectTypes = require('./expectTypes'); - -/*! - * message utility - */ - -exports.getMessage = require('./getMessage'); - -/*! - * actual utility - */ - -exports.getActual = require('./getActual'); - -/*! - * Inspect util - */ - -exports.inspect = require('./inspect'); - -/*! - * Object Display util - */ - -exports.objDisplay = require('./objDisplay'); - -/*! - * Flag utility - */ - -exports.flag = require('./flag'); - -/*! - * Flag transferring utility - */ - -exports.transferFlags = require('./transferFlags'); - -/*! - * Deep equal utility - */ - -exports.eql = require('deep-eql'); - -/*! - * Deep path value - */ - -exports.getPathValue = require('./getPathValue'); - -/*! - * Deep path info - */ - -exports.getPathInfo = require('./getPathInfo'); - -/*! - * Check if a property exists - */ - -exports.hasProperty = require('./hasProperty'); - -/*! - * Function name - */ - -exports.getName = require('./getName'); - -/*! - * add Property - */ - -exports.addProperty = require('./addProperty'); - -/*! - * add Method - */ - -exports.addMethod = require('./addMethod'); - -/*! - * overwrite Property - */ - -exports.overwriteProperty = require('./overwriteProperty'); - -/*! - * overwrite Method - */ - -exports.overwriteMethod = require('./overwriteMethod'); - -/*! - * Add a chainable method - */ - -exports.addChainableMethod = require('./addChainableMethod'); - -/*! - * Overwrite chainable method - */ - -exports.overwriteChainableMethod = require('./overwriteChainableMethod'); - -},{"./addChainableMethod":9,"./addMethod":10,"./addProperty":11,"./expectTypes":12,"./flag":13,"./getActual":14,"./getMessage":16,"./getName":17,"./getPathInfo":18,"./getPathValue":19,"./hasProperty":21,"./inspect":23,"./objDisplay":24,"./overwriteChainableMethod":25,"./overwriteMethod":26,"./overwriteProperty":27,"./test":28,"./transferFlags":29,"deep-eql":31,"type-detect":35}],23:[function(require,module,exports){ -// This is (almost) directly from Node.js utils -// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js - -var getName = require('./getName'); -var getProperties = require('./getProperties'); -var getEnumerableProperties = require('./getEnumerableProperties'); - -module.exports = inspect; - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Boolean} showHidden Flag that shows hidden (not enumerable) - * properties of objects. - * @param {Number} depth Depth in which to descend in object. Default is 2. - * @param {Boolean} colors Flag to turn on ANSI escape codes to color the - * output. Default is false (no coloring). - * @namespace Utils - * @name inspect - */ -function inspect(obj, showHidden, depth, colors) { - var ctx = { - showHidden: showHidden, - seen: [], - stylize: function (str) { return str; } - }; - return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth)); -} - -// Returns true if object is a DOM element. -var isDOMElement = function (object) { - if (typeof HTMLElement === 'object') { - return object instanceof HTMLElement; - } else { - return object && - typeof object === 'object' && - object.nodeType === 1 && - typeof object.nodeName === 'string'; - } -}; - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (value && typeof value.inspect === 'function' && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes); - if (typeof ret !== 'string') { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // If this is a DOM element, try to get the outer HTML. - if (isDOMElement(value)) { - if ('outerHTML' in value) { - return value.outerHTML; - // This value does not have an outerHTML attribute, - // it could still be an XML element - } else { - // Attempt to serialize it - try { - if (document.xmlVersion) { - var xmlSerializer = new XMLSerializer(); - return xmlSerializer.serializeToString(value); - } else { - // Firefox 11- do not support outerHTML - // It does, however, support innerHTML - // Use the following to render the element - var ns = "http://www.w3.org/1999/xhtml"; - var container = document.createElementNS(ns, '_'); - - container.appendChild(value.cloneNode(false)); - html = container.innerHTML - .replace('><', '>' + value.innerHTML + '<'); - container.innerHTML = ''; - return html; - } - } catch (err) { - // This could be a non-native DOM implementation, - // continue with the normal flow: - // printing the element as if it is an object. - } - } - } - - // Look up the keys of the object. - var visibleKeys = getEnumerableProperties(value); - var keys = ctx.showHidden ? getProperties(value) : visibleKeys; - - // Some type of object without properties can be shortcutted. - // In IE, errors have a single `stack` property, or if they are vanilla `Error`, - // a `stack` plus `description` property; ignore those for consistency. - if (keys.length === 0 || (isError(value) && ( - (keys.length === 1 && keys[0] === 'stack') || - (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack') - ))) { - if (typeof value === 'function') { - var name = getName(value); - var nameSuffix = name ? ': ' + name : ''; - return ctx.stylize('[Function' + nameSuffix + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toUTCString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (typeof value === 'function') { - var name = getName(value); - var nameSuffix = name ? ': ' + name : ''; - base = ' [Function' + nameSuffix + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - return formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - switch (typeof value) { - case 'undefined': - return ctx.stylize('undefined', 'undefined'); - - case 'string': - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - - case 'number': - if (value === 0 && (1/value) === -Infinity) { - return ctx.stylize('-0', 'number'); - } - return ctx.stylize('' + value, 'number'); - - case 'boolean': - return ctx.stylize('' + value, 'boolean'); - } - // For some reason typeof null is "object", so special case here. - if (value === null) { - return ctx.stylize('null', 'null'); - } -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (Object.prototype.hasOwnProperty.call(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str; - if (value.__lookupGetter__) { - if (value.__lookupGetter__(key)) { - if (value.__lookupSetter__(key)) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (value.__lookupSetter__(key)) { - str = ctx.stylize('[Setter]', 'special'); - } - } - } - if (visibleKeys.indexOf(key) < 0) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(value[key]) < 0) { - if (recurseTimes === null) { - str = formatValue(ctx, value[key], null); - } else { - str = formatValue(ctx, value[key], recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (typeof name === 'undefined') { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - -function isArray(ar) { - return Array.isArray(ar) || - (typeof ar === 'object' && objectToString(ar) === '[object Array]'); -} - -function isRegExp(re) { - return typeof re === 'object' && objectToString(re) === '[object RegExp]'; -} - -function isDate(d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; -} - -function isError(e) { - return typeof e === 'object' && objectToString(e) === '[object Error]'; -} - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -},{"./getEnumerableProperties":15,"./getName":17,"./getProperties":20}],24:[function(require,module,exports){ -/*! - * Chai - flag utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var inspect = require('./inspect'); -var config = require('../config'); - -/** - * ### .objDisplay (object) - * - * Determines if an object or an array matches - * criteria to be inspected in-line for error - * messages or should be truncated. - * - * @param {Mixed} javascript object to inspect - * @name objDisplay - * @namespace Utils - * @api public - */ - -module.exports = function (obj) { - var str = inspect(obj) - , type = Object.prototype.toString.call(obj); - - if (config.truncateThreshold && str.length >= config.truncateThreshold) { - if (type === '[object Function]') { - return !obj.name || obj.name === '' - ? '[Function]' - : '[Function: ' + obj.name + ']'; - } else if (type === '[object Array]') { - return '[ Array(' + obj.length + ') ]'; - } else if (type === '[object Object]') { - var keys = Object.keys(obj) - , kstr = keys.length > 2 - ? keys.splice(0, 2).join(', ') + ', ...' - : keys.join(', '); - return '{ Object (' + kstr + ') }'; - } else { - return str; - } - } else { - return str; - } -}; - -},{"../config":4,"./inspect":23}],25:[function(require,module,exports){ -/*! - * Chai - overwriteChainableMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteChainableMethod (ctx, name, method, chainingBehavior) - * - * Overwites an already existing chainable method - * and provides access to the previous function or - * property. Must return functions to be used for - * name. - * - * utils.overwriteChainableMethod(chai.Assertion.prototype, 'length', - * function (_super) { - * } - * , function (_super) { - * } - * ); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteChainableMethod('foo', fn, fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.have.length(3); - * expect(myFoo).to.have.length.above(3); - * - * @param {Object} ctx object whose method / property is to be overwritten - * @param {String} name of method / property to overwrite - * @param {Function} method function that returns a function to be used for name - * @param {Function} chainingBehavior function that returns a function to be used for property - * @namespace Utils - * @name overwriteChainableMethod - * @api public - */ - -module.exports = function (ctx, name, method, chainingBehavior) { - var chainableBehavior = ctx.__methods[name]; - - var _chainingBehavior = chainableBehavior.chainingBehavior; - chainableBehavior.chainingBehavior = function () { - var result = chainingBehavior(_chainingBehavior).call(this); - return result === undefined ? this : result; - }; - - var _method = chainableBehavior.method; - chainableBehavior.method = function () { - var result = method(_method).apply(this, arguments); - return result === undefined ? this : result; - }; -}; - -},{}],26:[function(require,module,exports){ -/*! - * Chai - overwriteMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteMethod (ctx, name, fn) - * - * Overwites an already existing method and provides - * access to previous function. Must return function - * to be used for name. - * - * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { - * return function (str) { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.value).to.equal(str); - * } else { - * _super.apply(this, arguments); - * } - * } - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteMethod('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.equal('bar'); - * - * @param {Object} ctx object whose method is to be overwritten - * @param {String} name of method to overwrite - * @param {Function} method function that returns a function to be used for name - * @namespace Utils - * @name overwriteMethod - * @api public - */ - -module.exports = function (ctx, name, method) { - var _method = ctx[name] - , _super = function () { return this; }; - - if (_method && 'function' === typeof _method) - _super = _method; - - ctx[name] = function () { - var result = method(_super).apply(this, arguments); - return result === undefined ? this : result; - } -}; - -},{}],27:[function(require,module,exports){ -/*! - * Chai - overwriteProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteProperty (ctx, name, fn) - * - * Overwites an already existing property getter and provides - * access to previous value. Must return function to use as getter. - * - * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { - * return function () { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.name).to.equal('bar'); - * } else { - * _super.call(this); - * } - * } - * }); - * - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteProperty('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.be.ok; - * - * @param {Object} ctx object whose property is to be overwritten - * @param {String} name of property to overwrite - * @param {Function} getter function that returns a getter function to be used for name - * @namespace Utils - * @name overwriteProperty - * @api public - */ - -module.exports = function (ctx, name, getter) { - var _get = Object.getOwnPropertyDescriptor(ctx, name) - , _super = function () {}; - - if (_get && 'function' === typeof _get.get) - _super = _get.get - - Object.defineProperty(ctx, name, - { get: function () { - var result = getter(_super).call(this); - return result === undefined ? this : result; - } - , configurable: true - }); -}; - -},{}],28:[function(require,module,exports){ -/*! - * Chai - test utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var flag = require('./flag'); - -/** - * # test(object, expression) - * - * Test and object for expression. - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - * @namespace Utils - * @name test - */ - -module.exports = function (obj, args) { - var negate = flag(obj, 'negate') - , expr = args[0]; - return negate ? !expr : expr; -}; - -},{"./flag":13}],29:[function(require,module,exports){ -/*! - * Chai - transferFlags utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### transferFlags(assertion, object, includeAll = true) - * - * Transfer all the flags for `assertion` to `object`. If - * `includeAll` is set to `false`, then the base Chai - * assertion flags (namely `object`, `ssfi`, and `message`) - * will not be transferred. - * - * - * var newAssertion = new Assertion(); - * utils.transferFlags(assertion, newAssertion); - * - * var anotherAsseriton = new Assertion(myObj); - * utils.transferFlags(assertion, anotherAssertion, false); - * - * @param {Assertion} assertion the assertion to transfer the flags from - * @param {Object} object the object to transfer the flags to; usually a new assertion - * @param {Boolean} includeAll - * @namespace Utils - * @name transferFlags - * @api private - */ - -module.exports = function (assertion, object, includeAll) { - var flags = assertion.__flags || (assertion.__flags = Object.create(null)); - - if (!object.__flags) { - object.__flags = Object.create(null); - } - - includeAll = arguments.length === 3 ? includeAll : true; - - for (var flag in flags) { - if (includeAll || - (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) { - object.__flags[flag] = flags[flag]; - } - } -}; - -},{}],30:[function(require,module,exports){ -/*! - * assertion-error - * Copyright(c) 2013 Jake Luer - * MIT Licensed - */ - -/*! - * Return a function that will copy properties from - * one object to another excluding any originally - * listed. Returned function will create a new `{}`. - * - * @param {String} excluded properties ... - * @return {Function} - */ - -function exclude () { - var excludes = [].slice.call(arguments); - - function excludeProps (res, obj) { - Object.keys(obj).forEach(function (key) { - if (!~excludes.indexOf(key)) res[key] = obj[key]; - }); - } - - return function extendExclude () { - var args = [].slice.call(arguments) - , i = 0 - , res = {}; - - for (; i < args.length; i++) { - excludeProps(res, args[i]); - } - - return res; - }; -}; - -/*! - * Primary Exports - */ - -module.exports = AssertionError; - -/** - * ### AssertionError - * - * An extension of the JavaScript `Error` constructor for - * assertion and validation scenarios. - * - * @param {String} message - * @param {Object} properties to include (optional) - * @param {callee} start stack function (optional) - */ - -function AssertionError (message, _props, ssf) { - var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON') - , props = extend(_props || {}); - - // default values - this.message = message || 'Unspecified AssertionError'; - this.showDiff = false; - - // copy from properties - for (var key in props) { - this[key] = props[key]; - } - - // capture stack trace - ssf = ssf || arguments.callee; - if (ssf && Error.captureStackTrace) { - Error.captureStackTrace(this, ssf); - } else { - this.stack = new Error().stack; - } -} - -/*! - * Inherit from Error.prototype - */ - -AssertionError.prototype = Object.create(Error.prototype); - -/*! - * Statically set name - */ - -AssertionError.prototype.name = 'AssertionError'; - -/*! - * Ensure correct constructor - */ - -AssertionError.prototype.constructor = AssertionError; - -/** - * Allow errors to be converted to JSON for static transfer. - * - * @param {Boolean} include stack (default: `true`) - * @return {Object} object that can be `JSON.stringify` - */ - -AssertionError.prototype.toJSON = function (stack) { - var extend = exclude('constructor', 'toJSON', 'stack') - , props = extend({ name: this.name }, this); - - // include stack if exists and not turned off - if (false !== stack && this.stack) { - props.stack = this.stack; - } - - return props; -}; - -},{}],31:[function(require,module,exports){ -module.exports = require('./lib/eql'); - -},{"./lib/eql":32}],32:[function(require,module,exports){ -/*! - * deep-eql - * Copyright(c) 2013 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependencies - */ - -var type = require('type-detect'); - -/*! - * Buffer.isBuffer browser shim - */ - -var Buffer; -try { Buffer = require('buffer').Buffer; } -catch(ex) { - Buffer = {}; - Buffer.isBuffer = function() { return false; } -} - -/*! - * Primary Export - */ - -module.exports = deepEqual; - -/** - * Assert super-strict (egal) equality between - * two objects of any type. - * - * @param {Mixed} a - * @param {Mixed} b - * @param {Array} memoised (optional) - * @return {Boolean} equal match - */ - -function deepEqual(a, b, m) { - if (sameValue(a, b)) { - return true; - } else if ('date' === type(a)) { - return dateEqual(a, b); - } else if ('regexp' === type(a)) { - return regexpEqual(a, b); - } else if (Buffer.isBuffer(a)) { - return bufferEqual(a, b); - } else if ('arguments' === type(a)) { - return argumentsEqual(a, b, m); - } else if (!typeEqual(a, b)) { - return false; - } else if (('object' !== type(a) && 'object' !== type(b)) - && ('array' !== type(a) && 'array' !== type(b))) { - return sameValue(a, b); - } else { - return objectEqual(a, b, m); - } -} - -/*! - * Strict (egal) equality test. Ensures that NaN always - * equals NaN and `-0` does not equal `+0`. - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} equal match - */ - -function sameValue(a, b) { - if (a === b) return a !== 0 || 1 / a === 1 / b; - return a !== a && b !== b; -} - -/*! - * Compare the types of two given objects and - * return if they are equal. Note that an Array - * has a type of `array` (not `object`) and arguments - * have a type of `arguments` (not `array`/`object`). - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function typeEqual(a, b) { - return type(a) === type(b); -} - -/*! - * Compare two Date objects by asserting that - * the time values are equal using `saveValue`. - * - * @param {Date} a - * @param {Date} b - * @return {Boolean} result - */ - -function dateEqual(a, b) { - if ('date' !== type(b)) return false; - return sameValue(a.getTime(), b.getTime()); -} - -/*! - * Compare two regular expressions by converting them - * to string and checking for `sameValue`. - * - * @param {RegExp} a - * @param {RegExp} b - * @return {Boolean} result - */ - -function regexpEqual(a, b) { - if ('regexp' !== type(b)) return false; - return sameValue(a.toString(), b.toString()); -} - -/*! - * Assert deep equality of two `arguments` objects. - * Unfortunately, these must be sliced to arrays - * prior to test to ensure no bad behavior. - * - * @param {Arguments} a - * @param {Arguments} b - * @param {Array} memoize (optional) - * @return {Boolean} result - */ - -function argumentsEqual(a, b, m) { - if ('arguments' !== type(b)) return false; - a = [].slice.call(a); - b = [].slice.call(b); - return deepEqual(a, b, m); -} - -/*! - * Get enumerable properties of a given object. - * - * @param {Object} a - * @return {Array} property names - */ - -function enumerable(a) { - var res = []; - for (var key in a) res.push(key); - return res; -} - -/*! - * Simple equality for flat iterable objects - * such as Arrays or Node.js buffers. - * - * @param {Iterable} a - * @param {Iterable} b - * @return {Boolean} result - */ - -function iterableEqual(a, b) { - if (a.length !== b.length) return false; - - var i = 0; - var match = true; - - for (; i < a.length; i++) { - if (a[i] !== b[i]) { - match = false; - break; - } - } - - return match; -} - -/*! - * Extension to `iterableEqual` specifically - * for Node.js Buffers. - * - * @param {Buffer} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function bufferEqual(a, b) { - if (!Buffer.isBuffer(b)) return false; - return iterableEqual(a, b); -} - -/*! - * Block for `objectEqual` ensuring non-existing - * values don't get in. - * - * @param {Mixed} object - * @return {Boolean} result - */ - -function isValue(a) { - return a !== null && a !== undefined; -} - -/*! - * Recursively check the equality of two objects. - * Once basic sameness has been established it will - * defer to `deepEqual` for each enumerable key - * in the object. - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function objectEqual(a, b, m) { - if (!isValue(a) || !isValue(b)) { - return false; - } - - if (a.prototype !== b.prototype) { - return false; - } - - var i; - if (m) { - for (i = 0; i < m.length; i++) { - if ((m[i][0] === a && m[i][1] === b) - || (m[i][0] === b && m[i][1] === a)) { - return true; - } - } - } else { - m = []; - } - - try { - var ka = enumerable(a); - var kb = enumerable(b); - } catch (ex) { - return false; - } - - ka.sort(); - kb.sort(); - - if (!iterableEqual(ka, kb)) { - return false; - } - - m.push([ a, b ]); - - var key; - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!deepEqual(a[key], b[key], m)) { - return false; - } - } - - return true; -} - -},{"buffer":undefined,"type-detect":33}],33:[function(require,module,exports){ -module.exports = require('./lib/type'); - -},{"./lib/type":34}],34:[function(require,module,exports){ -/*! - * type-detect - * Copyright(c) 2013 jake luer - * MIT Licensed - */ - -/*! - * Primary Exports - */ - -var exports = module.exports = getType; - -/*! - * Detectable javascript natives - */ - -var natives = { - '[object Array]': 'array' - , '[object RegExp]': 'regexp' - , '[object Function]': 'function' - , '[object Arguments]': 'arguments' - , '[object Date]': 'date' -}; - -/** - * ### typeOf (obj) - * - * Use several different techniques to determine - * the type of object being tested. - * - * - * @param {Mixed} object - * @return {String} object type - * @api public - */ - -function getType (obj) { - var str = Object.prototype.toString.call(obj); - if (natives[str]) return natives[str]; - if (obj === null) return 'null'; - if (obj === undefined) return 'undefined'; - if (obj === Object(obj)) return 'object'; - return typeof obj; -} - -exports.Library = Library; - -/** - * ### Library - * - * Create a repository for custom type detection. - * - * ```js - * var lib = new type.Library; - * ``` - * - */ - -function Library () { - this.tests = {}; -} - -/** - * #### .of (obj) - * - * Expose replacement `typeof` detection to the library. - * - * ```js - * if ('string' === lib.of('hello world')) { - * // ... - * } - * ``` - * - * @param {Mixed} object to test - * @return {String} type - */ - -Library.prototype.of = getType; - -/** - * #### .define (type, test) - * - * Add a test to for the `.test()` assertion. - * - * Can be defined as a regular expression: - * - * ```js - * lib.define('int', /^[0-9]+$/); - * ``` - * - * ... or as a function: - * - * ```js - * lib.define('bln', function (obj) { - * if ('boolean' === lib.of(obj)) return true; - * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; - * if ('string' === lib.of(obj)) obj = obj.toLowerCase(); - * return !! ~blns.indexOf(obj); - * }); - * ``` - * - * @param {String} type - * @param {RegExp|Function} test - * @api public - */ - -Library.prototype.define = function (type, test) { - if (arguments.length === 1) return this.tests[type]; - this.tests[type] = test; - return this; -}; - -/** - * #### .test (obj, test) - * - * Assert that an object is of type. Will first - * check natives, and if that does not pass it will - * use the user defined custom tests. - * - * ```js - * assert(lib.test('1', 'int')); - * assert(lib.test('yes', 'bln')); - * ``` - * - * @param {Mixed} object - * @param {String} type - * @return {Boolean} result - * @api public - */ - -Library.prototype.test = function (obj, type) { - if (type === getType(obj)) return true; - var test = this.tests[type]; - - if (test && 'regexp' === getType(test)) { - return test.test(obj); - } else if (test && 'function' === getType(test)) { - return test(obj); - } else { - throw new ReferenceError('Type test "' + type + '" not defined or invalid.'); - } -}; - -},{}],35:[function(require,module,exports){ -arguments[4][33][0].apply(exports,arguments) -},{"./lib/type":36,"dup":33}],36:[function(require,module,exports){ -/*! - * type-detect - * Copyright(c) 2013 jake luer - * MIT Licensed - */ - -/*! - * Primary Exports - */ - -var exports = module.exports = getType; - -/** - * ### typeOf (obj) - * - * Use several different techniques to determine - * the type of object being tested. - * - * - * @param {Mixed} object - * @return {String} object type - * @api public - */ -var objectTypeRegexp = /^\[object (.*)\]$/; - -function getType(obj) { - var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase(); - // Let "new String('')" return 'object' - if (typeof Promise === 'function' && obj instanceof Promise) return 'promise'; - // PhantomJS has type "DOMWindow" for null - if (obj === null) return 'null'; - // PhantomJS has type "DOMWindow" for undefined - if (obj === undefined) return 'undefined'; - return type; -} - -exports.Library = Library; - -/** - * ### Library - * - * Create a repository for custom type detection. - * - * ```js - * var lib = new type.Library; - * ``` - * - */ - -function Library() { - if (!(this instanceof Library)) return new Library(); - this.tests = {}; -} - -/** - * #### .of (obj) - * - * Expose replacement `typeof` detection to the library. - * - * ```js - * if ('string' === lib.of('hello world')) { - * // ... - * } - * ``` - * - * @param {Mixed} object to test - * @return {String} type - */ - -Library.prototype.of = getType; - -/** - * #### .define (type, test) - * - * Add a test to for the `.test()` assertion. - * - * Can be defined as a regular expression: - * - * ```js - * lib.define('int', /^[0-9]+$/); - * ``` - * - * ... or as a function: - * - * ```js - * lib.define('bln', function (obj) { - * if ('boolean' === lib.of(obj)) return true; - * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; - * if ('string' === lib.of(obj)) obj = obj.toLowerCase(); - * return !! ~blns.indexOf(obj); - * }); - * ``` - * - * @param {String} type - * @param {RegExp|Function} test - * @api public - */ - -Library.prototype.define = function(type, test) { - if (arguments.length === 1) return this.tests[type]; - this.tests[type] = test; - return this; -}; - -/** - * #### .test (obj, test) - * - * Assert that an object is of type. Will first - * check natives, and if that does not pass it will - * use the user defined custom tests. - * - * ```js - * assert(lib.test('1', 'int')); - * assert(lib.test('yes', 'bln')); - * ``` - * - * @param {Mixed} object - * @param {String} type - * @return {Boolean} result - * @api public - */ - -Library.prototype.test = function(obj, type) { - if (type === getType(obj)) return true; - var test = this.tests[type]; - - if (test && 'regexp' === getType(test)) { - return test.test(obj); - } else if (test && 'function' === getType(test)) { - return test(obj); - } else { - throw new ReferenceError('Type test "' + type + '" not defined or invalid.'); - } -}; - -},{}]},{},[1])(1) -}); -/*! - * jQuery JavaScript Library v2.2.4 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-05-20T17:23Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Support: Firefox 18+ -// Can't be in strict mode, several libs including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -//"use strict"; -var arr = []; - -var document = window.document; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - version = "2.2.4", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = jQuery.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - // adding 1 corrects loss of precision from parseFloat (#15100) - var realStringObj = obj && obj.toString(); - return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; - }, - - isPlainObject: function( obj ) { - var key; - - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call( obj, "constructor" ) && - !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) { - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android<4.0, iOS<6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf( "use strict" ) === 1 ) { - script = document.createElement( "script" ); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE9-11+ - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android<4.1 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -// JSHint would error on this code due to the Symbol not being defined in ES5. -// Defining this global in .jshintrc would create a danger of using the global -// unguarded in another place, it seems safer to just disable JSHint for these -// three lines. -/* jshint ignore: start */ -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} -/* jshint ignore: end */ - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: iOS 8.2 (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.2.1 - * http://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2015-10-17 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // http://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, nidselect, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; - while ( i-- ) { - groups[i] = nidselect + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, parent, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( (parent = document.defaultView) && parent.top !== parent ) { - // Support: IE 11 - if ( parent.addEventListener ) { - parent.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( document.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var m = context.getElementById( id ); - return m ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - docElem.appendChild( div ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibing-combinator selector` fails - if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - !compilerCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( (oldCache = uniqueCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - } ); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - // Support: Blackberry 4.6 - // gEBID returns nodes no longer in the document (#6963) - if ( elem && elem.parentNode ) { - - // Inject the element directly into the jQuery object - this.length = 1; - this[ 0 ] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( pos ? - pos.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnotwhite = ( /\S+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], - [ "notify", "progress", jQuery.Callbacks( "memory" ) ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this === promise ? newDefer.promise() : this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( function() { - - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || - ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. - // If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // Add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .progress( updateFunc( i, progressContexts, progressValues ) ) - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ); - } else { - --remaining; - } - } - } - - // If we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -} ); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -} ); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called - // after the browser event has already occurred. - // Support: IE9-10 only - // Older IE sometimes signals "interactive" too soon - if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[ 0 ], key ) : emptyGet; -}; -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - register: function( owner, initial ) { - var value = initial || {}; - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable, non-writable property - // configurability must be true to allow the property to be - // deleted with the delete operator - } else { - Object.defineProperty( owner, this.expando, { - value: value, - writable: true, - configurable: true - } ); - } - return owner[ this.expando ]; - }, - cache: function( owner ) { - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( !acceptData( owner ) ) { - return {}; - } - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - owner[ this.expando ] && owner[ this.expando ][ key ]; - }, - access: function( owner, key, value ) { - var stored; - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase( key ) ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key === undefined ) { - this.register( owner ); - - } else { - - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <= 35-45+ - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://code.google.com/p/chromium/issues/detail?id=378607 - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data, camelKey; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // with the key as-is - data = dataUser.get( elem, key ) || - - // Try to find dashed key if it exists (gh-2779) - // This is for 2.2.x only - dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() ); - - if ( data !== undefined ) { - return data; - } - - camelKey = jQuery.camelCase( key ); - - // Attempt to get data from the cache - // with the key camelized - data = dataUser.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - camelKey = jQuery.camelCase( key ); - this.each( function() { - - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = dataUser.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - dataUser.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf( "-" ) > -1 && data !== undefined ) { - dataUser.set( this, key, value ); - } - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || - !jQuery.contains( elem.ownerDocument, elem ); - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, - scale = 1, - maxIterations = 20, - currentValue = tween ? - function() { return tween.cur(); } : - function() { return jQuery.css( elem, prop, "" ); }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - do { - - // If previous iteration zeroed out, double until we get *something*. - // Use string for doubling so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - initialInUnit = initialInUnit / scale; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // Break the loop if scale is unchanged or perfect, or if we've just had enough. - } while ( - scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations - ); - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([\w:-]+)/ ); - -var rscriptType = ( /^$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE9 - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
    " ], - col: [ 2, "", "
    " ], - tr: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - - _default: [ 0, "", "" ] -}; - -// Support: IE9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE9-11+ - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== "undefined" ? - context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0-4.3, Safari<=5.1 - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari<=5.1, Android<4.2 - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<=11+ - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE9 -// See #13393 for more info -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Support (at least): Chrome, IE9 - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // - // Support: Firefox<=42+ - // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) - if ( delegateCount && cur.nodeType && - ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push( { elem: cur, handlers: matches } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + - "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split( " " ), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " + - "screenX screenY toElement" ).split( " " ), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + - ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + - ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome<28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android<4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://code.google.com/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, - - // Support: IE 10-11, Edge 10240+ - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName( "tbody" )[ 0 ] || - elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <= 35-45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <= 35-45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - - // Keep domManip exposed until 3.0 (gh-2225) - domManip: domManip, - - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); - - -var iframe, - elemdisplay = { - - // Support: Firefox - // We have to pre-define these values for FF (#10227) - HTML: "block", - BODY: "block" - }; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ - -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - display = jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = ( iframe || jQuery( "