From d8eb6c1e5a2327deba054ac91fe8665197d0ff65 Mon Sep 17 00:00:00 2001 From: Jairus Date: Mon, 1 Jul 2024 16:09:35 -0700 Subject: [PATCH] feat: massive optimizations --- README.md | 16 +- assembly/bl.ts | 135 + assembly/chars.ts | 14 + assembly/index.ts | 239 +- assembly/serialize/array.ts | 60 +- assembly/serialize/bool.ts | 12 + assembly/serialize/date.ts | 9 + assembly/serialize/float.ts | 7 + assembly/serialize/integer.ts | 6 + assembly/serialize/map.ts | 30 +- assembly/serialize/mpz.ts | 6 + assembly/serialize/object.ts | 7 + assembly/serialize/string.ts | 467 +- assembly/serialize/unknown.ts | 87 +- assembly/sink.ts | 2 +- assembly/test.ts | 32 +- assembly/util.ts | 28 + bench.js | 124 +- bench/benchmark.ts | 71 +- bench/benchmark.wasm | Bin 0 -> 20972 bytes build/test.wasm | Bin 32618 -> 88295 bytes build/test.wasm.map | 2 +- build/test.wat | 14568 ++++++++++++-------------------- package.json | 4 +- transform/lib/index.js | 106 +- transform/src/index.ts | 98 +- 26 files changed, 6704 insertions(+), 9426 deletions(-) create mode 100644 assembly/bl.ts create mode 100644 bench/benchmark.wasm diff --git a/README.md b/README.md index 9601e9a..a548c00 100644 --- a/README.md +++ b/README.md @@ -190,13 +190,13 @@ My library beats JSON (written in C++) on all counts *and*, I see many places wh Serialization Benchmarks: -| Value | JavaScript (ops/s) | JSON-as (ops/s) | Difference | -|----------------------------|--------------------|-----------------|------------| -| "hello world" | 28,629,598 | 64,210,666 | + 124% | -| 12345 | 31,562,431 | 56,329,066 | + 78% | -| 1.2345 | 15,977,278 | 20,322,939 | + 27% | -| [[],[[]],[[],[[]]]] | 8,998,624 | 34,453,102 | + 283% | -| { x: f64, y: f64, z: f64 } | 15,583,686 | 17,604,821 | + 12% | +| Value | JavaScript (ops/s) | JSON-AS (ops/s) | JSON-AS (Pages) | JSON-AS (SIMD+Pages)| Max Throughput | +|----------------------------|--------------------|--------------------|---------------------|---------------------|----------------| +| "hello world" | 7,124,361 | 44,290,480 (6.2x) | 73,601,235 (10.3x) | NOT IMPLEMENTED | 1.91 GB/s | +| 12345 | 9,611,677 | 66,900,642 (6.9x) | 145,924,333 (15.2x) | NOT IMPLEMENTED | 0.58 GB/s | +| 1.2345 | 7,227,259 | 20,322,939 (2.8x) | NOT IMPLEMENTED | NOT IMPLEMENTED | 0.16 GB/s | +| [[],[[]],[[],[[]]]] | 5,655,429 | 34,453,102 (6.0x) | NOT IMPLEMENTED | NOT IMPLEMENTED | 1.32 GB/s | +| { x: f64, y: f64, z: f64 } | 3,878,604 | 44,557,996 (11.5x) | 113,203,242 (29.2x) | 172,023,231 (44.4x) | 8.61 GB/s | @@ -204,7 +204,7 @@ Deserialization Benchmarks: | Value | JavaScript (ops/s) | JSON-AS (ops/s) | Difference| |----------------------------|--------------------|-----------------|-----------| -| "hello world" | 12,210,131 | 24,274,496 | + 98% | +| "hello world" | 10,571,462 | 24,274,496 | + 98% | | "12345" | 21,376,873 | 254,640,930 | + 1,191% | | 1.2345 | 23,193,902 | 221,869,840 | + 987% | | [[],[[]],[[],[[]]]] | 4,777,227 | 74,921,123 | + 1,568% | diff --git a/assembly/bl.ts b/assembly/bl.ts new file mode 100644 index 0000000..0699076 --- /dev/null +++ b/assembly/bl.ts @@ -0,0 +1,135 @@ +import { OBJECT, TOTAL_OVERHEAD } from "rt/common"; +@inline const MAX_LEN: usize = 65536; +const STORE: usize[] = []; +let STORE_LEN: usize = 0; +const CACHE = memory.data(i32(MAX_LEN)); +// Configurable amount of referenceable strings +let POINTER = changetype(CACHE); +@inline const MAX_CACHE = CACHE + MAX_LEN; + +export namespace bl { + @inline export function write_b(buf: usize, bytes: usize = changetype(buf - TOTAL_OVERHEAD).rtSize): void { + memory.copy(POINTER, buf, bytes); + POINTER += bytes; + if (MAX_CACHE <= POINTER) bl.shrink(); + } + @inline export function write_b_u(buf: usize, bytes: usize = changetype(buf - TOTAL_OVERHEAD).rtSize): void { + memory.copy(POINTER, buf, bytes); + POINTER += bytes; + } + @inline export function write_s(str: string, bytes: usize = changetype(changetype(str) - TOTAL_OVERHEAD).rtSize): void { + memory.copy(POINTER, changetype(str), bytes); + POINTER += bytes; + if (MAX_CACHE <= POINTER) bl.shrink(); + } + @inline export function write_s_u(str: string, bytes: usize = changetype(changetype(str) - TOTAL_OVERHEAD).rtSize): void { + memory.copy(POINTER, changetype(str), bytes); + POINTER += bytes; + } + @inline export function write_s_se(str: string, start: usize, end: usize): void { + const bytes = end - start; + memory.copy(POINTER, changetype(str) + start, bytes); + POINTER += bytes; + if (MAX_CACHE <= POINTER) bl.shrink(); + } + @inline export function write_s_se_u(str: string, start: usize, end: usize): void { + const bytes = end - start; + memory.copy(POINTER, changetype(str) + start, bytes); + POINTER += bytes; + } + @inline export function write_16(char: i32): void { + store(POINTER, char); + POINTER += 2; + if (MAX_CACHE <= POINTER) bl.shrink(); + } + @inline export function write_16_u(char: i32): void { + store(POINTER, char); + POINTER += 2; + } + + @inline export function write_32(chars: i32): void { + store(POINTER, chars); + POINTER += 4; + if (MAX_CACHE <= POINTER) bl.shrink(); + } + @inline export function write_32_u(chars: i32): void { + store(POINTER, chars); + POINTER += 4; + } + + @inline export function write_64(chars: i64): void { + store(POINTER, chars); + POINTER += 8; + if (MAX_CACHE <= POINTER) bl.shrink(); + } + + @inline export function write_64_u(chars: i64): void { + store(POINTER, chars); + POINTER += 8; + } + + @inline export function write_128(chars: v128): void { + store(POINTER, chars); + POINTER += 16; + if (MAX_CACHE <= POINTER) bl.shrink(); + } + @inline export function write_128_u(chars: v128): void { + store(POINTER, chars); + POINTER += 16; + if (MAX_CACHE <= POINTER) bl.shrink(); + } + @inline export function shrink(): void { + const len = POINTER - CACHE; + STORE_LEN += len; + const out = __new( + len, + idof() + ); + memory.copy(out, CACHE, len); + bl.reset(); + STORE.push(out); + } + @inline export function out(): T { + const len = POINTER - CACHE; + let out = __new( + len + STORE_LEN, + idof() + ); + + memory.copy(out, CACHE, len); + if (STORE_LEN) { + out += len; + for (let i = 0; i < STORE.length; i++) { + const ptr = changetype(unchecked(STORE[i])); + const storeLen = changetype(ptr - TOTAL_OVERHEAD).rtSize; + memory.copy(out, ptr, storeLen); + //__unpin(ptr); + out += storeLen; + } + STORE_LEN = 0; + } + bl.reset(); + + return changetype(out); + } + + @inline export function out_u(): T { + const len = POINTER - CACHE; + const out = __new( + len + STORE_LEN, + idof() + ); + + memory.copy(out, CACHE, len); + bl.reset(); + + return changetype(out); + } + + @inline export function _out(out: usize): void { + memory.copy(out, CACHE, POINTER - CACHE); + } + @inline export function reset(): void { + POINTER = CACHE; + } +} \ No newline at end of file diff --git a/assembly/chars.ts b/assembly/chars.ts index 918d6d1..654058b 100644 --- a/assembly/chars.ts +++ b/assembly/chars.ts @@ -74,3 +74,17 @@ @inline export const FORM_FEED = 12; // \f // @ts-ignore: Decorator is valid here @inline export const CARRIAGE_RETURN = 13; // \r + +export const TRUE_PTR = changetype("true"); +export const FALSE_PTR = changetype("false"); +export const NULL_PTR = changetype("null"); +export const EMPTY_BRACES_PTR = changetype("{}"); +export const EMPTY_BRACKET_PTR = changetype("[]"); +export const EMPTY_QUOTE_PTR = changetype("\"\""); +export const BACKSPACE_PTR = changetype("\\b"); +export const TAB_PTR = changetype("\\t"); +export const NEW_LINE_PTR = changetype("\\n"); +export const FORM_FEED_PTR = changetype("\\f"); +export const CARRIAGE_RETURN_PTR = changetype("\\r"); +export const FOUR_DIGIT_ESC_PTR = changetype("\\u000"); +export const TWO_DIGIT_ESC_PTR = changetype("\\u00"); \ No newline at end of file diff --git a/assembly/index.ts b/assembly/index.ts index 42296c8..d065892 100644 --- a/assembly/index.ts +++ b/assembly/index.ts @@ -1,32 +1,25 @@ /// -import { serializeString } from "./serialize/string"; -import { serializeBool } from "./serialize/bool"; -import { serializeInteger } from "./serialize/integer"; -import { serializeFloat } from "./serialize/float"; -import { serializeObject } from "./serialize/object"; -import { serializeDate } from "./serialize/date"; +import { serializeString, serializeStringBL } from "./serialize/string"; +import { serializeBool, serializeBoolBL } from "./serialize/bool"; +import { serializeInteger, serializeIntegerBL } from "./serialize/integer"; +import { serializeFloat, serializeFloatBL } from "./serialize/float"; +import { serializeObject, serializeObjectBL } from "./serialize/object"; +import { serializeDate, serializeDateBL } from "./serialize/date"; import { serializeArray } from "./serialize/array"; -import { serializeMap } from "./serialize/map"; +import { serializeMap, serializeMapBL } from "./serialize/map"; import { deserializeBoolean } from "./deserialize/bool"; import { deserializeArray } from "./deserialize/array"; import { deserializeFloat } from "./deserialize/float"; import { deserializeObject } from "./deserialize/object"; import { deserializeMap } from "./deserialize/map"; import { deserializeDate } from "./deserialize/date"; -import { FALSE_WORD, NULL_WORD, TRUE_WORD } from "./chars"; +import { NULL_PTR, NULL_WORD } from "./chars"; import { deserializeInteger } from "./deserialize/integer"; import { deserializeString } from "./deserialize/string"; -import { Sink } from "./sink"; -import { Variant } from "as-variant/assembly"; import { MpZ } from "@hypercubed/as-mpz"; -import { serializeMpZ } from "./serialize/mpz"; +import { serializeMpZ, serializeMpZBL } from "./serialize/mpz"; import { deserializeMpZ } from "./deserialize/mpz"; - -/** - * Offset of the 'storage' property in the JSON.Value class. - */ -// @ts-ignore: Decorator valid here -const STORAGE = offsetof("storage"); +import { bl } from "./bl"; /** * JSON Encoder/Decoder for AssemblyScript @@ -51,167 +44,13 @@ export namespace JSON { ManagedArray } - export class Value { - public type: i32; - // @ts-ignore: storage is set directly through memory - private storage: u64; - - private constructor() { unreachable(); } - - /** - * Creates an JSON.Value instance from a given value. - * @param value - The value to be encapsulated. - * @returns An instance of JSON.Value. - */ - static from(value: T): JSON.Value { - if (value instanceof Variant) { - // Handle - } else if (value instanceof JSON.Value) { - return value; - } - const out = changetype(__new(offsetof(), idof())); - out.set(value); - return out; - } - - /** - * Sets the value of the JSON.Value instance. - * @param value - The value to be set. - */ - set(value: T): void { - if (isBoolean()) { - this.type = JSON.Types.Bool; - store(changetype(this), value, STORAGE); - } else if (value instanceof u8 || value instanceof i8) { - this.type = JSON.Types.U8; - store(changetype(this), value, STORAGE); - } else if (value instanceof u16 || value instanceof i16) { - this.type = JSON.Types.U16; - store(changetype(this), value, STORAGE); - } else if (value instanceof u32 || value instanceof i32) { - this.type = JSON.Types.U32; - store(changetype(this), value, STORAGE); - } else if (value instanceof u64 || value instanceof i64) { - this.type = JSON.Types.U64; - store(changetype(this), value, STORAGE); - } else if (value instanceof f32) { - this.type = JSON.Types.F64; - store(changetype(this), value, STORAGE); - } else if (value instanceof f64) { - this.type = JSON.Types.F64; - store(changetype(this), value, STORAGE); - } else if (isString()) { - this.type = JSON.Types.String; - store(changetype(this), value, STORAGE); - } else if (value instanceof Map) { - if (idof() !== idof>()) { - throw new Error("Maps must be of type Map!"); - } - this.type = JSON.Types.Struct; - store(changetype(this), value, STORAGE); - // @ts-ignore: __SERIALIZE is implemented by the transform - } else if (isDefined(value.__SERIALIZE)) { - this.type = JSON.Types.Struct; - store(changetype(this), value, STORAGE); - } else if (isArray()) { - // @ts-ignore: T satisfies constraints of any[] - this.type = JSON.Types.Array + getArrayDepth(0); - store(changetype(this), value, STORAGE); - } - } - - /** - * Gets the value of the JSON.Value instance. - * @returns The encapsulated value. - */ - unwrap(): T { - if (isManaged()) { - if (this.type !== JSON.Types.Struct) throw new Error("Type mismatch"); - if (idof() !== load(changetype(this.storage), -8)) throw new Error("Type mismatch"); - } - return load(changetype(this), STORAGE); - } - - /** - * Gets the value of the JSON.Value instance. - * @returns The encapsulated value. - */ - unwrapUnsafe(): T { - return load(changetype(this), STORAGE); - } - - /** - * Gets the value of the JSON.Value instance. - * @returns The encapsulated value. - */ - get(): T { - return load(changetype(this), STORAGE); - } - - /** - * Gets the value of the JSON.Value instance. - * @returns The encapsulated value. - */ - getUnsafe(): T { - return load(changetype(this), STORAGE); - } - - /** - * Gets the value of the JSON.Value instance. - * @returns The encapsulated value. - */ - is(): T { - return load(changetype(this), STORAGE); - } - - /** - * Gets the value of the JSON.Value instance. - * @returns The encapsulated value. - */ - clone(): T { - return load(changetype(this), STORAGE); - } - - /** - * Converts the JSON.Value to a string representation. - * @param useString - If true, treats Buffer as a string. - * @returns The string representation of the JSON.Value. - */ - toString(useString: boolean = false): string { - switch (this.type) { - case JSON.Types.U8: return this.get().toString(); - case JSON.Types.U16: return this.get().toString(); - case JSON.Types.U32: return this.get().toString(); - case JSON.Types.U64: return this.get().toString(); - case JSON.Types.String: return "\"" + this.get() + "\""; - case JSON.Types.Bool: return this.get() ? TRUE_WORD : FALSE_WORD; - default: { - const arr = this.get(); - if (!arr.length) return "[]"; - const out = Sink.fromString("["); - for (let i = 0; i < arr.length - 1; i++) { - const element = unchecked(arr[i]); - out.write(element.toString(useString)); - out.write(","); - } - - const element = unchecked(arr[arr.length - 1]); - out.write(element.toString(useString)); - - out.write("]"); - return out.toString(); - } - } - } - } - export class Box { - constructor(public value: T) {} + constructor(public value: T) { } @inline static from(value: T): Box { return new Box(value); } } - + /** * Stringifies valid JSON data. * ```js @@ -236,6 +75,7 @@ export namespace JSON { // @ts-ignore } else if (isString>()) { return serializeString(changetype(data)); + // @ts-ignore } else if (isDefined(data.__SERIALIZE)) { // @ts-ignore return serializeObject(changetype>(data)); @@ -256,6 +96,52 @@ export namespace JSON { ); } } + /** + * Stringifies valid JSON data. + * ```js + * JSON.stringify(data) + * ``` + * @param data T + * @returns string + */ + // @ts-ignore: Decorator + export function stringifyBL(data: T): void { + if (isBoolean()) { + serializeBoolBL(data as bool); + } else if (isInteger()) { + // @ts-ignore + serializeIntegerBL(data); + } else if (isFloat(data)) { + // @ts-ignore + serializeFloatBL(data); + // @ts-ignore: Function is generated by transform + } else if (isNullable() && changetype(data) == 0) { + bl.write_b(NULL_PTR, 8); + // @ts-ignore + } else if (isString>()) { + serializeStringBL(changetype(data)); + // @ts-ignore + } else if (isDefined(data.__SERIALIZE)) { + // @ts-ignore + serializeObjectBL(changetype>(data)); + } else if (data instanceof Date) { + // @ts-ignore + serializeDateBL(changetype>(data)); + } else if (data instanceof Array) { + // @ts-ignore + serializeArrayBL(changetype>(data)); + } else if (data instanceof Map) { + // @ts-ignore + serializeMapBL(changetype>(data)); + } else if (data instanceof MpZ) { + serializeMpZBL(data); + } else { + throw new Error( + `Could not serialize data of type ${nameof()}. Make sure to add the correct decorators to classes.` + ); + } + } + /** * Parses valid JSON strings into their original format. * ```js @@ -293,7 +179,7 @@ export namespace JSON { } else if (type instanceof MpZ) { // @ts-ignore return deserializeMpZ(data); - }else if (type instanceof Date) { + } else if (type instanceof Date) { // @ts-ignore return deserializeDate(data); } else { @@ -312,4 +198,9 @@ export namespace JSON { // @ts-ignore: Decorator @global function __DESERIALIZE(data: string): T { return JSON.parse(data); +} + +// @ts-ignore: Decorator +@global function __SERIALIZE_BL(data: T): void { + JSON.stringifyBL(data); } \ No newline at end of file diff --git a/assembly/serialize/array.ts b/assembly/serialize/array.ts index 5f459d5..58218d3 100644 --- a/assembly/serialize/array.ts +++ b/assembly/serialize/array.ts @@ -1,3 +1,4 @@ +import { bl } from "../bl"; import { JSON } from ".."; import { COMMA, @@ -5,16 +6,20 @@ import { EMPTY_BRACKET_WORD, BRACKET_LEFT_WORD, BRACKET_RIGHT, - BRACKET_RIGHT_WORD + BRACKET_RIGHT_WORD, + EMPTY_BRACKET_PTR, + BRACKET_LEFT } from "../chars"; import { Sink } from "../sink"; -import { serializeString } from "./string"; +import { serializeString, serializeStringBL } from "./string"; +import { serializeBoolBL } from "./bool"; +import { serializeFloatBL } from "./float"; +import { serializeIntegerBL } from "./integer"; // @ts-ignore: Decorator valid here @inline export function serializeArray(data: T): string { - if (changetype(data) == 0) return EMPTY_BRACKET_WORD; // @ts-ignore - else if (data.length == 0) { + if (data.length == 0) { return EMPTY_BRACKET_WORD; // @ts-ignore } else if (isString>()) { @@ -50,4 +55,51 @@ import { serializeString } from "./string"; result.writeCodePoint(BRACKET_RIGHT); return result.toString(); } +} + +// @ts-ignore: Decorator valid here +@inline export function serializeArrayBL(data: T): void { + if (data.length == 0) { + bl.write_b(EMPTY_BRACKET_PTR); + } else if (isString>()) { + bl.write_16(BRACKET_LEFT); + for (let i = 0; i < data.length - 1; i++) { + serializeStringBL(unchecked(data[i])); + bl.write_16(COMMA); + } + serializeStringBL(unchecked(data[data.length - 1])); + bl.write_16(BRACKET_RIGHT); + } else if (isBoolean>()) { + bl.write_16(BRACKET_LEFT); + for (let i = 0; i < data.length - 1; i++) { + serializeBoolBL(unchecked(data[i])); + bl.write_16(COMMA); + } + serializeBoolBL(unchecked(data[data.length - 1])); + bl.write_16(BRACKET_RIGHT); + } else if (isFloat>()) { + bl.write_16(BRACKET_LEFT); + for (let i = 0; i < data.length - 1; i++) { + serializeFloatBL(unchecked(data[i])); + bl.write_16(COMMA); + } + serializeFloatBL(unchecked(data[data.length - 1])); + bl.write_16(BRACKET_RIGHT); + }else if (isInteger>()) { + bl.write_16(BRACKET_LEFT); + for (let i = 0; i < data.length - 1; i++) { + serializeIntegerBL(unchecked(data[i])); + bl.write_16(COMMA); + } + serializeIntegerBL(unchecked(data[data.length - 1])); + bl.write_16(BRACKET_RIGHT); + } else { + bl.write_16(BRACKET_LEFT); + for (let i = 0; i < data.length - 1; i++) { + JSON.stringifyBL(unchecked(data[i])); + bl.write_16(COMMA); + } + JSON.stringifyBL(unchecked(data[data.length - 1])); + bl.write_16(COMMA); + } } \ No newline at end of file diff --git a/assembly/serialize/bool.ts b/assembly/serialize/bool.ts index a5b4b4f..c9f7dbd 100644 --- a/assembly/serialize/bool.ts +++ b/assembly/serialize/bool.ts @@ -1,3 +1,6 @@ +import { bl } from "../bl"; +import { FALSE_PTR, TRUE_PTR } from "../chars"; + /** * Serialize a bool to type string * @param data data to serialize @@ -6,4 +9,13 @@ // @ts-ignore: Decorator valid here @inline export function serializeBool(data: bool): string { return data ? "true" : "false"; +} + +// @ts-ignore: Decorator valid here +@inline export function serializeBoolBL(data: bool): void { + if (data) { + bl.write_b(TRUE_PTR, 10); + } else { + bl.write_b(FALSE_PTR, 12); + } } \ No newline at end of file diff --git a/assembly/serialize/date.ts b/assembly/serialize/date.ts index beaed6d..164136e 100644 --- a/assembly/serialize/date.ts +++ b/assembly/serialize/date.ts @@ -1,4 +1,13 @@ +import { bl } from "../bl"; +import { QUOTE } from "../chars"; // @ts-ignore: Decorator valid here @inline export function serializeDate(data: Date): string { return `"${data.toISOString()}"` +} + +// @ts-ignore: Decorator valid here +@inline export function serializeDateBL(data: Date): string { + bl.write_16(QUOTE); + bl.write_s(data.toISOString()); + bl.write_16(QUOTE); } \ No newline at end of file diff --git a/assembly/serialize/float.ts b/assembly/serialize/float.ts index 9ee3e05..0b1cab6 100644 --- a/assembly/serialize/float.ts +++ b/assembly/serialize/float.ts @@ -1,4 +1,11 @@ +import { bl } from "../bl"; + // @ts-ignore: Decorator valid here @inline export function serializeFloat(data: T): string { return data.toString(); +} + +// @ts-ignore: Decorator valid here +@inline export function serializeFloatBL(data: T): void { + bl.write_s(data.toString()); } \ No newline at end of file diff --git a/assembly/serialize/integer.ts b/assembly/serialize/integer.ts index fbf2dd3..803265d 100644 --- a/assembly/serialize/integer.ts +++ b/assembly/serialize/integer.ts @@ -1,5 +1,11 @@ +import { bl } from "../bl"; // @ts-ignore: Decorator valid here @inline export function serializeInteger(data: T): string { // I have a much faster implementation of itoa that I will port over later. Its ~4x faster return data.toString(); +} + +// @ts-ignore: Decorator valid here +@inline export function serializeIntegerBL(data: T): void { + bl.write_32_u(3276849); } \ No newline at end of file diff --git a/assembly/serialize/map.ts b/assembly/serialize/map.ts index c8dc149..83e3029 100644 --- a/assembly/serialize/map.ts +++ b/assembly/serialize/map.ts @@ -1,25 +1,47 @@ -import { COLON, COMMA, BRACE_LEFT_WORD, BRACE_RIGHT } from "../chars"; +import { bl } from "../bl"; +import { COLON, COMMA, BRACE_LEFT_WORD, BRACE_RIGHT, EMPTY_BRACES_PTR, BRACE_LEFT } from "../chars"; import { JSON } from ".."; import { Sink } from "../sink"; // @ts-ignore: Decorator valid here @inline export function serializeMap>(data: T): string { - if (changetype(data) == 0) return "{}"; let result = Sink.fromString(BRACE_LEFT_WORD); if (!data.size) return "{}"; let keys = data.keys(); let values = data.values(); const end = data.size - 1; for (let i = 0; i < end; i++) { - result.write(JSON.stringify(unchecked(keys[i]).toString())); + result.write(JSON.stringify(unchecked(keys[i]))); result.writeCodePoint(COLON); result.write(JSON.stringify(unchecked(values[i]))); result.writeCodePoint(COMMA); } - result.write(JSON.stringify(unchecked(keys[end]).toString())); + result.write(JSON.stringify(unchecked(keys[end]))); result.writeCodePoint(COLON); result.write(JSON.stringify(unchecked(values[end]))); result.writeCodePoint(BRACE_RIGHT); return result.toString(); +} + +// @ts-ignore: Decorator valid here +@inline export function serializeMapBL>(data: T): void { + bl.write_16(BRACE_LEFT); + if (!data.size) { + bl.write_b(EMPTY_BRACES_PTR, 4); + return; + } + const keys = data.keys(); + const values = data.values(); + const end = data.size - 1; + for (let i = 0; i < end; i++) { + JSON.stringifyBL(unchecked(keys[i])); + bl.write_16(COLON); + JSON.stringifyBL(unchecked(values[i])); + bl.write_16(COMMA); + } + JSON.stringifyBL(unchecked(keys[end])); + bl.write_16(COLON); + JSON.stringifyBL(unchecked(values[end])); + bl.write_16(BRACE_RIGHT); } \ No newline at end of file diff --git a/assembly/serialize/mpz.ts b/assembly/serialize/mpz.ts index 87982c5..19f1fa1 100644 --- a/assembly/serialize/mpz.ts +++ b/assembly/serialize/mpz.ts @@ -1,6 +1,12 @@ +import { bl } from "../bl"; import { MpZ } from "@hypercubed/as-mpz"; // @ts-ignore: Decorator valid here @inline export function serializeMpZ(data: MpZ): string { return data.toString(); +} + +// @ts-ignore: Decorator valid here +@inline export function serializeMpZBL(data: MpZ): void { + bl.write_s(data.toString()); } \ No newline at end of file diff --git a/assembly/serialize/object.ts b/assembly/serialize/object.ts index e59d85a..2a7bab5 100644 --- a/assembly/serialize/object.ts +++ b/assembly/serialize/object.ts @@ -1,7 +1,14 @@ +import { bl } from "../bl"; interface GeneratedInterface { __SERIALIZE(): string; + __SERIALIZE_BL(): void; } // @ts-ignore: Decoraor valid here @inline export function serializeObject(data: T): string { return changetype>(data).__SERIALIZE(); +} + +// @ts-ignore: Decoraor valid here +@inline export function serializeObjectBL(data: T): void { + changetype>(data).__SERIALIZE_BL(); } \ No newline at end of file diff --git a/assembly/serialize/string.ts b/assembly/serialize/string.ts index 096bd85..96799b1 100644 --- a/assembly/serialize/string.ts +++ b/assembly/serialize/string.ts @@ -1,3 +1,4 @@ +import { bl } from "../bl"; import { BACK_SLASH, BACKSPACE, @@ -9,7 +10,7 @@ import { TAB } from "../chars"; import { Sink } from "../sink"; -import { unsafeCharCodeAt } from "../util"; +import { _intTo16, intTo16, unsafeCharCodeAt } from "../util"; // @ts-ignore: Decorator valid here @inline export function serializeString(data: string): string { @@ -70,4 +71,468 @@ import { unsafeCharCodeAt } from "../util"; result.write(data, last); result.writeCodePoint(QUOTE); return result.toString(); +} + +// @ts-ignore: Decorator valid here +@inline export function serializeStringBL(data: string): void { + const len = data.length << 1; + if (len === 0) { + bl.write_32(2228258); /* "" */ + return; + } + + let offset = 0; + bl.write_16(34); /* " */ + + // if (len > 7) { + // for (; offset < len - 7; offset += 8) { + // const char = load(changetype(data) + offset); + // const a = i32(char & 0xFFFF); + // const b = i32((char >> 16) & 0xFFFF); + // const c = i32((char >> 32) & 0xFFFF); + // const d = i32((char >> 48) & 0xFFFF); + + // //console.log(`a: ${String.fromCharCode(a)}\nb: ${String.fromCharCode(b)}\nc: ${String.fromCharCode(c)}\nd: ${String.fromCharCode(d)}`); + + // if (a > 31) { + // if (a === QUOTE) { + // bl.write_32(2228316); /* \\" */ + // } else if (a === BACK_SLASH) { + // bl.write_32(6029404); /* \\\\ */ + // } else { + // bl.write_16(a); + // } + // } else { + // if (a < 16) { + // switch (a) { + // case BACKSPACE: { + // bl.write_32(6422620); /* \\b */ + // break; + // } + // case TAB: { + // bl.write_32(7602268); /* \\t */ + // break; + // } + // case NEW_LINE: { + // bl.write_32(7209052); /* \\n */ + // break; + // } + // case FORM_FEED: { + // bl.write_32(6684764); /* \\f */ + // break; + // } + // case CARRIAGE_RETURN: { + // bl.write_32(7471196); /* \\r */ + // break; + // } + // default: { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0000 to \u000f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((_intTo16(a) << 16) | 48); /* 0_ */ + // break; + // } + // } + // } else { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0010 to \u001f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((intTo16(a) << 16) | 48); /* 0_ */ + // } + // } + + // if (b > 31) { + // if (b === QUOTE) { + // bl.write_32(2228316); /* \\" */ + // } else if (b === BACK_SLASH) { + // bl.write_32(6029404); /* \\\\ */ + // } else { + // bl.write_16(b); + // } + // } else { + // if (b < 16) { + // switch (b) { + // case BACKSPACE: { + // bl.write_32(6422620); /* \\b */ + // break; + // } + // case TAB: { + // bl.write_32(7602268); /* \\t */ + // break; + // } + // case NEW_LINE: { + // bl.write_32(7209052); /* \\n */ + // break; + // } + // case FORM_FEED: { + // bl.write_32(6684764); /* \\f */ + // break; + // } + // case CARRIAGE_RETURN: { + // bl.write_32(7471196); /* \\r */ + // break; + // } + // default: { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0000 to \u000f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((_intTo16(b) << 16) | 48); /* 0_ */ + // break; + // } + // } + // } else { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0010 to \u001f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((intTo16(b) << 16) | 48); /* 0_ */ + // } + // } + + // if (c > 31) { + // if (c === QUOTE) { + // bl.write_32(2228316); /* \\" */ + // } else if (c === BACK_SLASH) { + // bl.write_32(6029404); /* \\\\ */ + // } else { + // bl.write_16(c); + // } + // } else { + // if (c < 16) { + // switch (c) { + // case BACKSPACE: { + // bl.write_32(6422620); /* \\b */ + // break; + // } + // case TAB: { + // bl.write_32(7602268); /* \\t */ + // break; + // } + // case NEW_LINE: { + // bl.write_32(7209052); /* \\n */ + // break; + // } + // case FORM_FEED: { + // bl.write_32(6684764); /* \\f */ + // break; + // } + // case CARRIAGE_RETURN: { + // bl.write_32(7471196); /* \\r */ + // break; + // } + // default: { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0000 to \u000f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((_intTo16(c) << 16) | 48); /* 0_ */ + // break; + // } + // } + // } else { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0010 to \u001f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((intTo16(c) << 16) | 48); /* 0_ */ + // } + // } + // if (d > 31) { + // if (d === QUOTE) { + // bl.write_32(2228316); /* \\" */ + // } else if (d === BACK_SLASH) { + // bl.write_32(6029404); /* \\\\ */ + // } else { + // bl.write_16(d); + // } + // } else { + // if (d < 16) { + // switch (d) { + // case BACKSPACE: { + // bl.write_32(6422620); /* \\b */ + // break; + // } + // case TAB: { + // bl.write_32(7602268); /* \\t */ + // break; + // } + // case NEW_LINE: { + // bl.write_32(7209052); /* \\n */ + // break; + // } + // case FORM_FEED: { + // bl.write_32(6684764); /* \\f */ + // break; + // } + // case CARRIAGE_RETURN: { + // bl.write_32(7471196); /* \\r */ + // break; + // } + // default: { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0000 to \u000f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((_intTo16(d) << 16) | 48); /* 0_ */ + // break; + // } + // } + // } else { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0010 to \u001f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((intTo16(d) << 16) | 48); /* 0_ */ + // } + // } + // } + // } + + if (len > 3) { + for (; offset < len - 3; offset += 4) { + const char = load(changetype(data) + offset); + const a = char & 0xFFFF; + const b = char >> 16; + + //console.log("a: " + String.fromCharCode(a)); + //console.log("b: " + String.fromCharCode(b)); + if (a > 31) { + if (b > 31) { + switch (a) { + case QUOTE: { + bl.write_32(2228316); /* \\" */ + break; + } + case BACK_SLASH: { + bl.write_32(6029404); /* \\\\ */ + break; + } + default: { + switch (b) { + case QUOTE: { + bl.write_16(a); + bl.write_32(2228316); /* \\" */ + break; + } + case BACK_SLASH: { + bl.write_16(a); + bl.write_32(6029404); /* \\\\ */ + break; + } + default: { + bl.write_32(char); + break; + } + } + } + } + } else { + switch (a) { + case QUOTE: { + bl.write_32(2228316); /* \\" */ + break; + } + case BACK_SLASH: { + bl.write_32(6029404); /* \\\\ */ + break; + } + default: { + bl.write_16(a); + break; + } + } + } + } else { + if (a < 16) { + switch (a) { + case BACKSPACE: { + bl.write_32(6422620); /* \\b */ + break; + } + case TAB: { + bl.write_32(7602268); /* \\t */ + break; + } + case NEW_LINE: { + bl.write_32(7209052); /* \\n */ + break; + } + case FORM_FEED: { + bl.write_32(6684764); /* \\f */ + break; + } + case CARRIAGE_RETURN: { + bl.write_32(7471196); /* \\r */ + break; + } + default: { + // all chars 0-31 must be encoded as a four digit unicode escape sequence + // \u0000 to \u000f handled here + bl.write_64(13511005048209500) /* \\u00 */ + bl.write_32((_intTo16(a) << 16) | 48); /* 0_ */ + break; + } + } + } else { + // all chars 0-31 must be encoded as a four digit unicode escape sequence + // \u0010 to \u001f handled here + bl.write_64(13511005048209500) /* \\u00 */ + bl.write_32((intTo16(a) << 16) | 48); /* 0_ */ + } + } + + // if (b > 31) { + // if (b === QUOTE) { + // bl.write_32(2228316); /* \\" */ + // } else if (b === BACK_SLASH) { + // bl.write_32(6029404); /* \\\\ */ + // } else { + // bl.write_16(b); + // } + // } else { + // if (b < 16) { + // switch (b) { + // case BACKSPACE: { + // bl.write_32(6422620); /* \\b */ + // break; + // } + // case TAB: { + // bl.write_32(7602268); /* \\t */ + // break; + // } + // case NEW_LINE: { + // bl.write_32(7209052); /* \\n */ + // break; + // } + // case FORM_FEED: { + // bl.write_32(6684764); /* \\f */ + // break; + // } + // case CARRIAGE_RETURN: { + // bl.write_32(7471196); /* \\r */ + // break; + // } + // default: { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0000 to \u000f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((_intTo16(b) << 16) | 48); /* 0_ */ + // break; + // } + // } + // } else { + // // all chars 0-31 must be encoded as a four digit unicode escape sequence + // // \u0010 to \u001f handled here + // bl.write_64(13511005048209500) /* \\u00 */ + // bl.write_32((intTo16(b) << 16) | 48); /* 0_ */ + // } + // } + } + if (offset < len) { + const c = load(changetype(data) + len - 2); + if (c > 31) { + if (c === QUOTE) { + bl.write_32(2228316); /* \\" */ + } else if (c === BACK_SLASH) { + bl.write_32(6029404); /* \\\\ */ + } else { + bl.write_32(2228224 | c); /* "_ */ + } + } else { + if (c < 16) { + switch (c) { + case BACKSPACE: { + bl.write_32(6422620); /* \\b */ + bl.write_16(34); /* " */ + break; + } + case TAB: { + bl.write_32(7602268); /* \\t */ + bl.write_16(34); /* " */ + break; + } + case NEW_LINE: { + bl.write_32(7209052); /* \\n */ + bl.write_16(34); /* " */ + break; + } + case FORM_FEED: { + bl.write_32(6684764); /* \\f */ + bl.write_16(34); /* " */ + break; + } + case CARRIAGE_RETURN: { + bl.write_32(7471196); /* \\r */ + bl.write_16(34); /* " */ + break; + } + default: { + // all chars 0-31 must be encoded as a four digit unicode escape sequence + // \u0000 to \u000f handled here + bl.write_64(13511005048209500) /* \\u00 */ + bl.write_32((_intTo16(c) << 16) | 48); /* 0_ */ + bl.write_16(34); /* " */ + break; + } + } + } else { + // all chars 0-31 must be encoded as a four digit unicode escape sequence + // \u0010 to \u001f handled here + bl.write_64(13511005048209500) /* \\u00 */ + bl.write_32((intTo16(c) << 16) | 48); /* 0_ */ + bl.write_16(34); /* " */ + } + } + } + } else { + const c = load(changetype(data) + len - 2); + if (c > 31) { + if (c === QUOTE) { + bl.write_32(2228316); /* \\" */ + } else if (c === BACK_SLASH) { + bl.write_32(6029404); /* \\\\ */ + } else { + bl.write_32(2228224 | c); /* "_ */ + } + } else { + if (c < 16) { + switch (c) { + case BACKSPACE: { + bl.write_32(6422620); /* \\b */ + bl.write_16(34); /* " */ + break; + } + case TAB: { + bl.write_32(7602268); /* \\t */ + bl.write_16(34); /* " */ + break; + } + case NEW_LINE: { + bl.write_32(7209052); /* \\n */ + bl.write_16(34); /* " */ + break; + } + case FORM_FEED: { + bl.write_32(6684764); /* \\f */ + bl.write_16(34); /* " */ + break; + } + case CARRIAGE_RETURN: { + bl.write_32(7471196); /* \\r */ + bl.write_16(34); /* " */ + break; + } + default: { + // all chars 0-31 must be encoded as a four digit unicode escape sequence + // \u0000 to \u000f handled here + bl.write_64(13511005048209500) /* \\u00 */ + bl.write_32((_intTo16(c) << 16) | 48); /* 0_ */ + bl.write_16(34); /* " */ + break; + } + } + } else { + // all chars 0-31 must be encoded as a four digit unicode escape sequence + // \u0010 to \u001f handled here + bl.write_64(13511005048209500) /* \\u00 */ + bl.write_32((intTo16(c) << 16) | 48); /* 0_ */ + bl.write_16(34); /* " */ + } + } + } } \ No newline at end of file diff --git a/assembly/serialize/unknown.ts b/assembly/serialize/unknown.ts index 07c0c25..0306c6c 100644 --- a/assembly/serialize/unknown.ts +++ b/assembly/serialize/unknown.ts @@ -1,45 +1,48 @@ -import { JSON } from ".."; -import { Sink } from "../sink"; -import { __atoi_fast } from "../util"; -import { serializeBool } from "./bool"; -import { serializeFloat } from "./float"; -import { serializeInteger } from "./integer"; -import { serializeString } from "./string"; - -/** - * Serializes unknown values into their correct serializer and returns the data. - * - * @param data - The JSON.Value to be serialized. - * @returns The serialized result. - */ -// @ts-ignore: Decorator valid here -@inline export function serializeUnknown(data: JSON.Value): string { - const type = data.type; - switch (type) { - case JSON.Types.String: { - return serializeString(data.get()); - } - case JSON.Types.Bool: { - return serializeBool(data.get()); - } - case JSON.Types.U8: { - return serializeInteger(data.get()); - } - case JSON.Types.U16: { - return serializeInteger(data.get()); - } - case JSON.Types.U32: { - return serializeInteger(data.get()); - } - case JSON.Types.U64: { - return serializeInteger(data.get()); - } - case JSON.Types.F32: { - return serializeFloat(data.get()); - } - case JSON.Types.F64: { - return serializeFloat(data.get()); +const b = 0; +if (b === QUOTE || b === BACK_SLASH) { + bl.write_s_se(data, last, i); + bl.write_16(BACK_SLASH); + last = i; + i += 2; +} else if (16 > b) { + bl.write_s_se(data, last, i); + last = i + 2; + i += 2; + switch (b) { + case BACKSPACE: { + bl.write_32(6422620); /* \\b */ + break; + } + case TAB: { + bl.write_32(7602268); /* \\t */ + break; + } + case NEW_LINE: { + bl.write_32(7209052); /* \\n */ + break; + } + case FORM_FEED: { + bl.write_32(6684764); /* \\f */ + break; + } + case CARRIAGE_RETURN: { + bl.write_32(7471196); /* \\r */ + break; + } + default: { + // all chars 0-31 must be encoded as a four digit unicode escape sequence + // \u0000 to \u000f handled here + bl.write_64(13511005048209500) /* \\u00 */ + bl.write_32((_intTo16(b) << 16) | 48); /* 0_ */ + break; } } - return "ERROR"//serializeUnknownArray(data.get()); +} else if (32 > b) { + bl.write_s_se(data, last, i); + last = i + 2; + // all chars 0-31 must be encoded as a four digit unicode escape sequence + // \u0010 to \u001f handled here + bl.write_64(13511005048209500) /* \\u00 */ + bl.write_32((intTo16(b) << 16) | 48); /* 0_ */ + i += 2; } \ No newline at end of file diff --git a/assembly/sink.ts b/assembly/sink.ts index ce4a949..ba48ec8 100644 --- a/assembly/sink.ts +++ b/assembly/sink.ts @@ -112,7 +112,7 @@ export class Sink { changetype(src) + (start << 1), size ); - this.offset = offset + size; + //this.offset = offset + size; return this; } diff --git a/assembly/test.ts b/assembly/test.ts index 86252d8..3504c2f 100644 --- a/assembly/test.ts +++ b/assembly/test.ts @@ -1,14 +1,20 @@ -import { JSON } from "json-as/assembly"; -import * as console from "as-console"; +import { JSON } from "."; +import { bl } from "./bl"; +/* @json -class Yo { - map: Map; - - constructor() { - this.map = new Map(); - } -} - -let y = new Yo(); -y.map.set("bhavya", 3000); -console.log(JSON.stringify(y)); \ No newline at end of file +class Vec3 { + x: f64 = 1.0; + y: f64 = 2.0; + z: f64 = 3.0; + __SERIALIZE_BL(): void { + bl.write_128(i16x8(123, 34, 120, 34, 58, 49, 44, 34)); /* {"x":1," */ +// bl.write_128(i16x8(121, 34, 58, 50, 44, 34, 122, 34)); /* y":2,"z" */ +// bl.write_32(3342394); /* :3 */ +// bl.write_16(125); /* } */ +// } +//} +//const vec = new Vec3();*/ +JSON.stringifyBL("hello w\"orld!"); +console.log(bl.out())/* +JSON.stringifyBL(vec); +console.log(bl.out())*/ \ No newline at end of file diff --git a/assembly/util.ts b/assembly/util.ts index 3e68898..044334f 100644 --- a/assembly/util.ts +++ b/assembly/util.ts @@ -362,3 +362,31 @@ export function containsCodePoint(str: string, code: u32, start: i32, end: i32): } return false; } + +export function _intTo16(int: i32): i32 { + if (int < 10) { + // 0-10 + return 48 + int; + } else { + // a-f + return 87 + int; + } +} + +@inline export function intTo16(int: i32): i32 { + const high = int >> 4; + const low = int & 0x0F; + if (low < 10) { + if (high < 10) { + return ((48 + low) << 16) | 48 + high; + } else { + return ((48 + low) << 16) | 87 + high; + } + } else { + if (high < 10) { + return ((87 + low) << 16) | 48 + high; + } else { + return ((87 + low) << 16) | 87 + high; + } + } +} \ No newline at end of file diff --git a/bench.js b/bench.js index 88e8866..4efbaf7 100644 --- a/bench.js +++ b/bench.js @@ -1,75 +1,89 @@ import { Bench } from "tinybench"; -// Trying a new benchmarking lib. - -// JavaScript Results -// ┌─────────┬───────────────────────────┬─────────────┬────────────────────┬──────────┬─────────┐ -// │ (index) │ Task Name │ ops / sec │ Average Time(ns) │ Margin │ Samples │ -// ├─────────┼───────────────────────────┼─────────────┼────────────────────┼──────────┼─────────┤ -// │ 0 │ 'Stringify Object (Vec3)' │ '817,816' │ 1222.76 │ '±3.55%' │ 81782 │ -// │ 1 │ 'Parse Object (Vec3)' │ '726,115' │ 1377.19 │ '±3.21%' │ 72612 │ -// │ 2 │ 'Stringify Number Array' │ '1,104,036' │ 905.77 │ '±6.48%' │ 110404 │ -// │ 3 │ 'Parse Number Array' │ '1,114,053' │ 897.62 │ '±2.58%' │ 111406 │ -// │ 4 │ 'Stringify String' │ '1,565,716' │ 638.69 │ '±2.04%' │ 156572 │ -// │ 5 │ 'Parse String' │ '69,568' │ 14374.22 │ '±2.55%' │ 6957 │ -// └─────────┴───────────────────────────┴─────────────┴────────────────────┴──────────┴─────────┘ - -// AssemblyScript Results (Runtime Minimal) -// ┌─────────┬───────────────────────────┬─────────────┬────────────────────┬──────────┬─────────┐ -// │ (index) │ Task Name │ ops / sec │ Average Time(ns) │ Diff │ Samples │ -// ├─────────┼───────────────────────────┼─────────────┼────────────────────┼──────────┼─────────┤ -// │ 0 │ 'Stringify Object (Vec3)' │ '2,091,000' │ 417.22 │ -805ns │ ------- │ -// │ 1 │ 'Parse Object (Vec3)' │ '1,780,000' │ 539.02 │ -838ns │ ------- | -// │ 2 │ 'Stringify Number Array' │ '1,920,000' │ 445.43 │ -460ns │ ------- │ -// │ 3 │ 'Parse Number Array' │ '1,660,000' │ 597.17 │ -300ns │ ------- │ -// │ 4 │ 'Stringify String' │ '1,280,000' │ 736.27 │ +97ns │ ------- │ -// │ 5 │ 'Parse String' │ '4,230,000' │ 239.21 │ -14135ns │ ------- │ -// └─────────┴───────────────────────────┴─────────────┴────────────────────┴──────────┴─────────┘ const vec = { - x: 3, - y: 1, - z: 8, + x: 3.4, + y: 1.2, + z: 8.1, }; let data; +let b = [[],[[]],[[],[[]]]]; + +let str = randomAlphabet() + '0123456789!"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~'; + +function randomAlphabet() { + // Generate the alphabet arrays for lowercase and uppercase letters + let lowercase = 'abcdefghijklmnopqrstuvwxyz'; + let uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + + // Combine both arrays + let alphabet = lowercase + uppercase; + + // Convert the combined string into an array of characters + alphabet = alphabet.split(''); + + // Shuffle the array using Fisher-Yates (Knuth) Shuffle algorithm + for (let i = alphabet.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [alphabet[i], alphabet[j]] = [alphabet[j], alphabet[i]]; + } + + // Join the shuffled array back into a string and return + return alphabet.join(''); +} +(async () => { +setInterval(async () => { + str = randomAlphabet() + '0123456789!"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~'; + b[0][0] = [1]; + b[0][0] = []; + vec.x = Math.random()<<1; + vec.y = Math.random()<<1; + vec.z = Math.random()<<1; +}, 0); +})(); +// to prevent v8 from compiling a static output + const bench = new Bench({ time: 1000 }) - /*.add("stringify float", () => { - data = JSON.stringify(1.2345) - }) - .add("parse float", () => { - data = JSON.parse("1.2345") - }) - .add("stringify iny", () => { - data = JSON.stringify(12345) - }) - .add("parse int", () => { - data = JSON.parse("12345") - }) - .add("Stringify Object (Vec3)", () => { - data = JSON.stringify(vec); - }) + // .add("stringify float", () => { + // data = JSON.stringify(1.2345) + // }) + // .add("parse float", () => { + // data = JSON.parse("1.2345") + // }) + // .add("stringify int", () => { + // data = JSON.stringify(12345) + // }) + // .add("parse int", () => { + // data = JSON.parse("12345") + // }) + // .add("Stringify Object (Vec3)", () => { + // data = JSON.stringify(vec); + // }) - .add("Parse Object (Vec3)", () => { - data = JSON.parse('{"x":0,"y":0,"z":0}'); - }) + // .add("Parse Object (Vec3)", () => { + // data = JSON.parse('{"x":0,"y":0,"z":0}'); + // }) - .add("Stringify Number Array", () => { - data = JSON.stringify([1, 2, 3]); - }) + // .add("Stringify Number Array", () => { + // data = JSON.stringify([1, 2, 3]); + // }) - .add("Parse Number Array", () => { - data = JSON.parse("[1,2,3]"); - }) + // .add("Parse Number Array", () => { + // data = JSON.parse("[1,2,3]"); + // }) .add("Stringify String", () => { - data = JSON.stringify('Hello "World!'); + data = JSON.stringify("hello world"); }) -*/ + .add("Parse String", () => { data = JSON.parse('[[],[[]],[[],[[]]]]'); }) - .todo("unimplemented .add"); + + .add("Stringify [[],[[]],[[],[[]]]]", () => { + data = JSON.stringify(b) + }) await bench.run(); diff --git a/bench/benchmark.ts b/bench/benchmark.ts index 7c15971..3fba733 100644 --- a/bench/benchmark.ts +++ b/bench/benchmark.ts @@ -2,63 +2,60 @@ import { bench, blackbox } from "as-bench/assembly/bench"; import { __atoi_fast } from "../assembly/util"; import { JSON } from "../assembly"; +import { bl } from "../assembly/bl"; +import { serializeString, serializeStringBL } from "../assembly/serialize/string"; +import { serializeInteger, serializeIntegerBL } from "../assembly/serialize/integer"; +import { serializeFloatBL } from "../assembly/serialize/float"; + +const out = new ArrayBuffer(65536); @json class Vec3 { x: i32; y: i32; z: i32; + __SERIALIZE_BL(): void { + bl.write_128_u(i16x8(123, 34, 120, 34, 58, 49, 44, 34)); /* {"x":1," */ + bl.write_128_u(i16x8(121, 34, 58, 50, 44, 34, 122, 34)); /* y":2,"z" */ + bl.write_32_u(3342394); /* :3 */ + bl.write_16_u(125); /* } */ + } } +console.log(load(changetype("12")).toString()) const vec: Vec3 = { x: 3, y: 1, z: 8, } -/* -bench("Parse Number SNIP", () => { - blackbox(snip_fast("12345")); -}); -bench("Parse Number ATOI", () => { - blackbox(__atoi_fast("12345")); -}) - -bench("Parse Number STDLIB", () => { - blackbox(i32.parse("12345")); +bench("Serialize String (New)", () => { + serializeStringBL("hello world"); + bl._out(changetype(out)) + bl.reset(); }); -bench("Stringify Object (Vec3)", () => { - blackbox(JSON.stringify(vec)); -});*/ - -bench("Parse Object (Vec3)", () => { - blackbox(JSON.parse('{"x":0,"y":0,"z":0}')); -});/* - -bench("Stringify Number Array", () => { - blackbox(JSON.stringify([1, 2, 3])); +bench("Serialize String (Old)", () => { + serializeString("hello world"); }); -bench("Parse Number Array", () => { - blackbox(JSON.parse(blackbox("[1,2,3]"))); +bench("Serialize Vec3 (New)", () => { + vec.__SERIALIZE_BL(); + bl._out(changetype(out)) + bl.reset(); }); -bench("Stringify String", () => { - blackbox(JSON.stringify(blackbox('Hello "World!'))); +bench("Serialize Vec3 (Old)", () => { + blackbox(JSON.stringify(vec)); }); -bench("Parse Number ATOI", () => { - blackbox(__atoi_fast("12345")); -}) - -bench("Parse String", () => { - blackbox(JSON.parse(blackbox('"Hello "World!"'))); -}); -/* -bench("Stringify Boolean Array", () => { - blackbox(JSON.stringify([true, false, true])); +bench("Serialize Integer", () =>{ + serializeIntegerBL(12345); + bl._out(changetype(out)) + bl.reset(); }); -bench("Stringify String Array", () => { - blackbox(JSON.stringify(["a", "b", "c"])); -});*/ \ No newline at end of file +bench("Serialize Float", () => { + serializeFloatBL(1.2345); + bl._out(changetype(out)) + bl.reset(); +}) \ No newline at end of file diff --git a/bench/benchmark.wasm b/bench/benchmark.wasm new file mode 100644 index 0000000000000000000000000000000000000000..bd94f3d50525475b4e10fd0208c3fd4f1d6ee38e GIT binary patch literal 20972 zcmeHudwf;Jwg2qLIXTJB30%04Gi(E14Phqh!Qq9Csd_@Gz>3`h=-5F!tSaBe}G zTcbp@ia@UcR8WIreMJm4T3e$=h>DulRPoiDD!-c6wx9G8$nX1|*=Oe@#LDmX_xtqs z$IW48&7PUHX00`A)~r3V5i^%8FoY1sHCZav+j=FM2LaAxt6n--PMC@v{nI1#0>;3 z(?~Hb!!(5Dq-SIXLLt+(gLVo8#h)E8ij9<%fMp0XczNb(Lki~~XJtl#a8%aWuiInF zNoH_C;etgaD@+lbv7~fnNvVjYrW-;UPB8P#v--G^baTI%R(YNKhG|%<&3rRI$COqq z(=rT0IKpv-Ye=KCC}O#0#IW-5Y>lx2E;2;amT_Z@z1lTgdxTIOivlhx!(OEfE|qmg z393deM%NMe3h)G85qKJV(0YrMxaU9A* zjDw2pPErZZ(W;4$5GK&ABF9k#OcF2@z8P~Khx%4aA=5F4OfUHOmA!Yry6?{LP)oQ1 z`V#WwSU)o?jinJ=TDc~aYRi+tmOQB_AWw3lLRP)~{2G%SYSvr>`Y^g?l%+Ll?1PMm4)=DsAdCXYS zW5)8Cu@cN!J~Ni|nL(w`49fq28IVpegW|%dmBh>=C&TO{v?bGGoDvgrW5`fg^p+h) z*l_;cFan&G_KuDY>qE29A*V^%CT5R)KP1T$T^ScaEIu`b-e*z9~E#TDoh@Ct$^XXV;3JHhETo$-cA zP7ZbF(X zA}|6OAXn_*IIqB!tcKATYRVNo7-BIzimF-2^@Gkz9C#Wq{+U<^7G(8L?V`a@3M-0} zDhk|nYq69xLui`_nxtS-A*5g=BR~*pmUS2k3mhisBY54t!F1PvA_gsJQh7zN9mjds zHmx%HI%!^kEO%@P%;ezRwmf)`E&pml!)kJ%FIn|dJIj$+yD?A_vd>abiUzYI0gg>y z7f39N0GQ(H3nZ3Bz+V=D#Ik?~^wwygb6KF$Ulu4QmIbW3)D0F%6El*6f(u!~A&wiy zxU!EMn2X818S5Am*0n2UA+RfAs>N+mL6{Y4l>Oibc3`0_<{UI`v}qg4SPMes5mQYA zdeLPY>=@LYut8990hlugW3uN-gG`Kctra_B;Ki65TL?~o?;6!nJA%1W&c$@CYe5Se zPMo`rYnDa0>WotDVZotQAg)q9Z1zA?!ug^YqxpTu^#Q?6_y5-)6a+W6ICH!(Ov?@gQ$nd}3|_LrC!BcF$)}v!>$KB*XP==0iD*vl z+2{1_ckX%LIsbwSFUspbVBny^Lxv6;KH}m_zWcqA`Lf{BQJ0Or{E9JSuN*htk*!;~ zMyj?kuT%L!l~-<8H7ajadF6wuM&$=p9)C#Ts=QInSN@#!bt-RFdDT;@M&$=p z9)DUg@R$cR~!d3Y}mB*h`Jyl+(@>Z2s)+m}PKUiZsk6GA5lkFI` zlL&L7c4i=e_*dB2zb-O@Q3K)N#0*P4*->olcrw+K2_McUcm)+>!n@%K+sjs4)^D}p zcjPNuZC4fW3=d~Ati&e4XwQ(Rl`^u!?oI?lHf*)S0v>@@jD;t{X|nQpTRsVoNQX`5 zBjEbzrxmjZbfwU4Fe%U_6FN#_AcZFt;bOAiA}19v*$9~6tf30bK0;?~ugZ5{ znT@~*>U8b)G=Yc!VKHWl>cGf84m3}>7`}v2LX@=EFoLUPMHU2wEn;&tWVw343@;^v z)MQ78P?6yVTOQnla9!q6C>d8BZ7nsX6ui(vR3teu8={6>ZaJax+1Nd!N~$YS9ZpBt zERuo-9BX&Lvm3k|+haV-4RVgxYUqFyH-HKUHQ*0+j^Iq&Lq(Pf!JNZkwen>39veMm z+2W{yFeJy2+v4R6!BDb`at(m0^)|M47P2t8Iie_+hGQUFV3jMVHWYHfaX5pE16`xo zsQ{qBVoKF~-nW$lZHX2!VypRSCpC)UnAh*;Zxk zMIdSv8Ubh)qceE%6uJ)#JLH4 zyU1S8E|MqeI8n*WIk0;;M65|oH<6<<6w3@^GY?=l_w;E|h2BG>da!j%je4;3!$$Ss z%|X3-;HU-7@dIn(>*A*&AO|<0Z?h7+o0ZtG67r7MNM!E|=4oTH=^*mx$eqCdoiRYx zUK%mgP+7FOH1FM512uYH5%&;oD4Gxb3{~PiH>n#MyY}-c9H*0OZ(^vrE^F@FR}5T} zAI-W37mOhv$AaN`3*IHTQiP1c$Ah%D7!c&s;JqqkV$d2Y<5(<8iR43>87h0Q3h^(n z3Pbx21mo}>CauEg^c|+Q3PGz7YBuoZ{(o*2-#P|}!z$p{P=Hl%5cP`Z0X2HUDh!Vg z-zxAjr+X)u)K-z`_sv$(-6+1*5d$H~3m;=t---_t{vRWPYxy4|^0)H;h7mbAIJd~6 z@n*&RrRr?OsrG6aueBqVN!O%9esgIwg|F5D1Z^3JaS)HV3{ImKO1d}03%ozuZiI4r2Y;P-dB6#+!yvCHVgrRSMf(dX&@qrBW;!uyA zjYmX>=v0KkY@aM*4WpEDFoZ;84#J&1$sz{wI$*O_9fD*csF;9Ei2+0>8pcg%plmT| zgI&uR!NXvqpe2Q&eAtAWNqQTp+H1>9nWBC;0Zh5XtANK0QHXimGiGw7(b9o0zcsWWO_M*~1NJ2Srkc22$ z=@ij4rh-REq97jM^zau?d}>S~M+Nb!dmg&uOt0Md!7u+}PLpX^Vg>Q~C#ue#h8H7Z z{9()S5OLgnnYyX9irKYWu~QuQi1`SCm(5i-&bpGAzq=qVlj?Sbp!0wt4E2|sj5E~ ztXGW^t7%AFy}A|!R;I8LqUuT%SQ%s`tX)^C6L%9~J}O&MbX`jd`{AH~S4FxCs{mCv zmqEy@YtmQ&=V(UY%TY9NvK;{#oV?%!T)lkDs+aX$9Ny*-vEhBobJsZRgcc$}`rlnH zX31FRhE_%emTFEKj;C{x!Hdee*YrWZu`a^vH@Kev0L7?@m^TuDs)d_61vJDe*O<1L z-p4goMnkMjWhF|ht}X$44j96vMGOjN7w<;SbOVZ|Ebchma;$>1GMog50HOkHm1Ei2 z)ob;kvKn3qWZ=yE8zmC1vj!|!({L=DkR?@O+u`L&LZGsU(!{aigsz4-p;d005+~%Q ztpp2V3b;lkO2>%9E|HMhc@p9{zqPTixTe}#)m~L3ACK4Zg&$95Q5Kd0_AR)pQ^uiW zjf3VOJW6`MRZddoQ8g%HllAsBy8cc|IBtMHRx~Uayw<+zf^7_kT|#mN0!8hlLSC4l zMhUO>Rixk(}n)SIO6Z(BrSlf+Atw@Kp2F|kRa z(%&Re#tP+)D7cEkvty}TAiv{U*^nG|2VRgtGZYaX2!}h2F_dP&DrZFe>-om5P%_`( zix$Ax%7kQ&bGvP(@wO|m%?L3&>ewr}($&?4D>gw^XK&Ofi0i+$4zZ?S5S(thG~D!T z`BW$t&A^PfhKg7aw4|(Y)1|n4SHYllF!usuT>)0HxdIrmNG5jL^y+oFDX>qUWa#@; zF{5IE^czl;QE4PD6Wj8&%Q zEOS#ym7ak`jkHq1l$C7Zl~cfl-IZ#O3zIK%Q#>4OiYYzdxPhGXoYW$jA9JxH-8Ar~ z5U`L~>}imdt6V31lIz5B(!wXZPLZ>acgU45;SSu)PqK)a2<-9Os`V~}n1yAxo84GF zE5neDFX5|>mvK7ncbT27{0z?FPw|$AK6^wbb#w>|bjBd$Rj&wK+4>~_N17IF(|^Ev z4=7*Hi%za8OD!@e1nW+p{$j^+4h5`0nYj|&fA)fRhJNq`JDe59t<3W_^0f%Q%lpc- za4J1ed~b4_h=>A%KFQ1vhY?bk>ivTEeo;$p6;j~K4FfMVCkTBPoe~bap{>zSRWwBl zT>e!494ZN{;vHjU#16P2PZcNU&#}v-5$RM-q!Y;vZEsIOkbpIU>j5VR9|+L<`C5#m zNN^`x!LKI?IK^e8;?vT8G-}gaFzmPR8cCr6u8agYikYvN4Ps?t*Y0F!4wW4~A(D!^ zKi%|c`7>>weQ!40gYHrI=9_X`_{8w3GXA<9?iE1wttUTz`Ny}c9ogB5?=!knRiYD2 z27io$6O;raSVgI>OD7dtqLXSmSnCba{>Y!+9zSc+NR4rj81!8c?84wRO(M2X*7X@K zRKg*7pw4#HJU64j3vBrr3TZ4HLP2dpjdjWd5b!_>H&g}fBxX#AnXvEp8@|qE)te}% zo0L~c!s$kr1C7Z>)!3M9R2s$Vw1Y83@g{Z*E{5H}p6!_Yh?P9qFcaAdI^JYsA;U5v z7KNod8tU`Q8h%ZSa5m4^Aj zlH)vP@FSGOdQ)F1!C$C5kd(_^Gn@8|4Hju^HkKd11+lNdr3U(7DR!&1XkTNqVTyD> zC|{9{h#`Wo(*~P}Qgn9wV3>o)m~4g}|%2O9}Xbrxrawak03k^W6{e+LckO zG(icTfs{DTG3o%zI8bnT*uXb^d``yq#+~jy`7D=cU_vewlS8H&8l?# z3-{`cdF^b7;Mg8cDv0-1_2GpAJj>XU4*7WDgLeXIUR{LY>nSlNJ8>h%^HuV1Qc!Bc zx-5gSQWZWFQchFN9&AHNV&y}0?;goms!yM>-SEbS2hb+ZnIU#`w2u8zPm#jC!Ar9U zXS+rOF%WKYcpGRF&1;5z6-7isMH-@C@@0fH;7+k$WJnP{11~DxbCrI!6VG+}*-AVg z)Xz||ho7nNp+5awrJl)CI5mQ);UIXz80ui(?Z&BxRhNtFJURo299E zSMs6@uA!g{Xxom`_ro@EI)#0S>Nlx=8iBfOa~#~=cU!4VTzxslk@Q=!2$my_5dFpZ zfJYpgcP!x^?pVaP-Q|(q3Po#xqIJtZO;7HLH*~#SJi-rtz@WM+?CGp00=cn_HH z7&#gAe=x2L9I58wTZQ-STubHn)X@8?uJNwKS9Kzs;@7tJSX;TFr@p(p)WXlH8yDCz zeI75KMJ_%pyIY;8Lj8$NMyAUYcpT-0Y4}0)GNt_wp80{F0{n)Gw}AjqGAl#;7E$B| zWh*|ks6@PVn%s@OX!koTHNJzo1FG%-7W;cFRlR4+gQ^sN-kh&k$0nC=oY{LTvB4tu56# zfo+&fF-PGpVQWR2!rYkFiMbGX^YN3_x~(S7NhK!Jtr$z!HYL^m0Hf&Iwlv3KKO5-> z;(E|`G<~O&#t2Z>wKYk#5VS$pHYL@r0%cv>mQ+i+>6&hOCtcWWwXUs6@8lwiwJsZU zeN$5Xt%9_5eOprfbTJFmGc@&#PCC<}QCY3)Yr51g1btoK)TMq7=n?$v0Dgzll#4V~EQA@&6!Ty(h2loo@)EF8g5M%B7xkseOe%p%TLjD@<{3z3Fp_yt z*G0gfxy=KmxiHXDJj+^QV61w;i->{mW3gsvSc}ALMRy)b3o%|P;3B~Js4W2nm}R?% zU4EDCoK5Vrx{Ox>96jpI7(X#0`f?T2112PH_Uc*yQ?(X^fa2P{`tl7)^;mLS@Jt#z zlk3wU4eKF)J)kfD7;wK7JW~tQ+k9|N4U}S0%0t9}{B3|2P=a&1NI*$TfV%?x-;4!0 z2e>5(NviMGT+{&i%c;K@07GNTO3WZ&j8tz#qW&f$Ps~6+aW1$a^&7$2a+I}RZx#y_ zhoz`lfKfSXcvnT8&P&BIlqrLYv52)$$u$rkHp_;4v^-6KJ;-x2Xw8ELE&>k6Ayr?V zil1tEHUj#tBoE68&+9F1_5ES{1CRzH4MG}>Gz4iV(lDgqhy(JF_#1#U5NQz7V5A{P zLy?9d4OdjyV}SY%L_P>_L8+5ZO1&r zhP9*c;}Fe^4*huNDG!E|2Ls5%GS7nn<-rv4VBp6)fBk{qANc)&-yit>f!`naw2tGM z*8#vE0Q>>K9{~ITz#jm7TGsK*_dwte1pYwa4+Q=|;12{ot@3#6U=Z*J0e=wi2LXQ& z@CN~(7JWSSF&OxRfj=1dgMmL7_=ACeymm7L_(Om{1o%UMKLq$gfPcL9G!*zlfj<=Z zLxDdO_(OqzymmGW_``rd4EV!_``uutD6i5vS=NgVa^gYO>I$Pa?O#6 z%^$aAZV+5aTn)5nS|u%u*1;L(EK$?c79}Rv9GTesaf{KbkSmF+ffh}xq-D`MIK!MJ zYMR=j#N?VI6I(V{!HrMHZ2{m!dW9>H=#%L`>Fem1=tHPK@=mxf$E%GHg&Q#4Vt{71XiCwg8?&>X}HB5uRL%-(@IGM%=W`+eiRUVxM%R zDPkgi1!9c299xRlqXy8Acco85Hn1I|Gy$GY3MV2-F$%w{Kw$#Ln~c$9yVtLLyY2L0 zztfWXO~80lfOR#}7%>i`q8F*w0Q#}I6r(|JqLN{fn1s?*#A;?=gcvP=NgRTAHNI^3 zXq7*hqzBw40ULaQ&+9NA+DM}Y(2w{FRO@JL)n028psyv}Iv(6$q(fehwyyY;9n>ox z($Z`M>_yobS6&M06VyzM10SQXORyJss0Z}rxD+-)ji9~RqtXKC>*P{sVFG><^QHBn zXjMGyjR<&5U&=k&n-`Aj^{of=XD~sReK~*7^C9*Fe{F!i7Dl0sIvgjigq%CPQ33r? z*<-SrU2PMj_gNJAm2L!O2KmGn0Tn5q71uk9FGaQ7V75%QzFj(Nzet zQLE$yOd4l`T2EL_wO)HYpdbE@!3eV1YiR-W=agDZ%)e~+dXzubh4y5~I7W?)dNnqn zuYqx(JrPpKTCcS}8GAgek6M7`G<)qWUE9YgEx@AM*$xerS0}Aqz2+vP&ot7gMw{{# zfd1+l@6GiX%#z}y+3VE;=+7$G&3Mqz9*4cA+(*QXxP zA655BUNc^=Hb8%db+2xgwB>P6kAVIhPUzHBt=C=;=+6|rVF4r^jTw{8UXPZp6eeP( zE~6#1d+p^rQDh`a+h9C-q1h0h9F2 zRel|{SqNS=8+u*e}C1cY*J-H5f?QO}}lc6=e_dMr~4d{=pcUom5)oiEK zfd2eU0d1}|`mw2)W!daeX#w=DWD4eZ3T#b9FYR8Ba{RYEUxsTFUS$hvIm%AJE-RAj zMAFIDuBKbUkXVVKxUpo^30YelCqgSp|2J|{~Xl?E%r!^Lz+v_nMv!M53rn?K)HEFsOsJI z|F!hR?`>QC@#A}zR!_}y51)Gb7lZd*Kla}X_Fr&u;nYWW$2NU*S?}*!`+NWX^eG0~noU#t_nZFxcb<9e;a%&i7ys;y z+y9ueEV|{31(TQO-!-P;@oV-yd;N+NFZt2Xs}GMKa!>f>i5ssNw&;s{D_?;owN`Ml&3R#&`+N2-@kC`*}LDYUVUrhuRj@ifAHe(ocBt2`e*NKSTgVa+}uYq zUl(is{LGJ!eA)Yi4L629uWcxwv?#Tqw&MK4(?7Yk*K=MMp7ez^OC!pC~w8G3cirZX28{Qb=9U%B=_vmZWx-uMk)+)>>7#y=Xr z9lPwSP4{nKugGz zujx;p_tQ^jRNcS#fzcnHT`~NFK`(E9X!-*ix0h`C_22gW;tx|Mzu5fTCo=lyUSGGD zKeT-MJDc~p4IfR8-1_yjQ#X#t>vLc8GgY75`_!k?C%^TZotKQ-@!)S(Zay3y_279ZkFG!Z$kA7hesuKjM^Em! zuwzWe?2fXI`#YZM*w@k0Vd1)G7qFihfdqtD@v&b;|8U@C5W0|qRs5V|TJ~rBo zQ_cS7ICGBqZ{}w6S+mjn(hTAwn~SZfR*lGdq$F48L2BgUdyclRQ+)Sv2dtP@zc>JpGCH4MB*2p6FPc3HGfP^AWR)I+| z7@`Upp72hM%At}I>gkRrYxjZC`Pdf#XOhopJx*RvTymG=E~%%iJI@J)EknEJoja+l z-jDGruL>-`PMlThC0A56%`yuIw=PG3&+< zd1T#H$8yVC8ha<8A8#B_C_GV_H$vfNQdo%y2(Xaj{}73H-kjND*RP9-c{cC*W~Y z?bIrA~F|tmDgqN3;#lS0G$}#d})RjezHJI-*EDDR2y?gT}y55K7>+i3cH@0DXEK f$D`K<=m*t3(Ho74UWAD+#nOFW)2adVX$Ai`)(<$6 literal 0 HcmV?d00001 diff --git a/build/test.wasm b/build/test.wasm index a9b990023fb63b10f420c7a9eef03acd20a186f5..ea1c88bf003194ccaa7c13066967432c1d9ee4e3 100644 GIT binary patch literal 88295 zcmeHuX^0grx390<l zeQQ7l%w}Pl-F^rRwx5mdHg3Q+c%Gg^G4UeakI_W*OuYBvy&3)Jh?$9)h|xUHcTQH_ zrMv3Rynpi}uXHo3vQD1w@6%Jifd8z#ZN9>^{OS!-YH$t>HD0e-` zTeisBD6yNeLXZNKpgIy4vXFNi+s-vPIopO#*R^a%*ltD~!J~{LEIT`FFYmR~pyl-n zg~U=r)ywijE|v7_Y*1(AM|I)DoDDsq?{wjy&W3bWeoQ~p*`UsbbS6nLp<1eilE2{7 zRCmG8I1yBCQ-WKz^534M*5wD5s$w_<#D-_+DoY7lmZPg?O4wqLuJV+yX{@0CIZev@ zoRvR7CRF(Y*1;JW-Zak69@=~8aM%5|mA#|8XLnbRbz^f@kP%kiE{m3P4<5(~ySHSw zJDzL#w%24yYnJVM1>|acr|&BJSew_3J1G|0R!zA;`A6v6UV5ZNPe+iEwsiO^t6=Ne zDbiK$7PnVsRMSzJMbfo81GC)a_Ht*r%v|DFGK*xJyF71ukjjycEM-}$+8Ma4puW z@W+n8%4aOR@Ncy|^}qk(1WgcQ;33%1R)^|WQO5w)CpOwN z8*8ki(`2(#0nfr zTxgPlJW#rRvv()?Z~wDd?pO5>7IGy})Uu_cEu$P%^q*Z4 zBpwDIUBaR{Du3y}o^@Eb{N>-zV{stIgTnP%d3Y$hr(>24H>*B~uX5fP60!VNPTM4; z^hk4gMEPTsqk6lKws|cig*#ks!obAM){+c_6#m%2W@ojfK))z4McV#2<%FwogVsFd zs(zt->KkdR@o1TU10+z3srANb10o4|-daU23pJLIG4dc4*lb<(@uRU}=pVlgeI)z~BJg~aTi$#jdP~;<5vG8~4FEmy zw5!hGJ3&q3b_sYVy2Cx#;ZFe+DgbUW8)6FtmE@7-N<{32iSTpXThvuyD%@?;AxQQ%() zf1vS#esY7n%mfALA;P%`b{%?T?#f#pI>bgd2dxllgOD#H3Car=+6YPGp#?r?`IkV- zWhuXeNay{NE2hF>r%1RPjbCc&pF~7|O85Lt^c-dh_%ulGfH%j!L3UxjM9*eGqoBFU z!tHGGe3C@eBO^PCw%^VgvK;hfHc11;5F093kfubp6K+ZnIhg}QGntO0#(Dl@Jjg9b z%$B)80J)iv?HXkC4o%KoetTRTw2-crIw$*=sHIF0sc7ktZWQT=ss9o)MXLl}n9zh7 zxg+|H+%cb#EyY6Qj;*pFTj7pvYNl+1J9@HBdZ-(_V;*xIYmxo2b@L@=)Gl&=3Z%k z5ID@`N7BBj>Tv&B8C&33wc$T`2xvjyIr=7W7!Zy%%kIyU17Mwkg+fNp32=Q>tqBj0 zInf*hZ|Ia63V?J4g&DX_HX}UvCcGYz^4)xG#TOivq1b~(fW#7yeNN>&pq+yZVr!Fv zA0O<52MPoNtoW4Zf(zS6$(fp&YDzESKq`4H30v9Mn7$T_cld_%7NRA@Z?k`?5^dgp z7s5xxpHf;{p&+o9SumMx#D>A?poF>cj|DbOVCxaAkaaG%l(iNxSkz+T#aaZ!S=?Vv z;DRZ{IhkQVq7AFwEP2*)7=-1M%pyM0;)tV+cN9a3jc9`4sO~n^p;^NLIb(4(S|j=5N$iE z7w9}g(CDU?RsH3su5$E5+~!S0CF)1SD)a+-z{2IF-c*a12Q(R$E<{cLGUSMVbNzYV z?D!dQc`1anEmN9?$HmU}X`~MZb@=l=?<-rly*6l~f2A4d3tER@Q-YmFSfD#QEZBLh z{6zZ84F^G1^nJ(ECTB#&bVd{sPs4))q@ezm-#TcKZwrQ`+v_i7p1I^uL@_--v@) z2j3G|@GZ-~yfd&$V2+zJr8Mm$Jpbsy75`wBKY(yY`*hUe^^CP1+b`UdrlGtvtu(z8 z`MQHz!kY$x*eVv&mQ{kM*q9@&3on@25H|B6)u zc3tF>LQR#{{?48bEDxX*T7GR~grd*m2#V0Q!&a7p9EBHJ)YGJoP}18iot~pX6NVvnd+=@$d5JE! zG3xLLafydZkju#CyRl-YXx##39C)hApaUICDo~v$`46^UL34#XDq!1oHwJqido|1q zt+f+N&dabER??V)AT|cGnNMP4>cwQP&3i(KCh`JF^lgF3M49jq-VnhkqT#dY-%d#bDC%mq@$RUMl(15rJ*L*wKy*flyCj z(mLn4ybqeetCsoyGX*(ttfL$S zM$f$9-U$m>sVO%sxX3bL0RvBE!$KBWQ&?z1mJ175tf}U(fQ_4K2@5UAys!XTRX!}_ zkrl#10acVZlc>CM=9WHa0AbMK&%h(29C|SQw9NLRgr9Y+_iz3R+zd z7O*)?I|8f4dog=>*53JZ&nT^AOvL$)|9EJn5@EG$8`G%PGdwk#|xLpF#G zT#oz;=x2aiIJ>rTv@^ayqO_PEh$7PKP<|{~nbLayrCm`2{NZgwr#emS5x& zPKP)xzr-b+p5b(u(-Yt4a!${1T7H>I`Z*osbePiFfMy7U-Zg>COKVKZ*r!OF4$moY>%(*G_vpAhk24ULHY6@T;uCY6D987F z#7)QH*i4}mnxbeAZFcPmI8E}X1Sw>8K7)M@_97_31=WmBIVB99j0mq!7{BZO< z$_Jx-D9X!^M9-sqFv{^VivUU&*MOB~)!tlEdo#P{#+wq)$lGWtvx+oz(u9TcMaL4A z^HhB(?L!F94veVf*47HGky8*D%+Y~QYmeJ}w4}6{`l0`WtU7})_HMK=@jk{|L>z+xqJ4>fQ)$Tx>uLvmBn53o1hzy$NN6t#njdalI`j_1@tgDlr>=+&%Nx{Dz>VeUAk)GGpIcpr zu>^#VHW&L#te^-N3F*HgDL*0vz{l)LLbs4i<}fKdbTq)tDDB@z|DNg^KGOPMek%sVm@PK?Y>wl!h8?`71^iDDYL4@FBCF zmbt_9O6&<&y@}Ni?`G?zaB{XBWI2k@ifW%xS*MS~oXXl3_kqI)4tPd;@_G|ol~tcS z>H5oJGjcdhQ}r^!UxCeXEP$3&jUFwH+&(!u`P@%$AL1=wd{)MdP%3%u1OGHX3{ znT3sFX=$et$8b0>_>}A8%tsAzUR1+R(|tSogKQmohHP~~s!JXWH}!98zc_kW?n`($ zD|*=bKveggaia3Us_A#7BAfWKUgubKc zKn>zMPR-Xx6SWoBU}h6|w~;IIdyNfKrQL%qF1@bADCj9RN5{-~5g}XFO)YvdSHzLB z%x}OO5WJ1XiTFC4-r1$eYo_2NI-`%D3S^ZfkX-kX)~4jz%=7}7z8 zm9LBCh!pcgHd_8*)6EMM6uHbqSx^xzRZwJ8Y{MdniX2@O|LA~HS-aKVN#W z6<%b;0JeNwI~uO@bhp+yHXWr{Fs?eY`gg_yVWnO()XA5w4FpWKYAfu)xc=mQx2`DG z@wZpmUy0uAgShwW=LTAW5Xp7( z|F3m{GLxcqp0jwAN)HF61=_Mx06mM*C@_S;)miG0R?tPEKe{AUI6Tgjj%6Z?3lVq&^{@(Ws{+OGHIX8+Na1V&_215_9<2B zVEa^PpPFj>G-#hj+NZJh>2f->Piv%odewIH$_!|qk!t%)XrD>i@ump9BBg}(nT@o| zYOmlWTmbDss`etZ<0usgYcI(Xv==dD0PvFr@Hbn|2EZka0A|QCQvt33z!d~= z1p{0uuLQsqjR3CH0IqJqXHIYx0Io^}SO|cH1h9|+u9jB=U|}PGt2Kb50bX^2YXERf zD!{b>xRwB}Wq?I;5df}j1h7a0M3MCyC%6s(*QEk12EbwhSj+%RNW z#o6-TJyL$WJSq6S0Lt$L_T88vFmsNavX=s8DZwmdm}PPqV3sz5S;jErbp954u{OUe zSPqQksVz}}Pz0eEVuf4*2-OH;g>H#O;iB4c)37ZV#gSIst+*%oSbmi>~&IEJ;j^4P0eqI^LqG*J0 zrKBoNFH1CgYtgK=sqC#otJYDg)^V%W%k^m0x<;*9&#l6`8_W9mXA)TT=p~Ph*QcFy zj=4c@(5sCN2*TLL@M>ZsOxc)f$|jhyiA>qVrfim*ValdPrfeotGC;zzg)tC%w*X^H zD#lh|Y$c4XjB&lZ9vE92VO-A``2FycLT=~^wn6>2RQ21Temkk(&gyr_9ZcG2mWZ=C4=G~BL-iL+I~9#ZYO}-8Q@#; zTL8Gd5x}>qw%-BOccj|B3#xaK>RqgQx7-cYyBew9t!=MP7k2{S&Q#m?0ALRR>|ubr zo>bcp1K=w!MD-{3A^|e@vfrdH~ZyFg*-& zue=v9J&j=Qjanc#ROZiPz&Msl(s4i>Cy3(=ai6>o5XT!q+*c*(eyF}bm81ut`T4oQ-C z*$)de?_vD>oluZSitVYvof+z5YJI@i&bLl|O6VUSv^t=W- zA>;`HdcGmhiHKcpSi;-vgBzs?E zdtcP{z9i&JWbca&?R`nx%gcrD6UO(`J?>?~c$qO?))=n{`3hmY+z{gxjZw31c$JV| zO>fO>g!CFCy{3^~7xHyNdaWVS>ou+U0b%?gy)`EZ<0NC8)EI9F`37N}Y>4qj)SBu_ z;)jIv!}Qj?Nl0%p5?-6p`9Z&s{e<*pL!|zi*1Sa+Z>6{9ZNhk)G2Ye~?+E!0VZ7ZC zM2Xx8`HQ_?R(1 z))+q#@+XAxaYKxsM6Ib`e|$q|-=xp1pAgz7jP{8}`&7tJ3GI`HXrIO{LP)NxLw-tN zKTW6aX9V^$2K$)?`?-)mC$OJ21p9dmri#H|6UJYs)AtL)_yuG9LSy_=$X^o1FB)R} zGNNz9%H&T3_osCJJ|no#816F-_bVZPMR1=rg!@(8BrH%6<$o>Yukk~{dxPKb1y(5o zLgIZ8uTp-aa~v5A#LJZ5h%V?nzS3u#Y8r8CzD%G{hZ>hb%P4B|bslA_b zdq3Ch{hg4%qxOE@u)V*F+lww7B#goIF8qQpzF>?mG{%=gen}W#G{pE)W6$ zze)}Dx$zGU@F&#%Ui_+uUv=RXa|xY^_q_Ce4o&0V3zwqbRpFQA3i|Q7$u8CYV8P#q zRcl=det5E$>D!ljRKX6r6JH-ZmktPNIof2rkTV^us zF0!2%Tadtjepg=e%5gi0n;FrD-wE?iN$OrZf+TBwfEo&K-h23Uw*LK*w6H{tek2VK zz~8jjzghP_{Kzc}`dfZE&8mJx^|E@U=6LhxRBtU8*FL^7`XU?sQA3tjE|aMF7zPXj zh5^HXVZbn87%&VN1`Gp+0mFb{z%XDKFbo(53GHFkl!k3>XFs1BL;^fMLKe zU>GnA7zPXjh5^HXVZbn87%&VN1`Gp+0mFb{z%XDKFbo(53GHFkl!k3>XFs z1BL;^fMLKeU>GnA7zPXjh5^HXVZbn87%&VN1`Gp+0mFb{z%XDKFbo(53GH zFkl!k3>XFs1BL;^fMLKeU>GnA7zPXjh5^HXVZbn87%&VN1`Gp+0mFb{z%XDKFbo(5 z3GHFkl!k3>XFs1BL;^fMLKeU>GnA7zPXjh5^HXVZbn87%&VN1`Gp+0mFb{ zz%XDKFbo(53GHFkl!k3>XFs1BL;^fMLKeU>GnA7zPXjh5^HXVZbn87%&VN z1`Gp+0mFb{z%XDKFbo(53GHFkl!k3>XFs1BL;^fMLKeU>GnA7zPXjh5^HX zVZbn87%&VN1`Gp+0mFb{z%XDKFbo(53GHFkl!k3>XFs1BL;^fMLKeU>GnA z7zPXjh5^HXVZbn87%&VN1`Gp+0mFb{z%XDKFbo(53GHFkl!k3>XFs1BL;^ zfMLM0)VZ?j$!RrI*tpK&+hcWE_gZ`P6V>-nf>;Y4?z47V2d!=`s7@t`k+yrF>mdH| zN1aX*Bj9gqfk^CJn%J#%Vto%M*ycjyR_pevpgNT#MxcwTLLlUHn%JB=v2$r+->nnt zdnCa&0vz-?nP3Q+z? zUI(Cdzcm-v-KcgJ)wXUV4bg|Hk#BAS_AS6X1Wc+Zt-FDF449I!CDiW4m43DWr37AcjD?USV<}`gQ6qW1JNCgb5eW|^7GjK zyHIjp+y>Uqi8}e@hz`u6oSdufqXr;0it<^IQNTC|diQV>58&z^G^_{tVQ%1V*t#Fs z{88tV)JQz5HnIzq$>biWJcNctv}*-ARfA8t-uT**%C#Cwe{>#?Mzw+5W*uzS{76`R zFL&KxL`(_WcXQuI_7jX6csjvt$eQ{#jIdh`qgsm1ea|EqHe-~=c`%GZ_`W1gVAyG> zshc8_yYgI`n4spxAJx~FqK*8r@=>SK#AtL^KI$~YMvb*8cz!p0Lwk_4jw3oA2ImLS z8v)f-=aZ_@5T!0VhR&f8MB|)B77fxKD8$HqHU+KPMdX*%yZ2YgRA*7GjzDTEk+>V< zTO#L=I-evKKdt1d|2fz5E4T558bI+VCR*`$JHppW{9BEy?Xh^At8=I}%C#HVi>tY#WZ#D z#RN3+p%{&-kq1?Jl-i?CquQumB|=w0l)7r8wE<%1lC)D>NNhVhnf6pdxt=uBN1c2r zK|2lMRcQDomLai$Brzg%6?E-{DBG;grirb#ZUXOQ25CE=CKjSWJJBF5cJliPwvms7 z@$hAB0}xB>#kH`DAa|lCwO>>BM;~=AP5U}DYFpfP)%S9O5!7-TuGCx1r8)(%QAUhs zvCSB$+hEEXHli+8sk2GisfiR%cAx@()cGVaZNz4d9UM8-$yX9=by?dMt%*`KkR(PP zMLiTdBjQAomiC)cGVaYQjdec?;UkA9eE81lvg4CUhrp$&phHq>F82QsC=o z!dZxoqMKrvjxXCGdW+Ub;_*lIy_Qgo!pWw{?bg9TDmGWD4J1{gu|*ML6L9pLLJi(b z(M^BUxuj}jGl~;QVlgO%l+|!o#ITbIw#A?u zA)Rur~qqv}*XRB^A(SvHIQ7xrc zD5hM)0 z#EL@oy_sMXEmd_ja&t252ISj#BIXdG29l~(+p-;1q7JXNgqT9L25q6WBqEjS>rW7i zJAX&q3Uw+;jAGtqp68-qt4>2~RFooS;%0>$ByX&>6h@p+szwV19WRKFc zU^^MLl_`uSb9FjhY#ocTPIWFxjF_l8EpAlb+X+piUaX2GELhb*QZ;H~wHkR0Szhx| z=TL1_FOpH@AryM`B+~azf*3JD!;J$KDOIPE#7G+runHIIbdnfp+YWt|6@@yNB&M~| z3O}CU`rb_-jC^7TASt}iw6GI*bssf=YNJ|CV{r#OZU-VTubI`^Br&q}rfT#h4@)v4 zj!F~|6d0hzZ)CN$MV)#t!FC#ZG`Vcxftxg;okg`#=LoY@acS9tQk;)b9{Amd@9o;N ichl}8M-JSxf9JN1ZFA@K?CtKEdwh5Ip}B{4ANfD1%VPNe literal 32618 zcmd6w3z%HTRp;-$-96JYw|nN!Xl%=t9N(T9+p;a|IT}f}Y^xNjZTTS^Kavna{FH6Y zNVYT@OEF2LA#nm56cCW`TJ18tV%QyHCHo)*1qKoz1d)ix0$CJxAlWPd?e0KeA0Gnq z`&ZrDeeZO)qGb2mZ+p~Lx2jH^I(6#QIj0`Cnwde5OJxA7;pLzPRBU5{)_jp|$AbJi=z3|jyd)~2k+A9|R z&i|V4`<~y^)8l&q9pY2;e6Og7Qc*G8RJP~!7RWF57f1wNDIh24E_q&|Ac)K-pFv8v z{78W}09=aE7Yd6zpslbx7*xV?r6jnZ=)m-Bft1uAtp!1~TQvB7x7X_jfge;$o*yjZ z8w6fg(B=Dml!22Z1p7f>8H5RyG#Zq6nDkv%FQeermz&%P@vO_&p6wHvev{_QKR4!H< zCC3D5TRAbT$5Xf4s&@!r=2vVNZKUemLqXU6J^NpndI>f^c4+#EscG*uzo*L=2CowQ zq~Ck;W5`pt7kjIMD6A5jp~)yP!QuX}hg9s32VN%MC;wH3;h2hyKRr<^#X(%KPhAGO z@4hN7n&Jb+V{yrJAB?*QrgoN~rMNxVUf3R&ZYX$h7r{ft?Uf(|sw^B`in>&FvR1Sh zs$Lj|wn}lh+xW`vE>eH3@72n2m!h7y9QWKsCedWSa0Lz*QCG#MzVZ6QUo7~2IdW@V z7OfYTc2U<8rtY}g%=k)n#of1fP-uM7Q;55F9<;du4U_~G398$49X9j+6qIzEI}TEJ z3TnFI9#fu<%Tu@d!XPSamBj)OrwVmjapvQNU2q3hO+bL-jED$oy>YLZ`Co$lxM0o9 z3|%&_cONvp(-V~OG-W9rJZu(eFr>6{IBmY-h)Rg5HtFhvu0FGTI9R4)qYZCV9S zxyB>4Y&;17?Rn9Vo}p@FlNHxS(=)yqv`sVhfT{(SyhicM4a!7Ol~MAe%aX=ZBD`>| z?;ji4K#Pz9Bk!frQ{85<+gxT=x_ffAN^{OCY||#0L@G zus^(306yd}-t;b@V>}cffQ;xe+u>@s-J%(ZG$)~b*xv~z%g_(`<_&5Xtl?;+o?TAY z2Z*mK9vc}%mjz+8BD~QeptI^cI+Naec5p@pg)@j&j`ShYqkUnx3eb_Unr{cvhl`Y} zub{jdMl<((H&{+OJO;)TDZIwX2ZEZ4R8#(%PsK)QxglN-QJVI`_ZR%j#guEHQX*vh zgKn7S%jS4s`ceTZNFHki!4yp8fd7CeUnQ?g3IfTq~90!f=Ml^yvXu_Zii?vEzs#W6<4Oc|jO}MG~c*P4Dkbq&X^#RlmP!#vp z2I9WBUx1MXj0eVp$H7aNExtiOm&JqeGKZxImfDa-av3F;$3w=COVeW4@KEiF__FwN z0mfI12k4|Bupo0@bUjc-3l-H+b>UZv{t5*4su*$8{H3eE<)`d#KRmykmP3}0OvCgE zq&bxh(S^NaWJ|Eom#y+hu9D;n6168HCx(M)*kb6iNQr0n%!A!)Fv6DDfN^$RSH4(?YxEl8%j{WAExF2y0i#sNI7xD zQ-GY%iDPA{IR1UwGK}$%o)GD&)CS`y9*_hLW<(94L3KtWaA8?A8ZTo!$U#o6>$;!38$yf;S6RCvT7@A!^?TPGF~2E*_27+$Cc@++RFH< zc!d?fl@h@4Cj!6cSRA}kD_CB>8V7G_2;4t5=N3FR{rr=J$no-#E}N(oY=a2as$jMv z0l-heQ7Ac+fap`TsUF@}NNo_}Fd3Jm0QCgI5@OR;@q2MVTSbq`)Z zjEiSw&QvDAZj}tWwc8-a`zDbana=IBFGXY<)>+wX$Z}*UNlI zHsWxco`}Ca(GAA$5C4|+4I2NdkxdO2)Vw=9NVYVxm?%sru)K*5*8ECkU0+TdPvkmse|XpVL!&aesI@l{Aj%D#n2k@OZo-T;W;oK*n%H z$}hT!82z_8x;eZtEu&rQ3lUaJC~hx`Cr9ZwE(YTrtqH?l5B%b>05<7wq{>*x4PjBj zN~2y?DyUb33a+0&3Rgz^Ks7irFdE6!?xXF&owZ;j!u#=@hd(kPXVx2yXlx)3Yy#7~ zOm%5>XaWR3?-zUCoaUbJqq=8XVs`*YPu_$uYE9^LU}Z{`(%Cq^sOvL20h4+}67BO&=C z;YekYc-KA$5ncnerXuePg{$FfOd@0pCu~^d)+dldw^)*;`<;ThIwgNYf2a;pJ1qS^yy9Ezf$+6$zd zY7eYx51eX8QRO|2&!yVXDm>P*(sI%-a_eRF(Iv+Y#f9mEwQlAi%RR&!K3?zg1Ew8C zC?-2!YUNVg^BgX_>_jiftmbJV0|(c#$gT>|k@VnSgkr2dU-vf{=miZwH&TI-^`SkY7tJpcS@;dlm;x zBl&lQ)X~#wWEFUj(P*>AsL&q{c{#`;Tx=- zfC<|u2p9!I3VXFQr}zcG0Eg&(zwNK*_y8TRG)5C$H7TUhVe$v;8cCk&fJRSxjZ9%K zMk`rDL@U`{!C7UYiF)$u&bZoq{N@34g&aOsMM$R?-QHk`7nZ!}-}zzDi%bK|LR+xb zifN7{)uBprv`ozBz`-Rs7_}ui%Ug0*w&cVuIioE(5{P{3t6Or`wd9PoYHP2*ycjvD!nmd%B9{hOAgn+`(>WH}>6!hHiZ(tbp3+E2^U7Mp!- z(%6JapPD$+_R~0}FYQSb-iQC=W(r!G>6xtZaHa3pY+*j$s$C>oc7>grc9UZm{TzLV zG&DPkD>O?rNgccXPl+rt!PI85-NlaYTAySunRchRKkS$7j!F8HnD74ZfBQktvEZoN z?XWv;(C+Kuc@%(uJBpP$Fo~+k= z7IE9<^TnmN(leqNTrQOCQ4}zia=KQqzODn>;X9zBfGEWv*it>S5&L1^FCL8x!mYKA zKgnjB6nNn|_V?$s-r3>5+pcs1%O0BJ0bgzr+TyPFzM=$zqm6MEh4h)Odk^7amI~s! zSV}>02G=52wL2~zeRsCD#xtoJS}9~w{0-~59|p6xV`k>ZKJu5ZeaU}BJ>D@h`=Out z;MF`E264yC*+2Qz-v)1GFLB4rXI`7V_O03!W>=O8 zvS)p?n`I3h^>=75S)6uHGnx=_!RFFUJQK}|E;mC4(>R&l=zD!cwLiRy(IL&8iUR~+-jk&WQ=UI`a#|}@k;U)}Wn2-h2mgQlL-FB? z9kktTU98gQLcJ=rSFBfyM5THaSJiaYt6fCh^{P}=xn5;|!}Qdv>~)&ndbO7*tXHL% zD)nlGs9LX9iTdi*KBE45wVx=eS0kc13{`SJ6UddA+)v=*oKaN}{XkRjm_N)T=9qR@SR4iLS0!wK@HUdi4!N*VL;_WE0n` zF;T5vtq~2^tHVSi_38-GXuYaUm}~3RYl*I_SFaq9iBW=i1q%vJTuX3D!C3{13TCe(m{+i< zVD@@~vkDd!%&sDsSFoU9<_6^{m{+i<;KYptrxYwGn7N5yR>8c21qCy!m8W1{!GeMl zH!G=NQNipQg0l){)+(uBUcrKbnRUujFt1=i!OVK)DLAWOQNamz0?fRE1qCNIDyd*m z!HF?~Qwq*1nAxPHg0l)16`U9+m{+i<;KXKvQwq*1SX6Lg3&FgC1qCx(2~H8bhEbEE z((=eTGg=1Wgx^&wT6N9Ba~HZgz;J2NV%!Na_Dg5N6*l^dGL%JIWRHb8Hciv^99L() z>==>@rjp$+6t*CH%nK4ufb8zY1gCZ-HuKnVBZmjoOiuFRVt@F709`n;X4sbjVJ&wx z{lH#ESDP8^7||)*L!w3YPl#r9;B~d!37dJ1jbaMyNW%vSt+zcW^~k_A?}oT;pIWl5Tyhz3Z15e9{-wVp8qle0eEa4Hl_UESrL-mp^b>yHKomxU~u__Iv>VcaJB@MG!2Kj)!Qd@{}b$@Jl; z(ubc;A3nlEqrxj`?$4zU|2lnml?OaAZ)DtU+l-D!f8pbojf{>2ls_`I!(+82YPEUH@Eu z;nxE8Oi35h4jWIdDjVGqn~{>p9e?)ePyXOCLYobPmgx_ zvUtqT4QZL@Y$4+W?^l!!8Cpm*en^rP)q=oEl{G)ZoSW|NeS{J1d5 zsy&RhCk$Y7oS9b&Kjw26PrOXoXJz&dkL~@DO_Rny%!$rISJXG!Z)UoQ2F!^v(J}@@ zgwFIpXc2xEogjMAzx78iPYP$-6<(1P&bKREo)j*$E4)%UHQU=T;Vyyz`U zGrrYje1kpe{RVpU)_jw;N8gsub3Iz#rblnf0~Vui&u4hi+m~iM<}%VA?Yo2_Dw?oE zhoUE!qW`#`9j>G}ZS2*ezf6iD?{V1uBbeGSMK-H-ersD<3fBc(w=SZwc;GIY z?x3}W>jtjOF)wfx4tjOds4blC*F{)uw=EZ768$6W8+ISz;L}tH%VzM%1kSUz^yup6 zzwj|%Nq84?!G*2C!KAZ;?ubDhHJ?29*$=;KA7E4(IAUJ=!{7hqU>_;BRCR5sezUS& zC&$H`y`+t#a+vbSR+f8_5*nEP!-s4Gu3vhjwQ7>-C`d9Rmnl9o-p=V<)*pVvcdkQT zT#&fLL14E#dK#>`j6K|R+NUeKsmaG(D@4yAFib5jwjCq&Yz70e)buxS8B;GnxsH+& z?k{z9dYt$L$W^xVg9X1Tu^wvLXfvdPR$Og(ObK3_(`CcfK@N1Wp|D?uS^g91DxKWJ z*6-my5Ms|ApmN+7?bCTSeavL-O>0cx`ITyAJHp(|)a{ZkT~>&mahLcIG5MA~(X+$c zkK(dX9A@$Cw|6X`kDkkCf5MObgUEV8H!T_HDqvMO8oj`MyRznJIU!)8R_1C_BjN7k z=V*-!X@e1ck+N&{13NBFm&qul2?0yFWy+j#%Vac41w0wOT_Yg(<5a=#>g;~_wK5!W zy@)=+l7m*7IY>j2z)wa}eo30fEmVW(IX1uL*EPYTz4_#X&P=iZ%>?+kI@c&ua>5k$ znd1Jt?Iu;T*=SFu5y9<2@o^I(j86L@v^Q|*O6ERE3{GV(x0z7&y;pU=NCvmrvA087YpL)(LaGB-J z?H6|G+MvIa^*KOuO}~-F!aia~^HSoOGvRq_^?T1XUKRZVfd8TeOZy7RC%GQ|(vm+Ssus2-i8R`DI0u zo#-xI?*ykj`k1YS9}L_=BwE5tv9z&{i?}D+T*q}GtX;C*7~<#<$a5LfOEX?vnsFFz z+dF2wt)y#aGgY$~u_te~B}=?v6zQ;Tt`r!AVA?HoG#YkNm|&!Q7spVUW>J<24Hd2j zYfw>(?kv=S=Tip8X`~0@Tfe5D?G{|yvL`UFk25E0e zZ*)ZFJsd+N9ihPI(i&s&seCnC5FM6uX7-ETMRuE`!<3*cZRwGH4d{SvA-e|@9ZoBr z@%?f~1po;d<+ZOSLNghAQ_CIwnlH0m#Omv-18tlw-Hqdx@;W8G(I| z_)^eeH#>#61*yPo?I@{*wvsxNs@U)oiKwTz#%(Z_wE%~qrx!T+t?Xa z5tOkO9<~c%$_jC5xQ}wX;3dsEbvPnz7q;9dwms5IVR6x3B^4b`28P_?YMQrgybN{m zVDvf3dWPO9UcJd>;8QKrKn7UDiFnWsXBL1La|ZFJT%|^9U-8}QV2R1LccSlwaJCHK zQMY)+t0~xAM@Ta>nzCz#Oa_FoREC@MO@6g@$FpeSf(al*M<=hp{weQ%%K|eSnIGob zN8-xpWndgGf$%;sF9=V`{F~mxda-!QZTMp=c)`~i@C=b)=j{sIM%$$8XLo=2L_1M# zx{Yj{H9SX*S`dyDc;yxxO$lYjB?+w-BygX%Ic|a#!{3)6M`fJyQvG`iZBUt@A_O&Y5rPfa+ROh^31?cQ^D;#ZyHI2(jdXJl1Nd+QqB^9}{kZZuq4y4UNBb!dXJ@)!t|Ed z_jau9MqIvPmU6U4kPcf8$_!iS%CaZ=J>BsWZO-ND?$11j+X8-R<*4-e(nV0yYDTHQ z#P32_MPTheir}k7H>pRPbrJ1`?~u=s)XEYpJ?&UYip{i zC44!qMkSVwdVLnX-mT>$Sjvb>7NXVzIB%@Q1&%5FX=`!0$RM*7(jZi(4cgnqOB>8L zr*~E3vh}sP*ckSwt&J|n6}t)C1A%FA5cf2Tdu%bU5pkPdWZM3rd|LaLR>vmgdXeD5 z@62)T@pcYQMsFDZZe3M|o47Z$>RgTJ`+eqcMl=0U&V{#&6T7Slbo6e$`L@H)tr`X@ zbz3-%ik?an+8p^qU(QF_Ec9h^jhapz9o0DDFDZ9kl5WhX_>Y~Bf#=1M7p|{geZ#;8jy0eu5`9b)Q2tbV$h};`Wo##p)zMz-eNw3P-gjKQ$45r>6R@q{lUYaQ* zc3zr5MDgF!lrHQv0gJXwZd+tg1Z*A+niI9?Z+&eSYNf&AXFOQW11ExnjXOVoqKod| z;}5ecSV?}@FxzGEQZPSC!Fc0j)GXGrIQ+OfO^OaiK3`r)PHJefZ8?+pqV;!$d;7ywqb(i6n(SRgYO12UTj&SWn%nKlx{M5z97b-s%VFf+yBtQn zvQ5Mb+;SMX0Bs#cf34qTz1_l8_@v!d|4FndoogqWqW-e^;C}d>6eAA z=A+!Jw^AuDUycas+Rt!+jhYYp_7rU^2g5$|k7aLqw=3>R-q!}vFZjuu^N=H1A=0b< z4H_)b(17NO)^M<_*9f2^Oz1ex-G56*LPmQFm7L3@lax)2=!=a_qn+($ZYYce_ zHF+i+l6%Zg{Cc}hFn^13&6w!m4la+2w^%^}G*`hb8pQuxwp%nvxAIE?4fHGulEg~d z`ZIe{BJ+~w@*^_l#I0$HABEA(N^0=iG#EH1%;`}?1D!}0x=H8NW%Jos|8owLFk7q^ zGNhEEFFDnhB@jxxQXmoIGtp)HMk&DYi@xm30Io8N+pZ- zb#JLXsW1EZ>Y}@;by2QDh2CO#aJhAV>s|H=ST5^`)&|M#t@I5oog1YWaWsN4z7>FsupDbu_a(e!k}2iv)Ccvg)c z)|siAQ&lr&Zc6+_%5=Lyo`7)&`_5~TaOgFS9qkZmE@)}*ZdbAm!5z2Rew{z`B@U?E zLg#%2;V%X5GFyJ!XqXf4G55L+o*YIO( z_Sz;@nC$#K5#Bbt%*+UnHxTUP1%fjF-7c_3MLrCs`*W z`ejFRjeb$c1TV@g*kjQSn0gp*wijw_k{Ds)#>A_r_wN=eeu*Hiyvn5cXTIBZSc1dS zB8Vz5AJ92{pxJD0)~ox>>TG{M8w7p4$loIN9ohH&g$Db0U0!Y}9PCdy*sqmI!mE+B zuf9b*dqtWo!?^SqMO+I|F@;Vn^P=N^gGu>XVowBnw9awt;TII657O5Lr|)pTMBrF$ z?KEu4W2t~;AZB|j!BU9_*rswkcI>scVzTvETX99E!Pi{R_q5X=fFn(b(7=b=v~=fX z2v$Ygv^I5Wg@`G4yGwHYNSDs|Nnsf)?)_-D)JZ7EWZ?(vKk4h|nd6mS^Aqq`<~!|8 zc`tf1ybx~R)<}Au`Zvn=QMiAAQQFIJ?(v>R4IN@MruciodzSp^bcj{goGFCs zvi%hnjlxkzZ?E^Hx0c!xjJ;re)?35#A!=PHgb&`Q`pHMN#M}F6`K`3LpB7aw_MW4~ z!?YONmSeE);mMV)Cs(cPryV}#Offu=$c)mqM-LG7PxACMGz#O* z;5p!ZN0O3+3hzGP*IMeICg&Y#4=jEgnA2=5XXUPoY;imHG3QFH++GEUp@n^L_9@%H zy*xcnucnD#u)TW%N}r`=`!OfGTCv0wHG4QkUC}!Y#{Kjv;kc{sLSBL57q;4c%uIKu zl9S!7ElXNEe2KP|IjFe~P@_4hGaaC|<)F@2TBTl`(cC%AERhbAo|SHsmYhaQdFCX) z%e^f#gre~}zRkHJ-Jn_a5_;-Ir284_PvvFYoa1LxmX1OOse3dR+CWt(dot0#FVPAV z^|kh+52$xySM~#OfH-F%h25O#a}*Sm;v>BJuIpBck0y{gpFr6h0`*o}^qpSDPMYKW z;f(*T6eaPq_cNM7@tb&rdKLpdCwY9|h7hqfr17-F! z49b&AmZ7;J)1G}a$D{VE{B??%33 zd^hnO=ewEj7QS0OL9Dlb8wfY@9pk%+?>OJhe7Er3YOx4ngZ?a6R?cQ-3}6*HeEz_19Bh0&*!syMg)}sK0^w8>qj5`WvV(;kuL|-$?z9 z)Za+`jnv;r{f*R@U|xzSj8T7#`eW1|qy8B6$EYu%z7!GJMEyW@?ZQblSr^*2+0Gxax9e>3$rQ~y#$Z433cP=5>cw@`lz^|w&} zQblkp^|w-gEA_Whe=GI3QeRRf$-~z$mGd zWJx+S!Wt!UTHI2PMYURfg0KFb;`=n;J$#=bC5e_)O0py!8exr+I4y3e$D&#-tG520 z<|~8!3{RR3l4wb#Bumnv5!NV))8dwTEUMMAYU@wNTAq()l4gS>T2d*=l5}W>N zxTPM8YPGD|`jhYEW}#-1W`iVJQYp!jbZCS%O5(J*r5=lFwXE8?k2!Zu`1sp0S<(`B z^Oc&GN|pMPs*+j}Kh+oEc@}?buQ!2Pun+4YcjbV05DOwVEuD8WWU@k0y@+lCmm~R8poUFCBC}p@JyUSuuw}DcN`}sCL=3LFW zJ6XR_p6aQ{!JJLvT-xy8d?on}OtO~4t*(&IOd`)&c6Go!8j5GM_-KLquL z-h69 zejn7{=~_-hbNsqi3dDmqGCRdz3vcGGYsD@8z7dY@=FdQ}<87t|bMEWZ68Gwf3^eF6 z$FFZ~OLCL8rCO4j#yF}k=JfTg{SYVb1X3e(pLZ`%=i1;_KLqu#l`AKkYU5jkS08hH zRV(f;3ht!O_gfG_&9#9NC+`H)qd;1E&6y5RJH5BSZ_yxJ=Q}{v>C2<^#X%jvp_MMl zMLnIV7T4Sjt^8DoIzrtC)NV;O zGIM5iE0?9GoECW)$hSItw&^4=7uwX4*0?{Bvt3qB5_;2`X71+Jwj@*11ozX5vlr^? zZfP+0G3VOU5{0{M4b7%E^StC^j<0ELOBA|VZM6a1INhd}WX{!UEAyInYg*+*W4k*y z9>>?VLP<_!X?DQ3I`V=(XanVNJ%F6-L^}DHGZ%r{3C2Vpw1G-nl;+rpe4?k;wbGTg zcpnf>PUhM`rMMdMWX`mKN^xm~t===|FA8O?m*`sGI)ZL2G!r!coxD8gdMmzA>-750 zy?K~=^cbjf7lry(jRa5^+ECymPi;5mwqTndGq<6Yf|OH_q;uVz+0fcMC!fMCPN`o@ zJOp#0O)dF)&cBgVi>fyfKV+?|)dgm5V{2Q@emqQ#WR#n|5RW!qtRM0SncwC@8>n=| zA4z*)PL8$Wl3v?w?N_2r&1tS}uFlXPUspUydsMf2@XZ+r9?khSwPg97UJxfzYo4iS zPHt*X(Sw$EiG4PwJ3{TE_lXZ`&b5IO51LXcIxlQ$?VZN13Dw5uG;`yvwbZ+2ElEj( z7E1V-bK|YO6Gf5==~ibUF0_HtsAz6kZDets+}s|QW>bR;=5!k<;d&Ts4G+PbYXc>^ zoEMc^t_z!6`z$$lg!ZIGr1KvomHU{vEv@ipvK#l>Ioi%ro!Q#D8@h^G&F$(VtZlW;{TQoQogQn& zt&R7_<~0-_zooVJnm^)h<74J-X{Av8x}O#futr_Q%33?W`O|`PZE%Zcu9j%!V=i=n za`<8k#QN^mHe1j-dDv;s3!2-@)5!sI>qc{W7NG^d&KP1?ql41suD)^(k@FnP62wcc z@n&dFZfj+ix)gi2dAAeVk2&22N)F)a6hdI;+&0J5>;hcks?R!|qVjn#iCv1&9KS73 zflsC=sPS!X6wKY$iu>y??$0g3EkO|7aqbZ4LL1ym>0WH1oBtX7!DSYg+ti48&VEMe zNStIu{(HPAc#lmLO&&fV9Y9#nLvbxS^umi%Pwlz?i311rKL6~a58cAL_BITS;\n// @ts-ignore: decorator\n@inline export const AL_MASK: usize = AL_SIZE - 1;\n\n// Extra debugging\n\n// @ts-ignore: decorator\n@inline export const DEBUG = true;\n// @ts-ignore: decorator\n@inline export const TRACE = false;\n// @ts-ignore: decorator\n@inline export const RTRACE = isDefined(ASC_RTRACE);\n// @ts-ignore: decorator\n@inline export const PROFILE = isDefined(ASC_PROFILE);\n\n// Memory manager\n\n// ╒════════════ Memory manager block layout (32-bit) ═════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ MM info │ -4\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n@unmanaged export class BLOCK {\n /** Memory manager info. */\n mmInfo: usize;\n}\n\n/** Overhead of a memory manager block. */\n// @ts-ignore: decorator\n@inline export const BLOCK_OVERHEAD: usize = offsetof();\n\n/** Maximum size of a memory manager block's payload. */\n// @ts-ignore: decorator\n@inline export const BLOCK_MAXSIZE: usize = (1 << 30) - BLOCK_OVERHEAD;\n\n// Garbage collector\n\n// ╒══════════ Garbage collector object layout (32-bit) ═══════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │ -20\n// ╞═══════════════════════════════════════════════════════════════╡\n// │ GC info │ -16\n// ├───────────────────────────────────────────────────────────────┤\n// │ GC info │ -12\n// ├───────────────────────────────────────────────────────────────┤\n// │ RT id │ -8\n// ├───────────────────────────────────────────────────────────────┤\n// │ RT size │ -4\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n@unmanaged export class OBJECT extends BLOCK {\n /** Garbage collector info. */\n gcInfo: u32;\n /** Garbage collector info. */\n gcInfo2: u32;\n /** Runtime class id. */\n rtId: u32;\n /** Runtime object size. */\n rtSize: u32;\n}\n\n/** Overhead of a garbage collector object. Excludes memory manager block overhead. */\n// @ts-ignore: decorator\n@inline export const OBJECT_OVERHEAD: usize = (offsetof() - BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK;\n\n/** Maximum size of a garbage collector object's payload. */\n// @ts-ignore: decorator\n@inline export const OBJECT_MAXSIZE: usize = BLOCK_MAXSIZE - OBJECT_OVERHEAD;\n\n/** Total of memory manager and garbage collector overhead. */\n// @ts-ignore: decorator\n@inline export const TOTAL_OVERHEAD: usize = BLOCK_OVERHEAD + OBJECT_OVERHEAD;\n","import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, BLOCK, BLOCK_OVERHEAD, BLOCK_MAXSIZE } from \"./common\";\nimport { oninit, onalloc, onresize, onmove, onfree } from \"./rtrace\";\nimport { E_ALLOCATION_TOO_LARGE } from \"../util/error\";\n\n// === The TLSF (Two-Level Segregate Fit) memory allocator ===\n// see: http://www.gii.upv.es/tlsf/\n\n// - `ffs(x)` is equivalent to `ctz(x)` with x != 0\n// - `fls(x)` is equivalent to `sizeof(x) * 8 - clz(x) - 1`\n\n// ╒══════════════ Block size interpretation (32-bit) ═════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─╫─┴─┴─┴─┤\n// │ | FL │ SB = SL + AL │ ◄─ usize\n// └───────────────────────────────────────────────┴───────╨───────┘\n// FL: first level, SL: second level, AL: alignment, SB: small block\n\n// @ts-ignore: decorator\n@inline const SL_BITS: u32 = 4;\n// @ts-ignore: decorator\n@inline const SL_SIZE: u32 = 1 << SL_BITS;\n\n// @ts-ignore: decorator\n@inline const SB_BITS: u32 = SL_BITS + AL_BITS;\n// @ts-ignore: decorator\n@inline const SB_SIZE: u32 = 1 << SB_BITS;\n\n// @ts-ignore: decorator\n@inline const FL_BITS: u32 = 31 - SB_BITS;\n\n// [00]: < 256B (SB) [12]: < 1M\n// [01]: < 512B [13]: < 2M\n// [02]: < 1K [14]: < 4M\n// [03]: < 2K [15]: < 8M\n// [04]: < 4K [16]: < 16M\n// [05]: < 8K [17]: < 32M\n// [06]: < 16K [18]: < 64M\n// [07]: < 32K [19]: < 128M\n// [08]: < 64K [20]: < 256M\n// [09]: < 128K [21]: < 512M\n// [10]: < 256K [22]: <= 1G - OVERHEAD\n// [11]: < 512K\n// VMs limit to 2GB total (currently), making one 1G block max (or three 512M etc.) due to block overhead\n\n// Tags stored in otherwise unused alignment bits\n\n// @ts-ignore: decorator\n@inline const FREE: usize = 1 << 0;\n// @ts-ignore: decorator\n@inline const LEFTFREE: usize = 1 << 1;\n// @ts-ignore: decorator\n@inline const TAGS_MASK: usize = FREE | LEFTFREE; // <= AL_MASK\n\n// ╒════════════════════ Block layout (32-bit) ════════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┼─┤ ┐\n// │ size │L│F│ ◄─┐ info overhead\n// ╞>ptr═══════════════════════════════════════════════════════╧═╧═╡ │ ┘\n// │ if free: ◄ prev │ ◄─┤ usize\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ if free: next ► │ ◄─┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ ... │ │ >= 0\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ if free: back ▲ │ ◄─┘\n// └───────────────────────────────────────────────────────────────┘ >= MIN SIZE\n// F: FREE, L: LEFTFREE\n@unmanaged export class Block extends BLOCK {\n\n /** Previous free block, if any. Only valid if free, otherwise part of payload. */\n prev: Block | null;\n /** Next free block, if any. Only valid if free, otherwise part of payload. */\n next: Block | null;\n\n // If the block is free, there is a 'back'reference at its end pointing at its start.\n}\n\n// Block constants. A block must have a minimum size of three pointers so it can hold `prev`,\n// `next` and `back` if free.\n\n// @ts-ignore: decorator\n@inline const BLOCK_MINSIZE: usize = ((3 * sizeof() + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD; // prev + next + back\n// @ts-ignore: decorator\n// @inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive, lives in common.ts\n\n/** Gets the left block of a block. Only valid if the left block is free. */\n// @ts-ignore: decorator\n@inline function GETFREELEFT(block: Block): Block {\n return load(changetype(block) - sizeof());\n}\n\n/** Gets the right block of a block by advancing to the right by its size. */\n// @ts-ignore: decorator\n@inline function GETRIGHT(block: Block): Block {\n return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK));\n}\n\n// ╒═════════════════════ Root layout (32-bit) ════════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐\n// │ 0 | flMap S│ ◄────┐\n// ╞═══════════════════════════════════════════════════════════════╡ │\n// │ slMap[0] S │ ◄─┐ │\n// ├───────────────────────────────────────────────────────────────┤ │ │\n// │ slMap[1] │ ◄─┤ │\n// ├───────────────────────────────────────────────────────────────┤ u32 │\n// │ slMap[22] │ ◄─┘ │\n// ╞═══════════════════════════════════════════════════════════════╡ usize\n// │ head[0] │ ◄────┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ ... │ ◄────┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ head[367] │ ◄────┤\n// ╞═══════════════════════════════════════════════════════════════╡ │\n// │ tail │ ◄────┘\n// └───────────────────────────────────────────────────────────────┘ SIZE ┘\n// S: Small blocks map\n@unmanaged class Root {\n /** First level bitmap. */\n flMap: usize;\n}\n\n// Root constants. Where stuff is stored inside of the root structure.\n\n// @ts-ignore: decorator\n@inline const SL_START: usize = sizeof();\n// @ts-ignore: decorator\n@inline const SL_END: usize = SL_START + (FL_BITS << alignof());\n// @ts-ignore: decorator\n@inline const HL_START: usize = (SL_END + AL_MASK) & ~AL_MASK;\n// @ts-ignore: decorator\n@inline const HL_END: usize = HL_START + FL_BITS * SL_SIZE * sizeof();\n// @ts-ignore: decorator\n@inline const ROOT_SIZE: usize = HL_END + sizeof();\n\n// @ts-ignore: decorator\n@lazy export let ROOT: Root = changetype(0); // unsafe initializion below\n\n/** Gets the second level map of the specified first level. */\n// @ts-ignore: decorator\n@inline function GETSL(root: Root, fl: usize): u32 {\n return load(\n changetype(root) + (fl << alignof()),\n SL_START\n );\n}\n\n/** Sets the second level map of the specified first level. */\n// @ts-ignore: decorator\n@inline function SETSL(root: Root, fl: usize, slMap: u32): void {\n store(\n changetype(root) + (fl << alignof()),\n slMap,\n SL_START\n );\n}\n\n/** Gets the head of the free list for the specified combination of first and second level. */\n// @ts-ignore: decorator\n@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null {\n return load(\n changetype(root) + (((fl << SL_BITS) + sl) << alignof()),\n HL_START\n );\n}\n\n/** Sets the head of the free list for the specified combination of first and second level. */\n// @ts-ignore: decorator\n@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void {\n store(\n changetype(root) + (((fl << SL_BITS) + sl) << alignof()),\n head,\n HL_START\n );\n}\n\n/** Gets the tail block.. */\n// @ts-ignore: decorator\n@inline function GETTAIL(root: Root): Block {\n return load(\n changetype(root),\n HL_END\n );\n}\n\n/** Sets the tail block. */\n// @ts-ignore: decorator\n@inline function SETTAIL(root: Root, tail: Block): void {\n store(\n changetype(root),\n tail,\n HL_END\n );\n}\n\n/** Inserts a previously used block back into the free list. */\nfunction insertBlock(root: Root, block: Block): void {\n if (DEBUG) assert(block); // cannot be null\n let blockInfo = block.mmInfo;\n if (DEBUG) assert(blockInfo & FREE); // must be free\n\n let right = GETRIGHT(block);\n let rightInfo = right.mmInfo;\n\n // merge with right block if also free\n if (rightInfo & FREE) {\n removeBlock(root, right);\n block.mmInfo = blockInfo = blockInfo + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); // keep block tags\n right = GETRIGHT(block);\n rightInfo = right.mmInfo;\n // 'back' is set below\n }\n\n // merge with left block if also free\n if (blockInfo & LEFTFREE) {\n let left = GETFREELEFT(block);\n let leftInfo = left.mmInfo;\n if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags\n removeBlock(root, left);\n block = left;\n block.mmInfo = blockInfo = leftInfo + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); // keep left tags\n // 'back' is set below\n }\n\n right.mmInfo = rightInfo | LEFTFREE;\n // reference to right is no longer used now, hence rightInfo is not synced\n\n // we now know the size of the block\n let size = blockInfo & ~TAGS_MASK;\n if (DEBUG) assert(size >= BLOCK_MINSIZE); // must be a valid size\n if (DEBUG) assert(changetype(block) + BLOCK_OVERHEAD + size == changetype(right)); // must match\n\n // set 'back' to itself at the end of block\n store(changetype(right) - sizeof(), block);\n\n // mapping_insert\n let fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const inv: usize = sizeof() * 8 - 1;\n let boundedSize = min(size, BLOCK_MAXSIZE);\n fl = inv - clz(boundedSize);\n sl = ((boundedSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // perform insertion\n let head = GETHEAD(root, fl, sl);\n block.prev = null;\n block.next = head;\n if (head) head.prev = block;\n SETHEAD(root, fl, sl, block);\n\n // update first and second level maps\n root.flMap |= (1 << fl);\n SETSL(root, fl, GETSL(root, fl) | (1 << sl));\n}\n\n/** Removes a free block from internal lists. */\nfunction removeBlock(root: Root, block: Block): void {\n let blockInfo = block.mmInfo;\n if (DEBUG) assert(blockInfo & FREE); // must be free\n let size = blockInfo & ~TAGS_MASK;\n if (DEBUG) assert(size >= BLOCK_MINSIZE); // must be valid\n\n // mapping_insert\n let fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const inv: usize = sizeof() * 8 - 1;\n let boundedSize = min(size, BLOCK_MAXSIZE);\n fl = inv - clz(boundedSize);\n sl = ((boundedSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // link previous and next free block\n let prev = block.prev;\n let next = block.next;\n if (prev) prev.next = next;\n if (next) next.prev = prev;\n\n // update head if we are removing it\n if (block == GETHEAD(root, fl, sl)) {\n SETHEAD(root, fl, sl, next);\n\n // clear second level map if head is empty now\n if (!next) {\n let slMap = GETSL(root, fl);\n SETSL(root, fl, slMap &= ~(1 << sl));\n\n // clear first level map if second level is empty now\n if (!slMap) root.flMap &= ~(1 << fl);\n }\n }\n // note: does not alter left/back because it is likely that splitting\n // is performed afterwards, invalidating those changes. so, the caller\n // must perform those updates.\n}\n\nfunction roundSize(size: usize): usize {\n const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl\n const inv: usize = sizeof() * 8 - 1;\n const invRound = inv - SL_BITS;\n return size < halfMaxSize\n ? size + (1 << (invRound - clz(size))) - 1\n : size;\n}\n\n/** Searches for a free block of at least the specified size. */\nfunction searchBlock(root: Root, size: usize): Block | null {\n // size was already asserted by caller\n\n // mapping_search\n let fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const requestSize = roundSize(size);\n fl = sizeof() * 8 - 1 - clz(requestSize);\n sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // search second level\n let slMap = GETSL(root, fl) & (~0 << sl);\n let head: Block | null = null;\n if (!slMap) {\n // search next larger first level\n let flMap = root.flMap & (~0 << (fl + 1));\n if (!flMap) {\n head = null;\n } else {\n fl = ctz(flMap);\n slMap = GETSL(root, fl);\n if (DEBUG) assert(slMap); // can't be zero if fl points here\n head = GETHEAD(root, fl, ctz(slMap));\n }\n } else {\n head = GETHEAD(root, fl, ctz(slMap));\n }\n return head;\n}\n\n/** Prepares the specified block before (re-)use, possibly splitting it. */\nfunction prepareBlock(root: Root, block: Block, size: usize): void {\n // size was already asserted by caller\n\n let blockInfo = block.mmInfo;\n if (DEBUG) assert(!((size + BLOCK_OVERHEAD) & AL_MASK)); // size must be aligned so the new block is\n\n // split if the block can hold another MINSIZE block incl. overhead\n let remaining = (blockInfo & ~TAGS_MASK) - size;\n if (remaining >= BLOCK_OVERHEAD + BLOCK_MINSIZE) {\n block.mmInfo = size | (blockInfo & LEFTFREE); // also discards FREE\n\n let spare = changetype(changetype(block) + BLOCK_OVERHEAD + size);\n spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFTFREE\n insertBlock(root, spare); // also sets 'back'\n\n // otherwise tag block as no longer FREE and right as no longer LEFTFREE\n } else {\n block.mmInfo = blockInfo & ~FREE;\n GETRIGHT(block).mmInfo &= ~LEFTFREE;\n }\n}\n\n/** Adds more memory to the pool. */\nfunction addMemory(root: Root, start: usize, endU64: u64): bool {\n let end = endU64;\n if (DEBUG) assert(start <= endU64); // must be valid\n start = ((start + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n end &= ~AL_MASK;\n\n let tail = GETTAIL(root);\n let tailInfo: usize = 0;\n if (tail) { // more memory\n if (DEBUG) assert(start >= changetype(tail) + BLOCK_OVERHEAD);\n\n // merge with current tail if adjacent\n const offsetToTail = AL_SIZE;\n if (start - offsetToTail == changetype(tail)) {\n start -= offsetToTail;\n tailInfo = tail.mmInfo;\n } else {\n // We don't do this, but a user might `memory.grow` manually\n // leading to non-adjacent pages managed by TLSF.\n }\n\n } else if (DEBUG) { // first memory\n assert(start >= changetype(root) + ROOT_SIZE); // starts after root\n }\n\n // check if size is large enough for a free block and the tail block\n let size = end - start;\n if (size < BLOCK_OVERHEAD + BLOCK_MINSIZE + BLOCK_OVERHEAD) {\n return false;\n }\n\n // left size is total minus its own and the zero-length tail's header\n let leftSize = size - 2 * BLOCK_OVERHEAD;\n let left = changetype(start);\n left.mmInfo = leftSize | FREE | (tailInfo & LEFTFREE);\n left.prev = null;\n left.next = null;\n\n // tail is a zero-length used block\n tail = changetype(start + BLOCK_OVERHEAD + leftSize);\n tail.mmInfo = 0 | LEFTFREE;\n SETTAIL(root, tail);\n\n insertBlock(root, left); // also merges with free left before tail / sets 'back'\n\n return true;\n}\n\n/** Grows memory to fit at least another block of the specified size. */\nfunction growMemory(root: Root, size: usize): void {\n if (ASC_LOW_MEMORY_LIMIT) {\n unreachable();\n return;\n }\n // Here, both rounding performed in searchBlock ...\n if (size >= SB_SIZE) {\n size = roundSize(size);\n }\n // and additional BLOCK_OVERHEAD must be taken into account. If we are going\n // to merge with the tail block, that's one time, otherwise it's two times.\n let pagesBefore = memory.size();\n size += BLOCK_OVERHEAD << usize((pagesBefore << 16) - BLOCK_OVERHEAD != changetype(GETTAIL(root)));\n let pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16);\n let pagesWanted = max(pagesBefore, pagesNeeded); // double memory\n if (memory.grow(pagesWanted) < 0) {\n if (memory.grow(pagesNeeded) < 0) unreachable();\n }\n let pagesAfter = memory.size();\n addMemory(root, pagesBefore << 16, pagesAfter << 16);\n}\n\n/** Computes the size (excl. header) of a block. */\nfunction computeSize(size: usize): usize {\n // Size must be large enough and aligned minus preceeding overhead\n return size <= BLOCK_MINSIZE\n ? BLOCK_MINSIZE\n : ((size + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n}\n\n/** Prepares and checks an allocation size. */\nfunction prepareSize(size: usize): usize {\n if (size > BLOCK_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n return computeSize(size);\n}\n\n/** Initializes the root structure. */\nfunction initialize(): void {\n if (isDefined(ASC_RTRACE)) oninit(__heap_base);\n let rootOffset = (__heap_base + AL_MASK) & ~AL_MASK;\n let pagesBefore = memory.size();\n let pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16);\n if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable();\n let root = changetype(rootOffset);\n root.flMap = 0;\n SETTAIL(root, changetype(0));\n for (let fl: usize = 0; fl < FL_BITS; ++fl) {\n SETSL(root, fl, 0);\n for (let sl: u32 = 0; sl < SL_SIZE; ++sl) {\n SETHEAD(root, fl, sl, null);\n }\n }\n let memStart = rootOffset + ROOT_SIZE;\n if (ASC_LOW_MEMORY_LIMIT) {\n const memEnd = ASC_LOW_MEMORY_LIMIT & ~AL_MASK;\n if (memStart <= memEnd) addMemory(root, memStart, memEnd);\n else unreachable(); // low memory limit already exceeded\n } else {\n addMemory(root, memStart, memory.size() << 16);\n }\n ROOT = root;\n}\n\n/** Allocates a block of the specified size. */\nexport function allocateBlock(root: Root, size: usize): Block {\n let payloadSize = prepareSize(size);\n let block = searchBlock(root, payloadSize);\n if (!block) {\n growMemory(root, payloadSize);\n block = changetype(searchBlock(root, payloadSize));\n if (DEBUG) assert(block); // must be found now\n }\n if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= payloadSize); // must fit\n removeBlock(root, block);\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) onalloc(block);\n return block;\n}\n\n/** Reallocates a block to the specified size. */\nexport function reallocateBlock(root: Root, block: Block, size: usize): Block {\n let payloadSize = prepareSize(size);\n let blockInfo = block.mmInfo;\n let blockSize = blockInfo & ~TAGS_MASK;\n\n // possibly split and update runtime size if it still fits\n if (payloadSize <= blockSize) {\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) {\n if (payloadSize != blockSize) onresize(block, BLOCK_OVERHEAD + blockSize);\n }\n return block;\n }\n\n // merge with right free block if merger is large enough\n let right = GETRIGHT(block);\n let rightInfo = right.mmInfo;\n if (rightInfo & FREE) {\n let mergeSize = blockSize + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK);\n if (mergeSize >= payloadSize) {\n removeBlock(root, right);\n block.mmInfo = (blockInfo & TAGS_MASK) | mergeSize;\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) onresize(block, BLOCK_OVERHEAD + blockSize);\n return block;\n }\n }\n\n // otherwise move the block\n return moveBlock(root, block, size);\n}\n\n/** Moves a block to a new one of the specified size. */\nfunction moveBlock(root: Root, block: Block, newSize: usize): Block {\n let newBlock = allocateBlock(root, newSize);\n memory.copy(changetype(newBlock) + BLOCK_OVERHEAD, changetype(block) + BLOCK_OVERHEAD, block.mmInfo & ~TAGS_MASK);\n if (changetype(block) >= __heap_base) {\n if (isDefined(ASC_RTRACE)) onmove(block, newBlock);\n freeBlock(root, block);\n }\n return newBlock;\n}\n\n/** Frees a block. */\nexport function freeBlock(root: Root, block: Block): void {\n if (isDefined(ASC_RTRACE)) onfree(block);\n block.mmInfo = block.mmInfo | FREE;\n insertBlock(root, block);\n}\n\n/** Checks that a used block is valid to be freed or reallocated. */\nfunction checkUsedBlock(ptr: usize): Block {\n let block = changetype(ptr - BLOCK_OVERHEAD);\n assert(\n ptr != 0 && !(ptr & AL_MASK) && // must exist and be aligned\n !(block.mmInfo & FREE) // must be used\n );\n return block;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __alloc(size: usize): usize {\n if (!ROOT) initialize();\n return changetype(allocateBlock(ROOT, size)) + BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __realloc(ptr: usize, size: usize): usize {\n if (!ROOT) initialize();\n return (ptr < __heap_base\n ? changetype(moveBlock(ROOT, checkUsedBlock(ptr), size))\n : changetype(reallocateBlock(ROOT, checkUsedBlock(ptr), size))\n ) + BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __free(ptr: usize): void {\n if (ptr < __heap_base) return;\n if (!ROOT) initialize();\n freeBlock(ROOT, checkUsedBlock(ptr));\n}\n","// This file is shared with the compiler and must remain portable\n\n// ╒═══════════════════ Typeinfo interpretation ═══════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ◄─ __rtti_base\n// │ count │\n// ╞═══════════════════════════════════════════════════════════════╡ ┐\n// │ Typeinfo#flags [id=0] │ id < count\n// ├───────────────────────────────────────────────────────────────┤\n// │ ... │\n\n/** Runtime type information data structure. */\n@unmanaged\nexport class Typeinfo {\n /** Flags describing the shape of this class type. */\n flags: TypeinfoFlags = TypeinfoFlags.NONE;\n}\n\n/** Runtime type information flags. */\nexport const enum TypeinfoFlags {\n /** No specific flags. */\n NONE = 0,\n /** Type is an `ArrayBufferView`. */\n ARRAYBUFFERVIEW = 1 << 0,\n /** Type is an `Array`. */\n ARRAY = 1 << 1,\n /** Type is a `StaticArray`. */\n STATICARRAY = 1 << 2,\n /** Type is a `Set`. */\n SET = 1 << 3,\n /** Type is a `Map`. */\n MAP = 1 << 4,\n /** Type has no outgoing pointers. */\n POINTERFREE = 1 << 5,\n /** Value alignment of 1 byte. */\n VALUE_ALIGN_0 = 1 << 6,\n /** Value alignment of 2 bytes. */\n VALUE_ALIGN_1 = 1 << 7,\n /** Value alignment of 4 bytes. */\n VALUE_ALIGN_2 = 1 << 8,\n /** Value alignment of 8 bytes. */\n VALUE_ALIGN_3 = 1 << 9,\n /** Value alignment of 16 bytes. */\n VALUE_ALIGN_4 = 1 << 10,\n /** Value is a signed type. */\n VALUE_SIGNED = 1 << 11,\n /** Value is a float type. */\n VALUE_FLOAT = 1 << 12,\n /** Value type is nullable. */\n VALUE_NULLABLE = 1 << 13,\n /** Value type is managed. */\n VALUE_MANAGED = 1 << 14,\n /** Key alignment of 1 byte. */\n KEY_ALIGN_0 = 1 << 15,\n /** Key alignment of 2 bytes. */\n KEY_ALIGN_1 = 1 << 16,\n /** Key alignment of 4 bytes. */\n KEY_ALIGN_2 = 1 << 17,\n /** Key alignment of 8 bytes. */\n KEY_ALIGN_3 = 1 << 18,\n /** Key alignment of 16 bytes. */\n KEY_ALIGN_4 = 1 << 19,\n /** Key is a signed type. */\n KEY_SIGNED = 1 << 20,\n /** Key is a float type. */\n KEY_FLOAT = 1 << 21,\n /** Key type is nullable. */\n KEY_NULLABLE = 1 << 22,\n /** Key type is managed. */\n KEY_MANAGED = 1 << 23\n}\n","import { BLOCK, BLOCK_OVERHEAD, OBJECT_OVERHEAD, OBJECT_MAXSIZE, TOTAL_OVERHEAD, DEBUG, TRACE, RTRACE, PROFILE } from \"./common\";\nimport { onvisit, oncollect, oninterrupt, onyield } from \"./rtrace\";\nimport { TypeinfoFlags } from \"../shared/typeinfo\";\nimport { E_ALLOCATION_TOO_LARGE, E_ALREADY_PINNED, E_NOT_PINNED } from \"../util/error\";\n\n// === ITCMS: An incremental Tri-Color Mark & Sweep garbage collector ===\n// Adapted from Bach Le's μgc, see: https://github.com/bullno1/ugc\n\n// ╒═════════════╤══════════════ Colors ═══════════════════════════╕\n// │ Color │ Meaning │\n// ├─────────────┼─────────────────────────────────────────────────┤\n// │ WHITE* │ Unprocessed │\n// │ BLACK* │ Processed │\n// │ GRAY │ Processed with unprocessed children │\n// │ TRANSPARENT │ Manually pinned (always reachable) │\n// └─────────────┴─────────────────────────────────────────────────┘\n// * flipped between cycles\n\n// @ts-ignore: decorator\n@lazy let white = 0;\n// @ts-ignore: decorator\n@inline const gray = 2;\n// @ts-ignore: decorator\n@inline const transparent = 3;\n// @ts-ignore: decorator\n@inline const COLOR_MASK = 3;\n\n/** Size in memory of all objects currently managed by the GC. */\n// @ts-ignore: decorator\n@lazy let total: usize = 0;\n\n/** Currently transitioning from SWEEP to MARK state. */\n// @ts-ignore: decorator\n@inline const STATE_IDLE = 0;\n/** Currently marking reachable objects. */\n// @ts-ignore: decorator\n@inline const STATE_MARK = 1;\n/** Currently sweeping unreachable objects. */\n// @ts-ignore: decorator\n@inline const STATE_SWEEP = 2;\n/** Current collector state. */\n// @ts-ignore: decorator\n@lazy let state = STATE_IDLE;\n\n// @ts-ignore: decorator\n@lazy let fromSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy let toSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy let pinSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy let iter: Object = changetype(0); // unsafe initializion below\n\nfunction initLazy(space: Object): Object {\n space.nextWithColor = changetype(space);\n space.prev = space;\n return space;\n}\n\n/** Visit cookie indicating scanning of an object. */\n// @ts-ignore: decorator\n@inline const VISIT_SCAN = 0;\n\n// ╒═══════════════ Managed object layout (32-bit) ════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │\n// ╞═══════════════════════════════════════════════════════════╤═══╡\n// │ next │ C │ = nextWithColor\n// ├───────────────────────────────────────────────────────────┴───┤\n// │ prev │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtId │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtSize │\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n// C: color\n\n/** Represents a managed object in memory, consisting of a header followed by the object's data. */\n@unmanaged class Object extends BLOCK {\n /** Pointer to the next object with color flags stored in the alignment bits. */\n nextWithColor: usize; // *u32\n /** Pointer to the previous object. */\n prev: Object; // *u32\n /** Runtime id. */\n rtId: u32;\n /** Runtime size. */\n rtSize: u32;\n\n /** Gets the pointer to the next object. */\n get next(): Object {\n return changetype(this.nextWithColor & ~COLOR_MASK);\n }\n\n /** Sets the pointer to the next object. */\n set next(obj: Object) {\n this.nextWithColor = changetype(obj) | (this.nextWithColor & COLOR_MASK);\n }\n\n /** Gets this object's color. */\n get color(): i32 {\n return i32(this.nextWithColor & COLOR_MASK);\n }\n\n /** Sets this object's color. */\n set color(color: i32) {\n this.nextWithColor = (this.nextWithColor & ~COLOR_MASK) | color;\n }\n\n /** Gets the size of this object in memory. */\n get size(): usize {\n return BLOCK_OVERHEAD + (this.mmInfo & ~3);\n }\n\n /** Tests if this object is pointerfree. */\n get isPointerfree(): bool {\n let rtId = this.rtId;\n // 0: Object, 1: ArrayBuffer, 2: String\n return rtId <= idof() || (__typeinfo(rtId) & TypeinfoFlags.POINTERFREE) != 0;\n }\n\n /** Unlinks this object from its list. */\n unlink(): void {\n let next = this.next;\n if (next == null) {\n if (DEBUG) assert(this.prev == null && changetype(this) < __heap_base);\n return; // static data not yet linked\n }\n let prev = this.prev;\n if (DEBUG) assert(prev);\n next.prev = prev;\n prev.next = next;\n }\n\n /** Links this object to the specified list, with the given color. */\n linkTo(list: Object, withColor: i32): void {\n let prev = list.prev;\n this.nextWithColor = changetype(list) | withColor;\n this.prev = prev;\n prev.next = this;\n list.prev = this;\n }\n\n /** Marks this object as gray, that is reachable with unscanned children. */\n makeGray(): void {\n if (this == iter) iter = assert(this.prev);\n this.unlink();\n this.linkTo(toSpace, this.isPointerfree ? i32(!white) : gray);\n }\n}\n\n/** Visits all objects considered to be program roots. */\nfunction visitRoots(cookie: u32): void {\n __visit_globals(cookie);\n let pn = pinSpace;\n let iter = pn.next;\n while (iter != pn) {\n if (DEBUG) assert(iter.color == transparent);\n __visit_members(changetype(iter) + TOTAL_OVERHEAD, cookie);\n iter = iter.next;\n }\n}\n\n/** Visits all objects on the stack. */\nfunction visitStack(cookie: u32): void {\n let ptr = __stack_pointer;\n while (ptr < __heap_base) {\n __visit(load(ptr), cookie);\n ptr += sizeof();\n }\n}\n\n/** Performs a single step according to the current state. */\nfunction step(): usize {\n // Magic constants responsible for pause times. Obtained experimentally\n // using the compiler compiling itself. 2048 budget pro run by default.\n const MARKCOST = isDefined(ASC_GC_MARKCOST) ? ASC_GC_MARKCOST : 1;\n const SWEEPCOST = isDefined(ASC_GC_SWEEPCOST) ? ASC_GC_SWEEPCOST : 10;\n let obj: Object;\n switch (state) {\n case STATE_IDLE: {\n state = STATE_MARK;\n visitCount = 0;\n visitRoots(VISIT_SCAN);\n iter = toSpace;\n return visitCount * MARKCOST;\n }\n case STATE_MARK: {\n let black = i32(!white);\n obj = iter.next;\n while (obj != toSpace) {\n iter = obj;\n if (obj.color != black) { // skip already-blacks (pointerfree)\n obj.color = black;\n visitCount = 0;\n __visit_members(changetype(obj) + TOTAL_OVERHEAD, VISIT_SCAN);\n return visitCount * MARKCOST;\n }\n obj = obj.next;\n }\n visitCount = 0;\n visitRoots(VISIT_SCAN);\n obj = iter.next;\n if (obj == toSpace) {\n visitStack(VISIT_SCAN);\n obj = iter.next;\n while (obj != toSpace) {\n if (obj.color != black) {\n obj.color = black;\n __visit_members(changetype(obj) + TOTAL_OVERHEAD, VISIT_SCAN);\n }\n obj = obj.next;\n }\n let from = fromSpace;\n fromSpace = toSpace;\n toSpace = from;\n white = black;\n iter = from.next;\n state = STATE_SWEEP;\n }\n return visitCount * MARKCOST;\n }\n case STATE_SWEEP: {\n obj = iter;\n if (obj != toSpace) {\n iter = obj.next;\n if (DEBUG) assert(obj.color == i32(!white)); // old white\n free(obj);\n return SWEEPCOST;\n }\n toSpace.nextWithColor = changetype(toSpace);\n toSpace.prev = toSpace;\n state = STATE_IDLE;\n break;\n }\n }\n return 0;\n}\n\n/** Frees an object. */\nfunction free(obj: Object): void {\n if (changetype(obj) < __heap_base) {\n obj.nextWithColor = 0; // may become linked again\n obj.prev = changetype(0);\n } else {\n total -= obj.size;\n if (isDefined(__finalize)) {\n __finalize(changetype(obj) + TOTAL_OVERHEAD);\n }\n __free(changetype(obj) + BLOCK_OVERHEAD);\n }\n}\n\n// Garbage collector interface\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __new(size: usize, id: i32): usize {\n if (size >= OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n if (total >= threshold) interrupt();\n let obj = changetype(__alloc(OBJECT_OVERHEAD + size) - BLOCK_OVERHEAD);\n obj.rtId = id;\n obj.rtSize = size;\n obj.linkTo(fromSpace, white); // inits next/prev\n total += obj.size;\n let ptr = changetype(obj) + TOTAL_OVERHEAD;\n // may be visited before being fully initialized, so must fill\n memory.fill(ptr, 0, size);\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __renew(oldPtr: usize, size: usize): usize {\n let oldObj = changetype(oldPtr - TOTAL_OVERHEAD);\n // Update object size if its block is large enough\n if (size <= (oldObj.mmInfo & ~3) - OBJECT_OVERHEAD) {\n oldObj.rtSize = size;\n return oldPtr;\n }\n // If not the same object anymore, we have to move it move it due to the\n // shadow stack potentially still referencing the old object\n let newPtr = __new(size, oldObj.rtId);\n memory.copy(newPtr, oldPtr, min(size, oldObj.rtSize));\n return newPtr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void {\n // Write barrier is unnecessary if non-incremental\n if (!childPtr) return;\n if (DEBUG) assert(parentPtr);\n let child = changetype(childPtr - TOTAL_OVERHEAD);\n if (child.color == white) {\n let parent = changetype(parentPtr - TOTAL_OVERHEAD);\n let parentColor = parent.color;\n if (parentColor == i32(!white)) {\n // Maintain the invariant that no black object may point to a white object.\n if (expectMultiple) {\n // Move the barrier \"backward\". Suitable for containers receiving multiple stores.\n // Avoids a barrier for subsequent objects stored into the same container.\n parent.makeGray();\n } else {\n // Move the barrier \"forward\". Suitable for objects receiving isolated stores.\n child.makeGray();\n }\n } else if (parentColor == transparent && state == STATE_MARK) {\n // Pinned objects are considered 'black' during the mark phase.\n child.makeGray();\n }\n }\n}\n\n// @ts-ignore: decorator\n@lazy let visitCount = 0;\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __visit(ptr: usize, cookie: i32): void {\n if (!ptr) return;\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (RTRACE) if (!onvisit(obj)) return;\n if (obj.color == white) {\n obj.makeGray();\n ++visitCount;\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __pin(ptr: usize): usize {\n if (ptr) {\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color == transparent) {\n throw new Error(E_ALREADY_PINNED);\n }\n obj.unlink(); // from fromSpace\n obj.linkTo(pinSpace, transparent);\n }\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __unpin(ptr: usize): void {\n if (!ptr) return;\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color != transparent) {\n throw new Error(E_NOT_PINNED);\n }\n if (state == STATE_MARK) {\n // We may be right at the point after marking roots for the second time and\n // entering the sweep phase, in which case the object would be missed if it\n // is not only pinned but also a root. Make sure it isn't missed.\n obj.makeGray();\n } else {\n obj.unlink();\n obj.linkTo(fromSpace, white);\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __collect(): void {\n if (TRACE) trace(\"GC (full) at\", 1, total);\n if (state > STATE_IDLE) {\n // finish current cycle\n while (state != STATE_IDLE) step();\n }\n // perform a full cycle\n step();\n while (state != STATE_IDLE) step();\n threshold = (total * IDLEFACTOR / 100) + GRANULARITY;\n if (TRACE) trace(\"GC (full) done at cur/max\", 2, total, memory.size() << 16);\n if (RTRACE || PROFILE) oncollect(total);\n}\n\n// Garbage collector automation\n\n/** How often to interrupt. The default of 1024 means \"interrupt each 1024 bytes allocated\". */\n// @ts-ignore: decorator\n@inline const GRANULARITY: usize = isDefined(ASC_GC_GRANULARITY) ? ASC_GC_GRANULARITY : 1024;\n/** How long to interrupt. The default of 200% means \"run at double the speed of allocations\". */\n// @ts-ignore: decorator\n@inline const STEPFACTOR: usize = isDefined(ASC_GC_SWEEPFACTOR) ? ASC_GC_SWEEPFACTOR : 200;\n/** How long to idle. The default of 200% means \"wait for memory to double before kicking in again\". */\n// @ts-ignore: decorator\n@inline const IDLEFACTOR: usize = isDefined(ASC_GC_IDLEFACTOR) ? ASC_GC_IDLEFACTOR : 200;\n\n/** Threshold of memory used by objects to exceed before interrupting again. */\n// @ts-ignore: decorator\n@lazy let threshold: usize = ((memory.size() << 16) - __heap_base) >> 1;\n\n/** Performs a reasonable amount of incremental GC steps. */\nfunction interrupt(): void {\n if (PROFILE) oninterrupt(total);\n if (TRACE) trace(\"GC (auto) at\", 1, total);\n let budget: isize = GRANULARITY * STEPFACTOR / 100;\n do {\n budget -= step();\n if (state == STATE_IDLE) {\n if (TRACE) trace(\"└ GC (auto) done at cur/max\", 2, total, memory.size() << 16);\n threshold = (total * IDLEFACTOR / 100) + GRANULARITY;\n if (PROFILE) onyield(total);\n return;\n }\n } while (budget > 0);\n if (TRACE) trace(\"└ GC (auto) ongoing at\", 1, total);\n threshold = total + GRANULARITY * usize(total - threshold < GRANULARITY);\n if (PROFILE) onyield(total);\n}\n","// Characters\n// @ts-ignore = Decorator is valid here\n@inline export const COMMA = 44;\n// @ts-ignore = Decorator is valid here\n@inline export const QUOTE = 34;\n// @ts-ignore = Decorator is valid here\n@inline export const BACK_SLASH = 92;\n// @ts-ignore: Decorator is valid here\n@inline export const FWD_SLASH = 47;\n// @ts-ignore: Decorator is valid here\n@inline export const BRACE_LEFT = 123;\n// @ts-ignore: Decorator is valid here\n@inline export const BRACE_RIGHT = 125;\n// @ts-ignore: Decorator is valid here\n@inline export const BRACKET_LEFT = 91;\n// @ts-ignore: Decorator is valid here\n@inline export const BRACKET_RIGHT = 93;\n// @ts-ignore: Decorator is valid here\n@inline export const COLON = 58;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_T = 116;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_R = 114;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_U = 117;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_E = 101;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_F = 102;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_A = 97;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_L = 108;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_S = 115;\n// @ts-ignore = Decorator is valid here\n@inline export const CHAR_N = 110;\n// @ts-ignore = Decorator is valid here\n@inline export const CHAR_B = 98;\n// Strings\n// @ts-ignore: Decorator is valid here\n@inline export const TRUE_WORD = \"true\";\n// @ts-ignore: Decorator is valid here\n@inline export const FALSE_WORD = \"false\";\n// @ts-ignore: Decorator is valid here\n@inline export const NULL_WORD = \"null\";\n// @ts-ignore: Decorator is valid here\n@inline export const BRACE_LEFT_WORD = \"{\";\n// @ts-ignore: Decorator is valid here\n@inline export const BRACKET_LEFT_WORD = \"[\";\n// @ts-ignore: Decorator is valid here\n@inline export const EMPTY_BRACKET_WORD = \"[]\";\n// @ts-ignore: Decorator is valid here\n@inline export const COLON_WORD = \":\";\n// @ts-ignore: Decorator is valid here\n@inline export const COMMA_WORD = \",\";\n// @ts-ignore: Decorator is valid here\n@inline export const BRACE_RIGHT_WORD = \"}\";\n// @ts-ignore: Decorator is valid here\n@inline export const BRACKET_RIGHT_WORD = \"]\";\n// @ts-ignore: Decorator is valid here\n@inline export const QUOTE_WORD = \"\\\"\";\n// @ts-ignore: Decorator is valid here\n@inline export const EMPTY_QUOTE_WORD = \"\\\"\\\"\";\n\n// Escape Codes\n// @ts-ignore: Decorator is valid here\n@inline export const BACKSPACE = 8; // \\b\n// @ts-ignore: Decorator is valid here\n@inline export const TAB = 9; // \\t\n// @ts-ignore: Decorator is valid here\n@inline export const NEW_LINE = 10; // \\n\n// @ts-ignore: Decorator is valid here\n@inline export const FORM_FEED = 12; // \\f\n// @ts-ignore: Decorator is valid here\n@inline export const CARRIAGE_RETURN = 13; // \\r\n","//\n// Lookup data for exp2f\n//\n\n// @ts-ignore: decorator\n@inline const EXP2F_TABLE_BITS = 5;\n\n// @ts-ignore: decorator\n@lazy @inline const EXP2F_DATA_TAB = memory.data([\n // exp2f_data_tab[i] = uint(2^(i/N)) - (i << 52-BITS)\n // used for computing 2^(k/N) for an int |k| < 150 N as\n // double(tab[k%N] + (k << 52-BITS))\n 0x3FF0000000000000, 0x3FEFD9B0D3158574, 0x3FEFB5586CF9890F, 0x3FEF9301D0125B51,\n 0x3FEF72B83C7D517B, 0x3FEF54873168B9AA, 0x3FEF387A6E756238, 0x3FEF1E9DF51FDEE1,\n 0x3FEF06FE0A31B715, 0x3FEEF1A7373AA9CB, 0x3FEEDEA64C123422, 0x3FEECE086061892D,\n 0x3FEEBFDAD5362A27, 0x3FEEB42B569D4F82, 0x3FEEAB07DD485429, 0x3FEEA47EB03A5585,\n 0x3FEEA09E667F3BCD, 0x3FEE9F75E8EC5F74, 0x3FEEA11473EB0187, 0x3FEEA589994CCE13,\n 0x3FEEACE5422AA0DB, 0x3FEEB737B0CDC5E5, 0x3FEEC49182A3F090, 0x3FEED503B23E255D,\n 0x3FEEE89F995AD3AD, 0x3FEEFF76F2FB5E47, 0x3FEF199BDD85529C, 0x3FEF3720DCEF9069,\n 0x3FEF5818DCFBA487, 0x3FEF7C97337B9B5F, 0x3FEFA4AFA2A490DA, 0x3FEFD0765B6E4540\n]);\n\n// ULP error: 0.502 (nearest rounding.)\n// Relative error: 1.69 * 2^-34 in [-1/64, 1/64] (before rounding.)\n// Wrong count: 168353 (all nearest rounding wrong results with fma.)\n// @ts-ignore: decorator\n@inline\nexport function exp2f_lut(x: f32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N, // 0x1.8p+52\n Ox127f = reinterpret(0x7F000000);\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394), // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3), // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6); // 0x1.62e42ff0c52d6p-1\n\n let xd = x;\n let ix = reinterpret(x);\n let ux = ix >> 20 & 0x7FF;\n if (ux >= 0x430) {\n // |x| >= 128 or x is nan.\n if (ix == 0xFF800000) return 0; // x == -Inf -> 0\n if (ux >= 0x7F8) return x + x; // x == Inf/NaN -> Inf/NaN\n if (x > 0) return x * Ox127f; // x > 0 -> HugeVal (Owerflow)\n if (x <= -150) return 0; // x <= -150 -> 0 (Underflow)\n }\n\n // x = k/N + r with r in [-1/(2N), 1/(2N)] and int k.\n let kd = xd + shift;\n let ki = reinterpret(kd);\n let r = xd - (kd - shift);\n let t: u64, y: f64, s: f64;\n\n // exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += ki << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n y = C2 * r + 1;\n y += (C0 * r + C1) * (r * r);\n y *= s;\n\n return y;\n}\n\n// ULP error: 0.502 (nearest rounding.)\n// Relative error: 1.69 * 2^-34 in [-ln2/64, ln2/64] (before rounding.)\n// Wrong count: 170635 (all nearest rounding wrong results with fma.)\n// @ts-ignore: decorator\n@inline\nexport function expf_lut(x: f32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000), // 0x1.8p+52\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep+0\n Ox1p127f = reinterpret(0x7F000000);\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394) / N / N / N, // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3) / N / N, // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6) / N; // 0x1.62e42ff0c52d6p-1\n\n let xd = x;\n let ix = reinterpret(x);\n let ux = ix >> 20 & 0x7FF;\n if (ux >= 0x42B) {\n // |x| >= 88 or x is nan.\n if (ix == 0xFF800000) return 0; // x == -Inf -> 0\n if (ux >= 0x7F8) return x + x; // x == Inf/NaN -> Inf/NaN\n if (x > reinterpret(0x42B17217)) return x * Ox1p127f; // x > log(0x1p128) ~= 88.72 -> HugeVal (Owerflow)\n if (x < reinterpret(0xC2CFF1B4)) return 0; // x < log(0x1p-150) ~= -103.97 -> 0 (Underflow)\n }\n\n // x*N/Ln2 = k + r with r in [-1/2, 1/2] and int k.\n let z = InvLn2N * xd;\n\n // Round and convert z to int, the result is in [-150*N, 128*N] and\n // ideally ties-to-even rule is used, otherwise the magnitude of r\n // can be bigger which gives larger approximation error.\n let kd = (z + shift);\n let ki = reinterpret(kd);\n let r = z - (kd - shift);\n let s: f64, y: f64, t: u64;\n\n // exp(x) = 2^(k/N) * 2^(r/N) ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += ki << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n z = C0 * r + C1;\n y = C2 * r + 1;\n y += z * (r * r);\n y *= s;\n\n return y;\n}\n\n//\n// Lookup data for log2f\n//\n\n// @ts-ignore: decorator\n@inline const LOG2F_TABLE_BITS = 4;\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2F_DATA_TAB = memory.data([\n 0x3FF661EC79F8F3BE, 0xBFDEFEC65B963019, // 0x1.661ec79f8f3bep+0, -0x1.efec65b963019p-2,\n 0x3FF571ED4AAF883D, 0xBFDB0B6832D4FCA4, // 0x1.571ed4aaf883dp+0, -0x1.b0b6832d4fca4p-2,\n 0x3FF49539F0F010B0, 0xBFD7418B0A1FB77B, // 0x1.49539f0f010bp+0 , -0x1.7418b0a1fb77bp-2,\n 0x3FF3C995B0B80385, 0xBFD39DE91A6DCF7B, // 0x1.3c995b0b80385p+0, -0x1.39de91a6dcf7bp-2,\n 0x3FF30D190C8864A5, 0xBFD01D9BF3F2B631, // 0x1.30d190c8864a5p+0, -0x1.01d9bf3f2b631p-2,\n 0x3FF25E227B0B8EA0, 0xBFC97C1D1B3B7AF0, // 0x1.25e227b0b8eap+0 , -0x1.97c1d1b3b7afp-3 ,\n 0x3FF1BB4A4A1A343F, 0xBFC2F9E393AF3C9F, // 0x1.1bb4a4a1a343fp+0, -0x1.2f9e393af3c9fp-3,\n 0x3FF12358F08AE5BA, 0xBFB960CBBF788D5C, // 0x1.12358f08ae5bap+0, -0x1.960cbbf788d5cp-4,\n 0x3FF0953F419900A7, 0xBFAA6F9DB6475FCE, // 0x1.0953f419900a7p+0, -0x1.a6f9db6475fcep-5,\n 0x3FF0000000000000, 0, // 0x1p+0, 0x0,\n 0x3FEE608CFD9A47AC, 0x3FB338CA9F24F53D, // 0x1.e608cfd9a47acp-1, 0x1.338ca9f24f53dp-4,\n 0x3FECA4B31F026AA0, 0x3FC476A9543891BA, // 0x1.ca4b31f026aap-1 , 0x1.476a9543891bap-3,\n 0x3FEB2036576AFCE6, 0x3FCE840B4AC4E4D2, // 0x1.b2036576afce6p-1, 0x1.e840b4ac4e4d2p-3,\n 0x3FE9C2D163A1AA2D, 0x3FD40645F0C6651C, // 0x1.9c2d163a1aa2dp-1, 0x1.40645f0c6651cp-2,\n 0x3FE886E6037841ED, 0x3FD88E9C2C1B9FF8, // 0x1.886e6037841edp-1, 0x1.88e9c2c1b9ff8p-2,\n 0x3FE767DCF5534862, 0x3FDCE0A44EB17BCC // 0x1.767dcf5534862p-1, 0x1.ce0a44eb17bccp-2\n]);\n\n// ULP error: 0.752 (nearest rounding.)\n// Relative error: 1.9 * 2^-26 (before rounding.)\n// @ts-ignore: decorator\n@inline\nexport function log2f_lut(x: f32): f32 {\n const\n N_MASK = (1 << LOG2F_TABLE_BITS) - 1,\n Ox1p23f = reinterpret(0x4B000000); // 0x1p23f\n\n const\n A0 = reinterpret(0xBFD712B6F70A7E4D), // -0x1.712b6f70a7e4dp-2\n A1 = reinterpret(0x3FDECABF496832E0), // 0x1.ecabf496832ep-2\n A2 = reinterpret(0xBFE715479FFAE3DE), // -0x1.715479ffae3dep-1\n A3 = reinterpret(0x3FF715475F35C8B8); // 0x1.715475f35c8b8p0\n\n let ux = reinterpret(x);\n // Fix sign of zero with downward rounding when x==1.\n // if (WANT_ROUNDING && predict_false(ix == 0x3f800000)) return 0;\n if (ux - 0x00800000 >= 0x7F800000 - 0x00800000) {\n // x < 0x1p-126 or inf or nan.\n if (ux * 2 == 0) return -Infinity;\n if (ux == 0x7F800000) return x; // log2(inf) == inf.\n if ((ux >> 31) || ux * 2 >= 0xFF000000) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ux = reinterpret(x * Ox1p23f);\n ux -= 23 << 23;\n }\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ux - 0x3F330000;\n let i = (tmp >> (23 - LOG2F_TABLE_BITS)) & N_MASK;\n let top = tmp & 0xFF800000;\n let iz = ux - top;\n let k = tmp >> 23;\n\n let invc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n let logc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n let z = reinterpret(iz);\n\n // log2(x) = log1p(z/c-1)/ln2 + log2(c) + k\n let r = z * invc - 1;\n let y0 = logc + k;\n\n // Pipelined polynomial evaluation to approximate log1p(r)/ln2.\n let y = A1 * r + A2;\n let p = A3 * r + y0;\n let r2 = r * r;\n y += A0 * r2;\n y = y * r2 + p;\n\n return y;\n}\n\n//\n// Lookup data for logf. See: https://git.musl-libc.org/cgit/musl/tree/src/math/logf.c\n//\n\n// @ts-ignore: decorator\n@inline const LOGF_TABLE_BITS = 4;\n\n// @ts-ignore: decorator\n@lazy @inline const LOGF_DATA_TAB = memory.data([\n 0x3FF661EC79F8F3BE, 0xBFD57BF7808CAADE, // 0x1.661ec79f8f3bep+0, -0x1.57bf7808caadep-2,\n 0x3FF571ED4AAF883D, 0xBFD2BEF0A7C06DDB, // 0x1.571ed4aaf883dp+0, -0x1.2bef0a7c06ddbp-2,\n 0x3FF49539F0F010B0, 0xBFD01EAE7F513A67, // 0x1.49539f0f010bp+0 , -0x1.01eae7f513a67p-2,\n 0x3FF3C995B0B80385, 0xBFCB31D8A68224E9, // 0x1.3c995b0b80385p+0, -0x1.b31d8a68224e9p-3,\n 0x3FF30D190C8864A5, 0xBFC6574F0AC07758, // 0x1.30d190c8864a5p+0, -0x1.6574f0ac07758p-3,\n 0x3FF25E227B0B8EA0, 0xBFC1AA2BC79C8100, // 0x1.25e227b0b8eap+0 , -0x1.1aa2bc79c81p-3 ,\n 0x3FF1BB4A4A1A343F, 0xBFBA4E76CE8C0E5E, // 0x1.1bb4a4a1a343fp+0, -0x1.a4e76ce8c0e5ep-4,\n 0x3FF12358F08AE5BA, 0xBFB1973C5A611CCC, // 0x1.12358f08ae5bap+0, -0x1.1973c5a611cccp-4,\n 0x3FF0953F419900A7, 0xBFA252F438E10C1E, // 0x1.0953f419900a7p+0, -0x1.252f438e10c1ep-5,\n 0x3FF0000000000000, 0, // 0x1p+0, 0,\n 0x3FEE608CFD9A47AC, 0x3FAAA5AA5DF25984, // 0x1.e608cfd9a47acp-1, 0x1.aa5aa5df25984p-5,\n 0x3FECA4B31F026AA0, 0x3FBC5E53AA362EB4, // 0x1.ca4b31f026aap-1 , 0x1.c5e53aa362eb4p-4,\n 0x3FEB2036576AFCE6, 0x3FC526E57720DB08, // 0x1.b2036576afce6p-1, 0x1.526e57720db08p-3,\n 0x3FE9C2D163A1AA2D, 0x3FCBC2860D224770, // 0x1.9c2d163a1aa2dp-1, 0x1.bc2860d22477p-3 ,\n 0x3FE886E6037841ED, 0x3FD1058BC8A07EE1, // 0x1.886e6037841edp-1, 0x1.1058bc8a07ee1p-2,\n 0x3FE767DCF5534862, 0x3FD4043057B6EE09 // 0x1.767dcf5534862p-1, 0x1.4043057b6ee09p-2\n]);\n\n// ULP error: 0.818 (nearest rounding.)\n// Relative error: 1.957 * 2^-26 (before rounding.)\n// @ts-ignore: decorator\n@inline\nexport function logf_lut(x: f32): f32 {\n const\n N_MASK = (1 << LOGF_TABLE_BITS) - 1,\n Ox1p23f = reinterpret(0x4B000000); // 0x1p23f\n\n const\n Ln2 = reinterpret(0x3FE62E42FEFA39EF), // 0x1.62e42fefa39efp-1;\n A0 = reinterpret(0xBFD00EA348B88334), // -0x1.00ea348b88334p-2\n A1 = reinterpret(0x3FD5575B0BE00B6A), // 0x1.5575b0be00b6ap-2\n A2 = reinterpret(0xBFDFFFFEF20A4123); // -0x1.ffffef20a4123p-2\n\n let ux = reinterpret(x);\n // Fix sign of zero with downward rounding when x==1.\n // if (WANT_ROUNDING && ux == 0x3f800000) return 0;\n if (ux - 0x00800000 >= 0x7F800000 - 0x00800000) {\n // x < 0x1p-126 or inf or nan.\n if ((ux << 1) == 0) return -Infinity;\n if (ux == 0x7F800000) return x; // log(inf) == inf.\n if ((ux >> 31) || (ux << 1) >= 0xFF000000) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ux = reinterpret(x * Ox1p23f);\n ux -= 23 << 23;\n }\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ux - 0x3F330000;\n let i = (tmp >> (23 - LOGF_TABLE_BITS)) & N_MASK;\n let k = tmp >> 23;\n let iz = ux - (tmp & 0x1FF << 23);\n\n let invc = load(LOGF_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n let logc = load(LOGF_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n\n let z = reinterpret(iz);\n\n // log(x) = log1p(z/c-1) + log(c) + k*Ln2\n let r = z * invc - 1;\n let y0 = logc + k * Ln2;\n\n // Pipelined polynomial evaluation to approximate log1p(r).\n let r2 = r * r;\n let y = A1 * r + A2;\n y += A0 * r2;\n y = y * r2 + (y0 + r);\n\n return y;\n}\n\n//\n// Lookup data for powf. See: https://git.musl-libc.org/cgit/musl/tree/src/math/powf.c\n//\n\n// @ts-ignore: decorator\n@inline\nfunction zeroinfnanf(ux: u32): bool {\n return (ux << 1) - 1 >= (0x7f800000 << 1) - 1;\n}\n\n// Returns 0 if not int, 1 if odd int, 2 if even int. The argument is\n// the bit representation of a non-zero finite floating-point value.\n// @ts-ignore: decorator\n@inline\nfunction checkintf(iy: u32): i32 {\n let e = iy >> 23 & 0xFF;\n if (e < 0x7F ) return 0;\n if (e > 0x7F + 23) return 2;\n e = 1 << (0x7F + 23 - e);\n if (iy & (e - 1)) return 0;\n if (iy & e ) return 1;\n return 2;\n}\n\n// Subnormal input is normalized so ix has negative biased exponent.\n// Output is multiplied by N (POWF_SCALE) if TOINT_INTRINICS is set.\n// @ts-ignore: decorator\n@inline\nfunction log2f_inline(ux: u32): f64 {\n const N_MASK = (1 << LOG2F_TABLE_BITS) - 1;\n\n const\n A0 = reinterpret(0x3FD27616C9496E0B), // 0x1.27616c9496e0bp-2\n A1 = reinterpret(0xBFD71969A075C67A), // -0x1.71969a075c67ap-2\n A2 = reinterpret(0x3FDEC70A6CA7BADD), // 0x1.ec70a6ca7baddp-2\n A3 = reinterpret(0xBFE7154748BEF6C8), // -0x1.7154748bef6c8p-1\n A4 = reinterpret(0x3FF71547652AB82B); // 0x1.71547652ab82bp+0\n\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ux - 0x3F330000;\n let i = usize((tmp >> (23 - LOG2F_TABLE_BITS)) & N_MASK);\n let top = tmp & 0xFF800000;\n let uz = ux - top;\n let k = top >> 23;\n\n let invc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n let logc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n let z = reinterpret(uz);\n\n // log2(x) = log1p(z/c-1)/ln2 + log2(c) + k\n let r = z * invc - 1;\n let y0 = logc + k;\n\n // Pipelined polynomial evaluation to approximate log1p(r)/ln2.\n let y = A0 * r + A1;\n let p = A2 * r + A3;\n let q = A4 * r + y0;\n\n r *= r;\n q += p * r;\n y = y * (r * r) + q;\n\n return y;\n}\n\n// The output of log2 and thus the input of exp2 is either scaled by N\n// (in case of fast toint intrinsics) or not. The unscaled xd must be\n// in [-1021,1023], sign_bias sets the sign of the result.\n// @ts-ignore: decorator\n@inline\nfunction exp2f_inline(xd: f64, signBias: u32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N; // 0x1.8p+52\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394), // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3), // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6); // 0x1.62e42ff0c52d6p-1\n\n // x = k/N + r with r in [-1/(2N), 1/(2N)]\n let kd = (xd + shift);\n let ki = reinterpret(kd);\n let r = xd - (kd - shift);\n let t: u64, z: f64, y: f64, s: f64;\n\n // exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += (ki + signBias) << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n z = C0 * r + C1;\n y = C2 * r + 1;\n y += z * (r * r);\n y *= s;\n return y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction xflowf(sign: u32, y: f32): f32 {\n return select(-y, y, sign) * y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction oflowf(sign: u32): f32 {\n return xflowf(sign, reinterpret(0x70000000)); // 0x1p97f\n}\n\n// @ts-ignore: decorator\n@inline\nfunction uflowf(sign: u32): f32 {\n return xflowf(sign, reinterpret(0x10000000)); // 0x1p-95f\n}\n\n// @ts-ignore: decorator\n@inline\nexport function powf_lut(x: f32, y: f32): f32 {\n const\n Ox1p23f = reinterpret(0x4B000000), // 0x1p23f\n UPPER_LIMIT = reinterpret(0x405FFFFFFFD1D571), // 0x1.fffffffd1d571p+6\n LOWER_LIMIT = -150.0,\n SIGN_BIAS = 1 << (EXP2F_TABLE_BITS + 11);\n\n let signBias: u32 = 0;\n let ix = reinterpret(x);\n let iy = reinterpret(y);\n let ny = 0;\n\n if (i32(ix - 0x00800000 >= 0x7f800000 - 0x00800000) | (ny = i32(zeroinfnanf(iy)))) {\n // Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan).\n if (ny) {\n if ((iy << 1) == 0) return 1.0;\n if (ix == 0x3F800000) return NaN; // original: 1.0\n if ((ix << 1) > (0x7F800000 << 1) || (iy << 1) > (0x7F800000 << 1)) return x + y;\n if ((ix << 1) == (0x3F800000 << 1)) return NaN; // original: 1.0\n if (((ix << 1) < (0x3F800000 << 1)) == !(iy >> 31)) return 0; // |x| < 1 && y==inf or |x| > 1 && y==-inf.\n return y * y;\n }\n if (zeroinfnanf(ix)) {\n let x2 = x * x;\n if ((ix >> 31) && checkintf(iy) == 1) x2 = -x2;\n return iy < 0 ? 1 / x2 : x2;\n }\n // x and y are non-zero finite.\n if (ix < 0) {\n // Finite x < 0.\n let yint = checkintf(iy);\n if (yint == 0) return (x - x) / (x - x);\n if (yint == 1) signBias = SIGN_BIAS;\n ix &= 0x7FFFFFFF;\n }\n if (ix < 0x00800000) {\n // Normalize subnormal x so exponent becomes negative.\n ix = reinterpret(x * Ox1p23f);\n ix &= 0x7FFFFFFF;\n ix -= 23 << 23;\n }\n }\n let logx = log2f_inline(ix);\n let ylogx = y * logx; // cannot overflow, y is single prec.\n if ((reinterpret(ylogx) >> 47 & 0xFFFF) >= 0x80BF) { // reinterpret(126.0) >> 47\n // |y * log(x)| >= 126\n if (ylogx > UPPER_LIMIT) return oflowf(signBias); // overflow\n if (ylogx <= LOWER_LIMIT) return uflowf(signBias); // underflow\n }\n return exp2f_inline(ylogx, signBias);\n}\n\n//\n// Lookup data for exp. See: https://git.musl-libc.org/cgit/musl/tree/src/math/exp.c\n//\n\n// @ts-ignore: decorator\n@inline const EXP_TABLE_BITS = 7;\n\n// @ts-ignore: decorator\n@lazy @inline const EXP_DATA_TAB = memory.data([\n 0x0000000000000000, 0x3FF0000000000000,\n 0x3C9B3B4F1A88BF6E, 0x3FEFF63DA9FB3335,\n 0xBC7160139CD8DC5D, 0x3FEFEC9A3E778061,\n 0xBC905E7A108766D1, 0x3FEFE315E86E7F85,\n 0x3C8CD2523567F613, 0x3FEFD9B0D3158574,\n 0xBC8BCE8023F98EFA, 0x3FEFD06B29DDF6DE,\n 0x3C60F74E61E6C861, 0x3FEFC74518759BC8,\n 0x3C90A3E45B33D399, 0x3FEFBE3ECAC6F383,\n 0x3C979AA65D837B6D, 0x3FEFB5586CF9890F,\n 0x3C8EB51A92FDEFFC, 0x3FEFAC922B7247F7,\n 0x3C3EBE3D702F9CD1, 0x3FEFA3EC32D3D1A2,\n 0xBC6A033489906E0B, 0x3FEF9B66AFFED31B,\n 0xBC9556522A2FBD0E, 0x3FEF9301D0125B51,\n 0xBC5080EF8C4EEA55, 0x3FEF8ABDC06C31CC,\n 0xBC91C923B9D5F416, 0x3FEF829AAEA92DE0,\n 0x3C80D3E3E95C55AF, 0x3FEF7A98C8A58E51,\n 0xBC801B15EAA59348, 0x3FEF72B83C7D517B,\n 0xBC8F1FF055DE323D, 0x3FEF6AF9388C8DEA,\n 0x3C8B898C3F1353BF, 0x3FEF635BEB6FCB75,\n 0xBC96D99C7611EB26, 0x3FEF5BE084045CD4,\n 0x3C9AECF73E3A2F60, 0x3FEF54873168B9AA,\n 0xBC8FE782CB86389D, 0x3FEF4D5022FCD91D,\n 0x3C8A6F4144A6C38D, 0x3FEF463B88628CD6,\n 0x3C807A05B0E4047D, 0x3FEF3F49917DDC96,\n 0x3C968EFDE3A8A894, 0x3FEF387A6E756238,\n 0x3C875E18F274487D, 0x3FEF31CE4FB2A63F,\n 0x3C80472B981FE7F2, 0x3FEF2B4565E27CDD,\n 0xBC96B87B3F71085E, 0x3FEF24DFE1F56381,\n 0x3C82F7E16D09AB31, 0x3FEF1E9DF51FDEE1,\n 0xBC3D219B1A6FBFFA, 0x3FEF187FD0DAD990,\n 0x3C8B3782720C0AB4, 0x3FEF1285A6E4030B,\n 0x3C6E149289CECB8F, 0x3FEF0CAFA93E2F56,\n 0x3C834D754DB0ABB6, 0x3FEF06FE0A31B715,\n 0x3C864201E2AC744C, 0x3FEF0170FC4CD831,\n 0x3C8FDD395DD3F84A, 0x3FEEFC08B26416FF,\n 0xBC86A3803B8E5B04, 0x3FEEF6C55F929FF1,\n 0xBC924AEDCC4B5068, 0x3FEEF1A7373AA9CB,\n 0xBC9907F81B512D8E, 0x3FEEECAE6D05D866,\n 0xBC71D1E83E9436D2, 0x3FEEE7DB34E59FF7,\n 0xBC991919B3CE1B15, 0x3FEEE32DC313A8E5,\n 0x3C859F48A72A4C6D, 0x3FEEDEA64C123422,\n 0xBC9312607A28698A, 0x3FEEDA4504AC801C,\n 0xBC58A78F4817895B, 0x3FEED60A21F72E2A,\n 0xBC7C2C9B67499A1B, 0x3FEED1F5D950A897,\n 0x3C4363ED60C2AC11, 0x3FEECE086061892D,\n 0x3C9666093B0664EF, 0x3FEECA41ED1D0057,\n 0x3C6ECCE1DAA10379, 0x3FEEC6A2B5C13CD0,\n 0x3C93FF8E3F0F1230, 0x3FEEC32AF0D7D3DE,\n 0x3C7690CEBB7AAFB0, 0x3FEEBFDAD5362A27,\n 0x3C931DBDEB54E077, 0x3FEEBCB299FDDD0D,\n 0xBC8F94340071A38E, 0x3FEEB9B2769D2CA7,\n 0xBC87DECCDC93A349, 0x3FEEB6DAA2CF6642,\n 0xBC78DEC6BD0F385F, 0x3FEEB42B569D4F82,\n 0xBC861246EC7B5CF6, 0x3FEEB1A4CA5D920F,\n 0x3C93350518FDD78E, 0x3FEEAF4736B527DA,\n 0x3C7B98B72F8A9B05, 0x3FEEAD12D497C7FD,\n 0x3C9063E1E21C5409, 0x3FEEAB07DD485429,\n 0x3C34C7855019C6EA, 0x3FEEA9268A5946B7,\n 0x3C9432E62B64C035, 0x3FEEA76F15AD2148,\n 0xBC8CE44A6199769F, 0x3FEEA5E1B976DC09,\n 0xBC8C33C53BEF4DA8, 0x3FEEA47EB03A5585,\n 0xBC845378892BE9AE, 0x3FEEA34634CCC320,\n 0xBC93CEDD78565858, 0x3FEEA23882552225,\n 0x3C5710AA807E1964, 0x3FEEA155D44CA973,\n 0xBC93B3EFBF5E2228, 0x3FEEA09E667F3BCD,\n 0xBC6A12AD8734B982, 0x3FEEA012750BDABF,\n 0xBC6367EFB86DA9EE, 0x3FEE9FB23C651A2F,\n 0xBC80DC3D54E08851, 0x3FEE9F7DF9519484,\n 0xBC781F647E5A3ECF, 0x3FEE9F75E8EC5F74,\n 0xBC86EE4AC08B7DB0, 0x3FEE9F9A48A58174,\n 0xBC8619321E55E68A, 0x3FEE9FEB564267C9,\n 0x3C909CCB5E09D4D3, 0x3FEEA0694FDE5D3F,\n 0xBC7B32DCB94DA51D, 0x3FEEA11473EB0187,\n 0x3C94ECFD5467C06B, 0x3FEEA1ED0130C132,\n 0x3C65EBE1ABD66C55, 0x3FEEA2F336CF4E62,\n 0xBC88A1C52FB3CF42, 0x3FEEA427543E1A12,\n 0xBC9369B6F13B3734, 0x3FEEA589994CCE13,\n 0xBC805E843A19FF1E, 0x3FEEA71A4623C7AD,\n 0xBC94D450D872576E, 0x3FEEA8D99B4492ED,\n 0x3C90AD675B0E8A00, 0x3FEEAAC7D98A6699,\n 0x3C8DB72FC1F0EAB4, 0x3FEEACE5422AA0DB,\n 0xBC65B6609CC5E7FF, 0x3FEEAF3216B5448C,\n 0x3C7BF68359F35F44, 0x3FEEB1AE99157736,\n 0xBC93091FA71E3D83, 0x3FEEB45B0B91FFC6,\n 0xBC5DA9B88B6C1E29, 0x3FEEB737B0CDC5E5,\n 0xBC6C23F97C90B959, 0x3FEEBA44CBC8520F,\n 0xBC92434322F4F9AA, 0x3FEEBD829FDE4E50,\n 0xBC85CA6CD7668E4B, 0x3FEEC0F170CA07BA,\n 0x3C71AFFC2B91CE27, 0x3FEEC49182A3F090,\n 0x3C6DD235E10A73BB, 0x3FEEC86319E32323,\n 0xBC87C50422622263, 0x3FEECC667B5DE565,\n 0x3C8B1C86E3E231D5, 0x3FEED09BEC4A2D33,\n 0xBC91BBD1D3BCBB15, 0x3FEED503B23E255D,\n 0x3C90CC319CEE31D2, 0x3FEED99E1330B358,\n 0x3C8469846E735AB3, 0x3FEEDE6B5579FDBF,\n 0xBC82DFCD978E9DB4, 0x3FEEE36BBFD3F37A,\n 0x3C8C1A7792CB3387, 0x3FEEE89F995AD3AD,\n 0xBC907B8F4AD1D9FA, 0x3FEEEE07298DB666,\n 0xBC55C3D956DCAEBA, 0x3FEEF3A2B84F15FB,\n 0xBC90A40E3DA6F640, 0x3FEEF9728DE5593A,\n 0xBC68D6F438AD9334, 0x3FEEFF76F2FB5E47,\n 0xBC91EEE26B588A35, 0x3FEF05B030A1064A,\n 0x3C74FFD70A5FDDCD, 0x3FEF0C1E904BC1D2,\n 0xBC91BDFBFA9298AC, 0x3FEF12C25BD71E09,\n 0x3C736EAE30AF0CB3, 0x3FEF199BDD85529C,\n 0x3C8EE3325C9FFD94, 0x3FEF20AB5FFFD07A,\n 0x3C84E08FD10959AC, 0x3FEF27F12E57D14B,\n 0x3C63CDAF384E1A67, 0x3FEF2F6D9406E7B5,\n 0x3C676B2C6C921968, 0x3FEF3720DCEF9069,\n 0xBC808A1883CCB5D2, 0x3FEF3F0B555DC3FA,\n 0xBC8FAD5D3FFFFA6F, 0x3FEF472D4A07897C,\n 0xBC900DAE3875A949, 0x3FEF4F87080D89F2,\n 0x3C74A385A63D07A7, 0x3FEF5818DCFBA487,\n 0xBC82919E2040220F, 0x3FEF60E316C98398,\n 0x3C8E5A50D5C192AC, 0x3FEF69E603DB3285,\n 0x3C843A59AC016B4B, 0x3FEF7321F301B460,\n 0xBC82D52107B43E1F, 0x3FEF7C97337B9B5F,\n 0xBC892AB93B470DC9, 0x3FEF864614F5A129,\n 0x3C74B604603A88D3, 0x3FEF902EE78B3FF6,\n 0x3C83C5EC519D7271, 0x3FEF9A51FBC74C83,\n 0xBC8FF7128FD391F0, 0x3FEFA4AFA2A490DA,\n 0xBC8DAE98E223747D, 0x3FEFAF482D8E67F1,\n 0x3C8EC3BC41AA2008, 0x3FEFBA1BEE615A27,\n 0x3C842B94C3A9EB32, 0x3FEFC52B376BBA97,\n 0x3C8A64A931D185EE, 0x3FEFD0765B6E4540,\n 0xBC8E37BAE43BE3ED, 0x3FEFDBFDAD9CBE14,\n 0x3C77893B4D91CD9D, 0x3FEFE7C1819E90D8,\n 0x3C5305C14160CC89, 0x3FEFF3C22B8F71F1\n]);\n\n// Handle cases that may overflow or underflow when computing the result that\n// is scale*(1+TMP) without intermediate rounding. The bit representation of\n// scale is in SBITS, however it has a computed exponent that may have\n// overflown into the sign bit so that needs to be adjusted before using it as\n// a double. (int32_t)KI is the k used in the argument reduction and exponent\n// adjustment of scale, positive k here means the result may overflow and\n// negative k means the result may underflow.\n// @ts-ignore: decorator\n@inline\nfunction specialcase(tmp: f64, sbits: u64, ki: u64): f64 {\n const\n Ox1p_1022 = reinterpret(0x0010000000000000), // 0x1p-1022\n Ox1p1009 = reinterpret(0x7F00000000000000); // 0x1p1009\n\n let scale: f64;\n if (!(ki & 0x80000000)) {\n // k > 0, the exponent of scale might have overflowed by <= 460.\n sbits -= u64(1009) << 52;\n scale = reinterpret(sbits);\n return Ox1p1009 * (scale + scale * tmp); // 0x1p1009\n }\n // k < 0, need special care in the subnormal range.\n sbits += u64(1022) << 52;\n // Note: sbits is signed scale.\n scale = reinterpret(sbits);\n let y = scale + scale * tmp;\n if (abs(y) < 1.0) {\n // Round y to the right precision before scaling it into the subnormal\n // range to avoid double rounding that can cause 0.5+E/2 ulp error where\n // E is the worst-case ulp error outside the subnormal range. So this\n // is only useful if the goal is better than 1 ulp worst-case error.\n let one = copysign(1.0, y);\n let lo = scale - y + scale * tmp;\n let hi = one + y;\n lo = one - hi + y + lo;\n y = (hi + lo) - one;\n // Fix the sign of 0.\n if (y == 0.0) y = reinterpret(sbits & 0x8000000000000000);\n }\n return y * Ox1p_1022;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function exp_lut(x: f64): f64 {\n const\n N = 1 << EXP_TABLE_BITS,\n N_MASK = N - 1;\n\n const\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep0\n NegLn2hiN = reinterpret(0xBF762E42FEFA0000), // -0x1.62e42fefa0000p-8\n NegLn2loN = reinterpret(0xBD0CF79ABC9E3B3A), // -0x1.cf79abc9e3b3ap-47\n shift = reinterpret(0x4338000000000000); // 0x1.8p52;\n\n const\n C2 = reinterpret(0x3FDFFFFFFFFFFDBD), // __exp_data.poly[0] (0x1.ffffffffffdbdp-2)\n C3 = reinterpret(0x3FC555555555543C), // __exp_data.poly[1] (0x1.555555555543cp-3)\n C4 = reinterpret(0x3FA55555CF172B91), // __exp_data.poly[2] (0x1.55555cf172b91p-5)\n C5 = reinterpret(0x3F81111167A4D017); // __exp_data.poly[3] (0x1.1111167a4d017p-7)\n\n let ux = reinterpret(x);\n let abstop = u32(ux >> 52) & 0x7FF;\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) return 1;\n if (abstop >= 0x409) {\n if (ux == 0xFFF0000000000000) return 0;\n if (abstop >= 0x7FF) {\n return 1.0 + x;\n } else {\n return select(0, Infinity, ux < 0);\n }\n }\n // Large x is special cased below.\n abstop = 0;\n }\n\n // exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)]\n // x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N]\n let z = InvLn2N * x;\n // #if TOINT_INTRINSICS\n // \tkd = roundtoint(z);\n // \tki = converttoint(z);\n // #elif EXP_USE_TOINT_NARROW\n // \t// z - kd is in [-0.5-2^-16, 0.5] in all rounding modes.\n // let kd = z + shift;\n // let ki = reinterpret(kd) >> 16;\n // let kd = ki;\n // #else\n // z - kd is in [-1, 1] in non-nearest rounding modes.\n let kd = z + shift;\n let ki = reinterpret(kd);\n kd -= shift;\n // #endif\n let r = x + kd * NegLn2hiN + kd * NegLn2loN;\n // 2^(k/N) ~= scale * (1 + tail).\n let idx = usize((ki & N_MASK) << 1);\n let top = ki << (52 - EXP_TABLE_BITS);\n\n let tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof()))); // T[idx]\n // This is only a valid scale when -1023*N < k < 1024*N\n let sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top; // T[idx + 1]\n // exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1).\n // Evaluation is optimized assuming superscalar pipelined execution.\n let r2 = r * r;\n // Without fma the worst case error is 0.25/N ulp larger.\n // Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp.\n let tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase(tmp, sbits, ki);\n let scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-200 and scale > 2^-739, so there\n // is no spurious underflow here even without fma.\n return scale + scale * tmp;\n}\n\n//\n// Lookup data for exp2. See: https://git.musl-libc.org/cgit/musl/tree/src/math/exp2.c\n//\n\n// Handle cases that may overflow or underflow when computing the result that\n// is scale*(1+TMP) without intermediate rounding. The bit representation of\n// scale is in SBITS, however it has a computed exponent that may have\n// overflown into the sign bit so that needs to be adjusted before using it as\n// a double. (int32_t)KI is the k used in the argument reduction and exponent\n// adjustment of scale, positive k here means the result may overflow and\n// negative k means the result may underflow.\n// @ts-ignore: decorator\n@inline\nfunction specialcase2(tmp: f64, sbits: u64, ki: u64): f64 {\n const Ox1p_1022 = reinterpret(0x10000000000000); // 0x1p-1022\n let scale: f64;\n if ((ki & 0x80000000) == 0) {\n // k > 0, the exponent of scale might have overflowed by 1\n sbits -= u64(1) << 52;\n scale = reinterpret(sbits);\n return 2 * (scale * tmp + scale);\n }\n // k < 0, need special care in the subnormal range\n sbits += u64(1022) << 52;\n scale = reinterpret(sbits);\n let y = scale * tmp + scale;\n if (y < 1.0) {\n // Round y to the right precision before scaling it into the subnormal\n // range to avoid double rounding that can cause 0.5+E/2 ulp error where\n // E is the worst-case ulp error outside the subnormal range. So this\n // is only useful if the goal is better than 1 ulp worst-case error.\n let hi: f64, lo: f64;\n lo = scale - y + scale * tmp;\n hi = 1.0 + y;\n lo = 1.0 - hi + y + lo;\n y = (hi + lo) - 1.0;\n }\n return y * Ox1p_1022;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function exp2_lut(x: f64): f64 {\n const\n N = 1 << EXP_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N; // 0x1.8p52\n\n const\n C1 = reinterpret(0x3FE62E42FEFA39EF), // 0x1.62e42fefa39efp-1\n C2 = reinterpret(0x3FCEBFBDFF82C424), // 0x1.ebfbdff82c424p-3\n C3 = reinterpret(0x3FAC6B08D70CF4B5), // 0x1.c6b08d70cf4b5p-5\n C4 = reinterpret(0x3F83B2ABD24650CC), // 0x1.3b2abd24650ccp-7\n C5 = reinterpret(0x3F55D7E09B4E3A84); // 0x1.5d7e09b4e3a84p-10\n\n let ux = reinterpret(x);\n let abstop = u32(ux >> 52) & 0x7ff;\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) return 1.0;\n if (abstop >= 0x409) {\n if (ux == 0xFFF0000000000000) return 0;\n if (abstop >= 0x7FF) return 1.0 + x;\n if (ux >= 0) return Infinity;\n else if (ux >= 0xC090CC0000000000) return 0;\n }\n if ((ux << 1) > 0x811A000000000000) abstop = 0; // Large x is special cased below.\n }\n\n // exp2(x) = 2^(k/N) * 2^r, with 2^r in [2^(-1/2N),2^(1/2N)].\n // x = k/N + r, with int k and r in [-1/2N, 1/2N]\n let kd = x + shift;\n let ki = reinterpret(kd);\n kd -= shift; // k/N for int k\n let r = x - kd;\n // 2^(k/N) ~= scale * (1 + tail)\n let idx = usize((ki & N_MASK) << 1);\n let top = ki << (52 - EXP_TABLE_BITS);\n\n let tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof()), 0 << alignof())); // T[idx])\n // This is only a valid scale when -1023*N < k < 1024*N\n let sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top; // T[idx + 1]\n // exp2(x) = 2^(k/N) * 2^r ~= scale + scale * (tail + 2^r - 1).\n // Evaluation is optimized assuming superscalar pipelined execution\n let r2 = r * r;\n // Without fma the worst case error is 0.5/N ulp larger.\n // Worst case error is less than 0.5+0.86/N+(abs poly error * 2^53) ulp.\n let tmp = tail + r * C1 + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase2(tmp, sbits, ki);\n let scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-65 and scale > 2^-928, so there\n // is no spurious underflow here even without fma.\n return scale * tmp + scale;\n}\n\n//\n// Lookup data for log2. See: https://git.musl-libc.org/cgit/musl/tree/src/math/log2.c\n//\n\n// @ts-ignore: decorator\n@inline const LOG2_TABLE_BITS = 6;\n\n/* Algorithm:\n\n x = 2^k z\n log2(x) = k + log2(c) + log2(z/c)\n log2(z/c) = poly(z/c - 1)\n\nwhere z is in [1.6p-1; 1.6p0] which is split into N subintervals and z falls\ninto the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = (double)log2(c)\n tab2[i].chi = (double)c\n tab2[i].clo = (double)(c - (double)c)\n\nwhere c is near the center of the subinterval and is chosen by trying +-2^29\nfloating point invc candidates around 1/center and selecting one for which\n\n 1) the rounding error in 0x1.8p10 + logc is 0,\n 2) the rounding error in z - chi - clo is < 0x1p-64 and\n 3) the rounding error in (double)log2(c) is minimized (< 0x1p-68).\n\nNote: 1) ensures that k + logc can be computed without rounding error, 2)\nensures that z/c - 1 can be computed as (z - chi - clo)*invc with close to a\nsingle rounding error when there is no fast fma for z*invc - 1, 3) ensures\nthat logc + poly(z/c - 1) has small error, however near x == 1 when\n|log2(x)| < 0x1p-4, this is not enough so that is special cased. */\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2_DATA_TAB1 = memory.data([\n // invc , logc\n 0x3FF724286BB1ACF8, 0xBFE1095FEECDB000,\n 0x3FF6E1F766D2CCA1, 0xBFE08494BD76D000,\n 0x3FF6A13D0E30D48A, 0xBFE00143AEE8F800,\n 0x3FF661EC32D06C85, 0xBFDEFEC5360B4000,\n 0x3FF623FA951198F8, 0xBFDDFDD91AB7E000,\n 0x3FF5E75BA4CF026C, 0xBFDCFFAE0CC79000,\n 0x3FF5AC055A214FB8, 0xBFDC043811FDA000,\n 0x3FF571ED0F166E1E, 0xBFDB0B67323AE000,\n 0x3FF53909590BF835, 0xBFDA152F5A2DB000,\n 0x3FF5014FED61ADDD, 0xBFD9217F5AF86000,\n 0x3FF4CAB88E487BD0, 0xBFD8304DB0719000,\n 0x3FF49539B4334FEE, 0xBFD74189F9A9E000,\n 0x3FF460CBDFAFD569, 0xBFD6552BB5199000,\n 0x3FF42D664EE4B953, 0xBFD56B23A29B1000,\n 0x3FF3FB01111DD8A6, 0xBFD483650F5FA000,\n 0x3FF3C995B70C5836, 0xBFD39DE937F6A000,\n 0x3FF3991C4AB6FD4A, 0xBFD2BAA1538D6000,\n 0x3FF3698E0CE099B5, 0xBFD1D98340CA4000,\n 0x3FF33AE48213E7B2, 0xBFD0FA853A40E000,\n 0x3FF30D191985BDB1, 0xBFD01D9C32E73000,\n 0x3FF2E025CAB271D7, 0xBFCE857DA2FA6000,\n 0x3FF2B404CF13CD82, 0xBFCCD3C8633D8000,\n 0x3FF288B02C7CCB50, 0xBFCB26034C14A000,\n 0x3FF25E2263944DE5, 0xBFC97C1C2F4FE000,\n 0x3FF234563D8615B1, 0xBFC7D6023F800000,\n 0x3FF20B46E33EAF38, 0xBFC633A71A05E000,\n 0x3FF1E2EEFDCDA3DD, 0xBFC494F5E9570000,\n 0x3FF1BB4A580B3930, 0xBFC2F9E424E0A000,\n 0x3FF19453847F2200, 0xBFC162595AFDC000,\n 0x3FF16E06C0D5D73C, 0xBFBF9C9A75BD8000,\n 0x3FF1485F47B7E4C2, 0xBFBC7B575BF9C000,\n 0x3FF12358AD0085D1, 0xBFB960C60FF48000,\n 0x3FF0FEF00F532227, 0xBFB64CE247B60000,\n 0x3FF0DB2077D03A8F, 0xBFB33F78B2014000,\n 0x3FF0B7E6D65980D9, 0xBFB0387D1A42C000,\n 0x3FF0953EFE7B408D, 0xBFAA6F9208B50000,\n 0x3FF07325CAC53B83, 0xBFA47A954F770000,\n 0x3FF05197E40D1B5C, 0xBF9D23A8C50C0000,\n 0x3FF03091C1208EA2, 0xBF916A2629780000,\n 0x3FF0101025B37E21, 0xBF7720F8D8E80000,\n 0x3FEFC07EF9CAA76B, 0x3F86FE53B1500000,\n 0x3FEF4465D3F6F184, 0x3FA11CCCE10F8000,\n 0x3FEECC079F84107F, 0x3FAC4DFC8C8B8000,\n 0x3FEE573A99975AE8, 0x3FB3AA321E574000,\n 0x3FEDE5D6F0BD3DE6, 0x3FB918A0D08B8000,\n 0x3FED77B681FF38B3, 0x3FBE72E9DA044000,\n 0x3FED0CB5724DE943, 0x3FC1DCD2507F6000,\n 0x3FECA4B2DC0E7563, 0x3FC476AB03DEA000,\n 0x3FEC3F8EE8D6CB51, 0x3FC7074377E22000,\n 0x3FEBDD2B4F020C4C, 0x3FC98EDE8BA94000,\n 0x3FEB7D6C006015CA, 0x3FCC0DB86AD2E000,\n 0x3FEB20366E2E338F, 0x3FCE840AAFCEE000,\n 0x3FEAC57026295039, 0x3FD0790AB4678000,\n 0x3FEA6D01BC2731DD, 0x3FD1AC056801C000,\n 0x3FEA16D3BC3FF18B, 0x3FD2DB11D4FEE000,\n 0x3FE9C2D14967FEAD, 0x3FD406464EC58000,\n 0x3FE970E4F47C9902, 0x3FD52DBE093AF000,\n 0x3FE920FB3982BCF2, 0x3FD651902050D000,\n 0x3FE8D30187F759F1, 0x3FD771D2CDEAF000,\n 0x3FE886E5EBB9F66D, 0x3FD88E9C857D9000,\n 0x3FE83C97B658B994, 0x3FD9A80155E16000,\n 0x3FE7F405FFC61022, 0x3FDABE186ED3D000,\n 0x3FE7AD22181415CA, 0x3FDBD0F2AEA0E000,\n 0x3FE767DCF99EFF8C, 0x3FDCE0A43DBF4000\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2_DATA_TAB2 = memory.data([\n // chi , clo\n 0x3FE6200012B90A8E, 0x3C8904AB0644B605,\n 0x3FE66000045734A6, 0x3C61FF9BEA62F7A9,\n 0x3FE69FFFC325F2C5, 0x3C827ECFCB3C90BA,\n 0x3FE6E00038B95A04, 0x3C88FF8856739326,\n 0x3FE71FFFE09994E3, 0x3C8AFD40275F82B1,\n 0x3FE7600015590E10, 0xBC72FD75B4238341,\n 0x3FE7A00012655BD5, 0x3C7808E67C242B76,\n 0x3FE7E0003259E9A6, 0xBC6208E426F622B7,\n 0x3FE81FFFEDB4B2D2, 0xBC8402461EA5C92F,\n 0x3FE860002DFAFCC3, 0x3C6DF7F4A2F29A1F,\n 0x3FE89FFFF78C6B50, 0xBC8E0453094995FD,\n 0x3FE8E00039671566, 0xBC8A04F3BEC77B45,\n 0x3FE91FFFE2BF1745, 0xBC77FA34400E203C,\n 0x3FE95FFFCC5C9FD1, 0xBC76FF8005A0695D,\n 0x3FE9A0003BBA4767, 0x3C70F8C4C4EC7E03,\n 0x3FE9DFFFE7B92DA5, 0x3C8E7FD9478C4602,\n 0x3FEA1FFFD72EFDAF, 0xBC6A0C554DCDAE7E,\n 0x3FEA5FFFDE04FF95, 0x3C867DA98CE9B26B,\n 0x3FEA9FFFCA5E8D2B, 0xBC8284C9B54C13DE,\n 0x3FEADFFFDDAD03EA, 0x3C5812C8EA602E3C,\n 0x3FEB1FFFF10D3D4D, 0xBC8EFADDAD27789C,\n 0x3FEB5FFFCE21165A, 0x3C53CB1719C61237,\n 0x3FEB9FFFD950E674, 0x3C73F7D94194CE00,\n 0x3FEBE000139CA8AF, 0x3C750AC4215D9BC0,\n 0x3FEC20005B46DF99, 0x3C6BEEA653E9C1C9,\n 0x3FEC600040B9F7AE, 0xBC7C079F274A70D6,\n 0x3FECA0006255FD8A, 0xBC7A0B4076E84C1F,\n 0x3FECDFFFD94C095D, 0x3C88F933F99AB5D7,\n 0x3FED1FFFF975D6CF, 0xBC582C08665FE1BE,\n 0x3FED5FFFA2561C93, 0xBC7B04289BD295F3,\n 0x3FED9FFF9D228B0C, 0x3C870251340FA236,\n 0x3FEDE00065BC7E16, 0xBC75011E16A4D80C,\n 0x3FEE200002F64791, 0x3C89802F09EF62E0,\n 0x3FEE600057D7A6D8, 0xBC7E0B75580CF7FA,\n 0x3FEEA00027EDC00C, 0xBC8C848309459811,\n 0x3FEEE0006CF5CB7C, 0xBC8F8027951576F4,\n 0x3FEF2000782B7DCC, 0xBC8F81D97274538F,\n 0x3FEF6000260C450A, 0xBC4071002727FFDC,\n 0x3FEF9FFFE88CD533, 0xBC581BDCE1FDA8B0,\n 0x3FEFDFFFD50F8689, 0x3C87F91ACB918E6E,\n 0x3FF0200004292367, 0x3C9B7FF365324681,\n 0x3FF05FFFE3E3D668, 0x3C86FA08DDAE957B,\n 0x3FF0A0000A85A757, 0xBC57E2DE80D3FB91,\n 0x3FF0E0001A5F3FCC, 0xBC91823305C5F014,\n 0x3FF11FFFF8AFBAF5, 0xBC8BFABB6680BAC2,\n 0x3FF15FFFE54D91AD, 0xBC9D7F121737E7EF,\n 0x3FF1A00011AC36E1, 0x3C9C000A0516F5FF,\n 0x3FF1E00019C84248, 0xBC9082FBE4DA5DA0,\n 0x3FF220000FFE5E6E, 0xBC88FDD04C9CFB43,\n 0x3FF26000269FD891, 0x3C8CFE2A7994D182,\n 0x3FF2A00029A6E6DA, 0xBC700273715E8BC5,\n 0x3FF2DFFFE0293E39, 0x3C9B7C39DAB2A6F9,\n 0x3FF31FFFF7DCF082, 0x3C7DF1336EDC5254,\n 0x3FF35FFFF05A8B60, 0xBC9E03564CCD31EB,\n 0x3FF3A0002E0EAECC, 0x3C75F0E74BD3A477,\n 0x3FF3E000043BB236, 0x3C9C7DCB149D8833,\n 0x3FF4200002D187FF, 0x3C7E08AFCF2D3D28,\n 0x3FF460000D387CB1, 0x3C820837856599A6,\n 0x3FF4A00004569F89, 0xBC89FA5C904FBCD2,\n 0x3FF4E000043543F3, 0xBC781125ED175329,\n 0x3FF51FFFCC027F0F, 0x3C9883D8847754DC,\n 0x3FF55FFFFD87B36F, 0xBC8709E731D02807,\n 0x3FF59FFFF21DF7BA, 0x3C87F79F68727B02,\n 0x3FF5DFFFEBFC3481, 0xBC9180902E30E93E\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function log2_lut(x: f64): f64 {\n const N_MASK = (1 << LOG2_TABLE_BITS) - 1;\n\n const\n LO: u64 = 0x3FEEA4AF00000000, // reinterpret(1.0 - 0x1.5b51p-5)\n HI: u64 = 0x3FF0B55900000000; // reinterpret(1.0 + 0x1.6ab2p-5)\n\n const\n InvLn2hi = reinterpret(0x3FF7154765200000), // 0x1.7154765200000p+0\n InvLn2lo = reinterpret(0x3DE705FC2EEFA200), // 0x1.705fc2eefa200p-33\n Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n const\n B0 = reinterpret(0xBFE71547652B82FE), // -0x1.71547652b82fep-1\n B1 = reinterpret(0x3FDEC709DC3A03F7), // 0x1.ec709dc3a03f7p-2\n B2 = reinterpret(0xBFD71547652B7C3F), // -0x1.71547652b7c3fp-2\n B3 = reinterpret(0x3FD2776C50F05BE4), // 0x1.2776c50f05be4p-2\n B4 = reinterpret(0xBFCEC709DD768FE5), // -0x1.ec709dd768fe5p-3\n B5 = reinterpret(0x3FCA61761EC4E736), // 0x1.a61761ec4e736p-3\n B6 = reinterpret(0xBFC7153FBC64A79B), // -0x1.7153fbc64a79bp-3\n B7 = reinterpret(0x3FC484D154F01B4A), // 0x1.484d154f01b4ap-3\n B8 = reinterpret(0xBFC289E4A72C383C), // -0x1.289e4a72c383cp-3\n B9 = reinterpret(0x3FC0B32F285AEE66); // 0x1.0b32f285aee66p-3\n\n const\n A0 = reinterpret(0xBFE71547652B8339), // -0x1.71547652b8339p-1\n A1 = reinterpret(0x3FDEC709DC3A04BE), // 0x1.ec709dc3a04bep-2\n A2 = reinterpret(0xBFD7154764702FFB), // -0x1.7154764702ffbp-2\n A3 = reinterpret(0x3FD2776C50034C48), // 0x1.2776c50034c48p-2\n A4 = reinterpret(0xBFCEC7B328EA92BC), // -0x1.ec7b328ea92bcp-3\n A5 = reinterpret(0x3FCA6225E117F92E); // 0x1.a6225e117f92ep-3\n\n let ix = reinterpret(x);\n if (ix - LO < HI - LO) {\n let r = x - 1.0;\n // #if __FP_FAST_FMA\n // hi = r * InvLn2hi;\n // lo = r * InvLn2lo + __builtin_fma(r, InvLn2hi, -hi);\n // #else\n let rhi = reinterpret(reinterpret(r) & 0xFFFFFFFF00000000);\n let rlo = r - rhi;\n let hi = rhi * InvLn2hi;\n let lo = rlo * InvLn2hi + r * InvLn2lo;\n // #endif\n let r2 = r * r; // rounding error: 0x1p-62\n let r4 = r2 * r2;\n // Worst-case error is less than 0.54 ULP (0.55 ULP without fma)\n let p = r2 * (B0 + r * B1);\n let y = hi + p;\n lo += hi - y + p;\n lo += r4 * (B2 + r * B3 + r2 * (B4 + r * B5) +\n r4 * (B6 + r * B7 + r2 * (B8 + r * B9)));\n return y + lo;\n }\n let top = u32(ix >> 48);\n if (top - 0x0010 >= 0x7ff0 - 0x0010) {\n // x < 0x1p-1022 or inf or nan.\n if ((ix << 1) == 0) return -1.0 / (x * x);\n if (ix == 0x7FF0000000000000) return x; // log(inf) == inf\n if ((top & 0x8000) || (top & 0x7FF0) == 0x7FF0) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ix = reinterpret(x * Ox1p52);\n ix -= u64(52) << 52;\n }\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ix - 0x3FE6000000000000;\n let i = ((tmp >> (52 - LOG2_TABLE_BITS)) & N_MASK);\n let k = tmp >> 52;\n let iz = ix - (tmp & 0xFFF0000000000000);\n\n let invc = load(LOG2_DATA_TAB1 + (i << (1 + alignof())), 0 << alignof()); // T[i].invc;\n let logc = load(LOG2_DATA_TAB1 + (i << (1 + alignof())), 1 << alignof()); // T[i].logc;\n let z = reinterpret(iz);\n let kd = k;\n\n // log2(x) = log2(z/c) + log2(c) + k.\n // r ~= z/c - 1, |r| < 1/(2*N).\n // #if __FP_FAST_FMA\n // \t// rounding error: 0x1p-55/N.\n // \tr = __builtin_fma(z, invc, -1.0);\n // \tt1 = r * InvLn2hi;\n // \tt2 = r * InvLn2lo + __builtin_fma(r, InvLn2hi, -t1);\n // #else\n // rounding error: 0x1p-55/N + 0x1p-65.\n let chi = load(LOG2_DATA_TAB2 + (i << (1 + alignof())), 0 << alignof()); // T[i].chi;\n let clo = load(LOG2_DATA_TAB2 + (i << (1 + alignof())), 1 << alignof()); // T[i].clo;\n\n let r = (z - chi - clo) * invc;\n let rhi = reinterpret(reinterpret(r) & 0xFFFFFFFF00000000);\n let rlo = r - rhi;\n let t1 = rhi * InvLn2hi;\n let t2 = rlo * InvLn2hi + r * InvLn2lo;\n // #endif\n\n // hi + lo = r/ln2 + log2(c) + k\n let t3 = kd + logc;\n let hi = t3 + t1;\n let lo = t3 - hi + t1 + t2;\n\n // log2(r+1) = r/ln2 + r^2*poly(r)\n // Evaluation is optimized assuming superscalar pipelined execution\n let r2 = r * r; // rounding error: 0x1p-54/N^2\n // Worst-case error if |y| > 0x1p-4: 0.547 ULP (0.550 ULP without fma).\n // ~ 0.5 + 2/N/ln2 + abs-poly-error*0x1p56 ULP (+ 0.003 ULP without fma).\n let p = A0 + r * A1 + r2 * (A2 + r * A3) + (r2 * r2) * (A4 + r * A5);\n return lo + r2 * p + hi;\n}\n\n//\n// Lookup data for log. See: https://git.musl-libc.org/cgit/musl/tree/src/math/log.c\n//\n\n// @ts-ignore: decorator\n@inline const LOG_TABLE_BITS = 7;\n\n/* Algorithm:\n\n x = 2^k z\n log(x) = k ln2 + log(c) + log(z/c)\n log(z/c) = poly(z/c - 1)\n\nwhere z is in [1.6p-1; 1.6p0] which is split into N subintervals and z falls\ninto the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = (double)log(c)\n tab2[i].chi = (double)c\n tab2[i].clo = (double)(c - (double)c)\n\nwhere c is near the center of the subinterval and is chosen by trying +-2^29\nfloating point invc candidates around 1/center and selecting one for which\n\n 1) the rounding error in 0x1.8p9 + logc is 0,\n 2) the rounding error in z - chi - clo is < 0x1p-66 and\n 3) the rounding error in (double)log(c) is minimized (< 0x1p-66).\n\nNote: 1) ensures that k*ln2hi + logc can be computed without rounding error,\n2) ensures that z/c - 1 can be computed as (z - chi - clo)*invc with close to\na single rounding error when there is no fast fma for z*invc - 1, 3) ensures\nthat logc + poly(z/c - 1) has small error, however near x == 1 when\n|log(x)| < 0x1p-4, this is not enough so that is special cased.*/\n\n// @ts-ignore: decorator\n@lazy @inline const LOG_DATA_TAB1 = memory.data([\n // invc , logc\n 0x3FF734F0C3E0DE9F, 0xBFD7CC7F79E69000,\n 0x3FF713786A2CE91F, 0xBFD76FEEC20D0000,\n 0x3FF6F26008FAB5A0, 0xBFD713E31351E000,\n 0x3FF6D1A61F138C7D, 0xBFD6B85B38287800,\n 0x3FF6B1490BC5B4D1, 0xBFD65D5590807800,\n 0x3FF69147332F0CBA, 0xBFD602D076180000,\n 0x3FF6719F18224223, 0xBFD5A8CA86909000,\n 0x3FF6524F99A51ED9, 0xBFD54F4356035000,\n 0x3FF63356AA8F24C4, 0xBFD4F637C36B4000,\n 0x3FF614B36B9DDC14, 0xBFD49DA7FDA85000,\n 0x3FF5F66452C65C4C, 0xBFD445923989A800,\n 0x3FF5D867B5912C4F, 0xBFD3EDF439B0B800,\n 0x3FF5BABCCB5B90DE, 0xBFD396CE448F7000,\n 0x3FF59D61F2D91A78, 0xBFD3401E17BDA000,\n 0x3FF5805612465687, 0xBFD2E9E2EF468000,\n 0x3FF56397CEE76BD3, 0xBFD2941B3830E000,\n 0x3FF54725E2A77F93, 0xBFD23EC58CDA8800,\n 0x3FF52AFF42064583, 0xBFD1E9E129279000,\n 0x3FF50F22DBB2BDDF, 0xBFD1956D2B48F800,\n 0x3FF4F38F4734DED7, 0xBFD141679AB9F800,\n 0x3FF4D843CFDE2840, 0xBFD0EDD094EF9800,\n 0x3FF4BD3EC078A3C8, 0xBFD09AA518DB1000,\n 0x3FF4A27FC3E0258A, 0xBFD047E65263B800,\n 0x3FF4880524D48434, 0xBFCFEB224586F000,\n 0x3FF46DCE1B192D0B, 0xBFCF474A7517B000,\n 0x3FF453D9D3391854, 0xBFCEA4443D103000,\n 0x3FF43A2744B4845A, 0xBFCE020D44E9B000,\n 0x3FF420B54115F8FB, 0xBFCD60A22977F000,\n 0x3FF40782DA3EF4B1, 0xBFCCC00104959000,\n 0x3FF3EE8F5D57FE8F, 0xBFCC202956891000,\n 0x3FF3D5D9A00B4CE9, 0xBFCB81178D811000,\n 0x3FF3BD60C010C12B, 0xBFCAE2C9CCD3D000,\n 0x3FF3A5242B75DAB8, 0xBFCA45402E129000,\n 0x3FF38D22CD9FD002, 0xBFC9A877681DF000,\n 0x3FF3755BC5847A1C, 0xBFC90C6D69483000,\n 0x3FF35DCE49AD36E2, 0xBFC87120A645C000,\n 0x3FF34679984DD440, 0xBFC7D68FB4143000,\n 0x3FF32F5CCEFFCB24, 0xBFC73CB83C627000,\n 0x3FF3187775A10D49, 0xBFC6A39A9B376000,\n 0x3FF301C8373E3990, 0xBFC60B3154B7A000,\n 0x3FF2EB4EBB95F841, 0xBFC5737D76243000,\n 0x3FF2D50A0219A9D1, 0xBFC4DC7B8FC23000,\n 0x3FF2BEF9A8B7FD2A, 0xBFC4462C51D20000,\n 0x3FF2A91C7A0C1BAB, 0xBFC3B08ABC830000,\n 0x3FF293726014B530, 0xBFC31B996B490000,\n 0x3FF27DFA5757A1F5, 0xBFC2875490A44000,\n 0x3FF268B39B1D3BBF, 0xBFC1F3B9F879A000,\n 0x3FF2539D838FF5BD, 0xBFC160C8252CA000,\n 0x3FF23EB7AAC9083B, 0xBFC0CE7F57F72000,\n 0x3FF22A012BA940B6, 0xBFC03CDC49FEA000,\n 0x3FF2157996CC4132, 0xBFBF57BDBC4B8000,\n 0x3FF201201DD2FC9B, 0xBFBE370896404000,\n 0x3FF1ECF4494D480B, 0xBFBD17983EF94000,\n 0x3FF1D8F5528F6569, 0xBFBBF9674ED8A000,\n 0x3FF1C52311577E7C, 0xBFBADC79202F6000,\n 0x3FF1B17C74CB26E9, 0xBFB9C0C3E7288000,\n 0x3FF19E010C2C1AB6, 0xBFB8A646B372C000,\n 0x3FF18AB07BB670BD, 0xBFB78D01B3AC0000,\n 0x3FF1778A25EFBCB6, 0xBFB674F145380000,\n 0x3FF1648D354C31DA, 0xBFB55E0E6D878000,\n 0x3FF151B990275FDD, 0xBFB4485CDEA1E000,\n 0x3FF13F0EA432D24C, 0xBFB333D94D6AA000,\n 0x3FF12C8B7210F9DA, 0xBFB22079F8C56000,\n 0x3FF11A3028ECB531, 0xBFB10E4698622000,\n 0x3FF107FBDA8434AF, 0xBFAFFA6C6AD20000,\n 0x3FF0F5EE0F4E6BB3, 0xBFADDA8D4A774000,\n 0x3FF0E4065D2A9FCE, 0xBFABBCECE4850000,\n 0x3FF0D244632CA521, 0xBFA9A1894012C000,\n 0x3FF0C0A77CE2981A, 0xBFA788583302C000,\n 0x3FF0AF2F83C636D1, 0xBFA5715E67D68000,\n 0x3FF09DDB98A01339, 0xBFA35C8A49658000,\n 0x3FF08CABAF52E7DF, 0xBFA149E364154000,\n 0x3FF07B9F2F4E28FB, 0xBF9E72C082EB8000,\n 0x3FF06AB58C358F19, 0xBF9A55F152528000,\n 0x3FF059EEA5ECF92C, 0xBF963D62CF818000,\n 0x3FF04949CDD12C90, 0xBF9228FB8CAA0000,\n 0x3FF038C6C6F0ADA9, 0xBF8C317B20F90000,\n 0x3FF02865137932A9, 0xBF8419355DAA0000,\n 0x3FF0182427EA7348, 0xBF781203C2EC0000,\n 0x3FF008040614B195, 0xBF60040979240000,\n 0x3FEFE01FF726FA1A, 0x3F6FEFF384900000,\n 0x3FEFA11CC261EA74, 0x3F87DC41353D0000,\n 0x3FEF6310B081992E, 0x3F93CEA3C4C28000,\n 0x3FEF25F63CEEADCD, 0x3F9B9FC114890000,\n 0x3FEEE9C8039113E7, 0x3FA1B0D8CE110000,\n 0x3FEEAE8078CBB1AB, 0x3FA58A5BD001C000,\n 0x3FEE741AA29D0C9B, 0x3FA95C8340D88000,\n 0x3FEE3A91830A99B5, 0x3FAD276AEF578000,\n 0x3FEE01E009609A56, 0x3FB07598E598C000,\n 0x3FEDCA01E577BB98, 0x3FB253F5E30D2000,\n 0x3FED92F20B7C9103, 0x3FB42EDD8B380000,\n 0x3FED5CAC66FB5CCE, 0x3FB606598757C000,\n 0x3FED272CAA5EDE9D, 0x3FB7DA76356A0000,\n 0x3FECF26E3E6B2CCD, 0x3FB9AB434E1C6000,\n 0x3FECBE6DA2A77902, 0x3FBB78C7BB0D6000,\n 0x3FEC8B266D37086D, 0x3FBD431332E72000,\n 0x3FEC5894BD5D5804, 0x3FBF0A3171DE6000,\n 0x3FEC26B533BB9F8C, 0x3FC067152B914000,\n 0x3FEBF583EEECE73F, 0x3FC147858292B000,\n 0x3FEBC4FD75DB96C1, 0x3FC2266ECDCA3000,\n 0x3FEB951E0C864A28, 0x3FC303D7A6C55000,\n 0x3FEB65E2C5EF3E2C, 0x3FC3DFC33C331000,\n 0x3FEB374867C9888B, 0x3FC4BA366B7A8000,\n 0x3FEB094B211D304A, 0x3FC5933928D1F000,\n 0x3FEADBE885F2EF7E, 0x3FC66ACD2418F000,\n 0x3FEAAF1D31603DA2, 0x3FC740F8EC669000,\n 0x3FEA82E63FD358A7, 0x3FC815C0F51AF000,\n 0x3FEA5740EF09738B, 0x3FC8E92954F68000,\n 0x3FEA2C2A90AB4B27, 0x3FC9BB3602F84000,\n 0x3FEA01A01393F2D1, 0x3FCA8BED1C2C0000,\n 0x3FE9D79F24DB3C1B, 0x3FCB5B515C01D000,\n 0x3FE9AE2505C7B190, 0x3FCC2967CCBCC000,\n 0x3FE9852EF297CE2F, 0x3FCCF635D5486000,\n 0x3FE95CBAEEA44B75, 0x3FCDC1BD3446C000,\n 0x3FE934C69DE74838, 0x3FCE8C01B8CFE000,\n 0x3FE90D4F2F6752E6, 0x3FCF5509C0179000,\n 0x3FE8E6528EFFD79D, 0x3FD00E6C121FB800,\n 0x3FE8BFCE9FCC007C, 0x3FD071B80E93D000,\n 0x3FE899C0DABEC30E, 0x3FD0D46B9E867000,\n 0x3FE87427AA2317FB, 0x3FD13687334BD000,\n 0x3FE84F00ACB39A08, 0x3FD1980D67234800,\n 0x3FE82A49E8653E55, 0x3FD1F8FFE0CC8000,\n 0x3FE8060195F40260, 0x3FD2595FD7636800,\n 0x3FE7E22563E0A329, 0x3FD2B9300914A800,\n 0x3FE7BEB377DCB5AD, 0x3FD3187210436000,\n 0x3FE79BAA679725C2, 0x3FD377266DEC1800,\n 0x3FE77907F2170657, 0x3FD3D54FFBAF3000,\n 0x3FE756CADBD6130C, 0x3FD432EEE32FE000\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOG_DATA_TAB2 = memory.data([\n // chi , clo\n 0x3FE61000014FB66B, 0x3C7E026C91425B3C,\n 0x3FE63000034DB495, 0x3C8DBFEA48005D41,\n 0x3FE650000D94D478, 0x3C8E7FA786D6A5B7,\n 0x3FE67000074E6FAD, 0x3C61FCEA6B54254C,\n 0x3FE68FFFFEDF0FAE, 0xBC7C7E274C590EFD,\n 0x3FE6B0000763C5BC, 0xBC8AC16848DCDA01,\n 0x3FE6D0001E5CC1F6, 0x3C833F1C9D499311,\n 0x3FE6EFFFEB05F63E, 0xBC7E80041AE22D53,\n 0x3FE710000E869780, 0x3C7BFF6671097952,\n 0x3FE72FFFFC67E912, 0x3C8C00E226BD8724,\n 0x3FE74FFFDF81116A, 0xBC6E02916EF101D2,\n 0x3FE770000F679C90, 0xBC67FC71CD549C74,\n 0x3FE78FFFFA7EC835, 0x3C81BEC19EF50483,\n 0x3FE7AFFFFE20C2E6, 0xBC707E1729CC6465,\n 0x3FE7CFFFED3FC900, 0xBC808072087B8B1C,\n 0x3FE7EFFFE9261A76, 0x3C8DC0286D9DF9AE,\n 0x3FE81000049CA3E8, 0x3C897FD251E54C33,\n 0x3FE8300017932C8F, 0xBC8AFEE9B630F381,\n 0x3FE850000633739C, 0x3C89BFBF6B6535BC,\n 0x3FE87000204289C6, 0xBC8BBF65F3117B75,\n 0x3FE88FFFEBF57904, 0xBC89006EA23DCB57,\n 0x3FE8B00022BC04DF, 0xBC7D00DF38E04B0A,\n 0x3FE8CFFFE50C1B8A, 0xBC88007146FF9F05,\n 0x3FE8EFFFFC918E43, 0x3C83817BD07A7038,\n 0x3FE910001EFA5FC7, 0x3C893E9176DFB403,\n 0x3FE9300013467BB9, 0x3C7F804E4B980276,\n 0x3FE94FFFE6EE076F, 0xBC8F7EF0D9FF622E,\n 0x3FE96FFFDE3C12D1, 0xBC7082AA962638BA,\n 0x3FE98FFFF4458A0D, 0xBC87801B9164A8EF,\n 0x3FE9AFFFDD982E3E, 0xBC8740E08A5A9337,\n 0x3FE9CFFFED49FB66, 0x3C3FCE08C19BE000,\n 0x3FE9F00020F19C51, 0xBC8A3FAA27885B0A,\n 0x3FEA10001145B006, 0x3C74FF489958DA56,\n 0x3FEA300007BBF6FA, 0x3C8CBEAB8A2B6D18,\n 0x3FEA500010971D79, 0x3C88FECADD787930,\n 0x3FEA70001DF52E48, 0xBC8F41763DD8ABDB,\n 0x3FEA90001C593352, 0xBC8EBF0284C27612,\n 0x3FEAB0002A4F3E4B, 0xBC69FD043CFF3F5F,\n 0x3FEACFFFD7AE1ED1, 0xBC823EE7129070B4,\n 0x3FEAEFFFEE510478, 0x3C6A063EE00EDEA3,\n 0x3FEB0FFFDB650D5B, 0x3C5A06C8381F0AB9,\n 0x3FEB2FFFFEAACA57, 0xBC79011E74233C1D,\n 0x3FEB4FFFD995BADC, 0xBC79FF1068862A9F,\n 0x3FEB7000249E659C, 0x3C8AFF45D0864F3E,\n 0x3FEB8FFFF9871640, 0x3C7CFE7796C2C3F9,\n 0x3FEBAFFFD204CB4F, 0xBC63FF27EEF22BC4,\n 0x3FEBCFFFD2415C45, 0xBC6CFFB7EE3BEA21,\n 0x3FEBEFFFF86309DF, 0xBC814103972E0B5C,\n 0x3FEC0FFFE1B57653, 0x3C8BC16494B76A19,\n 0x3FEC2FFFF1FA57E3, 0xBC64FEEF8D30C6ED,\n 0x3FEC4FFFDCBFE424, 0xBC843F68BCEC4775,\n 0x3FEC6FFFED54B9F7, 0x3C847EA3F053E0EC,\n 0x3FEC8FFFEB998FD5, 0x3C7383068DF992F1,\n 0x3FECB0002125219A, 0xBC68FD8E64180E04,\n 0x3FECCFFFDD94469C, 0x3C8E7EBE1CC7EA72,\n 0x3FECEFFFEAFDC476, 0x3C8EBE39AD9F88FE,\n 0x3FED1000169AF82B, 0x3C757D91A8B95A71,\n 0x3FED30000D0FF71D, 0x3C89C1906970C7DA,\n 0x3FED4FFFEA790FC4, 0xBC580E37C558FE0C,\n 0x3FED70002EDC87E5, 0xBC7F80D64DC10F44,\n 0x3FED900021DC82AA, 0xBC747C8F94FD5C5C,\n 0x3FEDAFFFD86B0283, 0x3C8C7F1DC521617E,\n 0x3FEDD000296C4739, 0x3C88019EB2FFB153,\n 0x3FEDEFFFE54490F5, 0x3C6E00D2C652CC89,\n 0x3FEE0FFFCDABF694, 0xBC7F8340202D69D2,\n 0x3FEE2FFFDB52C8DD, 0x3C7B00C1CA1B0864,\n 0x3FEE4FFFF24216EF, 0x3C72FFA8B094AB51,\n 0x3FEE6FFFE88A5E11, 0xBC57F673B1EFBE59,\n 0x3FEE9000119EFF0D, 0xBC84808D5E0BC801,\n 0x3FEEAFFFDFA51744, 0x3C780006D54320B5,\n 0x3FEED0001A127FA1, 0xBC5002F860565C92,\n 0x3FEEF00007BABCC4, 0xBC8540445D35E611,\n 0x3FEF0FFFF57A8D02, 0xBC4FFB3139EF9105,\n 0x3FEF30001EE58AC7, 0x3C8A81ACF2731155,\n 0x3FEF4FFFF5823494, 0x3C8A3F41D4D7C743,\n 0x3FEF6FFFFCA94C6B, 0xBC6202F41C987875,\n 0x3FEF8FFFE1F9C441, 0x3C777DD1F477E74B,\n 0x3FEFAFFFD2E0E37E, 0xBC6F01199A7CA331,\n 0x3FEFD0001C77E49E, 0x3C7181EE4BCEACB1,\n 0x3FEFEFFFF7E0C331, 0xBC6E05370170875A,\n 0x3FF00FFFF465606E, 0xBC8A7EAD491C0ADA,\n 0x3FF02FFFF3867A58, 0xBC977F69C3FCB2E0,\n 0x3FF04FFFFDFC0D17, 0x3C97BFFE34CB945B,\n 0x3FF0700003CD4D82, 0x3C820083C0E456CB,\n 0x3FF08FFFF9F2CBE8, 0xBC6DFFDFBE37751A,\n 0x3FF0B000010CDA65, 0xBC913F7FAEE626EB,\n 0x3FF0D00001A4D338, 0x3C807DFA79489FF7,\n 0x3FF0EFFFFADAFDFD, 0xBC77040570D66BC0,\n 0x3FF110000BBAFD96, 0x3C8E80D4846D0B62,\n 0x3FF12FFFFAE5F45D, 0x3C9DBFFA64FD36EF,\n 0x3FF150000DD59AD9, 0x3C9A0077701250AE,\n 0x3FF170000F21559A, 0x3C8DFDF9E2E3DEEE,\n 0x3FF18FFFFC275426, 0x3C910030DC3B7273,\n 0x3FF1B000123D3C59, 0x3C997F7980030188,\n 0x3FF1CFFFF8299EB7, 0xBC65F932AB9F8C67,\n 0x3FF1EFFFF48AD400, 0x3C937FBF9DA75BEB,\n 0x3FF210000C8B86A4, 0x3C9F806B91FD5B22,\n 0x3FF2300003854303, 0x3C93FFC2EB9FBF33,\n 0x3FF24FFFFFBCF684, 0x3C7601E77E2E2E72,\n 0x3FF26FFFF52921D9, 0x3C7FFCBB767F0C61,\n 0x3FF2900014933A3C, 0xBC7202CA3C02412B,\n 0x3FF2B00014556313, 0xBC92808233F21F02,\n 0x3FF2CFFFEBFE523B, 0xBC88FF7E384FDCF2,\n 0x3FF2F0000BB8AD96, 0xBC85FF51503041C5,\n 0x3FF30FFFFB7AE2AF, 0xBC810071885E289D,\n 0x3FF32FFFFEAC5F7F, 0xBC91FF5D3FB7B715,\n 0x3FF350000CA66756, 0x3C957F82228B82BD,\n 0x3FF3700011FBF721, 0x3C8000BAC40DD5CC,\n 0x3FF38FFFF9592FB9, 0xBC943F9D2DB2A751,\n 0x3FF3B00004DDD242, 0x3C857F6B707638E1,\n 0x3FF3CFFFF5B2C957, 0x3C7A023A10BF1231,\n 0x3FF3EFFFEAB0B418, 0x3C987F6D66B152B0,\n 0x3FF410001532AFF4, 0x3C67F8375F198524,\n 0x3FF4300017478B29, 0x3C8301E672DC5143,\n 0x3FF44FFFE795B463, 0x3C89FF69B8B2895A,\n 0x3FF46FFFE80475E0, 0xBC95C0B19BC2F254,\n 0x3FF48FFFEF6FC1E7, 0x3C9B4009F23A2A72,\n 0x3FF4AFFFE5BEA704, 0xBC94FFB7BF0D7D45,\n 0x3FF4D000171027DE, 0xBC99C06471DC6A3D,\n 0x3FF4F0000FF03EE2, 0x3C977F890B85531C,\n 0x3FF5100012DC4BD1, 0x3C6004657166A436,\n 0x3FF530001605277A, 0xBC96BFCECE233209,\n 0x3FF54FFFECDB704C, 0xBC8902720505A1D7,\n 0x3FF56FFFEF5F54A9, 0x3C9BBFE60EC96412,\n 0x3FF5900017E61012, 0x3C887EC581AFEF90,\n 0x3FF5B00003C93E92, 0xBC9F41080ABF0CC0,\n 0x3FF5D0001D4919BC, 0xBC98812AFB254729,\n 0x3FF5EFFFE7B87A89, 0xBC947EB780ED6904\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function log_lut(x: f64): f64 {\n const N_MASK = (1 << LOG_TABLE_BITS) - 1;\n\n const\n B0 = reinterpret(0xBFE0000000000000), // -0x1p-1\n B1 = reinterpret(0x3FD5555555555577), // 0x1.5555555555577p-2\n B2 = reinterpret(0xBFCFFFFFFFFFFDCB), // -0x1.ffffffffffdcbp-3\n B3 = reinterpret(0x3FC999999995DD0C), // 0x1.999999995dd0cp-3\n B4 = reinterpret(0xBFC55555556745A7), // -0x1.55555556745a7p-3\n B5 = reinterpret(0x3FC24924A344DE30), // 0x1.24924a344de3p-3\n B6 = reinterpret(0xBFBFFFFFA4423D65), // -0x1.fffffa4423d65p-4\n B7 = reinterpret(0x3FBC7184282AD6CA), // 0x1.c7184282ad6cap-4\n B8 = reinterpret(0xBFB999EB43B068FF), // -0x1.999eb43b068ffp-4\n B9 = reinterpret(0x3FB78182F7AFD085), // 0x1.78182f7afd085p-4\n B10 = reinterpret(0xBFB5521375D145CD); // -0x1.5521375d145cdp-4\n\n const\n A0 = reinterpret(0xBFE0000000000001), // -0x1.0000000000001p-1\n A1 = reinterpret(0x3FD555555551305B), // 0x1.555555551305bp-2\n A2 = reinterpret(0xBFCFFFFFFFEB4590), // -0x1.fffffffeb459p-3\n A3 = reinterpret(0x3FC999B324F10111), // 0x1.999b324f10111p-3\n A4 = reinterpret(0xBFC55575E506C89F); // -0x1.55575e506c89fp-3\n\n const\n LO: u64 = 0x3FEE000000000000,\n HI: u64 = 0x3FF1090000000000;\n\n const\n Ln2hi = reinterpret(0x3FE62E42FEFA3800), // 0x1.62e42fefa3800p-1\n Ln2lo = reinterpret(0x3D2EF35793C76730), // 0x1.ef35793c76730p-45\n Ox1p27 = reinterpret(0x41A0000000000000), // 0x1p27\n Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n let ix = reinterpret(x);\n if (ix - LO < HI - LO) {\n let r = x - 1.0;\n let r2 = r * r;\n let r3 = r2 * r;\n let y =\n r3 * (B1 + r * B2 + r2 * B3 +\n r3 * (B4 + r * B5 + r2 * B6 +\n r3 * (B7 + r * B8 + r2 * B9 + r3 * B10)));\n // Worst-case error is around 0.507 ULP\n let w = r * Ox1p27;\n let rhi = r + w - w;\n let rlo = r - rhi;\n w = rhi * rhi * B0; // B[0] == -0.5\n let hi = r + w;\n let lo = r - hi + w;\n lo += B0 * rlo * (rhi + r);\n return y + lo + hi;\n }\n let top = u32(ix >> 48);\n if (top - 0x0010 >= 0x7FF0 - 0x0010) {\n // x < 0x1p-1022 or inf or nan\n if ((ix << 1) == 0) return -1.0 / (x * x);\n if (ix == reinterpret(Infinity)) return x; // log(inf) == inf\n if ((top & 0x8000) || (top & 0x7FF0) == 0x7FF0) return (x - x) / (x - x);\n // x is subnormal, normalize it\n ix = reinterpret(x * Ox1p52);\n ix -= u64(52) << 52;\n }\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ix - 0x3FE6000000000000;\n let i = ((tmp >> (52 - LOG_TABLE_BITS)) & N_MASK);\n let k = tmp >> 52;\n let iz = ix - (tmp & (u64(0xFFF) << 52));\n\n let invc = load(LOG_DATA_TAB1 + (i << (1 + alignof())), 0 << alignof()); // T[i].invc;\n let logc = load(LOG_DATA_TAB1 + (i << (1 + alignof())), 1 << alignof()); // T[i].logc;\n let z = reinterpret(iz);\n\n // log(x) = log1p(z/c-1) + log(c) + k*Ln2.\n // r ~= z/c - 1, |r| < 1/(2*N)\n // #if __FP_FAST_FMA\n // \t// rounding error: 0x1p-55/N\n // \tr = __builtin_fma(z, invc, -1.0);\n // #else\n // rounding error: 0x1p-55/N + 0x1p-66\n const chi = load(LOG_DATA_TAB2 + (i << (1 + alignof())), 0 << alignof()); // T2[i].chi\n const clo = load(LOG_DATA_TAB2 + (i << (1 + alignof())), 1 << alignof()); // T2[i].clo\n let r = (z - chi - clo) * invc;\n // #endif\n let kd = k;\n\n // hi + lo = r + log(c) + k*Ln2\n let w = kd * Ln2hi + logc;\n let hi = w + r;\n let lo = w - hi + r + kd * Ln2lo;\n\n // log(x) = lo + (log1p(r) - r) + hi\n let r2 = r * r; // rounding error: 0x1p-54/N^2\n // Worst case error if |y| > 0x1p-5:\n // 0.5 + 4.13/N + abs-poly-error*2^57 ULP (+ 0.002 ULP without fma)\n // Worst case error if |y| > 0x1p-4:\n // 0.5 + 2.06/N + abs-poly-error*2^56 ULP (+ 0.001 ULP without fma).\n return lo + r2 * A0 + r * r2 * (A1 + r * A2 + r2 * (A3 + r * A4)) + hi;\n}\n\n//\n// Lookup data for pow. See: https://git.musl-libc.org/cgit/musl/tree/src/math/pow.c\n//\n\n// @ts-ignore: decorator\n@inline const POW_LOG_TABLE_BITS = 7;\n\n/* Algorithm:\n\n x = 2^k z\n log(x) = k ln2 + log(c) + log(z/c)\n log(z/c) = poly(z/c - 1)\n\nwhere z is in [0x1.69555p-1; 0x1.69555p0] which is split into N subintervals\nand z falls into the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = round(0x1p43*log(c))/0x1p43\n tab[i].logctail = (double)(log(c) - logc)\n\nwhere c is chosen near the center of the subinterval such that 1/c has only a\nfew precision bits so z/c - 1 is exactly representible as double:\n\n 1/c = center < 1 ? round(N/center)/N : round(2*N/center)/N/2\n\nNote: |z/c - 1| < 1/N for the chosen c, |log(c) - logc - logctail| < 0x1p-97,\nthe last few bits of logc are rounded away so k*ln2hi + logc has no rounding\nerror and the interval for z is selected such that near x == 1, where log(x)\nis tiny, large cancellation error is avoided in logc + poly(z/c - 1). */\n\n// @ts-ignore: decorator\n@lazy @inline const POW_LOG_DATA_TAB = memory.data([\n // invc ,pad, logc , logctail\n 0x3FF6A00000000000, 0, 0xBFD62C82F2B9C800, 0x3CFAB42428375680,\n 0x3FF6800000000000, 0, 0xBFD5D1BDBF580800, 0xBD1CA508D8E0F720,\n 0x3FF6600000000000, 0, 0xBFD5767717455800, 0xBD2362A4D5B6506D,\n 0x3FF6400000000000, 0, 0xBFD51AAD872DF800, 0xBCE684E49EB067D5,\n 0x3FF6200000000000, 0, 0xBFD4BE5F95777800, 0xBD041B6993293EE0,\n 0x3FF6000000000000, 0, 0xBFD4618BC21C6000, 0x3D13D82F484C84CC,\n 0x3FF5E00000000000, 0, 0xBFD404308686A800, 0x3CDC42F3ED820B3A,\n 0x3FF5C00000000000, 0, 0xBFD3A64C55694800, 0x3D20B1C686519460,\n 0x3FF5A00000000000, 0, 0xBFD347DD9A988000, 0x3D25594DD4C58092,\n 0x3FF5800000000000, 0, 0xBFD2E8E2BAE12000, 0x3D267B1E99B72BD8,\n 0x3FF5600000000000, 0, 0xBFD2895A13DE8800, 0x3D15CA14B6CFB03F,\n 0x3FF5600000000000, 0, 0xBFD2895A13DE8800, 0x3D15CA14B6CFB03F,\n 0x3FF5400000000000, 0, 0xBFD22941FBCF7800, 0xBD165A242853DA76,\n 0x3FF5200000000000, 0, 0xBFD1C898C1699800, 0xBD1FAFBC68E75404,\n 0x3FF5000000000000, 0, 0xBFD1675CABABA800, 0x3D1F1FC63382A8F0,\n 0x3FF4E00000000000, 0, 0xBFD1058BF9AE4800, 0xBD26A8C4FD055A66,\n 0x3FF4C00000000000, 0, 0xBFD0A324E2739000, 0xBD0C6BEE7EF4030E,\n 0x3FF4A00000000000, 0, 0xBFD0402594B4D000, 0xBCF036B89EF42D7F,\n 0x3FF4A00000000000, 0, 0xBFD0402594B4D000, 0xBCF036B89EF42D7F,\n 0x3FF4800000000000, 0, 0xBFCFB9186D5E4000, 0x3D0D572AAB993C87,\n 0x3FF4600000000000, 0, 0xBFCEF0ADCBDC6000, 0x3D2B26B79C86AF24,\n 0x3FF4400000000000, 0, 0xBFCE27076E2AF000, 0xBD172F4F543FFF10,\n 0x3FF4200000000000, 0, 0xBFCD5C216B4FC000, 0x3D21BA91BBCA681B,\n 0x3FF4000000000000, 0, 0xBFCC8FF7C79AA000, 0x3D27794F689F8434,\n 0x3FF4000000000000, 0, 0xBFCC8FF7C79AA000, 0x3D27794F689F8434,\n 0x3FF3E00000000000, 0, 0xBFCBC286742D9000, 0x3D194EB0318BB78F,\n 0x3FF3C00000000000, 0, 0xBFCAF3C94E80C000, 0x3CBA4E633FCD9066,\n 0x3FF3A00000000000, 0, 0xBFCA23BC1FE2B000, 0xBD258C64DC46C1EA,\n 0x3FF3A00000000000, 0, 0xBFCA23BC1FE2B000, 0xBD258C64DC46C1EA,\n 0x3FF3800000000000, 0, 0xBFC9525A9CF45000, 0xBD2AD1D904C1D4E3,\n 0x3FF3600000000000, 0, 0xBFC87FA06520D000, 0x3D2BBDBF7FDBFA09,\n 0x3FF3400000000000, 0, 0xBFC7AB890210E000, 0x3D2BDB9072534A58,\n 0x3FF3400000000000, 0, 0xBFC7AB890210E000, 0x3D2BDB9072534A58,\n 0x3FF3200000000000, 0, 0xBFC6D60FE719D000, 0xBD10E46AA3B2E266,\n 0x3FF3000000000000, 0, 0xBFC5FF3070A79000, 0xBD1E9E439F105039,\n 0x3FF3000000000000, 0, 0xBFC5FF3070A79000, 0xBD1E9E439F105039,\n 0x3FF2E00000000000, 0, 0xBFC526E5E3A1B000, 0xBD20DE8B90075B8F,\n 0x3FF2C00000000000, 0, 0xBFC44D2B6CCB8000, 0x3D170CC16135783C,\n 0x3FF2C00000000000, 0, 0xBFC44D2B6CCB8000, 0x3D170CC16135783C,\n 0x3FF2A00000000000, 0, 0xBFC371FC201E9000, 0x3CF178864D27543A,\n 0x3FF2800000000000, 0, 0xBFC29552F81FF000, 0xBD248D301771C408,\n 0x3FF2600000000000, 0, 0xBFC1B72AD52F6000, 0xBD2E80A41811A396,\n 0x3FF2600000000000, 0, 0xBFC1B72AD52F6000, 0xBD2E80A41811A396,\n 0x3FF2400000000000, 0, 0xBFC0D77E7CD09000, 0x3D0A699688E85BF4,\n 0x3FF2400000000000, 0, 0xBFC0D77E7CD09000, 0x3D0A699688E85BF4,\n 0x3FF2200000000000, 0, 0xBFBFEC9131DBE000, 0xBD2575545CA333F2,\n 0x3FF2000000000000, 0, 0xBFBE27076E2B0000, 0x3D2A342C2AF0003C,\n 0x3FF2000000000000, 0, 0xBFBE27076E2B0000, 0x3D2A342C2AF0003C,\n 0x3FF1E00000000000, 0, 0xBFBC5E548F5BC000, 0xBD1D0C57585FBE06,\n 0x3FF1C00000000000, 0, 0xBFBA926D3A4AE000, 0x3D253935E85BAAC8,\n 0x3FF1C00000000000, 0, 0xBFBA926D3A4AE000, 0x3D253935E85BAAC8,\n 0x3FF1A00000000000, 0, 0xBFB8C345D631A000, 0x3D137C294D2F5668,\n 0x3FF1A00000000000, 0, 0xBFB8C345D631A000, 0x3D137C294D2F5668,\n 0x3FF1800000000000, 0, 0xBFB6F0D28AE56000, 0xBD269737C93373DA,\n 0x3FF1600000000000, 0, 0xBFB51B073F062000, 0x3D1F025B61C65E57,\n 0x3FF1600000000000, 0, 0xBFB51B073F062000, 0x3D1F025B61C65E57,\n 0x3FF1400000000000, 0, 0xBFB341D7961BE000, 0x3D2C5EDACCF913DF,\n 0x3FF1400000000000, 0, 0xBFB341D7961BE000, 0x3D2C5EDACCF913DF,\n 0x3FF1200000000000, 0, 0xBFB16536EEA38000, 0x3D147C5E768FA309,\n 0x3FF1000000000000, 0, 0xBFAF0A30C0118000, 0x3D2D599E83368E91,\n 0x3FF1000000000000, 0, 0xBFAF0A30C0118000, 0x3D2D599E83368E91,\n 0x3FF0E00000000000, 0, 0xBFAB42DD71198000, 0x3D1C827AE5D6704C,\n 0x3FF0E00000000000, 0, 0xBFAB42DD71198000, 0x3D1C827AE5D6704C,\n 0x3FF0C00000000000, 0, 0xBFA77458F632C000, 0xBD2CFC4634F2A1EE,\n 0x3FF0C00000000000, 0, 0xBFA77458F632C000, 0xBD2CFC4634F2A1EE,\n 0x3FF0A00000000000, 0, 0xBFA39E87B9FEC000, 0x3CF502B7F526FEAA,\n 0x3FF0A00000000000, 0, 0xBFA39E87B9FEC000, 0x3CF502B7F526FEAA,\n 0x3FF0800000000000, 0, 0xBF9F829B0E780000, 0xBD2980267C7E09E4,\n 0x3FF0800000000000, 0, 0xBF9F829B0E780000, 0xBD2980267C7E09E4,\n 0x3FF0600000000000, 0, 0xBF97B91B07D58000, 0xBD288D5493FAA639,\n 0x3FF0400000000000, 0, 0xBF8FC0A8B0FC0000, 0xBCDF1E7CF6D3A69C,\n 0x3FF0400000000000, 0, 0xBF8FC0A8B0FC0000, 0xBCDF1E7CF6D3A69C,\n 0x3FF0200000000000, 0, 0xBF7FE02A6B100000, 0xBD19E23F0DDA40E4,\n 0x3FF0200000000000, 0, 0xBF7FE02A6B100000, 0xBD19E23F0DDA40E4,\n 0x3FF0000000000000, 0, 0, 0,\n 0x3FF0000000000000, 0, 0, 0,\n 0x3FEFC00000000000, 0, 0x3F80101575890000, 0xBD10C76B999D2BE8,\n 0x3FEF800000000000, 0, 0x3F90205658938000, 0xBD23DC5B06E2F7D2,\n 0x3FEF400000000000, 0, 0x3F98492528C90000, 0xBD2AA0BA325A0C34,\n 0x3FEF000000000000, 0, 0x3FA0415D89E74000, 0x3D0111C05CF1D753,\n 0x3FEEC00000000000, 0, 0x3FA466AED42E0000, 0xBD2C167375BDFD28,\n 0x3FEE800000000000, 0, 0x3FA894AA149FC000, 0xBD197995D05A267D,\n 0x3FEE400000000000, 0, 0x3FACCB73CDDDC000, 0xBD1A68F247D82807,\n 0x3FEE200000000000, 0, 0x3FAEEA31C006C000, 0xBD0E113E4FC93B7B,\n 0x3FEDE00000000000, 0, 0x3FB1973BD1466000, 0xBD25325D560D9E9B,\n 0x3FEDA00000000000, 0, 0x3FB3BDF5A7D1E000, 0x3D2CC85EA5DB4ED7,\n 0x3FED600000000000, 0, 0x3FB5E95A4D97A000, 0xBD2C69063C5D1D1E,\n 0x3FED400000000000, 0, 0x3FB700D30AEAC000, 0x3CEC1E8DA99DED32,\n 0x3FED000000000000, 0, 0x3FB9335E5D594000, 0x3D23115C3ABD47DA,\n 0x3FECC00000000000, 0, 0x3FBB6AC88DAD6000, 0xBD1390802BF768E5,\n 0x3FECA00000000000, 0, 0x3FBC885801BC4000, 0x3D2646D1C65AACD3,\n 0x3FEC600000000000, 0, 0x3FBEC739830A2000, 0xBD2DC068AFE645E0,\n 0x3FEC400000000000, 0, 0x3FBFE89139DBE000, 0xBD2534D64FA10AFD,\n 0x3FEC000000000000, 0, 0x3FC1178E8227E000, 0x3D21EF78CE2D07F2,\n 0x3FEBE00000000000, 0, 0x3FC1AA2B7E23F000, 0x3D2CA78E44389934,\n 0x3FEBA00000000000, 0, 0x3FC2D1610C868000, 0x3D039D6CCB81B4A1,\n 0x3FEB800000000000, 0, 0x3FC365FCB0159000, 0x3CC62FA8234B7289,\n 0x3FEB400000000000, 0, 0x3FC4913D8333B000, 0x3D25837954FDB678,\n 0x3FEB200000000000, 0, 0x3FC527E5E4A1B000, 0x3D2633E8E5697DC7,\n 0x3FEAE00000000000, 0, 0x3FC6574EBE8C1000, 0x3D19CF8B2C3C2E78,\n 0x3FEAC00000000000, 0, 0x3FC6F0128B757000, 0xBD25118DE59C21E1,\n 0x3FEAA00000000000, 0, 0x3FC7898D85445000, 0xBD1C661070914305,\n 0x3FEA600000000000, 0, 0x3FC8BEAFEB390000, 0xBD073D54AAE92CD1,\n 0x3FEA400000000000, 0, 0x3FC95A5ADCF70000, 0x3D07F22858A0FF6F,\n 0x3FEA000000000000, 0, 0x3FCA93ED3C8AE000, 0xBD28724350562169,\n 0x3FE9E00000000000, 0, 0x3FCB31D8575BD000, 0xBD0C358D4EACE1AA,\n 0x3FE9C00000000000, 0, 0x3FCBD087383BE000, 0xBD2D4BC4595412B6,\n 0x3FE9A00000000000, 0, 0x3FCC6FFBC6F01000, 0xBCF1EC72C5962BD2,\n 0x3FE9600000000000, 0, 0x3FCDB13DB0D49000, 0xBD2AFF2AF715B035,\n 0x3FE9400000000000, 0, 0x3FCE530EFFE71000, 0x3CC212276041F430,\n 0x3FE9200000000000, 0, 0x3FCEF5ADE4DD0000, 0xBCCA211565BB8E11,\n 0x3FE9000000000000, 0, 0x3FCF991C6CB3B000, 0x3D1BCBECCA0CDF30,\n 0x3FE8C00000000000, 0, 0x3FD07138604D5800, 0x3CF89CDB16ED4E91,\n 0x3FE8A00000000000, 0, 0x3FD0C42D67616000, 0x3D27188B163CEAE9,\n 0x3FE8800000000000, 0, 0x3FD1178E8227E800, 0xBD2C210E63A5F01C,\n 0x3FE8600000000000, 0, 0x3FD16B5CCBACF800, 0x3D2B9ACDF7A51681,\n 0x3FE8400000000000, 0, 0x3FD1BF99635A6800, 0x3D2CA6ED5147BDB7,\n 0x3FE8200000000000, 0, 0x3FD214456D0EB800, 0x3D0A87DEBA46BAEA,\n 0x3FE7E00000000000, 0, 0x3FD2BEF07CDC9000, 0x3D2A9CFA4A5004F4,\n 0x3FE7C00000000000, 0, 0x3FD314F1E1D36000, 0xBD28E27AD3213CB8,\n 0x3FE7A00000000000, 0, 0x3FD36B6776BE1000, 0x3D116ECDB0F177C8,\n 0x3FE7800000000000, 0, 0x3FD3C25277333000, 0x3D183B54B606BD5C,\n 0x3FE7600000000000, 0, 0x3FD419B423D5E800, 0x3D08E436EC90E09D,\n 0x3FE7400000000000, 0, 0x3FD4718DC271C800, 0xBD2F27CE0967D675,\n 0x3FE7200000000000, 0, 0x3FD4C9E09E173000, 0xBD2E20891B0AD8A4,\n 0x3FE7000000000000, 0, 0x3FD522AE0738A000, 0x3D2EBE708164C759,\n 0x3FE6E00000000000, 0, 0x3FD57BF753C8D000, 0x3D1FADEDEE5D40EF,\n 0x3FE6C00000000000, 0, 0x3FD5D5BDDF596000, 0xBD0A0B2A08A465DC\n]);\n\n// Returns 0 if not int, 1 if odd int, 2 if even int. The argument is\n// the bit representation of a non-zero finite floating-point value.\n// @ts-ignore: decorator\n@inline\nfunction checkint(iy: u64): i32 {\n let e = iy >> 52 & 0x7FF;\n if (e < 0x3FF ) return 0;\n if (e > 0x3FF + 52) return 2;\n e = u64(1) << (0x3FF + 52 - e);\n if (iy & (e - 1)) return 0;\n if (iy & e ) return 1;\n return 2;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction xflow(sign: u32, y: f64): f64 {\n return select(-y, y, sign) * y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction uflow(sign: u32): f64 {\n return xflow(sign, reinterpret(0x1000000000000000)); // 0x1p-767\n}\n\n// @ts-ignore: decorator\n@inline\nfunction oflow(sign: u32): f64 {\n return xflow(sign, reinterpret(0x7000000000000000)); // 0x1p769\n}\n\n// Returns 1 if input is the bit representation of 0, infinity or nan.\n// @ts-ignore: decorator\n@inline\nfunction zeroinfnan(u: u64): bool {\n return (u << 1) - 1 >= 0xFFE0000000000000 - 1;\n}\n\n// @ts-ignore: decorator\n@lazy let log_tail: f64 = 0;\n\n// Compute y+TAIL = log(x) where the rounded result is y and TAIL has about\n// additional 15 bits precision. IX is the bit representation of x, but\n// normalized in the subnormal range using the sign bit for the exponent.\n// @ts-ignore: decorator\n@inline\nfunction log_inline(ix: u64): f64 {\n const N = 1 << POW_LOG_TABLE_BITS;\n const N_MASK = N - 1;\n\n const\n Ln2hi = reinterpret(0x3FE62E42FEFA3800),\n Ln2lo = reinterpret(0x3D2EF35793C76730);\n\n const\n A0 = reinterpret(0xBFE0000000000000),\n A1 = reinterpret(0xBFE5555555555560),\n A2 = reinterpret(0x3FE0000000000006),\n A3 = reinterpret(0x3FE999999959554E),\n A4 = reinterpret(0xBFE555555529A47A),\n A5 = reinterpret(0xBFF2495B9B4845E9),\n A6 = reinterpret(0x3FF0002B8B263FC3);\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ix - 0x3fE6955500000000;\n let i = usize((tmp >> (52 - POW_LOG_TABLE_BITS)) & N_MASK);\n let k = tmp >> 52;\n let iz = ix - (tmp & u64(0xFFF) << 52);\n let z = reinterpret(iz);\n let kd = k;\n\n // log(x) = k*Ln2 + log(c) + log1p(z/c-1).\n let invc = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 0 << alignof()); // tab[i].invc\n let logc = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 2 << alignof()); // tab[i].logc\n let logctail = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 3 << alignof()); // tab[i].logctail\n\n // Note: 1/c is j/N or j/N/2 where j is an integer in [N,2N) and\n // |z/c - 1| < 1/N, so r = z/c - 1 is exactly representible.\n // Split z such that rhi, rlo and rhi*rhi are exact and |rlo| <= |r|.\n let zhi = reinterpret((iz + u64(0x80000000)) & 0xFFFFFFFF00000000);\n let zlo = z - zhi;\n let rhi = zhi * invc - 1.0;\n let rlo = zlo * invc;\n let r = rhi + rlo;\n\n // k * Ln2 + log(c) + r.\n let t1 = kd * Ln2hi + logc;\n let t2 = t1 + r;\n let lo1 = kd * Ln2lo + logctail;\n let lo2 = t1 - t2 + r;\n\n // Evaluation is optimized assuming superscalar pipelined execution.\n let ar = A0 * r; // A[0] = -0.5\n let ar2 = r * ar;\n let ar3 = r * ar2;\n // k * Ln2 + log(c) + r + A[0] * r * r.\n let arhi = A0 * rhi;\n let arhi2 = rhi * arhi;\n let hi = t2 + arhi2;\n let lo3 = rlo * (ar + arhi);\n let lo4 = t2 - hi + arhi2;\n\n // p = log1p(r) - r - A[0] * r * r.\n let p = ar3 * (A1 + r * A2 + ar2 * (A3 + r * A4 + ar2 * (A5 + r * A6)));\n let lo = lo1 + lo2 + lo3 + lo4 + p;\n let y = hi + lo;\n log_tail = hi - y + lo;\n\n return y;\n}\n\n// @ts-ignore: decorator\n@inline const SIGN_BIAS = 0x800 << EXP_TABLE_BITS;\n\n// Computes sign*exp(x+xtail) where |xtail| < 2^-8/N and |xtail| <= |x|.\n// The sign_bias argument is SIGN_BIAS or 0 and sets the sign to -1 or 1.\n// @ts-ignore: decorator\n@inline\nfunction exp_inline(x: f64, xtail: f64, sign_bias: u32): f64 {\n const N = 1 << EXP_TABLE_BITS;\n const N_MASK = N - 1;\n\n const\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep0\n NegLn2hiN = reinterpret(0xBF762E42FEFA0000), // -0x1.62e42fefa0000p-8\n NegLn2loN = reinterpret(0xBD0CF79ABC9E3B3A), // -0x1.cf79abc9e3b3ap-47\n shift = reinterpret(0x4338000000000000); // 0x1.8p52\n\n const\n C2 = reinterpret(0x3FDFFFFFFFFFFDBD), // __exp_data.poly[0] (0x1.ffffffffffdbdp-2)\n C3 = reinterpret(0x3FC555555555543C), // __exp_data.poly[1] (0x1.555555555543cp-3)\n C4 = reinterpret(0x3FA55555CF172B91), // __exp_data.poly[2] (0x1.55555cf172b91p-5)\n C5 = reinterpret(0x3F81111167A4D017); // __exp_data.poly[3] (0x1.1111167a4d017p-7)\n\n let abstop: u32;\n let ki: u64, top: u64, sbits: u64;\n let idx: usize;\n // double_t for better performance on targets with FLT_EVAL_METHOD==2.\n let kd: f64, z: f64, r: f64, r2: f64, scale: f64, tail: f64, tmp: f64;\n\n let ux = reinterpret(x);\n abstop = u32(ux >> 52) & 0x7FF;\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) {\n // Avoid spurious underflow for tiny x.\n // Note: 0 is common input.\n return select(-1.0, 1.0, sign_bias);\n }\n if (abstop >= 0x409) { // top12(1024.0)\n // Note: inf and nan are already handled.\n return ux < 0\n ? uflow(sign_bias)\n : oflow(sign_bias);\n }\n // Large x is special cased below.\n abstop = 0;\n }\n\n // exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)].\n // x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N].\n z = InvLn2N * x;\n\n // #if TOINT_INTRINSICS\n // kd = roundtoint(z);\n // ki = converttoint(z);\n // #elif EXP_USE_TOINT_NARROW\n // // z - kd is in [-0.5-2^-16, 0.5] in all rounding modes.\n // kd = eval_as_double(z + shift);\n // ki = asuint64(kd) >> 16;\n // kd = (double_t)(int32_t)ki;\n // #else\n // z - kd is in [-1, 1] in non-nearest rounding modes\n kd = z + shift;\n ki = reinterpret(kd);\n kd -= shift;\n // #endif\n r = x + kd * NegLn2hiN + kd * NegLn2loN;\n // The code assumes 2^-200 < |xtail| < 2^-8/N\n r += xtail;\n // 2^(k/N) ~= scale * (1 + tail)\n idx = usize((ki & N_MASK) << 1);\n top = (ki + sign_bias) << (52 - EXP_TABLE_BITS);\n\n tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof())));\n // This is only a valid scale when -1023*N < k < 1024*N\n sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top;\n // exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1).\n // Evaluation is optimized assuming superscalar pipelined execution.\n r2 = r * r;\n // Without fma the worst case error is 0.25/N ulp larger.\n // Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp\n tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase(tmp, sbits, ki);\n scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-200 and scale > 2^-739, so there\n // is no spurious underflow here even without fma.\n return scale + scale * tmp;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function pow_lut(x: f64, y: f64): f64 {\n const Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n let sign_bias: u32 = 0;\n let ix = reinterpret(x);\n let iy = reinterpret(y);\n let topx = ix >> 52;\n let topy = iy >> 52;\n\n if (topx - 0x001 >= 0x7FF - 0x001 || (topy & 0x7FF) - 0x3BE >= 0x43e - 0x3BE) {\n // Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0\n // and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1.\n // Special cases: (x < 0x1p-126 or inf or nan) or\n // (|y| < 0x1p-65 or |y| >= 0x1p63 or nan).\n if (zeroinfnan(iy)) {\n if ((iy << 1) == 0) return 1.0;\n if (ix == 0x3FF0000000000000) return NaN; // original: 1.0\n if ((ix << 1) > 0xFFE0000000000000 || (iy << 1) > 0xFFE0000000000000) return x + y;\n if ((ix << 1) == 0x7FE0000000000000) return NaN; // original: 1.0\n if (((ix << 1) < 0x7FE0000000000000) == !(iy >> 63)) return 0; // |x|<1 && y==inf or |x|>1 && y==-inf.\n return y * y;\n }\n if (zeroinfnan(ix)) {\n let x2 = x * x;\n if (i32(ix >> 63) && checkint(iy) == 1) x2 = -x2;\n return iy < 0 ? 1 / x2 : x2;\n }\n // Here x and y are non-zero finite\n if (ix < 0) {\n // Finite x < 0\n let yint = checkint(iy);\n if (yint == 0) return (x - x) / (x - x);\n if (yint == 1) sign_bias = SIGN_BIAS;\n ix &= 0x7FFFFFFFFFFFFFFF;\n topx &= 0x7FF;\n }\n if ((topy & 0x7FF) - 0x3BE >= 0x43E - 0x3BE) {\n // Note: sign_bias == 0 here because y is not odd.\n if (ix == 0x3FF0000000000000) return 1;\n if ((topy & 0x7FF) < 0x3BE) return 1; // |y| < 2^-65, x^y ~= 1 + y*log(x).\n return (ix > 0x3FF0000000000000) == (topy < 0x800) ? Infinity : 0;\n }\n if (topx == 0) {\n // Normalize subnormal x so exponent becomes negative.\n ix = reinterpret(x * Ox1p52);\n ix &= 0x7FFFFFFFFFFFFFFF;\n ix -= u64(52) << 52;\n }\n }\n\n let hi = log_inline(ix);\n let lo = log_tail;\n let ehi: f64, elo: f64;\n // #if __FP_FAST_FMA\n // ehi = y * hi;\n // elo = y * lo + __builtin_fma(y, hi, -ehi);\n // #else\n let yhi = reinterpret(iy & 0xFFFFFFFFF8000000);\n let ylo = y - yhi;\n let lhi = reinterpret(reinterpret(hi) & 0xFFFFFFFFF8000000);\n let llo = hi - lhi + lo;\n ehi = yhi * lhi;\n elo = ylo * lhi + y * llo; // |elo| < |ehi| * 2^-25.\n // #endif\n return exp_inline(ehi, elo, sign_bias);\n}\n","import {\n itoa32,\n utoa32,\n itoa64,\n utoa64,\n dtoa,\n itoa_buffered,\n dtoa_buffered,\n MAX_DOUBLE_LENGTH\n} from \"./number\";\n\nimport {\n ipow32\n} from \"../math\";\n\n// All tables are stored as two staged lookup tables (static tries)\n// because the full range of Unicode symbols can't be efficiently\n// represented as-is in memory (see Unicode spec ch 5, p.196):\n// https://www.unicode.org/versions/Unicode12.0.0/ch05.pdf\n// Tables have been generated using these forked musl tools:\n// https://github.com/MaxGraey/musl-chartable-tools/tree/case-ignorable\n\n// Lookup table to check if a character is alphanumeric or not\n// See: https://git.musl-libc.org/cgit/musl/tree/src/ctype/alpha.h\n// size: 3904 bytes\n// @ts-ignore\n@inline @lazy const ALPHA_TABLE = memory.data([\n 18,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,17,34,35,36,17,37,38,39,40,\n 41,42,43,44,17,45,46,47,16,16,48,16,16,16,16,16,16,16,49,50,51,16,52,53,16,16,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,54,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,55,17,17,17,17,56,17,57,58,59,60,61,62,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,63,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,64,65,17,66,67,\n 68,69,70,71,72,73,74,17,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,\n 93,94,16,95,96,97,98,17,17,17,99,100,101,16,16,16,16,16,16,16,16,16,16,17,17,\n 17,17,102,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,103,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,17,17,104,105,16,16,106,107,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,108,17,17,17,17,109,110,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 17,111,112,16,16,16,16,16,16,16,16,16,113,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,114,115,116,117,16,16,16,16,16,16,16,16,118,\n 119,120,16,16,16,16,16,121,122,16,16,16,16,123,16,16,124,16,16,16,16,16,16,16,\n 16,16,125,16,16,16,\n 16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,254,255,255,7,254,\n 255,255,7,0,0,0,0,0,4,32,4,255,255,127,255,255,255,127,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,195,255,3,0,31,80,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,223,188,64,215,255,255,\n 251,255,255,255,255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,3,252,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,127,2,255,255,255,\n 255,255,1,0,0,0,0,255,191,182,0,255,255,255,135,7,0,0,0,255,7,255,255,255,255,\n 255,255,255,254,255,195,255,255,255,255,255,255,255,255,255,255,255,255,239,\n 31,254,225,255,\n 159,0,0,255,255,255,255,255,255,0,224,255,255,255,255,255,255,255,255,255,255,\n 255,255,3,0,255,255,255,255,255,7,48,4,255,255,255,252,255,31,0,0,255,255,255,\n 1,255,7,0,0,0,0,0,0,255,255,223,255,255,0,240,255,248,3,255,255,255,255,255,\n 255,255,255,255,239,255,223,225,255,207,255,254,255,239,159,249,255,255,253,\n 197,227,159,89,128,176,207,255,3,16,238,135,249,255,255,253,109,195,135,25,2,\n 94,192,255,63,0,238,191,251,255,255,253,237,227,191,27,1,0,207,255,0,30,238,\n 159,249,255,255,253,237,227,159,25,192,176,207,255,2,0,236,199,61,214,24,199,\n 255,195,199,29,129,0,192,255,0,0,239,223,253,255,255,253,255,227,223,29,96,7,\n 207,255,0,0,239,223,253,255,255,253,239,227,223,29,96,64,207,255,6,0,255,223,\n 253,255,255,255,255,231,223,93,240,128,207,255,0,252,238,255,127,252,255,255,\n 251,47,127,128,95,255,192,255,12,0,254,255,255,255,255,127,255,7,63,32,255,3,\n 0,0,0,0,214,247,255,255,175,255,255,59,95,32,255,243,0,0,0,\n 0,1,0,0,0,255,3,0,0,255,254,255,255,255,31,254,255,3,255,255,254,255,255,255,\n 31,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,249,255,3,255,255,255,255,255,\n 255,255,255,255,63,255,255,255,255,191,32,255,255,255,255,255,247,255,255,255,\n 255,255,255,255,255,255,61,127,61,255,255,255,255,255,61,255,255,255,255,61,\n 127,61,255,127,255,255,255,255,255,255,255,61,255,255,255,255,255,255,255,255,\n 7,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,63,63,254,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,159,255,255,254,255,255,7,255,255,255,255,255,255,255,255,\n 255,199,255,1,255,223,15,0,255,255,15,0,255,255,15,0,255,223,13,0,255,255,255,\n 255,255,255,207,255,255,1,128,16,255,3,0,0,0,0,255,3,255,255,255,255,255,255,\n 255,255,255,255,255,1,255,255,255,255,255,7,255,255,255,255,255,255,255,255,\n 63,\n 0,255,255,255,127,255,15,255,1,192,255,255,255,255,63,31,0,255,255,255,255,\n 255,15,255,255,255,3,255,3,0,0,0,0,255,255,255,15,255,255,255,255,255,255,255,\n 127,254,255,31,0,255,3,255,3,128,0,0,128,1,0,0,0,0,0,0,0,255,255,255,255,255,\n 255,239,255,239,15,255,3,0,0,0,0,255,255,255,255,255,243,255,255,255,255,255,\n 255,191,255,3,0,255,255,255,255,255,255,127,0,255,227,255,255,255,255,255,63,\n 255,1,255,255,255,255,255,231,0,0,0,0,0,222,111,4,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,\n 128,255,31,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,255,\n 255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,132,252,47,62,80,189,255,243,\n 224,67,0,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,\n 0,255,255,255,255,255,127,255,255,255,255,255,127,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,31,120,12,0,255,255,255,255,191,32,255,\n 255,255,255,255,255,255,128,0,0,255,255,127,0,127,127,127,127,127,127,127,127,\n 255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,224,0,0,0,254,3,62,31,254,255,255,255,255,255,255,255,255,255,127,224,254,\n 255,255,255,255,255,255,255,255,255,255,247,224,255,255,255,255,255,254,255,\n 255,255,255,255,255,255,255,255,255,127,0,0,255,255,255,255,0,0,0,0,0,0,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,\n 31,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,\n 0,0,0,0,0,0,255,255,255,255,255,63,255,31,255,255,255,15,0,0,255,255,255,255,\n 255,127,240,143,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,\n 0,128,255,252,255,255,255,255,255,255,255,255,255,255,255,255,249,255,255,255,\n 255,255,255,252,7,0,0,0,0,224,255,191,255,255,255,255,0,0,0,255,255,255,255,\n 255,255,15,0,255,255,255,255,255,255,255,255,47,0,255,3,0,0,252,232,255,255,\n 255,255,255,7,255,255,255,255,7,0,255,255,255,31,255,255,255,255,255,255,247,\n 255,0,128,255,3,255,255,255,127,255,255,255,255,255,255,127,0,255,63,255,3,\n 255,255,127,252,255,255,255,255,255,255,255,127,5,0,0,56,255,255,60,0,126,126,\n 126,0,127,127,255,255,255,255,255,247,255,3,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,7,255,3,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,15,0,255,255,127,248,255,255,255,255,\n 255,\n 15,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,3,0,0,0,0,127,0,248,224,255,253,127,95,219,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,248,255,255,255,\n 255,255,255,255,255,255,255,255,255,63,0,0,255,255,255,255,255,255,255,255,\n 252,255,255,255,255,255,255,0,0,0,0,0,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,223,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,255,3,\n 254,255,255,7,254,255,255,7,192,255,255,255,255,255,255,255,255,255,255,127,\n 252,252,252,28,0,0,0,0,255,239,255,255,127,255,255,183,255,63,255,63,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,31,255,255,255,255,255,255,1,0,0,0,0,\n 0,255,255,255,255,0,224,255,255,255,7,255,255,255,255,255,7,255,255,255,63,\n 255,255,255,255,15,255,62,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,63,255,3,255,255,255,255,15,255,255,255,\n 255,15,255,255,255,255,255,0,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,0,255,255,63,0,255,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,63,253,255,255,255,255,191,145,255,255,63,0,255,255,\n 127,0,255,255,255,127,0,0,0,0,0,0,0,0,255,255,55,0,255,255,63,0,255,255,255,3,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,192,0,0,0,0,0,0,0,0,111,240,239,\n 254,255,255,63,0,0,0,0,0,255,255,255,31,255,255,255,31,0,0,0,0,255,254,255,\n 255,31,0,0,0,255,255,255,255,255,255,63,0,255,255,63,0,255,255,7,0,255,255,3,\n 0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,255,255,255,255,255,255,7,\n 0,255,255,255,255,255,255,7,0,255,255,255,255,255,0,255,3,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,\n 255,27,3,0,0,0,0,0,0,0,0,0,255,255,255,31,128,0,255,255,63,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,31,0,0,0,255,255,127,0,255,255,255,255,255,255,255,255,63,0,0,\n 0,192,255,0,0,252,255,255,255,255,255,255,1,0,0,255,255,255,1,255,3,255,255,\n 255,255,255,255,199,255,240,0,255,255,255,255,71,0,255,255,255,255,255,255,\n 255,255,30,192,255,23,0,0,0,0,255,255,251,255,255,255,159,64,0,0,0,0,0,0,0,0,\n 127,189,255,191,255,1,255,255,255,255,255,255,255,1,255,3,239,159,249,255,255,\n 253,237,227,159,25,129,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,187,7,255,131,3,0,0,0,255,255,255,255,255,\n 255,255,255,179,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,\n 255,255,255,63,127,0,0,0,63,0,0,0,0,255,255,255,255,255,255,255,127,17,0,255,\n 3,0,0,0,0,255,255,255,255,255,255,63,1,255,3,0,0,0,0,0,0,255,255,255,231,255,\n 7,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,\n 255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,3,0,128,\n 127,242,111,255,255,255,191,153,7,0,255,3,0,0,0,0,0,0,0,0,255,252,255,255,255,\n 255,255,252,26,0,0,0,255,255,255,255,255,255,231,127,0,0,255,255,255,255,255,\n 255,255,255,255,32,0,0,0,0,255,255,255,255,255,255,255,1,255,253,255,255,255,\n 255,127,127,1,0,255,3,0,0,252,255,255,255,252,255,255,254,127,0,0,0,0,0,0,0,0,\n 0,127,251,255,255,255,255,127,180,203,0,255,3,191,253,255,255,255,127,123,1,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,255,255,127,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,0,0,0,0,\n 0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,127,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,\n 0,255,255,255,255,255,255,255,1,255,255,255,127,255,3,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,63,0,0,255,255,255,255,255,255,0,0,15,0,255,3,248,255,255,224,255,\n 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,\n 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,135,\n 255,255,255,255,255,255,255,128,255,255,0,0,0,0,0,0,0,0,11,0,3,0,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,0,\n 255,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,255,255,255,\n 127,0,0,0,0,0,0,7,0,240,0,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,15,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,7,255,31,255,1,255,67,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,255,255,255,\n 223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,\n 255,123,95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,63,255,255,255,253,255,255,247,255,255,255,\n 247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,255,253,\n 255,255,255,253,255,255,247,207,255,255,255,255,255,255,127,255,255,249,219,7,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,31,\n 128,63,255,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,15,255,\n 3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,31,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,143,8,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,255,255,255,150,254,247,10,\n 132,234,150,170,150,247,247,94,255,251,255,15,238,251,255,15,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,3,255,255,255,3,255,255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,3\n]);\n\n// size: 1568 bytes (compressed to ~1380 bytes after binaryen)\n// @ts-ignore: decorator\n@lazy @inline const CASED = memory.data([\n 18,19,20,21,22,23,16,16,16,16,16,16,16,16,16,16,\n 24,16,16,25,16,16,16,16,16,16,16,16,26,27,17,28,\n 29,30,16,16,31,16,16,16,16,16,16,16,32,33,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,34,35,16,16,16,36,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,37,16,16,16,38,\n 16,16,16,16,39,16,16,16,16,16,16,16,40,16,16,16,\n 16,16,16,16,16,16,16,16,41,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,42,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,43,44,45,46,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,47,16,16,16,16,16,16,\n 16,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,254,255,255,7,254,255,255,7,0,0,0,0,0,4,32,4,\n 255,255,127,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,247,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,239,255,255,255,255,1,3,0,0,0,31,0,0,0,\n 0,0,0,0,0,0,0,0,32,0,0,0,0,0,207,188,64,215,255,255,251,255,255,255,\n 255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 3,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,\n 255,255,127,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,\n 191,32,255,255,255,255,255,231,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,255,255,255,255,255,255,255,255,63,63,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,1,255,255,255,255,255,231,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,\n 255,255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,\n 132,252,47,62,80,189,31,242,224,67,0,0,255,255,255,255,24,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,0,255,255,255,255,255,127,255,255,\n 255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,120,12,0,\n 255,255,255,255,191,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,63,0,0,\n 255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,\n 255,255,255,255,255,255,255,255,255,120,255,255,255,255,255,255,252,7,0,0,0,0,96,7,\n 0,0,0,0,0,0,255,255,255,255,255,247,255,1,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,127,0,248,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,7,\n 254,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,\n 255,255,15,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,7,0,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,\n 255,255,255,223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,255,123,\n 95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,\n 253,255,255,247,255,255,255,247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,\n 255,253,255,255,255,253,255,255,247,15,0,0,0,0,0,0,255,255,255,255,255,255,255,255,\n 15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,3,255,255,255,3,255,255,255,3,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0\n]);\n\n// size: 2976 bytes (compressed to ~2050 bytes after binaryen)\n// @ts-ignore: decorator\n@lazy @inline const CASE_IGNORABLES = memory.data([\n 18,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,\n 33,16,16,34,16,16,16,35,36,37,38,39,40,41,16,42,\n 43,16,16,16,16,16,16,16,16,16,16,16,44,45,46,16,\n 47,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 48,16,16,16,49,16,50,51,52,53,54,55,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,56,16,16,57,58,\n 16,59,60,61,16,16,16,16,16,16,62,16,16,63,64,65,\n 66,67,68,69,70,71,72,73,74,75,76,16,77,78,79,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,80,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,81,82,16,16,16,83,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,84,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,85,86,16,16,16,16,16,16,16,87,16,16,16,16,16,\n 88,89,90,16,16,16,16,16,91,92,16,16,16,16,16,16,\n 16,16,16,93,16,16,16,16,16,16,16,16,16,16,16,16,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,128,64,0,4,0,0,0,64,1,0,0,0,0,0,0,0,0,161,144,1,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,48,4,176,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,3,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0,0,0,\n 0,0,254,255,255,255,255,191,182,0,0,0,0,0,16,0,63,0,255,23,0,0,0,0,\n 1,248,255,255,0,0,1,0,0,0,0,0,0,0,0,0,0,0,192,191,255,61,0,0,\n 0,128,2,0,0,0,255,255,255,7,0,0,0,0,0,0,0,0,0,0,192,255,1,0,\n 0,0,0,0,0,248,63,36,0,0,192,255,255,63,0,0,0,0,0,14,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,248,255,255,255,255,255,7,0,0,0,0,0,0,20,\n 254,33,254,0,12,0,2,0,2,0,0,0,0,0,0,16,30,32,0,0,12,0,0,64,\n 6,0,0,0,0,0,0,16,134,57,2,0,0,0,35,0,6,0,0,0,0,0,0,16,\n 190,33,0,0,12,0,0,252,2,0,0,0,0,0,0,144,30,32,96,0,12,0,0,0,\n 4,0,0,0,0,0,0,0,1,32,0,0,0,0,0,0,17,0,0,0,0,0,0,192,\n 193,61,96,0,12,0,0,0,2,0,0,0,0,0,0,144,64,48,0,0,12,0,0,0,\n 3,0,0,0,0,0,0,24,30,32,0,0,12,0,0,0,2,0,0,0,0,0,0,0,\n 0,4,92,0,0,0,0,0,0,0,0,0,0,0,242,7,192,127,0,0,0,0,0,0,\n 0,0,0,0,0,0,242,31,64,63,0,0,0,0,0,0,0,0,0,3,0,0,160,2,\n 0,0,0,0,0,0,254,127,223,224,255,254,255,255,255,31,64,0,0,0,0,0,0,0,\n 0,0,0,0,0,224,253,102,0,0,0,195,1,0,30,0,100,32,0,32,0,0,0,0,\n 0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,28,0,\n 0,0,12,0,0,0,12,0,0,0,0,0,0,0,176,63,64,254,143,32,0,0,0,0,\n 0,120,0,0,0,0,0,0,8,0,0,0,0,0,0,0,96,0,0,0,0,2,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,135,1,4,14,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,9,0,0,0,0,\n 0,0,64,127,229,31,248,159,0,0,0,0,128,0,255,255,1,0,0,0,0,0,0,0,\n 15,0,0,0,0,0,208,23,4,0,0,0,0,248,15,0,3,0,0,0,60,59,0,0,\n 0,0,0,0,64,163,3,0,0,0,0,0,0,240,207,0,0,0,0,0,0,0,0,63,\n 0,0,0,0,0,0,0,0,0,0,247,255,253,33,16,3,0,0,0,0,0,240,255,255,\n 255,255,255,255,255,7,0,1,0,0,0,248,255,255,255,255,255,255,255,255,255,255,255,251,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,\n 3,224,0,224,0,224,0,96,0,248,0,3,144,124,0,0,0,0,0,0,223,255,2,128,\n 0,0,255,31,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,128,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,60,62,8,\n 0,0,0,0,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,0,0,0,0,112,\n 0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,16,0,0,0,0,0,0,\n 0,0,0,0,0,128,247,191,0,0,0,240,0,0,0,0,0,0,0,0,0,0,3,0,\n 255,255,255,255,3,0,0,0,0,0,0,0,0,0,1,0,0,7,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,3,68,8,0,0,96,16,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,48,0,0,0,255,255,3,128,0,0,0,0,192,63,0,0,\n 128,255,3,0,0,0,0,0,7,0,0,0,0,0,200,51,0,128,0,0,96,0,0,0,\n 0,0,0,0,0,126,102,0,8,16,0,0,0,0,1,16,0,0,0,0,0,0,157,193,\n 2,0,0,32,0,48,88,0,0,0,0,0,0,0,0,0,0,0,0,248,0,14,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,32,33,0,0,0,0,0,64,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,3,0,0,0,0,0,0,0,\n 255,255,8,0,255,255,0,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,128,128,64,0,4,0,0,0,64,1,0,0,0,0,0,1,0,\n 0,0,0,192,0,0,0,0,0,0,0,0,8,0,0,14,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,7,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,110,240,0,0,0,0,0,135,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,\n 0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 192,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 2,0,0,0,0,0,0,255,127,0,0,0,0,0,0,128,3,0,0,0,0,0,120,38,\n 0,32,0,0,0,0,0,0,7,0,0,0,128,239,31,0,0,0,0,0,0,0,8,0,\n 3,0,0,0,0,0,192,127,0,158,0,0,0,0,0,0,0,0,0,0,0,128,211,64,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,248,7,0,0,\n 3,0,0,0,0,0,0,24,1,0,0,0,192,31,31,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,92,0,0,64,0,0,0,0,\n 0,0,0,0,0,0,248,133,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,176,1,0,0,48,0,0,0,0,\n 0,0,0,0,0,0,248,167,1,0,0,0,0,0,0,0,0,0,0,0,0,40,191,0,\n 0,0,0,0,0,0,0,0,0,0,0,224,188,15,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,255,6,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,88,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,240,12,1,0,0,0,254,7,0,0,0,0,248,121,128,0,126,14,0,0,0,0,\n 0,252,127,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,191,\n 0,0,0,0,0,0,0,0,0,0,252,255,255,252,109,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,126,180,191,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,255,1,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,31,0,0,0,0,0,0,0,127,0,15,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,128,0,0,0,0,0,0,0,128,255,255,0,0,0,0,0,0,0,0,27,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,15,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,248,255,\n 231,15,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,127,248,255,255,255,255,255,31,32,0,16,0,0,248,254,255,0,0,\n 0,0,0,0,0,0,0,0,127,255,255,249,219,7,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,63,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 240,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,248\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOWER127 = memory.data([\n 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\n 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,\n 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,\n 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,\n 64,\n 97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,\n 91,92,93,94,95,96,\n 97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,\n 123,124,125,126,127\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const UPPER127 = memory.data([\n 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\n 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,\n 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,\n 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,\n 64,\n 65,66,67,68,69,70,71,72,73,74,75,76,77,\n 78,79,80,81,82,83,84,85,86,87,88,89,90,\n 91,92,93,94,95,96,\n 65,66,67,68,69,70,71,72,73,74,75,76,77,\n 78,79,80,81,82,83,84,85,86,87,88,89,90,\n 123,124,125,126,127\n]);\n\n// 23 * 8 = 184 bytes\n// @ts-ignore: decorator\n@lazy @inline const POWERS10 = memory.data([\n 1e00, 1e01, 1e02, 1e03, 1e04, 1e05, 1e06, 1e07, 1e08, 1e09,\n 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,\n 1e20, 1e21, 1e22\n]);\n\n// @ts-ignore: decorator\n@inline\nexport const enum CharCode {\n PERCENT = 0x25,\n PLUS = 0x2B,\n MINUS = 0x2D,\n DOT = 0x2E,\n _0 = 0x30,\n _1 = 0x31,\n _2 = 0x32,\n _3 = 0x33,\n _4 = 0x34,\n _5 = 0x35,\n _6 = 0x36,\n _7 = 0x37,\n _8 = 0x38,\n _9 = 0x39,\n A = 0x41,\n B = 0x42,\n E = 0x45,\n I = 0x49,\n N = 0x4E,\n O = 0x4F,\n X = 0x58,\n Z = 0x5A,\n a = 0x61,\n b = 0x62,\n e = 0x65,\n n = 0x6E,\n o = 0x6F,\n u = 0x75,\n x = 0x78,\n z = 0x7A\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isAscii(c: u32): bool {\n return !(c >> 7);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isLower8(c: u32): bool {\n return c - CharCode.a < 26;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isUpper8(c: u32): bool {\n return c - CharCode.A < 26;\n}\n\nexport function isSpace(c: u32): bool {\n if (c < 0x1680) { // < (1)\n // , , , , , and \n // (c == 0x20 || c == 0xA0) was optimized to (c | 0x80) == 0xA0\n return ((c | 0x80) == 0xA0) || (c - 0x09 <= 0x0D - 0x09);\n }\n if (c - 0x2000 <= 0x200A - 0x2000) return true;\n switch (c) {\n case 0x1680: // (1)\n case 0x2028: // (2)\n case 0x2029: // \n case 0x202F: // \n case 0x205F: // \n case 0x3000: // \n case 0xFEFF: return true; // \n }\n return false;\n}\n\nexport function isAlpha(c: u32): bool {\n if (isAscii(c)) return (c | 32) - CharCode.a < 26;\n if (c < 0x20000) {\n // @ts-ignore: cast\n return stagedBinaryLookup(ALPHA_TABLE, c);\n }\n return c < 0x2FFFE;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isCased(c: u32): bool {\n // @ts-ignore: cast\n return c < 0x1F18A && stagedBinaryLookup(CASED, c);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isCaseIgnorable(c: u32): bool {\n // @ts-ignore: cast\n return c < 0xE01F0 && stagedBinaryLookup(CASE_IGNORABLES, c);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isFinalSigma(buffer: usize, index: isize, len: isize): bool {\n const lookaheadLimit = 30; // max lookahead limit\n let found = false;\n let pos = index;\n let minPos = max(0, pos - lookaheadLimit);\n while (pos > minPos) {\n let c = codePointBefore(buffer, pos);\n if (!isCaseIgnorable(c)) {\n if (isCased(c)) {\n found = true;\n } else {\n return false;\n }\n }\n pos -= isize(c >= 0x10000) + 1;\n }\n if (!found) return false;\n pos = index + 1;\n let maxPos = min(pos + lookaheadLimit, len);\n while (pos < maxPos) {\n let c = load(buffer + (pos << 1));\n if (u32((c & 0xFC00) == 0xD800) & u32(pos + 1 != len)) {\n let c1 = load(buffer + (pos << 1), 2);\n if ((c1 & 0xFC00) == 0xDC00) {\n c = (c - 0xD800 << 10) + (c1 - 0xDC00) + 0x10000;\n }\n }\n if (!isCaseIgnorable(c)) {\n return !isCased(c);\n }\n pos += isize(c >= 0x10000) + 1;\n }\n return true;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction codePointBefore(buffer: usize, index: isize): i32 {\n if (index <= 0) return -1;\n let c = load(buffer + (index - 1 << 1));\n if (u32((c & 0xFC00) == 0xDC00) & u32(index - 2 >= 0)) {\n let c1 = load(buffer + (index - 2 << 1));\n if ((c1 & 0xFC00) == 0xD800) {\n return ((c1 & 0x3FF) << 10) + (c & 0x3FF) + 0x10000;\n }\n }\n return (c & 0xF800) == 0xD800 ? 0xFFFD : c;\n}\n\n// Search routine for two-staged lookup tables\nfunction stagedBinaryLookup(table: usize, c: u32): bool {\n return ((load(table + (load(table + (c >>> 8)) << 5) + ((c & 255) >> 3)) >>> (c & 7)) & 1);\n}\n\nexport function compareImpl(str1: string, index1: usize, str2: string, index2: usize, len: usize): i32 {\n let ptr1 = changetype(str1) + (index1 << 1);\n let ptr2 = changetype(str2) + (index2 << 1);\n if (ASC_SHRINK_LEVEL < 2) {\n if (len >= 4 && !((ptr1 & 7) | (ptr2 & 7))) {\n do {\n if (load(ptr1) != load(ptr2)) break;\n ptr1 += 8;\n ptr2 += 8;\n len -= 4;\n } while (len >= 4);\n }\n }\n while (len--) {\n let a = load(ptr1);\n let b = load(ptr2);\n if (a != b) return a - b;\n ptr1 += 2;\n ptr2 += 2;\n }\n return 0;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function toLower8(c: u32): u32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return c | u32(isUpper8(c)) << 5;\n } else {\n return load(LOWER127 + c);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function toUpper8(c: u32): u32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return c & ~(u32(isLower8(c)) << 5);\n } else {\n return load(UPPER127 + c);\n }\n}\n\n/** Parses a string to an integer (usually), using the specified radix. */\nexport function strtol(str: string, radix: i32 = 0): T {\n let len = str.length;\n if (!len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n\n let ptr = changetype(str) /* + HEAD -> offset */;\n let code = load(ptr);\n\n // trim white spaces\n while (isSpace(code)) {\n code = load(ptr += 2);\n --len;\n }\n // determine sign\n // @ts-ignore\n let sign: T = 1;\n if (code == CharCode.MINUS || code == CharCode.PLUS) {\n if (!--len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n if (code == CharCode.MINUS) {\n // @ts-ignore: type\n sign = -1;\n }\n code = load(ptr += 2);\n }\n\n // See https://tc39.es/ecma262/#sec-parseint-string-radix\n if (radix) {\n if (radix < 2 || radix > 36) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n // handle case as parseInt(\"0xFF\", 16) by spec\n if (radix == 16) {\n if (\n len > 2 &&\n code == CharCode._0 &&\n (load(ptr, 2) | 32) == CharCode.x\n ) {\n ptr += 4; len -= 2;\n }\n }\n } else {\n // determine radix by literal prefix\n if (code == CharCode._0 && len > 2) {\n switch (load(ptr, 2) | 32) {\n case CharCode.b: {\n ptr += 4; len -= 2;\n radix = 2;\n break;\n }\n case CharCode.o: {\n ptr += 4; len -= 2;\n radix = 8;\n break;\n }\n case CharCode.x: {\n ptr += 4; len -= 2;\n radix = 16;\n break;\n }\n }\n }\n if (!radix) radix = 10;\n }\n\n // calculate value\n // @ts-ignore: type\n let num: T = 0;\n let initial = len - 1;\n while (len--) {\n code = load(ptr);\n if (code - CharCode._0 < 10) {\n code -= CharCode._0;\n } else if (code - CharCode.A <= (CharCode.Z - CharCode.A)) {\n code -= CharCode.A - 10;\n } else if (code - CharCode.a <= (CharCode.z - CharCode.a)) {\n code -= CharCode.a - 10;\n }\n if (code >= radix) {\n if (initial == len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n break;\n }\n // @ts-ignore: type\n num = num * radix + code;\n ptr += 2;\n }\n // @ts-ignore: type\n return sign * num;\n}\n\nexport function strtod(str: string): f64 {\n let len = str.length;\n if (!len) return NaN;\n\n let ptr = changetype(str);\n let code = load(ptr);\n\n let sign = 1.0;\n // skip white spaces\n while (len && isSpace(code)) {\n code = load(ptr += 2);\n --len;\n }\n if (!len) return NaN;\n\n // try parse '-' or '+'\n if (code == CharCode.MINUS) {\n if (!--len) return NaN;\n code = load(ptr += 2);\n sign = -1;\n } else if (code == CharCode.PLUS) {\n if (!--len) return NaN;\n code = load(ptr += 2);\n }\n\n // try parse Infinity\n if (len >= 8 && code == CharCode.I) {\n if (\n load(ptr, 0) == 0x690066006E0049 && // ifnI\n load(ptr, 8) == 0x7900740069006E // ytin\n ) {\n return Infinity * sign;\n }\n return NaN;\n }\n // validate next symbol\n if (code != CharCode.DOT && (code - CharCode._0) >= 10) {\n return NaN;\n }\n let savedPtr = ptr;\n // skip zeros\n while (code == CharCode._0) {\n code = load(ptr += 2);\n --len;\n }\n if (len <= 0) return 0.0 * sign;\n const capacity = 19; // int(64 * 0.3010)\n let pointed = false;\n let consumed = 0;\n let position = 0;\n let x: u64 = 0;\n if (code == CharCode.DOT) {\n let noDigits = !(savedPtr - ptr);\n ptr += 2; --len;\n if (!len && noDigits) return NaN;\n for (pointed = true; (code = load(ptr)) == CharCode._0; --position, ptr += 2) --len;\n if (len <= 0) return 0.0 * sign;\n if (!position && noDigits && code - CharCode._0 >= 10) return NaN;\n }\n for (let digit = code - CharCode._0; digit < 10 || (code == CharCode.DOT && !pointed); digit = code - CharCode._0) {\n if (digit < 10) {\n x = consumed < capacity ? 10 * x + digit : x | u64(!!digit);\n ++consumed;\n } else {\n position = consumed;\n pointed = true;\n }\n if (!--len) break;\n code = load(ptr += 2);\n }\n\n if (!pointed) position = consumed;\n return copysign(scientific(x, position - min(capacity, consumed) + parseExp(ptr, len)), sign);\n}\n\nexport function strtob(str: string): bool {\n let size: usize = str.length << 1;\n let offset: usize = 0;\n if (size > 8) {\n // try trim end whitespaces first\n while (size && isSpace(load(changetype(str) + size - 2))) size -= 2;\n if (size > 8) {\n // trim start whitespaces\n while (offset < size && isSpace(load(changetype(str) + offset))) offset += 2;\n size -= offset;\n }\n }\n if (size != 8) return false;\n // \"true\" represents as \\00\\e\\00\\u\\00\\e\\00\\t (00 65 00 75 00 72 00 74)\n return load(changetype(str) + offset) == 0x0065_0075_0072_0074;\n}\n\nexport function joinBooleanArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) return select(\"true\", \"false\", load(dataStart));\n\n let sepLen = separator.length;\n let valueLen = 5; // max possible length of element len(\"false\")\n let estLen = (valueLen + sepLen) * lastIndex + valueLen;\n let result = changetype(__new(estLen << 1, idof()));\n let offset = 0;\n let value: bool;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + i);\n valueLen = 4 + i32(!value);\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(select(\"true\", \"false\", value)),\n valueLen << 1\n );\n offset += valueLen;\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + lastIndex);\n valueLen = 4 + i32(!value);\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(select(\"true\", \"false\", value)),\n valueLen << 1\n );\n offset += valueLen;\n\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinIntegerArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n let value = load(dataStart);\n if (isSigned()) {\n if (sizeof() <= 4) {\n // @ts-ignore: type\n return changetype(itoa32(value, 10));\n } else {\n // @ts-ignore: type\n return changetype(itoa64(value, 10));\n }\n } else {\n if (sizeof() <= 4) {\n // @ts-ignore: type\n return changetype(utoa32(value, 10));\n } else {\n // @ts-ignore: type\n return changetype(utoa64(value, 10));\n }\n }\n }\n\n let sepLen = separator.length;\n const valueLen = (sizeof() <= 4 ? 10 : 20) + i32(isSigned());\n let estLen = (valueLen + sepLen) * lastIndex + valueLen;\n let result = changetype(__new(estLen << 1, idof()));\n let offset = 0;\n let value: T;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n offset += itoa_buffered(changetype(result) + (offset << 1), value);\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n offset += itoa_buffered(changetype(result) + (offset << 1), value);\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinFloatArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n return changetype(dtoa(\n // @ts-ignore: type\n load(dataStart))\n );\n }\n\n const valueLen = MAX_DOUBLE_LENGTH;\n let sepLen = separator.length;\n let estLen = (valueLen + sepLen) * lastIndex + valueLen;\n let result = changetype(__new(estLen << 1, idof()));\n let offset = 0;\n let value: T;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n offset += dtoa_buffered(changetype(result) + (offset << 1), value);\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n offset += dtoa_buffered(changetype(result) + (offset << 1), value);\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinStringArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n // @ts-ignore: type\n return load(dataStart) || \"\";\n }\n let estLen = 0;\n let value: string;\n for (let i = 0; i < length; ++i) {\n value = load(dataStart + (i << alignof()));\n if (changetype(value) != 0) estLen += value.length;\n }\n let offset = 0;\n let sepLen = separator.length;\n let result = changetype(__new((estLen + sepLen * lastIndex) << 1, idof()));\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n if (changetype(value) != 0) {\n let valueLen = value.length;\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(value),\n valueLen << 1\n );\n offset += valueLen;\n }\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n if (changetype(value) != 0) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(value),\n value.length << 1\n );\n }\n return result;\n}\n\nexport function joinReferenceArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n let value: T;\n if (!lastIndex) {\n value = load(dataStart);\n // @ts-ignore: type\n return value != null ? value.toString() : \"\";\n }\n let result = \"\";\n let sepLen = separator.length;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n if (value != null) result += value.toString();\n if (sepLen) result += separator;\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n if (value != null) result += value.toString();\n return result;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction scientific(significand: u64, exp: i32): f64 {\n if (!significand || exp < -342) return 0;\n if (exp > 308) return Infinity;\n // Try use fast path\n // Use fast path for string-to-double conversion if possible\n // see http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion\n // Simple integer\n let significandf = significand;\n if (!exp) return significandf;\n if (exp > 22 && exp <= 22 + 15) {\n significandf *= pow10(exp - 22);\n exp = 22;\n }\n if (significand <= 9007199254740991 && abs(exp) <= 22) {\n if (exp > 0) return significandf * pow10(exp);\n return significandf / pow10(-exp);\n } else if (exp < 0) {\n return scaledown(significand, exp);\n } else {\n return scaleup(significand, exp);\n }\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction scaledown(significand: u64, exp: i32): f64 {\n const denom: u64 = 6103515625; // 1e14 * 0x1p-14\n const scale = reinterpret(0x3F06849B86A12B9B); // 1e-14 * 0x1p32\n\n let shift = clz(significand);\n significand <<= shift;\n shift = exp - shift;\n\n for (; exp <= -14; exp += 14) {\n let q = significand / denom;\n let r = significand % denom;\n let s = clz(q);\n significand = (q << s) + nearest(scale * (r << (s - 18)));\n shift -= s;\n }\n let b = ipow32(5, -exp);\n let q = significand / b;\n let r = significand % b;\n let s = clz(q);\n significand = (q << s) + (reinterpret(reinterpret(r) + (s << 52)) / b);\n shift -= s;\n\n return NativeMath.scalbn(significand, shift);\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction scaleup(significand: u64, exp: i32): f64 {\n const coeff: u32 = 1220703125; // 1e13 * 0x1p-13;\n let shift = ctz(significand);\n significand >>= shift;\n shift += exp;\n\n __fixmulShift = shift;\n for (; exp >= 13; exp -= 13) {\n significand = fixmul(significand, coeff);\n }\n significand = fixmul(significand, ipow32(5, exp));\n shift = __fixmulShift;\n return NativeMath.scalbn(significand, shift);\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction parseExp(ptr: usize, len: i32): i32 {\n let sign = 1, magnitude = 0;\n let code = load(ptr);\n // check code is 'e' or 'E'\n if ((code | 32) != CharCode.e) return 0;\n\n if (!--len) return 0;\n code = load(ptr += 2);\n if (code == CharCode.MINUS) {\n if (!--len) return 0;\n code = load(ptr += 2);\n sign = -1;\n } else if (code == CharCode.PLUS) {\n if (!--len) return 0;\n code = load(ptr += 2);\n }\n // skip zeros\n while (code == CharCode._0) {\n if (!--len) return 0;\n code = load(ptr += 2);\n }\n for (let digit: u32 = code - CharCode._0; len && digit < 10; digit = code - CharCode._0) {\n if (magnitude >= 3200) return sign * 3200;\n magnitude = 10 * magnitude + digit;\n code = load(ptr += 2);\n --len;\n }\n return sign * magnitude;\n}\n\n// @ts-ignore: decorator\n@lazy let __fixmulShift: u64 = 0;\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction fixmul(a: u64, b: u32): u64 {\n let low = (a & 0xFFFFFFFF) * b;\n let high = (a >> 32) * b + (low >> 32);\n let overflow = (high >> 32);\n let space = clz(overflow);\n let revspace: u64 = 32 - space;\n __fixmulShift += revspace;\n return (high << space | (low & 0xFFFFFFFF) >> revspace) + (low << space >> 31 & 1);\n}\n\n// @ts-ignore: decorator\n@inline\nfunction pow10(n: i32): f64 {\n // argument `n` should bounds in [0, 22] range\n return load(POWERS10 + (n << alignof()));\n}\n","/// \n\nimport { idof } from \"../builtins\";\nimport { CharCode } from \"./string\";\n\n// @ts-ignore: decorator\n@inline\nexport const MAX_DOUBLE_LENGTH = 28;\n\n// @ts-ignore: decorator\n@lazy @inline const POWERS10 = memory.data([\n 1,\n 10,\n 100,\n 1000,\n 10000,\n 100000,\n 1000000,\n 10000000,\n 100000000,\n 1000000000\n]);\n\n/*\n Lookup table for pairwise char codes in range [0-99]\n\n \"00\", \"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\",\n \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\",\n \"20\", \"21\", \"22\", \"23\", \"24\", \"25\", \"26\", \"27\", \"28\", \"29\",\n \"30\", \"31\", \"32\", \"33\", \"34\", \"35\", \"36\", \"37\", \"38\", \"39\",\n \"40\", \"41\", \"42\", \"43\", \"44\", \"45\", \"46\", \"47\", \"48\", \"49\",\n \"50\", \"51\", \"52\", \"53\", \"54\", \"55\", \"56\", \"57\", \"58\", \"59\",\n \"60\", \"61\", \"62\", \"63\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\",\n \"70\", \"71\", \"72\", \"73\", \"74\", \"75\", \"76\", \"77\", \"78\", \"79\",\n \"80\", \"81\", \"82\", \"83\", \"84\", \"85\", \"86\", \"87\", \"88\", \"89\",\n \"90\", \"91\", \"92\", \"93\", \"94\", \"95\", \"96\", \"97\", \"98\", \"99\"\n*/\n// @ts-ignore: decorator\n@lazy @inline const DIGITS = memory.data([\n 0x00300030, 0x00310030, 0x00320030, 0x00330030, 0x00340030,\n 0x00350030, 0x00360030, 0x00370030, 0x00380030, 0x00390030,\n 0x00300031, 0x00310031, 0x00320031, 0x00330031, 0x00340031,\n 0x00350031, 0x00360031, 0x00370031, 0x00380031, 0x00390031,\n 0x00300032, 0x00310032, 0x00320032, 0x00330032, 0x00340032,\n 0x00350032, 0x00360032, 0x00370032, 0x00380032, 0x00390032,\n 0x00300033, 0x00310033, 0x00320033, 0x00330033, 0x00340033,\n 0x00350033, 0x00360033, 0x00370033, 0x00380033, 0x00390033,\n 0x00300034, 0x00310034, 0x00320034, 0x00330034, 0x00340034,\n 0x00350034, 0x00360034, 0x00370034, 0x00380034, 0x00390034,\n 0x00300035, 0x00310035, 0x00320035, 0x00330035, 0x00340035,\n 0x00350035, 0x00360035, 0x00370035, 0x00380035, 0x00390035,\n 0x00300036, 0x00310036, 0x00320036, 0x00330036, 0x00340036,\n 0x00350036, 0x00360036, 0x00370036, 0x00380036, 0x00390036,\n 0x00300037, 0x00310037, 0x00320037, 0x00330037, 0x00340037,\n 0x00350037, 0x00360037, 0x00370037, 0x00380037, 0x00390037,\n 0x00300038, 0x00310038, 0x00320038, 0x00330038, 0x00340038,\n 0x00350038, 0x00360038, 0x00370038, 0x00380038, 0x00390038,\n 0x00300039, 0x00310039, 0x00320039, 0x00330039, 0x00340039,\n 0x00350039, 0x00360039, 0x00370039, 0x00380039, 0x00390039\n]);\n\n// Lookup table for pairwise char codes in range [0x00-0xFF]\n// @ts-ignore: decorator\n@lazy @inline const HEX_DIGITS =\n\"000102030405060708090a0b0c0d0e0f\\\n101112131415161718191a1b1c1d1e1f\\\n202122232425262728292a2b2c2d2e2f\\\n303132333435363738393a3b3c3d3e3f\\\n404142434445464748494a4b4c4d4e4f\\\n505152535455565758595a5b5c5d5e5f\\\n606162636465666768696a6b6c6d6e6f\\\n707172737475767778797a7b7c7d7e7f\\\n808182838485868788898a8b8c8d8e8f\\\n909192939495969798999a9b9c9d9e9f\\\na0a1a2a3a4a5a6a7a8a9aaabacadaeaf\\\nb0b1b2b3b4b5b6b7b8b9babbbcbdbebf\\\nc0c1c2c3c4c5c6c7c8c9cacbcccdcecf\\\nd0d1d2d3d4d5d6d7d8d9dadbdcdddedf\\\ne0e1e2e3e4e5e6e7e8e9eaebecedeeef\\\nf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff\";\n\n// @ts-ignore: decorator\n@lazy @inline const ANY_DIGITS = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\n// @ts-ignore: decorator\n@lazy @inline const EXP_POWERS = memory.data([/* eslint-disable indent */\n -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980,\n -954, -927, -901, -874, -847, -821, -794, -768, -741, -715,\n -688, -661, -635, -608, -582, -555, -529, -502, -475, -449,\n -422, -396, -369, -343, -316, -289, -263, -236, -210, -183,\n -157, -130, -103, -77, -50, -24, 3, 30, 56, 83,\n 109, 136, 162, 189, 216, 242, 269, 295, 322, 348,\n 375, 402, 428, 455, 481, 508, 534, 561, 588, 614,\n 641, 667, 694, 720, 747, 774, 800, 827, 853, 880,\n 907, 933, 960, 986, 1013, 1039, 1066\n/* eslint-enable indent */]);\n\n// 1e-348, 1e-340, ..., 1e340\n// @ts-ignore: decorator\n@lazy @inline const FRC_POWERS = memory.data([\n 0xFA8FD5A0081C0288, 0xBAAEE17FA23EBF76, 0x8B16FB203055AC76, 0xCF42894A5DCE35EA,\n 0x9A6BB0AA55653B2D, 0xE61ACF033D1A45DF, 0xAB70FE17C79AC6CA, 0xFF77B1FCBEBCDC4F,\n 0xBE5691EF416BD60C, 0x8DD01FAD907FFC3C, 0xD3515C2831559A83, 0x9D71AC8FADA6C9B5,\n 0xEA9C227723EE8BCB, 0xAECC49914078536D, 0x823C12795DB6CE57, 0xC21094364DFB5637,\n 0x9096EA6F3848984F, 0xD77485CB25823AC7, 0xA086CFCD97BF97F4, 0xEF340A98172AACE5,\n 0xB23867FB2A35B28E, 0x84C8D4DFD2C63F3B, 0xC5DD44271AD3CDBA, 0x936B9FCEBB25C996,\n 0xDBAC6C247D62A584, 0xA3AB66580D5FDAF6, 0xF3E2F893DEC3F126, 0xB5B5ADA8AAFF80B8,\n 0x87625F056C7C4A8B, 0xC9BCFF6034C13053, 0x964E858C91BA2655, 0xDFF9772470297EBD,\n 0xA6DFBD9FB8E5B88F, 0xF8A95FCF88747D94, 0xB94470938FA89BCF, 0x8A08F0F8BF0F156B,\n 0xCDB02555653131B6, 0x993FE2C6D07B7FAC, 0xE45C10C42A2B3B06, 0xAA242499697392D3,\n 0xFD87B5F28300CA0E, 0xBCE5086492111AEB, 0x8CBCCC096F5088CC, 0xD1B71758E219652C,\n 0x9C40000000000000, 0xE8D4A51000000000, 0xAD78EBC5AC620000, 0x813F3978F8940984,\n 0xC097CE7BC90715B3, 0x8F7E32CE7BEA5C70, 0xD5D238A4ABE98068, 0x9F4F2726179A2245,\n 0xED63A231D4C4FB27, 0xB0DE65388CC8ADA8, 0x83C7088E1AAB65DB, 0xC45D1DF942711D9A,\n 0x924D692CA61BE758, 0xDA01EE641A708DEA, 0xA26DA3999AEF774A, 0xF209787BB47D6B85,\n 0xB454E4A179DD1877, 0x865B86925B9BC5C2, 0xC83553C5C8965D3D, 0x952AB45CFA97A0B3,\n 0xDE469FBD99A05FE3, 0xA59BC234DB398C25, 0xF6C69A72A3989F5C, 0xB7DCBF5354E9BECE,\n 0x88FCF317F22241E2, 0xCC20CE9BD35C78A5, 0x98165AF37B2153DF, 0xE2A0B5DC971F303A,\n 0xA8D9D1535CE3B396, 0xFB9B7CD9A4A7443C, 0xBB764C4CA7A44410, 0x8BAB8EEFB6409C1A,\n 0xD01FEF10A657842C, 0x9B10A4E5E9913129, 0xE7109BFBA19C0C9D, 0xAC2820D9623BF429,\n 0x80444B5E7AA7CF85, 0xBF21E44003ACDD2D, 0x8E679C2F5E44FF8F, 0xD433179D9C8CB841,\n 0x9E19DB92B4E31BA9, 0xEB96BF6EBADF77D9, 0xAF87023B9BF0EE6B\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function isPowerOf2(value: T): bool {\n return popcnt(value) == 1;\n}\n\n// Count number of decimals for u32 values\n// In our case input value always non-zero so we can simplify some parts\nexport function decimalCount32(value: u32): u32 {\n if (value < 100000) {\n if (value < 100) {\n return 1 + u32(value >= 10);\n } else {\n return 3 + u32(value >= 10000) + u32(value >= 1000);\n }\n } else {\n if (value < 10000000) {\n return 6 + u32(value >= 1000000);\n } else {\n return 8 + u32(value >= 1000000000) + u32(value >= 100000000);\n }\n }\n}\n\n// Count number of decimals for u64 values\n// In our case input value always greater than 2^32-1 so we can skip some parts\nexport function decimalCount64High(value: u64): u32 {\n if (value < 1000000000000000) {\n if (value < 1000000000000) {\n return 10 + u32(value >= 100000000000) + u32(value >= 10000000000);\n } else {\n return 13 + u32(value >= 100000000000000) + u32(value >= 10000000000000);\n }\n } else {\n if (value < 100000000000000000) {\n return 16 + u32(value >= 10000000000000000);\n } else {\n return 18 + u32(value >= 10000000000000000000) + u32(value >= 1000000000000000000);\n }\n }\n}\n\nfunction ulog_base(num: u64, base: i32): u32 {\n if (isPowerOf2(base)) {\n return (63 - clz(num)) / (31 - clz(base)) + 1;\n }\n let b64 = u64(base), b = b64, e: u32 = 1;\n while (num >= b) {\n num /= b;\n b *= b;\n e <<= 1;\n }\n while (num >= 1) {\n num /= b64;\n e++;\n }\n return e - 1;\n}\n\nfunction utoa32_dec_lut(buffer: usize, num: u32, offset: usize): void {\n while (num >= 10000) {\n // in most VMs i32/u32 div and modulo by constant can be shared and simplificate\n let t = num / 10000;\n let r = num % 10000;\n num = t;\n\n let d1 = r / 100;\n let d2 = r % 100;\n\n let digits1 = load(DIGITS + (d1 << alignof()));\n let digits2 = load(DIGITS + (d2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n }\n\n if (num >= 100) {\n let t = num / 100;\n let d1 = num % 100;\n num = t;\n offset -= 2;\n let digits = load(DIGITS + (d1 << alignof()));\n store(buffer + (offset << 1), digits);\n }\n\n if (num >= 10) {\n offset -= 2;\n let digits = load(DIGITS + (num << alignof()));\n store(buffer + (offset << 1), digits);\n } else {\n offset -= 1;\n let digit = CharCode._0 + num;\n store(buffer + (offset << 1), digit);\n }\n}\n\nfunction utoa64_dec_lut(buffer: usize, num: u64, offset: usize): void {\n while (num >= 100000000) {\n let t = num / 100000000;\n let r = (num - t * 100000000);\n num = t;\n\n let b = r / 10000;\n let c = r % 10000;\n\n let b1 = b / 100;\n let b2 = b % 100;\n let c1 = c / 100;\n let c2 = c % 100;\n\n let digits1 = load(DIGITS + (c1 << alignof()));\n let digits2 = load(DIGITS + (c2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n\n digits1 = load(DIGITS + (b1 << alignof()));\n digits2 = load(DIGITS + (b2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n }\n\n utoa32_dec_lut(buffer, num, offset);\n}\n\nfunction utoa_hex_lut(buffer: usize, num: u64, offset: usize): void {\n const lut = changetype(HEX_DIGITS);\n while (offset >= 2) {\n offset -= 2;\n store(\n buffer + (offset << 1),\n load(lut + ((num & 0xFF) << alignof()))\n );\n num >>= 8;\n }\n if (offset & 1) {\n store(buffer, load(lut + (num << 6)));\n }\n}\n\nfunction utoa_dec_simple(buffer: usize, num: T, offset: usize): void {\n do {\n let t = num / 10;\n let r = (num % 10);\n num = changetype(t);\n offset--;\n store(buffer + (offset << 1), CharCode._0 + r);\n } while (num);\n}\n\nfunction utoa_hex_simple(buffer: usize, num: T, offset: usize): void {\n do {\n let d = num & 0x0F | CharCode._0;\n d += select(0x27, 0, d > CharCode._9);\n offset--;\n store(buffer + (offset << 1), d);\n // @ts-ignore: type\n num >>= 4;\n } while (num);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function utoa32_dec_core(buffer: usize, num: u32, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_dec_simple(buffer, num, offset);\n } else {\n utoa32_dec_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa32_hex_core(buffer: usize, num: u32, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_hex_simple(buffer, num, offset);\n } else {\n utoa_hex_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa64_dec_core(buffer: usize, num: u64, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_dec_simple(buffer, num, offset);\n } else {\n utoa64_dec_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa64_hex_core(buffer: usize, num: u64, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_hex_simple(buffer, num, offset);\n } else {\n utoa_hex_lut(buffer, num, offset);\n }\n}\n\nfunction utoa64_any_core(buffer: usize, num: u64, offset: usize, radix: i32): void {\n const lut = changetype(ANY_DIGITS);\n let base = u64(radix);\n if ((radix & (radix - 1)) == 0) { // for radix which pow of two\n let shift = u64(ctz(radix) & 7);\n let mask = base - 1;\n do {\n offset--;\n store(buffer + (offset << 1), load(lut + (usize(num & mask) << 1)));\n num >>= shift;\n } while (num);\n } else {\n do {\n offset--;\n let q = num / base;\n store(buffer + (offset << 1), load(lut + (usize(num - q * base) << 1)));\n num = q;\n } while (num);\n }\n}\n\nexport function utoa32(value: u32, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n let out: String;\n\n if (radix == 10) {\n let decimals = decimalCount32(value);\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), value, decimals);\n } else if (radix == 16) {\n let decimals = (31 - clz(value) >> 2) + 1;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n return out;\n}\n\nexport function itoa32(value: i32, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n\n let sign = (value >>> 31) << 1;\n if (sign) value = -value;\n let out: String;\n\n if (radix == 10) {\n let decimals = decimalCount32(value);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa32_dec_core(changetype(out) + sign, value, decimals);\n } else if (radix == 16) {\n let decimals = (31 - clz(value) >> 2) + 1;\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa32_hex_core(changetype(out) + sign, value, decimals);\n } else {\n let val32 = u32(value);\n let decimals = ulog_base(val32, radix);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa64_any_core(changetype(out) + sign, val32, decimals, radix);\n }\n if (sign) store(changetype(out), CharCode.MINUS);\n return out;\n}\n\nexport function utoa64(value: u64, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n let out: String;\n\n if (radix == 10) {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n let decimals = decimalCount32(val32);\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), val32, decimals);\n } else {\n let decimals = decimalCount64High(value);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_dec_core(changetype(out), value, decimals);\n }\n } else if (radix == 16) {\n let decimals = (63 - u32(clz(value)) >> 2) + 1;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n return out;\n}\n\nexport function itoa64(value: i64, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n\n let sign = u32(value >>> 63) << 1;\n if (sign) value = -value;\n let out: String;\n\n if (radix == 10) {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n let decimals = decimalCount32(val32);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa32_dec_core(changetype(out) + sign, val32, decimals);\n } else {\n let decimals = decimalCount64High(value);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa64_dec_core(changetype(out) + sign, value, decimals);\n }\n } else if (radix == 16) {\n let decimals = (63 - u32(clz(value)) >> 2) + 1;\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa64_hex_core(changetype(out) + sign, value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa64_any_core(changetype(out) + sign, value, decimals, radix);\n }\n if (sign) store(changetype(out), CharCode.MINUS);\n return out;\n}\n\n// @ts-ignore: decorator\n@lazy let _K: i32 = 0;\n\n// // @ts-ignore: decorator\n// @lazy\n// let _frc: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy let _exp: i32 = 0;\n\n// @ts-ignore: decorator\n@lazy let _frc_minus: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy let _frc_plus: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy let _frc_pow: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy let _exp_pow: i32 = 0;\n\n// @ts-ignore: decorator\n@inline\nfunction umul64f(u: u64, v: u64): u64 {\n let u0 = u & 0xFFFFFFFF;\n let v0 = v & 0xFFFFFFFF;\n\n let u1 = u >> 32;\n let v1 = v >> 32;\n\n let l = u0 * v0;\n let t = u1 * v0 + (l >> 32);\n let w = u0 * v1 + (t & 0xFFFFFFFF);\n\n w += 0x7FFFFFFF; // rounding\n\n t >>= 32;\n w >>= 32;\n\n return u1 * v1 + t + w;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction umul64e(e1: i32, e2: i32): i32 {\n return e1 + e2 + 64; // where 64 is significand size\n}\n\n// @ts-ignore: decorator\n@inline\nfunction normalizedBoundaries(f: u64, e: i32): void {\n let frc = (f << 1) + 1;\n let exp = e - 1;\n let off = clz(frc);\n frc <<= off;\n exp -= off;\n\n let m = 1 + i32(f == 0x0010000000000000);\n\n _frc_plus = frc;\n _frc_minus = ((f << m) - 1) << e - m - exp;\n _exp = exp;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u64, wp_w: u64): void {\n let lastp = buffer + ((len - 1) << 1);\n let digit = load(lastp);\n while (\n rest < wp_w &&\n delta - rest >= ten_kappa && (\n rest + ten_kappa < wp_w ||\n wp_w - rest > rest + ten_kappa - wp_w\n )\n ) {\n --digit;\n rest += ten_kappa;\n }\n store(lastp, digit);\n}\n\n// @ts-ignore: decorator\n@inline\nfunction getCachedPower(minExp: i32): void {\n const c = reinterpret(0x3FD34413509F79FE); // 1 / lg(10) = 0.30102999566398114\n let dk = (-61 - minExp) * c + 347;\t // dk must be positive, so can do ceiling in positive\n let k = dk;\n k += i32(k != dk); // conversion with ceil\n\n let index = (k >> 3) + 1;\n _K = 348 - (index << 3);\t// decimal exponent no need lookup table\n _frc_pow = load(FRC_POWERS + (index << alignof()));\n _exp_pow = load(EXP_POWERS + (index << alignof()));\n}\n\n// @ts-ignore: decorator\n@inline\nfunction grisu2(value: f64, buffer: usize, sign: i32): i32 {\n\n // frexp routine\n let uv = reinterpret(value);\n let exp = i32((uv & 0x7FF0000000000000) >>> 52);\n let sid = uv & 0x000FFFFFFFFFFFFF;\n let frc = (u64(exp != 0) << 52) + sid;\n exp = select(exp, 1, exp) - (0x3FF + 52);\n\n normalizedBoundaries(frc, exp);\n getCachedPower(_exp);\n\n // normalize\n let off = clz(frc);\n frc <<= off;\n exp -= off;\n\n let frc_pow = _frc_pow;\n let exp_pow = _exp_pow;\n\n let w_frc = umul64f(frc, frc_pow);\n let w_exp = umul64e(exp, exp_pow);\n\n let wp_frc = umul64f(_frc_plus, frc_pow) - 1;\n let wp_exp = umul64e(_exp, exp_pow);\n\n let wm_frc = umul64f(_frc_minus, frc_pow) + 1;\n let delta = wp_frc - wm_frc;\n\n return genDigits(buffer, w_frc, w_exp, wp_frc, wp_exp, delta, sign);\n}\n\nfunction genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i32, delta: u64, sign: i32): i32 {\n let one_exp = -mp_exp;\n let one_frc = (1) << one_exp;\n let mask = one_frc - 1;\n\n let wp_w_frc = mp_frc - w_frc;\n\n let p1 = u32(mp_frc >> one_exp);\n let p2 = mp_frc & mask;\n\n let kappa = decimalCount32(p1);\n let len = sign;\n\n while (kappa > 0) {\n let d: u32;\n switch (kappa) {\n case 10: { d = p1 / 1000000000; p1 %= 1000000000; break; }\n case 9: { d = p1 / 100000000; p1 %= 100000000; break; }\n case 8: { d = p1 / 10000000; p1 %= 10000000; break; }\n case 7: { d = p1 / 1000000; p1 %= 1000000; break; }\n case 6: { d = p1 / 100000; p1 %= 100000; break; }\n case 5: { d = p1 / 10000; p1 %= 10000; break; }\n case 4: { d = p1 / 1000; p1 %= 1000; break; }\n case 3: { d = p1 / 100; p1 %= 100; break; }\n case 2: { d = p1 / 10; p1 %= 10; break; }\n case 1: { d = p1; p1 = 0; break; }\n default: { d = 0; break; }\n }\n\n if (d | len) store(buffer + (len++ << 1), CharCode._0 + d);\n\n --kappa;\n let tmp = ((p1) << one_exp) + p2;\n if (tmp <= delta) {\n _K += kappa;\n grisuRound(buffer, len, delta, tmp, load(POWERS10 + (kappa << alignof())) << one_exp, wp_w_frc);\n return len;\n }\n }\n\n while (true) {\n p2 *= 10;\n delta *= 10;\n\n let d = p2 >> one_exp;\n if (d | len) store(buffer + (len++ << 1), CharCode._0 + d);\n\n p2 &= mask;\n --kappa;\n if (p2 < delta) {\n _K += kappa;\n wp_w_frc *= load(POWERS10 + (-kappa << alignof()));\n grisuRound(buffer, len, delta, p2, one_frc, wp_w_frc);\n return len;\n }\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction genExponent(buffer: usize, k: i32): i32 {\n let sign = k < 0;\n if (sign) k = -k;\n let decimals = decimalCount32(k) + 1;\n utoa32_dec_core(buffer, k, decimals);\n store(buffer, select(CharCode.MINUS, CharCode.PLUS, sign));\n return decimals;\n}\n\nfunction prettify(buffer: usize, length: i32, k: i32): i32 {\n if (!k) {\n store(buffer + (length << 1), CharCode.DOT | (CharCode._0 << 16));\n return length + 2;\n }\n\n let kk = length + k;\n if (length <= kk && kk <= 21) {\n // 1234e7 -> 12340000000\n for (let i = length; i < kk; ++i) {\n store(buffer + (i << 1), CharCode._0);\n }\n store(buffer + (kk << 1), CharCode.DOT | (CharCode._0 << 16));\n return kk + 2;\n } else if (kk > 0 && kk <= 21) {\n // 1234e-2 -> 12.34\n let ptr = buffer + (kk << 1);\n memory.copy(\n ptr + 2,\n ptr,\n -k << 1\n );\n store(buffer + (kk << 1), CharCode.DOT);\n return length + 1;\n } else if (-6 < kk && kk <= 0) {\n // 1234e-6 -> 0.001234\n let offset = 2 - kk;\n memory.copy(\n buffer + (offset << 1),\n buffer,\n length << 1\n );\n store(buffer, CharCode._0 | (CharCode.DOT << 16));\n for (let i = 2; i < offset; ++i) {\n store(buffer + (i << 1), CharCode._0);\n }\n return length + offset;\n } else if (length == 1) {\n // 1e30\n store(buffer, CharCode.e, 2);\n length = genExponent(buffer + 4, kk - 1);\n return length + 2;\n } else {\n let len = length << 1;\n memory.copy(\n buffer + 4,\n buffer + 2,\n len - 2\n );\n store(buffer, CharCode.DOT, 2);\n store(buffer + len, CharCode.e, 2);\n length += genExponent(buffer + len + 4, kk - 1);\n return length + 2;\n }\n}\n\nfunction dtoa_core(buffer: usize, value: f64): i32 {\n let sign = i32(value < 0);\n if (sign) {\n value = -value;\n store(buffer, CharCode.MINUS);\n }\n // assert(value > 0 && value <= 1.7976931348623157e308);\n let len = grisu2(value, buffer, sign);\n len = prettify(buffer + (sign << 1), len - sign, _K);\n return len + sign;\n}\n\n// @ts-ignore: decorator\n@lazy @inline const dtoa_buf = memory.data(MAX_DOUBLE_LENGTH << 1);\n\nexport function dtoa(value: f64): String {\n if (value == 0) return \"0.0\";\n if (!isFinite(value)) {\n if (isNaN(value)) return \"NaN\";\n return select(\"-Infinity\", \"Infinity\", value < 0);\n }\n let size = dtoa_core(dtoa_buf, value) << 1;\n let result = changetype(__new(size, idof()));\n memory.copy(changetype(result), dtoa_buf, size);\n return result;\n}\n\nexport function itoa_buffered(buffer: usize, value: T): u32 {\n let sign: u32 = 0;\n if (isSigned()) {\n sign = u32(value < 0);\n if (sign) {\n if (sizeof() == 1) {\n if (value == -0x80) {\n // -0x80 -> -128\n store(buffer,\n CharCode.MINUS |\n (CharCode._0 + 1) << 16 |\n (CharCode._0 + 2) << 32 |\n (CharCode._0 + 8) << 48\n );\n return 4;\n }\n }\n if (sizeof() == 2) {\n if (value == -0x8000) {\n // -0x8000 -> -32768\n store(buffer,\n CharCode.MINUS |\n (CharCode._0 + 3) << 16 |\n (CharCode._0 + 2) << 32 |\n (CharCode._0 + 7) << 48\n ); // -327\n store(buffer + 8,\n (CharCode._0 + 6) << 0 |\n (CharCode._0 + 8) << 16\n ); // 68\n return 6;\n }\n }\n store(buffer, CharCode.MINUS);\n // @ts-ignore\n value = -value;\n }\n }\n let dest = buffer + (sign << 1);\n if (ASC_SHRINK_LEVEL <= 1) {\n if (isSigned()) {\n if (sizeof() <= 4) {\n if (value < 10) {\n store(dest, value | CharCode._0);\n return 1 + sign;\n }\n } else {\n if (value < 10) {\n store(dest, value | CharCode._0);\n return 1 + sign;\n }\n }\n } else {\n if (value < 10) {\n store(buffer, value | CharCode._0);\n return 1;\n }\n }\n }\n let decimals: u32 = 0;\n if (sizeof() <= 4) {\n let val32 = value;\n decimals = decimalCount32(val32);\n utoa32_dec_core(dest, val32, decimals);\n } else {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n decimals = decimalCount32(val32);\n utoa32_dec_core(dest, val32, decimals);\n } else {\n let val64 = value;\n decimals = decimalCount64High(val64);\n utoa64_dec_core(dest, val64, decimals);\n }\n }\n return sign + decimals;\n}\n\nexport function dtoa_buffered(buffer: usize, value: f64): u32 {\n if (value == 0) {\n store(buffer, CharCode._0);\n store(buffer, CharCode.DOT, 2);\n store(buffer, CharCode._0, 4);\n return 3;\n }\n if (!isFinite(value)) {\n if (isNaN(value)) {\n store(buffer, CharCode.N);\n store(buffer, CharCode.a, 2);\n store(buffer, CharCode.N, 4);\n return 3;\n } else {\n let sign = value < 0;\n if (sign) {\n store(buffer, CharCode.MINUS); // -\n buffer += 2;\n }\n store(buffer, 0x690066006E0049, 0); // ifnI\n store(buffer, 0x7900740069006E, 8); // ytin\n return 8 + u32(sign);\n }\n }\n return dtoa_core(buffer, value);\n}\n","import { itoa_buffered, dtoa_buffered } from \"util/number\";\n\nconst MIN_BUFFER_LEN = 32;\nconst MIN_BUFFER_SIZE: u32 = MIN_BUFFER_LEN << 1;\n\nconst NEW_LINE_CHAR: u16 = 0x0A; // \\n\n\n// @ts-ignore: decorator\nfunction nextPowerOf2(n: u32): u32 {\n return 1 << 32 - clz(n - 1);\n}\n\nexport class Sink {\n public buffer!: ArrayBuffer;\n public offset: u32 = 0;\n\n static withCapacity(capacity: i32): Sink {\n const sink = new Sink();\n sink.buffer = changetype(__new(\n max(MIN_BUFFER_SIZE, capacity << 1),\n idof())\n );\n return sink;\n }\n\n static fromString(initial: string = \"\", capacity: i32 = MIN_BUFFER_LEN): Sink {\n const sink = new Sink();\n const size = initial.length << 1;\n sink.buffer = changetype(__new(\n max(size, max(MIN_BUFFER_SIZE, capacity << 1)),\n idof())\n );\n if (size) {\n memory.copy(\n changetype(sink.buffer),\n changetype(initial),\n size\n );\n sink.offset += size;\n }\n return sink;\n }\n\n static fromStringLiteral(initial: string = \"\"): Sink {\n const sink = new Sink();\n const size = initial.length << 1;\n sink.buffer = changetype(__new(\n size,\n idof())\n );\n if (size) {\n memory.copy(\n changetype(sink.buffer),\n changetype(initial),\n size\n );\n sink.offset += size;\n }\n return sink;\n }\n\n static fromBuffer(initial: ArrayBuffer, capacity: i32 = MIN_BUFFER_LEN): Sink {\n const sink = new Sink();\n const size = initial.byteLength;\n sink.buffer = changetype(__new(\n max(size, max(MIN_BUFFER_SIZE, capacity << 1)),\n idof())\n );\n if (size) {\n memory.copy(\n changetype(sink.buffer),\n changetype(initial),\n size\n );\n sink.offset = size;\n }\n return sink;\n }\n\n constructor() { }\n\n get length(): i32 {\n return this.offset >> 1;\n }\n\n get capacity(): i32 {\n return this.buffer.byteLength >>> 1;\n }\n reset(): void {\n this.offset = 0;\n }\n write(src: string, start: i32 = 0, end: i32 = i32.MAX_VALUE): Sink | null {\n let len = src.length as u32;\n\n if (start != 0 || end != i32.MAX_VALUE) {\n let from: i32;\n from = min(max(start, 0), len);\n end = min(max(end, 0), len);\n start = min(from, end);\n end = max(from, end);\n len = end - start;\n }\n\n if (!len) return null;\n\n let size = len << 1;\n this.ensureCapacity(size);\n let offset = this.offset;\n\n memory.copy(\n changetype(this.buffer) + offset,\n changetype(src) + (start << 1),\n size\n );\n this.offset = offset + size;\n return this;\n }\n\n writeLn(src: string = \"\", start: i32 = 0, end: i32 = i32.MAX_VALUE): Sink {\n let len = src.length as u32;\n if (start != 0 || end != i32.MAX_VALUE) {\n let from: i32;\n from = min(max(start, 0), len);\n end = min(max(end, 0), len);\n start = min(from, end);\n end = max(from, end);\n len = end - start;\n }\n\n let size = len << 1;\n this.ensureCapacity(size + 2);\n let offset = this.offset;\n let dest = changetype(this.buffer) + offset;\n if (size) memory.copy(dest, changetype(src) + (start << 1), size);\n store(dest + size, NEW_LINE_CHAR);\n this.offset = offset + (size + 2);\n return this;\n }\n\n writeCodePoint(code: i32): Sink {\n let hasSur = code > 0xFFFF;\n this.ensureCapacity(2 << i32(hasSur));\n\n let offset = this.offset;\n let dest = changetype(this.buffer) + offset;\n\n if (!hasSur) {\n store(dest, code);\n this.offset = offset + 2;\n } else {\n assert(code <= 0x10FFFF);\n code -= 0x10000;\n let hi = (code & 0x03FF) | 0xDC00;\n let lo = code >>> 10 | 0xD800;\n store(dest, lo | hi << 16);\n this.offset = offset + 4;\n }\n return this;\n }\n\n writeCodePoint16(code: i32): Sink {\n this.ensureCapacity(2);\n\n let offset = this.offset;\n let dest = changetype(this.buffer) + offset;\n\n store(dest, code);\n this.offset = offset + 2;\n\n return this;\n }\n\n writeCodePointUnsafe(code: i32): Sink {\n this.ensureCapacity(2);\n\n let offset = this.offset;\n let dest = changetype(this.buffer) + offset;\n\n code -= 0x10000;\n let hi = (code & 0x03FF) | 0xDC00;\n let lo = code >>> 10 | 0xD800;\n store(dest, lo | hi << 16);\n this.offset = offset + 4;\n return this;\n }\n\n writeNumber(value: T): Sink {\n let offset = this.offset;\n if (isInteger()) {\n let maxCapacity = 0;\n // this also include size for sign\n if (sizeof() == 1) {\n maxCapacity = 4 << 1;\n } else if (sizeof() == 2) {\n maxCapacity = 6 << 1;\n } else if (sizeof() == 4) {\n maxCapacity = 11 << 1;\n } else if (sizeof() == 8) {\n maxCapacity = 21 << 1;\n }\n this.ensureCapacity(maxCapacity);\n offset += itoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n } else {\n this.ensureCapacity(32 << 1);\n offset += dtoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n }\n this.offset = offset;\n return this;\n }\n writeNumberUnsafe(value: T): Sink {\n let offset = this.offset;\n if (isInteger()) {\n offset += itoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n } else {\n offset += dtoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n }\n this.offset = offset;\n return this;\n }\n writeIntegerUnsafe(value: T): Sink {\n let offset = this.offset;\n if (isInteger()) {\n offset += itoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n } else {\n offset += dtoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n }\n this.offset = offset;\n return this;\n }\n\n reserve(capacity: i32, clear: bool = false): void {\n if (clear) this.offset = 0;\n this.buffer = changetype(__renew(\n changetype(this.buffer),\n max(this.offset, max(MIN_BUFFER_SIZE, capacity << 1))\n ));\n }\n\n shrink(): void {\n this.buffer = changetype(__renew(\n changetype(this.buffer),\n max(this.offset, MIN_BUFFER_SIZE)\n ));\n }\n\n clear(): void {\n this.reserve(0, true);\n }\n\n toString(): string {\n let size = this.offset;\n if (!size) return \"\";\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this.buffer), size);\n return out;\n }\n\n ensureCapacity(deltaBytes: u32): void {\n let buffer = this.buffer;\n let newSize = this.offset + deltaBytes;\n if (newSize > buffer.byteLength) {\n this.buffer = changetype(__renew(\n changetype(buffer),\n nextPowerOf2(newSize)\n ));\n }\n }\n}","const enum Discriminator {\n Bool,\n I8, I16, I32, I64,\n U8, U16, U32, U64,\n F32, F64,\n UnmanagedRef,\n ManagedRef\n}\n\n// @ts-ignore: decorator\n@inline\nfunction DISCRIMINATOR(): Discriminator {\n if (isManaged()) return Discriminator.ManagedRef + idof();\n if (isReference()) return Discriminator.UnmanagedRef;\n const value: T = 0;\n if (value instanceof bool) return Discriminator.Bool;\n if (value instanceof i8) return Discriminator.I8;\n if (value instanceof i16) return Discriminator.I16;\n if (value instanceof i32) return Discriminator.I32;\n if (value instanceof i64) return Discriminator.I64;\n if (value instanceof u8) return Discriminator.U8;\n if (value instanceof u16) return Discriminator.U16;\n if (value instanceof u32) return Discriminator.U32;\n if (value instanceof u64) return Discriminator.U64;\n if (value instanceof f32) return Discriminator.F32;\n if (value instanceof f64) return Discriminator.F64;\n return unreachable();\n}\n\n// @ts-ignore: decorator\n@inline\nconst STORAGE = offsetof(\"storage\");\n\n@final\nexport class Variant {\n\n @inline static from(value: T): Variant {\n var out = changetype(__new(offsetof(), idof()));\n out.set(value);\n return out;\n }\n\n @inline static idof(): i32 {\n return DISCRIMINATOR();\n }\n\n private discriminator: i32;\n private storage: u64;\n\n private constructor() { unreachable(); }\n\n @inline get id(): i32 {\n return this.discriminator;\n }\n\n @inline set(value: T): void {\n this.discriminator = DISCRIMINATOR();\n store(changetype(this), value, STORAGE);\n }\n\n @inline get(): T {\n if (!this.is()) throw new Error(\"type mismatch\");\n let value = this.getUnchecked();\n if (isReference() && !isNullable()) {\n if (!value) throw new Error(\"unexpected null\");\n }\n return value;\n }\n\n @unsafe @inline getUnchecked(): T {\n return load(changetype(this), STORAGE);\n }\n\n @inline is(): bool {\n return this.discriminator == DISCRIMINATOR();\n }\n\n @unsafe private __visit(cookie: u32): void {\n if (this.discriminator >= Discriminator.ManagedRef) {\n let ptr = this.getUnchecked();\n if (ptr) __visit(ptr, cookie);\n }\n }\n}\n","// @ts-ignore\n@inline\nconst LOW_MASK: u32 = 0xffffffff;\n\n// @ts-ignore\n@inline\nconst LIMB_BITS: u32 = 32;\n\n// @ts-ignore\n@inline\nconst BASE: u64 = 1 << LIMB_BITS;\n\n// BigInteger must support values in this range\n// -2**I32.MAX_VALUE (exclusive) - +2**I32.MAX_VALUE (exclusive)\n// However, realistically memory limits the maximum size of the MpZ\n\n// @ts-ignore\n@inline\nconst MAX_LIMBS: u32 = I32.MAX_VALUE; // 2**31-1, experimental: ~2**27-1, realistic: ~< 2**25-1\n\n// @ts-ignore\n@inline\nfunction LOW(value: u64): u32 {\n return u32(value & LOW_MASK);\n}\n\n// @ts-ignore\n@inline\nfunction HIGH(value: u64): u32 {\n return u32(value >> LIMB_BITS);\n}\n\nfunction fromI32(value: i32): MpZ {\n const neg = value < 0;\n if (value < 0) {\n value = -value;\n }\n return fromU32(value, neg);\n}\n\n// @ts-ignore\n@inline\nfunction fromU32(value: u32, neg: boolean = false): MpZ {\n return new MpZ([u32(value)], neg);\n}\n\nfunction fromI64(value: i64): MpZ {\n if (value < 0) return fromU64(-(value), true);\n return fromU64(value);\n}\n\nfunction fromU64(value: u64, neg: boolean = false): MpZ {\n const hi = HIGH(value);\n const lo = LOW(value);\n if (hi === 0) {\n return fromU32(lo, neg);\n }\n return new MpZ([lo, hi], neg);\n}\n\nfunction codeToU32(code: u32): u32 {\n if (code >= 48 && code <= 57) {\n return (code - 48);\n }\n if (code >= 65 && code <= 90) {\n return (code - 55);\n }\n if (code >= 97 && code <= 122) {\n return (code - 87);\n }\n throw new Error(`Invalid digit code ${code}`);\n}\n\nfunction fromStringU(value: string, base: u32 = 10): MpZ {\n let res = MpZ.ZERO;\n if (value === '0') return res;\n for (let i = 0; i < value.length; i++) {\n const code: u32 = value.charCodeAt(i);\n const val = codeToU32(code);\n res = res.mul(base).add(val);\n }\n return res;\n}\n\nfunction getBase(str: string): u32 {\n if (str.length < 3) return 10;\n\n if (str.charAt(0) === '0') {\n switch (str.charCodeAt(1)) {\n case 98: // b\n case 66: // B\n return 2;\n case 111: // o\n case 79: // O\n return 8;\n case 120: // x\n case 88: // X\n return 16;\n }\n }\n return 10;\n}\n\nfunction fromString(value: string): MpZ {\n const neg = value.substr(0, 1) === '-';\n value = neg ? value.substr(1) : value;\n const base = getBase(value);\n\n const r =\n base === 10 ? fromStringU(value, 10) : fromStringU(value.substr(2), base);\n return neg ? r.negate() : r;\n}\n\n// @ts-ignore\n@lazy\nconst LOG2_10: f64 = Math.log2(10);\n\n// Constants for decimal conversion\n// @ts-ignore\n@inline\nconst DIGITS_PER_LIMB = 9;\n\n// @ts-ignore\n@inline\nconst TO_DECIMAL_N = 1000000000; // 10 ** 9;\n\n/** @internal */\nexport class DivRem {\n div!: MpZ;\n rem!: R;\n}\n\n/**\n * ## `as-mpz` API\n *\n * Value is stored as a sign and magnitude.\n *\n * > Note: Arithmatic methods and operators can be used interchangably, with operators acting as shorthand for the methods.\n * > However, unlike instance methods, the operators do not coerce inputs to an MpZ.\n */\n\n// @ts-ignore\n@final\nexport class MpZ {\n // Contains the size and sign of the MpZ\n // The sign is stored as the negation of the size\n // This size excludes leading zero limbs (except for least significant limb)\n protected readonly _sgn_size: i32;\n\n // Contains the limbs of the MpZ\n // The last limb is the most significant\n // The first limb is the least significant\n // The most significant limb may be zero, never use _data.length to get the size\n protected readonly _data: StaticArray;\n\n // Should not be used directly\n // Mutating _data will cause unexpected behavior\n constructor(data: StaticArray, neg: boolean = false) {\n assert(ASC_NO_ASSERT || data.length > 0, 'MpZ must have at least 1 limb');\n\n let size = data.length;\n\n // Reduce size by leading zeros\n while (size > 1 && unchecked(data[size - 1] === 0)) {\n size--;\n }\n\n if (size === 0) {\n this._data = [0];\n this._sgn_size = 1;\n } else {\n this._data = data;\n this._sgn_size = neg ? -size : size;\n }\n }\n\n /**\n * ### Constructor\n */\n\n /**\n * #### `MpZ.from(value: i32 | u32 | i64 | u64 | string): MpZ`\n *\n * Creates a new MpZ from a number or string. The `MpZ.from` method accepts a number or string. The string can be in decimal or hexadecimal format (prefixed with `0x`). The string can also be prefixed with `-` to indicate a negative number.\n *\n * > Note: The MpZ class should not be instantiated directly (using `new`). Instead use the static `MpZ.from` method to create a new MpZ.\n */\n static from(val: T): MpZ {\n if (val instanceof MpZ) return val;\n if (val instanceof i32) return fromI32(val as i32);\n if (val instanceof u32) return fromU32(val as u32);\n if (val instanceof i64) return fromI64(val as i64);\n if (val instanceof u64) return fromU64(val as u64);\n if (typeof val === 'string') return fromString(val);\n\n throw new TypeError('Unsupported generic type ' + nameof(val));\n }\n\n /**\n * ### Instance Methods\n */\n\n /**\n * #### `#isNeg(): boolean`\n *\n * @returns `true` if `this` MpZ is negative, otherwise `false`.\n */\n // @ts-ignore\n @inline\n get isNeg(): boolean {\n return this._sgn_size < 0;\n }\n\n // Returns the number of limbs in `this` MpZ (excluding leading zeros)\n // @ts-ignore\n @inline\n get size(): i32 {\n return this._sgn_size < 0 ? -this._sgn_size : this._sgn_size;\n }\n\n /**\n * #### `#abs(): MpZ`\n *\n * @returns the absolute value of `this` MpZ.\n */\n abs(): MpZ {\n return this.isNeg ? new MpZ(this._data) : this;\n }\n\n /**\n * #### `#sign(): MpZ`\n *\n * @returns the sign of `this` MpZ, indicating whether x is positive (`1`), negative (`-1`), or zero (`0`).\n */\n sign(): i32 {\n if (this._sgn_size < 0) return -1;\n if (this.eqz()) return 0;\n return 1;\n }\n\n /**\n * #### `#isOdd(): MpZ`\n *\n * @returns `true` if `this` MpZ is odd, otherwise `false`.\n */\n isOdd(): boolean {\n return (unchecked(this._data[0]) & 1) === 1;\n }\n\n /**\n * #### `#isEven(): boolean`\n *\n * @returns `true` if `this` MpZ is even, otherwise `false`.\n */\n isEven(): boolean {\n return (unchecked(this._data[0]) & 1) === 0;\n }\n\n /**\n * #### `#negate(): MpZ`\n *\n * @returns the negation of `this` MpZ (`-this`).\n */\n // @ts-ignore\n negate(): MpZ {\n if (this.eqz()) return MpZ.ZERO;\n return new MpZ(this._data, !this.isNeg);\n }\n\n // *** Addition ***\n\n /**\n * #### `#add(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the sum of `this` MpZ and `rhs`.\n */\n // @ts-ignore\n add(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n\n if (this.isNeg && y.isNeg) return this._uadd(y).negate(); // -a + -b = -(a + b)\n if (this.isNeg) return y._usub(this); // -a + b = b - a\n if (y.isNeg) return this._usub(y); // a + -b = a - b\n return this._uadd(y);\n }\n\n // unsigned addition\n // treats values as unsigned\n protected _uadd(rhs: MpZ): MpZ {\n if (this.size < rhs.size) return rhs._uadd(this); // a + b = b + a\n if (rhs.size === 1) return this._uaddU32(unchecked(rhs._data[0]));\n return this.__uadd(rhs);\n }\n\n // unsigned addition\n // ordered such that Size(lhs) > Size(rhs)\n // treats values as unsigned\n protected __uadd(rhs: MpZ): MpZ {\n const q = this.size;\n const p = rhs.size;\n\n assert(ASC_NO_ASSERT || q >= p, '_uadd: Size(lhs) must be >= Size(rhs)');\n\n const z = new StaticArray(q + 1);\n\n let k: bool = 0;\n let i: i32 = 0;\n for (; i < p; ++i) {\n const lx = unchecked(this._data[i]);\n const ly = unchecked(rhs._data[i]);\n unchecked((z[i] = lx + ly + k));\n k = unchecked(z[i] < lx) || unchecked(k && z[i] === lx);\n }\n for (; i < q; ++i) {\n const lx = unchecked(this._data[i]);\n unchecked((z[i] = lx + k));\n k = unchecked(z[i] < lx);\n }\n unchecked((z[q] = k));\n\n return new MpZ(z);\n }\n\n // unsigned addition by uint32\n // treats values as unsigned\n protected _uaddU32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q + 1);\n\n let k: u32 = rhs;\n for (let i: i32 = 0; i < q; ++i) {\n unchecked((z[i] = k + this._data[i]));\n k = unchecked(z[i] < this._data[i]) ? 1 : 0;\n }\n unchecked((z[q] = k));\n return new MpZ(z);\n }\n\n /**\n * #### `#inc(): MpZ`\n *\n * @returns the increment of `this` MpZ (`this + 1`).\n */\n @operator.prefix('++')\n @operator.postfix('++')\n inc(): MpZ {\n if (this.isNeg) return this._udec().negate(); // -a + 1 = -(a - 1)\n return this._uinc();\n }\n\n protected _uinc(): MpZ {\n // TODO: optimize by couting bits?\n const q = this.size;\n const z = new StaticArray(q + 1);\n\n let k: bool = 1;\n for (let i: i32 = 0; i < q; ++i) {\n unchecked((z[i] = k + this._data[i]));\n k = unchecked(z[i] < this._data[i]);\n }\n unchecked((z[q] = k));\n return new MpZ(z);\n }\n\n // *** Subtraction ***\n\n /**\n * #### `#sub(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the difference of `this` MpZ and the `rhs`.\n */\n sub(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n\n const sx = this.isNeg;\n const sy = y.isNeg;\n\n if (sx && sy) return y._usub(this); // -a - -b = b - a\n if (sx) return this._uadd(y).negate(); // -a - b = -(a + b)\n if (sy) return this._uadd(y); // a - -b = a + b\n return this._usub(y);\n }\n\n // unsigned subtraction\n // treats values as unsigned\n protected _usub(rhs: MpZ): MpZ {\n if (this._ucmp(rhs) < 0) return rhs._usub(this).negate(); // a - b = -(b - a)\n if (rhs.size === 1) return this._usubU32(unchecked(rhs._data[0]));\n return this.__usub(rhs);\n }\n\n // unsigned sub\n // ordered such that lhs >= rhs\n // treats values as unsigned\n protected __usub(rhs: MpZ): MpZ {\n const q = this.size;\n const p = rhs.size;\n\n assert(ASC_NO_ASSERT || q >= p, '_uadd: Size(lhs) must be >= Size(rhs)');\n\n const z = new StaticArray(q);\n\n let k: i64 = 0;\n let i: i32 = 0;\n for (; i < p; ++i) {\n const lx = unchecked(this._data[i]);\n const ly = unchecked(rhs._data[i]);\n\n k = i64(lx) - i64(ly) - k;\n unchecked((z[i] = LOW(k)));\n k = k < 0 ? 1 : 0;\n }\n for (; i < q; ++i) {\n const lx = unchecked(this._data[i]);\n\n k = i64(lx) - k;\n unchecked((z[i] = LOW(k)));\n k = k < 0 ? 1 : 0;\n }\n return new MpZ(z);\n }\n\n // unsigned sub by uint32\n // treats values as unsigned\n protected _usubU32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q);\n\n let k: u32 = rhs;\n for (let i: i32 = 0; i < q; ++i) {\n const lx = unchecked(this._data[i]);\n\n unchecked((z[i] = lx - k));\n k = k > lx ? 1 : 0;\n }\n\n return new MpZ(z);\n }\n\n /**\n * #### `#dec(): MpZ`\n *\n * @returns the decrement of `this` MpZ (`this - 1`).\n */\n @operator.prefix('--')\n @operator.postfix('--')\n dec(): MpZ {\n if (this.isNeg) return this._uinc().negate(); // -a - 1 = -(a + 1)\n if (this.eqz()) return MpZ.ONE.negate();\n return this._udec();\n }\n\n protected _udec(): MpZ {\n // TODO: optimize by couting bits?\n const q = this.size;\n const z = new StaticArray(q);\n\n let k: bool = 1;\n for (let i: i32 = 0; i < q; ++i) {\n const lx = unchecked(this._data[i]);\n\n unchecked((z[i] = lx - k));\n k = k > lx ? 1 : 0;\n }\n\n return new MpZ(z);\n }\n\n // *** Multiplication ***\n\n /**\n * #### `#mul(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the product of `this` MpZ and the `rhs` (`this * rhs`).\n */\n mul(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n\n // if (u64(this.size) + u64(y.size) > u64(MAX_LIMBS)) {\n // throw new RangeError('Maximum MpZ size exceeded');\n // }\n\n if (this.eqz() || y.eqz()) return MpZ.ZERO;\n if (this.eq(MpZ.ONE)) return y;\n if (y.eq(MpZ.ONE)) return this;\n\n const q = this.size;\n const p = y.size;\n\n let z: MpZ;\n\n if (p === 1) {\n z = this._umulU32(unchecked(y._data[0]));\n } else if (q === 1) {\n z = y._umulU32(unchecked(this._data[0]));\n } else {\n z = this._umul(y);\n }\n\n return this.isNeg !== y.isNeg ? z.negate() : z;\n }\n\n /**\n * #### `#mul_pow2(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the product of `this` MpZ multiplied and `2**rhs` (`this * 2 ** rhs`).\n */\n // multiply by power of 2, using bit shifts\n mul_pow2(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.eqz()) return this;\n if (this.eqz()) return MpZ.ZERO;\n return this._leftShift(y);\n }\n\n // unsigned mul\n // treats values as unsigned\n protected _umul(rhs: MpZ): MpZ {\n const q = this.size;\n const p = rhs.size;\n const z = new StaticArray(q + p);\n\n for (let i: i32 = 0; i < q; ++i) {\n let c: u64 = 0;\n for (let j: i32 = 0; j < p; ++j) {\n const k = i + j;\n c +=\n u64(unchecked(this._data[i])) * u64(unchecked(rhs._data[j])) +\n u64(unchecked(z[k]));\n unchecked((z[k] = LOW(c)));\n c = HIGH(c);\n }\n unchecked((z[i + p] = LOW(c)));\n }\n\n return new MpZ(z);\n }\n\n // unsigned square\n // treats values as unsigned\n // TODO: optimize for aij = aji\n protected _usqr(): MpZ {\n const q = this.size;\n const z = new StaticArray(q * 2);\n\n for (let i: i32 = 0; i < q; ++i) {\n let carry: u64 = 0;\n for (let j: i32 = 0; j < q; ++j) {\n const k = i + j;\n carry +=\n u64(unchecked(this._data[i])) * u64(unchecked(this._data[j])) +\n u64(unchecked(z[k]));\n unchecked((z[k] = LOW(carry)));\n carry = HIGH(carry);\n }\n unchecked((z[i + q] = LOW(carry)));\n }\n\n return new MpZ(z);\n }\n\n // unsigned multiply by uint32\n // treats values as unsigned\n protected _umulU32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q + 1);\n\n let c: u64 = 0;\n for (let i: i32 = 0; i < q; ++i) {\n c += u64(unchecked(this._data[i])) * u64(rhs);\n unchecked((z[i] = LOW(c)));\n c = HIGH(c);\n }\n unchecked((z[q] = LOW(c)));\n\n return new MpZ(z);\n }\n\n // unsigned mul by power of 2\n // treats values as unsigned\n protected _umulpow2U32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q + 1);\n\n let c: u64 = 0;\n for (let i: i32 = 0; i < q; ++i) {\n c += u64(unchecked(this._data[i])) << rhs;\n unchecked((z[i] = LOW(c)));\n c = HIGH(c);\n }\n unchecked((z[q] = LOW(c)));\n\n return new MpZ(z);\n }\n\n // *** Division ***\n\n /**\n * #### `#div(rhs: MpZ): MpZ`\n *\n * @returns the quotient of `this` MpZ divided by the `rhs` (`trunc(this / rhs)`) truncated towards zero.\n * @throws RangeError if `rhs` is zero.\n */\n div(rhs: T): MpZ {\n if (this.eqz()) return MpZ.ZERO;\n\n const y = MpZ.from(rhs);\n\n if (y.eqz()) throw new RangeError('Divide by zero');\n if (y.eq(MpZ.ONE)) return this; // x / 1 = x\n if (this.eq(y)) return MpZ.ONE; // x / x = 1\n\n const sx = this.isNeg;\n const sy = y.isNeg;\n\n const n = this.abs();\n const d = y.abs();\n\n if (n.lt(d)) return MpZ.ZERO; // ⌊n / d⌋ = 0 if n < d\n\n const sz = sx !== sy;\n\n if (d.size === 1) {\n const r = n._udivU32(unchecked(d._data[0]));\n return sz ? r.negate() : r;\n }\n\n const p = n._udiv(d);\n return sz ? p.negate() : p;\n }\n\n /**\n * #### `#div_pow2(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the quotant of `this` MpZand `2**rhs` (`this / 2 ** rhs`) truncated towards zero.\n */\n // divide by power of 2, using bit shifts\n div_pow2(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.eqz()) return this;\n if (this.eqz()) return MpZ.ZERO;\n return this._rightShift(y);\n }\n\n // unsigned divide, lhs > rhs\n // Donald Knuth’s Algorithm D\n protected _udiv(rhs: MpZ): MpZ {\n assert(ASC_NO_ASSERT || this > rhs, '_udiv: lhs must be greater than rhs');\n\n const m = this.size;\n const n = rhs.size;\n const z = new StaticArray(m - n + 1);\n\n // D1. [Normalize]\n // Normalize by shifting rhs left just enough so that\n // its high-order bit is on, and shift lhs left the\n // same amount.\n const s = rhs._clz();\n const un = this._umul_pow2(s).toArray();\n const vn = rhs._umul_pow2(s).toArray();\n\n // We may have to append a high-order\n // digit on the dividend;\n if (un.length === m) {\n un.push(0);\n }\n\n assert(ASC_NO_ASSERT || un.length === m + 1, '_udiv: un.length !== m + 1');\n assert(ASC_NO_ASSERT || vn.length === n, '_udiv: vn.length !== n');\n\n // Main loop.\n for (let j = m - n; j >= 0; j--) {\n // D3. [Calculate Q̂]\n const un1: u64 =\n unchecked(u64(un[j + n]) << 32) + unchecked(u64(un[j + n - 1]));\n const vn1 = unchecked(u64(vn[n - 1]));\n let qhat: u64 = un1 / vn1;\n let rhat: u64 = un1 % vn1;\n\n const vn2 = unchecked(u64(vn[n - 2]));\n const un2 = unchecked(u64(un[j + n - 2]));\n\n while (true) {\n if (qhat >= BASE || LOW(qhat) * vn2 > (rhat << 32) + un2) {\n qhat -= 1;\n rhat += vn1;\n if (rhat < BASE) continue;\n }\n break;\n }\n\n // D4. [Multiply and subtract]\n let k: i64 = 0;\n let t: i64 = 0;\n for (let i = 0; i < n; i++) {\n const p: u64 = qhat * unchecked(u64(vn[i]));\n t = unchecked(u64(un[i + j])) - k - LOW(p);\n unchecked((un[i + j] = LOW(t)));\n k = (p >> 32) - (t >> 32);\n }\n t = unchecked(u64(un[j + n])) - k;\n unchecked((un[j + n] = LOW(t)));\n\n // D5. [Test remainder]\n unchecked((z[j] = LOW(qhat))); // Store quotient digit.\n if (t < 0) {\n // D6. [Add back]\n\n // If we subtracted too much, add back.\n z[j] -= 1;\n k = 0;\n for (let i = 0; i < n; i++) {\n t = unchecked(u64(un[i + j]) + u64(vn[i])) + k;\n unchecked((un[i + j] = LOW(t)));\n k = t >> 32;\n }\n unchecked((un[j + n] = LOW(u64(un[j + n]) + k)));\n }\n }\n return new MpZ(z);\n }\n\n // unsigned divide by uint32\n // treats values as unsigned\n protected _udivU32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q);\n\n let r: u64 = 0;\n for (let i: i32 = this.size - 1; i >= 0; --i) {\n r = u64(unchecked(this._data[i])) + u64(r << 32);\n unchecked((z[i] = LOW(r / rhs)));\n r %= rhs;\n }\n\n return new MpZ(z);\n }\n\n protected _udivRemU32(rhs: u32): DivRem {\n assert(ASC_NO_ASSERT || !this.isNeg, '_udivRemU32: lhs must be positive');\n\n const q = this.size;\n const z = new StaticArray(q);\n\n let r: u64 = 0;\n for (let i: i32 = q - 1; i >= 0; --i) {\n r = u64(unchecked(this._data[i])) + (r << 32);\n unchecked((z[i] = LOW(r / rhs)));\n r %= rhs;\n }\n\n return { div: new MpZ(z), rem: LOW(r) };\n }\n\n // *** Modulus ***\n\n /**\n * #### `#mod(rhs: MpZ): MpZ`\n *\n * @returns the modulus of `this` MpZ divided by the `rhs`.\n * @throws RangeError if `rhs` is zero.\n *\n * > Note: The `#mod` method is not the same as the `%` operator. The `%` operator returns the `#rem` of the division of the lhs and rhs, while the `#mod` method returns the modulo of the lhs and rhs.\n */\n mod(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n const r = this._rem(y);\n if (this.isNeg === y.isNeg) return r;\n if (r.eqz()) return MpZ.ZERO;\n return r.add(y);\n }\n\n /**\n * #### `#rem(rhs: MpZ): MpZ`\n *\n * @returns the remainder of `this` MpZ divided by the `rhs` (`this % rhs`).\n * @throws RangeError if `rhs` is zero.\n *\n * > Note: The `#rem` method is the same as the `%` operator. The `%` operator returns the `#rem` of the division of the lhs and rhs, while the `#mod` method returns the modulo of the lhs and rhs.\n */\n rem(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n return this._rem(y);\n }\n\n protected _rem(rhs: MpZ): MpZ {\n const q = this.div(rhs);\n return this.sub(rhs.mul(q));\n }\n\n // *** Pow ***\n\n /**\n * #### `#pow(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the value of `this` MpZ raised to the power of `rhs` (`this ** rhs`).\n */\n pow(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.isNeg) return MpZ.ZERO;\n\n if (y.eqz()) return MpZ.ONE;\n if (this.eqz()) return MpZ.ZERO;\n if (y.eq(MpZ.ONE)) return this;\n if (this.eq(MpZ.ONE)) return MpZ.ONE;\n\n const sz = this.isNeg && y.isOdd();\n const z =\n y.size === 1 ? this._upowU32(unchecked(y._data[0])) : this._upow(y);\n return sz ? z.negate() : z;\n }\n\n // unsigned pow\n // exponentiation by squaring (modified)\n // ignores sign of base and exponent\n protected _upow(rhs: MpZ): MpZ {\n let z = MpZ.ONE;\n let x: MpZ = this;\n\n const p = rhs.size;\n for (let i: i32 = 0; i < p; ++i) {\n let ly = unchecked(rhs._data[i]);\n\n for (let j: u32 = 0; j < LIMB_BITS; ++j) {\n if (ly & 1) {\n z = z._umul(x);\n }\n\n ly >>= 1;\n if (ly === 0 && i === p - 1) break;\n x = x._usqr();\n }\n }\n\n return z;\n }\n\n // Exponentiation by squaring\n // Ignores sign of base and exponent\n protected _upowU32(rhs: u32): MpZ {\n let z = MpZ.ONE;\n let x: MpZ = this;\n\n while (true) {\n if (rhs & 1) {\n z = z._umul(x);\n }\n\n rhs >>= 1;\n if (rhs === 0) break;\n x = x._usqr();\n }\n\n return z;\n }\n\n /**\n * #### `#sqrt(): MpZ`\n *\n * @returns the greatest integer less than or equal to the square root of `this`.\n * @throws RangeError if `this` is negative.\n */\n isqrt(): MpZ {\n if (this.isNeg) {\n throw new RangeError(\n 'Square root of negative number is not a real number'\n );\n }\n if (this.lt(2)) return this;\n\n let x0 = this._bitShiftRight(1);\n let x1 = x0._uadd(this.div(x0))._bitShiftRight(1);\n\n while (x1 < x0) {\n x0 = x1;\n x1 = x0._uadd(this.div(x0))._bitShiftRight(1);\n }\n\n return x0;\n }\n\n /**\n * #### `#iroot(n: u32): MpZ`\n *\n * @returns the greatest integer less than or equal to the nth root of `this`.\n * @throws RangeError if `n` is zero or `this` is negative and `n` is even.\n */\n iroot(k: u32): MpZ {\n if (k === 0) throw new RangeError('Root must be greater than 0');\n\n if (this.isNeg) {\n if (k % 2 === 0) {\n throw new RangeError('Root of negative number is not a real number');\n }\n return this.abs()._uiroot(k).negate();\n }\n\n return this._uiroot(k);\n }\n\n protected _uiroot(k: u32): MpZ {\n if (this.lt(2)) return this;\n\n const n1 = MpZ.from(k - 1);\n\n let d = this._uaddU32(1);\n let e: MpZ = this;\n\n while (e < d) {\n d = e;\n e = e\n ._umul(n1)\n ._uadd(this.div(e._upow(n1)))\n ._udivU32(k);\n }\n\n return d;\n }\n\n /**\n * #### `#log2(): MpZ`\n *\n * @returns the base 2 logarithm of `this`.\n * @throws RangeError if `this` is negative or zero.\n */\n log2(): MpZ {\n if (this.isNeg) throw new RangeError('Logarithm of negative number');\n if (this.eqz()) throw new RangeError('Logarithm of zero');\n if (this.lt(2)) return MpZ.ZERO;\n\n return MpZ.from(this._bits() - 1);\n }\n\n // Returns the ceiling of the base 10 logarithm of `this`\n // Assumes x > 1\n protected _ceilLog10(): u64 {\n if (this.lt(10)) return 1;\n\n const k = f64(this._bits() - 1);\n const z = u64(k / LOG2_10); // ~log2(x)/log2(10) < 2.1*10^10\n return z + 1;\n }\n\n /**\n * #### `#log10(): MpZ`\n *\n * @returns the base 10 logarithm of `this`.\n * @throws RangeError if `this` is negative or zero.\n */\n log10(): MpZ {\n if (this.isNeg) throw new RangeError('Logarithm of negative number');\n if (this.eqz()) throw new RangeError('Logarithm of zero');\n if (this.lt(10)) return MpZ.ZERO;\n\n assert(\n ASC_NO_ASSERT || this.log2().size < 3,\n 'log10: internal assumption failed'\n );\n\n // Correcting ceilLog10\n const x = this.abs();\n const z = x._ceilLog10();\n const t = MpZ.TEN.pow(z);\n return x.ge(t) ? MpZ.from(z) : MpZ.from(z - 1);\n\n // Direct implementation\n // let x = this.abs();\n // let k: u64 = 0;\n\n // while (!x.eqz()) {\n // x = x.div(10);\n // k++;\n // }\n\n // return MpZ.from(k - 1);\n }\n\n /**\n * #### `#fact(): MpZ`\n *\n * @returns the factorial of `this` MpZ (`this!`).\n * @throws RangeError if `this` is negative or too large (greater than `MAX_INTEGER`).\n */\n fact(): MpZ {\n if (this.isNeg) throw new RangeError('Factorial of negative number');\n if (this.eqz()) return MpZ.ONE;\n if (this.size > 1) throw new RangeError('Factorial of large number');\n return this._fact();\n }\n\n protected _fact(): MpZ {\n let x = this.toU32();\n let z = MpZ.ONE;\n while (x > 1) {\n z = z.mul(x--);\n }\n return z;\n }\n\n /**\n * #### `#gcd(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the greatest common divisor of `this` MpZ and `rhs`.\n */\n gcd(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (this.eqz()) return y.abs();\n const x = this.abs();\n if (y.eqz()) return x;\n\n return x._gcd(y.abs());\n }\n\n protected _gcd(rhs: MpZ): MpZ {\n let x: MpZ = this;\n let y = rhs;\n\n const i = x._ctz();\n x = x._udiv_pow2(i);\n\n const j = y._ctz();\n y = y._udiv_pow2(j);\n\n const k = min(i, j);\n\n while (true) {\n if (y > x) {\n const t = x;\n x = y;\n y = t;\n }\n\n x = x._usub(y);\n if (x.eqz()) return y._umul_pow2(k);\n\n x = x._udiv_pow2(x._ctz());\n }\n }\n\n /**\n * #### `#lcm(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the least common multiple of `this` MpZ and `rhs`.\n */\n lcm(rhs: T): MpZ {\n let y = MpZ.from(rhs);\n if (this.eqz() || y.eqz()) return MpZ.ZERO;\n\n const x = this.abs();\n y = y.abs();\n return x.mul(y).div(x._gcd(y));\n }\n\n // *** Shifts ***\n\n // Gets the value of the bit at the specified position (2's complement)\n protected _getBit(n: u64): bool {\n const limb = (n / LIMB_BITS);\n if (limb >= this.size) return this.isNeg;\n\n const x = this.isNeg ? this.not() : this;\n\n const mask = 1 << u32(n % LIMB_BITS);\n const b = unchecked(x._data[limb]) & mask;\n return this.isNeg === !b ? 1 : 0;\n }\n\n // count leading zeros (doesn't count sign bit, treats value as unsigned)\n protected _clz(): u32 {\n const d = unchecked(this._data[this.size - 1]);\n return clz(d);\n }\n\n // count trailing zeros (doesn't count sign bit, treats value as unsigned)\n protected _ctz(): u64 {\n if (this.eqz()) return 0;\n\n let l: u32 = 0;\n while (unchecked(this._data[l]) === 0) {\n l++;\n }\n return l * LIMB_BITS + ctz(unchecked(this._data[l]));\n }\n\n // returns the number of bits in the magnitude excluding leading zeros\n // doesn't count sign bit, treats value as unsigned\n protected _bits(): u64 {\n return u64(this.size) * LIMB_BITS - this._clz();\n }\n\n protected _limbShiftLeft(n: u32): MpZ {\n assert(\n ASC_NO_ASSERT || n < MAX_LIMBS,\n '_limbShiftLeft: n must be less than i32.MAX_VALUE'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_bitShiftRight: n must be > 0');\n\n if (n === 0) return this;\n const data = this._data.slice();\n const low = new StaticArray(n);\n return new MpZ(StaticArray.fromArray(low.concat(data)));\n }\n\n protected _limbShiftRight(n: u32): MpZ {\n assert(ASC_NO_ASSERT || n >= 0, '_bitShiftRight: n must be > 0');\n\n if (n === 0) return this;\n if (n >= this.size) return MpZ.ZERO;\n const data = this._data.slice(n);\n return new MpZ(StaticArray.fromArray(data));\n }\n\n protected _bitShiftLeft(n: u32): MpZ {\n assert(\n ASC_NO_ASSERT || n < LIMB_BITS,\n '_bitShiftLeft: n must be less than LIMB_BITS'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_bitShiftRight: n must be > 0');\n\n return n === 0 ? this : this._umulpow2U32(n);\n }\n\n protected _bitShiftRight(n: u32): MpZ {\n assert(\n ASC_NO_ASSERT || n < LIMB_BITS,\n '_bitShiftRight: n must be less than LIMB_BITS'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_bitShiftRight: n must be > 0');\n\n return n === 0 ? this : this._udivPow2U32(n);\n }\n\n // unsigned divide by power of 2\n // treats values as unsigned\n protected _udivPow2U32(n: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q);\n const n2 = 2 ** n;\n\n let rem: u64 = 0;\n for (let i: i32 = this.size - 1; i >= 0; --i) {\n rem = u64(unchecked(this._data[i])) + (rem << 32);\n unchecked((z[i] = LOW(rem >> n)));\n rem %= n2;\n }\n\n return new MpZ(z);\n }\n\n // unsigned multiply by power of 2 using bit shifts\n // treats values as unsigned\n protected _umul_pow2(n: u64): MpZ {\n assert(\n ASC_NO_ASSERT || n < LIMB_BITS * MAX_LIMBS,\n '_udiv_pow2: rhs must be < 32*MAX_LIMBS'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_udiv_pow2: rhs must be > 0');\n\n if (n === 0) return this;\n\n let z: MpZ = this;\n const limbs = u32(n / LIMB_BITS);\n if (limbs > 0) z = z._limbShiftLeft(limbs);\n\n const bits = u32(n % LIMB_BITS);\n if (bits > 0) z = z._bitShiftLeft(bits);\n\n return z;\n }\n\n // unsigned divide by power of 2 using bit shifts\n // treats values as unsigned\n protected _udiv_pow2(n: u64): MpZ {\n assert(\n ASC_NO_ASSERT || n < LIMB_BITS * MAX_LIMBS,\n '_udiv_pow2: rhs must be < 32*MAX_LIMBS'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_udiv_pow2: rhs must be > 0');\n\n if (n === 0) return this;\n\n let z: MpZ = this;\n\n const bits = u32(n % LIMB_BITS);\n if (bits > 0) z = z._bitShiftRight(bits);\n\n const limbs = u32(n / LIMB_BITS);\n if (limbs > 0) z = z._limbShiftRight(limbs);\n\n return z;\n }\n\n protected _leftShift(rhs: MpZ): MpZ {\n if (rhs.size > 2) throw new RangeError('Maximum MpZ size exceeded');\n\n const n = rhs.toU64();\n if ((this.size + n) / LIMB_BITS > MAX_LIMBS) {\n throw new RangeError('Maximum MpZ size exceeded');\n }\n return this.isNeg ? this._umul_pow2(n).negate() : this._umul_pow2(n);\n }\n\n protected _rightShift(rhs: MpZ): MpZ {\n if (rhs.size > 2) return MpZ.ZERO;\n\n const n = rhs.toU64();\n if (n > LIMB_BITS * MAX_LIMBS) return MpZ.ZERO;\n return this.isNeg ? this._udiv_pow2(n).negate() : this._udiv_pow2(n);\n }\n\n /**\n * #### `#shiftLeft(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the value of `this` MpZ left shifted by `rhs` (`this << rhs`). Negative `rhs` values shift right.\n * @throws RangeError if the result exceeds the maximum MpZ size.\n *\n * > Note: The `#shiftLeft` method return the result of the bitwise shift as if the MpZ was a 2's complement signed integer; matching JavaScript's BigInt `<<` operator.\n */\n shiftLeft(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.isNeg) return this.shiftRight(y.negate());\n\n if (y.eqz()) return this;\n if (this.eqz()) return MpZ.ZERO;\n\n return this._leftShift(y);\n }\n\n /**\n * #### `#shiftRight(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the value of `this` MpZ right shifted by `rhs` (`this >> rhs`). Negative `rhs` values shift left.\n * @throws RangeError if the result exceeds the maximum MpZ size.\n *\n * > Note: The `#shiftLeft` method return the result of the bitwise shift as if the MpZ was a 2's complement signed integer; matching JavaScript's BigInt `>>` operator.\n */\n shiftRight(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.isNeg) return this._leftShift(y.negate());\n if (y.eqz()) return this;\n if (this.eqz()) return MpZ.ZERO;\n\n return this.isNeg ? this.not()._rightShift(y).not() : this._rightShift(y);\n }\n\n // *** Bitwise operators ***\n\n /**\n * #### `#not(): MpZ`\n *\n * @returns the bitwise NOT of `this` MpZ (`~this`).\n *\n * > Note: The `#not` method returns the result as if the MpZ was a 2's complement signed integer (yeilding `-(x + 1)`); matching JavaScript's BigInt `~` operator.\n */\n not(): MpZ {\n return this.isNeg ? this._udec() : this._uinc().negate();\n }\n\n /**\n * #### `#and(rhs: MpZ): MpZ`\n *\n * @returns the bitwise AND of `this` MpZ and `rhs`.\n *\n * > Note: The `#and` method returns the result of the bitwise `AND` as if the MpZ was a 2's complement signed integer; matching JavaScript's `&` BigInt operator.\n */\n and(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (!this.isNeg && !y.isNeg) return this._and(y);\n if (this.isNeg && y.isNeg) return this.not()._or(y.not()).not(); // x & y = ~(~x | ~y)\n if (this.isNeg) return y._andNot(this.not()); // x & y = y & ~~x\n return this._andNot(y.not()); // x & y = x & ~~y\n }\n\n protected _and(rhs: MpZ): MpZ {\n const p = this.size;\n const q = rhs.size;\n const z = new StaticArray(q > p ? q : p);\n\n for (let i: i32 = 0; i < z.length; ++i) {\n const lx = p > i ? unchecked(this._data[i]) : 0;\n const ly = q > i ? unchecked(rhs._data[i]) : 0;\n unchecked((z[i] = lx & ly));\n }\n\n return new MpZ(z);\n }\n\n // Exponse this?\n protected _andNot(rhs: MpZ): MpZ {\n const p = this.size;\n const q = rhs.size;\n const z = new StaticArray(q > p ? q : p);\n\n for (let i: i32 = 0; i < z.length; ++i) {\n const lx = p > i ? unchecked(this._data[i]) : 0;\n const ly = q > i ? unchecked(rhs._data[i]) : 0;\n unchecked((z[i] = ly === 0 ? lx : lx & ~ly));\n }\n\n return new MpZ(z);\n }\n\n /**\n * #### `#or(rhs: MpZ): MpZ`\n *\n * @returns the bitwise OR of `this` MpZ and `rhs`.\n *\n * > Note: The `#or` method returns the result of the bitwise `OR` as if the MpZ was a 2's complement signed integer; matching JavaScript's BigInt `|` operator.\n */\n or(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (!this.isNeg && !y.isNeg) return this._or(y);\n if (this.isNeg && y.isNeg) return this.not()._and(y.not()).not(); // x | y = ~(~x & ~y)\n if (this.isNeg) return this.not()._andNot(y).not(); // x | y = ~(~x & ~y)\n return y.not()._andNot(this).not(); // x | y = ~(~y & ~x)\n }\n\n protected _or(rhs: MpZ): MpZ {\n const p = this.size;\n const q = rhs.size;\n const z = new StaticArray(q > p ? q : p);\n\n for (let i: i32 = 0; i < z.length; ++i) {\n const lx = p > i ? unchecked(this._data[i]) : 0;\n const ly = q > i ? unchecked(rhs._data[i]) : 0;\n unchecked((z[i] = lx | ly));\n }\n\n return new MpZ(z);\n }\n\n /**\n * #### `#xor(rhs: MpZ): MpZ`\n *\n * @returns the bitwise XOR of `this` MpZ and `rhs`.\n *\n * Note: The `#xor` method returns the result of the bitwise `XOR` as if the MpZ was a 2's complement signed integer; matching JavaScript's BigInt `^` operator.\n */\n xor(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (!this.isNeg && !y.isNeg) return this._xor(y);\n if (this.isNeg && y.isNeg) return this.not()._xor(y.not()); // x ^ y = ~x ^ ~y\n if (this.isNeg) return y._xor(this.not()).not(); // x ^ y = ~(y ^ ~x)\n return this._xor(y.not()).not(); // x ^ y = ~(x ^ ~y)\n }\n\n protected _xor(rhs: MpZ): MpZ {\n const p = this.size;\n const q = rhs.size;\n const z = new StaticArray(q > p ? q : p);\n\n for (let i: i32 = 0; i < z.length; ++i) {\n const lx = p > i ? unchecked(this._data[i]) : 0;\n const ly = q > i ? unchecked(rhs._data[i]) : 0;\n unchecked((z[i] = lx ^ ly));\n }\n\n return new MpZ(z);\n }\n\n // *** ToString ***\n\n /**\n * #### `#toString(radix: i32 = 10): string`\n *\n * @returns the value of `this` MpZ as a string. The radix can be from 2 and 36 (inclusive). The default radix is 10. Negative numbers are prefixed with a `-`. Negitive radix values return the result in uppercase.\n * @throws Error if the radix is not between 2 and 36.\n *\n * Note: The resulting string is not prefixed with the radix (e.g. `0x` or `0b`) and therefore not compatible as input to `MpZ.from` (radix of 10 excluded).\n */\n toString(radix: i32 = 10): string {\n if (this.eqz()) return '0';\n\n if (radix < -10) {\n return this.toString(-radix).toUpperCase();\n }\n\n if (radix === 10) {\n return this.toDecimal();\n } else if (radix === 16) {\n return this.isNeg ? `-${this.abs()._uhex()}` : this._uhex();\n } else if (radix >= 2 && radix <= 36) {\n return this.isNeg ? `-${this.abs()._uitoa(radix)}` : this._uitoa(radix);\n } else {\n throw new Error('toString() radix argument must be between 2 and 36');\n }\n }\n\n /**\n * #### `#toHex(): string`\n *\n * @returns the value of `this` MpZ as a hexadecimal string.\n *\n * > Note: The resulting string is prefixed with `0x` and is therefore compatible as input to `MpZ.from`.\n */\n toHex(): string {\n if (this.eqz()) return '0x0';\n\n const s = this._uhex();\n return this.isNeg ? `-0x${s}` : `0x${s}`;\n }\n\n /**\n * #### `#toDecimal(): string`\n *\n * @returns the value of `this` MpZ as a decimal string.\n */\n toDecimal(): string {\n if (this.eqz()) return '0';\n return (this.isNeg ? `-` : '') + this.abs()._uitoaDecimal();\n }\n\n protected _uhex(): string {\n const s = new StaticArray(2 * this.size - 1);\n\n let q = this.size;\n let i = 0;\n\n // MSB is not padded\n s[i++] = unchecked(this._data[--q]).toString(16);\n\n while (q > 0) {\n const x = unchecked(this._data[--q]).toString(16);\n s[i++] = '0'.repeat(8 - x.length); // padding\n s[i++] = x;\n }\n\n return s.join('');\n }\n\n protected _uitoaDecimal(): string {\n assert(\n ASC_NO_ASSERT || this.isNeg === false,\n '_uitoaDecimal: this must be positive'\n );\n\n if (this.size === 1) return this.toU32().toString(10);\n\n let n: MpZ = this;\n const k = (f64(this.size) / LOG2_10 / 9) * LIMB_BITS;\n let i = 2 * u32(k) + 1;\n const s = new StaticArray(i);\n\n while (n.compareTo(TO_DECIMAL_N) === 1) {\n const d = n._udivRemU32(TO_DECIMAL_N);\n n = d.div;\n\n const x = d.rem.toString(10);\n s[--i] = x;\n s[--i] = '0'.repeat(DIGITS_PER_LIMB - x.length);\n }\n\n if (!n.eqz()) {\n s[--i] = n.toU32().toString(10);\n }\n\n return s.join('');\n }\n\n protected _uitoa(base: u32): string {\n assert(ASC_NO_ASSERT || base >= 2, '_uitoa: base must be >= 2');\n assert(ASC_NO_ASSERT || base <= 36, '_uitoa: base must be <= 36');\n assert(\n ASC_NO_ASSERT || this.isNeg === false,\n '_uitoa: this must be positive'\n );\n\n const s = new Array();\n\n let n: MpZ = this;\n while (n.compareTo(base) === 1) {\n const d = n._udivRemU32(base);\n n = d.div;\n s.unshift(d.rem.toString(base));\n }\n\n if (!n.eqz()) {\n s.unshift(n.toU32().toString(base));\n }\n\n return s.join('');\n }\n\n // *** valueOf/toString ***\n\n /**\n * #### `#valueOf(): number`\n *\n * @returns the value of `this` MpZ as a `number`.\n */\n valueOf(): number {\n const q = this.size;\n const l1: u64 = unchecked(this._data[q - 1]);\n const z0 = f64(l1) * f64(BASE) ** (q - 1);\n const l2: u64 = q > 1 ? unchecked(this._data[q - 2]) : 0;\n const z1 = f64(l2) * f64(BASE) ** (q - 2);\n const z = z0 + z1;\n return this.isNeg ? -z : z;\n }\n\n /**\n * #### `#toU32Array(): u32[]`\n *\n * @returns the value of `this` MpZ as an unsigned 32-bit integer array. Ther sign of the MpZ is ignored.\n */\n toArray(): u32[] {\n return this._data.slice(0, this.size);\n }\n\n /**\n * #### `#toU32(): u32`\n *\n * @returns the value of `this` MpZ as an unsigned 32-bit integer. If `this` MpZ is too big to fit in an int32, only the low-order 32 bits are returned.\n * If `this` MpZ is negative, the returned value is the 2's complement representation of the MpZ.\n */\n toU32(): u32 {\n const z = unchecked(this._data[0]);\n return this.isNeg ? -z : z;\n }\n\n /**\n * #### `#toI32(): i32`\n *\n * @returns the value of `this` MpZ as a signed 32-bit integer. If `this` MpZ is too big to fit in an int32, only the low-order 32 bits are returned.\n */\n toI32(): i32 {\n const z = unchecked(this._data[0]);\n return this.isNeg ? -z : z;\n }\n\n /**\n * #### `#toU64(): u64`\n *\n * @returns the value of `this` MpZ as an unsigned 64-bit integer. If `this` MpZ is too big to fit in an int64, only the low-order 64 bits are returned.\n */\n toU64(): u64 {\n const z =\n this.size === 1\n ? u64(unchecked(this._data[0]))\n : (u64(unchecked(this._data[1])) << 32) + u64(unchecked(this._data[0]));\n return this.isNeg ? -z : z;\n }\n\n protected _toU64_safe(): u64 {\n if (this.size > 3) {\n throw new RangeError('MpZ too large to fit in u64');\n }\n return this.toU64();\n }\n\n /**\n * #### `#toI64(): i64`\n *\n * @returns the value as a signed 64-bit integer. If `this` MpZ is too big to fit in an int64, only the low-order 64 bits are returned.\n */\n toI64(): i64 {\n const z =\n this.size === 1\n ? u64(unchecked(this._data[0]))\n : (u64(unchecked(this._data[1])) << 32) + u64(unchecked(this._data[0]));\n return this.isNeg ? -z : z;\n }\n\n // aka mod_power_of_two\n // bitwise_modulo_power_of_two\n protected _truncateToNBits(bits: u64): MpZ {\n if (bits === 0) return MpZ.ZERO;\n\n const isNeg = this.isNeg;\n const limbs = (bits / LIMB_BITS);\n if (!isNeg && limbs >= this.size) return this;\n\n const x = isNeg ? this.not() : this;\n\n const p = x.size;\n let q: i32 = limbs + 1;\n const z = new StaticArray(q);\n\n for (let i: i32 = 0; i < q; ++i) {\n const lx = p > i ? unchecked(x._data[i]) : 0;\n unchecked((z[i] = isNeg ? ~lx : lx));\n }\n\n const n = (bits % LIMB_BITS);\n z[limbs] &= (1 << n) - 1;\n\n return new MpZ(z);\n }\n\n // *** Comparison ***\n\n /**\n * #### `#eqz(): boolean`\n *\n * @returns `true` if `this` MpZ is equal to zero.\n */\n eqz(): boolean {\n return this.size === 1 && unchecked(this._data[0]) === 0;\n }\n\n /**\n * #### `#compareTo(rhs: MpZ | i32 | u32 | i64 | u64 | string): i32`\n *\n * @returns `-1` if `this` MpZ is less than the rhs, `0` if `this` MpZ is equal to the rhs, or `1` if `this` MpZ is greater than the rhs.\n */\n compareTo(rhs: T): i32 {\n const y = MpZ.from(rhs);\n\n const q = this._sgn_size;\n const p = y._sgn_size;\n\n if (q > p) return 1;\n if (p > q) return -1;\n if (q < 0) return -this._ucmp(y);\n return this._ucmp(y);\n }\n\n // unsigned compare\n protected _ucmp(rhs: MpZ): i32 {\n const q = this.size;\n const p = rhs.size;\n\n if (q !== p) return q > p ? 1 : -1;\n for (let i = q - 1; i >= 0; i--) {\n const lx = unchecked(this._data[i]);\n const ly = unchecked(rhs._data[i]);\n if (lx != ly) {\n return lx > ly ? 1 : -1;\n }\n }\n return 0;\n }\n\n /**\n * #### `#eq(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is equal to the rhs.\n */\n eq(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) === 0;\n }\n\n /**\n * #### `#ne(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is not equal to the rhs.\n */\n ne(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) !== 0;\n }\n\n /**\n * #### `#gt(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is greater than the rhs.\n */\n gt(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) > 0;\n }\n\n /**\n * #### `#ge(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is greater than or equal to the rhs.\n */\n ge(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) >= 0;\n }\n\n /**\n * #### `#lt(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is less than the rhs.\n */\n lt(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) < 0;\n }\n\n /**\n * #### `#le(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is less than or equal to the rhs.\n */\n le(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) <= 0;\n }\n\n /**\n * #### Static values\n *\n * The following static values are provided for convenience:\n * - `MpZ.ZERO` - The MpZ value `0`.\n * - `MpZ.ONE` - The MpZ value `1`.\n * - `MpZ.TWO` - The MpZ value `2`.\n * - `MpZ.TEN` - The MpZ value `10`.\n */\n static readonly ZERO: MpZ = new MpZ([0]);\n static readonly ONE: MpZ = new MpZ([1]);\n static readonly TWO: MpZ = new MpZ([2]);\n static readonly TEN: MpZ = new MpZ([10]);\n\n /**\n * ### Operators\n */\n\n /**\n * #### Unary `-` operator\n *\n * @returns the negation of `this` MpZ (`-this`).\n */\n @operator.prefix('-')\n static neg(lhs: MpZ): MpZ {\n return lhs.negate();\n }\n\n /**\n * #### Binary `+`, `-`, `*`, `/` operators\n *\n * Same as the `#add`, `#sub`, `#mul`, `#div` methods.\n */\n\n // @ts-ignore\n @inline\n @operator('*')\n static mul(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.mul(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('/')\n static div(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.div(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('+')\n static add(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.add(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('-')\n static sub(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.sub(rhs);\n }\n\n /**\n * ### Comparison Operators\n *\n * #### `==`, `>`, `>=`, `<`, `<=`, `!=`\n *\n * Same as the `#eq`, `#gt`, `#ge`, `#lt`, `#le`, `#ne` methods.\n */\n\n // @ts-ignore\n @inline\n @operator('==')\n static eq(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.eq(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('>')\n static gt(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.gt(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('>=')\n static ge(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.ge(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('<')\n static lt(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.lt(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('<=')\n static le(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.le(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('!=')\n static ne(lhs: MpZ, rhs: MpZ): boolean {\n return !lhs.eq(rhs);\n }\n\n /**\n * #### `%` operator\n *\n * @returns the remainder of the lhs and rhs (`lhs % rhs`).\n * @throws RangeError if `rhs` is zero.\n *\n * > Note: The `%` operator is not the same as the `#mod` method. The `%` operator returns the `#rem` of the division of the lhs and rhs; matching JavaScript's BigInt `%` operator.\n */\n // @ts-ignore\n @inline\n @operator('%')\n static mod(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs._rem(rhs);\n }\n\n /**\n * #### `**` operator\n *\n * @returns the power of the lhs to the rhs (`lhs ** rhs`).\n */\n // @ts-ignore\n @inline\n @operator('**')\n static pow(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.pow(rhs);\n }\n\n /**\n * #### `<<`, `>>` operators\n *\n * @returns the result of the left/right shift of the lhs by the rhs. Negitive rhs values will result in a opposite shift.\n * @throws RangeError if the result exceeds the maximum MpZ size.\n *\n * > Shift operators behave as if they were represented in two's-complement notation; like JavaScripts's `<<` and `>>` operators.\n */\n\n // @ts-ignore\n @operator('<<')\n static shiftLeft(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.shiftLeft(rhs);\n }\n\n // @ts-ignore\n @operator('>>')\n static shiftRight(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.shiftRight(rhs);\n }\n\n /**\n * #### `~` operator\n *\n * @returns the bitwise NOT of `this` MpZ (`~this`).\n */\n @operator.prefix('~')\n static not(lhs: MpZ): MpZ {\n return lhs.not();\n }\n\n /**\n * #### `&`, `|`, `^ operators\n *\n * @returns the bitwise `AND`, `OR`, `XOR` operation on the two operands.\n *\n * > This operator returns the result of the bitwise `AND`, `OR`, `XOR` as if the values were 2's complement signed integers; matching JavaScript's BigInt `&`, `|`, `^` operators.\n */\n\n // @ts-ignore\n @operator('&')\n static and(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.and(rhs);\n }\n\n // @ts-ignore\n @operator('|')\n static or(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.or(rhs);\n }\n\n // @ts-ignore\n @operator('^')\n static xor(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.xor(rhs);\n }\n\n /**\n * ### `!` operator\n *\n * @returns the logical NOT of `this` MpZ (`!this`). This is equivalent to `#eqz()`.\n */\n @operator.prefix('!')\n static logicalNot(lhs: MpZ): boolean {\n return lhs.eqz();\n }\n\n /**\n * #### `MpZ.asIntN(bits: u32, a: MpZ): MpZ`\n *\n * @returns a BigInt value truncated to the given number of least significant bits and returns that value as a signed integer.\n * If the leading bit of the remaining number is 1, the result is negative.\n */\n static asIntN(bits: u32, a: MpZ): MpZ {\n if (bits === 0) return MpZ.ZERO;\n const isNeg = a._getBit(bits - 1);\n return isNeg\n ? a.negate()._truncateToNBits(bits).negate()\n : a._truncateToNBits(bits);\n }\n\n /**\n * ### `MpZ.asUintN(bits: u32, a: MpZ): MpZ`\n *\n * @returns a BigInt value truncated to the given number of least significant bits and returns that value as an unsigned integer.\n * Results are always non-negative and two's complement in binary.\n */\n static asUintN(bits: u32, a: MpZ): MpZ {\n return a._truncateToNBits(bits);\n }\n\n /**\n * #### `MpZ.random(bits: u64): MpZ`\n *\n * @returns a random MpZ value with the specified maximum number of bits.\n * @throws RangeError if `bits` exceeds the maximum MpZ size.\n */\n static random(bits: u64): MpZ {\n const b = u32(bits % 32);\n const limbs = (bits / LIMB_BITS) + (b > 0);\n if (limbs > MAX_LIMBS) throw new RangeError('Maximum MpZ size exceeded');\n\n const n = new StaticArray(limbs);\n for (let i: u32 = 0; i < limbs; ++i) {\n n[i] = u32(Math.random() * u32.MAX_VALUE);\n }\n if (b > 0) {\n const m = (1 << b) - 1;\n n[n.length - 1] &= m;\n }\n return new MpZ(n);\n }\n}\n","import { strtol, strtod, strtob } from \"./util/string\";\n\ntype auto = i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isBoolean(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isInteger(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isSigned(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFloat(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isVector(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isReference(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isString(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isArray(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isArrayLike(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFunction(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isNullable(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isDefined(expression: auto): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isConstant(expression: auto): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isManaged(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isVoid(): bool;\n\n// @ts-ignore\n@builtin\nexport declare function lengthof(func?: T): i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function clz(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ctz(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function popcnt(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rotl(value: T, shift: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rotr(value: T, shift: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function abs(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function max(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function min(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ceil(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function floor(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function copysign(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function nearest(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function reinterpret(value: number): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sqrt(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function trunc(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function add(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sub(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function mul(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function div(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function eq(left: T, right: T): i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ne(left: T, right: T): i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rem(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function store(ptr: usize, value: auto, immOffset?: usize, immAlign?: usize): void;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sizeof(): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function alignof(): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function offsetof(fieldName?: string): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function idof(): u32;\n\n// @ts-ignore\n@builtin\nexport declare function nameof(): string;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function select(ifTrue: T, ifFalse: T, condition: bool): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function unreachable(): auto;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function changetype(value: auto): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function assert(isTrueish: T, message?: string): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function unchecked(expr: T): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function call_indirect(index: u32, ...args: auto[]): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function instantiate(...args: auto[]): T;\n\nexport namespace atomic {\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load(ptr: usize, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: T, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult;\n\n // @ts-ignore: decorator\n @builtin\n export declare function notify(ptr: usize, count: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function fence(): void;\n}\n\n// @ts-ignore: decorator\n@lazy\nexport const enum AtomicWaitResult {\n OK = 0,\n NOT_EQUAL = 1,\n TIMED_OUT = 2\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i8(value: auto): i8;\n\nexport namespace i8 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i8 = -128;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i8 = 127;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): i8 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i16(value: auto): i16;\n\nexport namespace i16 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i16 = -32768;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i16 = 32767;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): i16 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i32(value: auto): i32;\n\nexport namespace i32 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i32 = -2147483648;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i32 = 2147483647;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): i32 {\n return strtol(value, radix);\n }\n\n // @ts-ignore: decorator\n @builtin\n export declare function clz(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ctz(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_s(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_u(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotl(value: i32, shift: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotr(value: i32, shift: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rem_s(left: i32, right: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rem_u(left: u32, right: u32): u32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_f32(value: f32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n export namespace atomic {\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i32, immOffset?: usize): void;\n\n export namespace rmw8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n\n export namespace rmw16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n\n export namespace rmw {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i64(value: auto): i64;\n\nexport namespace i64 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i64 = -9223372036854775808;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i64 = 9223372036854775807;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): i64 {\n return strtol(value, radix);\n }\n\n // @ts-ignore: decorator\n @builtin\n export declare function clz(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ctz(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_s(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_u(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotl(value: i64, shift: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotr(value: i64, shift: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(left: i64, right:i64): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(left: i64, right:i64): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rem_s(left: i64, right: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rem_u(left: u64, right: u64): u64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_f64(value: f64): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n export namespace atomic {\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i64, immOffset?: usize): void;\n\n export namespace rmw8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw32 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isize(value: auto): isize;\n\nexport namespace isize {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: isize = sizeof() == sizeof()\n ? -2147483648\n : -9223372036854775808;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: isize = sizeof() == sizeof()\n ? 2147483647\n : 9223372036854775807;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): isize {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u8(value: auto): u8;\n\nexport namespace u8 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u8 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u8 = 255;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): u8 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u16(value: auto): u16;\n\nexport namespace u16 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u16 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u16 = 65535;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): u16 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u32(value: auto): u32;\n\nexport namespace u32 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u32 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u32 = 4294967295;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): u32 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u64(value: auto): u64;\n\nexport namespace u64 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u64 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u64 = 18446744073709551615;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): u64 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function usize(value: auto): usize;\n\nexport namespace usize {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: usize = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: usize = sizeof() == sizeof()\n ? 4294967295\n : 18446744073709551615;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): usize {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function bool(value: auto): bool;\n\nexport namespace bool {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: bool = false;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: bool = true;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string): bool {\n return strtob(value);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f32(value: auto): f32;\n\nexport namespace f32 {\n\n // @ts-ignore: decorator\n @lazy\n export const EPSILON = reinterpret(0x34000000); // 0x1p-23f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE = reinterpret(0x00000001); // 0x0.000001p+0f\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_NORMAL_VALUE = reinterpret(0x00800000); // 0x1p-126f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_SAFE_INTEGER: f32 = -16777215;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_SAFE_INTEGER: f32 = 16777215;\n\n // @ts-ignore: decorator\n @lazy\n export const POSITIVE_INFINITY: f32 = Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NEGATIVE_INFINITY: f32 = -Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NaN: f32 = 0.0 / 0.0;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string): f32 {\n return strtod(value);\n }\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function copysign(x: f32, y: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_i32(value: i32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(value: f32): f32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: f32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(left: f32, right: f32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(left: f32, right: f32): i32;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f64(value: auto): f64;\n\nexport namespace f64 {\n\n // @ts-ignore: decorator\n @lazy\n export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE = reinterpret(0x0000000000000001); // 0x0.0000000000001p+0\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_NORMAL_VALUE = reinterpret(0x0010000000000000); // 0x1p-1022\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_SAFE_INTEGER: f64 = -9007199254740991;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_SAFE_INTEGER: f64 = 9007199254740991;\n\n // @ts-ignore: decorator\n @lazy\n export const POSITIVE_INFINITY: f64 = Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NEGATIVE_INFINITY: f64 = -Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NaN: f64 = 0.0 / 0.0;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string): f64 {\n return strtod(value);\n }\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function copysign(x: f64, y: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_i64(value: i64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(value: f64): f64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: f64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(left: f64, right: f64): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(left: f64, right: f64): i32;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function v128(\n a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8,\n i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8\n): v128;\n\nexport namespace v128 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: T): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: T): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, ...lanes: u8[]): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function swizzle(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_ext(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8x8_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8x8_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16x4_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16x4_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32x2_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32x2_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load8_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load16_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_zero(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_zero(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: v128, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function andnot(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function not(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitselect(v1: v128, v2: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function any_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function dot(a: v128, b: v128): v128; // i16 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr(a: v128, b: v128): v128; // u8, u16 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function demote_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function promote_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function q15mulr_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_swizzle(a: v128, s: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_madd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_nmadd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_q15mulr(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_dot(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_dot_add(a: v128, b: v128, c: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i8x16(\n a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8,\n i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8\n): v128;\n\nexport namespace i8x16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_s(x: v128, idx: u8): i8;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_u(x: v128, idx: u8): u8;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(\n a: v128, b: v128,\n l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8,\n l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8\n ): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function swizzle(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_swizzle(a: v128, s: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128;\n\nexport namespace i16x8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i16): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_s(x: v128, idx: u8): i16;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_u(x: v128, idx: u8): u16;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i16): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function q15mulr_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i8x16_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i8x16_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i8x16_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i8x16_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(\n a: v128, b: v128,\n l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8\n ): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_q15mulr_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_dot_i8x16_i7x16_s(a: v128, b: v128, c: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128;\n\nexport namespace i32x4 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function dot_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f64x2_s_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f64x2_u_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_f32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_f32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_f64x2_s_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_f64x2_u_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_dot_i8x16_i7x16_add_s(a: v128, b: v128, c: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i64x2(a: i64, b: i64): v128;\n\nexport namespace i64x2 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128;\n\nexport namespace f32x4 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: f32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: f32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function demote_f64x2_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_madd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_nmadd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_max(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f64x2(a: f64, b: f64): v128;\n\nexport namespace f64x2 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: f64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: f64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function promote_low_f32x4(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_madd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_nmadd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_max(a: v128, b: v128): v128;\n}\n\n@final\nexport abstract class i31 { // FIXME: usage of 'new' requires a class :(\n\n // @ts-ignore: decorator\n @builtin\n static new(value: i32): i31ref { return changetype(unreachable()); }\n\n // @ts-ignore: decorator\n @builtin\n static get(i31expr: i31ref): i32 { return unreachable(); }\n}\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n// @ts-ignore: decorator\n@external(\"env\", \"abort\")\n@external.js(\"throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);\")\ndeclare function abort(\n message?: string | null,\n fileName?: string | null,\n lineNumber?: u32,\n columnNumber?: u32\n): void;\n\n// @ts-ignore: decorator\n@external(\"env\", \"trace\")\n@external.js(\"console.log(message, ...[a0, a1, a2, a3, a4].slice(0, n));\")\ndeclare function trace(\n message: string,\n n?: i32,\n a0?: f64,\n a1?: f64,\n a2?: f64,\n a3?: f64,\n a4?: f64\n): void;\n\n// @ts-ignore: decorator\n@external(\"env\", \"seed\")\n@external.js(\"return Date.now() * Math.random();\")\ndeclare function seed(): f64;\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\n","import { itoa32, utoa32, itoa64, utoa64, dtoa } from \"./util/number\";\nimport { strtol, strtod } from \"./util/string\";\n\n// @ts-ignore: decorator\n@builtin @inline\nexport const NaN: f64 = 0 / 0; // context-aware\n\n// @ts-ignore: decorator\n@builtin @inline\nexport const Infinity: f64 = 1 / 0; // context-aware\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isNaN(value: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFinite(value: T): bool;\n\n@final @unmanaged\nexport abstract class I8 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i8 = i8.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i8 = i8.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): i8 {\n return strtol(value, radix);\n }\n\n toString(this: i8, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I16 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i16 = i16.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i16 = i16.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): i16 {\n return strtol(value, radix);\n }\n\n toString(this: i16, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i32 = i32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i32 = i32.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): i32 {\n return strtol(value, radix);\n }\n\n toString(this: i32, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i64 = i64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i64 = i64.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): i64 {\n return strtol(value, radix);\n }\n\n toString(this: i64, radix: i32 = 10): String {\n return itoa64(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class Isize {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: isize = isize.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: isize = isize.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): isize {\n return strtol(value, radix);\n }\n\n toString(this: isize, radix: i32 = 10): String {\n if (sizeof() == 4) {\n return itoa32(this, radix);\n } else {\n return itoa64(this, radix);\n }\n }\n}\n\n@final @unmanaged\nexport abstract class U8 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u8 = u8.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u8 = u8.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): u8 {\n return strtol(value, radix);\n }\n\n toString(this: u8, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U16 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u16 = u16.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u16 = u16.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): u16 {\n return strtol(value, radix);\n }\n\n toString(this: u16, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u32 = u32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u32 = u32.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): u32 {\n return strtol(value, radix);\n }\n\n toString(this: u32, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u64 = u64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u64 = u64.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): u64 {\n return strtol(value, radix);\n }\n\n toString(this: u64, radix: i32 = 10): String {\n return utoa64(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class Usize {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: usize = usize.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: usize = usize.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): usize {\n return strtol(value, radix);\n }\n\n toString(this: usize, radix: i32 = 10): String {\n if (sizeof() == 4) {\n return utoa32(this, radix);\n } else {\n return utoa64(this, radix);\n }\n }\n}\n\n@final @unmanaged\nexport abstract class Bool {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: bool = bool.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: bool = bool.MAX_VALUE;\n\n toString(this: bool, radix: i32 = 0): String {\n return this ? \"true\" : \"false\";\n }\n}\n\nexport { Bool as Boolean };\n\n@final @unmanaged\nexport abstract class F32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly EPSILON: f32 = f32.EPSILON;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: f32 = f32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: f32 = f32.MAX_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_SAFE_INTEGER: f32 = f32.MIN_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_SAFE_INTEGER: f32 = f32.MAX_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly POSITIVE_INFINITY: f32 = f32.POSITIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NEGATIVE_INFINITY: f32 = f32.NEGATIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NaN: f32 = f32.NaN;\n\n static isNaN(value: f32): bool {\n return isNaN(value);\n }\n\n static isFinite(value: f32): bool {\n return isFinite(value);\n }\n\n static isSafeInteger(value: f32): bool {\n return abs(value) <= f32.MAX_SAFE_INTEGER && trunc(value) == value;\n }\n\n static isInteger(value: f32): bool {\n return isFinite(value) && trunc(value) == value;\n }\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): f32 {\n return strtol(value, radix);\n }\n\n /** @deprecated */\n static parseFloat(value: string): f32 {\n return strtod(value);\n }\n\n toString(this: f32, radix: i32 = 0): String {\n return dtoa(this);\n }\n}\n\n@final @unmanaged\nexport abstract class F64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly EPSILON: f64 = f64.EPSILON;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: f64 = f64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: f64 = f64.MAX_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_SAFE_INTEGER: f64 = f64.MIN_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_SAFE_INTEGER: f64 = f64.MAX_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly POSITIVE_INFINITY: f64 = f64.POSITIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NEGATIVE_INFINITY: f64 = f64.NEGATIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NaN: f64 = f64.NaN;\n\n static isNaN(value: f64): bool {\n return isNaN(value);\n }\n\n static isFinite(value: f64): bool {\n return isFinite(value);\n }\n\n static isSafeInteger(value: f64): bool {\n return abs(value) <= f64.MAX_SAFE_INTEGER && trunc(value) == value;\n }\n\n static isInteger(value: f64): bool {\n return isFinite(value) && trunc(value) == value;\n }\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): f64 {\n return strtol(value, radix);\n }\n\n /** @deprecated */\n static parseFloat(value: string): f64 {\n return strtod(value);\n }\n\n toString(this: f64, radix: i32 = 0): String {\n return dtoa(this);\n }\n}\n\nexport { F64 as Number };\n","// This file is shared with the compiler and must remain portable\n\n/** Runtime types. */\nexport enum Runtime {\n /** Simple bump allocator without GC. */\n Stub = 0,\n /** Stop the world semi-automatic GC. */\n Minimal = 1,\n /** incremental GC. */\n Incremental = 2,\n}\n","import { compareImpl } from \"./string\";\n\ntype Comparator = (a: T, b: T) => i32;\n\n// @ts-ignore: decorator\n@lazy @inline const EMPTY = u32.MAX_VALUE;\n// @ts-ignore: decorator\n@inline const INSERTION_SORT_THRESHOLD = 48;\n// @ts-ignore: decorator\n@inline const MIN_RUN_LENGTH = 32;\n\n// @ts-ignore: decorator\n@inline\nfunction log2u(n: u32): u32 {\n return 31 - clz(n);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function COMPARATOR(): Comparator {\n if (isInteger()) {\n if (isSigned() && sizeof() <= 4) {\n return (a, b) => i32(a) - i32(b);\n } else {\n return (a, b) => i32(a > b) - i32(a < b);\n }\n } else if (isFloat()) {\n if (sizeof() == 4) {\n return (a, b) => {\n let ia = reinterpret(f32(a));\n let ib = reinterpret(f32(b));\n ia ^= ia >> 31 >>> 1;\n ib ^= ib >> 31 >>> 1;\n return i32(ia > ib) - i32(ia < ib);\n };\n } else {\n return (a, b) => {\n let ia = reinterpret(f64(a));\n let ib = reinterpret(f64(b));\n ia ^= ia >> 63 >>> 1;\n ib ^= ib >> 63 >>> 1;\n return i32(ia > ib) - i32(ia < ib);\n };\n }\n } else if (isString()) {\n return (a, b) => {\n if (\n changetype(a) == changetype(b) ||\n changetype(a) == 0 ||\n changetype(b) == 0\n ) return 0;\n let alen = changetype(a).length;\n let blen = changetype(b).length;\n if (!(alen | blen)) return 0;\n if (!alen) return -1;\n if (!blen) return 1;\n let res = compareImpl(\n changetype(a), 0,\n changetype(b), 0,\n min(alen, blen)\n );\n return res ? res : alen - blen;\n };\n } else {\n return (a, b) => i32(a > b) - i32(a < b);\n }\n}\n\n// Power Sort implementation (stable) from paper \"Nearly-Optimal Mergesorts\"\n// https://arxiv.org/pdf/1805.04154.pdf\n// This method usually outperform TimSort.\n// TODO: refactor c >>> 31 to c < 0 when binaryen will support this opt\nexport function SORT(\n ptr: usize,\n len: i32,\n comparator: Comparator\n): void {\n if (len <= INSERTION_SORT_THRESHOLD) {\n if (len <= 1) return;\n if (ASC_SHRINK_LEVEL < 1) {\n switch (len) {\n case 3: {\n let a = load(ptr, 0);\n let b = load(ptr, 1 << alignof());\n let c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 0);\n a = select(a, b, c);\n b = load(ptr, 2 << alignof());\n c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 1 << alignof());\n store(ptr, select(a, b, c), 2 << alignof());\n }\n case 2: {\n let a = load(ptr, 0);\n let b = load(ptr, 1 << alignof());\n let c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 0);\n store(ptr, select(a, b, c), 1 << alignof());\n return;\n }\n }\n }\n insertionSort(ptr, 0, len - 1, 0, comparator);\n return;\n }\n\n let lgPlus2 = log2u(len) + 2;\n let lgPlus2Size = lgPlus2 << alignof();\n let leftRunStartBuf = __alloc(lgPlus2Size << 1);\n let leftRunEndBuf = leftRunStartBuf + lgPlus2Size;\n\n for (let i: u32 = 0; i < lgPlus2; ++i) {\n store(leftRunStartBuf + (i << alignof()), EMPTY);\n }\n\n let buffer = __alloc(len << alignof());\n\n let hi = len - 1;\n let endA = extendRunRight(ptr, 0, hi, comparator);\n let lenA = endA + 1;\n\n if (lenA < MIN_RUN_LENGTH) {\n endA = min(hi, MIN_RUN_LENGTH - 1);\n insertionSort(ptr, 0, endA, lenA, comparator);\n }\n\n let top: u32 = 0, startA = 0;\n while (endA < hi) {\n let startB = endA + 1;\n let endB = extendRunRight(ptr, startB, hi, comparator);\n let lenB = endB - startB + 1;\n\n if (lenB < MIN_RUN_LENGTH) {\n endB = min(hi, startB + MIN_RUN_LENGTH - 1);\n insertionSort(ptr, startB, endB, lenB, comparator);\n }\n\n let k = nodePower(0, hi, startA, startB, endB);\n\n for (let i = top; i > k; --i) {\n let start = load(leftRunStartBuf + (i << alignof()));\n if (start != EMPTY) {\n mergeRuns(\n ptr,\n start,\n load(leftRunEndBuf + (i << alignof())) + 1,\n endA,\n buffer,\n comparator\n );\n startA = start;\n store(leftRunStartBuf + (i << alignof()), EMPTY);\n }\n }\n\n store(leftRunStartBuf + (k << alignof()), startA);\n store(leftRunEndBuf + (k << alignof()), endA);\n startA = startB;\n endA = endB;\n top = k;\n }\n\n for (let i = top; i != 0; --i) {\n let start = load(leftRunStartBuf + (i << alignof()));\n if (start != EMPTY) {\n mergeRuns(\n ptr,\n start,\n load(leftRunEndBuf + (i << alignof())) + 1,\n hi,\n buffer,\n comparator\n );\n }\n }\n // dealloc aux buffers\n __free(buffer);\n __free(leftRunStartBuf);\n}\n\nfunction insertionSort(\n ptr: usize,\n left: i32,\n right: i32,\n presorted: i32,\n comparator: Comparator\n): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n // slightly improved original insertion sort\n for (let i = left + presorted; i <= right; ++i) {\n let j = i - 1;\n let a = load(ptr + (i << alignof()));\n while (j >= left) {\n let b = load(ptr + (j << alignof()));\n if (comparator(a, b) < 0) {\n store(ptr + (j << alignof()), b, 1 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), a, 1 << alignof());\n }\n } else {\n // even-odd two-way insertion sort which allow increase minRunLen\n let range = right - left + 1;\n let i = left + select(range & 1, presorted - ((range - presorted) & 1), presorted == 0);\n for (; i <= right; i += 2) {\n let a = load(ptr + (i << alignof()), 0);\n let b = load(ptr + (i << alignof()), 1 << alignof());\n let min = b, max = a;\n if (comparator(a, b) <= 0) {\n min = a, max = b;\n }\n let j = i - 1;\n while (j >= left) {\n a = load(ptr + (j << alignof()));\n if (comparator(a, max) > 0) {\n store(ptr + (j << alignof()), a, 2 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), max, 2 << alignof());\n while (j >= left) {\n a = load(ptr + (j << alignof()));\n if (comparator(a, min) > 0) {\n store(ptr + (j << alignof()), a, 1 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), min, 1 << alignof());\n }\n }\n}\n\nfunction nodePower(left: u32, right: u32, startA: u32, startB: u32, endB: u32): u32 {\n let n: u64 = right - left + 1;\n let s = startB - (left << 1);\n let l = startA + s;\n let r = endB + s + 1;\n let a = (l << 30) / n;\n let b = (r << 30) / n;\n return clz((a ^ b));\n}\n\nfunction extendRunRight(\n ptr: usize,\n i: i32,\n right: i32,\n comparator: Comparator\n): i32 {\n if (i == right) return i;\n let j = i;\n if (comparator(\n load(ptr + ( j << alignof())),\n load(ptr + (++j << alignof()))\n ) > 0) {\n while (\n j < right &&\n (comparator(\n load(ptr + (j << alignof()), 1 << alignof()),\n load(ptr + (j << alignof()))\n ) >>> 31) // < 0\n ) ++j;\n // reverse\n let k = j;\n while (i < k) {\n let tmp = load(ptr + (i << alignof()));\n store(ptr + (i << alignof()), load(ptr + (k << alignof()))); ++i;\n store(ptr + (k << alignof()), tmp); --k;\n }\n } else {\n while (\n j < right &&\n comparator(\n load(ptr + (j << alignof()), 1 << alignof()),\n load(ptr + (j << alignof()))\n ) >= 0\n ) ++j;\n }\n return j;\n}\n\n// Merges arr[l..m - 1] and arr[m..r]\nfunction mergeRuns(\n ptr: usize,\n l: i32,\n m: i32,\n r: i32,\n buffer: usize,\n comparator: Comparator\n): void {\n --m;\n let i: i32, j: i32, t = r + m;\n for (i = m + 1; i > l; --i) {\n store(\n buffer + ((i - 1) << alignof()),\n load(ptr + ((i - 1) << alignof()))\n );\n }\n for (j = m; j < r; ++j) {\n store(\n buffer + ((t - j) << alignof()),\n load(ptr + (j << alignof()), 1 << alignof())\n );\n }\n for (let k = l; k <= r; ++k) {\n let a = load(buffer + (j << alignof()));\n let b = load(buffer + (i << alignof()));\n if (comparator(a, b) < 0) {\n store(ptr + (k << alignof()), a);\n --j;\n } else {\n store(ptr + (k << alignof()), b);\n ++i;\n }\n }\n}\n","/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { COMPARATOR, SORT } from \"./util/sort\";\nimport { REVERSE, FILL } from \"./util/bytes\";\nimport { idof } from \"./builtins\";\nimport { Array } from \"./array\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from \"./util/error\";\nimport { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from \"./util/string\";\n\n@final\nexport class StaticArray {\n [key: number]: T;\n\n // Note that the interface of StaticArray instances must be a semantically\n // compatible subset of Array in order for syntax highlighting to work\n // properly, for instance when creating static arrays from array literals.\n // The additionally provided static methods take care of dealing with static\n // arrays exclusively, without having to convert to Array first.\n\n static fromArray(source: Array): StaticArray {\n let length = source.length;\n let outSize = length << alignof();\n let out = changetype>(__new(outSize, idof>()));\n if (isManaged()) {\n let sourcePtr = source.dataStart;\n for (let i = 0; i < length; ++i) {\n let off = i << alignof();\n let ref = load(sourcePtr + off);\n store(changetype(out) + off, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(changetype(out), source.dataStart, outSize);\n }\n return out;\n }\n\n /** @deprecated Please use source.concat> instead. */\n static concat(source: StaticArray, other: StaticArray): StaticArray {\n return source.concat>(other);\n }\n\n /** @deprecated Please use source.slice> instead. */\n static slice(source: StaticArray, start: i32 = 0, end: i32 = i32.MAX_VALUE): StaticArray {\n return source.slice>(start, end);\n }\n\n constructor(length: i32) {\n if (length > BLOCK_MAXSIZE >>> alignof()) throw new RangeError(E_INVALIDLENGTH);\n let outSize = length << alignof();\n let out = changetype>(__new(outSize, idof>()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(out), 0, outSize);\n }\n return out;\n }\n\n get length(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize >>> alignof();\n }\n\n at(index: i32): T {\n let len = this.length;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n let value = load(changetype(this) + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @operator(\"[]\") private __get(index: i32): T {\n if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE);\n let value = load(changetype(this) + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @unsafe @operator(\"{}\") private __uget(index: i32): T {\n return load(changetype(this) + (index << alignof()));\n }\n\n @operator(\"[]=\") private __set(index: i32, value: T): void {\n if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE);\n this.__uset(index, value);\n }\n\n @unsafe @operator(\"{}=\") private __uset(index: i32, value: T): void {\n store(changetype(this) + (index << alignof()), value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n }\n\n fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): StaticArray {\n if (isManaged()) {\n FILL(changetype(this), this.length, changetype(value), start, end);\n __link(changetype(this), changetype(value), false);\n } else {\n FILL(changetype(this), this.length, value, start, end);\n }\n return this;\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): StaticArray {\n let ptr = changetype(this);\n let len = this.length;\n\n end = min(end, len);\n\n let to = target < 0 ? max(len + target, 0) : min(target, len);\n let from = start < 0 ? max(len + start, 0) : min(start, len);\n let last = end < 0 ? max(len + end, 0) : min(end, len);\n let count = min(last - from, len - to);\n\n memory.copy( // is memmove\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return this;\n }\n\n includes(value: T, fromIndex: i32 = 0): bool {\n if (isFloat()) {\n let length = this.length;\n if (length == 0 || fromIndex >= length) return false;\n if (fromIndex < 0) fromIndex = max(length + fromIndex, 0);\n while (fromIndex < length) {\n let elem = load(changetype(this) + (fromIndex << alignof()));\n // @ts-ignore\n if (elem == value || isNaN(elem) & isNaN(value)) return true;\n ++fromIndex;\n }\n return false;\n } else {\n return this.indexOf(value, fromIndex) >= 0;\n }\n }\n\n indexOf(value: T, fromIndex: i32 = 0): i32 {\n let length = this.length;\n if (length == 0 || fromIndex >= length) return -1;\n if (fromIndex < 0) fromIndex = max(length + fromIndex, 0);\n while (fromIndex < length) {\n if (load(changetype(this) + (fromIndex << alignof())) == value) return fromIndex;\n ++fromIndex;\n }\n return -1;\n }\n\n lastIndexOf(value: T, fromIndex: i32 = this.length): i32 {\n let length = this.length;\n if (length == 0) return -1;\n if (fromIndex < 0) fromIndex = length + fromIndex;\n else if (fromIndex >= length) fromIndex = length - 1;\n while (fromIndex >= 0) {\n if (load(changetype(this) + (fromIndex << alignof())) == value) return fromIndex;\n --fromIndex;\n }\n return -1;\n }\n\n concat = Array>(other: U): U {\n let sourceLen = this.length;\n let otherLen = other.length;\n let outLen = sourceLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) {\n throw new Error(E_INVALIDLENGTH);\n }\n let sourceSize = sourceLen << alignof();\n let out = changetype(this); // FIXME: instanceof needs *some* value\n\n if (out instanceof Array) {\n out = changetype(__newArray(outLen, alignof(), idof>()));\n // ^ FIXME: Function returns type U, but can't __newArray(U extends Array)\n let outStart = changetype>(out).dataStart;\n let otherStart = changetype>(other).dataStart;\n let thisStart = changetype(this);\n\n if (isManaged()) {\n for (let offset: usize = 0; offset < sourceSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += sourceSize;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, thisStart, sourceSize);\n memory.copy(outStart + sourceSize, otherStart, otherLen << alignof());\n }\n } else if (out instanceof StaticArray) {\n out = changetype(__new(outLen << alignof(), idof>()));\n let outStart = changetype(out);\n let otherStart = changetype(other);\n let thisStart = changetype(this);\n\n if (isManaged()) {\n for (let offset: usize = 0; offset < sourceSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += sourceSize;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, thisStart, sourceSize);\n memory.copy(outStart + sourceSize, otherStart, otherLen << alignof());\n }\n } else {\n ERROR(\"Only Array and StaticArray accept for 'U' parameter\");\n }\n return out;\n }\n\n slice = Array>(start: i32 = 0, end: i32 = i32.MAX_VALUE): U {\n let length = this.length;\n start = start < 0 ? max(start + length, 0) : min(start, length);\n end = end < 0 ? max(end + length, 0) : min(end, length);\n length = max(end - start, 0);\n\n let sourceStart = changetype(this) + (start << alignof());\n let size = length << alignof();\n let out = changetype(this); // FIXME: instanceof needs *some* value\n\n if (out instanceof Array) {\n // return Array\n out = changetype(__newArray(length, alignof(), idof>()));\n // ^ FIXME: Function returns type U, but can't __newArray(U extends Array)\n let outStart = changetype>(out).dataStart;\n if (isManaged()) {\n let off: usize = 0;\n while (off < size) {\n let ref = load(sourceStart + off);\n store(outStart + off, ref);\n __link(changetype(out), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(outStart, sourceStart, size);\n }\n } else if (out instanceof StaticArray) {\n // return StaticArray\n out = changetype(__new(size, idof>()));\n let outStart = changetype(out);\n if (isManaged()) {\n let off: usize = 0;\n while (off < size) {\n let ref = load(sourceStart + off);\n store(outStart + off, ref);\n __link(outStart, ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(outStart, sourceStart, size);\n }\n } else {\n ERROR(\"Only Array and StaticArray accept for 'U' parameter\");\n }\n return out;\n }\n\n findIndex(fn: (value: T, index: i32, array: StaticArray) => bool): i32 {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n findLastIndex(fn: (value: T, index: i32, array: StaticArray) => bool): i32 {\n for (let i = this.length - 1; i >= 0; --i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n forEach(fn: (value: T, index: i32, array: StaticArray) => void): void {\n for (let i = 0, len = this.length; i < len; ++i) {\n fn(load(changetype(this) + (i << alignof())), i, this);\n }\n }\n\n map(fn: (value: T, index: i32, array: StaticArray) => U): Array {\n let len = this.length;\n let out = changetype>(__newArray(len, alignof(), idof>()));\n let outStart = out.dataStart;\n for (let i = 0; i < len; ++i) {\n let result = fn(load(changetype(this) + (i << alignof())), i, this);\n store(outStart + (i << alignof()), result);\n if (isManaged()) {\n __link(changetype(out), changetype(result), true);\n }\n }\n return out;\n }\n\n filter(fn: (value: T, index: i32, array: StaticArray) => bool): Array {\n let result = changetype>(__newArray(0, alignof(), idof>()));\n for (let i = 0, len = this.length; i < len; ++i) {\n let value = load(changetype(this) + (i << alignof()));\n if (fn(value, i, this)) result.push(value);\n }\n return result;\n }\n\n reduce(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U,\n initialValue: U\n ): U {\n let acc = initialValue;\n for (let i = 0, len = this.length; i < len; ++i) {\n acc = fn(acc, load(changetype(this) + (i << alignof())), i, this);\n }\n return acc;\n }\n\n reduceRight(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U,\n initialValue: U\n ): U {\n let acc = initialValue;\n for (let i = this.length - 1; i >= 0; --i) {\n acc = fn(acc, load(changetype(this) + (i << alignof())), i, this);\n }\n return acc;\n }\n\n every(fn: (value: T, index: i32, array: StaticArray) => bool): bool {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (!fn(load(changetype(this) + (i << alignof())), i, this)) return false;\n }\n return true;\n }\n\n some(fn: (value: T, index: i32, array: StaticArray) => bool): bool {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return true;\n }\n return false;\n }\n\n sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): StaticArray {\n SORT(changetype(this), this.length, comparator);\n return this;\n }\n\n join(separator: string = \",\"): string {\n if (isBoolean()) return joinBooleanArray(changetype(this), this.length, separator);\n if (isInteger()) return joinIntegerArray(changetype(this), this.length, separator);\n if (isFloat()) return joinFloatArray(changetype(this), this.length, separator);\n if (ASC_SHRINK_LEVEL < 1) {\n if (isString()) return joinStringArray(changetype(this), this.length, separator);\n }\n if (isReference()) return joinReferenceArray(changetype(this), this.length, separator);\n ERROR(\"unspported element type\");\n return unreachable();\n }\n\n reverse(): StaticArray {\n REVERSE(changetype(this), this.length);\n return this;\n }\n\n toString(): string {\n return this.join();\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n if (isManaged()) {\n let cur = changetype(this);\n let end = cur + changetype(changetype(this) - TOTAL_OVERHEAD).rtSize;\n while (cur < end) {\n let val = load(cur);\n if (val) __visit(val, cookie);\n cur += sizeof();\n }\n }\n }\n}\n","import {\r\n proc_exit,\r\n fd_write,\r\n iovec,\r\n random_get\r\n} from \"./bindings/wasi_snapshot_preview1\";\r\n\r\n// A WASI-wide reusable temporary buffer to store and work with out values. Must\r\n// be large enough to fit any operation it is used in, i.e. process/writeString.\r\n// @ts-ignore: decorator\r\n@lazy export const tempbuf = memory.data(4 * sizeof());\r\n\r\nimport {\r\n MAX_DOUBLE_LENGTH,\r\n decimalCount32,\r\n dtoa_buffered\r\n} from \"util/number\";\r\n\r\nexport function wasi_abort(\r\n message: string | null = null,\r\n fileName: string | null = null,\r\n lineNumber: u32 = 0,\r\n columnNumber: u32 = 0\r\n): void {\r\n // 0: iov.buf\r\n // 4: iov.buf_len\r\n // 8: len\r\n // 12: buf...\r\n const iovPtr: usize = 0;\r\n const lenPtr: usize = iovPtr + offsetof();\r\n const bufPtr: usize = lenPtr + sizeof();\r\n changetype(iovPtr).buf = bufPtr;\r\n var ptr = bufPtr;\r\n store(ptr, 0x203A74726F6261); ptr += 7; // 'abort: '\r\n if (message != null) {\r\n ptr += String.UTF8.encodeUnsafe(changetype(message), message.length, ptr);\r\n }\r\n store(ptr, 0x206E6920); ptr += 4; // ' in '\r\n if (fileName != null) {\r\n ptr += String.UTF8.encodeUnsafe(changetype(fileName), fileName.length, ptr);\r\n }\r\n store(ptr++, 0x28); // (\r\n var len = decimalCount32(lineNumber); ptr += len;\r\n do {\r\n let t = lineNumber / 10;\r\n store(--ptr, 0x30 + lineNumber % 10);\r\n lineNumber = t;\r\n } while (lineNumber); ptr += len;\r\n store(ptr++, 0x3A); // :\r\n len = decimalCount32(columnNumber); ptr += len;\r\n do {\r\n let t = columnNumber / 10;\r\n store(--ptr, 0x30 + columnNumber % 10);\r\n columnNumber = t;\r\n } while (columnNumber); ptr += len;\r\n store(ptr, 0x0A29); ptr += 2; // )\\n\r\n changetype(iovPtr).buf_len = ptr - bufPtr;\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n proc_exit(255);\r\n}\r\n\r\nexport function wasi_trace(\r\n message: string,\r\n n: i32 = 0,\r\n a0: f64 = 0,\r\n a1: f64 = 0,\r\n a2: f64 = 0,\r\n a3: f64 = 0,\r\n a4: f64 = 0\r\n): void {\r\n // 0: iov.buf\r\n // 4: iov.buf_len\r\n // 8: len\r\n // 12: buf...\r\n var iovPtr = __alloc(offsetof() + sizeof() + 1 + (max(String.UTF8.byteLength(message), MAX_DOUBLE_LENGTH << 1)));\r\n var lenPtr = iovPtr + offsetof();\r\n var bufPtr = lenPtr + sizeof();\r\n changetype(iovPtr).buf = bufPtr;\r\n store(bufPtr, 0x203A6563617274); // 'trace: '\r\n changetype(iovPtr).buf_len = 7;\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n changetype(iovPtr).buf_len = String.UTF8.encodeUnsafe(changetype(message), message.length, bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n) {\r\n store(bufPtr++, 0x20); // space\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a0), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n > 1) {\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a1), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n > 2) {\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a2), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n > 3) {\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a3), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n > 4) {\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a4), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n }\r\n }\r\n }\r\n }\r\n --bufPtr;\r\n }\r\n store(bufPtr, 0x0A); // \\n\r\n changetype(iovPtr).buf_len = 1;\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n __free(iovPtr);\r\n}\r\n\r\nexport function wasi_seed(): f64 {\r\n var rand: u64;\r\n do {\r\n random_get(tempbuf, 8);\r\n rand = load(tempbuf);\r\n } while (!rand);\r\n return reinterpret(rand);\r\n}\r\n","// Phase: wasi_snapshot_preview1\r\n// See: https://github.com/WebAssembly/WASI/tree/main/phases/snapshot/witx\r\n\r\n// helper types to be more explicit\r\ntype char = u8;\r\ntype ptr = usize; // all pointers are usize'd\r\ntype struct = T; // structs are references already in AS\r\n\r\n/** Read command-line argument data. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function args_get(\r\n /** Input: Pointer to a buffer to write the argument pointers. */\r\n argv: ptr>,\r\n /** Input: Pointer to a buffer to write the argument string data. */\r\n argv_buf: ptr\r\n): errno;\r\n\r\n/** Return command-line argument data sizes. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function args_sizes_get(\r\n /** Output: Number of arguments. */\r\n argc: ptr,\r\n /** Output: Size of the argument string data. */\r\n argv_buf_size: ptr\r\n): errno;\r\n\r\n/** Return the resolution of a clock. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function clock_res_get(\r\n /** Input: The clock for which to return the resolution. */\r\n clock: clockid,\r\n /** Output: The resolution of the clock. */\r\n resolution: ptr\r\n): errno;\r\n\r\n/** Return the time value of a clock. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function clock_time_get(\r\n /** Input: Cock for which to return the time. */\r\n clock: clockid,\r\n /** Input: Maximum lag (exclusive) that the returned time value may have, compared to its actual value. */\r\n precision: timestamp,\r\n /** Output: Time value of the clock. */\r\n time: ptr\r\n): errno;\r\n\r\n/** Read environment variable data. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function environ_get(\r\n /** Input: Pointer to a buffer to write the environment variable pointers. */\r\n environ: ptr,\r\n /** Input: Pointer to a buffer to write the environment variable string data. */\r\n environ_buf: usize\r\n): errno;\r\n\r\n/** Return command-line argument data sizes. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function environ_sizes_get(\r\n /** Output: The number of environment variables. */\r\n environ_count: ptr,\r\n /** Output: The size of the environment variable string data. */\r\n environ_buf_size: ptr\r\n): errno;\r\n\r\n/** Provide file advisory information on a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_advise(\r\n /** Input: The file descriptor for the file for which to provide file advisory information. */\r\n fd: fd,\r\n /** Input: The offset within the file to which the advisory applies. */\r\n offset: filesize,\r\n /** Input: The length of the region to which the advisory applies. */\r\n len: filesize,\r\n /** Input: The advice. */\r\n advice: advice\r\n): errno;\r\n\r\n/** Provide file advisory information on a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_allocate(\r\n /** Input: The file descriptor for the file in which to allocate space. */\r\n fd: fd,\r\n /** Input: The offset at which to start the allocation. */\r\n offset: filesize,\r\n /** Input: The length of the area that is allocated. */\r\n len: filesize\r\n): errno;\r\n\r\n/** Close a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_close(\r\n /** Input: The file descriptor to close. */\r\n fd: fd\r\n): errno;\r\n\r\n/** Synchronize the data of a file to disk. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_datasync(\r\n /** Input: The file descriptor of the file to synchronize to disk. */\r\n fd: fd\r\n): errno;\r\n\r\n/** Get the attributes of a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_fdstat_get(\r\n /** Input: The file descriptor to inspect. */\r\n fd: fd,\r\n /** Input: The buffer where the file descriptor's attributes are stored. */\r\n buf: struct\r\n): errno;\r\n\r\n/** Adjust the flags associated with a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_fdstat_set_flags(\r\n /** Input: The file descriptor to operate on. */\r\n fd: fd,\r\n /** Input: The desired values of the file descriptor flags. */\r\n flags: fdflags\r\n): errno;\r\n\r\n/** Adjust the rights associated with a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_fdstat_set_rights(\r\n /** Input: The file descriptor to operate on. */\r\n fd: fd,\r\n /** Input: The desired rights of the file descriptor. */\r\n fs_rights_base: rights,\r\n /** Input: The desired rights of the file descriptor. */\r\n fs_rights_inheriting: rights\r\n): errno;\r\n\r\n/** Return the attributes of an open file. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_filestat_get(\r\n /** Input: The file descriptor to inspect. */\r\n fd: fd,\r\n /** Input: The buffer where the file's attributes are stored. */\r\n buf: struct\r\n): errno;\r\n\r\n/** Adjust the size of an open file. If this increases the file's size, the extra bytes are filled with zeros. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_filestat_set_size(\r\n /** Input: A file descriptor for the file to adjust. */\r\n fd: fd,\r\n /** Input: The desired file size. */\r\n size: filesize\r\n): errno;\r\n\r\n/** Adjust the timestamps of an open file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_filestat_set_times(\r\n /** Input: The file descriptor to operate on. */\r\n fd: fd,\r\n /** Input: The desired values of the data access timestamp. */\r\n st_atim: timestamp,\r\n /** Input: The desired values of the data modification timestamp. */\r\n st_mtim: timestamp,\r\n /** Input: A bitmask indicating which timestamps to adjust. */\r\n fstflags: fstflags\r\n): errno;\r\n\r\n/** Read from a file descriptor, without using and updating the file descriptor's offset. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_pread(\r\n /** Input: The file descriptor from which to read data. */\r\n fd: fd,\r\n /** Input: List of scatter/gather vectors in which to store data. */\r\n iovs: ptr>,\r\n /** Input: Length of the list of scatter/gather vectors in which to store data. */\r\n iovs_len: usize,\r\n /** Input: The offset within the file at which to read. */\r\n offset: filesize,\r\n /** Output: The number of bytes read. */\r\n nread: ptr\r\n): errno;\r\n\r\n/** Return a description of the given preopened file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_prestat_get(\r\n /** Input: The file descriptor about which to retrieve information. */\r\n fd: fd,\r\n /** Input: The buffer where the description is stored. */\r\n buf: struct\r\n): errno;\r\n\r\n/** Return a description of the given preopened file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_prestat_dir_name(\r\n /** Input: The file descriptor about which to retrieve information. */\r\n fd: fd,\r\n /** Input: Buffer into which to write the preopened directory name. */\r\n path: ptr,\r\n /** Input: Length of the buffer into which to write the preopened directory name. */\r\n path_len: usize\r\n): errno;\r\n\r\n/** Write to a file descriptor, without using and updating the file descriptor's offset. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_pwrite(\r\n /** Input: The file descriptor to which to write data. */\r\n fd: fd,\r\n /** Input: List of scatter/gather vectors from which to retrieve data. */\r\n iovs: ptr>,\r\n /** Input: Length of the list of scatter/gather vectors from which to retrieve data. */\r\n iovs_len: usize,\r\n /** Input: The offset within the file at which to write. */\r\n offset: filesize,\r\n /** Output: The number of bytes written. */\r\n nwritten: ptr\r\n): errno;\r\n\r\n/** Read from a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_read(\r\n /** Input: The file descriptor from which to read data. */\r\n fd: fd,\r\n /** Input: List of scatter/gather vectors to which to store data. */\r\n iovs: ptr>,\r\n /** Input: Length of the list of scatter/gather vectors to which to store data. */\r\n iovs_len: usize,\r\n /** Output: The number of bytes read. */\r\n nread: ptr\r\n): errno;\r\n\r\n/** Read directory entries from a directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_readdir(\r\n /** Input: Directory from which to read the directory entries. */\r\n fd: fd,\r\n /** Input: Buffer where directory entries are stored. */\r\n buf: ptr>,\r\n /** Input: Length of the buffer where directory entries are stored. */\r\n buf_len: usize,\r\n /** Input: Location within the directory to start reading. */\r\n cookie: dircookie,\r\n /** Output: Number of bytes stored in the read buffer. If less than the size of the read buffer, the end of the directory has been reached. */\r\n buf_used: ptr\r\n): errno;\r\n\r\n/** Atomically replace a file descriptor by renumbering another file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_renumber(\r\n /** Input: The file descriptor to renumber. */\r\n from: fd,\r\n /** Input: The file descriptor to overwrite. */\r\n to: fd\r\n): errno;\r\n\r\n/** Move the offset of a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_seek(\r\n /** Input: The file descriptor to operate on. */\r\n fd: fd,\r\n /** Input: The number of bytes to move. */\r\n offset: filedelta,\r\n /** Input: The base from which the offset is relative. */\r\n whence: whence,\r\n /** Output: The new offset of the file descriptor, relative to the start of the file. */\r\n newoffset: ptr\r\n): errno;\r\n\r\n/** Synchronize the data and metadata of a file to disk. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_sync(\r\n /** Input: The file descriptor of the file containing the data and metadata to synchronize to disk. */\r\n fd: fd\r\n): errno;\r\n\r\n/** Return the current offset of a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_tell(\r\n /** Input: The file descriptor to inspect. */\r\n fd: fd,\r\n /** Output: The current offset of the file descriptor, relative to the start of the file. */\r\n newoffset: ptr\r\n): errno;\r\n\r\n/** Write to a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_write(\r\n /** Input: The file descriptor to which to write data. */\r\n fd: fd,\r\n /** Input: List of scatter/gather vectors from which to retrieve data. */\r\n iovs: ptr>,\r\n /** Input: List of scatter/gather vectors from which to retrieve data. */\r\n iovs_len: usize,\r\n /** Output: The number of bytes written. */\r\n nwritten: ptr\r\n): errno;\r\n\r\n/* Create a directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_create_directory(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The path at which to create the directory. */\r\n path: ptr,\r\n /** Input: The path at which to create the directory. */\r\n path_len: usize\r\n): errno;\r\n\r\n/** Return the attributes of a file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_filestat_get(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: Flags determining the method of how the path is resolved. */\r\n flags: lookupflags,\r\n /** Input: The path of the file or directory to inspect. */\r\n path: ptr,\r\n /** Input: The path of the file or directory to inspect. */\r\n path_len: usize,\r\n /** Input: The buffer where the file's attributes are stored. */\r\n buf: struct\r\n): errno;\r\n\r\n/** Adjust the timestamps of a file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_filestat_set_times(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: Flags determining the method of how the path is resolved. */\r\n flags: lookupflags,\r\n /** Input: The path of the file or directory to operate on. */\r\n path: ptr,\r\n /** Input: The path of the file or directory to operate on. */\r\n path_len: usize,\r\n /** Input: The desired values of the data access timestamp. */\r\n st_atim: timestamp,\r\n /** Input: The desired values of the data modification timestamp. */\r\n st_mtim: timestamp,\r\n /** Input: A bitmask indicating which timestamps to adjust. */\r\n fstflags: fstflags\r\n): errno;\r\n\r\n/** Create a hard link. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_link(\r\n /** Input: The working directory at which the resolution of the old path starts. */\r\n old_fd: fd,\r\n /** Input: Flags determining the method of how the path is resolved. */\r\n old_flags: lookupflags,\r\n /** Input: The source path from which to link. */\r\n old_path: ptr,\r\n /** Input: The source path from which to link. */\r\n old_path_len: usize,\r\n /** Input: The working directory at which the resolution of the new path starts. */\r\n new_fd: fd,\r\n /** Input: The destination path at which to create the hard link. */\r\n new_path: ptr,\r\n /** Input: The length of the destination path at which to create the hard link. */\r\n new_path_len: usize\r\n): errno;\r\n\r\n/** Open a file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_open(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n dirfd: fd,\r\n /** Input: Flags determining the method of how the path is resolved. */\r\n dirflags: lookupflags,\r\n /** Input: The path of the file or directory to open. */\r\n path: ptr,\r\n /** Input: The length of the path of the file or directory to open. */\r\n path_len: usize,\r\n /** Input: The method by which to open the file. */\r\n oflags: oflags,\r\n /** Input: The initial base rights that apply to operations using the file descriptor itself. */\r\n fs_rights_base: rights,\r\n /** Input: The initial inheriting rights that apply to file descriptors derived from it. */\r\n fs_rights_inheriting: rights,\r\n /** Input: The initial flags of the file descriptor. */\r\n fs_flags: fdflags,\r\n /** Output: The file descriptor of the file that has been opened. */\r\n fd: ptr\r\n): errno;\r\n\r\n/** Read the contents of a symbolic link. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_readlink(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The path of the symbolic link from which to read. */\r\n path: ptr,\r\n /** Input: The length of the path of the symbolic link from which to read. */\r\n path_len: usize,\r\n /** Input: The buffer to which to write the contents of the symbolic link. */\r\n buf: ptr,\r\n /** Input: The length of the buffer to which to write the contents of the symbolic link. */\r\n buf_len: usize,\r\n /** Output: The number of bytes placed in the buffer. */\r\n buf_used: ptr\r\n): errno;\r\n\r\n/** Remove a directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_remove_directory(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The path to a directory to remove. */\r\n path: ptr,\r\n /** Input: The length of the path to a directory to remove. */\r\n path_len: usize\r\n): errno;\r\n\r\n/** Rename a file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_rename(\r\n /** Input: The working directory at which the resolution of the old path starts. */\r\n old_fd: fd,\r\n /** Input: The source path of the file or directory to rename. */\r\n old_path: ptr,\r\n /** Input: The length of the source path of the file or directory to rename. */\r\n old_path_len: usize,\r\n /** Input: The working directory at which the resolution of the new path starts. */\r\n new_fd: fd,\r\n /** Input: The destination path to which to rename the file or directory. */\r\n new_path: ptr,\r\n /** Input: The length of the destination path to which to rename the file or directory. */\r\n new_path_len: usize\r\n): errno;\r\n\r\n/** Create a symbolic link. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_symlink(\r\n /** Input: The contents of the symbolic link. */\r\n old_path: ptr,\r\n /** Input: The length of the contents of the symbolic link. */\r\n old_path_len: usize,\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The destination path at which to create the symbolic link. */\r\n new_path: ptr,\r\n /** Input: The length of the destination path at which to create the symbolic link. */\r\n new_path_len: usize\r\n): errno;\r\n\r\n/** Unlink a file. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_unlink_file(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The path to a file to unlink. */\r\n path: ptr,\r\n /** Input: The length of the path to a file to unlink. */\r\n path_len: usize\r\n): errno;\r\n\r\n/** Concurrently poll for the occurrence of a set of events. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function poll_oneoff(\r\n /** Input: The events to which to subscribe. */\r\n in_: ptr>,\r\n /** Input: The events that have occurred. */\r\n out: ptr>,\r\n /** Input: Both the number of subscriptions and events. */\r\n nsubscriptions: usize,\r\n /** Output: The number of events stored. */\r\n nevents: ptr\r\n): errno;\r\n\r\n/** Terminate the process normally. An exit code of 0 indicates successful termination of the program. The meanings of other values is dependent on the environment. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function proc_exit(\r\n /** Input: The exit code returned by the process. */\r\n rval: u32\r\n): void;\r\n\r\n/** Send a signal to the process of the calling thread. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function proc_raise(\r\n /** Input: The signal condition to trigger. */\r\n sig: signal\r\n): errno;\r\n\r\n/** Write high-quality random data into a buffer. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function random_get(\r\n /** Input: The buffer to fill with random data. */\r\n buf: usize,\r\n /** Input: The length of the buffer to fill with random data. */\r\n buf_len: usize\r\n): errno;\r\n\r\n/** Temporarily yield execution of the calling thread. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function sched_yield(): errno;\r\n\r\n/** Receive a message from a socket. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function sock_recv(\r\n /** Input: The socket on which to receive data. */\r\n sock: fd,\r\n /** Input: List of scatter/gather vectors to which to store data. */\r\n ri_data: ptr>,\r\n /** Input: The length of the list of scatter/gather vectors to which to store data. */\r\n ri_data_len: usize,\r\n /** Input: Message flags. */\r\n ri_flags: riflags,\r\n /** Output: Number of bytes stored in `ri_data`. */\r\n ro_datalen: ptr,\r\n /** Output: Message flags. */\r\n ro_flags: ptr\r\n): errno;\r\n\r\n/** Send a message on a socket. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function sock_send(\r\n /** Input: The socket on which to send data. */\r\n sock: fd,\r\n /** Input: List of scatter/gather vectors to which to retrieve data */\r\n si_data: ptr>,\r\n /** Input: The length of the list of scatter/gather vectors to which to retrieve data */\r\n si_data_len: usize,\r\n /** Input: Message flags. */\r\n si_flags: siflags,\r\n /** Output: Number of bytes transmitted. */\r\n so_datalen: ptr\r\n): errno;\r\n\r\n/** Shut down socket send and receive channels. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function sock_shutdown(\r\n /** Input: The socket on which to shutdown channels. */\r\n sock: fd,\r\n /** Input: Which channels on the socket to shut down. */\r\n how: sdflags\r\n): errno;\r\n\r\n// === Types ======================================================================================\r\n\r\n/** File or memory access pattern advisory information. */\r\nexport namespace advice {\r\n /** The application has no advice to give on its behavior with respect to the specified data. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NORMAL: advice = 0;\r\n /** The application expects to access the specified data sequentially from lower offsets to higher offsets. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SEQUENTIAL : advice = 1;\r\n /** The application expects to access the specified data in a random order. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RANDOM: advice = 2;\r\n /** The application expects to access the specified data in the near future. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const WILLNEED: advice = 3;\r\n /** The application expects that it will not access the specified data in the near future. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DONTNEED: advice = 4;\r\n /** The application expects to access the specified data once and then not reuse it thereafter. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOREUSE: advice = 5;\r\n}\r\nexport type advice = u8;\r\n\r\n/** Identifiers for clocks. */\r\nexport namespace clockid {\r\n /** The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const REALTIME: clockid = 0;\r\n /** The store-wide monotonic clock. Absolute value has no meaning. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MONOTONIC: clockid = 1;\r\n /** The CPU-time clock associated with the current process. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROCESS_CPUTIME_ID: clockid = 2;\r\n /** The CPU-time clock associated with the current thread. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const THREAD_CPUTIME_ID: clockid = 3;\r\n}\r\nexport type clockid = u32;\r\n\r\n/** Identifier for a device containing a file system. Can be used in combination with `inode` to uniquely identify a file or directory in the filesystem. */\r\nexport type device = u64;\r\n\r\n/** A reference to the offset of a directory entry. The value 0 signifies the start of the directory. */\r\nexport type dircookie = u64;\r\n\r\n/** A directory entry. */\r\n@unmanaged export class dirent {\r\n /** The offset of the next directory entry stored in this directory. */\r\n next: dircookie;\r\n /** The serial number of the file referred to by this directory entry. */\r\n ino: inode;\r\n /** The length of the name of the directory entry. */\r\n namlen: u32;\r\n /** The type of the file referred to by this directory entry. */\r\n type: filetype;\r\n private __padding0: u16;\r\n}\r\n\r\n/** Error codes returned by functions. */\r\nexport namespace errno {\r\n /** No error occurred. System call completed successfully. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SUCCESS: errno = 0;\r\n /** Argument list too long. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TOOBIG: errno = 1;\r\n /** Permission denied. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ACCES: errno = 2;\r\n /** Address in use. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ADDRINUSE: errno = 3;\r\n /** Address not available. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ADDRNOTAVAIL: errno = 4;\r\n /** Address family not supported. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const AFNOSUPPORT: errno = 5;\r\n /** Resource unavailable, or operation would block. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const AGAIN: errno = 6;\r\n /** Connection already in progress. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ALREADY: errno = 7;\r\n /** Bad file descriptor. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BADF: errno = 8;\r\n /** Bad message. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BADMSG: errno = 9;\r\n /** Device or resource busy. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BUSY: errno = 10;\r\n /** Operation canceled. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CANCELED: errno = 11;\r\n /** No child processes. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CHILD: errno = 12;\r\n /** Connection aborted. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CONNABORTED: errno = 13;\r\n /** Connection refused. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CONNREFUSED: errno = 14;\r\n /** Connection reset. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CONNRESET: errno = 15;\r\n /** Resource deadlock would occur. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DEADLK: errno = 16;\r\n /** Destination address required. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DESTADDRREQ: errno = 17;\r\n /** Mathematics argument out of domain of function. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DOM: errno = 18;\r\n /** Reserved. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DQUOT: errno = 19;\r\n /** File exists. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const EXIST: errno = 20;\r\n /** Bad address. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FAULT: errno = 21;\r\n /** File too large. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FBIG: errno = 22;\r\n /** Host is unreachable. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const HOSTUNREACH: errno = 23;\r\n /** Identifier removed. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const IDRM: errno = 24;\r\n /** Illegal byte sequence. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ILSEQ: errno = 25;\r\n /** Operation in progress. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const INPROGRESS: errno = 26;\r\n /** Interrupted function. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const INTR: errno = 27;\r\n /** Invalid argument. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const INVAL: errno = 28;\r\n /** I/O error. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const IO: errno = 29;\r\n /** Socket is connected. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ISCONN: errno = 30;\r\n /** Is a directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ISDIR: errno = 31;\r\n /** Too many levels of symbolic links. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const LOOP: errno = 32;\r\n /** File descriptor value too large. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MFILE: errno = 33;\r\n /** Too many links. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MLINK: errno = 34;\r\n /** Message too large. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MSGSIZE: errno = 35;\r\n /** Reserved. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MULTIHOP: errno = 36;\r\n /** Filename too long. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NAMETOOLONG: errno = 37;\r\n /** Network is down. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NETDOWN: errno = 38;\r\n /** Connection aborted by network. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NETRESET: errno = 39;\r\n /** Network unreachable. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NETUNREACH: errno = 40;\r\n /** Too many files open in system. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NFILE: errno = 41;\r\n /** No buffer space available. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOBUFS: errno = 42;\r\n /** No such device. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NODEV: errno = 43;\r\n /** No such file or directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOENT: errno = 44;\r\n /** Executable file format error. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOEXEC: errno = 45;\r\n /** No locks available. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOLCK: errno = 46;\r\n /** Reserved. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOLINK: errno = 47;\r\n /** Not enough space. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOMEM: errno = 48;\r\n /** No message of the desired type. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOMSG: errno = 49;\r\n /** Protocol not available. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOPROTOOPT: errno = 50;\r\n /** No space left on device. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOSPC: errno = 51;\r\n /** Function not supported. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOSYS: errno = 52;\r\n /** The socket is not connected. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTCONN: errno = 53;\r\n /** Not a directory or a symbolic link to a directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTDIR: errno = 54;\r\n /** Directory not empty. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTEMPTY: errno = 55;\r\n /** State not recoverable. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTRECOVERABLE: errno = 56;\r\n /** Not a socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTSOCK: errno = 57;\r\n /** Not supported, or operation not supported on socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTSUP: errno = 58;\r\n /** Inappropriate I/O control operation. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTTY: errno = 59;\r\n /** No such device or address. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NXIO: errno = 60;\r\n /** Value too large to be stored in data type. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const OVERFLOW: errno = 61;\r\n /** Previous owner died. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const OWNERDEAD: errno = 62;\r\n /** Operation not permitted. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PERM: errno = 63;\r\n /** Broken pipe. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PIPE: errno = 64;\r\n /** Protocol error. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROTO: errno = 65;\r\n /** Protocol not supported. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROTONOSUPPORT: errno = 66;\r\n /** Protocol wrong type for socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROTOTYPE: errno = 67;\r\n /** Result too large. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RANGE: errno = 68;\r\n /** Read-only file system. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ROFS: errno = 69;\r\n /** Invalid seek. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SPIPE: errno = 70;\r\n /** No such process. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SRCH: errno = 71;\r\n /** Reserved. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const STALE: errno = 72;\r\n /** Connection timed out. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TIMEDOUT: errno = 73;\r\n /** Text file busy. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TXTBSY: errno = 74;\r\n /** Cross-device link. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const XDEV: errno = 75;\r\n /** Extension: Capabilities insufficient. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTCAPABLE: errno = 76;\r\n}\r\nexport type errno = u16;\r\n\r\n/** Translates an error code to a string. */\r\nexport function errnoToString(err: errno): string {\r\n switch (err) {\r\n case errno.SUCCESS: return \"SUCCESS\";\r\n case errno.TOOBIG: return \"TOOBIG\";\r\n case errno.ACCES: return \"ACCES\";\r\n case errno.ADDRINUSE: return \"ADDRINUSE\";\r\n case errno.ADDRNOTAVAIL: return \"ADDRNOTAVAIL\";\r\n case errno.AFNOSUPPORT: return \"AFNOSUPPORT\";\r\n case errno.AGAIN: return \"AGAIN\";\r\n case errno.ALREADY: return \"ALREADY\";\r\n case errno.BADF: return \"BADF\";\r\n case errno.BADMSG: return \"BADMSG\";\r\n case errno.BUSY: return \"BUSY\";\r\n case errno.CANCELED: return \"CANCELED\";\r\n case errno.CHILD: return \"CHILD\";\r\n case errno.CONNABORTED: return \"CONNABORTED\";\r\n case errno.CONNREFUSED: return \"CONNREFUSED\";\r\n case errno.CONNRESET: return \"CONNRESET\";\r\n case errno.DEADLK: return \"DEADLK\";\r\n case errno.DESTADDRREQ: return \"DESTADDRREQ\";\r\n case errno.DOM: return \"DOM\";\r\n case errno.DQUOT: return \"DQUOT\";\r\n case errno.EXIST: return \"EXIST\";\r\n case errno.FAULT: return \"FAULT\";\r\n case errno.FBIG: return \"FBIG\";\r\n case errno.HOSTUNREACH: return \"HOSTUNREACH\";\r\n case errno.IDRM: return \"IDRM\";\r\n case errno.ILSEQ: return \"ILSEQ\";\r\n case errno.INPROGRESS: return \"INPROGRESS\";\r\n case errno.INTR: return \"INTR\";\r\n case errno.INVAL: return \"INVAL\";\r\n case errno.IO: return \"IO\";\r\n case errno.ISCONN: return \"ISCONN\";\r\n case errno.ISDIR: return \"ISDIR\";\r\n case errno.LOOP: return \"LOOP\";\r\n case errno.MFILE: return \"MFILE\";\r\n case errno.MLINK: return \"MLINK\";\r\n case errno.MSGSIZE: return \"MSGSIZE\";\r\n case errno.MULTIHOP: return \"MULTIHOP\";\r\n case errno.NAMETOOLONG: return \"NAMETOOLONG\";\r\n case errno.NETDOWN: return \"NETDOWN\";\r\n case errno.NETRESET: return \"NETRESET\";\r\n case errno.NETUNREACH: return \"NETUNREACH\";\r\n case errno.NFILE: return \"NFILE\";\r\n case errno.NOBUFS: return \"NOBUFS\";\r\n case errno.NODEV: return \"NODEV\";\r\n case errno.NOENT: return \"NOENT\";\r\n case errno.NOEXEC: return \"NOEXEC\";\r\n case errno.NOLCK: return \"NOLCK\";\r\n case errno.NOLINK: return \"NOLINK\";\r\n case errno.NOMEM: return \"NOMEM\";\r\n case errno.NOMSG: return \"NOMSG\";\r\n case errno.NOPROTOOPT: return \"NOPROTOOPT\";\r\n case errno.NOSPC: return \"NOSPC\";\r\n case errno.NOSYS: return \"NOSYS\";\r\n case errno.NOTCONN: return \"NOTCONN\";\r\n case errno.NOTDIR: return \"NOTDIR\";\r\n case errno.NOTEMPTY: return \"NOTEMPTY\";\r\n case errno.NOTRECOVERABLE: return \"NOTRECOVERABLE\";\r\n case errno.NOTSOCK: return \"NOTSOCK\";\r\n case errno.NOTSUP: return \"NOTSUP\";\r\n case errno.NOTTY: return \"NOTTY\";\r\n case errno.NXIO: return \"NXIO\";\r\n case errno.OVERFLOW: return \"OVERFLOW\";\r\n case errno.OWNERDEAD: return \"OWNERDEAD\";\r\n case errno.PERM: return \"PERM\";\r\n case errno.PIPE: return \"PIPE\";\r\n case errno.PROTO: return \"PROTO\";\r\n case errno.PROTONOSUPPORT: return \"PROTONOSUPPORT\";\r\n case errno.PROTOTYPE: return \"PROTOTYPE\";\r\n case errno.RANGE: return \"RANGE\";\r\n case errno.ROFS: return \"ROFS\";\r\n case errno.SPIPE: return \"SPIPE\";\r\n case errno.SRCH: return \"SRCH\";\r\n case errno.STALE: return \"STALE\";\r\n case errno.TIMEDOUT: return \"TIMEDOUT\";\r\n case errno.TXTBSY: return \"TXTBSY\";\r\n case errno.XDEV: return \"XDEV\";\r\n case errno.NOTCAPABLE: return \"NOTCAPABLE\";\r\n }\r\n return \"UNKNOWN\";\r\n}\r\n\r\n@unmanaged abstract class $event { // size=16/32\r\n /** User-provided value that got attached to `subscription#userdata`. */\r\n userdata: userdata;\r\n /** If non-zero, an error that occurred while processing the subscription request. */\r\n error: errno;\r\n /** The type of the event that occurred. */\r\n type: eventtype;\r\n\r\n private __padding0: u16;\r\n}\r\n\r\n/** An event that occurred. */\r\n@unmanaged export abstract class event extends $event {\r\n private __padding1: u64;\r\n private __padding2: u64;\r\n}\r\n\r\n/** An event that occurred when type is `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\r\n@unmanaged export class event_fd_readwrite extends $event {\r\n /* The number of bytes available for reading or writing. */\r\n nbytes: filesize;\r\n /* The state of the file descriptor. */\r\n flags: eventrwflags;\r\n\r\n private __padding1: u32;\r\n}\r\n\r\n/** The state of the file descriptor subscribed to with `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\r\nexport namespace eventrwflags {\r\n /** The peer of this socket has closed or disconnected. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const HANGUP: eventrwflags = 1;\r\n}\r\nexport type eventrwflags = u16;\r\n\r\n/** Type of a subscription to an event or its occurrence. */\r\nexport namespace eventtype {\r\n /** The time value of clock has reached the timestamp. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CLOCK: eventtype = 0;\r\n /** File descriptor has data available for reading. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_READ: eventtype = 1;\r\n /** File descriptor has capacity available for writing */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_WRITE: eventtype = 2;\r\n}\r\nexport type eventtype = u8;\r\n\r\n/** Exit code generated by a process when exiting. */\r\nexport type exitcode = u32;\r\n\r\n/** A file descriptor number. */\r\nexport type fd = u32;\r\n\r\n/** File descriptor flags. */\r\nexport namespace fdflags {\r\n /** Append mode: Data written to the file is always appended to the file's end. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const APPEND: fdflags = 1;\r\n /** Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DSYNC: fdflags = 2;\r\n /** Non-blocking mode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NONBLOCK: fdflags = 4;\r\n /** Synchronized read I/O operations. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RSYNC: fdflags = 8;\r\n /** Write according to synchronized I/O file integrity completion. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SYNC: fdflags = 16;\r\n}\r\nexport type fdflags = u16;\r\n\r\n/** File descriptor attributes. */\r\n@unmanaged export class fdstat {\r\n /** File type. */\r\n filetype: filetype;\r\n /** File descriptor flags. */\r\n flags: fdflags;\r\n /** Rights that apply to this file descriptor. */\r\n rights_base: rights;\r\n /** Maximum set of rights that may be installed on new file descriptors that are created through this file descriptor, e.g., through `path_open`. */\r\n rights_inheriting: rights;\r\n}\r\n\r\n/** Relative offset within a file. */\r\nexport type filedelta = i64;\r\n\r\n/** Non-negative file size or length of a region within a file. */\r\nexport type filesize = u64;\r\n\r\n/** File attributes. */\r\n@unmanaged export class filestat {\r\n /** Device ID of device containing the file. */\r\n dev: device;\r\n /** File serial number. */\r\n ino: inode;\r\n /** File type. */\r\n filetype: filetype;\r\n /** Number of hard links to the file. */\r\n nlink: linkcount;\r\n /** For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. */\r\n size: filesize;\r\n /** Last data access timestamp. */\r\n atim: timestamp;\r\n /** Last data modification timestamp. */\r\n mtim: timestamp;\r\n /** Last file status change timestamp. */\r\n ctim: timestamp;\r\n}\r\n\r\n/** The type of a file descriptor or file. */\r\nexport namespace filetype {\r\n /** The type of the file descriptor or file is unknown or is different from any of the other types specified. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const UNKNOWN: filetype = 0;\r\n /** The file descriptor or file refers to a block device inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BLOCK_DEVICE: filetype = 1;\r\n /** The file descriptor or file refers to a character device inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CHARACTER_DEVICE: filetype = 2;\r\n /** The file descriptor or file refers to a directory inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DIRECTORY: filetype = 3;\r\n /** The file descriptor or file refers to a regular file inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const REGULAR_FILE: filetype = 4;\r\n /** The file descriptor or file refers to a datagram socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SOCKET_DGRAM: filetype = 5;\r\n /** The file descriptor or file refers to a byte-stream socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SOCKET_STREAM: filetype = 6;\r\n /** The file refers to a symbolic link inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SYMBOLIC_LINK: filetype = 7;\r\n}\r\nexport type filetype = u8;\r\n\r\n/** Which file time attributes to adjust. */\r\nexport namespace fstflags {\r\n /** Adjust the last data access timestamp to the value stored in `filestat#st_atim`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET_ATIM: fstflags = 1;\r\n /** Adjust the last data access timestamp to the time of clock `clockid.REALTIME`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET_ATIM_NOW: fstflags = 2;\r\n /** Adjust the last data modification timestamp to the value stored in `filestat#st_mtim`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET_MTIM: fstflags = 4;\r\n /** Adjust the last data modification timestamp to the time of clock `clockid.REALTIME`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET_MTIM_NOW: fstflags = 8;\r\n}\r\nexport type fstflags = u16;\r\n\r\n/** File serial number that is unique within its file system. */\r\nexport type inode = u64;\r\n\r\n/** A region of memory for scatter/gather reads. */\r\n@unmanaged export class iovec {\r\n /** The address of the buffer to be filled. */\r\n buf: usize;\r\n /** The length of the buffer to be filled. */\r\n buf_len: usize;\r\n}\r\n\r\n/** Number of hard links to an inode. */\r\nexport type linkcount = u64;\r\n\r\n/** Flags determining the method of how paths are resolved. */\r\nexport namespace lookupflags {\r\n /** As long as the resolved path corresponds to a symbolic link, it is expanded. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SYMLINK_FOLLOW: lookupflags = 1;\r\n}\r\nexport type lookupflags = u32;\r\n\r\n/** Open flags. */\r\nexport namespace oflags {\r\n /** Create file if it does not exist. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CREAT: oflags = 1;\r\n /** Fail if not a directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DIRECTORY: oflags = 2;\r\n /** Fail if file already exists. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const EXCL: oflags = 4;\r\n /** Truncate file to size 0. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TRUNC: oflags = 8;\r\n}\r\nexport type oflags = u16;\r\n\r\n/** Identifiers for preopened capabilities. */\r\nexport namespace preopentype {\r\n /** A pre-opened directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DIR: preopentype = 0;\r\n}\r\nexport type preopentype = u8;\r\n\r\n@unmanaged abstract class $prestat { // WASM32: size=1/8, WASM64: size=1/16\r\n /* The type of the pre-opened capability. */\r\n type: preopentype;\r\n}\r\n\r\n/* Information about a pre-opened capability. */\r\n@unmanaged export abstract class prestat extends $prestat {\r\n private __padding0: usize;\r\n}\r\n\r\n/** The contents of a $prestat when type is `preopentype.DIR`. */\r\n@unmanaged export class prestat_dir extends $prestat {\r\n /** The length of the directory name for use with `fd_prestat_dir_name`. */\r\n name_len: usize;\r\n}\r\n\r\n/** Flags provided to `sock_recv`. */\r\nexport namespace riflags {\r\n /** Returns the message without removing it from the socket's receive queue. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PEEK: riflags = 1;\r\n /** On byte-stream sockets, block until the full amount of data can be returned. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const WAITALL: riflags = 2;\r\n}\r\nexport type riflags = u16;\r\n\r\n/** File descriptor rights, determining which actions may be performed. */\r\nexport namespace rights {\r\n /** The right to invoke `fd_datasync`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_DATASYNC: rights = 1;\r\n /** The right to invoke `fd_read` and `sock_recv`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_READ: rights = 2;\r\n /** The right to invoke `fd_seek`. This flag implies `rights.FD_TELL`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_SEEK: rights = 4;\r\n /** The right to invoke `fd_fdstat_set_flags`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_FDSTAT_SET_FLAGS: rights = 8;\r\n /** The right to invoke `fd_sync`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_SYNC: rights = 16;\r\n /** The right to invoke `fd_seek` in such a way that the file offset remains unaltered (i.e., `whence.CUR` with offset zero), or to invoke `fd_tell`). */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_TELL: rights = 32;\r\n /** The right to invoke `fd_write` and `sock_send`. If `rights.FD_SEEK` is set, includes the right to invoke `fd_pwrite`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_WRITE: rights = 64;\r\n /** The right to invoke `fd_advise`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_ADVISE: rights = 128;\r\n /** The right to invoke `fd_allocate`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_ALLOCATE: rights = 256;\r\n /** The right to invoke `path_create_directory`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_CREATE_DIRECTORY: rights = 512;\r\n /** If `rights.PATH_OPEN` is set, the right to invoke `path_open` with `oflags.CREAT`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_CREATE_FILE: rights = 1024;\r\n /** The right to invoke `path_link` with the file descriptor as the source directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_LINK_SOURCE: rights = 2048;\r\n /** The right to invoke `path_link` with the file descriptor as the target directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_LINK_TARGET: rights = 4096;\r\n /** The right to invoke `path_open`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_OPEN: rights = 8192;\r\n /** The right to invoke `fd_readdir`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_READDIR: rights = 16384;\r\n /** The right to invoke `path_readlink`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_READLINK: rights = 32768;\r\n /** The right to invoke `path_rename` with the file descriptor as the source directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_RENAME_SOURCE: rights = 65536;\r\n /** The right to invoke `path_rename` with the file descriptor as the target directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_RENAME_TARGET: rights = 131072;\r\n /** The right to invoke `path_filestat_get`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_FILESTAT_GET: rights = 262144;\r\n /** The right to change a file's size (there is no `path_filestat_set_size`). If `rights.PATH_OPEN` is set, includes the right to invoke `path_open` with `oflags.TRUNC`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_FILESTAT_SET_SIZE: rights = 524288;\r\n /** The right to invoke `path_filestat_set_times`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_FILESTAT_SET_TIMES: rights = 1048576;\r\n /** The right to invoke `fd_filestat_get`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_FILESTAT_GET: rights = 2097152;\r\n /** The right to invoke `fd_filestat_set_size`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_FILESTAT_SET_SIZE: rights = 4194304;\r\n /** The right to invoke `fd_filestat_set_times`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_FILESTAT_SET_TIMES: rights = 8388608;\r\n /** The right to invoke `path_symlink`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RIGHT_PATH_SYMLINK: rights = 16777216;\r\n /** The right to invoke `path_remove_directory`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_REMOVE_DIRECTORY: rights = 33554432;\r\n /** The right to invoke `path_unlink_file`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_UNLINK_FILE: rights = 67108864;\r\n /** If `rights.FD_READ` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_READ`. If `rights.FD_WRITE` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_WRITE`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const POLL_FD_READWRITE: rights = 134217728;\r\n /** The right to invoke `sock_shutdown`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SOCK_SHUTDOWN: rights = 268435456;\r\n}\r\nexport type rights = u64;\r\n\r\n/** Flags returned by `sock_recv`. */\r\nexport namespace roflags {\r\n /** Message data has been truncated. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DATA_TRUNCATED: roflags = 1;\r\n}\r\nexport type roflags = u16;\r\n\r\n/** Which channels on a socket to shut down. */\r\nexport namespace sdflags {\r\n /** Disables further receive operations. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RD: sdflags = 1;\r\n /** Disables further send operations. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const WR: sdflags = 2;\r\n}\r\nexport type sdflags = u8;\r\n\r\n/** Flags provided to `sock_send`. */\r\nexport namespace siflags {\r\n // As there are currently no flags defined, it must be set to zero.\r\n}\r\nexport type siflags = u16;\r\n\r\n/** Signal condition. */\r\nexport namespace signal {\r\n /** Hangup. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const HUP: signal = 1;\r\n /** Terminate interrupt signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const INT: signal = 2;\r\n /** Terminal quit signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const QUIT: signal = 3;\r\n /** Illegal instruction. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ILL: signal = 4;\r\n /** Trace/breakpoint trap. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TRAP: signal = 5;\r\n /** Process abort signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ABRT: signal = 6;\r\n /** Access to an undefined portion of a memory object. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BUS: signal = 7;\r\n /** Erroneous arithmetic operation. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FPE: signal = 8;\r\n /** Kill. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const KILL: signal = 9;\r\n /** User-defined signal 1. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const USR1: signal = 10;\r\n /** Invalid memory reference. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SEGV: signal = 11;\r\n /** User-defined signal 2. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const USR2: signal = 12;\r\n /** Write on a pipe with no one to read it. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PIPE: signal = 13;\r\n /** Alarm clock. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ALRM: signal = 14;\r\n /** Termination signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TERM: signal = 15;\r\n /** Child process terminated, stopped, or continued. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CHLD: signal = 16;\r\n /** Continue executing, if stopped. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CONT: signal = 17;\r\n /** Stop executing. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const STOP: signal = 18;\r\n /** Terminal stop signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TSTP: signal = 19;\r\n /** Background process attempting read. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TTIN: signal = 20;\r\n /** Background process attempting write. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TTOU: signal = 21;\r\n /** High bandwidth data is available at a socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const URG: signal = 22;\r\n /** CPU time limit exceeded. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const XCPU: signal = 23;\r\n /** File size limit exceeded. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const XFSZ: signal = 24;\r\n /** Virtual timer expired. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const VTALRM: signal = 25;\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROF: signal = 26;\r\n // @ts-ignore: decorator\r\n @inline\r\n export const WINCH: signal = 27;\r\n // @ts-ignore: decorator\r\n @inline\r\n export const POLL: signal = 28;\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PWR: signal = 29;\r\n /** Bad system call. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SYS: signal = 30;\r\n}\r\nexport type signal = u8;\r\n\r\n/** Flags determining how to interpret the timestamp provided in `subscription_t::u.clock.timeout. */\r\nexport namespace subclockflags {\r\n /** If set, treat the timestamp provided in `clocksubscription` as an absolute timestamp. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ABSTIME: subclockflags = 1;\r\n}\r\nexport type subclockflags = u16;\r\n\r\n@unmanaged abstract class $subscription { // size=16/48\r\n /** User-provided value that is attached to the subscription. */\r\n userdata: userdata;\r\n /** The type of the event to which to subscribe. */\r\n type: eventtype;\r\n\r\n private __padding0: u32;\r\n}\r\n\r\n/** Subscription to an event. */\r\n@unmanaged export abstract class subscription extends $subscription {\r\n private __padding1: u64;\r\n private __padding2: u64;\r\n private __padding3: u64;\r\n private __padding4: u64;\r\n}\r\n\r\n/* Subscription to an event of type `eventtype.CLOCK`.**/\r\n@unmanaged export class subscription_clock extends $subscription {\r\n /** The clock against which to compare the timestamp. */\r\n clock_id: clockid;\r\n /** The absolute or relative timestamp. */\r\n timeout: timestamp;\r\n /** The amount of time that the implementation may wait additionally to coalesce with other events. */\r\n precision: timestamp;\r\n /** Flags specifying whether the timeout is absolute or relative. */\r\n flags: subclockflags;\r\n\r\n private __padding1: u32;\r\n}\r\n\r\n/* Subscription to an event of type `eventtype.FD_READ` or `eventtype.FD_WRITE`.**/\r\n@unmanaged export class subscription_fd_readwrite extends $subscription {\r\n /** The file descriptor on which to wait for it to become ready for reading or writing. */\r\n file_descriptor: fd;\r\n\r\n private __padding1: u64;\r\n private __padding2: u64;\r\n private __padding3: u64;\r\n}\r\n\r\n/** Timestamp in nanoseconds. */\r\nexport type timestamp = u64;\r\n\r\n/** User-provided value that may be attached to objects that is retained when extracted from the implementation. */\r\nexport type userdata = u64;\r\n\r\n/** The position relative to which to set the offset of the file descriptor. */\r\nexport namespace whence {\r\n /** Seek relative to start-of-file. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET: whence = 0;\r\n /** Seek relative to current position. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CUR: whence = 1;\r\n /** Seek relative to end-of-file. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const END: whence = 2;\r\n}\r\n\r\nexport type whence = u8;\r\n","/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { compareImpl, strtol, strtod, isSpace, isAscii, isFinalSigma, toLower8, toUpper8 } from \"./util/string\";\nimport { SPECIALS_UPPER, casemap, bsearch } from \"./util/casemap\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_UNPAIRED_SURROGATE } from \"./util/error\";\nimport { idof } from \"./builtins\";\nimport { Array } from \"./array\";\n\n@final export abstract class String {\n\n @lazy static readonly MAX_LENGTH: i32 = (BLOCK_MAXSIZE >>> alignof());\n\n static fromCharCode(unit: i32, surr: i32 = -1): String {\n let hasSur = surr > 0;\n let out = changetype(__new(2 << i32(hasSur), idof()));\n store(changetype(out), unit);\n if (hasSur) store(changetype(out), surr, 2);\n return out;\n }\n\n static fromCharCodes(units: Array): String {\n let length = units.length;\n let out = changetype(__new(length << 1, idof()));\n let ptr = units.dataStart;\n for (let i = 0; i < length; ++i) {\n store(changetype(out) + (i << 1), load(ptr + (i << 2)));\n }\n return out;\n }\n\n static fromCodePoint(code: i32): String {\n let hasSur = code > 0xFFFF;\n let out = changetype(__new(2 << i32(hasSur), idof()));\n if (!hasSur) {\n store(changetype(out), code);\n } else {\n // Checks valid code point range\n assert(code <= 0x10FFFF);\n code -= 0x10000;\n let hi = (code & 0x03FF) | 0xDC00;\n let lo = code >>> 10 | 0xD800;\n store(changetype(out), lo | hi << 16);\n }\n return out;\n }\n\n @builtin static raw(parts: TemplateStringsArray, ...args: unknown[]): string { return unreachable(); }\n\n get length(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize >> 1;\n }\n\n at(pos: i32): String {\n let len = this.length;\n pos += select(0, len, pos >= 0);\n if (pos >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n let out = __new(2, idof());\n store(out, load(changetype(this) + (pos << 1)));\n return changetype(out); // retains\n }\n\n @operator(\"[]\") charAt(pos: i32): String {\n if (pos >= this.length) return changetype(\"\");\n let out = changetype(__new(2, idof()));\n store(changetype(out), load(changetype(this) + (pos << 1)));\n return out;\n }\n\n charCodeAt(pos: i32): i32 {\n if (pos >= this.length) return -1; // (NaN)\n return load(changetype(this) + (pos << 1));\n }\n\n codePointAt(pos: i32): i32 {\n let len = this.length;\n if (pos >= len) return -1; // (undefined)\n let first = load(changetype(this) + (pos << 1));\n if ((first & 0xFC00) != 0xD800 || pos + 1 == len) return first;\n let second = load(changetype(this) + (pos << 1), 2);\n if ((second & 0xFC00) != 0xDC00) return first;\n return (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n }\n\n @operator(\"+\") private static __concat(left: String, right: String): String {\n return left.concat(right);\n }\n\n concat(other: String): String {\n let thisSize: isize = this.length << 1;\n let otherSize: isize = other.length << 1;\n let outSize: usize = thisSize + otherSize;\n if (outSize == 0) return changetype(\"\");\n let out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this), thisSize);\n memory.copy(changetype(out) + thisSize, changetype(other), otherSize);\n return out;\n }\n\n endsWith(search: String, end: i32 = String.MAX_LENGTH): bool {\n end = min(max(end, 0), this.length);\n let searchLength = search.length;\n let searchStart = end - searchLength;\n if (searchStart < 0) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(this, searchStart, search, 0, searchLength);\n }\n\n @operator(\"==\") private static __eq(left: String | null, right: String | null): bool {\n if (changetype(left) == changetype(right)) return true;\n if (changetype(left) == 0 || changetype(right) == 0) return false;\n let leftLength = changetype(left).length;\n if (leftLength != changetype(right).length) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(left, 0, right, 0, leftLength);\n }\n\n @operator.prefix(\"!\")\n private static __not(str: String | null): bool {\n return changetype(str) == 0 || !changetype(str).length;\n }\n\n @operator(\"!=\")\n private static __ne(left: String | null, right: String | null): bool {\n return !this.__eq(left, right);\n }\n\n @operator(\">\") private static __gt(left: String, right: String): bool {\n if (changetype(left) == changetype(right)) return false;\n let leftLength = left.length;\n if (!leftLength) return false;\n let rightLength = right.length;\n if (!rightLength) return true;\n // @ts-ignore: string <-> String\n let res = compareImpl(left, 0, right, 0, min(leftLength, rightLength));\n return res ? res > 0 : leftLength > rightLength;\n }\n\n @operator(\">=\") private static __gte(left: String, right: String): bool {\n return !this.__lt(left, right);\n }\n\n @operator(\"<\") private static __lt(left: String, right: String): bool {\n if (changetype(left) == changetype(right)) return false;\n let rightLength = right.length;\n if (!rightLength) return false;\n let leftLength = left.length;\n if (!leftLength) return true;\n // @ts-ignore: string <-> String\n let res = compareImpl(left, 0, right, 0, min(leftLength, rightLength));\n return res ? res < 0 : leftLength < rightLength;\n }\n\n @operator(\"<=\") private static __lte(left: String, right: String): bool {\n return !this.__gt(left, right);\n }\n\n includes(search: String, start: i32 = 0): bool {\n return this.indexOf(search, start) != -1;\n }\n\n indexOf(search: String, start: i32 = 0): i32 {\n let searchLen = search.length;\n if (!searchLen) return 0;\n let len = this.length;\n if (!len) return -1;\n let searchStart = min(max(start, 0), len);\n for (len -= searchLen; searchStart <= len; ++searchStart) {\n // @ts-ignore: string <-> String\n if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart;\n }\n return -1;\n }\n\n lastIndexOf(search: String, start: i32 = i32.MAX_VALUE): i32 {\n let searchLen = search.length;\n if (!searchLen) return this.length;\n let len = this.length;\n if (!len) return -1;\n let searchStart = min(max(start, 0), len - searchLen);\n for (; searchStart >= 0; --searchStart) {\n // @ts-ignore: string <-> String\n if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart;\n }\n return -1;\n }\n\n // TODO: implement full locale comparison with locales and Collator options\n localeCompare(other: String): i32 {\n if (changetype(other) == changetype(this)) return 0;\n let alen = this.length;\n let blen = other.length;\n // @ts-ignore: string <-> String\n let res = compareImpl(this, 0, other, 0, min(alen, blen));\n res = res ? res : alen - blen;\n // normalize to [-1, 1] range\n return i32(res > 0) - i32(res < 0);\n }\n\n startsWith(search: String, start: i32 = 0): bool {\n let len = this.length;\n let searchStart = min(max(start, 0), len);\n let searchLength = search.length;\n if (searchLength + searchStart > len) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(this, searchStart, search, 0, searchLength);\n }\n\n substr(start: i32, length: i32 = i32.MAX_VALUE): String { // legacy\n let intStart: isize = start;\n let end: isize = length;\n let len: isize = this.length;\n if (intStart < 0) intStart = max(len + intStart, 0);\n let size = min(max(end, 0), len - intStart) << 1;\n if (size <= 0) return changetype(\"\");\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + (intStart << 1), size);\n return out;\n }\n\n substring(start: i32, end: i32 = i32.MAX_VALUE): String {\n let len: isize = this.length;\n let finalStart = min(max(start, 0), len);\n let finalEnd = min(max(end, 0), len);\n let fromPos = min(finalStart, finalEnd) << 1;\n let toPos = max(finalStart, finalEnd) << 1;\n let size = toPos - fromPos;\n if (!size) return changetype(\"\");\n if (!fromPos && toPos == len << 1) return this;\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + fromPos, size);\n return out;\n }\n\n trim(): String {\n let len = this.length;\n let size: usize = len << 1;\n while (size && isSpace(load(changetype(this) + size - 2))) {\n size -= 2;\n }\n let offset: usize = 0;\n while (offset < size && isSpace(load(changetype(this) + offset))) {\n offset += 2; size -= 2;\n }\n if (!size) return changetype(\"\");\n if (!offset && size == len << 1) return this;\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + offset, size);\n return out;\n }\n\n @inline\n trimLeft(): String {\n return this.trimStart();\n }\n\n @inline\n trimRight(): String {\n return this.trimEnd();\n }\n\n trimStart(): String {\n let size = this.length << 1;\n let offset: usize = 0;\n while (offset < size && isSpace(load(changetype(this) + offset))) {\n offset += 2;\n }\n if (!offset) return this;\n size -= offset;\n if (!size) return changetype(\"\");\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + offset, size);\n return out;\n }\n\n trimEnd(): String {\n let originalSize = this.length << 1;\n let size = originalSize;\n while (size && isSpace(load(changetype(this) + size - 2))) {\n size -= 2;\n }\n if (!size) return changetype(\"\");\n if (size == originalSize) return this;\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this), size);\n return out;\n }\n\n padStart(length: i32, pad: string = \" \"): String {\n let thisSize = this.length << 1;\n let targetSize = length << 1;\n let padSize = pad.length << 1;\n if (targetSize < thisSize || !padSize) return this;\n let prependSize = targetSize - thisSize;\n let out = changetype(__new(targetSize, idof()));\n if (prependSize > padSize) {\n let repeatCount = (prependSize - 2) / padSize;\n let restBase = repeatCount * padSize;\n let restSize = prependSize - restBase;\n memory.repeat(changetype(out), changetype(pad), padSize, repeatCount);\n memory.copy(changetype(out) + restBase, changetype(pad), restSize);\n } else {\n memory.copy(changetype(out), changetype(pad), prependSize);\n }\n memory.copy(changetype(out) + prependSize, changetype(this), thisSize);\n return out;\n }\n\n padEnd(length: i32, pad: string = \" \"): String {\n let thisSize = this.length << 1;\n let targetSize = length << 1;\n let padSize = pad.length << 1;\n if (targetSize < thisSize || !padSize) return this;\n let appendSize = targetSize - thisSize;\n let out = changetype(__new(targetSize, idof()));\n memory.copy(changetype(out), changetype(this), thisSize);\n if (appendSize > padSize) {\n let repeatCount = (appendSize - 2) / padSize;\n let restBase = repeatCount * padSize;\n let restSize = appendSize - restBase;\n memory.repeat(changetype(out) + thisSize, changetype(pad), padSize, repeatCount);\n memory.copy(changetype(out) + thisSize + restBase, changetype(pad), restSize);\n } else {\n memory.copy(changetype(out) + thisSize, changetype(pad), appendSize);\n }\n return out;\n }\n\n repeat(count: i32 = 0): String {\n let length = this.length;\n\n // Most browsers can't handle strings 1 << 28 chars or longer\n if (count < 0 || length * count > (1 << 28)) {\n throw new RangeError(E_INVALIDLENGTH);\n }\n\n if (count == 0 || !length) return changetype(\"\");\n if (count == 1) return this;\n let out = changetype(__new((length * count) << 1, idof()));\n memory.repeat(changetype(out), changetype(this), length << 1, count);\n return out;\n }\n\n replace(search: String, replacement: String): String {\n let len: usize = this.length;\n let slen: usize = search.length;\n if (len <= slen) {\n return len < slen ? this : select(replacement, this, search == this);\n }\n let index: isize = this.indexOf(search);\n if (~index) {\n let rlen: usize = replacement.length;\n len -= slen;\n let olen = len + rlen;\n if (olen) {\n let out = changetype(__new(olen << 1, idof()));\n memory.copy(changetype(out), changetype(this), index << 1);\n memory.copy(\n changetype(out) + (index << 1),\n changetype(replacement),\n rlen << 1\n );\n memory.copy(\n changetype(out) + ((index + rlen) << 1),\n changetype(this) + ((index + slen) << 1),\n (len - index) << 1\n );\n return out;\n }\n }\n return this;\n }\n\n replaceAll(search: String, replacement: String): String {\n let thisLen: usize = this.length;\n let searchLen: usize = search.length;\n if (thisLen <= searchLen) {\n return thisLen < searchLen\n ? this\n : select(replacement, this, search == this);\n }\n let replaceLen: usize = replacement.length;\n if (!searchLen) {\n if (!replaceLen) return this;\n // Special case: 'abc'.replaceAll('', '-') -> '-a-b-c-'\n let out = changetype(__new((thisLen + (thisLen + 1) * replaceLen) << 1, idof()));\n memory.copy(changetype(out), changetype(replacement), replaceLen << 1);\n let offset = replaceLen;\n for (let i: usize = 0; i < thisLen; ++i) {\n store(\n changetype(out) + (offset++ << 1),\n load(changetype(this) + (i << 1))\n );\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(replacement),\n replaceLen << 1\n );\n offset += replaceLen;\n }\n return out;\n }\n let prev: isize = 0, next: isize = 0;\n if (searchLen == replaceLen) {\n // Fast path when search and replacement have same length\n let outSize = thisLen << 1;\n let out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this), outSize);\n while (~(next = this.indexOf(search, prev))) {\n memory.copy(changetype(out) + (next << 1), changetype(replacement), replaceLen << 1);\n prev = next + searchLen;\n }\n return out;\n }\n let out: String | null = null, offset: usize = 0, outSize = thisLen;\n while (~(next = this.indexOf(search, prev))) {\n if (!out) out = changetype(__new(thisLen << 1, idof()));\n let chunk = next - prev;\n if (offset + chunk + replaceLen > outSize) {\n outSize <<= 1;\n out = changetype(__renew(changetype(out), outSize << 1));\n }\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(this) + (prev << 1),\n chunk << 1\n );\n offset += chunk;\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(replacement),\n replaceLen << 1\n );\n offset += replaceLen;\n prev = next + searchLen;\n }\n if (out) {\n let rest = thisLen - prev;\n if (offset + rest > outSize) {\n outSize <<= 1;\n out = changetype(__renew(changetype(out), outSize << 1));\n }\n if (rest) {\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(this) + (prev << 1),\n rest << 1\n );\n }\n rest += offset;\n if (outSize > rest) {\n out = changetype(__renew(changetype(out), rest << 1));\n }\n return out;\n }\n return this;\n }\n\n slice(start: i32, end: i32 = i32.MAX_VALUE): String {\n let len = this.length;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end, len);\n len = end - start;\n if (len <= 0) return changetype(\"\");\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n return out;\n }\n\n split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] {\n if (!limit) return changetype(__newArray(0, alignof(), idof>()));\n if (changetype(separator) == 0) return [ this ];\n let length: isize = this.length;\n let sepLen = changetype(separator).length;\n if (limit < 0) limit = i32.MAX_VALUE;\n if (!sepLen) {\n if (!length) return changetype(__newArray(0, alignof(), idof>()));\n // split by chars\n length = min(length, limit);\n let result = changetype(__newArray(length, alignof(), idof>()));\n // @ts-ignore: cast\n let resultStart = result.dataStart as usize;\n for (let i: isize = 0; i < length; ++i) {\n let charStr = changetype(__new(2, idof()));\n store(changetype(charStr), load(changetype(this) + (i << 1)));\n store(resultStart + (i << alignof()), changetype(charStr)); // result[i] = charStr\n __link(changetype(result), changetype(charStr), true);\n }\n return result;\n } else if (!length) {\n let result = changetype(__newArray(1, alignof(), idof>()));\n // @ts-ignore: cast\n store(result.dataStart as usize, changetype(\"\")); // static \"\"\n return result;\n }\n let result = changetype(__newArray(0, alignof(), idof>()));\n let end = 0, start = 0, i = 0;\n while (~(end = this.indexOf(changetype(separator), start))) {\n let len = end - start;\n if (len > 0) {\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n result.push(out);\n } else {\n result.push(changetype(\"\"));\n }\n if (++i == limit) return result;\n start = end + sepLen;\n }\n if (!start) { // also means: loop above didn't do anything\n result.push(this);\n return result;\n }\n let len = length - start;\n if (len > 0) {\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n result.push(out);\n } else {\n result.push(changetype(\"\")); // static \"\"\n }\n return result;\n }\n\n toLowerCase(): String {\n let len = this.length;\n if (!len) return this;\n let codes = changetype(__new(len * 2 * 2, idof()));\n let j: usize = 0;\n for (let i: usize = 0; i < len; ++i, ++j) {\n let c = load(changetype(this) + (i << 1));\n if (isAscii(c)) {\n store(changetype(codes) + (j << 1), toLower8(c));\n } else {\n // check and read surrogate pair\n if ((c - 0xD7FF < 0xDC00 - 0xD7FF) && i < len - 1) {\n let c1 = load(changetype(this) + (i << 1), 2);\n if (c1 - 0xDBFF < 0xE000 - 0xDBFF) {\n let c0 = c;\n c = (((c & 0x03FF) << 10) | (c1 & 0x03FF)) + 0x10000;\n ++i;\n if (c >= 0x20000) {\n store(changetype(codes) + (j << 1), c0 | (c1 << 16));\n ++j;\n continue;\n }\n }\n }\n // check special casing for lower table. It has one ently so instead lookup we just inline this.\n if (c == 0x0130) {\n // 0x0130 -> [0x0069, 0x0307]\n store(changetype(codes) + (j << 1), (0x0307 << 16) | 0x0069);\n ++j;\n } else if (c == 0x03A3) { // 'Σ'\n // Σ maps to σ but except at the end of a word where it maps to ς\n let sigma = 0x03C3; // σ\n if (len > 1 && isFinalSigma(changetype(this), i, len)) {\n sigma = 0x03C2; // ς\n }\n store(changetype(codes) + (j << 1), sigma);\n } else if (c - 0x24B6 <= 0x24CF - 0x24B6) {\n // Range 0x24B6 <= c <= 0x24CF not covered by casemap and require special early handling\n store(changetype(codes) + (j << 1), c + 26);\n } else {\n let code = casemap(c, 0) & 0x1FFFFF;\n if (code < 0x10000) {\n store(changetype(codes) + (j << 1), code);\n } else {\n // store as surrogare pair\n code -= 0x10000;\n let lo = (code >>> 10) | 0xD800;\n let hi = (code & 0x03FF) | 0xDC00;\n store(changetype(codes) + (j << 1), lo | (hi << 16));\n ++j;\n }\n }\n }\n }\n return changetype(__renew(changetype(codes), j << 1));\n }\n\n toUpperCase(): String {\n let len = this.length;\n if (!len) return this;\n let codes = changetype(__new(len * 3 * 2, idof()));\n let specialsPtr = changetype(SPECIALS_UPPER);\n let specialsLen = SPECIALS_UPPER.length;\n let j: usize = 0;\n for (let i: usize = 0; i < len; ++i, ++j) {\n let c = load(changetype(this) + (i << 1));\n if (isAscii(c)) {\n store(changetype(codes) + (j << 1), toUpper8(c));\n } else {\n // check and read surrogate pair\n if ((c - 0xD7FF < 0xDC00 - 0xD7FF) && i < len - 1) {\n let c1 = load(changetype(this) + (i << 1), 2);\n if (c1 - 0xDBFF < 0xE000 - 0xDBFF) {\n let c0 = c;\n c = (((c & 0x03FF) << 10) | (c1 & 0x03FF)) + 0x10000;\n ++i;\n if (c >= 0x20000) {\n store(changetype(codes) + (j << 1), c0 | (c1 << 16));\n ++j;\n continue;\n }\n }\n }\n // Range 0x24D0 <= c <= 0x24E9 not covered by casemap and require special early handling\n if (c - 0x24D0 <= 0x24E9 - 0x24D0) {\n // monkey patch\n store(changetype(codes) + (j << 1), c - 26);\n } else {\n let index: usize = -1;\n // Fast range check. See first and last rows in specialsUpper table\n if (c - 0x00DF <= 0xFB17 - 0x00DF) {\n index = bsearch(c, specialsPtr, specialsLen);\n }\n if (~index) {\n // load next 3 code points from row with `index` offset for specialsUpper table\n let ab = load(specialsPtr + (index << 1), 2);\n let cc = load(specialsPtr + (index << 1), 6);\n store(changetype(codes) + (j << 1), ab, 0);\n store(changetype(codes) + (j << 1), cc, 4);\n j += 1 + usize(cc != 0);\n } else {\n let code = casemap(c, 1) & 0x1FFFFF;\n if (code < 0x10000) {\n store(changetype(codes) + (j << 1), code);\n } else {\n // store as surrogare pair\n code -= 0x10000;\n let lo = (code >>> 10) | 0xD800;\n let hi = (code & 0x03FF) | 0xDC00;\n store(changetype(codes) + (j << 1), lo | (hi << 16));\n ++j;\n }\n }\n }\n }\n }\n return changetype(__renew(changetype(codes), j << 1));\n }\n\n toString(): String {\n return this;\n }\n}\n\n// @ts-ignore: nolib\nexport type string = String;\n\nexport function parseInt(str: string, radix: i32 = 0): f64 {\n return strtol(str, radix);\n}\n\nexport function parseFloat(str: string): f64 {\n return strtod(str);\n}\n\n// Encoding helpers\nexport namespace String {\n\n export namespace UTF8 {\n\n export const enum ErrorMode {\n WTF8,\n REPLACE,\n ERROR\n }\n\n export function byteLength(str: string, nullTerminated: bool = false): i32 {\n let strOff = changetype(str);\n let strEnd = strOff + changetype(changetype(str) - TOTAL_OVERHEAD).rtSize;\n let bufLen = i32(nullTerminated);\n while (strOff < strEnd) {\n let c1 = load(strOff);\n if (c1 < 128) {\n // @ts-ignore: cast\n if (nullTerminated & !c1) break;\n bufLen += 1;\n } else if (c1 < 2048) {\n bufLen += 2;\n } else {\n if ((c1 & 0xFC00) == 0xD800 && strOff + 2 < strEnd) {\n if ((load(strOff, 2) & 0xFC00) == 0xDC00) {\n bufLen += 4; strOff += 4;\n continue;\n }\n }\n bufLen += 3;\n }\n strOff += 2;\n }\n return bufLen;\n }\n\n export function encode(str: string, nullTerminated: bool = false, errorMode: ErrorMode = ErrorMode.WTF8): ArrayBuffer {\n let buf = changetype(__new(byteLength(str, nullTerminated), idof()));\n encodeUnsafe(changetype(str), str.length, changetype(buf), nullTerminated, errorMode);\n return buf;\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function encodeUnsafe(str: usize, len: i32, buf: usize, nullTerminated: bool = false, errorMode: ErrorMode = ErrorMode.WTF8): usize {\n let strEnd = str + (len << 1);\n let bufOff = buf;\n while (str < strEnd) {\n let c1 = load(str);\n if (c1 < 128) {\n store(bufOff, c1);\n bufOff++;\n // @ts-ignore: cast\n if (nullTerminated & !c1) return bufOff - buf;\n } else if (c1 < 2048) {\n let b0 = c1 >> 6 | 192;\n let b1 = c1 & 63 | 128;\n store(bufOff, b1 << 8 | b0);\n bufOff += 2;\n } else {\n // D800: 11011 0 0000000000 Lead\n // DBFF: 11011 0 1111111111\n // DC00: 11011 1 0000000000 Trail\n // DFFF: 11011 1 1111111111\n // F800: 11111 0 0000000000 Mask\n // FC00: 11111 1 0000000000\n if ((c1 & 0xF800) == 0xD800) {\n if (c1 < 0xDC00 && str + 2 < strEnd) {\n let c2 = load(str, 2);\n if ((c2 & 0xFC00) == 0xDC00) {\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) | (c2 & 0x03FF);\n let b0 = c1 >> 18 | 240;\n let b1 = c1 >> 12 & 63 | 128;\n let b2 = c1 >> 6 & 63 | 128;\n let b3 = c1 & 63 | 128;\n store(bufOff, b3 << 24 | b2 << 16 | b1 << 8 | b0);\n bufOff += 4; str += 4;\n continue;\n }\n }\n if (errorMode != ErrorMode.WTF8) { // unlikely\n if (errorMode == ErrorMode.ERROR) throw new Error(E_UNPAIRED_SURROGATE);\n c1 = 0xFFFD;\n }\n }\n let b0 = c1 >> 12 | 224;\n let b1 = c1 >> 6 & 63 | 128;\n let b2 = c1 & 63 | 128;\n store(bufOff, b1 << 8 | b0);\n store(bufOff, b2, 2);\n bufOff += 3;\n }\n str += 2;\n }\n if (nullTerminated) {\n store(bufOff++, 0);\n }\n return bufOff - buf;\n }\n\n export function decode(buf: ArrayBuffer, nullTerminated: bool = false): String {\n return decodeUnsafe(changetype(buf), buf.byteLength, nullTerminated);\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function decodeUnsafe(buf: usize, len: usize, nullTerminated: bool = false): String {\n let bufOff = buf;\n let bufEnd = buf + len;\n assert(bufEnd >= bufOff); // guard wraparound\n let str = changetype(__new(len << 1, idof())); // max is one u16 char per u8 byte\n let strOff = changetype(str);\n while (bufOff < bufEnd) {\n let u0 = load(bufOff); ++bufOff;\n if (!(u0 & 128)) {\n // @ts-ignore: cast\n if (nullTerminated & !u0) break;\n store(strOff, u0);\n } else {\n if (bufEnd == bufOff) break;\n let u1 = load(bufOff) & 63; ++bufOff;\n if ((u0 & 224) == 192) {\n store(strOff, (u0 & 31) << 6 | u1);\n } else {\n if (bufEnd == bufOff) break;\n let u2 = load(bufOff) & 63; ++bufOff;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n if (bufEnd == bufOff) break;\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | load(bufOff) & 63;\n ++bufOff;\n }\n if (u0 < 0x10000) {\n store(strOff, u0);\n } else {\n u0 -= 0x10000;\n let lo = u0 >> 10 | 0xD800;\n let hi = (u0 & 0x03FF) | 0xDC00;\n store(strOff, lo | (hi << 16));\n strOff += 2;\n }\n }\n }\n strOff += 2;\n }\n return changetype(__renew(changetype(str), strOff - changetype(str)));\n }\n }\n\n export namespace UTF16 {\n\n export function byteLength(str: string): i32 {\n return changetype(changetype(str) - TOTAL_OVERHEAD).rtSize;\n }\n\n export function encode(str: string): ArrayBuffer {\n let buf = changetype(__new(byteLength(str), idof()));\n encodeUnsafe(changetype(str), str.length, changetype(buf));\n return buf;\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function encodeUnsafe(str: usize, len: i32, buf: usize): usize {\n let size = len << 1;\n memory.copy(buf, changetype(str), size);\n return size;\n }\n\n export function decode(buf: ArrayBuffer): String {\n return decodeUnsafe(changetype(buf), buf.byteLength);\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function decodeUnsafe(buf: usize, len: usize): String {\n let str = changetype(__new(len &= ~1, idof()));\n memory.copy(changetype(str), buf, len);\n return str;\n }\n }\n}\n\nexport class TemplateStringsArray extends Array {\n readonly raw: string[];\n}\n","// Common error messages for use across the standard library. Keeping error messages compact\n// and reusing them where possible ensures minimal static data in binaries.\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INDEXOUTOFRANGE: string = \"Index out of range\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_VALUEOUTOFRANGE: string = \"Value out of range\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INVALIDLENGTH: string = \"Invalid length\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_EMPTYARRAY: string = \"Array is empty\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_HOLEYARRAY: string = \"Element type must be nullable if array is holey\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_NOTIMPLEMENTED: string = \"Not implemented\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_KEYNOTFOUND: string = \"Key does not exist\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ALLOCATION_TOO_LARGE: string = \"Allocation too large\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ALREADY_PINNED: string = \"Object already pinned\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_NOT_PINNED: string = \"Object is not pinned\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_URI_MALFORMED: string = \"URI malformed\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INVALIDDATE: string = \"Invalid Date\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_UNPAIRED_SURROGATE: string = \"Unpaired surrogate\";\n","import { Typeinfo, TypeinfoFlags } from \"./shared/typeinfo\";\nimport { E_INDEXOUTOFRANGE } from \"./util/error\";\nimport { ArrayBufferView } from \"./arraybuffer\";\n\n// @ts-ignore: decorator\n@builtin\nexport declare const __rtti_base: usize;\n\n// @ts-ignore: decorator\n@builtin @unsafe\nexport declare function __visit_globals(cookie: u32): void;\n\n// @ts-ignore: decorator\n@builtin @unsafe\nexport declare function __visit_members(ref: usize, cookie: u32): void;\n\n// @ts-ignore: decorator\n@unsafe\nexport function __typeinfo(id: u32): TypeinfoFlags {\n let ptr = __rtti_base;\n if (id > load(ptr)) throw new Error(E_INDEXOUTOFRANGE);\n return changetype(ptr + sizeof() + id * offsetof()).flags;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __newBuffer(size: usize, id: u32, data: usize = 0): usize {\n let buffer = __new(size, id);\n if (data) memory.copy(buffer, data, size);\n return buffer;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __newArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize {\n let bufferSize = length << alignLog2;\n // make sure `buffer` is tracked by the shadow stack\n let buffer = changetype(__newBuffer(bufferSize, idof(), data));\n // ...since allocating the array may trigger GC steps\n let array = __new(offsetof(), id);\n store(array, changetype(buffer), offsetof(\"buffer\"));\n __link(array, changetype(buffer), false);\n store(array, changetype(buffer), offsetof(\"dataStart\"));\n store(array, bufferSize, offsetof(\"byteLength\"));\n store(array, length, offsetof(\"length_\"));\n return array;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nfunction __tostack(ptr: usize): usize { // eslint-disable-line\n return ptr;\n}\n\n// These are provided by the respective implementation, included as another entry file by asc:\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __alloc(size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __realloc(ptr: usize, size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __free(ptr: usize): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __new(size: usize, id: u32): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __renew(ptr: usize, size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __collect(): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __visit(ptr: usize, cookie: u32): void;\n","/// \nimport { serializeString } from \"./serialize/string\";\nimport { serializeBool } from \"./serialize/bool\";\nimport { serializeInteger } from \"./serialize/integer\";\nimport { serializeFloat } from \"./serialize/float\";\nimport { serializeObject } from \"./serialize/object\";\nimport { serializeDate } from \"./serialize/date\";\nimport { serializeArray } from \"./serialize/array\";\nimport { serializeMap } from \"./serialize/map\";\nimport { deserializeBoolean } from \"./deserialize/bool\";\nimport { deserializeArray } from \"./deserialize/array\";\nimport { deserializeFloat } from \"./deserialize/float\";\nimport { deserializeObject } from \"./deserialize/object\";\nimport { deserializeMap } from \"./deserialize/map\";\nimport { deserializeDate } from \"./deserialize/date\";\nimport { FALSE_WORD, NULL_WORD, TRUE_WORD } from \"./chars\";\nimport { deserializeInteger } from \"./deserialize/integer\";\nimport { deserializeString } from \"./deserialize/string\";\nimport { Sink } from \"./sink\";\nimport { Variant } from \"as-variant/assembly\";\nimport { MpZ } from \"@hypercubed/as-mpz\";\nimport { serializeMpZ } from \"./serialize/mpz\";\nimport { deserializeMpZ } from \"./deserialize/mpz\";\n\n/**\n * Offset of the 'storage' property in the JSON.Value class.\n */\n// @ts-ignore: Decorator valid here\nconst STORAGE = offsetof(\"storage\");\n\n/**\n * JSON Encoder/Decoder for AssemblyScript\n */\nexport namespace JSON {\n /**\n * Enum representing the different types supported by JSON.\n */\n export enum Types {\n U8,\n U16,\n U32,\n U64,\n F32,\n F64,\n Bool,\n String,\n ManagedString,\n Struct,\n ManagedStruct,\n Array,\n ManagedArray\n }\n\n export class Value {\n public type: i32;\n // @ts-ignore: storage is set directly through memory\n private storage: u64;\n\n private constructor() { unreachable(); }\n\n /**\n * Creates an JSON.Value instance from a given value.\n * @param value - The value to be encapsulated.\n * @returns An instance of JSON.Value.\n */\n static from(value: T): JSON.Value {\n if (value instanceof Variant) {\n // Handle\n } else if (value instanceof JSON.Value) {\n return value;\n }\n const out = changetype(__new(offsetof(), idof()));\n out.set(value);\n return out;\n }\n\n /**\n * Sets the value of the JSON.Value instance.\n * @param value - The value to be set.\n */\n set(value: T): void {\n if (isBoolean()) {\n this.type = JSON.Types.Bool;\n store(changetype(this), value, STORAGE);\n } else if (value instanceof u8 || value instanceof i8) {\n this.type = JSON.Types.U8;\n store(changetype(this), value, STORAGE);\n } else if (value instanceof u16 || value instanceof i16) {\n this.type = JSON.Types.U16;\n store(changetype(this), value, STORAGE);\n } else if (value instanceof u32 || value instanceof i32) {\n this.type = JSON.Types.U32;\n store(changetype(this), value, STORAGE);\n } else if (value instanceof u64 || value instanceof i64) {\n this.type = JSON.Types.U64;\n store(changetype(this), value, STORAGE);\n } else if (value instanceof f32) {\n this.type = JSON.Types.F64;\n store(changetype(this), value, STORAGE);\n } else if (value instanceof f64) {\n this.type = JSON.Types.F64;\n store(changetype(this), value, STORAGE);\n } else if (isString()) {\n this.type = JSON.Types.String;\n store(changetype(this), value, STORAGE);\n } else if (value instanceof Map) {\n if (idof() !== idof>()) {\n throw new Error(\"Maps must be of type Map!\");\n }\n this.type = JSON.Types.Struct;\n store(changetype(this), value, STORAGE);\n // @ts-ignore: __SERIALIZE is implemented by the transform\n } else if (isDefined(value.__SERIALIZE)) {\n this.type = JSON.Types.Struct;\n store(changetype(this), value, STORAGE);\n } else if (isArray()) {\n // @ts-ignore: T satisfies constraints of any[]\n this.type = JSON.Types.Array + getArrayDepth(0);\n store(changetype(this), value, STORAGE);\n }\n }\n\n /**\n * Gets the value of the JSON.Value instance.\n * @returns The encapsulated value.\n */\n unwrap(): T {\n if (isManaged()) {\n if (this.type !== JSON.Types.Struct) throw new Error(\"Type mismatch\");\n if (idof() !== load(changetype(this.storage), -8)) throw new Error(\"Type mismatch\");\n }\n return load(changetype(this), STORAGE);\n }\n\n /**\n * Gets the value of the JSON.Value instance.\n * @returns The encapsulated value.\n */\n unwrapUnsafe(): T {\n return load(changetype(this), STORAGE);\n }\n\n /**\n * Gets the value of the JSON.Value instance.\n * @returns The encapsulated value.\n */\n get(): T {\n return load(changetype(this), STORAGE);\n }\n\n /**\n * Gets the value of the JSON.Value instance.\n * @returns The encapsulated value.\n */\n getUnsafe(): T {\n return load(changetype(this), STORAGE);\n }\n\n /**\n * Gets the value of the JSON.Value instance.\n * @returns The encapsulated value.\n */\n is(): T {\n return load(changetype(this), STORAGE);\n }\n\n /**\n * Gets the value of the JSON.Value instance.\n * @returns The encapsulated value.\n */\n clone(): T {\n return load(changetype(this), STORAGE);\n }\n\n /**\n * Converts the JSON.Value to a string representation.\n * @param useString - If true, treats Buffer as a string.\n * @returns The string representation of the JSON.Value.\n */\n toString(useString: boolean = false): string {\n switch (this.type) {\n case JSON.Types.U8: return this.get().toString();\n case JSON.Types.U16: return this.get().toString();\n case JSON.Types.U32: return this.get().toString();\n case JSON.Types.U64: return this.get().toString();\n case JSON.Types.String: return \"\\\"\" + this.get() + \"\\\"\";\n case JSON.Types.Bool: return this.get() ? TRUE_WORD : FALSE_WORD;\n default: {\n const arr = this.get();\n if (!arr.length) return \"[]\";\n const out = Sink.fromString(\"[\");\n for (let i = 0; i < arr.length - 1; i++) {\n const element = unchecked(arr[i]);\n out.write(element.toString(useString));\n out.write(\",\");\n }\n\n const element = unchecked(arr[arr.length - 1]);\n out.write(element.toString(useString));\n\n out.write(\"]\");\n return out.toString();\n }\n }\n }\n }\n\n export class Box {\n constructor(public value: T) {}\n @inline static from(value: T): Box {\n return new Box(value);\n }\n }\n \n /**\n * Stringifies valid JSON data.\n * ```js\n * JSON.stringify(data)\n * ```\n * @param data T\n * @returns string\n */\n // @ts-ignore: Decorator\n export function stringify(data: T): string {\n if (isBoolean()) {\n return serializeBool(data as bool);\n } else if (isInteger()) {\n // @ts-ignore\n return serializeInteger(data);\n } else if (isFloat(data)) {\n // @ts-ignore\n return serializeFloat(data);\n // @ts-ignore: Function is generated by transform\n } else if (isNullable() && changetype(data) == 0) {\n return NULL_WORD;\n // @ts-ignore\n } else if (isString>()) {\n return serializeString(changetype(data));\n } else if (isDefined(data.__SERIALIZE)) {\n // @ts-ignore\n return serializeObject(changetype>(data));\n } else if (data instanceof Date) {\n // @ts-ignore\n return serializeDate(changetype>(data));\n } else if (data instanceof Array) {\n // @ts-ignore\n return serializeArray(changetype>(data));\n } else if (data instanceof Map) {\n // @ts-ignore\n return serializeMap(changetype>(data));\n } else if (data instanceof MpZ) {\n return serializeMpZ(data);\n } else {\n throw new Error(\n `Could not serialize data of type ${nameof()}. Make sure to add the correct decorators to classes.`\n );\n }\n }\n /**\n * Parses valid JSON strings into their original format.\n * ```js\n * JSON.parse(data)\n * ```\n * @param data string\n * @returns T\n */\n\n // @ts-ignore: Decorator\n export function parse(data: string): T {\n if (isBoolean()) {\n return deserializeBoolean(data) as T;\n } else if (isInteger()) {\n return deserializeInteger(data);\n } else if (isFloat()) {\n return deserializeFloat(data);\n } else if (isNullable() && data.length === 4 && data == \"null\") {\n // @ts-ignore\n return null;\n } else if (isString()) {\n // @ts-ignore\n return deserializeString(data);\n } else if (isArray()) {\n // @ts-ignore\n return deserializeArray>(data);\n }\n let type: nonnull = changetype>(0);\n if (isDefined(type.__DESERIALIZE)) {\n // @ts-ignore\n return deserializeObject>(data.trimStart());\n } else if (type instanceof Map) {\n // @ts-ignore\n return deserializeMap>(data.trimStart());\n } else if (type instanceof MpZ) {\n // @ts-ignore\n return deserializeMpZ(data);\n }else if (type instanceof Date) {\n // @ts-ignore\n return deserializeDate(data);\n } else {\n throw new Error(\n `Could not deserialize data ${data} to type ${nameof()}. Make sure to add the correct decorators to classes.`\n );\n }\n }\n}\n\n// This allows JSON.stringify and JSON.parse to be available globally through an alias\n// @ts-ignore: Decorator\n@global function __SERIALIZE(data: T): string {\n return JSON.stringify(data);\n}\n// @ts-ignore: Decorator\n@global function __DESERIALIZE(data: string): T {\n return JSON.parse(data);\n}","import { TableStructure } from \"./types\";\n\nclass Cell {\n public x: i32 = 0;\n public y: i32 = 0;\n public text: string = \"\";\n toString(): string {\n return this.text;\n }\n}\n\nconst padding = \" \";\n\nconst fmt = new TableStructure();\n\nfunction stripAnsii(text: string): string {\n let inEscape = false;\n let output = \"\";\n for (let i = 0; i < text.length; i++) {\n const char = text.charAt(i);\n\n if (char === \"\\x1B\") { \n inEscape = true;\n } else if (char === \"m\" && inEscape) {\n inEscape = false;\n } else if (!inEscape) {\n output += char;\n }\n }\n\n return output;\n}\n\nfunction drawRow(cells: Cell[], columnWidths: i32[], padding_width: i32): string {\n let line = fmt.bodyLeft;\n for (let i = 0; i < cells.length; i++) {\n const cell = unchecked(cells[i]);\n const width = unchecked(columnWidths[i]);\n const cellPadding = padding.repeat(padding_width);\n const diff = cell.text.length - stripAnsii(cell.text).length;\n line += cellPadding + cell.text.padEnd(diff + width - (padding_width * 2), padding) + cellPadding;\n if (i < cells.length - 1) {\n line += fmt.bodyJoin;\n } else {\n line += fmt.bodyRight;\n }\n }\n return line;\n}\n\nfunction drawTable(rows: Cell[][], columns: Cell[][], padding_width: i32): string {\n const columnWidths: i32[] = new Array(columns.length);\n\n for (let i = 0; i < columns.length; i++) {\n const column = unchecked(columns[i]);\n for (let j = 0; j < column.length; j++) {\n const cell = unchecked(column[j]);\n const cellWidth = stripAnsii(cell.text).length + padding_width * 2;\n if (columnWidths[i] < cellWidth) {\n columnWidths[i] = cellWidth;\n }\n }\n }\n\n let result = \"\";\n\n result += fmt.topLeft;\n for (let i = 0; i < columnWidths.length; i++) {\n result += fmt.topBody.repeat(unchecked(columnWidths[i]));\n if (i < columnWidths.length - 1) {\n result += fmt.topJoin;\n }\n }\n result += fmt.topRight + \"\\n\";\n\n for (let i = 0; i < rows.length; i++) {\n const row = unchecked(rows[i]);\n result += drawRow(row, columnWidths, padding_width) + \"\\n\";\n\n if (i < rows.length - 1) {\n result += fmt.joinLeft;\n for (let j = 0; j < columnWidths.length; j++) {\n result += fmt.joinBody.repeat(unchecked(columnWidths[j]));\n if (j < columnWidths.length - 1) {\n result += fmt.joinJoin;\n }\n }\n result += fmt.joinRight + \"\\n\";\n }\n }\n\n result += fmt.bottomLeft;\n for (let i = 0; i < columnWidths.length; i++) {\n result += fmt.bottomBody.repeat(unchecked(columnWidths[i]));\n if (i < columnWidths.length - 1) {\n result += fmt.bottomJoin;\n }\n }\n result += fmt.bottomRight;\n\n return result;\n}\n\nexport function createTable(table: string[][], padding: i32 = 3): string {\n const cellRows: Cell[][] = [];\n const cellColumns: Cell[][] = new Array(table[0].length).map(() => []);\n\n for (let rowIndex = 0; rowIndex < table.length; rowIndex++) {\n const row = unchecked(table[rowIndex]);\n cellRows.push([]);\n for (let columnIndex = 0; columnIndex < row.length; columnIndex++) {\n const col = unchecked(row[columnIndex]);\n const cell = new Cell();\n cell.x = columnIndex;\n cell.y = rowIndex;\n cell.text = col;\n cellRows[rowIndex].push(cell);\n cellColumns[columnIndex].push(cell);\n }\n }\n\n return drawTable(cellRows, cellColumns, padding);\n}\n","export class TableStructure {\n topBody: string = \"─\";\n topJoin: string = \"┬\";\n topLeft: string = \"┌\";\n topRight: string = \"┐\";\n\n bottomBody: string = \"─\";\n bottomJoin: string = \"┴\";\n bottomLeft: string = \"└\";\n bottomRight: string = \"┘\";\n\n bodyLeft: string = \"│\";\n bodyRight: string = \"│\";\n bodyJoin: string = \"│\";\n\n joinBody: string = \"─\";\n joinLeft: string = \"├\";\n joinRight: string = \"┤\";\n joinJoin: string = \"┼\";\n}","/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { idof } from \"./builtins\";\nimport { E_INVALIDLENGTH } from \"./util/error\";\n\nexport abstract class ArrayBufferView {\n\n readonly buffer: ArrayBuffer;\n @unsafe readonly dataStart: usize;\n readonly byteLength: i32;\n\n get byteOffset(): i32 {\n return (this.dataStart - changetype(this.buffer));\n }\n\n protected constructor(length: i32, alignLog2: i32) {\n if (length > BLOCK_MAXSIZE >>> alignLog2) throw new RangeError(E_INVALIDLENGTH);\n let buffer = changetype(__new(length = length << alignLog2, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, length);\n }\n this.buffer = buffer; // links\n this.dataStart = changetype(buffer);\n this.byteLength = length;\n }\n}\n\n@final export class ArrayBuffer {\n\n static isView(value: T): bool {\n if (isNullable()) {\n if (changetype(value) == 0) return false;\n }\n if (value instanceof Int8Array) return true;\n if (value instanceof Uint8Array) return true;\n if (value instanceof Uint8ClampedArray) return true;\n if (value instanceof Int16Array) return true;\n if (value instanceof Uint16Array) return true;\n if (value instanceof Int32Array) return true;\n if (value instanceof Uint32Array) return true;\n if (value instanceof Int64Array) return true;\n if (value instanceof Uint64Array) return true;\n if (value instanceof Float32Array) return true;\n if (value instanceof Float64Array) return true;\n if (value instanceof DataView) return true;\n return false;\n }\n\n constructor(length: i32) {\n if (length > BLOCK_MAXSIZE) throw new RangeError(E_INVALIDLENGTH);\n let buffer = changetype(__new(length, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, length);\n }\n return buffer;\n }\n\n get byteLength(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize;\n }\n\n slice(begin: i32 = 0, end: i32 = BLOCK_MAXSIZE): ArrayBuffer {\n let length = this.byteLength;\n begin = begin < 0 ? max(length + begin, 0) : min(begin, length);\n end = end < 0 ? max(length + end , 0) : min(end , length);\n let outSize = max(end - begin, 0);\n let out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this) + begin, outSize);\n return out;\n }\n\n toString(): string {\n return \"[object ArrayBuffer]\";\n }\n}\n","export function HASH(key: T): u32 {\n if (isString()) {\n return hashStr(changetype(key));\n } else if (isReference()) {\n if (sizeof() == 4) return hash32(changetype(key));\n if (sizeof() == 8) return hash64(changetype(key));\n } else if (isFloat()) {\n if (sizeof() == 4) return hash32(reinterpret(f32(key)));\n if (sizeof() == 8) return hash64(reinterpret(f64(key)));\n } else {\n if (sizeof() <= 4) return hash32(u32(key), sizeof());\n if (sizeof() == 8) return hash64(u64(key));\n }\n return unreachable();\n}\n\n// XXHash 32-bit as a starting point, see: https://cyan4973.github.io/xxHash\n\n// primes\n// @ts-ignore: decorator\n@inline const XXH32_P1: u32 = 2654435761;\n// @ts-ignore: decorator\n@inline const XXH32_P2: u32 = 2246822519;\n// @ts-ignore: decorator\n@inline const XXH32_P3: u32 = 3266489917;\n// @ts-ignore: decorator\n@inline const XXH32_P4: u32 = 668265263;\n// @ts-ignore: decorator\n@inline const XXH32_P5: u32 = 374761393;\n// @ts-ignore: decorator\n@inline const XXH32_SEED: u32 = 0;\n\n// @ts-ignore: decorator\n@inline\nfunction hash32(key: u32, len: u32 = 4): u32 {\n let h: u32 = XXH32_SEED + XXH32_P5 + len;\n h += key * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n h ^= h >> 15;\n h *= XXH32_P2;\n h ^= h >> 13;\n h *= XXH32_P3;\n h ^= h >> 16;\n return h;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction hash64(key: u64): u32 {\n let h: u32 = XXH32_SEED + XXH32_P5 + 8;\n h += key * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n h += (key >> 32) * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n h ^= h >> 15;\n h *= XXH32_P2;\n h ^= h >> 13;\n h *= XXH32_P3;\n h ^= h >> 16;\n return h;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction mix(h: u32, key: u32): u32 {\n return rotl(h + key * XXH32_P2, 13) * XXH32_P1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction hashStr(key: string): u32 {\n if (changetype(key) == 0) return XXH32_SEED;\n\n let h: u32 = key.length << 1;\n let len: usize = h;\n let pos = changetype(key);\n\n if (len >= 16) {\n let s1 = XXH32_SEED + XXH32_P1 + XXH32_P2;\n let s2 = XXH32_SEED + XXH32_P2;\n let s3 = XXH32_SEED;\n let s4 = XXH32_SEED - XXH32_P1;\n\n let end = len + pos - 16;\n while (pos <= end) {\n s1 = mix(s1, load(pos ));\n s2 = mix(s2, load(pos, 4));\n s3 = mix(s3, load(pos, 8));\n s4 = mix(s4, load(pos, 12));\n pos += 16;\n }\n h += rotl(s1, 1) + rotl(s2, 7) + rotl(s3, 12) + rotl(s4, 18);\n } else {\n h += XXH32_SEED + XXH32_P5;\n }\n\n let end = changetype(key) + len - 4;\n while (pos <= end) {\n h += load(pos) * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n pos += 4;\n }\n\n end = changetype(key) + len;\n while (pos < end) {\n h += load(pos) * XXH32_P5;\n h = rotl(h, 11) * XXH32_P1;\n pos++;\n }\n\n h ^= h >> 15;\n h *= XXH32_P2;\n h ^= h >> 13;\n h *= XXH32_P3;\n h ^= h >> 16;\n return h;\n}\n","/// \n\nimport { HASH } from \"./util/hash\";\nimport { E_KEYNOTFOUND } from \"./util/error\";\n\n// A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht\n\n// @ts-ignore: decorator\n@inline const INITIAL_CAPACITY = 4;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_N = 8;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_D = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_N = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_D = 4;\n\n/** Structure of a map entry. */\n@unmanaged class MapEntry {\n key: K;\n value: V;\n taggedNext: usize; // LSB=1 indicates EMPTY\n}\n\n/** Empty bit. */\n// @ts-ignore: decorator\n@inline const EMPTY: usize = 1 << 0;\n\n/** Size of a bucket. */\n// @ts-ignore: decorator\n@inline const BUCKET_SIZE = sizeof();\n\n/** Computes the alignment of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_ALIGN(): usize {\n // can align to 4 instead of 8 if 32-bit and K/V is <= 32-bits\n const maxkv = sizeof() > sizeof() ? sizeof() : sizeof();\n const align = (maxkv > sizeof() ? maxkv : sizeof()) - 1;\n return align;\n}\n\n/** Computes the aligned size of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_SIZE(): usize {\n const align = ENTRY_ALIGN();\n const size = (offsetof>() + align) & ~align;\n return size;\n}\n\nexport class Map {\n\n // buckets referencing their respective first entry, usize[bucketsMask + 1]\n private buckets: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n private bucketsMask: u32 = INITIAL_CAPACITY - 1;\n\n // entries in insertion order, MapEntry[entriesCapacity]\n private entries: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n private entriesCapacity: i32 = INITIAL_CAPACITY;\n private entriesOffset: i32 = 0;\n private entriesCount: i32 = 0;\n\n constructor() {\n /* nop */\n }\n\n get size(): i32 {\n return this.entriesCount;\n }\n\n clear(): void {\n this.buckets = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n this.bucketsMask = INITIAL_CAPACITY - 1;\n this.entries = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n this.entriesCapacity = INITIAL_CAPACITY;\n this.entriesOffset = 0;\n this.entriesCount = 0;\n }\n\n private find(key: K, hashCode: u32): MapEntry | null {\n let entry = load>( // unmanaged!\n changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE\n );\n while (entry) {\n let taggedNext = entry.taggedNext;\n if (!(taggedNext & EMPTY) && entry.key == key) return entry;\n entry = changetype>(taggedNext & ~EMPTY);\n }\n return null;\n }\n\n has(key: K): bool {\n return this.find(key, HASH(key)) != null;\n }\n\n @operator(\"[]\")\n get(key: K): V {\n let entry = this.find(key, HASH(key));\n if (!entry) throw new Error(E_KEYNOTFOUND); // cannot represent `undefined`\n return entry.value;\n }\n\n @operator(\"[]=\")\n set(key: K, value: V): this {\n let hashCode = HASH(key);\n let entry = this.find(key, hashCode); // unmanaged!\n if (entry) {\n entry.value = value;\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n } else {\n // check if rehashing is necessary\n if (this.entriesOffset == this.entriesCapacity) {\n this.rehash(\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ? this.bucketsMask // just rehash if 1/4+ entries are empty\n : (this.bucketsMask << 1) | 1 // grow capacity to next 2^N\n );\n }\n // append new entry\n let entries = this.entries;\n entry = changetype>(changetype(entries) + (this.entriesOffset++) * ENTRY_SIZE());\n // link with the map\n entry.key = key;\n if (isManaged()) {\n __link(changetype(this), changetype(key), true);\n }\n entry.value = value;\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n ++this.entriesCount;\n // link with previous entry in bucket\n let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE;\n entry.taggedNext = load(bucketPtrBase);\n store(bucketPtrBase, changetype(entry));\n }\n return this;\n }\n\n delete(key: K): bool {\n let entry = this.find(key, HASH(key));\n if (!entry) return false;\n entry.taggedNext |= EMPTY;\n --this.entriesCount;\n // check if rehashing is appropriate\n let halfBucketsMask = this.bucketsMask >> 1;\n if (\n halfBucketsMask + 1 >= max(INITIAL_CAPACITY, this.entriesCount) &&\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ) this.rehash(halfBucketsMask);\n return true;\n }\n\n private rehash(newBucketsMask: u32): void {\n let newBucketsCapacity = (newBucketsMask + 1);\n let newBuckets = new ArrayBuffer(newBucketsCapacity * BUCKET_SIZE);\n let newEntriesCapacity = newBucketsCapacity * FILL_FACTOR_N / FILL_FACTOR_D;\n let newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE());\n\n // copy old entries to new entries\n let oldPtr = changetype(this.entries);\n let oldEnd = oldPtr + this.entriesOffset * ENTRY_SIZE();\n let newPtr = changetype(newEntries);\n while (oldPtr != oldEnd) {\n let oldEntry = changetype>(oldPtr);\n if (!(oldEntry.taggedNext & EMPTY)) {\n let newEntry = changetype>(newPtr);\n let oldEntryKey = oldEntry.key;\n newEntry.key = oldEntryKey;\n newEntry.value = oldEntry.value;\n let newBucketIndex = HASH(oldEntryKey) & newBucketsMask;\n let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE;\n newEntry.taggedNext = load(newBucketPtrBase);\n store(newBucketPtrBase, newPtr);\n newPtr += ENTRY_SIZE();\n }\n oldPtr += ENTRY_SIZE();\n }\n\n this.buckets = newBuckets;\n this.bucketsMask = newBucketsMask;\n this.entries = newEntries;\n this.entriesCapacity = newEntriesCapacity;\n this.entriesOffset = this.entriesCount;\n }\n\n keys(): K[] {\n // FIXME: this is preliminary, needs iterators/closures\n let start = changetype(this.entries);\n let size = this.entriesOffset;\n let keys = new Array(size);\n let length = 0;\n for (let i = 0; i < size; ++i) {\n let entry = changetype>(start + i * ENTRY_SIZE());\n if (!(entry.taggedNext & EMPTY)) {\n unchecked(keys[length++] = entry.key);\n }\n }\n keys.length = length;\n return keys;\n }\n\n values(): V[] {\n // FIXME: this is preliminary, needs iterators/closures\n let start = changetype(this.entries);\n let size = this.entriesOffset;\n let values = new Array(size);\n let length = 0;\n for (let i = 0; i < size; ++i) {\n let entry = changetype>(start + i * ENTRY_SIZE());\n if (!(entry.taggedNext & EMPTY)) {\n unchecked(values[length++] = entry.value);\n }\n }\n values.length = length;\n return values;\n }\n\n toString(): string {\n return \"[object Map]\";\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n __visit(changetype(this.buckets), cookie);\n let entries = changetype(this.entries);\n if (isManaged() || isManaged()) {\n let cur = entries;\n let end = cur + this.entriesOffset * ENTRY_SIZE();\n while (cur < end) {\n let entry = changetype>(cur);\n if (!(entry.taggedNext & EMPTY)) {\n if (isManaged()) {\n let val = changetype(entry.key);\n if (isNullable()) {\n if (val) __visit(val, cookie);\n } else __visit(val, cookie);\n }\n if (isManaged()) {\n let val = changetype(entry.value);\n if (isNullable()) {\n if (val) __visit(val, cookie);\n } else __visit(val, cookie);\n }\n }\n cur += ENTRY_SIZE();\n }\n }\n __visit(entries, cookie);\n }\n}\n","/* So Far, supports:\n- Strings\n- Numbers\n- UintArrays\n- IntArrays\n- ArrayBuffer\n- Map\n- Set\n- Array\n- StaticArray\n- Infinity\nAdd more to the list if you think of any!\n*/\nimport { rainbow } from \"as-rainbow\";\nimport { createTable } from \"table-as\";\nimport { stringify } from \"../stringify\";\n\nconst counts = new Map()\n\nconst timers = new Map()\n\nlet indent = \"\";\n\nexport function assert(value: T, message: string | null): void {\n if (!value) {\n if (isString(message)) {\n console.log(rainbow.red(`${indent}Assertion failed: ${changetype(message)}`))\n } else {\n console.log(rainbow.red(`${indent}Assertion failed`))\n }\n }\n}\nexport function count(label: string): void {\n if (!counts.has(label)) counts.set(label, 1)\n const count = counts.get(label)\n counts.set(label, count + 1)\n console.log(`${indent}${label}: ${rainbow.yellow((count + 1).toString())}`)\n}\nexport function countReset(label: string): void {\n counts.set(label, 1)\n}\nexport function debug(message: T): void {\n console.log(`${indent}${stringify(message)}`)\n}\nexport function error(message: T): void {\n console.log(rainbow.red(`${indent}${stringify(message)}`))\n}\nexport function group(label: string): void {\n console.log(`${indent}${label}`)\n indent += \" \"\n}\nexport function groupCollapsed(label: string): void {\n console.log(`${indent}${label}`)\n indent += \" \"\n}\nexport function groupEnd(): void {\n indent = indent.replace(\" \", \"\")\n}\nexport function info(message: T): void {\n console.log(`${indent}${stringify(message)}`)\n}\nexport function log(message: T): void {\n console.log(`${indent}${stringify(message)}`)\n}\nexport function time(label: string): void {\n if (timers.has(label)) {\n console.log(`${indent}Warning: Label \"${label}\" already exists for console.time()`);\n return\n }\n timers.set(label, Date.now());\n}\nexport function timeEnd(label: string): void {\n if (!timers.has(label)) {\n console.log(`${indent}Warning: No such label \"${label}\" for console.timeEnd()`);\n return;\n }\n timeLogImpl(label);\n timers.delete(label);\n}\nexport function timeLog(label: string): void {\n if (!timers.has(label)) {\n console.log(`${indent}Warning: No such label \"${label}\" for console.timeLog()`);\n return;\n }\n timeLogImpl(label);\n}\nexport function trace(message: T): void {\n console.log(`${indent}Trace: ${stringify(message)}`)\n}\nexport function warn(message: T): void {\n console.log(`${indent}${stringify(message)}`)\n}\n\nexport function timeLogImpl(label: string): void {\n console.log(`${indent}${label}: ${Date.now() - timers.get(label)}ms`);\n}\n\nexport function table(table: string[][]): void {\n let formatted: string[][] = [];\n let header: string[] = [];\n header.push(\"(index)\");\n for (let i = 0; i < table[0].length; i++) header.push(i.toString());\n formatted.push(header);\n\n for (let row_index = 0; row_index < table.length; row_index++) {\n const row = unchecked(table[row_index]);\n const frow: string[] = [row_index.toString()]\n for (let column_index = 0; column_index < row.length; column_index++) {\n const column = unchecked(row[column_index]);\n frow.push(stringify(column, true));\n }\n formatted.push(frow);\n }\n\n console.log(createTable(formatted, 1));\n}","import { JSON } from \"json-as/assembly\";\nimport * as console from \"as-console\";\n@json\nclass Yo {\n map: Map;\n\n constructor() {\n this.map = new Map();\n }\n}\n\nlet y = new Yo();\ny.map.set(\"bhavya\", 3000);\nconsole.log(JSON.stringify(y));\nconsole.log(y.map)","interface GeneratedInterface {\n __SERIALIZE(): string;\n}\n// @ts-ignore: Decoraor valid here\n@inline export function serializeObject(data: T): string {\n return changetype>(data).__SERIALIZE();\n}","import { JSON } from \"json-as/assembly\";\nimport * as console from \"as-console\";\n@json\nclass Yo {\n map: Map;\n\n constructor() {\n this.map = new Map();\n }\n}\n\nlet y = new Yo();\ny.map.set(\"bhavya\", 3000);\nconsole.log(JSON.stringify(y));\nconsole.log(y.map)","import { COLON, COMMA, BRACE_LEFT_WORD, BRACE_RIGHT } from \"../chars\";\nimport { JSON } from \"..\";\nimport { Sink } from \"../sink\";\n\n// @ts-ignore: Decorator valid here\n@inline export function serializeMap>(data: T): string {\n if (changetype(data) == 0) return \"{}\";\n let result = Sink.fromString(BRACE_LEFT_WORD);\n if (!data.size) return \"{}\";\n let keys = data.keys();\n let values = data.values();\n const end = data.size - 1;\n for (let i = 0; i < end; i++) {\n result.write(JSON.stringify(unchecked(keys[i]).toString()));\n result.writeCodePoint(COLON);\n result.write(JSON.stringify(unchecked(values[i])));\n result.writeCodePoint(COMMA);\n }\n result.write(JSON.stringify(unchecked(keys[end]).toString()));\n result.writeCodePoint(COLON);\n result.write(JSON.stringify(unchecked(values[end])));\n\n result.writeCodePoint(BRACE_RIGHT);\n return result.toString();\n}","/// \n\nimport { BLOCK_MAXSIZE } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { COMPARATOR, SORT } from \"./util/sort\";\nimport { REVERSE, FILL } from \"./util/bytes\";\nimport { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from \"./util/string\";\nimport { idof, isArray as builtin_isArray } from \"./builtins\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from \"./util/error\";\n\n// @ts-ignore: decorator\n@inline @lazy const MIN_SIZE: usize = 8;\n\n/** Ensures that the given array has _at least_ the specified backing size. */\nfunction ensureCapacity(array: usize, newSize: usize, alignLog2: u32, canGrow: bool = true): void {\n // Depends on the fact that Arrays mimic ArrayBufferView\n let oldCapacity = changetype(array).byteLength;\n if (newSize > oldCapacity >>> alignLog2) {\n if (newSize > BLOCK_MAXSIZE >>> alignLog2) throw new RangeError(E_INVALIDLENGTH);\n let oldData = changetype(changetype(array).buffer);\n // Grows old capacity by factor of two.\n // Make sure we don't reach BLOCK_MAXSIZE for new growed capacity.\n let newCapacity = max(newSize, MIN_SIZE) << alignLog2;\n if (canGrow) newCapacity = max(min(oldCapacity << 1, BLOCK_MAXSIZE), newCapacity);\n let newData = __renew(oldData, newCapacity);\n // __new / __renew already init memory range as zeros in Incremental runtime.\n // So try to avoid this.\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(newData + oldCapacity, 0, newCapacity - oldCapacity);\n }\n if (newData != oldData) { // oldData has been free'd\n store(array, newData, offsetof(\"buffer\"));\n store(array, newData, offsetof(\"dataStart\"));\n __link(array, changetype(newData), false);\n }\n store(array, newCapacity, offsetof(\"byteLength\"));\n }\n}\n\nexport class Array {\n [key: number]: T;\n\n // Mimicking ArrayBufferView isn't strictly necessary here but is done to allow glue code\n // to work with typed and normal arrays interchangeably. Technically, normal arrays do not need\n // `dataStart` (equals `buffer`) and `byteLength` (equals computed `buffer.byteLength`), but the\n // block is 16 bytes anyway so it's fine to have a couple extra fields in there.\n\n private buffer: ArrayBuffer;\n @unsafe readonly dataStart: usize;\n private byteLength: i32; // Uses here as capacity\n\n // Also note that Array with non-nullable T must guard against uninitialized null values\n // whenever an element is accessed. Otherwise, the compiler wouldn't be able to guarantee\n // type-safety anymore. For lack of a better word, such an array is \"holey\".\n\n private length_: i32;\n\n static isArray(value: U): bool {\n return isReference() ? changetype(value) != 0 && builtin_isArray(value) : false;\n }\n\n static create(capacity: i32 = 0): Array {\n WARNING(\"'Array.create' is deprecated. Use 'new Array' instead, making sure initial elements are initialized.\");\n let array = new Array(capacity);\n array.length = 0;\n return array;\n }\n\n constructor(length: i32 = 0) {\n if (length > BLOCK_MAXSIZE >>> alignof()) throw new RangeError(E_INVALIDLENGTH);\n // reserve capacity for at least MIN_SIZE elements\n let bufferSize = max(length, MIN_SIZE) << alignof();\n let buffer = changetype(__new(bufferSize, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, bufferSize);\n }\n this.buffer = buffer; // links\n this.dataStart = changetype(buffer);\n this.byteLength = bufferSize;\n this.length_ = length;\n }\n\n get length(): i32 {\n return this.length_;\n }\n\n set length(newLength: i32) {\n ensureCapacity(changetype(this), newLength, alignof(), false);\n this.length_ = newLength;\n }\n\n every(fn: (value: T, index: i32, array: Array) => bool): bool {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (!fn(load(this.dataStart + (i << alignof())), i, this)) return false;\n }\n return true;\n }\n\n findIndex(fn: (value: T, index: i32, array: Array) => bool): i32 {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n findLastIndex(fn: (value: T, index: i32, array: Array) => bool): i32 {\n for (let i = this.length_ - 1; i >= 0; --i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n @operator(\"[]\") private __get(index: i32): T {\n if (index >= this.length_) throw new RangeError(E_INDEXOUTOFRANGE);\n let value = load(this.dataStart + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @unsafe @operator(\"{}\") private __uget(index: i32): T {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\") private __set(index: i32, value: T): void {\n if (index >= this.length_) {\n if (index < 0) throw new RangeError(E_INDEXOUTOFRANGE);\n ensureCapacity(changetype(this), index + 1, alignof());\n this.length_ = index + 1;\n }\n store(this.dataStart + (index << alignof()), value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n }\n\n at(index: i32): T {\n let len = this.length_;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n let value = load(this.dataStart + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): Array {\n if (isManaged()) {\n FILL(this.dataStart, this.length_, changetype(value), start, end);\n __link(changetype(this), changetype(value), false);\n } else {\n FILL(this.dataStart, this.length_, value, start, end);\n }\n return this;\n }\n\n includes(value: T, fromIndex: i32 = 0): bool {\n if (isFloat()) {\n let len = this.length_;\n if (len == 0 || fromIndex >= len) return false;\n if (fromIndex < 0) fromIndex = max(len + fromIndex, 0);\n let ptr = this.dataStart;\n while (fromIndex < len) {\n let elem = load(ptr + (fromIndex << alignof()));\n // @ts-ignore\n if (elem == value || isNaN(elem) & isNaN(value)) return true;\n ++fromIndex;\n }\n return false;\n } else {\n return this.indexOf(value, fromIndex) >= 0;\n }\n }\n\n indexOf(value: T, fromIndex: i32 = 0): i32 {\n let len = this.length_;\n if (len == 0 || fromIndex >= len) return -1;\n if (fromIndex < 0) fromIndex = max(len + fromIndex, 0);\n let ptr = this.dataStart;\n while (fromIndex < len) {\n if (load(ptr + (fromIndex << alignof())) == value) return fromIndex;\n ++fromIndex;\n }\n return -1;\n }\n\n lastIndexOf(value: T, fromIndex: i32 = this.length_): i32 {\n let len = this.length_;\n if (len == 0) return -1;\n if (fromIndex < 0) fromIndex = len + fromIndex;\n else if (fromIndex >= len) fromIndex = len - 1;\n let ptr = this.dataStart;\n while (fromIndex >= 0) {\n if (load(ptr + (fromIndex << alignof())) == value) return fromIndex;\n --fromIndex;\n }\n return -1;\n }\n\n push(value: T): i32 {\n let oldLen = this.length_;\n let len = oldLen + 1;\n ensureCapacity(changetype(this), len, alignof());\n if (isManaged()) {\n store(this.dataStart + (oldLen << alignof()), changetype(value));\n __link(changetype(this), changetype(value), true);\n } else {\n store(this.dataStart + (oldLen << alignof()), value);\n }\n this.length_ = len;\n return len;\n }\n\n concat(other: Array): Array {\n let thisLen = this.length_;\n let otherLen = other.length_;\n let outLen = thisLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH);\n let out = changetype>(__newArray(outLen, alignof(), idof>()));\n let outStart = out.dataStart;\n let thisSize = thisLen << alignof();\n if (isManaged()) {\n let thisStart = this.dataStart;\n for (let offset: usize = 0; offset < thisSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += thisSize;\n let otherStart = other.dataStart;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, this.dataStart, thisSize);\n memory.copy(outStart + thisSize, other.dataStart, otherLen << alignof());\n }\n return out;\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Array {\n let ptr = this.dataStart;\n let len = this.length_;\n\n end = min(end, len);\n\n let to = target < 0 ? max(len + target, 0) : min(target, len);\n let from = start < 0 ? max(len + start, 0) : min(start, len);\n let last = end < 0 ? max(len + end, 0) : min(end, len);\n let count = min(last - from, len - to);\n\n memory.copy( // is memmove\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return this;\n }\n\n pop(): T {\n let len = this.length_;\n if (len < 1) throw new RangeError(E_EMPTYARRAY);\n let val = load(this.dataStart + ((--len) << alignof()));\n this.length_ = len;\n return val;\n }\n\n forEach(fn: (value: T, index: i32, array: Array) => void): void {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n fn(load(this.dataStart + (i << alignof())), i, this);\n }\n }\n\n map(fn: (value: T, index: i32, array: Array) => U): Array {\n let len = this.length_;\n let out = changetype>(__newArray(len, alignof(), idof>()));\n let outStart = out.dataStart;\n for (let i = 0; i < min(len, this.length_); ++i) {\n let result = fn(load(this.dataStart + (i << alignof())), i, this);\n store(outStart + (i << alignof()), result);\n if (isManaged()) {\n __link(changetype(out), changetype(result), true);\n }\n }\n return out;\n }\n\n filter(fn: (value: T, index: i32, array: Array) => bool): Array {\n let result = changetype>(__newArray(0, alignof(), idof>()));\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n let value = load(this.dataStart + (i << alignof()));\n if (fn(value, i, this)) result.push(value);\n }\n return result;\n }\n\n reduce(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U,\n initialValue: U\n ): U {\n let acc = initialValue;\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n acc = fn(acc, load(this.dataStart + (i << alignof())), i, this);\n }\n return acc;\n }\n\n reduceRight(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U,\n initialValue: U\n ): U {\n let acc = initialValue;\n for (let i = this.length_ - 1; i >= 0; --i) {\n acc = fn(acc, load(this.dataStart + (i << alignof())), i, this);\n }\n return acc;\n }\n\n shift(): T {\n let len = this.length_;\n if (len < 1) throw new RangeError(E_EMPTYARRAY);\n let base = this.dataStart;\n let element = load(base);\n let lastIndex = len - 1;\n memory.copy(\n base,\n base + sizeof(),\n lastIndex << alignof()\n );\n if (isReference()) {\n store(base + (lastIndex << alignof()), 0);\n } else {\n // @ts-ignore\n store(base + (lastIndex << alignof()), 0);\n }\n this.length_ = lastIndex;\n return element;\n }\n\n some(fn: (value: T, index: i32, array: Array) => bool): bool {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return true;\n }\n return false;\n }\n\n unshift(value: T): i32 {\n let len = this.length_ + 1;\n ensureCapacity(changetype(this), len, alignof());\n let ptr = this.dataStart;\n memory.copy(\n ptr + sizeof(),\n ptr,\n (len - 1) << alignof()\n );\n store(ptr, value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n this.length_ = len;\n return len;\n }\n\n slice(start: i32 = 0, end: i32 = i32.MAX_VALUE): Array {\n let len = this.length_;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end , len);\n len = max(end - start, 0);\n let slice = changetype>(__newArray(len, alignof(), idof>()));\n let sliceBase = slice.dataStart;\n let thisBase = this.dataStart + (start << alignof());\n if (isManaged()) {\n let off = 0;\n let end = len << alignof();\n while (off < end) {\n let ref = load(thisBase + off);\n store(sliceBase + off, ref);\n __link(changetype(slice), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(sliceBase, thisBase, len << alignof());\n }\n return slice;\n }\n\n splice(start: i32, deleteCount: i32 = i32.MAX_VALUE): Array {\n let len = this.length_;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n deleteCount = max(min(deleteCount, len - start), 0);\n let result = changetype>(__newArray(deleteCount, alignof(), idof>()));\n let resultStart = result.dataStart;\n let thisStart = this.dataStart;\n let thisBase = thisStart + (start << alignof());\n memory.copy(\n resultStart,\n thisBase,\n deleteCount << alignof()\n );\n let offset = start + deleteCount;\n if (len != offset) {\n memory.copy(\n thisBase,\n thisStart + (offset << alignof()),\n (len - offset) << alignof()\n );\n }\n this.length_ = len - deleteCount;\n return result;\n }\n\n reverse(): Array {\n REVERSE(this.dataStart, this.length_);\n return this;\n }\n\n sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): Array {\n SORT(this.dataStart, this.length_, comparator);\n return this;\n }\n\n join(separator: string = \",\"): string {\n let ptr = this.dataStart;\n let len = this.length_;\n if (isBoolean()) return joinBooleanArray(ptr, len, separator);\n if (isInteger()) return joinIntegerArray(ptr, len, separator);\n if (isFloat()) return joinFloatArray(ptr, len, separator);\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (isString()) return joinStringArray(ptr, len, separator);\n }\n // For rest objects and arrays use general join routine\n if (isReference()) return joinReferenceArray(ptr, len, separator);\n ERROR(\"unspported element type\");\n return unreachable();\n }\n\n flat(): T {\n if (!isArray()) {\n ERROR(\"Cannot call flat() on Array where T is not an Array.\");\n }\n // Get the length and data start values\n let ptr = this.dataStart;\n let len = this.length_;\n\n // calculate the end size with an initial pass\n let size = 0;\n for (let i = 0; i < len; ++i) {\n let child = load(ptr + (i << alignof()));\n size += child == 0 ? 0 : load(child, offsetof(\"length_\"));\n }\n\n // calculate the byteLength of the resulting backing ArrayBuffer\n const align = alignof>();\n let byteLength = size << align;\n let outBuffer = changetype(__new(byteLength, idof()));\n\n // create the return value and initialize it\n let outArray = changetype(__new(offsetof(), idof()));\n store(changetype(outArray), size, offsetof(\"length_\"));\n\n // byteLength, dataStart, and buffer are all readonly\n store(changetype(outArray), byteLength, offsetof(\"byteLength\"));\n store(changetype(outArray), changetype(outBuffer), offsetof(\"dataStart\"));\n store(changetype(outArray), changetype(outBuffer), offsetof(\"buffer\"));\n __link(changetype(outArray), changetype(outBuffer), false);\n\n // set the elements\n let resultOffset: usize = 0;\n for (let i = 0; i < len; ++i) { // for each child\n let child = load(ptr + (i << alignof()));\n\n // ignore null arrays\n if (!child) continue;\n\n // copy the underlying buffer data to the result buffer\n let childDataLength = load(child, offsetof(\"length_\")) << align;\n memory.copy(\n changetype(outBuffer) + resultOffset,\n load(child, offsetof(\"dataStart\")),\n childDataLength\n );\n\n // advance the result length\n resultOffset += childDataLength;\n }\n\n // if the `valueof` type is managed, we must link each reference\n if (isManaged>()) {\n for (let i = 0; i < size; ++i) {\n let ref = load(changetype(outBuffer) + (i << usize(alignof>())));\n __link(changetype(outBuffer), ref, true);\n }\n }\n\n return outArray;\n }\n\n toString(): string {\n return this.join();\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n if (isManaged()) {\n let cur = this.dataStart;\n let end = cur + (this.length_ << alignof());\n while (cur < end) {\n let val = load(cur);\n if (val) __visit(val, cookie);\n cur += sizeof();\n }\n }\n __visit(changetype(this.buffer), cookie);\n }\n}\n","import {\n BACK_SLASH,\n BACKSPACE,\n CARRIAGE_RETURN,\n FORM_FEED,\n NEW_LINE,\n QUOTE,\n QUOTE_WORD,\n TAB\n} from \"../chars\";\nimport { Sink } from \"../sink\";\nimport { unsafeCharCodeAt } from \"../util\";\n\n// @ts-ignore: Decorator valid here\n@inline export function serializeString(data: string): string {\n if (data.length === 0) {\n return QUOTE_WORD + QUOTE_WORD;\n }\n\n let result = Sink.fromString(QUOTE_WORD, data.length);\n\n let last: i32 = 0;\n for (let i = 0; i < data.length; i++) {\n const char = unsafeCharCodeAt(data, i);\n if (char === QUOTE || char === BACK_SLASH) {\n result.write(data, last, i);\n result.writeCodePoint(BACK_SLASH);\n last = i;\n } else if (16 > char) {\n result.write(data, last, i);\n last = i + 1;\n switch (char) {\n case BACKSPACE: {\n result.write(\"\\\\b\");\n break;\n }\n case TAB: {\n result.write(\"\\\\t\");\n break;\n }\n case NEW_LINE: {\n result.write(\"\\\\n\");\n break;\n }\n case FORM_FEED: {\n result.write(\"\\\\f\");\n break;\n }\n case CARRIAGE_RETURN: {\n result.write(\"\\\\r\");\n break;\n }\n default: {\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0000 to \\u000f handled here\n result.write(\"\\\\u000\");\n result.write(char.toString(16));\n break;\n }\n }\n } else if (32 > char) {\n result.write(data, last, i);\n last = i + 1;\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0010 to \\u001f handled here\n result.write(\"\\\\u00\");\n result.write(char.toString(16));\n }\n }\n result.write(data, last);\n result.writeCodePoint(QUOTE);\n return result.toString();\n}","import { isSpace } from \"util/string\";\nimport { BACK_SLASH, QUOTE } from \"./chars\";\nimport { Sink } from \"./sink\";\n\n// @ts-ignore: Decorator\nexport function isMap(): bool {\n let type = changetype(0);\n return type instanceof Map;\n}\n\n// @ts-ignore: Decorator\nexport function unsafeCharCodeAt(data: string, pos: i32): i32 {\n return load(changetype(data) + ((pos) << 1));\n}\n\n// @ts-ignore: Decorator\nexport function removeWhitespace(data: string): string {\n const result = new Sink();\n let instr = false;\n for (let i = 0; i < data.length; i++) {\n const char = unsafeCharCodeAt(data, i);\n if (instr === false && char === QUOTE) instr = true;\n else if (\n instr === true && char === QUOTE\n && unsafeCharCodeAt(data, i - 1) !== BACK_SLASH\n ) instr = false;\n\n if (instr === false) {\n if (!isSpace(char)) result.write(data.charAt(i));\n } else {\n result.write(data.charAt(i));\n }\n }\n return result.toString();\n}\n\n// @ts-ignore: Decorator\nexport function escapeChar(char: string): string {\n switch (unsafeCharCodeAt(char, 0)) {\n case 0x22:\n return '\\\\\"';\n case 0x5c:\n return \"\\\\\\\\\";\n case 0x08:\n return \"\\\\b\";\n case 0x0a:\n return \"\\\\n\";\n case 0x0d:\n return \"\\\\r\";\n case 0x09:\n return \"\\\\t\";\n case 0x0c:\n return \"\\\\f\";\n case 0x0b:\n return \"\\\\u000b\";\n default:\n return char;\n }\n}\n\n/**\n * A terrible function which finds the depth of a certain array.\n * Suffers no overhead besides function calling and a if/else.\n * @returns depth of array\n */\n\n// @ts-ignore: Decorator\nexport function getArrayDepth(depth: i32 = 1): i32 {\n if (!isArray()) {\n return 0;\n } else if (isArray>()) {\n depth++;\n return getArrayDepth>(depth);\n } else {\n return depth;\n }\n}\n\n/** Scientific Notation Integer Parsing - SNIP\n * This is absolutely the fastest algorithm I could think of while adding full support for Scientific Notation\n * Loads 32 bits and retrieves the high/low bits.\n * The reason why we only load 4 bytes at a time is that numbers in the 32-bit range are 7 chars long at most.\n * Using SIMD or 64 bit loads would only work well when parsing large 128+ numbers.\n * \n * Here are some benchmarks\n * Parsing: \"12345\" \n * Results are spread over 5000ms\n * \n * SNIP: 270M iterations\n * ATOI: 285M iterations\n * ParseInt: 176M iterations \n * \n * @param str - Any number. Can include scientific notation.\n*/\n// @ts-ignore: Decorator\nexport function snip_fast(str: string, len: u32 = 0, offset: u32 = 0): T {\n if (isSigned()) {\n const firstChar: u32 = load(changetype(str));\n if (firstChar === 48) return 0 as T;\n const isNegative = firstChar === 45; // Check if the number is negative\n let val: T = 0 as T;\n if (len == 0) len = u32(str.length << 1);\n if (isNegative) {\n offset += 2;\n if (len >= 4) {\n // 32-bit route\n for (; offset < (len - 3); offset += 4) {\n const ch = load(changetype(str) + offset);\n const low = ch & 0xFFFF;\n const high = ch >> 16;\n // 9 is 57. The highest group of two numbers is 114, so if a e or an E is included, this will fire.\n if (low > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 2) == 45) {\n return -(val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return -(val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else if (high > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 4) == 45) {\n return -(val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return -(val * (10 ** (__atoi_fast(str, offset + 4, offset + 6) + 1))) as T;\n }\n } else {\n val = (val * 100 + ((low - 48) * 10) + (high - 48)) as T;\n }\n }\n }\n // Finish up the remainder with 16 bits.\n for (; offset < len; offset += 2) {\n const ch = load(changetype(str) + offset);\n // 9 is 57. E and e are larger. Assumes valid JSON.\n if (ch > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 2) == 45) {\n return -(val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return -(val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else {\n val = (val * 10) + (ch - 48) as T;\n }\n }\n return -val as T;\n } else {\n if (len >= 4) {\n // Duplet 16 bit lane load\n for (; offset < (len - 3); offset += 4) {\n const ch = load(changetype(str) + offset);\n const low = ch & 0xFFFF;\n const high = ch >> 16;\n // 9 is 57. The highest group of two numbers is 114, so if a e or an E is included, this will fire.\n if (low > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 2) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else if (high > 57) {\n if (load(changetype(str) + offset + 4) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 4, offset + 6) + 1))) as T;\n }\n } else {\n // Optimized with multiplications and shifts.\n val = (val * 100 + ((low - 48) * 10) + (high - 48)) as T;\n }\n }\n }\n // Cover the remaining numbers with 16 bit loads.\n for (; offset < len; offset += 2) {\n const ch = load(changetype(str) + offset);\n // 0's char is 48 and 9 is 57. Anything above this range would signify an exponent (e or E).\n // e is 101 and E is 69.\n if (ch > 57) {\n if (load(changetype(str) + offset + 2) == 45) {\n val = (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n val = (val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n return val as T;\n } else {\n val = (val * 10) + (ch - 48) as T;\n }\n }\n return val as T;\n }\n } else {\n const firstChar: u32 = load(changetype(str));\n if (firstChar === 48) return 0 as T;\n let val: T = 0 as T;\n if (len == 0) len = u32(str.length << 1);\n if (len >= 4) {\n // Duplet 16 bit lane load\n for (; offset < (len - 3); offset += 4) {\n const ch = load(changetype(str) + offset);\n const low = ch & 0xFFFF;\n const high = ch >> 16;\n // 9 is 57. The highest group of two numbers is 114, so if a e or an E is included, this will fire.\n if (low > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 2) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else if (high > 57) {\n if (load(changetype(str) + offset + 4) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 4, offset + 6) + 1))) as T;\n }\n } else {\n // Optimized with multiplications and shifts.\n val = (val * 100 + ((low - 48) * 10) + (high - 48)) as T;\n }\n }\n }\n // Cover the remaining numbers with 16 bit loads.\n for (; offset < len; offset += 2) {\n const ch = load(changetype(str) + offset);\n // 0's char is 48 and 9 is 57. Anything above this range would signify an exponent (e or E).\n // e is 101 and E is 69.\n if (ch > 57) {\n if (load(changetype(str) + offset + 2) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else {\n val = (val * 10) + (ch - 48) as T;\n }\n }\n return val as T;\n }\n}\n\n/**\n * Implementation of ATOI. Can be much much faster with SIMD.\n */\n\n// @ts-ignore\nexport function __atoi_fast(str: string, start: u32 = 0, end: u32 = 0): T {\n // @ts-ignore\n let val: T = 0;\n if (!end) end = start + u32(str.length << 1);\n if (isSigned()) {\n // Negative path\n if (load(changetype(str) + start) === 45) {\n start += 2;\n for (; start < end; start += 2) {\n val = (val * 10) + (load(changetype(str) + start) - 48) as T;\n }\n return -val as T;\n } else {\n for (; start < end; start += 2) {\n val = ((val * 10) + (load(changetype(str) + start) - 48)) as T;\n }\n return val as T;\n }\n } else {\n for (; start < end; start += 2) {\n val = ((val * 10) + (load(changetype(str) + start) - 48)) as T;\n }\n return val as T;\n }\n}\n\n/**\n * Parses an integer using __atoi_fast and applies the appended exponential number to it as scientific notation.\n * Benchmark: Hovers around 30m ops/s\n * Only safe if the string is valid.\n * @param str integer to parse. example: 123e1, 123e-1, 123E100\n * @returns\n */\n\n// @ts-ignore\nexport function parseSciInteger(str: string): T {\n // @ts-ignore\n let val: T = 0;\n let offset = 0;\n let firstChar = load(changetype(str) + offset);\n if (firstChar === 45) {\n offset = 2;\n }\n for (; offset < str.length << 1; offset += 2) {\n const char = load(changetype(str) + offset);\n if (char === 101 || char === 69) {\n const char = load(changetype(str) + (offset += 2));\n if (char === 45) {\n // @ts-ignore\n val /= sciNote(__atoi_fast(str, (offset += 2)));\n // @ts-ignore\n return val;\n } else {\n // @ts-ignore\n val *= sciNote(__atoi_fast(str, offset));\n // @ts-ignore\n return val;\n }\n }\n // @ts-ignore\n val = (val << 1) + (val << 3) + (char - 48);\n // We use load because in this case, there is no need to have bounds-checking\n }\n if (firstChar === 45) {\n val = -val as T;\n }\n return val;\n}\n\n// @ts-ignore\nfunction sciNote(num: T): T {\n let res = 1;\n // @ts-ignore\n if (num > 0) {\n for (let i: T = 0; i < num; i++) {\n res *= 10;\n }\n } else {\n for (let i: T = 0; i < num; i++) {\n res /= 10;\n }\n }\n // @ts-ignore\n return res;\n}\n\n// @ts-ignore\nfunction equalsSlice(p1_data: string, p1_start: i32, p1_end: i32, p2_data: string, p2_start: i32, p2_end: i32): boolean {\n const p1_len = p1_end - p1_start;\n const p2_len = p2_end - p2_start;\n if (p1_len != p2_len) return false;\n if (p1_len == 2) {\n return load(changetype(p1_data) + p1_start) == load(changetype(p2_data) + p2_start)\n }\n return memory.compare(changetype(p1_data) + p1_start, changetype(p2_data) + p2_start, p1_len) === 0;\n}\n\n// @ts-ignore\nexport function containsCodePoint(str: string, code: u32, start: i32, end: i32): bool {\n for (let i = start; i <= end; i++) {\n if (unsafeCharCodeAt(str, i) == code) return true;\n }\n return false;\n}\n","// @ts-ignore: Decorator valid here\n@inline export function serializeInteger(data: T): string {\n // I have a much faster implementation of itoa that I will port over later. Its ~4x faster\n return data.toString();\n}","import { rainbow } from \"as-rainbow\"\n\nexport function stringify(data: T, deep: boolean = false): string {\n\n // String\n if (isString(data)) {\n return deep ? rainbow.green(\"'\" + data as string + \"'\") : data as string;\n }\n // Number/NaN/Infinity\n else if (isFloat(data) || isInteger(data)) {\n return rainbow.yellow(`${data}`)\n }\n // Boolean\n else if (isBoolean(data)) {\n return data ? rainbow.yellow(`true`) : rainbow.yellow(`false`)\n }\n // Map\n else if (data instanceof Map) {\n if (data.size === 0) return \"Map (0) {}\"\n let res = \"Map(\"\n\n const keys = data.keys()\n const values = data.values()\n\n res += `${keys.length + 1}) { `\n\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i]\n const value = values[i]\n res += `${stringify(key, true)} => ${stringify(value, true)}, `\n }\n\n res += `${stringify(keys[keys.length - 1], true)} => ${stringify(values[values.length - 1], true)} }`\n }\n // Set\n else if (data instanceof Set) {\n if (data.size === 0) return \"Set (0) {}\"\n let res = \"Set(\"\n\n const values = data.values();\n\n res += `${values.length + 1}) { `\n\n for (let i = 0; i < values.length - 1; i++) {\n const value = values[i];\n res += `${stringify(value, true)}, `\n }\n\n res += `${stringify(values[values.length - 1], true)} }`\n }\n // Array/StaticArray/UintArray/IntArray/ArrayLike\n else if (isArray(data)) {\n if (data.length === 0) return \"[]\"\n let res = \"[\"\n const lastChunk = data[data.length - 1]\n for (let i = 0; i < data.length - 1; i++) {\n const chunk = data[i]\n res += `${stringify(chunk, true)}, `\n }\n res += `${stringify(lastChunk, true)}]`\n return res\n }\n return \"null\";\n}","export namespace rainbow {\n // COLORS\n // @ts-ignore\n @inline\n export function black(text: string): string {\n return colorText([30, 39], text)\n }\n // @ts-ignore\n @inline\n export function red(text: string): string {\n return colorText([31, 39], text)\n }\n // @ts-ignore\n @inline\n export function green(text: string): string {\n return colorText([32, 39], text)\n }\n // @ts-ignore\n @inline\n export function yellow(text: string): string {\n return colorText([33, 39], text)\n }\n // @ts-ignore\n @inline\n export function blue(text: string): string {\n return colorText([34, 39], text)\n }\n // @ts-ignore\n @inline\n export function magenta(text: string): string {\n return colorText([35, 39], text)\n }\n // @ts-ignore\n @inline\n export function cyan(text: string): string {\n return colorText([36, 39], text)\n }\n // @ts-ignore\n @inline\n export function white(text: string): string {\n return colorText([37, 39], text)\n }\n // @ts-ignore\n @inline\n export function blackBright(text: string): string {\n return colorText([90, 39], text)\n }\n // @ts-ignore\n @inline\n export function redBright(text: string): string {\n return colorText([91, 39], text)\n }\n // @ts-ignore\n @inline\n export function greenBright(text: string): string {\n return colorText([92, 39], text)\n }\n // @ts-ignore\n @inline\n export function yellowBright(text: string): string {\n return colorText([92, 39], text)\n }\n // @ts-ignore\n @inline\n export function blueBright(text: string): string {\n return colorText([94, 39], text)\n }\n // @ts-ignore\n @inline\n export function magentaBright(text: string): string {\n return colorText([95, 39], text)\n }\n // @ts-ignore\n @inline\n export function cyanBright(text: string): string {\n return colorText([96, 39], text)\n }\n // @ts-ignore\n @inline\n export function whiteBright(text: string): string {\n return colorText([97, 39], text)\n }\n // MARKINGS\n // @ts-ignore\n @inline\n export function resetMk(text: string): string {\n return colorText([0, 0], text)\n }\n // @ts-ignore\n @inline\n export function boldMk(text: string): string {\n return colorText([1, 22], text)\n }\n // @ts-ignore\n @inline\n export function dimMk(text: string): string {\n return colorText([2, 22], text)\n }\n // @ts-ignore\n @inline\n export function italicMk(text: string): string {\n return colorText([3, 23], text)\n }\n // @ts-ignore\n @inline\n export function underlineMk(text: string): string {\n return colorText([4, 24], text)\n }\n // @ts-ignore\n @inline\n export function overlineMk(text: string): string {\n return colorText([53, 55], text)\n }\n // @ts-ignore\n @inline\n export function inverseMk(text: string): string {\n return colorText([7, 27], text)\n }\n // @ts-ignore\n @inline\n export function hiddenMk(text: string): string {\n return colorText([8, 28], text)\n }\n // @ts-ignore\n @inline\n export function strikethroughMk(text: string): string {\n return colorText([9, 29], text)\n }\n // BACKGROUND\n // @ts-ignore\n @inline\n export function bgBlack(text: string): string {\n return colorText([40, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgRed(text: string): string {\n return colorText([41, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgGreen(text: string): string {\n return colorText([42, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgYellow(text: string): string {\n return colorText([43, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgBlue(text: string): string {\n return colorText([44, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgMagenta(text: string): string {\n return colorText([45, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgCyan(text: string): string {\n return colorText([46, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgWhite(text: string): string {\n return colorText([47, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgBlackBright(text: string): string {\n return colorText([100, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgRedBright(text: string): string {\n return colorText([101, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgGreenBright(text: string): string {\n return colorText([102, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgYellowBright(text: string): string {\n return colorText([103, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgBlueBright(text: string): string {\n return colorText([104, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgMagentaBright(text: string): string {\n return colorText([105, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgCyanBright(text: string): string {\n return colorText([106, 49], text)\n }\n // @ts-ignore\n @inline\n export function bgWhiteBright(text: string): string {\n return colorText([107, 49], text)\n }\n}\n\n// @ts-ignore\n@inline\nfunction colorText(format: i32[], text: string): string {\n return `\\u001b[${format[0].toString()}m${text}\\u001b[${format[1].toString()}m`\n}","import {\r\n args_get,\r\n args_sizes_get,\r\n environ_get,\r\n environ_sizes_get,\r\n proc_exit,\r\n fd_write,\r\n fd_close,\r\n fd_read,\r\n clock_time_get,\r\n clockid,\r\n errnoToString,\r\n fd\r\n} from \"./bindings/wasi_snapshot_preview1\";\r\n\r\nimport {\r\n tempbuf\r\n} from \"./wasi_internal\";\r\n\r\nimport {\r\n E_INDEXOUTOFRANGE\r\n} from \"util/error\";\r\n\r\nexport namespace wasi_process {\r\n\r\n // @ts-ignore: decorator\r\n @lazy export const arch = sizeof() == 4 ? \"wasm32\" : \"wasm64\";\r\n // @ts-ignore: decorator\r\n @lazy export const platform = \"wasm\";\r\n // @ts-ignore: decorator\r\n @lazy export const argv = lazyArgv();\r\n // @ts-ignore: decorator\r\n @lazy export const env = lazyEnv();\r\n // @ts-ignore: decorator\r\n @lazy export var exitCode = 0;\r\n\r\n export function exit(code: i32 = exitCode): void {\r\n proc_exit(code);\r\n }\r\n\r\n // @ts-ignore: decorator\r\n @lazy export const stdin = changetype(0);\r\n // @ts-ignore: decorator\r\n @lazy export const stdout = changetype(1);\r\n // @ts-ignore: decorator\r\n @lazy export const stderr = changetype(2);\r\n\r\n export function time(): i64 {\r\n let err = clock_time_get(clockid.REALTIME, 1000000, tempbuf);\r\n if (err) throw new Error(errnoToString(err));\r\n return load(tempbuf) / 1000000;\r\n }\r\n\r\n export function hrtime(): u64 {\r\n let err = clock_time_get(clockid.MONOTONIC, 0, tempbuf);\r\n if (err) throw new Error(errnoToString(err));\r\n return load(tempbuf);\r\n }\r\n}\r\n\r\nfunction lazyArgv(): string[] {\r\n let err = args_sizes_get(tempbuf, tempbuf + sizeof());\r\n if (err) throw new Error(errnoToString(err));\r\n let count = load(tempbuf);\r\n let ptrsSize = count * sizeof();\r\n let dataSize = load(tempbuf, sizeof());\r\n let bufSize = ptrsSize + dataSize;\r\n let buf = __alloc(bufSize);\r\n err = args_get(buf, buf + ptrsSize);\r\n if (err) throw new Error(errnoToString(err));\r\n let count32 = count;\r\n let argv = new Array(count32);\r\n for (let i = 0; i < count32; ++i) {\r\n let ptr = load(buf + i * sizeof());\r\n let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true);\r\n argv[i] = str;\r\n }\r\n __free(buf);\r\n return argv;\r\n}\r\n\r\nfunction lazyEnv(): Map {\r\n let err = environ_sizes_get(tempbuf, tempbuf + 4);\r\n if (err) throw new Error(errnoToString(err));\r\n let count = load(tempbuf);\r\n let ptrsSize = count * sizeof();\r\n let dataSize = load(tempbuf, sizeof());\r\n let bufSize = ptrsSize + dataSize;\r\n let buf = __alloc(bufSize);\r\n err = environ_get(buf, buf + ptrsSize);\r\n if (err) throw new Error(errnoToString(err));\r\n let env = new Map();\r\n for (let i: usize = 0; i < count; ++i) {\r\n let ptr = load(buf + i * sizeof());\r\n let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true);\r\n let pos = str.indexOf(\"=\");\r\n if (~pos) {\r\n env.set(str.substring(0, pos), str.substring(pos + 1));\r\n // __dispose(changetype(str));\r\n } else {\r\n env.set(str, \"\");\r\n }\r\n }\r\n __free(buf);\r\n return env;\r\n}\r\n\r\n@unmanaged\r\nabstract class Stream {\r\n close(): void {\r\n var err = fd_close(changetype(this));\r\n if (err) throw new Error(errnoToString(err));\r\n }\r\n}\r\n\r\n@unmanaged\r\nabstract class WritableStream extends Stream {\r\n write(data: T): void {\r\n if (isString()) {\r\n writeString(changetype(this), changetype(data));\r\n } else if (data instanceof ArrayBuffer) {\r\n writeBuffer(changetype(this), data);\r\n } else {\r\n ERROR(\"String or ArrayBuffer expected\");\r\n }\r\n }\r\n}\r\n\r\n@unmanaged\r\nabstract class ReadableStream extends Stream {\r\n read(buffer: ArrayBuffer, offset: isize = 0): i32 {\r\n var end = buffer.byteLength;\r\n if (offset < 0 || offset > end) {\r\n throw new Error(E_INDEXOUTOFRANGE);\r\n }\r\n store(tempbuf, changetype(buffer) + offset);\r\n store(tempbuf, end - offset, sizeof());\r\n var err = fd_read(changetype(this), tempbuf, 1, tempbuf + 2 * sizeof());\r\n if (err) throw new Error(errnoToString(err));\r\n return load(tempbuf, 2 * sizeof());\r\n }\r\n}\r\n\r\nfunction writeBuffer(fd: fd, data: ArrayBuffer): void {\r\n store(tempbuf, changetype(data));\r\n store(tempbuf, data.byteLength, sizeof());\r\n var err = fd_write(fd, tempbuf, 1, tempbuf + 2 * sizeof());\r\n if (err) throw new Error(errnoToString(err));\r\n}\r\n\r\nfunction writeString(fd: fd, data: string): void {\r\n var len = data.length;\r\n var\r\n char2: u32 = 0,\r\n char3: u32 = 0,\r\n char4: u32 = 0;\r\n switch (len) {\r\n case 4: { // \"null\"\r\n char4 = load(changetype(data), 6);\r\n if (char4 >= 0x80) break;\r\n }\r\n case 3: { // \"ms\\n\"\r\n char3 = load(changetype(data), 4);\r\n if (char3 >= 0x80) break;\r\n }\r\n case 2: { // \"\\r\\n\"\r\n char2 = load(changetype(data), 2);\r\n if (char2 >= 0x80) break;\r\n }\r\n case 1: { // \"\\n\"\r\n let char1 = load(changetype(data));\r\n if (char1 >= 0x80) break;\r\n store(tempbuf, tempbuf + 2 * sizeof());\r\n store(tempbuf, len, sizeof());\r\n store(tempbuf, char1 | char2 << 8 | char3 << 16 | char4 << 24, 2 * sizeof());\r\n let err = fd_write(fd, tempbuf, 1, tempbuf + 3 * sizeof());\r\n if (err) throw new Error(errnoToString(err));\r\n }\r\n case 0: return;\r\n }\r\n var utf8len = String.UTF8.byteLength(data);\r\n var utf8buf = __alloc(utf8len);\r\n assert(String.UTF8.encodeUnsafe(changetype(data), len, utf8buf) == utf8len);\r\n store(tempbuf, utf8buf);\r\n store(tempbuf, utf8len, sizeof());\r\n var err = fd_write(fd, tempbuf, 1, tempbuf + 2 * sizeof());\r\n __free(utf8buf);\r\n if (err) throw new Error(errnoToString(err));\r\n}\r\n","import {\r\n wasi_process\r\n} from \"./wasi_process\";\r\n\r\n// @ts-ignore: decorator\r\n@lazy var timers = new Map();\r\n\r\nexport namespace wasi_console {\r\n\r\n export function assert(condition: T, message: string = \"\"): void {\r\n if (!condition) {\r\n let stderr = wasi_process.stderr;\r\n stderr.write(\"Assertion failed: \");\r\n stderr.write(message);\r\n stderr.write(\"\\n\");\r\n }\r\n }\r\n\r\n export function log(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function debug(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(\"Debug: \");\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function info(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(\"Info: \");\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function warn(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(\"Warning: \");\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function error(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(\"Error: \");\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function time(label: string = \"default\"): void {\r\n let stdout = wasi_process.stdout;\r\n if (timers.has(label)) {\r\n stdout.write(\"Warning: Label '\");\r\n stdout.write(label);\r\n stdout.write(\"' already exists for console.time()\\n\");\r\n return;\r\n }\r\n timers.set(label, wasi_process.hrtime());\r\n }\r\n\r\n export function timeLog(label: string = \"default\"): void {\r\n let stdout = wasi_process.stdout;\r\n if (!timers.has(label)) {\r\n stdout.write(\"Warning: No such label '\");\r\n stdout.write(label);\r\n stdout.write(\"' for console.timeLog()\\n\");\r\n return;\r\n }\r\n timeLogImpl(label);\r\n }\r\n\r\n export function timeEnd(label: string = \"default\"): void {\r\n let stdout = wasi_process.stdout;\r\n if (!timers.has(label)) {\r\n stdout.write(\"Warning: No such label '\");\r\n stdout.write(label);\r\n stdout.write(\"' for console.timeEnd()\\n\");\r\n return;\r\n }\r\n timeLogImpl(label);\r\n timers.delete(label);\r\n }\r\n}\r\n\r\nfunction timeLogImpl(label: string): void {\r\n var start = changetype(timers.get(label));\r\n var end = wasi_process.hrtime();\r\n var nanos = end - start;\r\n var millis = nanos / 1000000;\r\n var millisStr = millis.toString();\r\n var stdout = wasi_process.stdout;\r\n stdout.write(label);\r\n stdout.write(\": \");\r\n stdout.write(millisStr);\r\n stdout.write(\"ms\\n\");\r\n}\r\n"]} \ No newline at end of file +{"version":3,"sources":["~lib/rt/common.ts","~lib/rt/tlsf.ts","~lib/shared/typeinfo.ts","~lib/rt/itcms.ts","assembly/bl.ts","assembly/chars.ts","~lib/util/math.ts","~lib/util/string.ts","~lib/util/number.ts","assembly/sink.ts","~lib/@hypercubed/as-mpz/assembly/index.ts","~lib/builtins.ts","~lib/number.ts","~lib/shared/runtime.ts","~lib/util/sort.ts","~lib/staticarray.ts","~lib/wasi_internal.ts","~lib/bindings/wasi_snapshot_preview1.ts","~lib/string.ts","~lib/util/error.ts","~lib/rt.ts","assembly/test.ts","assembly/index.ts","assembly/serialize/string.ts","~lib/array.ts","~lib/wasi_process.ts","~lib/wasi_console.ts","assembly/util.ts"],"names":[],"mappings":"8qBIMc,E,kBWsDgB,EAA0B,EAA7C,GAAwE,EAAxE,CAAP,I,UGV0B,EAA0B,EAA7C,GAAuE,EAAvE,CAAP,OX2jBS,EAA2B,EAAU,EAAV,CAA3B,CAAX,EACW,EAA2B,EAAU,EAAV,CAA3B,CAAX,EACI,EAAmB,EAAnB,C,CACE,EAAO,EAAP,GAAe,EAAO,EAAP,CAAa,EAAO,EAAP,CAAd,CAAF,E,GADQ,EAEtB,E,EACgB,EAAV,GAA6B,EAAV,GAAnB,CAAJ,EAAwC,GACxC,EAAQ,E,CAAR,EACA,EAAQ,E,CAAR,EACA,EAAQ,E,CAAR,EACO,EAAO,EAAP,C,KAGb,E,EAAO,E,WACkB,EAAf,GAAR,EACuB,EAAf,GAAR,EACI,EAAK,EAAL,CAAJ,EAAmB,EAAI,EAAJ,CAAP,EACZ,EAAQ,E,CAAR,EACA,EAAQ,E,CAAR,E,KAEK,EAAP,OWiEiB,EAAO,EAAc,EAAd,CAAP,CAAb,EACa,EAAb,EACA,E,EAAO,EAAM,EAAN,C,EACmB,EAAf,GAAT,EACI,EAAK,GAAL,CAAJ,EACY,EAAQ,EAAlB,GACA,E,GAAA,EAEI,EAAkB,EAAD,CAAjB,CAAJ,EAAiC,EAAS,EAAT,CAAP,GACjB,EAAK,GAAL,CAAJ,EACI,EAAM,EAAN,CAAU,GAAV,CAAT,EACS,EAAK,EAAL,CAAU,GAAV,CAAT,EACW,EAAQ,EAAM,EAAN,CAAU,EAAV,CAAnB,GACA,EAAU,E,CAAV,GAQK,EAAK,IAAL,CAAgB,IAAjB,CAAJ,EACM,EAAK,IAAL,GAAe,EAAM,EAAN,CAAU,EAAV,E,GAAnB,EAC0B,EAAf,GAAT,EACK,EAAK,IAAL,CAAgB,IAAjB,CAAJ,EACO,IAAY,EAAK,GAAL,CAAgB,EAAjB,CAAX,CAAmC,EAAK,GAAL,CAAnC,CAAL,EACS,EAAM,EAAN,CAAW,GAAX,CAAT,EACS,EAAM,EAAN,CAAW,EAAX,CAAgB,GAAhB,CAAT,EACS,EAAM,EAAN,CAAW,EAAX,CAAgB,GAAhB,CAAT,EACS,EAAW,EAAX,CAAgB,GAAhB,CAAT,EACW,EAAQ,EAAM,EAAN,CAAW,EAAM,EAAN,CAAX,CAAsB,EAAM,EAAN,CAAtB,CAAgC,EAAhC,CAAnB,GACA,EAAU,E,CAAV,EAAa,EAAO,E,CAAP,EACb,IAGA,EAAa,EAAb,CAAJ,EACM,EAAa,EAAb,CAAJ,EAAkD,I,aAC7C,IAAL,IAGK,EAAM,EAAN,CAAW,GAAX,CAAT,EACS,EAAM,EAAN,CAAW,EAAX,CAAgB,GAAhB,CAAT,EACS,EAAW,EAAX,CAAgB,GAAhB,CAAT,EACW,EAAQ,EAAM,EAAN,CAAU,EAAV,CAAnB,GACU,EAAQ,EAAlB,GACA,EAAU,E,CAAV,IAEF,EAAO,E,CAAP,E,KAEE,EAAJ,EACY,E,SAAU,EAApB,IAEK,EAAS,EAAT,CAAP,I,sBArDoF,E,GAA8B,E,kBV3jBlH,EAAQ,IAAR,CAAJ,EACM,EAAQ,GAAR,CAAJ,EACS,EAAQ,EAAS,EAAb,CAAJ,CAAP,EAEO,EAAQ,EAAS,IAAb,CAAJ,CAA8B,EAAS,GAAb,CAA1B,CAAP,IAGE,EAAQ,KAAR,CAAJ,EACS,EAAQ,EAAS,IAAb,CAAJ,CAAP,EAEO,EAAQ,EAAS,MAAb,CAAJ,CAAmC,EAAS,KAAb,CAA/B,CAAP,Q,UOvDa,EAA2B,EAAgB,EAAhB,CAA3B,CAAR,GAAP,I,oBZlCF,EAAsB,EAAtB,EACA,EAAa,EAAb,EACO,EAAP,I,QAqC4B,IAAsB,E,EAAD,CAAxC,CAAP,IAUW,IAAqB,EAAzB,CAAP,MAoDc,EAAhB,EACS,EAAT,EACW,IAAX,EACA,E,EAAO,EAAQ,EAAR,C,EACD,E,CAAc,IAAc,EAAd,C,CAAP,E,eACK,EAA0B,EAA1B,CAA0C,EAA1D,EACO,IAAP,E,QArDA,EAAsB,IAAsB,E,EAAD,CAArB,CAAoC,EAArC,CAArB,K,QAVA,EAAqB,EAA0B,IAAqB,EAArB,CAA1B,CAArB,OA2BW,IAAX,EACI,EAAQ,EAAR,CAAJ,EACM,E,CAAc,IAAa,EAAb,GAAqB,EAA0B,EAA1B,E,IAA5B,E,eACX,EAES,IAAX,EACI,E,CAAc,E,CAAP,E,eACX,EAAY,EAAZ,EACA,EAAY,EAAZ,K,kBiBlHQ,EAAV,EACI,EAAe,EAAV,GAAL,CAAJ,EAAyC,I,YACb,EAAM,EAAN,CAAsB,EAAK,EAAL,CAA3C,GAAP,MjBiGa,IAAX,EAEO,EAAQ,EAAR,G,GAAsC,EAAX,EAAmB,EAAnB,CAAiD,EAAlD,EAAjC,MAkBW,IAAX,EACA,EAAqB,EAA0B,EAA1B,CAArB,EACA,EAAY,EAAZ,EACA,EAAY,EAAZ,EACA,EAAY,EAAZ,OAKI,EAAQ,EAAR,CAAJ,EAAgC,I,GAAP,E,kBAAP,GAClB,IACA,EAAY,EAAS,MAA0B,EAAL,EAAc,GAAxD,OA6KG,EAAD,CAAJ,EAAU,EACmB,EAAM,EAAzB,CAAV,EACI,EAAJ,CACI,IAAa,EAAb,CAAJ,EACE,IACE,E,GAAF,QAhKQ,EAAV,EACA,E,EAAO,EAAM,EAAN,C,EACe,EAAZ,GAAkB,EAA1B,EACA,EAAO,E,CAAP,E,gBAzDO,EAAkB,IAAe,E,EAAD,CAAd,CAAlB,CAAP,I,mEFyJc,IAAhB,EACI,E,CAAc,EAAY,EAAZ,C,CAAP,E,eACA,EAAa,E,EAAD,CAAZ,CAAX,EACI,E,CAAc,EAAQ,EAAR,C,CAAP,E,eAIP,EAAO,GAAP,CAAJ,EACO,EAAL,EACW,EAAQ,EAAd,CAAL,GAGsB,E,EAAM,M,OAAV,CAAlB,EACK,EAAiB,EAAX,CAAN,CAAL,EACY,EAAgB,EAAK,EAAL,CAAhB,CAAkC,EAAK,EAAL,CAAzC,CAAL,EACA,EAAM,EAAU,EAAV,C,CAAN,GAEE,E,CAAc,EAAK,EAAL,GAAgB,EAAK,EAAL,E,IAAvB,E,eAGA,IAAX,EACW,IAAX,EACI,EAAJ,EAAU,EAAY,EAAZ,GACN,EAAJ,EAAU,EAAY,EAAZ,GAGN,EAAS,EAAQ,E,EAAM,E,EAAI,E,EAhI7B,EAA6B,EAAM,EAAN,CAAiB,EAAlB,CAAgC,EAAjC,CAA3B,CADK,GAAP,GAiII,CAAJ,EACE,EAAQ,E,EAAM,E,EAAI,E,EAAI,E,EAxHtB,EAA6B,EAAM,EAAN,CAAiB,EAAlB,CAAgC,EAAjC,CAA3B,CACA,EAFF,IA4HO,EAAD,CAAJ,EACc,EAAM,E,EAAM,E,EAxJ1B,EAA2B,EAAM,EAAN,CAA3B,CADK,GAAP,GAyJI,EACA,EAAM,E,EAAM,E,EAAI,EAAW,EAAK,EAAL,C,EAAF,C,CAAT,E,EAhJlB,EAA2B,EAAM,EAAN,CAA3B,CACA,EAFF,IAoJS,EAAD,CAAJ,EAAY,MAAgB,EAAK,EAAL,C,EAAF,C,CAAd,WArGZ,E,CAAc,E,CAAP,E,eACK,IAAhB,EACI,E,CAAc,EAAY,EAAZ,C,CAAP,E,eAEC,EAAS,E,EA5GI,EAA2B,EAA3B,CAA6C,IAAgB,E,EAAD,CAAf,CAA/D,CAAP,GA4GA,EACgB,IAAhB,EAGI,EAAY,EAAZ,CAAJ,EACc,EAAM,EAAlB,EACA,EAA2B,EAAY,EAAZ,CAA8B,EAAa,E,EAAD,CAAZ,CAA9B,CAAZ,EAAf,EACQ,EAAS,E,EAnHM,EAA2B,EAA3B,CAA6C,IAAgB,E,EAAD,CAAf,CAA/D,CAAP,GAmHE,EACY,IAAZ,GAKE,EAAY,EAAZ,CAAJ,EACa,EAAY,E,EAhIN,EAA2B,EAA3B,CAAZ,GAAP,GAgIE,EACe,IAAf,EACI,E,CAAc,EAAW,EAAX,C,CAAP,E,eACC,EAAM,EAAlB,EACQ,EAAR,EACA,EAA2B,EAAW,EAAX,CAA6B,EAAa,E,EAAD,CAAZ,CAA7B,CAAZ,EAAf,GAIF,EAAe,EAAY,EAAZ,CAAf,EAIW,EAAa,E,EAAD,CAAZ,CAAX,EACI,E,CAAc,EAAQ,EAAR,C,CAAP,E,eACP,E,CAAc,EAA2B,EAA3B,CAA4C,EAA5C,CAAoD,EAApD,C,CAAP,E,eAGE,EAA2B,EAA3B,CAA4C,EAAzD,GAII,EAAO,GAAP,CAAJ,EACO,EAAL,EACW,EAAQ,EAAd,CAAL,GAGsB,E,EAAM,M,OAAV,CAAlB,EACK,EAAiB,EAAX,CAAN,CAAL,EACY,EAAgB,EAAK,EAAL,CAAhB,CAAkC,EAAK,EAAL,CAAzC,CAAL,EACA,EAAM,EAAU,EAAV,C,CAAN,GAEE,E,CAAc,EAAK,EAAL,GAAgB,EAAK,EAAL,E,IAAvB,E,eAGA,EAAQ,E,EAAM,E,EAAI,E,EAzF3B,EAA6B,EAAM,EAAN,CAAiB,EAAlB,CAAgC,EAAjC,CAA3B,CADK,GAAP,GA0FA,EACA,EAAa,EAAb,EACA,EAAa,EAAb,EACI,EAAJ,EAAU,EAAY,EAAZ,GACV,EAAQ,E,EAAM,E,EAAI,E,EAAI,E,EApFpB,EAA6B,EAAM,EAAN,CAAiB,EAAlB,CAAgC,EAAjC,CAA3B,CACA,EAFF,IAwFA,MAAe,EAAK,EAAL,C,CAAf,EACA,EAAM,E,EAAM,E,EAAI,EAAM,E,EAAM,E,EApH1B,EAA2B,EAAM,EAAN,CAA3B,CADK,GAAP,GAqHmC,EAAK,EAAL,CAAnB,C,EA3Gd,EAA2B,EAAM,EAAN,CAA3B,CACA,EAFF,U,EAmOU,CAAV,EACI,E,GAAc,CAAc,EAAd,C,CAAP,E,eACD,EAAQ,EAAR,CAAyB,EAAzB,CAAqC,E,EAAD,CAArC,CAAiD,EAAlD,CAAR,EACA,EAAQ,E,EAAD,C,CAAP,EAEW,EAAQ,E,EA1MjB,EADK,IAAP,GA2MA,EACsB,EAAtB,EACI,EAAJ,EACM,E,CAAc,EAAS,EAA0B,EAA1B,CAAT,C,CAAP,E,eAIP,EAAQ,EAAR,CAAwB,EAAxB,CAAJ,EACE,EAAS,E,CAAT,EACW,IAAX,G,GAMO,E,CACF,EAAS,EAA0B,GAA1B,CAAT,C,CADS,E,gBAKP,EAAM,EAAN,CAAX,EACI,EAAO,EAAiB,EAAjB,CAAiC,EAAjC,CAAP,CAAJ,EACS,EAAP,EAIa,EAAO,EAAI,EAAJ,CAAP,CAAf,EACW,EAAX,EACA,EAAc,EAAW,EAAX,CAAmB,EAAW,EAAX,CAAnB,CAAd,EACA,EAAY,EAAZ,EACA,EAAY,EAAZ,EAGyB,EAAQ,EAAR,CAAyB,EAA3C,CAAP,EACA,EAAc,EAAI,EAAJ,CAAd,EACA,EAAQ,E,EAAM,E,EApOZ,EACA,EAFF,KAuOY,EAAM,EAAlB,EAEO,EAAP,OA0CI,EAAJ,CACkB,EAAc,EAAd,CAA0B,E,EAAD,CAA1B,CAAjB,EACkB,EAAlB,EAC2B,EAAa,GAAb,CAA0B,IAA3B,CAAsC,I,EAAD,CAAtC,CAAmD,EAA1D,CAAlB,EACI,EAAc,EAAd,GAAyC,EAAc,EAAd,CAAZ,EAAyC,EAAzC,E,GAAjC,EAA6E,EAClE,EAAX,EACA,EAAa,EAAb,EACA,EAAQ,E,EAAM,E,EAzRZ,EACA,EAFF,KA2RqB,EAAhB,E,EAAmB,EAAK,EAAL,C,EACtB,EAAM,E,EAAM,E,EAAI,E,EAjUhB,EAA2B,EAAM,EAAN,CAA3B,CACA,EAFF,IAmUqB,EAAd,E,EAAiB,EAAK,EAAL,C,EACpB,EAAQ,E,EAAM,E,EAAI,E,EAAI,E,EAhTxB,EAA6B,EAAM,EAAN,CAAiB,EAAlB,CAAgC,EAAjC,CAA3B,CACA,EAFF,IAgTwC,E,GAAF,E,IAFE,E,GAAF,E,IAMvB,EAAa,GAAb,CAAf,EACI,E,CAKQ,EAAM,E,EAAU,CAAsB,EAAtB,C,EADrB,CAGA,EAAP,OAwE8B,EAAM,EAAxB,CAAZ,EAEE,EAAO,EAAP,GAAc,EAAM,EAAN,CAAF,E,GAAZ,EACE,IAAe,EAAf,CAAF,E,IAFF,E,eAIO,EAAP,IAZI,EAAJ,CACA,EAAe,IAAe,EAAf,CAAf,EACY,EAAM,EAAlB,KAiCI,EAAM,EAAN,CAAJ,EAAuB,EAClB,EAAD,CAAJ,EAAW,GACD,EAAqB,EAAf,EAAhB,KE3VI,EAAyB,EAAzB,CAAJ,EACE,EAAoB,EAApB,EACA,EAAW,EAAX,GAEA,EAAS,I,CAAT,EACI,EAAJ,CAGO,EAAyB,EAAzB,CAAP,SAtEF,QAAQ,E,IACD,E,KAOA,E,KAmCA,E,MA1CY,AACP,EAAR,EACa,EAAb,EACW,EAAX,EACO,EAAP,EACO,EAAa,EAAb,CAAP,EAEe,AACE,EAAL,CAAZ,EACM,IAAN,EACA,E,EAAO,EAAO,EAAP,C,EACE,EAAP,EACI,IAAa,EAAb,CAAJ,EACE,EAAY,EAAZ,EACa,EAAb,EACgB,EAAyB,EAAzB,CAAyC,EAAzD,EACO,EAAa,EAAb,CAAP,EAEI,IAAN,E,KAEW,EAAb,EACW,EAAX,EACM,IAAN,EACI,EAAO,EAAP,CAAJ,EACa,EAAX,EACM,IAAN,EACA,E,EAAO,EAAO,EAAP,C,EACD,IAAa,EAAb,CAAJ,EACE,EAAY,EAAZ,EACgB,EAAyB,EAAzB,CAAyC,EAAzD,GAEI,IAAN,E,KAES,EAAX,EACY,EAAZ,EACU,EAAV,EACQ,EAAR,EACO,IAAP,EACQ,EAAR,GAEK,EAAa,EAAb,CAAP,EAEgB,AACV,EAAN,EACI,EAAO,EAAP,CAAJ,EACS,IAAP,EACI,E,CAAc,IAAkB,EAAL,CAAb,C,CAAP,E,eACN,EAAL,EACO,EAAP,EAEF,EAAwB,EAAxB,EACA,EAAe,EAAf,EACQ,EAAR,EACA,GAGG,EAAP,MAgKI,EAAJ,CACI,EAAJ,CACoB,GAAc,GAAd,CAA2B,GAA3B,CAApB,EACA,EACE,EAAU,E,CAAV,EACI,EAAS,EAAT,CAAJ,EACM,EAAJ,C,EACoB,CAAa,G,CAAb,CAA0B,G,CAAlC,CAAyC,GAAzC,CAAZ,EACI,EAAJ,CACA,EAEK,EAAS,EAAT,C,GACL,EAAJ,CACY,EAAQ,GAAoB,EAAQ,EAAR,CAAoB,GAA1B,CAAd,CAAR,CAAZ,EACI,EAAJ,IFyCO,EAAQ,EAAR,GACH,GACE,EAAO,EAAP,CAAwB,EAAxB,CAAoC,E,EAAD,CAApC,CAAgD,EAAjD,EAFJ,IAOI,EAAO,MAAP,CAAJ,EAA0C,I,aACvB,EAAZ,EAAP,IApJO,EAAO,MAAP,GACH,EAAQ,EAAM,EAAsB,EAAX,CAAX,CAAN,CAAR,CAA8C,EAA9C,EACA,GAFJ,OAWI,EAAO,GAAP,CAAJ,EACO,EAAL,EACW,EAAQ,EAAd,CAAL,GAE8B,EAAV,EAApB,EACK,EAAkB,EAAlB,CAAsB,EAAtB,CAAqC,EAAX,CAA1B,CAAL,EACY,EAAgB,EAAK,EAAL,CAAhB,CAAkC,EAAK,EAAL,CAAzC,CAAL,EACA,EAAM,EAAU,EAAV,C,CAAN,GAEE,E,CAAc,EAAK,EAAL,GAAgB,EAAK,EAAL,E,IAAvB,E,eAGC,EAAM,E,EAAM,E,EA/LtB,EAA2B,EAAM,EAAN,CAA3B,CADK,GAAP,GAgMgC,E,EAAD,CAAM,EAAN,CAAnB,CAAZ,EACyB,EAAzB,EACK,EAAD,CAAJ,EAEc,IAAe,E,EAAD,CAAO,EAAK,EAAL,CAAP,CAAd,CAAZ,EACK,EAAD,CAAJ,EACS,EAAP,GAEgB,EAAX,CAAL,EACQ,EAAM,E,EAAM,E,EAxMtB,EAA2B,EAAM,EAAN,CAA3B,CADK,GAAP,GAyMI,EACI,E,CAAc,E,CAAP,E,eACJ,EAAQ,E,EAAM,E,EAAa,EAAT,C,EAvL3B,EAA6B,EAAM,EAAN,CAAiB,EAAlB,CAAgC,EAAjC,CAA3B,CADK,GAAP,GAwLI,IAGK,EAAQ,E,EAAM,E,EAAa,EAAT,C,EA1LzB,EAA6B,EAAM,EAAN,CAAiB,EAAlB,CAAgC,EAAjC,CAA3B,CADK,GAAP,GA2LE,GAEK,EAAP,OA6EI,EAAJ,CAKI,EAAQ,GAAR,CAAJ,EACmB,EAAV,EAAP,GAIgB,EAAlB,EACA,EAAQ,EAAyB,EAAsB,EAAtB,CAA4B,EAA7B,CAA+C,EAA0B,E,EAjQvG,EADK,IAAP,GAkQ0B,CAAlB,C,CAAR,EAC0B,EAAO,IAAP,CAAkB,I,EAAD,CAAlB,CAA+B,EAAtC,CAAlB,EACsB,E,EAAa,E,OAAjB,CAAlB,EACgB,EAAZ,EAA2B,EAA3B,CAAJ,EACkB,EAAZ,EAA2B,EAA3B,CAAJ,EAAkC,GAEnB,EAAjB,EACU,EAAM,EAAsB,EAAtB,C,EAA0B,CAAmB,EAAnB,C,EAA1C,OAxFgB,IAAhB,EACI,E,CAAiB,EAAO,EAAP,CAAyB,EAA1B,CAAF,C,CAAP,E,eAGM,EAAa,E,EAAD,CAAZ,CAA0B,EAA3B,CAAhB,EACI,EAAa,EAAiB,EAAjB,CAAb,CAAJ,EACE,EAAe,EAAQ,EAAY,EAAZ,CAAR,CAAf,EAE8B,EAA2B,EAA3B,CAA4C,EAA9D,CAAZ,EACA,EAAgB,EAAY,EAAZ,CAA8B,EAA/B,CAAf,EACY,EAAM,EAAlB,GAIA,EAAe,EAAa,E,EAAD,CAAZ,CAAf,EACA,EAAS,E,EAtRc,EAA2B,EAA3B,CAA6C,IAAgB,E,EAAD,CAAf,CAA/D,CAAP,GAsRE,EAAS,E,EAtRc,EAA2B,EAA3B,CAA6C,IAAgB,E,EAAD,CAAf,CAA/D,CAAP,GAsRE,EAA2B,E,EAAD,C,CAA1B,QAuH4B,EAAZ,EAAlB,EACwB,EAAM,EAAlB,EAAZ,EACK,EAAD,CAAJ,EACa,EAAM,EAAjB,EACsC,EAAM,EAApC,EAAR,EACI,E,CAAc,E,CAAP,E,gBAET,E,CAAe,IAAgB,E,EAAD,CAAf,CAA8B,EAA/B,C,CAAP,E,eACC,EAAM,EAAlB,EACa,EAAM,EAAO,EAA1B,EACI,EAAJ,CACO,EAAP,IAmEK,EAAD,CAAJ,EAAW,GAC4B,EAAM,EAAtC,EAA+C,EAA/C,CAAP,I,sBExTI,EAAQ,MAAR,CAAJ,EAA4C,I,aACxC,EAAS,EAAT,CAAJ,EAAwB,GACa,EAAkB,EAAlB,CAAR,EAAkC,EAArD,CAAV,EACA,EAAW,EAAX,EACA,EAAa,EAAb,EACA,EAAW,EAAW,EAAtB,EACA,EAAS,I,CAAT,EACU,EAAyB,EAAzB,CAAV,EAEY,EAAK,EAAG,EAApB,GACO,EAAP,MiBnPmB,EAAM,EAAZ,EAAb,EACI,EAAJ,EAAsB,EAAQ,EAAM,EAA1B,KACH,EAAP,MjBwQK,EAAD,CAAJ,EAAe,EACX,E,CAAc,E,CAAP,E,eACoB,EAAW,EAA9B,CAAZ,EACI,IAAe,EAAf,CAAJ,EACkC,EAAY,EAA/B,CAAb,EACkB,IAAlB,EACI,EAAoB,EAAL,CAAf,CAAJ,EAEM,EAAJ,EAGE,KAGA,MAEO,EAAe,EAAf,GAA8B,EAAS,EAAT,E,GAAlC,EAEL,U,0EAnC4B,EAAS,EAA5B,CAAb,EAEI,EAAS,IAAiB,E,EAAD,CAAhB,CAAsB,EAAvB,CAAR,CAAJ,EACE,EAAgB,EAAhB,EACO,EAAP,EAIiB,EAAM,IAAZ,EAAb,EACY,EAAQ,EAAY,E,EAAM,I,OAAV,CAA5B,IACO,EAAP,I,qCejR2C,E,eDo7B3C,4J,MAAQ,C,IACD,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,E,KACA,G,KACA,G,KACA,G,KACA,G,KACA,G,KACA,G,KACA,G,KACA,G,KACA,G,KACA,G,KACA,G,KACA,G,KACA,G,MA5EsB,IAAP,EACM,IAAP,EACM,IAAP,EACW,IAAP,EACU,IAAP,EACM,IAAP,EACC,IAAP,EACS,IAAP,EACI,IAAP,EACS,IAAP,EACK,IAAP,EACW,IAAP,EACI,IAAP,EACa,IAAP,EACO,IAAP,EACK,IAAP,EACI,IAAP,EACY,IAAP,EACD,IAAP,EACS,IAAP,EACO,IAAP,EACO,IAAP,EACM,IAAP,EACc,IAAP,EACA,IAAP,EACQ,IAAP,EACY,IAAP,EACC,IAAP,EACQ,IAAP,EACI,IAAP,EACW,IAAP,EACM,IAAP,EACM,IAAP,EACQ,IAAP,EACO,IAAP,EACS,IAAP,EACQ,IAAP,EACU,IAAP,EACG,IAAP,EACQ,IAAP,EACS,IAAP,EACE,IAAP,EACQ,IAAP,EACM,IAAP,EACO,IAAP,EACQ,IAAP,EACM,IAAP,EACQ,IAAP,EACM,IAAP,EACO,IAAP,EACY,IAAP,EACE,IAAP,EACO,IAAP,EACS,IAAP,EACM,IAAP,EACS,IAAP,EACa,IAAP,EACA,IAAP,EACM,IAAP,EACM,IAAP,EACM,IAAP,EACW,IAAP,EACQ,IAAP,EACE,IAAP,EACO,IAAP,EACQ,IAAP,EACgB,IAAP,EACE,IAAP,EACG,IAAP,EACM,IAAP,EACQ,IAAP,EACM,IAAP,EACQ,IAAP,EACU,IAAP,EACK,IAAP,EACK,IAAP,EACa,IAAP,EAElB,IAAP,OCjXiB,EAAb,EACa,EAAmC,EAAyB,EAA5C,CAAP,EAAT,CAAb,E,IACa,CAAb,EACA,E,EAAO,EAAS,EAAT,C,EACmB,EAAf,GAAT,EACI,EAAK,GAAL,CAAJ,EAEM,EAAkB,EAAD,CAAjB,CAAJ,EAA0B,GAC1B,EAAU,E,CAAV,GACS,EAAK,GAAL,CAAJ,EACL,EAAU,E,CAAV,GAEK,EAAK,IAAL,CAAgB,IAAjB,GAA2B,EAAS,EAAT,CAAa,EAAb,E,GAA/B,EACsB,EAAf,GAA4B,IAA5B,CAAuC,IAAxC,CAAJ,EACE,EAAU,E,CAAV,EAAa,EAAU,E,CAAV,EACb,IAGJ,EAAU,E,CAAV,IAEF,EAAU,E,CAAV,E,KAEK,EAAP,ISvUA,EAAM,EAAN,CAAJ,EAES,EAAK,EAAL,CAAP,EAGO,GAAK,EAAL,CAAP,S,wZTtQI,EAA2B,EAA3B,CAAJ,EAAgE,E,WAAP,EACrD,EAA2B,EAA3B,G,GAAgC,EAA4B,EAA5B,EAApC,EAA0E,E,WAAP,E,AAClD,E,WAAA,EAAjB,EACI,E,AAAc,E,WAAA,EAAd,CAAJ,EAA2D,E,WAAP,E,AAEhC,E,WAAM,E,AAAG,E,WAAO,EAAG,EAA/B,EAAD,C,WAAP,M,gBAUkB,E,WAAM,E,WAAhB,EAAD,C,WAAP,O,gBF7FF,EAAgC,EAAhC,EACU,EAAV,EACW,EAAK,SAAhB,GAAmC,EAAO,E,CAAP,E,AAC/B,E,WAAW,EAAX,EAAJ,EACE,EAAgC,E,AAA4B,E,WAAA,EAAgB,EE6pBU,E,MF7pB/E,E,CAAP,GAES,EAAK,MAAhB,GAA6B,EAAO,E,CAAP,E,AACzB,E,WAAY,EAAZ,EAAJ,EACE,EAAgC,E,AAA6B,E,WAAA,EAAiB,EEypBQ,E,MFzpB/E,E,CAAP,GAEQ,E,SAAO,EAAjB,GACyB,EAAf,EAAV,EAAsC,EAAO,E,CAAP,EACtC,EACU,EAAa,EAAb,CAAR,EACY,E,GAAF,EAAO,EAAO,EAAa,EAAb,CAAP,CAAjB,GACa,EAAb,EACO,E,GAAa,EAAO,E,CAAP,EACZ,E,SAAO,EAAjB,GACqB,EAAf,EAAN,EAAoC,EAAO,E,CAAP,EACpC,EACU,EAAe,EAAf,CAAR,EACY,E,GAAF,EAAO,EAAO,EAAe,EAAf,CAAP,CAAjB,GACe,EAAf,EACO,E,GAAe,EAAO,E,CAAP,EACb,EAAK,GAAhB,GAAyB,EAAO,E,CAAP,EACzB,EAAoC,EAAM,EAAN,CAApC,EACS,EAAG,EAAQ,EAAG,E,EAAvB,CACU,GAAV,E,yFNoG0B,E,WAAA,EAAc,EAA/B,C,CAAP,EAAyC,I,aAE9B,E,WAAA,EAAX,EAGA,E,EAAO,EAAO,EAAP,G,AAAsB,E,WAAK,EAAO,EAAP,CAAL,EAAmB,EAA7B,E,KACjB,E,GAAA,E,KAGE,EAAS,EAAT,CAAJ,E,AACE,E,mBAAa,E,WAAb,E,AACA,E,WAAiB,EAAjB,G,AAEA,E,WAAa,E,WAAb,E,AACA,E,WAAiB,I,EAAO,EAAD,EAAQ,GAA/B,G,yNc5JqB,E,WAAP,EAAlB,EACI,EAAU,EAAgB,EAAhB,CAAV,CAAJ,EACM,EAAU,MAAkB,EAAlB,CAAV,CAAJ,EAAgE,I,YAChC,E,WAAlB,EAAd,EAGsB,E,EAAS,E,OAAb,CAA0B,EAA1B,CAAlB,EACI,EAAJ,EAAmC,EAAe,EAAf,C,EAAkB,M,OAAtB,C,EAAsC,E,OAA1C,CAAd,GACS,EAAS,EAAjB,EAAd,EAGI,EAAe,EAAf,CAAJ,CAGI,EAAW,EAAX,CAAJ,EACe,EAAO,EAApB,GACa,EAAO,EAApB,GACO,EAAO,EAA4B,EAA1C,GAES,EAAO,EAAlB,I,4BA2Ka,E,WAAA,EAAb,EACU,EAAS,EAAT,CAAV,EACe,EAAyB,EAAK,EAlMqC,EAkMlF,EACI,E,CAIO,E,WAAA,EAAkB,EAAiB,EAAjB,CAAlB,CAAkD,EADtD,G,AAGP,E,WAAe,EAAf,E,AACO,E,WAAP,O,gBN/HsB,E,WAAA,EAAe,EAAf,CAAtB,E,AACuB,E,WAAA,EAAgB,EAAhB,CAAvB,EACqB,EAAW,EAAX,CAArB,EACI,EAAW,EAAX,CAAJ,EAAyB,I,WAAP,E,EACiB,EAAS,EAAlC,E,KACE,EAAwB,EAAyB,EAA7D,IACY,EAAyB,EAAzB,CAAmC,EAA0B,EAAzE,I,AACO,E,WAAP,M,gBAXO,E,WAAY,E,WAAZ,E,WAAP,O,gBOkEQ,E,WAAA,EAAV,EAEe,E,EACA,E,EACA,E,EACf,YAAQ,E,IACD,E,KAIA,E,KAIA,E,KAIA,E,KASA,E,MArBG,AACiB,EAAf,GAAR,EACI,EAAS,GAAT,CAAJ,EAAmB,IAEb,AACiB,EAAf,GAAR,EACI,EAAS,GAAT,CAAJ,EAAmB,IAEb,AACiB,EAAf,GAAR,EACI,EAAS,GAAT,CAAJ,EAAmB,IAEb,AACqB,EAAf,GAAZ,EACI,EAAS,GAAT,CAAJ,EAAmB,GACN,EAAS,EAAU,EAAI,EAAJ,CAAV,CAAtB,GACa,EAAS,EAAtB,GACW,EAAS,EAAQ,EAAS,EAAT,CAAR,CAAqB,EAAS,EAAT,CAArB,CAAmC,EAAS,EAAT,CAAnC,CAApB,GACmB,EAAS,EAAS,EAAG,EAAU,EAAI,EAAJ,CAAV,CAA9B,EAAV,EACI,E,KAAJ,EAAuC,EAAd,E,qBAEnB,E,AAEkC,E,WP0eqB,EO1enD,EAAd,EACsB,EAAR,EAAd,EACgC,EAAyB,EAAK,EP0gB0B,E,MO1gBjF,EAAmE,EAAnE,C,CAAP,E,eACa,EAAS,EAAtB,GACa,EAAS,EAAtB,GACmB,EAAS,EAAS,EAAG,EAAU,EAAI,EAAJ,CAAV,CAA9B,EAAV,EACO,EAAP,EACI,E,KAAJ,EAAuC,EAAd,E,yCArEnB,E,CACU,E,AAA8B,E,WADzB,E,4BCnGN,EAAb,EACA,E,AAAa,E,WAAb,EACA,E,AAAa,I,WAAb,E,uCJuFI,E,CAEG,AAAI,E,CAGJ,AAAI,E,CAIJ,AAAI,E,CAGJ,AAAI,E,CAAwB,E,EACf,E,KC5CR,E,cAAA,EAAe,EAAf,CAAZ,EACI,EAAQ,EAAR,CAAJ,EACI,EAAY,K,EnB7BD,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBTA,GAGS,EAAb,EACA,EAAY,E,EnB5CG,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBoMA,EAAM,EAAN,CAAJ,EACI,EAAO,EAAS,EAAM,EAAN,CAAT,C,EACoB,EAA0B,EAA1B,CAAV,GAAb,EACU,EAAO,IAAP,CAAV,EACU,EAAQ,EAAR,CAAV,E,AAEY,I,cAA4B,E,MAApB,E,cAAR,E,cAAZ,E,AACY,I,cAA4B,E,MAApB,E,cAAR,E,cAAZ,EACI,EAAI,EAAJ,CAAJ,EACQ,EAAI,EAAJ,CAAJ,EACI,QAAQ,E,IACC,E,KAIA,G,MAJO,AACR,EAAY,K,EnBvPrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBiNoB,GAEa,AACb,EAAY,K,EnB3PrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBqNoB,GAEK,QACG,E,IACC,E,KAKA,G,MALO,AACR,EAAY,E,EnB3Q7B,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB2N4B,EAAY,K,EnBlQ7B,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB4N4B,GAEa,AACb,EAAY,E,EnBhR7B,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBgO4B,EAAY,K,EnBvQ7B,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBiO4B,GAEK,AACL,EAAY,E,EnB3Q7B,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBqO4B,KAMhB,QAAQ,E,IACC,E,KAIA,G,MAJO,AACR,EAAY,K,EnBpRrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB8OoB,GAEa,AACb,EAAY,K,EnBxRrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBkPoB,GAEK,AACL,EAAY,E,EnBtSrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBsPoB,KAKR,EAAI,EAAJ,CAAJ,EACI,cAAQ,E,IACC,E,KAIA,E,KAIA,E,KAIA,E,KAIA,E,MAhBW,AACZ,EAAY,K,EnBrSrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB+PoB,GAEM,AACN,EAAY,K,EnBzSrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBmQoB,GAEW,AACX,EAAY,K,EnB7SrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBuQoB,GAEY,AACZ,EAAY,K,EnBjTrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB2QoB,GAEkB,AAClB,EAAY,K,EnBrTrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB+QoB,GAEK,AAGL,EAAY,S,GnBjTrB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAmBY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBqRoB,EAAsB,EAAT,EAAe,EAAf,CAAqB,EAAtB,C,EnB5TrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBsRoB,IAMR,EAAY,S,GnBzTb,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAmBY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB6RY,EAAa,EAAQ,E,EIE1B,EAAO,EAAP,CAAb,EACY,EAAM,EAAN,CAAZ,EACI,EAAM,EAAN,CAAJ,EACM,EAAO,EAAP,CAAJ,EACW,EAAK,EAAL,CAAa,EAAd,CAAoB,EAAK,EAAL,CAArB,CAAP,GAES,EAAK,EAAL,CAAa,EAAd,CAAoB,GAAK,EAAL,CAArB,CAAP,KAGE,EAAO,EAAP,CAAJ,EACW,GAAK,EAAL,CAAa,EAAd,CAAoB,EAAK,EAAL,CAArB,CAAP,GAES,GAAK,EAAL,CAAa,EAAd,CAAoB,GAAK,EAAL,CAArB,CAAP,OJdyC,EAAd,CAAoB,EAArB,C,EnBpUb,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,KmBqMyB,EAAU,E,CAAV,E,IA2IrB,EAAS,EAAT,CAAJ,EACwB,EAA0B,EAA1B,CAAgC,EAAhC,CAAV,GAAV,EACI,EAAI,EAAJ,CAAJ,EACQ,EAAM,EAAN,CAAJ,EACgB,K,EnB3Xb,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBqVmB,EAAM,GAAN,CAAJ,EACS,K,EnB7Xb,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBwVwB,KAAU,EAAV,C,EnB/Xb,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,KmB2VY,EAAI,EAAJ,CAAJ,EACI,cAAQ,E,IACC,E,KAKA,E,KAKA,E,KAKA,E,KAKA,E,MApBW,AACZ,EAAY,K,EnBrYrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB+VoB,EAAY,E,EnBhZrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBgWoB,GAEM,AACN,EAAY,K,EnB1YrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBoWoB,EAAY,E,EnBrZrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBqWoB,GAEW,AACX,EAAY,K,EnB/YrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmByWoB,EAAY,E,EnB1ZrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB0WoB,GAEY,AACZ,EAAY,K,EnBpZrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB8WoB,EAAY,E,EnB/ZrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB+WoB,GAEkB,AAClB,EAAY,K,EnBzZrB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBmXoB,EAAY,E,EnBparB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBoXoB,GAEK,AAGL,EAAY,S,GnBtZrB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAmBY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB0XoB,EAAsB,EAAT,EAAe,EAAf,CAAqB,EAAtB,C,EnBjarB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB2XoB,EAAY,E,EnB5arB,EAAS,EAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmB4XoB,IAMR,EAAY,S,GnB/Zb,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAmBY,EAAU,EAAV,CAAZ,EACA,EAAa,E,CAAb,EAEI,EACA,EAFQ,EAAZ,EAIY,EAAK,EAAO,EAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,E,EAAX,GmBmYY,EAAa,EAAQ,E,EIpG1B,EAAO,EAAP,CAAb,EACY,EAAM,EAAN,CAAZ,GACI,GAAM,EAAN,CAAJ,EACM,EAAO,EAAP,CAAJ,EACW,EAAK,GAAL,CAAa,EAAd,CAAoB,EAAK,EAAL,CAArB,CAAP,GAES,EAAK,GAAL,CAAa,EAAd,CAAoB,GAAK,EAAL,CAArB,CAAP,KAGE,EAAO,EAAP,CAAJ,EACW,GAAK,GAAL,CAAa,EAAd,CAAoB,EAAK,EAAL,CAArB,CAAP,GAES,GAAK,GAAL,CAAa,EAAd,CAAoB,GAAK,EAAL,CAArB,CAAP,OJwFyC,EAAd,CAAoB,EAArB,C,GnB1ab,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBoYY,EAAY,E,GnBrbb,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,OmByYoB,EAA0B,EAA1B,CAAgC,EAAhC,CAAV,GAAV,GACI,GAAI,EAAJ,CAAJ,EACQ,GAAM,EAAN,CAAJ,EACgB,K,GnBnbT,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmB6Ye,GAAM,GAAN,CAAJ,EACS,K,GnBrbT,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBgZoB,KAAU,GAAV,C,GnBvbT,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,KmBmZQ,GAAI,EAAJ,CAAJ,EACI,cAAQ,G,MACC,E,MAKA,E,MAKA,E,MAKA,E,MAKA,E,MApBW,AACZ,EAAY,K,GnB7bjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBuZgB,EAAY,E,GnBxcjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBwZgB,GAEM,AACN,EAAY,K,GnBlcjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmB4ZgB,EAAY,E,GnB7cjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmB6ZgB,GAEW,AACX,EAAY,K,GnBvcjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBiagB,EAAY,E,GnBldjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBkagB,GAEY,AACZ,EAAY,K,GnB5cjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBsagB,EAAY,E,GnBvdjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBuagB,GAEkB,AAClB,EAAY,K,GnBjdjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmB2agB,EAAY,E,GnB5djB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmB4agB,GAEK,AAGL,EAAY,S,GnB9cjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAmBY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBkbgB,EAAsB,GAAT,EAAe,EAAf,CAAqB,EAAtB,C,GnBzdjB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBmbgB,EAAY,E,GnBpejB,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmBobgB,IAMR,EAAY,S,GnBvdT,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAmBY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmB2bQ,EAAa,EAAQ,G,GI5JtB,GAAO,EAAP,CAAb,GACY,GAAM,EAAN,CAAZ,GACI,GAAM,EAAN,CAAJ,EACM,GAAO,EAAP,CAAJ,EACW,EAAK,GAAL,CAAa,EAAd,CAAoB,EAAK,GAAL,CAArB,CAAP,GAES,EAAK,GAAL,CAAa,EAAd,CAAoB,GAAK,GAAL,CAArB,CAAP,KAGE,GAAO,EAAP,CAAJ,EACW,GAAK,GAAL,CAAa,EAAd,CAAoB,EAAK,GAAL,CAArB,CAAP,GAES,GAAK,GAAL,CAAa,EAAd,CAAoB,GAAK,GAAL,CAArB,CAAP,OJgJqC,EAAd,CAAoB,EAArB,C,GnBleT,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EA6BY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,GmB4bQ,EAAY,E,GnB7eT,EAAS,GAApB,GACA,EAAW,E,CAAX,EACI,IAAa,EAAb,CAAJ,EAuCY,EAAU,EAAV,CAAZ,GACA,EAAa,G,CAAb,EAEI,GACA,EAFQ,EAAZ,GAIY,GAAK,EAAO,GAAxB,IACA,EA4CU,EAAV,G,AA3CA,E,cAAW,G,EAAX,O,4BoBNG,E,WAAA,E,WAAP,M,gBAyCe,E,WAAA,EAAkB,EAAgB,EAAhB,CAAlB,CAAR,G,WAAP,O,wNAsYI,EAAJ,C,AAS0B,E,WAAlB,EAAgC,EAAxC,E,4BN7fa,EAAO,EAAP,CAAb,E,EACmC,EAAK,EAAL,CAAkB,EAA3C,E,KACC,EAAwB,EAAnC,GACI,EAAJ,EAAuB,EAAwB,EAAnC,I,AACL,E,WAAP","sourceRoot":"./test","sourcesContent":["// Alignment guarantees\n\n// @ts-ignore: decorator\n@inline export const AL_BITS: u32 = 4; // 16 bytes to fit up to v128\n// @ts-ignore: decorator\n@inline export const AL_SIZE: usize = 1 << AL_BITS;\n// @ts-ignore: decorator\n@inline export const AL_MASK: usize = AL_SIZE - 1;\n\n// Extra debugging\n\n// @ts-ignore: decorator\n@inline export const DEBUG = true;\n// @ts-ignore: decorator\n@inline export const TRACE = false;\n// @ts-ignore: decorator\n@inline export const RTRACE = isDefined(ASC_RTRACE);\n// @ts-ignore: decorator\n@inline export const PROFILE = isDefined(ASC_PROFILE);\n\n// Memory manager\n\n// ╒════════════ Memory manager block layout (32-bit) ═════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ MM info │ -4\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n@unmanaged export class BLOCK {\n /** Memory manager info. */\n mmInfo: usize;\n}\n\n/** Overhead of a memory manager block. */\n// @ts-ignore: decorator\n@inline export const BLOCK_OVERHEAD: usize = offsetof();\n\n/** Maximum size of a memory manager block's payload. */\n// @ts-ignore: decorator\n@inline export const BLOCK_MAXSIZE: usize = (1 << 30) - BLOCK_OVERHEAD;\n\n// Garbage collector\n\n// ╒══════════ Garbage collector object layout (32-bit) ═══════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │ -20\n// ╞═══════════════════════════════════════════════════════════════╡\n// │ GC info │ -16\n// ├───────────────────────────────────────────────────────────────┤\n// │ GC info │ -12\n// ├───────────────────────────────────────────────────────────────┤\n// │ RT id │ -8\n// ├───────────────────────────────────────────────────────────────┤\n// │ RT size │ -4\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n@unmanaged export class OBJECT extends BLOCK {\n /** Garbage collector info. */\n gcInfo: u32;\n /** Garbage collector info. */\n gcInfo2: u32;\n /** Runtime class id. */\n rtId: u32;\n /** Runtime object size. */\n rtSize: u32;\n}\n\n/** Overhead of a garbage collector object. Excludes memory manager block overhead. */\n// @ts-ignore: decorator\n@inline export const OBJECT_OVERHEAD: usize = (offsetof() - BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK;\n\n/** Maximum size of a garbage collector object's payload. */\n// @ts-ignore: decorator\n@inline export const OBJECT_MAXSIZE: usize = BLOCK_MAXSIZE - OBJECT_OVERHEAD;\n\n/** Total of memory manager and garbage collector overhead. */\n// @ts-ignore: decorator\n@inline export const TOTAL_OVERHEAD: usize = BLOCK_OVERHEAD + OBJECT_OVERHEAD;\n","import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, BLOCK, BLOCK_OVERHEAD, BLOCK_MAXSIZE } from \"./common\";\nimport { oninit, onalloc, onresize, onmove, onfree } from \"./rtrace\";\nimport { E_ALLOCATION_TOO_LARGE } from \"../util/error\";\n\n// === The TLSF (Two-Level Segregate Fit) memory allocator ===\n// see: http://www.gii.upv.es/tlsf/\n\n// - `ffs(x)` is equivalent to `ctz(x)` with x != 0\n// - `fls(x)` is equivalent to `sizeof(x) * 8 - clz(x) - 1`\n\n// ╒══════════════ Block size interpretation (32-bit) ═════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─╫─┴─┴─┴─┤\n// │ | FL │ SB = SL + AL │ ◄─ usize\n// └───────────────────────────────────────────────┴───────╨───────┘\n// FL: first level, SL: second level, AL: alignment, SB: small block\n\n// @ts-ignore: decorator\n@inline const SL_BITS: u32 = 4;\n// @ts-ignore: decorator\n@inline const SL_SIZE: u32 = 1 << SL_BITS;\n\n// @ts-ignore: decorator\n@inline const SB_BITS: u32 = SL_BITS + AL_BITS;\n// @ts-ignore: decorator\n@inline const SB_SIZE: u32 = 1 << SB_BITS;\n\n// @ts-ignore: decorator\n@inline const FL_BITS: u32 = 31 - SB_BITS;\n\n// [00]: < 256B (SB) [12]: < 1M\n// [01]: < 512B [13]: < 2M\n// [02]: < 1K [14]: < 4M\n// [03]: < 2K [15]: < 8M\n// [04]: < 4K [16]: < 16M\n// [05]: < 8K [17]: < 32M\n// [06]: < 16K [18]: < 64M\n// [07]: < 32K [19]: < 128M\n// [08]: < 64K [20]: < 256M\n// [09]: < 128K [21]: < 512M\n// [10]: < 256K [22]: <= 1G - OVERHEAD\n// [11]: < 512K\n// VMs limit to 2GB total (currently), making one 1G block max (or three 512M etc.) due to block overhead\n\n// Tags stored in otherwise unused alignment bits\n\n// @ts-ignore: decorator\n@inline const FREE: usize = 1 << 0;\n// @ts-ignore: decorator\n@inline const LEFTFREE: usize = 1 << 1;\n// @ts-ignore: decorator\n@inline const TAGS_MASK: usize = FREE | LEFTFREE; // <= AL_MASK\n\n// ╒════════════════════ Block layout (32-bit) ════════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┼─┤ ┐\n// │ size │L│F│ ◄─┐ info overhead\n// ╞>ptr═══════════════════════════════════════════════════════╧═╧═╡ │ ┘\n// │ if free: ◄ prev │ ◄─┤ usize\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ if free: next ► │ ◄─┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ ... │ │ >= 0\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ if free: back ▲ │ ◄─┘\n// └───────────────────────────────────────────────────────────────┘ >= MIN SIZE\n// F: FREE, L: LEFTFREE\n@unmanaged export class Block extends BLOCK {\n\n /** Previous free block, if any. Only valid if free, otherwise part of payload. */\n prev: Block | null;\n /** Next free block, if any. Only valid if free, otherwise part of payload. */\n next: Block | null;\n\n // If the block is free, there is a 'back'reference at its end pointing at its start.\n}\n\n// Block constants. A block must have a minimum size of three pointers so it can hold `prev`,\n// `next` and `back` if free.\n\n// @ts-ignore: decorator\n@inline const BLOCK_MINSIZE: usize = ((3 * sizeof() + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD; // prev + next + back\n// @ts-ignore: decorator\n// @inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive, lives in common.ts\n\n/** Gets the left block of a block. Only valid if the left block is free. */\n// @ts-ignore: decorator\n@inline function GETFREELEFT(block: Block): Block {\n return load(changetype(block) - sizeof());\n}\n\n/** Gets the right block of a block by advancing to the right by its size. */\n// @ts-ignore: decorator\n@inline function GETRIGHT(block: Block): Block {\n return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK));\n}\n\n// ╒═════════════════════ Root layout (32-bit) ════════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐\n// │ 0 | flMap S│ ◄────┐\n// ╞═══════════════════════════════════════════════════════════════╡ │\n// │ slMap[0] S │ ◄─┐ │\n// ├───────────────────────────────────────────────────────────────┤ │ │\n// │ slMap[1] │ ◄─┤ │\n// ├───────────────────────────────────────────────────────────────┤ u32 │\n// │ slMap[22] │ ◄─┘ │\n// ╞═══════════════════════════════════════════════════════════════╡ usize\n// │ head[0] │ ◄────┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ ... │ ◄────┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ head[367] │ ◄────┤\n// ╞═══════════════════════════════════════════════════════════════╡ │\n// │ tail │ ◄────┘\n// └───────────────────────────────────────────────────────────────┘ SIZE ┘\n// S: Small blocks map\n@unmanaged class Root {\n /** First level bitmap. */\n flMap: usize;\n}\n\n// Root constants. Where stuff is stored inside of the root structure.\n\n// @ts-ignore: decorator\n@inline const SL_START: usize = sizeof();\n// @ts-ignore: decorator\n@inline const SL_END: usize = SL_START + (FL_BITS << alignof());\n// @ts-ignore: decorator\n@inline const HL_START: usize = (SL_END + AL_MASK) & ~AL_MASK;\n// @ts-ignore: decorator\n@inline const HL_END: usize = HL_START + FL_BITS * SL_SIZE * sizeof();\n// @ts-ignore: decorator\n@inline const ROOT_SIZE: usize = HL_END + sizeof();\n\n// @ts-ignore: decorator\n@lazy export let ROOT: Root = changetype(0); // unsafe initializion below\n\n/** Gets the second level map of the specified first level. */\n// @ts-ignore: decorator\n@inline function GETSL(root: Root, fl: usize): u32 {\n return load(\n changetype(root) + (fl << alignof()),\n SL_START\n );\n}\n\n/** Sets the second level map of the specified first level. */\n// @ts-ignore: decorator\n@inline function SETSL(root: Root, fl: usize, slMap: u32): void {\n store(\n changetype(root) + (fl << alignof()),\n slMap,\n SL_START\n );\n}\n\n/** Gets the head of the free list for the specified combination of first and second level. */\n// @ts-ignore: decorator\n@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null {\n return load(\n changetype(root) + (((fl << SL_BITS) + sl) << alignof()),\n HL_START\n );\n}\n\n/** Sets the head of the free list for the specified combination of first and second level. */\n// @ts-ignore: decorator\n@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void {\n store(\n changetype(root) + (((fl << SL_BITS) + sl) << alignof()),\n head,\n HL_START\n );\n}\n\n/** Gets the tail block.. */\n// @ts-ignore: decorator\n@inline function GETTAIL(root: Root): Block {\n return load(\n changetype(root),\n HL_END\n );\n}\n\n/** Sets the tail block. */\n// @ts-ignore: decorator\n@inline function SETTAIL(root: Root, tail: Block): void {\n store(\n changetype(root),\n tail,\n HL_END\n );\n}\n\n/** Inserts a previously used block back into the free list. */\nfunction insertBlock(root: Root, block: Block): void {\n if (DEBUG) assert(block); // cannot be null\n let blockInfo = block.mmInfo;\n if (DEBUG) assert(blockInfo & FREE); // must be free\n\n let right = GETRIGHT(block);\n let rightInfo = right.mmInfo;\n\n // merge with right block if also free\n if (rightInfo & FREE) {\n removeBlock(root, right);\n block.mmInfo = blockInfo = blockInfo + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); // keep block tags\n right = GETRIGHT(block);\n rightInfo = right.mmInfo;\n // 'back' is set below\n }\n\n // merge with left block if also free\n if (blockInfo & LEFTFREE) {\n let left = GETFREELEFT(block);\n let leftInfo = left.mmInfo;\n if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags\n removeBlock(root, left);\n block = left;\n block.mmInfo = blockInfo = leftInfo + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); // keep left tags\n // 'back' is set below\n }\n\n right.mmInfo = rightInfo | LEFTFREE;\n // reference to right is no longer used now, hence rightInfo is not synced\n\n // we now know the size of the block\n let size = blockInfo & ~TAGS_MASK;\n if (DEBUG) assert(size >= BLOCK_MINSIZE); // must be a valid size\n if (DEBUG) assert(changetype(block) + BLOCK_OVERHEAD + size == changetype(right)); // must match\n\n // set 'back' to itself at the end of block\n store(changetype(right) - sizeof(), block);\n\n // mapping_insert\n let fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const inv: usize = sizeof() * 8 - 1;\n let boundedSize = min(size, BLOCK_MAXSIZE);\n fl = inv - clz(boundedSize);\n sl = ((boundedSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // perform insertion\n let head = GETHEAD(root, fl, sl);\n block.prev = null;\n block.next = head;\n if (head) head.prev = block;\n SETHEAD(root, fl, sl, block);\n\n // update first and second level maps\n root.flMap |= (1 << fl);\n SETSL(root, fl, GETSL(root, fl) | (1 << sl));\n}\n\n/** Removes a free block from internal lists. */\nfunction removeBlock(root: Root, block: Block): void {\n let blockInfo = block.mmInfo;\n if (DEBUG) assert(blockInfo & FREE); // must be free\n let size = blockInfo & ~TAGS_MASK;\n if (DEBUG) assert(size >= BLOCK_MINSIZE); // must be valid\n\n // mapping_insert\n let fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const inv: usize = sizeof() * 8 - 1;\n let boundedSize = min(size, BLOCK_MAXSIZE);\n fl = inv - clz(boundedSize);\n sl = ((boundedSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // link previous and next free block\n let prev = block.prev;\n let next = block.next;\n if (prev) prev.next = next;\n if (next) next.prev = prev;\n\n // update head if we are removing it\n if (block == GETHEAD(root, fl, sl)) {\n SETHEAD(root, fl, sl, next);\n\n // clear second level map if head is empty now\n if (!next) {\n let slMap = GETSL(root, fl);\n SETSL(root, fl, slMap &= ~(1 << sl));\n\n // clear first level map if second level is empty now\n if (!slMap) root.flMap &= ~(1 << fl);\n }\n }\n // note: does not alter left/back because it is likely that splitting\n // is performed afterwards, invalidating those changes. so, the caller\n // must perform those updates.\n}\n\nfunction roundSize(size: usize): usize {\n const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl\n const inv: usize = sizeof() * 8 - 1;\n const invRound = inv - SL_BITS;\n return size < halfMaxSize\n ? size + (1 << (invRound - clz(size))) - 1\n : size;\n}\n\n/** Searches for a free block of at least the specified size. */\nfunction searchBlock(root: Root, size: usize): Block | null {\n // size was already asserted by caller\n\n // mapping_search\n let fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const requestSize = roundSize(size);\n fl = sizeof() * 8 - 1 - clz(requestSize);\n sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // search second level\n let slMap = GETSL(root, fl) & (~0 << sl);\n let head: Block | null = null;\n if (!slMap) {\n // search next larger first level\n let flMap = root.flMap & (~0 << (fl + 1));\n if (!flMap) {\n head = null;\n } else {\n fl = ctz(flMap);\n slMap = GETSL(root, fl);\n if (DEBUG) assert(slMap); // can't be zero if fl points here\n head = GETHEAD(root, fl, ctz(slMap));\n }\n } else {\n head = GETHEAD(root, fl, ctz(slMap));\n }\n return head;\n}\n\n/** Prepares the specified block before (re-)use, possibly splitting it. */\nfunction prepareBlock(root: Root, block: Block, size: usize): void {\n // size was already asserted by caller\n\n let blockInfo = block.mmInfo;\n if (DEBUG) assert(!((size + BLOCK_OVERHEAD) & AL_MASK)); // size must be aligned so the new block is\n\n // split if the block can hold another MINSIZE block incl. overhead\n let remaining = (blockInfo & ~TAGS_MASK) - size;\n if (remaining >= BLOCK_OVERHEAD + BLOCK_MINSIZE) {\n block.mmInfo = size | (blockInfo & LEFTFREE); // also discards FREE\n\n let spare = changetype(changetype(block) + BLOCK_OVERHEAD + size);\n spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFTFREE\n insertBlock(root, spare); // also sets 'back'\n\n // otherwise tag block as no longer FREE and right as no longer LEFTFREE\n } else {\n block.mmInfo = blockInfo & ~FREE;\n GETRIGHT(block).mmInfo &= ~LEFTFREE;\n }\n}\n\n/** Adds more memory to the pool. */\nfunction addMemory(root: Root, start: usize, endU64: u64): bool {\n let end = endU64;\n if (DEBUG) assert(start <= endU64); // must be valid\n start = ((start + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n end &= ~AL_MASK;\n\n let tail = GETTAIL(root);\n let tailInfo: usize = 0;\n if (tail) { // more memory\n if (DEBUG) assert(start >= changetype(tail) + BLOCK_OVERHEAD);\n\n // merge with current tail if adjacent\n const offsetToTail = AL_SIZE;\n if (start - offsetToTail == changetype(tail)) {\n start -= offsetToTail;\n tailInfo = tail.mmInfo;\n } else {\n // We don't do this, but a user might `memory.grow` manually\n // leading to non-adjacent pages managed by TLSF.\n }\n\n } else if (DEBUG) { // first memory\n assert(start >= changetype(root) + ROOT_SIZE); // starts after root\n }\n\n // check if size is large enough for a free block and the tail block\n let size = end - start;\n if (size < BLOCK_OVERHEAD + BLOCK_MINSIZE + BLOCK_OVERHEAD) {\n return false;\n }\n\n // left size is total minus its own and the zero-length tail's header\n let leftSize = size - 2 * BLOCK_OVERHEAD;\n let left = changetype(start);\n left.mmInfo = leftSize | FREE | (tailInfo & LEFTFREE);\n left.prev = null;\n left.next = null;\n\n // tail is a zero-length used block\n tail = changetype(start + BLOCK_OVERHEAD + leftSize);\n tail.mmInfo = 0 | LEFTFREE;\n SETTAIL(root, tail);\n\n insertBlock(root, left); // also merges with free left before tail / sets 'back'\n\n return true;\n}\n\n/** Grows memory to fit at least another block of the specified size. */\nfunction growMemory(root: Root, size: usize): void {\n if (ASC_LOW_MEMORY_LIMIT) {\n unreachable();\n return;\n }\n // Here, both rounding performed in searchBlock ...\n if (size >= SB_SIZE) {\n size = roundSize(size);\n }\n // and additional BLOCK_OVERHEAD must be taken into account. If we are going\n // to merge with the tail block, that's one time, otherwise it's two times.\n let pagesBefore = memory.size();\n size += BLOCK_OVERHEAD << usize((pagesBefore << 16) - BLOCK_OVERHEAD != changetype(GETTAIL(root)));\n let pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16);\n let pagesWanted = max(pagesBefore, pagesNeeded); // double memory\n if (memory.grow(pagesWanted) < 0) {\n if (memory.grow(pagesNeeded) < 0) unreachable();\n }\n let pagesAfter = memory.size();\n addMemory(root, pagesBefore << 16, pagesAfter << 16);\n}\n\n/** Computes the size (excl. header) of a block. */\nfunction computeSize(size: usize): usize {\n // Size must be large enough and aligned minus preceeding overhead\n return size <= BLOCK_MINSIZE\n ? BLOCK_MINSIZE\n : ((size + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n}\n\n/** Prepares and checks an allocation size. */\nfunction prepareSize(size: usize): usize {\n if (size > BLOCK_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n return computeSize(size);\n}\n\n/** Initializes the root structure. */\nfunction initialize(): void {\n if (isDefined(ASC_RTRACE)) oninit(__heap_base);\n let rootOffset = (__heap_base + AL_MASK) & ~AL_MASK;\n let pagesBefore = memory.size();\n let pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16);\n if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable();\n let root = changetype(rootOffset);\n root.flMap = 0;\n SETTAIL(root, changetype(0));\n for (let fl: usize = 0; fl < FL_BITS; ++fl) {\n SETSL(root, fl, 0);\n for (let sl: u32 = 0; sl < SL_SIZE; ++sl) {\n SETHEAD(root, fl, sl, null);\n }\n }\n let memStart = rootOffset + ROOT_SIZE;\n if (ASC_LOW_MEMORY_LIMIT) {\n const memEnd = ASC_LOW_MEMORY_LIMIT & ~AL_MASK;\n if (memStart <= memEnd) addMemory(root, memStart, memEnd);\n else unreachable(); // low memory limit already exceeded\n } else {\n addMemory(root, memStart, memory.size() << 16);\n }\n ROOT = root;\n}\n\n/** Allocates a block of the specified size. */\nexport function allocateBlock(root: Root, size: usize): Block {\n let payloadSize = prepareSize(size);\n let block = searchBlock(root, payloadSize);\n if (!block) {\n growMemory(root, payloadSize);\n block = changetype(searchBlock(root, payloadSize));\n if (DEBUG) assert(block); // must be found now\n }\n if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= payloadSize); // must fit\n removeBlock(root, block);\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) onalloc(block);\n return block;\n}\n\n/** Reallocates a block to the specified size. */\nexport function reallocateBlock(root: Root, block: Block, size: usize): Block {\n let payloadSize = prepareSize(size);\n let blockInfo = block.mmInfo;\n let blockSize = blockInfo & ~TAGS_MASK;\n\n // possibly split and update runtime size if it still fits\n if (payloadSize <= blockSize) {\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) {\n if (payloadSize != blockSize) onresize(block, BLOCK_OVERHEAD + blockSize);\n }\n return block;\n }\n\n // merge with right free block if merger is large enough\n let right = GETRIGHT(block);\n let rightInfo = right.mmInfo;\n if (rightInfo & FREE) {\n let mergeSize = blockSize + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK);\n if (mergeSize >= payloadSize) {\n removeBlock(root, right);\n block.mmInfo = (blockInfo & TAGS_MASK) | mergeSize;\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) onresize(block, BLOCK_OVERHEAD + blockSize);\n return block;\n }\n }\n\n // otherwise move the block\n return moveBlock(root, block, size);\n}\n\n/** Moves a block to a new one of the specified size. */\nfunction moveBlock(root: Root, block: Block, newSize: usize): Block {\n let newBlock = allocateBlock(root, newSize);\n memory.copy(changetype(newBlock) + BLOCK_OVERHEAD, changetype(block) + BLOCK_OVERHEAD, block.mmInfo & ~TAGS_MASK);\n if (changetype(block) >= __heap_base) {\n if (isDefined(ASC_RTRACE)) onmove(block, newBlock);\n freeBlock(root, block);\n }\n return newBlock;\n}\n\n/** Frees a block. */\nexport function freeBlock(root: Root, block: Block): void {\n if (isDefined(ASC_RTRACE)) onfree(block);\n block.mmInfo = block.mmInfo | FREE;\n insertBlock(root, block);\n}\n\n/** Checks that a used block is valid to be freed or reallocated. */\nfunction checkUsedBlock(ptr: usize): Block {\n let block = changetype(ptr - BLOCK_OVERHEAD);\n assert(\n ptr != 0 && !(ptr & AL_MASK) && // must exist and be aligned\n !(block.mmInfo & FREE) // must be used\n );\n return block;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __alloc(size: usize): usize {\n if (!ROOT) initialize();\n return changetype(allocateBlock(ROOT, size)) + BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __realloc(ptr: usize, size: usize): usize {\n if (!ROOT) initialize();\n return (ptr < __heap_base\n ? changetype(moveBlock(ROOT, checkUsedBlock(ptr), size))\n : changetype(reallocateBlock(ROOT, checkUsedBlock(ptr), size))\n ) + BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __free(ptr: usize): void {\n if (ptr < __heap_base) return;\n if (!ROOT) initialize();\n freeBlock(ROOT, checkUsedBlock(ptr));\n}\n","// This file is shared with the compiler and must remain portable\n\n// ╒═══════════════════ Typeinfo interpretation ═══════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ◄─ __rtti_base\n// │ count │\n// ╞═══════════════════════════════════════════════════════════════╡ ┐\n// │ Typeinfo#flags [id=0] │ id < count\n// ├───────────────────────────────────────────────────────────────┤\n// │ ... │\n\n/** Runtime type information data structure. */\n@unmanaged\nexport class Typeinfo {\n /** Flags describing the shape of this class type. */\n flags: TypeinfoFlags = TypeinfoFlags.NONE;\n}\n\n/** Runtime type information flags. */\nexport const enum TypeinfoFlags {\n /** No specific flags. */\n NONE = 0,\n /** Type is an `ArrayBufferView`. */\n ARRAYBUFFERVIEW = 1 << 0,\n /** Type is an `Array`. */\n ARRAY = 1 << 1,\n /** Type is a `StaticArray`. */\n STATICARRAY = 1 << 2,\n /** Type is a `Set`. */\n SET = 1 << 3,\n /** Type is a `Map`. */\n MAP = 1 << 4,\n /** Type has no outgoing pointers. */\n POINTERFREE = 1 << 5,\n /** Value alignment of 1 byte. */\n VALUE_ALIGN_0 = 1 << 6,\n /** Value alignment of 2 bytes. */\n VALUE_ALIGN_1 = 1 << 7,\n /** Value alignment of 4 bytes. */\n VALUE_ALIGN_2 = 1 << 8,\n /** Value alignment of 8 bytes. */\n VALUE_ALIGN_3 = 1 << 9,\n /** Value alignment of 16 bytes. */\n VALUE_ALIGN_4 = 1 << 10,\n /** Value is a signed type. */\n VALUE_SIGNED = 1 << 11,\n /** Value is a float type. */\n VALUE_FLOAT = 1 << 12,\n /** Value type is nullable. */\n VALUE_NULLABLE = 1 << 13,\n /** Value type is managed. */\n VALUE_MANAGED = 1 << 14,\n /** Key alignment of 1 byte. */\n KEY_ALIGN_0 = 1 << 15,\n /** Key alignment of 2 bytes. */\n KEY_ALIGN_1 = 1 << 16,\n /** Key alignment of 4 bytes. */\n KEY_ALIGN_2 = 1 << 17,\n /** Key alignment of 8 bytes. */\n KEY_ALIGN_3 = 1 << 18,\n /** Key alignment of 16 bytes. */\n KEY_ALIGN_4 = 1 << 19,\n /** Key is a signed type. */\n KEY_SIGNED = 1 << 20,\n /** Key is a float type. */\n KEY_FLOAT = 1 << 21,\n /** Key type is nullable. */\n KEY_NULLABLE = 1 << 22,\n /** Key type is managed. */\n KEY_MANAGED = 1 << 23\n}\n","import { BLOCK, BLOCK_OVERHEAD, OBJECT_OVERHEAD, OBJECT_MAXSIZE, TOTAL_OVERHEAD, DEBUG, TRACE, RTRACE, PROFILE } from \"./common\";\nimport { onvisit, oncollect, oninterrupt, onyield } from \"./rtrace\";\nimport { TypeinfoFlags } from \"../shared/typeinfo\";\nimport { E_ALLOCATION_TOO_LARGE, E_ALREADY_PINNED, E_NOT_PINNED } from \"../util/error\";\n\n// === ITCMS: An incremental Tri-Color Mark & Sweep garbage collector ===\n// Adapted from Bach Le's μgc, see: https://github.com/bullno1/ugc\n\n// ╒═════════════╤══════════════ Colors ═══════════════════════════╕\n// │ Color │ Meaning │\n// ├─────────────┼─────────────────────────────────────────────────┤\n// │ WHITE* │ Unprocessed │\n// │ BLACK* │ Processed │\n// │ GRAY │ Processed with unprocessed children │\n// │ TRANSPARENT │ Manually pinned (always reachable) │\n// └─────────────┴─────────────────────────────────────────────────┘\n// * flipped between cycles\n\n// @ts-ignore: decorator\n@lazy let white = 0;\n// @ts-ignore: decorator\n@inline const gray = 2;\n// @ts-ignore: decorator\n@inline const transparent = 3;\n// @ts-ignore: decorator\n@inline const COLOR_MASK = 3;\n\n/** Size in memory of all objects currently managed by the GC. */\n// @ts-ignore: decorator\n@lazy let total: usize = 0;\n\n/** Currently transitioning from SWEEP to MARK state. */\n// @ts-ignore: decorator\n@inline const STATE_IDLE = 0;\n/** Currently marking reachable objects. */\n// @ts-ignore: decorator\n@inline const STATE_MARK = 1;\n/** Currently sweeping unreachable objects. */\n// @ts-ignore: decorator\n@inline const STATE_SWEEP = 2;\n/** Current collector state. */\n// @ts-ignore: decorator\n@lazy let state = STATE_IDLE;\n\n// @ts-ignore: decorator\n@lazy let fromSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy let toSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy let pinSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy let iter: Object = changetype(0); // unsafe initializion below\n\nfunction initLazy(space: Object): Object {\n space.nextWithColor = changetype(space);\n space.prev = space;\n return space;\n}\n\n/** Visit cookie indicating scanning of an object. */\n// @ts-ignore: decorator\n@inline const VISIT_SCAN = 0;\n\n// ╒═══════════════ Managed object layout (32-bit) ════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │\n// ╞═══════════════════════════════════════════════════════════╤═══╡\n// │ next │ C │ = nextWithColor\n// ├───────────────────────────────────────────────────────────┴───┤\n// │ prev │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtId │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtSize │\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n// C: color\n\n/** Represents a managed object in memory, consisting of a header followed by the object's data. */\n@unmanaged class Object extends BLOCK {\n /** Pointer to the next object with color flags stored in the alignment bits. */\n nextWithColor: usize; // *u32\n /** Pointer to the previous object. */\n prev: Object; // *u32\n /** Runtime id. */\n rtId: u32;\n /** Runtime size. */\n rtSize: u32;\n\n /** Gets the pointer to the next object. */\n get next(): Object {\n return changetype(this.nextWithColor & ~COLOR_MASK);\n }\n\n /** Sets the pointer to the next object. */\n set next(obj: Object) {\n this.nextWithColor = changetype(obj) | (this.nextWithColor & COLOR_MASK);\n }\n\n /** Gets this object's color. */\n get color(): i32 {\n return i32(this.nextWithColor & COLOR_MASK);\n }\n\n /** Sets this object's color. */\n set color(color: i32) {\n this.nextWithColor = (this.nextWithColor & ~COLOR_MASK) | color;\n }\n\n /** Gets the size of this object in memory. */\n get size(): usize {\n return BLOCK_OVERHEAD + (this.mmInfo & ~3);\n }\n\n /** Tests if this object is pointerfree. */\n get isPointerfree(): bool {\n let rtId = this.rtId;\n // 0: Object, 1: ArrayBuffer, 2: String\n return rtId <= idof() || (__typeinfo(rtId) & TypeinfoFlags.POINTERFREE) != 0;\n }\n\n /** Unlinks this object from its list. */\n unlink(): void {\n let next = this.next;\n if (next == null) {\n if (DEBUG) assert(this.prev == null && changetype(this) < __heap_base);\n return; // static data not yet linked\n }\n let prev = this.prev;\n if (DEBUG) assert(prev);\n next.prev = prev;\n prev.next = next;\n }\n\n /** Links this object to the specified list, with the given color. */\n linkTo(list: Object, withColor: i32): void {\n let prev = list.prev;\n this.nextWithColor = changetype(list) | withColor;\n this.prev = prev;\n prev.next = this;\n list.prev = this;\n }\n\n /** Marks this object as gray, that is reachable with unscanned children. */\n makeGray(): void {\n if (this == iter) iter = assert(this.prev);\n this.unlink();\n this.linkTo(toSpace, this.isPointerfree ? i32(!white) : gray);\n }\n}\n\n/** Visits all objects considered to be program roots. */\nfunction visitRoots(cookie: u32): void {\n __visit_globals(cookie);\n let pn = pinSpace;\n let iter = pn.next;\n while (iter != pn) {\n if (DEBUG) assert(iter.color == transparent);\n __visit_members(changetype(iter) + TOTAL_OVERHEAD, cookie);\n iter = iter.next;\n }\n}\n\n/** Visits all objects on the stack. */\nfunction visitStack(cookie: u32): void {\n let ptr = __stack_pointer;\n while (ptr < __heap_base) {\n __visit(load(ptr), cookie);\n ptr += sizeof();\n }\n}\n\n/** Performs a single step according to the current state. */\nfunction step(): usize {\n // Magic constants responsible for pause times. Obtained experimentally\n // using the compiler compiling itself. 2048 budget pro run by default.\n const MARKCOST = isDefined(ASC_GC_MARKCOST) ? ASC_GC_MARKCOST : 1;\n const SWEEPCOST = isDefined(ASC_GC_SWEEPCOST) ? ASC_GC_SWEEPCOST : 10;\n let obj: Object;\n switch (state) {\n case STATE_IDLE: {\n state = STATE_MARK;\n visitCount = 0;\n visitRoots(VISIT_SCAN);\n iter = toSpace;\n return visitCount * MARKCOST;\n }\n case STATE_MARK: {\n let black = i32(!white);\n obj = iter.next;\n while (obj != toSpace) {\n iter = obj;\n if (obj.color != black) { // skip already-blacks (pointerfree)\n obj.color = black;\n visitCount = 0;\n __visit_members(changetype(obj) + TOTAL_OVERHEAD, VISIT_SCAN);\n return visitCount * MARKCOST;\n }\n obj = obj.next;\n }\n visitCount = 0;\n visitRoots(VISIT_SCAN);\n obj = iter.next;\n if (obj == toSpace) {\n visitStack(VISIT_SCAN);\n obj = iter.next;\n while (obj != toSpace) {\n if (obj.color != black) {\n obj.color = black;\n __visit_members(changetype(obj) + TOTAL_OVERHEAD, VISIT_SCAN);\n }\n obj = obj.next;\n }\n let from = fromSpace;\n fromSpace = toSpace;\n toSpace = from;\n white = black;\n iter = from.next;\n state = STATE_SWEEP;\n }\n return visitCount * MARKCOST;\n }\n case STATE_SWEEP: {\n obj = iter;\n if (obj != toSpace) {\n iter = obj.next;\n if (DEBUG) assert(obj.color == i32(!white)); // old white\n free(obj);\n return SWEEPCOST;\n }\n toSpace.nextWithColor = changetype(toSpace);\n toSpace.prev = toSpace;\n state = STATE_IDLE;\n break;\n }\n }\n return 0;\n}\n\n/** Frees an object. */\nfunction free(obj: Object): void {\n if (changetype(obj) < __heap_base) {\n obj.nextWithColor = 0; // may become linked again\n obj.prev = changetype(0);\n } else {\n total -= obj.size;\n if (isDefined(__finalize)) {\n __finalize(changetype(obj) + TOTAL_OVERHEAD);\n }\n __free(changetype(obj) + BLOCK_OVERHEAD);\n }\n}\n\n// Garbage collector interface\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __new(size: usize, id: i32): usize {\n if (size >= OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n if (total >= threshold) interrupt();\n let obj = changetype(__alloc(OBJECT_OVERHEAD + size) - BLOCK_OVERHEAD);\n obj.rtId = id;\n obj.rtSize = size;\n obj.linkTo(fromSpace, white); // inits next/prev\n total += obj.size;\n let ptr = changetype(obj) + TOTAL_OVERHEAD;\n // may be visited before being fully initialized, so must fill\n memory.fill(ptr, 0, size);\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __renew(oldPtr: usize, size: usize): usize {\n let oldObj = changetype(oldPtr - TOTAL_OVERHEAD);\n // Update object size if its block is large enough\n if (size <= (oldObj.mmInfo & ~3) - OBJECT_OVERHEAD) {\n oldObj.rtSize = size;\n return oldPtr;\n }\n // If not the same object anymore, we have to move it move it due to the\n // shadow stack potentially still referencing the old object\n let newPtr = __new(size, oldObj.rtId);\n memory.copy(newPtr, oldPtr, min(size, oldObj.rtSize));\n return newPtr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void {\n // Write barrier is unnecessary if non-incremental\n if (!childPtr) return;\n if (DEBUG) assert(parentPtr);\n let child = changetype(childPtr - TOTAL_OVERHEAD);\n if (child.color == white) {\n let parent = changetype(parentPtr - TOTAL_OVERHEAD);\n let parentColor = parent.color;\n if (parentColor == i32(!white)) {\n // Maintain the invariant that no black object may point to a white object.\n if (expectMultiple) {\n // Move the barrier \"backward\". Suitable for containers receiving multiple stores.\n // Avoids a barrier for subsequent objects stored into the same container.\n parent.makeGray();\n } else {\n // Move the barrier \"forward\". Suitable for objects receiving isolated stores.\n child.makeGray();\n }\n } else if (parentColor == transparent && state == STATE_MARK) {\n // Pinned objects are considered 'black' during the mark phase.\n child.makeGray();\n }\n }\n}\n\n// @ts-ignore: decorator\n@lazy let visitCount = 0;\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __visit(ptr: usize, cookie: i32): void {\n if (!ptr) return;\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (RTRACE) if (!onvisit(obj)) return;\n if (obj.color == white) {\n obj.makeGray();\n ++visitCount;\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __pin(ptr: usize): usize {\n if (ptr) {\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color == transparent) {\n throw new Error(E_ALREADY_PINNED);\n }\n obj.unlink(); // from fromSpace\n obj.linkTo(pinSpace, transparent);\n }\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __unpin(ptr: usize): void {\n if (!ptr) return;\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color != transparent) {\n throw new Error(E_NOT_PINNED);\n }\n if (state == STATE_MARK) {\n // We may be right at the point after marking roots for the second time and\n // entering the sweep phase, in which case the object would be missed if it\n // is not only pinned but also a root. Make sure it isn't missed.\n obj.makeGray();\n } else {\n obj.unlink();\n obj.linkTo(fromSpace, white);\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __collect(): void {\n if (TRACE) trace(\"GC (full) at\", 1, total);\n if (state > STATE_IDLE) {\n // finish current cycle\n while (state != STATE_IDLE) step();\n }\n // perform a full cycle\n step();\n while (state != STATE_IDLE) step();\n threshold = (total * IDLEFACTOR / 100) + GRANULARITY;\n if (TRACE) trace(\"GC (full) done at cur/max\", 2, total, memory.size() << 16);\n if (RTRACE || PROFILE) oncollect(total);\n}\n\n// Garbage collector automation\n\n/** How often to interrupt. The default of 1024 means \"interrupt each 1024 bytes allocated\". */\n// @ts-ignore: decorator\n@inline const GRANULARITY: usize = isDefined(ASC_GC_GRANULARITY) ? ASC_GC_GRANULARITY : 1024;\n/** How long to interrupt. The default of 200% means \"run at double the speed of allocations\". */\n// @ts-ignore: decorator\n@inline const STEPFACTOR: usize = isDefined(ASC_GC_SWEEPFACTOR) ? ASC_GC_SWEEPFACTOR : 200;\n/** How long to idle. The default of 200% means \"wait for memory to double before kicking in again\". */\n// @ts-ignore: decorator\n@inline const IDLEFACTOR: usize = isDefined(ASC_GC_IDLEFACTOR) ? ASC_GC_IDLEFACTOR : 200;\n\n/** Threshold of memory used by objects to exceed before interrupting again. */\n// @ts-ignore: decorator\n@lazy let threshold: usize = ((memory.size() << 16) - __heap_base) >> 1;\n\n/** Performs a reasonable amount of incremental GC steps. */\nfunction interrupt(): void {\n if (PROFILE) oninterrupt(total);\n if (TRACE) trace(\"GC (auto) at\", 1, total);\n let budget: isize = GRANULARITY * STEPFACTOR / 100;\n do {\n budget -= step();\n if (state == STATE_IDLE) {\n if (TRACE) trace(\"└ GC (auto) done at cur/max\", 2, total, memory.size() << 16);\n threshold = (total * IDLEFACTOR / 100) + GRANULARITY;\n if (PROFILE) onyield(total);\n return;\n }\n } while (budget > 0);\n if (TRACE) trace(\"└ GC (auto) ongoing at\", 1, total);\n threshold = total + GRANULARITY * usize(total - threshold < GRANULARITY);\n if (PROFILE) onyield(total);\n}\n","import { OBJECT, TOTAL_OVERHEAD } from \"rt/common\";\n@inline const MAX_LEN: usize = 65536;\nconst STORE: usize[] = [];\nlet STORE_LEN: usize = 0;\nconst CACHE = memory.data(i32(MAX_LEN));\n// Configurable amount of referenceable strings\nlet POINTER = changetype(CACHE);\n@inline const MAX_CACHE = CACHE + MAX_LEN;\n\nexport namespace bl {\n @inline export function write_b(buf: usize, bytes: usize = changetype(buf - TOTAL_OVERHEAD).rtSize): void {\n memory.copy(POINTER, buf, bytes);\n POINTER += bytes;\n if (MAX_CACHE <= POINTER) bl.shrink();\n }\n @inline export function write_b_u(buf: usize, bytes: usize = changetype(buf - TOTAL_OVERHEAD).rtSize): void {\n memory.copy(POINTER, buf, bytes);\n POINTER += bytes;\n }\n @inline export function write_s(str: string, bytes: usize = changetype(changetype(str) - TOTAL_OVERHEAD).rtSize): void {\n memory.copy(POINTER, changetype(str), bytes);\n POINTER += bytes;\n if (MAX_CACHE <= POINTER) bl.shrink();\n }\n @inline export function write_s_u(str: string, bytes: usize = changetype(changetype(str) - TOTAL_OVERHEAD).rtSize): void {\n memory.copy(POINTER, changetype(str), bytes);\n POINTER += bytes;\n }\n @inline export function write_s_se(str: string, start: usize, end: usize): void {\n const bytes = end - start;\n memory.copy(POINTER, changetype(str) + start, bytes);\n POINTER += bytes;\n if (MAX_CACHE <= POINTER) bl.shrink();\n }\n @inline export function write_s_se_u(str: string, start: usize, end: usize): void {\n const bytes = end - start;\n memory.copy(POINTER, changetype(str) + start, bytes);\n POINTER += bytes;\n }\n @inline export function write_16(char: i32): void {\n store(POINTER, char);\n POINTER += 2;\n if (MAX_CACHE <= POINTER) bl.shrink();\n }\n @inline export function write_16_u(char: i32): void {\n store(POINTER, char);\n POINTER += 2;\n }\n\n @inline export function write_32(chars: i32): void {\n store(POINTER, chars);\n POINTER += 4;\n if (MAX_CACHE <= POINTER) bl.shrink();\n }\n @inline export function write_32_u(chars: i32): void {\n store(POINTER, chars);\n POINTER += 4;\n }\n\n @inline export function write_64(chars: i64): void {\n store(POINTER, chars);\n POINTER += 8;\n if (MAX_CACHE <= POINTER) bl.shrink();\n }\n\n @inline export function write_64_u(chars: i64): void {\n store(POINTER, chars);\n POINTER += 8;\n }\n\n @inline export function write_128(chars: v128): void {\n store(POINTER, chars);\n POINTER += 16;\n if (MAX_CACHE <= POINTER) bl.shrink();\n }\n @inline export function write_128_u(chars: v128): void {\n store(POINTER, chars);\n POINTER += 16;\n if (MAX_CACHE <= POINTER) bl.shrink();\n }\n @inline export function shrink(): void {\n const len = POINTER - CACHE;\n STORE_LEN += len;\n const out = __new(\n len,\n idof()\n );\n memory.copy(out, CACHE, len);\n bl.reset();\n STORE.push(out);\n }\n @inline export function out(): T {\n const len = POINTER - CACHE;\n let out = __new(\n len + STORE_LEN,\n idof()\n );\n\n memory.copy(out, CACHE, len);\n if (STORE_LEN) {\n out += len;\n for (let i = 0; i < STORE.length; i++) {\n const ptr = changetype(unchecked(STORE[i]));\n const storeLen = changetype(ptr - TOTAL_OVERHEAD).rtSize;\n memory.copy(out, ptr, storeLen);\n //__unpin(ptr);\n out += storeLen;\n }\n STORE_LEN = 0;\n }\n bl.reset();\n\n return changetype(out);\n }\n\n @inline export function out_u(): T {\n const len = POINTER - CACHE;\n const out = __new(\n len + STORE_LEN,\n idof()\n );\n\n memory.copy(out, CACHE, len);\n bl.reset();\n\n return changetype(out);\n }\n\n @inline export function _out(out: usize): void {\n memory.copy(out, CACHE, POINTER - CACHE);\n }\n @inline export function reset(): void {\n POINTER = CACHE;\n }\n}","// Characters\n// @ts-ignore = Decorator is valid here\n@inline export const COMMA = 44;\n// @ts-ignore = Decorator is valid here\n@inline export const QUOTE = 34;\n// @ts-ignore = Decorator is valid here\n@inline export const BACK_SLASH = 92;\n// @ts-ignore: Decorator is valid here\n@inline export const FWD_SLASH = 47;\n// @ts-ignore: Decorator is valid here\n@inline export const BRACE_LEFT = 123;\n// @ts-ignore: Decorator is valid here\n@inline export const BRACE_RIGHT = 125;\n// @ts-ignore: Decorator is valid here\n@inline export const BRACKET_LEFT = 91;\n// @ts-ignore: Decorator is valid here\n@inline export const BRACKET_RIGHT = 93;\n// @ts-ignore: Decorator is valid here\n@inline export const COLON = 58;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_T = 116;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_R = 114;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_U = 117;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_E = 101;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_F = 102;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_A = 97;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_L = 108;\n// @ts-ignore: Decorator is valid here\n@inline export const CHAR_S = 115;\n// @ts-ignore = Decorator is valid here\n@inline export const CHAR_N = 110;\n// @ts-ignore = Decorator is valid here\n@inline export const CHAR_B = 98;\n// Strings\n// @ts-ignore: Decorator is valid here\n@inline export const TRUE_WORD = \"true\";\n// @ts-ignore: Decorator is valid here\n@inline export const FALSE_WORD = \"false\";\n// @ts-ignore: Decorator is valid here\n@inline export const NULL_WORD = \"null\";\n// @ts-ignore: Decorator is valid here\n@inline export const BRACE_LEFT_WORD = \"{\";\n// @ts-ignore: Decorator is valid here\n@inline export const BRACKET_LEFT_WORD = \"[\";\n// @ts-ignore: Decorator is valid here\n@inline export const EMPTY_BRACKET_WORD = \"[]\";\n// @ts-ignore: Decorator is valid here\n@inline export const COLON_WORD = \":\";\n// @ts-ignore: Decorator is valid here\n@inline export const COMMA_WORD = \",\";\n// @ts-ignore: Decorator is valid here\n@inline export const BRACE_RIGHT_WORD = \"}\";\n// @ts-ignore: Decorator is valid here\n@inline export const BRACKET_RIGHT_WORD = \"]\";\n// @ts-ignore: Decorator is valid here\n@inline export const QUOTE_WORD = \"\\\"\";\n// @ts-ignore: Decorator is valid here\n@inline export const EMPTY_QUOTE_WORD = \"\\\"\\\"\";\n\n// Escape Codes\n// @ts-ignore: Decorator is valid here\n@inline export const BACKSPACE = 8; // \\b\n// @ts-ignore: Decorator is valid here\n@inline export const TAB = 9; // \\t\n// @ts-ignore: Decorator is valid here\n@inline export const NEW_LINE = 10; // \\n\n// @ts-ignore: Decorator is valid here\n@inline export const FORM_FEED = 12; // \\f\n// @ts-ignore: Decorator is valid here\n@inline export const CARRIAGE_RETURN = 13; // \\r\n\nexport const TRUE_PTR = changetype(\"true\");\nexport const FALSE_PTR = changetype(\"false\");\nexport const NULL_PTR = changetype(\"null\");\nexport const EMPTY_BRACES_PTR = changetype(\"{}\");\nexport const EMPTY_BRACKET_PTR = changetype(\"[]\");\nexport const EMPTY_QUOTE_PTR = changetype(\"\\\"\\\"\");\nexport const BACKSPACE_PTR = changetype(\"\\\\b\");\nexport const TAB_PTR = changetype(\"\\\\t\");\nexport const NEW_LINE_PTR = changetype(\"\\\\n\");\nexport const FORM_FEED_PTR = changetype(\"\\\\f\");\nexport const CARRIAGE_RETURN_PTR = changetype(\"\\\\r\");\nexport const FOUR_DIGIT_ESC_PTR = changetype(\"\\\\u000\");\nexport const TWO_DIGIT_ESC_PTR = changetype(\"\\\\u00\");","//\n// Lookup data for exp2f\n//\n\n// @ts-ignore: decorator\n@inline const EXP2F_TABLE_BITS = 5;\n\n// @ts-ignore: decorator\n@lazy @inline const EXP2F_DATA_TAB = memory.data([\n // exp2f_data_tab[i] = uint(2^(i/N)) - (i << 52-BITS)\n // used for computing 2^(k/N) for an int |k| < 150 N as\n // double(tab[k%N] + (k << 52-BITS))\n 0x3FF0000000000000, 0x3FEFD9B0D3158574, 0x3FEFB5586CF9890F, 0x3FEF9301D0125B51,\n 0x3FEF72B83C7D517B, 0x3FEF54873168B9AA, 0x3FEF387A6E756238, 0x3FEF1E9DF51FDEE1,\n 0x3FEF06FE0A31B715, 0x3FEEF1A7373AA9CB, 0x3FEEDEA64C123422, 0x3FEECE086061892D,\n 0x3FEEBFDAD5362A27, 0x3FEEB42B569D4F82, 0x3FEEAB07DD485429, 0x3FEEA47EB03A5585,\n 0x3FEEA09E667F3BCD, 0x3FEE9F75E8EC5F74, 0x3FEEA11473EB0187, 0x3FEEA589994CCE13,\n 0x3FEEACE5422AA0DB, 0x3FEEB737B0CDC5E5, 0x3FEEC49182A3F090, 0x3FEED503B23E255D,\n 0x3FEEE89F995AD3AD, 0x3FEEFF76F2FB5E47, 0x3FEF199BDD85529C, 0x3FEF3720DCEF9069,\n 0x3FEF5818DCFBA487, 0x3FEF7C97337B9B5F, 0x3FEFA4AFA2A490DA, 0x3FEFD0765B6E4540\n]);\n\n// ULP error: 0.502 (nearest rounding.)\n// Relative error: 1.69 * 2^-34 in [-1/64, 1/64] (before rounding.)\n// Wrong count: 168353 (all nearest rounding wrong results with fma.)\n// @ts-ignore: decorator\n@inline\nexport function exp2f_lut(x: f32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N, // 0x1.8p+52\n Ox127f = reinterpret(0x7F000000);\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394), // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3), // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6); // 0x1.62e42ff0c52d6p-1\n\n let xd = x;\n let ix = reinterpret(x);\n let ux = ix >> 20 & 0x7FF;\n if (ux >= 0x430) {\n // |x| >= 128 or x is nan.\n if (ix == 0xFF800000) return 0; // x == -Inf -> 0\n if (ux >= 0x7F8) return x + x; // x == Inf/NaN -> Inf/NaN\n if (x > 0) return x * Ox127f; // x > 0 -> HugeVal (Owerflow)\n if (x <= -150) return 0; // x <= -150 -> 0 (Underflow)\n }\n\n // x = k/N + r with r in [-1/(2N), 1/(2N)] and int k.\n let kd = xd + shift;\n let ki = reinterpret(kd);\n let r = xd - (kd - shift);\n let t: u64, y: f64, s: f64;\n\n // exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += ki << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n y = C2 * r + 1;\n y += (C0 * r + C1) * (r * r);\n y *= s;\n\n return y;\n}\n\n// ULP error: 0.502 (nearest rounding.)\n// Relative error: 1.69 * 2^-34 in [-ln2/64, ln2/64] (before rounding.)\n// Wrong count: 170635 (all nearest rounding wrong results with fma.)\n// @ts-ignore: decorator\n@inline\nexport function expf_lut(x: f32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000), // 0x1.8p+52\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep+0\n Ox1p127f = reinterpret(0x7F000000);\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394) / N / N / N, // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3) / N / N, // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6) / N; // 0x1.62e42ff0c52d6p-1\n\n let xd = x;\n let ix = reinterpret(x);\n let ux = ix >> 20 & 0x7FF;\n if (ux >= 0x42B) {\n // |x| >= 88 or x is nan.\n if (ix == 0xFF800000) return 0; // x == -Inf -> 0\n if (ux >= 0x7F8) return x + x; // x == Inf/NaN -> Inf/NaN\n if (x > reinterpret(0x42B17217)) return x * Ox1p127f; // x > log(0x1p128) ~= 88.72 -> HugeVal (Owerflow)\n if (x < reinterpret(0xC2CFF1B4)) return 0; // x < log(0x1p-150) ~= -103.97 -> 0 (Underflow)\n }\n\n // x*N/Ln2 = k + r with r in [-1/2, 1/2] and int k.\n let z = InvLn2N * xd;\n\n // Round and convert z to int, the result is in [-150*N, 128*N] and\n // ideally ties-to-even rule is used, otherwise the magnitude of r\n // can be bigger which gives larger approximation error.\n let kd = (z + shift);\n let ki = reinterpret(kd);\n let r = z - (kd - shift);\n let s: f64, y: f64, t: u64;\n\n // exp(x) = 2^(k/N) * 2^(r/N) ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += ki << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n z = C0 * r + C1;\n y = C2 * r + 1;\n y += z * (r * r);\n y *= s;\n\n return y;\n}\n\n//\n// Lookup data for log2f\n//\n\n// @ts-ignore: decorator\n@inline const LOG2F_TABLE_BITS = 4;\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2F_DATA_TAB = memory.data([\n 0x3FF661EC79F8F3BE, 0xBFDEFEC65B963019, // 0x1.661ec79f8f3bep+0, -0x1.efec65b963019p-2,\n 0x3FF571ED4AAF883D, 0xBFDB0B6832D4FCA4, // 0x1.571ed4aaf883dp+0, -0x1.b0b6832d4fca4p-2,\n 0x3FF49539F0F010B0, 0xBFD7418B0A1FB77B, // 0x1.49539f0f010bp+0 , -0x1.7418b0a1fb77bp-2,\n 0x3FF3C995B0B80385, 0xBFD39DE91A6DCF7B, // 0x1.3c995b0b80385p+0, -0x1.39de91a6dcf7bp-2,\n 0x3FF30D190C8864A5, 0xBFD01D9BF3F2B631, // 0x1.30d190c8864a5p+0, -0x1.01d9bf3f2b631p-2,\n 0x3FF25E227B0B8EA0, 0xBFC97C1D1B3B7AF0, // 0x1.25e227b0b8eap+0 , -0x1.97c1d1b3b7afp-3 ,\n 0x3FF1BB4A4A1A343F, 0xBFC2F9E393AF3C9F, // 0x1.1bb4a4a1a343fp+0, -0x1.2f9e393af3c9fp-3,\n 0x3FF12358F08AE5BA, 0xBFB960CBBF788D5C, // 0x1.12358f08ae5bap+0, -0x1.960cbbf788d5cp-4,\n 0x3FF0953F419900A7, 0xBFAA6F9DB6475FCE, // 0x1.0953f419900a7p+0, -0x1.a6f9db6475fcep-5,\n 0x3FF0000000000000, 0, // 0x1p+0, 0x0,\n 0x3FEE608CFD9A47AC, 0x3FB338CA9F24F53D, // 0x1.e608cfd9a47acp-1, 0x1.338ca9f24f53dp-4,\n 0x3FECA4B31F026AA0, 0x3FC476A9543891BA, // 0x1.ca4b31f026aap-1 , 0x1.476a9543891bap-3,\n 0x3FEB2036576AFCE6, 0x3FCE840B4AC4E4D2, // 0x1.b2036576afce6p-1, 0x1.e840b4ac4e4d2p-3,\n 0x3FE9C2D163A1AA2D, 0x3FD40645F0C6651C, // 0x1.9c2d163a1aa2dp-1, 0x1.40645f0c6651cp-2,\n 0x3FE886E6037841ED, 0x3FD88E9C2C1B9FF8, // 0x1.886e6037841edp-1, 0x1.88e9c2c1b9ff8p-2,\n 0x3FE767DCF5534862, 0x3FDCE0A44EB17BCC // 0x1.767dcf5534862p-1, 0x1.ce0a44eb17bccp-2\n]);\n\n// ULP error: 0.752 (nearest rounding.)\n// Relative error: 1.9 * 2^-26 (before rounding.)\n// @ts-ignore: decorator\n@inline\nexport function log2f_lut(x: f32): f32 {\n const\n N_MASK = (1 << LOG2F_TABLE_BITS) - 1,\n Ox1p23f = reinterpret(0x4B000000); // 0x1p23f\n\n const\n A0 = reinterpret(0xBFD712B6F70A7E4D), // -0x1.712b6f70a7e4dp-2\n A1 = reinterpret(0x3FDECABF496832E0), // 0x1.ecabf496832ep-2\n A2 = reinterpret(0xBFE715479FFAE3DE), // -0x1.715479ffae3dep-1\n A3 = reinterpret(0x3FF715475F35C8B8); // 0x1.715475f35c8b8p0\n\n let ux = reinterpret(x);\n // Fix sign of zero with downward rounding when x==1.\n // if (WANT_ROUNDING && predict_false(ix == 0x3f800000)) return 0;\n if (ux - 0x00800000 >= 0x7F800000 - 0x00800000) {\n // x < 0x1p-126 or inf or nan.\n if (ux * 2 == 0) return -Infinity;\n if (ux == 0x7F800000) return x; // log2(inf) == inf.\n if ((ux >> 31) || ux * 2 >= 0xFF000000) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ux = reinterpret(x * Ox1p23f);\n ux -= 23 << 23;\n }\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ux - 0x3F330000;\n let i = (tmp >> (23 - LOG2F_TABLE_BITS)) & N_MASK;\n let top = tmp & 0xFF800000;\n let iz = ux - top;\n let k = tmp >> 23;\n\n let invc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n let logc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n let z = reinterpret(iz);\n\n // log2(x) = log1p(z/c-1)/ln2 + log2(c) + k\n let r = z * invc - 1;\n let y0 = logc + k;\n\n // Pipelined polynomial evaluation to approximate log1p(r)/ln2.\n let y = A1 * r + A2;\n let p = A3 * r + y0;\n let r2 = r * r;\n y += A0 * r2;\n y = y * r2 + p;\n\n return y;\n}\n\n//\n// Lookup data for logf. See: https://git.musl-libc.org/cgit/musl/tree/src/math/logf.c\n//\n\n// @ts-ignore: decorator\n@inline const LOGF_TABLE_BITS = 4;\n\n// @ts-ignore: decorator\n@lazy @inline const LOGF_DATA_TAB = memory.data([\n 0x3FF661EC79F8F3BE, 0xBFD57BF7808CAADE, // 0x1.661ec79f8f3bep+0, -0x1.57bf7808caadep-2,\n 0x3FF571ED4AAF883D, 0xBFD2BEF0A7C06DDB, // 0x1.571ed4aaf883dp+0, -0x1.2bef0a7c06ddbp-2,\n 0x3FF49539F0F010B0, 0xBFD01EAE7F513A67, // 0x1.49539f0f010bp+0 , -0x1.01eae7f513a67p-2,\n 0x3FF3C995B0B80385, 0xBFCB31D8A68224E9, // 0x1.3c995b0b80385p+0, -0x1.b31d8a68224e9p-3,\n 0x3FF30D190C8864A5, 0xBFC6574F0AC07758, // 0x1.30d190c8864a5p+0, -0x1.6574f0ac07758p-3,\n 0x3FF25E227B0B8EA0, 0xBFC1AA2BC79C8100, // 0x1.25e227b0b8eap+0 , -0x1.1aa2bc79c81p-3 ,\n 0x3FF1BB4A4A1A343F, 0xBFBA4E76CE8C0E5E, // 0x1.1bb4a4a1a343fp+0, -0x1.a4e76ce8c0e5ep-4,\n 0x3FF12358F08AE5BA, 0xBFB1973C5A611CCC, // 0x1.12358f08ae5bap+0, -0x1.1973c5a611cccp-4,\n 0x3FF0953F419900A7, 0xBFA252F438E10C1E, // 0x1.0953f419900a7p+0, -0x1.252f438e10c1ep-5,\n 0x3FF0000000000000, 0, // 0x1p+0, 0,\n 0x3FEE608CFD9A47AC, 0x3FAAA5AA5DF25984, // 0x1.e608cfd9a47acp-1, 0x1.aa5aa5df25984p-5,\n 0x3FECA4B31F026AA0, 0x3FBC5E53AA362EB4, // 0x1.ca4b31f026aap-1 , 0x1.c5e53aa362eb4p-4,\n 0x3FEB2036576AFCE6, 0x3FC526E57720DB08, // 0x1.b2036576afce6p-1, 0x1.526e57720db08p-3,\n 0x3FE9C2D163A1AA2D, 0x3FCBC2860D224770, // 0x1.9c2d163a1aa2dp-1, 0x1.bc2860d22477p-3 ,\n 0x3FE886E6037841ED, 0x3FD1058BC8A07EE1, // 0x1.886e6037841edp-1, 0x1.1058bc8a07ee1p-2,\n 0x3FE767DCF5534862, 0x3FD4043057B6EE09 // 0x1.767dcf5534862p-1, 0x1.4043057b6ee09p-2\n]);\n\n// ULP error: 0.818 (nearest rounding.)\n// Relative error: 1.957 * 2^-26 (before rounding.)\n// @ts-ignore: decorator\n@inline\nexport function logf_lut(x: f32): f32 {\n const\n N_MASK = (1 << LOGF_TABLE_BITS) - 1,\n Ox1p23f = reinterpret(0x4B000000); // 0x1p23f\n\n const\n Ln2 = reinterpret(0x3FE62E42FEFA39EF), // 0x1.62e42fefa39efp-1;\n A0 = reinterpret(0xBFD00EA348B88334), // -0x1.00ea348b88334p-2\n A1 = reinterpret(0x3FD5575B0BE00B6A), // 0x1.5575b0be00b6ap-2\n A2 = reinterpret(0xBFDFFFFEF20A4123); // -0x1.ffffef20a4123p-2\n\n let ux = reinterpret(x);\n // Fix sign of zero with downward rounding when x==1.\n // if (WANT_ROUNDING && ux == 0x3f800000) return 0;\n if (ux - 0x00800000 >= 0x7F800000 - 0x00800000) {\n // x < 0x1p-126 or inf or nan.\n if ((ux << 1) == 0) return -Infinity;\n if (ux == 0x7F800000) return x; // log(inf) == inf.\n if ((ux >> 31) || (ux << 1) >= 0xFF000000) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ux = reinterpret(x * Ox1p23f);\n ux -= 23 << 23;\n }\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ux - 0x3F330000;\n let i = (tmp >> (23 - LOGF_TABLE_BITS)) & N_MASK;\n let k = tmp >> 23;\n let iz = ux - (tmp & 0x1FF << 23);\n\n let invc = load(LOGF_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n let logc = load(LOGF_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n\n let z = reinterpret(iz);\n\n // log(x) = log1p(z/c-1) + log(c) + k*Ln2\n let r = z * invc - 1;\n let y0 = logc + k * Ln2;\n\n // Pipelined polynomial evaluation to approximate log1p(r).\n let r2 = r * r;\n let y = A1 * r + A2;\n y += A0 * r2;\n y = y * r2 + (y0 + r);\n\n return y;\n}\n\n//\n// Lookup data for powf. See: https://git.musl-libc.org/cgit/musl/tree/src/math/powf.c\n//\n\n// @ts-ignore: decorator\n@inline\nfunction zeroinfnanf(ux: u32): bool {\n return (ux << 1) - 1 >= (0x7f800000 << 1) - 1;\n}\n\n// Returns 0 if not int, 1 if odd int, 2 if even int. The argument is\n// the bit representation of a non-zero finite floating-point value.\n// @ts-ignore: decorator\n@inline\nfunction checkintf(iy: u32): i32 {\n let e = iy >> 23 & 0xFF;\n if (e < 0x7F ) return 0;\n if (e > 0x7F + 23) return 2;\n e = 1 << (0x7F + 23 - e);\n if (iy & (e - 1)) return 0;\n if (iy & e ) return 1;\n return 2;\n}\n\n// Subnormal input is normalized so ix has negative biased exponent.\n// Output is multiplied by N (POWF_SCALE) if TOINT_INTRINICS is set.\n// @ts-ignore: decorator\n@inline\nfunction log2f_inline(ux: u32): f64 {\n const N_MASK = (1 << LOG2F_TABLE_BITS) - 1;\n\n const\n A0 = reinterpret(0x3FD27616C9496E0B), // 0x1.27616c9496e0bp-2\n A1 = reinterpret(0xBFD71969A075C67A), // -0x1.71969a075c67ap-2\n A2 = reinterpret(0x3FDEC70A6CA7BADD), // 0x1.ec70a6ca7baddp-2\n A3 = reinterpret(0xBFE7154748BEF6C8), // -0x1.7154748bef6c8p-1\n A4 = reinterpret(0x3FF71547652AB82B); // 0x1.71547652ab82bp+0\n\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ux - 0x3F330000;\n let i = usize((tmp >> (23 - LOG2F_TABLE_BITS)) & N_MASK);\n let top = tmp & 0xFF800000;\n let uz = ux - top;\n let k = top >> 23;\n\n let invc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n let logc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n let z = reinterpret(uz);\n\n // log2(x) = log1p(z/c-1)/ln2 + log2(c) + k\n let r = z * invc - 1;\n let y0 = logc + k;\n\n // Pipelined polynomial evaluation to approximate log1p(r)/ln2.\n let y = A0 * r + A1;\n let p = A2 * r + A3;\n let q = A4 * r + y0;\n\n r *= r;\n q += p * r;\n y = y * (r * r) + q;\n\n return y;\n}\n\n// The output of log2 and thus the input of exp2 is either scaled by N\n// (in case of fast toint intrinsics) or not. The unscaled xd must be\n// in [-1021,1023], sign_bias sets the sign of the result.\n// @ts-ignore: decorator\n@inline\nfunction exp2f_inline(xd: f64, signBias: u32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N; // 0x1.8p+52\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394), // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3), // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6); // 0x1.62e42ff0c52d6p-1\n\n // x = k/N + r with r in [-1/(2N), 1/(2N)]\n let kd = (xd + shift);\n let ki = reinterpret(kd);\n let r = xd - (kd - shift);\n let t: u64, z: f64, y: f64, s: f64;\n\n // exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += (ki + signBias) << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n z = C0 * r + C1;\n y = C2 * r + 1;\n y += z * (r * r);\n y *= s;\n return y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction xflowf(sign: u32, y: f32): f32 {\n return select(-y, y, sign) * y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction oflowf(sign: u32): f32 {\n return xflowf(sign, reinterpret(0x70000000)); // 0x1p97f\n}\n\n// @ts-ignore: decorator\n@inline\nfunction uflowf(sign: u32): f32 {\n return xflowf(sign, reinterpret(0x10000000)); // 0x1p-95f\n}\n\n// @ts-ignore: decorator\n@inline\nexport function powf_lut(x: f32, y: f32): f32 {\n const\n Ox1p23f = reinterpret(0x4B000000), // 0x1p23f\n UPPER_LIMIT = reinterpret(0x405FFFFFFFD1D571), // 0x1.fffffffd1d571p+6\n LOWER_LIMIT = -150.0,\n SIGN_BIAS = 1 << (EXP2F_TABLE_BITS + 11);\n\n let signBias: u32 = 0;\n let ix = reinterpret(x);\n let iy = reinterpret(y);\n let ny = 0;\n\n if (i32(ix - 0x00800000 >= 0x7f800000 - 0x00800000) | (ny = i32(zeroinfnanf(iy)))) {\n // Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan).\n if (ny) {\n if ((iy << 1) == 0) return 1.0;\n if (ix == 0x3F800000) return NaN; // original: 1.0\n if ((ix << 1) > (0x7F800000 << 1) || (iy << 1) > (0x7F800000 << 1)) return x + y;\n if ((ix << 1) == (0x3F800000 << 1)) return NaN; // original: 1.0\n if (((ix << 1) < (0x3F800000 << 1)) == !(iy >> 31)) return 0; // |x| < 1 && y==inf or |x| > 1 && y==-inf.\n return y * y;\n }\n if (zeroinfnanf(ix)) {\n let x2 = x * x;\n if ((ix >> 31) && checkintf(iy) == 1) x2 = -x2;\n return iy < 0 ? 1 / x2 : x2;\n }\n // x and y are non-zero finite.\n if (ix < 0) {\n // Finite x < 0.\n let yint = checkintf(iy);\n if (yint == 0) return (x - x) / (x - x);\n if (yint == 1) signBias = SIGN_BIAS;\n ix &= 0x7FFFFFFF;\n }\n if (ix < 0x00800000) {\n // Normalize subnormal x so exponent becomes negative.\n ix = reinterpret(x * Ox1p23f);\n ix &= 0x7FFFFFFF;\n ix -= 23 << 23;\n }\n }\n let logx = log2f_inline(ix);\n let ylogx = y * logx; // cannot overflow, y is single prec.\n if ((reinterpret(ylogx) >> 47 & 0xFFFF) >= 0x80BF) { // reinterpret(126.0) >> 47\n // |y * log(x)| >= 126\n if (ylogx > UPPER_LIMIT) return oflowf(signBias); // overflow\n if (ylogx <= LOWER_LIMIT) return uflowf(signBias); // underflow\n }\n return exp2f_inline(ylogx, signBias);\n}\n\n//\n// Lookup data for exp. See: https://git.musl-libc.org/cgit/musl/tree/src/math/exp.c\n//\n\n// @ts-ignore: decorator\n@inline const EXP_TABLE_BITS = 7;\n\n// @ts-ignore: decorator\n@lazy @inline const EXP_DATA_TAB = memory.data([\n 0x0000000000000000, 0x3FF0000000000000,\n 0x3C9B3B4F1A88BF6E, 0x3FEFF63DA9FB3335,\n 0xBC7160139CD8DC5D, 0x3FEFEC9A3E778061,\n 0xBC905E7A108766D1, 0x3FEFE315E86E7F85,\n 0x3C8CD2523567F613, 0x3FEFD9B0D3158574,\n 0xBC8BCE8023F98EFA, 0x3FEFD06B29DDF6DE,\n 0x3C60F74E61E6C861, 0x3FEFC74518759BC8,\n 0x3C90A3E45B33D399, 0x3FEFBE3ECAC6F383,\n 0x3C979AA65D837B6D, 0x3FEFB5586CF9890F,\n 0x3C8EB51A92FDEFFC, 0x3FEFAC922B7247F7,\n 0x3C3EBE3D702F9CD1, 0x3FEFA3EC32D3D1A2,\n 0xBC6A033489906E0B, 0x3FEF9B66AFFED31B,\n 0xBC9556522A2FBD0E, 0x3FEF9301D0125B51,\n 0xBC5080EF8C4EEA55, 0x3FEF8ABDC06C31CC,\n 0xBC91C923B9D5F416, 0x3FEF829AAEA92DE0,\n 0x3C80D3E3E95C55AF, 0x3FEF7A98C8A58E51,\n 0xBC801B15EAA59348, 0x3FEF72B83C7D517B,\n 0xBC8F1FF055DE323D, 0x3FEF6AF9388C8DEA,\n 0x3C8B898C3F1353BF, 0x3FEF635BEB6FCB75,\n 0xBC96D99C7611EB26, 0x3FEF5BE084045CD4,\n 0x3C9AECF73E3A2F60, 0x3FEF54873168B9AA,\n 0xBC8FE782CB86389D, 0x3FEF4D5022FCD91D,\n 0x3C8A6F4144A6C38D, 0x3FEF463B88628CD6,\n 0x3C807A05B0E4047D, 0x3FEF3F49917DDC96,\n 0x3C968EFDE3A8A894, 0x3FEF387A6E756238,\n 0x3C875E18F274487D, 0x3FEF31CE4FB2A63F,\n 0x3C80472B981FE7F2, 0x3FEF2B4565E27CDD,\n 0xBC96B87B3F71085E, 0x3FEF24DFE1F56381,\n 0x3C82F7E16D09AB31, 0x3FEF1E9DF51FDEE1,\n 0xBC3D219B1A6FBFFA, 0x3FEF187FD0DAD990,\n 0x3C8B3782720C0AB4, 0x3FEF1285A6E4030B,\n 0x3C6E149289CECB8F, 0x3FEF0CAFA93E2F56,\n 0x3C834D754DB0ABB6, 0x3FEF06FE0A31B715,\n 0x3C864201E2AC744C, 0x3FEF0170FC4CD831,\n 0x3C8FDD395DD3F84A, 0x3FEEFC08B26416FF,\n 0xBC86A3803B8E5B04, 0x3FEEF6C55F929FF1,\n 0xBC924AEDCC4B5068, 0x3FEEF1A7373AA9CB,\n 0xBC9907F81B512D8E, 0x3FEEECAE6D05D866,\n 0xBC71D1E83E9436D2, 0x3FEEE7DB34E59FF7,\n 0xBC991919B3CE1B15, 0x3FEEE32DC313A8E5,\n 0x3C859F48A72A4C6D, 0x3FEEDEA64C123422,\n 0xBC9312607A28698A, 0x3FEEDA4504AC801C,\n 0xBC58A78F4817895B, 0x3FEED60A21F72E2A,\n 0xBC7C2C9B67499A1B, 0x3FEED1F5D950A897,\n 0x3C4363ED60C2AC11, 0x3FEECE086061892D,\n 0x3C9666093B0664EF, 0x3FEECA41ED1D0057,\n 0x3C6ECCE1DAA10379, 0x3FEEC6A2B5C13CD0,\n 0x3C93FF8E3F0F1230, 0x3FEEC32AF0D7D3DE,\n 0x3C7690CEBB7AAFB0, 0x3FEEBFDAD5362A27,\n 0x3C931DBDEB54E077, 0x3FEEBCB299FDDD0D,\n 0xBC8F94340071A38E, 0x3FEEB9B2769D2CA7,\n 0xBC87DECCDC93A349, 0x3FEEB6DAA2CF6642,\n 0xBC78DEC6BD0F385F, 0x3FEEB42B569D4F82,\n 0xBC861246EC7B5CF6, 0x3FEEB1A4CA5D920F,\n 0x3C93350518FDD78E, 0x3FEEAF4736B527DA,\n 0x3C7B98B72F8A9B05, 0x3FEEAD12D497C7FD,\n 0x3C9063E1E21C5409, 0x3FEEAB07DD485429,\n 0x3C34C7855019C6EA, 0x3FEEA9268A5946B7,\n 0x3C9432E62B64C035, 0x3FEEA76F15AD2148,\n 0xBC8CE44A6199769F, 0x3FEEA5E1B976DC09,\n 0xBC8C33C53BEF4DA8, 0x3FEEA47EB03A5585,\n 0xBC845378892BE9AE, 0x3FEEA34634CCC320,\n 0xBC93CEDD78565858, 0x3FEEA23882552225,\n 0x3C5710AA807E1964, 0x3FEEA155D44CA973,\n 0xBC93B3EFBF5E2228, 0x3FEEA09E667F3BCD,\n 0xBC6A12AD8734B982, 0x3FEEA012750BDABF,\n 0xBC6367EFB86DA9EE, 0x3FEE9FB23C651A2F,\n 0xBC80DC3D54E08851, 0x3FEE9F7DF9519484,\n 0xBC781F647E5A3ECF, 0x3FEE9F75E8EC5F74,\n 0xBC86EE4AC08B7DB0, 0x3FEE9F9A48A58174,\n 0xBC8619321E55E68A, 0x3FEE9FEB564267C9,\n 0x3C909CCB5E09D4D3, 0x3FEEA0694FDE5D3F,\n 0xBC7B32DCB94DA51D, 0x3FEEA11473EB0187,\n 0x3C94ECFD5467C06B, 0x3FEEA1ED0130C132,\n 0x3C65EBE1ABD66C55, 0x3FEEA2F336CF4E62,\n 0xBC88A1C52FB3CF42, 0x3FEEA427543E1A12,\n 0xBC9369B6F13B3734, 0x3FEEA589994CCE13,\n 0xBC805E843A19FF1E, 0x3FEEA71A4623C7AD,\n 0xBC94D450D872576E, 0x3FEEA8D99B4492ED,\n 0x3C90AD675B0E8A00, 0x3FEEAAC7D98A6699,\n 0x3C8DB72FC1F0EAB4, 0x3FEEACE5422AA0DB,\n 0xBC65B6609CC5E7FF, 0x3FEEAF3216B5448C,\n 0x3C7BF68359F35F44, 0x3FEEB1AE99157736,\n 0xBC93091FA71E3D83, 0x3FEEB45B0B91FFC6,\n 0xBC5DA9B88B6C1E29, 0x3FEEB737B0CDC5E5,\n 0xBC6C23F97C90B959, 0x3FEEBA44CBC8520F,\n 0xBC92434322F4F9AA, 0x3FEEBD829FDE4E50,\n 0xBC85CA6CD7668E4B, 0x3FEEC0F170CA07BA,\n 0x3C71AFFC2B91CE27, 0x3FEEC49182A3F090,\n 0x3C6DD235E10A73BB, 0x3FEEC86319E32323,\n 0xBC87C50422622263, 0x3FEECC667B5DE565,\n 0x3C8B1C86E3E231D5, 0x3FEED09BEC4A2D33,\n 0xBC91BBD1D3BCBB15, 0x3FEED503B23E255D,\n 0x3C90CC319CEE31D2, 0x3FEED99E1330B358,\n 0x3C8469846E735AB3, 0x3FEEDE6B5579FDBF,\n 0xBC82DFCD978E9DB4, 0x3FEEE36BBFD3F37A,\n 0x3C8C1A7792CB3387, 0x3FEEE89F995AD3AD,\n 0xBC907B8F4AD1D9FA, 0x3FEEEE07298DB666,\n 0xBC55C3D956DCAEBA, 0x3FEEF3A2B84F15FB,\n 0xBC90A40E3DA6F640, 0x3FEEF9728DE5593A,\n 0xBC68D6F438AD9334, 0x3FEEFF76F2FB5E47,\n 0xBC91EEE26B588A35, 0x3FEF05B030A1064A,\n 0x3C74FFD70A5FDDCD, 0x3FEF0C1E904BC1D2,\n 0xBC91BDFBFA9298AC, 0x3FEF12C25BD71E09,\n 0x3C736EAE30AF0CB3, 0x3FEF199BDD85529C,\n 0x3C8EE3325C9FFD94, 0x3FEF20AB5FFFD07A,\n 0x3C84E08FD10959AC, 0x3FEF27F12E57D14B,\n 0x3C63CDAF384E1A67, 0x3FEF2F6D9406E7B5,\n 0x3C676B2C6C921968, 0x3FEF3720DCEF9069,\n 0xBC808A1883CCB5D2, 0x3FEF3F0B555DC3FA,\n 0xBC8FAD5D3FFFFA6F, 0x3FEF472D4A07897C,\n 0xBC900DAE3875A949, 0x3FEF4F87080D89F2,\n 0x3C74A385A63D07A7, 0x3FEF5818DCFBA487,\n 0xBC82919E2040220F, 0x3FEF60E316C98398,\n 0x3C8E5A50D5C192AC, 0x3FEF69E603DB3285,\n 0x3C843A59AC016B4B, 0x3FEF7321F301B460,\n 0xBC82D52107B43E1F, 0x3FEF7C97337B9B5F,\n 0xBC892AB93B470DC9, 0x3FEF864614F5A129,\n 0x3C74B604603A88D3, 0x3FEF902EE78B3FF6,\n 0x3C83C5EC519D7271, 0x3FEF9A51FBC74C83,\n 0xBC8FF7128FD391F0, 0x3FEFA4AFA2A490DA,\n 0xBC8DAE98E223747D, 0x3FEFAF482D8E67F1,\n 0x3C8EC3BC41AA2008, 0x3FEFBA1BEE615A27,\n 0x3C842B94C3A9EB32, 0x3FEFC52B376BBA97,\n 0x3C8A64A931D185EE, 0x3FEFD0765B6E4540,\n 0xBC8E37BAE43BE3ED, 0x3FEFDBFDAD9CBE14,\n 0x3C77893B4D91CD9D, 0x3FEFE7C1819E90D8,\n 0x3C5305C14160CC89, 0x3FEFF3C22B8F71F1\n]);\n\n// Handle cases that may overflow or underflow when computing the result that\n// is scale*(1+TMP) without intermediate rounding. The bit representation of\n// scale is in SBITS, however it has a computed exponent that may have\n// overflown into the sign bit so that needs to be adjusted before using it as\n// a double. (int32_t)KI is the k used in the argument reduction and exponent\n// adjustment of scale, positive k here means the result may overflow and\n// negative k means the result may underflow.\n// @ts-ignore: decorator\n@inline\nfunction specialcase(tmp: f64, sbits: u64, ki: u64): f64 {\n const\n Ox1p_1022 = reinterpret(0x0010000000000000), // 0x1p-1022\n Ox1p1009 = reinterpret(0x7F00000000000000); // 0x1p1009\n\n let scale: f64;\n if (!(ki & 0x80000000)) {\n // k > 0, the exponent of scale might have overflowed by <= 460.\n sbits -= u64(1009) << 52;\n scale = reinterpret(sbits);\n return Ox1p1009 * (scale + scale * tmp); // 0x1p1009\n }\n // k < 0, need special care in the subnormal range.\n sbits += u64(1022) << 52;\n // Note: sbits is signed scale.\n scale = reinterpret(sbits);\n let y = scale + scale * tmp;\n if (abs(y) < 1.0) {\n // Round y to the right precision before scaling it into the subnormal\n // range to avoid double rounding that can cause 0.5+E/2 ulp error where\n // E is the worst-case ulp error outside the subnormal range. So this\n // is only useful if the goal is better than 1 ulp worst-case error.\n let one = copysign(1.0, y);\n let lo = scale - y + scale * tmp;\n let hi = one + y;\n lo = one - hi + y + lo;\n y = (hi + lo) - one;\n // Fix the sign of 0.\n if (y == 0.0) y = reinterpret(sbits & 0x8000000000000000);\n }\n return y * Ox1p_1022;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function exp_lut(x: f64): f64 {\n const\n N = 1 << EXP_TABLE_BITS,\n N_MASK = N - 1;\n\n const\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep0\n NegLn2hiN = reinterpret(0xBF762E42FEFA0000), // -0x1.62e42fefa0000p-8\n NegLn2loN = reinterpret(0xBD0CF79ABC9E3B3A), // -0x1.cf79abc9e3b3ap-47\n shift = reinterpret(0x4338000000000000); // 0x1.8p52;\n\n const\n C2 = reinterpret(0x3FDFFFFFFFFFFDBD), // __exp_data.poly[0] (0x1.ffffffffffdbdp-2)\n C3 = reinterpret(0x3FC555555555543C), // __exp_data.poly[1] (0x1.555555555543cp-3)\n C4 = reinterpret(0x3FA55555CF172B91), // __exp_data.poly[2] (0x1.55555cf172b91p-5)\n C5 = reinterpret(0x3F81111167A4D017); // __exp_data.poly[3] (0x1.1111167a4d017p-7)\n\n let ux = reinterpret(x);\n let abstop = u32(ux >> 52) & 0x7FF;\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) return 1;\n if (abstop >= 0x409) {\n if (ux == 0xFFF0000000000000) return 0;\n if (abstop >= 0x7FF) {\n return 1.0 + x;\n } else {\n return select(0, Infinity, ux < 0);\n }\n }\n // Large x is special cased below.\n abstop = 0;\n }\n\n // exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)]\n // x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N]\n let z = InvLn2N * x;\n // #if TOINT_INTRINSICS\n // \tkd = roundtoint(z);\n // \tki = converttoint(z);\n // #elif EXP_USE_TOINT_NARROW\n // \t// z - kd is in [-0.5-2^-16, 0.5] in all rounding modes.\n // let kd = z + shift;\n // let ki = reinterpret(kd) >> 16;\n // let kd = ki;\n // #else\n // z - kd is in [-1, 1] in non-nearest rounding modes.\n let kd = z + shift;\n let ki = reinterpret(kd);\n kd -= shift;\n // #endif\n let r = x + kd * NegLn2hiN + kd * NegLn2loN;\n // 2^(k/N) ~= scale * (1 + tail).\n let idx = usize((ki & N_MASK) << 1);\n let top = ki << (52 - EXP_TABLE_BITS);\n\n let tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof()))); // T[idx]\n // This is only a valid scale when -1023*N < k < 1024*N\n let sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top; // T[idx + 1]\n // exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1).\n // Evaluation is optimized assuming superscalar pipelined execution.\n let r2 = r * r;\n // Without fma the worst case error is 0.25/N ulp larger.\n // Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp.\n let tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase(tmp, sbits, ki);\n let scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-200 and scale > 2^-739, so there\n // is no spurious underflow here even without fma.\n return scale + scale * tmp;\n}\n\n//\n// Lookup data for exp2. See: https://git.musl-libc.org/cgit/musl/tree/src/math/exp2.c\n//\n\n// Handle cases that may overflow or underflow when computing the result that\n// is scale*(1+TMP) without intermediate rounding. The bit representation of\n// scale is in SBITS, however it has a computed exponent that may have\n// overflown into the sign bit so that needs to be adjusted before using it as\n// a double. (int32_t)KI is the k used in the argument reduction and exponent\n// adjustment of scale, positive k here means the result may overflow and\n// negative k means the result may underflow.\n// @ts-ignore: decorator\n@inline\nfunction specialcase2(tmp: f64, sbits: u64, ki: u64): f64 {\n const Ox1p_1022 = reinterpret(0x10000000000000); // 0x1p-1022\n let scale: f64;\n if ((ki & 0x80000000) == 0) {\n // k > 0, the exponent of scale might have overflowed by 1\n sbits -= u64(1) << 52;\n scale = reinterpret(sbits);\n return 2 * (scale * tmp + scale);\n }\n // k < 0, need special care in the subnormal range\n sbits += u64(1022) << 52;\n scale = reinterpret(sbits);\n let y = scale * tmp + scale;\n if (y < 1.0) {\n // Round y to the right precision before scaling it into the subnormal\n // range to avoid double rounding that can cause 0.5+E/2 ulp error where\n // E is the worst-case ulp error outside the subnormal range. So this\n // is only useful if the goal is better than 1 ulp worst-case error.\n let hi: f64, lo: f64;\n lo = scale - y + scale * tmp;\n hi = 1.0 + y;\n lo = 1.0 - hi + y + lo;\n y = (hi + lo) - 1.0;\n }\n return y * Ox1p_1022;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function exp2_lut(x: f64): f64 {\n const\n N = 1 << EXP_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N; // 0x1.8p52\n\n const\n C1 = reinterpret(0x3FE62E42FEFA39EF), // 0x1.62e42fefa39efp-1\n C2 = reinterpret(0x3FCEBFBDFF82C424), // 0x1.ebfbdff82c424p-3\n C3 = reinterpret(0x3FAC6B08D70CF4B5), // 0x1.c6b08d70cf4b5p-5\n C4 = reinterpret(0x3F83B2ABD24650CC), // 0x1.3b2abd24650ccp-7\n C5 = reinterpret(0x3F55D7E09B4E3A84); // 0x1.5d7e09b4e3a84p-10\n\n let ux = reinterpret(x);\n let abstop = u32(ux >> 52) & 0x7ff;\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) return 1.0;\n if (abstop >= 0x409) {\n if (ux == 0xFFF0000000000000) return 0;\n if (abstop >= 0x7FF) return 1.0 + x;\n if (ux >= 0) return Infinity;\n else if (ux >= 0xC090CC0000000000) return 0;\n }\n if ((ux << 1) > 0x811A000000000000) abstop = 0; // Large x is special cased below.\n }\n\n // exp2(x) = 2^(k/N) * 2^r, with 2^r in [2^(-1/2N),2^(1/2N)].\n // x = k/N + r, with int k and r in [-1/2N, 1/2N]\n let kd = x + shift;\n let ki = reinterpret(kd);\n kd -= shift; // k/N for int k\n let r = x - kd;\n // 2^(k/N) ~= scale * (1 + tail)\n let idx = usize((ki & N_MASK) << 1);\n let top = ki << (52 - EXP_TABLE_BITS);\n\n let tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof()), 0 << alignof())); // T[idx])\n // This is only a valid scale when -1023*N < k < 1024*N\n let sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top; // T[idx + 1]\n // exp2(x) = 2^(k/N) * 2^r ~= scale + scale * (tail + 2^r - 1).\n // Evaluation is optimized assuming superscalar pipelined execution\n let r2 = r * r;\n // Without fma the worst case error is 0.5/N ulp larger.\n // Worst case error is less than 0.5+0.86/N+(abs poly error * 2^53) ulp.\n let tmp = tail + r * C1 + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase2(tmp, sbits, ki);\n let scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-65 and scale > 2^-928, so there\n // is no spurious underflow here even without fma.\n return scale * tmp + scale;\n}\n\n//\n// Lookup data for log2. See: https://git.musl-libc.org/cgit/musl/tree/src/math/log2.c\n//\n\n// @ts-ignore: decorator\n@inline const LOG2_TABLE_BITS = 6;\n\n/* Algorithm:\n\n x = 2^k z\n log2(x) = k + log2(c) + log2(z/c)\n log2(z/c) = poly(z/c - 1)\n\nwhere z is in [1.6p-1; 1.6p0] which is split into N subintervals and z falls\ninto the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = (double)log2(c)\n tab2[i].chi = (double)c\n tab2[i].clo = (double)(c - (double)c)\n\nwhere c is near the center of the subinterval and is chosen by trying +-2^29\nfloating point invc candidates around 1/center and selecting one for which\n\n 1) the rounding error in 0x1.8p10 + logc is 0,\n 2) the rounding error in z - chi - clo is < 0x1p-64 and\n 3) the rounding error in (double)log2(c) is minimized (< 0x1p-68).\n\nNote: 1) ensures that k + logc can be computed without rounding error, 2)\nensures that z/c - 1 can be computed as (z - chi - clo)*invc with close to a\nsingle rounding error when there is no fast fma for z*invc - 1, 3) ensures\nthat logc + poly(z/c - 1) has small error, however near x == 1 when\n|log2(x)| < 0x1p-4, this is not enough so that is special cased. */\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2_DATA_TAB1 = memory.data([\n // invc , logc\n 0x3FF724286BB1ACF8, 0xBFE1095FEECDB000,\n 0x3FF6E1F766D2CCA1, 0xBFE08494BD76D000,\n 0x3FF6A13D0E30D48A, 0xBFE00143AEE8F800,\n 0x3FF661EC32D06C85, 0xBFDEFEC5360B4000,\n 0x3FF623FA951198F8, 0xBFDDFDD91AB7E000,\n 0x3FF5E75BA4CF026C, 0xBFDCFFAE0CC79000,\n 0x3FF5AC055A214FB8, 0xBFDC043811FDA000,\n 0x3FF571ED0F166E1E, 0xBFDB0B67323AE000,\n 0x3FF53909590BF835, 0xBFDA152F5A2DB000,\n 0x3FF5014FED61ADDD, 0xBFD9217F5AF86000,\n 0x3FF4CAB88E487BD0, 0xBFD8304DB0719000,\n 0x3FF49539B4334FEE, 0xBFD74189F9A9E000,\n 0x3FF460CBDFAFD569, 0xBFD6552BB5199000,\n 0x3FF42D664EE4B953, 0xBFD56B23A29B1000,\n 0x3FF3FB01111DD8A6, 0xBFD483650F5FA000,\n 0x3FF3C995B70C5836, 0xBFD39DE937F6A000,\n 0x3FF3991C4AB6FD4A, 0xBFD2BAA1538D6000,\n 0x3FF3698E0CE099B5, 0xBFD1D98340CA4000,\n 0x3FF33AE48213E7B2, 0xBFD0FA853A40E000,\n 0x3FF30D191985BDB1, 0xBFD01D9C32E73000,\n 0x3FF2E025CAB271D7, 0xBFCE857DA2FA6000,\n 0x3FF2B404CF13CD82, 0xBFCCD3C8633D8000,\n 0x3FF288B02C7CCB50, 0xBFCB26034C14A000,\n 0x3FF25E2263944DE5, 0xBFC97C1C2F4FE000,\n 0x3FF234563D8615B1, 0xBFC7D6023F800000,\n 0x3FF20B46E33EAF38, 0xBFC633A71A05E000,\n 0x3FF1E2EEFDCDA3DD, 0xBFC494F5E9570000,\n 0x3FF1BB4A580B3930, 0xBFC2F9E424E0A000,\n 0x3FF19453847F2200, 0xBFC162595AFDC000,\n 0x3FF16E06C0D5D73C, 0xBFBF9C9A75BD8000,\n 0x3FF1485F47B7E4C2, 0xBFBC7B575BF9C000,\n 0x3FF12358AD0085D1, 0xBFB960C60FF48000,\n 0x3FF0FEF00F532227, 0xBFB64CE247B60000,\n 0x3FF0DB2077D03A8F, 0xBFB33F78B2014000,\n 0x3FF0B7E6D65980D9, 0xBFB0387D1A42C000,\n 0x3FF0953EFE7B408D, 0xBFAA6F9208B50000,\n 0x3FF07325CAC53B83, 0xBFA47A954F770000,\n 0x3FF05197E40D1B5C, 0xBF9D23A8C50C0000,\n 0x3FF03091C1208EA2, 0xBF916A2629780000,\n 0x3FF0101025B37E21, 0xBF7720F8D8E80000,\n 0x3FEFC07EF9CAA76B, 0x3F86FE53B1500000,\n 0x3FEF4465D3F6F184, 0x3FA11CCCE10F8000,\n 0x3FEECC079F84107F, 0x3FAC4DFC8C8B8000,\n 0x3FEE573A99975AE8, 0x3FB3AA321E574000,\n 0x3FEDE5D6F0BD3DE6, 0x3FB918A0D08B8000,\n 0x3FED77B681FF38B3, 0x3FBE72E9DA044000,\n 0x3FED0CB5724DE943, 0x3FC1DCD2507F6000,\n 0x3FECA4B2DC0E7563, 0x3FC476AB03DEA000,\n 0x3FEC3F8EE8D6CB51, 0x3FC7074377E22000,\n 0x3FEBDD2B4F020C4C, 0x3FC98EDE8BA94000,\n 0x3FEB7D6C006015CA, 0x3FCC0DB86AD2E000,\n 0x3FEB20366E2E338F, 0x3FCE840AAFCEE000,\n 0x3FEAC57026295039, 0x3FD0790AB4678000,\n 0x3FEA6D01BC2731DD, 0x3FD1AC056801C000,\n 0x3FEA16D3BC3FF18B, 0x3FD2DB11D4FEE000,\n 0x3FE9C2D14967FEAD, 0x3FD406464EC58000,\n 0x3FE970E4F47C9902, 0x3FD52DBE093AF000,\n 0x3FE920FB3982BCF2, 0x3FD651902050D000,\n 0x3FE8D30187F759F1, 0x3FD771D2CDEAF000,\n 0x3FE886E5EBB9F66D, 0x3FD88E9C857D9000,\n 0x3FE83C97B658B994, 0x3FD9A80155E16000,\n 0x3FE7F405FFC61022, 0x3FDABE186ED3D000,\n 0x3FE7AD22181415CA, 0x3FDBD0F2AEA0E000,\n 0x3FE767DCF99EFF8C, 0x3FDCE0A43DBF4000\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2_DATA_TAB2 = memory.data([\n // chi , clo\n 0x3FE6200012B90A8E, 0x3C8904AB0644B605,\n 0x3FE66000045734A6, 0x3C61FF9BEA62F7A9,\n 0x3FE69FFFC325F2C5, 0x3C827ECFCB3C90BA,\n 0x3FE6E00038B95A04, 0x3C88FF8856739326,\n 0x3FE71FFFE09994E3, 0x3C8AFD40275F82B1,\n 0x3FE7600015590E10, 0xBC72FD75B4238341,\n 0x3FE7A00012655BD5, 0x3C7808E67C242B76,\n 0x3FE7E0003259E9A6, 0xBC6208E426F622B7,\n 0x3FE81FFFEDB4B2D2, 0xBC8402461EA5C92F,\n 0x3FE860002DFAFCC3, 0x3C6DF7F4A2F29A1F,\n 0x3FE89FFFF78C6B50, 0xBC8E0453094995FD,\n 0x3FE8E00039671566, 0xBC8A04F3BEC77B45,\n 0x3FE91FFFE2BF1745, 0xBC77FA34400E203C,\n 0x3FE95FFFCC5C9FD1, 0xBC76FF8005A0695D,\n 0x3FE9A0003BBA4767, 0x3C70F8C4C4EC7E03,\n 0x3FE9DFFFE7B92DA5, 0x3C8E7FD9478C4602,\n 0x3FEA1FFFD72EFDAF, 0xBC6A0C554DCDAE7E,\n 0x3FEA5FFFDE04FF95, 0x3C867DA98CE9B26B,\n 0x3FEA9FFFCA5E8D2B, 0xBC8284C9B54C13DE,\n 0x3FEADFFFDDAD03EA, 0x3C5812C8EA602E3C,\n 0x3FEB1FFFF10D3D4D, 0xBC8EFADDAD27789C,\n 0x3FEB5FFFCE21165A, 0x3C53CB1719C61237,\n 0x3FEB9FFFD950E674, 0x3C73F7D94194CE00,\n 0x3FEBE000139CA8AF, 0x3C750AC4215D9BC0,\n 0x3FEC20005B46DF99, 0x3C6BEEA653E9C1C9,\n 0x3FEC600040B9F7AE, 0xBC7C079F274A70D6,\n 0x3FECA0006255FD8A, 0xBC7A0B4076E84C1F,\n 0x3FECDFFFD94C095D, 0x3C88F933F99AB5D7,\n 0x3FED1FFFF975D6CF, 0xBC582C08665FE1BE,\n 0x3FED5FFFA2561C93, 0xBC7B04289BD295F3,\n 0x3FED9FFF9D228B0C, 0x3C870251340FA236,\n 0x3FEDE00065BC7E16, 0xBC75011E16A4D80C,\n 0x3FEE200002F64791, 0x3C89802F09EF62E0,\n 0x3FEE600057D7A6D8, 0xBC7E0B75580CF7FA,\n 0x3FEEA00027EDC00C, 0xBC8C848309459811,\n 0x3FEEE0006CF5CB7C, 0xBC8F8027951576F4,\n 0x3FEF2000782B7DCC, 0xBC8F81D97274538F,\n 0x3FEF6000260C450A, 0xBC4071002727FFDC,\n 0x3FEF9FFFE88CD533, 0xBC581BDCE1FDA8B0,\n 0x3FEFDFFFD50F8689, 0x3C87F91ACB918E6E,\n 0x3FF0200004292367, 0x3C9B7FF365324681,\n 0x3FF05FFFE3E3D668, 0x3C86FA08DDAE957B,\n 0x3FF0A0000A85A757, 0xBC57E2DE80D3FB91,\n 0x3FF0E0001A5F3FCC, 0xBC91823305C5F014,\n 0x3FF11FFFF8AFBAF5, 0xBC8BFABB6680BAC2,\n 0x3FF15FFFE54D91AD, 0xBC9D7F121737E7EF,\n 0x3FF1A00011AC36E1, 0x3C9C000A0516F5FF,\n 0x3FF1E00019C84248, 0xBC9082FBE4DA5DA0,\n 0x3FF220000FFE5E6E, 0xBC88FDD04C9CFB43,\n 0x3FF26000269FD891, 0x3C8CFE2A7994D182,\n 0x3FF2A00029A6E6DA, 0xBC700273715E8BC5,\n 0x3FF2DFFFE0293E39, 0x3C9B7C39DAB2A6F9,\n 0x3FF31FFFF7DCF082, 0x3C7DF1336EDC5254,\n 0x3FF35FFFF05A8B60, 0xBC9E03564CCD31EB,\n 0x3FF3A0002E0EAECC, 0x3C75F0E74BD3A477,\n 0x3FF3E000043BB236, 0x3C9C7DCB149D8833,\n 0x3FF4200002D187FF, 0x3C7E08AFCF2D3D28,\n 0x3FF460000D387CB1, 0x3C820837856599A6,\n 0x3FF4A00004569F89, 0xBC89FA5C904FBCD2,\n 0x3FF4E000043543F3, 0xBC781125ED175329,\n 0x3FF51FFFCC027F0F, 0x3C9883D8847754DC,\n 0x3FF55FFFFD87B36F, 0xBC8709E731D02807,\n 0x3FF59FFFF21DF7BA, 0x3C87F79F68727B02,\n 0x3FF5DFFFEBFC3481, 0xBC9180902E30E93E\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function log2_lut(x: f64): f64 {\n const N_MASK = (1 << LOG2_TABLE_BITS) - 1;\n\n const\n LO: u64 = 0x3FEEA4AF00000000, // reinterpret(1.0 - 0x1.5b51p-5)\n HI: u64 = 0x3FF0B55900000000; // reinterpret(1.0 + 0x1.6ab2p-5)\n\n const\n InvLn2hi = reinterpret(0x3FF7154765200000), // 0x1.7154765200000p+0\n InvLn2lo = reinterpret(0x3DE705FC2EEFA200), // 0x1.705fc2eefa200p-33\n Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n const\n B0 = reinterpret(0xBFE71547652B82FE), // -0x1.71547652b82fep-1\n B1 = reinterpret(0x3FDEC709DC3A03F7), // 0x1.ec709dc3a03f7p-2\n B2 = reinterpret(0xBFD71547652B7C3F), // -0x1.71547652b7c3fp-2\n B3 = reinterpret(0x3FD2776C50F05BE4), // 0x1.2776c50f05be4p-2\n B4 = reinterpret(0xBFCEC709DD768FE5), // -0x1.ec709dd768fe5p-3\n B5 = reinterpret(0x3FCA61761EC4E736), // 0x1.a61761ec4e736p-3\n B6 = reinterpret(0xBFC7153FBC64A79B), // -0x1.7153fbc64a79bp-3\n B7 = reinterpret(0x3FC484D154F01B4A), // 0x1.484d154f01b4ap-3\n B8 = reinterpret(0xBFC289E4A72C383C), // -0x1.289e4a72c383cp-3\n B9 = reinterpret(0x3FC0B32F285AEE66); // 0x1.0b32f285aee66p-3\n\n const\n A0 = reinterpret(0xBFE71547652B8339), // -0x1.71547652b8339p-1\n A1 = reinterpret(0x3FDEC709DC3A04BE), // 0x1.ec709dc3a04bep-2\n A2 = reinterpret(0xBFD7154764702FFB), // -0x1.7154764702ffbp-2\n A3 = reinterpret(0x3FD2776C50034C48), // 0x1.2776c50034c48p-2\n A4 = reinterpret(0xBFCEC7B328EA92BC), // -0x1.ec7b328ea92bcp-3\n A5 = reinterpret(0x3FCA6225E117F92E); // 0x1.a6225e117f92ep-3\n\n let ix = reinterpret(x);\n if (ix - LO < HI - LO) {\n let r = x - 1.0;\n // #if __FP_FAST_FMA\n // hi = r * InvLn2hi;\n // lo = r * InvLn2lo + __builtin_fma(r, InvLn2hi, -hi);\n // #else\n let rhi = reinterpret(reinterpret(r) & 0xFFFFFFFF00000000);\n let rlo = r - rhi;\n let hi = rhi * InvLn2hi;\n let lo = rlo * InvLn2hi + r * InvLn2lo;\n // #endif\n let r2 = r * r; // rounding error: 0x1p-62\n let r4 = r2 * r2;\n // Worst-case error is less than 0.54 ULP (0.55 ULP without fma)\n let p = r2 * (B0 + r * B1);\n let y = hi + p;\n lo += hi - y + p;\n lo += r4 * (B2 + r * B3 + r2 * (B4 + r * B5) +\n r4 * (B6 + r * B7 + r2 * (B8 + r * B9)));\n return y + lo;\n }\n let top = u32(ix >> 48);\n if (top - 0x0010 >= 0x7ff0 - 0x0010) {\n // x < 0x1p-1022 or inf or nan.\n if ((ix << 1) == 0) return -1.0 / (x * x);\n if (ix == 0x7FF0000000000000) return x; // log(inf) == inf\n if ((top & 0x8000) || (top & 0x7FF0) == 0x7FF0) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ix = reinterpret(x * Ox1p52);\n ix -= u64(52) << 52;\n }\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ix - 0x3FE6000000000000;\n let i = ((tmp >> (52 - LOG2_TABLE_BITS)) & N_MASK);\n let k = tmp >> 52;\n let iz = ix - (tmp & 0xFFF0000000000000);\n\n let invc = load(LOG2_DATA_TAB1 + (i << (1 + alignof())), 0 << alignof()); // T[i].invc;\n let logc = load(LOG2_DATA_TAB1 + (i << (1 + alignof())), 1 << alignof()); // T[i].logc;\n let z = reinterpret(iz);\n let kd = k;\n\n // log2(x) = log2(z/c) + log2(c) + k.\n // r ~= z/c - 1, |r| < 1/(2*N).\n // #if __FP_FAST_FMA\n // \t// rounding error: 0x1p-55/N.\n // \tr = __builtin_fma(z, invc, -1.0);\n // \tt1 = r * InvLn2hi;\n // \tt2 = r * InvLn2lo + __builtin_fma(r, InvLn2hi, -t1);\n // #else\n // rounding error: 0x1p-55/N + 0x1p-65.\n let chi = load(LOG2_DATA_TAB2 + (i << (1 + alignof())), 0 << alignof()); // T[i].chi;\n let clo = load(LOG2_DATA_TAB2 + (i << (1 + alignof())), 1 << alignof()); // T[i].clo;\n\n let r = (z - chi - clo) * invc;\n let rhi = reinterpret(reinterpret(r) & 0xFFFFFFFF00000000);\n let rlo = r - rhi;\n let t1 = rhi * InvLn2hi;\n let t2 = rlo * InvLn2hi + r * InvLn2lo;\n // #endif\n\n // hi + lo = r/ln2 + log2(c) + k\n let t3 = kd + logc;\n let hi = t3 + t1;\n let lo = t3 - hi + t1 + t2;\n\n // log2(r+1) = r/ln2 + r^2*poly(r)\n // Evaluation is optimized assuming superscalar pipelined execution\n let r2 = r * r; // rounding error: 0x1p-54/N^2\n // Worst-case error if |y| > 0x1p-4: 0.547 ULP (0.550 ULP without fma).\n // ~ 0.5 + 2/N/ln2 + abs-poly-error*0x1p56 ULP (+ 0.003 ULP without fma).\n let p = A0 + r * A1 + r2 * (A2 + r * A3) + (r2 * r2) * (A4 + r * A5);\n return lo + r2 * p + hi;\n}\n\n//\n// Lookup data for log. See: https://git.musl-libc.org/cgit/musl/tree/src/math/log.c\n//\n\n// @ts-ignore: decorator\n@inline const LOG_TABLE_BITS = 7;\n\n/* Algorithm:\n\n x = 2^k z\n log(x) = k ln2 + log(c) + log(z/c)\n log(z/c) = poly(z/c - 1)\n\nwhere z is in [1.6p-1; 1.6p0] which is split into N subintervals and z falls\ninto the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = (double)log(c)\n tab2[i].chi = (double)c\n tab2[i].clo = (double)(c - (double)c)\n\nwhere c is near the center of the subinterval and is chosen by trying +-2^29\nfloating point invc candidates around 1/center and selecting one for which\n\n 1) the rounding error in 0x1.8p9 + logc is 0,\n 2) the rounding error in z - chi - clo is < 0x1p-66 and\n 3) the rounding error in (double)log(c) is minimized (< 0x1p-66).\n\nNote: 1) ensures that k*ln2hi + logc can be computed without rounding error,\n2) ensures that z/c - 1 can be computed as (z - chi - clo)*invc with close to\na single rounding error when there is no fast fma for z*invc - 1, 3) ensures\nthat logc + poly(z/c - 1) has small error, however near x == 1 when\n|log(x)| < 0x1p-4, this is not enough so that is special cased.*/\n\n// @ts-ignore: decorator\n@lazy @inline const LOG_DATA_TAB1 = memory.data([\n // invc , logc\n 0x3FF734F0C3E0DE9F, 0xBFD7CC7F79E69000,\n 0x3FF713786A2CE91F, 0xBFD76FEEC20D0000,\n 0x3FF6F26008FAB5A0, 0xBFD713E31351E000,\n 0x3FF6D1A61F138C7D, 0xBFD6B85B38287800,\n 0x3FF6B1490BC5B4D1, 0xBFD65D5590807800,\n 0x3FF69147332F0CBA, 0xBFD602D076180000,\n 0x3FF6719F18224223, 0xBFD5A8CA86909000,\n 0x3FF6524F99A51ED9, 0xBFD54F4356035000,\n 0x3FF63356AA8F24C4, 0xBFD4F637C36B4000,\n 0x3FF614B36B9DDC14, 0xBFD49DA7FDA85000,\n 0x3FF5F66452C65C4C, 0xBFD445923989A800,\n 0x3FF5D867B5912C4F, 0xBFD3EDF439B0B800,\n 0x3FF5BABCCB5B90DE, 0xBFD396CE448F7000,\n 0x3FF59D61F2D91A78, 0xBFD3401E17BDA000,\n 0x3FF5805612465687, 0xBFD2E9E2EF468000,\n 0x3FF56397CEE76BD3, 0xBFD2941B3830E000,\n 0x3FF54725E2A77F93, 0xBFD23EC58CDA8800,\n 0x3FF52AFF42064583, 0xBFD1E9E129279000,\n 0x3FF50F22DBB2BDDF, 0xBFD1956D2B48F800,\n 0x3FF4F38F4734DED7, 0xBFD141679AB9F800,\n 0x3FF4D843CFDE2840, 0xBFD0EDD094EF9800,\n 0x3FF4BD3EC078A3C8, 0xBFD09AA518DB1000,\n 0x3FF4A27FC3E0258A, 0xBFD047E65263B800,\n 0x3FF4880524D48434, 0xBFCFEB224586F000,\n 0x3FF46DCE1B192D0B, 0xBFCF474A7517B000,\n 0x3FF453D9D3391854, 0xBFCEA4443D103000,\n 0x3FF43A2744B4845A, 0xBFCE020D44E9B000,\n 0x3FF420B54115F8FB, 0xBFCD60A22977F000,\n 0x3FF40782DA3EF4B1, 0xBFCCC00104959000,\n 0x3FF3EE8F5D57FE8F, 0xBFCC202956891000,\n 0x3FF3D5D9A00B4CE9, 0xBFCB81178D811000,\n 0x3FF3BD60C010C12B, 0xBFCAE2C9CCD3D000,\n 0x3FF3A5242B75DAB8, 0xBFCA45402E129000,\n 0x3FF38D22CD9FD002, 0xBFC9A877681DF000,\n 0x3FF3755BC5847A1C, 0xBFC90C6D69483000,\n 0x3FF35DCE49AD36E2, 0xBFC87120A645C000,\n 0x3FF34679984DD440, 0xBFC7D68FB4143000,\n 0x3FF32F5CCEFFCB24, 0xBFC73CB83C627000,\n 0x3FF3187775A10D49, 0xBFC6A39A9B376000,\n 0x3FF301C8373E3990, 0xBFC60B3154B7A000,\n 0x3FF2EB4EBB95F841, 0xBFC5737D76243000,\n 0x3FF2D50A0219A9D1, 0xBFC4DC7B8FC23000,\n 0x3FF2BEF9A8B7FD2A, 0xBFC4462C51D20000,\n 0x3FF2A91C7A0C1BAB, 0xBFC3B08ABC830000,\n 0x3FF293726014B530, 0xBFC31B996B490000,\n 0x3FF27DFA5757A1F5, 0xBFC2875490A44000,\n 0x3FF268B39B1D3BBF, 0xBFC1F3B9F879A000,\n 0x3FF2539D838FF5BD, 0xBFC160C8252CA000,\n 0x3FF23EB7AAC9083B, 0xBFC0CE7F57F72000,\n 0x3FF22A012BA940B6, 0xBFC03CDC49FEA000,\n 0x3FF2157996CC4132, 0xBFBF57BDBC4B8000,\n 0x3FF201201DD2FC9B, 0xBFBE370896404000,\n 0x3FF1ECF4494D480B, 0xBFBD17983EF94000,\n 0x3FF1D8F5528F6569, 0xBFBBF9674ED8A000,\n 0x3FF1C52311577E7C, 0xBFBADC79202F6000,\n 0x3FF1B17C74CB26E9, 0xBFB9C0C3E7288000,\n 0x3FF19E010C2C1AB6, 0xBFB8A646B372C000,\n 0x3FF18AB07BB670BD, 0xBFB78D01B3AC0000,\n 0x3FF1778A25EFBCB6, 0xBFB674F145380000,\n 0x3FF1648D354C31DA, 0xBFB55E0E6D878000,\n 0x3FF151B990275FDD, 0xBFB4485CDEA1E000,\n 0x3FF13F0EA432D24C, 0xBFB333D94D6AA000,\n 0x3FF12C8B7210F9DA, 0xBFB22079F8C56000,\n 0x3FF11A3028ECB531, 0xBFB10E4698622000,\n 0x3FF107FBDA8434AF, 0xBFAFFA6C6AD20000,\n 0x3FF0F5EE0F4E6BB3, 0xBFADDA8D4A774000,\n 0x3FF0E4065D2A9FCE, 0xBFABBCECE4850000,\n 0x3FF0D244632CA521, 0xBFA9A1894012C000,\n 0x3FF0C0A77CE2981A, 0xBFA788583302C000,\n 0x3FF0AF2F83C636D1, 0xBFA5715E67D68000,\n 0x3FF09DDB98A01339, 0xBFA35C8A49658000,\n 0x3FF08CABAF52E7DF, 0xBFA149E364154000,\n 0x3FF07B9F2F4E28FB, 0xBF9E72C082EB8000,\n 0x3FF06AB58C358F19, 0xBF9A55F152528000,\n 0x3FF059EEA5ECF92C, 0xBF963D62CF818000,\n 0x3FF04949CDD12C90, 0xBF9228FB8CAA0000,\n 0x3FF038C6C6F0ADA9, 0xBF8C317B20F90000,\n 0x3FF02865137932A9, 0xBF8419355DAA0000,\n 0x3FF0182427EA7348, 0xBF781203C2EC0000,\n 0x3FF008040614B195, 0xBF60040979240000,\n 0x3FEFE01FF726FA1A, 0x3F6FEFF384900000,\n 0x3FEFA11CC261EA74, 0x3F87DC41353D0000,\n 0x3FEF6310B081992E, 0x3F93CEA3C4C28000,\n 0x3FEF25F63CEEADCD, 0x3F9B9FC114890000,\n 0x3FEEE9C8039113E7, 0x3FA1B0D8CE110000,\n 0x3FEEAE8078CBB1AB, 0x3FA58A5BD001C000,\n 0x3FEE741AA29D0C9B, 0x3FA95C8340D88000,\n 0x3FEE3A91830A99B5, 0x3FAD276AEF578000,\n 0x3FEE01E009609A56, 0x3FB07598E598C000,\n 0x3FEDCA01E577BB98, 0x3FB253F5E30D2000,\n 0x3FED92F20B7C9103, 0x3FB42EDD8B380000,\n 0x3FED5CAC66FB5CCE, 0x3FB606598757C000,\n 0x3FED272CAA5EDE9D, 0x3FB7DA76356A0000,\n 0x3FECF26E3E6B2CCD, 0x3FB9AB434E1C6000,\n 0x3FECBE6DA2A77902, 0x3FBB78C7BB0D6000,\n 0x3FEC8B266D37086D, 0x3FBD431332E72000,\n 0x3FEC5894BD5D5804, 0x3FBF0A3171DE6000,\n 0x3FEC26B533BB9F8C, 0x3FC067152B914000,\n 0x3FEBF583EEECE73F, 0x3FC147858292B000,\n 0x3FEBC4FD75DB96C1, 0x3FC2266ECDCA3000,\n 0x3FEB951E0C864A28, 0x3FC303D7A6C55000,\n 0x3FEB65E2C5EF3E2C, 0x3FC3DFC33C331000,\n 0x3FEB374867C9888B, 0x3FC4BA366B7A8000,\n 0x3FEB094B211D304A, 0x3FC5933928D1F000,\n 0x3FEADBE885F2EF7E, 0x3FC66ACD2418F000,\n 0x3FEAAF1D31603DA2, 0x3FC740F8EC669000,\n 0x3FEA82E63FD358A7, 0x3FC815C0F51AF000,\n 0x3FEA5740EF09738B, 0x3FC8E92954F68000,\n 0x3FEA2C2A90AB4B27, 0x3FC9BB3602F84000,\n 0x3FEA01A01393F2D1, 0x3FCA8BED1C2C0000,\n 0x3FE9D79F24DB3C1B, 0x3FCB5B515C01D000,\n 0x3FE9AE2505C7B190, 0x3FCC2967CCBCC000,\n 0x3FE9852EF297CE2F, 0x3FCCF635D5486000,\n 0x3FE95CBAEEA44B75, 0x3FCDC1BD3446C000,\n 0x3FE934C69DE74838, 0x3FCE8C01B8CFE000,\n 0x3FE90D4F2F6752E6, 0x3FCF5509C0179000,\n 0x3FE8E6528EFFD79D, 0x3FD00E6C121FB800,\n 0x3FE8BFCE9FCC007C, 0x3FD071B80E93D000,\n 0x3FE899C0DABEC30E, 0x3FD0D46B9E867000,\n 0x3FE87427AA2317FB, 0x3FD13687334BD000,\n 0x3FE84F00ACB39A08, 0x3FD1980D67234800,\n 0x3FE82A49E8653E55, 0x3FD1F8FFE0CC8000,\n 0x3FE8060195F40260, 0x3FD2595FD7636800,\n 0x3FE7E22563E0A329, 0x3FD2B9300914A800,\n 0x3FE7BEB377DCB5AD, 0x3FD3187210436000,\n 0x3FE79BAA679725C2, 0x3FD377266DEC1800,\n 0x3FE77907F2170657, 0x3FD3D54FFBAF3000,\n 0x3FE756CADBD6130C, 0x3FD432EEE32FE000\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOG_DATA_TAB2 = memory.data([\n // chi , clo\n 0x3FE61000014FB66B, 0x3C7E026C91425B3C,\n 0x3FE63000034DB495, 0x3C8DBFEA48005D41,\n 0x3FE650000D94D478, 0x3C8E7FA786D6A5B7,\n 0x3FE67000074E6FAD, 0x3C61FCEA6B54254C,\n 0x3FE68FFFFEDF0FAE, 0xBC7C7E274C590EFD,\n 0x3FE6B0000763C5BC, 0xBC8AC16848DCDA01,\n 0x3FE6D0001E5CC1F6, 0x3C833F1C9D499311,\n 0x3FE6EFFFEB05F63E, 0xBC7E80041AE22D53,\n 0x3FE710000E869780, 0x3C7BFF6671097952,\n 0x3FE72FFFFC67E912, 0x3C8C00E226BD8724,\n 0x3FE74FFFDF81116A, 0xBC6E02916EF101D2,\n 0x3FE770000F679C90, 0xBC67FC71CD549C74,\n 0x3FE78FFFFA7EC835, 0x3C81BEC19EF50483,\n 0x3FE7AFFFFE20C2E6, 0xBC707E1729CC6465,\n 0x3FE7CFFFED3FC900, 0xBC808072087B8B1C,\n 0x3FE7EFFFE9261A76, 0x3C8DC0286D9DF9AE,\n 0x3FE81000049CA3E8, 0x3C897FD251E54C33,\n 0x3FE8300017932C8F, 0xBC8AFEE9B630F381,\n 0x3FE850000633739C, 0x3C89BFBF6B6535BC,\n 0x3FE87000204289C6, 0xBC8BBF65F3117B75,\n 0x3FE88FFFEBF57904, 0xBC89006EA23DCB57,\n 0x3FE8B00022BC04DF, 0xBC7D00DF38E04B0A,\n 0x3FE8CFFFE50C1B8A, 0xBC88007146FF9F05,\n 0x3FE8EFFFFC918E43, 0x3C83817BD07A7038,\n 0x3FE910001EFA5FC7, 0x3C893E9176DFB403,\n 0x3FE9300013467BB9, 0x3C7F804E4B980276,\n 0x3FE94FFFE6EE076F, 0xBC8F7EF0D9FF622E,\n 0x3FE96FFFDE3C12D1, 0xBC7082AA962638BA,\n 0x3FE98FFFF4458A0D, 0xBC87801B9164A8EF,\n 0x3FE9AFFFDD982E3E, 0xBC8740E08A5A9337,\n 0x3FE9CFFFED49FB66, 0x3C3FCE08C19BE000,\n 0x3FE9F00020F19C51, 0xBC8A3FAA27885B0A,\n 0x3FEA10001145B006, 0x3C74FF489958DA56,\n 0x3FEA300007BBF6FA, 0x3C8CBEAB8A2B6D18,\n 0x3FEA500010971D79, 0x3C88FECADD787930,\n 0x3FEA70001DF52E48, 0xBC8F41763DD8ABDB,\n 0x3FEA90001C593352, 0xBC8EBF0284C27612,\n 0x3FEAB0002A4F3E4B, 0xBC69FD043CFF3F5F,\n 0x3FEACFFFD7AE1ED1, 0xBC823EE7129070B4,\n 0x3FEAEFFFEE510478, 0x3C6A063EE00EDEA3,\n 0x3FEB0FFFDB650D5B, 0x3C5A06C8381F0AB9,\n 0x3FEB2FFFFEAACA57, 0xBC79011E74233C1D,\n 0x3FEB4FFFD995BADC, 0xBC79FF1068862A9F,\n 0x3FEB7000249E659C, 0x3C8AFF45D0864F3E,\n 0x3FEB8FFFF9871640, 0x3C7CFE7796C2C3F9,\n 0x3FEBAFFFD204CB4F, 0xBC63FF27EEF22BC4,\n 0x3FEBCFFFD2415C45, 0xBC6CFFB7EE3BEA21,\n 0x3FEBEFFFF86309DF, 0xBC814103972E0B5C,\n 0x3FEC0FFFE1B57653, 0x3C8BC16494B76A19,\n 0x3FEC2FFFF1FA57E3, 0xBC64FEEF8D30C6ED,\n 0x3FEC4FFFDCBFE424, 0xBC843F68BCEC4775,\n 0x3FEC6FFFED54B9F7, 0x3C847EA3F053E0EC,\n 0x3FEC8FFFEB998FD5, 0x3C7383068DF992F1,\n 0x3FECB0002125219A, 0xBC68FD8E64180E04,\n 0x3FECCFFFDD94469C, 0x3C8E7EBE1CC7EA72,\n 0x3FECEFFFEAFDC476, 0x3C8EBE39AD9F88FE,\n 0x3FED1000169AF82B, 0x3C757D91A8B95A71,\n 0x3FED30000D0FF71D, 0x3C89C1906970C7DA,\n 0x3FED4FFFEA790FC4, 0xBC580E37C558FE0C,\n 0x3FED70002EDC87E5, 0xBC7F80D64DC10F44,\n 0x3FED900021DC82AA, 0xBC747C8F94FD5C5C,\n 0x3FEDAFFFD86B0283, 0x3C8C7F1DC521617E,\n 0x3FEDD000296C4739, 0x3C88019EB2FFB153,\n 0x3FEDEFFFE54490F5, 0x3C6E00D2C652CC89,\n 0x3FEE0FFFCDABF694, 0xBC7F8340202D69D2,\n 0x3FEE2FFFDB52C8DD, 0x3C7B00C1CA1B0864,\n 0x3FEE4FFFF24216EF, 0x3C72FFA8B094AB51,\n 0x3FEE6FFFE88A5E11, 0xBC57F673B1EFBE59,\n 0x3FEE9000119EFF0D, 0xBC84808D5E0BC801,\n 0x3FEEAFFFDFA51744, 0x3C780006D54320B5,\n 0x3FEED0001A127FA1, 0xBC5002F860565C92,\n 0x3FEEF00007BABCC4, 0xBC8540445D35E611,\n 0x3FEF0FFFF57A8D02, 0xBC4FFB3139EF9105,\n 0x3FEF30001EE58AC7, 0x3C8A81ACF2731155,\n 0x3FEF4FFFF5823494, 0x3C8A3F41D4D7C743,\n 0x3FEF6FFFFCA94C6B, 0xBC6202F41C987875,\n 0x3FEF8FFFE1F9C441, 0x3C777DD1F477E74B,\n 0x3FEFAFFFD2E0E37E, 0xBC6F01199A7CA331,\n 0x3FEFD0001C77E49E, 0x3C7181EE4BCEACB1,\n 0x3FEFEFFFF7E0C331, 0xBC6E05370170875A,\n 0x3FF00FFFF465606E, 0xBC8A7EAD491C0ADA,\n 0x3FF02FFFF3867A58, 0xBC977F69C3FCB2E0,\n 0x3FF04FFFFDFC0D17, 0x3C97BFFE34CB945B,\n 0x3FF0700003CD4D82, 0x3C820083C0E456CB,\n 0x3FF08FFFF9F2CBE8, 0xBC6DFFDFBE37751A,\n 0x3FF0B000010CDA65, 0xBC913F7FAEE626EB,\n 0x3FF0D00001A4D338, 0x3C807DFA79489FF7,\n 0x3FF0EFFFFADAFDFD, 0xBC77040570D66BC0,\n 0x3FF110000BBAFD96, 0x3C8E80D4846D0B62,\n 0x3FF12FFFFAE5F45D, 0x3C9DBFFA64FD36EF,\n 0x3FF150000DD59AD9, 0x3C9A0077701250AE,\n 0x3FF170000F21559A, 0x3C8DFDF9E2E3DEEE,\n 0x3FF18FFFFC275426, 0x3C910030DC3B7273,\n 0x3FF1B000123D3C59, 0x3C997F7980030188,\n 0x3FF1CFFFF8299EB7, 0xBC65F932AB9F8C67,\n 0x3FF1EFFFF48AD400, 0x3C937FBF9DA75BEB,\n 0x3FF210000C8B86A4, 0x3C9F806B91FD5B22,\n 0x3FF2300003854303, 0x3C93FFC2EB9FBF33,\n 0x3FF24FFFFFBCF684, 0x3C7601E77E2E2E72,\n 0x3FF26FFFF52921D9, 0x3C7FFCBB767F0C61,\n 0x3FF2900014933A3C, 0xBC7202CA3C02412B,\n 0x3FF2B00014556313, 0xBC92808233F21F02,\n 0x3FF2CFFFEBFE523B, 0xBC88FF7E384FDCF2,\n 0x3FF2F0000BB8AD96, 0xBC85FF51503041C5,\n 0x3FF30FFFFB7AE2AF, 0xBC810071885E289D,\n 0x3FF32FFFFEAC5F7F, 0xBC91FF5D3FB7B715,\n 0x3FF350000CA66756, 0x3C957F82228B82BD,\n 0x3FF3700011FBF721, 0x3C8000BAC40DD5CC,\n 0x3FF38FFFF9592FB9, 0xBC943F9D2DB2A751,\n 0x3FF3B00004DDD242, 0x3C857F6B707638E1,\n 0x3FF3CFFFF5B2C957, 0x3C7A023A10BF1231,\n 0x3FF3EFFFEAB0B418, 0x3C987F6D66B152B0,\n 0x3FF410001532AFF4, 0x3C67F8375F198524,\n 0x3FF4300017478B29, 0x3C8301E672DC5143,\n 0x3FF44FFFE795B463, 0x3C89FF69B8B2895A,\n 0x3FF46FFFE80475E0, 0xBC95C0B19BC2F254,\n 0x3FF48FFFEF6FC1E7, 0x3C9B4009F23A2A72,\n 0x3FF4AFFFE5BEA704, 0xBC94FFB7BF0D7D45,\n 0x3FF4D000171027DE, 0xBC99C06471DC6A3D,\n 0x3FF4F0000FF03EE2, 0x3C977F890B85531C,\n 0x3FF5100012DC4BD1, 0x3C6004657166A436,\n 0x3FF530001605277A, 0xBC96BFCECE233209,\n 0x3FF54FFFECDB704C, 0xBC8902720505A1D7,\n 0x3FF56FFFEF5F54A9, 0x3C9BBFE60EC96412,\n 0x3FF5900017E61012, 0x3C887EC581AFEF90,\n 0x3FF5B00003C93E92, 0xBC9F41080ABF0CC0,\n 0x3FF5D0001D4919BC, 0xBC98812AFB254729,\n 0x3FF5EFFFE7B87A89, 0xBC947EB780ED6904\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function log_lut(x: f64): f64 {\n const N_MASK = (1 << LOG_TABLE_BITS) - 1;\n\n const\n B0 = reinterpret(0xBFE0000000000000), // -0x1p-1\n B1 = reinterpret(0x3FD5555555555577), // 0x1.5555555555577p-2\n B2 = reinterpret(0xBFCFFFFFFFFFFDCB), // -0x1.ffffffffffdcbp-3\n B3 = reinterpret(0x3FC999999995DD0C), // 0x1.999999995dd0cp-3\n B4 = reinterpret(0xBFC55555556745A7), // -0x1.55555556745a7p-3\n B5 = reinterpret(0x3FC24924A344DE30), // 0x1.24924a344de3p-3\n B6 = reinterpret(0xBFBFFFFFA4423D65), // -0x1.fffffa4423d65p-4\n B7 = reinterpret(0x3FBC7184282AD6CA), // 0x1.c7184282ad6cap-4\n B8 = reinterpret(0xBFB999EB43B068FF), // -0x1.999eb43b068ffp-4\n B9 = reinterpret(0x3FB78182F7AFD085), // 0x1.78182f7afd085p-4\n B10 = reinterpret(0xBFB5521375D145CD); // -0x1.5521375d145cdp-4\n\n const\n A0 = reinterpret(0xBFE0000000000001), // -0x1.0000000000001p-1\n A1 = reinterpret(0x3FD555555551305B), // 0x1.555555551305bp-2\n A2 = reinterpret(0xBFCFFFFFFFEB4590), // -0x1.fffffffeb459p-3\n A3 = reinterpret(0x3FC999B324F10111), // 0x1.999b324f10111p-3\n A4 = reinterpret(0xBFC55575E506C89F); // -0x1.55575e506c89fp-3\n\n const\n LO: u64 = 0x3FEE000000000000,\n HI: u64 = 0x3FF1090000000000;\n\n const\n Ln2hi = reinterpret(0x3FE62E42FEFA3800), // 0x1.62e42fefa3800p-1\n Ln2lo = reinterpret(0x3D2EF35793C76730), // 0x1.ef35793c76730p-45\n Ox1p27 = reinterpret(0x41A0000000000000), // 0x1p27\n Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n let ix = reinterpret(x);\n if (ix - LO < HI - LO) {\n let r = x - 1.0;\n let r2 = r * r;\n let r3 = r2 * r;\n let y =\n r3 * (B1 + r * B2 + r2 * B3 +\n r3 * (B4 + r * B5 + r2 * B6 +\n r3 * (B7 + r * B8 + r2 * B9 + r3 * B10)));\n // Worst-case error is around 0.507 ULP\n let w = r * Ox1p27;\n let rhi = r + w - w;\n let rlo = r - rhi;\n w = rhi * rhi * B0; // B[0] == -0.5\n let hi = r + w;\n let lo = r - hi + w;\n lo += B0 * rlo * (rhi + r);\n return y + lo + hi;\n }\n let top = u32(ix >> 48);\n if (top - 0x0010 >= 0x7FF0 - 0x0010) {\n // x < 0x1p-1022 or inf or nan\n if ((ix << 1) == 0) return -1.0 / (x * x);\n if (ix == reinterpret(Infinity)) return x; // log(inf) == inf\n if ((top & 0x8000) || (top & 0x7FF0) == 0x7FF0) return (x - x) / (x - x);\n // x is subnormal, normalize it\n ix = reinterpret(x * Ox1p52);\n ix -= u64(52) << 52;\n }\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ix - 0x3FE6000000000000;\n let i = ((tmp >> (52 - LOG_TABLE_BITS)) & N_MASK);\n let k = tmp >> 52;\n let iz = ix - (tmp & (u64(0xFFF) << 52));\n\n let invc = load(LOG_DATA_TAB1 + (i << (1 + alignof())), 0 << alignof()); // T[i].invc;\n let logc = load(LOG_DATA_TAB1 + (i << (1 + alignof())), 1 << alignof()); // T[i].logc;\n let z = reinterpret(iz);\n\n // log(x) = log1p(z/c-1) + log(c) + k*Ln2.\n // r ~= z/c - 1, |r| < 1/(2*N)\n // #if __FP_FAST_FMA\n // \t// rounding error: 0x1p-55/N\n // \tr = __builtin_fma(z, invc, -1.0);\n // #else\n // rounding error: 0x1p-55/N + 0x1p-66\n const chi = load(LOG_DATA_TAB2 + (i << (1 + alignof())), 0 << alignof()); // T2[i].chi\n const clo = load(LOG_DATA_TAB2 + (i << (1 + alignof())), 1 << alignof()); // T2[i].clo\n let r = (z - chi - clo) * invc;\n // #endif\n let kd = k;\n\n // hi + lo = r + log(c) + k*Ln2\n let w = kd * Ln2hi + logc;\n let hi = w + r;\n let lo = w - hi + r + kd * Ln2lo;\n\n // log(x) = lo + (log1p(r) - r) + hi\n let r2 = r * r; // rounding error: 0x1p-54/N^2\n // Worst case error if |y| > 0x1p-5:\n // 0.5 + 4.13/N + abs-poly-error*2^57 ULP (+ 0.002 ULP without fma)\n // Worst case error if |y| > 0x1p-4:\n // 0.5 + 2.06/N + abs-poly-error*2^56 ULP (+ 0.001 ULP without fma).\n return lo + r2 * A0 + r * r2 * (A1 + r * A2 + r2 * (A3 + r * A4)) + hi;\n}\n\n//\n// Lookup data for pow. See: https://git.musl-libc.org/cgit/musl/tree/src/math/pow.c\n//\n\n// @ts-ignore: decorator\n@inline const POW_LOG_TABLE_BITS = 7;\n\n/* Algorithm:\n\n x = 2^k z\n log(x) = k ln2 + log(c) + log(z/c)\n log(z/c) = poly(z/c - 1)\n\nwhere z is in [0x1.69555p-1; 0x1.69555p0] which is split into N subintervals\nand z falls into the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = round(0x1p43*log(c))/0x1p43\n tab[i].logctail = (double)(log(c) - logc)\n\nwhere c is chosen near the center of the subinterval such that 1/c has only a\nfew precision bits so z/c - 1 is exactly representible as double:\n\n 1/c = center < 1 ? round(N/center)/N : round(2*N/center)/N/2\n\nNote: |z/c - 1| < 1/N for the chosen c, |log(c) - logc - logctail| < 0x1p-97,\nthe last few bits of logc are rounded away so k*ln2hi + logc has no rounding\nerror and the interval for z is selected such that near x == 1, where log(x)\nis tiny, large cancellation error is avoided in logc + poly(z/c - 1). */\n\n// @ts-ignore: decorator\n@lazy @inline const POW_LOG_DATA_TAB = memory.data([\n // invc ,pad, logc , logctail\n 0x3FF6A00000000000, 0, 0xBFD62C82F2B9C800, 0x3CFAB42428375680,\n 0x3FF6800000000000, 0, 0xBFD5D1BDBF580800, 0xBD1CA508D8E0F720,\n 0x3FF6600000000000, 0, 0xBFD5767717455800, 0xBD2362A4D5B6506D,\n 0x3FF6400000000000, 0, 0xBFD51AAD872DF800, 0xBCE684E49EB067D5,\n 0x3FF6200000000000, 0, 0xBFD4BE5F95777800, 0xBD041B6993293EE0,\n 0x3FF6000000000000, 0, 0xBFD4618BC21C6000, 0x3D13D82F484C84CC,\n 0x3FF5E00000000000, 0, 0xBFD404308686A800, 0x3CDC42F3ED820B3A,\n 0x3FF5C00000000000, 0, 0xBFD3A64C55694800, 0x3D20B1C686519460,\n 0x3FF5A00000000000, 0, 0xBFD347DD9A988000, 0x3D25594DD4C58092,\n 0x3FF5800000000000, 0, 0xBFD2E8E2BAE12000, 0x3D267B1E99B72BD8,\n 0x3FF5600000000000, 0, 0xBFD2895A13DE8800, 0x3D15CA14B6CFB03F,\n 0x3FF5600000000000, 0, 0xBFD2895A13DE8800, 0x3D15CA14B6CFB03F,\n 0x3FF5400000000000, 0, 0xBFD22941FBCF7800, 0xBD165A242853DA76,\n 0x3FF5200000000000, 0, 0xBFD1C898C1699800, 0xBD1FAFBC68E75404,\n 0x3FF5000000000000, 0, 0xBFD1675CABABA800, 0x3D1F1FC63382A8F0,\n 0x3FF4E00000000000, 0, 0xBFD1058BF9AE4800, 0xBD26A8C4FD055A66,\n 0x3FF4C00000000000, 0, 0xBFD0A324E2739000, 0xBD0C6BEE7EF4030E,\n 0x3FF4A00000000000, 0, 0xBFD0402594B4D000, 0xBCF036B89EF42D7F,\n 0x3FF4A00000000000, 0, 0xBFD0402594B4D000, 0xBCF036B89EF42D7F,\n 0x3FF4800000000000, 0, 0xBFCFB9186D5E4000, 0x3D0D572AAB993C87,\n 0x3FF4600000000000, 0, 0xBFCEF0ADCBDC6000, 0x3D2B26B79C86AF24,\n 0x3FF4400000000000, 0, 0xBFCE27076E2AF000, 0xBD172F4F543FFF10,\n 0x3FF4200000000000, 0, 0xBFCD5C216B4FC000, 0x3D21BA91BBCA681B,\n 0x3FF4000000000000, 0, 0xBFCC8FF7C79AA000, 0x3D27794F689F8434,\n 0x3FF4000000000000, 0, 0xBFCC8FF7C79AA000, 0x3D27794F689F8434,\n 0x3FF3E00000000000, 0, 0xBFCBC286742D9000, 0x3D194EB0318BB78F,\n 0x3FF3C00000000000, 0, 0xBFCAF3C94E80C000, 0x3CBA4E633FCD9066,\n 0x3FF3A00000000000, 0, 0xBFCA23BC1FE2B000, 0xBD258C64DC46C1EA,\n 0x3FF3A00000000000, 0, 0xBFCA23BC1FE2B000, 0xBD258C64DC46C1EA,\n 0x3FF3800000000000, 0, 0xBFC9525A9CF45000, 0xBD2AD1D904C1D4E3,\n 0x3FF3600000000000, 0, 0xBFC87FA06520D000, 0x3D2BBDBF7FDBFA09,\n 0x3FF3400000000000, 0, 0xBFC7AB890210E000, 0x3D2BDB9072534A58,\n 0x3FF3400000000000, 0, 0xBFC7AB890210E000, 0x3D2BDB9072534A58,\n 0x3FF3200000000000, 0, 0xBFC6D60FE719D000, 0xBD10E46AA3B2E266,\n 0x3FF3000000000000, 0, 0xBFC5FF3070A79000, 0xBD1E9E439F105039,\n 0x3FF3000000000000, 0, 0xBFC5FF3070A79000, 0xBD1E9E439F105039,\n 0x3FF2E00000000000, 0, 0xBFC526E5E3A1B000, 0xBD20DE8B90075B8F,\n 0x3FF2C00000000000, 0, 0xBFC44D2B6CCB8000, 0x3D170CC16135783C,\n 0x3FF2C00000000000, 0, 0xBFC44D2B6CCB8000, 0x3D170CC16135783C,\n 0x3FF2A00000000000, 0, 0xBFC371FC201E9000, 0x3CF178864D27543A,\n 0x3FF2800000000000, 0, 0xBFC29552F81FF000, 0xBD248D301771C408,\n 0x3FF2600000000000, 0, 0xBFC1B72AD52F6000, 0xBD2E80A41811A396,\n 0x3FF2600000000000, 0, 0xBFC1B72AD52F6000, 0xBD2E80A41811A396,\n 0x3FF2400000000000, 0, 0xBFC0D77E7CD09000, 0x3D0A699688E85BF4,\n 0x3FF2400000000000, 0, 0xBFC0D77E7CD09000, 0x3D0A699688E85BF4,\n 0x3FF2200000000000, 0, 0xBFBFEC9131DBE000, 0xBD2575545CA333F2,\n 0x3FF2000000000000, 0, 0xBFBE27076E2B0000, 0x3D2A342C2AF0003C,\n 0x3FF2000000000000, 0, 0xBFBE27076E2B0000, 0x3D2A342C2AF0003C,\n 0x3FF1E00000000000, 0, 0xBFBC5E548F5BC000, 0xBD1D0C57585FBE06,\n 0x3FF1C00000000000, 0, 0xBFBA926D3A4AE000, 0x3D253935E85BAAC8,\n 0x3FF1C00000000000, 0, 0xBFBA926D3A4AE000, 0x3D253935E85BAAC8,\n 0x3FF1A00000000000, 0, 0xBFB8C345D631A000, 0x3D137C294D2F5668,\n 0x3FF1A00000000000, 0, 0xBFB8C345D631A000, 0x3D137C294D2F5668,\n 0x3FF1800000000000, 0, 0xBFB6F0D28AE56000, 0xBD269737C93373DA,\n 0x3FF1600000000000, 0, 0xBFB51B073F062000, 0x3D1F025B61C65E57,\n 0x3FF1600000000000, 0, 0xBFB51B073F062000, 0x3D1F025B61C65E57,\n 0x3FF1400000000000, 0, 0xBFB341D7961BE000, 0x3D2C5EDACCF913DF,\n 0x3FF1400000000000, 0, 0xBFB341D7961BE000, 0x3D2C5EDACCF913DF,\n 0x3FF1200000000000, 0, 0xBFB16536EEA38000, 0x3D147C5E768FA309,\n 0x3FF1000000000000, 0, 0xBFAF0A30C0118000, 0x3D2D599E83368E91,\n 0x3FF1000000000000, 0, 0xBFAF0A30C0118000, 0x3D2D599E83368E91,\n 0x3FF0E00000000000, 0, 0xBFAB42DD71198000, 0x3D1C827AE5D6704C,\n 0x3FF0E00000000000, 0, 0xBFAB42DD71198000, 0x3D1C827AE5D6704C,\n 0x3FF0C00000000000, 0, 0xBFA77458F632C000, 0xBD2CFC4634F2A1EE,\n 0x3FF0C00000000000, 0, 0xBFA77458F632C000, 0xBD2CFC4634F2A1EE,\n 0x3FF0A00000000000, 0, 0xBFA39E87B9FEC000, 0x3CF502B7F526FEAA,\n 0x3FF0A00000000000, 0, 0xBFA39E87B9FEC000, 0x3CF502B7F526FEAA,\n 0x3FF0800000000000, 0, 0xBF9F829B0E780000, 0xBD2980267C7E09E4,\n 0x3FF0800000000000, 0, 0xBF9F829B0E780000, 0xBD2980267C7E09E4,\n 0x3FF0600000000000, 0, 0xBF97B91B07D58000, 0xBD288D5493FAA639,\n 0x3FF0400000000000, 0, 0xBF8FC0A8B0FC0000, 0xBCDF1E7CF6D3A69C,\n 0x3FF0400000000000, 0, 0xBF8FC0A8B0FC0000, 0xBCDF1E7CF6D3A69C,\n 0x3FF0200000000000, 0, 0xBF7FE02A6B100000, 0xBD19E23F0DDA40E4,\n 0x3FF0200000000000, 0, 0xBF7FE02A6B100000, 0xBD19E23F0DDA40E4,\n 0x3FF0000000000000, 0, 0, 0,\n 0x3FF0000000000000, 0, 0, 0,\n 0x3FEFC00000000000, 0, 0x3F80101575890000, 0xBD10C76B999D2BE8,\n 0x3FEF800000000000, 0, 0x3F90205658938000, 0xBD23DC5B06E2F7D2,\n 0x3FEF400000000000, 0, 0x3F98492528C90000, 0xBD2AA0BA325A0C34,\n 0x3FEF000000000000, 0, 0x3FA0415D89E74000, 0x3D0111C05CF1D753,\n 0x3FEEC00000000000, 0, 0x3FA466AED42E0000, 0xBD2C167375BDFD28,\n 0x3FEE800000000000, 0, 0x3FA894AA149FC000, 0xBD197995D05A267D,\n 0x3FEE400000000000, 0, 0x3FACCB73CDDDC000, 0xBD1A68F247D82807,\n 0x3FEE200000000000, 0, 0x3FAEEA31C006C000, 0xBD0E113E4FC93B7B,\n 0x3FEDE00000000000, 0, 0x3FB1973BD1466000, 0xBD25325D560D9E9B,\n 0x3FEDA00000000000, 0, 0x3FB3BDF5A7D1E000, 0x3D2CC85EA5DB4ED7,\n 0x3FED600000000000, 0, 0x3FB5E95A4D97A000, 0xBD2C69063C5D1D1E,\n 0x3FED400000000000, 0, 0x3FB700D30AEAC000, 0x3CEC1E8DA99DED32,\n 0x3FED000000000000, 0, 0x3FB9335E5D594000, 0x3D23115C3ABD47DA,\n 0x3FECC00000000000, 0, 0x3FBB6AC88DAD6000, 0xBD1390802BF768E5,\n 0x3FECA00000000000, 0, 0x3FBC885801BC4000, 0x3D2646D1C65AACD3,\n 0x3FEC600000000000, 0, 0x3FBEC739830A2000, 0xBD2DC068AFE645E0,\n 0x3FEC400000000000, 0, 0x3FBFE89139DBE000, 0xBD2534D64FA10AFD,\n 0x3FEC000000000000, 0, 0x3FC1178E8227E000, 0x3D21EF78CE2D07F2,\n 0x3FEBE00000000000, 0, 0x3FC1AA2B7E23F000, 0x3D2CA78E44389934,\n 0x3FEBA00000000000, 0, 0x3FC2D1610C868000, 0x3D039D6CCB81B4A1,\n 0x3FEB800000000000, 0, 0x3FC365FCB0159000, 0x3CC62FA8234B7289,\n 0x3FEB400000000000, 0, 0x3FC4913D8333B000, 0x3D25837954FDB678,\n 0x3FEB200000000000, 0, 0x3FC527E5E4A1B000, 0x3D2633E8E5697DC7,\n 0x3FEAE00000000000, 0, 0x3FC6574EBE8C1000, 0x3D19CF8B2C3C2E78,\n 0x3FEAC00000000000, 0, 0x3FC6F0128B757000, 0xBD25118DE59C21E1,\n 0x3FEAA00000000000, 0, 0x3FC7898D85445000, 0xBD1C661070914305,\n 0x3FEA600000000000, 0, 0x3FC8BEAFEB390000, 0xBD073D54AAE92CD1,\n 0x3FEA400000000000, 0, 0x3FC95A5ADCF70000, 0x3D07F22858A0FF6F,\n 0x3FEA000000000000, 0, 0x3FCA93ED3C8AE000, 0xBD28724350562169,\n 0x3FE9E00000000000, 0, 0x3FCB31D8575BD000, 0xBD0C358D4EACE1AA,\n 0x3FE9C00000000000, 0, 0x3FCBD087383BE000, 0xBD2D4BC4595412B6,\n 0x3FE9A00000000000, 0, 0x3FCC6FFBC6F01000, 0xBCF1EC72C5962BD2,\n 0x3FE9600000000000, 0, 0x3FCDB13DB0D49000, 0xBD2AFF2AF715B035,\n 0x3FE9400000000000, 0, 0x3FCE530EFFE71000, 0x3CC212276041F430,\n 0x3FE9200000000000, 0, 0x3FCEF5ADE4DD0000, 0xBCCA211565BB8E11,\n 0x3FE9000000000000, 0, 0x3FCF991C6CB3B000, 0x3D1BCBECCA0CDF30,\n 0x3FE8C00000000000, 0, 0x3FD07138604D5800, 0x3CF89CDB16ED4E91,\n 0x3FE8A00000000000, 0, 0x3FD0C42D67616000, 0x3D27188B163CEAE9,\n 0x3FE8800000000000, 0, 0x3FD1178E8227E800, 0xBD2C210E63A5F01C,\n 0x3FE8600000000000, 0, 0x3FD16B5CCBACF800, 0x3D2B9ACDF7A51681,\n 0x3FE8400000000000, 0, 0x3FD1BF99635A6800, 0x3D2CA6ED5147BDB7,\n 0x3FE8200000000000, 0, 0x3FD214456D0EB800, 0x3D0A87DEBA46BAEA,\n 0x3FE7E00000000000, 0, 0x3FD2BEF07CDC9000, 0x3D2A9CFA4A5004F4,\n 0x3FE7C00000000000, 0, 0x3FD314F1E1D36000, 0xBD28E27AD3213CB8,\n 0x3FE7A00000000000, 0, 0x3FD36B6776BE1000, 0x3D116ECDB0F177C8,\n 0x3FE7800000000000, 0, 0x3FD3C25277333000, 0x3D183B54B606BD5C,\n 0x3FE7600000000000, 0, 0x3FD419B423D5E800, 0x3D08E436EC90E09D,\n 0x3FE7400000000000, 0, 0x3FD4718DC271C800, 0xBD2F27CE0967D675,\n 0x3FE7200000000000, 0, 0x3FD4C9E09E173000, 0xBD2E20891B0AD8A4,\n 0x3FE7000000000000, 0, 0x3FD522AE0738A000, 0x3D2EBE708164C759,\n 0x3FE6E00000000000, 0, 0x3FD57BF753C8D000, 0x3D1FADEDEE5D40EF,\n 0x3FE6C00000000000, 0, 0x3FD5D5BDDF596000, 0xBD0A0B2A08A465DC\n]);\n\n// Returns 0 if not int, 1 if odd int, 2 if even int. The argument is\n// the bit representation of a non-zero finite floating-point value.\n// @ts-ignore: decorator\n@inline\nfunction checkint(iy: u64): i32 {\n let e = iy >> 52 & 0x7FF;\n if (e < 0x3FF ) return 0;\n if (e > 0x3FF + 52) return 2;\n e = u64(1) << (0x3FF + 52 - e);\n if (iy & (e - 1)) return 0;\n if (iy & e ) return 1;\n return 2;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction xflow(sign: u32, y: f64): f64 {\n return select(-y, y, sign) * y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction uflow(sign: u32): f64 {\n return xflow(sign, reinterpret(0x1000000000000000)); // 0x1p-767\n}\n\n// @ts-ignore: decorator\n@inline\nfunction oflow(sign: u32): f64 {\n return xflow(sign, reinterpret(0x7000000000000000)); // 0x1p769\n}\n\n// Returns 1 if input is the bit representation of 0, infinity or nan.\n// @ts-ignore: decorator\n@inline\nfunction zeroinfnan(u: u64): bool {\n return (u << 1) - 1 >= 0xFFE0000000000000 - 1;\n}\n\n// @ts-ignore: decorator\n@lazy let log_tail: f64 = 0;\n\n// Compute y+TAIL = log(x) where the rounded result is y and TAIL has about\n// additional 15 bits precision. IX is the bit representation of x, but\n// normalized in the subnormal range using the sign bit for the exponent.\n// @ts-ignore: decorator\n@inline\nfunction log_inline(ix: u64): f64 {\n const N = 1 << POW_LOG_TABLE_BITS;\n const N_MASK = N - 1;\n\n const\n Ln2hi = reinterpret(0x3FE62E42FEFA3800),\n Ln2lo = reinterpret(0x3D2EF35793C76730);\n\n const\n A0 = reinterpret(0xBFE0000000000000),\n A1 = reinterpret(0xBFE5555555555560),\n A2 = reinterpret(0x3FE0000000000006),\n A3 = reinterpret(0x3FE999999959554E),\n A4 = reinterpret(0xBFE555555529A47A),\n A5 = reinterpret(0xBFF2495B9B4845E9),\n A6 = reinterpret(0x3FF0002B8B263FC3);\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n let tmp = ix - 0x3fE6955500000000;\n let i = usize((tmp >> (52 - POW_LOG_TABLE_BITS)) & N_MASK);\n let k = tmp >> 52;\n let iz = ix - (tmp & u64(0xFFF) << 52);\n let z = reinterpret(iz);\n let kd = k;\n\n // log(x) = k*Ln2 + log(c) + log1p(z/c-1).\n let invc = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 0 << alignof()); // tab[i].invc\n let logc = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 2 << alignof()); // tab[i].logc\n let logctail = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 3 << alignof()); // tab[i].logctail\n\n // Note: 1/c is j/N or j/N/2 where j is an integer in [N,2N) and\n // |z/c - 1| < 1/N, so r = z/c - 1 is exactly representible.\n // Split z such that rhi, rlo and rhi*rhi are exact and |rlo| <= |r|.\n let zhi = reinterpret((iz + u64(0x80000000)) & 0xFFFFFFFF00000000);\n let zlo = z - zhi;\n let rhi = zhi * invc - 1.0;\n let rlo = zlo * invc;\n let r = rhi + rlo;\n\n // k * Ln2 + log(c) + r.\n let t1 = kd * Ln2hi + logc;\n let t2 = t1 + r;\n let lo1 = kd * Ln2lo + logctail;\n let lo2 = t1 - t2 + r;\n\n // Evaluation is optimized assuming superscalar pipelined execution.\n let ar = A0 * r; // A[0] = -0.5\n let ar2 = r * ar;\n let ar3 = r * ar2;\n // k * Ln2 + log(c) + r + A[0] * r * r.\n let arhi = A0 * rhi;\n let arhi2 = rhi * arhi;\n let hi = t2 + arhi2;\n let lo3 = rlo * (ar + arhi);\n let lo4 = t2 - hi + arhi2;\n\n // p = log1p(r) - r - A[0] * r * r.\n let p = ar3 * (A1 + r * A2 + ar2 * (A3 + r * A4 + ar2 * (A5 + r * A6)));\n let lo = lo1 + lo2 + lo3 + lo4 + p;\n let y = hi + lo;\n log_tail = hi - y + lo;\n\n return y;\n}\n\n// @ts-ignore: decorator\n@inline const SIGN_BIAS = 0x800 << EXP_TABLE_BITS;\n\n// Computes sign*exp(x+xtail) where |xtail| < 2^-8/N and |xtail| <= |x|.\n// The sign_bias argument is SIGN_BIAS or 0 and sets the sign to -1 or 1.\n// @ts-ignore: decorator\n@inline\nfunction exp_inline(x: f64, xtail: f64, sign_bias: u32): f64 {\n const N = 1 << EXP_TABLE_BITS;\n const N_MASK = N - 1;\n\n const\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep0\n NegLn2hiN = reinterpret(0xBF762E42FEFA0000), // -0x1.62e42fefa0000p-8\n NegLn2loN = reinterpret(0xBD0CF79ABC9E3B3A), // -0x1.cf79abc9e3b3ap-47\n shift = reinterpret(0x4338000000000000); // 0x1.8p52\n\n const\n C2 = reinterpret(0x3FDFFFFFFFFFFDBD), // __exp_data.poly[0] (0x1.ffffffffffdbdp-2)\n C3 = reinterpret(0x3FC555555555543C), // __exp_data.poly[1] (0x1.555555555543cp-3)\n C4 = reinterpret(0x3FA55555CF172B91), // __exp_data.poly[2] (0x1.55555cf172b91p-5)\n C5 = reinterpret(0x3F81111167A4D017); // __exp_data.poly[3] (0x1.1111167a4d017p-7)\n\n let abstop: u32;\n let ki: u64, top: u64, sbits: u64;\n let idx: usize;\n // double_t for better performance on targets with FLT_EVAL_METHOD==2.\n let kd: f64, z: f64, r: f64, r2: f64, scale: f64, tail: f64, tmp: f64;\n\n let ux = reinterpret(x);\n abstop = u32(ux >> 52) & 0x7FF;\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) {\n // Avoid spurious underflow for tiny x.\n // Note: 0 is common input.\n return select(-1.0, 1.0, sign_bias);\n }\n if (abstop >= 0x409) { // top12(1024.0)\n // Note: inf and nan are already handled.\n return ux < 0\n ? uflow(sign_bias)\n : oflow(sign_bias);\n }\n // Large x is special cased below.\n abstop = 0;\n }\n\n // exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)].\n // x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N].\n z = InvLn2N * x;\n\n // #if TOINT_INTRINSICS\n // kd = roundtoint(z);\n // ki = converttoint(z);\n // #elif EXP_USE_TOINT_NARROW\n // // z - kd is in [-0.5-2^-16, 0.5] in all rounding modes.\n // kd = eval_as_double(z + shift);\n // ki = asuint64(kd) >> 16;\n // kd = (double_t)(int32_t)ki;\n // #else\n // z - kd is in [-1, 1] in non-nearest rounding modes\n kd = z + shift;\n ki = reinterpret(kd);\n kd -= shift;\n // #endif\n r = x + kd * NegLn2hiN + kd * NegLn2loN;\n // The code assumes 2^-200 < |xtail| < 2^-8/N\n r += xtail;\n // 2^(k/N) ~= scale * (1 + tail)\n idx = usize((ki & N_MASK) << 1);\n top = (ki + sign_bias) << (52 - EXP_TABLE_BITS);\n\n tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof())));\n // This is only a valid scale when -1023*N < k < 1024*N\n sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top;\n // exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1).\n // Evaluation is optimized assuming superscalar pipelined execution.\n r2 = r * r;\n // Without fma the worst case error is 0.25/N ulp larger.\n // Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp\n tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase(tmp, sbits, ki);\n scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-200 and scale > 2^-739, so there\n // is no spurious underflow here even without fma.\n return scale + scale * tmp;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function pow_lut(x: f64, y: f64): f64 {\n const Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n let sign_bias: u32 = 0;\n let ix = reinterpret(x);\n let iy = reinterpret(y);\n let topx = ix >> 52;\n let topy = iy >> 52;\n\n if (topx - 0x001 >= 0x7FF - 0x001 || (topy & 0x7FF) - 0x3BE >= 0x43e - 0x3BE) {\n // Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0\n // and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1.\n // Special cases: (x < 0x1p-126 or inf or nan) or\n // (|y| < 0x1p-65 or |y| >= 0x1p63 or nan).\n if (zeroinfnan(iy)) {\n if ((iy << 1) == 0) return 1.0;\n if (ix == 0x3FF0000000000000) return NaN; // original: 1.0\n if ((ix << 1) > 0xFFE0000000000000 || (iy << 1) > 0xFFE0000000000000) return x + y;\n if ((ix << 1) == 0x7FE0000000000000) return NaN; // original: 1.0\n if (((ix << 1) < 0x7FE0000000000000) == !(iy >> 63)) return 0; // |x|<1 && y==inf or |x|>1 && y==-inf.\n return y * y;\n }\n if (zeroinfnan(ix)) {\n let x2 = x * x;\n if (i32(ix >> 63) && checkint(iy) == 1) x2 = -x2;\n return iy < 0 ? 1 / x2 : x2;\n }\n // Here x and y are non-zero finite\n if (ix < 0) {\n // Finite x < 0\n let yint = checkint(iy);\n if (yint == 0) return (x - x) / (x - x);\n if (yint == 1) sign_bias = SIGN_BIAS;\n ix &= 0x7FFFFFFFFFFFFFFF;\n topx &= 0x7FF;\n }\n if ((topy & 0x7FF) - 0x3BE >= 0x43E - 0x3BE) {\n // Note: sign_bias == 0 here because y is not odd.\n if (ix == 0x3FF0000000000000) return 1;\n if ((topy & 0x7FF) < 0x3BE) return 1; // |y| < 2^-65, x^y ~= 1 + y*log(x).\n return (ix > 0x3FF0000000000000) == (topy < 0x800) ? Infinity : 0;\n }\n if (topx == 0) {\n // Normalize subnormal x so exponent becomes negative.\n ix = reinterpret(x * Ox1p52);\n ix &= 0x7FFFFFFFFFFFFFFF;\n ix -= u64(52) << 52;\n }\n }\n\n let hi = log_inline(ix);\n let lo = log_tail;\n let ehi: f64, elo: f64;\n // #if __FP_FAST_FMA\n // ehi = y * hi;\n // elo = y * lo + __builtin_fma(y, hi, -ehi);\n // #else\n let yhi = reinterpret(iy & 0xFFFFFFFFF8000000);\n let ylo = y - yhi;\n let lhi = reinterpret(reinterpret(hi) & 0xFFFFFFFFF8000000);\n let llo = hi - lhi + lo;\n ehi = yhi * lhi;\n elo = ylo * lhi + y * llo; // |elo| < |ehi| * 2^-25.\n // #endif\n return exp_inline(ehi, elo, sign_bias);\n}\n","import {\n itoa32,\n utoa32,\n itoa64,\n utoa64,\n dtoa,\n itoa_buffered,\n dtoa_buffered,\n MAX_DOUBLE_LENGTH\n} from \"./number\";\n\nimport {\n ipow32\n} from \"../math\";\n\n// All tables are stored as two staged lookup tables (static tries)\n// because the full range of Unicode symbols can't be efficiently\n// represented as-is in memory (see Unicode spec ch 5, p.196):\n// https://www.unicode.org/versions/Unicode12.0.0/ch05.pdf\n// Tables have been generated using these forked musl tools:\n// https://github.com/MaxGraey/musl-chartable-tools/tree/case-ignorable\n\n// Lookup table to check if a character is alphanumeric or not\n// See: https://git.musl-libc.org/cgit/musl/tree/src/ctype/alpha.h\n// size: 3904 bytes\n// @ts-ignore\n@inline @lazy const ALPHA_TABLE = memory.data([\n 18,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,17,34,35,36,17,37,38,39,40,\n 41,42,43,44,17,45,46,47,16,16,48,16,16,16,16,16,16,16,49,50,51,16,52,53,16,16,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,54,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,55,17,17,17,17,56,17,57,58,59,60,61,62,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,63,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,64,65,17,66,67,\n 68,69,70,71,72,73,74,17,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,\n 93,94,16,95,96,97,98,17,17,17,99,100,101,16,16,16,16,16,16,16,16,16,16,17,17,\n 17,17,102,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,103,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,17,17,104,105,16,16,106,107,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,108,17,17,17,17,109,110,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 17,111,112,16,16,16,16,16,16,16,16,16,113,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,114,115,116,117,16,16,16,16,16,16,16,16,118,\n 119,120,16,16,16,16,16,121,122,16,16,16,16,123,16,16,124,16,16,16,16,16,16,16,\n 16,16,125,16,16,16,\n 16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,254,255,255,7,254,\n 255,255,7,0,0,0,0,0,4,32,4,255,255,127,255,255,255,127,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,195,255,3,0,31,80,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,223,188,64,215,255,255,\n 251,255,255,255,255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,3,252,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,127,2,255,255,255,\n 255,255,1,0,0,0,0,255,191,182,0,255,255,255,135,7,0,0,0,255,7,255,255,255,255,\n 255,255,255,254,255,195,255,255,255,255,255,255,255,255,255,255,255,255,239,\n 31,254,225,255,\n 159,0,0,255,255,255,255,255,255,0,224,255,255,255,255,255,255,255,255,255,255,\n 255,255,3,0,255,255,255,255,255,7,48,4,255,255,255,252,255,31,0,0,255,255,255,\n 1,255,7,0,0,0,0,0,0,255,255,223,255,255,0,240,255,248,3,255,255,255,255,255,\n 255,255,255,255,239,255,223,225,255,207,255,254,255,239,159,249,255,255,253,\n 197,227,159,89,128,176,207,255,3,16,238,135,249,255,255,253,109,195,135,25,2,\n 94,192,255,63,0,238,191,251,255,255,253,237,227,191,27,1,0,207,255,0,30,238,\n 159,249,255,255,253,237,227,159,25,192,176,207,255,2,0,236,199,61,214,24,199,\n 255,195,199,29,129,0,192,255,0,0,239,223,253,255,255,253,255,227,223,29,96,7,\n 207,255,0,0,239,223,253,255,255,253,239,227,223,29,96,64,207,255,6,0,255,223,\n 253,255,255,255,255,231,223,93,240,128,207,255,0,252,238,255,127,252,255,255,\n 251,47,127,128,95,255,192,255,12,0,254,255,255,255,255,127,255,7,63,32,255,3,\n 0,0,0,0,214,247,255,255,175,255,255,59,95,32,255,243,0,0,0,\n 0,1,0,0,0,255,3,0,0,255,254,255,255,255,31,254,255,3,255,255,254,255,255,255,\n 31,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,249,255,3,255,255,255,255,255,\n 255,255,255,255,63,255,255,255,255,191,32,255,255,255,255,255,247,255,255,255,\n 255,255,255,255,255,255,61,127,61,255,255,255,255,255,61,255,255,255,255,61,\n 127,61,255,127,255,255,255,255,255,255,255,61,255,255,255,255,255,255,255,255,\n 7,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,63,63,254,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,159,255,255,254,255,255,7,255,255,255,255,255,255,255,255,\n 255,199,255,1,255,223,15,0,255,255,15,0,255,255,15,0,255,223,13,0,255,255,255,\n 255,255,255,207,255,255,1,128,16,255,3,0,0,0,0,255,3,255,255,255,255,255,255,\n 255,255,255,255,255,1,255,255,255,255,255,7,255,255,255,255,255,255,255,255,\n 63,\n 0,255,255,255,127,255,15,255,1,192,255,255,255,255,63,31,0,255,255,255,255,\n 255,15,255,255,255,3,255,3,0,0,0,0,255,255,255,15,255,255,255,255,255,255,255,\n 127,254,255,31,0,255,3,255,3,128,0,0,128,1,0,0,0,0,0,0,0,255,255,255,255,255,\n 255,239,255,239,15,255,3,0,0,0,0,255,255,255,255,255,243,255,255,255,255,255,\n 255,191,255,3,0,255,255,255,255,255,255,127,0,255,227,255,255,255,255,255,63,\n 255,1,255,255,255,255,255,231,0,0,0,0,0,222,111,4,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,\n 128,255,31,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,255,\n 255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,132,252,47,62,80,189,255,243,\n 224,67,0,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,\n 0,255,255,255,255,255,127,255,255,255,255,255,127,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,31,120,12,0,255,255,255,255,191,32,255,\n 255,255,255,255,255,255,128,0,0,255,255,127,0,127,127,127,127,127,127,127,127,\n 255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,224,0,0,0,254,3,62,31,254,255,255,255,255,255,255,255,255,255,127,224,254,\n 255,255,255,255,255,255,255,255,255,255,247,224,255,255,255,255,255,254,255,\n 255,255,255,255,255,255,255,255,255,127,0,0,255,255,255,255,0,0,0,0,0,0,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,\n 31,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,\n 0,0,0,0,0,0,255,255,255,255,255,63,255,31,255,255,255,15,0,0,255,255,255,255,\n 255,127,240,143,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,\n 0,128,255,252,255,255,255,255,255,255,255,255,255,255,255,255,249,255,255,255,\n 255,255,255,252,7,0,0,0,0,224,255,191,255,255,255,255,0,0,0,255,255,255,255,\n 255,255,15,0,255,255,255,255,255,255,255,255,47,0,255,3,0,0,252,232,255,255,\n 255,255,255,7,255,255,255,255,7,0,255,255,255,31,255,255,255,255,255,255,247,\n 255,0,128,255,3,255,255,255,127,255,255,255,255,255,255,127,0,255,63,255,3,\n 255,255,127,252,255,255,255,255,255,255,255,127,5,0,0,56,255,255,60,0,126,126,\n 126,0,127,127,255,255,255,255,255,247,255,3,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,7,255,3,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,15,0,255,255,127,248,255,255,255,255,\n 255,\n 15,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,3,0,0,0,0,127,0,248,224,255,253,127,95,219,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,248,255,255,255,\n 255,255,255,255,255,255,255,255,255,63,0,0,255,255,255,255,255,255,255,255,\n 252,255,255,255,255,255,255,0,0,0,0,0,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,223,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,255,3,\n 254,255,255,7,254,255,255,7,192,255,255,255,255,255,255,255,255,255,255,127,\n 252,252,252,28,0,0,0,0,255,239,255,255,127,255,255,183,255,63,255,63,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,31,255,255,255,255,255,255,1,0,0,0,0,\n 0,255,255,255,255,0,224,255,255,255,7,255,255,255,255,255,7,255,255,255,63,\n 255,255,255,255,15,255,62,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,63,255,3,255,255,255,255,15,255,255,255,\n 255,15,255,255,255,255,255,0,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,0,255,255,63,0,255,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,63,253,255,255,255,255,191,145,255,255,63,0,255,255,\n 127,0,255,255,255,127,0,0,0,0,0,0,0,0,255,255,55,0,255,255,63,0,255,255,255,3,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,192,0,0,0,0,0,0,0,0,111,240,239,\n 254,255,255,63,0,0,0,0,0,255,255,255,31,255,255,255,31,0,0,0,0,255,254,255,\n 255,31,0,0,0,255,255,255,255,255,255,63,0,255,255,63,0,255,255,7,0,255,255,3,\n 0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,255,255,255,255,255,255,7,\n 0,255,255,255,255,255,255,7,0,255,255,255,255,255,0,255,3,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,\n 255,27,3,0,0,0,0,0,0,0,0,0,255,255,255,31,128,0,255,255,63,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,31,0,0,0,255,255,127,0,255,255,255,255,255,255,255,255,63,0,0,\n 0,192,255,0,0,252,255,255,255,255,255,255,1,0,0,255,255,255,1,255,3,255,255,\n 255,255,255,255,199,255,240,0,255,255,255,255,71,0,255,255,255,255,255,255,\n 255,255,30,192,255,23,0,0,0,0,255,255,251,255,255,255,159,64,0,0,0,0,0,0,0,0,\n 127,189,255,191,255,1,255,255,255,255,255,255,255,1,255,3,239,159,249,255,255,\n 253,237,227,159,25,129,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,187,7,255,131,3,0,0,0,255,255,255,255,255,\n 255,255,255,179,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,\n 255,255,255,63,127,0,0,0,63,0,0,0,0,255,255,255,255,255,255,255,127,17,0,255,\n 3,0,0,0,0,255,255,255,255,255,255,63,1,255,3,0,0,0,0,0,0,255,255,255,231,255,\n 7,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,\n 255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,3,0,128,\n 127,242,111,255,255,255,191,153,7,0,255,3,0,0,0,0,0,0,0,0,255,252,255,255,255,\n 255,255,252,26,0,0,0,255,255,255,255,255,255,231,127,0,0,255,255,255,255,255,\n 255,255,255,255,32,0,0,0,0,255,255,255,255,255,255,255,1,255,253,255,255,255,\n 255,127,127,1,0,255,3,0,0,252,255,255,255,252,255,255,254,127,0,0,0,0,0,0,0,0,\n 0,127,251,255,255,255,255,127,180,203,0,255,3,191,253,255,255,255,127,123,1,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,255,255,127,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,0,0,0,0,\n 0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,127,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,\n 0,255,255,255,255,255,255,255,1,255,255,255,127,255,3,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,63,0,0,255,255,255,255,255,255,0,0,15,0,255,3,248,255,255,224,255,\n 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,\n 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,135,\n 255,255,255,255,255,255,255,128,255,255,0,0,0,0,0,0,0,0,11,0,3,0,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,0,\n 255,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,255,255,255,\n 127,0,0,0,0,0,0,7,0,240,0,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,15,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,7,255,31,255,1,255,67,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,255,255,255,\n 223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,\n 255,123,95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,63,255,255,255,253,255,255,247,255,255,255,\n 247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,255,253,\n 255,255,255,253,255,255,247,207,255,255,255,255,255,255,127,255,255,249,219,7,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,31,\n 128,63,255,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,15,255,\n 3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,31,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,143,8,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,255,255,255,150,254,247,10,\n 132,234,150,170,150,247,247,94,255,251,255,15,238,251,255,15,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,3,255,255,255,3,255,255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,3\n]);\n\n// size: 1568 bytes (compressed to ~1380 bytes after binaryen)\n// @ts-ignore: decorator\n@lazy @inline const CASED = memory.data([\n 18,19,20,21,22,23,16,16,16,16,16,16,16,16,16,16,\n 24,16,16,25,16,16,16,16,16,16,16,16,26,27,17,28,\n 29,30,16,16,31,16,16,16,16,16,16,16,32,33,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,34,35,16,16,16,36,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,37,16,16,16,38,\n 16,16,16,16,39,16,16,16,16,16,16,16,40,16,16,16,\n 16,16,16,16,16,16,16,16,41,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,42,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,43,44,45,46,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,47,16,16,16,16,16,16,\n 16,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,254,255,255,7,254,255,255,7,0,0,0,0,0,4,32,4,\n 255,255,127,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,247,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,239,255,255,255,255,1,3,0,0,0,31,0,0,0,\n 0,0,0,0,0,0,0,0,32,0,0,0,0,0,207,188,64,215,255,255,251,255,255,255,\n 255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 3,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,\n 255,255,127,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,\n 191,32,255,255,255,255,255,231,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,255,255,255,255,255,255,255,255,63,63,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,1,255,255,255,255,255,231,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,\n 255,255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,\n 132,252,47,62,80,189,31,242,224,67,0,0,255,255,255,255,24,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,0,255,255,255,255,255,127,255,255,\n 255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,120,12,0,\n 255,255,255,255,191,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,63,0,0,\n 255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,\n 255,255,255,255,255,255,255,255,255,120,255,255,255,255,255,255,252,7,0,0,0,0,96,7,\n 0,0,0,0,0,0,255,255,255,255,255,247,255,1,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,127,0,248,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,7,\n 254,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,\n 255,255,15,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,7,0,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,\n 255,255,255,223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,255,123,\n 95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,\n 253,255,255,247,255,255,255,247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,\n 255,253,255,255,255,253,255,255,247,15,0,0,0,0,0,0,255,255,255,255,255,255,255,255,\n 15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,3,255,255,255,3,255,255,255,3,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0\n]);\n\n// size: 2976 bytes (compressed to ~2050 bytes after binaryen)\n// @ts-ignore: decorator\n@lazy @inline const CASE_IGNORABLES = memory.data([\n 18,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,\n 33,16,16,34,16,16,16,35,36,37,38,39,40,41,16,42,\n 43,16,16,16,16,16,16,16,16,16,16,16,44,45,46,16,\n 47,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 48,16,16,16,49,16,50,51,52,53,54,55,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,56,16,16,57,58,\n 16,59,60,61,16,16,16,16,16,16,62,16,16,63,64,65,\n 66,67,68,69,70,71,72,73,74,75,76,16,77,78,79,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,80,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,81,82,16,16,16,83,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,84,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,85,86,16,16,16,16,16,16,16,87,16,16,16,16,16,\n 88,89,90,16,16,16,16,16,91,92,16,16,16,16,16,16,\n 16,16,16,93,16,16,16,16,16,16,16,16,16,16,16,16,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,128,64,0,4,0,0,0,64,1,0,0,0,0,0,0,0,0,161,144,1,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,48,4,176,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,3,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0,0,0,\n 0,0,254,255,255,255,255,191,182,0,0,0,0,0,16,0,63,0,255,23,0,0,0,0,\n 1,248,255,255,0,0,1,0,0,0,0,0,0,0,0,0,0,0,192,191,255,61,0,0,\n 0,128,2,0,0,0,255,255,255,7,0,0,0,0,0,0,0,0,0,0,192,255,1,0,\n 0,0,0,0,0,248,63,36,0,0,192,255,255,63,0,0,0,0,0,14,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,248,255,255,255,255,255,7,0,0,0,0,0,0,20,\n 254,33,254,0,12,0,2,0,2,0,0,0,0,0,0,16,30,32,0,0,12,0,0,64,\n 6,0,0,0,0,0,0,16,134,57,2,0,0,0,35,0,6,0,0,0,0,0,0,16,\n 190,33,0,0,12,0,0,252,2,0,0,0,0,0,0,144,30,32,96,0,12,0,0,0,\n 4,0,0,0,0,0,0,0,1,32,0,0,0,0,0,0,17,0,0,0,0,0,0,192,\n 193,61,96,0,12,0,0,0,2,0,0,0,0,0,0,144,64,48,0,0,12,0,0,0,\n 3,0,0,0,0,0,0,24,30,32,0,0,12,0,0,0,2,0,0,0,0,0,0,0,\n 0,4,92,0,0,0,0,0,0,0,0,0,0,0,242,7,192,127,0,0,0,0,0,0,\n 0,0,0,0,0,0,242,31,64,63,0,0,0,0,0,0,0,0,0,3,0,0,160,2,\n 0,0,0,0,0,0,254,127,223,224,255,254,255,255,255,31,64,0,0,0,0,0,0,0,\n 0,0,0,0,0,224,253,102,0,0,0,195,1,0,30,0,100,32,0,32,0,0,0,0,\n 0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,28,0,\n 0,0,12,0,0,0,12,0,0,0,0,0,0,0,176,63,64,254,143,32,0,0,0,0,\n 0,120,0,0,0,0,0,0,8,0,0,0,0,0,0,0,96,0,0,0,0,2,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,135,1,4,14,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,9,0,0,0,0,\n 0,0,64,127,229,31,248,159,0,0,0,0,128,0,255,255,1,0,0,0,0,0,0,0,\n 15,0,0,0,0,0,208,23,4,0,0,0,0,248,15,0,3,0,0,0,60,59,0,0,\n 0,0,0,0,64,163,3,0,0,0,0,0,0,240,207,0,0,0,0,0,0,0,0,63,\n 0,0,0,0,0,0,0,0,0,0,247,255,253,33,16,3,0,0,0,0,0,240,255,255,\n 255,255,255,255,255,7,0,1,0,0,0,248,255,255,255,255,255,255,255,255,255,255,255,251,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,\n 3,224,0,224,0,224,0,96,0,248,0,3,144,124,0,0,0,0,0,0,223,255,2,128,\n 0,0,255,31,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,128,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,60,62,8,\n 0,0,0,0,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,0,0,0,0,112,\n 0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,16,0,0,0,0,0,0,\n 0,0,0,0,0,128,247,191,0,0,0,240,0,0,0,0,0,0,0,0,0,0,3,0,\n 255,255,255,255,3,0,0,0,0,0,0,0,0,0,1,0,0,7,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,3,68,8,0,0,96,16,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,48,0,0,0,255,255,3,128,0,0,0,0,192,63,0,0,\n 128,255,3,0,0,0,0,0,7,0,0,0,0,0,200,51,0,128,0,0,96,0,0,0,\n 0,0,0,0,0,126,102,0,8,16,0,0,0,0,1,16,0,0,0,0,0,0,157,193,\n 2,0,0,32,0,48,88,0,0,0,0,0,0,0,0,0,0,0,0,248,0,14,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,32,33,0,0,0,0,0,64,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,3,0,0,0,0,0,0,0,\n 255,255,8,0,255,255,0,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,128,128,64,0,4,0,0,0,64,1,0,0,0,0,0,1,0,\n 0,0,0,192,0,0,0,0,0,0,0,0,8,0,0,14,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,7,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,110,240,0,0,0,0,0,135,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,\n 0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 192,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 2,0,0,0,0,0,0,255,127,0,0,0,0,0,0,128,3,0,0,0,0,0,120,38,\n 0,32,0,0,0,0,0,0,7,0,0,0,128,239,31,0,0,0,0,0,0,0,8,0,\n 3,0,0,0,0,0,192,127,0,158,0,0,0,0,0,0,0,0,0,0,0,128,211,64,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,248,7,0,0,\n 3,0,0,0,0,0,0,24,1,0,0,0,192,31,31,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,92,0,0,64,0,0,0,0,\n 0,0,0,0,0,0,248,133,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,176,1,0,0,48,0,0,0,0,\n 0,0,0,0,0,0,248,167,1,0,0,0,0,0,0,0,0,0,0,0,0,40,191,0,\n 0,0,0,0,0,0,0,0,0,0,0,224,188,15,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,255,6,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,88,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,240,12,1,0,0,0,254,7,0,0,0,0,248,121,128,0,126,14,0,0,0,0,\n 0,252,127,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,191,\n 0,0,0,0,0,0,0,0,0,0,252,255,255,252,109,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,126,180,191,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,255,1,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,31,0,0,0,0,0,0,0,127,0,15,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,128,0,0,0,0,0,0,0,128,255,255,0,0,0,0,0,0,0,0,27,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,15,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,248,255,\n 231,15,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,127,248,255,255,255,255,255,31,32,0,16,0,0,248,254,255,0,0,\n 0,0,0,0,0,0,0,0,127,255,255,249,219,7,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,63,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 240,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,248\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOWER127 = memory.data([\n 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\n 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,\n 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,\n 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,\n 64,\n 97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,\n 91,92,93,94,95,96,\n 97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,\n 123,124,125,126,127\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const UPPER127 = memory.data([\n 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\n 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,\n 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,\n 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,\n 64,\n 65,66,67,68,69,70,71,72,73,74,75,76,77,\n 78,79,80,81,82,83,84,85,86,87,88,89,90,\n 91,92,93,94,95,96,\n 65,66,67,68,69,70,71,72,73,74,75,76,77,\n 78,79,80,81,82,83,84,85,86,87,88,89,90,\n 123,124,125,126,127\n]);\n\n// 23 * 8 = 184 bytes\n// @ts-ignore: decorator\n@lazy @inline const POWERS10 = memory.data([\n 1e00, 1e01, 1e02, 1e03, 1e04, 1e05, 1e06, 1e07, 1e08, 1e09,\n 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,\n 1e20, 1e21, 1e22\n]);\n\n// @ts-ignore: decorator\n@inline\nexport const enum CharCode {\n PERCENT = 0x25,\n PLUS = 0x2B,\n MINUS = 0x2D,\n DOT = 0x2E,\n _0 = 0x30,\n _1 = 0x31,\n _2 = 0x32,\n _3 = 0x33,\n _4 = 0x34,\n _5 = 0x35,\n _6 = 0x36,\n _7 = 0x37,\n _8 = 0x38,\n _9 = 0x39,\n A = 0x41,\n B = 0x42,\n E = 0x45,\n I = 0x49,\n N = 0x4E,\n O = 0x4F,\n X = 0x58,\n Z = 0x5A,\n a = 0x61,\n b = 0x62,\n e = 0x65,\n n = 0x6E,\n o = 0x6F,\n u = 0x75,\n x = 0x78,\n z = 0x7A\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isAscii(c: u32): bool {\n return !(c >> 7);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isLower8(c: u32): bool {\n return c - CharCode.a < 26;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isUpper8(c: u32): bool {\n return c - CharCode.A < 26;\n}\n\nexport function isSpace(c: u32): bool {\n if (c < 0x1680) { // < (1)\n // , , , , , and \n // (c == 0x20 || c == 0xA0) was optimized to (c | 0x80) == 0xA0\n return ((c | 0x80) == 0xA0) || (c - 0x09 <= 0x0D - 0x09);\n }\n if (c - 0x2000 <= 0x200A - 0x2000) return true;\n switch (c) {\n case 0x1680: // (1)\n case 0x2028: // (2)\n case 0x2029: // \n case 0x202F: // \n case 0x205F: // \n case 0x3000: // \n case 0xFEFF: return true; // \n }\n return false;\n}\n\nexport function isAlpha(c: u32): bool {\n if (isAscii(c)) return (c | 32) - CharCode.a < 26;\n if (c < 0x20000) {\n // @ts-ignore: cast\n return stagedBinaryLookup(ALPHA_TABLE, c);\n }\n return c < 0x2FFFE;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isCased(c: u32): bool {\n // @ts-ignore: cast\n return c < 0x1F18A && stagedBinaryLookup(CASED, c);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isCaseIgnorable(c: u32): bool {\n // @ts-ignore: cast\n return c < 0xE01F0 && stagedBinaryLookup(CASE_IGNORABLES, c);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isFinalSigma(buffer: usize, index: isize, len: isize): bool {\n const lookaheadLimit = 30; // max lookahead limit\n let found = false;\n let pos = index;\n let minPos = max(0, pos - lookaheadLimit);\n while (pos > minPos) {\n let c = codePointBefore(buffer, pos);\n if (!isCaseIgnorable(c)) {\n if (isCased(c)) {\n found = true;\n } else {\n return false;\n }\n }\n pos -= isize(c >= 0x10000) + 1;\n }\n if (!found) return false;\n pos = index + 1;\n let maxPos = min(pos + lookaheadLimit, len);\n while (pos < maxPos) {\n let c = load(buffer + (pos << 1));\n if (u32((c & 0xFC00) == 0xD800) & u32(pos + 1 != len)) {\n let c1 = load(buffer + (pos << 1), 2);\n if ((c1 & 0xFC00) == 0xDC00) {\n c = (c - 0xD800 << 10) + (c1 - 0xDC00) + 0x10000;\n }\n }\n if (!isCaseIgnorable(c)) {\n return !isCased(c);\n }\n pos += isize(c >= 0x10000) + 1;\n }\n return true;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction codePointBefore(buffer: usize, index: isize): i32 {\n if (index <= 0) return -1;\n let c = load(buffer + (index - 1 << 1));\n if (u32((c & 0xFC00) == 0xDC00) & u32(index - 2 >= 0)) {\n let c1 = load(buffer + (index - 2 << 1));\n if ((c1 & 0xFC00) == 0xD800) {\n return ((c1 & 0x3FF) << 10) + (c & 0x3FF) + 0x10000;\n }\n }\n return (c & 0xF800) == 0xD800 ? 0xFFFD : c;\n}\n\n// Search routine for two-staged lookup tables\nfunction stagedBinaryLookup(table: usize, c: u32): bool {\n return ((load(table + (load(table + (c >>> 8)) << 5) + ((c & 255) >> 3)) >>> (c & 7)) & 1);\n}\n\nexport function compareImpl(str1: string, index1: usize, str2: string, index2: usize, len: usize): i32 {\n let ptr1 = changetype(str1) + (index1 << 1);\n let ptr2 = changetype(str2) + (index2 << 1);\n if (ASC_SHRINK_LEVEL < 2) {\n if (len >= 4 && !((ptr1 & 7) | (ptr2 & 7))) {\n do {\n if (load(ptr1) != load(ptr2)) break;\n ptr1 += 8;\n ptr2 += 8;\n len -= 4;\n } while (len >= 4);\n }\n }\n while (len--) {\n let a = load(ptr1);\n let b = load(ptr2);\n if (a != b) return a - b;\n ptr1 += 2;\n ptr2 += 2;\n }\n return 0;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function toLower8(c: u32): u32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return c | u32(isUpper8(c)) << 5;\n } else {\n return load(LOWER127 + c);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function toUpper8(c: u32): u32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return c & ~(u32(isLower8(c)) << 5);\n } else {\n return load(UPPER127 + c);\n }\n}\n\n/** Parses a string to an integer (usually), using the specified radix. */\nexport function strtol(str: string, radix: i32 = 0): T {\n let len = str.length;\n if (!len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n\n let ptr = changetype(str) /* + HEAD -> offset */;\n let code = load(ptr);\n\n // trim white spaces\n while (isSpace(code)) {\n code = load(ptr += 2);\n --len;\n }\n // determine sign\n // @ts-ignore\n let sign: T = 1;\n if (code == CharCode.MINUS || code == CharCode.PLUS) {\n if (!--len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n if (code == CharCode.MINUS) {\n // @ts-ignore: type\n sign = -1;\n }\n code = load(ptr += 2);\n }\n\n // See https://tc39.es/ecma262/#sec-parseint-string-radix\n if (radix) {\n if (radix < 2 || radix > 36) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n // handle case as parseInt(\"0xFF\", 16) by spec\n if (radix == 16) {\n if (\n len > 2 &&\n code == CharCode._0 &&\n (load(ptr, 2) | 32) == CharCode.x\n ) {\n ptr += 4; len -= 2;\n }\n }\n } else {\n // determine radix by literal prefix\n if (code == CharCode._0 && len > 2) {\n switch (load(ptr, 2) | 32) {\n case CharCode.b: {\n ptr += 4; len -= 2;\n radix = 2;\n break;\n }\n case CharCode.o: {\n ptr += 4; len -= 2;\n radix = 8;\n break;\n }\n case CharCode.x: {\n ptr += 4; len -= 2;\n radix = 16;\n break;\n }\n }\n }\n if (!radix) radix = 10;\n }\n\n // calculate value\n // @ts-ignore: type\n let num: T = 0;\n let initial = len - 1;\n while (len--) {\n code = load(ptr);\n if (code - CharCode._0 < 10) {\n code -= CharCode._0;\n } else if (code - CharCode.A <= (CharCode.Z - CharCode.A)) {\n code -= CharCode.A - 10;\n } else if (code - CharCode.a <= (CharCode.z - CharCode.a)) {\n code -= CharCode.a - 10;\n }\n if (code >= radix) {\n if (initial == len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n break;\n }\n // @ts-ignore: type\n num = num * radix + code;\n ptr += 2;\n }\n // @ts-ignore: type\n return sign * num;\n}\n\nexport function strtod(str: string): f64 {\n let len = str.length;\n if (!len) return NaN;\n\n let ptr = changetype(str);\n let code = load(ptr);\n\n let sign = 1.0;\n // skip white spaces\n while (len && isSpace(code)) {\n code = load(ptr += 2);\n --len;\n }\n if (!len) return NaN;\n\n // try parse '-' or '+'\n if (code == CharCode.MINUS) {\n if (!--len) return NaN;\n code = load(ptr += 2);\n sign = -1;\n } else if (code == CharCode.PLUS) {\n if (!--len) return NaN;\n code = load(ptr += 2);\n }\n\n // try parse Infinity\n if (len >= 8 && code == CharCode.I) {\n if (\n load(ptr, 0) == 0x690066006E0049 && // ifnI\n load(ptr, 8) == 0x7900740069006E // ytin\n ) {\n return Infinity * sign;\n }\n return NaN;\n }\n // validate next symbol\n if (code != CharCode.DOT && (code - CharCode._0) >= 10) {\n return NaN;\n }\n let savedPtr = ptr;\n // skip zeros\n while (code == CharCode._0) {\n code = load(ptr += 2);\n --len;\n }\n if (len <= 0) return 0.0 * sign;\n const capacity = 19; // int(64 * 0.3010)\n let pointed = false;\n let consumed = 0;\n let position = 0;\n let x: u64 = 0;\n if (code == CharCode.DOT) {\n let noDigits = !(savedPtr - ptr);\n ptr += 2; --len;\n if (!len && noDigits) return NaN;\n for (pointed = true; (code = load(ptr)) == CharCode._0; --position, ptr += 2) --len;\n if (len <= 0) return 0.0 * sign;\n if (!position && noDigits && code - CharCode._0 >= 10) return NaN;\n }\n for (let digit = code - CharCode._0; digit < 10 || (code == CharCode.DOT && !pointed); digit = code - CharCode._0) {\n if (digit < 10) {\n x = consumed < capacity ? 10 * x + digit : x | u64(!!digit);\n ++consumed;\n } else {\n position = consumed;\n pointed = true;\n }\n if (!--len) break;\n code = load(ptr += 2);\n }\n\n if (!pointed) position = consumed;\n return copysign(scientific(x, position - min(capacity, consumed) + parseExp(ptr, len)), sign);\n}\n\nexport function strtob(str: string): bool {\n let size: usize = str.length << 1;\n let offset: usize = 0;\n if (size > 8) {\n // try trim end whitespaces first\n while (size && isSpace(load(changetype(str) + size - 2))) size -= 2;\n if (size > 8) {\n // trim start whitespaces\n while (offset < size && isSpace(load(changetype(str) + offset))) offset += 2;\n size -= offset;\n }\n }\n if (size != 8) return false;\n // \"true\" represents as \\00\\e\\00\\u\\00\\e\\00\\t (00 65 00 75 00 72 00 74)\n return load(changetype(str) + offset) == 0x0065_0075_0072_0074;\n}\n\nexport function joinBooleanArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) return select(\"true\", \"false\", load(dataStart));\n\n let sepLen = separator.length;\n let valueLen = 5; // max possible length of element len(\"false\")\n let estLen = (valueLen + sepLen) * lastIndex + valueLen;\n let result = changetype(__new(estLen << 1, idof()));\n let offset = 0;\n let value: bool;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + i);\n valueLen = 4 + i32(!value);\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(select(\"true\", \"false\", value)),\n valueLen << 1\n );\n offset += valueLen;\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + lastIndex);\n valueLen = 4 + i32(!value);\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(select(\"true\", \"false\", value)),\n valueLen << 1\n );\n offset += valueLen;\n\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinIntegerArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n let value = load(dataStart);\n if (isSigned()) {\n if (sizeof() <= 4) {\n // @ts-ignore: type\n return changetype(itoa32(value, 10));\n } else {\n // @ts-ignore: type\n return changetype(itoa64(value, 10));\n }\n } else {\n if (sizeof() <= 4) {\n // @ts-ignore: type\n return changetype(utoa32(value, 10));\n } else {\n // @ts-ignore: type\n return changetype(utoa64(value, 10));\n }\n }\n }\n\n let sepLen = separator.length;\n const valueLen = (sizeof() <= 4 ? 10 : 20) + i32(isSigned());\n let estLen = (valueLen + sepLen) * lastIndex + valueLen;\n let result = changetype(__new(estLen << 1, idof()));\n let offset = 0;\n let value: T;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n offset += itoa_buffered(changetype(result) + (offset << 1), value);\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n offset += itoa_buffered(changetype(result) + (offset << 1), value);\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinFloatArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n return changetype(dtoa(\n // @ts-ignore: type\n load(dataStart))\n );\n }\n\n const valueLen = MAX_DOUBLE_LENGTH;\n let sepLen = separator.length;\n let estLen = (valueLen + sepLen) * lastIndex + valueLen;\n let result = changetype(__new(estLen << 1, idof()));\n let offset = 0;\n let value: T;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n offset += dtoa_buffered(changetype(result) + (offset << 1), value);\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n offset += dtoa_buffered(changetype(result) + (offset << 1), value);\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinStringArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n // @ts-ignore: type\n return load(dataStart) || \"\";\n }\n let estLen = 0;\n let value: string;\n for (let i = 0; i < length; ++i) {\n value = load(dataStart + (i << alignof()));\n if (changetype(value) != 0) estLen += value.length;\n }\n let offset = 0;\n let sepLen = separator.length;\n let result = changetype(__new((estLen + sepLen * lastIndex) << 1, idof()));\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n if (changetype(value) != 0) {\n let valueLen = value.length;\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(value),\n valueLen << 1\n );\n offset += valueLen;\n }\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n if (changetype(value) != 0) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(value),\n value.length << 1\n );\n }\n return result;\n}\n\nexport function joinReferenceArray(dataStart: usize, length: i32, separator: string): string {\n let lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n let value: T;\n if (!lastIndex) {\n value = load(dataStart);\n // @ts-ignore: type\n return value != null ? value.toString() : \"\";\n }\n let result = \"\";\n let sepLen = separator.length;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n if (value != null) result += value.toString();\n if (sepLen) result += separator;\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n if (value != null) result += value.toString();\n return result;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction scientific(significand: u64, exp: i32): f64 {\n if (!significand || exp < -342) return 0;\n if (exp > 308) return Infinity;\n // Try use fast path\n // Use fast path for string-to-double conversion if possible\n // see http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion\n // Simple integer\n let significandf = significand;\n if (!exp) return significandf;\n if (exp > 22 && exp <= 22 + 15) {\n significandf *= pow10(exp - 22);\n exp = 22;\n }\n if (significand <= 9007199254740991 && abs(exp) <= 22) {\n if (exp > 0) return significandf * pow10(exp);\n return significandf / pow10(-exp);\n } else if (exp < 0) {\n return scaledown(significand, exp);\n } else {\n return scaleup(significand, exp);\n }\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction scaledown(significand: u64, exp: i32): f64 {\n const denom: u64 = 6103515625; // 1e14 * 0x1p-14\n const scale = reinterpret(0x3F06849B86A12B9B); // 1e-14 * 0x1p32\n\n let shift = clz(significand);\n significand <<= shift;\n shift = exp - shift;\n\n for (; exp <= -14; exp += 14) {\n let q = significand / denom;\n let r = significand % denom;\n let s = clz(q);\n significand = (q << s) + nearest(scale * (r << (s - 18)));\n shift -= s;\n }\n let b = ipow32(5, -exp);\n let q = significand / b;\n let r = significand % b;\n let s = clz(q);\n significand = (q << s) + (reinterpret(reinterpret(r) + (s << 52)) / b);\n shift -= s;\n\n return NativeMath.scalbn(significand, shift);\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction scaleup(significand: u64, exp: i32): f64 {\n const coeff: u32 = 1220703125; // 1e13 * 0x1p-13;\n let shift = ctz(significand);\n significand >>= shift;\n shift += exp;\n\n __fixmulShift = shift;\n for (; exp >= 13; exp -= 13) {\n significand = fixmul(significand, coeff);\n }\n significand = fixmul(significand, ipow32(5, exp));\n shift = __fixmulShift;\n return NativeMath.scalbn(significand, shift);\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction parseExp(ptr: usize, len: i32): i32 {\n let sign = 1, magnitude = 0;\n let code = load(ptr);\n // check code is 'e' or 'E'\n if ((code | 32) != CharCode.e) return 0;\n\n if (!--len) return 0;\n code = load(ptr += 2);\n if (code == CharCode.MINUS) {\n if (!--len) return 0;\n code = load(ptr += 2);\n sign = -1;\n } else if (code == CharCode.PLUS) {\n if (!--len) return 0;\n code = load(ptr += 2);\n }\n // skip zeros\n while (code == CharCode._0) {\n if (!--len) return 0;\n code = load(ptr += 2);\n }\n for (let digit: u32 = code - CharCode._0; len && digit < 10; digit = code - CharCode._0) {\n if (magnitude >= 3200) return sign * 3200;\n magnitude = 10 * magnitude + digit;\n code = load(ptr += 2);\n --len;\n }\n return sign * magnitude;\n}\n\n// @ts-ignore: decorator\n@lazy let __fixmulShift: u64 = 0;\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction fixmul(a: u64, b: u32): u64 {\n let low = (a & 0xFFFFFFFF) * b;\n let high = (a >> 32) * b + (low >> 32);\n let overflow = (high >> 32);\n let space = clz(overflow);\n let revspace: u64 = 32 - space;\n __fixmulShift += revspace;\n return (high << space | (low & 0xFFFFFFFF) >> revspace) + (low << space >> 31 & 1);\n}\n\n// @ts-ignore: decorator\n@inline\nfunction pow10(n: i32): f64 {\n // argument `n` should bounds in [0, 22] range\n return load(POWERS10 + (n << alignof()));\n}\n","/// \n\nimport { idof } from \"../builtins\";\nimport { CharCode } from \"./string\";\n\n// @ts-ignore: decorator\n@inline\nexport const MAX_DOUBLE_LENGTH = 28;\n\n// @ts-ignore: decorator\n@lazy @inline const POWERS10 = memory.data([\n 1,\n 10,\n 100,\n 1000,\n 10000,\n 100000,\n 1000000,\n 10000000,\n 100000000,\n 1000000000\n]);\n\n/*\n Lookup table for pairwise char codes in range [0-99]\n\n \"00\", \"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\",\n \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\",\n \"20\", \"21\", \"22\", \"23\", \"24\", \"25\", \"26\", \"27\", \"28\", \"29\",\n \"30\", \"31\", \"32\", \"33\", \"34\", \"35\", \"36\", \"37\", \"38\", \"39\",\n \"40\", \"41\", \"42\", \"43\", \"44\", \"45\", \"46\", \"47\", \"48\", \"49\",\n \"50\", \"51\", \"52\", \"53\", \"54\", \"55\", \"56\", \"57\", \"58\", \"59\",\n \"60\", \"61\", \"62\", \"63\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\",\n \"70\", \"71\", \"72\", \"73\", \"74\", \"75\", \"76\", \"77\", \"78\", \"79\",\n \"80\", \"81\", \"82\", \"83\", \"84\", \"85\", \"86\", \"87\", \"88\", \"89\",\n \"90\", \"91\", \"92\", \"93\", \"94\", \"95\", \"96\", \"97\", \"98\", \"99\"\n*/\n// @ts-ignore: decorator\n@lazy @inline const DIGITS = memory.data([\n 0x00300030, 0x00310030, 0x00320030, 0x00330030, 0x00340030,\n 0x00350030, 0x00360030, 0x00370030, 0x00380030, 0x00390030,\n 0x00300031, 0x00310031, 0x00320031, 0x00330031, 0x00340031,\n 0x00350031, 0x00360031, 0x00370031, 0x00380031, 0x00390031,\n 0x00300032, 0x00310032, 0x00320032, 0x00330032, 0x00340032,\n 0x00350032, 0x00360032, 0x00370032, 0x00380032, 0x00390032,\n 0x00300033, 0x00310033, 0x00320033, 0x00330033, 0x00340033,\n 0x00350033, 0x00360033, 0x00370033, 0x00380033, 0x00390033,\n 0x00300034, 0x00310034, 0x00320034, 0x00330034, 0x00340034,\n 0x00350034, 0x00360034, 0x00370034, 0x00380034, 0x00390034,\n 0x00300035, 0x00310035, 0x00320035, 0x00330035, 0x00340035,\n 0x00350035, 0x00360035, 0x00370035, 0x00380035, 0x00390035,\n 0x00300036, 0x00310036, 0x00320036, 0x00330036, 0x00340036,\n 0x00350036, 0x00360036, 0x00370036, 0x00380036, 0x00390036,\n 0x00300037, 0x00310037, 0x00320037, 0x00330037, 0x00340037,\n 0x00350037, 0x00360037, 0x00370037, 0x00380037, 0x00390037,\n 0x00300038, 0x00310038, 0x00320038, 0x00330038, 0x00340038,\n 0x00350038, 0x00360038, 0x00370038, 0x00380038, 0x00390038,\n 0x00300039, 0x00310039, 0x00320039, 0x00330039, 0x00340039,\n 0x00350039, 0x00360039, 0x00370039, 0x00380039, 0x00390039\n]);\n\n// Lookup table for pairwise char codes in range [0x00-0xFF]\n// @ts-ignore: decorator\n@lazy @inline const HEX_DIGITS =\n\"000102030405060708090a0b0c0d0e0f\\\n101112131415161718191a1b1c1d1e1f\\\n202122232425262728292a2b2c2d2e2f\\\n303132333435363738393a3b3c3d3e3f\\\n404142434445464748494a4b4c4d4e4f\\\n505152535455565758595a5b5c5d5e5f\\\n606162636465666768696a6b6c6d6e6f\\\n707172737475767778797a7b7c7d7e7f\\\n808182838485868788898a8b8c8d8e8f\\\n909192939495969798999a9b9c9d9e9f\\\na0a1a2a3a4a5a6a7a8a9aaabacadaeaf\\\nb0b1b2b3b4b5b6b7b8b9babbbcbdbebf\\\nc0c1c2c3c4c5c6c7c8c9cacbcccdcecf\\\nd0d1d2d3d4d5d6d7d8d9dadbdcdddedf\\\ne0e1e2e3e4e5e6e7e8e9eaebecedeeef\\\nf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff\";\n\n// @ts-ignore: decorator\n@lazy @inline const ANY_DIGITS = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\n// @ts-ignore: decorator\n@lazy @inline const EXP_POWERS = memory.data([/* eslint-disable indent */\n -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980,\n -954, -927, -901, -874, -847, -821, -794, -768, -741, -715,\n -688, -661, -635, -608, -582, -555, -529, -502, -475, -449,\n -422, -396, -369, -343, -316, -289, -263, -236, -210, -183,\n -157, -130, -103, -77, -50, -24, 3, 30, 56, 83,\n 109, 136, 162, 189, 216, 242, 269, 295, 322, 348,\n 375, 402, 428, 455, 481, 508, 534, 561, 588, 614,\n 641, 667, 694, 720, 747, 774, 800, 827, 853, 880,\n 907, 933, 960, 986, 1013, 1039, 1066\n/* eslint-enable indent */]);\n\n// 1e-348, 1e-340, ..., 1e340\n// @ts-ignore: decorator\n@lazy @inline const FRC_POWERS = memory.data([\n 0xFA8FD5A0081C0288, 0xBAAEE17FA23EBF76, 0x8B16FB203055AC76, 0xCF42894A5DCE35EA,\n 0x9A6BB0AA55653B2D, 0xE61ACF033D1A45DF, 0xAB70FE17C79AC6CA, 0xFF77B1FCBEBCDC4F,\n 0xBE5691EF416BD60C, 0x8DD01FAD907FFC3C, 0xD3515C2831559A83, 0x9D71AC8FADA6C9B5,\n 0xEA9C227723EE8BCB, 0xAECC49914078536D, 0x823C12795DB6CE57, 0xC21094364DFB5637,\n 0x9096EA6F3848984F, 0xD77485CB25823AC7, 0xA086CFCD97BF97F4, 0xEF340A98172AACE5,\n 0xB23867FB2A35B28E, 0x84C8D4DFD2C63F3B, 0xC5DD44271AD3CDBA, 0x936B9FCEBB25C996,\n 0xDBAC6C247D62A584, 0xA3AB66580D5FDAF6, 0xF3E2F893DEC3F126, 0xB5B5ADA8AAFF80B8,\n 0x87625F056C7C4A8B, 0xC9BCFF6034C13053, 0x964E858C91BA2655, 0xDFF9772470297EBD,\n 0xA6DFBD9FB8E5B88F, 0xF8A95FCF88747D94, 0xB94470938FA89BCF, 0x8A08F0F8BF0F156B,\n 0xCDB02555653131B6, 0x993FE2C6D07B7FAC, 0xE45C10C42A2B3B06, 0xAA242499697392D3,\n 0xFD87B5F28300CA0E, 0xBCE5086492111AEB, 0x8CBCCC096F5088CC, 0xD1B71758E219652C,\n 0x9C40000000000000, 0xE8D4A51000000000, 0xAD78EBC5AC620000, 0x813F3978F8940984,\n 0xC097CE7BC90715B3, 0x8F7E32CE7BEA5C70, 0xD5D238A4ABE98068, 0x9F4F2726179A2245,\n 0xED63A231D4C4FB27, 0xB0DE65388CC8ADA8, 0x83C7088E1AAB65DB, 0xC45D1DF942711D9A,\n 0x924D692CA61BE758, 0xDA01EE641A708DEA, 0xA26DA3999AEF774A, 0xF209787BB47D6B85,\n 0xB454E4A179DD1877, 0x865B86925B9BC5C2, 0xC83553C5C8965D3D, 0x952AB45CFA97A0B3,\n 0xDE469FBD99A05FE3, 0xA59BC234DB398C25, 0xF6C69A72A3989F5C, 0xB7DCBF5354E9BECE,\n 0x88FCF317F22241E2, 0xCC20CE9BD35C78A5, 0x98165AF37B2153DF, 0xE2A0B5DC971F303A,\n 0xA8D9D1535CE3B396, 0xFB9B7CD9A4A7443C, 0xBB764C4CA7A44410, 0x8BAB8EEFB6409C1A,\n 0xD01FEF10A657842C, 0x9B10A4E5E9913129, 0xE7109BFBA19C0C9D, 0xAC2820D9623BF429,\n 0x80444B5E7AA7CF85, 0xBF21E44003ACDD2D, 0x8E679C2F5E44FF8F, 0xD433179D9C8CB841,\n 0x9E19DB92B4E31BA9, 0xEB96BF6EBADF77D9, 0xAF87023B9BF0EE6B\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function isPowerOf2(value: T): bool {\n return popcnt(value) == 1;\n}\n\n// Count number of decimals for u32 values\n// In our case input value always non-zero so we can simplify some parts\nexport function decimalCount32(value: u32): u32 {\n if (value < 100000) {\n if (value < 100) {\n return 1 + u32(value >= 10);\n } else {\n return 3 + u32(value >= 10000) + u32(value >= 1000);\n }\n } else {\n if (value < 10000000) {\n return 6 + u32(value >= 1000000);\n } else {\n return 8 + u32(value >= 1000000000) + u32(value >= 100000000);\n }\n }\n}\n\n// Count number of decimals for u64 values\n// In our case input value always greater than 2^32-1 so we can skip some parts\nexport function decimalCount64High(value: u64): u32 {\n if (value < 1000000000000000) {\n if (value < 1000000000000) {\n return 10 + u32(value >= 100000000000) + u32(value >= 10000000000);\n } else {\n return 13 + u32(value >= 100000000000000) + u32(value >= 10000000000000);\n }\n } else {\n if (value < 100000000000000000) {\n return 16 + u32(value >= 10000000000000000);\n } else {\n return 18 + u32(value >= 10000000000000000000) + u32(value >= 1000000000000000000);\n }\n }\n}\n\nfunction ulog_base(num: u64, base: i32): u32 {\n if (isPowerOf2(base)) {\n return (63 - clz(num)) / (31 - clz(base)) + 1;\n }\n let b64 = u64(base), b = b64, e: u32 = 1;\n while (num >= b) {\n num /= b;\n b *= b;\n e <<= 1;\n }\n while (num >= 1) {\n num /= b64;\n e++;\n }\n return e - 1;\n}\n\nfunction utoa32_dec_lut(buffer: usize, num: u32, offset: usize): void {\n while (num >= 10000) {\n // in most VMs i32/u32 div and modulo by constant can be shared and simplificate\n let t = num / 10000;\n let r = num % 10000;\n num = t;\n\n let d1 = r / 100;\n let d2 = r % 100;\n\n let digits1 = load(DIGITS + (d1 << alignof()));\n let digits2 = load(DIGITS + (d2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n }\n\n if (num >= 100) {\n let t = num / 100;\n let d1 = num % 100;\n num = t;\n offset -= 2;\n let digits = load(DIGITS + (d1 << alignof()));\n store(buffer + (offset << 1), digits);\n }\n\n if (num >= 10) {\n offset -= 2;\n let digits = load(DIGITS + (num << alignof()));\n store(buffer + (offset << 1), digits);\n } else {\n offset -= 1;\n let digit = CharCode._0 + num;\n store(buffer + (offset << 1), digit);\n }\n}\n\nfunction utoa64_dec_lut(buffer: usize, num: u64, offset: usize): void {\n while (num >= 100000000) {\n let t = num / 100000000;\n let r = (num - t * 100000000);\n num = t;\n\n let b = r / 10000;\n let c = r % 10000;\n\n let b1 = b / 100;\n let b2 = b % 100;\n let c1 = c / 100;\n let c2 = c % 100;\n\n let digits1 = load(DIGITS + (c1 << alignof()));\n let digits2 = load(DIGITS + (c2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n\n digits1 = load(DIGITS + (b1 << alignof()));\n digits2 = load(DIGITS + (b2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n }\n\n utoa32_dec_lut(buffer, num, offset);\n}\n\nfunction utoa_hex_lut(buffer: usize, num: u64, offset: usize): void {\n const lut = changetype(HEX_DIGITS);\n while (offset >= 2) {\n offset -= 2;\n store(\n buffer + (offset << 1),\n load(lut + ((num & 0xFF) << alignof()))\n );\n num >>= 8;\n }\n if (offset & 1) {\n store(buffer, load(lut + (num << 6)));\n }\n}\n\nfunction utoa_dec_simple(buffer: usize, num: T, offset: usize): void {\n do {\n let t = num / 10;\n let r = (num % 10);\n num = changetype(t);\n offset--;\n store(buffer + (offset << 1), CharCode._0 + r);\n } while (num);\n}\n\nfunction utoa_hex_simple(buffer: usize, num: T, offset: usize): void {\n do {\n let d = num & 0x0F | CharCode._0;\n d += select(0x27, 0, d > CharCode._9);\n offset--;\n store(buffer + (offset << 1), d);\n // @ts-ignore: type\n num >>= 4;\n } while (num);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function utoa32_dec_core(buffer: usize, num: u32, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_dec_simple(buffer, num, offset);\n } else {\n utoa32_dec_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa32_hex_core(buffer: usize, num: u32, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_hex_simple(buffer, num, offset);\n } else {\n utoa_hex_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa64_dec_core(buffer: usize, num: u64, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_dec_simple(buffer, num, offset);\n } else {\n utoa64_dec_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa64_hex_core(buffer: usize, num: u64, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_hex_simple(buffer, num, offset);\n } else {\n utoa_hex_lut(buffer, num, offset);\n }\n}\n\nfunction utoa64_any_core(buffer: usize, num: u64, offset: usize, radix: i32): void {\n const lut = changetype(ANY_DIGITS);\n let base = u64(radix);\n if ((radix & (radix - 1)) == 0) { // for radix which pow of two\n let shift = u64(ctz(radix) & 7);\n let mask = base - 1;\n do {\n offset--;\n store(buffer + (offset << 1), load(lut + (usize(num & mask) << 1)));\n num >>= shift;\n } while (num);\n } else {\n do {\n offset--;\n let q = num / base;\n store(buffer + (offset << 1), load(lut + (usize(num - q * base) << 1)));\n num = q;\n } while (num);\n }\n}\n\nexport function utoa32(value: u32, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n let out: String;\n\n if (radix == 10) {\n let decimals = decimalCount32(value);\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), value, decimals);\n } else if (radix == 16) {\n let decimals = (31 - clz(value) >> 2) + 1;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n return out;\n}\n\nexport function itoa32(value: i32, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n\n let sign = (value >>> 31) << 1;\n if (sign) value = -value;\n let out: String;\n\n if (radix == 10) {\n let decimals = decimalCount32(value);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa32_dec_core(changetype(out) + sign, value, decimals);\n } else if (radix == 16) {\n let decimals = (31 - clz(value) >> 2) + 1;\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa32_hex_core(changetype(out) + sign, value, decimals);\n } else {\n let val32 = u32(value);\n let decimals = ulog_base(val32, radix);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa64_any_core(changetype(out) + sign, val32, decimals, radix);\n }\n if (sign) store(changetype(out), CharCode.MINUS);\n return out;\n}\n\nexport function utoa64(value: u64, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n let out: String;\n\n if (radix == 10) {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n let decimals = decimalCount32(val32);\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), val32, decimals);\n } else {\n let decimals = decimalCount64High(value);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_dec_core(changetype(out), value, decimals);\n }\n } else if (radix == 16) {\n let decimals = (63 - u32(clz(value)) >> 2) + 1;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n return out;\n}\n\nexport function itoa64(value: i64, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n\n let sign = u32(value >>> 63) << 1;\n if (sign) value = -value;\n let out: String;\n\n if (radix == 10) {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n let decimals = decimalCount32(val32);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa32_dec_core(changetype(out) + sign, val32, decimals);\n } else {\n let decimals = decimalCount64High(value);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa64_dec_core(changetype(out) + sign, value, decimals);\n }\n } else if (radix == 16) {\n let decimals = (63 - u32(clz(value)) >> 2) + 1;\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa64_hex_core(changetype(out) + sign, value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new((decimals << 1) + sign, idof()));\n utoa64_any_core(changetype(out) + sign, value, decimals, radix);\n }\n if (sign) store(changetype(out), CharCode.MINUS);\n return out;\n}\n\n// @ts-ignore: decorator\n@lazy let _K: i32 = 0;\n\n// // @ts-ignore: decorator\n// @lazy\n// let _frc: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy let _exp: i32 = 0;\n\n// @ts-ignore: decorator\n@lazy let _frc_minus: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy let _frc_plus: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy let _frc_pow: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy let _exp_pow: i32 = 0;\n\n// @ts-ignore: decorator\n@inline\nfunction umul64f(u: u64, v: u64): u64 {\n let u0 = u & 0xFFFFFFFF;\n let v0 = v & 0xFFFFFFFF;\n\n let u1 = u >> 32;\n let v1 = v >> 32;\n\n let l = u0 * v0;\n let t = u1 * v0 + (l >> 32);\n let w = u0 * v1 + (t & 0xFFFFFFFF);\n\n w += 0x7FFFFFFF; // rounding\n\n t >>= 32;\n w >>= 32;\n\n return u1 * v1 + t + w;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction umul64e(e1: i32, e2: i32): i32 {\n return e1 + e2 + 64; // where 64 is significand size\n}\n\n// @ts-ignore: decorator\n@inline\nfunction normalizedBoundaries(f: u64, e: i32): void {\n let frc = (f << 1) + 1;\n let exp = e - 1;\n let off = clz(frc);\n frc <<= off;\n exp -= off;\n\n let m = 1 + i32(f == 0x0010000000000000);\n\n _frc_plus = frc;\n _frc_minus = ((f << m) - 1) << e - m - exp;\n _exp = exp;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u64, wp_w: u64): void {\n let lastp = buffer + ((len - 1) << 1);\n let digit = load(lastp);\n while (\n rest < wp_w &&\n delta - rest >= ten_kappa && (\n rest + ten_kappa < wp_w ||\n wp_w - rest > rest + ten_kappa - wp_w\n )\n ) {\n --digit;\n rest += ten_kappa;\n }\n store(lastp, digit);\n}\n\n// @ts-ignore: decorator\n@inline\nfunction getCachedPower(minExp: i32): void {\n const c = reinterpret(0x3FD34413509F79FE); // 1 / lg(10) = 0.30102999566398114\n let dk = (-61 - minExp) * c + 347;\t // dk must be positive, so can do ceiling in positive\n let k = dk;\n k += i32(k != dk); // conversion with ceil\n\n let index = (k >> 3) + 1;\n _K = 348 - (index << 3);\t// decimal exponent no need lookup table\n _frc_pow = load(FRC_POWERS + (index << alignof()));\n _exp_pow = load(EXP_POWERS + (index << alignof()));\n}\n\n// @ts-ignore: decorator\n@inline\nfunction grisu2(value: f64, buffer: usize, sign: i32): i32 {\n\n // frexp routine\n let uv = reinterpret(value);\n let exp = i32((uv & 0x7FF0000000000000) >>> 52);\n let sid = uv & 0x000FFFFFFFFFFFFF;\n let frc = (u64(exp != 0) << 52) + sid;\n exp = select(exp, 1, exp) - (0x3FF + 52);\n\n normalizedBoundaries(frc, exp);\n getCachedPower(_exp);\n\n // normalize\n let off = clz(frc);\n frc <<= off;\n exp -= off;\n\n let frc_pow = _frc_pow;\n let exp_pow = _exp_pow;\n\n let w_frc = umul64f(frc, frc_pow);\n let w_exp = umul64e(exp, exp_pow);\n\n let wp_frc = umul64f(_frc_plus, frc_pow) - 1;\n let wp_exp = umul64e(_exp, exp_pow);\n\n let wm_frc = umul64f(_frc_minus, frc_pow) + 1;\n let delta = wp_frc - wm_frc;\n\n return genDigits(buffer, w_frc, w_exp, wp_frc, wp_exp, delta, sign);\n}\n\nfunction genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i32, delta: u64, sign: i32): i32 {\n let one_exp = -mp_exp;\n let one_frc = (1) << one_exp;\n let mask = one_frc - 1;\n\n let wp_w_frc = mp_frc - w_frc;\n\n let p1 = u32(mp_frc >> one_exp);\n let p2 = mp_frc & mask;\n\n let kappa = decimalCount32(p1);\n let len = sign;\n\n while (kappa > 0) {\n let d: u32;\n switch (kappa) {\n case 10: { d = p1 / 1000000000; p1 %= 1000000000; break; }\n case 9: { d = p1 / 100000000; p1 %= 100000000; break; }\n case 8: { d = p1 / 10000000; p1 %= 10000000; break; }\n case 7: { d = p1 / 1000000; p1 %= 1000000; break; }\n case 6: { d = p1 / 100000; p1 %= 100000; break; }\n case 5: { d = p1 / 10000; p1 %= 10000; break; }\n case 4: { d = p1 / 1000; p1 %= 1000; break; }\n case 3: { d = p1 / 100; p1 %= 100; break; }\n case 2: { d = p1 / 10; p1 %= 10; break; }\n case 1: { d = p1; p1 = 0; break; }\n default: { d = 0; break; }\n }\n\n if (d | len) store(buffer + (len++ << 1), CharCode._0 + d);\n\n --kappa;\n let tmp = ((p1) << one_exp) + p2;\n if (tmp <= delta) {\n _K += kappa;\n grisuRound(buffer, len, delta, tmp, load(POWERS10 + (kappa << alignof())) << one_exp, wp_w_frc);\n return len;\n }\n }\n\n while (true) {\n p2 *= 10;\n delta *= 10;\n\n let d = p2 >> one_exp;\n if (d | len) store(buffer + (len++ << 1), CharCode._0 + d);\n\n p2 &= mask;\n --kappa;\n if (p2 < delta) {\n _K += kappa;\n wp_w_frc *= load(POWERS10 + (-kappa << alignof()));\n grisuRound(buffer, len, delta, p2, one_frc, wp_w_frc);\n return len;\n }\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction genExponent(buffer: usize, k: i32): i32 {\n let sign = k < 0;\n if (sign) k = -k;\n let decimals = decimalCount32(k) + 1;\n utoa32_dec_core(buffer, k, decimals);\n store(buffer, select(CharCode.MINUS, CharCode.PLUS, sign));\n return decimals;\n}\n\nfunction prettify(buffer: usize, length: i32, k: i32): i32 {\n if (!k) {\n store(buffer + (length << 1), CharCode.DOT | (CharCode._0 << 16));\n return length + 2;\n }\n\n let kk = length + k;\n if (length <= kk && kk <= 21) {\n // 1234e7 -> 12340000000\n for (let i = length; i < kk; ++i) {\n store(buffer + (i << 1), CharCode._0);\n }\n store(buffer + (kk << 1), CharCode.DOT | (CharCode._0 << 16));\n return kk + 2;\n } else if (kk > 0 && kk <= 21) {\n // 1234e-2 -> 12.34\n let ptr = buffer + (kk << 1);\n memory.copy(\n ptr + 2,\n ptr,\n -k << 1\n );\n store(buffer + (kk << 1), CharCode.DOT);\n return length + 1;\n } else if (-6 < kk && kk <= 0) {\n // 1234e-6 -> 0.001234\n let offset = 2 - kk;\n memory.copy(\n buffer + (offset << 1),\n buffer,\n length << 1\n );\n store(buffer, CharCode._0 | (CharCode.DOT << 16));\n for (let i = 2; i < offset; ++i) {\n store(buffer + (i << 1), CharCode._0);\n }\n return length + offset;\n } else if (length == 1) {\n // 1e30\n store(buffer, CharCode.e, 2);\n length = genExponent(buffer + 4, kk - 1);\n return length + 2;\n } else {\n let len = length << 1;\n memory.copy(\n buffer + 4,\n buffer + 2,\n len - 2\n );\n store(buffer, CharCode.DOT, 2);\n store(buffer + len, CharCode.e, 2);\n length += genExponent(buffer + len + 4, kk - 1);\n return length + 2;\n }\n}\n\nfunction dtoa_core(buffer: usize, value: f64): i32 {\n let sign = i32(value < 0);\n if (sign) {\n value = -value;\n store(buffer, CharCode.MINUS);\n }\n // assert(value > 0 && value <= 1.7976931348623157e308);\n let len = grisu2(value, buffer, sign);\n len = prettify(buffer + (sign << 1), len - sign, _K);\n return len + sign;\n}\n\n// @ts-ignore: decorator\n@lazy @inline const dtoa_buf = memory.data(MAX_DOUBLE_LENGTH << 1);\n\nexport function dtoa(value: f64): String {\n if (value == 0) return \"0.0\";\n if (!isFinite(value)) {\n if (isNaN(value)) return \"NaN\";\n return select(\"-Infinity\", \"Infinity\", value < 0);\n }\n let size = dtoa_core(dtoa_buf, value) << 1;\n let result = changetype(__new(size, idof()));\n memory.copy(changetype(result), dtoa_buf, size);\n return result;\n}\n\nexport function itoa_buffered(buffer: usize, value: T): u32 {\n let sign: u32 = 0;\n if (isSigned()) {\n sign = u32(value < 0);\n if (sign) {\n if (sizeof() == 1) {\n if (value == -0x80) {\n // -0x80 -> -128\n store(buffer,\n CharCode.MINUS |\n (CharCode._0 + 1) << 16 |\n (CharCode._0 + 2) << 32 |\n (CharCode._0 + 8) << 48\n );\n return 4;\n }\n }\n if (sizeof() == 2) {\n if (value == -0x8000) {\n // -0x8000 -> -32768\n store(buffer,\n CharCode.MINUS |\n (CharCode._0 + 3) << 16 |\n (CharCode._0 + 2) << 32 |\n (CharCode._0 + 7) << 48\n ); // -327\n store(buffer + 8,\n (CharCode._0 + 6) << 0 |\n (CharCode._0 + 8) << 16\n ); // 68\n return 6;\n }\n }\n store(buffer, CharCode.MINUS);\n // @ts-ignore\n value = -value;\n }\n }\n let dest = buffer + (sign << 1);\n if (ASC_SHRINK_LEVEL <= 1) {\n if (isSigned()) {\n if (sizeof() <= 4) {\n if (value < 10) {\n store(dest, value | CharCode._0);\n return 1 + sign;\n }\n } else {\n if (value < 10) {\n store(dest, value | CharCode._0);\n return 1 + sign;\n }\n }\n } else {\n if (value < 10) {\n store(buffer, value | CharCode._0);\n return 1;\n }\n }\n }\n let decimals: u32 = 0;\n if (sizeof() <= 4) {\n let val32 = value;\n decimals = decimalCount32(val32);\n utoa32_dec_core(dest, val32, decimals);\n } else {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n decimals = decimalCount32(val32);\n utoa32_dec_core(dest, val32, decimals);\n } else {\n let val64 = value;\n decimals = decimalCount64High(val64);\n utoa64_dec_core(dest, val64, decimals);\n }\n }\n return sign + decimals;\n}\n\nexport function dtoa_buffered(buffer: usize, value: f64): u32 {\n if (value == 0) {\n store(buffer, CharCode._0);\n store(buffer, CharCode.DOT, 2);\n store(buffer, CharCode._0, 4);\n return 3;\n }\n if (!isFinite(value)) {\n if (isNaN(value)) {\n store(buffer, CharCode.N);\n store(buffer, CharCode.a, 2);\n store(buffer, CharCode.N, 4);\n return 3;\n } else {\n let sign = value < 0;\n if (sign) {\n store(buffer, CharCode.MINUS); // -\n buffer += 2;\n }\n store(buffer, 0x690066006E0049, 0); // ifnI\n store(buffer, 0x7900740069006E, 8); // ytin\n return 8 + u32(sign);\n }\n }\n return dtoa_core(buffer, value);\n}\n","import { itoa_buffered, dtoa_buffered } from \"util/number\";\n\nconst MIN_BUFFER_LEN = 32;\nconst MIN_BUFFER_SIZE: u32 = MIN_BUFFER_LEN << 1;\n\nconst NEW_LINE_CHAR: u16 = 0x0A; // \\n\n\n// @ts-ignore: decorator\nfunction nextPowerOf2(n: u32): u32 {\n return 1 << 32 - clz(n - 1);\n}\n\nexport class Sink {\n public buffer!: ArrayBuffer;\n public offset: u32 = 0;\n\n static withCapacity(capacity: i32): Sink {\n const sink = new Sink();\n sink.buffer = changetype(__new(\n max(MIN_BUFFER_SIZE, capacity << 1),\n idof())\n );\n return sink;\n }\n\n static fromString(initial: string = \"\", capacity: i32 = MIN_BUFFER_LEN): Sink {\n const sink = new Sink();\n const size = initial.length << 1;\n sink.buffer = changetype(__new(\n max(size, max(MIN_BUFFER_SIZE, capacity << 1)),\n idof())\n );\n if (size) {\n memory.copy(\n changetype(sink.buffer),\n changetype(initial),\n size\n );\n sink.offset += size;\n }\n return sink;\n }\n\n static fromStringLiteral(initial: string = \"\"): Sink {\n const sink = new Sink();\n const size = initial.length << 1;\n sink.buffer = changetype(__new(\n size,\n idof())\n );\n if (size) {\n memory.copy(\n changetype(sink.buffer),\n changetype(initial),\n size\n );\n sink.offset += size;\n }\n return sink;\n }\n\n static fromBuffer(initial: ArrayBuffer, capacity: i32 = MIN_BUFFER_LEN): Sink {\n const sink = new Sink();\n const size = initial.byteLength;\n sink.buffer = changetype(__new(\n max(size, max(MIN_BUFFER_SIZE, capacity << 1)),\n idof())\n );\n if (size) {\n memory.copy(\n changetype(sink.buffer),\n changetype(initial),\n size\n );\n sink.offset = size;\n }\n return sink;\n }\n\n constructor() { }\n\n get length(): i32 {\n return this.offset >> 1;\n }\n\n get capacity(): i32 {\n return this.buffer.byteLength >>> 1;\n }\n reset(): void {\n this.offset = 0;\n }\n write(src: string, start: i32 = 0, end: i32 = i32.MAX_VALUE): Sink | null {\n let len = src.length as u32;\n\n if (start != 0 || end != i32.MAX_VALUE) {\n let from: i32;\n from = min(max(start, 0), len);\n end = min(max(end, 0), len);\n start = min(from, end);\n end = max(from, end);\n len = end - start;\n }\n\n if (!len) return null;\n\n let size = len << 1;\n this.ensureCapacity(size);\n let offset = this.offset;\n\n memory.copy(\n changetype(this.buffer) + offset,\n changetype(src) + (start << 1),\n size\n );\n //this.offset = offset + size;\n return this;\n }\n\n writeLn(src: string = \"\", start: i32 = 0, end: i32 = i32.MAX_VALUE): Sink {\n let len = src.length as u32;\n if (start != 0 || end != i32.MAX_VALUE) {\n let from: i32;\n from = min(max(start, 0), len);\n end = min(max(end, 0), len);\n start = min(from, end);\n end = max(from, end);\n len = end - start;\n }\n\n let size = len << 1;\n this.ensureCapacity(size + 2);\n let offset = this.offset;\n let dest = changetype(this.buffer) + offset;\n if (size) memory.copy(dest, changetype(src) + (start << 1), size);\n store(dest + size, NEW_LINE_CHAR);\n this.offset = offset + (size + 2);\n return this;\n }\n\n writeCodePoint(code: i32): Sink {\n let hasSur = code > 0xFFFF;\n this.ensureCapacity(2 << i32(hasSur));\n\n let offset = this.offset;\n let dest = changetype(this.buffer) + offset;\n\n if (!hasSur) {\n store(dest, code);\n this.offset = offset + 2;\n } else {\n assert(code <= 0x10FFFF);\n code -= 0x10000;\n let hi = (code & 0x03FF) | 0xDC00;\n let lo = code >>> 10 | 0xD800;\n store(dest, lo | hi << 16);\n this.offset = offset + 4;\n }\n return this;\n }\n\n writeCodePoint16(code: i32): Sink {\n this.ensureCapacity(2);\n\n let offset = this.offset;\n let dest = changetype(this.buffer) + offset;\n\n store(dest, code);\n this.offset = offset + 2;\n\n return this;\n }\n\n writeCodePointUnsafe(code: i32): Sink {\n this.ensureCapacity(2);\n\n let offset = this.offset;\n let dest = changetype(this.buffer) + offset;\n\n code -= 0x10000;\n let hi = (code & 0x03FF) | 0xDC00;\n let lo = code >>> 10 | 0xD800;\n store(dest, lo | hi << 16);\n this.offset = offset + 4;\n return this;\n }\n\n writeNumber(value: T): Sink {\n let offset = this.offset;\n if (isInteger()) {\n let maxCapacity = 0;\n // this also include size for sign\n if (sizeof() == 1) {\n maxCapacity = 4 << 1;\n } else if (sizeof() == 2) {\n maxCapacity = 6 << 1;\n } else if (sizeof() == 4) {\n maxCapacity = 11 << 1;\n } else if (sizeof() == 8) {\n maxCapacity = 21 << 1;\n }\n this.ensureCapacity(maxCapacity);\n offset += itoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n } else {\n this.ensureCapacity(32 << 1);\n offset += dtoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n }\n this.offset = offset;\n return this;\n }\n writeNumberUnsafe(value: T): Sink {\n let offset = this.offset;\n if (isInteger()) {\n offset += itoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n } else {\n offset += dtoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n }\n this.offset = offset;\n return this;\n }\n writeIntegerUnsafe(value: T): Sink {\n let offset = this.offset;\n if (isInteger()) {\n offset += itoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n } else {\n offset += dtoa_buffered(\n changetype(this.buffer) + offset,\n value\n ) << 1;\n }\n this.offset = offset;\n return this;\n }\n\n reserve(capacity: i32, clear: bool = false): void {\n if (clear) this.offset = 0;\n this.buffer = changetype(__renew(\n changetype(this.buffer),\n max(this.offset, max(MIN_BUFFER_SIZE, capacity << 1))\n ));\n }\n\n shrink(): void {\n this.buffer = changetype(__renew(\n changetype(this.buffer),\n max(this.offset, MIN_BUFFER_SIZE)\n ));\n }\n\n clear(): void {\n this.reserve(0, true);\n }\n\n toString(): string {\n let size = this.offset;\n if (!size) return \"\";\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this.buffer), size);\n return out;\n }\n\n ensureCapacity(deltaBytes: u32): void {\n let buffer = this.buffer;\n let newSize = this.offset + deltaBytes;\n if (newSize > buffer.byteLength) {\n this.buffer = changetype(__renew(\n changetype(buffer),\n nextPowerOf2(newSize)\n ));\n }\n }\n}","// @ts-ignore\n@inline\nconst LOW_MASK: u32 = 0xffffffff;\n\n// @ts-ignore\n@inline\nconst LIMB_BITS: u32 = 32;\n\n// @ts-ignore\n@inline\nconst BASE: u64 = 1 << LIMB_BITS;\n\n// BigInteger must support values in this range\n// -2**I32.MAX_VALUE (exclusive) - +2**I32.MAX_VALUE (exclusive)\n// However, realistically memory limits the maximum size of the MpZ\n\n// @ts-ignore\n@inline\nconst MAX_LIMBS: u32 = I32.MAX_VALUE; // 2**31-1, experimental: ~2**27-1, realistic: ~< 2**25-1\n\n// @ts-ignore\n@inline\nfunction LOW(value: u64): u32 {\n return u32(value & LOW_MASK);\n}\n\n// @ts-ignore\n@inline\nfunction HIGH(value: u64): u32 {\n return u32(value >> LIMB_BITS);\n}\n\nfunction fromI32(value: i32): MpZ {\n const neg = value < 0;\n if (value < 0) {\n value = -value;\n }\n return fromU32(value, neg);\n}\n\n// @ts-ignore\n@inline\nfunction fromU32(value: u32, neg: boolean = false): MpZ {\n return new MpZ([u32(value)], neg);\n}\n\nfunction fromI64(value: i64): MpZ {\n if (value < 0) return fromU64(-(value), true);\n return fromU64(value);\n}\n\nfunction fromU64(value: u64, neg: boolean = false): MpZ {\n const hi = HIGH(value);\n const lo = LOW(value);\n if (hi === 0) {\n return fromU32(lo, neg);\n }\n return new MpZ([lo, hi], neg);\n}\n\nfunction codeToU32(code: u32): u32 {\n if (code >= 48 && code <= 57) {\n return (code - 48);\n }\n if (code >= 65 && code <= 90) {\n return (code - 55);\n }\n if (code >= 97 && code <= 122) {\n return (code - 87);\n }\n throw new Error(`Invalid digit code ${code}`);\n}\n\nfunction fromStringU(value: string, base: u32 = 10): MpZ {\n let res = MpZ.ZERO;\n if (value === '0') return res;\n for (let i = 0; i < value.length; i++) {\n const code: u32 = value.charCodeAt(i);\n const val = codeToU32(code);\n res = res.mul(base).add(val);\n }\n return res;\n}\n\nfunction getBase(str: string): u32 {\n if (str.length < 3) return 10;\n\n if (str.charAt(0) === '0') {\n switch (str.charCodeAt(1)) {\n case 98: // b\n case 66: // B\n return 2;\n case 111: // o\n case 79: // O\n return 8;\n case 120: // x\n case 88: // X\n return 16;\n }\n }\n return 10;\n}\n\nfunction fromString(value: string): MpZ {\n const neg = value.substr(0, 1) === '-';\n value = neg ? value.substr(1) : value;\n const base = getBase(value);\n\n const r =\n base === 10 ? fromStringU(value, 10) : fromStringU(value.substr(2), base);\n return neg ? r.negate() : r;\n}\n\n// @ts-ignore\n@lazy\nconst LOG2_10: f64 = Math.log2(10);\n\n// Constants for decimal conversion\n// @ts-ignore\n@inline\nconst DIGITS_PER_LIMB = 9;\n\n// @ts-ignore\n@inline\nconst TO_DECIMAL_N = 1000000000; // 10 ** 9;\n\n/** @internal */\nexport class DivRem {\n div!: MpZ;\n rem!: R;\n}\n\n/**\n * ## `as-mpz` API\n *\n * Value is stored as a sign and magnitude.\n *\n * > Note: Arithmatic methods and operators can be used interchangably, with operators acting as shorthand for the methods.\n * > However, unlike instance methods, the operators do not coerce inputs to an MpZ.\n */\n\n// @ts-ignore\n@final\nexport class MpZ {\n // Contains the size and sign of the MpZ\n // The sign is stored as the negation of the size\n // This size excludes leading zero limbs (except for least significant limb)\n protected readonly _sgn_size: i32;\n\n // Contains the limbs of the MpZ\n // The last limb is the most significant\n // The first limb is the least significant\n // The most significant limb may be zero, never use _data.length to get the size\n protected readonly _data: StaticArray;\n\n // Should not be used directly\n // Mutating _data will cause unexpected behavior\n constructor(data: StaticArray, neg: boolean = false) {\n assert(ASC_NO_ASSERT || data.length > 0, 'MpZ must have at least 1 limb');\n\n let size = data.length;\n\n // Reduce size by leading zeros\n while (size > 1 && unchecked(data[size - 1] === 0)) {\n size--;\n }\n\n if (size === 0) {\n this._data = [0];\n this._sgn_size = 1;\n } else {\n this._data = data;\n this._sgn_size = neg ? -size : size;\n }\n }\n\n /**\n * ### Constructor\n */\n\n /**\n * #### `MpZ.from(value: i32 | u32 | i64 | u64 | string): MpZ`\n *\n * Creates a new MpZ from a number or string. The `MpZ.from` method accepts a number or string. The string can be in decimal or hexadecimal format (prefixed with `0x`). The string can also be prefixed with `-` to indicate a negative number.\n *\n * > Note: The MpZ class should not be instantiated directly (using `new`). Instead use the static `MpZ.from` method to create a new MpZ.\n */\n static from(val: T): MpZ {\n if (val instanceof MpZ) return val;\n if (val instanceof i32) return fromI32(val as i32);\n if (val instanceof u32) return fromU32(val as u32);\n if (val instanceof i64) return fromI64(val as i64);\n if (val instanceof u64) return fromU64(val as u64);\n if (typeof val === 'string') return fromString(val);\n\n throw new TypeError('Unsupported generic type ' + nameof(val));\n }\n\n /**\n * ### Instance Methods\n */\n\n /**\n * #### `#isNeg(): boolean`\n *\n * @returns `true` if `this` MpZ is negative, otherwise `false`.\n */\n // @ts-ignore\n @inline\n get isNeg(): boolean {\n return this._sgn_size < 0;\n }\n\n // Returns the number of limbs in `this` MpZ (excluding leading zeros)\n // @ts-ignore\n @inline\n get size(): i32 {\n return this._sgn_size < 0 ? -this._sgn_size : this._sgn_size;\n }\n\n /**\n * #### `#abs(): MpZ`\n *\n * @returns the absolute value of `this` MpZ.\n */\n abs(): MpZ {\n return this.isNeg ? new MpZ(this._data) : this;\n }\n\n /**\n * #### `#sign(): MpZ`\n *\n * @returns the sign of `this` MpZ, indicating whether x is positive (`1`), negative (`-1`), or zero (`0`).\n */\n sign(): i32 {\n if (this._sgn_size < 0) return -1;\n if (this.eqz()) return 0;\n return 1;\n }\n\n /**\n * #### `#isOdd(): MpZ`\n *\n * @returns `true` if `this` MpZ is odd, otherwise `false`.\n */\n isOdd(): boolean {\n return (unchecked(this._data[0]) & 1) === 1;\n }\n\n /**\n * #### `#isEven(): boolean`\n *\n * @returns `true` if `this` MpZ is even, otherwise `false`.\n */\n isEven(): boolean {\n return (unchecked(this._data[0]) & 1) === 0;\n }\n\n /**\n * #### `#negate(): MpZ`\n *\n * @returns the negation of `this` MpZ (`-this`).\n */\n // @ts-ignore\n negate(): MpZ {\n if (this.eqz()) return MpZ.ZERO;\n return new MpZ(this._data, !this.isNeg);\n }\n\n // *** Addition ***\n\n /**\n * #### `#add(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the sum of `this` MpZ and `rhs`.\n */\n // @ts-ignore\n add(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n\n if (this.isNeg && y.isNeg) return this._uadd(y).negate(); // -a + -b = -(a + b)\n if (this.isNeg) return y._usub(this); // -a + b = b - a\n if (y.isNeg) return this._usub(y); // a + -b = a - b\n return this._uadd(y);\n }\n\n // unsigned addition\n // treats values as unsigned\n protected _uadd(rhs: MpZ): MpZ {\n if (this.size < rhs.size) return rhs._uadd(this); // a + b = b + a\n if (rhs.size === 1) return this._uaddU32(unchecked(rhs._data[0]));\n return this.__uadd(rhs);\n }\n\n // unsigned addition\n // ordered such that Size(lhs) > Size(rhs)\n // treats values as unsigned\n protected __uadd(rhs: MpZ): MpZ {\n const q = this.size;\n const p = rhs.size;\n\n assert(ASC_NO_ASSERT || q >= p, '_uadd: Size(lhs) must be >= Size(rhs)');\n\n const z = new StaticArray(q + 1);\n\n let k: bool = 0;\n let i: i32 = 0;\n for (; i < p; ++i) {\n const lx = unchecked(this._data[i]);\n const ly = unchecked(rhs._data[i]);\n unchecked((z[i] = lx + ly + k));\n k = unchecked(z[i] < lx) || unchecked(k && z[i] === lx);\n }\n for (; i < q; ++i) {\n const lx = unchecked(this._data[i]);\n unchecked((z[i] = lx + k));\n k = unchecked(z[i] < lx);\n }\n unchecked((z[q] = k));\n\n return new MpZ(z);\n }\n\n // unsigned addition by uint32\n // treats values as unsigned\n protected _uaddU32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q + 1);\n\n let k: u32 = rhs;\n for (let i: i32 = 0; i < q; ++i) {\n unchecked((z[i] = k + this._data[i]));\n k = unchecked(z[i] < this._data[i]) ? 1 : 0;\n }\n unchecked((z[q] = k));\n return new MpZ(z);\n }\n\n /**\n * #### `#inc(): MpZ`\n *\n * @returns the increment of `this` MpZ (`this + 1`).\n */\n @operator.prefix('++')\n @operator.postfix('++')\n inc(): MpZ {\n if (this.isNeg) return this._udec().negate(); // -a + 1 = -(a - 1)\n return this._uinc();\n }\n\n protected _uinc(): MpZ {\n // TODO: optimize by couting bits?\n const q = this.size;\n const z = new StaticArray(q + 1);\n\n let k: bool = 1;\n for (let i: i32 = 0; i < q; ++i) {\n unchecked((z[i] = k + this._data[i]));\n k = unchecked(z[i] < this._data[i]);\n }\n unchecked((z[q] = k));\n return new MpZ(z);\n }\n\n // *** Subtraction ***\n\n /**\n * #### `#sub(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the difference of `this` MpZ and the `rhs`.\n */\n sub(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n\n const sx = this.isNeg;\n const sy = y.isNeg;\n\n if (sx && sy) return y._usub(this); // -a - -b = b - a\n if (sx) return this._uadd(y).negate(); // -a - b = -(a + b)\n if (sy) return this._uadd(y); // a - -b = a + b\n return this._usub(y);\n }\n\n // unsigned subtraction\n // treats values as unsigned\n protected _usub(rhs: MpZ): MpZ {\n if (this._ucmp(rhs) < 0) return rhs._usub(this).negate(); // a - b = -(b - a)\n if (rhs.size === 1) return this._usubU32(unchecked(rhs._data[0]));\n return this.__usub(rhs);\n }\n\n // unsigned sub\n // ordered such that lhs >= rhs\n // treats values as unsigned\n protected __usub(rhs: MpZ): MpZ {\n const q = this.size;\n const p = rhs.size;\n\n assert(ASC_NO_ASSERT || q >= p, '_uadd: Size(lhs) must be >= Size(rhs)');\n\n const z = new StaticArray(q);\n\n let k: i64 = 0;\n let i: i32 = 0;\n for (; i < p; ++i) {\n const lx = unchecked(this._data[i]);\n const ly = unchecked(rhs._data[i]);\n\n k = i64(lx) - i64(ly) - k;\n unchecked((z[i] = LOW(k)));\n k = k < 0 ? 1 : 0;\n }\n for (; i < q; ++i) {\n const lx = unchecked(this._data[i]);\n\n k = i64(lx) - k;\n unchecked((z[i] = LOW(k)));\n k = k < 0 ? 1 : 0;\n }\n return new MpZ(z);\n }\n\n // unsigned sub by uint32\n // treats values as unsigned\n protected _usubU32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q);\n\n let k: u32 = rhs;\n for (let i: i32 = 0; i < q; ++i) {\n const lx = unchecked(this._data[i]);\n\n unchecked((z[i] = lx - k));\n k = k > lx ? 1 : 0;\n }\n\n return new MpZ(z);\n }\n\n /**\n * #### `#dec(): MpZ`\n *\n * @returns the decrement of `this` MpZ (`this - 1`).\n */\n @operator.prefix('--')\n @operator.postfix('--')\n dec(): MpZ {\n if (this.isNeg) return this._uinc().negate(); // -a - 1 = -(a + 1)\n if (this.eqz()) return MpZ.ONE.negate();\n return this._udec();\n }\n\n protected _udec(): MpZ {\n // TODO: optimize by couting bits?\n const q = this.size;\n const z = new StaticArray(q);\n\n let k: bool = 1;\n for (let i: i32 = 0; i < q; ++i) {\n const lx = unchecked(this._data[i]);\n\n unchecked((z[i] = lx - k));\n k = k > lx ? 1 : 0;\n }\n\n return new MpZ(z);\n }\n\n // *** Multiplication ***\n\n /**\n * #### `#mul(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the product of `this` MpZ and the `rhs` (`this * rhs`).\n */\n mul(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n\n // if (u64(this.size) + u64(y.size) > u64(MAX_LIMBS)) {\n // throw new RangeError('Maximum MpZ size exceeded');\n // }\n\n if (this.eqz() || y.eqz()) return MpZ.ZERO;\n if (this.eq(MpZ.ONE)) return y;\n if (y.eq(MpZ.ONE)) return this;\n\n const q = this.size;\n const p = y.size;\n\n let z: MpZ;\n\n if (p === 1) {\n z = this._umulU32(unchecked(y._data[0]));\n } else if (q === 1) {\n z = y._umulU32(unchecked(this._data[0]));\n } else {\n z = this._umul(y);\n }\n\n return this.isNeg !== y.isNeg ? z.negate() : z;\n }\n\n /**\n * #### `#mul_pow2(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the product of `this` MpZ multiplied and `2**rhs` (`this * 2 ** rhs`).\n */\n // multiply by power of 2, using bit shifts\n mul_pow2(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.eqz()) return this;\n if (this.eqz()) return MpZ.ZERO;\n return this._leftShift(y);\n }\n\n // unsigned mul\n // treats values as unsigned\n protected _umul(rhs: MpZ): MpZ {\n const q = this.size;\n const p = rhs.size;\n const z = new StaticArray(q + p);\n\n for (let i: i32 = 0; i < q; ++i) {\n let c: u64 = 0;\n for (let j: i32 = 0; j < p; ++j) {\n const k = i + j;\n c +=\n u64(unchecked(this._data[i])) * u64(unchecked(rhs._data[j])) +\n u64(unchecked(z[k]));\n unchecked((z[k] = LOW(c)));\n c = HIGH(c);\n }\n unchecked((z[i + p] = LOW(c)));\n }\n\n return new MpZ(z);\n }\n\n // unsigned square\n // treats values as unsigned\n // TODO: optimize for aij = aji\n protected _usqr(): MpZ {\n const q = this.size;\n const z = new StaticArray(q * 2);\n\n for (let i: i32 = 0; i < q; ++i) {\n let carry: u64 = 0;\n for (let j: i32 = 0; j < q; ++j) {\n const k = i + j;\n carry +=\n u64(unchecked(this._data[i])) * u64(unchecked(this._data[j])) +\n u64(unchecked(z[k]));\n unchecked((z[k] = LOW(carry)));\n carry = HIGH(carry);\n }\n unchecked((z[i + q] = LOW(carry)));\n }\n\n return new MpZ(z);\n }\n\n // unsigned multiply by uint32\n // treats values as unsigned\n protected _umulU32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q + 1);\n\n let c: u64 = 0;\n for (let i: i32 = 0; i < q; ++i) {\n c += u64(unchecked(this._data[i])) * u64(rhs);\n unchecked((z[i] = LOW(c)));\n c = HIGH(c);\n }\n unchecked((z[q] = LOW(c)));\n\n return new MpZ(z);\n }\n\n // unsigned mul by power of 2\n // treats values as unsigned\n protected _umulpow2U32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q + 1);\n\n let c: u64 = 0;\n for (let i: i32 = 0; i < q; ++i) {\n c += u64(unchecked(this._data[i])) << rhs;\n unchecked((z[i] = LOW(c)));\n c = HIGH(c);\n }\n unchecked((z[q] = LOW(c)));\n\n return new MpZ(z);\n }\n\n // *** Division ***\n\n /**\n * #### `#div(rhs: MpZ): MpZ`\n *\n * @returns the quotient of `this` MpZ divided by the `rhs` (`trunc(this / rhs)`) truncated towards zero.\n * @throws RangeError if `rhs` is zero.\n */\n div(rhs: T): MpZ {\n if (this.eqz()) return MpZ.ZERO;\n\n const y = MpZ.from(rhs);\n\n if (y.eqz()) throw new RangeError('Divide by zero');\n if (y.eq(MpZ.ONE)) return this; // x / 1 = x\n if (this.eq(y)) return MpZ.ONE; // x / x = 1\n\n const sx = this.isNeg;\n const sy = y.isNeg;\n\n const n = this.abs();\n const d = y.abs();\n\n if (n.lt(d)) return MpZ.ZERO; // ⌊n / d⌋ = 0 if n < d\n\n const sz = sx !== sy;\n\n if (d.size === 1) {\n const r = n._udivU32(unchecked(d._data[0]));\n return sz ? r.negate() : r;\n }\n\n const p = n._udiv(d);\n return sz ? p.negate() : p;\n }\n\n /**\n * #### `#div_pow2(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the quotant of `this` MpZand `2**rhs` (`this / 2 ** rhs`) truncated towards zero.\n */\n // divide by power of 2, using bit shifts\n div_pow2(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.eqz()) return this;\n if (this.eqz()) return MpZ.ZERO;\n return this._rightShift(y);\n }\n\n // unsigned divide, lhs > rhs\n // Donald Knuth’s Algorithm D\n protected _udiv(rhs: MpZ): MpZ {\n assert(ASC_NO_ASSERT || this > rhs, '_udiv: lhs must be greater than rhs');\n\n const m = this.size;\n const n = rhs.size;\n const z = new StaticArray(m - n + 1);\n\n // D1. [Normalize]\n // Normalize by shifting rhs left just enough so that\n // its high-order bit is on, and shift lhs left the\n // same amount.\n const s = rhs._clz();\n const un = this._umul_pow2(s).toArray();\n const vn = rhs._umul_pow2(s).toArray();\n\n // We may have to append a high-order\n // digit on the dividend;\n if (un.length === m) {\n un.push(0);\n }\n\n assert(ASC_NO_ASSERT || un.length === m + 1, '_udiv: un.length !== m + 1');\n assert(ASC_NO_ASSERT || vn.length === n, '_udiv: vn.length !== n');\n\n // Main loop.\n for (let j = m - n; j >= 0; j--) {\n // D3. [Calculate Q̂]\n const un1: u64 =\n unchecked(u64(un[j + n]) << 32) + unchecked(u64(un[j + n - 1]));\n const vn1 = unchecked(u64(vn[n - 1]));\n let qhat: u64 = un1 / vn1;\n let rhat: u64 = un1 % vn1;\n\n const vn2 = unchecked(u64(vn[n - 2]));\n const un2 = unchecked(u64(un[j + n - 2]));\n\n while (true) {\n if (qhat >= BASE || LOW(qhat) * vn2 > (rhat << 32) + un2) {\n qhat -= 1;\n rhat += vn1;\n if (rhat < BASE) continue;\n }\n break;\n }\n\n // D4. [Multiply and subtract]\n let k: i64 = 0;\n let t: i64 = 0;\n for (let i = 0; i < n; i++) {\n const p: u64 = qhat * unchecked(u64(vn[i]));\n t = unchecked(u64(un[i + j])) - k - LOW(p);\n unchecked((un[i + j] = LOW(t)));\n k = (p >> 32) - (t >> 32);\n }\n t = unchecked(u64(un[j + n])) - k;\n unchecked((un[j + n] = LOW(t)));\n\n // D5. [Test remainder]\n unchecked((z[j] = LOW(qhat))); // Store quotient digit.\n if (t < 0) {\n // D6. [Add back]\n\n // If we subtracted too much, add back.\n z[j] -= 1;\n k = 0;\n for (let i = 0; i < n; i++) {\n t = unchecked(u64(un[i + j]) + u64(vn[i])) + k;\n unchecked((un[i + j] = LOW(t)));\n k = t >> 32;\n }\n unchecked((un[j + n] = LOW(u64(un[j + n]) + k)));\n }\n }\n return new MpZ(z);\n }\n\n // unsigned divide by uint32\n // treats values as unsigned\n protected _udivU32(rhs: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q);\n\n let r: u64 = 0;\n for (let i: i32 = this.size - 1; i >= 0; --i) {\n r = u64(unchecked(this._data[i])) + u64(r << 32);\n unchecked((z[i] = LOW(r / rhs)));\n r %= rhs;\n }\n\n return new MpZ(z);\n }\n\n protected _udivRemU32(rhs: u32): DivRem {\n assert(ASC_NO_ASSERT || !this.isNeg, '_udivRemU32: lhs must be positive');\n\n const q = this.size;\n const z = new StaticArray(q);\n\n let r: u64 = 0;\n for (let i: i32 = q - 1; i >= 0; --i) {\n r = u64(unchecked(this._data[i])) + (r << 32);\n unchecked((z[i] = LOW(r / rhs)));\n r %= rhs;\n }\n\n return { div: new MpZ(z), rem: LOW(r) };\n }\n\n // *** Modulus ***\n\n /**\n * #### `#mod(rhs: MpZ): MpZ`\n *\n * @returns the modulus of `this` MpZ divided by the `rhs`.\n * @throws RangeError if `rhs` is zero.\n *\n * > Note: The `#mod` method is not the same as the `%` operator. The `%` operator returns the `#rem` of the division of the lhs and rhs, while the `#mod` method returns the modulo of the lhs and rhs.\n */\n mod(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n const r = this._rem(y);\n if (this.isNeg === y.isNeg) return r;\n if (r.eqz()) return MpZ.ZERO;\n return r.add(y);\n }\n\n /**\n * #### `#rem(rhs: MpZ): MpZ`\n *\n * @returns the remainder of `this` MpZ divided by the `rhs` (`this % rhs`).\n * @throws RangeError if `rhs` is zero.\n *\n * > Note: The `#rem` method is the same as the `%` operator. The `%` operator returns the `#rem` of the division of the lhs and rhs, while the `#mod` method returns the modulo of the lhs and rhs.\n */\n rem(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n return this._rem(y);\n }\n\n protected _rem(rhs: MpZ): MpZ {\n const q = this.div(rhs);\n return this.sub(rhs.mul(q));\n }\n\n // *** Pow ***\n\n /**\n * #### `#pow(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the value of `this` MpZ raised to the power of `rhs` (`this ** rhs`).\n */\n pow(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.isNeg) return MpZ.ZERO;\n\n if (y.eqz()) return MpZ.ONE;\n if (this.eqz()) return MpZ.ZERO;\n if (y.eq(MpZ.ONE)) return this;\n if (this.eq(MpZ.ONE)) return MpZ.ONE;\n\n const sz = this.isNeg && y.isOdd();\n const z =\n y.size === 1 ? this._upowU32(unchecked(y._data[0])) : this._upow(y);\n return sz ? z.negate() : z;\n }\n\n // unsigned pow\n // exponentiation by squaring (modified)\n // ignores sign of base and exponent\n protected _upow(rhs: MpZ): MpZ {\n let z = MpZ.ONE;\n let x: MpZ = this;\n\n const p = rhs.size;\n for (let i: i32 = 0; i < p; ++i) {\n let ly = unchecked(rhs._data[i]);\n\n for (let j: u32 = 0; j < LIMB_BITS; ++j) {\n if (ly & 1) {\n z = z._umul(x);\n }\n\n ly >>= 1;\n if (ly === 0 && i === p - 1) break;\n x = x._usqr();\n }\n }\n\n return z;\n }\n\n // Exponentiation by squaring\n // Ignores sign of base and exponent\n protected _upowU32(rhs: u32): MpZ {\n let z = MpZ.ONE;\n let x: MpZ = this;\n\n while (true) {\n if (rhs & 1) {\n z = z._umul(x);\n }\n\n rhs >>= 1;\n if (rhs === 0) break;\n x = x._usqr();\n }\n\n return z;\n }\n\n /**\n * #### `#sqrt(): MpZ`\n *\n * @returns the greatest integer less than or equal to the square root of `this`.\n * @throws RangeError if `this` is negative.\n */\n isqrt(): MpZ {\n if (this.isNeg) {\n throw new RangeError(\n 'Square root of negative number is not a real number'\n );\n }\n if (this.lt(2)) return this;\n\n let x0 = this._bitShiftRight(1);\n let x1 = x0._uadd(this.div(x0))._bitShiftRight(1);\n\n while (x1 < x0) {\n x0 = x1;\n x1 = x0._uadd(this.div(x0))._bitShiftRight(1);\n }\n\n return x0;\n }\n\n /**\n * #### `#iroot(n: u32): MpZ`\n *\n * @returns the greatest integer less than or equal to the nth root of `this`.\n * @throws RangeError if `n` is zero or `this` is negative and `n` is even.\n */\n iroot(k: u32): MpZ {\n if (k === 0) throw new RangeError('Root must be greater than 0');\n\n if (this.isNeg) {\n if (k % 2 === 0) {\n throw new RangeError('Root of negative number is not a real number');\n }\n return this.abs()._uiroot(k).negate();\n }\n\n return this._uiroot(k);\n }\n\n protected _uiroot(k: u32): MpZ {\n if (this.lt(2)) return this;\n\n const n1 = MpZ.from(k - 1);\n\n let d = this._uaddU32(1);\n let e: MpZ = this;\n\n while (e < d) {\n d = e;\n e = e\n ._umul(n1)\n ._uadd(this.div(e._upow(n1)))\n ._udivU32(k);\n }\n\n return d;\n }\n\n /**\n * #### `#log2(): MpZ`\n *\n * @returns the base 2 logarithm of `this`.\n * @throws RangeError if `this` is negative or zero.\n */\n log2(): MpZ {\n if (this.isNeg) throw new RangeError('Logarithm of negative number');\n if (this.eqz()) throw new RangeError('Logarithm of zero');\n if (this.lt(2)) return MpZ.ZERO;\n\n return MpZ.from(this._bits() - 1);\n }\n\n // Returns the ceiling of the base 10 logarithm of `this`\n // Assumes x > 1\n protected _ceilLog10(): u64 {\n if (this.lt(10)) return 1;\n\n const k = f64(this._bits() - 1);\n const z = u64(k / LOG2_10); // ~log2(x)/log2(10) < 2.1*10^10\n return z + 1;\n }\n\n /**\n * #### `#log10(): MpZ`\n *\n * @returns the base 10 logarithm of `this`.\n * @throws RangeError if `this` is negative or zero.\n */\n log10(): MpZ {\n if (this.isNeg) throw new RangeError('Logarithm of negative number');\n if (this.eqz()) throw new RangeError('Logarithm of zero');\n if (this.lt(10)) return MpZ.ZERO;\n\n assert(\n ASC_NO_ASSERT || this.log2().size < 3,\n 'log10: internal assumption failed'\n );\n\n // Correcting ceilLog10\n const x = this.abs();\n const z = x._ceilLog10();\n const t = MpZ.TEN.pow(z);\n return x.ge(t) ? MpZ.from(z) : MpZ.from(z - 1);\n\n // Direct implementation\n // let x = this.abs();\n // let k: u64 = 0;\n\n // while (!x.eqz()) {\n // x = x.div(10);\n // k++;\n // }\n\n // return MpZ.from(k - 1);\n }\n\n /**\n * #### `#fact(): MpZ`\n *\n * @returns the factorial of `this` MpZ (`this!`).\n * @throws RangeError if `this` is negative or too large (greater than `MAX_INTEGER`).\n */\n fact(): MpZ {\n if (this.isNeg) throw new RangeError('Factorial of negative number');\n if (this.eqz()) return MpZ.ONE;\n if (this.size > 1) throw new RangeError('Factorial of large number');\n return this._fact();\n }\n\n protected _fact(): MpZ {\n let x = this.toU32();\n let z = MpZ.ONE;\n while (x > 1) {\n z = z.mul(x--);\n }\n return z;\n }\n\n /**\n * #### `#gcd(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the greatest common divisor of `this` MpZ and `rhs`.\n */\n gcd(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (this.eqz()) return y.abs();\n const x = this.abs();\n if (y.eqz()) return x;\n\n return x._gcd(y.abs());\n }\n\n protected _gcd(rhs: MpZ): MpZ {\n let x: MpZ = this;\n let y = rhs;\n\n const i = x._ctz();\n x = x._udiv_pow2(i);\n\n const j = y._ctz();\n y = y._udiv_pow2(j);\n\n const k = min(i, j);\n\n while (true) {\n if (y > x) {\n const t = x;\n x = y;\n y = t;\n }\n\n x = x._usub(y);\n if (x.eqz()) return y._umul_pow2(k);\n\n x = x._udiv_pow2(x._ctz());\n }\n }\n\n /**\n * #### `#lcm(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the least common multiple of `this` MpZ and `rhs`.\n */\n lcm(rhs: T): MpZ {\n let y = MpZ.from(rhs);\n if (this.eqz() || y.eqz()) return MpZ.ZERO;\n\n const x = this.abs();\n y = y.abs();\n return x.mul(y).div(x._gcd(y));\n }\n\n // *** Shifts ***\n\n // Gets the value of the bit at the specified position (2's complement)\n protected _getBit(n: u64): bool {\n const limb = (n / LIMB_BITS);\n if (limb >= this.size) return this.isNeg;\n\n const x = this.isNeg ? this.not() : this;\n\n const mask = 1 << u32(n % LIMB_BITS);\n const b = unchecked(x._data[limb]) & mask;\n return this.isNeg === !b ? 1 : 0;\n }\n\n // count leading zeros (doesn't count sign bit, treats value as unsigned)\n protected _clz(): u32 {\n const d = unchecked(this._data[this.size - 1]);\n return clz(d);\n }\n\n // count trailing zeros (doesn't count sign bit, treats value as unsigned)\n protected _ctz(): u64 {\n if (this.eqz()) return 0;\n\n let l: u32 = 0;\n while (unchecked(this._data[l]) === 0) {\n l++;\n }\n return l * LIMB_BITS + ctz(unchecked(this._data[l]));\n }\n\n // returns the number of bits in the magnitude excluding leading zeros\n // doesn't count sign bit, treats value as unsigned\n protected _bits(): u64 {\n return u64(this.size) * LIMB_BITS - this._clz();\n }\n\n protected _limbShiftLeft(n: u32): MpZ {\n assert(\n ASC_NO_ASSERT || n < MAX_LIMBS,\n '_limbShiftLeft: n must be less than i32.MAX_VALUE'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_bitShiftRight: n must be > 0');\n\n if (n === 0) return this;\n const data = this._data.slice();\n const low = new StaticArray(n);\n return new MpZ(StaticArray.fromArray(low.concat(data)));\n }\n\n protected _limbShiftRight(n: u32): MpZ {\n assert(ASC_NO_ASSERT || n >= 0, '_bitShiftRight: n must be > 0');\n\n if (n === 0) return this;\n if (n >= this.size) return MpZ.ZERO;\n const data = this._data.slice(n);\n return new MpZ(StaticArray.fromArray(data));\n }\n\n protected _bitShiftLeft(n: u32): MpZ {\n assert(\n ASC_NO_ASSERT || n < LIMB_BITS,\n '_bitShiftLeft: n must be less than LIMB_BITS'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_bitShiftRight: n must be > 0');\n\n return n === 0 ? this : this._umulpow2U32(n);\n }\n\n protected _bitShiftRight(n: u32): MpZ {\n assert(\n ASC_NO_ASSERT || n < LIMB_BITS,\n '_bitShiftRight: n must be less than LIMB_BITS'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_bitShiftRight: n must be > 0');\n\n return n === 0 ? this : this._udivPow2U32(n);\n }\n\n // unsigned divide by power of 2\n // treats values as unsigned\n protected _udivPow2U32(n: u32): MpZ {\n const q = this.size;\n const z = new StaticArray(q);\n const n2 = 2 ** n;\n\n let rem: u64 = 0;\n for (let i: i32 = this.size - 1; i >= 0; --i) {\n rem = u64(unchecked(this._data[i])) + (rem << 32);\n unchecked((z[i] = LOW(rem >> n)));\n rem %= n2;\n }\n\n return new MpZ(z);\n }\n\n // unsigned multiply by power of 2 using bit shifts\n // treats values as unsigned\n protected _umul_pow2(n: u64): MpZ {\n assert(\n ASC_NO_ASSERT || n < LIMB_BITS * MAX_LIMBS,\n '_udiv_pow2: rhs must be < 32*MAX_LIMBS'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_udiv_pow2: rhs must be > 0');\n\n if (n === 0) return this;\n\n let z: MpZ = this;\n const limbs = u32(n / LIMB_BITS);\n if (limbs > 0) z = z._limbShiftLeft(limbs);\n\n const bits = u32(n % LIMB_BITS);\n if (bits > 0) z = z._bitShiftLeft(bits);\n\n return z;\n }\n\n // unsigned divide by power of 2 using bit shifts\n // treats values as unsigned\n protected _udiv_pow2(n: u64): MpZ {\n assert(\n ASC_NO_ASSERT || n < LIMB_BITS * MAX_LIMBS,\n '_udiv_pow2: rhs must be < 32*MAX_LIMBS'\n );\n assert(ASC_NO_ASSERT || n >= 0, '_udiv_pow2: rhs must be > 0');\n\n if (n === 0) return this;\n\n let z: MpZ = this;\n\n const bits = u32(n % LIMB_BITS);\n if (bits > 0) z = z._bitShiftRight(bits);\n\n const limbs = u32(n / LIMB_BITS);\n if (limbs > 0) z = z._limbShiftRight(limbs);\n\n return z;\n }\n\n protected _leftShift(rhs: MpZ): MpZ {\n if (rhs.size > 2) throw new RangeError('Maximum MpZ size exceeded');\n\n const n = rhs.toU64();\n if ((this.size + n) / LIMB_BITS > MAX_LIMBS) {\n throw new RangeError('Maximum MpZ size exceeded');\n }\n return this.isNeg ? this._umul_pow2(n).negate() : this._umul_pow2(n);\n }\n\n protected _rightShift(rhs: MpZ): MpZ {\n if (rhs.size > 2) return MpZ.ZERO;\n\n const n = rhs.toU64();\n if (n > LIMB_BITS * MAX_LIMBS) return MpZ.ZERO;\n return this.isNeg ? this._udiv_pow2(n).negate() : this._udiv_pow2(n);\n }\n\n /**\n * #### `#shiftLeft(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the value of `this` MpZ left shifted by `rhs` (`this << rhs`). Negative `rhs` values shift right.\n * @throws RangeError if the result exceeds the maximum MpZ size.\n *\n * > Note: The `#shiftLeft` method return the result of the bitwise shift as if the MpZ was a 2's complement signed integer; matching JavaScript's BigInt `<<` operator.\n */\n shiftLeft(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.isNeg) return this.shiftRight(y.negate());\n\n if (y.eqz()) return this;\n if (this.eqz()) return MpZ.ZERO;\n\n return this._leftShift(y);\n }\n\n /**\n * #### `#shiftRight(rhs: i32 | u32 | i64 | u64 | MpZ): MpZ`\n *\n * @returns the value of `this` MpZ right shifted by `rhs` (`this >> rhs`). Negative `rhs` values shift left.\n * @throws RangeError if the result exceeds the maximum MpZ size.\n *\n * > Note: The `#shiftLeft` method return the result of the bitwise shift as if the MpZ was a 2's complement signed integer; matching JavaScript's BigInt `>>` operator.\n */\n shiftRight(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (y.isNeg) return this._leftShift(y.negate());\n if (y.eqz()) return this;\n if (this.eqz()) return MpZ.ZERO;\n\n return this.isNeg ? this.not()._rightShift(y).not() : this._rightShift(y);\n }\n\n // *** Bitwise operators ***\n\n /**\n * #### `#not(): MpZ`\n *\n * @returns the bitwise NOT of `this` MpZ (`~this`).\n *\n * > Note: The `#not` method returns the result as if the MpZ was a 2's complement signed integer (yeilding `-(x + 1)`); matching JavaScript's BigInt `~` operator.\n */\n not(): MpZ {\n return this.isNeg ? this._udec() : this._uinc().negate();\n }\n\n /**\n * #### `#and(rhs: MpZ): MpZ`\n *\n * @returns the bitwise AND of `this` MpZ and `rhs`.\n *\n * > Note: The `#and` method returns the result of the bitwise `AND` as if the MpZ was a 2's complement signed integer; matching JavaScript's `&` BigInt operator.\n */\n and(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (!this.isNeg && !y.isNeg) return this._and(y);\n if (this.isNeg && y.isNeg) return this.not()._or(y.not()).not(); // x & y = ~(~x | ~y)\n if (this.isNeg) return y._andNot(this.not()); // x & y = y & ~~x\n return this._andNot(y.not()); // x & y = x & ~~y\n }\n\n protected _and(rhs: MpZ): MpZ {\n const p = this.size;\n const q = rhs.size;\n const z = new StaticArray(q > p ? q : p);\n\n for (let i: i32 = 0; i < z.length; ++i) {\n const lx = p > i ? unchecked(this._data[i]) : 0;\n const ly = q > i ? unchecked(rhs._data[i]) : 0;\n unchecked((z[i] = lx & ly));\n }\n\n return new MpZ(z);\n }\n\n // Exponse this?\n protected _andNot(rhs: MpZ): MpZ {\n const p = this.size;\n const q = rhs.size;\n const z = new StaticArray(q > p ? q : p);\n\n for (let i: i32 = 0; i < z.length; ++i) {\n const lx = p > i ? unchecked(this._data[i]) : 0;\n const ly = q > i ? unchecked(rhs._data[i]) : 0;\n unchecked((z[i] = ly === 0 ? lx : lx & ~ly));\n }\n\n return new MpZ(z);\n }\n\n /**\n * #### `#or(rhs: MpZ): MpZ`\n *\n * @returns the bitwise OR of `this` MpZ and `rhs`.\n *\n * > Note: The `#or` method returns the result of the bitwise `OR` as if the MpZ was a 2's complement signed integer; matching JavaScript's BigInt `|` operator.\n */\n or(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (!this.isNeg && !y.isNeg) return this._or(y);\n if (this.isNeg && y.isNeg) return this.not()._and(y.not()).not(); // x | y = ~(~x & ~y)\n if (this.isNeg) return this.not()._andNot(y).not(); // x | y = ~(~x & ~y)\n return y.not()._andNot(this).not(); // x | y = ~(~y & ~x)\n }\n\n protected _or(rhs: MpZ): MpZ {\n const p = this.size;\n const q = rhs.size;\n const z = new StaticArray(q > p ? q : p);\n\n for (let i: i32 = 0; i < z.length; ++i) {\n const lx = p > i ? unchecked(this._data[i]) : 0;\n const ly = q > i ? unchecked(rhs._data[i]) : 0;\n unchecked((z[i] = lx | ly));\n }\n\n return new MpZ(z);\n }\n\n /**\n * #### `#xor(rhs: MpZ): MpZ`\n *\n * @returns the bitwise XOR of `this` MpZ and `rhs`.\n *\n * Note: The `#xor` method returns the result of the bitwise `XOR` as if the MpZ was a 2's complement signed integer; matching JavaScript's BigInt `^` operator.\n */\n xor(rhs: T): MpZ {\n const y = MpZ.from(rhs);\n if (!this.isNeg && !y.isNeg) return this._xor(y);\n if (this.isNeg && y.isNeg) return this.not()._xor(y.not()); // x ^ y = ~x ^ ~y\n if (this.isNeg) return y._xor(this.not()).not(); // x ^ y = ~(y ^ ~x)\n return this._xor(y.not()).not(); // x ^ y = ~(x ^ ~y)\n }\n\n protected _xor(rhs: MpZ): MpZ {\n const p = this.size;\n const q = rhs.size;\n const z = new StaticArray(q > p ? q : p);\n\n for (let i: i32 = 0; i < z.length; ++i) {\n const lx = p > i ? unchecked(this._data[i]) : 0;\n const ly = q > i ? unchecked(rhs._data[i]) : 0;\n unchecked((z[i] = lx ^ ly));\n }\n\n return new MpZ(z);\n }\n\n // *** ToString ***\n\n /**\n * #### `#toString(radix: i32 = 10): string`\n *\n * @returns the value of `this` MpZ as a string. The radix can be from 2 and 36 (inclusive). The default radix is 10. Negative numbers are prefixed with a `-`. Negitive radix values return the result in uppercase.\n * @throws Error if the radix is not between 2 and 36.\n *\n * Note: The resulting string is not prefixed with the radix (e.g. `0x` or `0b`) and therefore not compatible as input to `MpZ.from` (radix of 10 excluded).\n */\n toString(radix: i32 = 10): string {\n if (this.eqz()) return '0';\n\n if (radix < -10) {\n return this.toString(-radix).toUpperCase();\n }\n\n if (radix === 10) {\n return this.toDecimal();\n } else if (radix === 16) {\n return this.isNeg ? `-${this.abs()._uhex()}` : this._uhex();\n } else if (radix >= 2 && radix <= 36) {\n return this.isNeg ? `-${this.abs()._uitoa(radix)}` : this._uitoa(radix);\n } else {\n throw new Error('toString() radix argument must be between 2 and 36');\n }\n }\n\n /**\n * #### `#toHex(): string`\n *\n * @returns the value of `this` MpZ as a hexadecimal string.\n *\n * > Note: The resulting string is prefixed with `0x` and is therefore compatible as input to `MpZ.from`.\n */\n toHex(): string {\n if (this.eqz()) return '0x0';\n\n const s = this._uhex();\n return this.isNeg ? `-0x${s}` : `0x${s}`;\n }\n\n /**\n * #### `#toDecimal(): string`\n *\n * @returns the value of `this` MpZ as a decimal string.\n */\n toDecimal(): string {\n if (this.eqz()) return '0';\n return (this.isNeg ? `-` : '') + this.abs()._uitoaDecimal();\n }\n\n protected _uhex(): string {\n const s = new StaticArray(2 * this.size - 1);\n\n let q = this.size;\n let i = 0;\n\n // MSB is not padded\n s[i++] = unchecked(this._data[--q]).toString(16);\n\n while (q > 0) {\n const x = unchecked(this._data[--q]).toString(16);\n s[i++] = '0'.repeat(8 - x.length); // padding\n s[i++] = x;\n }\n\n return s.join('');\n }\n\n protected _uitoaDecimal(): string {\n assert(\n ASC_NO_ASSERT || this.isNeg === false,\n '_uitoaDecimal: this must be positive'\n );\n\n if (this.size === 1) return this.toU32().toString(10);\n\n let n: MpZ = this;\n const k = (f64(this.size) / LOG2_10 / 9) * LIMB_BITS;\n let i = 2 * u32(k) + 1;\n const s = new StaticArray(i);\n\n while (n.compareTo(TO_DECIMAL_N) === 1) {\n const d = n._udivRemU32(TO_DECIMAL_N);\n n = d.div;\n\n const x = d.rem.toString(10);\n s[--i] = x;\n s[--i] = '0'.repeat(DIGITS_PER_LIMB - x.length);\n }\n\n if (!n.eqz()) {\n s[--i] = n.toU32().toString(10);\n }\n\n return s.join('');\n }\n\n protected _uitoa(base: u32): string {\n assert(ASC_NO_ASSERT || base >= 2, '_uitoa: base must be >= 2');\n assert(ASC_NO_ASSERT || base <= 36, '_uitoa: base must be <= 36');\n assert(\n ASC_NO_ASSERT || this.isNeg === false,\n '_uitoa: this must be positive'\n );\n\n const s = new Array();\n\n let n: MpZ = this;\n while (n.compareTo(base) === 1) {\n const d = n._udivRemU32(base);\n n = d.div;\n s.unshift(d.rem.toString(base));\n }\n\n if (!n.eqz()) {\n s.unshift(n.toU32().toString(base));\n }\n\n return s.join('');\n }\n\n // *** valueOf/toString ***\n\n /**\n * #### `#valueOf(): number`\n *\n * @returns the value of `this` MpZ as a `number`.\n */\n valueOf(): number {\n const q = this.size;\n const l1: u64 = unchecked(this._data[q - 1]);\n const z0 = f64(l1) * f64(BASE) ** (q - 1);\n const l2: u64 = q > 1 ? unchecked(this._data[q - 2]) : 0;\n const z1 = f64(l2) * f64(BASE) ** (q - 2);\n const z = z0 + z1;\n return this.isNeg ? -z : z;\n }\n\n /**\n * #### `#toU32Array(): u32[]`\n *\n * @returns the value of `this` MpZ as an unsigned 32-bit integer array. Ther sign of the MpZ is ignored.\n */\n toArray(): u32[] {\n return this._data.slice(0, this.size);\n }\n\n /**\n * #### `#toU32(): u32`\n *\n * @returns the value of `this` MpZ as an unsigned 32-bit integer. If `this` MpZ is too big to fit in an int32, only the low-order 32 bits are returned.\n * If `this` MpZ is negative, the returned value is the 2's complement representation of the MpZ.\n */\n toU32(): u32 {\n const z = unchecked(this._data[0]);\n return this.isNeg ? -z : z;\n }\n\n /**\n * #### `#toI32(): i32`\n *\n * @returns the value of `this` MpZ as a signed 32-bit integer. If `this` MpZ is too big to fit in an int32, only the low-order 32 bits are returned.\n */\n toI32(): i32 {\n const z = unchecked(this._data[0]);\n return this.isNeg ? -z : z;\n }\n\n /**\n * #### `#toU64(): u64`\n *\n * @returns the value of `this` MpZ as an unsigned 64-bit integer. If `this` MpZ is too big to fit in an int64, only the low-order 64 bits are returned.\n */\n toU64(): u64 {\n const z =\n this.size === 1\n ? u64(unchecked(this._data[0]))\n : (u64(unchecked(this._data[1])) << 32) + u64(unchecked(this._data[0]));\n return this.isNeg ? -z : z;\n }\n\n protected _toU64_safe(): u64 {\n if (this.size > 3) {\n throw new RangeError('MpZ too large to fit in u64');\n }\n return this.toU64();\n }\n\n /**\n * #### `#toI64(): i64`\n *\n * @returns the value as a signed 64-bit integer. If `this` MpZ is too big to fit in an int64, only the low-order 64 bits are returned.\n */\n toI64(): i64 {\n const z =\n this.size === 1\n ? u64(unchecked(this._data[0]))\n : (u64(unchecked(this._data[1])) << 32) + u64(unchecked(this._data[0]));\n return this.isNeg ? -z : z;\n }\n\n // aka mod_power_of_two\n // bitwise_modulo_power_of_two\n protected _truncateToNBits(bits: u64): MpZ {\n if (bits === 0) return MpZ.ZERO;\n\n const isNeg = this.isNeg;\n const limbs = (bits / LIMB_BITS);\n if (!isNeg && limbs >= this.size) return this;\n\n const x = isNeg ? this.not() : this;\n\n const p = x.size;\n let q: i32 = limbs + 1;\n const z = new StaticArray(q);\n\n for (let i: i32 = 0; i < q; ++i) {\n const lx = p > i ? unchecked(x._data[i]) : 0;\n unchecked((z[i] = isNeg ? ~lx : lx));\n }\n\n const n = (bits % LIMB_BITS);\n z[limbs] &= (1 << n) - 1;\n\n return new MpZ(z);\n }\n\n // *** Comparison ***\n\n /**\n * #### `#eqz(): boolean`\n *\n * @returns `true` if `this` MpZ is equal to zero.\n */\n eqz(): boolean {\n return this.size === 1 && unchecked(this._data[0]) === 0;\n }\n\n /**\n * #### `#compareTo(rhs: MpZ | i32 | u32 | i64 | u64 | string): i32`\n *\n * @returns `-1` if `this` MpZ is less than the rhs, `0` if `this` MpZ is equal to the rhs, or `1` if `this` MpZ is greater than the rhs.\n */\n compareTo(rhs: T): i32 {\n const y = MpZ.from(rhs);\n\n const q = this._sgn_size;\n const p = y._sgn_size;\n\n if (q > p) return 1;\n if (p > q) return -1;\n if (q < 0) return -this._ucmp(y);\n return this._ucmp(y);\n }\n\n // unsigned compare\n protected _ucmp(rhs: MpZ): i32 {\n const q = this.size;\n const p = rhs.size;\n\n if (q !== p) return q > p ? 1 : -1;\n for (let i = q - 1; i >= 0; i--) {\n const lx = unchecked(this._data[i]);\n const ly = unchecked(rhs._data[i]);\n if (lx != ly) {\n return lx > ly ? 1 : -1;\n }\n }\n return 0;\n }\n\n /**\n * #### `#eq(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is equal to the rhs.\n */\n eq(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) === 0;\n }\n\n /**\n * #### `#ne(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is not equal to the rhs.\n */\n ne(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) !== 0;\n }\n\n /**\n * #### `#gt(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is greater than the rhs.\n */\n gt(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) > 0;\n }\n\n /**\n * #### `#ge(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is greater than or equal to the rhs.\n */\n ge(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) >= 0;\n }\n\n /**\n * #### `#lt(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is less than the rhs.\n */\n lt(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) < 0;\n }\n\n /**\n * #### `#le(rhs: MpZ | i32 | u32 | i64 | u64 | string): boolean`\n *\n * @returns `true` if `this` MpZ is less than or equal to the rhs.\n */\n le(rhs: T): boolean {\n return this.compareTo(MpZ.from(rhs)) <= 0;\n }\n\n /**\n * #### Static values\n *\n * The following static values are provided for convenience:\n * - `MpZ.ZERO` - The MpZ value `0`.\n * - `MpZ.ONE` - The MpZ value `1`.\n * - `MpZ.TWO` - The MpZ value `2`.\n * - `MpZ.TEN` - The MpZ value `10`.\n */\n static readonly ZERO: MpZ = new MpZ([0]);\n static readonly ONE: MpZ = new MpZ([1]);\n static readonly TWO: MpZ = new MpZ([2]);\n static readonly TEN: MpZ = new MpZ([10]);\n\n /**\n * ### Operators\n */\n\n /**\n * #### Unary `-` operator\n *\n * @returns the negation of `this` MpZ (`-this`).\n */\n @operator.prefix('-')\n static neg(lhs: MpZ): MpZ {\n return lhs.negate();\n }\n\n /**\n * #### Binary `+`, `-`, `*`, `/` operators\n *\n * Same as the `#add`, `#sub`, `#mul`, `#div` methods.\n */\n\n // @ts-ignore\n @inline\n @operator('*')\n static mul(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.mul(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('/')\n static div(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.div(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('+')\n static add(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.add(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('-')\n static sub(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.sub(rhs);\n }\n\n /**\n * ### Comparison Operators\n *\n * #### `==`, `>`, `>=`, `<`, `<=`, `!=`\n *\n * Same as the `#eq`, `#gt`, `#ge`, `#lt`, `#le`, `#ne` methods.\n */\n\n // @ts-ignore\n @inline\n @operator('==')\n static eq(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.eq(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('>')\n static gt(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.gt(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('>=')\n static ge(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.ge(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('<')\n static lt(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.lt(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('<=')\n static le(lhs: MpZ, rhs: MpZ): boolean {\n return lhs.le(rhs);\n }\n\n // @ts-ignore\n @inline\n @operator('!=')\n static ne(lhs: MpZ, rhs: MpZ): boolean {\n return !lhs.eq(rhs);\n }\n\n /**\n * #### `%` operator\n *\n * @returns the remainder of the lhs and rhs (`lhs % rhs`).\n * @throws RangeError if `rhs` is zero.\n *\n * > Note: The `%` operator is not the same as the `#mod` method. The `%` operator returns the `#rem` of the division of the lhs and rhs; matching JavaScript's BigInt `%` operator.\n */\n // @ts-ignore\n @inline\n @operator('%')\n static mod(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs._rem(rhs);\n }\n\n /**\n * #### `**` operator\n *\n * @returns the power of the lhs to the rhs (`lhs ** rhs`).\n */\n // @ts-ignore\n @inline\n @operator('**')\n static pow(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.pow(rhs);\n }\n\n /**\n * #### `<<`, `>>` operators\n *\n * @returns the result of the left/right shift of the lhs by the rhs. Negitive rhs values will result in a opposite shift.\n * @throws RangeError if the result exceeds the maximum MpZ size.\n *\n * > Shift operators behave as if they were represented in two's-complement notation; like JavaScripts's `<<` and `>>` operators.\n */\n\n // @ts-ignore\n @operator('<<')\n static shiftLeft(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.shiftLeft(rhs);\n }\n\n // @ts-ignore\n @operator('>>')\n static shiftRight(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.shiftRight(rhs);\n }\n\n /**\n * #### `~` operator\n *\n * @returns the bitwise NOT of `this` MpZ (`~this`).\n */\n @operator.prefix('~')\n static not(lhs: MpZ): MpZ {\n return lhs.not();\n }\n\n /**\n * #### `&`, `|`, `^ operators\n *\n * @returns the bitwise `AND`, `OR`, `XOR` operation on the two operands.\n *\n * > This operator returns the result of the bitwise `AND`, `OR`, `XOR` as if the values were 2's complement signed integers; matching JavaScript's BigInt `&`, `|`, `^` operators.\n */\n\n // @ts-ignore\n @operator('&')\n static and(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.and(rhs);\n }\n\n // @ts-ignore\n @operator('|')\n static or(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.or(rhs);\n }\n\n // @ts-ignore\n @operator('^')\n static xor(lhs: MpZ, rhs: MpZ): MpZ {\n return lhs.xor(rhs);\n }\n\n /**\n * ### `!` operator\n *\n * @returns the logical NOT of `this` MpZ (`!this`). This is equivalent to `#eqz()`.\n */\n @operator.prefix('!')\n static logicalNot(lhs: MpZ): boolean {\n return lhs.eqz();\n }\n\n /**\n * #### `MpZ.asIntN(bits: u32, a: MpZ): MpZ`\n *\n * @returns a BigInt value truncated to the given number of least significant bits and returns that value as a signed integer.\n * If the leading bit of the remaining number is 1, the result is negative.\n */\n static asIntN(bits: u32, a: MpZ): MpZ {\n if (bits === 0) return MpZ.ZERO;\n const isNeg = a._getBit(bits - 1);\n return isNeg\n ? a.negate()._truncateToNBits(bits).negate()\n : a._truncateToNBits(bits);\n }\n\n /**\n * ### `MpZ.asUintN(bits: u32, a: MpZ): MpZ`\n *\n * @returns a BigInt value truncated to the given number of least significant bits and returns that value as an unsigned integer.\n * Results are always non-negative and two's complement in binary.\n */\n static asUintN(bits: u32, a: MpZ): MpZ {\n return a._truncateToNBits(bits);\n }\n\n /**\n * #### `MpZ.random(bits: u64): MpZ`\n *\n * @returns a random MpZ value with the specified maximum number of bits.\n * @throws RangeError if `bits` exceeds the maximum MpZ size.\n */\n static random(bits: u64): MpZ {\n const b = u32(bits % 32);\n const limbs = (bits / LIMB_BITS) + (b > 0);\n if (limbs > MAX_LIMBS) throw new RangeError('Maximum MpZ size exceeded');\n\n const n = new StaticArray(limbs);\n for (let i: u32 = 0; i < limbs; ++i) {\n n[i] = u32(Math.random() * u32.MAX_VALUE);\n }\n if (b > 0) {\n const m = (1 << b) - 1;\n n[n.length - 1] &= m;\n }\n return new MpZ(n);\n }\n}\n","import { strtol, strtod, strtob } from \"./util/string\";\n\ntype auto = i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isBoolean(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isInteger(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isSigned(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFloat(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isVector(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isReference(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isString(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isArray(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isArrayLike(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFunction(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isNullable(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isDefined(expression: auto): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isConstant(expression: auto): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isManaged(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isVoid(): bool;\n\n// @ts-ignore\n@builtin\nexport declare function lengthof(func?: T): i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function clz(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ctz(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function popcnt(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rotl(value: T, shift: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rotr(value: T, shift: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function abs(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function max(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function min(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ceil(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function floor(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function copysign(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function nearest(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function reinterpret(value: number): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sqrt(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function trunc(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function add(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sub(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function mul(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function div(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function eq(left: T, right: T): i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ne(left: T, right: T): i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rem(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function store(ptr: usize, value: auto, immOffset?: usize, immAlign?: usize): void;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sizeof(): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function alignof(): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function offsetof(fieldName?: string): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function idof(): u32;\n\n// @ts-ignore\n@builtin\nexport declare function nameof(): string;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function select(ifTrue: T, ifFalse: T, condition: bool): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function unreachable(): auto;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function changetype(value: auto): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function assert(isTrueish: T, message?: string): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function unchecked(expr: T): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function call_indirect(index: u32, ...args: auto[]): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function instantiate(...args: auto[]): T;\n\nexport namespace atomic {\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load(ptr: usize, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: T, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult;\n\n // @ts-ignore: decorator\n @builtin\n export declare function notify(ptr: usize, count: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function fence(): void;\n}\n\n// @ts-ignore: decorator\n@lazy\nexport const enum AtomicWaitResult {\n OK = 0,\n NOT_EQUAL = 1,\n TIMED_OUT = 2\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i8(value: auto): i8;\n\nexport namespace i8 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i8 = -128;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i8 = 127;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): i8 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i16(value: auto): i16;\n\nexport namespace i16 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i16 = -32768;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i16 = 32767;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): i16 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i32(value: auto): i32;\n\nexport namespace i32 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i32 = -2147483648;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i32 = 2147483647;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): i32 {\n return strtol(value, radix);\n }\n\n // @ts-ignore: decorator\n @builtin\n export declare function clz(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ctz(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_s(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_u(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotl(value: i32, shift: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotr(value: i32, shift: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rem_s(left: i32, right: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rem_u(left: u32, right: u32): u32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_f32(value: f32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n export namespace atomic {\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i32, immOffset?: usize): void;\n\n export namespace rmw8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n\n export namespace rmw16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n\n export namespace rmw {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i64(value: auto): i64;\n\nexport namespace i64 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i64 = -9223372036854775808;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i64 = 9223372036854775807;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): i64 {\n return strtol(value, radix);\n }\n\n // @ts-ignore: decorator\n @builtin\n export declare function clz(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ctz(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_s(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_u(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotl(value: i64, shift: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotr(value: i64, shift: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(left: i64, right:i64): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(left: i64, right:i64): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rem_s(left: i64, right: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rem_u(left: u64, right: u64): u64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_f64(value: f64): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n export namespace atomic {\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i64, immOffset?: usize): void;\n\n export namespace rmw8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw32 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isize(value: auto): isize;\n\nexport namespace isize {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: isize = sizeof() == sizeof()\n ? -2147483648\n : -9223372036854775808;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: isize = sizeof() == sizeof()\n ? 2147483647\n : 9223372036854775807;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): isize {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u8(value: auto): u8;\n\nexport namespace u8 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u8 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u8 = 255;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): u8 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u16(value: auto): u16;\n\nexport namespace u16 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u16 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u16 = 65535;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): u16 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u32(value: auto): u32;\n\nexport namespace u32 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u32 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u32 = 4294967295;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): u32 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u64(value: auto): u64;\n\nexport namespace u64 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u64 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u64 = 18446744073709551615;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): u64 {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function usize(value: auto): usize;\n\nexport namespace usize {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: usize = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: usize = sizeof() == sizeof()\n ? 4294967295\n : 18446744073709551615;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string, radix: i32 = 0): usize {\n return strtol(value, radix);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function bool(value: auto): bool;\n\nexport namespace bool {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: bool = false;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: bool = true;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string): bool {\n return strtob(value);\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f32(value: auto): f32;\n\nexport namespace f32 {\n\n // @ts-ignore: decorator\n @lazy\n export const EPSILON = reinterpret(0x34000000); // 0x1p-23f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE = reinterpret(0x00000001); // 0x0.000001p+0f\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_NORMAL_VALUE = reinterpret(0x00800000); // 0x1p-126f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_SAFE_INTEGER: f32 = -16777215;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_SAFE_INTEGER: f32 = 16777215;\n\n // @ts-ignore: decorator\n @lazy\n export const POSITIVE_INFINITY: f32 = Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NEGATIVE_INFINITY: f32 = -Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NaN: f32 = 0.0 / 0.0;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string): f32 {\n return strtod(value);\n }\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function copysign(x: f32, y: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_i32(value: i32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(value: f32): f32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: f32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(left: f32, right: f32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(left: f32, right: f32): i32;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f64(value: auto): f64;\n\nexport namespace f64 {\n\n // @ts-ignore: decorator\n @lazy\n export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE = reinterpret(0x0000000000000001); // 0x0.0000000000001p+0\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_NORMAL_VALUE = reinterpret(0x0010000000000000); // 0x1p-1022\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_SAFE_INTEGER: f64 = -9007199254740991;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_SAFE_INTEGER: f64 = 9007199254740991;\n\n // @ts-ignore: decorator\n @lazy\n export const POSITIVE_INFINITY: f64 = Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NEGATIVE_INFINITY: f64 = -Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NaN: f64 = 0.0 / 0.0;\n\n // @ts-ignore: decorator\n @inline\n export function parse(value: string): f64 {\n return strtod(value);\n }\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function copysign(x: f64, y: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_i64(value: i64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(value: f64): f64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: f64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(left: f64, right: f64): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(left: f64, right: f64): i32;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function v128(\n a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8,\n i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8\n): v128;\n\nexport namespace v128 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: T): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: T): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, ...lanes: u8[]): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function swizzle(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_ext(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8x8_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8x8_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16x4_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16x4_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32x2_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32x2_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load8_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load16_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_zero(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_zero(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: v128, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function andnot(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function not(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitselect(v1: v128, v2: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function any_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function dot(a: v128, b: v128): v128; // i16 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr(a: v128, b: v128): v128; // u8, u16 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function demote_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function promote_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function q15mulr_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_swizzle(a: v128, s: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_madd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_nmadd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_q15mulr(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_dot(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_dot_add(a: v128, b: v128, c: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i8x16(\n a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8,\n i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8\n): v128;\n\nexport namespace i8x16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_s(x: v128, idx: u8): i8;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_u(x: v128, idx: u8): u8;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(\n a: v128, b: v128,\n l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8,\n l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8\n ): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function swizzle(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_swizzle(a: v128, s: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128;\n\nexport namespace i16x8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i16): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_s(x: v128, idx: u8): i16;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_u(x: v128, idx: u8): u16;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i16): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function q15mulr_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i8x16_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i8x16_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i8x16_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i8x16_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(\n a: v128, b: v128,\n l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8\n ): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_q15mulr_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_dot_i8x16_i7x16_s(a: v128, b: v128, c: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128;\n\nexport namespace i32x4 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function dot_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f64x2_s_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f64x2_u_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_f32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_f32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_f64x2_s_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_trunc_f64x2_u_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_dot_i8x16_i7x16_add_s(a: v128, b: v128, c: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i64x2(a: i64, b: i64): v128;\n\nexport namespace i64x2 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_laneselect(a: v128, b: v128, m: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128;\n\nexport namespace f32x4 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: f32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: f32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function demote_f64x2_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_madd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_nmadd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_max(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f64x2(a: f64, b: f64): v128;\n\nexport namespace f64x2 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: f64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: f64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function promote_low_f32x4(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_madd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_nmadd(a: v128, b: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function relaxed_max(a: v128, b: v128): v128;\n}\n\n@final\nexport abstract class i31 { // FIXME: usage of 'new' requires a class :(\n\n // @ts-ignore: decorator\n @builtin\n static new(value: i32): i31ref { return changetype(unreachable()); }\n\n // @ts-ignore: decorator\n @builtin\n static get(i31expr: i31ref): i32 { return unreachable(); }\n}\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n// @ts-ignore: decorator\n@external(\"env\", \"abort\")\n@external.js(\"throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);\")\ndeclare function abort(\n message?: string | null,\n fileName?: string | null,\n lineNumber?: u32,\n columnNumber?: u32\n): void;\n\n// @ts-ignore: decorator\n@external(\"env\", \"trace\")\n@external.js(\"console.log(message, ...[a0, a1, a2, a3, a4].slice(0, n));\")\ndeclare function trace(\n message: string,\n n?: i32,\n a0?: f64,\n a1?: f64,\n a2?: f64,\n a3?: f64,\n a4?: f64\n): void;\n\n// @ts-ignore: decorator\n@external(\"env\", \"seed\")\n@external.js(\"return Date.now() * Math.random();\")\ndeclare function seed(): f64;\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\n","import { itoa32, utoa32, itoa64, utoa64, dtoa } from \"./util/number\";\nimport { strtol, strtod } from \"./util/string\";\n\n// @ts-ignore: decorator\n@builtin @inline\nexport const NaN: f64 = 0 / 0; // context-aware\n\n// @ts-ignore: decorator\n@builtin @inline\nexport const Infinity: f64 = 1 / 0; // context-aware\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isNaN(value: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFinite(value: T): bool;\n\n@final @unmanaged\nexport abstract class I8 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i8 = i8.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i8 = i8.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): i8 {\n return strtol(value, radix);\n }\n\n toString(this: i8, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I16 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i16 = i16.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i16 = i16.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): i16 {\n return strtol(value, radix);\n }\n\n toString(this: i16, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i32 = i32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i32 = i32.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): i32 {\n return strtol(value, radix);\n }\n\n toString(this: i32, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i64 = i64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i64 = i64.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): i64 {\n return strtol(value, radix);\n }\n\n toString(this: i64, radix: i32 = 10): String {\n return itoa64(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class Isize {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: isize = isize.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: isize = isize.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): isize {\n return strtol(value, radix);\n }\n\n toString(this: isize, radix: i32 = 10): String {\n if (sizeof() == 4) {\n return itoa32(this, radix);\n } else {\n return itoa64(this, radix);\n }\n }\n}\n\n@final @unmanaged\nexport abstract class U8 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u8 = u8.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u8 = u8.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): u8 {\n return strtol(value, radix);\n }\n\n toString(this: u8, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U16 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u16 = u16.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u16 = u16.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): u16 {\n return strtol(value, radix);\n }\n\n toString(this: u16, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u32 = u32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u32 = u32.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): u32 {\n return strtol(value, radix);\n }\n\n toString(this: u32, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u64 = u64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u64 = u64.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): u64 {\n return strtol(value, radix);\n }\n\n toString(this: u64, radix: i32 = 10): String {\n return utoa64(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class Usize {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: usize = usize.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: usize = usize.MAX_VALUE;\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): usize {\n return strtol(value, radix);\n }\n\n toString(this: usize, radix: i32 = 10): String {\n if (sizeof() == 4) {\n return utoa32(this, radix);\n } else {\n return utoa64(this, radix);\n }\n }\n}\n\n@final @unmanaged\nexport abstract class Bool {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: bool = bool.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: bool = bool.MAX_VALUE;\n\n toString(this: bool, radix: i32 = 0): String {\n return this ? \"true\" : \"false\";\n }\n}\n\nexport { Bool as Boolean };\n\n@final @unmanaged\nexport abstract class F32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly EPSILON: f32 = f32.EPSILON;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: f32 = f32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: f32 = f32.MAX_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_SAFE_INTEGER: f32 = f32.MIN_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_SAFE_INTEGER: f32 = f32.MAX_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly POSITIVE_INFINITY: f32 = f32.POSITIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NEGATIVE_INFINITY: f32 = f32.NEGATIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NaN: f32 = f32.NaN;\n\n static isNaN(value: f32): bool {\n return isNaN(value);\n }\n\n static isFinite(value: f32): bool {\n return isFinite(value);\n }\n\n static isSafeInteger(value: f32): bool {\n return abs(value) <= f32.MAX_SAFE_INTEGER && trunc(value) == value;\n }\n\n static isInteger(value: f32): bool {\n return isFinite(value) && trunc(value) == value;\n }\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): f32 {\n return strtol(value, radix);\n }\n\n /** @deprecated */\n static parseFloat(value: string): f32 {\n return strtod(value);\n }\n\n toString(this: f32, radix: i32 = 0): String {\n return dtoa(this);\n }\n}\n\n@final @unmanaged\nexport abstract class F64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly EPSILON: f64 = f64.EPSILON;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: f64 = f64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: f64 = f64.MAX_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_SAFE_INTEGER: f64 = f64.MIN_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_SAFE_INTEGER: f64 = f64.MAX_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly POSITIVE_INFINITY: f64 = f64.POSITIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NEGATIVE_INFINITY: f64 = f64.NEGATIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NaN: f64 = f64.NaN;\n\n static isNaN(value: f64): bool {\n return isNaN(value);\n }\n\n static isFinite(value: f64): bool {\n return isFinite(value);\n }\n\n static isSafeInteger(value: f64): bool {\n return abs(value) <= f64.MAX_SAFE_INTEGER && trunc(value) == value;\n }\n\n static isInteger(value: f64): bool {\n return isFinite(value) && trunc(value) == value;\n }\n\n /** @deprecated */\n static parseInt(value: string, radix: i32 = 0): f64 {\n return strtol(value, radix);\n }\n\n /** @deprecated */\n static parseFloat(value: string): f64 {\n return strtod(value);\n }\n\n toString(this: f64, radix: i32 = 0): String {\n return dtoa(this);\n }\n}\n\nexport { F64 as Number };\n","// This file is shared with the compiler and must remain portable\n\n/** Runtime types. */\nexport enum Runtime {\n /** Simple bump allocator without GC. */\n Stub = 0,\n /** Stop the world semi-automatic GC. */\n Minimal = 1,\n /** incremental GC. */\n Incremental = 2,\n}\n","import { compareImpl } from \"./string\";\n\ntype Comparator = (a: T, b: T) => i32;\n\n// @ts-ignore: decorator\n@lazy @inline const EMPTY = u32.MAX_VALUE;\n// @ts-ignore: decorator\n@inline const INSERTION_SORT_THRESHOLD = 48;\n// @ts-ignore: decorator\n@inline const MIN_RUN_LENGTH = 32;\n\n// @ts-ignore: decorator\n@inline\nfunction log2u(n: u32): u32 {\n return 31 - clz(n);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function COMPARATOR(): Comparator {\n if (isInteger()) {\n if (isSigned() && sizeof() <= 4) {\n return (a, b) => i32(a) - i32(b);\n } else {\n return (a, b) => i32(a > b) - i32(a < b);\n }\n } else if (isFloat()) {\n if (sizeof() == 4) {\n return (a, b) => {\n let ia = reinterpret(f32(a));\n let ib = reinterpret(f32(b));\n ia ^= ia >> 31 >>> 1;\n ib ^= ib >> 31 >>> 1;\n return i32(ia > ib) - i32(ia < ib);\n };\n } else {\n return (a, b) => {\n let ia = reinterpret(f64(a));\n let ib = reinterpret(f64(b));\n ia ^= ia >> 63 >>> 1;\n ib ^= ib >> 63 >>> 1;\n return i32(ia > ib) - i32(ia < ib);\n };\n }\n } else if (isString()) {\n return (a, b) => {\n if (\n changetype(a) == changetype(b) ||\n changetype(a) == 0 ||\n changetype(b) == 0\n ) return 0;\n let alen = changetype(a).length;\n let blen = changetype(b).length;\n if (!(alen | blen)) return 0;\n if (!alen) return -1;\n if (!blen) return 1;\n let res = compareImpl(\n changetype(a), 0,\n changetype(b), 0,\n min(alen, blen)\n );\n return res ? res : alen - blen;\n };\n } else {\n return (a, b) => i32(a > b) - i32(a < b);\n }\n}\n\n// Power Sort implementation (stable) from paper \"Nearly-Optimal Mergesorts\"\n// https://arxiv.org/pdf/1805.04154.pdf\n// This method usually outperform TimSort.\n// TODO: refactor c >>> 31 to c < 0 when binaryen will support this opt\nexport function SORT(\n ptr: usize,\n len: i32,\n comparator: Comparator\n): void {\n if (len <= INSERTION_SORT_THRESHOLD) {\n if (len <= 1) return;\n if (ASC_SHRINK_LEVEL < 1) {\n switch (len) {\n case 3: {\n let a = load(ptr, 0);\n let b = load(ptr, 1 << alignof());\n let c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 0);\n a = select(a, b, c);\n b = load(ptr, 2 << alignof());\n c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 1 << alignof());\n store(ptr, select(a, b, c), 2 << alignof());\n }\n case 2: {\n let a = load(ptr, 0);\n let b = load(ptr, 1 << alignof());\n let c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 0);\n store(ptr, select(a, b, c), 1 << alignof());\n return;\n }\n }\n }\n insertionSort(ptr, 0, len - 1, 0, comparator);\n return;\n }\n\n let lgPlus2 = log2u(len) + 2;\n let lgPlus2Size = lgPlus2 << alignof();\n let leftRunStartBuf = __alloc(lgPlus2Size << 1);\n let leftRunEndBuf = leftRunStartBuf + lgPlus2Size;\n\n for (let i: u32 = 0; i < lgPlus2; ++i) {\n store(leftRunStartBuf + (i << alignof()), EMPTY);\n }\n\n let buffer = __alloc(len << alignof());\n\n let hi = len - 1;\n let endA = extendRunRight(ptr, 0, hi, comparator);\n let lenA = endA + 1;\n\n if (lenA < MIN_RUN_LENGTH) {\n endA = min(hi, MIN_RUN_LENGTH - 1);\n insertionSort(ptr, 0, endA, lenA, comparator);\n }\n\n let top: u32 = 0, startA = 0;\n while (endA < hi) {\n let startB = endA + 1;\n let endB = extendRunRight(ptr, startB, hi, comparator);\n let lenB = endB - startB + 1;\n\n if (lenB < MIN_RUN_LENGTH) {\n endB = min(hi, startB + MIN_RUN_LENGTH - 1);\n insertionSort(ptr, startB, endB, lenB, comparator);\n }\n\n let k = nodePower(0, hi, startA, startB, endB);\n\n for (let i = top; i > k; --i) {\n let start = load(leftRunStartBuf + (i << alignof()));\n if (start != EMPTY) {\n mergeRuns(\n ptr,\n start,\n load(leftRunEndBuf + (i << alignof())) + 1,\n endA,\n buffer,\n comparator\n );\n startA = start;\n store(leftRunStartBuf + (i << alignof()), EMPTY);\n }\n }\n\n store(leftRunStartBuf + (k << alignof()), startA);\n store(leftRunEndBuf + (k << alignof()), endA);\n startA = startB;\n endA = endB;\n top = k;\n }\n\n for (let i = top; i != 0; --i) {\n let start = load(leftRunStartBuf + (i << alignof()));\n if (start != EMPTY) {\n mergeRuns(\n ptr,\n start,\n load(leftRunEndBuf + (i << alignof())) + 1,\n hi,\n buffer,\n comparator\n );\n }\n }\n // dealloc aux buffers\n __free(buffer);\n __free(leftRunStartBuf);\n}\n\nfunction insertionSort(\n ptr: usize,\n left: i32,\n right: i32,\n presorted: i32,\n comparator: Comparator\n): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n // slightly improved original insertion sort\n for (let i = left + presorted; i <= right; ++i) {\n let j = i - 1;\n let a = load(ptr + (i << alignof()));\n while (j >= left) {\n let b = load(ptr + (j << alignof()));\n if (comparator(a, b) < 0) {\n store(ptr + (j << alignof()), b, 1 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), a, 1 << alignof());\n }\n } else {\n // even-odd two-way insertion sort which allow increase minRunLen\n let range = right - left + 1;\n let i = left + select(range & 1, presorted - ((range - presorted) & 1), presorted == 0);\n for (; i <= right; i += 2) {\n let a = load(ptr + (i << alignof()), 0);\n let b = load(ptr + (i << alignof()), 1 << alignof());\n let min = b, max = a;\n if (comparator(a, b) <= 0) {\n min = a, max = b;\n }\n let j = i - 1;\n while (j >= left) {\n a = load(ptr + (j << alignof()));\n if (comparator(a, max) > 0) {\n store(ptr + (j << alignof()), a, 2 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), max, 2 << alignof());\n while (j >= left) {\n a = load(ptr + (j << alignof()));\n if (comparator(a, min) > 0) {\n store(ptr + (j << alignof()), a, 1 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), min, 1 << alignof());\n }\n }\n}\n\nfunction nodePower(left: u32, right: u32, startA: u32, startB: u32, endB: u32): u32 {\n let n: u64 = right - left + 1;\n let s = startB - (left << 1);\n let l = startA + s;\n let r = endB + s + 1;\n let a = (l << 30) / n;\n let b = (r << 30) / n;\n return clz((a ^ b));\n}\n\nfunction extendRunRight(\n ptr: usize,\n i: i32,\n right: i32,\n comparator: Comparator\n): i32 {\n if (i == right) return i;\n let j = i;\n if (comparator(\n load(ptr + ( j << alignof())),\n load(ptr + (++j << alignof()))\n ) > 0) {\n while (\n j < right &&\n (comparator(\n load(ptr + (j << alignof()), 1 << alignof()),\n load(ptr + (j << alignof()))\n ) >>> 31) // < 0\n ) ++j;\n // reverse\n let k = j;\n while (i < k) {\n let tmp = load(ptr + (i << alignof()));\n store(ptr + (i << alignof()), load(ptr + (k << alignof()))); ++i;\n store(ptr + (k << alignof()), tmp); --k;\n }\n } else {\n while (\n j < right &&\n comparator(\n load(ptr + (j << alignof()), 1 << alignof()),\n load(ptr + (j << alignof()))\n ) >= 0\n ) ++j;\n }\n return j;\n}\n\n// Merges arr[l..m - 1] and arr[m..r]\nfunction mergeRuns(\n ptr: usize,\n l: i32,\n m: i32,\n r: i32,\n buffer: usize,\n comparator: Comparator\n): void {\n --m;\n let i: i32, j: i32, t = r + m;\n for (i = m + 1; i > l; --i) {\n store(\n buffer + ((i - 1) << alignof()),\n load(ptr + ((i - 1) << alignof()))\n );\n }\n for (j = m; j < r; ++j) {\n store(\n buffer + ((t - j) << alignof()),\n load(ptr + (j << alignof()), 1 << alignof())\n );\n }\n for (let k = l; k <= r; ++k) {\n let a = load(buffer + (j << alignof()));\n let b = load(buffer + (i << alignof()));\n if (comparator(a, b) < 0) {\n store(ptr + (k << alignof()), a);\n --j;\n } else {\n store(ptr + (k << alignof()), b);\n ++i;\n }\n }\n}\n","/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { COMPARATOR, SORT } from \"./util/sort\";\nimport { REVERSE, FILL } from \"./util/bytes\";\nimport { idof } from \"./builtins\";\nimport { Array } from \"./array\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from \"./util/error\";\nimport { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from \"./util/string\";\n\n@final\nexport class StaticArray {\n [key: number]: T;\n\n // Note that the interface of StaticArray instances must be a semantically\n // compatible subset of Array in order for syntax highlighting to work\n // properly, for instance when creating static arrays from array literals.\n // The additionally provided static methods take care of dealing with static\n // arrays exclusively, without having to convert to Array first.\n\n static fromArray(source: Array): StaticArray {\n let length = source.length;\n let outSize = length << alignof();\n let out = changetype>(__new(outSize, idof>()));\n if (isManaged()) {\n let sourcePtr = source.dataStart;\n for (let i = 0; i < length; ++i) {\n let off = i << alignof();\n let ref = load(sourcePtr + off);\n store(changetype(out) + off, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(changetype(out), source.dataStart, outSize);\n }\n return out;\n }\n\n /** @deprecated Please use source.concat> instead. */\n static concat(source: StaticArray, other: StaticArray): StaticArray {\n return source.concat>(other);\n }\n\n /** @deprecated Please use source.slice> instead. */\n static slice(source: StaticArray, start: i32 = 0, end: i32 = i32.MAX_VALUE): StaticArray {\n return source.slice>(start, end);\n }\n\n constructor(length: i32) {\n if (length > BLOCK_MAXSIZE >>> alignof()) throw new RangeError(E_INVALIDLENGTH);\n let outSize = length << alignof();\n let out = changetype>(__new(outSize, idof>()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(out), 0, outSize);\n }\n return out;\n }\n\n get length(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize >>> alignof();\n }\n\n at(index: i32): T {\n let len = this.length;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n let value = load(changetype(this) + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @operator(\"[]\") private __get(index: i32): T {\n if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE);\n let value = load(changetype(this) + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @unsafe @operator(\"{}\") private __uget(index: i32): T {\n return load(changetype(this) + (index << alignof()));\n }\n\n @operator(\"[]=\") private __set(index: i32, value: T): void {\n if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE);\n this.__uset(index, value);\n }\n\n @unsafe @operator(\"{}=\") private __uset(index: i32, value: T): void {\n store(changetype(this) + (index << alignof()), value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n }\n\n fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): StaticArray {\n if (isManaged()) {\n FILL(changetype(this), this.length, changetype(value), start, end);\n __link(changetype(this), changetype(value), false);\n } else {\n FILL(changetype(this), this.length, value, start, end);\n }\n return this;\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): StaticArray {\n let ptr = changetype(this);\n let len = this.length;\n\n end = min(end, len);\n\n let to = target < 0 ? max(len + target, 0) : min(target, len);\n let from = start < 0 ? max(len + start, 0) : min(start, len);\n let last = end < 0 ? max(len + end, 0) : min(end, len);\n let count = min(last - from, len - to);\n\n memory.copy( // is memmove\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return this;\n }\n\n includes(value: T, fromIndex: i32 = 0): bool {\n if (isFloat()) {\n let length = this.length;\n if (length == 0 || fromIndex >= length) return false;\n if (fromIndex < 0) fromIndex = max(length + fromIndex, 0);\n while (fromIndex < length) {\n let elem = load(changetype(this) + (fromIndex << alignof()));\n // @ts-ignore\n if (elem == value || isNaN(elem) & isNaN(value)) return true;\n ++fromIndex;\n }\n return false;\n } else {\n return this.indexOf(value, fromIndex) >= 0;\n }\n }\n\n indexOf(value: T, fromIndex: i32 = 0): i32 {\n let length = this.length;\n if (length == 0 || fromIndex >= length) return -1;\n if (fromIndex < 0) fromIndex = max(length + fromIndex, 0);\n while (fromIndex < length) {\n if (load(changetype(this) + (fromIndex << alignof())) == value) return fromIndex;\n ++fromIndex;\n }\n return -1;\n }\n\n lastIndexOf(value: T, fromIndex: i32 = this.length): i32 {\n let length = this.length;\n if (length == 0) return -1;\n if (fromIndex < 0) fromIndex = length + fromIndex;\n else if (fromIndex >= length) fromIndex = length - 1;\n while (fromIndex >= 0) {\n if (load(changetype(this) + (fromIndex << alignof())) == value) return fromIndex;\n --fromIndex;\n }\n return -1;\n }\n\n concat = Array>(other: U): U {\n let sourceLen = this.length;\n let otherLen = other.length;\n let outLen = sourceLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) {\n throw new Error(E_INVALIDLENGTH);\n }\n let sourceSize = sourceLen << alignof();\n let out = changetype(this); // FIXME: instanceof needs *some* value\n\n if (out instanceof Array) {\n out = changetype(__newArray(outLen, alignof(), idof>()));\n // ^ FIXME: Function returns type U, but can't __newArray(U extends Array)\n let outStart = changetype>(out).dataStart;\n let otherStart = changetype>(other).dataStart;\n let thisStart = changetype(this);\n\n if (isManaged()) {\n for (let offset: usize = 0; offset < sourceSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += sourceSize;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, thisStart, sourceSize);\n memory.copy(outStart + sourceSize, otherStart, otherLen << alignof());\n }\n } else if (out instanceof StaticArray) {\n out = changetype(__new(outLen << alignof(), idof>()));\n let outStart = changetype(out);\n let otherStart = changetype(other);\n let thisStart = changetype(this);\n\n if (isManaged()) {\n for (let offset: usize = 0; offset < sourceSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += sourceSize;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, thisStart, sourceSize);\n memory.copy(outStart + sourceSize, otherStart, otherLen << alignof());\n }\n } else {\n ERROR(\"Only Array and StaticArray accept for 'U' parameter\");\n }\n return out;\n }\n\n slice = Array>(start: i32 = 0, end: i32 = i32.MAX_VALUE): U {\n let length = this.length;\n start = start < 0 ? max(start + length, 0) : min(start, length);\n end = end < 0 ? max(end + length, 0) : min(end, length);\n length = max(end - start, 0);\n\n let sourceStart = changetype(this) + (start << alignof());\n let size = length << alignof();\n let out = changetype(this); // FIXME: instanceof needs *some* value\n\n if (out instanceof Array) {\n // return Array\n out = changetype(__newArray(length, alignof(), idof>()));\n // ^ FIXME: Function returns type U, but can't __newArray(U extends Array)\n let outStart = changetype>(out).dataStart;\n if (isManaged()) {\n let off: usize = 0;\n while (off < size) {\n let ref = load(sourceStart + off);\n store(outStart + off, ref);\n __link(changetype(out), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(outStart, sourceStart, size);\n }\n } else if (out instanceof StaticArray) {\n // return StaticArray\n out = changetype(__new(size, idof>()));\n let outStart = changetype(out);\n if (isManaged()) {\n let off: usize = 0;\n while (off < size) {\n let ref = load(sourceStart + off);\n store(outStart + off, ref);\n __link(outStart, ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(outStart, sourceStart, size);\n }\n } else {\n ERROR(\"Only Array and StaticArray accept for 'U' parameter\");\n }\n return out;\n }\n\n findIndex(fn: (value: T, index: i32, array: StaticArray) => bool): i32 {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n findLastIndex(fn: (value: T, index: i32, array: StaticArray) => bool): i32 {\n for (let i = this.length - 1; i >= 0; --i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n forEach(fn: (value: T, index: i32, array: StaticArray) => void): void {\n for (let i = 0, len = this.length; i < len; ++i) {\n fn(load(changetype(this) + (i << alignof())), i, this);\n }\n }\n\n map(fn: (value: T, index: i32, array: StaticArray) => U): Array {\n let len = this.length;\n let out = changetype>(__newArray(len, alignof(), idof>()));\n let outStart = out.dataStart;\n for (let i = 0; i < len; ++i) {\n let result = fn(load(changetype(this) + (i << alignof())), i, this);\n store(outStart + (i << alignof()), result);\n if (isManaged()) {\n __link(changetype(out), changetype(result), true);\n }\n }\n return out;\n }\n\n filter(fn: (value: T, index: i32, array: StaticArray) => bool): Array {\n let result = changetype>(__newArray(0, alignof(), idof>()));\n for (let i = 0, len = this.length; i < len; ++i) {\n let value = load(changetype(this) + (i << alignof()));\n if (fn(value, i, this)) result.push(value);\n }\n return result;\n }\n\n reduce(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U,\n initialValue: U\n ): U {\n let acc = initialValue;\n for (let i = 0, len = this.length; i < len; ++i) {\n acc = fn(acc, load(changetype(this) + (i << alignof())), i, this);\n }\n return acc;\n }\n\n reduceRight(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U,\n initialValue: U\n ): U {\n let acc = initialValue;\n for (let i = this.length - 1; i >= 0; --i) {\n acc = fn(acc, load(changetype(this) + (i << alignof())), i, this);\n }\n return acc;\n }\n\n every(fn: (value: T, index: i32, array: StaticArray) => bool): bool {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (!fn(load(changetype(this) + (i << alignof())), i, this)) return false;\n }\n return true;\n }\n\n some(fn: (value: T, index: i32, array: StaticArray) => bool): bool {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return true;\n }\n return false;\n }\n\n sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): StaticArray {\n SORT(changetype(this), this.length, comparator);\n return this;\n }\n\n join(separator: string = \",\"): string {\n if (isBoolean()) return joinBooleanArray(changetype(this), this.length, separator);\n if (isInteger()) return joinIntegerArray(changetype(this), this.length, separator);\n if (isFloat()) return joinFloatArray(changetype(this), this.length, separator);\n if (ASC_SHRINK_LEVEL < 1) {\n if (isString()) return joinStringArray(changetype(this), this.length, separator);\n }\n if (isReference()) return joinReferenceArray(changetype(this), this.length, separator);\n ERROR(\"unspported element type\");\n return unreachable();\n }\n\n reverse(): StaticArray {\n REVERSE(changetype(this), this.length);\n return this;\n }\n\n toString(): string {\n return this.join();\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n if (isManaged()) {\n let cur = changetype(this);\n let end = cur + changetype(changetype(this) - TOTAL_OVERHEAD).rtSize;\n while (cur < end) {\n let val = load(cur);\n if (val) __visit(val, cookie);\n cur += sizeof();\n }\n }\n }\n}\n","import {\r\n proc_exit,\r\n fd_write,\r\n iovec,\r\n random_get\r\n} from \"./bindings/wasi_snapshot_preview1\";\r\n\r\n// A WASI-wide reusable temporary buffer to store and work with out values. Must\r\n// be large enough to fit any operation it is used in, i.e. process/writeString.\r\n// @ts-ignore: decorator\r\n@lazy export const tempbuf = memory.data(4 * sizeof());\r\n\r\nimport {\r\n MAX_DOUBLE_LENGTH,\r\n decimalCount32,\r\n dtoa_buffered\r\n} from \"util/number\";\r\n\r\nexport function wasi_abort(\r\n message: string | null = null,\r\n fileName: string | null = null,\r\n lineNumber: u32 = 0,\r\n columnNumber: u32 = 0\r\n): void {\r\n // 0: iov.buf\r\n // 4: iov.buf_len\r\n // 8: len\r\n // 12: buf...\r\n const iovPtr: usize = 0;\r\n const lenPtr: usize = iovPtr + offsetof();\r\n const bufPtr: usize = lenPtr + sizeof();\r\n changetype(iovPtr).buf = bufPtr;\r\n var ptr = bufPtr;\r\n store(ptr, 0x203A74726F6261); ptr += 7; // 'abort: '\r\n if (message != null) {\r\n ptr += String.UTF8.encodeUnsafe(changetype(message), message.length, ptr);\r\n }\r\n store(ptr, 0x206E6920); ptr += 4; // ' in '\r\n if (fileName != null) {\r\n ptr += String.UTF8.encodeUnsafe(changetype(fileName), fileName.length, ptr);\r\n }\r\n store(ptr++, 0x28); // (\r\n var len = decimalCount32(lineNumber); ptr += len;\r\n do {\r\n let t = lineNumber / 10;\r\n store(--ptr, 0x30 + lineNumber % 10);\r\n lineNumber = t;\r\n } while (lineNumber); ptr += len;\r\n store(ptr++, 0x3A); // :\r\n len = decimalCount32(columnNumber); ptr += len;\r\n do {\r\n let t = columnNumber / 10;\r\n store(--ptr, 0x30 + columnNumber % 10);\r\n columnNumber = t;\r\n } while (columnNumber); ptr += len;\r\n store(ptr, 0x0A29); ptr += 2; // )\\n\r\n changetype(iovPtr).buf_len = ptr - bufPtr;\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n proc_exit(255);\r\n}\r\n\r\nexport function wasi_trace(\r\n message: string,\r\n n: i32 = 0,\r\n a0: f64 = 0,\r\n a1: f64 = 0,\r\n a2: f64 = 0,\r\n a3: f64 = 0,\r\n a4: f64 = 0\r\n): void {\r\n // 0: iov.buf\r\n // 4: iov.buf_len\r\n // 8: len\r\n // 12: buf...\r\n var iovPtr = __alloc(offsetof() + sizeof() + 1 + (max(String.UTF8.byteLength(message), MAX_DOUBLE_LENGTH << 1)));\r\n var lenPtr = iovPtr + offsetof();\r\n var bufPtr = lenPtr + sizeof();\r\n changetype(iovPtr).buf = bufPtr;\r\n store(bufPtr, 0x203A6563617274); // 'trace: '\r\n changetype(iovPtr).buf_len = 7;\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n changetype(iovPtr).buf_len = String.UTF8.encodeUnsafe(changetype(message), message.length, bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n) {\r\n store(bufPtr++, 0x20); // space\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a0), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n > 1) {\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a1), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n > 2) {\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a2), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n > 3) {\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a3), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n if (n > 4) {\r\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a4), bufPtr);\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n }\r\n }\r\n }\r\n }\r\n --bufPtr;\r\n }\r\n store(bufPtr, 0x0A); // \\n\r\n changetype(iovPtr).buf_len = 1;\r\n fd_write(2, iovPtr, 1, lenPtr);\r\n __free(iovPtr);\r\n}\r\n\r\nexport function wasi_seed(): f64 {\r\n var rand: u64;\r\n do {\r\n random_get(tempbuf, 8);\r\n rand = load(tempbuf);\r\n } while (!rand);\r\n return reinterpret(rand);\r\n}\r\n","// Phase: wasi_snapshot_preview1\r\n// See: https://github.com/WebAssembly/WASI/tree/main/phases/snapshot/witx\r\n\r\n// helper types to be more explicit\r\ntype char = u8;\r\ntype ptr = usize; // all pointers are usize'd\r\ntype struct = T; // structs are references already in AS\r\n\r\n/** Read command-line argument data. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function args_get(\r\n /** Input: Pointer to a buffer to write the argument pointers. */\r\n argv: ptr>,\r\n /** Input: Pointer to a buffer to write the argument string data. */\r\n argv_buf: ptr\r\n): errno;\r\n\r\n/** Return command-line argument data sizes. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function args_sizes_get(\r\n /** Output: Number of arguments. */\r\n argc: ptr,\r\n /** Output: Size of the argument string data. */\r\n argv_buf_size: ptr\r\n): errno;\r\n\r\n/** Return the resolution of a clock. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function clock_res_get(\r\n /** Input: The clock for which to return the resolution. */\r\n clock: clockid,\r\n /** Output: The resolution of the clock. */\r\n resolution: ptr\r\n): errno;\r\n\r\n/** Return the time value of a clock. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function clock_time_get(\r\n /** Input: Cock for which to return the time. */\r\n clock: clockid,\r\n /** Input: Maximum lag (exclusive) that the returned time value may have, compared to its actual value. */\r\n precision: timestamp,\r\n /** Output: Time value of the clock. */\r\n time: ptr\r\n): errno;\r\n\r\n/** Read environment variable data. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function environ_get(\r\n /** Input: Pointer to a buffer to write the environment variable pointers. */\r\n environ: ptr,\r\n /** Input: Pointer to a buffer to write the environment variable string data. */\r\n environ_buf: usize\r\n): errno;\r\n\r\n/** Return command-line argument data sizes. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function environ_sizes_get(\r\n /** Output: The number of environment variables. */\r\n environ_count: ptr,\r\n /** Output: The size of the environment variable string data. */\r\n environ_buf_size: ptr\r\n): errno;\r\n\r\n/** Provide file advisory information on a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_advise(\r\n /** Input: The file descriptor for the file for which to provide file advisory information. */\r\n fd: fd,\r\n /** Input: The offset within the file to which the advisory applies. */\r\n offset: filesize,\r\n /** Input: The length of the region to which the advisory applies. */\r\n len: filesize,\r\n /** Input: The advice. */\r\n advice: advice\r\n): errno;\r\n\r\n/** Provide file advisory information on a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_allocate(\r\n /** Input: The file descriptor for the file in which to allocate space. */\r\n fd: fd,\r\n /** Input: The offset at which to start the allocation. */\r\n offset: filesize,\r\n /** Input: The length of the area that is allocated. */\r\n len: filesize\r\n): errno;\r\n\r\n/** Close a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_close(\r\n /** Input: The file descriptor to close. */\r\n fd: fd\r\n): errno;\r\n\r\n/** Synchronize the data of a file to disk. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_datasync(\r\n /** Input: The file descriptor of the file to synchronize to disk. */\r\n fd: fd\r\n): errno;\r\n\r\n/** Get the attributes of a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_fdstat_get(\r\n /** Input: The file descriptor to inspect. */\r\n fd: fd,\r\n /** Input: The buffer where the file descriptor's attributes are stored. */\r\n buf: struct\r\n): errno;\r\n\r\n/** Adjust the flags associated with a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_fdstat_set_flags(\r\n /** Input: The file descriptor to operate on. */\r\n fd: fd,\r\n /** Input: The desired values of the file descriptor flags. */\r\n flags: fdflags\r\n): errno;\r\n\r\n/** Adjust the rights associated with a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_fdstat_set_rights(\r\n /** Input: The file descriptor to operate on. */\r\n fd: fd,\r\n /** Input: The desired rights of the file descriptor. */\r\n fs_rights_base: rights,\r\n /** Input: The desired rights of the file descriptor. */\r\n fs_rights_inheriting: rights\r\n): errno;\r\n\r\n/** Return the attributes of an open file. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_filestat_get(\r\n /** Input: The file descriptor to inspect. */\r\n fd: fd,\r\n /** Input: The buffer where the file's attributes are stored. */\r\n buf: struct\r\n): errno;\r\n\r\n/** Adjust the size of an open file. If this increases the file's size, the extra bytes are filled with zeros. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_filestat_set_size(\r\n /** Input: A file descriptor for the file to adjust. */\r\n fd: fd,\r\n /** Input: The desired file size. */\r\n size: filesize\r\n): errno;\r\n\r\n/** Adjust the timestamps of an open file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_filestat_set_times(\r\n /** Input: The file descriptor to operate on. */\r\n fd: fd,\r\n /** Input: The desired values of the data access timestamp. */\r\n st_atim: timestamp,\r\n /** Input: The desired values of the data modification timestamp. */\r\n st_mtim: timestamp,\r\n /** Input: A bitmask indicating which timestamps to adjust. */\r\n fstflags: fstflags\r\n): errno;\r\n\r\n/** Read from a file descriptor, without using and updating the file descriptor's offset. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_pread(\r\n /** Input: The file descriptor from which to read data. */\r\n fd: fd,\r\n /** Input: List of scatter/gather vectors in which to store data. */\r\n iovs: ptr>,\r\n /** Input: Length of the list of scatter/gather vectors in which to store data. */\r\n iovs_len: usize,\r\n /** Input: The offset within the file at which to read. */\r\n offset: filesize,\r\n /** Output: The number of bytes read. */\r\n nread: ptr\r\n): errno;\r\n\r\n/** Return a description of the given preopened file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_prestat_get(\r\n /** Input: The file descriptor about which to retrieve information. */\r\n fd: fd,\r\n /** Input: The buffer where the description is stored. */\r\n buf: struct\r\n): errno;\r\n\r\n/** Return a description of the given preopened file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_prestat_dir_name(\r\n /** Input: The file descriptor about which to retrieve information. */\r\n fd: fd,\r\n /** Input: Buffer into which to write the preopened directory name. */\r\n path: ptr,\r\n /** Input: Length of the buffer into which to write the preopened directory name. */\r\n path_len: usize\r\n): errno;\r\n\r\n/** Write to a file descriptor, without using and updating the file descriptor's offset. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_pwrite(\r\n /** Input: The file descriptor to which to write data. */\r\n fd: fd,\r\n /** Input: List of scatter/gather vectors from which to retrieve data. */\r\n iovs: ptr>,\r\n /** Input: Length of the list of scatter/gather vectors from which to retrieve data. */\r\n iovs_len: usize,\r\n /** Input: The offset within the file at which to write. */\r\n offset: filesize,\r\n /** Output: The number of bytes written. */\r\n nwritten: ptr\r\n): errno;\r\n\r\n/** Read from a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_read(\r\n /** Input: The file descriptor from which to read data. */\r\n fd: fd,\r\n /** Input: List of scatter/gather vectors to which to store data. */\r\n iovs: ptr>,\r\n /** Input: Length of the list of scatter/gather vectors to which to store data. */\r\n iovs_len: usize,\r\n /** Output: The number of bytes read. */\r\n nread: ptr\r\n): errno;\r\n\r\n/** Read directory entries from a directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_readdir(\r\n /** Input: Directory from which to read the directory entries. */\r\n fd: fd,\r\n /** Input: Buffer where directory entries are stored. */\r\n buf: ptr>,\r\n /** Input: Length of the buffer where directory entries are stored. */\r\n buf_len: usize,\r\n /** Input: Location within the directory to start reading. */\r\n cookie: dircookie,\r\n /** Output: Number of bytes stored in the read buffer. If less than the size of the read buffer, the end of the directory has been reached. */\r\n buf_used: ptr\r\n): errno;\r\n\r\n/** Atomically replace a file descriptor by renumbering another file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_renumber(\r\n /** Input: The file descriptor to renumber. */\r\n from: fd,\r\n /** Input: The file descriptor to overwrite. */\r\n to: fd\r\n): errno;\r\n\r\n/** Move the offset of a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_seek(\r\n /** Input: The file descriptor to operate on. */\r\n fd: fd,\r\n /** Input: The number of bytes to move. */\r\n offset: filedelta,\r\n /** Input: The base from which the offset is relative. */\r\n whence: whence,\r\n /** Output: The new offset of the file descriptor, relative to the start of the file. */\r\n newoffset: ptr\r\n): errno;\r\n\r\n/** Synchronize the data and metadata of a file to disk. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_sync(\r\n /** Input: The file descriptor of the file containing the data and metadata to synchronize to disk. */\r\n fd: fd\r\n): errno;\r\n\r\n/** Return the current offset of a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_tell(\r\n /** Input: The file descriptor to inspect. */\r\n fd: fd,\r\n /** Output: The current offset of the file descriptor, relative to the start of the file. */\r\n newoffset: ptr\r\n): errno;\r\n\r\n/** Write to a file descriptor. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function fd_write(\r\n /** Input: The file descriptor to which to write data. */\r\n fd: fd,\r\n /** Input: List of scatter/gather vectors from which to retrieve data. */\r\n iovs: ptr>,\r\n /** Input: List of scatter/gather vectors from which to retrieve data. */\r\n iovs_len: usize,\r\n /** Output: The number of bytes written. */\r\n nwritten: ptr\r\n): errno;\r\n\r\n/* Create a directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_create_directory(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The path at which to create the directory. */\r\n path: ptr,\r\n /** Input: The path at which to create the directory. */\r\n path_len: usize\r\n): errno;\r\n\r\n/** Return the attributes of a file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_filestat_get(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: Flags determining the method of how the path is resolved. */\r\n flags: lookupflags,\r\n /** Input: The path of the file or directory to inspect. */\r\n path: ptr,\r\n /** Input: The path of the file or directory to inspect. */\r\n path_len: usize,\r\n /** Input: The buffer where the file's attributes are stored. */\r\n buf: struct\r\n): errno;\r\n\r\n/** Adjust the timestamps of a file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_filestat_set_times(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: Flags determining the method of how the path is resolved. */\r\n flags: lookupflags,\r\n /** Input: The path of the file or directory to operate on. */\r\n path: ptr,\r\n /** Input: The path of the file or directory to operate on. */\r\n path_len: usize,\r\n /** Input: The desired values of the data access timestamp. */\r\n st_atim: timestamp,\r\n /** Input: The desired values of the data modification timestamp. */\r\n st_mtim: timestamp,\r\n /** Input: A bitmask indicating which timestamps to adjust. */\r\n fstflags: fstflags\r\n): errno;\r\n\r\n/** Create a hard link. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_link(\r\n /** Input: The working directory at which the resolution of the old path starts. */\r\n old_fd: fd,\r\n /** Input: Flags determining the method of how the path is resolved. */\r\n old_flags: lookupflags,\r\n /** Input: The source path from which to link. */\r\n old_path: ptr,\r\n /** Input: The source path from which to link. */\r\n old_path_len: usize,\r\n /** Input: The working directory at which the resolution of the new path starts. */\r\n new_fd: fd,\r\n /** Input: The destination path at which to create the hard link. */\r\n new_path: ptr,\r\n /** Input: The length of the destination path at which to create the hard link. */\r\n new_path_len: usize\r\n): errno;\r\n\r\n/** Open a file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_open(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n dirfd: fd,\r\n /** Input: Flags determining the method of how the path is resolved. */\r\n dirflags: lookupflags,\r\n /** Input: The path of the file or directory to open. */\r\n path: ptr,\r\n /** Input: The length of the path of the file or directory to open. */\r\n path_len: usize,\r\n /** Input: The method by which to open the file. */\r\n oflags: oflags,\r\n /** Input: The initial base rights that apply to operations using the file descriptor itself. */\r\n fs_rights_base: rights,\r\n /** Input: The initial inheriting rights that apply to file descriptors derived from it. */\r\n fs_rights_inheriting: rights,\r\n /** Input: The initial flags of the file descriptor. */\r\n fs_flags: fdflags,\r\n /** Output: The file descriptor of the file that has been opened. */\r\n fd: ptr\r\n): errno;\r\n\r\n/** Read the contents of a symbolic link. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_readlink(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The path of the symbolic link from which to read. */\r\n path: ptr,\r\n /** Input: The length of the path of the symbolic link from which to read. */\r\n path_len: usize,\r\n /** Input: The buffer to which to write the contents of the symbolic link. */\r\n buf: ptr,\r\n /** Input: The length of the buffer to which to write the contents of the symbolic link. */\r\n buf_len: usize,\r\n /** Output: The number of bytes placed in the buffer. */\r\n buf_used: ptr\r\n): errno;\r\n\r\n/** Remove a directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_remove_directory(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The path to a directory to remove. */\r\n path: ptr,\r\n /** Input: The length of the path to a directory to remove. */\r\n path_len: usize\r\n): errno;\r\n\r\n/** Rename a file or directory. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_rename(\r\n /** Input: The working directory at which the resolution of the old path starts. */\r\n old_fd: fd,\r\n /** Input: The source path of the file or directory to rename. */\r\n old_path: ptr,\r\n /** Input: The length of the source path of the file or directory to rename. */\r\n old_path_len: usize,\r\n /** Input: The working directory at which the resolution of the new path starts. */\r\n new_fd: fd,\r\n /** Input: The destination path to which to rename the file or directory. */\r\n new_path: ptr,\r\n /** Input: The length of the destination path to which to rename the file or directory. */\r\n new_path_len: usize\r\n): errno;\r\n\r\n/** Create a symbolic link. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_symlink(\r\n /** Input: The contents of the symbolic link. */\r\n old_path: ptr,\r\n /** Input: The length of the contents of the symbolic link. */\r\n old_path_len: usize,\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The destination path at which to create the symbolic link. */\r\n new_path: ptr,\r\n /** Input: The length of the destination path at which to create the symbolic link. */\r\n new_path_len: usize\r\n): errno;\r\n\r\n/** Unlink a file. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function path_unlink_file(\r\n /** Input: The working directory at which the resolution of the path starts. */\r\n fd: fd,\r\n /** Input: The path to a file to unlink. */\r\n path: ptr,\r\n /** Input: The length of the path to a file to unlink. */\r\n path_len: usize\r\n): errno;\r\n\r\n/** Concurrently poll for the occurrence of a set of events. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function poll_oneoff(\r\n /** Input: The events to which to subscribe. */\r\n in_: ptr>,\r\n /** Input: The events that have occurred. */\r\n out: ptr>,\r\n /** Input: Both the number of subscriptions and events. */\r\n nsubscriptions: usize,\r\n /** Output: The number of events stored. */\r\n nevents: ptr\r\n): errno;\r\n\r\n/** Terminate the process normally. An exit code of 0 indicates successful termination of the program. The meanings of other values is dependent on the environment. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function proc_exit(\r\n /** Input: The exit code returned by the process. */\r\n rval: u32\r\n): void;\r\n\r\n/** Send a signal to the process of the calling thread. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function proc_raise(\r\n /** Input: The signal condition to trigger. */\r\n sig: signal\r\n): errno;\r\n\r\n/** Write high-quality random data into a buffer. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function random_get(\r\n /** Input: The buffer to fill with random data. */\r\n buf: usize,\r\n /** Input: The length of the buffer to fill with random data. */\r\n buf_len: usize\r\n): errno;\r\n\r\n/** Temporarily yield execution of the calling thread. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function sched_yield(): errno;\r\n\r\n/** Receive a message from a socket. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function sock_recv(\r\n /** Input: The socket on which to receive data. */\r\n sock: fd,\r\n /** Input: List of scatter/gather vectors to which to store data. */\r\n ri_data: ptr>,\r\n /** Input: The length of the list of scatter/gather vectors to which to store data. */\r\n ri_data_len: usize,\r\n /** Input: Message flags. */\r\n ri_flags: riflags,\r\n /** Output: Number of bytes stored in `ri_data`. */\r\n ro_datalen: ptr,\r\n /** Output: Message flags. */\r\n ro_flags: ptr\r\n): errno;\r\n\r\n/** Send a message on a socket. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function sock_send(\r\n /** Input: The socket on which to send data. */\r\n sock: fd,\r\n /** Input: List of scatter/gather vectors to which to retrieve data */\r\n si_data: ptr>,\r\n /** Input: The length of the list of scatter/gather vectors to which to retrieve data */\r\n si_data_len: usize,\r\n /** Input: Message flags. */\r\n si_flags: siflags,\r\n /** Output: Number of bytes transmitted. */\r\n so_datalen: ptr\r\n): errno;\r\n\r\n/** Shut down socket send and receive channels. */\r\n// @ts-ignore: decorator\r\n@unsafe\r\nexport declare function sock_shutdown(\r\n /** Input: The socket on which to shutdown channels. */\r\n sock: fd,\r\n /** Input: Which channels on the socket to shut down. */\r\n how: sdflags\r\n): errno;\r\n\r\n// === Types ======================================================================================\r\n\r\n/** File or memory access pattern advisory information. */\r\nexport namespace advice {\r\n /** The application has no advice to give on its behavior with respect to the specified data. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NORMAL: advice = 0;\r\n /** The application expects to access the specified data sequentially from lower offsets to higher offsets. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SEQUENTIAL : advice = 1;\r\n /** The application expects to access the specified data in a random order. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RANDOM: advice = 2;\r\n /** The application expects to access the specified data in the near future. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const WILLNEED: advice = 3;\r\n /** The application expects that it will not access the specified data in the near future. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DONTNEED: advice = 4;\r\n /** The application expects to access the specified data once and then not reuse it thereafter. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOREUSE: advice = 5;\r\n}\r\nexport type advice = u8;\r\n\r\n/** Identifiers for clocks. */\r\nexport namespace clockid {\r\n /** The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const REALTIME: clockid = 0;\r\n /** The store-wide monotonic clock. Absolute value has no meaning. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MONOTONIC: clockid = 1;\r\n /** The CPU-time clock associated with the current process. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROCESS_CPUTIME_ID: clockid = 2;\r\n /** The CPU-time clock associated with the current thread. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const THREAD_CPUTIME_ID: clockid = 3;\r\n}\r\nexport type clockid = u32;\r\n\r\n/** Identifier for a device containing a file system. Can be used in combination with `inode` to uniquely identify a file or directory in the filesystem. */\r\nexport type device = u64;\r\n\r\n/** A reference to the offset of a directory entry. The value 0 signifies the start of the directory. */\r\nexport type dircookie = u64;\r\n\r\n/** A directory entry. */\r\n@unmanaged export class dirent {\r\n /** The offset of the next directory entry stored in this directory. */\r\n next: dircookie;\r\n /** The serial number of the file referred to by this directory entry. */\r\n ino: inode;\r\n /** The length of the name of the directory entry. */\r\n namlen: u32;\r\n /** The type of the file referred to by this directory entry. */\r\n type: filetype;\r\n private __padding0: u16;\r\n}\r\n\r\n/** Error codes returned by functions. */\r\nexport namespace errno {\r\n /** No error occurred. System call completed successfully. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SUCCESS: errno = 0;\r\n /** Argument list too long. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TOOBIG: errno = 1;\r\n /** Permission denied. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ACCES: errno = 2;\r\n /** Address in use. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ADDRINUSE: errno = 3;\r\n /** Address not available. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ADDRNOTAVAIL: errno = 4;\r\n /** Address family not supported. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const AFNOSUPPORT: errno = 5;\r\n /** Resource unavailable, or operation would block. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const AGAIN: errno = 6;\r\n /** Connection already in progress. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ALREADY: errno = 7;\r\n /** Bad file descriptor. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BADF: errno = 8;\r\n /** Bad message. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BADMSG: errno = 9;\r\n /** Device or resource busy. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BUSY: errno = 10;\r\n /** Operation canceled. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CANCELED: errno = 11;\r\n /** No child processes. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CHILD: errno = 12;\r\n /** Connection aborted. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CONNABORTED: errno = 13;\r\n /** Connection refused. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CONNREFUSED: errno = 14;\r\n /** Connection reset. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CONNRESET: errno = 15;\r\n /** Resource deadlock would occur. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DEADLK: errno = 16;\r\n /** Destination address required. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DESTADDRREQ: errno = 17;\r\n /** Mathematics argument out of domain of function. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DOM: errno = 18;\r\n /** Reserved. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DQUOT: errno = 19;\r\n /** File exists. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const EXIST: errno = 20;\r\n /** Bad address. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FAULT: errno = 21;\r\n /** File too large. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FBIG: errno = 22;\r\n /** Host is unreachable. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const HOSTUNREACH: errno = 23;\r\n /** Identifier removed. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const IDRM: errno = 24;\r\n /** Illegal byte sequence. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ILSEQ: errno = 25;\r\n /** Operation in progress. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const INPROGRESS: errno = 26;\r\n /** Interrupted function. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const INTR: errno = 27;\r\n /** Invalid argument. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const INVAL: errno = 28;\r\n /** I/O error. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const IO: errno = 29;\r\n /** Socket is connected. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ISCONN: errno = 30;\r\n /** Is a directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ISDIR: errno = 31;\r\n /** Too many levels of symbolic links. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const LOOP: errno = 32;\r\n /** File descriptor value too large. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MFILE: errno = 33;\r\n /** Too many links. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MLINK: errno = 34;\r\n /** Message too large. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MSGSIZE: errno = 35;\r\n /** Reserved. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const MULTIHOP: errno = 36;\r\n /** Filename too long. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NAMETOOLONG: errno = 37;\r\n /** Network is down. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NETDOWN: errno = 38;\r\n /** Connection aborted by network. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NETRESET: errno = 39;\r\n /** Network unreachable. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NETUNREACH: errno = 40;\r\n /** Too many files open in system. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NFILE: errno = 41;\r\n /** No buffer space available. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOBUFS: errno = 42;\r\n /** No such device. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NODEV: errno = 43;\r\n /** No such file or directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOENT: errno = 44;\r\n /** Executable file format error. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOEXEC: errno = 45;\r\n /** No locks available. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOLCK: errno = 46;\r\n /** Reserved. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOLINK: errno = 47;\r\n /** Not enough space. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOMEM: errno = 48;\r\n /** No message of the desired type. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOMSG: errno = 49;\r\n /** Protocol not available. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOPROTOOPT: errno = 50;\r\n /** No space left on device. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOSPC: errno = 51;\r\n /** Function not supported. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOSYS: errno = 52;\r\n /** The socket is not connected. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTCONN: errno = 53;\r\n /** Not a directory or a symbolic link to a directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTDIR: errno = 54;\r\n /** Directory not empty. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTEMPTY: errno = 55;\r\n /** State not recoverable. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTRECOVERABLE: errno = 56;\r\n /** Not a socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTSOCK: errno = 57;\r\n /** Not supported, or operation not supported on socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTSUP: errno = 58;\r\n /** Inappropriate I/O control operation. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTTY: errno = 59;\r\n /** No such device or address. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NXIO: errno = 60;\r\n /** Value too large to be stored in data type. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const OVERFLOW: errno = 61;\r\n /** Previous owner died. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const OWNERDEAD: errno = 62;\r\n /** Operation not permitted. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PERM: errno = 63;\r\n /** Broken pipe. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PIPE: errno = 64;\r\n /** Protocol error. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROTO: errno = 65;\r\n /** Protocol not supported. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROTONOSUPPORT: errno = 66;\r\n /** Protocol wrong type for socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROTOTYPE: errno = 67;\r\n /** Result too large. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RANGE: errno = 68;\r\n /** Read-only file system. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ROFS: errno = 69;\r\n /** Invalid seek. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SPIPE: errno = 70;\r\n /** No such process. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SRCH: errno = 71;\r\n /** Reserved. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const STALE: errno = 72;\r\n /** Connection timed out. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TIMEDOUT: errno = 73;\r\n /** Text file busy. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TXTBSY: errno = 74;\r\n /** Cross-device link. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const XDEV: errno = 75;\r\n /** Extension: Capabilities insufficient. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NOTCAPABLE: errno = 76;\r\n}\r\nexport type errno = u16;\r\n\r\n/** Translates an error code to a string. */\r\nexport function errnoToString(err: errno): string {\r\n switch (err) {\r\n case errno.SUCCESS: return \"SUCCESS\";\r\n case errno.TOOBIG: return \"TOOBIG\";\r\n case errno.ACCES: return \"ACCES\";\r\n case errno.ADDRINUSE: return \"ADDRINUSE\";\r\n case errno.ADDRNOTAVAIL: return \"ADDRNOTAVAIL\";\r\n case errno.AFNOSUPPORT: return \"AFNOSUPPORT\";\r\n case errno.AGAIN: return \"AGAIN\";\r\n case errno.ALREADY: return \"ALREADY\";\r\n case errno.BADF: return \"BADF\";\r\n case errno.BADMSG: return \"BADMSG\";\r\n case errno.BUSY: return \"BUSY\";\r\n case errno.CANCELED: return \"CANCELED\";\r\n case errno.CHILD: return \"CHILD\";\r\n case errno.CONNABORTED: return \"CONNABORTED\";\r\n case errno.CONNREFUSED: return \"CONNREFUSED\";\r\n case errno.CONNRESET: return \"CONNRESET\";\r\n case errno.DEADLK: return \"DEADLK\";\r\n case errno.DESTADDRREQ: return \"DESTADDRREQ\";\r\n case errno.DOM: return \"DOM\";\r\n case errno.DQUOT: return \"DQUOT\";\r\n case errno.EXIST: return \"EXIST\";\r\n case errno.FAULT: return \"FAULT\";\r\n case errno.FBIG: return \"FBIG\";\r\n case errno.HOSTUNREACH: return \"HOSTUNREACH\";\r\n case errno.IDRM: return \"IDRM\";\r\n case errno.ILSEQ: return \"ILSEQ\";\r\n case errno.INPROGRESS: return \"INPROGRESS\";\r\n case errno.INTR: return \"INTR\";\r\n case errno.INVAL: return \"INVAL\";\r\n case errno.IO: return \"IO\";\r\n case errno.ISCONN: return \"ISCONN\";\r\n case errno.ISDIR: return \"ISDIR\";\r\n case errno.LOOP: return \"LOOP\";\r\n case errno.MFILE: return \"MFILE\";\r\n case errno.MLINK: return \"MLINK\";\r\n case errno.MSGSIZE: return \"MSGSIZE\";\r\n case errno.MULTIHOP: return \"MULTIHOP\";\r\n case errno.NAMETOOLONG: return \"NAMETOOLONG\";\r\n case errno.NETDOWN: return \"NETDOWN\";\r\n case errno.NETRESET: return \"NETRESET\";\r\n case errno.NETUNREACH: return \"NETUNREACH\";\r\n case errno.NFILE: return \"NFILE\";\r\n case errno.NOBUFS: return \"NOBUFS\";\r\n case errno.NODEV: return \"NODEV\";\r\n case errno.NOENT: return \"NOENT\";\r\n case errno.NOEXEC: return \"NOEXEC\";\r\n case errno.NOLCK: return \"NOLCK\";\r\n case errno.NOLINK: return \"NOLINK\";\r\n case errno.NOMEM: return \"NOMEM\";\r\n case errno.NOMSG: return \"NOMSG\";\r\n case errno.NOPROTOOPT: return \"NOPROTOOPT\";\r\n case errno.NOSPC: return \"NOSPC\";\r\n case errno.NOSYS: return \"NOSYS\";\r\n case errno.NOTCONN: return \"NOTCONN\";\r\n case errno.NOTDIR: return \"NOTDIR\";\r\n case errno.NOTEMPTY: return \"NOTEMPTY\";\r\n case errno.NOTRECOVERABLE: return \"NOTRECOVERABLE\";\r\n case errno.NOTSOCK: return \"NOTSOCK\";\r\n case errno.NOTSUP: return \"NOTSUP\";\r\n case errno.NOTTY: return \"NOTTY\";\r\n case errno.NXIO: return \"NXIO\";\r\n case errno.OVERFLOW: return \"OVERFLOW\";\r\n case errno.OWNERDEAD: return \"OWNERDEAD\";\r\n case errno.PERM: return \"PERM\";\r\n case errno.PIPE: return \"PIPE\";\r\n case errno.PROTO: return \"PROTO\";\r\n case errno.PROTONOSUPPORT: return \"PROTONOSUPPORT\";\r\n case errno.PROTOTYPE: return \"PROTOTYPE\";\r\n case errno.RANGE: return \"RANGE\";\r\n case errno.ROFS: return \"ROFS\";\r\n case errno.SPIPE: return \"SPIPE\";\r\n case errno.SRCH: return \"SRCH\";\r\n case errno.STALE: return \"STALE\";\r\n case errno.TIMEDOUT: return \"TIMEDOUT\";\r\n case errno.TXTBSY: return \"TXTBSY\";\r\n case errno.XDEV: return \"XDEV\";\r\n case errno.NOTCAPABLE: return \"NOTCAPABLE\";\r\n }\r\n return \"UNKNOWN\";\r\n}\r\n\r\n@unmanaged abstract class $event { // size=16/32\r\n /** User-provided value that got attached to `subscription#userdata`. */\r\n userdata: userdata;\r\n /** If non-zero, an error that occurred while processing the subscription request. */\r\n error: errno;\r\n /** The type of the event that occurred. */\r\n type: eventtype;\r\n\r\n private __padding0: u16;\r\n}\r\n\r\n/** An event that occurred. */\r\n@unmanaged export abstract class event extends $event {\r\n private __padding1: u64;\r\n private __padding2: u64;\r\n}\r\n\r\n/** An event that occurred when type is `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\r\n@unmanaged export class event_fd_readwrite extends $event {\r\n /* The number of bytes available for reading or writing. */\r\n nbytes: filesize;\r\n /* The state of the file descriptor. */\r\n flags: eventrwflags;\r\n\r\n private __padding1: u32;\r\n}\r\n\r\n/** The state of the file descriptor subscribed to with `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\r\nexport namespace eventrwflags {\r\n /** The peer of this socket has closed or disconnected. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const HANGUP: eventrwflags = 1;\r\n}\r\nexport type eventrwflags = u16;\r\n\r\n/** Type of a subscription to an event or its occurrence. */\r\nexport namespace eventtype {\r\n /** The time value of clock has reached the timestamp. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CLOCK: eventtype = 0;\r\n /** File descriptor has data available for reading. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_READ: eventtype = 1;\r\n /** File descriptor has capacity available for writing */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_WRITE: eventtype = 2;\r\n}\r\nexport type eventtype = u8;\r\n\r\n/** Exit code generated by a process when exiting. */\r\nexport type exitcode = u32;\r\n\r\n/** A file descriptor number. */\r\nexport type fd = u32;\r\n\r\n/** File descriptor flags. */\r\nexport namespace fdflags {\r\n /** Append mode: Data written to the file is always appended to the file's end. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const APPEND: fdflags = 1;\r\n /** Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DSYNC: fdflags = 2;\r\n /** Non-blocking mode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const NONBLOCK: fdflags = 4;\r\n /** Synchronized read I/O operations. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RSYNC: fdflags = 8;\r\n /** Write according to synchronized I/O file integrity completion. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SYNC: fdflags = 16;\r\n}\r\nexport type fdflags = u16;\r\n\r\n/** File descriptor attributes. */\r\n@unmanaged export class fdstat {\r\n /** File type. */\r\n filetype: filetype;\r\n /** File descriptor flags. */\r\n flags: fdflags;\r\n /** Rights that apply to this file descriptor. */\r\n rights_base: rights;\r\n /** Maximum set of rights that may be installed on new file descriptors that are created through this file descriptor, e.g., through `path_open`. */\r\n rights_inheriting: rights;\r\n}\r\n\r\n/** Relative offset within a file. */\r\nexport type filedelta = i64;\r\n\r\n/** Non-negative file size or length of a region within a file. */\r\nexport type filesize = u64;\r\n\r\n/** File attributes. */\r\n@unmanaged export class filestat {\r\n /** Device ID of device containing the file. */\r\n dev: device;\r\n /** File serial number. */\r\n ino: inode;\r\n /** File type. */\r\n filetype: filetype;\r\n /** Number of hard links to the file. */\r\n nlink: linkcount;\r\n /** For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. */\r\n size: filesize;\r\n /** Last data access timestamp. */\r\n atim: timestamp;\r\n /** Last data modification timestamp. */\r\n mtim: timestamp;\r\n /** Last file status change timestamp. */\r\n ctim: timestamp;\r\n}\r\n\r\n/** The type of a file descriptor or file. */\r\nexport namespace filetype {\r\n /** The type of the file descriptor or file is unknown or is different from any of the other types specified. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const UNKNOWN: filetype = 0;\r\n /** The file descriptor or file refers to a block device inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BLOCK_DEVICE: filetype = 1;\r\n /** The file descriptor or file refers to a character device inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CHARACTER_DEVICE: filetype = 2;\r\n /** The file descriptor or file refers to a directory inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DIRECTORY: filetype = 3;\r\n /** The file descriptor or file refers to a regular file inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const REGULAR_FILE: filetype = 4;\r\n /** The file descriptor or file refers to a datagram socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SOCKET_DGRAM: filetype = 5;\r\n /** The file descriptor or file refers to a byte-stream socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SOCKET_STREAM: filetype = 6;\r\n /** The file refers to a symbolic link inode. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SYMBOLIC_LINK: filetype = 7;\r\n}\r\nexport type filetype = u8;\r\n\r\n/** Which file time attributes to adjust. */\r\nexport namespace fstflags {\r\n /** Adjust the last data access timestamp to the value stored in `filestat#st_atim`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET_ATIM: fstflags = 1;\r\n /** Adjust the last data access timestamp to the time of clock `clockid.REALTIME`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET_ATIM_NOW: fstflags = 2;\r\n /** Adjust the last data modification timestamp to the value stored in `filestat#st_mtim`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET_MTIM: fstflags = 4;\r\n /** Adjust the last data modification timestamp to the time of clock `clockid.REALTIME`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET_MTIM_NOW: fstflags = 8;\r\n}\r\nexport type fstflags = u16;\r\n\r\n/** File serial number that is unique within its file system. */\r\nexport type inode = u64;\r\n\r\n/** A region of memory for scatter/gather reads. */\r\n@unmanaged export class iovec {\r\n /** The address of the buffer to be filled. */\r\n buf: usize;\r\n /** The length of the buffer to be filled. */\r\n buf_len: usize;\r\n}\r\n\r\n/** Number of hard links to an inode. */\r\nexport type linkcount = u64;\r\n\r\n/** Flags determining the method of how paths are resolved. */\r\nexport namespace lookupflags {\r\n /** As long as the resolved path corresponds to a symbolic link, it is expanded. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SYMLINK_FOLLOW: lookupflags = 1;\r\n}\r\nexport type lookupflags = u32;\r\n\r\n/** Open flags. */\r\nexport namespace oflags {\r\n /** Create file if it does not exist. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CREAT: oflags = 1;\r\n /** Fail if not a directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DIRECTORY: oflags = 2;\r\n /** Fail if file already exists. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const EXCL: oflags = 4;\r\n /** Truncate file to size 0. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TRUNC: oflags = 8;\r\n}\r\nexport type oflags = u16;\r\n\r\n/** Identifiers for preopened capabilities. */\r\nexport namespace preopentype {\r\n /** A pre-opened directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DIR: preopentype = 0;\r\n}\r\nexport type preopentype = u8;\r\n\r\n@unmanaged abstract class $prestat { // WASM32: size=1/8, WASM64: size=1/16\r\n /* The type of the pre-opened capability. */\r\n type: preopentype;\r\n}\r\n\r\n/* Information about a pre-opened capability. */\r\n@unmanaged export abstract class prestat extends $prestat {\r\n private __padding0: usize;\r\n}\r\n\r\n/** The contents of a $prestat when type is `preopentype.DIR`. */\r\n@unmanaged export class prestat_dir extends $prestat {\r\n /** The length of the directory name for use with `fd_prestat_dir_name`. */\r\n name_len: usize;\r\n}\r\n\r\n/** Flags provided to `sock_recv`. */\r\nexport namespace riflags {\r\n /** Returns the message without removing it from the socket's receive queue. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PEEK: riflags = 1;\r\n /** On byte-stream sockets, block until the full amount of data can be returned. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const WAITALL: riflags = 2;\r\n}\r\nexport type riflags = u16;\r\n\r\n/** File descriptor rights, determining which actions may be performed. */\r\nexport namespace rights {\r\n /** The right to invoke `fd_datasync`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_DATASYNC: rights = 1;\r\n /** The right to invoke `fd_read` and `sock_recv`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_READ: rights = 2;\r\n /** The right to invoke `fd_seek`. This flag implies `rights.FD_TELL`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_SEEK: rights = 4;\r\n /** The right to invoke `fd_fdstat_set_flags`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_FDSTAT_SET_FLAGS: rights = 8;\r\n /** The right to invoke `fd_sync`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_SYNC: rights = 16;\r\n /** The right to invoke `fd_seek` in such a way that the file offset remains unaltered (i.e., `whence.CUR` with offset zero), or to invoke `fd_tell`). */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_TELL: rights = 32;\r\n /** The right to invoke `fd_write` and `sock_send`. If `rights.FD_SEEK` is set, includes the right to invoke `fd_pwrite`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_WRITE: rights = 64;\r\n /** The right to invoke `fd_advise`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_ADVISE: rights = 128;\r\n /** The right to invoke `fd_allocate`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_ALLOCATE: rights = 256;\r\n /** The right to invoke `path_create_directory`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_CREATE_DIRECTORY: rights = 512;\r\n /** If `rights.PATH_OPEN` is set, the right to invoke `path_open` with `oflags.CREAT`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_CREATE_FILE: rights = 1024;\r\n /** The right to invoke `path_link` with the file descriptor as the source directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_LINK_SOURCE: rights = 2048;\r\n /** The right to invoke `path_link` with the file descriptor as the target directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_LINK_TARGET: rights = 4096;\r\n /** The right to invoke `path_open`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_OPEN: rights = 8192;\r\n /** The right to invoke `fd_readdir`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_READDIR: rights = 16384;\r\n /** The right to invoke `path_readlink`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_READLINK: rights = 32768;\r\n /** The right to invoke `path_rename` with the file descriptor as the source directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_RENAME_SOURCE: rights = 65536;\r\n /** The right to invoke `path_rename` with the file descriptor as the target directory. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_RENAME_TARGET: rights = 131072;\r\n /** The right to invoke `path_filestat_get`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_FILESTAT_GET: rights = 262144;\r\n /** The right to change a file's size (there is no `path_filestat_set_size`). If `rights.PATH_OPEN` is set, includes the right to invoke `path_open` with `oflags.TRUNC`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_FILESTAT_SET_SIZE: rights = 524288;\r\n /** The right to invoke `path_filestat_set_times`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_FILESTAT_SET_TIMES: rights = 1048576;\r\n /** The right to invoke `fd_filestat_get`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_FILESTAT_GET: rights = 2097152;\r\n /** The right to invoke `fd_filestat_set_size`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_FILESTAT_SET_SIZE: rights = 4194304;\r\n /** The right to invoke `fd_filestat_set_times`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FD_FILESTAT_SET_TIMES: rights = 8388608;\r\n /** The right to invoke `path_symlink`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RIGHT_PATH_SYMLINK: rights = 16777216;\r\n /** The right to invoke `path_remove_directory`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_REMOVE_DIRECTORY: rights = 33554432;\r\n /** The right to invoke `path_unlink_file`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PATH_UNLINK_FILE: rights = 67108864;\r\n /** If `rights.FD_READ` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_READ`. If `rights.FD_WRITE` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_WRITE`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const POLL_FD_READWRITE: rights = 134217728;\r\n /** The right to invoke `sock_shutdown`. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SOCK_SHUTDOWN: rights = 268435456;\r\n}\r\nexport type rights = u64;\r\n\r\n/** Flags returned by `sock_recv`. */\r\nexport namespace roflags {\r\n /** Message data has been truncated. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const DATA_TRUNCATED: roflags = 1;\r\n}\r\nexport type roflags = u16;\r\n\r\n/** Which channels on a socket to shut down. */\r\nexport namespace sdflags {\r\n /** Disables further receive operations. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const RD: sdflags = 1;\r\n /** Disables further send operations. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const WR: sdflags = 2;\r\n}\r\nexport type sdflags = u8;\r\n\r\n/** Flags provided to `sock_send`. */\r\nexport namespace siflags {\r\n // As there are currently no flags defined, it must be set to zero.\r\n}\r\nexport type siflags = u16;\r\n\r\n/** Signal condition. */\r\nexport namespace signal {\r\n /** Hangup. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const HUP: signal = 1;\r\n /** Terminate interrupt signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const INT: signal = 2;\r\n /** Terminal quit signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const QUIT: signal = 3;\r\n /** Illegal instruction. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ILL: signal = 4;\r\n /** Trace/breakpoint trap. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TRAP: signal = 5;\r\n /** Process abort signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ABRT: signal = 6;\r\n /** Access to an undefined portion of a memory object. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const BUS: signal = 7;\r\n /** Erroneous arithmetic operation. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const FPE: signal = 8;\r\n /** Kill. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const KILL: signal = 9;\r\n /** User-defined signal 1. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const USR1: signal = 10;\r\n /** Invalid memory reference. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SEGV: signal = 11;\r\n /** User-defined signal 2. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const USR2: signal = 12;\r\n /** Write on a pipe with no one to read it. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PIPE: signal = 13;\r\n /** Alarm clock. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ALRM: signal = 14;\r\n /** Termination signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TERM: signal = 15;\r\n /** Child process terminated, stopped, or continued. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CHLD: signal = 16;\r\n /** Continue executing, if stopped. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CONT: signal = 17;\r\n /** Stop executing. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const STOP: signal = 18;\r\n /** Terminal stop signal. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TSTP: signal = 19;\r\n /** Background process attempting read. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TTIN: signal = 20;\r\n /** Background process attempting write. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const TTOU: signal = 21;\r\n /** High bandwidth data is available at a socket. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const URG: signal = 22;\r\n /** CPU time limit exceeded. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const XCPU: signal = 23;\r\n /** File size limit exceeded. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const XFSZ: signal = 24;\r\n /** Virtual timer expired. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const VTALRM: signal = 25;\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PROF: signal = 26;\r\n // @ts-ignore: decorator\r\n @inline\r\n export const WINCH: signal = 27;\r\n // @ts-ignore: decorator\r\n @inline\r\n export const POLL: signal = 28;\r\n // @ts-ignore: decorator\r\n @inline\r\n export const PWR: signal = 29;\r\n /** Bad system call. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SYS: signal = 30;\r\n}\r\nexport type signal = u8;\r\n\r\n/** Flags determining how to interpret the timestamp provided in `subscription_t::u.clock.timeout. */\r\nexport namespace subclockflags {\r\n /** If set, treat the timestamp provided in `clocksubscription` as an absolute timestamp. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const ABSTIME: subclockflags = 1;\r\n}\r\nexport type subclockflags = u16;\r\n\r\n@unmanaged abstract class $subscription { // size=16/48\r\n /** User-provided value that is attached to the subscription. */\r\n userdata: userdata;\r\n /** The type of the event to which to subscribe. */\r\n type: eventtype;\r\n\r\n private __padding0: u32;\r\n}\r\n\r\n/** Subscription to an event. */\r\n@unmanaged export abstract class subscription extends $subscription {\r\n private __padding1: u64;\r\n private __padding2: u64;\r\n private __padding3: u64;\r\n private __padding4: u64;\r\n}\r\n\r\n/* Subscription to an event of type `eventtype.CLOCK`.**/\r\n@unmanaged export class subscription_clock extends $subscription {\r\n /** The clock against which to compare the timestamp. */\r\n clock_id: clockid;\r\n /** The absolute or relative timestamp. */\r\n timeout: timestamp;\r\n /** The amount of time that the implementation may wait additionally to coalesce with other events. */\r\n precision: timestamp;\r\n /** Flags specifying whether the timeout is absolute or relative. */\r\n flags: subclockflags;\r\n\r\n private __padding1: u32;\r\n}\r\n\r\n/* Subscription to an event of type `eventtype.FD_READ` or `eventtype.FD_WRITE`.**/\r\n@unmanaged export class subscription_fd_readwrite extends $subscription {\r\n /** The file descriptor on which to wait for it to become ready for reading or writing. */\r\n file_descriptor: fd;\r\n\r\n private __padding1: u64;\r\n private __padding2: u64;\r\n private __padding3: u64;\r\n}\r\n\r\n/** Timestamp in nanoseconds. */\r\nexport type timestamp = u64;\r\n\r\n/** User-provided value that may be attached to objects that is retained when extracted from the implementation. */\r\nexport type userdata = u64;\r\n\r\n/** The position relative to which to set the offset of the file descriptor. */\r\nexport namespace whence {\r\n /** Seek relative to start-of-file. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const SET: whence = 0;\r\n /** Seek relative to current position. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const CUR: whence = 1;\r\n /** Seek relative to end-of-file. */\r\n // @ts-ignore: decorator\r\n @inline\r\n export const END: whence = 2;\r\n}\r\n\r\nexport type whence = u8;\r\n","/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { compareImpl, strtol, strtod, isSpace, isAscii, isFinalSigma, toLower8, toUpper8 } from \"./util/string\";\nimport { SPECIALS_UPPER, casemap, bsearch } from \"./util/casemap\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_UNPAIRED_SURROGATE } from \"./util/error\";\nimport { idof } from \"./builtins\";\nimport { Array } from \"./array\";\n\n@final export abstract class String {\n\n @lazy static readonly MAX_LENGTH: i32 = (BLOCK_MAXSIZE >>> alignof());\n\n static fromCharCode(unit: i32, surr: i32 = -1): String {\n let hasSur = surr > 0;\n let out = changetype(__new(2 << i32(hasSur), idof()));\n store(changetype(out), unit);\n if (hasSur) store(changetype(out), surr, 2);\n return out;\n }\n\n static fromCharCodes(units: Array): String {\n let length = units.length;\n let out = changetype(__new(length << 1, idof()));\n let ptr = units.dataStart;\n for (let i = 0; i < length; ++i) {\n store(changetype(out) + (i << 1), load(ptr + (i << 2)));\n }\n return out;\n }\n\n static fromCodePoint(code: i32): String {\n let hasSur = code > 0xFFFF;\n let out = changetype(__new(2 << i32(hasSur), idof()));\n if (!hasSur) {\n store(changetype(out), code);\n } else {\n // Checks valid code point range\n assert(code <= 0x10FFFF);\n code -= 0x10000;\n let hi = (code & 0x03FF) | 0xDC00;\n let lo = code >>> 10 | 0xD800;\n store(changetype(out), lo | hi << 16);\n }\n return out;\n }\n\n @builtin static raw(parts: TemplateStringsArray, ...args: unknown[]): string { return unreachable(); }\n\n get length(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize >> 1;\n }\n\n at(pos: i32): String {\n let len = this.length;\n pos += select(0, len, pos >= 0);\n if (pos >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n let out = __new(2, idof());\n store(out, load(changetype(this) + (pos << 1)));\n return changetype(out); // retains\n }\n\n @operator(\"[]\") charAt(pos: i32): String {\n if (pos >= this.length) return changetype(\"\");\n let out = changetype(__new(2, idof()));\n store(changetype(out), load(changetype(this) + (pos << 1)));\n return out;\n }\n\n charCodeAt(pos: i32): i32 {\n if (pos >= this.length) return -1; // (NaN)\n return load(changetype(this) + (pos << 1));\n }\n\n codePointAt(pos: i32): i32 {\n let len = this.length;\n if (pos >= len) return -1; // (undefined)\n let first = load(changetype(this) + (pos << 1));\n if ((first & 0xFC00) != 0xD800 || pos + 1 == len) return first;\n let second = load(changetype(this) + (pos << 1), 2);\n if ((second & 0xFC00) != 0xDC00) return first;\n return (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n }\n\n @operator(\"+\") private static __concat(left: String, right: String): String {\n return left.concat(right);\n }\n\n concat(other: String): String {\n let thisSize: isize = this.length << 1;\n let otherSize: isize = other.length << 1;\n let outSize: usize = thisSize + otherSize;\n if (outSize == 0) return changetype(\"\");\n let out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this), thisSize);\n memory.copy(changetype(out) + thisSize, changetype(other), otherSize);\n return out;\n }\n\n endsWith(search: String, end: i32 = String.MAX_LENGTH): bool {\n end = min(max(end, 0), this.length);\n let searchLength = search.length;\n let searchStart = end - searchLength;\n if (searchStart < 0) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(this, searchStart, search, 0, searchLength);\n }\n\n @operator(\"==\") private static __eq(left: String | null, right: String | null): bool {\n if (changetype(left) == changetype(right)) return true;\n if (changetype(left) == 0 || changetype(right) == 0) return false;\n let leftLength = changetype(left).length;\n if (leftLength != changetype(right).length) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(left, 0, right, 0, leftLength);\n }\n\n @operator.prefix(\"!\")\n private static __not(str: String | null): bool {\n return changetype(str) == 0 || !changetype(str).length;\n }\n\n @operator(\"!=\")\n private static __ne(left: String | null, right: String | null): bool {\n return !this.__eq(left, right);\n }\n\n @operator(\">\") private static __gt(left: String, right: String): bool {\n if (changetype(left) == changetype(right)) return false;\n let leftLength = left.length;\n if (!leftLength) return false;\n let rightLength = right.length;\n if (!rightLength) return true;\n // @ts-ignore: string <-> String\n let res = compareImpl(left, 0, right, 0, min(leftLength, rightLength));\n return res ? res > 0 : leftLength > rightLength;\n }\n\n @operator(\">=\") private static __gte(left: String, right: String): bool {\n return !this.__lt(left, right);\n }\n\n @operator(\"<\") private static __lt(left: String, right: String): bool {\n if (changetype(left) == changetype(right)) return false;\n let rightLength = right.length;\n if (!rightLength) return false;\n let leftLength = left.length;\n if (!leftLength) return true;\n // @ts-ignore: string <-> String\n let res = compareImpl(left, 0, right, 0, min(leftLength, rightLength));\n return res ? res < 0 : leftLength < rightLength;\n }\n\n @operator(\"<=\") private static __lte(left: String, right: String): bool {\n return !this.__gt(left, right);\n }\n\n includes(search: String, start: i32 = 0): bool {\n return this.indexOf(search, start) != -1;\n }\n\n indexOf(search: String, start: i32 = 0): i32 {\n let searchLen = search.length;\n if (!searchLen) return 0;\n let len = this.length;\n if (!len) return -1;\n let searchStart = min(max(start, 0), len);\n for (len -= searchLen; searchStart <= len; ++searchStart) {\n // @ts-ignore: string <-> String\n if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart;\n }\n return -1;\n }\n\n lastIndexOf(search: String, start: i32 = i32.MAX_VALUE): i32 {\n let searchLen = search.length;\n if (!searchLen) return this.length;\n let len = this.length;\n if (!len) return -1;\n let searchStart = min(max(start, 0), len - searchLen);\n for (; searchStart >= 0; --searchStart) {\n // @ts-ignore: string <-> String\n if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart;\n }\n return -1;\n }\n\n // TODO: implement full locale comparison with locales and Collator options\n localeCompare(other: String): i32 {\n if (changetype(other) == changetype(this)) return 0;\n let alen = this.length;\n let blen = other.length;\n // @ts-ignore: string <-> String\n let res = compareImpl(this, 0, other, 0, min(alen, blen));\n res = res ? res : alen - blen;\n // normalize to [-1, 1] range\n return i32(res > 0) - i32(res < 0);\n }\n\n startsWith(search: String, start: i32 = 0): bool {\n let len = this.length;\n let searchStart = min(max(start, 0), len);\n let searchLength = search.length;\n if (searchLength + searchStart > len) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(this, searchStart, search, 0, searchLength);\n }\n\n substr(start: i32, length: i32 = i32.MAX_VALUE): String { // legacy\n let intStart: isize = start;\n let end: isize = length;\n let len: isize = this.length;\n if (intStart < 0) intStart = max(len + intStart, 0);\n let size = min(max(end, 0), len - intStart) << 1;\n if (size <= 0) return changetype(\"\");\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + (intStart << 1), size);\n return out;\n }\n\n substring(start: i32, end: i32 = i32.MAX_VALUE): String {\n let len: isize = this.length;\n let finalStart = min(max(start, 0), len);\n let finalEnd = min(max(end, 0), len);\n let fromPos = min(finalStart, finalEnd) << 1;\n let toPos = max(finalStart, finalEnd) << 1;\n let size = toPos - fromPos;\n if (!size) return changetype(\"\");\n if (!fromPos && toPos == len << 1) return this;\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + fromPos, size);\n return out;\n }\n\n trim(): String {\n let len = this.length;\n let size: usize = len << 1;\n while (size && isSpace(load(changetype(this) + size - 2))) {\n size -= 2;\n }\n let offset: usize = 0;\n while (offset < size && isSpace(load(changetype(this) + offset))) {\n offset += 2; size -= 2;\n }\n if (!size) return changetype(\"\");\n if (!offset && size == len << 1) return this;\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + offset, size);\n return out;\n }\n\n @inline\n trimLeft(): String {\n return this.trimStart();\n }\n\n @inline\n trimRight(): String {\n return this.trimEnd();\n }\n\n trimStart(): String {\n let size = this.length << 1;\n let offset: usize = 0;\n while (offset < size && isSpace(load(changetype(this) + offset))) {\n offset += 2;\n }\n if (!offset) return this;\n size -= offset;\n if (!size) return changetype(\"\");\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + offset, size);\n return out;\n }\n\n trimEnd(): String {\n let originalSize = this.length << 1;\n let size = originalSize;\n while (size && isSpace(load(changetype(this) + size - 2))) {\n size -= 2;\n }\n if (!size) return changetype(\"\");\n if (size == originalSize) return this;\n let out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this), size);\n return out;\n }\n\n padStart(length: i32, pad: string = \" \"): String {\n let thisSize = this.length << 1;\n let targetSize = length << 1;\n let padSize = pad.length << 1;\n if (targetSize < thisSize || !padSize) return this;\n let prependSize = targetSize - thisSize;\n let out = changetype(__new(targetSize, idof()));\n if (prependSize > padSize) {\n let repeatCount = (prependSize - 2) / padSize;\n let restBase = repeatCount * padSize;\n let restSize = prependSize - restBase;\n memory.repeat(changetype(out), changetype(pad), padSize, repeatCount);\n memory.copy(changetype(out) + restBase, changetype(pad), restSize);\n } else {\n memory.copy(changetype(out), changetype(pad), prependSize);\n }\n memory.copy(changetype(out) + prependSize, changetype(this), thisSize);\n return out;\n }\n\n padEnd(length: i32, pad: string = \" \"): String {\n let thisSize = this.length << 1;\n let targetSize = length << 1;\n let padSize = pad.length << 1;\n if (targetSize < thisSize || !padSize) return this;\n let appendSize = targetSize - thisSize;\n let out = changetype(__new(targetSize, idof()));\n memory.copy(changetype(out), changetype(this), thisSize);\n if (appendSize > padSize) {\n let repeatCount = (appendSize - 2) / padSize;\n let restBase = repeatCount * padSize;\n let restSize = appendSize - restBase;\n memory.repeat(changetype(out) + thisSize, changetype(pad), padSize, repeatCount);\n memory.copy(changetype(out) + thisSize + restBase, changetype(pad), restSize);\n } else {\n memory.copy(changetype(out) + thisSize, changetype(pad), appendSize);\n }\n return out;\n }\n\n repeat(count: i32 = 0): String {\n let length = this.length;\n\n // Most browsers can't handle strings 1 << 28 chars or longer\n if (count < 0 || length * count > (1 << 28)) {\n throw new RangeError(E_INVALIDLENGTH);\n }\n\n if (count == 0 || !length) return changetype(\"\");\n if (count == 1) return this;\n let out = changetype(__new((length * count) << 1, idof()));\n memory.repeat(changetype(out), changetype(this), length << 1, count);\n return out;\n }\n\n replace(search: String, replacement: String): String {\n let len: usize = this.length;\n let slen: usize = search.length;\n if (len <= slen) {\n return len < slen ? this : select(replacement, this, search == this);\n }\n let index: isize = this.indexOf(search);\n if (~index) {\n let rlen: usize = replacement.length;\n len -= slen;\n let olen = len + rlen;\n if (olen) {\n let out = changetype(__new(olen << 1, idof()));\n memory.copy(changetype(out), changetype(this), index << 1);\n memory.copy(\n changetype(out) + (index << 1),\n changetype(replacement),\n rlen << 1\n );\n memory.copy(\n changetype(out) + ((index + rlen) << 1),\n changetype(this) + ((index + slen) << 1),\n (len - index) << 1\n );\n return out;\n }\n }\n return this;\n }\n\n replaceAll(search: String, replacement: String): String {\n let thisLen: usize = this.length;\n let searchLen: usize = search.length;\n if (thisLen <= searchLen) {\n return thisLen < searchLen\n ? this\n : select(replacement, this, search == this);\n }\n let replaceLen: usize = replacement.length;\n if (!searchLen) {\n if (!replaceLen) return this;\n // Special case: 'abc'.replaceAll('', '-') -> '-a-b-c-'\n let out = changetype(__new((thisLen + (thisLen + 1) * replaceLen) << 1, idof()));\n memory.copy(changetype(out), changetype(replacement), replaceLen << 1);\n let offset = replaceLen;\n for (let i: usize = 0; i < thisLen; ++i) {\n store(\n changetype(out) + (offset++ << 1),\n load(changetype(this) + (i << 1))\n );\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(replacement),\n replaceLen << 1\n );\n offset += replaceLen;\n }\n return out;\n }\n let prev: isize = 0, next: isize = 0;\n if (searchLen == replaceLen) {\n // Fast path when search and replacement have same length\n let outSize = thisLen << 1;\n let out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this), outSize);\n while (~(next = this.indexOf(search, prev))) {\n memory.copy(changetype(out) + (next << 1), changetype(replacement), replaceLen << 1);\n prev = next + searchLen;\n }\n return out;\n }\n let out: String | null = null, offset: usize = 0, outSize = thisLen;\n while (~(next = this.indexOf(search, prev))) {\n if (!out) out = changetype(__new(thisLen << 1, idof()));\n let chunk = next - prev;\n if (offset + chunk + replaceLen > outSize) {\n outSize <<= 1;\n out = changetype(__renew(changetype(out), outSize << 1));\n }\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(this) + (prev << 1),\n chunk << 1\n );\n offset += chunk;\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(replacement),\n replaceLen << 1\n );\n offset += replaceLen;\n prev = next + searchLen;\n }\n if (out) {\n let rest = thisLen - prev;\n if (offset + rest > outSize) {\n outSize <<= 1;\n out = changetype(__renew(changetype(out), outSize << 1));\n }\n if (rest) {\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(this) + (prev << 1),\n rest << 1\n );\n }\n rest += offset;\n if (outSize > rest) {\n out = changetype(__renew(changetype(out), rest << 1));\n }\n return out;\n }\n return this;\n }\n\n slice(start: i32, end: i32 = i32.MAX_VALUE): String {\n let len = this.length;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end, len);\n len = end - start;\n if (len <= 0) return changetype(\"\");\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n return out;\n }\n\n split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] {\n if (!limit) return changetype(__newArray(0, alignof(), idof>()));\n if (changetype(separator) == 0) return [ this ];\n let length: isize = this.length;\n let sepLen = changetype(separator).length;\n if (limit < 0) limit = i32.MAX_VALUE;\n if (!sepLen) {\n if (!length) return changetype(__newArray(0, alignof(), idof>()));\n // split by chars\n length = min(length, limit);\n let result = changetype(__newArray(length, alignof(), idof>()));\n // @ts-ignore: cast\n let resultStart = result.dataStart as usize;\n for (let i: isize = 0; i < length; ++i) {\n let charStr = changetype(__new(2, idof()));\n store(changetype(charStr), load(changetype(this) + (i << 1)));\n store(resultStart + (i << alignof()), changetype(charStr)); // result[i] = charStr\n __link(changetype(result), changetype(charStr), true);\n }\n return result;\n } else if (!length) {\n let result = changetype(__newArray(1, alignof(), idof>()));\n // @ts-ignore: cast\n store(result.dataStart as usize, changetype(\"\")); // static \"\"\n return result;\n }\n let result = changetype(__newArray(0, alignof(), idof>()));\n let end = 0, start = 0, i = 0;\n while (~(end = this.indexOf(changetype(separator), start))) {\n let len = end - start;\n if (len > 0) {\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n result.push(out);\n } else {\n result.push(changetype(\"\"));\n }\n if (++i == limit) return result;\n start = end + sepLen;\n }\n if (!start) { // also means: loop above didn't do anything\n result.push(this);\n return result;\n }\n let len = length - start;\n if (len > 0) {\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n result.push(out);\n } else {\n result.push(changetype(\"\")); // static \"\"\n }\n return result;\n }\n\n toLowerCase(): String {\n let len = this.length;\n if (!len) return this;\n let codes = changetype(__new(len * 2 * 2, idof()));\n let j: usize = 0;\n for (let i: usize = 0; i < len; ++i, ++j) {\n let c = load(changetype(this) + (i << 1));\n if (isAscii(c)) {\n store(changetype(codes) + (j << 1), toLower8(c));\n } else {\n // check and read surrogate pair\n if ((c - 0xD7FF < 0xDC00 - 0xD7FF) && i < len - 1) {\n let c1 = load(changetype(this) + (i << 1), 2);\n if (c1 - 0xDBFF < 0xE000 - 0xDBFF) {\n let c0 = c;\n c = (((c & 0x03FF) << 10) | (c1 & 0x03FF)) + 0x10000;\n ++i;\n if (c >= 0x20000) {\n store(changetype(codes) + (j << 1), c0 | (c1 << 16));\n ++j;\n continue;\n }\n }\n }\n // check special casing for lower table. It has one ently so instead lookup we just inline this.\n if (c == 0x0130) {\n // 0x0130 -> [0x0069, 0x0307]\n store(changetype(codes) + (j << 1), (0x0307 << 16) | 0x0069);\n ++j;\n } else if (c == 0x03A3) { // 'Σ'\n // Σ maps to σ but except at the end of a word where it maps to ς\n let sigma = 0x03C3; // σ\n if (len > 1 && isFinalSigma(changetype(this), i, len)) {\n sigma = 0x03C2; // ς\n }\n store(changetype(codes) + (j << 1), sigma);\n } else if (c - 0x24B6 <= 0x24CF - 0x24B6) {\n // Range 0x24B6 <= c <= 0x24CF not covered by casemap and require special early handling\n store(changetype(codes) + (j << 1), c + 26);\n } else {\n let code = casemap(c, 0) & 0x1FFFFF;\n if (code < 0x10000) {\n store(changetype(codes) + (j << 1), code);\n } else {\n // store as surrogare pair\n code -= 0x10000;\n let lo = (code >>> 10) | 0xD800;\n let hi = (code & 0x03FF) | 0xDC00;\n store(changetype(codes) + (j << 1), lo | (hi << 16));\n ++j;\n }\n }\n }\n }\n return changetype(__renew(changetype(codes), j << 1));\n }\n\n toUpperCase(): String {\n let len = this.length;\n if (!len) return this;\n let codes = changetype(__new(len * 3 * 2, idof()));\n let specialsPtr = changetype(SPECIALS_UPPER);\n let specialsLen = SPECIALS_UPPER.length;\n let j: usize = 0;\n for (let i: usize = 0; i < len; ++i, ++j) {\n let c = load(changetype(this) + (i << 1));\n if (isAscii(c)) {\n store(changetype(codes) + (j << 1), toUpper8(c));\n } else {\n // check and read surrogate pair\n if ((c - 0xD7FF < 0xDC00 - 0xD7FF) && i < len - 1) {\n let c1 = load(changetype(this) + (i << 1), 2);\n if (c1 - 0xDBFF < 0xE000 - 0xDBFF) {\n let c0 = c;\n c = (((c & 0x03FF) << 10) | (c1 & 0x03FF)) + 0x10000;\n ++i;\n if (c >= 0x20000) {\n store(changetype(codes) + (j << 1), c0 | (c1 << 16));\n ++j;\n continue;\n }\n }\n }\n // Range 0x24D0 <= c <= 0x24E9 not covered by casemap and require special early handling\n if (c - 0x24D0 <= 0x24E9 - 0x24D0) {\n // monkey patch\n store(changetype(codes) + (j << 1), c - 26);\n } else {\n let index: usize = -1;\n // Fast range check. See first and last rows in specialsUpper table\n if (c - 0x00DF <= 0xFB17 - 0x00DF) {\n index = bsearch(c, specialsPtr, specialsLen);\n }\n if (~index) {\n // load next 3 code points from row with `index` offset for specialsUpper table\n let ab = load(specialsPtr + (index << 1), 2);\n let cc = load(specialsPtr + (index << 1), 6);\n store(changetype(codes) + (j << 1), ab, 0);\n store(changetype(codes) + (j << 1), cc, 4);\n j += 1 + usize(cc != 0);\n } else {\n let code = casemap(c, 1) & 0x1FFFFF;\n if (code < 0x10000) {\n store(changetype(codes) + (j << 1), code);\n } else {\n // store as surrogare pair\n code -= 0x10000;\n let lo = (code >>> 10) | 0xD800;\n let hi = (code & 0x03FF) | 0xDC00;\n store(changetype(codes) + (j << 1), lo | (hi << 16));\n ++j;\n }\n }\n }\n }\n }\n return changetype(__renew(changetype(codes), j << 1));\n }\n\n toString(): String {\n return this;\n }\n}\n\n// @ts-ignore: nolib\nexport type string = String;\n\nexport function parseInt(str: string, radix: i32 = 0): f64 {\n return strtol(str, radix);\n}\n\nexport function parseFloat(str: string): f64 {\n return strtod(str);\n}\n\n// Encoding helpers\nexport namespace String {\n\n export namespace UTF8 {\n\n export const enum ErrorMode {\n WTF8,\n REPLACE,\n ERROR\n }\n\n export function byteLength(str: string, nullTerminated: bool = false): i32 {\n let strOff = changetype(str);\n let strEnd = strOff + changetype(changetype(str) - TOTAL_OVERHEAD).rtSize;\n let bufLen = i32(nullTerminated);\n while (strOff < strEnd) {\n let c1 = load(strOff);\n if (c1 < 128) {\n // @ts-ignore: cast\n if (nullTerminated & !c1) break;\n bufLen += 1;\n } else if (c1 < 2048) {\n bufLen += 2;\n } else {\n if ((c1 & 0xFC00) == 0xD800 && strOff + 2 < strEnd) {\n if ((load(strOff, 2) & 0xFC00) == 0xDC00) {\n bufLen += 4; strOff += 4;\n continue;\n }\n }\n bufLen += 3;\n }\n strOff += 2;\n }\n return bufLen;\n }\n\n export function encode(str: string, nullTerminated: bool = false, errorMode: ErrorMode = ErrorMode.WTF8): ArrayBuffer {\n let buf = changetype(__new(byteLength(str, nullTerminated), idof()));\n encodeUnsafe(changetype(str), str.length, changetype(buf), nullTerminated, errorMode);\n return buf;\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function encodeUnsafe(str: usize, len: i32, buf: usize, nullTerminated: bool = false, errorMode: ErrorMode = ErrorMode.WTF8): usize {\n let strEnd = str + (len << 1);\n let bufOff = buf;\n while (str < strEnd) {\n let c1 = load(str);\n if (c1 < 128) {\n store(bufOff, c1);\n bufOff++;\n // @ts-ignore: cast\n if (nullTerminated & !c1) return bufOff - buf;\n } else if (c1 < 2048) {\n let b0 = c1 >> 6 | 192;\n let b1 = c1 & 63 | 128;\n store(bufOff, b1 << 8 | b0);\n bufOff += 2;\n } else {\n // D800: 11011 0 0000000000 Lead\n // DBFF: 11011 0 1111111111\n // DC00: 11011 1 0000000000 Trail\n // DFFF: 11011 1 1111111111\n // F800: 11111 0 0000000000 Mask\n // FC00: 11111 1 0000000000\n if ((c1 & 0xF800) == 0xD800) {\n if (c1 < 0xDC00 && str + 2 < strEnd) {\n let c2 = load(str, 2);\n if ((c2 & 0xFC00) == 0xDC00) {\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) | (c2 & 0x03FF);\n let b0 = c1 >> 18 | 240;\n let b1 = c1 >> 12 & 63 | 128;\n let b2 = c1 >> 6 & 63 | 128;\n let b3 = c1 & 63 | 128;\n store(bufOff, b3 << 24 | b2 << 16 | b1 << 8 | b0);\n bufOff += 4; str += 4;\n continue;\n }\n }\n if (errorMode != ErrorMode.WTF8) { // unlikely\n if (errorMode == ErrorMode.ERROR) throw new Error(E_UNPAIRED_SURROGATE);\n c1 = 0xFFFD;\n }\n }\n let b0 = c1 >> 12 | 224;\n let b1 = c1 >> 6 & 63 | 128;\n let b2 = c1 & 63 | 128;\n store(bufOff, b1 << 8 | b0);\n store(bufOff, b2, 2);\n bufOff += 3;\n }\n str += 2;\n }\n if (nullTerminated) {\n store(bufOff++, 0);\n }\n return bufOff - buf;\n }\n\n export function decode(buf: ArrayBuffer, nullTerminated: bool = false): String {\n return decodeUnsafe(changetype(buf), buf.byteLength, nullTerminated);\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function decodeUnsafe(buf: usize, len: usize, nullTerminated: bool = false): String {\n let bufOff = buf;\n let bufEnd = buf + len;\n assert(bufEnd >= bufOff); // guard wraparound\n let str = changetype(__new(len << 1, idof())); // max is one u16 char per u8 byte\n let strOff = changetype(str);\n while (bufOff < bufEnd) {\n let u0 = load(bufOff); ++bufOff;\n if (!(u0 & 128)) {\n // @ts-ignore: cast\n if (nullTerminated & !u0) break;\n store(strOff, u0);\n } else {\n if (bufEnd == bufOff) break;\n let u1 = load(bufOff) & 63; ++bufOff;\n if ((u0 & 224) == 192) {\n store(strOff, (u0 & 31) << 6 | u1);\n } else {\n if (bufEnd == bufOff) break;\n let u2 = load(bufOff) & 63; ++bufOff;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n if (bufEnd == bufOff) break;\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | load(bufOff) & 63;\n ++bufOff;\n }\n if (u0 < 0x10000) {\n store(strOff, u0);\n } else {\n u0 -= 0x10000;\n let lo = u0 >> 10 | 0xD800;\n let hi = (u0 & 0x03FF) | 0xDC00;\n store(strOff, lo | (hi << 16));\n strOff += 2;\n }\n }\n }\n strOff += 2;\n }\n return changetype(__renew(changetype(str), strOff - changetype(str)));\n }\n }\n\n export namespace UTF16 {\n\n export function byteLength(str: string): i32 {\n return changetype(changetype(str) - TOTAL_OVERHEAD).rtSize;\n }\n\n export function encode(str: string): ArrayBuffer {\n let buf = changetype(__new(byteLength(str), idof()));\n encodeUnsafe(changetype(str), str.length, changetype(buf));\n return buf;\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function encodeUnsafe(str: usize, len: i32, buf: usize): usize {\n let size = len << 1;\n memory.copy(buf, changetype(str), size);\n return size;\n }\n\n export function decode(buf: ArrayBuffer): String {\n return decodeUnsafe(changetype(buf), buf.byteLength);\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function decodeUnsafe(buf: usize, len: usize): String {\n let str = changetype(__new(len &= ~1, idof()));\n memory.copy(changetype(str), buf, len);\n return str;\n }\n }\n}\n\nexport class TemplateStringsArray extends Array {\n readonly raw: string[];\n}\n","// Common error messages for use across the standard library. Keeping error messages compact\n// and reusing them where possible ensures minimal static data in binaries.\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INDEXOUTOFRANGE: string = \"Index out of range\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_VALUEOUTOFRANGE: string = \"Value out of range\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INVALIDLENGTH: string = \"Invalid length\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_EMPTYARRAY: string = \"Array is empty\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_HOLEYARRAY: string = \"Element type must be nullable if array is holey\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_NOTIMPLEMENTED: string = \"Not implemented\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_KEYNOTFOUND: string = \"Key does not exist\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ALLOCATION_TOO_LARGE: string = \"Allocation too large\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ALREADY_PINNED: string = \"Object already pinned\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_NOT_PINNED: string = \"Object is not pinned\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_URI_MALFORMED: string = \"URI malformed\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INVALIDDATE: string = \"Invalid Date\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_UNPAIRED_SURROGATE: string = \"Unpaired surrogate\";\n","import { Typeinfo, TypeinfoFlags } from \"./shared/typeinfo\";\nimport { E_INDEXOUTOFRANGE } from \"./util/error\";\nimport { ArrayBufferView } from \"./arraybuffer\";\n\n// @ts-ignore: decorator\n@builtin\nexport declare const __rtti_base: usize;\n\n// @ts-ignore: decorator\n@builtin @unsafe\nexport declare function __visit_globals(cookie: u32): void;\n\n// @ts-ignore: decorator\n@builtin @unsafe\nexport declare function __visit_members(ref: usize, cookie: u32): void;\n\n// @ts-ignore: decorator\n@unsafe\nexport function __typeinfo(id: u32): TypeinfoFlags {\n let ptr = __rtti_base;\n if (id > load(ptr)) throw new Error(E_INDEXOUTOFRANGE);\n return changetype(ptr + sizeof() + id * offsetof()).flags;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __newBuffer(size: usize, id: u32, data: usize = 0): usize {\n let buffer = __new(size, id);\n if (data) memory.copy(buffer, data, size);\n return buffer;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __newArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize {\n let bufferSize = length << alignLog2;\n // make sure `buffer` is tracked by the shadow stack\n let buffer = changetype(__newBuffer(bufferSize, idof(), data));\n // ...since allocating the array may trigger GC steps\n let array = __new(offsetof(), id);\n store(array, changetype(buffer), offsetof(\"buffer\"));\n __link(array, changetype(buffer), false);\n store(array, changetype(buffer), offsetof(\"dataStart\"));\n store(array, bufferSize, offsetof(\"byteLength\"));\n store(array, length, offsetof(\"length_\"));\n return array;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nfunction __tostack(ptr: usize): usize { // eslint-disable-line\n return ptr;\n}\n\n// These are provided by the respective implementation, included as another entry file by asc:\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __alloc(size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __realloc(ptr: usize, size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __free(ptr: usize): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __new(size: usize, id: u32): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __renew(ptr: usize, size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __collect(): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __visit(ptr: usize, cookie: u32): void;\n","import { JSON } from \".\";\nimport { bl } from \"./bl\";\n/*\n@json\nclass Vec3 {\n x: f64 = 1.0;\n y: f64 = 2.0;\n z: f64 = 3.0;\n __SERIALIZE_BL(): void {\n bl.write_128(i16x8(123, 34, 120, 34, 58, 49, 44, 34)); /* {\"x\":1,\" */\n// bl.write_128(i16x8(121, 34, 58, 50, 44, 34, 122, 34)); /* y\":2,\"z\" */\n// bl.write_32(3342394); /* :3 */\n// bl.write_16(125); /* } */\n// }\n//}\n//const vec = new Vec3();*/\nJSON.stringifyBL(\"hello w\\\"orld!\");\nconsole.log(bl.out())/*\nJSON.stringifyBL(vec);\nconsole.log(bl.out())*/","/// \nimport { serializeString, serializeStringBL } from \"./serialize/string\";\nimport { serializeBool, serializeBoolBL } from \"./serialize/bool\";\nimport { serializeInteger, serializeIntegerBL } from \"./serialize/integer\";\nimport { serializeFloat, serializeFloatBL } from \"./serialize/float\";\nimport { serializeObject, serializeObjectBL } from \"./serialize/object\";\nimport { serializeDate, serializeDateBL } from \"./serialize/date\";\nimport { serializeArray } from \"./serialize/array\";\nimport { serializeMap, serializeMapBL } from \"./serialize/map\";\nimport { deserializeBoolean } from \"./deserialize/bool\";\nimport { deserializeArray } from \"./deserialize/array\";\nimport { deserializeFloat } from \"./deserialize/float\";\nimport { deserializeObject } from \"./deserialize/object\";\nimport { deserializeMap } from \"./deserialize/map\";\nimport { deserializeDate } from \"./deserialize/date\";\nimport { NULL_PTR, NULL_WORD } from \"./chars\";\nimport { deserializeInteger } from \"./deserialize/integer\";\nimport { deserializeString } from \"./deserialize/string\";\nimport { MpZ } from \"@hypercubed/as-mpz\";\nimport { serializeMpZ, serializeMpZBL } from \"./serialize/mpz\";\nimport { deserializeMpZ } from \"./deserialize/mpz\";\nimport { bl } from \"./bl\";\n\n/**\n * JSON Encoder/Decoder for AssemblyScript\n */\nexport namespace JSON {\n /**\n * Enum representing the different types supported by JSON.\n */\n export enum Types {\n U8,\n U16,\n U32,\n U64,\n F32,\n F64,\n Bool,\n String,\n ManagedString,\n Struct,\n ManagedStruct,\n Array,\n ManagedArray\n }\n\n export class Box {\n constructor(public value: T) { }\n @inline static from(value: T): Box {\n return new Box(value);\n }\n }\n\n /**\n * Stringifies valid JSON data.\n * ```js\n * JSON.stringify(data)\n * ```\n * @param data T\n * @returns string\n */\n // @ts-ignore: Decorator\n export function stringify(data: T): string {\n if (isBoolean()) {\n return serializeBool(data as bool);\n } else if (isInteger()) {\n // @ts-ignore\n return serializeInteger(data);\n } else if (isFloat(data)) {\n // @ts-ignore\n return serializeFloat(data);\n // @ts-ignore: Function is generated by transform\n } else if (isNullable() && changetype(data) == 0) {\n return NULL_WORD;\n // @ts-ignore\n } else if (isString>()) {\n return serializeString(changetype(data));\n // @ts-ignore\n } else if (isDefined(data.__SERIALIZE)) {\n // @ts-ignore\n return serializeObject(changetype>(data));\n } else if (data instanceof Date) {\n // @ts-ignore\n return serializeDate(changetype>(data));\n } else if (data instanceof Array) {\n // @ts-ignore\n return serializeArray(changetype>(data));\n } else if (data instanceof Map) {\n // @ts-ignore\n return serializeMap(changetype>(data));\n } else if (data instanceof MpZ) {\n return serializeMpZ(data);\n } else {\n throw new Error(\n `Could not serialize data of type ${nameof()}. Make sure to add the correct decorators to classes.`\n );\n }\n }\n /**\n * Stringifies valid JSON data.\n * ```js\n * JSON.stringify(data)\n * ```\n * @param data T\n * @returns string\n */\n // @ts-ignore: Decorator\n export function stringifyBL(data: T): void {\n if (isBoolean()) {\n serializeBoolBL(data as bool);\n } else if (isInteger()) {\n // @ts-ignore\n serializeIntegerBL(data);\n } else if (isFloat(data)) {\n // @ts-ignore\n serializeFloatBL(data);\n // @ts-ignore: Function is generated by transform\n } else if (isNullable() && changetype(data) == 0) {\n bl.write_b(NULL_PTR, 8);\n // @ts-ignore\n } else if (isString>()) {\n serializeStringBL(changetype(data));\n // @ts-ignore\n } else if (isDefined(data.__SERIALIZE)) {\n // @ts-ignore\n serializeObjectBL(changetype>(data));\n } else if (data instanceof Date) {\n // @ts-ignore\n serializeDateBL(changetype>(data));\n } else if (data instanceof Array) {\n // @ts-ignore\n serializeArrayBL(changetype>(data));\n } else if (data instanceof Map) {\n // @ts-ignore\n serializeMapBL(changetype>(data));\n } else if (data instanceof MpZ) {\n serializeMpZBL(data);\n } else {\n throw new Error(\n `Could not serialize data of type ${nameof()}. Make sure to add the correct decorators to classes.`\n );\n }\n }\n\n /**\n * Parses valid JSON strings into their original format.\n * ```js\n * JSON.parse(data)\n * ```\n * @param data string\n * @returns T\n */\n\n // @ts-ignore: Decorator\n export function parse(data: string): T {\n if (isBoolean()) {\n return deserializeBoolean(data) as T;\n } else if (isInteger()) {\n return deserializeInteger(data);\n } else if (isFloat()) {\n return deserializeFloat(data);\n } else if (isNullable() && data.length === 4 && data == \"null\") {\n // @ts-ignore\n return null;\n } else if (isString()) {\n // @ts-ignore\n return deserializeString(data);\n } else if (isArray()) {\n // @ts-ignore\n return deserializeArray>(data);\n }\n let type: nonnull = changetype>(0);\n if (isDefined(type.__DESERIALIZE)) {\n // @ts-ignore\n return deserializeObject>(data.trimStart());\n } else if (type instanceof Map) {\n // @ts-ignore\n return deserializeMap>(data.trimStart());\n } else if (type instanceof MpZ) {\n // @ts-ignore\n return deserializeMpZ(data);\n } else if (type instanceof Date) {\n // @ts-ignore\n return deserializeDate(data);\n } else {\n throw new Error(\n `Could not deserialize data ${data} to type ${nameof()}. Make sure to add the correct decorators to classes.`\n );\n }\n }\n}\n\n// This allows JSON.stringify and JSON.parse to be available globally through an alias\n// @ts-ignore: Decorator\n@global function __SERIALIZE(data: T): string {\n return JSON.stringify(data);\n}\n// @ts-ignore: Decorator\n@global function __DESERIALIZE(data: string): T {\n return JSON.parse(data);\n}\n\n// @ts-ignore: Decorator\n@global function __SERIALIZE_BL(data: T): void {\n JSON.stringifyBL(data);\n}","import { bl } from \"../bl\";\nimport {\n BACK_SLASH,\n BACKSPACE,\n CARRIAGE_RETURN,\n FORM_FEED,\n NEW_LINE,\n QUOTE,\n QUOTE_WORD,\n TAB\n} from \"../chars\";\nimport { Sink } from \"../sink\";\nimport { _intTo16, intTo16, unsafeCharCodeAt } from \"../util\";\n\n// @ts-ignore: Decorator valid here\n@inline export function serializeString(data: string): string {\n if (data.length === 0) {\n return QUOTE_WORD + QUOTE_WORD;\n }\n\n let result = Sink.fromString(QUOTE_WORD, data.length);\n\n let last: i32 = 0;\n for (let i = 0; i < data.length; i++) {\n const char = unsafeCharCodeAt(data, i);\n if (char === QUOTE || char === BACK_SLASH) {\n result.write(data, last, i);\n result.writeCodePoint(BACK_SLASH);\n last = i;\n } else if (16 > char) {\n result.write(data, last, i);\n last = i + 1;\n switch (char) {\n case BACKSPACE: {\n result.write(\"\\\\b\");\n break;\n }\n case TAB: {\n result.write(\"\\\\t\");\n break;\n }\n case NEW_LINE: {\n result.write(\"\\\\n\");\n break;\n }\n case FORM_FEED: {\n result.write(\"\\\\f\");\n break;\n }\n case CARRIAGE_RETURN: {\n result.write(\"\\\\r\");\n break;\n }\n default: {\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0000 to \\u000f handled here\n result.write(\"\\\\u000\");\n result.write(char.toString(16));\n break;\n }\n }\n } else if (32 > char) {\n result.write(data, last, i);\n last = i + 1;\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0010 to \\u001f handled here\n result.write(\"\\\\u00\");\n result.write(char.toString(16));\n }\n }\n result.write(data, last);\n result.writeCodePoint(QUOTE);\n return result.toString();\n}\n\n// @ts-ignore: Decorator valid here\n@inline export function serializeStringBL(data: string): void {\n const len = data.length << 1;\n if (len === 0) {\n bl.write_32(2228258); /* \"\" */\n return;\n }\n\n let offset = 0;\n bl.write_16(34); /* \" */\n\n // if (len > 7) {\n // for (; offset < len - 7; offset += 8) {\n // const char = load(changetype(data) + offset);\n // const a = i32(char & 0xFFFF);\n // const b = i32((char >> 16) & 0xFFFF);\n // const c = i32((char >> 32) & 0xFFFF);\n // const d = i32((char >> 48) & 0xFFFF);\n\n // //console.log(`a: ${String.fromCharCode(a)}\\nb: ${String.fromCharCode(b)}\\nc: ${String.fromCharCode(c)}\\nd: ${String.fromCharCode(d)}`);\n\n // if (a > 31) {\n // if (a === QUOTE) {\n // bl.write_32(2228316); /* \\\\\" */\n // } else if (a === BACK_SLASH) {\n // bl.write_32(6029404); /* \\\\\\\\ */\n // } else {\n // bl.write_16(a);\n // }\n // } else {\n // if (a < 16) {\n // switch (a) {\n // case BACKSPACE: {\n // bl.write_32(6422620); /* \\\\b */\n // break;\n // }\n // case TAB: {\n // bl.write_32(7602268); /* \\\\t */\n // break;\n // }\n // case NEW_LINE: {\n // bl.write_32(7209052); /* \\\\n */\n // break;\n // }\n // case FORM_FEED: {\n // bl.write_32(6684764); /* \\\\f */\n // break;\n // }\n // case CARRIAGE_RETURN: {\n // bl.write_32(7471196); /* \\\\r */\n // break;\n // }\n // default: {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0000 to \\u000f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((_intTo16(a) << 16) | 48); /* 0_ */\n // break;\n // }\n // }\n // } else {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0010 to \\u001f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((intTo16(a) << 16) | 48); /* 0_ */\n // }\n // }\n\n // if (b > 31) {\n // if (b === QUOTE) {\n // bl.write_32(2228316); /* \\\\\" */\n // } else if (b === BACK_SLASH) {\n // bl.write_32(6029404); /* \\\\\\\\ */\n // } else {\n // bl.write_16(b);\n // }\n // } else {\n // if (b < 16) {\n // switch (b) {\n // case BACKSPACE: {\n // bl.write_32(6422620); /* \\\\b */\n // break;\n // }\n // case TAB: {\n // bl.write_32(7602268); /* \\\\t */\n // break;\n // }\n // case NEW_LINE: {\n // bl.write_32(7209052); /* \\\\n */\n // break;\n // }\n // case FORM_FEED: {\n // bl.write_32(6684764); /* \\\\f */\n // break;\n // }\n // case CARRIAGE_RETURN: {\n // bl.write_32(7471196); /* \\\\r */\n // break;\n // }\n // default: {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0000 to \\u000f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((_intTo16(b) << 16) | 48); /* 0_ */\n // break;\n // }\n // }\n // } else {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0010 to \\u001f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((intTo16(b) << 16) | 48); /* 0_ */\n // }\n // }\n\n // if (c > 31) {\n // if (c === QUOTE) {\n // bl.write_32(2228316); /* \\\\\" */\n // } else if (c === BACK_SLASH) {\n // bl.write_32(6029404); /* \\\\\\\\ */\n // } else {\n // bl.write_16(c);\n // }\n // } else {\n // if (c < 16) {\n // switch (c) {\n // case BACKSPACE: {\n // bl.write_32(6422620); /* \\\\b */\n // break;\n // }\n // case TAB: {\n // bl.write_32(7602268); /* \\\\t */\n // break;\n // }\n // case NEW_LINE: {\n // bl.write_32(7209052); /* \\\\n */\n // break;\n // }\n // case FORM_FEED: {\n // bl.write_32(6684764); /* \\\\f */\n // break;\n // }\n // case CARRIAGE_RETURN: {\n // bl.write_32(7471196); /* \\\\r */\n // break;\n // }\n // default: {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0000 to \\u000f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((_intTo16(c) << 16) | 48); /* 0_ */\n // break;\n // }\n // }\n // } else {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0010 to \\u001f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((intTo16(c) << 16) | 48); /* 0_ */\n // }\n // }\n // if (d > 31) {\n // if (d === QUOTE) {\n // bl.write_32(2228316); /* \\\\\" */\n // } else if (d === BACK_SLASH) {\n // bl.write_32(6029404); /* \\\\\\\\ */\n // } else {\n // bl.write_16(d);\n // }\n // } else {\n // if (d < 16) {\n // switch (d) {\n // case BACKSPACE: {\n // bl.write_32(6422620); /* \\\\b */\n // break;\n // }\n // case TAB: {\n // bl.write_32(7602268); /* \\\\t */\n // break;\n // }\n // case NEW_LINE: {\n // bl.write_32(7209052); /* \\\\n */\n // break;\n // }\n // case FORM_FEED: {\n // bl.write_32(6684764); /* \\\\f */\n // break;\n // }\n // case CARRIAGE_RETURN: {\n // bl.write_32(7471196); /* \\\\r */\n // break;\n // }\n // default: {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0000 to \\u000f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((_intTo16(d) << 16) | 48); /* 0_ */\n // break;\n // }\n // }\n // } else {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0010 to \\u001f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((intTo16(d) << 16) | 48); /* 0_ */\n // }\n // }\n // }\n // }\n\n if (len > 3) {\n for (; offset < len - 3; offset += 4) {\n const char = load(changetype(data) + offset);\n const a = char & 0xFFFF;\n const b = char >> 16;\n\n console.log(\"a: \" + String.fromCharCode(a));\n console.log(\"b: \" + String.fromCharCode(b));\n if (a > 31) {\n if (b > 31) {\n switch (a) {\n case QUOTE: {\n bl.write_32(2228316); /* \\\\\" */\n break;\n }\n case BACK_SLASH: {\n bl.write_32(6029404); /* \\\\\\\\ */\n break;\n }\n default: {\n switch (b) {\n case QUOTE: {\n bl.write_16(a);\n bl.write_32(2228316); /* \\\\\" */\n break;\n }\n case BACK_SLASH: {\n bl.write_16(a);\n bl.write_32(6029404); /* \\\\\\\\ */\n break;\n }\n default: {\n bl.write_32(char);\n break;\n }\n }\n }\n }\n } else {\n switch (a) {\n case QUOTE: {\n bl.write_32(2228316); /* \\\\\" */\n break;\n }\n case BACK_SLASH: {\n bl.write_32(6029404); /* \\\\\\\\ */\n break;\n }\n default: {\n bl.write_16(a);\n break;\n }\n }\n }\n } else {\n if (a < 16) {\n switch (a) {\n case BACKSPACE: {\n bl.write_32(6422620); /* \\\\b */\n break;\n }\n case TAB: {\n bl.write_32(7602268); /* \\\\t */\n break;\n }\n case NEW_LINE: {\n bl.write_32(7209052); /* \\\\n */\n break;\n }\n case FORM_FEED: {\n bl.write_32(6684764); /* \\\\f */\n break;\n }\n case CARRIAGE_RETURN: {\n bl.write_32(7471196); /* \\\\r */\n break;\n }\n default: {\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0000 to \\u000f handled here\n bl.write_64(13511005048209500) /* \\\\u00 */\n bl.write_32((_intTo16(a) << 16) | 48); /* 0_ */\n break;\n }\n }\n } else {\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0010 to \\u001f handled here\n bl.write_64(13511005048209500) /* \\\\u00 */\n bl.write_32((intTo16(a) << 16) | 48); /* 0_ */\n }\n }\n\n // if (b > 31) {\n // if (b === QUOTE) {\n // bl.write_32(2228316); /* \\\\\" */\n // } else if (b === BACK_SLASH) {\n // bl.write_32(6029404); /* \\\\\\\\ */\n // } else {\n // bl.write_16(b);\n // }\n // } else {\n // if (b < 16) {\n // switch (b) {\n // case BACKSPACE: {\n // bl.write_32(6422620); /* \\\\b */\n // break;\n // }\n // case TAB: {\n // bl.write_32(7602268); /* \\\\t */\n // break;\n // }\n // case NEW_LINE: {\n // bl.write_32(7209052); /* \\\\n */\n // break;\n // }\n // case FORM_FEED: {\n // bl.write_32(6684764); /* \\\\f */\n // break;\n // }\n // case CARRIAGE_RETURN: {\n // bl.write_32(7471196); /* \\\\r */\n // break;\n // }\n // default: {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0000 to \\u000f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((_intTo16(b) << 16) | 48); /* 0_ */\n // break;\n // }\n // }\n // } else {\n // // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // // \\u0010 to \\u001f handled here\n // bl.write_64(13511005048209500) /* \\\\u00 */\n // bl.write_32((intTo16(b) << 16) | 48); /* 0_ */\n // }\n // }\n }\n if (offset < len) {\n const c = load(changetype(data) + len - 2);\n if (c > 31) {\n if (c === QUOTE) {\n bl.write_32(2228316); /* \\\\\" */\n } else if (c === BACK_SLASH) {\n bl.write_32(6029404); /* \\\\\\\\ */\n } else {\n bl.write_32(2228224 | c); /* \"_ */\n }\n } else {\n if (c < 16) {\n switch (c) {\n case BACKSPACE: {\n bl.write_32(6422620); /* \\\\b */\n bl.write_16(34); /* \" */\n break;\n }\n case TAB: {\n bl.write_32(7602268); /* \\\\t */\n bl.write_16(34); /* \" */\n break;\n }\n case NEW_LINE: {\n bl.write_32(7209052); /* \\\\n */\n bl.write_16(34); /* \" */\n break;\n }\n case FORM_FEED: {\n bl.write_32(6684764); /* \\\\f */\n bl.write_16(34); /* \" */\n break;\n }\n case CARRIAGE_RETURN: {\n bl.write_32(7471196); /* \\\\r */\n bl.write_16(34); /* \" */\n break;\n }\n default: {\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0000 to \\u000f handled here\n bl.write_64(13511005048209500) /* \\\\u00 */\n bl.write_32((_intTo16(c) << 16) | 48); /* 0_ */\n bl.write_16(34); /* \" */\n break;\n }\n }\n } else {\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0010 to \\u001f handled here\n bl.write_64(13511005048209500) /* \\\\u00 */\n bl.write_32((intTo16(c) << 16) | 48); /* 0_ */\n bl.write_16(34); /* \" */\n }\n }\n }\n } else {\n const c = load(changetype(data) + len - 2);\n if (c > 31) {\n if (c === QUOTE) {\n bl.write_32(2228316); /* \\\\\" */\n } else if (c === BACK_SLASH) {\n bl.write_32(6029404); /* \\\\\\\\ */\n } else {\n bl.write_32(2228224 | c); /* \"_ */\n }\n } else {\n if (c < 16) {\n switch (c) {\n case BACKSPACE: {\n bl.write_32(6422620); /* \\\\b */\n bl.write_16(34); /* \" */\n break;\n }\n case TAB: {\n bl.write_32(7602268); /* \\\\t */\n bl.write_16(34); /* \" */\n break;\n }\n case NEW_LINE: {\n bl.write_32(7209052); /* \\\\n */\n bl.write_16(34); /* \" */\n break;\n }\n case FORM_FEED: {\n bl.write_32(6684764); /* \\\\f */\n bl.write_16(34); /* \" */\n break;\n }\n case CARRIAGE_RETURN: {\n bl.write_32(7471196); /* \\\\r */\n bl.write_16(34); /* \" */\n break;\n }\n default: {\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0000 to \\u000f handled here\n bl.write_64(13511005048209500) /* \\\\u00 */\n bl.write_32((_intTo16(c) << 16) | 48); /* 0_ */\n bl.write_16(34); /* \" */\n break;\n }\n }\n } else {\n // all chars 0-31 must be encoded as a four digit unicode escape sequence\n // \\u0010 to \\u001f handled here\n bl.write_64(13511005048209500) /* \\\\u00 */\n bl.write_32((intTo16(c) << 16) | 48); /* 0_ */\n bl.write_16(34); /* \" */\n }\n }\n }\n}","/// \n\nimport { BLOCK_MAXSIZE } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { COMPARATOR, SORT } from \"./util/sort\";\nimport { REVERSE, FILL } from \"./util/bytes\";\nimport { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from \"./util/string\";\nimport { idof, isArray as builtin_isArray } from \"./builtins\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from \"./util/error\";\n\n// @ts-ignore: decorator\n@inline @lazy const MIN_SIZE: usize = 8;\n\n/** Ensures that the given array has _at least_ the specified backing size. */\nfunction ensureCapacity(array: usize, newSize: usize, alignLog2: u32, canGrow: bool = true): void {\n // Depends on the fact that Arrays mimic ArrayBufferView\n let oldCapacity = changetype(array).byteLength;\n if (newSize > oldCapacity >>> alignLog2) {\n if (newSize > BLOCK_MAXSIZE >>> alignLog2) throw new RangeError(E_INVALIDLENGTH);\n let oldData = changetype(changetype(array).buffer);\n // Grows old capacity by factor of two.\n // Make sure we don't reach BLOCK_MAXSIZE for new growed capacity.\n let newCapacity = max(newSize, MIN_SIZE) << alignLog2;\n if (canGrow) newCapacity = max(min(oldCapacity << 1, BLOCK_MAXSIZE), newCapacity);\n let newData = __renew(oldData, newCapacity);\n // __new / __renew already init memory range as zeros in Incremental runtime.\n // So try to avoid this.\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(newData + oldCapacity, 0, newCapacity - oldCapacity);\n }\n if (newData != oldData) { // oldData has been free'd\n store(array, newData, offsetof(\"buffer\"));\n store(array, newData, offsetof(\"dataStart\"));\n __link(array, changetype(newData), false);\n }\n store(array, newCapacity, offsetof(\"byteLength\"));\n }\n}\n\nexport class Array {\n [key: number]: T;\n\n // Mimicking ArrayBufferView isn't strictly necessary here but is done to allow glue code\n // to work with typed and normal arrays interchangeably. Technically, normal arrays do not need\n // `dataStart` (equals `buffer`) and `byteLength` (equals computed `buffer.byteLength`), but the\n // block is 16 bytes anyway so it's fine to have a couple extra fields in there.\n\n private buffer: ArrayBuffer;\n @unsafe readonly dataStart: usize;\n private byteLength: i32; // Uses here as capacity\n\n // Also note that Array with non-nullable T must guard against uninitialized null values\n // whenever an element is accessed. Otherwise, the compiler wouldn't be able to guarantee\n // type-safety anymore. For lack of a better word, such an array is \"holey\".\n\n private length_: i32;\n\n static isArray(value: U): bool {\n return isReference() ? changetype(value) != 0 && builtin_isArray(value) : false;\n }\n\n static create(capacity: i32 = 0): Array {\n WARNING(\"'Array.create' is deprecated. Use 'new Array' instead, making sure initial elements are initialized.\");\n let array = new Array(capacity);\n array.length = 0;\n return array;\n }\n\n constructor(length: i32 = 0) {\n if (length > BLOCK_MAXSIZE >>> alignof()) throw new RangeError(E_INVALIDLENGTH);\n // reserve capacity for at least MIN_SIZE elements\n let bufferSize = max(length, MIN_SIZE) << alignof();\n let buffer = changetype(__new(bufferSize, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, bufferSize);\n }\n this.buffer = buffer; // links\n this.dataStart = changetype(buffer);\n this.byteLength = bufferSize;\n this.length_ = length;\n }\n\n get length(): i32 {\n return this.length_;\n }\n\n set length(newLength: i32) {\n ensureCapacity(changetype(this), newLength, alignof(), false);\n this.length_ = newLength;\n }\n\n every(fn: (value: T, index: i32, array: Array) => bool): bool {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (!fn(load(this.dataStart + (i << alignof())), i, this)) return false;\n }\n return true;\n }\n\n findIndex(fn: (value: T, index: i32, array: Array) => bool): i32 {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n findLastIndex(fn: (value: T, index: i32, array: Array) => bool): i32 {\n for (let i = this.length_ - 1; i >= 0; --i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n @operator(\"[]\") private __get(index: i32): T {\n if (index >= this.length_) throw new RangeError(E_INDEXOUTOFRANGE);\n let value = load(this.dataStart + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @unsafe @operator(\"{}\") private __uget(index: i32): T {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\") private __set(index: i32, value: T): void {\n if (index >= this.length_) {\n if (index < 0) throw new RangeError(E_INDEXOUTOFRANGE);\n ensureCapacity(changetype(this), index + 1, alignof());\n this.length_ = index + 1;\n }\n store(this.dataStart + (index << alignof()), value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n }\n\n at(index: i32): T {\n let len = this.length_;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n let value = load(this.dataStart + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): Array {\n if (isManaged()) {\n FILL(this.dataStart, this.length_, changetype(value), start, end);\n __link(changetype(this), changetype(value), false);\n } else {\n FILL(this.dataStart, this.length_, value, start, end);\n }\n return this;\n }\n\n includes(value: T, fromIndex: i32 = 0): bool {\n if (isFloat()) {\n let len = this.length_;\n if (len == 0 || fromIndex >= len) return false;\n if (fromIndex < 0) fromIndex = max(len + fromIndex, 0);\n let ptr = this.dataStart;\n while (fromIndex < len) {\n let elem = load(ptr + (fromIndex << alignof()));\n // @ts-ignore\n if (elem == value || isNaN(elem) & isNaN(value)) return true;\n ++fromIndex;\n }\n return false;\n } else {\n return this.indexOf(value, fromIndex) >= 0;\n }\n }\n\n indexOf(value: T, fromIndex: i32 = 0): i32 {\n let len = this.length_;\n if (len == 0 || fromIndex >= len) return -1;\n if (fromIndex < 0) fromIndex = max(len + fromIndex, 0);\n let ptr = this.dataStart;\n while (fromIndex < len) {\n if (load(ptr + (fromIndex << alignof())) == value) return fromIndex;\n ++fromIndex;\n }\n return -1;\n }\n\n lastIndexOf(value: T, fromIndex: i32 = this.length_): i32 {\n let len = this.length_;\n if (len == 0) return -1;\n if (fromIndex < 0) fromIndex = len + fromIndex;\n else if (fromIndex >= len) fromIndex = len - 1;\n let ptr = this.dataStart;\n while (fromIndex >= 0) {\n if (load(ptr + (fromIndex << alignof())) == value) return fromIndex;\n --fromIndex;\n }\n return -1;\n }\n\n push(value: T): i32 {\n let oldLen = this.length_;\n let len = oldLen + 1;\n ensureCapacity(changetype(this), len, alignof());\n if (isManaged()) {\n store(this.dataStart + (oldLen << alignof()), changetype(value));\n __link(changetype(this), changetype(value), true);\n } else {\n store(this.dataStart + (oldLen << alignof()), value);\n }\n this.length_ = len;\n return len;\n }\n\n concat(other: Array): Array {\n let thisLen = this.length_;\n let otherLen = other.length_;\n let outLen = thisLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH);\n let out = changetype>(__newArray(outLen, alignof(), idof>()));\n let outStart = out.dataStart;\n let thisSize = thisLen << alignof();\n if (isManaged()) {\n let thisStart = this.dataStart;\n for (let offset: usize = 0; offset < thisSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += thisSize;\n let otherStart = other.dataStart;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, this.dataStart, thisSize);\n memory.copy(outStart + thisSize, other.dataStart, otherLen << alignof());\n }\n return out;\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Array {\n let ptr = this.dataStart;\n let len = this.length_;\n\n end = min(end, len);\n\n let to = target < 0 ? max(len + target, 0) : min(target, len);\n let from = start < 0 ? max(len + start, 0) : min(start, len);\n let last = end < 0 ? max(len + end, 0) : min(end, len);\n let count = min(last - from, len - to);\n\n memory.copy( // is memmove\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return this;\n }\n\n pop(): T {\n let len = this.length_;\n if (len < 1) throw new RangeError(E_EMPTYARRAY);\n let val = load(this.dataStart + ((--len) << alignof()));\n this.length_ = len;\n return val;\n }\n\n forEach(fn: (value: T, index: i32, array: Array) => void): void {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n fn(load(this.dataStart + (i << alignof())), i, this);\n }\n }\n\n map(fn: (value: T, index: i32, array: Array) => U): Array {\n let len = this.length_;\n let out = changetype>(__newArray(len, alignof(), idof>()));\n let outStart = out.dataStart;\n for (let i = 0; i < min(len, this.length_); ++i) {\n let result = fn(load(this.dataStart + (i << alignof())), i, this);\n store(outStart + (i << alignof()), result);\n if (isManaged()) {\n __link(changetype(out), changetype(result), true);\n }\n }\n return out;\n }\n\n filter(fn: (value: T, index: i32, array: Array) => bool): Array {\n let result = changetype>(__newArray(0, alignof(), idof>()));\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n let value = load(this.dataStart + (i << alignof()));\n if (fn(value, i, this)) result.push(value);\n }\n return result;\n }\n\n reduce(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U,\n initialValue: U\n ): U {\n let acc = initialValue;\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n acc = fn(acc, load(this.dataStart + (i << alignof())), i, this);\n }\n return acc;\n }\n\n reduceRight(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U,\n initialValue: U\n ): U {\n let acc = initialValue;\n for (let i = this.length_ - 1; i >= 0; --i) {\n acc = fn(acc, load(this.dataStart + (i << alignof())), i, this);\n }\n return acc;\n }\n\n shift(): T {\n let len = this.length_;\n if (len < 1) throw new RangeError(E_EMPTYARRAY);\n let base = this.dataStart;\n let element = load(base);\n let lastIndex = len - 1;\n memory.copy(\n base,\n base + sizeof(),\n lastIndex << alignof()\n );\n if (isReference()) {\n store(base + (lastIndex << alignof()), 0);\n } else {\n // @ts-ignore\n store(base + (lastIndex << alignof()), 0);\n }\n this.length_ = lastIndex;\n return element;\n }\n\n some(fn: (value: T, index: i32, array: Array) => bool): bool {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return true;\n }\n return false;\n }\n\n unshift(value: T): i32 {\n let len = this.length_ + 1;\n ensureCapacity(changetype(this), len, alignof());\n let ptr = this.dataStart;\n memory.copy(\n ptr + sizeof(),\n ptr,\n (len - 1) << alignof()\n );\n store(ptr, value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n this.length_ = len;\n return len;\n }\n\n slice(start: i32 = 0, end: i32 = i32.MAX_VALUE): Array {\n let len = this.length_;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end , len);\n len = max(end - start, 0);\n let slice = changetype>(__newArray(len, alignof(), idof>()));\n let sliceBase = slice.dataStart;\n let thisBase = this.dataStart + (start << alignof());\n if (isManaged()) {\n let off = 0;\n let end = len << alignof();\n while (off < end) {\n let ref = load(thisBase + off);\n store(sliceBase + off, ref);\n __link(changetype(slice), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(sliceBase, thisBase, len << alignof());\n }\n return slice;\n }\n\n splice(start: i32, deleteCount: i32 = i32.MAX_VALUE): Array {\n let len = this.length_;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n deleteCount = max(min(deleteCount, len - start), 0);\n let result = changetype>(__newArray(deleteCount, alignof(), idof>()));\n let resultStart = result.dataStart;\n let thisStart = this.dataStart;\n let thisBase = thisStart + (start << alignof());\n memory.copy(\n resultStart,\n thisBase,\n deleteCount << alignof()\n );\n let offset = start + deleteCount;\n if (len != offset) {\n memory.copy(\n thisBase,\n thisStart + (offset << alignof()),\n (len - offset) << alignof()\n );\n }\n this.length_ = len - deleteCount;\n return result;\n }\n\n reverse(): Array {\n REVERSE(this.dataStart, this.length_);\n return this;\n }\n\n sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): Array {\n SORT(this.dataStart, this.length_, comparator);\n return this;\n }\n\n join(separator: string = \",\"): string {\n let ptr = this.dataStart;\n let len = this.length_;\n if (isBoolean()) return joinBooleanArray(ptr, len, separator);\n if (isInteger()) return joinIntegerArray(ptr, len, separator);\n if (isFloat()) return joinFloatArray(ptr, len, separator);\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (isString()) return joinStringArray(ptr, len, separator);\n }\n // For rest objects and arrays use general join routine\n if (isReference()) return joinReferenceArray(ptr, len, separator);\n ERROR(\"unspported element type\");\n return unreachable();\n }\n\n flat(): T {\n if (!isArray()) {\n ERROR(\"Cannot call flat() on Array where T is not an Array.\");\n }\n // Get the length and data start values\n let ptr = this.dataStart;\n let len = this.length_;\n\n // calculate the end size with an initial pass\n let size = 0;\n for (let i = 0; i < len; ++i) {\n let child = load(ptr + (i << alignof()));\n size += child == 0 ? 0 : load(child, offsetof(\"length_\"));\n }\n\n // calculate the byteLength of the resulting backing ArrayBuffer\n const align = alignof>();\n let byteLength = size << align;\n let outBuffer = changetype(__new(byteLength, idof()));\n\n // create the return value and initialize it\n let outArray = changetype(__new(offsetof(), idof()));\n store(changetype(outArray), size, offsetof(\"length_\"));\n\n // byteLength, dataStart, and buffer are all readonly\n store(changetype(outArray), byteLength, offsetof(\"byteLength\"));\n store(changetype(outArray), changetype(outBuffer), offsetof(\"dataStart\"));\n store(changetype(outArray), changetype(outBuffer), offsetof(\"buffer\"));\n __link(changetype(outArray), changetype(outBuffer), false);\n\n // set the elements\n let resultOffset: usize = 0;\n for (let i = 0; i < len; ++i) { // for each child\n let child = load(ptr + (i << alignof()));\n\n // ignore null arrays\n if (!child) continue;\n\n // copy the underlying buffer data to the result buffer\n let childDataLength = load(child, offsetof(\"length_\")) << align;\n memory.copy(\n changetype(outBuffer) + resultOffset,\n load(child, offsetof(\"dataStart\")),\n childDataLength\n );\n\n // advance the result length\n resultOffset += childDataLength;\n }\n\n // if the `valueof` type is managed, we must link each reference\n if (isManaged>()) {\n for (let i = 0; i < size; ++i) {\n let ref = load(changetype(outBuffer) + (i << usize(alignof>())));\n __link(changetype(outBuffer), ref, true);\n }\n }\n\n return outArray;\n }\n\n toString(): string {\n return this.join();\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n if (isManaged()) {\n let cur = this.dataStart;\n let end = cur + (this.length_ << alignof());\n while (cur < end) {\n let val = load(cur);\n if (val) __visit(val, cookie);\n cur += sizeof();\n }\n }\n __visit(changetype(this.buffer), cookie);\n }\n}\n","import {\r\n args_get,\r\n args_sizes_get,\r\n environ_get,\r\n environ_sizes_get,\r\n proc_exit,\r\n fd_write,\r\n fd_close,\r\n fd_read,\r\n clock_time_get,\r\n clockid,\r\n errnoToString,\r\n fd\r\n} from \"./bindings/wasi_snapshot_preview1\";\r\n\r\nimport {\r\n tempbuf\r\n} from \"./wasi_internal\";\r\n\r\nimport {\r\n E_INDEXOUTOFRANGE\r\n} from \"util/error\";\r\n\r\nexport namespace wasi_process {\r\n\r\n // @ts-ignore: decorator\r\n @lazy export const arch = sizeof() == 4 ? \"wasm32\" : \"wasm64\";\r\n // @ts-ignore: decorator\r\n @lazy export const platform = \"wasm\";\r\n // @ts-ignore: decorator\r\n @lazy export const argv = lazyArgv();\r\n // @ts-ignore: decorator\r\n @lazy export const env = lazyEnv();\r\n // @ts-ignore: decorator\r\n @lazy export var exitCode = 0;\r\n\r\n export function exit(code: i32 = exitCode): void {\r\n proc_exit(code);\r\n }\r\n\r\n // @ts-ignore: decorator\r\n @lazy export const stdin = changetype(0);\r\n // @ts-ignore: decorator\r\n @lazy export const stdout = changetype(1);\r\n // @ts-ignore: decorator\r\n @lazy export const stderr = changetype(2);\r\n\r\n export function time(): i64 {\r\n let err = clock_time_get(clockid.REALTIME, 1000000, tempbuf);\r\n if (err) throw new Error(errnoToString(err));\r\n return load(tempbuf) / 1000000;\r\n }\r\n\r\n export function hrtime(): u64 {\r\n let err = clock_time_get(clockid.MONOTONIC, 0, tempbuf);\r\n if (err) throw new Error(errnoToString(err));\r\n return load(tempbuf);\r\n }\r\n}\r\n\r\nfunction lazyArgv(): string[] {\r\n let err = args_sizes_get(tempbuf, tempbuf + sizeof());\r\n if (err) throw new Error(errnoToString(err));\r\n let count = load(tempbuf);\r\n let ptrsSize = count * sizeof();\r\n let dataSize = load(tempbuf, sizeof());\r\n let bufSize = ptrsSize + dataSize;\r\n let buf = __alloc(bufSize);\r\n err = args_get(buf, buf + ptrsSize);\r\n if (err) throw new Error(errnoToString(err));\r\n let count32 = count;\r\n let argv = new Array(count32);\r\n for (let i = 0; i < count32; ++i) {\r\n let ptr = load(buf + i * sizeof());\r\n let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true);\r\n argv[i] = str;\r\n }\r\n __free(buf);\r\n return argv;\r\n}\r\n\r\nfunction lazyEnv(): Map {\r\n let err = environ_sizes_get(tempbuf, tempbuf + 4);\r\n if (err) throw new Error(errnoToString(err));\r\n let count = load(tempbuf);\r\n let ptrsSize = count * sizeof();\r\n let dataSize = load(tempbuf, sizeof());\r\n let bufSize = ptrsSize + dataSize;\r\n let buf = __alloc(bufSize);\r\n err = environ_get(buf, buf + ptrsSize);\r\n if (err) throw new Error(errnoToString(err));\r\n let env = new Map();\r\n for (let i: usize = 0; i < count; ++i) {\r\n let ptr = load(buf + i * sizeof());\r\n let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true);\r\n let pos = str.indexOf(\"=\");\r\n if (~pos) {\r\n env.set(str.substring(0, pos), str.substring(pos + 1));\r\n // __dispose(changetype(str));\r\n } else {\r\n env.set(str, \"\");\r\n }\r\n }\r\n __free(buf);\r\n return env;\r\n}\r\n\r\n@unmanaged\r\nabstract class Stream {\r\n close(): void {\r\n var err = fd_close(changetype(this));\r\n if (err) throw new Error(errnoToString(err));\r\n }\r\n}\r\n\r\n@unmanaged\r\nabstract class WritableStream extends Stream {\r\n write(data: T): void {\r\n if (isString()) {\r\n writeString(changetype(this), changetype(data));\r\n } else if (data instanceof ArrayBuffer) {\r\n writeBuffer(changetype(this), data);\r\n } else {\r\n ERROR(\"String or ArrayBuffer expected\");\r\n }\r\n }\r\n}\r\n\r\n@unmanaged\r\nabstract class ReadableStream extends Stream {\r\n read(buffer: ArrayBuffer, offset: isize = 0): i32 {\r\n var end = buffer.byteLength;\r\n if (offset < 0 || offset > end) {\r\n throw new Error(E_INDEXOUTOFRANGE);\r\n }\r\n store(tempbuf, changetype(buffer) + offset);\r\n store(tempbuf, end - offset, sizeof());\r\n var err = fd_read(changetype(this), tempbuf, 1, tempbuf + 2 * sizeof());\r\n if (err) throw new Error(errnoToString(err));\r\n return load(tempbuf, 2 * sizeof());\r\n }\r\n}\r\n\r\nfunction writeBuffer(fd: fd, data: ArrayBuffer): void {\r\n store(tempbuf, changetype(data));\r\n store(tempbuf, data.byteLength, sizeof());\r\n var err = fd_write(fd, tempbuf, 1, tempbuf + 2 * sizeof());\r\n if (err) throw new Error(errnoToString(err));\r\n}\r\n\r\nfunction writeString(fd: fd, data: string): void {\r\n var len = data.length;\r\n var\r\n char2: u32 = 0,\r\n char3: u32 = 0,\r\n char4: u32 = 0;\r\n switch (len) {\r\n case 4: { // \"null\"\r\n char4 = load(changetype(data), 6);\r\n if (char4 >= 0x80) break;\r\n }\r\n case 3: { // \"ms\\n\"\r\n char3 = load(changetype(data), 4);\r\n if (char3 >= 0x80) break;\r\n }\r\n case 2: { // \"\\r\\n\"\r\n char2 = load(changetype(data), 2);\r\n if (char2 >= 0x80) break;\r\n }\r\n case 1: { // \"\\n\"\r\n let char1 = load(changetype(data));\r\n if (char1 >= 0x80) break;\r\n store(tempbuf, tempbuf + 2 * sizeof());\r\n store(tempbuf, len, sizeof());\r\n store(tempbuf, char1 | char2 << 8 | char3 << 16 | char4 << 24, 2 * sizeof());\r\n let err = fd_write(fd, tempbuf, 1, tempbuf + 3 * sizeof());\r\n if (err) throw new Error(errnoToString(err));\r\n }\r\n case 0: return;\r\n }\r\n var utf8len = String.UTF8.byteLength(data);\r\n var utf8buf = __alloc(utf8len);\r\n assert(String.UTF8.encodeUnsafe(changetype(data), len, utf8buf) == utf8len);\r\n store(tempbuf, utf8buf);\r\n store(tempbuf, utf8len, sizeof());\r\n var err = fd_write(fd, tempbuf, 1, tempbuf + 2 * sizeof());\r\n __free(utf8buf);\r\n if (err) throw new Error(errnoToString(err));\r\n}\r\n","import {\r\n wasi_process\r\n} from \"./wasi_process\";\r\n\r\n// @ts-ignore: decorator\r\n@lazy var timers = new Map();\r\n\r\nexport namespace wasi_console {\r\n\r\n export function assert(condition: T, message: string = \"\"): void {\r\n if (!condition) {\r\n let stderr = wasi_process.stderr;\r\n stderr.write(\"Assertion failed: \");\r\n stderr.write(message);\r\n stderr.write(\"\\n\");\r\n }\r\n }\r\n\r\n export function log(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function debug(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(\"Debug: \");\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function info(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(\"Info: \");\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function warn(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(\"Warning: \");\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function error(message: string = \"\"): void {\r\n let stdout = wasi_process.stdout;\r\n stdout.write(\"Error: \");\r\n stdout.write(message);\r\n stdout.write(\"\\n\");\r\n }\r\n\r\n export function time(label: string = \"default\"): void {\r\n let stdout = wasi_process.stdout;\r\n if (timers.has(label)) {\r\n stdout.write(\"Warning: Label '\");\r\n stdout.write(label);\r\n stdout.write(\"' already exists for console.time()\\n\");\r\n return;\r\n }\r\n timers.set(label, wasi_process.hrtime());\r\n }\r\n\r\n export function timeLog(label: string = \"default\"): void {\r\n let stdout = wasi_process.stdout;\r\n if (!timers.has(label)) {\r\n stdout.write(\"Warning: No such label '\");\r\n stdout.write(label);\r\n stdout.write(\"' for console.timeLog()\\n\");\r\n return;\r\n }\r\n timeLogImpl(label);\r\n }\r\n\r\n export function timeEnd(label: string = \"default\"): void {\r\n let stdout = wasi_process.stdout;\r\n if (!timers.has(label)) {\r\n stdout.write(\"Warning: No such label '\");\r\n stdout.write(label);\r\n stdout.write(\"' for console.timeEnd()\\n\");\r\n return;\r\n }\r\n timeLogImpl(label);\r\n timers.delete(label);\r\n }\r\n}\r\n\r\nfunction timeLogImpl(label: string): void {\r\n var start = changetype(timers.get(label));\r\n var end = wasi_process.hrtime();\r\n var nanos = end - start;\r\n var millis = nanos / 1000000;\r\n var millisStr = millis.toString();\r\n var stdout = wasi_process.stdout;\r\n stdout.write(label);\r\n stdout.write(\": \");\r\n stdout.write(millisStr);\r\n stdout.write(\"ms\\n\");\r\n}\r\n","import { isSpace } from \"util/string\";\nimport { BACK_SLASH, QUOTE } from \"./chars\";\nimport { Sink } from \"./sink\";\n\n// @ts-ignore: Decorator\nexport function isMap(): bool {\n let type = changetype(0);\n return type instanceof Map;\n}\n\n// @ts-ignore: Decorator\nexport function unsafeCharCodeAt(data: string, pos: i32): i32 {\n return load(changetype(data) + ((pos) << 1));\n}\n\n// @ts-ignore: Decorator\nexport function removeWhitespace(data: string): string {\n const result = new Sink();\n let instr = false;\n for (let i = 0; i < data.length; i++) {\n const char = unsafeCharCodeAt(data, i);\n if (instr === false && char === QUOTE) instr = true;\n else if (\n instr === true && char === QUOTE\n && unsafeCharCodeAt(data, i - 1) !== BACK_SLASH\n ) instr = false;\n\n if (instr === false) {\n if (!isSpace(char)) result.write(data.charAt(i));\n } else {\n result.write(data.charAt(i));\n }\n }\n return result.toString();\n}\n\n// @ts-ignore: Decorator\nexport function escapeChar(char: string): string {\n switch (unsafeCharCodeAt(char, 0)) {\n case 0x22:\n return '\\\\\"';\n case 0x5c:\n return \"\\\\\\\\\";\n case 0x08:\n return \"\\\\b\";\n case 0x0a:\n return \"\\\\n\";\n case 0x0d:\n return \"\\\\r\";\n case 0x09:\n return \"\\\\t\";\n case 0x0c:\n return \"\\\\f\";\n case 0x0b:\n return \"\\\\u000b\";\n default:\n return char;\n }\n}\n\n/**\n * A terrible function which finds the depth of a certain array.\n * Suffers no overhead besides function calling and a if/else.\n * @returns depth of array\n */\n\n// @ts-ignore: Decorator\nexport function getArrayDepth(depth: i32 = 1): i32 {\n if (!isArray()) {\n return 0;\n } else if (isArray>()) {\n depth++;\n return getArrayDepth>(depth);\n } else {\n return depth;\n }\n}\n\n/** Scientific Notation Integer Parsing - SNIP\n * This is absolutely the fastest algorithm I could think of while adding full support for Scientific Notation\n * Loads 32 bits and retrieves the high/low bits.\n * The reason why we only load 4 bytes at a time is that numbers in the 32-bit range are 7 chars long at most.\n * Using SIMD or 64 bit loads would only work well when parsing large 128+ numbers.\n * \n * Here are some benchmarks\n * Parsing: \"12345\" \n * Results are spread over 5000ms\n * \n * SNIP: 270M iterations\n * ATOI: 285M iterations\n * ParseInt: 176M iterations \n * \n * @param str - Any number. Can include scientific notation.\n*/\n// @ts-ignore: Decorator\nexport function snip_fast(str: string, len: u32 = 0, offset: u32 = 0): T {\n if (isSigned()) {\n const firstChar: u32 = load(changetype(str));\n if (firstChar === 48) return 0 as T;\n const isNegative = firstChar === 45; // Check if the number is negative\n let val: T = 0 as T;\n if (len == 0) len = u32(str.length << 1);\n if (isNegative) {\n offset += 2;\n if (len >= 4) {\n // 32-bit route\n for (; offset < (len - 3); offset += 4) {\n const ch = load(changetype(str) + offset);\n const low = ch & 0xFFFF;\n const high = ch >> 16;\n // 9 is 57. The highest group of two numbers is 114, so if a e or an E is included, this will fire.\n if (low > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 2) == 45) {\n return -(val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return -(val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else if (high > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 4) == 45) {\n return -(val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return -(val * (10 ** (__atoi_fast(str, offset + 4, offset + 6) + 1))) as T;\n }\n } else {\n val = (val * 100 + ((low - 48) * 10) + (high - 48)) as T;\n }\n }\n }\n // Finish up the remainder with 16 bits.\n for (; offset < len; offset += 2) {\n const ch = load(changetype(str) + offset);\n // 9 is 57. E and e are larger. Assumes valid JSON.\n if (ch > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 2) == 45) {\n return -(val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return -(val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else {\n val = (val * 10) + (ch - 48) as T;\n }\n }\n return -val as T;\n } else {\n if (len >= 4) {\n // Duplet 16 bit lane load\n for (; offset < (len - 3); offset += 4) {\n const ch = load(changetype(str) + offset);\n const low = ch & 0xFFFF;\n const high = ch >> 16;\n // 9 is 57. The highest group of two numbers is 114, so if a e or an E is included, this will fire.\n if (low > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 2) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else if (high > 57) {\n if (load(changetype(str) + offset + 4) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 4, offset + 6) + 1))) as T;\n }\n } else {\n // Optimized with multiplications and shifts.\n val = (val * 100 + ((low - 48) * 10) + (high - 48)) as T;\n }\n }\n }\n // Cover the remaining numbers with 16 bit loads.\n for (; offset < len; offset += 2) {\n const ch = load(changetype(str) + offset);\n // 0's char is 48 and 9 is 57. Anything above this range would signify an exponent (e or E).\n // e is 101 and E is 69.\n if (ch > 57) {\n if (load(changetype(str) + offset + 2) == 45) {\n val = (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n val = (val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n return val as T;\n } else {\n val = (val * 10) + (ch - 48) as T;\n }\n }\n return val as T;\n }\n } else {\n const firstChar: u32 = load(changetype(str));\n if (firstChar === 48) return 0 as T;\n let val: T = 0 as T;\n if (len == 0) len = u32(str.length << 1);\n if (len >= 4) {\n // Duplet 16 bit lane load\n for (; offset < (len - 3); offset += 4) {\n const ch = load(changetype(str) + offset);\n const low = ch & 0xFFFF;\n const high = ch >> 16;\n // 9 is 57. The highest group of two numbers is 114, so if a e or an E is included, this will fire.\n if (low > 57) {\n // The first char (f) is E or e\n // We push the offset up by two and apply the notation.\n if (load(changetype(str) + offset + 2) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else if (high > 57) {\n if (load(changetype(str) + offset + 4) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 4, offset + 6) + 1))) as T;\n }\n } else {\n // Optimized with multiplications and shifts.\n val = (val * 100 + ((low - 48) * 10) + (high - 48)) as T;\n }\n }\n }\n // Cover the remaining numbers with 16 bit loads.\n for (; offset < len; offset += 2) {\n const ch = load(changetype(str) + offset);\n // 0's char is 48 and 9 is 57. Anything above this range would signify an exponent (e or E).\n // e is 101 and E is 69.\n if (ch > 57) {\n if (load(changetype(str) + offset + 2) == 45) {\n return (val / (10 ** (__atoi_fast(str, offset + 6, offset + 8) - 1))) as T;\n } else {\n // Inlined this operation instead of using a loop\n return (val * (10 ** (__atoi_fast(str, offset + 2, offset + 4) + 1))) as T;\n }\n } else {\n val = (val * 10) + (ch - 48) as T;\n }\n }\n return val as T;\n }\n}\n\n/**\n * Implementation of ATOI. Can be much much faster with SIMD.\n */\n\n// @ts-ignore\nexport function __atoi_fast(str: string, start: u32 = 0, end: u32 = 0): T {\n // @ts-ignore\n let val: T = 0;\n if (!end) end = start + u32(str.length << 1);\n if (isSigned()) {\n // Negative path\n if (load(changetype(str) + start) === 45) {\n start += 2;\n for (; start < end; start += 2) {\n val = (val * 10) + (load(changetype(str) + start) - 48) as T;\n }\n return -val as T;\n } else {\n for (; start < end; start += 2) {\n val = ((val * 10) + (load(changetype(str) + start) - 48)) as T;\n }\n return val as T;\n }\n } else {\n for (; start < end; start += 2) {\n val = ((val * 10) + (load(changetype(str) + start) - 48)) as T;\n }\n return val as T;\n }\n}\n\n/**\n * Parses an integer using __atoi_fast and applies the appended exponential number to it as scientific notation.\n * Benchmark: Hovers around 30m ops/s\n * Only safe if the string is valid.\n * @param str integer to parse. example: 123e1, 123e-1, 123E100\n * @returns\n */\n\n// @ts-ignore\nexport function parseSciInteger(str: string): T {\n // @ts-ignore\n let val: T = 0;\n let offset = 0;\n let firstChar = load(changetype(str) + offset);\n if (firstChar === 45) {\n offset = 2;\n }\n for (; offset < str.length << 1; offset += 2) {\n const char = load(changetype(str) + offset);\n if (char === 101 || char === 69) {\n const char = load(changetype(str) + (offset += 2));\n if (char === 45) {\n // @ts-ignore\n val /= sciNote(__atoi_fast(str, (offset += 2)));\n // @ts-ignore\n return val;\n } else {\n // @ts-ignore\n val *= sciNote(__atoi_fast(str, offset));\n // @ts-ignore\n return val;\n }\n }\n // @ts-ignore\n val = (val << 1) + (val << 3) + (char - 48);\n // We use load because in this case, there is no need to have bounds-checking\n }\n if (firstChar === 45) {\n val = -val as T;\n }\n return val;\n}\n\n// @ts-ignore\nfunction sciNote(num: T): T {\n let res = 1;\n // @ts-ignore\n if (num > 0) {\n for (let i: T = 0; i < num; i++) {\n res *= 10;\n }\n } else {\n for (let i: T = 0; i < num; i++) {\n res /= 10;\n }\n }\n // @ts-ignore\n return res;\n}\n\n// @ts-ignore\nfunction equalsSlice(p1_data: string, p1_start: i32, p1_end: i32, p2_data: string, p2_start: i32, p2_end: i32): boolean {\n const p1_len = p1_end - p1_start;\n const p2_len = p2_end - p2_start;\n if (p1_len != p2_len) return false;\n if (p1_len == 2) {\n return load(changetype(p1_data) + p1_start) == load(changetype(p2_data) + p2_start)\n }\n return memory.compare(changetype(p1_data) + p1_start, changetype(p2_data) + p2_start, p1_len) === 0;\n}\n\n// @ts-ignore\nexport function containsCodePoint(str: string, code: u32, start: i32, end: i32): bool {\n for (let i = start; i <= end; i++) {\n if (unsafeCharCodeAt(str, i) == code) return true;\n }\n return false;\n}\n\nexport function _intTo16(int: i32): i32 {\n if (int < 10) {\n // 0-10\n return 48 + int;\n } else {\n // a-f\n return 87 + int;\n }\n}\n\n@inline export function intTo16(int: i32): i32 {\n const high = int >> 4;\n const low = int & 0x0F;\n if (low < 10) {\n if (high < 10) {\n return ((48 + low) << 16) | 48 + high;\n } else {\n return ((48 + low) << 16) | 87 + high;\n }\n } else {\n if (high < 10) {\n return ((87 + low) << 16) | 48 + high;\n } else {\n return ((87 + low) << 16) | 87 + high;\n }\n }\n}"]} \ No newline at end of file diff --git a/build/test.wat b/build/test.wat index 7e3c13a..9a11fac 100644 --- a/build/test.wat +++ b/build/test.wat @@ -1,29 +1,38 @@ (module - (type $0 (func (param i32 i32))) - (type $1 (func (param i32) (result i32))) + (type $0 (func (param i32) (result i32))) + (type $1 (func (param i32 i32))) (type $2 (func (param i32 i32) (result i32))) (type $3 (func)) (type $4 (func (param i32))) - (type $5 (func (param i32 i32 i32))) - (type $6 (func (param i32 i32 i32 i32) (result i32))) + (type $5 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $6 (func (param i32 i32 i32))) (type $7 (func (param i32 i32 i32) (result i32))) - (type $8 (func (param i64 i32) (result i32))) - (type $9 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $8 (func (param i32 i32 i32 i32))) + (type $9 (func (param i32 i32 i32 i32) (result i32))) (type $10 (func (param i32 i32 i64) (result i32))) - (type $11 (func (param i32 i64 i32))) - (type $12 (func (param i64) (result i32))) - (type $13 (func (param i32 i32 i32 i32))) - (type $14 (func (param i32 i32) (result i64))) - (type $15 (func (result i32))) - (type $16 (func (param i32 i64))) - (type $17 (func (param i32) (result i64))) - (type $18 (func (param i32 i64 i32 i32))) - (type $19 (func (param i32 i32 i64))) + (type $11 (func (result i32))) (import "wasi_snapshot_preview1" "fd_write" (func $~lib/bindings/wasi_snapshot_preview1/fd_write (param i32 i32 i32 i32) (result i32))) (import "wasi_snapshot_preview1" "proc_exit" (func $~lib/bindings/wasi_snapshot_preview1/proc_exit (param i32))) - (global $~lib/json-as/assembly/sink/MIN_BUFFER_LEN i32 (i32.const 32)) - (global $~lib/json-as/assembly/sink/MIN_BUFFER_SIZE i32 (i32.const 64)) - (global $~lib/json-as/assembly/sink/NEW_LINE_CHAR i32 (i32.const 10)) + (global $assembly/bl/STORE i32 (i32.const 64)) + (global $assembly/bl/STORE_LEN (mut i32) (i32.const 0)) + (global $assembly/bl/CACHE i32 (i32.const 96)) + (global $assembly/bl/POINTER (mut i32) (i32.const 0)) + (global $assembly/chars/TRUE_PTR i32 (i32.const 65664)) + (global $assembly/chars/FALSE_PTR i32 (i32.const 65696)) + (global $assembly/chars/NULL_PTR i32 (i32.const 65728)) + (global $assembly/chars/EMPTY_BRACES_PTR i32 (i32.const 66048)) + (global $assembly/chars/EMPTY_BRACKET_PTR i32 (i32.const 65824)) + (global $assembly/chars/EMPTY_QUOTE_PTR i32 (i32.const 66016)) + (global $assembly/chars/BACKSPACE_PTR i32 (i32.const 66080)) + (global $assembly/chars/TAB_PTR i32 (i32.const 66112)) + (global $assembly/chars/NEW_LINE_PTR i32 (i32.const 66144)) + (global $assembly/chars/FORM_FEED_PTR i32 (i32.const 66176)) + (global $assembly/chars/CARRIAGE_RETURN_PTR i32 (i32.const 66208)) + (global $assembly/chars/FOUR_DIGIT_ESC_PTR i32 (i32.const 66240)) + (global $assembly/chars/TWO_DIGIT_ESC_PTR i32 (i32.const 66272)) + (global $assembly/sink/MIN_BUFFER_LEN i32 (i32.const 32)) + (global $assembly/sink/MIN_BUFFER_SIZE i32 (i32.const 64)) + (global $assembly/sink/NEW_LINE_CHAR i32 (i32.const 10)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $~lib/number/I32.MAX_VALUE i32 (i32.const 2147483647)) (global $~lib/native/ASC_NO_ASSERT i32 (i32.const 0)) @@ -47,202 +56,169 @@ (global $~lib/@hypercubed/as-mpz/assembly/index/MpZ.ONE (mut i32) (i32.const 0)) (global $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TWO (mut i32) (i32.const 0)) (global $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TEN (mut i32) (i32.const 0)) - (global $~lib/json-as/assembly/index/STORAGE i32 (i32.const 8)) - (global $~lib/json-as/assembly/index/JSON.Types.U8 i32 (i32.const 0)) - (global $~lib/json-as/assembly/index/JSON.Types.U16 i32 (i32.const 1)) - (global $~lib/json-as/assembly/index/JSON.Types.U32 i32 (i32.const 2)) - (global $~lib/json-as/assembly/index/JSON.Types.U64 i32 (i32.const 3)) - (global $~lib/json-as/assembly/index/JSON.Types.F32 i32 (i32.const 4)) - (global $~lib/json-as/assembly/index/JSON.Types.F64 i32 (i32.const 5)) - (global $~lib/json-as/assembly/index/JSON.Types.Bool i32 (i32.const 6)) - (global $~lib/json-as/assembly/index/JSON.Types.String i32 (i32.const 7)) - (global $~lib/json-as/assembly/index/JSON.Types.ManagedString i32 (i32.const 8)) - (global $~lib/json-as/assembly/index/JSON.Types.Struct i32 (i32.const 9)) - (global $~lib/json-as/assembly/index/JSON.Types.ManagedStruct i32 (i32.const 10)) - (global $~lib/json-as/assembly/index/JSON.Types.Array i32 (i32.const 11)) - (global $~lib/json-as/assembly/index/JSON.Types.ManagedArray i32 (i32.const 12)) - (global $~lib/table-as/assembly/index/padding i32 (i32.const 1280)) - (global $~lib/table-as/assembly/index/fmt (mut i32) (i32.const 0)) + (global $assembly/index/JSON.Types.U8 i32 (i32.const 0)) + (global $assembly/index/JSON.Types.U16 i32 (i32.const 1)) + (global $assembly/index/JSON.Types.U32 i32 (i32.const 2)) + (global $assembly/index/JSON.Types.U64 i32 (i32.const 3)) + (global $assembly/index/JSON.Types.F32 i32 (i32.const 4)) + (global $assembly/index/JSON.Types.F64 i32 (i32.const 5)) + (global $assembly/index/JSON.Types.Bool i32 (i32.const 6)) + (global $assembly/index/JSON.Types.String i32 (i32.const 7)) + (global $assembly/index/JSON.Types.ManagedString i32 (i32.const 8)) + (global $assembly/index/JSON.Types.Struct i32 (i32.const 9)) + (global $assembly/index/JSON.Types.ManagedStruct i32 (i32.const 10)) + (global $assembly/index/JSON.Types.Array i32 (i32.const 11)) + (global $assembly/index/JSON.Types.ManagedArray i32 (i32.const 12)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) - (global $~lib/as-console/assembly/index/counts (mut i32) (i32.const 0)) - (global $~lib/as-console/assembly/index/timers (mut i32) (i32.const 0)) - (global $~lib/as-console/assembly/index/indent (mut i32) (i32.const 1776)) - (global $assembly/test/y (mut i32) (i32.const 0)) - (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/wasi_process/wasi_process.stdout i32 (i32.const 1)) - (global $~lib/wasi_internal/tempbuf i32 (i32.const 4368)) - (global $~lib/rt/__rtti_base i32 (i32.const 7984)) - (global $~lib/memory/__data_end i32 (i32.const 8064)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 40832)) - (global $~lib/memory/__heap_base i32 (i32.const 40832)) + (global $~lib/wasi_internal/tempbuf i32 (i32.const 67360)) + (global $~lib/rt/__rtti_base i32 (i32.const 70496)) + (global $~lib/memory/__data_end i32 (i32.const 70528)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 103296)) + (global $~lib/memory/__heap_base i32 (i32.const 103296)) (global $~started (mut i32) (i32.const 0)) - (memory $0 1) - (data $0 (i32.const 12) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00t\00r\00u\00e\00\00\00\00\00") - (data $1 (i32.const 44) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00f\00a\00l\00s\00e\00\00\00") - (data $2 (i32.const 76) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00n\00u\00l\00l\00\00\00\00\00") - (data $3 (i32.const 108) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00{\00\00\00\00\00\00\00\00\00\00\00") - (data $4 (i32.const 140) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00[\00\00\00\00\00\00\00\00\00\00\00") - (data $5 (i32.const 172) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00[\00]\00\00\00\00\00\00\00\00\00") - (data $6 (i32.const 204) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00:\00\00\00\00\00\00\00\00\00\00\00") - (data $7 (i32.const 236) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") - (data $8 (i32.const 268) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00}\00\00\00\00\00\00\00\00\00\00\00") - (data $9 (i32.const 300) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00]\00\00\00\00\00\00\00\00\00\00\00") - (data $10 (i32.const 332) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") - (data $11 (i32.const 364) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\"\00\"\00\00\00\00\00\00\00\00\00") - (data $12 (i32.const 396) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00U\00n\00p\00a\00i\00r\00e\00d\00 \00s\00u\00r\00r\00o\00g\00a\00t\00e\00\00\00\00\00\00\00\00\00") - (data $13 (i32.const 460) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data $14 (i32.const 508) "L\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00:\00\00\00M\00p\00Z\00 \00m\00u\00s\00t\00 \00h\00a\00v\00e\00 \00a\00t\00 \00l\00e\00a\00s\00t\00 \001\00 \00l\00i\00m\00b\00\00\00") - (data $15 (i32.const 588) "l\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00R\00\00\00~\00l\00i\00b\00/\00@\00h\00y\00p\00e\00r\00c\00u\00b\00e\00d\00/\00a\00s\00-\00m\00p\00z\00/\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00") - (data $16 (i32.const 700) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $17 (i32.const 732) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data $18 (i32.const 796) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $19 (i32.const 864) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $20 (i32.const 896) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $21 (i32.const 924) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00") - (data $22 (i32.const 988) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") - (data $23 (i32.const 1040) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $24 (i32.const 1068) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $25 (i32.const 1132) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $26 (i32.const 1164) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") - (data $27 (i32.const 1196) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00") - (data $28 (i32.const 1228) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") - (data $29 (i32.const 1260) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00") - (data $30 (i32.const 1292) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00%\00\00\00\00\00\00\00\00\00\00") - (data $31 (i32.const 1324) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00,%\00\00\00\00\00\00\00\00\00\00") - (data $32 (i32.const 1356) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\0c%\00\00\00\00\00\00\00\00\00\00") - (data $33 (i32.const 1388) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\10%\00\00\00\00\00\00\00\00\00\00") - (data $34 (i32.const 1420) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\004%\00\00\00\00\00\00\00\00\00\00") - (data $35 (i32.const 1452) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\14%\00\00\00\00\00\00\00\00\00\00") - (data $36 (i32.const 1484) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\18%\00\00\00\00\00\00\00\00\00\00") - (data $37 (i32.const 1516) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\02%\00\00\00\00\00\00\00\00\00\00") - (data $38 (i32.const 1548) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\1c%\00\00\00\00\00\00\00\00\00\00") - (data $39 (i32.const 1580) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00$%\00\00\00\00\00\00\00\00\00\00") - (data $40 (i32.const 1612) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00<%\00\00\00\00\00\00\00\00\00\00") - (data $41 (i32.const 1644) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00") - (data $42 (i32.const 1692) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00\00\00\00\00\00\00") - (data $43 (i32.const 1756) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $44 (i32.const 1788) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00b\00h\00a\00v\00y\00a\00") - (data $45 (i32.const 1820) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00{\00\"\00m\00a\00p\00\"\00:\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $46 (i32.const 1868) "\1c\00\00\00\03\00\00\00\00\00\00\00\0c\00\00\00\0c\00\00\000\07\00\00\00\00\00\00\00\01\00\00") - (data $47 (i32.const 1900) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00{\00}\00\00\00\00\00\00\00\00\00") - (data $48 (i32.const 1932) "|\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00^\00\00\00U\00n\00e\00x\00p\00e\00c\00t\00e\00d\00 \00\'\00n\00u\00l\00l\00\'\00 \00(\00n\00o\00t\00 \00a\00s\00s\00i\00g\00n\00e\00d\00 \00o\00r\00 \00f\00a\00i\00l\00e\00d\00 \00c\00a\00s\00t\00)\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $49 (i32.const 2060) "L\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00:\00\00\00~\00l\00i\00b\00/\00j\00s\00o\00n\00-\00a\00s\00/\00a\00s\00s\00e\00m\00b\00l\00y\00/\00s\00i\00n\00k\00.\00t\00s\00\00\00") - (data $50 (i32.const 2140) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") - (data $51 (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00b\00\00\00\00\00\00\00\00\00") - (data $52 (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00t\00\00\00\00\00\00\00\00\00") - (data $53 (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00n\00\00\00\00\00\00\00\00\00") - (data $54 (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00f\00\00\00\00\00\00\00\00\00") - (data $55 (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00r\00\00\00\00\00\00\00\00\00") - (data $56 (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00\\\00u\000\000\000\00\00\00") - (data $57 (i32.const 2380) "|\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006\00\00\00\00\00\00\00\00\00") - (data $58 (i32.const 2508) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s\00\00\00\00\00\00\00") - (data $59 (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\000\00\00\00\00\00\00\00\00\00\00\00") - (data $60 (i32.const 2604) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data $61 (i32.const 3004) "\1c\04\00\00\00\00\00\00\00\00\00\00\02\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $62 (i32.const 4060) "\\\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\00\00\00\00\00") - (data $63 (i32.const 4156) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00\\\00u\000\000\00\00\00\00\00") - (data $64 (i32.const 4188) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00") - (data $65 (i32.const 4220) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00 \00\00\00\'\00\00\00\00\00\00\00") - (data $66 (i32.const 4252) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\1b\00[\00\00\00\00\00\00\00\00\00") - (data $67 (i32.const 4284) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00m\00\00\00\00\00\00\00\00\00\00\00") - (data $68 (i32.const 4316) ",\00\00\00\03\00\00\00\00\00\00\00\0c\00\00\00\1c\00\00\00\b0\10\00\00\00\00\00\00\d0\10\00\00\00\00\00\00\b0\10\00\00\00\00\00\00\d0\10\00\00") - (data $69 (i32.const 4368) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $70 (i32.const 4396) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00S\00U\00C\00C\00E\00S\00S\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $71 (i32.const 4444) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00T\00O\00O\00B\00I\00G\00") - (data $72 (i32.const 4476) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00A\00C\00C\00E\00S\00\00\00") - (data $73 (i32.const 4508) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\12\00\00\00A\00D\00D\00R\00I\00N\00U\00S\00E\00\00\00\00\00\00\00\00\00\00\00") - (data $74 (i32.const 4556) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\18\00\00\00A\00D\00D\00R\00N\00O\00T\00A\00V\00A\00I\00L\00\00\00\00\00") - (data $75 (i32.const 4604) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00A\00F\00N\00O\00S\00U\00P\00P\00O\00R\00T\00\00\00\00\00\00\00") - (data $76 (i32.const 4652) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00A\00G\00A\00I\00N\00\00\00") - (data $77 (i32.const 4684) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00A\00L\00R\00E\00A\00D\00Y\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $78 (i32.const 4732) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00B\00A\00D\00F\00\00\00\00\00") - (data $79 (i32.const 4764) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00B\00A\00D\00M\00S\00G\00") - (data $80 (i32.const 4796) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00B\00U\00S\00Y\00\00\00\00\00") - (data $81 (i32.const 4828) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00C\00A\00N\00C\00E\00L\00E\00D\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $82 (i32.const 4876) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00C\00H\00I\00L\00D\00\00\00") - (data $83 (i32.const 4908) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00C\00O\00N\00N\00A\00B\00O\00R\00T\00E\00D\00\00\00\00\00\00\00") - (data $84 (i32.const 4956) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00C\00O\00N\00N\00R\00E\00F\00U\00S\00E\00D\00\00\00\00\00\00\00") - (data $85 (i32.const 5004) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\12\00\00\00C\00O\00N\00N\00R\00E\00S\00E\00T\00\00\00\00\00\00\00\00\00\00\00") - (data $86 (i32.const 5052) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00D\00E\00A\00D\00L\00K\00") - (data $87 (i32.const 5084) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00D\00E\00S\00T\00A\00D\00D\00R\00R\00E\00Q\00\00\00\00\00\00\00") - (data $88 (i32.const 5132) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\06\00\00\00D\00O\00M\00\00\00\00\00\00\00") - (data $89 (i32.const 5164) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00D\00Q\00U\00O\00T\00\00\00") - (data $90 (i32.const 5196) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00E\00X\00I\00S\00T\00\00\00") - (data $91 (i32.const 5228) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00F\00A\00U\00L\00T\00\00\00") - (data $92 (i32.const 5260) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00F\00B\00I\00G\00\00\00\00\00") - (data $93 (i32.const 5292) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00H\00O\00S\00T\00U\00N\00R\00E\00A\00C\00H\00\00\00\00\00\00\00") - (data $94 (i32.const 5340) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00I\00D\00R\00M\00\00\00\00\00") - (data $95 (i32.const 5372) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00I\00L\00S\00E\00Q\00\00\00") - (data $96 (i32.const 5404) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00I\00N\00P\00R\00O\00G\00R\00E\00S\00S\00\00\00\00\00\00\00\00\00") - (data $97 (i32.const 5452) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00I\00N\00T\00R\00\00\00\00\00") - (data $98 (i32.const 5484) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00I\00N\00V\00A\00L\00\00\00") - (data $99 (i32.const 5516) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00I\00O\00\00\00\00\00\00\00\00\00") - (data $100 (i32.const 5548) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00I\00S\00C\00O\00N\00N\00") - (data $101 (i32.const 5580) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00I\00S\00D\00I\00R\00\00\00") - (data $102 (i32.const 5612) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00L\00O\00O\00P\00\00\00\00\00") - (data $103 (i32.const 5644) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00M\00F\00I\00L\00E\00\00\00") - (data $104 (i32.const 5676) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00M\00L\00I\00N\00K\00\00\00") - (data $105 (i32.const 5708) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00M\00S\00G\00S\00I\00Z\00E\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $106 (i32.const 5756) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00M\00U\00L\00T\00I\00H\00O\00P\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $107 (i32.const 5804) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00N\00A\00M\00E\00T\00O\00O\00L\00O\00N\00G\00\00\00\00\00\00\00") - (data $108 (i32.const 5852) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00N\00E\00T\00D\00O\00W\00N\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $109 (i32.const 5900) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00N\00E\00T\00R\00E\00S\00E\00T\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $110 (i32.const 5948) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00N\00E\00T\00U\00N\00R\00E\00A\00C\00H\00\00\00\00\00\00\00\00\00") - (data $111 (i32.const 5996) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00F\00I\00L\00E\00\00\00") - (data $112 (i32.const 6028) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00B\00U\00F\00S\00") - (data $113 (i32.const 6060) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00D\00E\00V\00\00\00") - (data $114 (i32.const 6092) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00E\00N\00T\00\00\00") - (data $115 (i32.const 6124) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00E\00X\00E\00C\00") - (data $116 (i32.const 6156) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00L\00C\00K\00\00\00") - (data $117 (i32.const 6188) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00L\00I\00N\00K\00") - (data $118 (i32.const 6220) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00M\00E\00M\00\00\00") - (data $119 (i32.const 6252) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00M\00S\00G\00\00\00") - (data $120 (i32.const 6284) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00N\00O\00P\00R\00O\00T\00O\00O\00P\00T\00\00\00\00\00\00\00\00\00") - (data $121 (i32.const 6332) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00S\00P\00C\00\00\00") - (data $122 (i32.const 6364) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00S\00Y\00S\00\00\00") - (data $123 (i32.const 6396) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00N\00O\00T\00C\00O\00N\00N\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $124 (i32.const 6444) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00T\00D\00I\00R\00") - (data $125 (i32.const 6476) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00N\00O\00T\00E\00M\00P\00T\00Y\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $126 (i32.const 6524) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00N\00O\00T\00R\00E\00C\00O\00V\00E\00R\00A\00B\00L\00E\00") - (data $127 (i32.const 6572) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00N\00O\00T\00S\00O\00C\00K\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $128 (i32.const 6620) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00T\00S\00U\00P\00") - (data $129 (i32.const 6652) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00T\00T\00Y\00\00\00") - (data $130 (i32.const 6684) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00N\00X\00I\00O\00\00\00\00\00") - (data $131 (i32.const 6716) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00O\00V\00E\00R\00F\00L\00O\00W\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $132 (i32.const 6764) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\12\00\00\00O\00W\00N\00E\00R\00D\00E\00A\00D\00\00\00\00\00\00\00\00\00\00\00") - (data $133 (i32.const 6812) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00P\00E\00R\00M\00\00\00\00\00") - (data $134 (i32.const 6844) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00P\00I\00P\00E\00\00\00\00\00") - (data $135 (i32.const 6876) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00P\00R\00O\00T\00O\00\00\00") - (data $136 (i32.const 6908) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00P\00R\00O\00T\00O\00N\00O\00S\00U\00P\00P\00O\00R\00T\00") - (data $137 (i32.const 6956) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\12\00\00\00P\00R\00O\00T\00O\00T\00Y\00P\00E\00\00\00\00\00\00\00\00\00\00\00") - (data $138 (i32.const 7004) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00R\00A\00N\00G\00E\00\00\00") - (data $139 (i32.const 7036) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00R\00O\00F\00S\00\00\00\00\00") - (data $140 (i32.const 7068) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00S\00P\00I\00P\00E\00\00\00") - (data $141 (i32.const 7100) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00S\00R\00C\00H\00\00\00\00\00") - (data $142 (i32.const 7132) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00S\00T\00A\00L\00E\00\00\00") - (data $143 (i32.const 7164) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00T\00I\00M\00E\00D\00O\00U\00T\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $144 (i32.const 7212) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00T\00X\00T\00B\00S\00Y\00") - (data $145 (i32.const 7244) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00X\00D\00E\00V\00\00\00\00\00") - (data $146 (i32.const 7276) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00N\00O\00T\00C\00A\00P\00A\00B\00L\00E\00\00\00\00\00\00\00\00\00") - (data $147 (i32.const 7324) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00U\00N\00K\00N\00O\00W\00N\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $148 (i32.const 7372) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00w\00a\00s\00i\00_\00p\00r\00o\00c\00e\00s\00s\00.\00t\00s\00\00\00\00\00") - (data $149 (i32.const 7436) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") - (data $150 (i32.const 7468) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00M\00a\00p\00 \00(\000\00)\00 \00{\00}\00\00\00\00\00\00\00\00\00") - (data $151 (i32.const 7516) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00M\00a\00p\00(\00\00\00\00\00") - (data $152 (i32.const 7548) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00)\00 \00{\00 \00\00\00\00\00") - (data $153 (i32.const 7580) "|\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $154 (i32.const 7708) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00 \00=\00>\00 \00\00\00\00\00") - (data $155 (i32.const 7740) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00,\00 \00\00\00\00\00\00\00\00\00") - (data $156 (i32.const 7772) ",\00\00\00\03\00\00\00\00\00\00\00\0c\00\00\00\10\00\00\00\00\00\00\000\1e\00\00\00\00\00\00P\1e\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $157 (i32.const 7820) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00!\00\00\00\'\00\00\00\00\00\00\00") - (data $158 (i32.const 7852) ",\00\00\00\03\00\00\00\00\00\00\00\0c\00\00\00\1c\00\00\00\b0\10\00\00\00\00\00\00\d0\10\00\00\00\00\00\00\b0\10\00\00\00\00\00\00\d0\10\00\00") - (data $159 (i32.const 7900) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00 \00}\00\00\00\00\00\00\00\00\00") - (data $160 (i32.const 7932) ",\00\00\00\03\00\00\00\00\00\00\00\0c\00\00\00\10\00\00\00\00\00\00\000\1e\00\00\00\00\00\00\f0\1e\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data $161 (i32.const 7984) "\13\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$\01\00\00 \00\00\00\00\00\00\00\10\01\82\00\10\02\82\00\00\00\00\00\04A\00\00 \00\00\00 \00\00\00\00\00\00\00\02A\00\00\02\02\00\00\02\t\00\00") + (memory $0 2) + (data $0 (i32.const 12) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $1 (i32.const 44) ",\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\10\00\00\00 \00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $2 (i32.const 96) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $3 (i32.const 65644) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00t\00r\00u\00e\00\00\00\00\00") + (data $4 (i32.const 65676) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00f\00a\00l\00s\00e\00\00\00") + (data $5 (i32.const 65708) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00n\00u\00l\00l\00\00\00\00\00") + (data $6 (i32.const 65740) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00{\00\00\00\00\00\00\00\00\00\00\00") + (data $7 (i32.const 65772) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00[\00\00\00\00\00\00\00\00\00\00\00") + (data $8 (i32.const 65804) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00[\00]\00\00\00\00\00\00\00\00\00") + (data $9 (i32.const 65836) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00:\00\00\00\00\00\00\00\00\00\00\00") + (data $10 (i32.const 65868) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00,\00\00\00\00\00\00\00\00\00\00\00") + (data $11 (i32.const 65900) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00}\00\00\00\00\00\00\00\00\00\00\00") + (data $12 (i32.const 65932) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00]\00\00\00\00\00\00\00\00\00\00\00") + (data $13 (i32.const 65964) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00") + (data $14 (i32.const 65996) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\"\00\"\00\00\00\00\00\00\00\00\00") + (data $15 (i32.const 66028) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00{\00}\00\00\00\00\00\00\00\00\00") + (data $16 (i32.const 66060) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00b\00\00\00\00\00\00\00\00\00") + (data $17 (i32.const 66092) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00t\00\00\00\00\00\00\00\00\00") + (data $18 (i32.const 66124) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00n\00\00\00\00\00\00\00\00\00") + (data $19 (i32.const 66156) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00f\00\00\00\00\00\00\00\00\00") + (data $20 (i32.const 66188) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00\\\00r\00\00\00\00\00\00\00\00\00") + (data $21 (i32.const 66220) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00\\\00u\000\000\000\00\00\00") + (data $22 (i32.const 66252) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00\\\00u\000\000\00\00\00\00\00") + (data $23 (i32.const 66284) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00U\00n\00p\00a\00i\00r\00e\00d\00 \00s\00u\00r\00r\00o\00g\00a\00t\00e\00\00\00\00\00\00\00\00\00") + (data $24 (i32.const 66348) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data $25 (i32.const 66396) "L\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00:\00\00\00M\00p\00Z\00 \00m\00u\00s\00t\00 \00h\00a\00v\00e\00 \00a\00t\00 \00l\00e\00a\00s\00t\00 \001\00 \00l\00i\00m\00b\00\00\00") + (data $26 (i32.const 66476) "l\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00R\00\00\00~\00l\00i\00b\00/\00@\00h\00y\00p\00e\00r\00c\00u\00b\00e\00d\00/\00a\00s\00-\00m\00p\00z\00/\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00") + (data $27 (i32.const 66588) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $28 (i32.const 66620) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") + (data $29 (i32.const 66684) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $30 (i32.const 66752) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $31 (i32.const 66784) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $32 (i32.const 66812) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00") + (data $33 (i32.const 66876) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data $34 (i32.const 66928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $35 (i32.const 66956) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $36 (i32.const 67020) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $37 (i32.const 67052) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") + (data $38 (i32.const 67084) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00") + (data $39 (i32.const 67116) "\1c\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\04\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") + (data $40 (i32.const 67148) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1a\00\00\00h\00e\00l\00l\00o\00 \00w\00\"\00o\00r\00l\00d\00!\00\00\00") + (data $41 (i32.const 67196) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00") + (data $42 (i32.const 67244) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") + (data $43 (i32.const 67292) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\06\00\00\00a\00:\00 \00\00\00\00\00\00\00") + (data $44 (i32.const 67324) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $45 (i32.const 67360) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $46 (i32.const 67388) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00S\00U\00C\00C\00E\00S\00S\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $47 (i32.const 67436) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00T\00O\00O\00B\00I\00G\00") + (data $48 (i32.const 67468) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00A\00C\00C\00E\00S\00\00\00") + (data $49 (i32.const 67500) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\12\00\00\00A\00D\00D\00R\00I\00N\00U\00S\00E\00\00\00\00\00\00\00\00\00\00\00") + (data $50 (i32.const 67548) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\18\00\00\00A\00D\00D\00R\00N\00O\00T\00A\00V\00A\00I\00L\00\00\00\00\00") + (data $51 (i32.const 67596) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00A\00F\00N\00O\00S\00U\00P\00P\00O\00R\00T\00\00\00\00\00\00\00") + (data $52 (i32.const 67644) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00A\00G\00A\00I\00N\00\00\00") + (data $53 (i32.const 67676) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00A\00L\00R\00E\00A\00D\00Y\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $54 (i32.const 67724) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00B\00A\00D\00F\00\00\00\00\00") + (data $55 (i32.const 67756) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00B\00A\00D\00M\00S\00G\00") + (data $56 (i32.const 67788) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00B\00U\00S\00Y\00\00\00\00\00") + (data $57 (i32.const 67820) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00C\00A\00N\00C\00E\00L\00E\00D\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $58 (i32.const 67868) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00C\00H\00I\00L\00D\00\00\00") + (data $59 (i32.const 67900) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00C\00O\00N\00N\00A\00B\00O\00R\00T\00E\00D\00\00\00\00\00\00\00") + (data $60 (i32.const 67948) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00C\00O\00N\00N\00R\00E\00F\00U\00S\00E\00D\00\00\00\00\00\00\00") + (data $61 (i32.const 67996) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\12\00\00\00C\00O\00N\00N\00R\00E\00S\00E\00T\00\00\00\00\00\00\00\00\00\00\00") + (data $62 (i32.const 68044) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00D\00E\00A\00D\00L\00K\00") + (data $63 (i32.const 68076) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00D\00E\00S\00T\00A\00D\00D\00R\00R\00E\00Q\00\00\00\00\00\00\00") + (data $64 (i32.const 68124) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\06\00\00\00D\00O\00M\00\00\00\00\00\00\00") + (data $65 (i32.const 68156) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00D\00Q\00U\00O\00T\00\00\00") + (data $66 (i32.const 68188) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00E\00X\00I\00S\00T\00\00\00") + (data $67 (i32.const 68220) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00F\00A\00U\00L\00T\00\00\00") + (data $68 (i32.const 68252) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00F\00B\00I\00G\00\00\00\00\00") + (data $69 (i32.const 68284) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00H\00O\00S\00T\00U\00N\00R\00E\00A\00C\00H\00\00\00\00\00\00\00") + (data $70 (i32.const 68332) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00I\00D\00R\00M\00\00\00\00\00") + (data $71 (i32.const 68364) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00I\00L\00S\00E\00Q\00\00\00") + (data $72 (i32.const 68396) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00I\00N\00P\00R\00O\00G\00R\00E\00S\00S\00\00\00\00\00\00\00\00\00") + (data $73 (i32.const 68444) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00I\00N\00T\00R\00\00\00\00\00") + (data $74 (i32.const 68476) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00I\00N\00V\00A\00L\00\00\00") + (data $75 (i32.const 68508) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\04\00\00\00I\00O\00\00\00\00\00\00\00\00\00") + (data $76 (i32.const 68540) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00I\00S\00C\00O\00N\00N\00") + (data $77 (i32.const 68572) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00I\00S\00D\00I\00R\00\00\00") + (data $78 (i32.const 68604) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00L\00O\00O\00P\00\00\00\00\00") + (data $79 (i32.const 68636) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00M\00F\00I\00L\00E\00\00\00") + (data $80 (i32.const 68668) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00M\00L\00I\00N\00K\00\00\00") + (data $81 (i32.const 68700) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00M\00S\00G\00S\00I\00Z\00E\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $82 (i32.const 68748) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00M\00U\00L\00T\00I\00H\00O\00P\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $83 (i32.const 68796) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\16\00\00\00N\00A\00M\00E\00T\00O\00O\00L\00O\00N\00G\00\00\00\00\00\00\00") + (data $84 (i32.const 68844) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00N\00E\00T\00D\00O\00W\00N\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $85 (i32.const 68892) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00N\00E\00T\00R\00E\00S\00E\00T\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $86 (i32.const 68940) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00N\00E\00T\00U\00N\00R\00E\00A\00C\00H\00\00\00\00\00\00\00\00\00") + (data $87 (i32.const 68988) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00F\00I\00L\00E\00\00\00") + (data $88 (i32.const 69020) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00B\00U\00F\00S\00") + (data $89 (i32.const 69052) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00D\00E\00V\00\00\00") + (data $90 (i32.const 69084) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00E\00N\00T\00\00\00") + (data $91 (i32.const 69116) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00E\00X\00E\00C\00") + (data $92 (i32.const 69148) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00L\00C\00K\00\00\00") + (data $93 (i32.const 69180) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00L\00I\00N\00K\00") + (data $94 (i32.const 69212) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00M\00E\00M\00\00\00") + (data $95 (i32.const 69244) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00M\00S\00G\00\00\00") + (data $96 (i32.const 69276) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00N\00O\00P\00R\00O\00T\00O\00O\00P\00T\00\00\00\00\00\00\00\00\00") + (data $97 (i32.const 69324) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00S\00P\00C\00\00\00") + (data $98 (i32.const 69356) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00S\00Y\00S\00\00\00") + (data $99 (i32.const 69388) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00N\00O\00T\00C\00O\00N\00N\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $100 (i32.const 69436) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00T\00D\00I\00R\00") + (data $101 (i32.const 69468) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00N\00O\00T\00E\00M\00P\00T\00Y\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $102 (i32.const 69516) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00N\00O\00T\00R\00E\00C\00O\00V\00E\00R\00A\00B\00L\00E\00") + (data $103 (i32.const 69564) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00N\00O\00T\00S\00O\00C\00K\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $104 (i32.const 69612) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00N\00O\00T\00S\00U\00P\00") + (data $105 (i32.const 69644) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00N\00O\00T\00T\00Y\00\00\00") + (data $106 (i32.const 69676) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00N\00X\00I\00O\00\00\00\00\00") + (data $107 (i32.const 69708) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00O\00V\00E\00R\00F\00L\00O\00W\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $108 (i32.const 69756) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\12\00\00\00O\00W\00N\00E\00R\00D\00E\00A\00D\00\00\00\00\00\00\00\00\00\00\00") + (data $109 (i32.const 69804) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00P\00E\00R\00M\00\00\00\00\00") + (data $110 (i32.const 69836) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00P\00I\00P\00E\00\00\00\00\00") + (data $111 (i32.const 69868) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00P\00R\00O\00T\00O\00\00\00") + (data $112 (i32.const 69900) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00P\00R\00O\00T\00O\00N\00O\00S\00U\00P\00P\00O\00R\00T\00") + (data $113 (i32.const 69948) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\12\00\00\00P\00R\00O\00T\00O\00T\00Y\00P\00E\00\00\00\00\00\00\00\00\00\00\00") + (data $114 (i32.const 69996) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00R\00A\00N\00G\00E\00\00\00") + (data $115 (i32.const 70028) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00R\00O\00F\00S\00\00\00\00\00") + (data $116 (i32.const 70060) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00S\00P\00I\00P\00E\00\00\00") + (data $117 (i32.const 70092) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00S\00R\00C\00H\00\00\00\00\00") + (data $118 (i32.const 70124) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\n\00\00\00S\00T\00A\00L\00E\00\00\00") + (data $119 (i32.const 70156) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\10\00\00\00T\00I\00M\00E\00D\00O\00U\00T\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $120 (i32.const 70204) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0c\00\00\00T\00X\00T\00B\00S\00Y\00") + (data $121 (i32.const 70236) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\08\00\00\00X\00D\00E\00V\00\00\00\00\00") + (data $122 (i32.const 70268) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00N\00O\00T\00C\00A\00P\00A\00B\00L\00E\00\00\00\00\00\00\00\00\00") + (data $123 (i32.const 70316) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\0e\00\00\00U\00N\00K\00N\00O\00W\00N\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $124 (i32.const 70364) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00w\00a\00s\00i\00_\00p\00r\00o\00c\00e\00s\00s\00.\00t\00s\00\00\00\00\00") + (data $125 (i32.const 70428) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00") + (data $126 (i32.const 70460) "\1c\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\06\00\00\00b\00:\00 \00\00\00\00\00\00\00") + (data $127 (i32.const 70496) "\07\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00\02\01\00\00\00\00\00\00$\01\00\00") (table $0 1 1 funcref) (elem $0 (i32.const 1)) (export "memory" (memory $0)) (export "_start" (func $~start)) + (func $start:assembly/bl + (local $0 i32) + (local $1 i32) + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + ) + (func $start:assembly/serialize/string + call $start:assembly/bl + ) (func $~lib/rt/common/OBJECT#get:rtSize (param $0 i32) (result i32) local.get $0 i32.load offset=16 @@ -557,8 +533,8 @@ i32.const 2 i32.eq if - i32.const 416 - i32.const 480 + i32.const 66304 + i32.const 66368 i32.const 742 i32.const 49 call $~lib/wasi_internal/wasi_abort @@ -785,7 +761,7 @@ i32.eqz if i32.const 0 - i32.const 816 + i32.const 66704 i32.const 160 i32.const 16 call $~lib/wasi_internal/wasi_abort @@ -855,7 +831,7 @@ i32.eqz if i32.const 0 - i32.const 816 + i32.const 66704 i32.const 128 i32.const 18 call $~lib/wasi_internal/wasi_abort @@ -872,7 +848,7 @@ i32.eqz if i32.const 0 - i32.const 816 + i32.const 66704 i32.const 132 i32.const 16 call $~lib/wasi_internal/wasi_abort @@ -902,8 +878,8 @@ i32.load i32.gt_u if - i32.const 944 - i32.const 1008 + i32.const 66832 + i32.const 66896 i32.const 21 i32.const 28 call $~lib/wasi_internal/wasi_abort @@ -971,7 +947,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 816 + i32.const 66704 i32.const 148 i32.const 30 call $~lib/wasi_internal/wasi_abort @@ -1123,7 +1099,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 268 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -1143,7 +1119,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 270 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -1206,7 +1182,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 284 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -1359,7 +1335,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 201 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -1376,7 +1352,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 203 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -1465,7 +1441,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 221 i32.const 16 call $~lib/wasi_internal/wasi_abort @@ -1508,7 +1484,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 233 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -1526,7 +1502,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 234 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -1594,7 +1570,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 251 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -1711,7 +1687,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 382 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -1757,7 +1733,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 389 i32.const 16 call $~lib/wasi_internal/wasi_abort @@ -1789,7 +1765,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 402 i32.const 5 call $~lib/wasi_internal/wasi_abort @@ -2033,7 +2009,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 562 i32.const 3 call $~lib/wasi_internal/wasi_abort @@ -2253,7 +2229,7 @@ i32.eqz if i32.const 0 - i32.const 816 + i32.const 66704 i32.const 229 i32.const 20 call $~lib/wasi_internal/wasi_abort @@ -2361,8 +2337,8 @@ i32.const 1073741820 i32.gt_u if - i32.const 752 - i32.const 1088 + i32.const 66640 + i32.const 66976 i32.const 461 i32.const 29 call $~lib/wasi_internal/wasi_abort @@ -2464,7 +2440,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 334 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -2535,7 +2511,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 347 i32.const 18 call $~lib/wasi_internal/wasi_abort @@ -2692,7 +2668,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 361 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -2807,7 +2783,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 499 i32.const 16 call $~lib/wasi_internal/wasi_abort @@ -2827,7 +2803,7 @@ i32.eqz if i32.const 0 - i32.const 1088 + i32.const 66976 i32.const 501 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -2875,8 +2851,8 @@ i32.const 1073741804 i32.ge_u if - i32.const 752 - i32.const 816 + i32.const 66640 + i32.const 66704 i32.const 261 i32.const 31 call $~lib/wasi_internal/wasi_abort @@ -2952,7 +2928,7 @@ i32.eqz if i32.const 0 - i32.const 816 + i32.const 66704 i32.const 295 i32.const 14 call $~lib/wasi_internal/wasi_abort @@ -3022,7566 +2998,1362 @@ (func $start:~lib/@hypercubed/as-mpz/index call $start:~lib/@hypercubed/as-mpz/assembly/index ) - (func $start:~lib/json-as/assembly/index + (func $start:assembly/index + call $start:assembly/serialize/string call $start:~lib/@hypercubed/as-mpz/index ) - (func $~lib/table-as/assembly/types/TableStructure#set:topBody (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:topJoin (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:topLeft (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=8 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:topRight (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:bottomBody (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=16 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:bottomJoin (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=20 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:bottomLeft (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=24 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:bottomRight (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=28 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:bodyLeft (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=32 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:bodyRight (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=36 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:bodyJoin (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=40 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:joinBody (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=44 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:joinLeft (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=48 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:joinRight (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=52 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/table-as/assembly/types/TableStructure#set:joinJoin (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=56 - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $start:~lib/table-as/assembly/index - i32.const 0 - call $~lib/table-as/assembly/types/TableStructure#constructor - global.set $~lib/table-as/assembly/index/fmt - ) - (func $start:~lib/table-as/index - call $start:~lib/table-as/assembly/index - ) - (func $"~lib/map/Map<~lib/string/String,u32>#set:buckets" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $"~lib/map/Map<~lib/string/String,u32>#set:bucketsMask" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $"~lib/map/Map<~lib/string/String,u32>#set:entries" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=8 + (func $~lib/array/Array#get:length_ (param $0 i32) (result i32) local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link + i32.load offset=12 ) - (func $"~lib/map/Map<~lib/string/String,u32>#set:entriesCapacity" (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (param $0 i32) (result i32) local.get $0 - local.get $1 - i32.store offset=12 + i32.load offset=8 ) - (func $"~lib/map/Map<~lib/string/String,u32>#set:entriesOffset" (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView#get:buffer (param $0 i32) (result i32) local.get $0 - local.get $1 - i32.store offset=16 + i32.load ) - (func $"~lib/map/Map<~lib/string/String,u32>#set:entriesCount" (param $0 i32) (param $1 i32) + (func $~lib/rt/itcms/Object#get:rtSize (param $0 i32) (result i32) local.get $0 - local.get $1 - i32.store offset=20 + i32.load offset=16 ) - (func $"~lib/map/Map<~lib/string/String,u64>#set:buckets" (param $0 i32) (param $1 i32) + (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 + i32.const 20 + i32.sub + local.set $2 local.get $1 - i32.store - local.get $0 + local.get $2 + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.sub + i32.le_u + if + local.get $2 + local.get $1 + call $~lib/rt/itcms/Object#set:rtSize + local.get $0 + return + end local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $"~lib/map/Map<~lib/string/String,u64>#set:bucketsMask" (param $0 i32) (param $1 i32) + local.get $2 + call $~lib/rt/itcms/Object#get:rtId + call $~lib/rt/itcms/__new + local.set $3 + local.get $3 local.get $0 local.get $1 - i32.store offset=4 + local.tee $4 + local.get $2 + call $~lib/rt/itcms/Object#get:rtSize + local.tee $5 + local.get $4 + local.get $5 + i32.lt_u + select + memory.copy + local.get $3 + return ) - (func $"~lib/map/Map<~lib/string/String,u64>#set:entries" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=8 + (func $~lib/array/Array#get:dataStart (param $0 i32) (result i32) local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link + i32.load offset=4 ) - (func $"~lib/map/Map<~lib/string/String,u64>#set:entriesCapacity" (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length_ (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store offset=12 ) - (func $"~lib/map/Map<~lib/string/String,u64>#set:entriesOffset" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=16 - ) - (func $"~lib/map/Map<~lib/string/String,u64>#set:entriesCount" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=20 - ) - (func $start:~lib/as-console/assembly/index - call $start:~lib/table-as/index - i32.const 0 - call $"~lib/map/Map<~lib/string/String,u32>#constructor" - global.set $~lib/as-console/assembly/index/counts - i32.const 0 - call $"~lib/map/Map<~lib/string/String,u64>#constructor" - global.set $~lib/as-console/assembly/index/timers - ) - (func $start:~lib/as-console/index - call $start:~lib/as-console/assembly/index - ) - (func $assembly/test/Yo#set:map (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $assembly/test/Yo#get:map (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $"~lib/map/Map<~lib/string/String,u64>#get:buckets" (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $"~lib/map/Map<~lib/string/String,u64>#get:bucketsMask" (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - ) - (func $"~lib/map/MapEntry<~lib/string/String,u64>#get:taggedNext" (param $0 i32) (result i32) - local.get $0 - i32.load offset=16 - ) - (func $"~lib/map/MapEntry<~lib/string/String,u64>#get:key" (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $"~lib/map/MapEntry<~lib/string/String,u64>#set:value" (param $0 i32) (param $1 i64) + (func $~lib/string/String.fromCharCode@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const -1 + local.set $1 + end local.get $0 local.get $1 - i64.store offset=8 - ) - (func $"~lib/map/Map<~lib/string/String,u64>#get:entriesOffset" (param $0 i32) (result i32) - local.get $0 - i32.load offset=16 - ) - (func $"~lib/map/Map<~lib/string/String,u64>#get:entriesCapacity" (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $"~lib/map/Map<~lib/string/String,u64>#get:entriesCount" (param $0 i32) (result i32) - local.get $0 - i32.load offset=20 - ) - (func $"~lib/map/Map<~lib/string/String,u64>#get:entries" (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 + call $~lib/string/String.fromCharCode ) - (func $"~lib/map/MapEntry<~lib/string/String,u64>#set:key" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - ) - (func $"~lib/map/MapEntry<~lib/string/String,u64>#get:value" (param $0 i32) (result i64) - local.get $0 - i64.load offset=8 - ) - (func $"~lib/map/MapEntry<~lib/string/String,u64>#set:taggedNext" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=16 - ) - (func $~lib/json-as/assembly/sink/Sink#set:buffer (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/json-as/assembly/sink/Sink#set:offset (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/json-as/assembly/sink/Sink#get:offset (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - ) - (func $~lib/array/Array<~lib/string/String>#set:buffer (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/array/Array<~lib/string/String>#set:dataStart (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/array/Array<~lib/string/String>#set:byteLength (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=8 - ) - (func $~lib/array/Array<~lib/string/String>#set:length_ (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/array/Array<~lib/string/String>#get:length_ (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - ) - (func $~lib/arraybuffer/ArrayBufferView#get:buffer (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $~lib/rt/itcms/Object#get:rtSize (param $0 i32) (result i32) - local.get $0 - i32.load offset=16 - ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.const 20 - i32.sub - local.set $2 - local.get $1 - local.get $2 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.sub - i32.le_u - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/Object#set:rtSize - local.get $0 - return - end - local.get $1 - local.get $2 - call $~lib/rt/itcms/Object#get:rtId - call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 - call $~lib/rt/itcms/Object#get:rtSize - local.tee $5 - local.get $4 - local.get $5 - i32.lt_u - select - memory.copy - local.get $3 - return - ) - (func $~lib/array/Array<~lib/string/String>#get:dataStart (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - ) - (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/array/Array#set:dataStart (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/array/Array#set:byteLength (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=8 - ) - (func $~lib/array/Array#set:length_ (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/array/Array#get:length_ (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array#get:dataStart (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - ) - (func $~lib/string/String#toString (param $0 i32) (result i32) - local.get $0 - return - ) - (func $~lib/json-as/assembly/util/unsafeCharCodeAt (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - return - ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/common/OBJECT#get:rtSize - return - ) - (func $~lib/json-as/assembly/sink/nextPowerOf2 (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - return - ) - (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - loop $while-continue|0 - local.get $1 - i32.const 10000 - i32.ge_u - if - local.get $1 - i32.const 10000 - i32.div_u - local.set $3 - local.get $1 - i32.const 10000 - i32.rem_u - local.set $4 - local.get $3 - local.set $1 - local.get $4 - i32.const 100 - i32.div_u - local.set $5 - local.get $4 - i32.const 100 - i32.rem_u - local.set $6 - i32.const 2604 - local.get $5 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $7 - i32.const 2604 - local.get $6 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $8 - local.get $2 - i32.const 4 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $7 - local.get $8 - i64.const 32 - i64.shl - i64.or - i64.store - br $while-continue|0 - end - end - local.get $1 - i32.const 100 - i32.ge_u - if - local.get $1 - i32.const 100 - i32.div_u - local.set $9 - local.get $1 - i32.const 100 - i32.rem_u - local.set $10 - local.get $9 - local.set $1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - i32.const 2604 - local.get $10 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $11 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.store - end - local.get $1 - i32.const 10 - i32.ge_u - if - local.get $2 - i32.const 2 - i32.sub - local.set $2 - i32.const 2604 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $12 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $12 - i32.store - else - local.get $2 - i32.const 1 - i32.sub - local.set $2 - i32.const 48 - local.get $1 - i32.add - local.set $13 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $13 - i32.store16 - end - ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - loop $while-continue|0 - local.get $2 - i32.const 2 - i32.ge_u - if - local.get $2 - i32.const 2 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 3024 - local.get $1 - i32.wrap_i64 - i32.const 255 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - i32.store - local.get $1 - i64.const 8 - i64.shr_u - local.set $1 - br $while-continue|0 - end - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - i32.const 3024 - local.get $1 - i32.wrap_i64 - i32.const 6 - i32.shl - i32.add - i32.load16_u - i32.store16 - end - ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - block $~lib/util/number/isPowerOf2|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.popcnt - i32.const 1 - i32.eq - br $~lib/util/number/isPowerOf2|inlined.0 - end - if - i32.const 63 - local.get $0 - i64.clz - i32.wrap_i64 - i32.sub - i32.const 31 - local.get $1 - i32.clz - i32.sub - i32.div_u - i32.const 1 - i32.add - return - end - local.get $1 - i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - loop $while-continue|0 - local.get $0 - local.get $4 - i64.ge_u - if - local.get $0 - local.get $4 - i64.div_u - local.set $0 - local.get $4 - local.get $4 - i64.mul - local.set $4 - local.get $5 - i32.const 1 - i32.shl - local.set $5 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $0 - i64.const 1 - i64.ge_u - if - local.get $0 - local.get $3 - i64.div_u - local.set $0 - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $while-continue|1 - end - end - local.get $5 - i32.const 1 - i32.sub - return - ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - (local $7 i64) - local.get $3 - i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 - i32.const 1 - i32.sub - i32.and - i32.const 0 - i32.eq - if - local.get $3 - i32.ctz - i32.const 7 - i32.and - i64.extend_i32_s - local.set $5 - local.get $4 - i64.const 1 - i64.sub - local.set $6 - loop $do-loop|0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 4080 - local.get $1 - local.get $6 - i64.and - i32.wrap_i64 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.store16 - local.get $1 - local.get $5 - i64.shr_u - local.set $1 - local.get $1 - i64.const 0 - i64.ne - br_if $do-loop|0 - end - else - loop $do-loop|1 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $1 - local.get $4 - i64.div_u - local.set $7 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 4080 - local.get $1 - local.get $7 - local.get $4 - i64.mul - i64.sub - i32.wrap_i64 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.store16 - local.get $7 - local.set $1 - local.get $1 - i64.const 0 - i64.ne - br_if $do-loop|1 - end - end - ) - (func $~lib/number/I32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - call $~lib/util/number/itoa32 - return - ) - (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) - local.get $0 - i64.const 1000000000000000 - i64.lt_u - if - local.get $0 - i64.const 1000000000000 - i64.lt_u - if - i32.const 10 - local.get $0 - i64.const 100000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 10000000000 - i64.ge_u - i32.add - return - else - i32.const 13 - local.get $0 - i64.const 100000000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 10000000000000 - i64.ge_u - i32.add - return - end - unreachable - else - local.get $0 - i64.const 100000000000000000 - i64.lt_u - if - i32.const 16 - local.get $0 - i64.const 10000000000000000 - i64.ge_u - i32.add - return - else - i32.const 18 - local.get $0 - i64.const -8446744073709551616 - i64.ge_u - i32.add - local.get $0 - i64.const 1000000000000000000 - i64.ge_u - i32.add - return - end - unreachable - end - unreachable - ) - (func $~lib/util/number/utoa64_dec_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - loop $while-continue|0 - local.get $1 - i64.const 100000000 - i64.ge_u - if - local.get $1 - i64.const 100000000 - i64.div_u - local.set $3 - local.get $1 - local.get $3 - i64.const 100000000 - i64.mul - i64.sub - i32.wrap_i64 - local.set $4 - local.get $3 - local.set $1 - local.get $4 - i32.const 10000 - i32.div_u - local.set $5 - local.get $4 - i32.const 10000 - i32.rem_u - local.set $6 - local.get $5 - i32.const 100 - i32.div_u - local.set $7 - local.get $5 - i32.const 100 - i32.rem_u - local.set $8 - local.get $6 - i32.const 100 - i32.div_u - local.set $9 - local.get $6 - i32.const 100 - i32.rem_u - local.set $10 - i32.const 2604 - local.get $9 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $11 - i32.const 2604 - local.get $10 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $12 - local.get $2 - i32.const 4 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $11 - local.get $12 - i64.const 32 - i64.shl - i64.or - i64.store - i32.const 2604 - local.get $7 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $11 - i32.const 2604 - local.get $8 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $12 - local.get $2 - i32.const 4 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $11 - local.get $12 - i64.const 32 - i64.shl - i64.or - i64.store - br $while-continue|0 - end - end - local.get $0 - local.get $1 - i32.wrap_i64 - local.get $2 - call $~lib/util/number/utoa32_dec_lut - ) - (func $~lib/number/U64#toString (param $0 i64) (param $1 i32) (result i32) - local.get $0 - local.get $1 - call $~lib/util/number/utoa64 - return - ) - (func $~lib/json-as/assembly/index/JSON.stringify (param $0 i64) (result i32) - (local $1 i64) - i32.const 0 - drop - i32.const 1 - drop - block $~lib/json-as/assembly/serialize/integer/serializeInteger|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 10 - call $~lib/number/U64#toString - br $~lib/json-as/assembly/serialize/integer/serializeInteger|inlined.0 - end - return - ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - i32.const 1 - drop - local.get $0 - local.get $2 - i32.const 1 - call $~lib/rt/itcms/__link - ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/common/OBJECT#get:rtSize - i32.const 2 - i32.shr_u - return - ) - (func $~lib/array/Array#get:length_ (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array#get:dataStart (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - ) - (func $~lib/bindings/wasi_snapshot_preview1/errnoToString (param $0 i32) (result i32) - (local $1 i32) - block $break|0 - block $case76|0 - block $case75|0 - block $case74|0 - block $case73|0 - block $case72|0 - block $case71|0 - block $case70|0 - block $case69|0 - block $case68|0 - block $case67|0 - block $case66|0 - block $case65|0 - block $case64|0 - block $case63|0 - block $case62|0 - block $case61|0 - block $case60|0 - block $case59|0 - block $case58|0 - block $case57|0 - block $case56|0 - block $case55|0 - block $case54|0 - block $case53|0 - block $case52|0 - block $case51|0 - block $case50|0 - block $case49|0 - block $case48|0 - block $case47|0 - block $case46|0 - block $case45|0 - block $case44|0 - block $case43|0 - block $case42|0 - block $case41|0 - block $case40|0 - block $case39|0 - block $case38|0 - block $case37|0 - block $case36|0 - block $case35|0 - block $case34|0 - block $case33|0 - block $case32|0 - block $case31|0 - block $case30|0 - block $case29|0 - block $case28|0 - block $case27|0 - block $case26|0 - block $case25|0 - block $case24|0 - block $case23|0 - block $case22|0 - block $case21|0 - block $case20|0 - block $case19|0 - block $case18|0 - block $case17|0 - block $case16|0 - block $case15|0 - block $case14|0 - block $case13|0 - block $case12|0 - block $case11|0 - block $case10|0 - block $case9|0 - block $case8|0 - block $case7|0 - block $case6|0 - block $case5|0 - block $case4|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - local.get $0 - i32.const 65535 - i32.and - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - local.get $1 - i32.const 4 - i32.eq - br_if $case4|0 - local.get $1 - i32.const 5 - i32.eq - br_if $case5|0 - local.get $1 - i32.const 6 - i32.eq - br_if $case6|0 - local.get $1 - i32.const 7 - i32.eq - br_if $case7|0 - local.get $1 - i32.const 8 - i32.eq - br_if $case8|0 - local.get $1 - i32.const 9 - i32.eq - br_if $case9|0 - local.get $1 - i32.const 10 - i32.eq - br_if $case10|0 - local.get $1 - i32.const 11 - i32.eq - br_if $case11|0 - local.get $1 - i32.const 12 - i32.eq - br_if $case12|0 - local.get $1 - i32.const 13 - i32.eq - br_if $case13|0 - local.get $1 - i32.const 14 - i32.eq - br_if $case14|0 - local.get $1 - i32.const 15 - i32.eq - br_if $case15|0 - local.get $1 - i32.const 16 - i32.eq - br_if $case16|0 - local.get $1 - i32.const 17 - i32.eq - br_if $case17|0 - local.get $1 - i32.const 18 - i32.eq - br_if $case18|0 - local.get $1 - i32.const 19 - i32.eq - br_if $case19|0 - local.get $1 - i32.const 20 - i32.eq - br_if $case20|0 - local.get $1 - i32.const 21 - i32.eq - br_if $case21|0 - local.get $1 - i32.const 22 - i32.eq - br_if $case22|0 - local.get $1 - i32.const 23 - i32.eq - br_if $case23|0 - local.get $1 - i32.const 24 - i32.eq - br_if $case24|0 - local.get $1 - i32.const 25 - i32.eq - br_if $case25|0 - local.get $1 - i32.const 26 - i32.eq - br_if $case26|0 - local.get $1 - i32.const 27 - i32.eq - br_if $case27|0 - local.get $1 - i32.const 28 - i32.eq - br_if $case28|0 - local.get $1 - i32.const 29 - i32.eq - br_if $case29|0 - local.get $1 - i32.const 30 - i32.eq - br_if $case30|0 - local.get $1 - i32.const 31 - i32.eq - br_if $case31|0 - local.get $1 - i32.const 32 - i32.eq - br_if $case32|0 - local.get $1 - i32.const 33 - i32.eq - br_if $case33|0 - local.get $1 - i32.const 34 - i32.eq - br_if $case34|0 - local.get $1 - i32.const 35 - i32.eq - br_if $case35|0 - local.get $1 - i32.const 36 - i32.eq - br_if $case36|0 - local.get $1 - i32.const 37 - i32.eq - br_if $case37|0 - local.get $1 - i32.const 38 - i32.eq - br_if $case38|0 - local.get $1 - i32.const 39 - i32.eq - br_if $case39|0 - local.get $1 - i32.const 40 - i32.eq - br_if $case40|0 - local.get $1 - i32.const 41 - i32.eq - br_if $case41|0 - local.get $1 - i32.const 42 - i32.eq - br_if $case42|0 - local.get $1 - i32.const 43 - i32.eq - br_if $case43|0 - local.get $1 - i32.const 44 - i32.eq - br_if $case44|0 - local.get $1 - i32.const 45 - i32.eq - br_if $case45|0 - local.get $1 - i32.const 46 - i32.eq - br_if $case46|0 - local.get $1 - i32.const 47 - i32.eq - br_if $case47|0 - local.get $1 - i32.const 48 - i32.eq - br_if $case48|0 - local.get $1 - i32.const 49 - i32.eq - br_if $case49|0 - local.get $1 - i32.const 50 - i32.eq - br_if $case50|0 - local.get $1 - i32.const 51 - i32.eq - br_if $case51|0 - local.get $1 - i32.const 52 - i32.eq - br_if $case52|0 - local.get $1 - i32.const 53 - i32.eq - br_if $case53|0 - local.get $1 - i32.const 54 - i32.eq - br_if $case54|0 - local.get $1 - i32.const 55 - i32.eq - br_if $case55|0 - local.get $1 - i32.const 56 - i32.eq - br_if $case56|0 - local.get $1 - i32.const 57 - i32.eq - br_if $case57|0 - local.get $1 - i32.const 58 - i32.eq - br_if $case58|0 - local.get $1 - i32.const 59 - i32.eq - br_if $case59|0 - local.get $1 - i32.const 60 - i32.eq - br_if $case60|0 - local.get $1 - i32.const 61 - i32.eq - br_if $case61|0 - local.get $1 - i32.const 62 - i32.eq - br_if $case62|0 - local.get $1 - i32.const 63 - i32.eq - br_if $case63|0 - local.get $1 - i32.const 64 - i32.eq - br_if $case64|0 - local.get $1 - i32.const 65 - i32.eq - br_if $case65|0 - local.get $1 - i32.const 66 - i32.eq - br_if $case66|0 - local.get $1 - i32.const 67 - i32.eq - br_if $case67|0 - local.get $1 - i32.const 68 - i32.eq - br_if $case68|0 - local.get $1 - i32.const 69 - i32.eq - br_if $case69|0 - local.get $1 - i32.const 70 - i32.eq - br_if $case70|0 - local.get $1 - i32.const 71 - i32.eq - br_if $case71|0 - local.get $1 - i32.const 72 - i32.eq - br_if $case72|0 - local.get $1 - i32.const 73 - i32.eq - br_if $case73|0 - local.get $1 - i32.const 74 - i32.eq - br_if $case74|0 - local.get $1 - i32.const 75 - i32.eq - br_if $case75|0 - local.get $1 - i32.const 76 - i32.eq - br_if $case76|0 - br $break|0 - end - i32.const 4416 - return - end - i32.const 4464 - return - end - i32.const 4496 - return - end - i32.const 4528 - return - end - i32.const 4576 - return - end - i32.const 4624 - return - end - i32.const 4672 - return - end - i32.const 4704 - return - end - i32.const 4752 - return - end - i32.const 4784 - return - end - i32.const 4816 - return - end - i32.const 4848 - return - end - i32.const 4896 - return - end - i32.const 4928 - return - end - i32.const 4976 - return - end - i32.const 5024 - return - end - i32.const 5072 - return - end - i32.const 5104 - return - end - i32.const 5152 - return - end - i32.const 5184 - return - end - i32.const 5216 - return - end - i32.const 5248 - return - end - i32.const 5280 - return - end - i32.const 5312 - return - end - i32.const 5360 - return - end - i32.const 5392 - return - end - i32.const 5424 - return - end - i32.const 5472 - return - end - i32.const 5504 - return - end - i32.const 5536 - return - end - i32.const 5568 - return - end - i32.const 5600 - return - end - i32.const 5632 - return - end - i32.const 5664 - return - end - i32.const 5696 - return - end - i32.const 5728 - return - end - i32.const 5776 - return - end - i32.const 5824 - return - end - i32.const 5872 - return - end - i32.const 5920 - return - end - i32.const 5968 - return - end - i32.const 6016 - return - end - i32.const 6048 - return - end - i32.const 6080 - return - end - i32.const 6112 - return - end - i32.const 6144 - return - end - i32.const 6176 - return - end - i32.const 6208 - return - end - i32.const 6240 - return - end - i32.const 6272 - return - end - i32.const 6304 - return - end - i32.const 6352 - return - end - i32.const 6384 - return - end - i32.const 6416 - return - end - i32.const 6464 - return - end - i32.const 6496 - return - end - i32.const 6544 - return - end - i32.const 6592 - return - end - i32.const 6640 - return - end - i32.const 6672 - return - end - i32.const 6704 - return - end - i32.const 6736 - return - end - i32.const 6784 - return - end - i32.const 6832 - return - end - i32.const 6864 - return - end - i32.const 6896 - return - end - i32.const 6928 - return - end - i32.const 6976 - return - end - i32.const 7024 - return - end - i32.const 7056 - return - end - i32.const 7088 - return - end - i32.const 7120 - return - end - i32.const 7152 - return - end - i32.const 7184 - return - end - i32.const 7232 - return - end - i32.const 7264 - return - end - i32.const 7296 - return - end - i32.const 7344 - return - ) - (func $~lib/string/String.UTF8.byteLength (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.set $2 - local.get $2 - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/common/OBJECT#get:rtSize - i32.add - local.set $3 - local.get $1 - i32.const 0 - i32.ne - local.set $4 - block $while-break|0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - local.get $2 - i32.load16_u - local.set $5 - local.get $5 - i32.const 128 - i32.lt_u - if - local.get $1 - local.get $5 - i32.eqz - i32.and - if - br $while-break|0 - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - else - local.get $5 - i32.const 2048 - i32.lt_u - if - local.get $4 - i32.const 2 - i32.add - local.set $4 - else - local.get $5 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - if (result i32) - local.get $2 - i32.const 2 - i32.add - local.get $3 - i32.lt_u - else - i32.const 0 - end - if - local.get $2 - i32.load16_u offset=2 - i32.const 64512 - i32.and - i32.const 56320 - i32.eq - if - local.get $4 - i32.const 4 - i32.add - local.set $4 - local.get $2 - i32.const 4 - i32.add - local.set $2 - br $while-continue|0 - end - end - local.get $4 - i32.const 3 - i32.add - local.set $4 - end - end - local.get $2 - i32.const 2 - i32.add - local.set $2 - br $while-continue|0 - end - end - end - local.get $4 - return - ) - (func $~lib/rt/__visit_globals (param $0 i32) - (local $1 i32) - global.get $assembly/test/y - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - i32.const 944 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 1664 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 7600 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 752 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 416 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 3024 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 4080 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 32 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 64 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 96 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 128 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 160 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 192 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 224 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 256 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 288 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 320 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 352 - local.get $0 - call $~lib/rt/itcms/__visit - i32.const 384 - local.get $0 - call $~lib/rt/itcms/__visit - global.get $~lib/as-console/assembly/index/counts - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $~lib/as-console/assembly/index/timers - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $~lib/as-console/assembly/index/indent - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $~lib/@hypercubed/as-mpz/assembly/index/MpZ.ZERO - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $~lib/@hypercubed/as-mpz/assembly/index/MpZ.ONE - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TWO - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TEN - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $~lib/table-as/assembly/index/padding - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - global.get $~lib/table-as/assembly/index/fmt - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/rt/itcms/__visit - end - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - ) - (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) - ) - (func $~lib/as-variant/assembly/index/Variant#get:discriminator (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $~lib/as-variant/assembly/index/Variant~visit (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - local.get $1 - call $~lib/as-variant/assembly/index/Variant#__visit - ) - (func $~lib/@hypercubed/as-mpz/assembly/index/MpZ~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - i32.load offset=4 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - ) - (func $~lib/table-as/assembly/types/TableStructure~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=4 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=8 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=12 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=16 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=20 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=24 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=28 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=32 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=36 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=40 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=44 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=48 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=52 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=56 - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - ) - (func $"~lib/map/Map<~lib/string/String,u32>#get:buckets" (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $"~lib/map/Map<~lib/string/String,u32>#get:entries" (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - ) - (func $"~lib/map/Map<~lib/string/String,u32>#get:entriesOffset" (param $0 i32) (result i32) - local.get $0 - i32.load offset=16 - ) - (func $"~lib/map/MapEntry<~lib/string/String,u32>#get:taggedNext" (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - ) - (func $"~lib/map/MapEntry<~lib/string/String,u32>#get:key" (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $"~lib/map/Map<~lib/string/String,u32>~visit" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - local.get $1 - call $"~lib/map/Map<~lib/string/String,u32>#__visit" - ) - (func $"~lib/map/Map<~lib/string/String,u64>~visit" (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - local.get $1 - call $"~lib/map/Map<~lib/string/String,u64>#__visit" - ) - (func $assembly/test/Yo~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 1 - drop - local.get $0 - local.set $2 - local.get $2 - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/common/OBJECT#get:rtSize - i32.add - local.set $3 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - local.get $2 - i32.load - local.set $4 - local.get $4 - if - local.get $4 - local.get $1 - call $~lib/rt/itcms/__visit - end - local.get $2 - i32.const 4 - i32.add - local.set $2 - br $while-continue|0 - end - end - ) - (func $~lib/staticarray/StaticArray<~lib/string/String>~visit (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - local.get $1 - call $~lib/staticarray/StaticArray<~lib/string/String>#__visit - ) - (func $~lib/json-as/assembly/sink/Sink~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - end - ) - (func $~lib/array/Array<~lib/string/String>#get:buffer (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/string/String>#__visit - ) - (func $~lib/array/Array#get:buffer (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - local.get $1 - call $~lib/array/Array#__visit - ) - (func $~lib/array/Array#get:buffer (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/object/Object~visit - local.get $0 - local.get $1 - call $~lib/array/Array#__visit - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array<~lib/string/String> - block $~lib/json-as/assembly/sink/Sink - block $~lib/date/Date - block $~lib/wasi_date/wasi_Date - block $~lib/staticarray/StaticArray<~lib/string/String> - block $assembly/test/Yo - block $"~lib/map/Map<~lib/string/String,u64>" - block $"~lib/map/Map<~lib/string/String,u32>" - block $~lib/table-as/assembly/types/TableStructure - block $~lib/json-as/assembly/index/JSON.Value - block $~lib/staticarray/StaticArray - block $~lib/@hypercubed/as-mpz/assembly/index/MpZ - block $~lib/as-variant/assembly/index/Variant - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - block $~lib/object/Object - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/as-variant/assembly/index/Variant $~lib/@hypercubed/as-mpz/assembly/index/MpZ $~lib/staticarray/StaticArray $~lib/json-as/assembly/index/JSON.Value $~lib/table-as/assembly/types/TableStructure $"~lib/map/Map<~lib/string/String,u32>" $"~lib/map/Map<~lib/string/String,u64>" $assembly/test/Yo $~lib/staticarray/StaticArray<~lib/string/String> $~lib/wasi_date/wasi_Date $~lib/date/Date $~lib/json-as/assembly/sink/Sink $~lib/array/Array<~lib/string/String> $~lib/array/Array $~lib/array/Array $invalid - end - return - end - return - end - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - local.get $0 - local.get $1 - call $~lib/as-variant/assembly/index/Variant~visit - return - end - local.get $0 - local.get $1 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ~visit - return - end - return - end - return - end - local.get $0 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure~visit - return - end - local.get $0 - local.get $1 - call $"~lib/map/Map<~lib/string/String,u32>~visit" - return - end - local.get $0 - local.get $1 - call $"~lib/map/Map<~lib/string/String,u64>~visit" - return - end - local.get $0 - local.get $1 - call $assembly/test/Yo~visit - return - end - local.get $0 - local.get $1 - call $~lib/staticarray/StaticArray<~lib/string/String>~visit - return - end - return - end - return - end - local.get $0 - local.get $1 - call $~lib/json-as/assembly/sink/Sink~visit - return - end - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/string/String>~visit - return - end - local.get $0 - local.get $1 - call $~lib/array/Array~visit - return - end - local.get $0 - local.get $1 - call $~lib/array/Array~visit - return - end - unreachable - ) - (func $~start - global.get $~started - if - return - end - i32.const 1 - global.set $~started - call $start:assembly/test - ) - (func $~stack_check - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__data_end - i32.lt_s - if - i32.const 40864 - i32.const 40912 - i32.const 1 - i32.const 1 - call $~lib/wasi_internal/wasi_abort - unreachable - end - ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - return - end - local.get $0 - i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $1 - i32.const 0 - i32.eq - end - if - i32.const 0 - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - return - end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/string/String#get:length - i32.ne - if - i32.const 0 - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - return - end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - i32.const 0 - local.get $1 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=4 - local.get $3 - i32.const 0 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - return - ) - (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - local.get $1 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=4 - local.get $2 - call $~lib/string/String.__eq - i32.eqz - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $2 - return - ) - (func $~lib/wasi_internal/wasi_abort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const 0 - i32.const 12 - call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf - i32.const 12 - local.set $4 - local.get $4 - i64.const 9071471065260641 - i64.store - local.get $4 - i32.const 7 - i32.add - local.set $4 - local.get $0 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - i32.const 0 - call $~lib/string/String.__ne - if - local.get $4 - local.get $0 - local.get $0 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - call $~lib/string/String#get:length - local.get $4 - i32.const 0 - i32.const 3 - global.set $~argumentsLength - i32.const 0 - call $~lib/string/String.UTF8.encodeUnsafe@varargs - i32.add - local.set $4 - end - local.get $4 - i32.const 544106784 - i32.store - local.get $4 - i32.const 4 - i32.add - local.set $4 - local.get $1 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - i32.const 0 - call $~lib/string/String.__ne - if - local.get $4 - local.get $1 - local.get $1 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - call $~lib/string/String#get:length - local.get $4 - i32.const 0 - i32.const 3 - global.set $~argumentsLength - i32.const 0 - call $~lib/string/String.UTF8.encodeUnsafe@varargs - i32.add - local.set $4 - end - local.get $4 - local.tee $5 - i32.const 1 - i32.add - local.set $4 - local.get $5 - i32.const 40 - i32.store8 - local.get $2 - call $~lib/util/number/decimalCount32 - local.set $6 - local.get $4 - local.get $6 - i32.add - local.set $4 - loop $do-loop|0 - local.get $2 - i32.const 10 - i32.div_u - local.set $7 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - i32.const 48 - local.get $2 - i32.const 10 - i32.rem_u - i32.add - i32.store8 - local.get $7 - local.set $2 - local.get $2 - br_if $do-loop|0 - end - local.get $4 - local.get $6 - i32.add - local.set $4 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - i32.const 58 - i32.store8 - local.get $3 - call $~lib/util/number/decimalCount32 - local.set $6 - local.get $4 - local.get $6 - i32.add - local.set $4 - loop $do-loop|1 - local.get $3 - i32.const 10 - i32.div_u - local.set $9 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - i32.const 48 - local.get $3 - i32.const 10 - i32.rem_u - i32.add - i32.store8 - local.get $9 - local.set $3 - local.get $3 - br_if $do-loop|1 - end - local.get $4 - local.get $6 - i32.add - local.set $4 - local.get $4 - i32.const 2601 - i32.store16 - local.get $4 - i32.const 2 - i32.add - local.set $4 - i32.const 0 - local.get $4 - i32.const 12 - i32.sub - call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf_len - i32.const 2 - i32.const 0 - i32.const 1 - i32.const 8 - call $~lib/bindings/wasi_snapshot_preview1/fd_write - drop - i32.const 255 - call $~lib/bindings/wasi_snapshot_preview1/proc_exit - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.const 5 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - i32.const 0 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_sgn_size - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - i32.const 0 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_data - local.get $1 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - call $~lib/staticarray/StaticArray#get:length - i32.const 0 - i32.gt_s - i32.eqz - if - i32.const 528 - i32.const 608 - i32.const 159 - i32.const 5 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $1 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - call $~lib/staticarray/StaticArray#get:length - local.set $3 - loop $while-continue|0 - local.get $3 - i32.const 1 - i32.gt_s - if (result i32) - local.get $1 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - local.get $3 - i32.const 1 - i32.sub - call $~lib/staticarray/StaticArray#__uget - i32.const 0 - i32.eq - else - i32.const 0 - end - if - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|0 - end - end - local.get $3 - i32.const 0 - i32.eq - if - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - i32.const 4 - i32.const 6 - i32.const 720 - call $~lib/rt/__newBuffer - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=8 - local.get $5 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_data - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - i32.const 1 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_sgn_size - else - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - local.get $1 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=8 - local.get $5 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_data - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - local.get $2 - if (result i32) - i32.const 0 - local.get $3 - i32.sub - else - local.get $3 - end - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_sgn_size - end - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $5 - ) - (func $start:~lib/@hypercubed/as-mpz/assembly/index - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - memory.size - i32.const 16 - i32.shl - global.get $~lib/memory/__heap_base - i32.sub - i32.const 1 - i32.shr_u - global.set $~lib/rt/itcms/threshold - i32.const 864 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/pinSpace - i32.const 896 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/toSpace - i32.const 1040 - call $~lib/rt/itcms/initLazy - global.set $~lib/rt/itcms/fromSpace - i32.const 0 - i32.const 4 - i32.const 6 - i32.const 1152 - call $~lib/rt/__newBuffer - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - i32.const 0 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor - global.set $~lib/@hypercubed/as-mpz/assembly/index/MpZ.ZERO - i32.const 0 - i32.const 4 - i32.const 6 - i32.const 1184 - call $~lib/rt/__newBuffer - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - i32.const 0 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor - global.set $~lib/@hypercubed/as-mpz/assembly/index/MpZ.ONE - i32.const 0 - i32.const 4 - i32.const 6 - i32.const 1216 - call $~lib/rt/__newBuffer - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - i32.const 0 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor - global.set $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TWO - i32.const 0 - i32.const 4 - i32.const 6 - i32.const 1248 - call $~lib/rt/__newBuffer - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - i32.const 0 - call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor - global.set $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TEN - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/table-as/assembly/types/TableStructure#constructor (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 60 - i32.const 8 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - call $~lib/object/Object#constructor - local.tee $0 - i32.store - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1312 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:topBody - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1344 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:topJoin - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1376 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:topLeft - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1408 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:topRight - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1312 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:bottomBody - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1440 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:bottomJoin - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1472 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:bottomLeft - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1504 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:bottomRight - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1536 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:bodyLeft - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1536 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:bodyRight - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1536 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:bodyJoin - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1312 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:joinBody - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1568 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:joinLeft - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1600 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:joinRight - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 1632 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $~lib/table-as/assembly/types/TableStructure#set:joinJoin - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - ) - (func $"~lib/map/Map<~lib/string/String,u32>#constructor" (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.const 9 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $"~lib/map/Map<~lib/string/String,u32>#set:buckets" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 4 - i32.const 1 - i32.sub - call $"~lib/map/Map<~lib/string/String,u32>#set:bucketsMask" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.const 4 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u32>|inlined.0" (result i32) - i32.const 12 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u32>|inlined.0" - end - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $"~lib/map/Map<~lib/string/String,u32>#set:entries" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 4 - call $"~lib/map/Map<~lib/string/String,u32>#set:entriesCapacity" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - call $"~lib/map/Map<~lib/string/String,u32>#set:entriesOffset" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - call $"~lib/map/Map<~lib/string/String,u32>#set:entriesCount" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - ) - (func $"~lib/map/Map<~lib/string/String,u64>#constructor" (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.const 10 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $"~lib/map/Map<~lib/string/String,u64>#set:buckets" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 4 - i32.const 1 - i32.sub - call $"~lib/map/Map<~lib/string/String,u64>#set:bucketsMask" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.const 4 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.0" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.0" - end - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $"~lib/map/Map<~lib/string/String,u64>#set:entries" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 4 - call $"~lib/map/Map<~lib/string/String,u64>#set:entriesCapacity" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - call $"~lib/map/Map<~lib/string/String,u64>#set:entriesOffset" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - call $"~lib/map/Map<~lib/string/String,u64>#set:entriesCount" - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - ) - (func $assembly/test/Yo#constructor (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.const 11 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - call $assembly/test/Yo#set:map - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - call $"~lib/map/Map<~lib/string/String,u64>#constructor" - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - call $assembly/test/Yo#set:map - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - ) - (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - i32.const 1 - drop - block $~lib/util/hash/hashStr|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $0 - local.tee $1 - i32.store - local.get $1 - i32.const 0 - i32.eq - if - i32.const 0 - br $~lib/util/hash/hashStr|inlined.0 - end - local.get $1 - local.set $19 - global.get $~lib/memory/__stack_pointer - local.get $19 - i32.store offset=4 - local.get $19 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $2 - local.get $2 - local.set $3 - local.get $1 - local.set $4 - local.get $3 - i32.const 16 - i32.ge_u - if - i32.const 0 - i32.const -1640531535 - i32.add - i32.const -2048144777 - i32.add - local.set $5 - i32.const 0 - i32.const -2048144777 - i32.add - local.set $6 - i32.const 0 - local.set $7 - i32.const 0 - i32.const -1640531535 - i32.sub - local.set $8 - local.get $3 - local.get $4 - i32.add - i32.const 16 - i32.sub - local.set $9 - loop $while-continue|0 - local.get $4 - local.get $9 - i32.le_u - if - block $~lib/util/hash/mix|inlined.0 (result i32) - local.get $5 - local.set $10 - local.get $4 - i32.load - local.set $11 - local.get $10 - local.get $11 - i32.const -2048144777 - i32.mul - i32.add - i32.const 13 - i32.rotl - i32.const -1640531535 - i32.mul - br $~lib/util/hash/mix|inlined.0 - end - local.set $5 - block $~lib/util/hash/mix|inlined.1 (result i32) - local.get $6 - local.set $12 - local.get $4 - i32.load offset=4 - local.set $13 - local.get $12 - local.get $13 - i32.const -2048144777 - i32.mul - i32.add - i32.const 13 - i32.rotl - i32.const -1640531535 - i32.mul - br $~lib/util/hash/mix|inlined.1 - end - local.set $6 - block $~lib/util/hash/mix|inlined.2 (result i32) - local.get $7 - local.set $14 - local.get $4 - i32.load offset=8 - local.set $15 - local.get $14 - local.get $15 - i32.const -2048144777 - i32.mul - i32.add - i32.const 13 - i32.rotl - i32.const -1640531535 - i32.mul - br $~lib/util/hash/mix|inlined.2 - end - local.set $7 - block $~lib/util/hash/mix|inlined.3 (result i32) - local.get $8 - local.set $16 - local.get $4 - i32.load offset=12 - local.set $17 - local.get $16 - local.get $17 - i32.const -2048144777 - i32.mul - i32.add - i32.const 13 - i32.rotl - i32.const -1640531535 - i32.mul - br $~lib/util/hash/mix|inlined.3 - end - local.set $8 - local.get $4 - i32.const 16 - i32.add - local.set $4 - br $while-continue|0 - end - end - local.get $2 - local.get $5 - i32.const 1 - i32.rotl - local.get $6 - i32.const 7 - i32.rotl - i32.add - local.get $7 - i32.const 12 - i32.rotl - i32.add - local.get $8 - i32.const 18 - i32.rotl - i32.add - i32.add - local.set $2 - else - local.get $2 - i32.const 0 - i32.const 374761393 - i32.add - i32.add - local.set $2 - end - local.get $1 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $18 - loop $while-continue|1 - local.get $4 - local.get $18 - i32.le_u - if - local.get $2 - local.get $4 - i32.load - i32.const -1028477379 - i32.mul - i32.add - local.set $2 - local.get $2 - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.set $2 - local.get $4 - i32.const 4 - i32.add - local.set $4 - br $while-continue|1 - end - end - local.get $1 - local.get $3 - i32.add - local.set $18 - loop $while-continue|2 - local.get $4 - local.get $18 - i32.lt_u - if - local.get $2 - local.get $4 - i32.load8_u - i32.const 374761393 - i32.mul - i32.add - local.set $2 - local.get $2 - i32.const 11 - i32.rotl - i32.const -1640531535 - i32.mul - local.set $2 - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $while-continue|2 - end - end - local.get $2 - local.get $2 - i32.const 15 - i32.shr_u - i32.xor - local.set $2 - local.get $2 - i32.const -2048144777 - i32.mul - local.set $2 - local.get $2 - local.get $2 - i32.const 13 - i32.shr_u - i32.xor - local.set $2 - local.get $2 - i32.const -1028477379 - i32.mul - local.set $2 - local.get $2 - local.get $2 - i32.const 16 - i32.shr_u - i32.xor - local.set $2 - local.get $2 - br $~lib/util/hash/hashStr|inlined.0 - end - local.set $19 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $19 - return - ) - (func $"~lib/map/Map<~lib/string/String,u64>#find" (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 - call $"~lib/map/Map<~lib/string/String,u64>#get:buckets" - local.get $2 - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 - call $"~lib/map/Map<~lib/string/String,u64>#get:bucketsMask" - i32.and - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - if - local.get $3 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:taggedNext" - local.set $4 - local.get $4 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:key" - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 - local.get $1 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - call $~lib/string/String.__eq - else - i32.const 0 - end - if - local.get $3 - local.set $5 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $5 - return - end - local.get $4 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - local.set $5 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $5 - return - ) - (func $"~lib/map/Map<~lib/string/String,u64>#rehash" (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 20 - memory.fill - local.get $1 - i32.const 1 - i32.add - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 - i32.store - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $4 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.1" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.1" - end - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 - i32.store offset=4 - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=8 - local.get $14 - call $"~lib/map/Map<~lib/string/String,u64>#get:entries" - local.set $6 - local.get $6 - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=8 - local.get $14 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesOffset" - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.2" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.2" - end - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - if - local.get $6 - local.set $9 - local.get $9 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:taggedNext" - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $9 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:key" - local.tee $11 - i32.store offset=12 - local.get $10 - local.get $11 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=8 - local.get $14 - call $"~lib/map/MapEntry<~lib/string/String,u64>#set:key" - local.get $10 - local.get $9 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:value" - call $"~lib/map/MapEntry<~lib/string/String,u64>#set:value" - local.get $11 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=8 - local.get $14 - call $~lib/util/hash/HASH<~lib/string/String> - local.get $1 - i32.and - local.set $12 - local.get $3 - local.get $12 - i32.const 4 - i32.mul - i32.add - local.set $13 - local.get $10 - local.get $13 - i32.load - call $"~lib/map/MapEntry<~lib/string/String,u64>#set:taggedNext" - local.get $13 - local.get $8 - i32.store - local.get $8 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.3" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.3" - end - i32.add - local.set $8 - end - local.get $6 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.4" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.4" - end - i32.add - local.set $6 - br $while-continue|0 - end - end - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=8 - local.get $14 - local.get $3 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=16 - local.get $14 - call $"~lib/map/Map<~lib/string/String,u64>#set:buckets" - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=8 - local.get $14 - local.get $1 - call $"~lib/map/Map<~lib/string/String,u64>#set:bucketsMask" - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=8 - local.get $14 - local.get $5 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=16 - local.get $14 - call $"~lib/map/Map<~lib/string/String,u64>#set:entries" - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=8 - local.get $14 - local.get $4 - call $"~lib/map/Map<~lib/string/String,u64>#set:entriesCapacity" - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=8 - local.get $14 - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store offset=16 - local.get $14 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesCount" - call $"~lib/map/Map<~lib/string/String,u64>#set:entriesOffset" - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $"~lib/map/Map<~lib/string/String,u64>#set" (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 - local.get $1 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $~lib/util/hash/HASH<~lib/string/String> - local.set $3 - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $1 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - local.get $3 - call $"~lib/map/Map<~lib/string/String,u64>#find" - local.set $4 - local.get $4 - if - local.get $4 - local.get $2 - call $"~lib/map/MapEntry<~lib/string/String,u64>#set:value" - i32.const 0 - drop - else - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesOffset" - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesCapacity" - i32.eq - if - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesCount" - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesCapacity" - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i32) - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:bucketsMask" - else - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:bucketsMask" - i32.const 1 - i32.shl - i32.const 1 - i32.or - end - call $"~lib/map/Map<~lib/string/String,u64>#rehash" - end - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entries" - local.tee $5 - i32.store offset=8 - local.get $5 - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesOffset" - local.tee $6 - i32.const 1 - i32.add - call $"~lib/map/Map<~lib/string/String,u64>#set:entriesOffset" - local.get $6 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.5" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.5" - end - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/MapEntry<~lib/string/String,u64>#set:key" - i32.const 1 - drop - local.get $0 - local.get $1 - i32.const 1 - call $~lib/rt/itcms/__link - local.get $4 - local.get $2 - call $"~lib/map/MapEntry<~lib/string/String,u64>#set:value" - i32.const 0 - drop - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesCount" - i32.const 1 - i32.add - call $"~lib/map/Map<~lib/string/String,u64>#set:entriesCount" - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:buckets" - local.get $3 - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:bucketsMask" - i32.and - i32.const 4 - i32.mul - i32.add - local.set $7 - local.get $4 - local.get $7 - i32.load - call $"~lib/map/MapEntry<~lib/string/String,u64>#set:taggedNext" - local.get $7 - local.get $4 - i32.store - end - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $8 - return - ) - (func $~lib/json-as/assembly/sink/Sink#constructor (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.const 15 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#set:buffer - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#set:offset - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - ) - (func $~lib/json-as/assembly/sink/Sink.fromString (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#constructor - local.tee $2 - i32.store - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $3 - local.get $2 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - local.get $3 - local.tee $6 - global.get $~lib/json-as/assembly/sink/MIN_BUFFER_SIZE - local.tee $4 - local.get $1 - i32.const 1 - i32.shl - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - local.tee $7 - local.get $6 - local.get $7 - i32.gt_u - select - i32.const 1 - call $~lib/rt/itcms/__new - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=8 - local.get $8 - call $~lib/json-as/assembly/sink/Sink#set:buffer - local.get $3 - if - local.get $2 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - call $~lib/json-as/assembly/sink/Sink#get:buffer - local.get $0 - local.get $3 - memory.copy - local.get $2 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=4 - local.get $8 - local.get $2 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=8 - local.get $8 - call $~lib/json-as/assembly/sink/Sink#get:offset - local.get $3 - i32.add - call $~lib/json-as/assembly/sink/Sink#set:offset - end - local.get $2 - local.set $8 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $8 - return - ) - (func $~lib/json-as/assembly/sink/Sink.fromString@varargs (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~argumentsLength - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 1776 - local.tee $0 - i32.store - end - global.get $~lib/json-as/assembly/sink/MIN_BUFFER_LEN - local.set $1 - end - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/json-as/assembly/sink/Sink.fromString - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $2 - ) - (func $"~lib/map/Map<~lib/string/String,u64>#get:size" (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store - local.get $1 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesCount" - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - return - ) - (func $~lib/array/Array<~lib/string/String>#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.const 16 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - i32.const 0 - call $~lib/array/Array<~lib/string/String>#set:buffer - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - i32.const 0 - call $~lib/array/Array<~lib/string/String>#set:dataStart - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - i32.const 0 - call $~lib/array/Array<~lib/string/String>#set:byteLength - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - i32.const 0 - call $~lib/array/Array<~lib/string/String>#set:length_ - local.get $1 - i32.const 1073741820 - i32.const 2 - i32.shr_u - i32.gt_u - if - i32.const 1664 - i32.const 2160 - i32.const 70 - i32.const 60 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $1 - local.tee $2 - i32.const 8 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.const 2 - i32.shl - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $5 - i32.store offset=8 - i32.const 2 - global.get $~lib/shared/runtime/Runtime.Incremental - i32.ne - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $5 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=12 - local.get $6 - call $~lib/array/Array<~lib/string/String>#set:buffer - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $5 - call $~lib/array/Array<~lib/string/String>#set:dataStart - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $4 - call $~lib/array/Array<~lib/string/String>#set:byteLength - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/array/Array<~lib/string/String>#set:length_ - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store - local.get $14 - call $~lib/arraybuffer/ArrayBufferView#get:byteLength - local.set $4 - local.get $1 - local.get $4 - local.get $2 - i32.shr_u - i32.gt_u - if - local.get $1 - i32.const 1073741820 - local.get $2 - i32.shr_u - i32.gt_u - if - i32.const 1664 - i32.const 2160 - i32.const 19 - i32.const 48 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $0 - local.set $14 - global.get $~lib/memory/__stack_pointer - local.get $14 - i32.store - local.get $14 - call $~lib/arraybuffer/ArrayBufferView#get:buffer - local.set $5 - local.get $1 - local.tee $6 - i32.const 8 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_u - select - local.get $2 - i32.shl - local.set $8 - local.get $3 - if - local.get $4 - i32.const 1 - i32.shl - local.tee $9 - i32.const 1073741820 - local.tee $10 - local.get $9 - local.get $10 - i32.lt_u - select - local.tee $11 - local.get $8 - local.tee $12 - local.get $11 - local.get $12 - i32.gt_u - select - local.set $8 - end - local.get $5 - local.get $8 - call $~lib/rt/itcms/__renew - local.set $13 - i32.const 2 - global.get $~lib/shared/runtime/Runtime.Incremental - i32.ne - drop - local.get $13 - local.get $5 - i32.ne - if - local.get $0 - local.get $13 - i32.store - local.get $0 - local.get $13 - i32.store offset=4 - local.get $0 - local.get $13 - i32.const 0 - call $~lib/rt/itcms/__link - end - local.get $0 - local.get $8 - i32.store offset=8 - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/array/Array<~lib/string/String>#__set (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/array/Array<~lib/string/String>#get:length_ - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 944 - i32.const 2160 - i32.const 130 - i32.const 22 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.const 1 - call $~lib/array/ensureCapacity - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array<~lib/string/String>#set:length_ - end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/array/Array<~lib/string/String>#get:dataStart - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - i32.const 1 - drop - local.get $0 - local.get $2 - i32.const 1 - call $~lib/rt/itcms/__link - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/array/Array<~lib/string/String>#set:length (param $0 i32) (param $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.const 2 - i32.const 0 - call $~lib/array/ensureCapacity - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - local.get $1 - call $~lib/array/Array<~lib/string/String>#set:length_ - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $"~lib/map/Map<~lib/string/String,u64>#keys" (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entries" - local.set $1 - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesOffset" - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array<~lib/string/String>#constructor - local.tee $3 - i32.store offset=4 - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - if - local.get $1 - local.get $5 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.6" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.6" - end - i32.mul - i32.add - local.set $6 - local.get $6 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:taggedNext" - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - local.get $6 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:key" - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store offset=8 - local.get $8 - call $~lib/array/Array<~lib/string/String>#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $4 - call $~lib/array/Array<~lib/string/String>#set:length - local.get $3 - local.set $8 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $8 - return - ) - (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.const 17 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - i32.const 0 - call $~lib/array/Array#set:buffer - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - i32.const 0 - call $~lib/array/Array#set:dataStart - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - i32.const 0 - call $~lib/array/Array#set:byteLength - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - i32.const 0 - call $~lib/array/Array#set:length_ - local.get $1 - i32.const 1073741820 - i32.const 3 - i32.shr_u - i32.gt_u - if - i32.const 1664 - i32.const 2160 - i32.const 70 - i32.const 60 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $1 - local.tee $2 - i32.const 8 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.const 3 - i32.shl - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $5 - i32.store offset=8 - i32.const 2 - global.get $~lib/shared/runtime/Runtime.Incremental - i32.ne - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $5 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=12 - local.get $6 - call $~lib/array/Array#set:buffer - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $5 - call $~lib/array/Array#set:dataStart - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $4 - call $~lib/array/Array#set:byteLength - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/array/Array#set:length_ - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/array/Array#get:length_ - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 944 - i32.const 2160 - i32.const 130 - i32.const 22 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 3 - i32.const 1 - call $~lib/array/ensureCapacity - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ - end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/array/Array#get:dataStart - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - i64.store - i32.const 0 - drop - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.const 3 - i32.const 0 - call $~lib/array/ensureCapacity - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - local.get $1 - call $~lib/array/Array#set:length_ - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $"~lib/map/Map<~lib/string/String,u64>#values" (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entries" - local.set $1 - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesOffset" - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store offset=4 - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - if - local.get $1 - local.get $5 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.7" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.7" - end - i32.mul - i32.add - local.set $6 - local.get $6 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:taggedNext" - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - local.get $6 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:value" - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - local.set $8 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $8 - return - ) - (func $~lib/array/Array<~lib/string/String>#__uget (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - call $~lib/array/Array<~lib/string/String>#get:dataStart - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $2 - return - ) - (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $2 - local.get $1 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $3 - local.get $2 - local.get $3 - i32.add - local.set $4 - local.get $4 - i32.const 0 - i32.eq - if - i32.const 1776 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - return - end - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $5 - i32.store offset=4 - local.get $5 - local.get $0 - local.get $2 - memory.copy - local.get $5 - local.get $2 - i32.add - local.get $1 - local.get $3 - memory.copy - local.get $5 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - return - ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - local.get $1 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=4 - local.get $2 - call $~lib/string/String#concat - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $2 - return - ) - (func $~lib/json-as/assembly/sink/Sink#ensureCapacity (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - call $~lib/json-as/assembly/sink/Sink#get:buffer - local.tee $2 - i32.store offset=4 - local.get $0 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - call $~lib/json-as/assembly/sink/Sink#get:offset - local.get $1 - i32.add - local.set $3 - local.get $3 - local.get $2 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.gt_u - if - local.get $0 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - local.get $2 - local.get $3 - call $~lib/json-as/assembly/sink/nextPowerOf2 - call $~lib/rt/itcms/__renew - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=8 - local.get $4 - call $~lib/json-as/assembly/sink/Sink#set:buffer - end - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/json-as/assembly/sink/Sink#write (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - local.set $20 - global.get $~lib/memory/__stack_pointer - local.get $20 - i32.store - local.get $20 - call $~lib/string/String#get:length - local.set $4 - local.get $2 - i32.const 0 - i32.ne - if (result i32) - i32.const 1 - else - local.get $3 - global.get $~lib/builtins/i32.MAX_VALUE - i32.ne - end - if - local.get $2 - local.tee $6 - i32.const 0 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.tee $8 - local.get $4 - local.tee $9 - local.get $8 - local.get $9 - i32.lt_s - select - local.set $5 - local.get $3 - local.tee $10 - i32.const 0 - local.tee $11 - local.get $10 - local.get $11 - i32.gt_s - select - local.tee $12 - local.get $4 - local.tee $13 - local.get $12 - local.get $13 - i32.lt_s - select - local.set $3 - local.get $5 - local.tee $14 - local.get $3 - local.tee $15 - local.get $14 - local.get $15 - i32.lt_s - select - local.set $2 - local.get $5 - local.tee $16 - local.get $3 - local.tee $17 - local.get $16 - local.get $17 - i32.gt_s - select - local.set $3 - local.get $3 - local.get $2 - i32.sub - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - local.set $20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $20 - return - end - local.get $4 - i32.const 1 - i32.shl - local.set $18 - local.get $0 - local.set $20 - global.get $~lib/memory/__stack_pointer - local.get $20 - i32.store - local.get $20 - local.get $18 - call $~lib/json-as/assembly/sink/Sink#ensureCapacity - local.get $0 - local.set $20 - global.get $~lib/memory/__stack_pointer - local.get $20 - i32.store - local.get $20 - call $~lib/json-as/assembly/sink/Sink#get:offset - local.set $19 - local.get $0 - local.set $20 - global.get $~lib/memory/__stack_pointer - local.get $20 - i32.store - local.get $20 - call $~lib/json-as/assembly/sink/Sink#get:buffer - local.get $19 - i32.add - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $18 - memory.copy - local.get $0 - local.set $20 - global.get $~lib/memory/__stack_pointer - local.get $20 - i32.store - local.get $20 - local.get $19 - local.get $18 - i32.add - call $~lib/json-as/assembly/sink/Sink#set:offset - local.get $0 - local.set $20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $20 - return - ) - (func $~lib/json-as/assembly/sink/Sink#writeCodePoint (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - i32.const 65535 - i32.gt_u - local.set $2 - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - i32.const 2 - local.get $2 - i32.shl - call $~lib/json-as/assembly/sink/Sink#ensureCapacity - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - call $~lib/json-as/assembly/sink/Sink#get:offset - local.set $3 - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - call $~lib/json-as/assembly/sink/Sink#get:buffer - local.get $3 - i32.add - local.set $4 - local.get $2 - i32.eqz - if - local.get $4 - local.get $1 - i32.store16 - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $3 - i32.const 2 - i32.add - call $~lib/json-as/assembly/sink/Sink#set:offset - else - local.get $1 - i32.const 1114111 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 2080 - i32.const 151 - i32.const 13 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $1 - i32.const 65536 - i32.sub - local.set $1 - local.get $1 - i32.const 1023 - i32.and - i32.const 56320 - i32.or - local.set $5 - local.get $1 - i32.const 10 - i32.shr_u - i32.const 55296 - i32.or - local.set $6 - local.get $4 - local.get $6 - local.get $5 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $3 - i32.const 4 - i32.add - call $~lib/json-as/assembly/sink/Sink#set:offset - end - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - return - ) - (func $~lib/json-as/assembly/sink/Sink#write@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 - end - local.get $0 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - local.get $1 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=4 - local.get $4 - local.get $2 - local.get $3 - call $~lib/json-as/assembly/sink/Sink#write - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 - ) - (func $~lib/json-as/assembly/sink/Sink#toString (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/json-as/assembly/sink/Sink#get:offset - local.set $1 - local.get $1 - i32.eqz - if - i32.const 1776 - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - return - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $2 - i32.store offset=4 - local.get $2 - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/json-as/assembly/sink/Sink#get:buffer - local.get $1 - memory.copy - local.get $2 - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - return - ) - (func $~lib/json-as/assembly/index/JSON.stringify<~lib/string/String> (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - block $~lib/json-as/assembly/serialize/string/serializeString|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $0 - local.tee $1 - i32.store - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $~lib/string/String#get:length - i32.const 0 - i32.eq - if - i32.const 352 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 352 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - call $~lib/string/String.__concat - br $~lib/json-as/assembly/serialize/string/serializeString|inlined.0 - end - global.get $~lib/memory/__stack_pointer - i32.const 352 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - call $~lib/string/String#get:length - call $~lib/json-as/assembly/sink/Sink.fromString - local.tee $2 - i32.store offset=12 - i32.const 0 - local.set $3 - i32.const 0 - local.set $4 - loop $for-loop|0 - local.get $4 - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $~lib/string/String#get:length - i32.lt_s - if - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $4 - call $~lib/json-as/assembly/util/unsafeCharCodeAt - local.set $5 - local.get $5 - i32.const 34 - i32.eq - if (result i32) - i32.const 1 - else - local.get $5 - i32.const 92 - i32.eq - end - if - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - local.get $3 - local.get $4 - call $~lib/json-as/assembly/sink/Sink#write - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 92 - call $~lib/json-as/assembly/sink/Sink#writeCodePoint - drop - local.get $4 - local.set $3 - else - i32.const 16 - local.get $5 - i32.gt_s - if - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - local.get $3 - local.get $4 - call $~lib/json-as/assembly/sink/Sink#write - drop - local.get $4 - i32.const 1 - i32.add - local.set $3 - block $break|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - block $case0|1 - local.get $5 - local.set $6 - local.get $6 - i32.const 8 - i32.eq - br_if $case0|1 - local.get $6 - i32.const 9 - i32.eq - br_if $case1|1 - local.get $6 - i32.const 10 - i32.eq - br_if $case2|1 - local.get $6 - i32.const 12 - i32.eq - br_if $case3|1 - local.get $6 - i32.const 13 - i32.eq - br_if $case4|1 - br $case5|1 - end - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 2208 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - br $break|1 - end - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 2240 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - br $break|1 - end - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 2272 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - br $break|1 - end - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 2304 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - br $break|1 - end - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 2336 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - br $break|1 - end - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 2368 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $5 - i32.const 16 - call $~lib/number/I32#toString - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - br $break|1 - end - else - i32.const 32 - local.get $5 - i32.gt_s - if - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - local.get $3 - local.get $4 - call $~lib/json-as/assembly/sink/Sink#write - drop - local.get $4 - i32.const 1 - i32.add - local.set $3 - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 4176 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $5 - i32.const 16 - call $~lib/number/I32#toString - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - end - end - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - local.get $3 - i32.const 2 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 34 - call $~lib/json-as/assembly/sink/Sink#writeCodePoint - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $~lib/json-as/assembly/sink/Sink#toString - br $~lib/json-as/assembly/serialize/string/serializeString|inlined.0 - end - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - return - ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i64) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - call $~lib/array/Array#get:dataStart - local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - return - ) - (func $"~lib/json-as/assembly/index/JSON.stringify<~lib/map/Map<~lib/string/String,u64>>" (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 36 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 36 - memory.fill - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - block $"~lib/json-as/assembly/serialize/map/serializeMap<~lib/map/Map<~lib/string/String,u64>>|inlined.0" (result i32) - global.get $~lib/memory/__stack_pointer - local.get $0 - local.tee $1 - i32.store - local.get $1 - i32.const 0 - i32.eq - if - i32.const 1920 - br $"~lib/json-as/assembly/serialize/map/serializeMap<~lib/map/Map<~lib/string/String,u64>>|inlined.0" - end - global.get $~lib/memory/__stack_pointer - i32.const 128 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink.fromString@varargs - local.tee $2 - i32.store offset=8 - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $"~lib/map/Map<~lib/string/String,u64>#get:size" - i32.eqz - if - i32.const 1920 - br $"~lib/json-as/assembly/serialize/map/serializeMap<~lib/map/Map<~lib/string/String,u64>>|inlined.0" - end - global.get $~lib/memory/__stack_pointer - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $"~lib/map/Map<~lib/string/String,u64>#keys" - local.tee $3 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $"~lib/map/Map<~lib/string/String,u64>#values" - local.tee $4 - i32.store offset=16 - local.get $1 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $"~lib/map/Map<~lib/string/String,u64>#get:size" - i32.const 1 - i32.sub - local.set $5 - i32.const 0 - local.set $6 - loop $for-loop|0 - local.get $6 - local.get $5 - i32.lt_s - if - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $3 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=32 - local.get $7 - local.get $6 - call $~lib/array/Array<~lib/string/String>#__uget - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=28 - local.get $7 - call $~lib/string/String#toString - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=24 - local.get $7 - call $~lib/json-as/assembly/index/JSON.stringify<~lib/string/String> - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=20 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 58 - call $~lib/json-as/assembly/sink/Sink#writeCodePoint - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $4 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=24 - local.get $7 - local.get $6 - call $~lib/array/Array#__uget - call $~lib/json-as/assembly/index/JSON.stringify - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=20 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 44 - call $~lib/json-as/assembly/sink/Sink#writeCodePoint - drop - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $3 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=32 - local.get $7 - local.get $5 - call $~lib/array/Array<~lib/string/String>#__uget - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=28 - local.get $7 - call $~lib/string/String#toString - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=24 - local.get $7 - call $~lib/json-as/assembly/index/JSON.stringify<~lib/string/String> - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=20 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 58 - call $~lib/json-as/assembly/sink/Sink#writeCodePoint - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - local.get $4 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=24 - local.get $7 - local.get $5 - call $~lib/array/Array#__uget - call $~lib/json-as/assembly/index/JSON.stringify - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=20 - local.get $7 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/json-as/assembly/sink/Sink#write@varargs - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - i32.const 125 - call $~lib/json-as/assembly/sink/Sink#writeCodePoint - drop - local.get $2 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $~lib/json-as/assembly/sink/Sink#toString - br $"~lib/json-as/assembly/serialize/map/serializeMap<~lib/map/Map<~lib/string/String,u64>>|inlined.0" - end - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 36 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - return - ) - (func $"~lib/json-as/assembly/index/__SERIALIZE<~lib/map/Map<~lib/string/String,u64>>" (param $0 i32) (result i32) + (func $~lib/bindings/wasi_snapshot_preview1/errnoToString (param $0 i32) (result i32) (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store - local.get $1 - call $"~lib/json-as/assembly/index/JSON.stringify<~lib/map/Map<~lib/string/String,u64>>" - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - return - ) - (func $~lib/util/string/joinStringArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - local.get $1 - i32.const 1 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.lt_s - if - i32.const 1776 - local.set $13 - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $13 - return - end - local.get $3 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.load - local.tee $4 - i32.store - local.get $4 - if (result i32) - local.get $4 - else - i32.const 1776 - end - local.set $13 - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $13 - return - end - i32.const 0 - local.set $5 - i32.const 0 - local.set $7 - loop $for-loop|0 - local.get $7 - local.get $1 - i32.lt_s - if - global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $7 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $6 - i32.store offset=4 - local.get $6 - i32.const 0 - i32.ne - if - local.get $5 - local.get $6 - local.set $13 - global.get $~lib/memory/__stack_pointer - local.get $13 - i32.store offset=8 - local.get $13 - call $~lib/string/String#get:length - i32.add - local.set $5 - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - i32.const 0 - local.set $8 - local.get $2 - local.set $13 - global.get $~lib/memory/__stack_pointer - local.get $13 - i32.store offset=8 - local.get $13 - call $~lib/string/String#get:length - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $5 - local.get $9 - local.get $3 - i32.mul - i32.add - i32.const 1 - i32.shl - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $10 - i32.store offset=12 - i32.const 0 - local.set $11 - loop $for-loop|1 - local.get $11 - local.get $3 - i32.lt_s - if - global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $11 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $6 - i32.store offset=4 - local.get $6 - i32.const 0 - i32.ne - if - local.get $6 - local.set $13 - global.get $~lib/memory/__stack_pointer - local.get $13 - i32.store offset=8 - local.get $13 - call $~lib/string/String#get:length - local.set $12 - local.get $10 - local.get $8 - i32.const 1 - i32.shl - i32.add - local.get $6 - local.get $12 - i32.const 1 - i32.shl - memory.copy - local.get $8 - local.get $12 - i32.add - local.set $8 - end - local.get $9 - if - local.get $10 - local.get $8 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $9 - i32.const 1 - i32.shl - memory.copy - local.get $8 - local.get $9 - i32.add - local.set $8 + block $break|0 + block $case76|0 + block $case75|0 + block $case74|0 + block $case73|0 + block $case72|0 + block $case71|0 + block $case70|0 + block $case69|0 + block $case68|0 + block $case67|0 + block $case66|0 + block $case65|0 + block $case64|0 + block $case63|0 + block $case62|0 + block $case61|0 + block $case60|0 + block $case59|0 + block $case58|0 + block $case57|0 + block $case56|0 + block $case55|0 + block $case54|0 + block $case53|0 + block $case52|0 + block $case51|0 + block $case50|0 + block $case49|0 + block $case48|0 + block $case47|0 + block $case46|0 + block $case45|0 + block $case44|0 + block $case43|0 + block $case42|0 + block $case41|0 + block $case40|0 + block $case39|0 + block $case38|0 + block $case37|0 + block $case36|0 + block $case35|0 + block $case34|0 + block $case33|0 + block $case32|0 + block $case31|0 + block $case30|0 + block $case29|0 + block $case28|0 + block $case27|0 + block $case26|0 + block $case25|0 + block $case24|0 + block $case23|0 + block $case22|0 + block $case21|0 + block $case20|0 + block $case19|0 + block $case18|0 + block $case17|0 + block $case16|0 + block $case15|0 + block $case14|0 + block $case13|0 + block $case12|0 + block $case11|0 + block $case10|0 + block $case9|0 + block $case8|0 + block $case7|0 + block $case6|0 + block $case5|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $0 + i32.const 65535 + i32.and + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + local.get $1 + i32.const 4 + i32.eq + br_if $case4|0 + local.get $1 + i32.const 5 + i32.eq + br_if $case5|0 + local.get $1 + i32.const 6 + i32.eq + br_if $case6|0 + local.get $1 + i32.const 7 + i32.eq + br_if $case7|0 + local.get $1 + i32.const 8 + i32.eq + br_if $case8|0 + local.get $1 + i32.const 9 + i32.eq + br_if $case9|0 + local.get $1 + i32.const 10 + i32.eq + br_if $case10|0 + local.get $1 + i32.const 11 + i32.eq + br_if $case11|0 + local.get $1 + i32.const 12 + i32.eq + br_if $case12|0 + local.get $1 + i32.const 13 + i32.eq + br_if $case13|0 + local.get $1 + i32.const 14 + i32.eq + br_if $case14|0 + local.get $1 + i32.const 15 + i32.eq + br_if $case15|0 + local.get $1 + i32.const 16 + i32.eq + br_if $case16|0 + local.get $1 + i32.const 17 + i32.eq + br_if $case17|0 + local.get $1 + i32.const 18 + i32.eq + br_if $case18|0 + local.get $1 + i32.const 19 + i32.eq + br_if $case19|0 + local.get $1 + i32.const 20 + i32.eq + br_if $case20|0 + local.get $1 + i32.const 21 + i32.eq + br_if $case21|0 + local.get $1 + i32.const 22 + i32.eq + br_if $case22|0 + local.get $1 + i32.const 23 + i32.eq + br_if $case23|0 + local.get $1 + i32.const 24 + i32.eq + br_if $case24|0 + local.get $1 + i32.const 25 + i32.eq + br_if $case25|0 + local.get $1 + i32.const 26 + i32.eq + br_if $case26|0 + local.get $1 + i32.const 27 + i32.eq + br_if $case27|0 + local.get $1 + i32.const 28 + i32.eq + br_if $case28|0 + local.get $1 + i32.const 29 + i32.eq + br_if $case29|0 + local.get $1 + i32.const 30 + i32.eq + br_if $case30|0 + local.get $1 + i32.const 31 + i32.eq + br_if $case31|0 + local.get $1 + i32.const 32 + i32.eq + br_if $case32|0 + local.get $1 + i32.const 33 + i32.eq + br_if $case33|0 + local.get $1 + i32.const 34 + i32.eq + br_if $case34|0 + local.get $1 + i32.const 35 + i32.eq + br_if $case35|0 + local.get $1 + i32.const 36 + i32.eq + br_if $case36|0 + local.get $1 + i32.const 37 + i32.eq + br_if $case37|0 + local.get $1 + i32.const 38 + i32.eq + br_if $case38|0 + local.get $1 + i32.const 39 + i32.eq + br_if $case39|0 + local.get $1 + i32.const 40 + i32.eq + br_if $case40|0 + local.get $1 + i32.const 41 + i32.eq + br_if $case41|0 + local.get $1 + i32.const 42 + i32.eq + br_if $case42|0 + local.get $1 + i32.const 43 + i32.eq + br_if $case43|0 + local.get $1 + i32.const 44 + i32.eq + br_if $case44|0 + local.get $1 + i32.const 45 + i32.eq + br_if $case45|0 + local.get $1 + i32.const 46 + i32.eq + br_if $case46|0 + local.get $1 + i32.const 47 + i32.eq + br_if $case47|0 + local.get $1 + i32.const 48 + i32.eq + br_if $case48|0 + local.get $1 + i32.const 49 + i32.eq + br_if $case49|0 + local.get $1 + i32.const 50 + i32.eq + br_if $case50|0 + local.get $1 + i32.const 51 + i32.eq + br_if $case51|0 + local.get $1 + i32.const 52 + i32.eq + br_if $case52|0 + local.get $1 + i32.const 53 + i32.eq + br_if $case53|0 + local.get $1 + i32.const 54 + i32.eq + br_if $case54|0 + local.get $1 + i32.const 55 + i32.eq + br_if $case55|0 + local.get $1 + i32.const 56 + i32.eq + br_if $case56|0 + local.get $1 + i32.const 57 + i32.eq + br_if $case57|0 + local.get $1 + i32.const 58 + i32.eq + br_if $case58|0 + local.get $1 + i32.const 59 + i32.eq + br_if $case59|0 + local.get $1 + i32.const 60 + i32.eq + br_if $case60|0 + local.get $1 + i32.const 61 + i32.eq + br_if $case61|0 + local.get $1 + i32.const 62 + i32.eq + br_if $case62|0 + local.get $1 + i32.const 63 + i32.eq + br_if $case63|0 + local.get $1 + i32.const 64 + i32.eq + br_if $case64|0 + local.get $1 + i32.const 65 + i32.eq + br_if $case65|0 + local.get $1 + i32.const 66 + i32.eq + br_if $case66|0 + local.get $1 + i32.const 67 + i32.eq + br_if $case67|0 + local.get $1 + i32.const 68 + i32.eq + br_if $case68|0 + local.get $1 + i32.const 69 + i32.eq + br_if $case69|0 + local.get $1 + i32.const 70 + i32.eq + br_if $case70|0 + local.get $1 + i32.const 71 + i32.eq + br_if $case71|0 + local.get $1 + i32.const 72 + i32.eq + br_if $case72|0 + local.get $1 + i32.const 73 + i32.eq + br_if $case73|0 + local.get $1 + i32.const 74 + i32.eq + br_if $case74|0 + local.get $1 + i32.const 75 + i32.eq + br_if $case75|0 + local.get $1 + i32.const 76 + i32.eq + br_if $case76|0 + br $break|0 + end + i32.const 67408 + return + end + i32.const 67456 + return + end + i32.const 67488 + return + end + i32.const 67520 + return + end + i32.const 67568 + return + end + i32.const 67616 + return + end + i32.const 67664 + return + end + i32.const 67696 + return + end + i32.const 67744 + return + end + i32.const 67776 + return + end + i32.const 67808 + return + end + i32.const 67840 + return + end + i32.const 67888 + return + end + i32.const 67920 + return + end + i32.const 67968 + return + end + i32.const 68016 + return + end + i32.const 68064 + return + end + i32.const 68096 + return + end + i32.const 68144 + return + end + i32.const 68176 + return + end + i32.const 68208 + return + end + i32.const 68240 + return + end + i32.const 68272 + return + end + i32.const 68304 + return + end + i32.const 68352 + return + end + i32.const 68384 + return + end + i32.const 68416 + return + end + i32.const 68464 + return + end + i32.const 68496 + return + end + i32.const 68528 + return + end + i32.const 68560 + return + end + i32.const 68592 + return + end + i32.const 68624 + return + end + i32.const 68656 + return + end + i32.const 68688 + return + end + i32.const 68720 + return + end + i32.const 68768 + return + end + i32.const 68816 + return + end + i32.const 68864 + return + end + i32.const 68912 + return + end + i32.const 68960 + return + end + i32.const 69008 + return + end + i32.const 69040 + return + end + i32.const 69072 + return + end + i32.const 69104 + return + end + i32.const 69136 + return + end + i32.const 69168 + return + end + i32.const 69200 + return + end + i32.const 69232 + return + end + i32.const 69264 + return + end + i32.const 69296 + return + end + i32.const 69344 + return + end + i32.const 69376 + return + end + i32.const 69408 + return + end + i32.const 69456 + return + end + i32.const 69488 + return + end + i32.const 69536 + return + end + i32.const 69584 + return + end + i32.const 69632 + return + end + i32.const 69664 + return + end + i32.const 69696 + return + end + i32.const 69728 + return + end + i32.const 69776 + return + end + i32.const 69824 + return + end + i32.const 69856 + return + end + i32.const 69888 + return + end + i32.const 69920 + return + end + i32.const 69968 + return + end + i32.const 70016 + return + end + i32.const 70048 + return + end + i32.const 70080 + return + end + i32.const 70112 + return + end + i32.const 70144 + return + end + i32.const 70176 + return + end + i32.const 70224 + return end - local.get $11 - i32.const 1 - i32.add - local.set $11 - br $for-loop|1 + i32.const 70256 + return end + i32.const 70288 + return end - global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $6 - i32.store offset=4 - local.get $6 - i32.const 0 - i32.ne - if - local.get $10 - local.get $8 - i32.const 1 - i32.shl - i32.add - local.get $6 - local.get $6 - local.set $13 - global.get $~lib/memory/__stack_pointer - local.get $13 - i32.store offset=8 - local.get $13 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - memory.copy - end - local.get $10 - local.set $13 - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $13 + i32.const 70336 return ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#join (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.byteLength (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - i32.const 1 - i32.lt_s - drop - i32.const 1 - drop - local.get $0 + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=4 - local.get $2 - call $~lib/staticarray/StaticArray<~lib/string/String>#get:length - local.get $1 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - call $~lib/util/string/joinStringArray - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer local.get $2 - return - ) - (func $assembly/test/Yo#__SERIALIZE (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=4 - local.get $3 - call $assembly/test/Yo#get:map - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $"~lib/json-as/assembly/index/__SERIALIZE<~lib/map/Map<~lib/string/String,u64>>" - local.tee $1 - i32.store offset=8 - i32.const 1888 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - i32.const 1 - local.get $1 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=4 - local.get $3 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 1888 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - i32.const 1776 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=4 - local.get $3 - call $~lib/staticarray/StaticArray<~lib/string/String>#join - local.tee $2 - i32.store offset=12 - local.get $2 - local.get $2 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/string/String#get:length - i32.const 1 + i32.const 20 i32.sub - i32.const 1 - i32.shl + call $~lib/rt/common/OBJECT#get:rtSize i32.add - i32.const 125 - i32.store16 - local.get $2 local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $1 + i32.const 0 + i32.ne + local.set $4 + block $while-break|0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + local.get $2 + i32.load16_u + local.set $5 + local.get $5 + i32.const 128 + i32.lt_u + if + local.get $1 + local.get $5 + i32.eqz + i32.and + if + br $while-break|0 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + else + local.get $5 + i32.const 2048 + i32.lt_u + if + local.get $4 + i32.const 2 + i32.add + local.set $4 + else + local.get $5 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + if (result i32) + local.get $2 + i32.const 2 + i32.add + local.get $3 + i32.lt_u + else + i32.const 0 + end + if + local.get $2 + i32.load16_u offset=2 + i32.const 64512 + i32.and + i32.const 56320 + i32.eq + if + local.get $4 + i32.const 4 + i32.add + local.set $4 + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $4 + i32.const 3 + i32.add + local.set $4 + end + end + local.get $2 + i32.const 2 + i32.add + local.set $2 + br $while-continue|0 + end + end + end + local.get $4 return ) - (func $~lib/json-as/assembly/index/JSON.stringify (param $0 i32) (result i32) + (func $assembly/util/_intTo16 (param $0 i32) (result i32) + local.get $0 + i32.const 10 + i32.lt_s + if + i32.const 48 + local.get $0 + i32.add + return + else + i32.const 87 + local.get $0 + i32.add + return + end + unreachable + ) + (func $~lib/rt/__visit_globals (param $0 i32) (local $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - block $~lib/json-as/assembly/serialize/object/serializeObject|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer + i32.const 66832 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 67216 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 66640 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 66304 + local.get $0 + call $~lib/rt/itcms/__visit + global.get $assembly/bl/STORE + local.tee $1 + if + local.get $1 local.get $0 - local.tee $1 - i32.store + call $~lib/rt/itcms/__visit + end + i32.const 65664 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65696 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65728 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65760 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65792 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65824 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65856 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65888 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65920 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65952 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 65984 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 66016 + local.get $0 + call $~lib/rt/itcms/__visit + global.get $~lib/@hypercubed/as-mpz/assembly/index/MpZ.ZERO + local.tee $1 + if local.get $1 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=4 - local.get $2 - call $assembly/test/Yo#__SERIALIZE - br $~lib/json-as/assembly/serialize/object/serializeObject|inlined.0 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $~lib/@hypercubed/as-mpz/assembly/index/MpZ.ONE + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TWO + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TEN + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit end - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $2 - return ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + local.get $0 local.get $1 + call $~lib/object/Object~visit local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/array/Array#get:length_ - i32.ge_u + i32.load + local.tee $2 if - i32.const 944 - i32.const 2160 - i32.const 114 - i32.const 42 - call $~lib/wasi_internal/wasi_abort - unreachable + local.get $2 + local.get $1 + call $~lib/rt/itcms/__visit end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/array/Array#get:dataStart - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - i32.const 0 - drop - local.get $2 - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - return ) - (func $~lib/as-console/stringify/stringify<~lib/string/String> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - global.get $~lib/memory/__stack_pointer - i32.const 40 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 40 - memory.fill - i32.const 1 - drop - local.get $1 - if (result i32) - block $~lib/as-rainbow/assembly/index/rainbow.green|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 4208 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=8 - local.get $10 - local.get $0 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=12 - local.get $10 - call $~lib/string/String.__concat - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - i32.const 4208 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=4 - local.get $10 - call $~lib/string/String.__concat - local.tee $2 - i32.store offset=16 - block $~lib/as-rainbow/assembly/index/colorText|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 2 - i32.const 2 - i32.const 18 - i32.const 4240 - call $~lib/rt/__newArray - local.tee $5 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - local.get $2 - local.tee $6 - i32.store offset=24 - global.get $~lib/memory/__stack_pointer - local.get $5 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - i32.const 0 - call $~lib/array/Array#__get - i32.const 10 - call $~lib/number/I32#toString - local.tee $7 - i32.store offset=28 - global.get $~lib/memory/__stack_pointer - local.get $6 - local.tee $8 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - local.get $5 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - i32.const 1 - call $~lib/array/Array#__get - i32.const 10 - call $~lib/number/I32#toString - local.tee $9 - i32.store offset=36 - i32.const 4336 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - i32.const 1 - local.get $7 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=4 - local.get $10 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 4336 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - i32.const 3 - local.get $8 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=4 - local.get $10 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 4336 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - i32.const 5 - local.get $9 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=4 - local.get $10 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 4336 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - local.get $10 - i32.const 1776 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=4 - local.get $10 - call $~lib/staticarray/StaticArray<~lib/string/String>#join - br $~lib/as-rainbow/assembly/index/colorText|inlined.0 + (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) + ) + (func $~lib/array/Array#get:buffer (param $0 i32) (result i32) + local.get $0 + i32.load + ) + (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/object/Object~visit + local.get $0 + local.get $1 + call $~lib/array/Array#__visit + ) + (func $~lib/@hypercubed/as-mpz/assembly/index/MpZ~visit (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/object/Object~visit + local.get $0 + i32.load offset=4 + local.tee $2 + if + local.get $2 + local.get $1 + call $~lib/rt/itcms/__visit + end + ) + (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) + block $invalid + block $~lib/staticarray/StaticArray + block $~lib/@hypercubed/as-mpz/assembly/index/MpZ + block $~lib/array/Array + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/object/Object + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/array/Array $~lib/@hypercubed/as-mpz/assembly/index/MpZ $~lib/staticarray/StaticArray $invalid + end + return + end + return + end + return + end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + return + end + local.get $0 + local.get $1 + call $~lib/array/Array~visit + return end - br $~lib/as-rainbow/assembly/index/rainbow.green|inlined.0 + local.get $0 + local.get $1 + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ~visit + return end - else - local.get $0 + return end - local.set $10 + unreachable + ) + (func $~start + global.get $~started + if + return + end + i32.const 1 + global.set $~started + call $start:assembly/test + ) + (func $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 40 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $10 - return + global.get $~lib/memory/__data_end + i32.lt_s + if + i32.const 103328 + i32.const 103376 + i32.const 1 + i32.const 1 + call $~lib/wasi_internal/wasi_abort + unreachable + end ) - (func $~lib/wasi_process/writeString (param $0 i32) (param $1 i32) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + i64.const 0 + i64.store + local.get $0 local.get $1 - local.set $12 + i32.eq + if + i32.const 1 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + return + end + local.get $0 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $12 + local.get $3 i32.store - local.get $12 + local.get $3 call $~lib/string/String#get:length local.set $2 - i32.const 0 + local.get $2 + local.get $1 local.set $3 - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - block $break|0 - block $case4|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - local.get $2 - local.set $6 - local.get $6 - i32.const 4 - i32.eq - br_if $case0|0 - local.get $6 - i32.const 3 - i32.eq - br_if $case1|0 - local.get $6 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $6 - i32.const 1 - i32.eq - br_if $case3|0 - local.get $6 - i32.const 0 - i32.eq - br_if $case4|0 - br $break|0 - end - local.get $1 - i32.load16_u offset=6 - local.set $5 - local.get $5 - i32.const 128 - i32.ge_u - if - br $break|0 - end - end - local.get $1 - i32.load16_u offset=4 - local.set $4 - local.get $4 - i32.const 128 - i32.ge_u - if - br $break|0 - end - end - local.get $1 - i32.load16_u offset=2 - local.set $3 - local.get $3 - i32.const 128 - i32.ge_u - if - br $break|0 - end - end - local.get $1 - i32.load16_u - local.set $7 - local.get $7 - i32.const 128 - i32.ge_u - if - br $break|0 - end - global.get $~lib/wasi_internal/tempbuf - global.get $~lib/wasi_internal/tempbuf - i32.const 2 - i32.const 4 - i32.mul - i32.add - i32.store - global.get $~lib/wasi_internal/tempbuf - local.get $2 - i32.store offset=4 - global.get $~lib/wasi_internal/tempbuf - local.get $7 - local.get $3 - i32.const 8 - i32.shl - i32.or - local.get $4 - i32.const 16 - i32.shl - i32.or - local.get $5 - i32.const 24 - i32.shl - i32.or - i32.store offset=8 - local.get $0 - global.get $~lib/wasi_internal/tempbuf - i32.const 1 - global.get $~lib/wasi_internal/tempbuf - i32.const 3 - i32.const 4 - i32.mul - i32.add - call $~lib/bindings/wasi_snapshot_preview1/fd_write - local.set $8 - local.get $8 - i32.const 65535 - i32.and - if - local.get $8 - call $~lib/bindings/wasi_snapshot_preview1/errnoToString - i32.const 7392 - i32.const 177 - i32.const 16 - call $~lib/wasi_internal/wasi_abort - unreachable - end - end + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + local.set $3 global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $3 return end - local.get $1 - local.set $12 + local.get $0 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $12 + local.get $3 i32.store - local.get $12 + local.get $3 i32.const 0 - call $~lib/string/String.UTF8.byteLength - local.set $9 - local.get $9 - call $~lib/rt/tlsf/__alloc - local.set $10 local.get $1 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=4 + local.get $3 + i32.const 0 local.get $2 - local.get $10 + call $~lib/util/string/compareImpl + i32.eqz + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + return + ) + (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=4 + local.get $2 + call $~lib/string/String.__eq + i32.eqz + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + return + ) + (func $~lib/wasi_internal/wasi_abort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i32.const 0 - i32.const 3 - global.set $~argumentsLength + i32.store i32.const 0 - call $~lib/string/String.UTF8.encodeUnsafe@varargs - local.get $9 - i32.eq - i32.eqz + i32.const 12 + call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf + i32.const 12 + local.set $4 + local.get $4 + i64.const 9071471065260641 + i64.store + local.get $4 + i32.const 7 + i32.add + local.set $4 + local.get $0 + local.set $10 + global.get $~lib/memory/__stack_pointer + local.get $10 + i32.store + local.get $10 + i32.const 0 + call $~lib/string/String.__ne if + local.get $4 + local.get $0 + local.get $0 + local.set $10 + global.get $~lib/memory/__stack_pointer + local.get $10 + i32.store + local.get $10 + call $~lib/string/String#get:length + local.get $4 i32.const 0 - i32.const 7392 - i32.const 183 i32.const 3 - call $~lib/wasi_internal/wasi_abort - unreachable + global.set $~argumentsLength + i32.const 0 + call $~lib/string/String.UTF8.encodeUnsafe@varargs + i32.add + local.set $4 end - global.get $~lib/wasi_internal/tempbuf - local.get $10 + local.get $4 + i32.const 544106784 i32.store - global.get $~lib/wasi_internal/tempbuf - local.get $9 - i32.store offset=4 - local.get $0 - global.get $~lib/wasi_internal/tempbuf - i32.const 1 - global.get $~lib/wasi_internal/tempbuf - i32.const 2 + local.get $4 i32.const 4 - i32.mul i32.add - call $~lib/bindings/wasi_snapshot_preview1/fd_write - local.set $11 + local.set $4 + local.get $1 + local.set $10 + global.get $~lib/memory/__stack_pointer local.get $10 - call $~lib/rt/tlsf/__free - local.get $11 - i32.const 65535 - i32.and + i32.store + local.get $10 + i32.const 0 + call $~lib/string/String.__ne if - local.get $11 - call $~lib/bindings/wasi_snapshot_preview1/errnoToString - i32.const 7392 - i32.const 188 - i32.const 12 - call $~lib/wasi_internal/wasi_abort - unreachable + local.get $4 + local.get $1 + local.get $1 + local.set $10 + global.get $~lib/memory/__stack_pointer + local.get $10 + i32.store + local.get $10 + call $~lib/string/String#get:length + local.get $4 + i32.const 0 + i32.const 3 + global.set $~argumentsLength + i32.const 0 + call $~lib/string/String.UTF8.encodeUnsafe@varargs + i32.add + local.set $4 end - global.get $~lib/memory/__stack_pointer - i32.const 4 + local.get $4 + local.tee $5 + i32.const 1 + i32.add + local.set $4 + local.get $5 + i32.const 40 + i32.store8 + local.get $2 + call $~lib/util/number/decimalCount32 + local.set $6 + local.get $4 + local.get $6 + i32.add + local.set $4 + loop $do-loop|0 + local.get $2 + i32.const 10 + i32.div_u + local.set $7 + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + i32.const 48 + local.get $2 + i32.const 10 + i32.rem_u + i32.add + i32.store8 + local.get $7 + local.set $2 + local.get $2 + br_if $do-loop|0 + end + local.get $4 + local.get $6 + i32.add + local.set $4 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + i32.const 58 + i32.store8 + local.get $3 + call $~lib/util/number/decimalCount32 + local.set $6 + local.get $4 + local.get $6 + i32.add + local.set $4 + loop $do-loop|1 + local.get $3 + i32.const 10 + i32.div_u + local.set $9 + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + i32.const 48 + local.get $3 + i32.const 10 + i32.rem_u + i32.add + i32.store8 + local.get $9 + local.set $3 + local.get $3 + br_if $do-loop|1 + end + local.get $4 + local.get $6 i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/wasi_process/WritableStream#write<~lib/string/String> (param $0 i32) (param $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 + local.set $4 + local.get $4 + i32.const 2601 + i32.store16 + local.get $4 + i32.const 2 + i32.add + local.set $4 + i32.const 0 + local.get $4 + i32.const 12 i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer + call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf_len + i32.const 2 i32.const 0 - i32.store i32.const 1 + i32.const 8 + call $~lib/bindings/wasi_snapshot_preview1/fd_write drop - local.get $0 - local.get $1 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - call $~lib/wasi_process/writeString - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/wasi_console/wasi_console.log (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - global.get $~lib/wasi_process/wasi_process.stdout - local.set $1 - local.get $1 - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - call $~lib/wasi_process/WritableStream#write<~lib/string/String> - local.get $1 - i32.const 7456 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - call $~lib/wasi_process/WritableStream#write<~lib/string/String> + i32.const 255 + call $~lib/bindings/wasi_snapshot_preview1/proc_exit global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/as-console/assembly/index/log<~lib/string/String> (param $0 i32) - (local $1 i32) + (func $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -10589,135 +4361,160 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/as-console/assembly/index/indent - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=4 - local.get $1 - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=12 - local.get $1 i32.const 0 - call $~lib/as-console/stringify/stringify<~lib/string/String> - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 i32.store offset=8 - local.get $1 - call $~lib/string/String#concat - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store - local.get $1 - call $~lib/wasi_console/wasi_console.log - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/array/Array<~lib/string/String>#get:length (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.const 5 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + local.get $0 + local.set $5 global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 i32.const 0 - i32.store + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_sgn_size local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store - local.get $1 - call $~lib/array/Array<~lib/string/String>#get:length_ - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - return - ) - (func $~lib/array/Array<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.set $5 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store + local.get $5 + i32.store offset=4 + local.get $5 + i32.const 0 + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_data local.get $1 - local.get $0 - local.set $3 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/array/Array<~lib/string/String>#get:length_ - i32.ge_u + local.get $5 + i32.store offset=4 + local.get $5 + call $~lib/staticarray/StaticArray#get:length + i32.const 0 + i32.gt_s + i32.eqz if - i32.const 944 - i32.const 2160 - i32.const 114 - i32.const 42 + i32.const 66416 + i32.const 66496 + i32.const 159 + i32.const 5 call $~lib/wasi_internal/wasi_abort unreachable end + local.get $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $5 + i32.store offset=4 + local.get $5 + call $~lib/staticarray/StaticArray#get:length local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store + loop $while-continue|0 + local.get $3 + i32.const 1 + i32.gt_s + if (result i32) + local.get $1 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + local.get $3 + i32.const 1 + i32.sub + call $~lib/staticarray/StaticArray#__uget + i32.const 0 + i32.eq + else + i32.const 0 + end + if + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 + end + end local.get $3 - call $~lib/array/Array<~lib/string/String>#get:dataStart - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $2 - i32.store offset=4 - i32.const 1 - drop i32.const 0 - i32.eqz - drop - local.get $2 - i32.eqz + i32.eq if - i32.const 7600 - i32.const 2160 - i32.const 118 - i32.const 40 - call $~lib/wasi_internal/wasi_abort - unreachable + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + i32.const 4 + i32.const 6 + i32.const 66608 + call $~lib/rt/__newBuffer + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=8 + local.get $5 + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_data + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + i32.const 1 + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_sgn_size + else + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + local.get $1 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=8 + local.get $5 + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_data + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + local.get $2 + if (result i32) + i32.const 0 + local.get $3 + i32.sub + else + local.get $3 + end + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#set:_sgn_size end - local.get $2 - local.set $3 + local.get $0 + local.set $5 global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 - return + local.get $5 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) - (local $2 i64) + (func $start:~lib/@hypercubed/as-mpz/assembly/index + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -10726,50 +4523,81 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $1 - local.get $0 - local.set $3 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 66752 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/pinSpace + i32.const 66784 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/toSpace + i32.const 66928 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/fromSpace + i32.const 0 + i32.const 4 + i32.const 6 + i32.const 67040 + call $~lib/rt/__newBuffer + local.set $4 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $4 i32.store - local.get $3 - call $~lib/array/Array#get:length_ - i32.ge_u - if - i32.const 944 - i32.const 2160 - i32.const 114 - i32.const 42 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $0 - local.set $3 + local.get $4 + i32.const 0 + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor + global.set $~lib/@hypercubed/as-mpz/assembly/index/MpZ.ZERO + i32.const 0 + i32.const 4 + i32.const 6 + i32.const 67072 + call $~lib/rt/__newBuffer + local.set $4 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $4 i32.store - local.get $3 - call $~lib/array/Array#get:dataStart - local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load - local.set $2 + local.get $4 i32.const 0 - drop - local.get $2 + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor + global.set $~lib/@hypercubed/as-mpz/assembly/index/MpZ.ONE + i32.const 0 + i32.const 4 + i32.const 6 + i32.const 67104 + call $~lib/rt/__newBuffer + local.set $4 + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 0 + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor + global.set $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TWO + i32.const 0 + i32.const 4 + i32.const 6 + i32.const 67136 + call $~lib/rt/__newBuffer local.set $4 global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + i32.const 0 + call $~lib/@hypercubed/as-mpz/assembly/index/MpZ#constructor + global.set $~lib/@hypercubed/as-mpz/assembly/index/MpZ.TEN + global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 - return ) - (func $~lib/as-console/stringify/stringify (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -10777,663 +4605,536 @@ (local $8 i32) (local $9 i32) (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) global.get $~lib/memory/__stack_pointer - i32.const 32 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer i32.const 0 - i32.const 32 - memory.fill - i32.const 0 - drop - i32.const 1 - drop - block $~lib/as-rainbow/assembly/index/rainbow.yellow|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer + i32.store + local.get $0 + local.set $14 + global.get $~lib/memory/__stack_pointer + local.get $14 + i32.store + local.get $14 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + local.set $4 + local.get $1 + local.get $4 + local.get $2 + i32.shr_u + i32.gt_u + if + local.get $1 + i32.const 1073741820 + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 67216 + i32.const 67264 + i32.const 19 + i32.const 48 + call $~lib/wasi_internal/wasi_abort + unreachable + end local.get $0 - i32.const 10 - call $~lib/number/U64#toString - local.tee $2 + local.set $14 + global.get $~lib/memory/__stack_pointer + local.get $14 i32.store - block $~lib/as-rainbow/assembly/index/colorText|inlined.1 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 2 - i32.const 2 - i32.const 18 - i32.const 7840 - call $~lib/rt/__newArray - local.tee $5 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - local.tee $6 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $5 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=12 - local.get $10 - i32.const 0 - call $~lib/array/Array#__get - i32.const 10 - call $~lib/number/I32#toString - local.tee $7 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - local.get $6 - local.tee $8 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - local.get $5 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=12 - local.get $10 + local.get $14 + call $~lib/arraybuffer/ArrayBufferView#get:buffer + local.set $5 + local.get $1 + local.tee $6 + i32.const 8 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_u + select + local.get $2 + i32.shl + local.set $8 + local.get $3 + if + local.get $4 i32.const 1 - call $~lib/array/Array#__get - i32.const 10 - call $~lib/number/I32#toString + i32.shl local.tee $9 - i32.store offset=24 - i32.const 7872 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=12 - local.get $10 - i32.const 1 - local.get $7 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=28 - local.get $10 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 7872 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=12 - local.get $10 - i32.const 3 - local.get $8 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=28 - local.get $10 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 7872 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=12 - local.get $10 - i32.const 5 + i32.const 1073741820 + local.tee $10 local.get $9 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=28 - local.get $10 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 7872 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=12 - local.get $10 - i32.const 1776 - local.set $10 - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store offset=28 local.get $10 - call $~lib/staticarray/StaticArray<~lib/string/String>#join - br $~lib/as-rainbow/assembly/index/colorText|inlined.1 + i32.lt_u + select + local.tee $11 + local.get $8 + local.tee $12 + local.get $11 + local.get $12 + i32.gt_u + select + local.set $8 + end + local.get $5 + local.get $8 + call $~lib/rt/itcms/__renew + local.set $13 + i32.const 2 + global.get $~lib/shared/runtime/Runtime.Incremental + i32.ne + drop + local.get $13 + local.get $5 + i32.ne + if + local.get $0 + local.get $13 + i32.store + local.get $0 + local.get $13 + i32.store offset=4 + local.get $0 + local.get $13 + i32.const 0 + call $~lib/rt/itcms/__link end - br $~lib/as-rainbow/assembly/index/rainbow.yellow|inlined.0 + local.get $0 + local.get $8 + i32.store offset=8 end - local.set $10 - global.get $~lib/memory/__stack_pointer - i32.const 32 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $10 - return - ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store - local.get $1 - call $~lib/array/Array#get:length_ - local.set $1 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 - return ) - (func $"~lib/as-console/stringify/stringify<~lib/map/Map<~lib/string/String,u64>>" (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) global.get $~lib/memory/__stack_pointer - i32.const 52 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer i32.const 0 - i32.const 52 - memory.fill - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store - local.get $12 - call $"~lib/map/Map<~lib/string/String,u64>#get:size" - i32.const 0 - i32.eq - if - i32.const 7488 - local.set $12 - global.get $~lib/memory/__stack_pointer - i32.const 52 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $12 - return - end - global.get $~lib/memory/__stack_pointer - i32.const 7536 - local.tee $2 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 i32.store - local.get $12 - call $"~lib/map/Map<~lib/string/String,u64>#keys" - local.tee $3 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer local.get $0 - local.set $12 + local.set $4 global.get $~lib/memory/__stack_pointer - local.get $12 + local.get $4 i32.store - local.get $12 - call $"~lib/map/Map<~lib/string/String,u64>#values" - local.tee $4 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer + local.get $4 + call $~lib/array/Array#get:length_ + local.set $2 local.get $2 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store - local.get $12 - local.get $3 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=28 - local.get $12 - call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.add - i32.const 10 - call $~lib/number/I32#toString - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 - i32.const 7568 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=24 - local.get $12 - call $~lib/string/String#concat - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=16 - local.get $12 - call $~lib/string/String.__concat - local.tee $2 - i32.store offset=4 + local.set $3 + local.get $0 + local.get $3 + i32.const 2 + i32.const 1 + call $~lib/array/ensureCapacity i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $3 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store - local.get $12 - call $~lib/array/Array<~lib/string/String>#get:length - i32.const 1 - i32.sub - i32.lt_s - if - global.get $~lib/memory/__stack_pointer - local.get $3 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store - local.get $12 - local.get $5 - call $~lib/array/Array<~lib/string/String>#__get - local.tee $6 - i32.store offset=32 - local.get $4 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store - local.get $12 - local.get $5 - call $~lib/array/Array#__get - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $2 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store - local.get $12 - global.get $~lib/memory/__stack_pointer - local.get $6 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 - i32.const 1 - call $~lib/as-console/stringify/stringify<~lib/string/String> - local.tee $8 - i32.store offset=36 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.const 1 - call $~lib/as-console/stringify/stringify - local.tee $9 - i32.store offset=40 - i32.const 7792 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 - i32.const 0 - local.get $8 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=24 - local.get $12 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 7792 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 - i32.const 2 - local.get $9 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=24 - local.get $12 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 7792 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 - i32.const 1776 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=24 - local.get $12 - call $~lib/staticarray/StaticArray<~lib/string/String>#join - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=16 - local.get $12 - call $~lib/string/String.__concat - local.tee $2 - i32.store offset=4 - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end + drop + local.get $0 + local.set $4 global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 + call $~lib/array/Array#get:dataStart local.get $2 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 + i32.const 2 + i32.shl + i32.add + local.get $1 i32.store - local.get $12 + local.get $0 + local.set $4 global.get $~lib/memory/__stack_pointer + local.get $4 + i32.store + local.get $4 local.get $3 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=24 - local.get $12 + call $~lib/array/Array#set:length_ local.get $3 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=28 - local.get $12 - call $~lib/array/Array<~lib/string/String>#get:length - i32.const 1 - i32.sub - call $~lib/array/Array<~lib/string/String>#__get - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 - i32.const 1 - call $~lib/as-console/stringify/stringify<~lib/string/String> - local.tee $10 - i32.store offset=44 - global.get $~lib/memory/__stack_pointer - local.get $4 - local.set $12 + local.set $4 global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $4 - local.set $12 + return + ) + (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=24 - local.get $12 - call $~lib/array/Array#get:length - i32.const 1 + i32.const 8 i32.sub - call $~lib/array/Array#__get + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + call $~lib/string/String#get:length i32.const 1 - call $~lib/as-console/stringify/stringify - local.tee $11 - i32.store offset=48 - i32.const 7952 - local.set $12 + i32.shl + local.set $2 + local.get $1 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 + local.get $6 + i32.store + local.get $6 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + local.get $2 + local.get $3 + i32.add + local.set $4 + local.get $4 i32.const 0 - local.get $10 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=24 - local.get $12 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 7952 - local.set $12 + i32.eq + if + i32.const 67344 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return + end global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 + local.get $4 i32.const 2 - local.get $11 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=24 - local.get $12 - call $~lib/staticarray/StaticArray<~lib/string/String>#__uset - i32.const 7952 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=20 - local.get $12 - i32.const 1776 - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=24 - local.get $12 - call $~lib/staticarray/StaticArray<~lib/string/String>#join - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.store offset=16 - local.get $12 - call $~lib/string/String.__concat - local.tee $2 + call $~lib/rt/itcms/__new + local.tee $5 i32.store offset=4 - i32.const 96 - local.set $12 + local.get $5 + local.get $0 + local.get $2 + memory.copy + local.get $5 + local.get $2 + i32.add + local.get $1 + local.get $3 + memory.copy + local.get $5 + local.set $6 global.get $~lib/memory/__stack_pointer - i32.const 52 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $12 + local.get $6 return ) - (func $"~lib/as-console/assembly/index/log<~lib/map/Map<~lib/string/String,u64>>" (param $0 i32) - (local $1 i32) + (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + local.get $0 + local.set $2 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/as-console/assembly/index/indent - local.set $1 - global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 i32.store offset=4 - local.get $1 - local.get $0 - local.set $1 + local.get $2 + call $~lib/string/String#concat + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=12 - local.get $1 - i32.const 0 - call $"~lib/as-console/stringify/stringify<~lib/map/Map<~lib/string/String,u64>>" - local.set $1 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + return + ) + (func $~lib/wasi_process/writeString (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store local.get $1 - i32.store offset=8 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store + local.get $12 + call $~lib/string/String#get:length + local.set $2 + i32.const 0 + local.set $3 + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + block $break|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $2 + local.set $6 + local.get $6 + i32.const 4 + i32.eq + br_if $case0|0 + local.get $6 + i32.const 3 + i32.eq + br_if $case1|0 + local.get $6 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $6 + i32.const 1 + i32.eq + br_if $case3|0 + local.get $6 + i32.const 0 + i32.eq + br_if $case4|0 + br $break|0 + end + local.get $1 + i32.load16_u offset=6 + local.set $5 + local.get $5 + i32.const 128 + i32.ge_u + if + br $break|0 + end + end + local.get $1 + i32.load16_u offset=4 + local.set $4 + local.get $4 + i32.const 128 + i32.ge_u + if + br $break|0 + end + end + local.get $1 + i32.load16_u offset=2 + local.set $3 + local.get $3 + i32.const 128 + i32.ge_u + if + br $break|0 + end + end + local.get $1 + i32.load16_u + local.set $7 + local.get $7 + i32.const 128 + i32.ge_u + if + br $break|0 + end + global.get $~lib/wasi_internal/tempbuf + global.get $~lib/wasi_internal/tempbuf + i32.const 2 + i32.const 4 + i32.mul + i32.add + i32.store + global.get $~lib/wasi_internal/tempbuf + local.get $2 + i32.store offset=4 + global.get $~lib/wasi_internal/tempbuf + local.get $7 + local.get $3 + i32.const 8 + i32.shl + i32.or + local.get $4 + i32.const 16 + i32.shl + i32.or + local.get $5 + i32.const 24 + i32.shl + i32.or + i32.store offset=8 + local.get $0 + global.get $~lib/wasi_internal/tempbuf + i32.const 1 + global.get $~lib/wasi_internal/tempbuf + i32.const 3 + i32.const 4 + i32.mul + i32.add + call $~lib/bindings/wasi_snapshot_preview1/fd_write + local.set $8 + local.get $8 + i32.const 65535 + i32.and + if + local.get $8 + call $~lib/bindings/wasi_snapshot_preview1/errnoToString + i32.const 70384 + i32.const 177 + i32.const 16 + call $~lib/wasi_internal/wasi_abort + unreachable + end + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + return + end local.get $1 - call $~lib/string/String#concat - local.set $1 + local.set $12 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $12 i32.store + local.get $12 + i32.const 0 + call $~lib/string/String.UTF8.byteLength + local.set $9 + local.get $9 + call $~lib/rt/tlsf/__alloc + local.set $10 local.get $1 - call $~lib/wasi_console/wasi_console.log - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $start:assembly/test - (local $0 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer + local.get $2 + local.get $10 i32.const 0 - i32.store offset=8 - call $start:~lib/json-as/assembly/index - call $start:~lib/as-console/index + i32.const 3 + global.set $~argumentsLength i32.const 0 - call $assembly/test/Yo#constructor - global.set $assembly/test/y - global.get $assembly/test/y - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=8 - local.get $0 - call $assembly/test/Yo#get:map - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - i32.const 1808 - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=4 - local.get $0 - i64.const 3000 - call $"~lib/map/Map<~lib/string/String,u64>#set" - drop - global.get $assembly/test/y - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=4 - local.get $0 - call $~lib/json-as/assembly/index/JSON.stringify - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 + call $~lib/string/String.UTF8.encodeUnsafe@varargs + local.get $9 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 70384 + i32.const 183 + i32.const 3 + call $~lib/wasi_internal/wasi_abort + unreachable + end + global.get $~lib/wasi_internal/tempbuf + local.get $10 i32.store - local.get $0 - call $~lib/as-console/assembly/index/log<~lib/string/String> - global.get $assembly/test/y - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 + global.get $~lib/wasi_internal/tempbuf + local.get $9 i32.store offset=4 local.get $0 - call $assembly/test/Yo#get:map - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store - local.get $0 - call $"~lib/as-console/assembly/index/log<~lib/map/Map<~lib/string/String,u64>>" + global.get $~lib/wasi_internal/tempbuf + i32.const 1 + global.get $~lib/wasi_internal/tempbuf + i32.const 2 + i32.const 4 + i32.mul + i32.add + call $~lib/bindings/wasi_snapshot_preview1/fd_write + local.set $11 + local.get $10 + call $~lib/rt/tlsf/__free + local.get $11 + i32.const 65535 + i32.and + if + local.get $11 + call $~lib/bindings/wasi_snapshot_preview1/errnoToString + i32.const 70384 + i32.const 188 + i32.const 12 + call $~lib/wasi_internal/wasi_abort + unreachable + end global.get $~lib/memory/__stack_pointer - i32.const 12 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/as-variant/assembly/index/Variant#__visit (param $0 i32) (param $1 i32) + (func $~lib/wasi_process/WritableStream#write<~lib/string/String> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store + i32.const 0 + i32.store + i32.const 1 + drop local.get $0 - local.set $4 + local.get $1 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.store - local.get $4 - call $~lib/as-variant/assembly/index/Variant#get:discriminator - i32.const 12 - i32.ge_s - if - block $~lib/as-variant/assembly/index/Variant#getUnchecked|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $0 - local.tee $2 - i32.store offset=4 - local.get $2 - i32.load offset=8 - br $~lib/as-variant/assembly/index/Variant#getUnchecked|inlined.0 - end - local.set $3 - local.get $3 - if - local.get $3 - local.get $1 - call $~lib/rt/itcms/__visit - end - end + local.get $2 + call $~lib/wasi_process/writeString global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $"~lib/map/Map<~lib/string/String,u32>#__visit" (param $0 i32) (param $1 i32) + (func $~lib/wasi_console/wasi_console.log (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -11442,304 +5143,3306 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - call $"~lib/map/Map<~lib/string/String,u32>#get:buckets" + global.get $~lib/wasi_process/wasi_process.stdout + local.set $1 local.get $1 - call $~lib/rt/itcms/__visit local.get $0 - local.set $7 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $2 i32.store - local.get $7 - call $"~lib/map/Map<~lib/string/String,u32>#get:entries" - local.set $2 - i32.const 1 - drop local.get $2 - local.set $3 - local.get $3 - local.get $0 - local.set $7 + call $~lib/wasi_process/WritableStream#write<~lib/string/String> + local.get $1 + i32.const 70448 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $2 i32.store - local.get $7 - call $"~lib/map/Map<~lib/string/String,u32>#get:entriesOffset" - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u32>|inlined.1" (result i32) - i32.const 12 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u32>|inlined.1" - end - i32.mul - i32.add - local.set $4 - loop $while-continue|0 - local.get $3 - local.get $4 - i32.lt_u - if - local.get $3 - local.set $5 - local.get $5 - call $"~lib/map/MapEntry<~lib/string/String,u32>#get:taggedNext" - i32.const 1 - i32.and - i32.eqz - if - i32.const 1 - drop - local.get $5 - call $"~lib/map/MapEntry<~lib/string/String,u32>#get:key" - local.set $6 - i32.const 0 - drop - local.get $6 - local.get $1 - call $~lib/rt/itcms/__visit - i32.const 0 - drop - end - local.get $3 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u32>|inlined.2" (result i32) - i32.const 12 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u32>|inlined.2" - end - i32.add - local.set $3 - br $while-continue|0 - end - end local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit + call $~lib/wasi_process/WritableStream#write<~lib/string/String> global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $"~lib/map/Map<~lib/string/String,u64>#__visit" (param $0 i32) (param $1 i32) + (func $assembly/index/JSON.stringifyBL<~lib/string/String> (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local $26 i32) + (local $27 i32) + (local $28 i32) + (local $29 i32) + (local $30 i32) + (local $31 i32) + (local $32 i32) + (local $33 i32) + (local $34 i32) + (local $35 i32) + (local $36 i32) + (local $37 i32) + (local $38 i32) + (local $39 i32) + (local $40 i32) + (local $41 i32) + (local $42 i32) + (local $43 i32) + (local $44 i32) + (local $45 i32) + (local $46 i32) + (local $47 i32) + (local $48 i32) + (local $49 i32) + (local $50 i32) + (local $51 i32) + (local $52 i32) + (local $53 i32) + (local $54 i32) + (local $55 i32) + (local $56 i32) + (local $57 i32) + (local $58 i32) + (local $59 i32) + (local $60 i32) + (local $61 i32) + (local $62 i64) + (local $63 i32) + (local $64 i32) + (local $65 i32) + (local $66 i32) + (local $67 i32) + (local $68 i64) + (local $69 i32) + (local $70 i32) + (local $71 i32) + (local $72 i32) + (local $73 i32) + (local $74 i32) + (local $75 i32) + (local $76 i32) + (local $77 i32) + (local $78 i32) + (local $79 i32) + (local $80 i32) + (local $81 i32) + (local $82 i32) + (local $83 i32) + (local $84 i32) + (local $85 i32) + (local $86 i32) + (local $87 i32) + (local $88 i32) + (local $89 i32) + (local $90 i32) + (local $91 i32) + (local $92 i32) + (local $93 i32) + (local $94 i32) + (local $95 i32) + (local $96 i32) + (local $97 i32) + (local $98 i32) + (local $99 i32) + (local $100 i32) + (local $101 i32) + (local $102 i32) + (local $103 i32) + (local $104 i32) + (local $105 i32) + (local $106 i32) + (local $107 i32) + (local $108 i32) + (local $109 i32) + (local $110 i32) + (local $111 i32) + (local $112 i32) + (local $113 i32) + (local $114 i32) + (local $115 i32) + (local $116 i32) + (local $117 i32) + (local $118 i64) + (local $119 i32) + (local $120 i32) + (local $121 i32) + (local $122 i32) + (local $123 i32) + (local $124 i32) + (local $125 i32) + (local $126 i32) + (local $127 i64) + (local $128 i32) + (local $129 i32) + (local $130 i32) + (local $131 i32) + (local $132 i32) + (local $133 i32) + (local $134 i32) + (local $135 i32) + (local $136 i32) + (local $137 i32) + (local $138 i32) + (local $139 i32) + (local $140 i32) + (local $141 i32) + (local $142 i32) + (local $143 i32) + (local $144 i32) + (local $145 i32) + (local $146 i32) + (local $147 i32) + (local $148 i32) + (local $149 i32) + (local $150 i32) + (local $151 i32) + (local $152 i32) + (local $153 i32) + (local $154 i32) + (local $155 i32) + (local $156 i32) + (local $157 i32) + (local $158 i32) + (local $159 i32) + (local $160 i32) + (local $161 i32) + (local $162 i32) + (local $163 i32) + (local $164 i32) + (local $165 i32) + (local $166 i32) + (local $167 i32) + (local $168 i32) + (local $169 i32) + (local $170 i32) + (local $171 i32) + (local $172 i32) + (local $173 i32) + (local $174 i32) + (local $175 i32) + (local $176 i32) + (local $177 i32) + (local $178 i32) + (local $179 i32) + (local $180 i64) + (local $181 i32) + (local $182 i32) + (local $183 i32) + (local $184 i32) + (local $185 i32) + (local $186 i32) + (local $187 i32) + (local $188 i32) + (local $189 i64) + (local $190 i32) + (local $191 i32) + (local $192 i32) + (local $193 i32) + (local $194 i32) + (local $195 i32) + (local $196 i32) + (local $197 i32) + (local $198 i32) + (local $199 i32) + (local $200 i32) + (local $201 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - call $"~lib/map/Map<~lib/string/String,u64>#get:buckets" - local.get $1 - call $~lib/rt/itcms/__visit - local.get $0 - local.set $7 + i64.const 0 + i64.store global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - call $"~lib/map/Map<~lib/string/String,u64>#get:entries" - local.set $2 + i64.const 0 + i64.store offset=8 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop i32.const 1 drop - local.get $2 - local.set $3 - local.get $3 - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - call $"~lib/map/Map<~lib/string/String,u64>#get:entriesOffset" - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.8" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.8" - end - i32.mul - i32.add - local.set $4 - loop $while-continue|0 - local.get $3 - local.get $4 - i32.lt_u + block $assembly/serialize/string/serializeStringBL|inlined.0 + global.get $~lib/memory/__stack_pointer + local.get $0 + local.tee $1 + i32.store + local.get $1 + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $2 + local.get $2 + i32.const 0 + i32.eq if + i32.const 2228258 + local.set $3 + global.get $assembly/bl/POINTER local.get $3 - local.set $5 - local.get $5 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:taggedNext" - i32.const 1 - i32.and - i32.eqz + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $4 + global.get $assembly/bl/STORE_LEN + local.get $4 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $4 i32.const 1 - drop + call $~lib/rt/itcms/__new + local.set $5 local.get $5 - call $"~lib/map/MapEntry<~lib/string/String,u64>#get:key" - local.set $6 - i32.const 0 - drop - local.get $6 - local.get $1 - call $~lib/rt/itcms/__visit - i32.const 0 + global.get $assembly/bl/CACHE + local.get $4 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $5 + call $~lib/array/Array#push drop end - local.get $3 - block $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.9" (result i32) - i32.const 24 - br $"~lib/map/ENTRY_SIZE<~lib/string/String,u64>|inlined.9" + br $assembly/serialize/string/serializeStringBL|inlined.0 + end + i32.const 0 + local.set $6 + i32.const 34 + local.set $7 + global.get $assembly/bl/POINTER + local.get $7 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $8 + global.get $assembly/bl/STORE_LEN + local.get $8 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $8 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $9 + local.get $9 + global.get $assembly/bl/CACHE + local.get $8 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $9 + call $~lib/array/Array#push + drop + end + local.get $2 + i32.const 3 + i32.gt_s + if + loop $for-loop|0 + local.get $6 + local.get $2 + i32.const 3 + i32.sub + i32.lt_s + if + local.get $1 + local.get $6 + i32.add + i32.load + local.set $10 + local.get $10 + i32.const 65535 + i32.and + local.set $11 + local.get $10 + i32.const 16 + i32.shr_u + local.set $12 + i32.const 67312 + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=8 + local.get $201 + local.get $11 + i32.const 1 + global.set $~argumentsLength + i32.const 0 + call $~lib/string/String.fromCharCode@varargs + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=12 + local.get $201 + call $~lib/string/String.__concat + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + call $~lib/wasi_console/wasi_console.log + i32.const 70480 + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=8 + local.get $201 + local.get $12 + i32.const 1 + global.set $~argumentsLength + i32.const 0 + call $~lib/string/String.fromCharCode@varargs + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=12 + local.get $201 + call $~lib/string/String.__concat + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + call $~lib/wasi_console/wasi_console.log + local.get $11 + i32.const 31 + i32.gt_u + if + local.get $12 + i32.const 31 + i32.gt_u + if + block $break|1 + block $case2|1 + block $case1|1 + block $case0|1 + local.get $11 + local.set $13 + local.get $13 + i32.const 34 + i32.eq + br_if $case0|1 + local.get $13 + i32.const 92 + i32.eq + br_if $case1|1 + br $case2|1 + end + i32.const 2228316 + local.set $14 + global.get $assembly/bl/POINTER + local.get $14 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $15 + global.get $assembly/bl/STORE_LEN + local.get $15 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $15 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $16 + local.get $16 + global.get $assembly/bl/CACHE + local.get $15 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $16 + call $~lib/array/Array#push + drop + end + br $break|1 + end + i32.const 6029404 + local.set $17 + global.get $assembly/bl/POINTER + local.get $17 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $18 + global.get $assembly/bl/STORE_LEN + local.get $18 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $18 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $19 + local.get $19 + global.get $assembly/bl/CACHE + local.get $18 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $19 + call $~lib/array/Array#push + drop + end + br $break|1 + end + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $12 + local.set $20 + local.get $20 + i32.const 34 + i32.eq + br_if $case0|2 + local.get $20 + i32.const 92 + i32.eq + br_if $case1|2 + br $case2|2 + end + local.get $11 + local.set $21 + global.get $assembly/bl/POINTER + local.get $21 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $22 + global.get $assembly/bl/STORE_LEN + local.get $22 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $22 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $23 + local.get $23 + global.get $assembly/bl/CACHE + local.get $22 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $23 + call $~lib/array/Array#push + drop + end + i32.const 2228316 + local.set $24 + global.get $assembly/bl/POINTER + local.get $24 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $25 + global.get $assembly/bl/STORE_LEN + local.get $25 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $25 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $26 + local.get $26 + global.get $assembly/bl/CACHE + local.get $25 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $26 + call $~lib/array/Array#push + drop + end + br $break|2 + end + local.get $11 + local.set $27 + global.get $assembly/bl/POINTER + local.get $27 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $28 + global.get $assembly/bl/STORE_LEN + local.get $28 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $28 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $29 + local.get $29 + global.get $assembly/bl/CACHE + local.get $28 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $29 + call $~lib/array/Array#push + drop + end + i32.const 6029404 + local.set $30 + global.get $assembly/bl/POINTER + local.get $30 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $31 + global.get $assembly/bl/STORE_LEN + local.get $31 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $31 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $32 + local.get $32 + global.get $assembly/bl/CACHE + local.get $31 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $32 + call $~lib/array/Array#push + drop + end + br $break|2 + end + local.get $10 + local.set $33 + global.get $assembly/bl/POINTER + local.get $33 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $34 + global.get $assembly/bl/STORE_LEN + local.get $34 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $34 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $35 + local.get $35 + global.get $assembly/bl/CACHE + local.get $34 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $35 + call $~lib/array/Array#push + drop + end + br $break|2 + end + end + else + block $break|3 + block $case2|3 + block $case1|3 + block $case0|3 + local.get $11 + local.set $36 + local.get $36 + i32.const 34 + i32.eq + br_if $case0|3 + local.get $36 + i32.const 92 + i32.eq + br_if $case1|3 + br $case2|3 + end + i32.const 2228316 + local.set $37 + global.get $assembly/bl/POINTER + local.get $37 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $38 + global.get $assembly/bl/STORE_LEN + local.get $38 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $38 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $39 + local.get $39 + global.get $assembly/bl/CACHE + local.get $38 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $39 + call $~lib/array/Array#push + drop + end + br $break|3 + end + i32.const 6029404 + local.set $40 + global.get $assembly/bl/POINTER + local.get $40 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $41 + global.get $assembly/bl/STORE_LEN + local.get $41 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $41 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $42 + local.get $42 + global.get $assembly/bl/CACHE + local.get $41 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $42 + call $~lib/array/Array#push + drop + end + br $break|3 + end + local.get $11 + local.set $43 + global.get $assembly/bl/POINTER + local.get $43 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $44 + global.get $assembly/bl/STORE_LEN + local.get $44 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $44 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $45 + local.get $45 + global.get $assembly/bl/CACHE + local.get $44 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $45 + call $~lib/array/Array#push + drop + end + br $break|3 + end + end + else + local.get $11 + i32.const 16 + i32.lt_u + if + block $break|4 + block $case5|4 + block $case4|4 + block $case3|4 + block $case2|4 + block $case1|4 + block $case0|4 + local.get $11 + local.set $46 + local.get $46 + i32.const 8 + i32.eq + br_if $case0|4 + local.get $46 + i32.const 9 + i32.eq + br_if $case1|4 + local.get $46 + i32.const 10 + i32.eq + br_if $case2|4 + local.get $46 + i32.const 12 + i32.eq + br_if $case3|4 + local.get $46 + i32.const 13 + i32.eq + br_if $case4|4 + br $case5|4 + end + i32.const 6422620 + local.set $47 + global.get $assembly/bl/POINTER + local.get $47 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $48 + global.get $assembly/bl/STORE_LEN + local.get $48 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $48 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $49 + local.get $49 + global.get $assembly/bl/CACHE + local.get $48 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $49 + call $~lib/array/Array#push + drop + end + br $break|4 + end + i32.const 7602268 + local.set $50 + global.get $assembly/bl/POINTER + local.get $50 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $51 + global.get $assembly/bl/STORE_LEN + local.get $51 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $51 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $52 + local.get $52 + global.get $assembly/bl/CACHE + local.get $51 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $52 + call $~lib/array/Array#push + drop + end + br $break|4 + end + i32.const 7209052 + local.set $53 + global.get $assembly/bl/POINTER + local.get $53 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $54 + global.get $assembly/bl/STORE_LEN + local.get $54 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $54 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $55 + local.get $55 + global.get $assembly/bl/CACHE + local.get $54 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $55 + call $~lib/array/Array#push + drop + end + br $break|4 + end + i32.const 6684764 + local.set $56 + global.get $assembly/bl/POINTER + local.get $56 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $57 + global.get $assembly/bl/STORE_LEN + local.get $57 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $57 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $58 + local.get $58 + global.get $assembly/bl/CACHE + local.get $57 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $58 + call $~lib/array/Array#push + drop + end + br $break|4 + end + i32.const 7471196 + local.set $59 + global.get $assembly/bl/POINTER + local.get $59 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $60 + global.get $assembly/bl/STORE_LEN + local.get $60 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $60 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $61 + local.get $61 + global.get $assembly/bl/CACHE + local.get $60 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $61 + call $~lib/array/Array#push + drop + end + br $break|4 + end + i64.const 13511005048209500 + local.set $62 + global.get $assembly/bl/POINTER + local.get $62 + i64.store + global.get $assembly/bl/POINTER + i32.const 8 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $63 + global.get $assembly/bl/STORE_LEN + local.get $63 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $63 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $64 + local.get $64 + global.get $assembly/bl/CACHE + local.get $63 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $64 + call $~lib/array/Array#push + drop + end + local.get $11 + call $assembly/util/_intTo16 + i32.const 16 + i32.shl + i32.const 48 + i32.or + local.set $65 + global.get $assembly/bl/POINTER + local.get $65 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $66 + global.get $assembly/bl/STORE_LEN + local.get $66 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $66 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $67 + local.get $67 + global.get $assembly/bl/CACHE + local.get $66 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $67 + call $~lib/array/Array#push + drop + end + br $break|4 + end + else + i64.const 13511005048209500 + local.set $68 + global.get $assembly/bl/POINTER + local.get $68 + i64.store + global.get $assembly/bl/POINTER + i32.const 8 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $69 + global.get $assembly/bl/STORE_LEN + local.get $69 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $69 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $70 + local.get $70 + global.get $assembly/bl/CACHE + local.get $69 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $70 + call $~lib/array/Array#push + drop + end + block $assembly/util/intTo16|inlined.0 (result i32) + local.get $11 + local.set $71 + local.get $71 + i32.const 4 + i32.shr_s + local.set $72 + local.get $71 + i32.const 15 + i32.and + local.set $73 + local.get $73 + i32.const 10 + i32.lt_s + if + local.get $72 + i32.const 10 + i32.lt_s + if + i32.const 48 + local.get $73 + i32.add + i32.const 16 + i32.shl + i32.const 48 + local.get $72 + i32.add + i32.or + br $assembly/util/intTo16|inlined.0 + else + i32.const 48 + local.get $73 + i32.add + i32.const 16 + i32.shl + i32.const 87 + local.get $72 + i32.add + i32.or + br $assembly/util/intTo16|inlined.0 + end + unreachable + else + local.get $72 + i32.const 10 + i32.lt_s + if + i32.const 87 + local.get $73 + i32.add + i32.const 16 + i32.shl + i32.const 48 + local.get $72 + i32.add + i32.or + br $assembly/util/intTo16|inlined.0 + else + i32.const 87 + local.get $73 + i32.add + i32.const 16 + i32.shl + i32.const 87 + local.get $72 + i32.add + i32.or + br $assembly/util/intTo16|inlined.0 + end + unreachable + end + unreachable + end + i32.const 16 + i32.shl + i32.const 48 + i32.or + local.set $74 + global.get $assembly/bl/POINTER + local.get $74 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $75 + global.get $assembly/bl/STORE_LEN + local.get $75 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $75 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $76 + local.get $76 + global.get $assembly/bl/CACHE + local.get $75 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $76 + call $~lib/array/Array#push + drop + end + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + br $for-loop|0 + end end - i32.add - local.set $3 - br $while-continue|0 - end - end - local.get $2 - local.get $1 - call $~lib/rt/itcms/__visit - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/array/Array<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const 1 - drop - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 - call $~lib/array/Array<~lib/string/String>#get:dataStart - local.set $2 - local.get $2 - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 - call $~lib/array/Array<~lib/string/String>#get:length_ - i32.const 2 - i32.shl - i32.add - local.set $3 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_u - if + local.get $6 local.get $2 - i32.load - local.set $4 - local.get $4 + i32.lt_s if - local.get $4 local.get $1 - call $~lib/rt/itcms/__visit + local.get $2 + i32.add + i32.const 2 + i32.sub + i32.load16_u + local.set $77 + local.get $77 + i32.const 31 + i32.gt_u + if + local.get $77 + i32.const 34 + i32.eq + if + i32.const 2228316 + local.set $78 + global.get $assembly/bl/POINTER + local.get $78 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $79 + global.get $assembly/bl/STORE_LEN + local.get $79 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $79 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $80 + local.get $80 + global.get $assembly/bl/CACHE + local.get $79 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $80 + call $~lib/array/Array#push + drop + end + else + local.get $77 + i32.const 92 + i32.eq + if + i32.const 6029404 + local.set $81 + global.get $assembly/bl/POINTER + local.get $81 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $82 + global.get $assembly/bl/STORE_LEN + local.get $82 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $82 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $83 + local.get $83 + global.get $assembly/bl/CACHE + local.get $82 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $83 + call $~lib/array/Array#push + drop + end + else + i32.const 2228224 + local.get $77 + i32.or + local.set $84 + global.get $assembly/bl/POINTER + local.get $84 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $85 + global.get $assembly/bl/STORE_LEN + local.get $85 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $85 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $86 + local.get $86 + global.get $assembly/bl/CACHE + local.get $85 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $86 + call $~lib/array/Array#push + drop + end + end + end + else + local.get $77 + i32.const 16 + i32.lt_u + if + block $break|5 + block $case5|5 + block $case4|5 + block $case3|5 + block $case2|5 + block $case1|5 + block $case0|5 + local.get $77 + local.set $87 + local.get $87 + i32.const 8 + i32.eq + br_if $case0|5 + local.get $87 + i32.const 9 + i32.eq + br_if $case1|5 + local.get $87 + i32.const 10 + i32.eq + br_if $case2|5 + local.get $87 + i32.const 12 + i32.eq + br_if $case3|5 + local.get $87 + i32.const 13 + i32.eq + br_if $case4|5 + br $case5|5 + end + i32.const 6422620 + local.set $88 + global.get $assembly/bl/POINTER + local.get $88 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $89 + global.get $assembly/bl/STORE_LEN + local.get $89 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $89 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $90 + local.get $90 + global.get $assembly/bl/CACHE + local.get $89 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $90 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $91 + global.get $assembly/bl/POINTER + local.get $91 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $92 + global.get $assembly/bl/STORE_LEN + local.get $92 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $92 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $93 + local.get $93 + global.get $assembly/bl/CACHE + local.get $92 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $93 + call $~lib/array/Array#push + drop + end + br $break|5 + end + i32.const 7602268 + local.set $94 + global.get $assembly/bl/POINTER + local.get $94 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $95 + global.get $assembly/bl/STORE_LEN + local.get $95 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $95 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $96 + local.get $96 + global.get $assembly/bl/CACHE + local.get $95 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $96 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $97 + global.get $assembly/bl/POINTER + local.get $97 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $98 + global.get $assembly/bl/STORE_LEN + local.get $98 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $98 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $99 + local.get $99 + global.get $assembly/bl/CACHE + local.get $98 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $99 + call $~lib/array/Array#push + drop + end + br $break|5 + end + i32.const 7209052 + local.set $100 + global.get $assembly/bl/POINTER + local.get $100 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $101 + global.get $assembly/bl/STORE_LEN + local.get $101 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $101 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $102 + local.get $102 + global.get $assembly/bl/CACHE + local.get $101 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $102 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $103 + global.get $assembly/bl/POINTER + local.get $103 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $104 + global.get $assembly/bl/STORE_LEN + local.get $104 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $104 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $105 + local.get $105 + global.get $assembly/bl/CACHE + local.get $104 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $105 + call $~lib/array/Array#push + drop + end + br $break|5 + end + i32.const 6684764 + local.set $106 + global.get $assembly/bl/POINTER + local.get $106 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $107 + global.get $assembly/bl/STORE_LEN + local.get $107 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $107 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $108 + local.get $108 + global.get $assembly/bl/CACHE + local.get $107 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $108 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $109 + global.get $assembly/bl/POINTER + local.get $109 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $110 + global.get $assembly/bl/STORE_LEN + local.get $110 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $110 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $111 + local.get $111 + global.get $assembly/bl/CACHE + local.get $110 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $111 + call $~lib/array/Array#push + drop + end + br $break|5 + end + i32.const 7471196 + local.set $112 + global.get $assembly/bl/POINTER + local.get $112 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $113 + global.get $assembly/bl/STORE_LEN + local.get $113 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $113 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $114 + local.get $114 + global.get $assembly/bl/CACHE + local.get $113 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $114 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $115 + global.get $assembly/bl/POINTER + local.get $115 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $116 + global.get $assembly/bl/STORE_LEN + local.get $116 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $116 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $117 + local.get $117 + global.get $assembly/bl/CACHE + local.get $116 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $117 + call $~lib/array/Array#push + drop + end + br $break|5 + end + i64.const 13511005048209500 + local.set $118 + global.get $assembly/bl/POINTER + local.get $118 + i64.store + global.get $assembly/bl/POINTER + i32.const 8 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $119 + global.get $assembly/bl/STORE_LEN + local.get $119 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $119 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $120 + local.get $120 + global.get $assembly/bl/CACHE + local.get $119 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $120 + call $~lib/array/Array#push + drop + end + local.get $77 + call $assembly/util/_intTo16 + i32.const 16 + i32.shl + i32.const 48 + i32.or + local.set $121 + global.get $assembly/bl/POINTER + local.get $121 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $122 + global.get $assembly/bl/STORE_LEN + local.get $122 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $122 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $123 + local.get $123 + global.get $assembly/bl/CACHE + local.get $122 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $123 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $124 + global.get $assembly/bl/POINTER + local.get $124 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $125 + global.get $assembly/bl/STORE_LEN + local.get $125 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $125 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $126 + local.get $126 + global.get $assembly/bl/CACHE + local.get $125 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $126 + call $~lib/array/Array#push + drop + end + br $break|5 + end + else + i64.const 13511005048209500 + local.set $127 + global.get $assembly/bl/POINTER + local.get $127 + i64.store + global.get $assembly/bl/POINTER + i32.const 8 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $128 + global.get $assembly/bl/STORE_LEN + local.get $128 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $128 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $129 + local.get $129 + global.get $assembly/bl/CACHE + local.get $128 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $129 + call $~lib/array/Array#push + drop + end + block $assembly/util/intTo16|inlined.1 (result i32) + local.get $77 + local.set $130 + local.get $130 + i32.const 4 + i32.shr_s + local.set $131 + local.get $130 + i32.const 15 + i32.and + local.set $132 + local.get $132 + i32.const 10 + i32.lt_s + if + local.get $131 + i32.const 10 + i32.lt_s + if + i32.const 48 + local.get $132 + i32.add + i32.const 16 + i32.shl + i32.const 48 + local.get $131 + i32.add + i32.or + br $assembly/util/intTo16|inlined.1 + else + i32.const 48 + local.get $132 + i32.add + i32.const 16 + i32.shl + i32.const 87 + local.get $131 + i32.add + i32.or + br $assembly/util/intTo16|inlined.1 + end + unreachable + else + local.get $131 + i32.const 10 + i32.lt_s + if + i32.const 87 + local.get $132 + i32.add + i32.const 16 + i32.shl + i32.const 48 + local.get $131 + i32.add + i32.or + br $assembly/util/intTo16|inlined.1 + else + i32.const 87 + local.get $132 + i32.add + i32.const 16 + i32.shl + i32.const 87 + local.get $131 + i32.add + i32.or + br $assembly/util/intTo16|inlined.1 + end + unreachable + end + unreachable + end + i32.const 16 + i32.shl + i32.const 48 + i32.or + local.set $133 + global.get $assembly/bl/POINTER + local.get $133 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $134 + global.get $assembly/bl/STORE_LEN + local.get $134 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $134 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $135 + local.get $135 + global.get $assembly/bl/CACHE + local.get $134 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $135 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $136 + global.get $assembly/bl/POINTER + local.get $136 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $137 + global.get $assembly/bl/STORE_LEN + local.get $137 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $137 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $138 + local.get $138 + global.get $assembly/bl/CACHE + local.get $137 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $138 + call $~lib/array/Array#push + drop + end + end + end end + else + local.get $1 local.get $2 - i32.const 4 i32.add - local.set $2 - br $while-continue|0 - end - end - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 - call $~lib/array/Array<~lib/string/String>#get:buffer - local.get $1 - call $~lib/rt/itcms/__visit - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const 0 - drop - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - call $~lib/array/Array#get:buffer - local.get $1 - call $~lib/rt/itcms/__visit - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const 0 - drop - local.get $0 - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - call $~lib/array/Array#get:buffer - local.get $1 - call $~lib/rt/itcms/__visit + i32.const 2 + i32.sub + i32.load16_u + local.set $139 + local.get $139 + i32.const 31 + i32.gt_u + if + local.get $139 + i32.const 34 + i32.eq + if + i32.const 2228316 + local.set $140 + global.get $assembly/bl/POINTER + local.get $140 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $141 + global.get $assembly/bl/STORE_LEN + local.get $141 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $141 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $142 + local.get $142 + global.get $assembly/bl/CACHE + local.get $141 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $142 + call $~lib/array/Array#push + drop + end + else + local.get $139 + i32.const 92 + i32.eq + if + i32.const 6029404 + local.set $143 + global.get $assembly/bl/POINTER + local.get $143 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $144 + global.get $assembly/bl/STORE_LEN + local.get $144 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $144 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $145 + local.get $145 + global.get $assembly/bl/CACHE + local.get $144 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $145 + call $~lib/array/Array#push + drop + end + else + i32.const 2228224 + local.get $139 + i32.or + local.set $146 + global.get $assembly/bl/POINTER + local.get $146 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $147 + global.get $assembly/bl/STORE_LEN + local.get $147 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $147 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $148 + local.get $148 + global.get $assembly/bl/CACHE + local.get $147 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $148 + call $~lib/array/Array#push + drop + end + end + end + else + local.get $139 + i32.const 16 + i32.lt_u + if + block $break|6 + block $case5|6 + block $case4|6 + block $case3|6 + block $case2|6 + block $case1|6 + block $case0|6 + local.get $139 + local.set $149 + local.get $149 + i32.const 8 + i32.eq + br_if $case0|6 + local.get $149 + i32.const 9 + i32.eq + br_if $case1|6 + local.get $149 + i32.const 10 + i32.eq + br_if $case2|6 + local.get $149 + i32.const 12 + i32.eq + br_if $case3|6 + local.get $149 + i32.const 13 + i32.eq + br_if $case4|6 + br $case5|6 + end + i32.const 6422620 + local.set $150 + global.get $assembly/bl/POINTER + local.get $150 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $151 + global.get $assembly/bl/STORE_LEN + local.get $151 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $151 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $152 + local.get $152 + global.get $assembly/bl/CACHE + local.get $151 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $152 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $153 + global.get $assembly/bl/POINTER + local.get $153 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $154 + global.get $assembly/bl/STORE_LEN + local.get $154 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $154 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $155 + local.get $155 + global.get $assembly/bl/CACHE + local.get $154 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $155 + call $~lib/array/Array#push + drop + end + br $break|6 + end + i32.const 7602268 + local.set $156 + global.get $assembly/bl/POINTER + local.get $156 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $157 + global.get $assembly/bl/STORE_LEN + local.get $157 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $157 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $158 + local.get $158 + global.get $assembly/bl/CACHE + local.get $157 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $158 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $159 + global.get $assembly/bl/POINTER + local.get $159 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $160 + global.get $assembly/bl/STORE_LEN + local.get $160 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $160 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $161 + local.get $161 + global.get $assembly/bl/CACHE + local.get $160 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $161 + call $~lib/array/Array#push + drop + end + br $break|6 + end + i32.const 7209052 + local.set $162 + global.get $assembly/bl/POINTER + local.get $162 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $163 + global.get $assembly/bl/STORE_LEN + local.get $163 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $163 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $164 + local.get $164 + global.get $assembly/bl/CACHE + local.get $163 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $164 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $165 + global.get $assembly/bl/POINTER + local.get $165 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $166 + global.get $assembly/bl/STORE_LEN + local.get $166 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $166 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $167 + local.get $167 + global.get $assembly/bl/CACHE + local.get $166 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $167 + call $~lib/array/Array#push + drop + end + br $break|6 + end + i32.const 6684764 + local.set $168 + global.get $assembly/bl/POINTER + local.get $168 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $169 + global.get $assembly/bl/STORE_LEN + local.get $169 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $169 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $170 + local.get $170 + global.get $assembly/bl/CACHE + local.get $169 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $170 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $171 + global.get $assembly/bl/POINTER + local.get $171 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $172 + global.get $assembly/bl/STORE_LEN + local.get $172 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $172 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $173 + local.get $173 + global.get $assembly/bl/CACHE + local.get $172 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $173 + call $~lib/array/Array#push + drop + end + br $break|6 + end + i32.const 7471196 + local.set $174 + global.get $assembly/bl/POINTER + local.get $174 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $175 + global.get $assembly/bl/STORE_LEN + local.get $175 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $175 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $176 + local.get $176 + global.get $assembly/bl/CACHE + local.get $175 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $176 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $177 + global.get $assembly/bl/POINTER + local.get $177 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $178 + global.get $assembly/bl/STORE_LEN + local.get $178 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $178 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $179 + local.get $179 + global.get $assembly/bl/CACHE + local.get $178 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $179 + call $~lib/array/Array#push + drop + end + br $break|6 + end + i64.const 13511005048209500 + local.set $180 + global.get $assembly/bl/POINTER + local.get $180 + i64.store + global.get $assembly/bl/POINTER + i32.const 8 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $181 + global.get $assembly/bl/STORE_LEN + local.get $181 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $181 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $182 + local.get $182 + global.get $assembly/bl/CACHE + local.get $181 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $182 + call $~lib/array/Array#push + drop + end + local.get $139 + call $assembly/util/_intTo16 + i32.const 16 + i32.shl + i32.const 48 + i32.or + local.set $183 + global.get $assembly/bl/POINTER + local.get $183 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $184 + global.get $assembly/bl/STORE_LEN + local.get $184 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $184 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $185 + local.get $185 + global.get $assembly/bl/CACHE + local.get $184 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $185 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $186 + global.get $assembly/bl/POINTER + local.get $186 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $187 + global.get $assembly/bl/STORE_LEN + local.get $187 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $187 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $188 + local.get $188 + global.get $assembly/bl/CACHE + local.get $187 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $188 + call $~lib/array/Array#push + drop + end + br $break|6 + end + else + i64.const 13511005048209500 + local.set $189 + global.get $assembly/bl/POINTER + local.get $189 + i64.store + global.get $assembly/bl/POINTER + i32.const 8 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $190 + global.get $assembly/bl/STORE_LEN + local.get $190 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $190 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $191 + local.get $191 + global.get $assembly/bl/CACHE + local.get $190 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $191 + call $~lib/array/Array#push + drop + end + block $assembly/util/intTo16|inlined.2 (result i32) + local.get $139 + local.set $192 + local.get $192 + i32.const 4 + i32.shr_s + local.set $193 + local.get $192 + i32.const 15 + i32.and + local.set $194 + local.get $194 + i32.const 10 + i32.lt_s + if + local.get $193 + i32.const 10 + i32.lt_s + if + i32.const 48 + local.get $194 + i32.add + i32.const 16 + i32.shl + i32.const 48 + local.get $193 + i32.add + i32.or + br $assembly/util/intTo16|inlined.2 + else + i32.const 48 + local.get $194 + i32.add + i32.const 16 + i32.shl + i32.const 87 + local.get $193 + i32.add + i32.or + br $assembly/util/intTo16|inlined.2 + end + unreachable + else + local.get $193 + i32.const 10 + i32.lt_s + if + i32.const 87 + local.get $194 + i32.add + i32.const 16 + i32.shl + i32.const 48 + local.get $193 + i32.add + i32.or + br $assembly/util/intTo16|inlined.2 + else + i32.const 87 + local.get $194 + i32.add + i32.const 16 + i32.shl + i32.const 87 + local.get $193 + i32.add + i32.or + br $assembly/util/intTo16|inlined.2 + end + unreachable + end + unreachable + end + i32.const 16 + i32.shl + i32.const 48 + i32.or + local.set $195 + global.get $assembly/bl/POINTER + local.get $195 + i32.store + global.get $assembly/bl/POINTER + i32.const 4 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $196 + global.get $assembly/bl/STORE_LEN + local.get $196 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $196 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $197 + local.get $197 + global.get $assembly/bl/CACHE + local.get $196 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $197 + call $~lib/array/Array#push + drop + end + i32.const 34 + local.set $198 + global.get $assembly/bl/POINTER + local.get $198 + i32.store16 + global.get $assembly/bl/POINTER + i32.const 2 + i32.add + global.set $assembly/bl/POINTER + i32.const 65632 + global.get $assembly/bl/POINTER + i32.le_u + if + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $199 + global.get $assembly/bl/STORE_LEN + local.get $199 + i32.add + global.set $assembly/bl/STORE_LEN + local.get $199 + i32.const 1 + call $~lib/rt/itcms/__new + local.set $200 + local.get $200 + global.get $assembly/bl/CACHE + local.get $199 + memory.copy + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER + global.get $assembly/bl/STORE + local.set $201 + global.get $~lib/memory/__stack_pointer + local.get $201 + i32.store offset=4 + local.get $201 + local.get $200 + call $~lib/array/Array#push + drop + end + end + end + end + end global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/object/Object#constructor (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (param $0 i32) (result i32) (local $1 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -11750,66 +8453,21 @@ i32.const 0 i32.store local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - end - local.get $0 local.set $1 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer local.get $1 - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 i32.store local.get $1 - i32.const 1073741820 - i32.gt_u - if - i32.const 1664 - i32.const 1712 - i32.const 52 - i32.const 43 - call $~lib/wasi_internal/wasi_abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $2 - i32.store - i32.const 2 - global.get $~lib/shared/runtime/Runtime.Incremental - i32.ne - drop - local.get $2 - local.set $3 + call $~lib/array/Array#get:length_ + local.set $1 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $1 return ) - (func $~lib/json-as/assembly/sink/Sink#get:buffer (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -11819,403 +8477,161 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - global.get $~lib/memory/__stack_pointer local.get $0 - i32.load - local.tee $1 - i32.store - local.get $1 - if (result i32) - local.get $1 - else - i32.const 1952 - i32.const 2080 - i32.const 14 - i32.const 12 - call $~lib/wasi_internal/wasi_abort - unreachable - end local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer local.get $2 - ) - (func $~lib/util/number/itoa32 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 i32.store + local.get $2 + call $~lib/array/Array#get:dataStart local.get $1 i32.const 2 - i32.lt_s - if (result i32) - i32.const 1 - else - local.get $1 - i32.const 36 - i32.gt_s - end - if - i32.const 2400 - i32.const 2528 - i32.const 373 - i32.const 5 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $0 - i32.eqz - if - i32.const 2592 - local.set $14 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $14 - return - end - local.get $0 - i32.const 31 - i32.shr_u - i32.const 1 i32.shl + i32.add + i32.load local.set $2 - local.get $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $1 - i32.const 10 - i32.eq - if - local.get $0 - call $~lib/util/number/decimalCount32 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 1 - i32.shl - local.get $2 - i32.add - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $3 - i32.store - local.get $3 - local.get $2 - i32.add - local.set $5 - local.get $0 - local.set $6 - local.get $4 - local.set $7 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $6 - local.get $7 - call $~lib/util/number/utoa32_dec_lut - else - local.get $1 - i32.const 16 - i32.eq - if - i32.const 31 - local.get $0 - i32.clz - i32.sub - i32.const 2 - i32.shr_s - i32.const 1 - i32.add - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.const 1 - i32.shl - local.get $2 - i32.add - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $3 - i32.store - local.get $3 - local.get $2 - i32.add - local.set $9 - local.get $0 - local.set $10 - local.get $8 - local.set $11 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $9 - local.get $10 - i64.extend_i32_u - local.get $11 - call $~lib/util/number/utoa_hex_lut - else - local.get $0 - local.set $12 - local.get $12 - i64.extend_i32_u - local.get $1 - call $~lib/util/number/ulog_base - local.set $13 - global.get $~lib/memory/__stack_pointer - local.get $13 - i32.const 1 - i32.shl - local.get $2 - i32.add - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $3 - i32.store - local.get $3 - local.get $2 - i32.add - local.get $12 - i64.extend_i32_u - local.get $13 - local.get $1 - call $~lib/util/number/utoa64_any_core - end - end - local.get $2 - if - local.get $3 - i32.const 45 - i32.store16 - end - local.get $3 - local.set $14 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $14 + local.get $2 return ) - (func $~lib/util/number/utoa64 (param $0 i64) (param $1 i32) (result i32) + (func $start:assembly/test + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i64) - (local $15 i32) - (local $16 i32) - (local $17 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - i32.const 2 - i32.lt_s - if (result i32) - i32.const 1 - else - local.get $1 - i32.const 36 - i32.gt_s - end - if - i32.const 2400 - i32.const 2528 - i32.const 401 - i32.const 5 - call $~lib/wasi_internal/wasi_abort - unreachable - end - local.get $0 i64.const 0 - i64.ne - i32.eqz - if - i32.const 2592 - local.set $17 - global.get $~lib/memory/__stack_pointer - i32.const 4 + i64.store + call $start:assembly/index + i32.const 67168 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store + local.get $5 + call $assembly/index/JSON.stringifyBL<~lib/string/String> + block $assembly/bl/bl.out<~lib/string/String>|inlined.0 (result i32) + global.get $assembly/bl/POINTER + global.get $assembly/bl/CACHE + i32.sub + local.set $0 + local.get $0 + global.get $assembly/bl/STORE_LEN i32.add - global.set $~lib/memory/__stack_pointer - local.get $17 - return - end - local.get $1 - i32.const 10 - i32.eq - if + i32.const 2 + call $~lib/rt/itcms/__new + local.set $1 + local.get $1 + global.get $assembly/bl/CACHE local.get $0 - global.get $~lib/builtins/u32.MAX_VALUE - i64.extend_i32_u - i64.le_u + memory.copy + global.get $assembly/bl/STORE_LEN if + local.get $1 local.get $0 - i32.wrap_i64 - local.set $3 - local.get $3 - call $~lib/util/number/decimalCount32 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 1 - i32.shl - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $2 - i32.store - local.get $2 - local.set $5 - local.get $3 - local.set $6 - local.get $4 - local.set $7 + i32.add + local.set $1 i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $6 - local.get $7 - call $~lib/util/number/utoa32_dec_lut - else - local.get $0 - call $~lib/util/number/decimalCount64High - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.const 1 - i32.shl - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $2 - i32.store - local.get $2 - local.set $9 - local.get $0 - local.set $10 - local.get $8 - local.set $11 + local.set $2 + loop $for-loop|0 + local.get $2 + global.get $assembly/bl/STORE + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + call $~lib/array/Array#get:length + i32.lt_s + if + global.get $assembly/bl/STORE + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + local.get $2 + call $~lib/array/Array#__uget + local.set $3 + local.get $3 + i32.const 20 + i32.sub + call $~lib/rt/common/OBJECT#get:rtSize + local.set $4 + local.get $1 + local.get $3 + local.get $4 + memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $9 - local.get $10 - local.get $11 - call $~lib/util/number/utoa64_dec_lut + global.set $assembly/bl/STORE_LEN end - else + global.get $assembly/bl/CACHE + global.set $assembly/bl/POINTER local.get $1 - i32.const 16 - i32.eq - if - i32.const 63 - local.get $0 - i64.clz - i32.wrap_i64 - i32.sub - i32.const 2 - i32.shr_s - i32.const 1 - i32.add - local.set $12 - global.get $~lib/memory/__stack_pointer - local.get $12 - i32.const 1 - i32.shl - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $2 - i32.store - local.get $2 - local.set $13 - local.get $0 - local.set $14 - local.get $12 - local.set $15 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $13 - local.get $14 - local.get $15 - call $~lib/util/number/utoa_hex_lut - else - local.get $0 - local.get $1 - call $~lib/util/number/ulog_base - local.set $16 - global.get $~lib/memory/__stack_pointer - local.get $16 - i32.const 1 - i32.shl - i32.const 2 - call $~lib/rt/itcms/__new - local.tee $2 - i32.store - local.get $2 - local.get $0 - local.get $16 - local.get $1 - call $~lib/util/number/utoa64_any_core - end + br $assembly/bl/bl.out<~lib/string/String>|inlined.0 end + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store + local.get $5 + call $~lib/wasi_console/wasi_console.log + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + i32.const 0 + drop + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store local.get $2 - local.set $17 + call $~lib/array/Array#get:buffer + local.get $1 + call $~lib/rt/itcms/__visit global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $17 - return ) - (func $~lib/rt/__newArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/string/String.fromCharCode (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -12224,44 +8640,34 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $0 local.get $1 - i32.shl - local.set $4 + i32.const 0 + i32.gt_s + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 1 - local.get $3 - call $~lib/rt/__newBuffer - local.tee $5 - i32.store - i32.const 16 + i32.const 2 local.get $2 + i32.shl + i32.const 2 call $~lib/rt/itcms/__new - local.set $6 - local.get $6 - local.get $5 + local.tee $3 i32.store - local.get $6 - local.get $5 - i32.const 0 - call $~lib/rt/itcms/__link - local.get $6 - local.get $5 - i32.store offset=4 - local.get $6 - local.get $4 - i32.store offset=8 - local.get $6 + local.get $3 local.get $0 - i32.store offset=12 - local.get $6 - local.set $7 + i32.store16 + local.get $2 + if + local.get $3 + local.get $1 + i32.store16 offset=2 + end + local.get $3 + local.set $4 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $4 return ) ) diff --git a/package.json b/package.json index 901e583..ed8701d 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "scripts": { "test": "wasmtime build/test.spec.wasm", "pretest": "asc assembly/__tests__/test.spec.ts --target test", - "build:test": "asc assembly/test.ts --target debug", - "build:bench": "asc bench/benchmark.ts -o bench/benchmark.wasm --transform ./transform --optimizeLevel 3 --shrinkLevel 0 --converge --noAssert --uncheckedBehavior always --runtime stub", + "build:test": "JSON_DEBUG=true asc assembly/test.ts --target debug --enable simd", + "build:bench": "JSON_DEBUG=true asc bench/benchmark.ts -o bench/benchmark.wasm --transform ./transform --optimizeLevel 3 --shrinkLevel 0 --converge --noAssert --uncheckedBehavior always --runtime stub --enable bulk-memory --enable simd", "bench:wasmtime": "wasmtime ./bench/benchmark.wasm", "bench:wasmer": "wasmer --llvm ./bench/benchmark.wasm", "build:transform": "tsc -p ./transform", diff --git a/transform/lib/index.js b/transform/lib/index.js index 5d30e1e..a99472c 100644 --- a/transform/lib/index.js +++ b/transform/lib/index.js @@ -41,21 +41,26 @@ class JSONTransform extends BaseVisitor { } if (!members.length) { let SERIALIZE_RAW_EMPTY = "__SERIALIZE(): string {\n return \"{}\";\n}"; + let SERIALIZE_BL_EMPTY = "__SERIALIZE_BL(): void {\n bl.write_c(123);\n bl.write_c(125);\n}"; //let SERIALIZE_PRETTY_EMPTY = "__SERIALIZE_PRETTY(): string {\n return \"{}\";\n}"; let INITIALIZE_EMPTY = "__INITIALIZE(): this {\n return this;\n}"; let DESERIALIZE_EMPTY = "__DESERIALIZE(data: string, key_start: i32, key_end: i32, value_start: i32, value_end: i32): boolean {\n return false;\n}"; if (process.env["JSON_DEBUG"]) { console.log(SERIALIZE_RAW_EMPTY); + console.log(SERIALIZE_BL_EMPTY); //console.log(SERIALIZE_PRETTY_EMPTY); console.log(INITIALIZE_EMPTY); console.log(DESERIALIZE_EMPTY); } const SERIALIZE_RAW_METHOD_EMPTY = SimpleParser.parseClassMember(SERIALIZE_RAW_EMPTY, node); + const SERIALIZE_BL_METHOD_EMPTY = SimpleParser.parseClassMember(SERIALIZE_BL_EMPTY, node); //const SERIALIZE_PRETTY_METHOD = SimpleParser.parseClassMember(SERIALIZE_PRETTY, node); const INITIALIZE_METHOD_EMPTY = SimpleParser.parseClassMember(INITIALIZE_EMPTY, node); const DESERIALIZE_METHOD_EMPTY = SimpleParser.parseClassMember(DESERIALIZE_EMPTY, node); if (!node.members.find(v => v.name.text == "__SERIALIZE")) node.members.push(SERIALIZE_RAW_METHOD_EMPTY); + if (!node.members.find(v => v.name.text == "__SERIALIZE_BL")) + node.members.push(SERIALIZE_BL_METHOD_EMPTY); if (!node.members.find(v => v.name.text == "__INITIALIZE")) node.members.push(INITIALIZE_METHOD_EMPTY); if (!node.members.find(v => v.name.text == "__DESERIALIZE")) @@ -115,11 +120,14 @@ class JSONTransform extends BaseVisitor { } if (!mem.flags.length) { mem.flags = [PropertyFlags.None]; - mem.serialize = escapeString(JSON.stringify(mem.alias || mem.name)) + ":${__SERIALIZE<" + type + ">(this." + name.text + ")}"; + const key = escapeString(JSON.stringify(mem.alias || mem.name)); + mem.serialize = key + ":${__SERIALIZE<" + type + ">(this." + name.text + ")}"; + mem.serialize_bl.push(" __SERIALIZE_BL<" + type + ">(this." + name.text + ");"); mem.deserialize = "this." + name.text + " = " + "__DESERIALIZE<" + type + ">(data.substring(value_start, value_end));"; } if (mem.flags.includes(PropertyFlags.OmitNull)) { mem.serialize = "${changetype(this." + mem.name + ") == 0" + " ? \"\" : '" + escapeString(JSON.stringify(mem.alias || mem.name)) + ":' + __SERIALIZE<" + type + ">(this." + name.text + ") + \",\"}"; + const str = escapeString(JSON.stringify(mem.alias || mem.name)); mem.deserialize = "this." + name.text + " = " + "__DESERIALIZE<" + type + ">(data.substring(value_start, value_end));"; } else if (mem.flags.includes(PropertyFlags.OmitIf)) { @@ -153,6 +161,7 @@ class JSONTransform extends BaseVisitor { schema.members.push(mem); } let SERIALIZE_RAW = "__SERIALIZE(): string {\n let out = `{"; + let SERIALIZE_BL = "__SERIALIZE_BL(): void {\n"; let SERIALIZE_PRETTY = "__SERIALIZE_PRETTY(): string {\n let out = `{"; let INITIALIZE = "__INITIALIZE(): this {\n"; let DESERIALIZE = "__DESERIALIZE(data: string, key_start: i32, key_end: i32, value_start: i32, value_end: i32): boolean {\n const len = key_end - key_start;\n"; @@ -169,6 +178,9 @@ class JSONTransform extends BaseVisitor { SERIALIZE_RAW += schema.members[0]?.serialize + ","; SERIALIZE_PRETTY += "\\n" + schema.members[0]?.serialize + ",\\n"; found = true; + SERIALIZE_BL += strToCalls("{" + escapeString(JSON.stringify(schema.members[0]?.alias || schema.members[0]?.name)) + ":") + "\n"; + ; + SERIALIZE_BL += schema.members[0]?.serialize_bl.shift() + "\n"; } if (schema.members[0]?.initialize) INITIALIZE += " " + schema.members[0]?.initialize + ";\n"; @@ -179,20 +191,34 @@ class JSONTransform extends BaseVisitor { if (member.flags.includes(PropertyFlags.OmitNull) || member.flags.includes(PropertyFlags.OmitIf)) { SERIALIZE_RAW += member.serialize; + //SERIALIZE_BL += member.serialize_bl; SERIALIZE_PRETTY += member.serialize; } else { SERIALIZE_RAW += member.serialize + ","; + if (i == schema.members.length - 1) { + SERIALIZE_BL += strToCalls("," + escapeString(JSON.stringify(member.alias || member.name)) + ":") + "\n"; + ; + SERIALIZE_BL += member.serialize_bl.shift() + "\n"; + ; + } + else { + SERIALIZE_BL += strToCalls("," + escapeString(JSON.stringify(member.alias || member.name)) + ":") + "\n"; + ; + SERIALIZE_BL += member.serialize_bl.shift() + "\n"; + } SERIALIZE_PRETTY += indent + member.serialize + ",\\n"; found = true; } } if (found) { SERIALIZE_RAW += "`;\n store(changetype(out) + ((out.length - 1) << 1), 125);\n return out;\n}"; + SERIALIZE_BL += " bl.write_c(125);\n}\n"; SERIALIZE_PRETTY += "`;\n store(changetype(out) + ((out.length - 2) << 1), 8192010);\n return out;\n}"; } else { SERIALIZE_RAW += "`;\n};"; + SERIALIZE_BL += "}\n"; SERIALIZE_PRETTY += "`;\n};"; } INITIALIZE += " return this;\n}"; @@ -297,16 +323,20 @@ class JSONTransform extends BaseVisitor { //console.log(sortedMembers); if (process.env["JSON_DEBUG"]) { console.log(SERIALIZE_RAW); + console.log(SERIALIZE_BL); //console.log(SERIALIZE_PRETTY); console.log(INITIALIZE); console.log(DESERIALIZE); } const SERIALIZE_RAW_METHOD = SimpleParser.parseClassMember(SERIALIZE_RAW, node); + const SERIALIZE_BL_METHOD = SimpleParser.parseClassMember(SERIALIZE_BL, node); //const SERIALIZE_PRETTY_METHOD = SimpleParser.parseClassMember(SERIALIZE_PRETTY, node); const INITIALIZE_METHOD = SimpleParser.parseClassMember(INITIALIZE, node); const DESERIALIZE_METHOD = SimpleParser.parseClassMember(DESERIALIZE, node); if (!node.members.find(v => v.name.text == "__SERIALIZE")) node.members.push(SERIALIZE_RAW_METHOD); + if (!node.members.find(v => v.name.text == "__SERIALIZE_BL")) + node.members.push(SERIALIZE_BL_METHOD); if (!node.members.find(v => v.name.text == "__INITIALIZE")) node.members.push(INITIALIZE_METHOD); if (!node.members.find(v => v.name.text == "__DESERIALIZE")) @@ -378,6 +408,7 @@ class Property { this.flags = []; this.args = []; this.serialize = null; + this.serialize_bl = []; this.deserialize = null; this.initialize = null; } @@ -418,3 +449,76 @@ function escapeSlash(data) { function escapeQuote(data) { return data.replace(/\"/g, "\\\""); } +function strToCalls(data) { + let out = ""; + const len = data.length - 1; + if (len >= 8) { + let i = 0; + for (; i < len - 7; i += 8) { + const a = BigInt(data.charCodeAt(i)); + const b = BigInt(data.charCodeAt(i + 1)); + const c = BigInt(data.charCodeAt(i + 2)); + const d = BigInt(data.charCodeAt(i + 3)); + const e = BigInt(data.charCodeAt(i + 4)); + const f = BigInt(data.charCodeAt(i + 5)); + const g = BigInt(data.charCodeAt(i + 6)); + const h = BigInt(data.charCodeAt(i + 7)); + out += " bl.write_128(i16x8(" + a + ", " + b + ", " + c + ", " + d + ", " + e + ", " + f + ", " + g + ", " + h + ")); /* " + data.charAt(i) + data.charAt(i + 1) + data.charAt(i + 2) + data.charAt(i + 3) + data.charAt(i + 4) + data.charAt(i + 5) + data.charAt(i + 6) + data.charAt(i + 7) + " */\n"; + } + if (i < len) { + if (len - i >= 4) { + const a = BigInt(data.charCodeAt(i)); + const b = BigInt(data.charCodeAt(i + 1)); + const c = BigInt(data.charCodeAt(i + 2)); + const d = BigInt(data.charCodeAt(i + 3)); + out += " bl.write_64(" + ((d << BigInt(48)) | (c << BigInt(32)) | (b << BigInt(16)) | a) + "/* " + data.charAt(i) + data.charAt(i + 1) + data.charAt(i + 2) + data.charAt(i + 3) + " */\n"; + i += 4; + } + if (len - i >= 2) { + const a = data.charCodeAt(i); + const b = data.charCodeAt(i + 1); + out += " bl.write_32(" + ((b << 16) | a) + "); /* " + data.charAt(i) + data.charAt(i + 1) + " */\n"; + i += 2; + } + console.log('i: ' + i.toString()); + console.log('len: ' + len.toString()); + if (len == i) { + out += " bl.write_16(" + data.charCodeAt(i) + "); /* " + data.charAt(i) + " */\n"; + i++; + } + } + else { + out += " bl.write_16(" + data.charCodeAt(len) + "); /* " + data.charAt(len) + " */\n"; + } + } + else if (len >= 4) { + let i = 0; + for (; i < len - 3; i += 4) { + const a = BigInt(data.charCodeAt(i)); + const b = BigInt(data.charCodeAt(i + 1)); + const c = BigInt(data.charCodeAt(i + 2)); + const d = BigInt(data.charCodeAt(i + 3)); + out += " bl.write_64(" + ((d << BigInt(48)) | (c << BigInt(32)) | (b << BigInt(16)) | a) + "/* " + data.charAt(i) + data.charAt(i + 1) + data.charAt(i + 2) + data.charAt(i + 3) + " */\n"; + } + if (i < len) { + const a = data.charCodeAt(len - 1); + const b = data.charCodeAt(len); + out += " bl.write_32(" + ((b << 16) | a) + "); /* " + data.charAt(len - 1) + data.charAt(len) + " */\n"; + } + else { + out += " bl.write_16(" + data.charCodeAt(len) + "); /* " + data.charAt(len) + " */\n"; + } + } + else if (len >= 2) { + let i = 0; + for (; i < len; i += 2) { + const a = data.charCodeAt(i); + const b = data.charCodeAt(i + 1); + out += " bl.write_32(" + ((b << 16) | a) + "); /* " + data.charAt(i) + data.charAt(i + 1) + " */\n"; + } + if (i != len) + out += " bl.write_16(" + data.charCodeAt(len) + "); /* " + data.charAt(len) + " */\n"; + } + return out; +} +console.log(strToCalls('{"x":1,"y":2,"z":3}')); diff --git a/transform/src/index.ts b/transform/src/index.ts index c2523c6..63325b5 100644 --- a/transform/src/index.ts +++ b/transform/src/index.ts @@ -60,6 +60,7 @@ class JSONTransform extends BaseVisitor { if (!members.length) { let SERIALIZE_RAW_EMPTY = "__SERIALIZE(): string {\n return \"{}\";\n}"; + let SERIALIZE_BL_EMPTY = "__SERIALIZE_BL(): void {\n bl.write_c(123);\n bl.write_c(125);\n}"; //let SERIALIZE_PRETTY_EMPTY = "__SERIALIZE_PRETTY(): string {\n return \"{}\";\n}"; let INITIALIZE_EMPTY = "__INITIALIZE(): this {\n return this;\n}"; @@ -68,17 +69,20 @@ class JSONTransform extends BaseVisitor { if (process.env["JSON_DEBUG"]) { console.log(SERIALIZE_RAW_EMPTY); + console.log(SERIALIZE_BL_EMPTY); //console.log(SERIALIZE_PRETTY_EMPTY); console.log(INITIALIZE_EMPTY); console.log(DESERIALIZE_EMPTY); } const SERIALIZE_RAW_METHOD_EMPTY = SimpleParser.parseClassMember(SERIALIZE_RAW_EMPTY, node); + const SERIALIZE_BL_METHOD_EMPTY = SimpleParser.parseClassMember(SERIALIZE_BL_EMPTY, node); //const SERIALIZE_PRETTY_METHOD = SimpleParser.parseClassMember(SERIALIZE_PRETTY, node); const INITIALIZE_METHOD_EMPTY = SimpleParser.parseClassMember(INITIALIZE_EMPTY, node); const DESERIALIZE_METHOD_EMPTY = SimpleParser.parseClassMember(DESERIALIZE_EMPTY, node); if (!node.members.find(v => v.name.text == "__SERIALIZE")) node.members.push(SERIALIZE_RAW_METHOD_EMPTY); + if (!node.members.find(v => v.name.text == "__SERIALIZE_BL")) node.members.push(SERIALIZE_BL_METHOD_EMPTY); if (!node.members.find(v => v.name.text == "__INITIALIZE")) node.members.push(INITIALIZE_METHOD_EMPTY); if (!node.members.find(v => v.name.text == "__DESERIALIZE")) node.members.push(DESERIALIZE_METHOD_EMPTY); @@ -133,12 +137,15 @@ class JSONTransform extends BaseVisitor { if (!mem.flags.length) { mem.flags = [PropertyFlags.None]; - mem.serialize = escapeString(JSON.stringify(mem.alias || mem.name)) + ":${__SERIALIZE<" + type + ">(this." + name.text + ")}"; + const key = escapeString(JSON.stringify(mem.alias || mem.name)); + mem.serialize = key + ":${__SERIALIZE<" + type + ">(this." + name.text + ")}"; + mem.serialize_bl.push(" __SERIALIZE_BL<" + type + ">(this." + name.text + ");"); mem.deserialize = "this." + name.text + " = " + "__DESERIALIZE<" + type + ">(data.substring(value_start, value_end));" } if (mem.flags.includes(PropertyFlags.OmitNull)) { mem.serialize = "${changetype(this." + mem.name + ") == 0" + " ? \"\" : '" + escapeString(JSON.stringify(mem.alias || mem.name)) + ":' + __SERIALIZE<" + type + ">(this." + name.text + ") + \",\"}"; + const str = escapeString(JSON.stringify(mem.alias || mem.name)); mem.deserialize = "this." + name.text + " = " + "__DESERIALIZE<" + type + ">(data.substring(value_start, value_end));" } else if (mem.flags.includes(PropertyFlags.OmitIf)) { mem.serialize = "${" + mem.args![0]! + " ? \"\" : '" + escapeString(JSON.stringify(mem.alias || mem.name)) + ":' + __SERIALIZE<" + type + ">(this." + name.text + ") + \",\"}"; @@ -170,6 +177,7 @@ class JSONTransform extends BaseVisitor { } let SERIALIZE_RAW = "__SERIALIZE(): string {\n let out = `{"; + let SERIALIZE_BL = "__SERIALIZE_BL(): void {\n"; let SERIALIZE_PRETTY = "__SERIALIZE_PRETTY(): string {\n let out = `{"; let INITIALIZE = "__INITIALIZE(): this {\n"; @@ -191,6 +199,8 @@ class JSONTransform extends BaseVisitor { SERIALIZE_RAW += schema.members[0]?.serialize + ","; SERIALIZE_PRETTY += "\\n" + schema.members[0]?.serialize + ",\\n"; found = true; + SERIALIZE_BL += strToCalls("{" + escapeString(JSON.stringify(schema.members[0]?.alias || schema.members[0]?.name)) + ":") + "\n";; + SERIALIZE_BL += schema.members[0]?.serialize_bl.shift() + "\n"; } if (schema.members[0]?.initialize) INITIALIZE += " " + schema.members[0]?.initialize + ";\n"; @@ -203,9 +213,17 @@ class JSONTransform extends BaseVisitor { || member.flags.includes(PropertyFlags.OmitIf) ) { SERIALIZE_RAW += member.serialize; + //SERIALIZE_BL += member.serialize_bl; SERIALIZE_PRETTY += member.serialize; } else { SERIALIZE_RAW += member.serialize + ","; + if (i == schema.members.length - 1) { + SERIALIZE_BL += strToCalls("," + escapeString(JSON.stringify(member.alias || member.name)) + ":") + "\n";; + SERIALIZE_BL += member.serialize_bl.shift() + "\n";; + } else { + SERIALIZE_BL += strToCalls("," + escapeString(JSON.stringify(member.alias || member.name)) + ":") + "\n";; + SERIALIZE_BL += member.serialize_bl.shift() + "\n"; + } SERIALIZE_PRETTY += indent + member.serialize + ",\\n"; found = true; } @@ -213,9 +231,11 @@ class JSONTransform extends BaseVisitor { if (found) { SERIALIZE_RAW += "`;\n store(changetype(out) + ((out.length - 1) << 1), 125);\n return out;\n}"; + SERIALIZE_BL += " bl.write_c(125);\n}\n"; SERIALIZE_PRETTY += "`;\n store(changetype(out) + ((out.length - 2) << 1), 8192010);\n return out;\n}"; } else { SERIALIZE_RAW += "`;\n};"; + SERIALIZE_BL += "}\n"; SERIALIZE_PRETTY += "`;\n};"; } @@ -311,17 +331,20 @@ class JSONTransform extends BaseVisitor { if (process.env["JSON_DEBUG"]) { console.log(SERIALIZE_RAW); + console.log(SERIALIZE_BL); //console.log(SERIALIZE_PRETTY); console.log(INITIALIZE); console.log(DESERIALIZE); } const SERIALIZE_RAW_METHOD = SimpleParser.parseClassMember(SERIALIZE_RAW, node); + const SERIALIZE_BL_METHOD = SimpleParser.parseClassMember(SERIALIZE_BL, node); //const SERIALIZE_PRETTY_METHOD = SimpleParser.parseClassMember(SERIALIZE_PRETTY, node); const INITIALIZE_METHOD = SimpleParser.parseClassMember(INITIALIZE, node); const DESERIALIZE_METHOD = SimpleParser.parseClassMember(DESERIALIZE, node); if (!node.members.find(v => v.name.text == "__SERIALIZE")) node.members.push(SERIALIZE_RAW_METHOD); + if (!node.members.find(v => v.name.text == "__SERIALIZE_BL")) node.members.push(SERIALIZE_BL_METHOD); if (!node.members.find(v => v.name.text == "__INITIALIZE")) node.members.push(INITIALIZE_METHOD); if (!node.members.find(v => v.name.text == "__DESERIALIZE")) node.members.push(DESERIALIZE_METHOD); @@ -394,6 +417,7 @@ class Property { public args: string[] | null = []; public serialize: string | null = null; + public serialize_bl: string[] = []; public deserialize: string | null = null; public initialize: string | null = null; @@ -443,4 +467,74 @@ function escapeSlash(data: string): string { function escapeQuote(data: string): string { return data.replace(/\"/g, "\\\""); -} \ No newline at end of file +} + +function strToCalls(data) { + let out = ""; + const len = data.length - 1; + if (len >= 7) { + let i = 0; + for (; i < len - 6; i += 8) { + const a = BigInt(data.charCodeAt(i)); + const b = BigInt(data.charCodeAt(i + 1)); + const c = BigInt(data.charCodeAt(i + 2)); + const d = BigInt(data.charCodeAt(i + 3)); + const e = BigInt(data.charCodeAt(i + 4)); + const f = BigInt(data.charCodeAt(i + 5)); + const g = BigInt(data.charCodeAt(i + 6)); + const h = BigInt(data.charCodeAt(i + 7)); + out += " bl.write_128(i16x8(" + a + ", " + b + ", " + c + ", " + d + ", " + e + ", " + f + ", " + g + ", " + h + ")); /* " + data.charAt(i) + data.charAt(i + 1) + data.charAt(i + 2) + data.charAt(i + 3) + data.charAt(i + 4) + data.charAt(i + 5) + data.charAt(i + 6) + data.charAt(i + 7) + " */\n"; + } + if (i < len) { + if (len - i >= 3) { + const a = BigInt(data.charCodeAt(i)); + const b = BigInt(data.charCodeAt(i + 1)); + const c = BigInt(data.charCodeAt(i + 2)); + const d = BigInt(data.charCodeAt(i + 3)); + out += " bl.write_64(" + ((d << BigInt(48)) | (c << BigInt(32)) | (b << BigInt(16)) | a) + "/* " + data.charAt(i) + data.charAt(i + 1) + data.charAt(i + 2) + data.charAt(i + 3) + " */\n"; + i += 4; + } + if (len - i >= 1) { + const a = data.charCodeAt(i); + const b = data.charCodeAt(i + 1); + out += " bl.write_32(" + ((b << 16) | a) + "); /* " + data.charAt(i) + data.charAt(i + 1) + " */\n"; + i += 2; + } + console.log('i: ' + i.toString()); + console.log('len: ' + len.toString()) + if (len == i) { + out += " bl.write_16(" + data.charCodeAt(i) + "); /* " + data.charAt(i) + " */\n"; + i++; + } + } else { + out += " bl.write_16(" + data.charCodeAt(len) + "); /* " + data.charAt(len) + " */\n" + } + } else if (len >= 3) { + let i = 0; + for (; i < len - 2; i += 4) { + const a = BigInt(data.charCodeAt(i)); + const b = BigInt(data.charCodeAt(i + 1)); + const c = BigInt(data.charCodeAt(i + 2)); + const d = BigInt(data.charCodeAt(i + 3)); + out += " bl.write_64(" + ((d << BigInt(48)) | (c << BigInt(32)) | (b << BigInt(16)) | a) + "/* " + data.charAt(i) + data.charAt(i + 1) + data.charAt(i + 2) + data.charAt(i + 3) + " */\n"; + } + if (i < len) { + const a = data.charCodeAt(len - 1); + const b = data.charCodeAt(len); + out += " bl.write_32(" + ((b << 16) | a) + "); /* " + data.charAt(len - 1) + data.charAt(len) + " */\n"; + } else { + out += " bl.write_16(" + data.charCodeAt(len) + "); /* " + data.charAt(len) + " */\n" + } + } else if (len >= 1) { + let i = 0; + for (; i < len; i += 2) { + const a = data.charCodeAt(i); + const b = data.charCodeAt(i + 1); + out += " bl.write_32(" + ((b << 16) | a) + "); /* " + data.charAt(i) + data.charAt(i + 1) + " */\n"; + } + if (i > len) out += " bl.write_16(" + data.charCodeAt(i) + "); /* " + data.charAt(i) + " */\n" + } + return out; +} + +console.log(strToCalls('{"x":1,"y":2,"z":3}')) \ No newline at end of file