<!DOCTYPE html> <html lang="en"> <head> <meta...
Creato il: 27 gennaio 2026
Risposto usando GPT-5.2 Thinking da Chat01
Creato il: 27 gennaio 2026
Risposto usando GPT-5.2 Thinking da Chat01
</body> </html>text<h2>Draw a complex continuous shape to verify biological signature.</h2> <canvas id="pad" width="600" height="400"></canvas> <div id="status">Waiting for input...</div> <button id="verifyBtn" onclick="window.checkTrace()">VERIFY IDENTITY</button> </div> <script> var Module = { onRuntimeInitialized: function() { const statusEl = document.getElementById('status'); if(statusEl) { statusEl.innerText = "System Ready. Waiting for input..."; statusEl.style.color = "green"; } console.log("Wasm Runtime Initialized!"); } }; </script> <script src="verify.js"></script> <script> document.addEventListener('DOMContentLoaded', () => { const canvas = document.getElementById('pad'); const ctx = canvas.getContext('2d'); const statusEl = document.getElementById('status'); const btn = document.getElementById('verifyBtn'); let isDrawing = false; let points = { x: [], y: [] }; ctx.lineWidth = 2; ctx.lineCap = 'round'; ctx.lineJoin = 'round'; canvas.addEventListener('mousedown', e => { isDrawing = true; points = { x: [], y: [] }; ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.beginPath(); ctx.moveTo(e.offsetX, e.offsetY); statusEl.innerText = "Recording bio-metrics..."; statusEl.style.color = "#000"; }); canvas.addEventListener('mousemove', e => { if (!isDrawing) return; ctx.lineTo(e.offsetX, e.offsetY); ctx.strokeStyle = '#ff0000'; ctx.stroke(); points.x.push(e.offsetX); points.y.push(e.offsetY); }); canvas.addEventListener('mouseup', () => { isDrawing = false; }); canvas.addEventListener('mouseleave', () => { isDrawing = false; }); window.runWasmCheck = function() { try { const len = points.x.length; const bytesPerElement = 4; const xPtr = Module._malloc(len * bytesPerElement); const yPtr = Module._malloc(len * bytesPerElement); for (let i = 0; i < len; i++) { Module.setValue(xPtr + (i * 4), points.x[i], 'i32'); Module.setValue(yPtr + (i * 4), points.y[i], 'i32'); } const resultPtr = Module.ccall( 'verify_human', 'number', ['number', 'number', 'number'], [xPtr, yPtr, len] ); const resultStr = Module.UTF8ToString(resultPtr); statusEl.innerText = resultStr; if (resultStr.startsWith("UniCTF")) { statusEl.style.color = "green"; } else { statusEl.style.color = "red"; } Module._free(xPtr); Module._free(yPtr); } catch (e) { console.error(e); statusEl.innerText = "System Error: " + e.message; } finally { btn.disabled = false; } }; window.checkTrace = function() { if (typeof Module === 'undefined' || !Module.ccall) { statusEl.innerText = "Error: Wasm Module not loaded."; statusEl.style.color = "red"; return; } if (points.x.length < 50) { statusEl.innerText = "Error: Trace too short."; statusEl.style.color = "red"; return; } statusEl.innerText = "Analyzing neural micro-tremors..."; btn.disabled = true; setTimeout(window.runWasmCheck, 50); }; }); </script>
// include: shell.js
// include: minimum_runtime_check.js
// end include: minimum_runtime_check.js
// The Module object: Our interface to the outside world. We import
// and export values on it. There are various ways Module can be used:
// 1. Not defined. We create it here
// 2. A function parameter, function(moduleArg) => Promise<Module>
// 3. pre-run appended it, var Module = {}; ..generated code..
// 4. External script tag defines var Module.
// We need to check if Module already exists (e.g. case 3 above).
// Substitution will be replaced with actual code on later stage of the build,
// this way Closure Compiler will not mangle it (e.g. case 4. above).
// Note that if you want to run closure, and also to use Module
// after the generated code, you will need to define var Module = {};
// before the code. Then that object will be used in the code, and you
// can continue to use Module afterwards as well.
var Module = typeof Module != 'undefined' ? Module : {};
// Determine the runtime environment we are in. You can customize this by
// setting the ENVIRONMENT setting at compile time (see settings.js).
// Attempt to auto-detect the environment
var ENVIRONMENT_IS_WEB = !!globalThis.window;
var ENVIRONMENT_IS_WORKER = !!globalThis.WorkerGlobalScope;
// N.b. Electron.js environment is simultaneously a NODE-environment, but
// also a web environment.
var ENVIRONMENT_IS_NODE = globalThis.process?.versions?.node && globalThis.process?.type != 'renderer';
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
// --pre-jses are emitted after the Module integration code, so that they can
// refer to Module (if they choose; they can also define Module)
var arguments_ = [];
var thisProgram = './this.program';
var quit_ = (status, toThrow) => {
throw toThrow;
};
// In MODULARIZE mode _scriptName needs to be captured already at the very top of the page immediately when the page is parsed, so it is generated there
// before the page load. In non-MODULARIZE modes generate it here.
var _scriptName = globalThis.document?.currentScript?.src;
if (typeof __filename != 'undefined') { // Node
_scriptName = __filename;
} else
if (ENVIRONMENT_IS_WORKER) {
_scriptName = self.location.href;
}
// / should be present at the end if scriptDirectory is not empty
var scriptDirectory = '';
function locateFile(path) {
if (Module['locateFile']) {
return Module['locateFile'](path, scriptDirectory);
}
return scriptDirectory + path;
}
// Hooks that are implemented differently in different runtime environments.
var readAsync, readBinary;
if (ENVIRONMENT_IS_NODE) {
// These modules will usually be used on Node.js. Load them eagerly to avoid
// the complexity of lazy-loading.
var fs = require('fs');
scriptDirectory = __dirname + '/';
// include: node_shell_read.js
readBinary = (filename) => {
// We need to re-wrap file:// strings to URLs.
filename = isFileURI(filename) ? new URL(filename) : filename;
var ret = fs.readFileSync(filename);
return ret;
};
readAsync = async (filename, binary = true) => {
// See the comment in the readBinary function.
filename = isFileURI(filename) ? new URL(filename) : filename;
var ret = fs.readFileSync(filename, binary ? undefined : 'utf8');
return ret;
};
// end include: node_shell_read.js
if (process.argv.length > 1) {
thisProgram = process.argv[1].replace(/\/g, '/');
}
arguments_ = process.argv.slice(2);
// MODULARIZE will export the module in the proper place outside, we don't need to export here
if (typeof module != 'undefined') {
module['exports'] = Module;
}
quit_ = (status, toThrow) => {
process.exitCode = status;
throw toThrow;
};
} else
// Note that this includes Node.js workers when relevant (pthreads is enabled).
// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and
// ENVIRONMENT_IS_NODE.
if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
try {
scriptDirectory = new URL('.', _scriptName).href; // includes trailing slash
} catch {
// Must be a blob: or data: URL (e.g. blob:http://site.com/etc/etc), we cannot
// infer anything from them.
}
{
// include: web_or_worker_shell_read.js
if (ENVIRONMENT_IS_WORKER) {
readBinary = (url) => {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, false);
xhr.responseType = 'arraybuffer';
xhr.send(null);
return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response));
};
}
readAsync = async (url) => {
// Fetch has some additional restrictions over XHR, like it can't be used on a file:// url.
// See https://github.com/github/fetch/pull/92#issuecomment-140665932
// Cordova or Electron apps are typically loaded from a file:// url.
// So use XHR on webview if URL is a file URL.
if (isFileURI(url)) {
return new Promise((resolve, reject) => {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'arraybuffer';
xhr.onload = () => {
if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0
resolve(xhr.response);
return;
}
reject(xhr.status);
};
xhr.onerror = reject;
xhr.send(null);
});
}
var response = await fetch(url, { credentials: 'same-origin' });
if (response.ok) {
return response.arrayBuffer();
}
throw new Error(response.status + ' : ' + response.url);
};
// end include: web_or_worker_shell_read.js
}
} else
{
}
var out = console.log.bind(console);
var err = console.error.bind(console);
// end include: shell.js
// include: preamble.js
// === 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
var wasmBinary;
// Wasm globals
//========================================
// Runtime essentials
//========================================
// whether we are quitting the application. no code should run after this.
// set in exit() and abort()
var ABORT = false;
// set by exit() and abort(). Passed to 'onExit' handler.
// NOTE: This is also used as the process return code in shell environments
// but only when noExitRuntime is false.
var EXITSTATUS;
// In STRICT mode, we only define assert() when ASSERTIONS is set. i.e. we
// don't define it at all in release modes. This matches the behaviour of
// MINIMAL_RUNTIME.
// TODO(sbc): Make this the default even without STRICT enabled.
/** @type {function(*, string=)} */
function assert(condition, text) {
if (!condition) {
// This build was created without ASSERTIONS defined. assert() should not
// ever be called in this configuration but in case there are callers in
// the wild leave this simple abort() implementation here for now.
abort(text);
}
}
/**
// include: runtime_common.js
// include: runtime_stack_check.js
// end include: runtime_stack_check.js
// include: runtime_exceptions.js
// end include: runtime_exceptions.js
// include: runtime_debug.js
// end include: runtime_debug.js
// Memory management
var
/** @type {!Int8Array} /
HEAP8,
/* @type {!Uint8Array} /
HEAPU8,
/* @type {!Int16Array} /
HEAP16,
/* @type {!Uint16Array} /
HEAPU16,
/* @type {!Int32Array} /
HEAP32,
/* @type {!Uint32Array} /
HEAPU32,
/* @type {!Float32Array} /
HEAPF32,
/* @type {!Float64Array} */
HEAPF64;
// BigInt64Array type is not correctly defined in closure
var
/** not-@type {!BigInt64Array} /
HEAP64,
/ BigUint64Array type is not correctly defined in closure
/** not-@type {!BigUint64Array} */
HEAPU64;
var runtimeInitialized = false;
function updateMemoryViews() {
var b = wasmMemory.buffer;
HEAP8 = new Int8Array(b);
HEAP16 = new Int16Array(b);
HEAPU8 = new Uint8Array(b);
HEAPU16 = new Uint16Array(b);
HEAP32 = new Int32Array(b);
HEAPU32 = new Uint32Array(b);
HEAPF32 = new Float32Array(b);
HEAPF64 = new Float64Array(b);
HEAP64 = new BigInt64Array(b);
HEAPU64 = new BigUint64Array(b);
}
// include: memoryprofiler.js
// end include: memoryprofiler.js
// end include: runtime_common.js
function preRun() {
if (Module['preRun']) {
if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];
while (Module['preRun'].length) {
addOnPreRun(Module['preRun'].shift());
}
}
// Begin ATPRERUNS hooks
callRuntimeCallbacks(onPreRuns);
// End ATPRERUNS hooks
}
function initRuntime() {
runtimeInitialized = true;
// No ATINITS hooks
wasmExports'__wasm_call_ctors';
// No ATPOSTCTORS hooks
}
function postRun() {
// PThreads reuse the runtime from the main thread.
if (Module['postRun']) {
if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];
while (Module['postRun'].length) {
addOnPostRun(Module['postRun'].shift());
}
}
// Begin ATPOSTRUNS hooks
callRuntimeCallbacks(onPostRuns);
// End ATPOSTRUNS hooks
}
/** @param {string|number=} what */
function abort(what) {
Module['onAbort']?.(what);
what = 'Aborted(' + what + ')';
// TODO(sbc): Should we remove printing and leave it up to whoever
// catches the exception?
err(what);
ABORT = true;
what += '. Build with -sASSERTIONS for more info.';
// Use a wasm runtime error, because a JS error might be seen as a foreign
// exception, which means we'd run destructors on it. We need the error to
// simply make the program stop.
// FIXME This approach does not work in Wasm EH because it currently does not assume
// all RuntimeErrors are from traps; it decides whether a RuntimeError is from
// a trap or not based on a hidden field within the object. So at the moment
// we don't have a way of throwing a wasm trap from JS. TODO Make a JS API that
// allows this in the wasm spec.
// Suppress closure compiler warning here. Closure compiler's builtin extern
// definition for WebAssembly.RuntimeError claims it takes no arguments even
// though it can.
// TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed.
/** @suppress {checkTypes} */
var e = new WebAssembly.RuntimeError(what);
// Throw the error whether or not MODULARIZE is set because abort is used
// in code paths apart from instantiation where an exception is expected
// to be thrown when abort is called.
throw e;
}
var wasmBinaryFile;
function findWasmBinary() {
return locateFile('verify.wasm');
}
function getBinarySync(file) {
if (file == wasmBinaryFile && wasmBinary) {
return new Uint8Array(wasmBinary);
}
if (readBinary) {
return readBinary(file);
}
// Throwing a plain string here, even though it not normally advisable since
// this gets turning into an abort in instantiateArrayBuffer.
throw 'both async and sync fetching of the wasm failed';
}
async function getWasmBinary(binaryFile) {
// If we don't have the binary yet, load it asynchronously using readAsync.
if (!wasmBinary) {
// Fetch the binary using readAsync
try {
var response = await readAsync(binaryFile);
return new Uint8Array(response);
} catch {
// Fall back to getBinarySync below;
}
}
// Otherwise, getBinarySync should be able to get it synchronously
return getBinarySync(binaryFile);
}
async function instantiateArrayBuffer(binaryFile, imports) {
try {
var binary = await getWasmBinary(binaryFile);
var instance = await WebAssembly.instantiate(binary, imports);
return instance;
} catch (reason) {
err(failed to asynchronously prepare wasm: ${reason});
abort(reason);
}
}
async function instantiateAsync(binary, binaryFile, imports) {
if (!binary
// Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.
&& !isFileURI(binaryFile)
// Avoid instantiateStreaming() on Node.js environment for now, as while
// Node.js v18.1.0 implements it, it does not have a full fetch()
// implementation yet.
//
// Reference:
// https://github.com/emscripten-core/emscripten/pull/16917
&& !ENVIRONMENT_IS_NODE
) {
try {
var response = fetch(binaryFile, { credentials: 'same-origin' });
var instantiationResult = await WebAssembly.instantiateStreaming(response, imports);
return instantiationResult;
} catch (reason) {
// We expect the most common failure cause to be a bad MIME type for the binary,
// in which case falling back to ArrayBuffer instantiation should work.
err(wasm streaming compile failed: ${reason});
err('falling back to ArrayBuffer instantiation');
// fall back of instantiateArrayBuffer below
};
}
return instantiateArrayBuffer(binaryFile, imports);
}
function getWasmImports() {
// prepare imports
var imports = {
'env': wasmImports,
'wasi_snapshot_preview1': wasmImports,
};
return imports;
}
// Create the wasm instance.
// Receives the wasm imports, returns the exports.
async function createWasm() {
// Load the wasm module and create an instance of using native support in the JS engine.
// handle a generated wasm instance, receiving its exports and
// performing other necessary setup
/** @param {WebAssembly.Module=} module*/
function receiveInstance(instance, module) {
wasmExports = instance.exports;
textassignWasmExports(wasmExports); updateMemoryViews(); removeRunDependency('wasm-instantiate'); return wasmExports;
}
addRunDependency('wasm-instantiate');
// Prefer streaming instantiation if available.
function receiveInstantiationResult(result) {
// 'result' is a ResultObject object which has both the module and instance.
// receiveInstance() will swap in the exports (to Module.asm) so they can be called
// TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line.
// When the regression is fixed, can restore the above PTHREADS-enabled path.
return receiveInstance(result['instance']);
}
var info = getWasmImports();
// User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback
// to manually instantiate the Wasm module themselves. This allows pages to
// run the instantiation parallel to any other async startup actions they are
// performing.
// Also pthreads and wasm workers initialize the wasm instance through this
// path.
if (Module['instantiateWasm']) {
return new Promise((resolve, reject) => {
Module['instantiateWasm'](info, (inst, mod) => {
resolve(receiveInstance(inst, mod));
});
});
}
wasmBinaryFile ??= findWasmBinary();
var result = await instantiateAsync(wasmBinary, wasmBinaryFile, info);
var exports = receiveInstantiationResult(result);
return exports;
}
// end include: preamble.js
// Begin JS library code
class ExitStatus {
name = 'ExitStatus';
constructor(status) {
this.message = Program terminated with exit(${status});
this.status = status;
}
}
var callRuntimeCallbacks = (callbacks) => {
while (callbacks.length > 0) {
// Pass the module as the first argument.
callbacks.shift()(Module);
}
};
var onPostRuns = [];
var addOnPostRun = (cb) => onPostRuns.push(cb);
var onPreRuns = [];
var addOnPreRun = (cb) => onPreRuns.push(cb);
var runDependencies = 0;
var dependenciesFulfilled = null;
var removeRunDependency = (id) => {
runDependencies--;
textModule['monitorRunDependencies']?.(runDependencies); if (runDependencies == 0) { if (dependenciesFulfilled) { var callback = dependenciesFulfilled; dependenciesFulfilled = null; callback(); // can add another dependenciesFulfilled } } };
var addRunDependency = (id) => {
runDependencies++;
textModule['monitorRunDependencies']?.(runDependencies); }; /** * @param {number} ptr * @param {string} type */
function getValue(ptr, type = 'i8') {
if (type.endsWith('')) type = '';
switch (type) {
case 'i1': return HEAP8[ptr];
case 'i8': return HEAP8[ptr];
case 'i16': return HEAP16[((ptr)>>1)];
case 'i32': return HEAP32[((ptr)>>2)];
case 'i64': return HEAP64[((ptr)>>3)];
case 'float': return HEAPF32[((ptr)>>2)];
case 'double': return HEAPF64[((ptr)>>3)];
case '*': return HEAPU32[((ptr)>>2)];
default: abort(invalid type for getValue: ${type});
}
}
var noExitRuntime = true;
text/** * @param {number} ptr * @param {number} value * @param {string} type */
function setValue(ptr, value, type = 'i8') {
if (type.endsWith('')) type = '';
switch (type) {
case 'i1': HEAP8[ptr] = value; break;
case 'i8': HEAP8[ptr] = value; break;
case 'i16': HEAP16[((ptr)>>1)] = value; break;
case 'i32': HEAP32[((ptr)>>2)] = value; break;
case 'i64': HEAP64[((ptr)>>3)] = BigInt(value); break;
case 'float': HEAPF32[((ptr)>>2)] = value; break;
case 'double': HEAPF64[((ptr)>>3)] = value; break;
case '*': HEAPU32[((ptr)>>2)] = value; break;
default: abort(invalid type for setValue: ${type});
}
}
var stackRestore = (val) => __emscripten_stack_restore(val);
var stackSave = () => _emscripten_stack_get_current();
var abortOnCannotGrowMemory = (requestedSize) => {
abort('OOM');
};
var _emscripten_resize_heap = (requestedSize) => {
var oldSize = HEAPU8.length;
// With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.
requestedSize >>>= 0;
abortOnCannotGrowMemory(requestedSize);
};
var getCFunc = (ident) => {
var func = Module['_' + ident]; // closure exported function
return func;
};
var writeArrayToMemory = (array, buffer) => {
HEAP8.set(array, buffer);
};
var 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 c = str.charCodeAt(i); // possibly a lead surrogate
if (c <= 0x7F) {
len++;
} else if (c <= 0x7FF) {
len += 2;
} else if (c >= 0xD800 && c <= 0xDFFF) {
len += 4; ++i;
} else {
len += 3;
}
}
return len;
};
var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
// Parameter maxBytesToWrite is not optional. Negative values, 0, null,
// undefined and false each don't write out any bytes.
if (!(maxBytesToWrite > 0))
return 0;
textvar startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. for (var i = 0; i < str.length; ++i) { // 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.codePointAt(i); if (u <= 0x7F) { if (outIdx >= endIdx) break; heap[outIdx++] = u; } else if (u <= 0x7FF) { if (outIdx + 1 >= endIdx) break; heap[outIdx++] = 0xC0 | (u >> 6); heap[outIdx++] = 0x80 | (u & 63); } else if (u <= 0xFFFF) { if (outIdx + 2 >= endIdx) break; heap[outIdx++] = 0xE0 | (u >> 12); heap[outIdx++] = 0x80 | ((u >> 6) & 63); heap[outIdx++] = 0x80 | (u & 63); } else { if (outIdx + 3 >= endIdx) break; heap[outIdx++] = 0xF0 | (u >> 18); heap[outIdx++] = 0x80 | ((u >> 12) & 63); heap[outIdx++] = 0x80 | ((u >> 6) & 63); heap[outIdx++] = 0x80 | (u & 63); // Gotcha: if codePoint is over 0xFFFF, it is represented as a surrogate pair in UTF-16. // We need to manually skip over the second code unit for correct iteration. i++; } } // Null-terminate the pointer to the buffer. heap[outIdx] = 0; return outIdx - startIdx; };
var stringToUTF8 = (str, outPtr, maxBytesToWrite) => {
return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
};
var stackAlloc = (sz) => __emscripten_stack_alloc(sz);
var stringToUTF8OnStack = (str) => {
var size = lengthBytesUTF8(str) + 1;
var ret = stackAlloc(size);
stringToUTF8(str, ret, size);
return ret;
};
var UTF8Decoder = globalThis.TextDecoder && new TextDecoder();
var findStringEnd = (heapOrArray, idx, maxBytesToRead, ignoreNul) => {
var maxIdx = idx + maxBytesToRead;
if (ignoreNul) return maxIdx;
// TextDecoder needs to know the byte length in advance, it doesn't stop on
// null terminator by itself.
// As a tiny code save trick, compare idx against maxIdx using a negation,
// so that maxBytesToRead=undefined/NaN means Infinity.
while (heapOrArray[idx] && !(idx >= maxIdx)) ++idx;
return idx;
};
text/** * Given a pointer 'idx' 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. * heapOrArray is either a regular array, or a JavaScript typed array view. * @param {number=} idx * @param {number=} maxBytesToRead * @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character. * @return {string} */
var UTF8ArrayToString = (heapOrArray, idx = 0, maxBytesToRead, ignoreNul) => {
textvar endPtr = findStringEnd(heapOrArray, idx, maxBytesToRead, ignoreNul); // When using conditional TextDecoder, skip it for short strings as the overhead of the native call is not worth it. if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); } var str = ''; while (idx < endPtr) { // For UTF8 byte structure, see: // http://en.wikipedia.org/wiki/UTF-8#Description // https://www.ietf.org/rfc/rfc2279.txt // https://tools.ietf.org/html/rfc3629 var u0 = heapOrArray[idx++]; if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } var u1 = heapOrArray[idx++] & 63; if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } var u2 = heapOrArray[idx++] & 63; if ((u0 & 0xF0) == 0xE0) { u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; } else { u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63); } if (u0 < 0x10000) { str += String.fromCharCode(u0); } else { var ch = u0 - 0x10000; str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); } } return str; }; /** * 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. * * @param {number} ptr * @param {number=} maxBytesToRead - An optional length that specifies the * maximum number of bytes to read. You can omit this parameter to scan the * string until the first 0 byte. If maxBytesToRead is passed, and the string * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the * string will cut short at that byte index. * @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character. * @return {string} */
var UTF8ToString = (ptr, maxBytesToRead, ignoreNul) => {
return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead, ignoreNul) : '';
};
text/** * @param {string|null=} returnType * @param {Array=} argTypes * @param {Array=} args * @param {Object=} opts */
var ccall = (ident, returnType, argTypes, args, opts) => {
// For fast lookup of conversion functions
var toC = {
'string': (str) => {
var ret = 0;
if (str !== null && str !== undefined && str !== 0) { // null string
ret = stringToUTF8OnStack(str);
}
return ret;
},
'array': (arr) => {
var ret = stackAlloc(arr.length);
writeArrayToMemory(arr, ret);
return ret;
}
};
textfunction convertReturnValue(ret) { if (returnType === 'string') { return UTF8ToString(ret); } if (returnType === 'boolean') return Boolean(ret); return ret; } 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 = stackSave(); cArgs[i] = converter(args[i]); } else { cArgs[i] = args[i]; } } } var ret = func(...cArgs); function onDone(ret) { if (stack !== 0) stackRestore(stack); return convertReturnValue(ret); } ret = onDone(ret); return ret; }; /** * @param {string=} returnType * @param {Array=} argTypes * @param {Object=} opts */
var cwrap = (ident, returnType, argTypes, opts) => {
// When the function takes numbers and returns a number, we can just return
// the original function
var numericArgs = !argTypes || argTypes.every((type) => type === 'number' || type === 'boolean');
var numericRet = returnType !== 'string';
if (numericRet && numericArgs && !opts) {
return getCFunc(ident);
}
return (...args) => ccall(ident, returnType, argTypes, args, opts);
};
// End JS library code
// include: postlibrary.js
// This file is included after the automatically-generated JS library code
// but before the wasm module is created.
{
// Begin ATMODULES hooks
if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];
if (Module['print']) out = Module['print'];
if (Module['printErr']) err = Module['printErr'];
if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];
// End ATMODULES hooks
if (Module['arguments']) arguments_ = Module['arguments'];
if (Module['thisProgram']) thisProgram = Module['thisProgram'];
if (Module['preInit']) {
if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];
while (Module['preInit'].length > 0) {
Module['preInit'].shift()();
}
}
}
// Begin runtime exports
Module['ccall'] = ccall;
Module['cwrap'] = cwrap;
Module['setValue'] = setValue;
Module['UTF8ToString'] = UTF8ToString;
// End runtime exports
// Begin JS library exports
// End JS library exports
// end include: postlibrary.js
// Imports from the Wasm binary.
var _verify_human,
_malloc,
_free,
__emscripten_stack_restore,
__emscripten_stack_alloc,
_emscripten_stack_get_current,
memory,
__indirect_function_table,
wasmMemory;
function assignWasmExports(wasmExports) {
_verify_human = Module['_verify_human'] = wasmExports['verify_human'];
_malloc = Module['_malloc'] = wasmExports['malloc'];
_free = Module['_free'] = wasmExports['free'];
__emscripten_stack_restore = wasmExports['_emscripten_stack_restore'];
__emscripten_stack_alloc = wasmExports['_emscripten_stack_alloc'];
_emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'];
memory = wasmMemory = wasmExports['memory'];
__indirect_function_table = wasmExports['__indirect_function_table'];
}
var wasmImports = {
/** @export */
emscripten_resize_heap: _emscripten_resize_heap
};
// include: postamble.js
// === Auto-generated postamble setup entry stuff ===
function run() {
if (runDependencies > 0) {
dependenciesFulfilled = run;
return;
}
preRun();
// a preRun added a dependency, run will be called later
if (runDependencies > 0) {
dependenciesFulfilled = run;
return;
}
function doRun() {
// run may have just been called through dependencies being fulfilled just in this very frame,
// or while the async setStatus time below was happening
Module['calledRun'] = true;
textif (ABORT) return; initRuntime(); Module['onRuntimeInitialized']?.(); postRun();
}
if (Module['setStatus']) {
Module'setStatus';
setTimeout(() => {
setTimeout(() => Module'setStatus', 1);
doRun();
}, 1);
} else
{
doRun();
}
}
var wasmExports;
// With async instantation wasmExports is assigned asynchronously when the
// instance is received.
createWasm();
run();
// end include: postamble.js
(module
(type (;0;) (func (param i32) (result i32)))
(type (;1;) (func))
(type (;2;) (func (param i32 i32 i32) (result i32)))
(type (;3;) (func (param i32)))
(type (;4;) (func (result i32)))
(import "env" "emscripten_resize_heap" (func (;0;) (type 0)))
(func (;1;) (type 1))
(func (;2;) (type 2) (param i32 i32 i32) (result i32)
(local i32 f64 f64 f64 f64 f64 i32 i32 f64 f64 f64 f64 f64 i64)
i32.const 1070
local.set 3
block ;; label = @1
local.get 2
i32.const 50
i32.lt_s
br_if 0 (;@1;)
f64.const 0x0p+0 (;=0;)
local.set 4
f64.const 0x0p+0 (;=0;)
local.set 5
f64.const 0x0p+0 (;=0;)
local.set 6
f64.const 0x0p+0 (;=0;)
local.set 7
f64.const 0x0p+0 (;=0;)
local.set 8
i32.const 1
local.set 3
loop ;; label = @2
local.get 0
local.get 3
local.tee 9
i32.const 2
i32.shl
local.tee 3
i32.add
i32.load
local.get 0
local.get 3
i32.const -4
i32.add
local.tee 10
i32.add
i32.load
i32.sub
f64.convert_i32_s
local.tee 11
local.get 7
f64.sub
local.tee 12
local.get 12
f64.mul
local.get 4
f64.add
local.tee 13
local.set 4
local.get 1
local.get 3
i32.add
i32.load
local.get 1
local.get 10
i32.add
i32.load
i32.sub
f64.convert_i32_s
local.tee 12
local.get 8
f64.sub
local.tee 7
local.get 7
f64.mul
local.get 5
f64.add
local.tee 14
local.set 5
local.get 6
local.get 11
local.get 11
f64.mul
local.get 12
local.get 12
f64.mul
f64.add
f64.sqrt
f64.add
local.tee 15
local.set 6
local.get 11
local.set 7
local.get 12
local.set 8
local.get 9
i32.const 1
i32.add
local.tee 9
local.set 3
local.get 9
local.get 2
i32.ne
br_if 0 (;@2;)
end
local.get 15
local.get 2
f64.convert_i32_u
local.tee 11
f64.div
i64.trunc_sat_f64_u
i64.const 32
i64.shl
i64.const 281470681743360
i64.and
local.get 11
f64.const 0x1.47ae147ae147bp-3 (;=0.16;)
f64.mul
i64.trunc_sat_f64_u
i64.const 48
i64.shl
i64.or
local.get 14
local.get 11
f64.div
local.tee 12
local.get 12
f64.add
i64.trunc_sat_f64_u
i64.const 16
i64.shl
i64.const 4294901760
i64.and
i64.or
local.get 13
local.get 11
f64.div
local.tee 11
local.get 11
f64.add
i64.trunc_sat_f64_u
i64.const 65535
i64.and
i64.or
local.set 16
i32.const 0
local.set 3
loop ;; label = @2
local.get 3
local.tee 3
local.get 3
i32.load8_u offset=1024
local.get 16
i64.const 6364136223846793005
i64.mul
i64.const 1442695040888963407
i64.add
local.tee 16
i64.const 56
i64.shr_u
i32.wrap_i64
i32.xor
i32.store8 offset=1104
local.get 16
local.set 16
local.get 3
i32.const 1
i32.add
local.tee 1
local.set 3
local.get 1
i32.const 46
i32.ne
br_if 0 (;@2;)
end
i32.const 0
i32.const 0
i32.store8 offset=1150
i32.const 1104
local.set 3
end
local.get 3)
(func (;3;) (type 3) (param i32)
local.get 0
global.set 0)
(func (;4;) (type 0) (param i32) (result i32)
(local i32 i32)
global.get 0
local.get 0
i32.sub
i32.const -16
i32.and
local.tee 1
global.set 0
local.get 1)
(func (;5;) (type 4) (result i32)
global.get 0)
(func (;6;) (type 4) (result i32)
memory.size
i32.const 16
i32.shl)
(func (;7;) (type 4) (result i32)
i32.const 1616)
(func (;8;) (type 0) (param i32) (result i32)
(local i64 i32)
block ;; label = @1
block ;; label = @2
local.get 0
i64.extend_i32_u
i64.const 7
i64.add
i64.const 8589934584
i64.and
i32.const 0
i32.load offset=1096
local.tee 0
i64.extend_i32_u
i64.add
local.tee 1
i64.const 4294967295
i64.gt_u
br_if 0 (;@2;)
call 6
local.get 1
i32.wrap_i64
local.tee 2
i32.ge_u
br_if 1 (;@1;)
local.get 2
call 0
br_if 1 (;@1;)
end
call 7
i32.const 48
i32.store
i32.const -1
return
end
i32.const 0
local.get 2
i32.store offset=1096
local.get 0)
(func (;9;) (type 0) (param i32) (result i32)
(local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
global.get 0
i32.const 16
i32.sub
local.tee 1
global.set 0
block ;; label = @1
block ;; label = @2
block ;; label = @3
block ;; label = @4
block ;; label = @5
block ;; label = @6
block ;; label = @7
block ;; label = @8
block ;; label = @9
block ;; label = @10
block ;; label = @11
local.get 0
i32.const 244
i32.gt_u
br_if 0 (;@11;)
block ;; label = @12
i32.const 0
i32.load offset=1620
local.tee 2
i32.const 16
local.get 0
i32.const 11
i32.add
i32.const 504
i32.and
local.get 0
i32.const 11
i32.lt_u
select
local.tee 3
i32.const 3
i32.shr_u
local.tee 4
i32.shr_u
local.tee 0
i32.const 3
i32.and
i32.eqz
br_if 0 (;@12;)
block ;; label = @13
block ;; label = @14
local.get 0
i32.const -1
i32.xor
i32.const 1
i32.and
local.get 4
i32.add
local.tee 5
i32.const 3
i32.shl
local.tee 4
i32.const 1660
i32.add
local.tee 0
local.get 4
i32.load offset=1668
local.tee 3
i32.load offset=8
local.tee 6
i32.ne
br_if 0 (;@14;)
i32.const 0
local.get 2
i32.const -2
local.get 5
i32.rotl
i32.and
i32.store offset=1620
br 1 (;@13;)
end
local.get 6
local.get 0
i32.store offset=12
local.get 0
local.get 6
i32.store offset=8
end
local.get 3
i32.const 8
i32.add
local.set 0
local.get 3
local.get 4
i32.const 3
i32.or
i32.store offset=4
local.get 3
local.get 4
i32.add
local.tee 4
local.get 4
i32.load offset=4
i32.const 1
i32.or
i32.store offset=4
br 11 (;@1;)
end
local.get 3
i32.const 0
i32.load offset=1628
local.tee 7
i32.le_u
br_if 1 (;@10;)
block ;; label = @12
local.get 0
i32.eqz
br_if 0 (;@12;)
block ;; label = @13
block ;; label = @14
local.get 0
local.get 4
i32.shl
i32.const 2
local.get 4
i32.shl
local.tee 0
i32.const 0
local.get 0
i32.sub
i32.or
i32.and
i32.ctz
local.tee 8
i32.const 3
i32.shl
local.tee 4
i32.const 1660
i32.add
local.tee 6
local.get 4
i32.load offset=1668
local.tee 0
i32.load offset=8
local.tee 5
i32.ne
br_if 0 (;@14;)
i32.const 0
local.get 2
i32.const -2
local.get 8
i32.rotl
i32.and
local.tee 2
i32.store offset=1620
br 1 (;@13;)
end
local.get 5
local.get 6
i32.store offset=12
local.get 6
local.get 5
i32.store offset=8
end
local.get 0
local.get 3
i32.const 3
i32.or
i32.store offset=4
local.get 0
local.get 3
i32.add
local.tee 5
local.get 4
local.get 3
i32.sub
local.tee 3
i32.const 1
i32.or
i32.store offset=4
local.get 0
local.get 4
i32.add
local.get 3
i32.store
block ;; label = @13
local.get 7
i32.eqz
br_if 0 (;@13;)
local.get 7
i32.const -8
i32.and
i32.const 1660
i32.add
local.set 6
i32.const 0
i32.load offset=1640
local.set 4
block ;; label = @14
block ;; label = @15
local.get 2
i32.const 1
local.get 7
i32.const 3
i32.shr_u
i32.shl
local.tee 8
i32.and
br_if 0 (;@15;)
i32.const 0
local.get 2
local.get 8
i32.or
i32.store offset=1620
local.get 6
local.set 8
br 1 (;@14;)
end
local.get 6
i32.load offset=8
local.set 8
end
local.get 6
local.get 4
i32.store offset=8
local.get 8
local.get 4
i32.store offset=12
local.get 4
local.get 6
i32.store offset=12
local.get 4
local.get 8
i32.store offset=8
end
local.get 0
i32.const 8
i32.add
local.set 0
i32.const 0
local.get 5
i32.store offset=1640
i32.const 0
local.get 3
i32.store offset=1628
br 11 (;@1;)
end
i32.const 0
i32.load offset=1624
local.tee 9
i32.eqz
br_if 1 (;@10;)
local.get 9
i32.ctz
i32.const 2
i32.shl
i32.load offset=1924
local.tee 6
i32.load offset=4
i32.const -8
i32.and
local.get 3
i32.sub
local.set 4
local.get 6
local.set 5
block ;; label = @12
loop ;; label = @13
block ;; label = @14
local.get 6
i32.load offset=16
local.tee 0
br_if 0 (;@14;)
local.get 6
i32.load offset=20
local.tee 0
i32.eqz
br_if 2 (;@12;)
end
local.get 0
i32.load offset=4
i32.const -8
i32.and
local.get 3
i32.sub
local.tee 6
local.get 4
local.get 6
local.get 4
i32.lt_u
local.tee 6
select
local.set 4
local.get 0
local.get 5
local.get 6
select
local.set 5
local.get 0
local.set 6
br 0 (;@13;)
end
end
local.get 5
i32.load offset=24
local.set 10
block ;; label = @12
local.get 5
i32.load offset=12
local.tee 0
local.get 5
i32.eq
br_if 0 (;@12;)
local.get 5
i32.load offset=8
local.tee 6
local.get 0
i32.store offset=12
local.get 0
local.get 6
i32.store offset=8
br 10 (;@2;)
end
block ;; label = @12
block ;; label = @13
local.get 5
i32.load offset=20
local.tee 6
i32.eqz
br_if 0 (;@13;)
local.get 5
i32.const 20
i32.add
local.set 8
br 1 (;@12;)
end
local.get 5
i32.load offset=16
local.tee 6
i32.eqz
br_if 3 (;@9;)
local.get 5
i32.const 16
i32.add
local.set 8
end
loop ;; label = @12
local.get 8
local.set 11
local.get 6
local.tee 0
i32.const 20
i32.add
local.set 8
local.get 0
i32.load offset=20
local.tee 6
br_if 0 (;@12;)
local.get 0
i32.const 16
i32.add
local.set 8
local.get 0
i32.load offset=16
local.tee 6
br_if 0 (;@12;)
end
local.get 11
i32.const 0
i32.store
br 9 (;@2;)
end
i32.const -1
local.set 3
local.get 0
i32.const -65
i32.gt_u
br_if 0 (;@10;)
local.get 0
i32.const 11
i32.add
local.tee 4
i32.const -8
i32.and
local.set 3
i32.const 0
i32.load offset=1624
local.tee 10
i32.eqz
br_if 0 (;@10;)
i32.const 31
local.set 7
block ;; label = @11
local.get 0
i32.const 16777204
i32.gt_u
br_if 0 (;@11;)
local.get 3
i32.const 38
local.get 4
i32.const 8
i32.shr_u
i32.clz
local.tee 0
i32.sub
i32.shr_u
i32.const 1
i32.and
local.get 0
i32.const 1
i32.shl
i32.sub
i32.const 62
i32.add
local.set 7
end
i32.const 0
local.get 3
i32.sub
local.set 4
block ;; label = @11
block ;; label = @12
block ;; label = @13
block ;; label = @14
local.get 7
i32.const 2
i32.shl
i32.load offset=1924
local.tee 6
br_if 0 (;@14;)
i32.const 0
local.set 0
i32.const 0
local.set 8
br 1 (;@13;)
end
i32.const 0
local.set 0
local.get 3
i32.const 0
i32.const 25
local.get 7
i32.const 1
i32.shr_u
i32.sub
local.get 7
i32.const 31
i32.eq
select
i32.shl
local.set 5
i32.const 0
local.set 8
loop ;; label = @14
block ;; label = @15
local.get 6
i32.load offset=4
i32.const -8
i32.and
local.get 3
i32.sub
local.tee 2
local.get 4
i32.ge_u
br_if 0 (;@15;)
local.get 2
local.set 4
local.get 6
local.set 8
local.get 2
br_if 0 (;@15;)
i32.const 0
local.set 4
local.get 6
local.set 8
local.get 6
local.set 0
br 3 (;@12;)
end
local.get 0
local.get 6
i32.load offset=20
local.tee 2
local.get 2
local.get 6
local.get 5
i32.const 29
i32.shr_u
i32.const 4
i32.and
i32.add
i32.load offset=16
local.tee 11
i32.eq
select
local.get 0
local.get 2
select
local.set 0
local.get 5
i32.const 1
i32.shl
local.set 5
local.get 11
local.set 6
local.get 11
br_if 0 (;@14;)
end
end
block ;; label = @13
local.get 0
local.get 8
i32.or
br_if 0 (;@13;)
i32.const 0
local.set 8
i32.const 2
local.get 7
i32.shl
local.tee 0
i32.const 0
local.get 0
i32.sub
i32.or
local.get 10
i32.and
local.tee 0
i32.eqz
br_if 3 (;@10;)
local.get 0
i32.ctz
i32.const 2
i32.shl
i32.load offset=1924
local.set 0
end
local.get 0
i32.eqz
br_if 1 (;@11;)
end
loop ;; label = @12
local.get 0
i32.load offset=4
i32.const -8
i32.and
local.get 3
i32.sub
local.tee 2
local.get 4
i32.lt_u
local.set 5
block ;; label = @13
local.get 0
i32.load offset=16
local.tee 6
br_if 0 (;@13;)
local.get 0
i32.load offset=20
local.set 6
end
local.get 2
local.get 4
local.get 5
select
local.set 4
local.get 0
local.get 8
local.get 5
select
local.set 8
local.get 6
local.set 0
local.get 6
br_if 0 (;@12;)
end
end
local.get 8
i32.eqz
br_if 0 (;@10;)
local.get 4
i32.const 0
i32.load offset=1628
local.get 3
i32.sub
i32.ge_u
br_if 0 (;@10;)
local.get 8
i32.load offset=24
local.set 11
block ;; label = @11
local.get 8
i32.load offset=12
local.tee 0
local.get 8
i32.eq
br_if 0 (;@11;)
local.get 8
i32.load offset=8
local.tee 6
local.get 0
i32.store offset=12
local.get 0
local.get 6
i32.store offset=8
br 8 (;@3;)
end
block ;; label = @11
block ;; label = @12
local.get 8
i32.load offset=20
local.tee 6
i32.eqz
br_if 0 (;@12;)
local.get 8
i32.const 20
i32.add
local.set 5
br 1 (;@11;)
end
local.get 8
i32.load offset=16
local.tee 6
i32.eqz
br_if 3 (;@8;)
local.get 8
i32.const 16
i32.add
local.set 5
end
loop ;; label = @11
local.get 5
local.set 2
local.get 6
local.tee 0
i32.const 20
i32.add
local.set 5
local.get 0
i32.load offset=20
local.tee 6
br_if 0 (;@11;)
local.get 0
i32.const 16
i32.add
local.set 5
local.get 0
i32.load offset=16
local.tee 6
br_if 0 (;@11;)
end
local.get 2
i32.const 0
i32.store
br 7 (;@3;)
end
block ;; label = @10
i32.const 0
i32.load offset=1628
local.tee 0
local.get 3
i32.lt_u
br_if 0 (;@10;)
i32.const 0
i32.load offset=1640
local.set 4
block ;; label = @11
block ;; label = @12
local.get 0
local.get 3
i32.sub
local.tee 6
i32.const 16
i32.lt_u
br_if 0 (;@12;)
local.get 4
local.get 3
i32.add
local.tee 5
local.get 6
i32.const 1
i32.or
i32.store offset=4
local.get 4
local.get 0
i32.add
local.get 6
i32.store
local.get 4
local.get 3
i32.const 3
i32.or
i32.store offset=4
br 1 (;@11;)
end
local.get 4
local.get 0
i32.const 3
i32.or
i32.store offset=4
local.get 4
local.get 0
i32.add
local.tee 0
local.get 0
i32.load offset=4
i32.const 1
i32.or
i32.store offset=4
i32.const 0
local.set 6
i32.const 0
local.set 5
end
i32.const 0
local.get 6
i32.store offset=1628
i32.const 0
local.get 5
i32.store offset=1640
local.get 4
i32.const 8
i32.add
local.set 0
br 9 (;@1;)
end
block ;; label = @10
i32.const 0
i32.load offset=1632
local.tee 5
local.get 3
i32.le_u
br_if 0 (;@10;)
i32.const 0
local.get 5
local.get 3
i32.sub
local.tee 4
i32.store offset=1632
i32.const 0
i32.const 0
i32.load offset=1644
local.tee 0
local.get 3
i32.add
local.tee 6
i32.store offset=1644
local.get 6
local.get 4
i32.const 1
i32.or
i32.store offset=4
local.get 0
local.get 3
i32.const 3
i32.or
i32.store offset=4
local.get 0
i32.const 8
i32.add
local.set 0
br 9 (;@1;)
end
block ;; label = @10
block ;; label = @11
i32.const 0
i32.load offset=2092
i32.eqz
br_if 0 (;@11;)
i32.const 0
i32.load offset=2100
local.set 4
br 1 (;@10;)
end
i32.const 0
i64.const -1
i64.store offset=2104 align=4
i32.const 0
i64.const 17592186048512
i64.store offset=2096 align=4
i32.const 0
local.get 1
i32.const 12
i32.add
i32.const -16
i32.and
i32.const 1431655768
i32.xor
i32.store offset=2092
i32.const 0
i32.const 0
i32.store offset=2112
i32.const 0
i32.const 0
i32.store offset=2064
i32.const 4096
local.set 4
end
i32.const 0
local.set 0
local.get 4
local.get 3
i32.const 47
i32.add
local.tee 7
i32.add
local.tee 2
i32.const 0
local.get 4
i32.sub
local.tee 11
i32.and
local.tee 8
local.get 3
i32.le_u
br_if 8 (;@1;)
i32.const 0
local.set 0
block ;; label = @10
i32.const 0
i32.load offset=2060
local.tee 4
i32.eqz
br_if 0 (;@10;)
i32.const 0
i32.load offset=2052
local.tee 6
local.get 8
i32.add
local.tee 10
local.get 6
i32.le_u
br_if 9 (;@1;)
local.get 10
local.get 4
i32.gt_u
br_if 9 (;@1;)
end
block ;; label = @10
block ;; label = @11
i32.const 0
i32.load8_u offset=2064
i32.const 4
i32.and
br_if 0 (;@11;)
block ;; label = @12
block ;; label = @13
block ;; label = @14
block ;; label = @15
block ;; label = @16
i32.const 0
i32.load offset=1644
local.tee 4
i32.eqz
br_if 0 (;@16;)
i32.const 2068
local.set 0
loop ;; label = @17
block ;; label = @18
local.get 4
local.get 0
i32.load
local.tee 6
i32.lt_u
br_if 0 (;@18;)
local.get 4
local.get 6
local.get 0
i32.load offset=4
i32.add
i32.lt_u
br_if 3 (;@15;)
end
local.get 0
i32.load offset=8
local.tee 0
br_if 0 (;@17;)
end
end
i32.const 0
call 8
local.tee 5
i32.const -1
i32.eq
br_if 3 (;@12;)
local.get 8
local.set 2
block ;; label = @16
i32.const 0
i32.load offset=2096
local.tee 0
i32.const -1
i32.add
local.tee 4
local.get 5
i32.and
i32.eqz
br_if 0 (;@16;)
local.get 8
local.get 5
i32.sub
local.get 4
local.get 5
i32.add
i32.const 0
local.get 0
i32.sub
i32.and
i32.add
local.set 2
end
local.get 2
local.get 3
i32.le_u
br_if 3 (;@12;)
block ;; label = @16
i32.const 0
i32.load offset=2060
local.tee 0
i32.eqz
br_if 0 (;@16;)
i32.const 0
i32.load offset=2052
local.tee 4
local.get 2
i32.add
local.tee 6
local.get 4
i32.le_u
br_if 4 (;@12;)
local.get 6
local.get 0
i32.gt_u
br_if 4 (;@12;)
end
local.get 2
call 8
local.tee 0
local.get 5
i32.ne
br_if 1 (;@14;)
br 5 (;@10;)
end
local.get 2
local.get 5
i32.sub
local.get 11
i32.and
local.tee 2
call 8
local.tee 5
local.get 0
i32.load
local.get 0
i32.load offset=4
i32.add
i32.eq
br_if 1 (;@13;)
local.get 5
local.set 0
end
local.get 0
i32.const -1
i32.eq
br_if 1 (;@12;)
block ;; label = @14
local.get 2
local.get 3
i32.const 48
i32.add
i32.lt_u
br_if 0 (;@14;)
local.get 0
local.set 5
br 4 (;@10;)
end
local.get 7
local.get 2
i32.sub
i32.const 0
i32.load offset=2100
local.tee 4
i32.add
i32.const 0
local.get 4
i32.sub
i32.and
local.tee 4
call 8
i32.const -1
i32.eq
br_if 1 (;@12;)
local.get 4
local.get 2
i32.add
local.set 2
local.get 0
local.set 5
br 3 (;@10;)
end
local.get 5
i32.const -1
i32.ne
br_if 2 (;@10;)
end
i32.const 0
i32.const 0
i32.load offset=2064
i32.const 4
i32.or
i32.store offset=2064
end
local.get 8
call 8
local.set 5
i32.const 0
call 8
local.set 0
local.get 5
i32.const -1
i32.eq
br_if 5 (;@5;)
local.get 0
i32.const -1
i32.eq
br_if 5 (;@5;)
local.get 5
local.get 0
i32.ge_u
br_if 5 (;@5;)
local.get 0
local.get 5
i32.sub
local.tee 2
local.get 3
i32.const 40
i32.add
i32.le_u
br_if 5 (;@5;)
end
i32.const 0
i32.const 0
i32.load offset=2052
local.get 2
i32.add
local.tee 0
i32.store offset=2052
block ;; label = @10
local.get 0
i32.const 0
i32.load offset=2056
i32.le_u
br_if 0 (;@10;)
i32.const 0
local.get 0
i32.store offset=2056
end
block ;; label = @10
block ;; label = @11
i32.const 0
i32.load offset=1644
local.tee 4
i32.eqz
br_if 0 (;@11;)
i32.const 2068
local.set 0
loop ;; label = @12
local.get 5
local.get 0
i32.load
local.tee 6
local.get 0
i32.load offset=4
local.tee 8
i32.add
i32.eq
br_if 2 (;@10;)
local.get 0
i32.load offset=8
local.tee 0
br_if 0 (;@12;)
br 5 (;@7;)
end
end
block ;; label = @11
block ;; label = @12
i32.const 0
i32.load offset=1636
local.tee 0
i32.eqz
br_if 0 (;@12;)
local.get 5
local.get 0
i32.ge_u
br_if 1 (;@11;)
end
i32.const 0
local.get 5
i32.store offset=1636
end
i32.const 0
local.set 0
i32.const 0
local.get 2
i32.store offset=2072
i32.const 0
local.get 5
i32.store offset=2068
i32.const 0
i32.const -1
i32.store offset=1652
i32.const 0
i32.const 0
i32.load offset=2092
i32.store offset=1656
i32.const 0
i32.const 0
i32.store offset=2080
loop ;; label = @11
local.get 0
i32.const 3
i32.shl
local.tee 4
local.get 4
i32.const 1660
i32.add
local.tee 6
i32.store offset=1668
local.get 4
local.get 6
i32.store offset=1672
local.get 0
i32.const 1
i32.add
local.tee 0
i32.const 32
i32.ne
br_if 0 (;@11;)
end
i32.const 0
local.get 2
i32.const -40
i32.add
local.tee 0
i32.const -8
local.get 5
i32.sub
i32.const 7
i32.and
local.tee 4
i32.sub
local.tee 6
i32.store offset=1632
i32.const 0
local.get 5
local.get 4
i32.add
local.tee 4
i32.store offset=1644
local.get 4
local.get 6
i32.const 1
i32.or
i32.store offset=4
local.get 5
local.get 0
i32.add
i32.const 40
i32.store offset=4
i32.const 0
i32.const 0
i32.load offset=2108
i32.store offset=1648
br 4 (;@6;)
end
local.get 4
local.get 5
i32.ge_u
br_if 2 (;@7;)
local.get 4
local.get 6
i32.lt_u
br_if 2 (;@7;)
local.get 0
i32.load offset=12
i32.const 8
i32.and
br_if 2 (;@7;)
local.get 0
local.get 8
local.get 2
i32.add
i32.store offset=4
i32.const 0
local.get 4
i32.const -8
local.get 4
i32.sub
i32.const 7
i32.and
local.tee 0
i32.add
local.tee 6
i32.store offset=1644
i32.const 0
i32.const 0
i32.load offset=1632
local.get 2
i32.add
local.tee 5
local.get 0
i32.sub
local.tee 0
i32.store offset=1632
local.get 6
local.get 0
i32.const 1
i32.or
i32.store offset=4
local.get 4
local.get 5
i32.add
i32.const 40
i32.store offset=4
i32.const 0
i32.const 0
i32.load offset=2108
i32.store offset=1648
br 3 (;@6;)
end
i32.const 0
local.set 0
br 6 (;@2;)
end
i32.const 0
local.set 0
br 4 (;@3;)
end
block ;; label = @7
local.get 5
i32.const 0
i32.load offset=1636
i32.ge_u
br_if 0 (;@7;)
i32.const 0
local.get 5
i32.store offset=1636
end
local.get 5
local.get 2
i32.add
local.set 6
i32.const 2068
local.set 0
block ;; label = @7
block ;; label = @8
loop ;; label = @9
local.get 0
i32.load
local.tee 8
local.get 6
i32.eq
br_if 1 (;@8;)
local.get 0
i32.load offset=8
local.tee 0
br_if 0 (;@9;)
br 2 (;@7;)
end
end
local.get 0
i32.load8_u offset=12
i32.const 8
i32.and
i32.eqz
br_if 3 (;@4;)
end
i32.const 2068
local.set 0
block ;; label = @7
loop ;; label = @8
block ;; label = @9
local.get 4
local.get 0
i32.load
local.tee 6
i32.lt_u
br_if 0 (;@9;)
local.get 4
local.get 6
local.get 0
i32.load offset=4
i32.add
local.tee 6
i32.lt_u
br_if 2 (;@7;)
end
local.get 0
i32.load offset=8
local.set 0
br 0 (;@8;)
end
end
i32.const 0
local.get 2
i32.const -40
i32.add
local.tee 0
i32.const -8
local.get 5
i32.sub
i32.const 7
i32.and
local.tee 8
i32.sub
local.tee 11
i32.store offset=1632
i32.const 0
local.get 5
local.get 8
i32.add
local.tee 8
i32.store offset=1644
local.get 8
local.get 11
i32.const 1
i32.or
i32.store offset=4
local.get 5
local.get 0
i32.add
i32.const 40
i32.store offset=4
i32.const 0
i32.const 0
i32.load offset=2108
i32.store offset=1648
local.get 4
local.get 6
i32.const 39
local.get 6
i32.sub
i32.const 7
i32.and
i32.add
i32.const -47
i32.add
local.tee 0
local.get 0
local.get 4
i32.const 16
i32.add
i32.lt_u
select
local.tee 8
i32.const 27
i32.store offset=4
local.get 8
i32.const 0
i64.load offset=2076 align=4
i64.store offset=16 align=4
local.get 8
i32.const 0
i64.load offset=2068 align=4
i64.store offset=8 align=4
i32.const 0
local.get 8
i32.const 8
i32.add
i32.store offset=2076
i32.const 0
local.get 2
i32.store offset=2072
i32.const 0
local.get 5
i32.store offset=2068
i32.const 0
i32.const 0
i32.store offset=2080
local.get 8
i32.const 24
i32.add
local.set 0
loop ;; label = @7
local.get 0
i32.const 7
i32.store offset=4
local.get 0
i32.const 8
i32.add
local.set 5
local.get 0
i32.const 4
i32.add
local.set 0
local.get 5
local.get 6
i32.lt_u
br_if 0 (;@7;)
end
local.get 8
local.get 4
i32.eq
br_if 0 (;@6;)
local.get 8
local.get 8
i32.load offset=4
i32.const -2
i32.and
i32.store offset=4
local.get 4
local.get 8
local.get 4
i32.sub
local.tee 5
i32.const 1
i32.or
i32.store offset=4
local.get 8
local.get 5
i32.store
block ;; label = @7
block ;; label = @8
local.get 5
i32.const 255
i32.gt_u
br_if 0 (;@8;)
local.get 5
i32.const 248
i32.and
i32.const 1660
i32.add
local.set 0
block ;; label = @9
block ;; label = @10
i32.const 0
i32.load offset=1620
local.tee 6
i32.const 1
local.get 5
i32.const 3
i32.shr_u
i32.shl
local.tee 5
i32.and
br_if 0 (;@10;)
i32.const 0
local.get 6
local.get 5
i32.or
i32.store offset=1620
local.get 0
local.set 6
br 1 (;@9;)
end
local.get 0
i32.load offset=8
local.set 6
end
local.get 0
local.get 4
i32.store offset=8
local.get 6
local.get 4
i32.store offset=12
i32.const 12
local.set 5
i32.const 8
local.set 8
br 1 (;@7;)
end
i32.const 31
local.set 0
block ;; label = @8
local.get 5
i32.const 16777215
i32.gt_u
br_if 0 (;@8;)
local.get 5
i32.const 38
local.get 5
i32.const 8
i32.shr_u
i32.clz
local.tee 0
i32.sub
i32.shr_u
i32.const 1
i32.and
local.get 0
i32.const 1
i32.shl
i32.or
i32.const 62
i32.xor
local.set 0
end
local.get 4
local.get 0
i32.store offset=28
local.get 4
i64.const 0
i64.store offset=16 align=4
local.get 0
i32.const 2
i32.shl
i32.const 1924
i32.add
local.set 6
block ;; label = @8
block ;; label = @9
block ;; label = @10
i32.const 0
i32.load offset=1624
local.tee 8
i32.const 1
local.get 0
i32.shl
local.tee 2
i32.and
br_if 0 (;@10;)
i32.const 0
local.get 8
local.get 2
i32.or
i32.store offset=1624
local.get 6
local.get 4
i32.store
local.get 4
local.get 6
i32.store offset=24
br 1 (;@9;)
end
local.get 5
i32.const 0
i32.const 25
local.get 0
i32.const 1
i32.shr_u
i32.sub
local.get 0
i32.const 31
i32.eq
select
i32.shl
local.set 0
local.get 6
i32.load
local.set 8
loop ;; label = @10
local.get 8
local.tee 6
i32.load offset=4
i32.const -8
i32.and
local.get 5
i32.eq
br_if 2 (;@8;)
local.get 0
i32.const 29
i32.shr_u
local.set 8
local.get 0
i32.const 1
i32.shl
local.set 0
local.get 6
local.get 8
i32.const 4
i32.and
i32.add
local.tee 2
i32.load offset=16
local.tee 8
br_if 0 (;@10;)
end
local.get 2
i32.const 16
i32.add
local.get 4
i32.store
local.get 4
local.get 6
i32.store offset=24
end
i32.const 8
local.set 5
i32.const 12
local.set 8
local.get 4
local.set 6
local.get 4
local.set 0
br 1 (;@7;)
end
local.get 6
i32.load offset=8
local.tee 0
local.get 4
i32.store offset=12
local.get 6
local.get 4
i32.store offset=8
local.get 4
local.get 0
i32.store offset=8
i32.const 0
local.set 0
i32.const 24
local.set 5
i32.const 12
local.set 8
end
local.get 4
local.get 8
i32.add
local.get 6
i32.store
local.get 4
local.get 5
i32.add
local.get 0
i32.store
end
i32.const 0
i32.load offset=1632
local.tee 0
local.get 3
i32.le_u
br_if 0 (;@5;)
i32.const 0
local.get 0
local.get 3
i32.sub
local.tee 4
i32.store offset=1632
i32.const 0
i32.const 0
i32.load offset=1644
local.tee 0
local.get 3
i32.add
local.tee 6
i32.store offset=1644
local.get 6
local.get 4
i32.const 1
i32.or
i32.store offset=4
local.get 0
local.get 3
i32.const 3
i32.or
i32.store offset=4
local.get 0
i32.const 8
i32.add
local.set 0
br 4 (;@1;)
end
call 7
i32.const 48
i32.store
i32.const 0
local.set 0
br 3 (;@1;)
end
local.get 0
local.get 5
i32.store
local.get 0
local.get 0
i32.load offset=4
local.get 2
i32.add
i32.store offset=4
local.get 5
local.get 8
local.get 3
call 10
local.set 0
br 2 (;@1;)
end
block ;; label = @3
local.get 11
i32.eqz
br_if 0 (;@3;)
block ;; label = @4
block ;; label = @5
local.get 8
local.get 8
i32.load offset=28
local.tee 5
i32.const 2
i32.shl
local.tee 6
i32.load offset=1924
i32.ne
br_if 0 (;@5;)
local.get 6
i32.const 1924
i32.add
local.get 0
i32.store
local.get 0
br_if 1 (;@4;)
i32.const 0
local.get 10
i32.const -2
local.get 5
i32.rotl
i32.and
local.tee 10
i32.store offset=1624
br 2 (;@3;)
end
block ;; label = @5
block ;; label = @6
local.get 11
i32.load offset=16
local.get 8
i32.ne
br_if 0 (;@6;)
local.get 11
local.get 0
i32.store offset=16
br 1 (;@5;)
end
local.get 11
local.get 0
i32.store offset=20
end
local.get 0
i32.eqz
br_if 1 (;@3;)
end
local.get 0
local.get 11
i32.store offset=24
block ;; label = @4
local.get 8
i32.load offset=16
local.tee 6
i32.eqz
br_if 0 (;@4;)
local.get 0
local.get 6
i32.store offset=16
local.get 6
local.get 0
i32.store offset=24
end
local.get 8
i32.load offset=20
local.tee 6
i32.eqz
br_if 0 (;@3;)
local.get 0
local.get 6
i32.store offset=20
local.get 6
local.get 0
i32.store offset=24
end
block ;; label = @3
block ;; label = @4
local.get 4
i32.const 15
i32.gt_u
br_if 0 (;@4;)
local.get 8
local.get 4
local.get 3
i32.add
local.tee 0
i32.const 3
i32.or
i32.store offset=4
local.get 8
local.get 0
i32.add
local.tee 0
local.get 0
i32.load offset=4
i32.const 1
i32.or
i32.store offset=4
br 1 (;@3;)
end
local.get 8
local.get 3
i32.const 3
i32.or
i32.store offset=4
local.get 8
local.get 3
i32.add
local.tee 5
local.get 4
i32.const 1
i32.or
i32.store offset=4
local.get 5
local.get 4
i32.add
local.get 4
i32.store
block ;; label = @4
local.get 4
i32.const 255
i32.gt_u
br_if 0 (;@4;)
local.get 4
i32.const 248
i32.and
i32.const 1660
i32.add
local.set 0
block ;; label = @5
block ;; label = @6
i32.const 0
i32.load offset=1620
local.tee 3
i32.const 1
local.get 4
i32.const 3
i32.shr_u
i32.shl
local.tee 4
i32.and
br_if 0 (;@6;)
i32.const 0
local.get 3
local.get 4
i32.or
i32.store offset=1620
local.get 0
local.set 4
br 1 (;@5;)
end
local.get 0
i32.load offset=8
local.set 4
end
local.get 0
local.get 5
i32.store offset=8
local.get 4
local.get 5
i32.store offset=12
local.get 5
local.get 0
i32.store offset=12
local.get 5
local.get 4
i32.store offset=8
br 1 (;@3;)
end
i32.const 31
local.set 0
block ;; label = @4
local.get 4
i32.const 16777215
i32.gt_u
br_if 0 (;@4;)
local.get 4
i32.const 38
local.get 4
i32.const 8
i32.shr_u
i32.clz
local.tee 0
i32.sub
i32.shr_u
i32.const 1
i32.and
local.get 0
i32.const 1
i32.shl
i32.or
i32.const 62
i32.xor
local.set 0
end
local.get 5
local.get 0
i32.store offset=28
local.get 5
i64.const 0
i64.store offset=16 align=4
local.get 0
i32.const 2
i32.shl
i32.const 1924
i32.add
local.set 3
block ;; label = @4
block ;; label = @5
block ;; label = @6
local.get 10
i32.const 1
local.get 0
i32.shl
local.tee 6
i32.and
br_if 0 (;@6;)
i32.const 0
local.get 10
local.get 6
i32.or
i32.store offset=1624
local.get 3
local.get 5
i32.store
local.get 5
local.get 3
i32.store offset=24
br 1 (;@5;)
end
local.get 4
i32.const 0
i32.const 25
local.get 0
i32.const 1
i32.shr_u
i32.sub
local.get 0
i32.const 31
i32.eq
select
i32.shl
local.set 0
local.get 3
i32.load
local.set 6
loop ;; label = @6
local.get 6
local.tee 3
i32.load offset=4
i32.const -8
i32.and
local.get 4
i32.eq
br_if 2 (;@4;)
local.get 0
i32.const 29
i32.shr_u
local.set 6
local.get 0
i32.const 1
i32.shl
local.set 0
local.get 3
local.get 6
i32.const 4
i32.and
i32.add
local.tee 2
i32.load offset=16
local.tee 6
br_if 0 (;@6;)
end
local.get 2
i32.const 16
i32.add
local.get 5
i32.store
local.get 5
local.get 3
i32.store offset=24
end
local.get 5
local.get 5
i32.store offset=12
local.get 5
local.get 5
i32.store offset=8
br 1 (;@3;)
end
local.get 3
i32.load offset=8
local.tee 0
local.get 5
i32.store offset=12
local.get 3
local.get 5
i32.store offset=8
local.get 5
i32.const 0
i32.store offset=24
local.get 5
local.get 3
i32.store offset=12
local.get 5
local.get 0
i32.store offset=8
end
local.get 8
i32.const 8
i32.add
local.set 0
br 1 (;@1;)
end
block ;; label = @2
local.get 10
i32.eqz
br_if 0 (;@2;)
block ;; label = @3
block ;; label = @4
local.get 5
local.get 5
i32.load offset=28
local.tee 8
i32.const 2
i32.shl
local.tee 6
i32.load offset=1924
i32.ne
br_if 0 (;@4;)
local.get 6
i32.const 1924
i32.add
local.get 0
i32.store
local.get 0
br_if 1 (;@3;)
i32.const 0
local.get 9
i32.const -2
local.get 8
i32.rotl
i32.and
i32.store offset=1624
br 2 (;@2;)
end
block ;; label = @4
block ;; label = @5
local.get 10
i32.load offset=16
local.get 5
i32.ne
br_if 0 (;@5;)
local.get 10
local.get 0
i32.store offset=16
br 1 (;@4;)
end
local.get 10
local.get 0
i32.store offset=20
end
local.get 0
i32.eqz
br_if 1 (;@2;)
end
local.get 0
local.get 10
i32.store offset=24
block ;; label = @3
local.get 5
i32.load offset=16
local.tee 6
i32.eqz
br_if 0 (;@3;)
local.get 0
local.get 6
i32.store offset=16
local.get 6
local.get 0
i32.store offset=24
end
local.get 5
i32.load offset=20
local.tee 6
i32.eqz
br_if 0 (;@2;)
local.get 0
local.get 6
i32.store offset=20
local.get 6
local.get 0
i32.store offset=24
end
block ;; label = @2
block ;; label = @3
local.get 4
i32.const 15
i32.gt_u
br_if 0 (;@3;)
local.get 5
local.get 4
local.get 3
i32.add
local.tee 0
i32.const 3
i32.or
i32.store offset=4
local.get 5
local.get 0
i32.add
local.tee 0
local.get 0
i32.load offset=4
i32.const 1
i32.or
i32.store offset=4
br 1 (;@2;)
end
local.get 5
local.get 3
i32.const 3
i32.or
i32.store offset=4
local.get 5
local.get 3
i32.add
local.tee 3
local.get 4
i32.const 1
i32.or
i32.store offset=4
local.get 3
local.get 4
i32.add
local.get 4
i32.store
block ;; label = @3
local.get 7
i32.eqz
br_if 0 (;@3;)
local.get 7
i32.const -8
i32.and
i32.const 1660
i32.add
local.set 6
i32.const 0
i32.load offset=1640
local.set 0
block ;; label = @4
block ;; label = @5
i32.const 1
local.get 7
i32.const 3
i32.shr_u
i32.shl
local.tee 8
local.get 2
i32.and
br_if 0 (;@5;)
i32.const 0
local.get 8
local.get 2
i32.or
i32.store offset=1620
local.get 6
local.set 8
br 1 (;@4;)
end
local.get 6
i32.load offset=8
local.set 8
end
local.get 6
local.get 0
i32.store offset=8
local.get 8
local.get 0
i32.store offset=12
local.get 0
local.get 6
i32.store offset=12
local.get 0
local.get 8
i32.store offset=8
end
i32.const 0
local.get 3
i32.store offset=1640
i32.const 0
local.get 4
i32.store offset=1628
end
local.get 5
i32.const 8
i32.add
local.set 0
end
local.get 1
i32.const 16
i32.add
global.set 0
local.get 0)
(func (;10;) (type 2) (param i32 i32 i32) (result i32)
(local i32 i32 i32 i32 i32 i32 i32)
local.get 0
i32.const -8
local.get 0
i32.sub
i32.const 7
i32.and
i32.add
local.tee 3
local.get 2
i32.const 3
i32.or
i32.store offset=4
local.get 1
i32.const -8
local.get 1
i32.sub
i32.const 7
i32.and
i32.add
local.tee 4
local.get 3
local.get 2
i32.add
local.tee 5
i32.sub
local.set 0
block ;; label = @1
block ;; label = @2
local.get 4
i32.const 0
i32.load offset=1644
i32.ne
br_if 0 (;@2;)
i32.const 0
local.get 5
i32.store offset=1644
i32.const 0
i32.const 0
i32.load offset=1632
local.get 0
i32.add
local.tee 2
i32.store offset=1632
local.get 5
local.get 2
i32.const 1
i32.or
i32.store offset=4
br 1 (;@1;)
end
block ;; label = @2
local.get 4
i32.const 0
i32.load offset=1640
i32.ne
br_if 0 (;@2;)
i32.const 0
local.get 5
i32.store offset=1640
i32.const 0
i32.const 0
i32.load offset=1628
local.get 0
i32.add
local.tee 2
i32.store offset=1628
local.get 5
local.get 2
i32.const 1
i32.or
i32.store offset=4
local.get 5
local.get 2
i32.add
local.get 2
i32.store
br 1 (;@1;)
end
block ;; label = @2
local.get 4
i32.load offset=4
local.tee 1
i32.const 3
i32.and
i32.const 1
i32.ne
br_if 0 (;@2;)
local.get 1
i32.const -8
i32.and
local.set 6
local.get 4
i32.load offset=12
local.set 2
block ;; label = @3
block ;; label = @4
local.get 1
i32.const 255
i32.gt_u
br_if 0 (;@4;)
block ;; label = @5
local.get 2
local.get 4
i32.load offset=8
local.tee 7
i32.ne
br_if 0 (;@5;)
i32.const 0
i32.const 0
i32.load offset=1620
i32.const -2
local.get 1
i32.const 3
i32.shr_u
i32.rotl
i32.and
i32.store offset=1620
br 2 (;@3;)
end
local.get 7
local.get 2
i32.store offset=12
local.get 2
local.get 7
i32.store offset=8
br 1 (;@3;)
end
local.get 4
i32.load offset=24
local.set 8
block ;; label = @4
block ;; label = @5
local.get 2
local.get 4
i32.eq
br_if 0 (;@5;)
local.get 4
i32.load offset=8
local.tee 1
local.get 2
i32.store offset=12
local.get 2
local.get 1
i32.store offset=8
br 1 (;@4;)
end
block ;; label = @5
block ;; label = @6
block ;; label = @7
local.get 4
i32.load offset=20
local.tee 1
i32.eqz
br_if 0 (;@7;)
local.get 4
i32.const 20
i32.add
local.set 7
br 1 (;@6;)
end
local.get 4
i32.load offset=16
local.tee 1
i32.eqz
br_if 1 (;@5;)
local.get 4
i32.const 16
i32.add
local.set 7
end
loop ;; label = @6
local.get 7
local.set 9
local.get 1
local.tee 2
i32.const 20
i32.add
local.set 7
local.get 2
i32.load offset=20
local.tee 1
br_if 0 (;@6;)
local.get 2
i32.const 16
i32.add
local.set 7
local.get 2
i32.load offset=16
local.tee 1
br_if 0 (;@6;)
end
local.get 9
i32.const 0
i32.store
br 1 (;@4;)
end
i32.const 0
local.set 2
end
local.get 8
i32.eqz
br_if 0 (;@3;)
block ;; label = @4
block ;; label = @5
local.get 4
local.get 4
i32.load offset=28
local.tee 7
i32.const 2
i32.shl
local.tee 1
i32.load offset=1924
i32.ne
br_if 0 (;@5;)
local.get 1
i32.const 1924
i32.add
local.get 2
i32.store
local.get 2
br_if 1 (;@4;)
i32.const 0
i32.const 0
i32.load offset=1624
i32.const -2
local.get 7
i32.rotl
i32.and
i32.store offset=1624
br 2 (;@3;)
end
block ;; label = @5
block ;; label = @6
local.get 8
i32.load offset=16
local.get 4
i32.ne
br_if 0 (;@6;)
local.get 8
local.get 2
i32.store offset=16
br 1 (;@5;)
end
local.get 8
local.get 2
i32.store offset=20
end
local.get 2
i32.eqz
br_if 1 (;@3;)
end
local.get 2
local.get 8
i32.store offset=24
block ;; label = @4
local.get 4
i32.load offset=16
local.tee 1
i32.eqz
br_if 0 (;@4;)
local.get 2
local.get 1
i32.store offset=16
local.get 1
local.get 2
i32.store offset=24
end
local.get 4
i32.load offset=20
local.tee 1
i32.eqz
br_if 0 (;@3;)
local.get 2
local.get 1
i32.store offset=20
local.get 1
local.get 2
i32.store offset=24
end
local.get 6
local.get 0
i32.add
local.set 0
local.get 4
local.get 6
i32.add
local.tee 4
i32.load offset=4
local.set 1
end
local.get 4
local.get 1
i32.const -2
i32.and
i32.store offset=4
local.get 5
local.get 0
i32.const 1
i32.or
i32.store offset=4
local.get 5
local.get 0
i32.add
local.get 0
i32.store
block ;; label = @2
local.get 0
i32.const 255
i32.gt_u
br_if 0 (;@2;)
local.get 0
i32.const 248
i32.and
i32.const 1660
i32.add
local.set 2
block ;; label = @3
block ;; label = @4
i32.const 0
i32.load offset=1620
local.tee 1
i32.const 1
local.get 0
i32.const 3
i32.shr_u
i32.shl
local.tee 0
i32.and
br_if 0 (;@4;)
i32.const 0
local.get 1
local.get 0
i32.or
i32.store offset=1620
local.get 2
local.set 0
br 1 (;@3;)
end
local.get 2
i32.load offset=8
local.set 0
end
local.get 2
local.get 5
i32.store offset=8
local.get 0
local.get 5
i32.store offset=12
local.get 5
local.get 2
i32.store offset=12
local.get 5
local.get 0
i32.store offset=8
br 1 (;@1;)
end
i32.const 31
local.set 2
block ;; label = @2
local.get 0
i32.const 16777215
i32.gt_u
br_if 0 (;@2;)
local.get 0
i32.const 38
local.get 0
i32.const 8
i32.shr_u
i32.clz
local.tee 2
i32.sub
i32.shr_u
i32.const 1
i32.and
local.get 2
i32.const 1
i32.shl
i32.or
i32.const 62
i32.xor
local.set 2
end
local.get 5
local.get 2
i32.store offset=28
local.get 5
i64.const 0
i64.store offset=16 align=4
local.get 2
i32.const 2
i32.shl
i32.const 1924
i32.add
local.set 1
block ;; label = @2
block ;; label = @3
block ;; label = @4
i32.const 0
i32.load offset=1624
local.tee 7
i32.const 1
local.get 2
i32.shl
local.tee 4
i32.and
br_if 0 (;@4;)
i32.const 0
local.get 7
local.get 4
i32.or
i32.store offset=1624
local.get 1
local.get 5
i32.store
local.get 5
local.get 1
i32.store offset=24
br 1 (;@3;)
end
local.get 0
i32.const 0
i32.const 25
local.get 2
i32.const 1
i32.shr_u
i32.sub
local.get 2
i32.const 31
i32.eq
select
i32.shl
local.set 2
local.get 1
i32.load
local.set 7
loop ;; label = @4
local.get 7
local.tee 1
i32.load offset=4
i32.const -8
i32.and
local.get 0
i32.eq
br_if 2 (;@2;)
local.get 2
i32.const 29
i32.shr_u
local.set 7
local.get 2
i32.const 1
i32.shl
local.set 2
local.get 1
local.get 7
i32.const 4
i32.and
i32.add
local.tee 4
i32.load offset=16
local.tee 7
br_if 0 (;@4;)
end
local.get 4
i32.const 16
i32.add
local.get 5
i32.store
local.get 5
local.get 1
i32.store offset=24
end
local.get 5
local.get 5
i32.store offset=12
local.get 5
local.get 5
i32.store offset=8
br 1 (;@1;)
end
local.get 1
i32.load offset=8
local.tee 2
local.get 5
i32.store offset=12
local.get 1
local.get 5
i32.store offset=8
local.get 5
i32.const 0
i32.store offset=24
local.get 5
local.get 1
i32.store offset=12
local.get 5
local.get 2
i32.store offset=8
end
local.get 3
i32.const 8
i32.add)
(func (;11;) (type 3) (param i32)
(local i32 i32 i32 i32 i32 i32 i32 i32)
block ;; label = @1
local.get 0
i32.eqz
br_if 0 (;@1;)
local.get 0
i32.const -8
i32.add
local.tee 1
local.get 0
i32.const -4
i32.add
i32.load
local.tee 2
i32.const -8
i32.and
local.tee 0
i32.add
local.set 3
block ;; label = @2
local.get 2
i32.const 1
i32.and
br_if 0 (;@2;)
local.get 2
i32.const 2
i32.and
i32.eqz
br_if 1 (;@1;)
local.get 1
local.get 1
i32.load
local.tee 4
i32.sub
local.tee 1
i32.const 0
i32.load offset=1636
i32.lt_u
br_if 1 (;@1;)
local.get 4
local.get 0
i32.add
local.set 0
block ;; label = @3
block ;; label = @4
block ;; label = @5
block ;; label = @6
local.get 1
i32.const 0
i32.load offset=1640
i32.eq
br_if 0 (;@6;)
local.get 1
i32.load offset=12
local.set 2
block ;; label = @7
local.get 4
i32.const 255
i32.gt_u
br_if 0 (;@7;)
local.get 2
local.get 1
i32.load offset=8
local.tee 5
i32.ne
br_if 2 (;@5;)
i32.const 0
i32.const 0
i32.load offset=1620
i32.const -2
local.get 4
i32.const 3
i32.shr_u
i32.rotl
i32.and
i32.store offset=1620
br 5 (;@2;)
end
local.get 1
i32.load offset=24
local.set 6
block ;; label = @7
local.get 2
local.get 1
i32.eq
br_if 0 (;@7;)
local.get 1
i32.load offset=8
local.tee 4
local.get 2
i32.store offset=12
local.get 2
local.get 4
i32.store offset=8
br 4 (;@3;)
end
block ;; label = @7
block ;; label = @8
local.get 1
i32.load offset=20
local.tee 4
i32.eqz
br_if 0 (;@8;)
local.get 1
i32.const 20
i32.add
local.set 5
br 1 (;@7;)
end
local.get 1
i32.load offset=16
local.tee 4
i32.eqz
br_if 3 (;@4;)
local.get 1
i32.const 16
i32.add
local.set 5
end
loop ;; label = @7
local.get 5
local.set 7
local.get 4
local.tee 2
i32.const 20
i32.add
local.set 5
local.get 2
i32.load offset=20
local.tee 4
br_if 0 (;@7;)
local.get 2
i32.const 16
i32.add
local.set 5
local.get 2
i32.load offset=16
local.tee 4
br_if 0 (;@7;)
end
local.get 7
i32.const 0
i32.store
br 3 (;@3;)
end
local.get 3
i32.load offset=4
local.tee 2
i32.const 3
i32.and
i32.const 3
i32.ne
br_if 3 (;@2;)
i32.const 0
local.get 0
i32.store offset=1628
local.get 3
local.get 2
i32.const -2
i32.and
i32.store offset=4
local.get 1
local.get 0
i32.const 1
i32.or
i32.store offset=4
local.get 3
local.get 0
i32.store
return
end
local.get 5
local.get 2
i32.store offset=12
local.get 2
local.get 5
i32.store offset=8
br 2 (;@2;)
end
i32.const 0
local.set 2
end
local.get 6
i32.eqz
br_if 0 (;@2;)
block ;; label = @3
block ;; label = @4
local.get 1
local.get 1
i32.load offset=28
local.tee 5
i32.const 2
i32.shl
local.tee 4
i32.load offset=1924
i32.ne
br_if 0 (;@4;)
local.get 4
i32.const 1924
i32.add
local.get 2
i32.store
local.get 2
br_if 1 (;@3;)
i32.const 0
i32.const 0
i32.load offset=1624
i32.const -2
local.get 5
i32.rotl
i32.and
i32.store offset=1624
br 2 (;@2;)
end
block ;; label = @4
block ;; label = @5
local.get 6
i32.load offset=16
local.get 1
i32.ne
br_if 0 (;@5;)
local.get 6
local.get 2
i32.store offset=16
br 1 (;@4;)
end
local.get 6
local.get 2
i32.store offset=20
end
local.get 2
i32.eqz
br_if 1 (;@2;)
end
local.get 2
local.get 6
i32.store offset=24
block ;; label = @3
local.get 1
i32.load offset=16
local.tee 4
i32.eqz
br_if 0 (;@3;)
local.get 2
local.get 4
i32.store offset=16
local.get 4
local.get 2
i32.store offset=24
end
local.get 1
i32.load offset=20
local.tee 4
i32.eqz
br_if 0 (;@2;)
local.get 2
local.get 4
i32.store offset=20
local.get 4
local.get 2
i32.store offset=24
end
local.get 1
local.get 3
i32.ge_u
br_if 0 (;@1;)
local.get 3
i32.load offset=4
local.tee 4
i32.const 1
i32.and
i32.eqz
br_if 0 (;@1;)
block ;; label = @2
block ;; label = @3
block ;; label = @4
block ;; label = @5
block ;; label = @6
local.get 4
i32.const 2
i32.and
br_if 0 (;@6;)
block ;; label = @7
local.get 3
i32.const 0
i32.load offset=1644
i32.ne
br_if 0 (;@7;)
i32.const 0
local.get 1
i32.store offset=1644
i32.const 0
i32.const 0
i32.load offset=1632
local.get 0
i32.add
local.tee 0
i32.store offset=1632
local.get 1
local.get 0
i32.const 1
i32.or
i32.store offset=4
local.get 1
i32.const 0
i32.load offset=1640
i32.ne
br_if 6 (;@1;)
i32.const 0
i32.const 0
i32.store offset=1628
i32.const 0
i32.const 0
i32.store offset=1640
return
end
block ;; label = @7
local.get 3
i32.const 0
i32.load offset=1640
local.tee 6
i32.ne
br_if 0 (;@7;)
i32.const 0
local.get 1
i32.store offset=1640
i32.const 0
i32.const 0
i32.load offset=1628
local.get 0
i32.add
local.tee 0
i32.store offset=1628
local.get 1
local.get 0
i32.const 1
i32.or
i32.store offset=4
local.get 1
local.get 0
i32.add
local.get 0
i32.store
return
end
local.get 4
i32.const -8
i32.and
local.get 0
i32.add
local.set 0
local.get 3
i32.load offset=12
local.set 2
block ;; label = @7
local.get 4
i32.const 255
i32.gt_u
br_if 0 (;@7;)
block ;; label = @8
local.get 2
local.get 3
i32.load offset=8
local.tee 5
i32.ne
br_if 0 (;@8;)
i32.const 0
i32.const 0
i32.load offset=1620
i32.const -2
local.get 4
i32.const 3
i32.shr_u
i32.rotl
i32.and
i32.store offset=1620
br 5 (;@3;)
end
local.get 5
local.get 2
i32.store offset=12
local.get 2
local.get 5
i32.store offset=8
br 4 (;@3;)
end
local.get 3
i32.load offset=24
local.set 8
block ;; label = @7
local.get 2
local.get 3
i32.eq
br_if 0 (;@7;)
local.get 3
i32.load offset=8
local.tee 4
local.get 2
i32.store offset=12
local.get 2
local.get 4
i32.store offset=8
br 3 (;@4;)
end
block ;; label = @7
block ;; label = @8
local.get 3
i32.load offset=20
local.tee 4
i32.eqz
br_if 0 (;@8;)
local.get 3
i32.const 20
i32.add
local.set 5
br 1 (;@7;)
end
local.get 3
i32.load offset=16
local.tee 4
i32.eqz
br_if 2 (;@5;)
local.get 3
i32.const 16
i32.add
local.set 5
end
loop ;; label = @7
local.get 5
local.set 7
local.get 4
local.tee 2
i32.const 20
i32.add
local.set 5
local.get 2
i32.load offset=20
local.tee 4
br_if 0 (;@7;)
local.get 2
i32.const 16
i32.add
local.set 5
local.get 2
i32.load offset=16
local.tee 4
br_if 0 (;@7;)
end
local.get 7
i32.const 0
i32.store
br 2 (;@4;)
end
local.get 3
local.get 4
i32.const -2
i32.and
i32.store offset=4
local.get 1
local.get 0
i32.const 1
i32.or
i32.store offset=4
local.get 1
local.get 0
i32.add
local.get 0
i32.store
br 3 (;@2;)
end
i32.const 0
local.set 2
end
local.get 8
i32.eqz
br_if 0 (;@3;)
block ;; label = @4
block ;; label = @5
local.get 3
local.get 3
i32.load offset=28
local.tee 5
i32.const 2
i32.shl
local.tee 4
i32.load offset=1924
i32.ne
br_if 0 (;@5;)
local.get 4
i32.const 1924
i32.add
local.get 2
i32.store
local.get 2
br_if 1 (;@4;)
i32.const 0
i32.const 0
i32.load offset=1624
i32.const -2
local.get 5
i32.rotl
i32.and
i32.store offset=1624
br 2 (;@3;)
end
block ;; label = @5
block ;; label = @6
local.get 8
i32.load offset=16
local.get 3
i32.ne
br_if 0 (;@6;)
local.get 8
local.get 2
i32.store offset=16
br 1 (;@5;)
end
local.get 8
local.get 2
i32.store offset=20
end
local.get 2
i32.eqz
br_if 1 (;@3;)
end
local.get 2
local.get 8
i32.store offset=24
block ;; label = @4
local.get 3
i32.load offset=16
local.tee 4
i32.eqz
br_if 0 (;@4;)
local.get 2
local.get 4
i32.store offset=16
local.get 4
local.get 2
i32.store offset=24
end
local.get 3
i32.load offset=20
local.tee 4
i32.eqz
br_if 0 (;@3;)
local.get 2
local.get 4
i32.store offset=20
local.get 4
local.get 2
i32.store offset=24
end
local.get 1
local.get 0
i32.const 1
i32.or
i32.store offset=4
local.get 1
local.get 0
i32.add
local.get 0
i32.store
local.get 1
local.get 6
i32.ne
br_if 0 (;@2;)
i32.const 0
local.get 0
i32.store offset=1628
return
end
block ;; label = @2
local.get 0
i32.const 255
i32.gt_u
br_if 0 (;@2;)
local.get 0
i32.const 248
i32.and
i32.const 1660
i32.add
local.set 2
block ;; label = @3
block ;; label = @4
i32.const 0
i32.load offset=1620
local.tee 4
i32.const 1
local.get 0
i32.const 3
i32.shr_u
i32.shl
local.tee 0
i32.and
br_if 0 (;@4;)
i32.const 0
local.get 4
local.get 0
i32.or
i32.store offset=1620
local.get 2
local.set 0
br 1 (;@3;)
end
local.get 2
i32.load offset=8
local.set 0
end
local.get 2
local.get 1
i32.store offset=8
local.get 0
local.get 1
i32.store offset=12
local.get 1
local.get 2
i32.store offset=12
local.get 1
local.get 0
i32.store offset=8
return
end
i32.const 31
local.set 2
block ;; label = @2
local.get 0
i32.const 16777215
i32.gt_u
br_if 0 (;@2;)
local.get 0
i32.const 38
local.get 0
i32.const 8
i32.shr_u
i32.clz
local.tee 2
i32.sub
i32.shr_u
i32.const 1
i32.and
local.get 2
i32.const 1
i32.shl
i32.or
i32.const 62
i32.xor
local.set 2
end
local.get 1
local.get 2
i32.store offset=28
local.get 1
i64.const 0
i64.store offset=16 align=4
local.get 2
i32.const 2
i32.shl
i32.const 1924
i32.add
local.set 5
block ;; label = @2
block ;; label = @3
block ;; label = @4
block ;; label = @5
i32.const 0
i32.load offset=1624
local.tee 4
i32.const 1
local.get 2
i32.shl
local.tee 3
i32.and
br_if 0 (;@5;)
i32.const 0
local.get 4
local.get 3
i32.or
i32.store offset=1624
local.get 5
local.get 1
i32.store
i32.const 8
local.set 0
i32.const 24
local.set 2
br 1 (;@4;)
end
local.get 0
i32.const 0
i32.const 25
local.get 2
i32.const 1
i32.shr_u
i32.sub
local.get 2
i32.const 31
i32.eq
select
i32.shl
local.set 2
local.get 5
i32.load
local.set 5
loop ;; label = @5
local.get 5
local.tee 4
i32.load offset=4
i32.const -8
i32.and
local.get 0
i32.eq
br_if 2 (;@3;)
local.get 2
i32.const 29
i32.shr_u
local.set 5
local.get 2
i32.const 1
i32.shl
local.set 2
local.get 4
local.get 5
i32.const 4
i32.and
i32.add
local.tee 3
i32.load offset=16
local.tee 5
br_if 0 (;@5;)
end
local.get 3
i32.const 16
i32.add
local.get 1
i32.store
i32.const 8
local.set 0
i32.const 24
local.set 2
local.get 4
local.set 5
end
local.get 1
local.set 4
local.get 1
local.set 3
br 1 (;@2;)
end
local.get 4
i32.load offset=8
local.tee 5
local.get 1
i32.store offset=12
local.get 4
local.get 1
i32.store offset=8
i32.const 0
local.set 3
i32.const 24
local.set 0
i32.const 8
local.set 2
end
local.get 1
local.get 2
i32.add
local.get 5
i32.store
local.get 1
local.get 4
i32.store offset=12
local.get 1
local.get 0
i32.add
local.get 3
i32.store
i32.const 0
i32.const 0
i32.load offset=1652
i32.const -1
i32.add
local.tee 1
i32.const -1
local.get 1
select
i32.store offset=1652
end)
(table (;0;) 1 1 funcref)
(memory (;0;) 258 258)
(global (;0;) (mut i32) (i32.const 67664))
(export "memory" (memory 0))
(export "__wasm_call_ctors" (func 1))
(export "verify_human" (func 2))
(export "__indirect_function_table" (table 0))
(export "malloc" (func 9))
(export "free" (func 11))
(export "_emscripten_stack_restore" (func 3))
(export "_emscripten_stack_alloc" (func 4))
(export "emscripten_stack_get_current" (func 5))
(data (;0;) (i32.const 1024) "\b81d\0eT\cfe\02Ks\ddW\e6\cdEccb,V\e1\89\86\ac\c32\0a\07\f3wf\b1\b7\ad2\f2\d5d\d3\cb\5cE\99\c2\89\92Error: Data too short.\00")
(data (;1;) (i32.const 1096) "P\08\01\00"))
本题最终 flag 为验证正确时的字符串加上逆向分析得到的所有生物特征值之和的 md5 (小写)。
比如,验证通过后显示的字符串为UniCTF{abcd},分析得到的正确生物特征值为速度 11、抖动 33,生物特征值之和为 44,注意生物特征值通常不会太大,则最终的 flag 就是
tips:
题目描述更新为UniCTF{md5(UniCTF{abcd}44)}
从你贴出来的 verify_human 的 wasm 逻辑里可以直接看出来:
A = floor(0.16 * len)(放在高 16 位)B = floor(totalDist / len)(放在次高 16 位)C = floor(2 * avgYJitter)(放在低 32 的高 16 位)D = floor(2 * avgXJitter)(放在最低 16 位)seed = seed * 6364136223846793005 + 1442695040888963407 (mod 2^64)seed >> 56 作为 1 字节 keystream把 data 段里那 46 字节密文按上面 LCG 逆出来,能得到唯一通过前缀校验的特征值组合:
A=20, B=15, C=88, D=4220 + 15 + 88 + 42 = 165验证通过时显示的字符串是:
UniCTF{Hum4n_Err0r_1s_The_Tru3_P4ssw0rd_8x92a}
按题面更新:最终 flag 为 UniCTF{md5(验证字符串 + 特征和)}(md5 小写),即对下面字符串做 md5:
UniCTF{Hum4n_Err0r_1s_The_Tru3_P4ssw0rd_8x92a}165
得到 md5:
32f9b4c728f42db8ecd6d631cc950495
所以最终 flag 是:
UniCTF{32f9b4c728f42db8ecd6d631cc950495}